jsk 体检
This commit is contained in:
parent
a745172a60
commit
3dda3ec2ee
|
|
@ -2,6 +2,9 @@ package com.bonus.canteen.core.health.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetails;
|
||||
import com.bonus.canteen.core.health.domain.HealthPersonInfo;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.health.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -26,7 +29,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
|
||||
/**
|
||||
* 体检报告模板Controller
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
|
@ -55,7 +58,7 @@ public class HealthMedicalReportTemplateController extends BaseController {
|
|||
@ApiOperation(value = "导出体检报告模板列表")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("health:template:export")
|
||||
@SysLog(title = "体检报告模板", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出体检报告模板")
|
||||
@SysLog(title = "体检报告模板", businessType = OperaType.EXPORT, logType = 1,module = "健康管理->导出体检报告模板")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HealthMedicalReportTemplate healthMedicalReportTemplate) {
|
||||
List<HealthMedicalReportTemplate> list = healthMedicalReportTemplateService.selectHealthMedicalReportTemplateList(healthMedicalReportTemplate);
|
||||
|
|
@ -72,14 +75,28 @@ public class HealthMedicalReportTemplateController extends BaseController {
|
|||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(healthMedicalReportTemplateService.selectHealthMedicalReportTemplateById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取体检报告模板列表
|
||||
*/
|
||||
@ApiOperation(value = "获取体检报告模板列表")
|
||||
//@RequiresPermissions("health:template:query")
|
||||
@GetMapping(value = "/getModelList")
|
||||
public AjaxResult getModelList() {
|
||||
return success(healthMedicalReportTemplateService.getModelList());
|
||||
}
|
||||
@ApiOperation(value = "获取体检报告模板详细信息")
|
||||
//@RequiresPermissions("health:info:query")
|
||||
@PostMapping({"/getModelById"})
|
||||
public AjaxResult getModelById(@RequestBody HealthMedicalReportDetails vo) {
|
||||
return success(healthMedicalReportTemplateService.getModelById(vo));
|
||||
}
|
||||
/**
|
||||
* 新增体检报告模板
|
||||
*/
|
||||
@ApiOperation(value = "新增体检报告模板")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("health:template:add")
|
||||
@SysLog(title = "体检报告模板", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增体检报告模板")
|
||||
@SysLog(title = "体检报告模板", businessType = OperaType.INSERT, logType = 1,module = "健康管理->新增体检报告模板")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HealthMedicalReportTemplate healthMedicalReportTemplate) {
|
||||
try {
|
||||
|
|
@ -95,7 +112,7 @@ public class HealthMedicalReportTemplateController extends BaseController {
|
|||
@ApiOperation(value = "修改体检报告模板")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("health:template:edit")
|
||||
@SysLog(title = "体检报告模板", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改体检报告模板")
|
||||
@SysLog(title = "体检报告模板", businessType = OperaType.UPDATE, logType = 1,module = "健康管理->修改体检报告模板")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody HealthMedicalReportTemplate healthMedicalReportTemplate) {
|
||||
try {
|
||||
|
|
@ -111,7 +128,7 @@ public class HealthMedicalReportTemplateController extends BaseController {
|
|||
@ApiOperation(value = "删除体检报告模板")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("health:template:remove")
|
||||
@SysLog(title = "体检报告模板", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除体检报告模板")
|
||||
@SysLog(title = "体检报告模板", businessType = OperaType.DELETE, logType = 1,module = "健康管理->删除体检报告模板")
|
||||
@PostMapping("/del/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(healthMedicalReportTemplateService.deleteHealthMedicalReportTemplateByIds(ids));
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@ package com.bonus.canteen.core.health.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.canteen.core.health.domain.HealthChronic;
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetails;
|
||||
import com.bonus.canteen.core.health.domain.HealthPersonMedicalReportDetails;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.health.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -26,7 +30,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
|
||||
/**
|
||||
* 人员体检报告Controller
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
|
@ -49,13 +53,38 @@ public class HealthPersonMedicalReportController extends BaseController {
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询人员体检报告列表")
|
||||
//@RequiresPermissions("health:report:list")
|
||||
@PostMapping("/getReportList")
|
||||
public AjaxResult getReportList(@RequestBody HealthPersonMedicalReport healthPersonMedicalReport) {
|
||||
System.out.println("userId========="+healthPersonMedicalReport.getUserId());
|
||||
List<HealthPersonMedicalReport> list = this.healthPersonMedicalReportService.selectHealthPersonMedicalReportList(healthPersonMedicalReport);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除人员体检报告")
|
||||
//@RequiresPermissions("health:report:list")
|
||||
@PostMapping("/delReportList")
|
||||
public AjaxResult delReportList(@RequestBody HealthPersonMedicalReport healthPersonMedicalReport) {
|
||||
System.out.println("userId========="+healthPersonMedicalReport.getUserId());
|
||||
healthPersonMedicalReportService.delHealthPersonMedicalReportList(healthPersonMedicalReport);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取体检报告详细信息")
|
||||
//@RequiresPermissions("health:info:query")
|
||||
@PostMapping({"/getReportById"})
|
||||
public AjaxResult getReportById(@RequestBody HealthMedicalReportDetails vo) {
|
||||
return success(healthPersonMedicalReportService.getReportById(vo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出人员体检报告列表
|
||||
*/
|
||||
@ApiOperation(value = "导出人员体检报告列表")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("health:report:export")
|
||||
@SysLog(title = "人员体检报告", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出人员体检报告")
|
||||
@SysLog(title = "人员体检报告", businessType = OperaType.EXPORT, logType = 1,module = "健康管理->导出人员体检报告")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HealthPersonMedicalReport healthPersonMedicalReport) {
|
||||
List<HealthPersonMedicalReport> list = healthPersonMedicalReportService.selectHealthPersonMedicalReportList(healthPersonMedicalReport);
|
||||
|
|
@ -79,7 +108,7 @@ public class HealthPersonMedicalReportController extends BaseController {
|
|||
@ApiOperation(value = "新增人员体检报告")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("health:report:add")
|
||||
@SysLog(title = "人员体检报告", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增人员体检报告")
|
||||
@SysLog(title = "人员体检报告", businessType = OperaType.INSERT, logType = 1,module = "健康管理->新增人员体检报告")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HealthPersonMedicalReport healthPersonMedicalReport) {
|
||||
try {
|
||||
|
|
@ -88,6 +117,21 @@ public class HealthPersonMedicalReportController extends BaseController {
|
|||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
@ApiOperation(value = "新增人员体检报告")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("health:report:add")
|
||||
@SysLog(title = "人员体检报告", businessType = OperaType.INSERT, logType = 1,module = "健康管理->新增人员体检报告")
|
||||
@PostMapping({"/addReport"})
|
||||
public AjaxResult addReport(@RequestBody HealthPersonMedicalReportDetails healthPersonMedicalReport) {
|
||||
System.out.println("healthPersonMedicalReport==========="+healthPersonMedicalReport.getMedicalTemplateId());
|
||||
System.out.println(healthPersonMedicalReport.getReportDatas().get(0).getMedicalProjectId());
|
||||
System.out.println(healthPersonMedicalReport.getReportDatas().get(0).getHealthMedicalReportDetails().get(0).getMedicalProjectDetailName());
|
||||
try {
|
||||
return toAjax(healthPersonMedicalReportService.insertHealthPersonMedicalReports(healthPersonMedicalReport));
|
||||
} catch (Exception e) {
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人员体检报告
|
||||
|
|
@ -95,7 +139,7 @@ public class HealthPersonMedicalReportController extends BaseController {
|
|||
@ApiOperation(value = "修改人员体检报告")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("health:report:edit")
|
||||
@SysLog(title = "人员体检报告", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改人员体检报告")
|
||||
@SysLog(title = "人员体检报告", businessType = OperaType.UPDATE, logType = 1,module = "健康管理->修改人员体检报告")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody HealthPersonMedicalReport healthPersonMedicalReport) {
|
||||
try {
|
||||
|
|
@ -111,7 +155,7 @@ public class HealthPersonMedicalReportController extends BaseController {
|
|||
@ApiOperation(value = "删除人员体检报告")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("health:report:remove")
|
||||
@SysLog(title = "人员体检报告", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除人员体检报告")
|
||||
@SysLog(title = "人员体检报告", businessType = OperaType.DELETE, logType = 1,module = "健康管理->删除人员体检报告")
|
||||
@PostMapping("/del/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(healthPersonMedicalReportService.deleteHealthPersonMedicalReportByIds(ids));
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
|||
|
||||
/**
|
||||
* 体检报告项目明细对象 health_medical_report_detail
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
|
@ -26,7 +26,10 @@ public class HealthMedicalReportDetail extends BaseEntity {
|
|||
@Excel(name = "体检项目id")
|
||||
@ApiModelProperty(value = "体检项目id")
|
||||
private Long medicalProjectId;
|
||||
|
||||
/** 体检id */
|
||||
@Excel(name = "体检id")
|
||||
@ApiModelProperty(value = "体检id")
|
||||
private Long medicalId;
|
||||
/** 体检项目明细id */
|
||||
@Excel(name = "体检项目明细id")
|
||||
@ApiModelProperty(value = "体检项目明细id")
|
||||
|
|
@ -47,5 +50,9 @@ public class HealthMedicalReportDetail extends BaseEntity {
|
|||
@ApiModelProperty(value = "参考值范围")
|
||||
private String medicalProjectDetailReference;
|
||||
|
||||
@Excel(name = "检查结果")
|
||||
@ApiModelProperty(value = "检查结果")
|
||||
private String result;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
package com.bonus.canteen.core.health.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 体检报告项目明细对象 health_medical_report_detail
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class HealthMedicalReportDetails extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键自增 */
|
||||
private Long id;
|
||||
|
||||
/** 体检项目id */
|
||||
@Excel(name = "体检项目id")
|
||||
@ApiModelProperty(value = "体检项目id")
|
||||
private Long medicalProjectId;
|
||||
/** 体检id */
|
||||
@Excel(name = "体检id")
|
||||
@ApiModelProperty(value = "体检id")
|
||||
private Long medicalId;
|
||||
/** 体检模板id */
|
||||
@Excel(name = "体检模板id")
|
||||
@ApiModelProperty(value = "体检模板id")
|
||||
private Long medicalTemplateId;
|
||||
|
||||
/** 体检项目名称 */
|
||||
@Excel(name = "体检项目名称")
|
||||
@ApiModelProperty(value = "体检项目名称")
|
||||
private String medicalProjectName;
|
||||
|
||||
private List<HealthMedicalReportDetail> healthMedicalReportDetails;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.bonus.canteen.core.health.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人员体检报告项目明细对象 health_person_medical_report_detail
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class HealthPersonMedicalReportDetails extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键自增 */
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 体检id */
|
||||
@Excel(name = "体检id")
|
||||
@ApiModelProperty(value = "体检id")
|
||||
private Long medicalId;
|
||||
|
||||
/** 人员id */
|
||||
@Excel(name = "人员id")
|
||||
@ApiModelProperty(value = "人员id")
|
||||
private Long userId;
|
||||
|
||||
/** 体检日期 */
|
||||
@ApiModelProperty(value = "体检日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "体检日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date medicalDate;
|
||||
|
||||
/** 体检机构 */
|
||||
@Excel(name = "体检机构")
|
||||
@ApiModelProperty(value = "体检机构")
|
||||
private String medicalMechanism;
|
||||
|
||||
/** 体检模板id */
|
||||
@Excel(name = "体检模板id")
|
||||
@ApiModelProperty(value = "体检模板id")
|
||||
private Long medicalTemplateId;
|
||||
|
||||
private List<HealthMedicalReportDetails> reportDatas;
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +1,21 @@
|
|||
package com.bonus.canteen.core.health.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetail;
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetails;
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportTemplate;
|
||||
|
||||
/**
|
||||
* 体检报告模板Mapper接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
public interface HealthMedicalReportTemplateMapper {
|
||||
/**
|
||||
* 查询体检报告模板
|
||||
*
|
||||
*
|
||||
* @param id 体检报告模板主键
|
||||
* @return 体检报告模板
|
||||
*/
|
||||
|
|
@ -20,7 +23,7 @@ public interface HealthMedicalReportTemplateMapper {
|
|||
|
||||
/**
|
||||
* 查询体检报告模板列表
|
||||
*
|
||||
*
|
||||
* @param healthMedicalReportTemplate 体检报告模板
|
||||
* @return 体检报告模板集合
|
||||
*/
|
||||
|
|
@ -28,7 +31,7 @@ public interface HealthMedicalReportTemplateMapper {
|
|||
|
||||
/**
|
||||
* 新增体检报告模板
|
||||
*
|
||||
*
|
||||
* @param healthMedicalReportTemplate 体检报告模板
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -36,7 +39,7 @@ public interface HealthMedicalReportTemplateMapper {
|
|||
|
||||
/**
|
||||
* 修改体检报告模板
|
||||
*
|
||||
*
|
||||
* @param healthMedicalReportTemplate 体检报告模板
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -44,7 +47,7 @@ public interface HealthMedicalReportTemplateMapper {
|
|||
|
||||
/**
|
||||
* 删除体检报告模板
|
||||
*
|
||||
*
|
||||
* @param id 体检报告模板主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -52,9 +55,15 @@ public interface HealthMedicalReportTemplateMapper {
|
|||
|
||||
/**
|
||||
* 批量删除体检报告模板
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthMedicalReportTemplateByIds(Long[] ids);
|
||||
|
||||
List<HealthMedicalReportTemplate> getModelList();
|
||||
|
||||
List<HealthMedicalReportDetails> getModelById(HealthMedicalReportDetails vo);
|
||||
|
||||
List<HealthMedicalReportDetail> getModelDetailById(HealthMedicalReportDetails vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,22 @@
|
|||
package com.bonus.canteen.core.health.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetail;
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetails;
|
||||
import com.bonus.canteen.core.health.domain.HealthPersonMedicalReport;
|
||||
import com.bonus.canteen.core.health.domain.HealthPersonMedicalReportDetails;
|
||||
|
||||
/**
|
||||
* 人员体检报告Mapper接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
public interface HealthPersonMedicalReportMapper {
|
||||
/**
|
||||
* 查询人员体检报告
|
||||
*
|
||||
*
|
||||
* @param id 人员体检报告主键
|
||||
* @return 人员体检报告
|
||||
*/
|
||||
|
|
@ -20,7 +24,7 @@ public interface HealthPersonMedicalReportMapper {
|
|||
|
||||
/**
|
||||
* 查询人员体检报告列表
|
||||
*
|
||||
*
|
||||
* @param healthPersonMedicalReport 人员体检报告
|
||||
* @return 人员体检报告集合
|
||||
*/
|
||||
|
|
@ -28,15 +32,20 @@ public interface HealthPersonMedicalReportMapper {
|
|||
|
||||
/**
|
||||
* 新增人员体检报告
|
||||
*
|
||||
*
|
||||
* @param healthPersonMedicalReport 人员体检报告
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthPersonMedicalReport(HealthPersonMedicalReport healthPersonMedicalReport);
|
||||
|
||||
public int insertPersonReport(HealthPersonMedicalReportDetails healthPersonMedicalReport);
|
||||
int updatePersonReport(HealthPersonMedicalReportDetails healthPersonMedicalReport);
|
||||
int delHealthPersonMedicalReportList(HealthPersonMedicalReport healthPersonMedicalReport);
|
||||
int insertPersonReportProject(HealthMedicalReportDetails vo);
|
||||
int insertPersonReportDetail(HealthMedicalReportDetail vo);
|
||||
/**
|
||||
* 修改人员体检报告
|
||||
*
|
||||
*
|
||||
* @param healthPersonMedicalReport 人员体检报告
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -44,7 +53,7 @@ public interface HealthPersonMedicalReportMapper {
|
|||
|
||||
/**
|
||||
* 删除人员体检报告
|
||||
*
|
||||
*
|
||||
* @param id 人员体检报告主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -52,9 +61,13 @@ public interface HealthPersonMedicalReportMapper {
|
|||
|
||||
/**
|
||||
* 批量删除人员体检报告
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthPersonMedicalReportByIds(Long[] ids);
|
||||
|
||||
List<HealthMedicalReportDetails> getReportById(HealthMedicalReportDetails vo);
|
||||
|
||||
List<HealthMedicalReportDetail> getReportDetailById(HealthMedicalReportDetails vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
package com.bonus.canteen.core.health.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetails;
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportTemplate;
|
||||
|
||||
/**
|
||||
* 体检报告模板Service接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
public interface IHealthMedicalReportTemplateService {
|
||||
/**
|
||||
* 查询体检报告模板
|
||||
*
|
||||
*
|
||||
* @param id 体检报告模板主键
|
||||
* @return 体检报告模板
|
||||
*/
|
||||
|
|
@ -20,7 +22,7 @@ public interface IHealthMedicalReportTemplateService {
|
|||
|
||||
/**
|
||||
* 查询体检报告模板列表
|
||||
*
|
||||
*
|
||||
* @param healthMedicalReportTemplate 体检报告模板
|
||||
* @return 体检报告模板集合
|
||||
*/
|
||||
|
|
@ -28,7 +30,7 @@ public interface IHealthMedicalReportTemplateService {
|
|||
|
||||
/**
|
||||
* 新增体检报告模板
|
||||
*
|
||||
*
|
||||
* @param healthMedicalReportTemplate 体检报告模板
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -36,7 +38,7 @@ public interface IHealthMedicalReportTemplateService {
|
|||
|
||||
/**
|
||||
* 修改体检报告模板
|
||||
*
|
||||
*
|
||||
* @param healthMedicalReportTemplate 体检报告模板
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -44,7 +46,7 @@ public interface IHealthMedicalReportTemplateService {
|
|||
|
||||
/**
|
||||
* 批量删除体检报告模板
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的体检报告模板主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -52,9 +54,13 @@ public interface IHealthMedicalReportTemplateService {
|
|||
|
||||
/**
|
||||
* 删除体检报告模板信息
|
||||
*
|
||||
*
|
||||
* @param id 体检报告模板主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthMedicalReportTemplateById(Long id);
|
||||
|
||||
public List<HealthMedicalReportTemplate> getModelList();
|
||||
|
||||
public List<HealthMedicalReportDetails> getModelById(HealthMedicalReportDetails vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,21 @@
|
|||
package com.bonus.canteen.core.health.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetails;
|
||||
import com.bonus.canteen.core.health.domain.HealthPersonMedicalReport;
|
||||
import com.bonus.canteen.core.health.domain.HealthPersonMedicalReportDetails;
|
||||
|
||||
/**
|
||||
* 人员体检报告Service接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
public interface IHealthPersonMedicalReportService {
|
||||
/**
|
||||
* 查询人员体检报告
|
||||
*
|
||||
*
|
||||
* @param id 人员体检报告主键
|
||||
* @return 人员体检报告
|
||||
*/
|
||||
|
|
@ -20,23 +23,26 @@ public interface IHealthPersonMedicalReportService {
|
|||
|
||||
/**
|
||||
* 查询人员体检报告列表
|
||||
*
|
||||
*
|
||||
* @param healthPersonMedicalReport 人员体检报告
|
||||
* @return 人员体检报告集合
|
||||
*/
|
||||
public List<HealthPersonMedicalReport> selectHealthPersonMedicalReportList(HealthPersonMedicalReport healthPersonMedicalReport);
|
||||
|
||||
|
||||
/**
|
||||
* 新增人员体检报告
|
||||
*
|
||||
*
|
||||
* @param healthPersonMedicalReport 人员体检报告
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthPersonMedicalReport(HealthPersonMedicalReport healthPersonMedicalReport);
|
||||
|
||||
public int insertHealthPersonMedicalReports(HealthPersonMedicalReportDetails healthPersonMedicalReport);
|
||||
int delHealthPersonMedicalReportList(HealthPersonMedicalReport healthPersonMedicalReport);
|
||||
/**
|
||||
* 修改人员体检报告
|
||||
*
|
||||
*
|
||||
* @param healthPersonMedicalReport 人员体检报告
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -44,7 +50,7 @@ public interface IHealthPersonMedicalReportService {
|
|||
|
||||
/**
|
||||
* 批量删除人员体检报告
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的人员体检报告主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -52,9 +58,11 @@ public interface IHealthPersonMedicalReportService {
|
|||
|
||||
/**
|
||||
* 删除人员体检报告信息
|
||||
*
|
||||
*
|
||||
* @param id 人员体检报告主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthPersonMedicalReportById(Long id);
|
||||
|
||||
public List<HealthMedicalReportDetails> getReportById(HealthMedicalReportDetails vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
package com.bonus.canteen.core.health.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetail;
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetails;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -11,7 +15,7 @@ import com.bonus.canteen.core.health.service.IHealthMedicalReportTemplateService
|
|||
|
||||
/**
|
||||
* 体检报告模板Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
|
@ -22,7 +26,7 @@ public class HealthMedicalReportTemplateServiceImpl implements IHealthMedicalRep
|
|||
|
||||
/**
|
||||
* 查询体检报告模板
|
||||
*
|
||||
*
|
||||
* @param id 体检报告模板主键
|
||||
* @return 体检报告模板
|
||||
*/
|
||||
|
|
@ -33,7 +37,7 @@ public class HealthMedicalReportTemplateServiceImpl implements IHealthMedicalRep
|
|||
|
||||
/**
|
||||
* 查询体检报告模板列表
|
||||
*
|
||||
*
|
||||
* @param healthMedicalReportTemplate 体检报告模板
|
||||
* @return 体检报告模板
|
||||
*/
|
||||
|
|
@ -44,7 +48,7 @@ public class HealthMedicalReportTemplateServiceImpl implements IHealthMedicalRep
|
|||
|
||||
/**
|
||||
* 新增体检报告模板
|
||||
*
|
||||
*
|
||||
* @param healthMedicalReportTemplate 体检报告模板
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -60,7 +64,7 @@ public class HealthMedicalReportTemplateServiceImpl implements IHealthMedicalRep
|
|||
|
||||
/**
|
||||
* 修改体检报告模板
|
||||
*
|
||||
*
|
||||
* @param healthMedicalReportTemplate 体检报告模板
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -76,7 +80,7 @@ public class HealthMedicalReportTemplateServiceImpl implements IHealthMedicalRep
|
|||
|
||||
/**
|
||||
* 批量删除体检报告模板
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的体检报告模板主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -87,7 +91,7 @@ public class HealthMedicalReportTemplateServiceImpl implements IHealthMedicalRep
|
|||
|
||||
/**
|
||||
* 删除体检报告模板信息
|
||||
*
|
||||
*
|
||||
* @param id 体检报告模板主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -95,4 +99,29 @@ public class HealthMedicalReportTemplateServiceImpl implements IHealthMedicalRep
|
|||
public int deleteHealthMedicalReportTemplateById(Long id) {
|
||||
return healthMedicalReportTemplateMapper.deleteHealthMedicalReportTemplateById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HealthMedicalReportTemplate> getModelList() {
|
||||
return healthMedicalReportTemplateMapper.getModelList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HealthMedicalReportDetails> getModelById(HealthMedicalReportDetails vo) {
|
||||
List<HealthMedicalReportDetails> detailsVos=new ArrayList<>();
|
||||
try{
|
||||
detailsVos=healthMedicalReportTemplateMapper.getModelById(vo);
|
||||
System.out.println("edicalTemplateId=============="+vo.getMedicalTemplateId());
|
||||
System.out.println("detailsVos=============="+detailsVos.size());
|
||||
for(HealthMedicalReportDetails bean:detailsVos){
|
||||
List<HealthMedicalReportDetail> details=new ArrayList<>();
|
||||
System.out.println("medicalProjectId=============="+bean.getMedicalProjectId());
|
||||
details=healthMedicalReportTemplateMapper.getModelDetailById(bean);
|
||||
System.out.println("details=============="+details.size());
|
||||
bean.setHealthMedicalReportDetails(details);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return detailsVos;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
package com.bonus.canteen.core.health.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetail;
|
||||
import com.bonus.canteen.core.health.domain.HealthMedicalReportDetails;
|
||||
import com.bonus.canteen.core.health.domain.HealthPersonMedicalReportDetails;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -11,7 +16,7 @@ import com.bonus.canteen.core.health.service.IHealthPersonMedicalReportService;
|
|||
|
||||
/**
|
||||
* 人员体检报告Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
|
@ -22,7 +27,7 @@ public class HealthPersonMedicalReportServiceImpl implements IHealthPersonMedica
|
|||
|
||||
/**
|
||||
* 查询人员体检报告
|
||||
*
|
||||
*
|
||||
* @param id 人员体检报告主键
|
||||
* @return 人员体检报告
|
||||
*/
|
||||
|
|
@ -33,7 +38,7 @@ public class HealthPersonMedicalReportServiceImpl implements IHealthPersonMedica
|
|||
|
||||
/**
|
||||
* 查询人员体检报告列表
|
||||
*
|
||||
*
|
||||
* @param healthPersonMedicalReport 人员体检报告
|
||||
* @return 人员体检报告
|
||||
*/
|
||||
|
|
@ -44,7 +49,7 @@ public class HealthPersonMedicalReportServiceImpl implements IHealthPersonMedica
|
|||
|
||||
/**
|
||||
* 新增人员体检报告
|
||||
*
|
||||
*
|
||||
* @param healthPersonMedicalReport 人员体检报告
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -57,10 +62,47 @@ public class HealthPersonMedicalReportServiceImpl implements IHealthPersonMedica
|
|||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public int insertHealthPersonMedicalReports(HealthPersonMedicalReportDetails healthPersonMedicalReport) {
|
||||
healthPersonMedicalReport.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
healthPersonMedicalReport.setMedicalId(System.currentTimeMillis());
|
||||
healthPersonMedicalReportMapper.insertPersonReport(healthPersonMedicalReport);
|
||||
healthPersonMedicalReportMapper.updatePersonReport(healthPersonMedicalReport);
|
||||
List<HealthMedicalReportDetails> reportDatas=healthPersonMedicalReport.getReportDatas();
|
||||
if(reportDatas!=null&&reportDatas.size()>0){
|
||||
for(HealthMedicalReportDetails vo:reportDatas){
|
||||
List<HealthMedicalReportDetail> details=vo.getHealthMedicalReportDetails();
|
||||
vo.setMedicalId(healthPersonMedicalReport.getMedicalId());
|
||||
healthPersonMedicalReportMapper.insertPersonReportProject(vo);
|
||||
if(details!=null&&details.size()>0){
|
||||
for(HealthMedicalReportDetail vo1:details){
|
||||
vo1.setMedicalId(healthPersonMedicalReport.getMedicalId());
|
||||
vo1.setMedicalProjectDetailId(vo1.getMedicalProjectId());
|
||||
vo1.setMedicalProjectId(vo.getMedicalProjectId());
|
||||
healthPersonMedicalReportMapper.insertPersonReportDetail(vo1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public int delHealthPersonMedicalReportList(HealthPersonMedicalReport healthPersonMedicalReport) {
|
||||
try{
|
||||
healthPersonMedicalReportMapper.delHealthPersonMedicalReportList(healthPersonMedicalReport);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人员体检报告
|
||||
*
|
||||
*
|
||||
* @param healthPersonMedicalReport 人员体检报告
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -76,7 +118,7 @@ public class HealthPersonMedicalReportServiceImpl implements IHealthPersonMedica
|
|||
|
||||
/**
|
||||
* 批量删除人员体检报告
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的人员体检报告主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -87,7 +129,7 @@ public class HealthPersonMedicalReportServiceImpl implements IHealthPersonMedica
|
|||
|
||||
/**
|
||||
* 删除人员体检报告信息
|
||||
*
|
||||
*
|
||||
* @param id 人员体检报告主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -95,4 +137,24 @@ public class HealthPersonMedicalReportServiceImpl implements IHealthPersonMedica
|
|||
public int deleteHealthPersonMedicalReportById(Long id) {
|
||||
return healthPersonMedicalReportMapper.deleteHealthPersonMedicalReportById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HealthMedicalReportDetails> getReportById(HealthMedicalReportDetails vo) {
|
||||
List<HealthMedicalReportDetails> detailsVos=new ArrayList<>();
|
||||
try{
|
||||
System.out.println("getMedicalId=============="+vo.getMedicalId());
|
||||
detailsVos=healthPersonMedicalReportMapper.getReportById(vo);
|
||||
System.out.println("detailsVos=============="+detailsVos.size());
|
||||
for(HealthMedicalReportDetails bean:detailsVos){
|
||||
List<HealthMedicalReportDetail> details=new ArrayList<>();
|
||||
System.out.println("medicalProjectId=============="+bean.getMedicalProjectId());
|
||||
details=healthPersonMedicalReportMapper.getReportDetailById(bean);
|
||||
System.out.println("details=============="+details.size());
|
||||
bean.setHealthMedicalReportDetails(details);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return detailsVos;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,17 +20,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectHealthMedicalReportTemplateList" parameterType="com.bonus.canteen.core.health.domain.HealthMedicalReportTemplate" resultMap="HealthMedicalReportTemplateResult">
|
||||
<include refid="selectHealthMedicalReportTemplateVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="medicalTemplateId != null "> and medical_template_id = #{medicalTemplateId}</if>
|
||||
<if test="medicalTemplateName != null and medicalTemplateName != ''"> and medical_template_name like concat('%', #{medicalTemplateName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectHealthMedicalReportTemplateById" parameterType="Long" resultMap="HealthMedicalReportTemplateResult">
|
||||
<include refid="selectHealthMedicalReportTemplateVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertHealthMedicalReportTemplate" parameterType="com.bonus.canteen.core.health.domain.HealthMedicalReportTemplate" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into health_medical_report_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -72,9 +72,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteHealthMedicalReportTemplateByIds" parameterType="String">
|
||||
delete from health_medical_report_template where id in
|
||||
delete from health_medical_report_template where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
<select id="getModelList" parameterType="com.bonus.canteen.core.health.domain.HealthMedicalReportTemplate" resultMap="HealthMedicalReportTemplateResult">
|
||||
<include refid="selectHealthMedicalReportTemplateVo"/>
|
||||
</select>
|
||||
<select id="getModelById" parameterType="com.bonus.canteen.core.health.domain.HealthMedicalReportDetails" resultType="com.bonus.canteen.core.health.domain.HealthMedicalReportDetails">
|
||||
select medical_project_id as medicalprojectid,medical_project_name as medicalprojectname
|
||||
from health_medical_report_project a
|
||||
where medical_template_id = #{medicalTemplateId}
|
||||
ORDER BY create_time ASC
|
||||
</select>
|
||||
<select id="getModelDetailById" parameterType="com.bonus.canteen.core.health.domain.HealthMedicalReportDetails" resultType="com.bonus.canteen.core.health.domain.HealthMedicalReportDetail">
|
||||
select medical_project_id as medicalprojectid,medical_project_detail_name as medicalprojectdetailname,medical_project_detail_unit as medicalprojectdetailunit
|
||||
from health_medical_report_detail a
|
||||
where medical_project_id = #{medicalProjectId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectHealthPersonMedicalReportList" parameterType="com.bonus.canteen.core.health.domain.HealthPersonMedicalReport" resultMap="HealthPersonMedicalReportResult">
|
||||
<include refid="selectHealthPersonMedicalReportVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="medicalId != null "> and medical_id = #{medicalId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="medicalDate != null "> and medical_date = #{medicalDate}</if>
|
||||
|
|
@ -30,12 +30,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="medicalTemplateId != null "> and medical_template_id = #{medicalTemplateId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectHealthPersonMedicalReportById" parameterType="Long" resultMap="HealthPersonMedicalReportResult">
|
||||
<include refid="selectHealthPersonMedicalReportVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertHealthPersonMedicalReport" parameterType="com.bonus.canteen.core.health.domain.HealthPersonMedicalReport" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into health_person_medical_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -61,7 +61,73 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertPersonReport" parameterType="com.bonus.canteen.core.health.domain.HealthPersonMedicalReportDetails" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into health_person_medical_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="medicalId != null">medical_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="medicalDate != null">medical_date,</if>
|
||||
<if test="medicalMechanism != null and medicalMechanism != ''">medical_mechanism,</if>
|
||||
<if test="medicalTemplateId != null">medical_template_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="medicalId != null">#{medicalId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="medicalDate != null">#{medicalDate},</if>
|
||||
<if test="medicalMechanism != null and medicalMechanism != ''">#{medicalMechanism},</if>
|
||||
<if test="medicalTemplateId != null">#{medicalTemplateId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertPersonReportProject" parameterType="com.bonus.canteen.core.health.domain.HealthMedicalReportDetails" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into health_person_medical_report_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="medicalId != null">medical_id,</if>
|
||||
<if test="medicalProjectId != null">medical_project_id,</if>
|
||||
<if test="medicalProjectName != null">medical_project_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="medicalId != null">#{medicalId},</if>
|
||||
<if test="medicalProjectId != null">#{medicalProjectId},</if>
|
||||
<if test="medicalProjectName != null">#{medicalProjectName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertPersonReportDetail" parameterType="com.bonus.canteen.core.health.domain.HealthMedicalReportDetail" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into health_person_medical_report_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="medicalId != null">medical_id,</if>
|
||||
<if test="medicalProjectId != null">medical_project_id,</if>
|
||||
<if test="medicalProjectDetailId != null">medical_project_detail_id,</if>
|
||||
<if test="medicalProjectDetailName != null">medical_project_detail_name,</if>
|
||||
<if test="result != null">result,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="medicalId != null">#{medicalId},</if>
|
||||
<if test="medicalProjectId != null">#{medicalProjectId},</if>
|
||||
<if test="medicalProjectDetailId != null">#{medicalProjectDetailId},</if>
|
||||
<if test="medicalProjectDetailName != null">#{medicalProjectDetailName},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePersonReport" parameterType="com.bonus.canteen.core.health.domain.HealthPersonMedicalReportDetails">
|
||||
update health_person_medical_report
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="medicalId != null">medical_id = #{medicalId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="delHealthPersonMedicalReportList" parameterType="com.bonus.canteen.core.health.domain.HealthPersonMedicalReport">
|
||||
delete from health_person_medical_report
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateHealthPersonMedicalReport" parameterType="com.bonus.canteen.core.health.domain.HealthPersonMedicalReport">
|
||||
update health_person_medical_report
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
|
|
@ -83,9 +149,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteHealthPersonMedicalReportByIds" parameterType="String">
|
||||
delete from health_person_medical_report where id in
|
||||
delete from health_person_medical_report where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
<select id="getReportById" parameterType="com.bonus.canteen.core.health.domain.HealthMedicalReportDetails" resultType="com.bonus.canteen.core.health.domain.HealthMedicalReportDetails">
|
||||
select medical_project_id as medicalprojectid,medical_project_name as medicalprojectname,medical_id as medicalid
|
||||
from health_person_medical_report_project a
|
||||
where medical_id = #{medicalId}
|
||||
ORDER BY create_time ASC
|
||||
</select>
|
||||
<select id="getReportDetailById" parameterType="com.bonus.canteen.core.health.domain.HealthMedicalReportDetails" resultType="com.bonus.canteen.core.health.domain.HealthMedicalReportDetail">
|
||||
select medical_project_id as medicalprojectid,medical_project_detail_name as medicalprojectdetailname,medical_project_detail_unit as medicalprojectdetailunit
|
||||
,result
|
||||
from health_person_medical_report_detail a
|
||||
where medical_project_id = #{medicalProjectId} and medical_id = #{medicalId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue