fix: 健康管理,新增档案过程管理,代码提交。
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.health.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.HealthProcessRecord;
|
||||
import com.ruoyi.health.domain.vo.HealthProcessRecordVo;
|
||||
import com.ruoyi.health.domain.dto.HealthProcessRecordDto;
|
||||
import com.ruoyi.health.service.IHealthProcessRecordService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 档案过程记录Controller
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2024-12-08
|
||||
*/
|
||||
@Api(tags=" 档案过程记录")
|
||||
@RestController
|
||||
@RequestMapping("/processRecord")
|
||||
public class HealthProcessRecordController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IHealthProcessRecordService healthProcessRecordService;
|
||||
|
||||
/**
|
||||
* 查询档案过程记录列表
|
||||
*/
|
||||
@ApiOperation(value="查询档案过程记录列表",response = HealthProcessRecordVo.class)
|
||||
@RequiresPermissions("health:processRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HealthProcessRecordDto healthProcessRecordDto)
|
||||
{
|
||||
startPage();
|
||||
List<HealthProcessRecordVo> list = healthProcessRecordService.selectHealthProcessRecordList(healthProcessRecordDto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出档案过程记录列表
|
||||
*/
|
||||
@ApiOperation(value="导出档案过程记录列表")
|
||||
@RequiresPermissions("health:processRecord:export")
|
||||
@Log(title = "档案过程记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HealthProcessRecordDto healthProcessRecordDto)
|
||||
{
|
||||
List<HealthProcessRecordVo> list = healthProcessRecordService.selectHealthProcessRecordList(healthProcessRecordDto);
|
||||
ExcelUtil<HealthProcessRecordVo> util = new ExcelUtil<HealthProcessRecordVo>(HealthProcessRecordVo.class);
|
||||
util.exportExcel(response, list, "档案过程记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取档案过程记录详细信息
|
||||
*/
|
||||
@ApiOperation(value="获取档案过程记录详细信息")
|
||||
@RequiresPermissions("health:processRecord:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(healthProcessRecordService.selectHealthProcessRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增档案过程记录
|
||||
*/
|
||||
@ApiOperation(value="新增档案过程记录")
|
||||
@RequiresPermissions("health:processRecord:add")
|
||||
@Log(title = "档案过程记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HealthProcessRecord healthProcessRecord)
|
||||
{
|
||||
return toAjax(healthProcessRecordService.insertHealthProcessRecord(healthProcessRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改档案过程记录
|
||||
*/
|
||||
@ApiOperation(value="修改档案过程记录")
|
||||
@RequiresPermissions("health:processRecord:edit")
|
||||
@Log(title = "档案过程记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HealthProcessRecord healthProcessRecord)
|
||||
{
|
||||
return toAjax(healthProcessRecordService.updateHealthProcessRecord(healthProcessRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除档案过程记录
|
||||
*/
|
||||
@ApiOperation(value="删除档案过程记录")
|
||||
@RequiresPermissions("health:processRecord:remove")
|
||||
@Log(title = "档案过程记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(healthProcessRecordService.deleteHealthProcessRecordByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
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_process_record
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2024-12-08
|
||||
*/
|
||||
@ApiModel("档案过程记录对象")
|
||||
@Data
|
||||
public class HealthProcessRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 主表ID */
|
||||
@ApiModelProperty(value="主表ID")
|
||||
@Excel(name = "主表ID")
|
||||
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 recordingTime;
|
||||
|
||||
/** 记录内容 */
|
||||
@ApiModelProperty(value="记录内容")
|
||||
@Excel(name = "记录内容")
|
||||
private String content;
|
||||
|
||||
/** 人员id */
|
||||
@ApiModelProperty(value="人员id")
|
||||
@Excel(name = "人员id")
|
||||
private Long personId;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("remark", getRemark())
|
||||
.append("healthRecordId", getHealthRecordId())
|
||||
.append("recordingTime", getRecordingTime())
|
||||
.append("content", getContent())
|
||||
.append("personId", getPersonId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class HealthTemperatureRecord extends BaseEntity
|
||||
/** 测量时间 */
|
||||
@ApiModelProperty(value="测量时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "康复时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "测量时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date measureTime;
|
||||
|
||||
/** 体温 */
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.ruoyi.health.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 档案过程记录Dto对象 health_process_record
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2024-12-08
|
||||
*/
|
||||
@ApiModel("档案过程记录Dto对象")
|
||||
@Data
|
||||
public class HealthProcessRecordDto extends BaseEntity implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主表ID */
|
||||
@ApiModelProperty(value="主表ID")
|
||||
private Long healthRecordId;
|
||||
|
||||
/** 记录时间 */
|
||||
@ApiModelProperty(value="记录时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date recordingTime;
|
||||
|
||||
/** 记录内容 */
|
||||
@ApiModelProperty(value="记录内容")
|
||||
private String content;
|
||||
|
||||
/** 人员id */
|
||||
@ApiModelProperty(value="人员id")
|
||||
private Long personId;
|
||||
|
||||
/** 开始日期 */
|
||||
@ApiModelProperty(value="开始日期")
|
||||
private String startTime;
|
||||
|
||||
/** 结束日期 */
|
||||
@ApiModelProperty(value="结束日期")
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.health.domain.vo;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.health.domain.HealthProcessRecord;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
/**
|
||||
* 档案过程记录Vo对象 health_process_record
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2024-12-08
|
||||
*/
|
||||
@ApiModel("档案过程记录Vo对象")
|
||||
@Data
|
||||
public class HealthProcessRecordVo extends HealthProcessRecord
|
||||
{
|
||||
/** 人员名称 */
|
||||
@ApiModelProperty(value="人员姓名)")
|
||||
@Excel(name = "人员姓名")
|
||||
private String personName;
|
||||
|
||||
/** 健康档案 */
|
||||
@ApiModelProperty(value="健康档案)")
|
||||
@Excel(name = "健康档案")
|
||||
private String healthRecordName;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.ruoyi.health.mapper;
|
||||
|
||||
import com.ruoyi.common.datascope.annotation.DataScope;
|
||||
import com.ruoyi.health.domain.HealthProcessRecord;
|
||||
import com.ruoyi.health.domain.dto.HealthProcessRecordDto;
|
||||
import com.ruoyi.health.domain.vo.HealthProcessRecordVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 档案过程记录Mapper接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2024-12-08
|
||||
*/
|
||||
public interface HealthProcessRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询档案过程记录
|
||||
*
|
||||
* @param id 档案过程记录主键
|
||||
* @return 档案过程记录
|
||||
*/
|
||||
public HealthProcessRecordVo selectHealthProcessRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询档案过程记录列表
|
||||
*
|
||||
* @param healthProcessRecordDto 档案过程记录
|
||||
* @return 档案过程记录集合
|
||||
*/
|
||||
@DataScope(businessAlias = "a")
|
||||
public List<HealthProcessRecordVo> selectHealthProcessRecordList(HealthProcessRecordDto healthProcessRecordDto);
|
||||
|
||||
/**
|
||||
* 新增档案过程记录
|
||||
*
|
||||
* @param healthProcessRecord 档案过程记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthProcessRecord(HealthProcessRecord healthProcessRecord);
|
||||
|
||||
/**
|
||||
* 修改档案过程记录
|
||||
*
|
||||
* @param healthProcessRecord 档案过程记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealthProcessRecord(HealthProcessRecord healthProcessRecord);
|
||||
|
||||
/**
|
||||
* 删除档案过程记录
|
||||
*
|
||||
* @param id 档案过程记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthProcessRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除档案过程记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthProcessRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 逻辑删除档案过程记录
|
||||
*
|
||||
* @param id 档案过程记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeHealthProcessRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量逻辑删除档案过程记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeHealthProcessRecordByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.health.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.health.domain.HealthProcessRecord;
|
||||
import com.ruoyi.health.domain.dto.HealthProcessRecordDto;
|
||||
import com.ruoyi.health.domain.vo.HealthProcessRecordVo;
|
||||
|
||||
/**
|
||||
* 档案过程记录Service接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2024-12-08
|
||||
*/
|
||||
public interface IHealthProcessRecordService
|
||||
{
|
||||
/**
|
||||
* 查询档案过程记录
|
||||
*
|
||||
* @param id 档案过程记录主键
|
||||
* @return 档案过程记录
|
||||
*/
|
||||
public HealthProcessRecordVo selectHealthProcessRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询档案过程记录列表
|
||||
*
|
||||
* @param healthProcessRecordDto 档案过程记录
|
||||
* @return 档案过程记录集合
|
||||
*/
|
||||
public List<HealthProcessRecordVo> selectHealthProcessRecordList(HealthProcessRecordDto healthProcessRecordDto);
|
||||
|
||||
/**
|
||||
* 新增档案过程记录
|
||||
*
|
||||
* @param healthProcessRecord 档案过程记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthProcessRecord(HealthProcessRecord healthProcessRecord);
|
||||
|
||||
/**
|
||||
* 修改档案过程记录
|
||||
*
|
||||
* @param healthProcessRecord 档案过程记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealthProcessRecord(HealthProcessRecord healthProcessRecord);
|
||||
|
||||
/**
|
||||
* 批量删除档案过程记录
|
||||
*
|
||||
* @param ids 需要删除的档案过程记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthProcessRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除档案过程记录信息
|
||||
*
|
||||
* @param id 档案过程记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthProcessRecordById(Long id);
|
||||
}
|
||||
@@ -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.HealthProcessRecord;
|
||||
import com.ruoyi.health.domain.dto.HealthProcessRecordDto;
|
||||
import com.ruoyi.health.domain.vo.HealthProcessRecordVo;
|
||||
import com.ruoyi.health.mapper.HealthProcessRecordMapper;
|
||||
import com.ruoyi.health.service.IHealthProcessRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 档案过程记录Service业务层处理
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2024-12-08
|
||||
*/
|
||||
@Service
|
||||
public class HealthProcessRecordServiceImpl implements IHealthProcessRecordService
|
||||
{
|
||||
@Resource
|
||||
private HealthProcessRecordMapper healthProcessRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询档案过程记录
|
||||
*
|
||||
* @param id 档案过程记录主键
|
||||
* @return 档案过程记录
|
||||
*/
|
||||
@Override
|
||||
public HealthProcessRecordVo selectHealthProcessRecordById(Long id)
|
||||
{
|
||||
return healthProcessRecordMapper.selectHealthProcessRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询档案过程记录列表
|
||||
*
|
||||
* @param healthProcessRecordDto 档案过程记录
|
||||
* @return 档案过程记录
|
||||
*/
|
||||
@Override
|
||||
public List<HealthProcessRecordVo> selectHealthProcessRecordList(HealthProcessRecordDto healthProcessRecordDto)
|
||||
{
|
||||
return healthProcessRecordMapper.selectHealthProcessRecordList(healthProcessRecordDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增档案过程记录
|
||||
*
|
||||
* @param healthProcessRecord 档案过程记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHealthProcessRecord(HealthProcessRecord healthProcessRecord)
|
||||
{
|
||||
healthProcessRecord.setCreateBy(SecurityUtils.getUsername());
|
||||
healthProcessRecord.setCreateTime(DateUtils.getNowDate());
|
||||
healthProcessRecord.setId(IdWorker.getId());
|
||||
return healthProcessRecordMapper.insertHealthProcessRecord(healthProcessRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改档案过程记录
|
||||
*
|
||||
* @param healthProcessRecord 档案过程记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHealthProcessRecord(HealthProcessRecord healthProcessRecord)
|
||||
{
|
||||
healthProcessRecord.setUpdateBy(SecurityUtils.getUsername());
|
||||
healthProcessRecord.setUpdateTime(DateUtils.getNowDate());
|
||||
return healthProcessRecordMapper.updateHealthProcessRecord(healthProcessRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除档案过程记录
|
||||
*
|
||||
* @param ids 需要删除的档案过程记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthProcessRecordByIds(Long[] ids)
|
||||
{
|
||||
return healthProcessRecordMapper.removeHealthProcessRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除档案过程记录信息
|
||||
*
|
||||
* @param id 档案过程记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthProcessRecordById(Long id)
|
||||
{
|
||||
return healthProcessRecordMapper.removeHealthProcessRecordById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
<?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.HealthProcessRecordMapper">
|
||||
|
||||
<resultMap type="HealthProcessRecordVo" id="HealthProcessRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<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="recordingTime" column="recording_time" />
|
||||
<result property="content" column="content" />
|
||||
<result property="personId" column="person_id" />
|
||||
<result property="personName" column="person_name" />
|
||||
<result property="healthRecordName" column="health_record_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHealthProcessRecordVo">
|
||||
|
||||
select
|
||||
a.id,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.remark,
|
||||
a.health_record_id,
|
||||
a.recording_time,
|
||||
a.content,
|
||||
a.person_id,
|
||||
hp."name" as person_name ,
|
||||
hr."name" as health_record_name
|
||||
from
|
||||
health_process_record a
|
||||
left join health_person hp on
|
||||
hp.id = a.person_id
|
||||
left join health_record hr on
|
||||
hr.id = a.health_record_id</sql>
|
||||
|
||||
<select id="selectHealthProcessRecordList" parameterType="HealthProcessRecordDto" resultMap="HealthProcessRecordResult">
|
||||
<include refid="selectHealthProcessRecordVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="healthRecordId != null "> and a.health_record_id = #{healthRecordId}</if>
|
||||
<if test="content != null and content != ''"> and a.content like '%'|| #{content}||'%'</if>
|
||||
<if test="personId != null "> and a.person_id = #{personId}</if>
|
||||
<if test="endTime!=null and endTime !=''">
|
||||
and #{endTime}>=to_char(a.recording_time, 'yyyy-MM-dd')
|
||||
</if>
|
||||
<if test="startTime!=null and startTime !=''">
|
||||
and to_char(a.recording_time, 'yyyy-MM-dd')>=#{startTime}
|
||||
</if>
|
||||
</where>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
order by a.recording_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectHealthProcessRecordById" parameterType="Long" resultMap="HealthProcessRecordResult">
|
||||
<include refid="selectHealthProcessRecordVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHealthProcessRecord" parameterType="HealthProcessRecord">
|
||||
insert into health_process_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">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>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="healthRecordId != null">health_record_id,</if>
|
||||
<if test="recordingTime != null">recording_time,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="personId != null">person_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</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="recordingTime != null">#{recordingTime},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="personId != null">#{personId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHealthProcessRecord" parameterType="HealthProcessRecord">
|
||||
update health_process_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<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="recordingTime != null">recording_time = #{recordingTime},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="personId != null">person_id = #{personId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHealthProcessRecordById" parameterType="Long">
|
||||
delete from health_process_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHealthProcessRecordByIds" parameterType="String">
|
||||
delete from health_process_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeHealthProcessRecordById" parameterType="Long">
|
||||
update health_process_record set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeHealthProcessRecordByIds" parameterType="String">
|
||||
update health_process_record set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user