From 77a36274900fc6aa352a993bf88c99286264a5b2 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Fri, 1 Nov 2024 13:24:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=B1=E5=8C=BB=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E8=B4=B9=E7=94=A8=E6=98=8E=E7=BB=86=EF=BC=8C=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HealthDoctorRecordCostController.java | 109 +++++++++++++ .../health/domain/HealthDoctorRecord.java | 7 + .../health/domain/HealthDoctorRecordCost.java | 110 ++++++++++++++ .../domain/dto/HealthDoctorRecordCostDto.java | 45 ++++++ .../domain/dto/HealthDoctorRecordDto.java | 2 + .../domain/vo/HealthDoctorRecordCostVo.java | 17 +++ .../mapper/HealthDoctorRecordCostMapper.java | 79 ++++++++++ .../IHealthDoctorRecordCostService.java | 63 ++++++++ .../HealthDoctorRecordCostServiceImpl.java | 104 +++++++++++++ .../impl/HealthMedicineBasicServiceImpl.java | 6 +- .../health/HealthDoctorRecordCostMapper.xml | 143 ++++++++++++++++++ .../health/HealthDoctorRecordMapper.xml | 6 + .../mapper/health/HealthMarRecordMapper.xml | 2 +- 13 files changed, 691 insertions(+), 2 deletions(-) create mode 100644 ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/controller/HealthDoctorRecordCostController.java create mode 100644 ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/HealthDoctorRecordCost.java create mode 100644 ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/dto/HealthDoctorRecordCostDto.java create mode 100644 ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/vo/HealthDoctorRecordCostVo.java create mode 100644 ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/mapper/HealthDoctorRecordCostMapper.java create mode 100644 ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/IHealthDoctorRecordCostService.java create mode 100644 ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/impl/HealthDoctorRecordCostServiceImpl.java create mode 100644 ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthDoctorRecordCostMapper.xml diff --git a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/controller/HealthDoctorRecordCostController.java b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/controller/HealthDoctorRecordCostController.java new file mode 100644 index 0000000..625cf3e --- /dev/null +++ b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/controller/HealthDoctorRecordCostController.java @@ -0,0 +1,109 @@ +package com.ruoyi.health.controller; + +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.web.page.TableDataInfo; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.health.domain.HealthDoctorRecordCost; +import com.ruoyi.health.domain.dto.HealthDoctorRecordCostDto; +import com.ruoyi.health.domain.vo.HealthDoctorRecordCostVo; +import com.ruoyi.health.service.IHealthDoctorRecordCostService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 就医记录费用明细Controller + * + * @author tianyongbao + * @date 2024-10-31 + */ +@Api(tags=" 就医记录费用明细") +@RestController +@RequestMapping("/doctorRecordCost") +public class HealthDoctorRecordCostController extends BaseController +{ + @Resource + private IHealthDoctorRecordCostService healthDoctorRecordCostService; + + /** + * 查询就医记录费用明细列表 + */ + @ApiOperation(value="查询就医记录费用明细列表",response = HealthDoctorRecordCostVo.class) + @RequiresPermissions("health:doctorRecord:list") + @GetMapping("/list") + public TableDataInfo list(HealthDoctorRecordCostDto healthDoctorRecordCostDto) + { + startPage(); + List list = healthDoctorRecordCostService.selectHealthDoctorRecordCostList(healthDoctorRecordCostDto); + return getDataTable(list); + } + + /** + * 导出就医记录费用明细列表 + */ + @ApiOperation(value="导出就医记录费用明细列表") + @RequiresPermissions("health:doctorRecordCost:export") + @Log(title = "就医记录费用明细", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, HealthDoctorRecordCostDto healthDoctorRecordCostDto) + { + List list = healthDoctorRecordCostService.selectHealthDoctorRecordCostList(healthDoctorRecordCostDto); + ExcelUtil util = new ExcelUtil(HealthDoctorRecordCostVo.class); + util.exportExcel(response, list, "就医记录费用明细数据"); + } + + /** + * 获取就医记录费用明细详细信息 + */ + @ApiOperation(value="获取就医记录费用明细详细信息") + @RequiresPermissions("health:doctorRecord:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(healthDoctorRecordCostService.selectHealthDoctorRecordCostById(id)); + } + + /** + * 新增就医记录费用明细 + */ + @ApiOperation(value="新增就医记录费用明细") + @RequiresPermissions("health:doctorRecord:add") + @Log(title = "就医记录费用明细", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody HealthDoctorRecordCost healthDoctorRecordCost) + { + return toAjax(healthDoctorRecordCostService.insertHealthDoctorRecordCost(healthDoctorRecordCost)); + } + + /** + * 修改就医记录费用明细 + */ + @ApiOperation(value="修改就医记录费用明细") + @RequiresPermissions("health:doctorRecord:edit") + @Log(title = "就医记录费用明细", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody HealthDoctorRecordCost healthDoctorRecordCost) + { + return toAjax(healthDoctorRecordCostService.updateHealthDoctorRecordCost(healthDoctorRecordCost)); + } + + /** + * 删除就医记录费用明细 + */ + @ApiOperation(value="删除就医记录费用明细") + @RequiresPermissions("health:doctorRecord:remove") + @Log(title = "就医记录费用明细", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(healthDoctorRecordCostService.deleteHealthDoctorRecordCostByIds(ids)); + } +} diff --git a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/HealthDoctorRecord.java b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/HealthDoctorRecord.java index a1cde37..c89609c 100644 --- a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/HealthDoctorRecord.java +++ b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/HealthDoctorRecord.java @@ -81,6 +81,12 @@ public class HealthDoctorRecord extends BaseEntity /** 费用明细 */ private String costDetail; + /** 用药类型,1门诊,2急诊,3住院 */ + @ApiModelProperty(value="就诊类型)") + @Excel(name = "就诊类型") + private String type; + + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -101,6 +107,7 @@ public class HealthDoctorRecord extends BaseEntity .append("totalCost", getTotalCost()) .append("partner", getPartner()) .append("costDetail", getCostDetail()) + .append("type", getType()) .toString(); } } diff --git a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/HealthDoctorRecordCost.java b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/HealthDoctorRecordCost.java new file mode 100644 index 0000000..f131690 --- /dev/null +++ b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/HealthDoctorRecordCost.java @@ -0,0 +1,110 @@ +package com.ruoyi.health.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; +/** + * 就医记录费用明细对象 health_doctor_record_cost + * + * @author tianyongbao + * @date 2024-10-31 + */ +@ApiModel("就医记录费用明细对象") +@Data +public class HealthDoctorRecordCost extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 就医记录id */ + private Long doctorRecordId; + + /** 费用类型 */ + @ApiModelProperty(value="费用类型") + @Excel(name = "费用类型") + private String type; + + /** 删除标志(0代表存在 1代表删除) */ + private String delFlag; + + /** 健康档案 */ + private Long healthRecordId; + + /** 产生时间 */ + @ApiModelProperty(value="产生时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "产生时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date costTime; + + /** 费用名称 */ + @ApiModelProperty(value="费用名称") + @Excel(name = "费用名称") + private String costName; + + /** 人员id */ + private Long personId; + + /** 总价 */ + @ApiModelProperty(value="总价") + @Excel(name = "总价") + private Double totalCost; + + /** 单价 */ + @ApiModelProperty(value="单价") + @Excel(name = "单价") + private Double price; + + /** 数量 */ + @ApiModelProperty(value="数量") + @Excel(name = "数量") + private Double count; + + /** 单位 */ + @ApiModelProperty(value="单位") + @Excel(name = "单位") + private String unit; + + /** 药品id */ + @ApiModelProperty(value="药品id") + @Excel(name = "药品id") + private Long medicineId; + + /** 检查类型 */ + @ApiModelProperty(value="检查类型") + @Excel(name = "检查类型") + private String checkType; + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("doctorRecordId", getDoctorRecordId()) + .append("type", getType()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("delFlag", getDelFlag()) + .append("remark", getRemark()) + .append("healthRecordId", getHealthRecordId()) + .append("costTime", getCostTime()) + .append("costName", getCostName()) + .append("personId", getPersonId()) + .append("totalCost", getTotalCost()) + .append("price", getPrice()) + .append("count", getCount()) + .append("unit", getUnit()) + .append("medicineId", getMedicineId()) + .append("checkType", getCheckType()) + .toString(); + } +} diff --git a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/dto/HealthDoctorRecordCostDto.java b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/dto/HealthDoctorRecordCostDto.java new file mode 100644 index 0000000..6feca69 --- /dev/null +++ b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/dto/HealthDoctorRecordCostDto.java @@ -0,0 +1,45 @@ +package com.ruoyi.health.domain.dto; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +/** + * 就医记录费用明细Dto对象 health_doctor_record_cost + * + * @author tianyongbao + * @date 2024-10-31 + */ +@ApiModel("就医记录费用明细Dto对象") +@Data +public class HealthDoctorRecordCostDto implements Serializable +{ + private static final long serialVersionUID = 1L; + + /** 就医记录id */ + @ApiModelProperty(value="就医记录id") + private Long doctorRecordId; + + /** 费用类型 */ + @ApiModelProperty(value="费用类型") + private String type; + + /** 健康档案 */ + @ApiModelProperty(value="健康档案") + private Long healthRecordId; + + /** 费用名称 */ + @ApiModelProperty(value="费用名称") + private String costName; + + /** 人员id */ + @ApiModelProperty(value="人员id") + private Long personId; + + /** 检查类型 */ + @ApiModelProperty(value="检查类型") + private String checkType; + +} diff --git a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/dto/HealthDoctorRecordDto.java b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/dto/HealthDoctorRecordDto.java index 3fbc638..8936417 100644 --- a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/dto/HealthDoctorRecordDto.java +++ b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/dto/HealthDoctorRecordDto.java @@ -53,4 +53,6 @@ public class HealthDoctorRecordDto extends BaseEntity implements Serializable @ApiModelProperty(value="结束日期") private String endTime; + private String type; + } diff --git a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/vo/HealthDoctorRecordCostVo.java b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/vo/HealthDoctorRecordCostVo.java new file mode 100644 index 0000000..8a6496f --- /dev/null +++ b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/domain/vo/HealthDoctorRecordCostVo.java @@ -0,0 +1,17 @@ +package com.ruoyi.health.domain.vo; + +import com.ruoyi.health.domain.HealthDoctorRecordCost; +import lombok.Data; +import io.swagger.annotations.ApiModel; +/** + * 就医记录费用明细Vo对象 health_doctor_record_cost + * + * @author tianyongbao + * @date 2024-10-31 + */ +@ApiModel("就医记录费用明细Vo对象") +@Data +public class HealthDoctorRecordCostVo extends HealthDoctorRecordCost +{ + +} diff --git a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/mapper/HealthDoctorRecordCostMapper.java b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/mapper/HealthDoctorRecordCostMapper.java new file mode 100644 index 0000000..bda6be2 --- /dev/null +++ b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/mapper/HealthDoctorRecordCostMapper.java @@ -0,0 +1,79 @@ +package com.ruoyi.health.mapper; + +import java.util.List; +import com.ruoyi.health.domain.HealthDoctorRecordCost; +import com.ruoyi.health.domain.dto.HealthDoctorRecordCostDto; +import com.ruoyi.health.domain.vo.HealthDoctorRecordCostVo; + +/** + * 就医记录费用明细Mapper接口 + * + * @author tianyongbao + * @date 2024-10-31 + */ +public interface HealthDoctorRecordCostMapper +{ + /** + * 查询就医记录费用明细 + * + * @param id 就医记录费用明细主键 + * @return 就医记录费用明细 + */ + public HealthDoctorRecordCostVo selectHealthDoctorRecordCostById(Long id); + + /** + * 查询就医记录费用明细列表 + * + * @param healthDoctorRecordCostDto 就医记录费用明细 + * @return 就医记录费用明细集合 + */ + public List selectHealthDoctorRecordCostList(HealthDoctorRecordCostDto healthDoctorRecordCostDto); + + /** + * 新增就医记录费用明细 + * + * @param healthDoctorRecordCost 就医记录费用明细 + * @return 结果 + */ + public int insertHealthDoctorRecordCost(HealthDoctorRecordCost healthDoctorRecordCost); + + /** + * 修改就医记录费用明细 + * + * @param healthDoctorRecordCost 就医记录费用明细 + * @return 结果 + */ + public int updateHealthDoctorRecordCost(HealthDoctorRecordCost healthDoctorRecordCost); + + /** + * 删除就医记录费用明细 + * + * @param id 就医记录费用明细主键 + * @return 结果 + */ + public int deleteHealthDoctorRecordCostById(Long id); + + /** + * 批量删除就医记录费用明细 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteHealthDoctorRecordCostByIds(Long[] ids); + + /** + * 逻辑删除就医记录费用明细 + * + * @param id 就医记录费用明细主键 + * @return 结果 + */ + public int removeHealthDoctorRecordCostById(Long id); + + /** + * 批量逻辑删除就医记录费用明细 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int removeHealthDoctorRecordCostByIds(Long[] ids); +} diff --git a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/IHealthDoctorRecordCostService.java b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/IHealthDoctorRecordCostService.java new file mode 100644 index 0000000..5f11780 --- /dev/null +++ b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/IHealthDoctorRecordCostService.java @@ -0,0 +1,63 @@ +package com.ruoyi.health.service; + +import java.util.List; +import com.ruoyi.health.domain.HealthDoctorRecordCost; +import com.ruoyi.health.domain.dto.HealthDoctorRecordCostDto; +import com.ruoyi.health.domain.vo.HealthDoctorRecordCostVo; + +/** + * 就医记录费用明细Service接口 + * + * @author tianyongbao + * @date 2024-10-31 + */ +public interface IHealthDoctorRecordCostService +{ + /** + * 查询就医记录费用明细 + * + * @param id 就医记录费用明细主键 + * @return 就医记录费用明细 + */ + public HealthDoctorRecordCostVo selectHealthDoctorRecordCostById(Long id); + + /** + * 查询就医记录费用明细列表 + * + * @param healthDoctorRecordCostDto 就医记录费用明细 + * @return 就医记录费用明细集合 + */ + public List selectHealthDoctorRecordCostList(HealthDoctorRecordCostDto healthDoctorRecordCostDto); + + /** + * 新增就医记录费用明细 + * + * @param healthDoctorRecordCost 就医记录费用明细 + * @return 结果 + */ + public int insertHealthDoctorRecordCost(HealthDoctorRecordCost healthDoctorRecordCost); + + /** + * 修改就医记录费用明细 + * + * @param healthDoctorRecordCost 就医记录费用明细 + * @return 结果 + */ + public int updateHealthDoctorRecordCost(HealthDoctorRecordCost healthDoctorRecordCost); + + /** + * 批量删除就医记录费用明细 + * + * @param ids 需要删除的就医记录费用明细主键集合 + * @return 结果 + */ + public int deleteHealthDoctorRecordCostByIds(Long[] ids); + + /** + * 删除就医记录费用明细信息 + * + * @param id 就医记录费用明细主键 + * @return 结果 + */ + public int deleteHealthDoctorRecordCostById(Long id); +} diff --git a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/impl/HealthDoctorRecordCostServiceImpl.java b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/impl/HealthDoctorRecordCostServiceImpl.java new file mode 100644 index 0000000..668c3ac --- /dev/null +++ b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/impl/HealthDoctorRecordCostServiceImpl.java @@ -0,0 +1,104 @@ +package com.ruoyi.health.service.impl; + +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.common.core.utils.IdWorker; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.health.domain.HealthDoctorRecordCost; +import com.ruoyi.health.domain.dto.HealthDoctorRecordCostDto; +import com.ruoyi.health.domain.vo.HealthDoctorRecordCostVo; +import com.ruoyi.health.mapper.HealthDoctorRecordCostMapper; +import com.ruoyi.health.service.IHealthDoctorRecordCostService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 就医记录费用明细Service业务层处理 + * + * @author tianyongbao + * @date 2024-10-31 + */ +@Service +public class HealthDoctorRecordCostServiceImpl implements IHealthDoctorRecordCostService +{ + @Resource + private HealthDoctorRecordCostMapper healthDoctorRecordCostMapper; + + /** + * 查询就医记录费用明细 + * + * @param id 就医记录费用明细主键 + * @return 就医记录费用明细 + */ + @Override + public HealthDoctorRecordCostVo selectHealthDoctorRecordCostById(Long id) + { + return healthDoctorRecordCostMapper.selectHealthDoctorRecordCostById(id); + } + + /** + * 查询就医记录费用明细列表 + * + * @param healthDoctorRecordCostDto 就医记录费用明细 + * @return 就医记录费用明细 + */ + @Override + public List selectHealthDoctorRecordCostList(HealthDoctorRecordCostDto healthDoctorRecordCostDto) + { + return healthDoctorRecordCostMapper.selectHealthDoctorRecordCostList(healthDoctorRecordCostDto); + } + + /** + * 新增就医记录费用明细 + * + * @param healthDoctorRecordCost 就医记录费用明细 + * @return 结果 + */ + @Override + public int insertHealthDoctorRecordCost(HealthDoctorRecordCost healthDoctorRecordCost) + { + healthDoctorRecordCost.setCreateBy(SecurityUtils.getUsername()); + healthDoctorRecordCost.setCreateTime(DateUtils.getNowDate()); + healthDoctorRecordCost.setId(IdWorker.getId()); + return healthDoctorRecordCostMapper.insertHealthDoctorRecordCost(healthDoctorRecordCost); + } + + /** + * 修改就医记录费用明细 + * + * @param healthDoctorRecordCost 就医记录费用明细 + * @return 结果 + */ + @Override + public int updateHealthDoctorRecordCost(HealthDoctorRecordCost healthDoctorRecordCost) + { + healthDoctorRecordCost.setUpdateBy(SecurityUtils.getUsername()); + healthDoctorRecordCost.setUpdateTime(DateUtils.getNowDate()); + return healthDoctorRecordCostMapper.updateHealthDoctorRecordCost(healthDoctorRecordCost); + } + + /** + * 批量删除就医记录费用明细 + * + * @param ids 需要删除的就医记录费用明细主键 + * @return 结果 + */ + @Override + public int deleteHealthDoctorRecordCostByIds(Long[] ids) + { + return healthDoctorRecordCostMapper.removeHealthDoctorRecordCostByIds(ids); + } + + /** + * 删除就医记录费用明细信息 + * + * @param id 就医记录费用明细主键 + * @return 结果 + */ + @Override + public int deleteHealthDoctorRecordCostById(Long id) + { + return healthDoctorRecordCostMapper.removeHealthDoctorRecordCostById(id); + } +} diff --git a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/impl/HealthMedicineBasicServiceImpl.java b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/impl/HealthMedicineBasicServiceImpl.java index 658ab1e..63bee93 100644 --- a/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/impl/HealthMedicineBasicServiceImpl.java +++ b/ruoyi-modules/intc-health/src/main/java/com/ruoyi/health/service/impl/HealthMedicineBasicServiceImpl.java @@ -34,7 +34,11 @@ public class HealthMedicineBasicServiceImpl implements IHealthMedicineBasicServi @Override public HealthMedicineBasicVo selectHealthMedicineBasicById(Long id) { - return healthMedicineBasicMapper.selectHealthMedicineBasicById(id); + HealthMedicineBasicVo vo=healthMedicineBasicMapper.selectHealthMedicineBasicById(id); + vo.setShortNameBrand(vo.getShortName()+"-"+vo.getBrand()); + vo.setShortNameBrandManufacturers(vo.getShortName()+"-"+vo.getBrand()+"-"+vo.getManufacturers()); + vo.setShortNameBrandPackaging(vo.getShortName()+"-"+vo.getBrand()+"("+vo.getPackaging()+")"); + return vo; } /** diff --git a/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthDoctorRecordCostMapper.xml b/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthDoctorRecordCostMapper.xml new file mode 100644 index 0000000..185beaf --- /dev/null +++ b/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthDoctorRecordCostMapper.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + select a.id, a.doctor_record_id, a.type, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.health_record_id, a.cost_time, a.cost_name, a.person_id, a.total_cost, a.price, a.count, a.unit, a.medicine_id, a.check_type from health_doctor_record_cost a + + + + + + + + insert into health_doctor_record_cost + + id, + doctor_record_id, + type, + create_by, + create_time, + update_by, + update_time, + del_flag, + remark, + health_record_id, + cost_time, + cost_name, + person_id, + total_cost, + price, + count, + unit, + medicine_id, + check_type, + + + #{id}, + #{doctorRecordId}, + #{type}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{delFlag}, + #{remark}, + #{healthRecordId}, + #{costTime}, + #{costName}, + #{personId}, + #{totalCost}, + #{price}, + #{count}, + #{unit}, + #{medicineId}, + #{checkType}, + + + + + update health_doctor_record_cost + + doctor_record_id = #{doctorRecordId}, + type = #{type}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + del_flag = #{delFlag}, + remark = #{remark}, + health_record_id = #{healthRecordId}, + cost_time = #{costTime}, + cost_name = #{costName}, + person_id = #{personId}, + total_cost = #{totalCost}, + price = #{price}, + count = #{count}, + unit = #{unit}, + medicine_id = #{medicineId}, + check_type = #{checkType}, + + where id = #{id} + + + + delete from health_doctor_record_cost where id = #{id} + + + + delete from health_doctor_record_cost where id in + + #{id} + + + + update health_doctor_record_cost set del_flag='1' where id = #{id} + + + + update health_doctor_record_cost set del_flag='1' where id in + + #{id} + + + diff --git a/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthDoctorRecordMapper.xml b/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthDoctorRecordMapper.xml index f724d60..bee00a9 100644 --- a/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthDoctorRecordMapper.xml +++ b/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthDoctorRecordMapper.xml @@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -33,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.departments, a.doctor, a.create_by, + a.type, a.create_time, a.update_by, a.update_time, @@ -65,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and a.health_record_id = #{healthRecordId} and a.visiting_time = #{visitingTime} and a.person_id = #{personId} + and a.type = #{type} and #{endTime}>=to_char(a.visiting_time, 'yyyy-MM-dd') @@ -102,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" total_cost, partner, cost_detail, + type, #{id}, @@ -121,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{totalCost}, #{partner}, #{costDetail}, + #{type}, @@ -143,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" total_cost = #{totalCost}, partner = #{partner}, cost_detail = #{costDetail}, + type = #{type}, where id = #{id} diff --git a/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthMarRecordMapper.xml b/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthMarRecordMapper.xml index c7a0f44..2ec0c29 100644 --- a/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthMarRecordMapper.xml +++ b/ruoyi-modules/intc-health/src/main/resources/mapper/health/HealthMarRecordMapper.xml @@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and a.person_id = #{personId} and a.resource = #{resource} and a.place = #{place} - a.medicine_id = #{medicineId}, + and a.medicine_id = #{medicineId} and #{endTime}>=to_char(a.dosing_time, 'yyyy-MM-dd')