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

This commit is contained in:
tianyongbao
2024-11-01 13:24:35 +08:00
parent 9aefa36e9e
commit 77a3627490
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; private String costDetail;
/** 用药类型1门诊2急诊3住院 */
@ApiModelProperty(value="就诊类型)")
@Excel(name = "就诊类型")
private String type;
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -101,6 +107,7 @@ public class HealthDoctorRecord extends BaseEntity
.append("totalCost", getTotalCost()) .append("totalCost", getTotalCost())
.append("partner", getPartner()) .append("partner", getPartner())
.append("costDetail", getCostDetail()) .append("costDetail", getCostDetail())
.append("type", getType())
.toString(); .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="结束日期") @ApiModelProperty(value="结束日期")
private String endTime; 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 @Override
public HealthMedicineBasicVo selectHealthMedicineBasicById(Long id) 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;
} }
/** /**

View File

@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.health.mapper.HealthDoctorRecordCostMapper">
<resultMap type="HealthDoctorRecordCostVo" id="HealthDoctorRecordCostResult">
<result property="id" column="id" />
<result property="doctorRecordId" column="doctor_record_id" />
<result property="type" column="type" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="remark" column="remark" />
<result property="healthRecordId" column="health_record_id" />
<result property="costTime" column="cost_time" />
<result property="costName" column="cost_name" />
<result property="personId" column="person_id" />
<result property="totalCost" column="total_cost" />
<result property="price" column="price" />
<result property="count" column="count" />
<result property="unit" column="unit" />
<result property="medicineId" column="medicine_id" />
<result property="checkType" column="check_type" />
</resultMap>
<sql id="selectHealthDoctorRecordCostVo">
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
</sql>
<select id="selectHealthDoctorRecordCostList" parameterType="HealthDoctorRecordCostDto" resultMap="HealthDoctorRecordCostResult">
<include refid="selectHealthDoctorRecordCostVo"/>
<where>
a.del_flag='0'
<if test="doctorRecordId != null "> and a.doctor_record_id = #{doctorRecordId}</if>
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="healthRecordId != null "> and a.health_record_id = #{healthRecordId}</if>
<if test="costName != null and costName != ''"> and a.cost_name like '%'|| #{costName}||'%'</if>
<if test="personId != null "> and a.person_id = #{personId}</if>
<if test="checkType != null and checkType != ''"> and a.check_type = #{checkType}</if>
</where>
order by a.cost_time desc
</select>
<select id="selectHealthDoctorRecordCostById" parameterType="Long" resultMap="HealthDoctorRecordCostResult">
<include refid="selectHealthDoctorRecordCostVo"/>
where a.id = #{id}
</select>
<insert id="insertHealthDoctorRecordCost" parameterType="HealthDoctorRecordCost">
insert into health_doctor_record_cost
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="doctorRecordId != null">doctor_record_id,</if>
<if test="type != null">type,</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>
<if test="delFlag != null">del_flag,</if>
<if test="remark != null">remark,</if>
<if test="healthRecordId != null">health_record_id,</if>
<if test="costTime != null">cost_time,</if>
<if test="costName != null">cost_name,</if>
<if test="personId != null">person_id,</if>
<if test="totalCost != null">total_cost,</if>
<if test="price != null">price,</if>
<if test="count != null">count,</if>
<if test="unit != null">unit,</if>
<if test="medicineId != null">medicine_id,</if>
<if test="checkType != null">check_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="doctorRecordId != null">#{doctorRecordId},</if>
<if test="type != null">#{type},</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>
<if test="delFlag != null">#{delFlag},</if>
<if test="remark != null">#{remark},</if>
<if test="healthRecordId != null">#{healthRecordId},</if>
<if test="costTime != null">#{costTime},</if>
<if test="costName != null">#{costName},</if>
<if test="personId != null">#{personId},</if>
<if test="totalCost != null">#{totalCost},</if>
<if test="price != null">#{price},</if>
<if test="count != null">#{count},</if>
<if test="unit != null">#{unit},</if>
<if test="medicineId != null">#{medicineId},</if>
<if test="checkType != null">#{checkType},</if>
</trim>
</insert>
<update id="updateHealthDoctorRecordCost" parameterType="HealthDoctorRecordCost">
update health_doctor_record_cost
<trim prefix="SET" suffixOverrides=",">
<if test="doctorRecordId != null">doctor_record_id = #{doctorRecordId},</if>
<if test="type != null">type = #{type},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="healthRecordId != null">health_record_id = #{healthRecordId},</if>
<if test="costTime != null">cost_time = #{costTime},</if>
<if test="costName != null">cost_name = #{costName},</if>
<if test="personId != null">person_id = #{personId},</if>
<if test="totalCost != null">total_cost = #{totalCost},</if>
<if test="price != null">price = #{price},</if>
<if test="count != null">count = #{count},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="medicineId != null">medicine_id = #{medicineId},</if>
<if test="checkType != null">check_type = #{checkType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteHealthDoctorRecordCostById" parameterType="Long">
delete from health_doctor_record_cost where id = #{id}
</delete>
<delete id="deleteHealthDoctorRecordCostByIds" parameterType="String">
delete from health_doctor_record_cost where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="removeHealthDoctorRecordCostById" parameterType="Long">
update health_doctor_record_cost set del_flag='1' where id = #{id}
</update>
<update id="removeHealthDoctorRecordCostByIds" parameterType="String">
update health_doctor_record_cost set del_flag='1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="totalCost" column="total_cost" /> <result property="totalCost" column="total_cost" />
<result property="partner" column="partner" /> <result property="partner" column="partner" />
<result property="costDetail" column="cost_detail" /> <result property="costDetail" column="cost_detail" />
<result property="type" column="type" />
</resultMap> </resultMap>
<sql id="selectHealthDoctorRecordVo"> <sql id="selectHealthDoctorRecordVo">
@@ -33,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.departments, a.departments,
a.doctor, a.doctor,
a.create_by, a.create_by,
a.type,
a.create_time, a.create_time,
a.update_by, a.update_by,
a.update_time, a.update_time,
@@ -65,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="healthRecordId != null and healthRecordId != ''"> and a.health_record_id = #{healthRecordId}</if> <if test="healthRecordId != null and healthRecordId != ''"> and a.health_record_id = #{healthRecordId}</if>
<if test="visitingTime != null "> and a.visiting_time = #{visitingTime}</if> <if test="visitingTime != null "> and a.visiting_time = #{visitingTime}</if>
<if test="personId != null "> and a.person_id = #{personId}</if> <if test="personId != null "> and a.person_id = #{personId}</if>
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="endTime!=null and endTime !=''"> <if test="endTime!=null and endTime !=''">
and #{endTime}>=to_char(a.visiting_time, 'yyyy-MM-dd') and #{endTime}>=to_char(a.visiting_time, 'yyyy-MM-dd')
</if> </if>
@@ -102,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalCost != null">total_cost,</if> <if test="totalCost != null">total_cost,</if>
<if test="partner != null">partner,</if> <if test="partner != null">partner,</if>
<if test="costDetail != null">cost_detail,</if> <if test="costDetail != null">cost_detail,</if>
<if test="type != null and type != ''">type,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@@ -121,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalCost != null">#{totalCost},</if> <if test="totalCost != null">#{totalCost},</if>
<if test="partner != null">#{partner},</if> <if test="partner != null">#{partner},</if>
<if test="costDetail != null">#{costDetail},</if> <if test="costDetail != null">#{costDetail},</if>
<if test="type != null and type != ''">#{type},</if>
</trim> </trim>
</insert> </insert>
@@ -143,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalCost != null">total_cost = #{totalCost},</if> <if test="totalCost != null">total_cost = #{totalCost},</if>
<if test="partner != null">partner = #{partner},</if> <if test="partner != null">partner = #{partner},</if>
<if test="costDetail != null">cost_detail = #{costDetail},</if> <if test="costDetail != null">cost_detail = #{costDetail},</if>
<if test="type != null and type != ''">type = #{type},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

View File

@@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="personId != null "> and a.person_id = #{personId}</if> <if test="personId != null "> and a.person_id = #{personId}</if>
<if test="resource != null and resource != ''"> and a.resource = #{resource}</if> <if test="resource != null and resource != ''"> and a.resource = #{resource}</if>
<if test="place != null and place != ''"> and a.place = #{place}</if> <if test="place != null and place != ''"> and a.place = #{place}</if>
<if test="medicineId != null">a.medicine_id = #{medicineId},</if> <if test="medicineId != null">and a.medicine_id = #{medicineId}</if>
<if test="endTime!=null and endTime !=''"> <if test="endTime!=null and endTime !=''">
and #{endTime}>=to_char(a.dosing_time, 'yyyy-MM-dd') and #{endTime}>=to_char(a.dosing_time, 'yyyy-MM-dd')
</if> </if>