change - 灌注记录报表

master
yinq 8 months ago
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,284 @@
package com.aucma.report.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aucma.common.annotation.Excel;
import com.aucma.common.core.domain.BaseEntity;
/**
* perfusion_record
*
* @author Yinq
* @date 2024-03-14
*/
public class PerfusionRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "箱体码")
private String perfusionBoxcode;
/**
*
*/
@Excel(name = "左侧冷媒型号")
private String perfusionRefrigeranttypeleft;
/**
*
*/
@Excel(name = "右侧侧冷媒型号")
private String perfusionRefrigeranttyperight;
/**
*
*/
@Excel(name = "设置灌注量")
private String perfusionSetvolume;
/**
*
*/
@Excel(name = "实际灌注量")
private String perfusionActualvolume;
/**
* _R;_R
*/
@Excel(name = "灌注压力_R;灌注压力_R")
private String perfusionR;
/**
* _L;_L
*/
@Excel(name = "灌注压力_L;灌注压力_L")
private String perfusionL;
/**
*
*/
@Excel(name = "灌注时长")
private String perfusionDuration;
/**
*
* 0, 1
*/
@Excel(name = "系统")
private String perfusionSystem;
/**
*
*/
@Excel(name = "创建人")
private String createdBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createdTime;
/**
*
*/
@Excel(name = "更新人")
private String updatedBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
/**
*
* 8: 4:
*/
@Excel(name = "灌注结果")
private Long perfusionResult;
/**
*
*/
@Excel(name = "产量")
private String yield;
/**
*
* 1:
*/
@Excel(name = "灌注完成状态字")
private String finishStatus;
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setPerfusionBoxcode(String perfusionBoxcode) {
this.perfusionBoxcode = perfusionBoxcode;
}
public String getPerfusionBoxcode() {
return perfusionBoxcode;
}
public void setPerfusionRefrigeranttypeleft(String perfusionRefrigeranttypeleft) {
this.perfusionRefrigeranttypeleft = perfusionRefrigeranttypeleft;
}
public String getPerfusionRefrigeranttypeleft() {
return perfusionRefrigeranttypeleft;
}
public void setPerfusionRefrigeranttyperight(String perfusionRefrigeranttyperight) {
this.perfusionRefrigeranttyperight = perfusionRefrigeranttyperight;
}
public String getPerfusionRefrigeranttyperight() {
return perfusionRefrigeranttyperight;
}
public void setPerfusionSetvolume(String perfusionSetvolume) {
this.perfusionSetvolume = perfusionSetvolume;
}
public String getPerfusionSetvolume() {
return perfusionSetvolume;
}
public void setPerfusionActualvolume(String perfusionActualvolume) {
this.perfusionActualvolume = perfusionActualvolume;
}
public String getPerfusionActualvolume() {
return perfusionActualvolume;
}
public void setPerfusionR(String perfusionR) {
this.perfusionR = perfusionR;
}
public String getPerfusionR() {
return perfusionR;
}
public void setPerfusionL(String perfusionL) {
this.perfusionL = perfusionL;
}
public String getPerfusionL() {
return perfusionL;
}
public void setPerfusionDuration(String perfusionDuration) {
this.perfusionDuration = perfusionDuration;
}
public String getPerfusionDuration() {
return perfusionDuration;
}
public void setPerfusionSystem(String perfusionSystem) {
this.perfusionSystem = perfusionSystem;
}
public String getPerfusionSystem() {
return perfusionSystem;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Date getCreatedTime() {
return createdTime;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public Date getUpdatedTime() {
return updatedTime;
}
public void setPerfusionResult(Long perfusionResult) {
this.perfusionResult = perfusionResult;
}
public Long getPerfusionResult() {
return perfusionResult;
}
public void setYield(String yield) {
this.yield = yield;
}
public String getYield() {
return yield;
}
public void setFinishStatus(String finishStatus) {
this.finishStatus = finishStatus;
}
public String getFinishStatus() {
return finishStatus;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("perfusionBoxcode", getPerfusionBoxcode())
.append("perfusionRefrigeranttypeleft", getPerfusionRefrigeranttypeleft())
.append("perfusionRefrigeranttyperight", getPerfusionRefrigeranttyperight())
.append("perfusionSetvolume", getPerfusionSetvolume())
.append("perfusionActualvolume", getPerfusionActualvolume())
.append("perfusionR", getPerfusionR())
.append("perfusionL", getPerfusionL())
.append("perfusionDuration", getPerfusionDuration())
.append("perfusionSystem", getPerfusionSystem())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.append("perfusionResult", getPerfusionResult())
.append("yield", getYield())
.append("finishStatus", getFinishStatus())
.toString();
}
}

@ -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…
Cancel
Save