diff --git a/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/domain/SysFile.java b/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/domain/SysFile.java index fa060d8..55c310b 100644 --- a/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/domain/SysFile.java +++ b/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/domain/SysFile.java @@ -20,6 +20,11 @@ public class SysFile */ private String url; + /** + * 源文件名称 + */ + private String originalFileName; + public String getName() { return name; @@ -40,11 +45,20 @@ public class SysFile this.url = url; } + public String getOriginalFileName() { + return originalFileName; + } + + public void setOriginalFileName(String originalFileName) { + this.originalFileName = originalFileName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("name", getName()) .append("url", getUrl()) + .append("originalFileName", getOriginalFileName()) .toString(); } } diff --git a/hxhq-modules/hxhq-file/src/main/java/com/hxhq/file/controller/SysFileController.java b/hxhq-modules/hxhq-file/src/main/java/com/hxhq/file/controller/SysFileController.java index ccb4576..58d1b4a 100644 --- a/hxhq-modules/hxhq-file/src/main/java/com/hxhq/file/controller/SysFileController.java +++ b/hxhq-modules/hxhq-file/src/main/java/com/hxhq/file/controller/SysFileController.java @@ -39,6 +39,7 @@ public class SysFileController SysFile sysFile = new SysFile(); sysFile.setName(FileUtils.getName(url)); sysFile.setUrl(url); + sysFile.setOriginalFileName(file.getOriginalFilename()); return R.ok(sysFile); } catch (Exception e) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java index c65f86a..2c30c9c 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java @@ -12,6 +12,7 @@ import com.hxhq.business.form.common.SignForm; import com.hxhq.business.form.gsp.GspSearchListForm; import com.hxhq.business.form.gyzj.SearchForm; import com.hxhq.business.form.sj.SjSearchListForm; +import com.hxhq.business.form.study.StudyCellSearchForm; import com.hxhq.business.form.yq.YqSearchForm; import com.hxhq.business.form.zcg.ZcgSearchForm; import com.hxhq.business.service.*; @@ -64,6 +65,11 @@ public class PublicController extends BaseController { public IGyzjService gyzjService; @Autowired public IGspService gspService; + @Autowired + public ICellService cellService; + @Autowired + public IBacteriaService bacteriaService; + /** * 获取编号 @@ -238,4 +244,26 @@ public class PublicController extends BaseController { { return AjaxResult.success(templateService.getStepListByTemplateId(templateId,templateSn)); } + + /** + * 细胞列表 + * @return + */ + @GetMapping("/cellList") + public TableDataInfo getCellList(StudyCellSearchForm form) { + startPage(); + List cells = cellService.queryStudyList(form); + return getDataTable(cells); + } + + /** + * 细菌列表 + * @return + */ + @GetMapping("/bacteriaList") + public TableDataInfo getBacteriaList(StudyCellSearchForm form) { + startPage(); + List list = bacteriaService.queryStudyList(form); + return getDataTable(list); + } } 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 e6d9202..ce803ae 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 @@ -6,22 +6,17 @@ import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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; -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.ISjService; import com.hxhq.business.service.ISjTzService; import com.hxhq.business.service.ISjJcgjService; +import com.hxhq.business.service.IStudySubjectService; 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.*; @@ -49,6 +44,8 @@ public class SjController extends BaseController @Autowired private ISjTzService sjTzService; + @Autowired + private IStudySubjectService studySubjectService; /** * 开始配置 @@ -57,19 +54,20 @@ public class SjController extends BaseController @PostMapping("/startConfiguration") public AjaxResult startConfiguration(@RequestBody SjBjForm form) { Sj sj = sjService.getSjByBh(form.getBh()); + StudySubject studySubject = studySubjectService.getById(form.getStudySubjectId()); if(sj == null) { sj = new Sj(); sj.setBh(form.getBh()); sj.setPzrq(new Date()); sj.setStudyId(form.getStudyId()); sj.setStudyFormId(form.getStudyFormId()); - sj.setDeptId(form.getDeptId()); + sj.setDeptId(studySubject.getDeptId()); sjService.save(sj); } else { sj.setPzrq(new Date()); sj.setStudyId(form.getStudyId()); sj.setStudyFormId(form.getStudyFormId()); - sj.setDeptId(form.getDeptId()); + sj.setDeptId(studySubject.getDeptId()); sjService.updateById(sj); } @@ -84,6 +82,8 @@ public class SjController extends BaseController @PostMapping("/configurationCompleted") public AjaxResult configurationCompleted(@RequestBody SjBjForm form) { Sj sj = sjService.getSjByBh(form.getBh()); + StudySubject studySubject = studySubjectService.getById(form.getStudySubjectId()); + if(sj == null) { sj = new Sj(); sj.setBh(form.getBh()); @@ -91,7 +91,7 @@ public class SjController extends BaseController sj.setKcdw(form.getKcdw()); sj.setStudyId(form.getStudyId()); sj.setStudyFormId(form.getStudyFormId()); - sj.setDeptId(form.getDeptId()); + sj.setDeptId(studySubject.getDeptId()); sj.setNd(form.getNd()); sj.setNddw(form.getNddw()); sj.setZjzt(ZjztEnum.rk.getValue()); @@ -103,7 +103,7 @@ public class SjController extends BaseController sj.setKcdw(form.getKcdw()); sj.setStudyId(form.getStudyId()); sj.setStudyFormId(form.getStudyFormId()); - sj.setDeptId(form.getDeptId()); + sj.setDeptId(studySubject.getDeptId()); sj.setNd(form.getNd()); sj.setNddw(form.getNddw()); sj.setZjzt(ZjztEnum.rk.getValue()); @@ -121,9 +121,11 @@ public class SjController extends BaseController */ @PostMapping("/subpackage") public AjaxResult subpackage(@RequestBody SjSubpackageForm form) { - /*LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + StudySubject studySubject = studySubjectService.getById(form.getStudySubjectId()); + + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(Sj::getParentBh, form.getBh()); - sjService.remove(queryWrapper);*/ + sjService.remove(queryWrapper); List list = form.getList(); List sjList = new ArrayList<>(); for (SjSubpackageForm.SjSubpackageItemForm sjSubpackageItemForm : list) { @@ -134,7 +136,7 @@ public class SjController extends BaseController sj.setKcdw(sjSubpackageItemForm.getKcdw()); sj.setStudyId(form.getStudyId()); sj.setStudyFormId(form.getStudyFormId()); - sj.setDeptId(form.getDeptId()); + sj.setDeptId(studySubject.getDeptId()); sjList.add(sj); } sjService.saveBatch(sjList); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjBjForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjBjForm.java index e4c7f60..d9168f3 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjBjForm.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjBjForm.java @@ -1,7 +1,6 @@ package com.hxhq.business.form.sj; import com.fasterxml.jackson.annotation.JsonFormat; -import com.hxhq.common.core.annotation.Compare; import java.util.Date; @@ -56,7 +55,7 @@ public class SjBjForm { private Long studyFormId; /** 所属部门/学科 */ - private Long deptId; + private Long studySubjectId; public Long getStudyId() { return studyId; @@ -74,12 +73,12 @@ public class SjBjForm { this.studyFormId = studyFormId; } - public Long getDeptId() { - return deptId; + public Long getStudySubjectId() { + return studySubjectId; } - public void setDeptId(Long deptId) { - this.deptId = deptId; + public void setStudySubjectId(Long studySubjectId) { + this.studySubjectId = studySubjectId; } public Long getId() { 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 78cd86a..9a2be83 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,8 +10,8 @@ public class SjSubpackageForm { /** 试验表单id */ private Long studyFormId; - /** 部门id */ - private Long deptId; + /** 学科id */ + private Long studySubjectId; /** 母液编号 */ private String bh; @@ -105,11 +105,11 @@ public class SjSubpackageForm { this.nddw = nddw; } - public Long getDeptId() { - return deptId; + public Long getStudySubjectId() { + return studySubjectId; } - public void setDeptId(Long deptId) { - this.deptId = deptId; + public void setStudySubjectId(Long studySubjectId) { + this.studySubjectId = studySubjectId; } } 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 f37d7bf..903fc39 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 @@ -63,6 +63,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi @Autowired private INoticeService noticeService; + @Autowired + private IStudySubjectService studySubjectService; + /** * 查询试剂库存列表 * @@ -640,7 +643,7 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi Long studyId = studyFormFill.getStudyId(); Long studyFormId = studyFormFill.getId(); - Long studySubjectId = studyFormFill.getStudySubjectId(); + Long deptId = template.getDeptId(); // 生成/使用 String resource = studyFormFill.getResource(); @@ -665,7 +668,7 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi sj = new Sj(); sj.setStudyId(studyId); sj.setStudyFormId(studyFormId); - sj.setDeptId(studySubjectId); + sj.setDeptId(deptId); sj.setZjzt(ZjztEnum.rk.getValue()); sj.setJyzt(JyztEnum.wjy.getValue()); sj.setDeptId(template.getDeptId()); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodServiceImpl.java index a68b247..278d05f 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodServiceImpl.java @@ -156,7 +156,7 @@ public class StudyMethodServiceImpl extends ServiceImpl depts = sysUserService.selectStudyUser(study.getType().equals(StudyTypeEnum.sy.getValue())?studyId:null,study.getType().equals(StudyTypeEnum.sy.getValue())?studySubjectId:null,study.getType().equals(StudyTypeEnum.fsy.getValue())?study.getDeptId():null,null); - if(depts.stream().map(o->o.getId()).collect(Collectors.toList()).contains(userId) && !study.getLeader().equals(userId)){ + if(depts.stream().map(o->o.getId()).collect(Collectors.toList()).contains(String.valueOf(userId)) && !study.getLeader().equals(userId)){ //排除sd LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();