|
|
@ -23,6 +23,7 @@ import com.hxhq.business.form.gsp.GspSearchListForm; |
|
|
import com.hxhq.business.form.sj.*; |
|
|
import com.hxhq.business.form.sj.*; |
|
|
import com.hxhq.business.form.study.StudyFormConfigurationForm; |
|
|
import com.hxhq.business.form.study.StudyFormConfigurationForm; |
|
|
import com.hxhq.business.form.study.StudyFormFillSubpackageForm; |
|
|
import com.hxhq.business.form.study.StudyFormFillSubpackageForm; |
|
|
|
|
|
import com.hxhq.business.form.study.StudyFormFillSubpackageItemForm; |
|
|
import com.hxhq.business.service.*; |
|
|
import com.hxhq.business.service.*; |
|
|
import com.hxhq.business.utils.CalUnitTools; |
|
|
import com.hxhq.business.utils.CalUnitTools; |
|
|
import com.hxhq.business.utils.JctUtil; |
|
|
import com.hxhq.business.utils.JctUtil; |
|
|
@ -791,7 +792,23 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public void startConfiguration(StudyFormConfigurationForm form){ |
|
|
public void startConfiguration(StudyFormConfigurationForm form){ |
|
|
|
|
|
|
|
|
|
|
|
Sj sj = this.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(studySubject.getDeptId()); |
|
|
|
|
|
this.save(sj); |
|
|
|
|
|
} else { |
|
|
|
|
|
sj.setPzrq(new Date()); |
|
|
|
|
|
sj.setStudyId(form.getStudyId()); |
|
|
|
|
|
sj.setStudyFormId(form.getStudyFormId()); |
|
|
|
|
|
sj.setDeptId(studySubject.getDeptId()); |
|
|
|
|
|
this.updateById(sj); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -802,6 +819,35 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public void configurationCompleted(StudyFormConfigurationForm form){ |
|
|
public void configurationCompleted(StudyFormConfigurationForm form){ |
|
|
|
|
|
Sj sj = this.getSjByBh(form.getBh()); |
|
|
|
|
|
StudySubject studySubject = studySubjectService.getById(form.getStudySubjectId()); |
|
|
|
|
|
|
|
|
|
|
|
if(sj == null) { |
|
|
|
|
|
sj = new Sj(); |
|
|
|
|
|
sj.setBh(form.getBh()); |
|
|
|
|
|
sj.setKc(form.getKc()); |
|
|
|
|
|
sj.setKcdw(form.getKcdw()); |
|
|
|
|
|
sj.setStudyId(form.getStudyId()); |
|
|
|
|
|
sj.setStudyFormId(form.getStudyFormId()); |
|
|
|
|
|
sj.setDeptId(studySubject.getDeptId()); |
|
|
|
|
|
sj.setNd(form.getNd()); |
|
|
|
|
|
sj.setNddw(form.getNddw()); |
|
|
|
|
|
sj.setZjzt(ZjztEnum.rk.getValue()); |
|
|
|
|
|
sj.setJyzt(JyztEnum.wjy.getValue()); |
|
|
|
|
|
this.save(sj); |
|
|
|
|
|
} else { |
|
|
|
|
|
sj.setBh(form.getBh()); |
|
|
|
|
|
sj.setKc(form.getKc()); |
|
|
|
|
|
sj.setKcdw(form.getKcdw()); |
|
|
|
|
|
sj.setStudyId(form.getStudyId()); |
|
|
|
|
|
sj.setStudyFormId(form.getStudyFormId()); |
|
|
|
|
|
sj.setDeptId(studySubject.getDeptId()); |
|
|
|
|
|
sj.setNd(form.getNd()); |
|
|
|
|
|
sj.setNddw(form.getNddw()); |
|
|
|
|
|
sj.setZjzt(ZjztEnum.rk.getValue()); |
|
|
|
|
|
sj.setJyzt(JyztEnum.wjy.getValue()); |
|
|
|
|
|
this.updateById(sj); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -813,7 +859,51 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public void subpackage(StudyFormFillSubpackageForm form){ |
|
|
public void subpackage(StudyFormFillSubpackageForm form){ |
|
|
|
|
|
Sj sj = this.getSjByBh(form.getBh()); |
|
|
|
|
|
if(sj == null) { |
|
|
|
|
|
sj = new Sj(); |
|
|
|
|
|
sj.setBh(form.getBh()); |
|
|
|
|
|
this.save(sj); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
StudySubject studySubject = studySubjectService.getById(form.getStudySubjectId()); |
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<Sj> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
queryWrapper.eq(Sj::getParentBh, form.getBh()); |
|
|
|
|
|
this.remove(queryWrapper); |
|
|
|
|
|
List<StudyFormFillSubpackageItemForm> list = form.getList(); |
|
|
|
|
|
List<Sj> sjList = new ArrayList<>(); |
|
|
|
|
|
List<String> fz = new ArrayList<>(); |
|
|
|
|
|
for (StudyFormFillSubpackageItemForm sjSubpackageItemForm : list) { |
|
|
|
|
|
Sj subpackageSj = new Sj(); |
|
|
|
|
|
subpackageSj.setParentBh(form.getBh()); |
|
|
|
|
|
subpackageSj.setBh(sjSubpackageItemForm.getBh()); |
|
|
|
|
|
subpackageSj.setKc(sjSubpackageItemForm.getKc()); |
|
|
|
|
|
subpackageSj.setKcdw(sjSubpackageItemForm.getKcdw()); |
|
|
|
|
|
subpackageSj.setNd(form.getNd()); |
|
|
|
|
|
subpackageSj.setNddw(form.getNddw()); |
|
|
|
|
|
subpackageSj.setStudyId(form.getStudyId()); |
|
|
|
|
|
subpackageSj.setStudyFormId(form.getStudyFormId()); |
|
|
|
|
|
subpackageSj.setDeptId(studySubject.getDeptId()); |
|
|
|
|
|
sjList.add(subpackageSj); |
|
|
|
|
|
|
|
|
|
|
|
fz.add(sjSubpackageItemForm.getBh() + "(" + sjSubpackageItemForm.getKc() + sjSubpackageItemForm.getKcdw() + ")"); |
|
|
|
|
|
} |
|
|
|
|
|
this.saveBatch(sjList); |
|
|
|
|
|
|
|
|
|
|
|
SjJcgj jcgj = new SjJcgj(); |
|
|
|
|
|
jcgj.setSjId(sj.getId()); |
|
|
|
|
|
jcgj.setJcmc("分装"); |
|
|
|
|
|
jcgj.setJcgjlx(JcgjlxEnum.lc.getValue()); |
|
|
|
|
|
jcgj.setJcmcys(JcmcysEnum.blue.getValue()); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, String> jcnrMap = new LinkedHashMap<>(); |
|
|
|
|
|
jcnrMap.put("母液编号", form.getBh()); |
|
|
|
|
|
jcnrMap.put("分装个数", String.valueOf(form.getList().size())); |
|
|
|
|
|
jcnrMap.put("分装后编号及体积",String.join(",", fz)); |
|
|
|
|
|
jcnrMap.put("分装人", SecurityUtils.getNickName()); |
|
|
|
|
|
jcgj.setJcnr(JctUtil.formatStr(jcnrMap)); |
|
|
|
|
|
sjJcgjService.save(jcgj); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void cc(StudyFormFill studyFormFill, Map<String, Sj> sjMap, List<SjJcgj> jcgjList, List<SjTz> tzList, SysUser qmr) { |
|
|
private void cc(StudyFormFill studyFormFill, Map<String, Sj> sjMap, List<SjJcgj> jcgjList, List<SjTz> tzList, SysUser qmr) { |
|
|
|