Browse Source

fix:[试验管理][试剂生成]

master
HanLong 2 months ago
parent
commit
55f3cccf74
4 changed files with 32 additions and 4 deletions
  1. +14
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java
  2. +3
    -3
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillResource.java
  3. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSubpackageForm.java
  4. +4
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java

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

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Date;
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;
@ -58,10 +59,17 @@ public class SjController extends BaseController
Sj sj = sjService.getSjByBh(form.getBh());
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());
sjService.save(sj);
} else {
sj.setPzrq(new Date());
sj.setStudyId(form.getStudyId());
sj.setStudyFormId(form.getStudyFormId());
sj.setDeptId(form.getDeptId());
sjService.updateById(sj);
}
@ -83,6 +91,7 @@ public class SjController extends BaseController
sj.setKcdw(form.getKcdw());
sj.setStudyId(form.getStudyId());
sj.setStudyFormId(form.getStudyFormId());
sj.setDeptId(form.getDeptId());
sj.setNd(form.getNd());
sj.setNddw(form.getNddw());
sj.setZjzt(ZjztEnum.rk.getValue());
@ -94,6 +103,7 @@ public class SjController extends BaseController
sj.setKcdw(form.getKcdw());
sj.setStudyId(form.getStudyId());
sj.setStudyFormId(form.getStudyFormId());
sj.setDeptId(form.getDeptId());
sj.setNd(form.getNd());
sj.setNddw(form.getNddw());
sj.setZjzt(ZjztEnum.rk.getValue());
@ -111,6 +121,9 @@ public class SjController extends BaseController
*/
@PostMapping("/subpackage")
public AjaxResult subpackage(@RequestBody SjSubpackageForm form) {
/*LambdaQueryWrapper<Sj> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(Sj::getParentBh, form.getBh());
sjService.remove(queryWrapper);*/
List<SjSubpackageForm.SjSubpackageItemForm> list = form.getList();
List<Sj> sjList = new ArrayList<>();
for (SjSubpackageForm.SjSubpackageItemForm sjSubpackageItemForm : list) {
@ -121,6 +134,7 @@ public class SjController extends BaseController
sj.setKcdw(sjSubpackageItemForm.getKcdw());
sj.setStudyId(form.getStudyId());
sj.setStudyFormId(form.getStudyFormId());
sj.setDeptId(form.getDeptId());
sjList.add(sj);
}
sjService.saveBatch(sjList);

+ 3
- 3
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillResource.java View File

@ -30,7 +30,7 @@ public class StudyFormFillResource {
private String sxrq;
private int ndz;
private String nddw;
private int kc;
private String kc;
private String kcdw;
private String syl;
private String syldw;
@ -108,11 +108,11 @@ public class StudyFormFillResource {
this.nddw = nddw;
}
public int getKc() {
public String getKc() {
return kc;
}
public void setKc(int kc) {
public void setKc(String kc) {
this.kc = kc;
}

+ 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 */
private Long studyFormId;
/** 部门id */
private Long deptId;
/** 母液编号 */
private String bh;
@ -101,4 +104,12 @@ public class SjSubpackageForm {
public void setNddw(String nddw) {
this.nddw = nddw;
}
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
}

+ 4
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java View File

@ -640,6 +640,8 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi
Long studyId = studyFormFill.getStudyId();
Long studyFormId = studyFormFill.getId();
Long studySubjectId = studyFormFill.getStudySubjectId();
// 生成/使用
String resource = studyFormFill.getResource();
Map<String, Sj> sjMap = new HashMap<>();
@ -663,6 +665,7 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi
sj = new Sj();
sj.setStudyId(studyId);
sj.setStudyFormId(studyFormId);
sj.setDeptId(studySubjectId);
sj.setZjzt(ZjztEnum.rk.getValue());
sj.setJyzt(JyztEnum.wjy.getValue());
sj.setDeptId(template.getDeptId());
@ -671,7 +674,7 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi
sj.setBh(studyFormFillResource.getBh());
sj.setNd(String.valueOf(studyFormFillResource.getNdz()));
sj.setNddw(studyFormFillResource.getNddw());
sj.setKc(String.valueOf(studyFormFillResource.getKc()));
sj.setKc(studyFormFillResource.getKc());
sj.setKcdw(studyFormFillResource.getKcdw());
sj.setLy(studyFormFillResource.getSource());
sj.setSxr(DateUtils.parseDate(studyFormFillResource.getSxrq()));

Loading…
Cancel
Save