fix: 就医记录费用明细,功能提交。

This commit is contained in:
tianyongbao
2024-11-01 13:24:35 +08:00
parent 20ef1faaff
commit 3f3742a3ee
13 changed files with 691 additions and 2 deletions

View File

@@ -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<HealthDoctorRecordCostVo> 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<HealthDoctorRecordCostVo> list = healthDoctorRecordCostService.selectHealthDoctorRecordCostList(healthDoctorRecordCostDto);
ExcelUtil<HealthDoctorRecordCostVo> util = new ExcelUtil<HealthDoctorRecordCostVo>(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));
}
}

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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;
}

View File

@@ -53,4 +53,6 @@ public class HealthDoctorRecordDto extends BaseEntity implements Serializable
@ApiModelProperty(value="结束日期")
private String endTime;
private String type;
}

View File

@@ -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
{
}

View File

@@ -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<HealthDoctorRecordCostVo> 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);
}

View File

@@ -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<HealthDoctorRecordCostVo> 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);
}

View File

@@ -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<HealthDoctorRecordCostVo> 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);
}
}

View File

@@ -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;
}
/**