From 907a5822ef290d13f5c186c438381c3cea39bac2 Mon Sep 17 00:00:00 2001 From: yinq Date: Thu, 14 Mar 2024 16:55:03 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E7=81=8C=E6=B3=A8=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PerfusionRecordController.java | 103 +++++++ .../aucma/report/domain/PerfusionRecord.java | 284 ++++++++++++++++++ .../report/mapper/PerfusionRecordMapper.java | 65 ++++ .../service/IPerfusionRecordService.java | 61 ++++ .../impl/PerfusionRecordServiceImpl.java | 93 ++++++ .../mapper/report/PerfusionRecordMapper.xml | 175 +++++++++++ 6 files changed, 781 insertions(+) create mode 100644 aucma-report/src/main/java/com/aucma/report/controller/PerfusionRecordController.java create mode 100644 aucma-report/src/main/java/com/aucma/report/domain/PerfusionRecord.java create mode 100644 aucma-report/src/main/java/com/aucma/report/mapper/PerfusionRecordMapper.java create mode 100644 aucma-report/src/main/java/com/aucma/report/service/IPerfusionRecordService.java create mode 100644 aucma-report/src/main/java/com/aucma/report/service/impl/PerfusionRecordServiceImpl.java create mode 100644 aucma-report/src/main/resources/mapper/report/PerfusionRecordMapper.xml diff --git a/aucma-report/src/main/java/com/aucma/report/controller/PerfusionRecordController.java b/aucma-report/src/main/java/com/aucma/report/controller/PerfusionRecordController.java new file mode 100644 index 0000000..813c4e9 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/controller/PerfusionRecordController.java @@ -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 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 list = perfusionRecordService.selectPerfusionRecordList(perfusionRecord); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/aucma-report/src/main/java/com/aucma/report/domain/PerfusionRecord.java b/aucma-report/src/main/java/com/aucma/report/domain/PerfusionRecord.java new file mode 100644 index 0000000..e700942 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/domain/PerfusionRecord.java @@ -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(); + } +} diff --git a/aucma-report/src/main/java/com/aucma/report/mapper/PerfusionRecordMapper.java b/aucma-report/src/main/java/com/aucma/report/mapper/PerfusionRecordMapper.java new file mode 100644 index 0000000..60c94c2 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/mapper/PerfusionRecordMapper.java @@ -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 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); +} diff --git a/aucma-report/src/main/java/com/aucma/report/service/IPerfusionRecordService.java b/aucma-report/src/main/java/com/aucma/report/service/IPerfusionRecordService.java new file mode 100644 index 0000000..471df1e --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/service/IPerfusionRecordService.java @@ -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 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); +} diff --git a/aucma-report/src/main/java/com/aucma/report/service/impl/PerfusionRecordServiceImpl.java b/aucma-report/src/main/java/com/aucma/report/service/impl/PerfusionRecordServiceImpl.java new file mode 100644 index 0000000..534a9aa --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/service/impl/PerfusionRecordServiceImpl.java @@ -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 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); + } +} diff --git a/aucma-report/src/main/resources/mapper/report/PerfusionRecordMapper.xml b/aucma-report/src/main/resources/mapper/report/PerfusionRecordMapper.xml new file mode 100644 index 0000000..d12c6d8 --- /dev/null +++ b/aucma-report/src/main/resources/mapper/report/PerfusionRecordMapper.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + SELECT seq_perfusion_record.NEXTVAL as objId FROM DUAL + + insert into perfusion_record + + 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, + + + #{objId}, + #{perfusionBoxcode}, + #{perfusionRefrigeranttypeleft}, + #{perfusionRefrigeranttyperight}, + #{perfusionSetvolume}, + #{perfusionActualvolume}, + #{perfusionR}, + #{perfusionL}, + #{perfusionDuration}, + #{perfusionSystem}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{perfusionResult}, + #{yield}, + #{finishStatus}, + + + + + update perfusion_record + + perfusion_boxcode = #{perfusionBoxcode}, + perfusion_refrigeranttypeleft = + #{perfusionRefrigeranttypeleft}, + + perfusion_refrigeranttyperight = + #{perfusionRefrigeranttyperight}, + + perfusion_setvolume = #{perfusionSetvolume}, + perfusion_actualvolume = #{perfusionActualvolume}, + perfusion_r = #{perfusionR}, + perfusion_l = #{perfusionL}, + perfusion_duration = #{perfusionDuration}, + perfusion_system = #{perfusionSystem}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + perfusion_result = #{perfusionResult}, + yield = #{yield}, + finish_status = #{finishStatus}, + + where obj_id = #{objId} + + + + delete + from perfusion_record + where obj_id = #{objId} + + + + delete from perfusion_record where obj_id in + + #{objId} + + + \ No newline at end of file