diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspArchiveController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspArchiveController.java new file mode 100644 index 0000000..ae22944 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspArchiveController.java @@ -0,0 +1,133 @@ +package com.hxhq.business.controller; + +import com.hxhq.business.domain.Gsp; +import com.hxhq.business.domain.GspJcgj; +import com.hxhq.business.domain.GspTz; +import com.hxhq.business.dto.gsp.GspListDto; +import com.hxhq.business.enums.zykgl.DaztEnum; +import com.hxhq.business.form.gsp.*; +import com.hxhq.business.service.IGspJcgjService; +import com.hxhq.business.service.IGspService; +import com.hxhq.business.service.IGspTzService; +import com.hxhq.common.core.web.controller.BaseController; +import com.hxhq.common.core.web.domain.AjaxResult; +import com.hxhq.common.core.web.page.TableDataInfo; +import com.hxhq.common.security.annotation.RequiresPermissions; +import com.hxhq.common.security.utils.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * 供试品档案管理Controller + * + * @author HanLong + * @date 2025-12-30 + */ +@RestController +@RequestMapping("/business/gspArchive") +public class GspArchiveController extends BaseController { + @Autowired + private IGspService gspService; + + + + /** + * 供试品-档案列表 + */ + @GetMapping("/list") + @RequiresPermissions("business:archive:gsp:list") + public TableDataInfo archiveList(GspSearchListForm form) { + startPage(); + form.setArchive(DaztEnum.ygd.getValue()); + List list = gspService.queryList(form); + return getDataTable(list); + } + + /** + * 同意归档 + */ + @PostMapping("/gd/agree") + @RequiresPermissions("business:archive:gsp:tygd") + public AjaxResult agreeGd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspService.agreeGd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝归档 + */ + @PostMapping("/gd/refuse") + @RequiresPermissions("business:archive:gsp:jjgd") + public AjaxResult refuseGd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspService.refuseGd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 同意解档 + */ + @PostMapping("/jd/agree") + @RequiresPermissions("business:archive:gsp:tyjd") + public AjaxResult agreeJd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspService.agreeJd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝解档 + */ + @PostMapping("/jd/refuse") + @RequiresPermissions("business:archive:gsp:jjjd") + public AjaxResult refuseJd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspService.refuseJd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 同意借阅 + */ + @PostMapping("/jy/agree") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult agreeJy(@RequestBody @Validated GspJyForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspService.agreeJy(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝借阅 + */ + @PostMapping("/jy/refuse") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult refuseJy(@RequestBody @Validated GspJyForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspService.refuseJy(form); + return AjaxResult.success("操作成功"); + } + + /** + * 档案确认归还 + */ + @PostMapping("/gh") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult archiveGh(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspService.archiveGh(form); + return AjaxResult.success("操作成功"); + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjArchiveController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjArchiveController.java new file mode 100644 index 0000000..94ded5e --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjArchiveController.java @@ -0,0 +1,127 @@ +package com.hxhq.business.controller; + +import com.hxhq.business.domain.Sj; +import com.hxhq.business.domain.SjJcgj; +import com.hxhq.business.domain.SjTz; +import com.hxhq.business.dto.sj.SjListDto; +import com.hxhq.business.enums.zykgl.JyztEnum; +import com.hxhq.business.enums.zykgl.ZjztEnum; +import com.hxhq.business.form.gsp.GspGdForm; +import com.hxhq.business.form.gsp.GspJyForm; +import com.hxhq.business.form.gsp.GspSearchListForm; +import com.hxhq.business.form.sj.*; +import com.hxhq.business.service.ISjJcgjService; +import com.hxhq.business.service.ISjService; +import com.hxhq.business.service.ISjTzService; +import com.hxhq.common.core.web.controller.BaseController; +import com.hxhq.common.core.web.domain.AjaxResult; +import com.hxhq.common.core.web.page.TableDataInfo; +import com.hxhq.common.security.annotation.RequiresPermissions; +import com.hxhq.common.security.utils.SecurityUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + + +/** + * 试剂档案Controller + * + * @author HanLong + * @date 2025-12-22 + */ +@RestController +@RequestMapping("/business/sjArchive") +public class SjArchiveController extends BaseController +{ + @Autowired + private ISjService sjService; + + /** + * 同意归档 + */ + @PostMapping("/gd/agree") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult agreeGd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + sjService.agreeGd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝归档 + */ + @PostMapping("/gd/refuse") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult refuseGd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + sjService.refuseGd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 同意解档 + */ + @PostMapping("/jd/agree") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult agreeJd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + sjService.agreeJd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝解档 + */ + @PostMapping("/jd/refuse") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult refuseJd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + sjService.refuseJd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 同意借阅 + */ + @PostMapping("/jy/agree") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult agreeJy(@RequestBody @Validated GspJyForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + sjService.agreeJy(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝借阅 + */ + @PostMapping("/jy/refuse") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult refuseJy(@RequestBody @Validated GspJyForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + sjService.refuseJy(form); + return AjaxResult.success("操作成功"); + } + + /** + * 档案确认归还 + */ + @PostMapping("/gh/archive") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult archiveGh(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + sjService.archiveGh(form); + return AjaxResult.success("操作成功"); + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java index 4eef006..4c42c4a 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java @@ -100,6 +100,7 @@ public class SjController extends BaseController List sjList = new ArrayList<>(); for (SjSubpackageForm.SjSubpackageItemForm sjSubpackageItemForm : list) { Sj sj = new Sj(); + sj.setParentBh(form.getBh()); sj.setBh(sjSubpackageItemForm.getBh()); sj.setKc(sjSubpackageItemForm.getKc()); sj.setKcdw(sjSubpackageItemForm.getKcdw()); @@ -111,6 +112,7 @@ public class SjController extends BaseController return success(); } + /** * 试验物资列表 */ diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Sj.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Sj.java index dbd37ad..7465e59 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Sj.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Sj.java @@ -103,6 +103,17 @@ public class Sj extends MpBaseEntity @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date gdsqsj; + /** 母液编号 */ + private String parentBh; + + public String getParentBh() { + return parentBh; + } + + public void setParentBh(String parentBh) { + this.parentBh = parentBh; + } + public Date getGdsqsj() { return gdsqsj; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java index 32c929b..4028e4d 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java @@ -21,6 +21,9 @@ public class GspSearchListForm { /** 批号 */ private String ph; + /** 规格 */ + private String gg; + /** 来源 */ private String ly; @@ -121,4 +124,12 @@ public class GspSearchListForm { public void setEndDate(String endDate) { this.endDate = endDate; } + + public String getGg() { + return gg; + } + + public void setGg(String gg) { + this.gg = gg; + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSubpackageForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSubpackageForm.java index bff1086..b79a418 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSubpackageForm.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSubpackageForm.java @@ -10,6 +10,9 @@ public class SjSubpackageForm { /** 试验表单id */ private Long studyFormId; + /** 母液编号 */ + private String bh; + /** 分装数据 */ private List list; @@ -68,4 +71,12 @@ public class SjSubpackageForm { public void setList(List list) { this.list = list; } + + public String getBh() { + return bh; + } + + public void setBh(String bh) { + this.bh = bh; + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java index 98992d7..b585d93 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java @@ -59,30 +59,33 @@ public class GspServiceImpl extends ServiceImpl implements IGspS */ @Override public List queryList(GspSearchListForm form) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + QueryWrapper queryWrapper = new QueryWrapper<>(); if(StringUtils.isNotEmpty(form.getMc())) { - queryWrapper.like(Gsp::getMc, form.getMc()); + queryWrapper.like("mc", form.getMc()); } if(StringUtils.isNotEmpty(form.getBh())) { - queryWrapper.like(Gsp::getBh, form.getBh()); + queryWrapper.like("bh", form.getBh()); } if(StringUtils.isNotEmpty(form.getPh())) { - queryWrapper.like(Gsp::getPh, form.getPh()); + queryWrapper.like("ph", form.getPh()); + } + if(StringUtils.isNotEmpty(form.getGg())) { + queryWrapper.and(p -> p.apply("CONCAT(gg, ggdw) LIKE #{0}", form.getGg())); } if(StringUtils.isNotEmpty(form.getStartDate())) { - queryWrapper.ge(Gsp::getYxq, form.getStartDate()); + queryWrapper.ge("yxq", form.getStartDate()); } if(StringUtils.isNotEmpty(form.getEndDate())) { - queryWrapper.le(Gsp::getYxq, form.getEndDate()); + queryWrapper.le("yxq", form.getEndDate()); } if(form.getJyzt() != null) { - queryWrapper.eq(Gsp::getJyzt, form.getJyzt()); + queryWrapper.eq("jyzt", form.getJyzt()); } if(form.getZjzt() != null) { - queryWrapper.eq(Gsp::getZjzt, form.getZjzt()); + queryWrapper.eq("zjzt", form.getZjzt()); } if(form.getArchive() != null && form.getArchive() == DaztEnum.ygd.getValue()) { - queryWrapper.in(Gsp::getZjzt, ZjztEnum.dgd.getValue(), ZjztEnum.gd.getValue(), ZjztEnum.djd.getValue()); + queryWrapper.in("zjzt", ZjztEnum.dgd.getValue(), ZjztEnum.gd.getValue(), ZjztEnum.djd.getValue()); } return this.list(queryWrapper); }