From ab4d6511a34e177cfd64a7f86f1c373f96ba805e Mon Sep 17 00:00:00 2001 From: HanLong <404402223@qq.com> Date: Sun, 25 Jan 2026 10:19:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E6=A1=A3=E6=A1=88=E7=AE=A1=E7=90=86][?= =?UTF-8?q?=E8=AF=95=E5=89=82=E6=A1=A3=E6=A1=88=E7=AE=A1=E7=90=86]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hxhq/business/controller/GspController.java | 85 +------------ .../controller/GspFfjlArchiveController.java | 137 +++++++++++++++++++++ .../business/controller/GspFfjlController.java | 91 +------------- .../controller/GspRkjlArchiveController.java | 106 ++++++++++++++++ .../business/controller/GspRkjlController.java | 87 +------------ .../business/controller/SjArchiveController.java | 15 +++ .../com/hxhq/business/controller/SjController.java | 90 +------------- .../main/java/com/hxhq/business/domain/Gsp.java | 11 ++ .../java/com/hxhq/business/domain/GspFfjl.java | 11 ++ .../java/com/hxhq/business/dto/gsp/GspDto.java | 17 +++ .../com/hxhq/business/dto/gsp/GspFfjlListDto.java | 27 ++++ .../java/com/hxhq/business/form/gsp/FfGspForm.java | 23 +++- .../com/hxhq/business/form/gsp/GspPlffItem.java | 22 ++++ .../hxhq/business/form/gsp/GspSearchListForm.java | 76 ++++++++++++ .../hxhq/business/form/sj/SjSearchListForm.java | 9 ++ .../com/hxhq/business/mapper/GspFfjlMapper.java | 16 +++ .../java/com/hxhq/business/mapper/GspMapper.java | 3 + .../com/hxhq/business/service/IGspFfjlService.java | 6 +- .../com/hxhq/business/service/IGspRkjlService.java | 2 +- .../com/hxhq/business/service/IGspService.java | 5 + .../business/service/impl/GspFfjlServiceImpl.java | 120 +++++++++++++++++- .../business/service/impl/GspRkjlServiceImpl.java | 33 ++++- .../hxhq/business/service/impl/GspServiceImpl.java | 53 +++++++- .../hxhq/business/service/impl/SjServiceImpl.java | 50 ++++++-- .../resources/mapper/business/GspFfjlMapper.xml | 17 +++ .../main/resources/mapper/business/GspMapper.xml | 10 +- 26 files changed, 756 insertions(+), 366 deletions(-) create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspFfjlArchiveController.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspRkjlArchiveController.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/gsp/GspDto.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/gsp/GspFfjlListDto.java diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspController.java index dc94561..39e2666 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspController.java @@ -103,7 +103,7 @@ public class GspController extends BaseController { @GetMapping(value = "/info") @RequiresPermissions("business:resource:gsp:xq") public AjaxResult getInfo(Long id) { - return AjaxResult.success(gspService.getById(id)); + return AjaxResult.success(gspService.queryInfo(id)); } /** @@ -312,87 +312,4 @@ public class GspController extends BaseController { return AjaxResult.success("操作成功"); } - /** - * 同意归档 - */ - @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/archive") - @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/GspFfjlArchiveController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspFfjlArchiveController.java new file mode 100644 index 0000000..a84acdc --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspFfjlArchiveController.java @@ -0,0 +1,137 @@ +package com.hxhq.business.controller; + +import com.hxhq.business.domain.GspFfjlJcgj; +import com.hxhq.business.dto.gsp.GspFfjlListDto; +import com.hxhq.business.enums.zykgl.DaztEnum; +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.mjy.*; +import com.hxhq.business.service.IGspFfjlJcgjService; +import com.hxhq.business.service.IGspFfjlService; +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 hxhq + * @date 2025-12-30 + */ +@RestController +@RequestMapping("/business/gspFfjlArchive") +public class GspFfjlArchiveController extends BaseController +{ + @Autowired + private IGspFfjlService gspFfjlService; + + @Autowired + private IGspFfjlJcgjService gspFfjlJcgjService; + + /** + * 查询供试品发放记录列表 + */ + @GetMapping("/list") + @RequiresPermissions("business:resource:gsp:ffjllist") + public TableDataInfo list(GspSearchListForm form) + { + startPage(); + form.setArchive(DaztEnum.ygd.getValue()); + List list = gspFfjlService.queryList(form); + return getDataTable(list); + } + + + /** + * 同意归档 + */ + @PostMapping("/gd/agree") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult agreeGd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspFfjlService.agreeGd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝归档 + */ + @PostMapping("/gd/refuse") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult refuseGd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspFfjlService.refuseGd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 同意解档 + */ + @PostMapping("/jd/agree") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult agreeJd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspFfjlService.agreeJd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝解档 + */ + @PostMapping("/jd/refuse") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult refuseJd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspFfjlService.refuseJd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 同意借阅 + */ + @PostMapping("/jy/agree") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult agreeJy(@RequestBody @Validated GspJyForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspFfjlService.agreeJy(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝借阅 + */ + @PostMapping("/jy/refuse") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult refuseJy(@RequestBody @Validated GspJyForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspFfjlService.refuseJy(form); + return AjaxResult.success("操作成功"); + } + + /** + * 档案确认归还 + */ + @PostMapping("/gh/archive") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult archiveGh(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspFfjlService.archiveGh(form); + return AjaxResult.success("操作成功"); + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspFfjlController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspFfjlController.java index 163dd93..d3f13cb 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspFfjlController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspFfjlController.java @@ -5,10 +5,14 @@ import java.util.List; import com.hxhq.business.domain.GspFfjlJcgj; import com.hxhq.business.domain.MjyFfjlJcgj; +import com.hxhq.business.dto.gsp.GspFfjlListDto; 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.mjy.*; import com.hxhq.business.service.IGspFfjlJcgjService; +import com.hxhq.business.service.IStudyService; +import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.annotation.RequiresPermissions; import com.hxhq.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -42,10 +46,10 @@ public class GspFfjlController extends BaseController */ @GetMapping("/list") @RequiresPermissions("business:resource:gsp:ffjllist") - public TableDataInfo list(GspFfjl gspFfjl) + public TableDataInfo list(GspSearchListForm form) { startPage(); - List list = gspFfjlService.queryList(gspFfjl); + List list = gspFfjlService.queryList(form); return getDataTable(list); } @@ -167,87 +171,4 @@ public class GspFfjlController extends BaseController return AjaxResult.success("操作成功"); } - /** - * 同意归档 - */ - @PostMapping("/gd/agree") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult agreeGd(@RequestBody @Validated GspGdForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspFfjlService.agreeGd(form); - return AjaxResult.success("操作成功"); - } - - /** - * 拒绝归档 - */ - @PostMapping("/gd/refuse") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult refuseGd(@RequestBody @Validated GspGdForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspFfjlService.refuseGd(form); - return AjaxResult.success("操作成功"); - } - - /** - * 同意解档 - */ - @PostMapping("/jd/agree") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult agreeJd(@RequestBody @Validated GspGdForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspFfjlService.agreeJd(form); - return AjaxResult.success("操作成功"); - } - - /** - * 拒绝解档 - */ - @PostMapping("/jd/refuse") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult refuseJd(@RequestBody @Validated GspGdForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspFfjlService.refuseJd(form); - return AjaxResult.success("操作成功"); - } - - /** - * 同意借阅 - */ - @PostMapping("/jy/agree") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult agreeJy(@RequestBody @Validated GspJyForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspFfjlService.agreeJy(form); - return AjaxResult.success("操作成功"); - } - - /** - * 拒绝借阅 - */ - @PostMapping("/jy/refuse") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult refuseJy(@RequestBody @Validated GspJyForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspFfjlService.refuseJy(form); - return AjaxResult.success("操作成功"); - } - - /** - * 档案确认归还 - */ - @PostMapping("/gh/archive") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult archiveGh(@RequestBody @Validated GspGdForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspFfjlService.archiveGh(form); - return AjaxResult.success("操作成功"); - } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspRkjlArchiveController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspRkjlArchiveController.java new file mode 100644 index 0000000..06c3396 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspRkjlArchiveController.java @@ -0,0 +1,106 @@ +package com.hxhq.business.controller; + +import com.hxhq.business.domain.GspRkjl; +import com.hxhq.business.domain.GspRkjlJcgj; +import com.hxhq.business.enums.zykgl.DaztEnum; +import com.hxhq.business.form.gsp.*; +import com.hxhq.business.service.IGspRkjlJcgjService; +import com.hxhq.business.service.IGspRkjlService; +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 hxhq + * @date 2025-12-30 + */ +@RestController +@RequestMapping("/business/gspRkjlArchive") +public class GspRkjlArchiveController extends BaseController +{ + @Autowired + private IGspRkjlService gspRkjlService; + + /** + * 查询供试品入库记录列表 + */ + @GetMapping("/list") + @RequiresPermissions("business:resource:gsp:rklist") + public TableDataInfo list(GspSearchListForm form) + { + startPage(); + form.setArchive(DaztEnum.ygd.getValue()); + List list = gspRkjlService.queryList(form); + return getDataTable(list); + } + + /** + * 同意解档 + */ + @PostMapping("/jd/agree") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult agreeJd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspRkjlService.agreeJd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝解档 + */ + @PostMapping("/jd/refuse") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult refuseJd(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspRkjlService.refuseJd(form); + return AjaxResult.success("操作成功"); + } + + /** + * 同意借阅 + */ + @PostMapping("/jy/agree") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult agreeJy(@RequestBody @Validated GspJyForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspRkjlService.agreeJy(form); + return AjaxResult.success("操作成功"); + } + + /** + * 拒绝借阅 + */ + @PostMapping("/jy/refuse") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult refuseJy(@RequestBody @Validated GspJyForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspRkjlService.refuseJy(form); + return AjaxResult.success("操作成功"); + } + + /** + * 档案确认归还 + */ + @PostMapping("/gh/archive") + @RequiresPermissions("business:resource:gsp:gd") + public AjaxResult archiveGh(@RequestBody @Validated GspGdForm form) + { + form.setQmrId(SecurityUtils.getUserId()); + gspRkjlService.archiveGh(form); + return AjaxResult.success("操作成功"); + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspRkjlController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspRkjlController.java index a6284f2..e473142 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspRkjlController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspRkjlController.java @@ -41,10 +41,10 @@ public class GspRkjlController extends BaseController */ @GetMapping("/list") @RequiresPermissions("business:resource:gsp:rklist") - public TableDataInfo list(GspRkjl gspRkjl) + public TableDataInfo list(GspSearchListForm form) { startPage(); - List list = gspRkjlService.queryList(gspRkjl); + List list = gspRkjlService.queryList(form); return getDataTable(list); } @@ -177,87 +177,4 @@ public class GspRkjlController extends BaseController return AjaxResult.success("操作成功"); } - /** - * 同意归档 - */ - @PostMapping("/gd/agree") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult agreeGd(@RequestBody @Validated GspGdForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspRkjlService.agreeGd(form); - return AjaxResult.success("操作成功"); - } - - /** - * 拒绝归档 - */ - @PostMapping("/gd/refuse") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult refuseGd(@RequestBody @Validated GspGdForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspRkjlService.refuseGd(form); - return AjaxResult.success("操作成功"); - } - - /** - * 同意解档 - */ - @PostMapping("/jd/agree") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult agreeJd(@RequestBody @Validated GspGdForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspRkjlService.agreeJd(form); - return AjaxResult.success("操作成功"); - } - - /** - * 拒绝解档 - */ - @PostMapping("/jd/refuse") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult refuseJd(@RequestBody @Validated GspGdForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspRkjlService.refuseJd(form); - return AjaxResult.success("操作成功"); - } - - /** - * 同意借阅 - */ - @PostMapping("/jy/agree") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult agreeJy(@RequestBody @Validated GspJyForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspRkjlService.agreeJy(form); - return AjaxResult.success("操作成功"); - } - - /** - * 拒绝借阅 - */ - @PostMapping("/jy/refuse") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult refuseJy(@RequestBody @Validated GspJyForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspRkjlService.refuseJy(form); - return AjaxResult.success("操作成功"); - } - - /** - * 档案确认归还 - */ - @PostMapping("/gh/archive") - @RequiresPermissions("business:resource:gsp:gd") - public AjaxResult archiveGh(@RequestBody @Validated GspGdForm form) - { - form.setQmrId(SecurityUtils.getUserId()); - gspRkjlService.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 index 94ded5e..45e40ec 100644 --- 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 @@ -4,6 +4,7 @@ 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.DaztEnum; import com.hxhq.business.enums.zykgl.JyztEnum; import com.hxhq.business.enums.zykgl.ZjztEnum; import com.hxhq.business.form.gsp.GspGdForm; @@ -42,6 +43,20 @@ public class SjArchiveController extends BaseController private ISjService sjService; /** + * 查询试剂列表 + */ + @GetMapping("/list") + @RequiresPermissions("business:resource:sj:list") + public TableDataInfo list(SjSearchListForm form) + { + startPage(); + form.setArchive(DaztEnum.ygd.getValue()); + List list = sjService.queryList(form); + return getDataTable(list); + } + + + /** * 同意归档 */ @PostMapping("/gd/agree") 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 4c42c4a..634d144 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 @@ -7,6 +7,7 @@ import java.util.List; import com.hxhq.business.domain.*; import com.hxhq.business.dto.gsp.GspListDto; import com.hxhq.business.dto.sj.SjListDto; +import com.hxhq.business.enums.zykgl.DaztEnum; import com.hxhq.business.enums.zykgl.JyztEnum; import com.hxhq.business.enums.zykgl.ZjztEnum; import com.hxhq.business.form.gsp.GspGdForm; @@ -57,9 +58,11 @@ public class SjController extends BaseController Sj sj = sjService.getSjByBh(form.getBh()); if(sj == null) { sj = new Sj(); - BeanUtils.copyProperties(form, sj); sj.setPzrq(new Date()); sjService.save(sj); + } else { + sj.setPzrq(new Date()); + sjService.updateById(sj); } return success(); @@ -156,6 +159,7 @@ public class SjController extends BaseController public TableDataInfo list(SjSearchListForm form) { startPage(); + form.setArchive(DaztEnum.ygd.getValue()); List list = sjService.queryList(form); return getDataTable(list); } @@ -294,88 +298,4 @@ public class SjController extends BaseController sjService.gd(form); return AjaxResult.success("操作成功"); } - - /** - * 同意归档 - */ - @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/domain/Gsp.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Gsp.java index 1209ee2..d44ec55 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Gsp.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Gsp.java @@ -179,6 +179,9 @@ public class Gsp extends MpBaseEntity /** 发放目的ids */ private String mdIds; + /** 发放目的其他 */ + private String mdOther; + /** 关联暂存柜id */ @TableField(updateStrategy = FieldStrategy.IGNORED) private Long zcgId; @@ -640,4 +643,12 @@ public class Gsp extends MpBaseEntity public void setMdIds(String mdIds) { this.mdIds = mdIds; } + + public String getMdOther() { + return mdOther; + } + + public void setMdOther(String mdOther) { + this.mdOther = mdOther; + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/GspFfjl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/GspFfjl.java index f6db299..b950804 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/GspFfjl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/GspFfjl.java @@ -87,6 +87,9 @@ public class GspFfjl extends MpBaseEntity /** 目的 */ private String mdIds; + /** 发放目的其他 */ + private String mdOther; + /** 归还人1id */ private Long ghr1Id; @@ -606,4 +609,12 @@ public class GspFfjl extends MpBaseEntity public void setDasqrIdOld(Long dasqrIdOld) { this.dasqrIdOld = dasqrIdOld; } + + public String getMdOther() { + return mdOther; + } + + public void setMdOther(String mdOther) { + this.mdOther = mdOther; + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/gsp/GspDto.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/gsp/GspDto.java new file mode 100644 index 0000000..f6fbd76 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/gsp/GspDto.java @@ -0,0 +1,17 @@ +package com.hxhq.business.dto.gsp; + +import com.hxhq.business.domain.Gsp; + +public class GspDto extends Gsp { + + /** 发放目的名称 */ + private String mdMcs; + + public String getMdMcs() { + return mdMcs; + } + + public void setMdMcs(String mdMcs) { + this.mdMcs = mdMcs; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/gsp/GspFfjlListDto.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/gsp/GspFfjlListDto.java new file mode 100644 index 0000000..386ecb0 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/gsp/GspFfjlListDto.java @@ -0,0 +1,27 @@ +package com.hxhq.business.dto.gsp; + +import com.hxhq.business.domain.GspFfjl; + +public class GspFfjlListDto extends GspFfjl { + + /** 发放目的名称 */ + private String mdMcs; + + private String zcgMc; + + public String getZcgMc() { + return zcgMc; + } + + public void setZcgMc(String zcgMc) { + this.zcgMc = zcgMc; + } + + public String getMdMcs() { + return mdMcs; + } + + public void setMdMcs(String mdMcs) { + this.mdMcs = mdMcs; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/FfGspForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/FfGspForm.java index e862e54..9149d38 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/FfGspForm.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/FfGspForm.java @@ -20,9 +20,14 @@ public class FfGspForm { private String zytj; /** 目的ids */ - @NotEmpty(message = "请选择目的") private String mdIds; + /** 目的名称 */ + private String mdMcs; + + /** 目的其他 */ + private String mdOther; + /** 领取人1Id */ @NotNull(message = "请选择领取人") private Long lqr1Id; @@ -190,4 +195,20 @@ public class FfGspForm { public void setFfr2mm(String ffr2mm) { this.ffr2mm = ffr2mm; } + + public String getMdMcs() { + return mdMcs; + } + + public void setMdMcs(String mdMcs) { + this.mdMcs = mdMcs; + } + + public String getMdOther() { + return mdOther; + } + + public void setMdOther(String mdOther) { + this.mdOther = mdOther; + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspPlffItem.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspPlffItem.java index 6c57491..f1bac50 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspPlffItem.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspPlffItem.java @@ -18,6 +18,28 @@ public class GspPlffItem { /** 目的ids */ private String mdIds; + /** 目的名称 */ + private String mdMcs; + + /** 目的其他 */ + private String mdOther; + + public String getMdMcs() { + return mdMcs; + } + + public void setMdMcs(String mdMcs) { + this.mdMcs = mdMcs; + } + + public String getMdOther() { + return mdOther; + } + + public void setMdOther(String mdOther) { + this.mdOther = mdOther; + } + public Long getId() { return id; } 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 4028e4d..b87e3f1 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 @@ -27,9 +27,17 @@ public class GspSearchListForm { /** 来源 */ private String ly; + /** 目的 */ + private String md; + + private Long mdId; + /** 制剂状态 1:入库 3:已发放 5:已锁定 7:待归档 9:归档 11:待解档 */ private Integer zjzt; + /** 记录状态 1:未锁定 3:已锁定 5:待归档 7:归档 9:待解档 */ + private Integer jlzt; + /** 借阅状态 1:未借阅 3:待借阅 5:借阅中 */ private Integer jyzt; @@ -45,6 +53,66 @@ public class GspSearchListForm { /** 是否是档案 1-是 */ private Integer archive; + /** 入库日期开始 */ + private String startDateRk; + + /** 入库日期结束 */ + private String endDateRk; + + /** 出库日期开始 */ + private String startDateCk; + + /** 出库日期结束 */ + private String endDateCk; + + public Long getMdId() { + return mdId; + } + + public void setMdId(Long mdId) { + this.mdId = mdId; + } + + public String getMd() { + return md; + } + + public void setMd(String md) { + this.md = md; + } + + public String getStartDateRk() { + return startDateRk; + } + + public void setStartDateRk(String startDateRk) { + this.startDateRk = startDateRk; + } + + public String getEndDateRk() { + return endDateRk; + } + + public void setEndDateRk(String endDateRk) { + this.endDateRk = endDateRk; + } + + public String getStartDateCk() { + return startDateCk; + } + + public void setStartDateCk(String startDateCk) { + this.startDateCk = startDateCk; + } + + public String getEndDateCk() { + return endDateCk; + } + + public void setEndDateCk(String endDateCk) { + this.endDateCk = endDateCk; + } + public Integer getArchive() { return archive; } @@ -132,4 +200,12 @@ public class GspSearchListForm { public void setGg(String gg) { this.gg = gg; } + + public Integer getJlzt() { + return jlzt; + } + + public void setJlzt(Integer jlzt) { + this.jlzt = jlzt; + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSearchListForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSearchListForm.java index 0a51746..703ca15 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSearchListForm.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSearchListForm.java @@ -37,6 +37,7 @@ public class SjSearchListForm { /** 所属部门名称 */ private String deptName; + private Integer archive; public String getDeptName() { return deptName; @@ -125,4 +126,12 @@ public class SjSearchListForm { public void setStudyFormId(Long studyFormId) { this.studyFormId = studyFormId; } + + public void setArchive(Integer archive) { + this.archive = archive; + } + + public Integer getArchive() { + return archive; + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspFfjlMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspFfjlMapper.java index bc312be..96c8612 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspFfjlMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspFfjlMapper.java @@ -1,7 +1,15 @@ package com.hxhq.business.mapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.hxhq.business.domain.GspFfjl; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hxhq.business.domain.GyzjFfjl; +import com.hxhq.business.dto.gsp.GspFfjlListDto; +import com.hxhq.business.dto.gyzj.FfjlListDto; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + /** * 供试品发放记录Mapper接口 * @@ -11,4 +19,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; public interface GspFfjlMapper extends BaseMapper { + /** + * 查询列表 + * @param queryWrapper + * @return + */ + List queryList(@Param("ew") Wrapper queryWrapper); + + GspFfjlListDto queryInfo(Long id); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspMapper.java index d638bab..747e748 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspMapper.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.hxhq.business.domain.Gsp; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.hxhq.business.domain.Mjy; +import com.hxhq.business.dto.gsp.GspDto; import com.hxhq.business.dto.gsp.GspListDto; import org.apache.ibatis.annotations.Param; @@ -20,4 +21,6 @@ public interface GspMapper extends BaseMapper { List queryStudyList(@Param("ew") Wrapper queryWrapper); + + GspDto queryInfo(Long id); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlService.java index 69f886f..581e181 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlService.java @@ -8,10 +8,12 @@ import com.hxhq.business.domain.GspFfjl; import com.baomidou.mybatisplus.extension.service.IService; import com.hxhq.business.domain.Mjy; import com.hxhq.business.domain.MjyFfjl; +import com.hxhq.business.dto.gsp.GspFfjlListDto; import com.hxhq.business.dto.mjy.FfjlDetailDto; import com.hxhq.business.form.gsp.GspGdForm; import com.hxhq.business.form.gsp.GspGhForm; import com.hxhq.business.form.gsp.GspJyForm; +import com.hxhq.business.form.gsp.GspSearchListForm; import com.hxhq.business.form.mjy.*; import com.hxhq.system.api.domain.SysUser; @@ -26,10 +28,10 @@ public interface IGspFfjlService extends IService /** * 查询供试品发放记录列表 * - * @param gspFfjl 供试品发放记录 + * @param form 供试品发放记录 * @return 供试品发放记录集合 */ - public List queryList(GspFfjl gspFfjl); + public List queryList(GspSearchListForm form); /** * 详情 diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlService.java index b5ed69a..a0e7811 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlService.java @@ -20,7 +20,7 @@ public interface IGspRkjlService extends IService * @param gspRkjl 供试品入库记录 * @return 供试品入库记录集合 */ - public List queryList(GspRkjl gspRkjl); + public List queryList(GspSearchListForm gspRkjl); /** * 供试品入库记录新增 diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspService.java index c8247a5..e5d6ae1 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspService.java @@ -3,6 +3,7 @@ package com.hxhq.business.service; import java.util.List; import com.hxhq.business.domain.Gsp; import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.business.dto.gsp.GspDto; import com.hxhq.business.dto.gsp.GspListDto; import com.hxhq.business.form.gsp.*; import com.hxhq.business.form.gyzj.SearchForm; @@ -23,6 +24,9 @@ public interface IGspService extends IService */ public List queryList(GspSearchListForm form); + GspDto queryInfo(Long id); + + /** * 新增供试品 * @param gspForm 供试品表单 @@ -106,4 +110,5 @@ public interface IGspService extends IService /** 档案确认归还 */ void archiveGh(GspGdForm form); + } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlServiceImpl.java index 47a43e7..1100a76 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlServiceImpl.java @@ -6,16 +6,21 @@ import java.util.*; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.*; +import com.hxhq.business.dto.gsp.GspFfjlListDto; import com.hxhq.business.dto.mjy.FfjlDetailDto; +import com.hxhq.business.enums.archive.ArchiveLogTypeEnum; import com.hxhq.business.enums.zykgl.*; import com.hxhq.business.form.gsp.GspGdForm; import com.hxhq.business.form.gsp.GspGhForm; import com.hxhq.business.form.gsp.GspJyForm; +import com.hxhq.business.form.gsp.GspSearchListForm; import com.hxhq.business.form.mjy.*; +import com.hxhq.business.service.IArchiveLogService; import com.hxhq.business.service.IGspFfjlJcgjService; import com.hxhq.business.utils.JctUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.DateUtils; +import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; import com.hxhq.system.api.domain.SysUser; import com.hxhq.system.service.ISysUserService; @@ -43,17 +48,44 @@ public class GspFfjlServiceImpl extends ServiceImpl impl @Autowired private ISysUserService sysUserService; + @Autowired + private IArchiveLogService archiveLogService; + /** * 查询供试品发放记录列表 - * - * @param gspFfjl 供试品发放记录 * @return 供试品发放记录 */ @Override - public List queryList(GspFfjl gspFfjl) + public List queryList(GspSearchListForm form) { QueryWrapper queryWrapper = Wrappers.query(); - return this.list(queryWrapper); + queryWrapper.eq("t.del_flag", "0"); + if (form.getJyzt() != null && form.getJyzt().intValue() > 0) { + queryWrapper.eq("t.jyzt", form.getJyzt()); + } + if (form.getJlzt() != null && form.getJlzt().intValue() > 0) { + queryWrapper.eq("t.jlzt", form.getJlzt()); + } + if (StringUtils.isNoneBlank(form.getMc())) { + queryWrapper.and(p -> p.like("t.`mc`", form.getMc())); + } + if (StringUtils.isNoneBlank(form.getBh())) { + queryWrapper.and(p -> p.like("t.`bh`", form.getBh())); + } + if (StringUtils.isNoneBlank(form.getStartDateCk())) { + queryWrapper.and(p -> p.apply("t.ffrq>={0}", form.getStartDateCk())); + } + if (StringUtils.isNoneBlank(form.getEndDateCk())) { + queryWrapper.apply("t.ffrq>={0}", form.getStartDateCk()); + } + if (StringUtils.isNoneBlank(form.getStartDateRk())) { + queryWrapper.and(p -> p.apply("t.ghrq>={0}", form.getStartDateRk())); + } + if (StringUtils.isNoneBlank(form.getEndDateRk())) { + queryWrapper.apply("t.ghrq>={0}", form.getEndDateRk()); + } + queryWrapper.orderByDesc("t.id"); + return baseMapper.queryList(queryWrapper); } @Override @@ -81,7 +113,8 @@ public class GspFfjlServiceImpl extends ServiceImpl impl gspFfjl.setCkldw(ckdw); gspFfjl.setJyzt(JyztEnum.wjy.getValue()); gspFfjl.setJlzt(JlztEnum.wsd.getValue()); - + gspFfjl.setMdIds(gsp.getMdIds()); + gspFfjl.setMdOther(gsp.getMdOther()); gspFfjl.setLqr1Id(lqr1.getUserId()); gspFfjl.setLqr1Mc(lqr1.getNickName()); if(lqr2 != null) { @@ -212,6 +245,12 @@ public class GspFfjlServiceImpl extends ServiceImpl impl gspFfjlJcgjService.saveJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "申请解档", "Apply for De-archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "申请解档"); } @Override @@ -260,6 +299,12 @@ public class GspFfjlServiceImpl extends ServiceImpl impl gspFfjlJcgjList.add(gspFfjlJcgj); //endregion + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "申请归档"); } this.saveOrUpdateBatch(gspFfjlList); gspFfjlJcgjService.saveBatch(gspFfjlJcgjList); @@ -298,6 +343,13 @@ public class GspFfjlServiceImpl extends ServiceImpl impl gspFfjlJcgjService.saveJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "申请归档","Apply for Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "申请归档"); + } /** @@ -464,6 +516,14 @@ public class GspFfjlServiceImpl extends ServiceImpl impl formDataEn.put("Comment", form.getRemark()); gspFfjlJcgjService.saveJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "申请借阅", "Apply for Check-out", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "申请借阅"); + } /** @@ -521,6 +581,13 @@ public class GspFfjlServiceImpl extends ServiceImpl impl formDataEn.put("Comment", form.getRemark()); gspFfjlJcgjService.saveJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "同意归档", "Approve Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "同意归档"); } @Override @@ -547,6 +614,13 @@ public class GspFfjlServiceImpl extends ServiceImpl impl formDataEn.put("Comment", form.getRemark()); gspFfjlJcgjService.saveJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "拒绝归档", "Reject Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "拒绝归档"); } @Override @@ -573,6 +647,13 @@ public class GspFfjlServiceImpl extends ServiceImpl impl formDataEn.put("Comment", form.getRemark()); gspFfjlJcgjService.saveJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "同意解档", "Approve De-archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "同意解档"); } @Override @@ -599,6 +680,13 @@ public class GspFfjlServiceImpl extends ServiceImpl impl formDataEn.put("Comment", form.getRemark()); gspFfjlJcgjService.saveJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "拒绝解档", "Reject De-archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "拒绝解档"); } @Override @@ -627,6 +715,13 @@ public class GspFfjlServiceImpl extends ServiceImpl impl formDataEn.put("Comment", form.getRemark()); gspFfjlJcgjService.saveJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "同意借阅", "Approve Check-out", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "同意借阅"); } @Override @@ -653,6 +748,13 @@ public class GspFfjlServiceImpl extends ServiceImpl impl formDataEn.put("Comment", form.getRemark()); gspFfjlJcgjService.saveJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "拒绝借阅", "Reject Check-out", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "拒绝借阅"); } @Override @@ -679,6 +781,14 @@ public class GspFfjlServiceImpl extends ServiceImpl impl formDataEn.put("Comment", form.getRemark()); gspFfjlJcgjService.saveJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "确认归还", "Check-out End Confirmation", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + + GspFfjlListDto gspFfjlListDto = baseMapper.queryInfo(gspFfjl.getId()); + String mdMcs = gspFfjlListDto.getMdMcs(); + if(StringUtils.isNotEmpty(gspFfjlListDto.getMdOther())) { + mdMcs = mdMcs + "," + gspFfjlListDto.getMdOther(); + } + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsplqff, gspFfjl.getId(), gspFfjl.getMc(), gspFfjl.getBh(), mdMcs, "确认归还"); } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspRkjlServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspRkjlServiceImpl.java index 5713b3b..d318cf9 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspRkjlServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspRkjlServiceImpl.java @@ -18,6 +18,7 @@ import com.hxhq.common.core.utils.DateUtils; import com.hxhq.common.security.utils.SecurityUtils; import com.hxhq.system.api.domain.SysUser; import com.hxhq.system.service.ISysUserService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -43,13 +44,39 @@ public class GspRkjlServiceImpl extends ServiceImpl impl /** * 查询供试品入库记录列表 * - * @param gspRkjl 供试品入库记录 * @return 供试品入库记录 */ @Override - public List queryList(GspRkjl gspRkjl) + public List queryList(GspSearchListForm form) { - QueryWrapper queryWrapper = Wrappers.query(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + if(StringUtils.isNotEmpty(form.getMc())) { + queryWrapper.like("mc", form.getMc()); + } + if(StringUtils.isNotEmpty(form.getBh())) { + queryWrapper.like("bh", form.getBh()); + } + if(StringUtils.isNotEmpty(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("rksj", form.getStartDate()); + } + if(StringUtils.isNotEmpty(form.getEndDate())) { + queryWrapper.le("rksj", form.getEndDate()); + } + if(form.getJlzt() != null) { + queryWrapper.eq("jlzt", form.getJlzt()); + } + if(form.getJyzt() != null) { + queryWrapper.eq("jyzt", form.getJyzt()); + } + if(form.getArchive() != null && form.getArchive() == DaztEnum.ygd.getValue()) { + queryWrapper.in("jlzt", JlztEnum.dgd.getValue(), JlztEnum.gd.getValue(), JlztEnum.djd.getValue()); + } return this.list(queryWrapper); } 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 b585d93..f1a5795 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 @@ -8,7 +8,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.*; +import com.hxhq.business.dto.gsp.GspDto; import com.hxhq.business.dto.gsp.GspListDto; +import com.hxhq.business.enums.archive.ArchiveLogTypeEnum; import com.hxhq.business.enums.zykgl.*; import com.hxhq.business.form.gsp.*; import com.hxhq.business.service.*; @@ -51,6 +53,9 @@ public class GspServiceImpl extends ServiceImpl implements IGspS @Autowired private IZcgService zcgService; + @Autowired + private IArchiveLogService archiveLogService; + /** * 查询供试品管理列表 * @@ -91,6 +96,14 @@ public class GspServiceImpl extends ServiceImpl implements IGspS } @Override + public GspDto queryInfo(Long id) { + if (id == null || id.longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + return baseMapper.queryInfo(id); + } + + @Override public void save(GspForm form) { SysUser qmr = sysUserService.selectUserById(form.getQmrId()); sysUserService.checkPassword(qmr, form.getQmrmm(), false); @@ -352,13 +365,13 @@ public class GspServiceImpl extends ServiceImpl implements IGspS Map formData = new LinkedHashMap<>(); formData.put("出库量", gspOld.getKc()+ gspOld.getKcdw()); formData.put("转移条件", form.getZytj()); - formData.put("目的", form.getMdIds()); + formData.put("目的", form.getMdMcs()); formData.put("备注", form.getRemark()); Map formDataEn = new LinkedHashMap<>(); formDataEn.put("Out Amount", gspOld.getKc()+ gspOld.getKcdw()); formDataEn.put("Transfer Condition", form.getZytj()); - formDataEn.put("Purpose", form.getMdIds()); + formDataEn.put("Purpose", form.getMdMcs()); formDataEn.put("Comment", form.getRemark()); gspJcgjService.saveJcgj(gspOld.getId(), JcgjlxEnum.lc.getValue(), "领取发放", "Distribution", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), @@ -384,7 +397,8 @@ public class GspServiceImpl extends ServiceImpl implements IGspS } gspOld.setFfrq(now); gspOld.setFfbz(form.getRemark()); - gspOld.setMdIds(form.getMdIds()); + gspOld.setMdIds(form.getMdMcs()); + gspOld.setMdOther(form.getMdOther()); gspOld.setZjzt(ZjztEnum.yff.getValue()); //endregion this.updateById(gspOld); @@ -437,13 +451,13 @@ public class GspServiceImpl extends ServiceImpl implements IGspS Map formData = new LinkedHashMap<>(); formData.put("出库量", gsp.getKc()+ gsp.getKcdw()); formData.put("转移条件", plffItemFilter.get(0).getZytj()); - formData.put("目的", plffItemFilter.get(0).getMdIds()); + formData.put("目的", plffItemFilter.get(0).getMdMcs()); formData.put("备注", plffItemFilter.get(0).getRemark()); gspJcgj.setJcnr(JctUtil.formatStr(formData)); Map formDataEn = new LinkedHashMap<>(); formDataEn.put("Out Amount", gsp.getKc()+ gsp.getKcdw()); formDataEn.put("Transfer Condition", plffItemFilter.get(0).getZytj()); - formDataEn.put("Purpose", plffItemFilter.get(0).getMdIds()); + formDataEn.put("Purpose", plffItemFilter.get(0).getMdMcs()); formDataEn.put("Comment", plffItemFilter.get(0).getRemark()); gspJcgj.setJcnrEn(JctUtil.formatStr(formDataEn)); gspJcgj.setQmrId(SecurityUtils.getUserId()); @@ -481,6 +495,7 @@ public class GspServiceImpl extends ServiceImpl implements IGspS gsp.setFfrq(now); gsp.setFfbz(plffItemFilter.get(0).getRemark()); gsp.setMdIds(plffItemFilter.get(0).getMdIds()); + gsp.setMdOther(plffItemFilter.get(0).getMdOther()); gsp.setZjzt(ZjztEnum.yff.getValue()); //endregion } else { @@ -877,6 +892,8 @@ public class GspServiceImpl extends ServiceImpl implements IGspS gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "申请借阅", "Apply for Check-out", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "申请借阅"); + } @Override @@ -909,6 +926,9 @@ public class GspServiceImpl extends ServiceImpl implements IGspS formDataEn.put("Comment", form.getRemark()); gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "申请解档", "申请解档", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "申请解档"); + } @Override @@ -940,6 +960,7 @@ public class GspServiceImpl extends ServiceImpl implements IGspS gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "申请归档", "Apply for Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "申请归档"); } @Override @@ -976,6 +997,8 @@ public class GspServiceImpl extends ServiceImpl implements IGspS formDataEn.put("Comment", form.getRemark()); gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "申请归档", "Apply for Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "申请归档"); } } @@ -1100,6 +1123,8 @@ public class GspServiceImpl extends ServiceImpl implements IGspS gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "同意归档", "Approve Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "同意归档"); + } @Override @@ -1126,6 +1151,9 @@ public class GspServiceImpl extends ServiceImpl implements IGspS formDataEn.put("Comment", form.getRemark()); gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "拒绝归档", "Reject Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "拒绝归档"); + } @Override @@ -1152,6 +1180,9 @@ public class GspServiceImpl extends ServiceImpl implements IGspS formDataEn.put("Comment", form.getRemark()); gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "同意解档", "Approve De-archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "同意解档"); + } @Override @@ -1180,6 +1211,9 @@ public class GspServiceImpl extends ServiceImpl implements IGspS formDataEn.put("Comment", form.getRemark()); gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "拒绝解档", "Reject De-archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "拒绝解档"); + } @Override @@ -1208,6 +1242,9 @@ public class GspServiceImpl extends ServiceImpl implements IGspS formDataEn.put("Comment", form.getRemark()); gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "同意借阅", "Approve Check-out", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "同意借阅"); + } @Override @@ -1234,6 +1271,9 @@ public class GspServiceImpl extends ServiceImpl implements IGspS formDataEn.put("Comment", form.getRemark()); gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "拒绝借阅", "Reject Check-out", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "拒绝借阅"); + } @Override @@ -1260,6 +1300,9 @@ public class GspServiceImpl extends ServiceImpl implements IGspS formDataEn.put("Comment", form.getRemark()); gspJcgjService.saveJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "确认归还", "Check-out End Confirmation", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.gsp, gsp.getId(), gsp.getMc(), gsp.getPh(), gsp.getGg() + gsp.getGgdw(), "确认归还"); + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java index 195e82e..cb8797b 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java @@ -14,18 +14,14 @@ import com.hxhq.business.dto.sj.SjListDto; import com.hxhq.business.dto.study.StudyFormFillCc; import com.hxhq.business.dto.study.StudyFormFillCz; import com.hxhq.business.dto.study.StudyFormFillResource; -import com.hxhq.business.enums.zykgl.JcgjlxEnum; -import com.hxhq.business.enums.zykgl.JcmcysEnum; -import com.hxhq.business.enums.zykgl.JyztEnum; -import com.hxhq.business.enums.zykgl.ZjztEnum; +import com.hxhq.business.enums.archive.ArchiveLogTypeEnum; +import com.hxhq.business.enums.zykgl.*; 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.mjy.GdForm; import com.hxhq.business.form.sj.*; -import com.hxhq.business.service.ISjTzService; -import com.hxhq.business.service.ISjJcgjService; -import com.hxhq.business.service.IStudySjService; +import com.hxhq.business.service.*; import com.hxhq.business.utils.JctUtil; import com.hxhq.business.utils.ObjectCompareUtil; import com.hxhq.common.core.exception.ServiceException; @@ -40,7 +36,6 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.SjMapper; -import com.hxhq.business.service.ISjService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.transaction.annotation.Transactional; @@ -65,6 +60,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi @Autowired private IStudySjService studySjService; + @Autowired + private IArchiveLogService archiveLogService; + /** * 查询试剂库存列表 * @@ -100,6 +98,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi if(StringUtils.isNotEmpty(form.getStudyName())) { queryWrapper.like("t.name", form.getStudyName()); } + if(form.getArchive() != null && form.getArchive() == DaztEnum.ygd.getValue()) { + queryWrapper.in("s.zjzt", ZjztEnum.dgd.getValue(), ZjztEnum.gd.getValue(), ZjztEnum.djd.getValue()); + } queryWrapper.orderByDesc("s.id"); return baseMapper.queryList(queryWrapper); } @@ -443,6 +444,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sjOld.getId(), JcgjlxEnum.lc.getValue(), "申请借阅", "Apply for Check-out", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sjOld.getId(), sjOld.getMc(), sjOld.getBh(), sjOld.getNd() + sjOld.getNddw(), "申请借阅"); + } @Override @@ -471,6 +475,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sjOld.getId(), JcgjlxEnum.lc.getValue(), "申请解档", "Apply for De-archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sjOld.getId(), sjOld.getMc(), sjOld.getBh(), sjOld.getNd() + sjOld.getNddw(), "申请解档"); + } @Override @@ -499,6 +506,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sjOld.getId(), JcgjlxEnum.lc.getValue(), "申请归档", "Apply for Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sjOld.getId(), sjOld.getMc(), sjOld.getBh(), sjOld.getNd() + sjOld.getNddw(), "申请归档"); + } @Override @@ -534,6 +544,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "申请归档", "Apply for Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sj.getId(), sj.getMc(), sj.getBh(), sj.getNd() + sj.getNddw(), "申请归档"); + } } @@ -787,6 +800,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "同意归档", "Approve Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sj.getId(), sj.getMc(), sj.getBh(), sj.getNd() + sj.getNddw(), "同意归档"); + } @Override @@ -813,6 +829,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "拒绝归档", "Reject Archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sj.getId(), sj.getMc(), sj.getBh(), sj.getNd() + sj.getNddw(), "拒绝归档"); + } @Override @@ -839,6 +858,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "同意解档", "Approve De-archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sj.getId(), sj.getMc(), sj.getBh(), sj.getNd() + sj.getNddw(), "同意解档"); + } @Override @@ -865,6 +887,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "拒绝解档", "Reject De-archiving", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sj.getId(), sj.getMc(), sj.getBh(), sj.getNd() + sj.getNddw(), "拒绝解档"); + } @Override @@ -893,6 +918,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "同意借阅", "Approve Check-out", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sj.getId(), sj.getMc(), sj.getBh(), sj.getNd() + sj.getNddw(), "同意借阅"); + } @Override @@ -919,6 +947,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "拒绝借阅", "Reject Check-out", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sj.getId(), sj.getMc(), sj.getBh(), sj.getNd() + sj.getNddw(), "拒绝借阅"); + } @Override @@ -945,6 +976,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi formDataEn.put("Comment", form.getRemark()); sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "确认归还", "Check-out End Confirmation", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn)); + + archiveLogService.saveInfo(ArchiveLogTypeEnum.sj, sj.getId(), sj.getMc(), sj.getBh(), sj.getNd() + sj.getNddw(), "确认归还"); + } } diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspFfjlMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspFfjlMapper.xml index 0ce23ae..e6fa66f 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspFfjlMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspFfjlMapper.xml @@ -3,4 +3,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + \ No newline at end of file diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspMapper.xml index 02e34f8..cae09b9 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspMapper.xml @@ -5,12 +5,18 @@ + \ No newline at end of file