Browse Source

feat:[档案管理][供试品档案]

master
HanLong 2 months ago
parent
commit
d6bd014d54
7 changed files with 307 additions and 9 deletions
  1. +133
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspArchiveController.java
  2. +127
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjArchiveController.java
  3. +2
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java
  4. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Sj.java
  5. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java
  6. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSubpackageForm.java
  7. +12
    -9
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java

+ 133
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspArchiveController.java View File

@ -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<Gsp> 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("操作成功");
}
}

+ 127
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjArchiveController.java View File

@ -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("操作成功");
}
}

+ 2
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java View File

@ -100,6 +100,7 @@ public class SjController extends BaseController
List<Sj> sjList = new ArrayList<>(); List<Sj> sjList = new ArrayList<>();
for (SjSubpackageForm.SjSubpackageItemForm sjSubpackageItemForm : list) { for (SjSubpackageForm.SjSubpackageItemForm sjSubpackageItemForm : list) {
Sj sj = new Sj(); Sj sj = new Sj();
sj.setParentBh(form.getBh());
sj.setBh(sjSubpackageItemForm.getBh()); sj.setBh(sjSubpackageItemForm.getBh());
sj.setKc(sjSubpackageItemForm.getKc()); sj.setKc(sjSubpackageItemForm.getKc());
sj.setKcdw(sjSubpackageItemForm.getKcdw()); sj.setKcdw(sjSubpackageItemForm.getKcdw());
@ -111,6 +112,7 @@ public class SjController extends BaseController
return success(); return success();
} }
/** /**
* 试验物资列表 * 试验物资列表
*/ */

+ 11
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Sj.java View File

@ -103,6 +103,17 @@ public class Sj extends MpBaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date gdsqsj; private Date gdsqsj;
/** 母液编号 */
private String parentBh;
public String getParentBh() {
return parentBh;
}
public void setParentBh(String parentBh) {
this.parentBh = parentBh;
}
public Date getGdsqsj() { public Date getGdsqsj() {
return gdsqsj; return gdsqsj;
} }

+ 11
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java View File

@ -21,6 +21,9 @@ public class GspSearchListForm {
/** 批号 */ /** 批号 */
private String ph; private String ph;
/** 规格 */
private String gg;
/** 来源 */ /** 来源 */
private String ly; private String ly;
@ -121,4 +124,12 @@ public class GspSearchListForm {
public void setEndDate(String endDate) { public void setEndDate(String endDate) {
this.endDate = endDate; this.endDate = endDate;
} }
public String getGg() {
return gg;
}
public void setGg(String gg) {
this.gg = gg;
}
} }

+ 11
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSubpackageForm.java View File

@ -10,6 +10,9 @@ public class SjSubpackageForm {
/** 试验表单id */ /** 试验表单id */
private Long studyFormId; private Long studyFormId;
/** 母液编号 */
private String bh;
/** 分装数据 */ /** 分装数据 */
private List<SjSubpackageItemForm> list; private List<SjSubpackageItemForm> list;
@ -68,4 +71,12 @@ public class SjSubpackageForm {
public void setList(List<SjSubpackageItemForm> list) { public void setList(List<SjSubpackageItemForm> list) {
this.list = list; this.list = list;
} }
public String getBh() {
return bh;
}
public void setBh(String bh) {
this.bh = bh;
}
} }

+ 12
- 9
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java View File

@ -59,30 +59,33 @@ public class GspServiceImpl extends ServiceImpl implements IGspS
*/ */
@Override @Override
public List<Gsp> queryList(GspSearchListForm form) { public List<Gsp> queryList(GspSearchListForm form) {
LambdaQueryWrapper<Gsp> queryWrapper = new LambdaQueryWrapper<>();
QueryWrapper<Gsp> queryWrapper = new QueryWrapper<>();
if(StringUtils.isNotEmpty(form.getMc())) { if(StringUtils.isNotEmpty(form.getMc())) {
queryWrapper.like(Gsp::getMc, form.getMc());
queryWrapper.like("mc", form.getMc());
} }
if(StringUtils.isNotEmpty(form.getBh())) { if(StringUtils.isNotEmpty(form.getBh())) {
queryWrapper.like(Gsp::getBh, form.getBh());
queryWrapper.like("bh", form.getBh());
} }
if(StringUtils.isNotEmpty(form.getPh())) { 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())) { if(StringUtils.isNotEmpty(form.getStartDate())) {
queryWrapper.ge(Gsp::getYxq, form.getStartDate());
queryWrapper.ge("yxq", form.getStartDate());
} }
if(StringUtils.isNotEmpty(form.getEndDate())) { if(StringUtils.isNotEmpty(form.getEndDate())) {
queryWrapper.le(Gsp::getYxq, form.getEndDate());
queryWrapper.le("yxq", form.getEndDate());
} }
if(form.getJyzt() != null) { if(form.getJyzt() != null) {
queryWrapper.eq(Gsp::getJyzt, form.getJyzt());
queryWrapper.eq("jyzt", form.getJyzt());
} }
if(form.getZjzt() != null) { if(form.getZjzt() != null) {
queryWrapper.eq(Gsp::getZjzt, form.getZjzt());
queryWrapper.eq("zjzt", form.getZjzt());
} }
if(form.getArchive() != null && form.getArchive() == DaztEnum.ygd.getValue()) { 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); return this.list(queryWrapper);
} }

Loading…
Cancel
Save