change - 灌注记录报表
parent
a42f80d1d1
commit
907a5822ef
@ -0,0 +1,103 @@
|
||||
package com.aucma.report.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.aucma.common.utils.DateUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.aucma.common.annotation.Log;
|
||||
import com.aucma.common.core.controller.BaseController;
|
||||
import com.aucma.common.core.domain.AjaxResult;
|
||||
import com.aucma.common.enums.BusinessType;
|
||||
import com.aucma.report.domain.PerfusionRecord;
|
||||
import com.aucma.report.service.IPerfusionRecordService;
|
||||
import com.aucma.common.utils.poi.ExcelUtil;
|
||||
import com.aucma.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 灌注记录Controller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-03-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/report/perfusionRecord")
|
||||
public class PerfusionRecordController extends BaseController {
|
||||
@Autowired
|
||||
private IPerfusionRecordService perfusionRecordService;
|
||||
|
||||
/**
|
||||
* 查询灌注记录列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('report:perfusionRecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PerfusionRecord perfusionRecord) {
|
||||
startPage();
|
||||
List<PerfusionRecord> list = perfusionRecordService.selectPerfusionRecordList(perfusionRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出灌注记录列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('report:perfusionRecord:export')")
|
||||
@Log(title = "灌注记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PerfusionRecord perfusionRecord) {
|
||||
List<PerfusionRecord> list = perfusionRecordService.selectPerfusionRecordList(perfusionRecord);
|
||||
ExcelUtil<PerfusionRecord> util = new ExcelUtil<PerfusionRecord>(PerfusionRecord.class);
|
||||
util.exportExcel(response, list, "灌注记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取灌注记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('report:perfusionRecord:query')")
|
||||
@GetMapping(value = "/{objId}")
|
||||
public AjaxResult getInfo(@PathVariable("objId") Long objId) {
|
||||
return success(perfusionRecordService.selectPerfusionRecordByObjId(objId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增灌注记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('report:perfusionRecord:add')")
|
||||
@Log(title = "灌注记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PerfusionRecord perfusionRecord) {
|
||||
perfusionRecord.setCreatedBy(getUsername());
|
||||
perfusionRecord.setCreatedTime(DateUtils.getNowDate());
|
||||
return toAjax(perfusionRecordService.insertPerfusionRecord(perfusionRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改灌注记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('report:perfusionRecord:edit')")
|
||||
@Log(title = "灌注记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PerfusionRecord perfusionRecord) {
|
||||
perfusionRecord.setUpdatedBy(getUsername());
|
||||
perfusionRecord.setUpdatedTime(DateUtils.getNowDate());
|
||||
return toAjax(perfusionRecordService.updatePerfusionRecord(perfusionRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除灌注记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('report:perfusionRecord:remove')")
|
||||
@Log(title = "灌注记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{objIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] objIds) {
|
||||
return toAjax(perfusionRecordService.deletePerfusionRecordByObjIds(objIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.aucma.report.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.aucma.common.annotation.DataSource;
|
||||
import com.aucma.common.enums.DataSourceType;
|
||||
import com.aucma.report.domain.PerfusionRecord;
|
||||
|
||||
/**
|
||||
* 灌注记录Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-03-14
|
||||
*/
|
||||
@DataSource(value = DataSourceType.SLAVE)
|
||||
public interface PerfusionRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询灌注记录
|
||||
*
|
||||
* @param objId 灌注记录主键
|
||||
* @return 灌注记录
|
||||
*/
|
||||
public PerfusionRecord selectPerfusionRecordByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询灌注记录列表
|
||||
*
|
||||
* @param perfusionRecord 灌注记录
|
||||
* @return 灌注记录集合
|
||||
*/
|
||||
public List<PerfusionRecord> selectPerfusionRecordList(PerfusionRecord perfusionRecord);
|
||||
|
||||
/**
|
||||
* 新增灌注记录
|
||||
*
|
||||
* @param perfusionRecord 灌注记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPerfusionRecord(PerfusionRecord perfusionRecord);
|
||||
|
||||
/**
|
||||
* 修改灌注记录
|
||||
*
|
||||
* @param perfusionRecord 灌注记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePerfusionRecord(PerfusionRecord perfusionRecord);
|
||||
|
||||
/**
|
||||
* 删除灌注记录
|
||||
*
|
||||
* @param objId 灌注记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePerfusionRecordByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 批量删除灌注记录
|
||||
*
|
||||
* @param objIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePerfusionRecordByObjIds(Long[] objIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.aucma.report.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.aucma.report.domain.PerfusionRecord;
|
||||
|
||||
/**
|
||||
* 灌注记录Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-03-14
|
||||
*/
|
||||
public interface IPerfusionRecordService
|
||||
{
|
||||
/**
|
||||
* 查询灌注记录
|
||||
*
|
||||
* @param objId 灌注记录主键
|
||||
* @return 灌注记录
|
||||
*/
|
||||
public PerfusionRecord selectPerfusionRecordByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询灌注记录列表
|
||||
*
|
||||
* @param perfusionRecord 灌注记录
|
||||
* @return 灌注记录集合
|
||||
*/
|
||||
public List<PerfusionRecord> selectPerfusionRecordList(PerfusionRecord perfusionRecord);
|
||||
|
||||
/**
|
||||
* 新增灌注记录
|
||||
*
|
||||
* @param perfusionRecord 灌注记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPerfusionRecord(PerfusionRecord perfusionRecord);
|
||||
|
||||
/**
|
||||
* 修改灌注记录
|
||||
*
|
||||
* @param perfusionRecord 灌注记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePerfusionRecord(PerfusionRecord perfusionRecord);
|
||||
|
||||
/**
|
||||
* 批量删除灌注记录
|
||||
*
|
||||
* @param objIds 需要删除的灌注记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePerfusionRecordByObjIds(Long[] objIds);
|
||||
|
||||
/**
|
||||
* 删除灌注记录信息
|
||||
*
|
||||
* @param objId 灌注记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePerfusionRecordByObjId(Long objId);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.aucma.report.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.aucma.report.mapper.PerfusionRecordMapper;
|
||||
import com.aucma.report.domain.PerfusionRecord;
|
||||
import com.aucma.report.service.IPerfusionRecordService;
|
||||
|
||||
/**
|
||||
* 灌注记录Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-03-14
|
||||
*/
|
||||
@Service
|
||||
public class PerfusionRecordServiceImpl implements IPerfusionRecordService
|
||||
{
|
||||
@Autowired
|
||||
private PerfusionRecordMapper perfusionRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询灌注记录
|
||||
*
|
||||
* @param objId 灌注记录主键
|
||||
* @return 灌注记录
|
||||
*/
|
||||
@Override
|
||||
public PerfusionRecord selectPerfusionRecordByObjId(Long objId)
|
||||
{
|
||||
return perfusionRecordMapper.selectPerfusionRecordByObjId(objId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询灌注记录列表
|
||||
*
|
||||
* @param perfusionRecord 灌注记录
|
||||
* @return 灌注记录
|
||||
*/
|
||||
@Override
|
||||
public List<PerfusionRecord> selectPerfusionRecordList(PerfusionRecord perfusionRecord)
|
||||
{
|
||||
return perfusionRecordMapper.selectPerfusionRecordList(perfusionRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增灌注记录
|
||||
*
|
||||
* @param perfusionRecord 灌注记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPerfusionRecord(PerfusionRecord perfusionRecord)
|
||||
{
|
||||
return perfusionRecordMapper.insertPerfusionRecord(perfusionRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改灌注记录
|
||||
*
|
||||
* @param perfusionRecord 灌注记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePerfusionRecord(PerfusionRecord perfusionRecord)
|
||||
{
|
||||
return perfusionRecordMapper.updatePerfusionRecord(perfusionRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除灌注记录
|
||||
*
|
||||
* @param objIds 需要删除的灌注记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePerfusionRecordByObjIds(Long[] objIds)
|
||||
{
|
||||
return perfusionRecordMapper.deletePerfusionRecordByObjIds(objIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除灌注记录信息
|
||||
*
|
||||
* @param objId 灌注记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePerfusionRecordByObjId(Long objId)
|
||||
{
|
||||
return perfusionRecordMapper.deletePerfusionRecordByObjId(objId);
|
||||
}
|
||||
}
|
@ -0,0 +1,175 @@
|
||||
<?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.aucma.report.mapper.PerfusionRecordMapper">
|
||||
|
||||
<resultMap type="PerfusionRecord" id="PerfusionRecordResult">
|
||||
<result property="objId" column="obj_id"/>
|
||||
<result property="perfusionBoxcode" column="perfusion_boxcode"/>
|
||||
<result property="perfusionRefrigeranttypeleft" column="perfusion_refrigeranttypeleft"/>
|
||||
<result property="perfusionRefrigeranttyperight" column="perfusion_refrigeranttyperight"/>
|
||||
<result property="perfusionSetvolume" column="perfusion_setvolume"/>
|
||||
<result property="perfusionActualvolume" column="perfusion_actualvolume"/>
|
||||
<result property="perfusionR" column="perfusion_r"/>
|
||||
<result property="perfusionL" column="perfusion_l"/>
|
||||
<result property="perfusionDuration" column="perfusion_duration"/>
|
||||
<result property="perfusionSystem" column="perfusion_system"/>
|
||||
<result property="createdBy" column="created_by"/>
|
||||
<result property="createdTime" column="created_time"/>
|
||||
<result property="updatedBy" column="updated_by"/>
|
||||
<result property="updatedTime" column="updated_time"/>
|
||||
<result property="perfusionResult" column="perfusion_result"/>
|
||||
<result property="yield" column="yield"/>
|
||||
<result property="finishStatus" column="finish_status"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPerfusionRecordVo">
|
||||
select obj_id,
|
||||
perfusion_boxcode,
|
||||
perfusion_refrigeranttypeleft,
|
||||
perfusion_refrigeranttyperight,
|
||||
perfusion_setvolume,
|
||||
perfusion_actualvolume,
|
||||
perfusion_r,
|
||||
perfusion_l,
|
||||
perfusion_duration,
|
||||
perfusion_system,
|
||||
created_by,
|
||||
created_time,
|
||||
updated_by,
|
||||
updated_time,
|
||||
perfusion_result,
|
||||
yield,
|
||||
finish_status
|
||||
from perfusion_record
|
||||
</sql>
|
||||
|
||||
<select id="selectPerfusionRecordList" parameterType="PerfusionRecord" resultMap="PerfusionRecordResult">
|
||||
<include refid="selectPerfusionRecordVo"/>
|
||||
<where>
|
||||
<if test="perfusionBoxcode != null and perfusionBoxcode != ''">and perfusion_boxcode =
|
||||
#{perfusionBoxcode}
|
||||
</if>
|
||||
<if test="perfusionRefrigeranttypeleft != null and perfusionRefrigeranttypeleft != ''">and
|
||||
perfusion_refrigeranttypeleft = #{perfusionRefrigeranttypeleft}
|
||||
</if>
|
||||
<if test="perfusionRefrigeranttyperight != null and perfusionRefrigeranttyperight != ''">and
|
||||
perfusion_refrigeranttyperight = #{perfusionRefrigeranttyperight}
|
||||
</if>
|
||||
<if test="perfusionSetvolume != null and perfusionSetvolume != ''">and perfusion_setvolume =
|
||||
#{perfusionSetvolume}
|
||||
</if>
|
||||
<if test="perfusionActualvolume != null and perfusionActualvolume != ''">and perfusion_actualvolume =
|
||||
#{perfusionActualvolume}
|
||||
</if>
|
||||
<if test="perfusionR != null and perfusionR != ''">and perfusion_r = #{perfusionR}</if>
|
||||
<if test="perfusionL != null and perfusionL != ''">and perfusion_l = #{perfusionL}</if>
|
||||
<if test="perfusionDuration != null and perfusionDuration != ''">and perfusion_duration =
|
||||
#{perfusionDuration}
|
||||
</if>
|
||||
<if test="perfusionSystem != null and perfusionSystem != ''">and perfusion_system = #{perfusionSystem}</if>
|
||||
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
|
||||
<if test="params.beginCreatedTime != null and params.beginCreatedTime != '' and params.endCreatedTime != null and params.endCreatedTime != ''">
|
||||
and created_time between to_date(#{params.beginCreatedTime}, 'yyyy-mm-dd hh24:mi:ss') and
|
||||
to_date(#{params.endCreatedTime}, 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
|
||||
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
|
||||
<if test="perfusionResult != null ">and perfusion_result = #{perfusionResult}</if>
|
||||
<if test="yield != null and yield != ''">and yield = #{yield}</if>
|
||||
<if test="finishStatus != null and finishStatus != ''">and finish_status = #{finishStatus}</if>
|
||||
</where>
|
||||
order by created_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectPerfusionRecordByObjId" parameterType="Long" resultMap="PerfusionRecordResult">
|
||||
<include refid="selectPerfusionRecordVo"/>
|
||||
where obj_id = #{objId}
|
||||
</select>
|
||||
|
||||
<insert id="insertPerfusionRecord" parameterType="PerfusionRecord">
|
||||
<selectKey keyProperty="objId" resultType="long" order="BEFORE">
|
||||
SELECT seq_perfusion_record.NEXTVAL as objId FROM DUAL
|
||||
</selectKey>
|
||||
insert into perfusion_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="objId != null">obj_id,</if>
|
||||
<if test="perfusionBoxcode != null">perfusion_boxcode,</if>
|
||||
<if test="perfusionRefrigeranttypeleft != null">perfusion_refrigeranttypeleft,</if>
|
||||
<if test="perfusionRefrigeranttyperight != null">perfusion_refrigeranttyperight,</if>
|
||||
<if test="perfusionSetvolume != null">perfusion_setvolume,</if>
|
||||
<if test="perfusionActualvolume != null">perfusion_actualvolume,</if>
|
||||
<if test="perfusionR != null">perfusion_r,</if>
|
||||
<if test="perfusionL != null">perfusion_l,</if>
|
||||
<if test="perfusionDuration != null">perfusion_duration,</if>
|
||||
<if test="perfusionSystem != null">perfusion_system,</if>
|
||||
<if test="createdBy != null">created_by,</if>
|
||||
<if test="createdTime != null">created_time,</if>
|
||||
<if test="updatedBy != null">updated_by,</if>
|
||||
<if test="updatedTime != null">updated_time,</if>
|
||||
<if test="perfusionResult != null">perfusion_result,</if>
|
||||
<if test="yield != null">yield,</if>
|
||||
<if test="finishStatus != null">finish_status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="objId != null">#{objId},</if>
|
||||
<if test="perfusionBoxcode != null">#{perfusionBoxcode},</if>
|
||||
<if test="perfusionRefrigeranttypeleft != null">#{perfusionRefrigeranttypeleft},</if>
|
||||
<if test="perfusionRefrigeranttyperight != null">#{perfusionRefrigeranttyperight},</if>
|
||||
<if test="perfusionSetvolume != null">#{perfusionSetvolume},</if>
|
||||
<if test="perfusionActualvolume != null">#{perfusionActualvolume},</if>
|
||||
<if test="perfusionR != null">#{perfusionR},</if>
|
||||
<if test="perfusionL != null">#{perfusionL},</if>
|
||||
<if test="perfusionDuration != null">#{perfusionDuration},</if>
|
||||
<if test="perfusionSystem != null">#{perfusionSystem},</if>
|
||||
<if test="createdBy != null">#{createdBy},</if>
|
||||
<if test="createdTime != null">#{createdTime},</if>
|
||||
<if test="updatedBy != null">#{updatedBy},</if>
|
||||
<if test="updatedTime != null">#{updatedTime},</if>
|
||||
<if test="perfusionResult != null">#{perfusionResult},</if>
|
||||
<if test="yield != null">#{yield},</if>
|
||||
<if test="finishStatus != null">#{finishStatus},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePerfusionRecord" parameterType="PerfusionRecord">
|
||||
update perfusion_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="perfusionBoxcode != null">perfusion_boxcode = #{perfusionBoxcode},</if>
|
||||
<if test="perfusionRefrigeranttypeleft != null">perfusion_refrigeranttypeleft =
|
||||
#{perfusionRefrigeranttypeleft},
|
||||
</if>
|
||||
<if test="perfusionRefrigeranttyperight != null">perfusion_refrigeranttyperight =
|
||||
#{perfusionRefrigeranttyperight},
|
||||
</if>
|
||||
<if test="perfusionSetvolume != null">perfusion_setvolume = #{perfusionSetvolume},</if>
|
||||
<if test="perfusionActualvolume != null">perfusion_actualvolume = #{perfusionActualvolume},</if>
|
||||
<if test="perfusionR != null">perfusion_r = #{perfusionR},</if>
|
||||
<if test="perfusionL != null">perfusion_l = #{perfusionL},</if>
|
||||
<if test="perfusionDuration != null">perfusion_duration = #{perfusionDuration},</if>
|
||||
<if test="perfusionSystem != null">perfusion_system = #{perfusionSystem},</if>
|
||||
<if test="createdBy != null">created_by = #{createdBy},</if>
|
||||
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
||||
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
||||
<if test="perfusionResult != null">perfusion_result = #{perfusionResult},</if>
|
||||
<if test="yield != null">yield = #{yield},</if>
|
||||
<if test="finishStatus != null">finish_status = #{finishStatus},</if>
|
||||
</trim>
|
||||
where obj_id = #{objId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePerfusionRecordByObjId" parameterType="Long">
|
||||
delete
|
||||
from perfusion_record
|
||||
where obj_id = #{objId}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePerfusionRecordByObjIds" parameterType="String">
|
||||
delete from perfusion_record where obj_id in
|
||||
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||
#{objId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue