|
|
@ -14,6 +14,7 @@ import com.hxhq.business.dto.sj.SjListDto; |
|
|
import com.hxhq.business.dto.study.StudyFormFillCc; |
|
|
import com.hxhq.business.dto.study.StudyFormFillCc; |
|
|
import com.hxhq.business.dto.study.StudyFormFillCz; |
|
|
import com.hxhq.business.dto.study.StudyFormFillCz; |
|
|
import com.hxhq.business.dto.study.StudyFormFillResource; |
|
|
import com.hxhq.business.dto.study.StudyFormFillResource; |
|
|
|
|
|
import com.hxhq.business.enums.NormalEnum; |
|
|
import com.hxhq.business.enums.archive.ArchiveLogTypeEnum; |
|
|
import com.hxhq.business.enums.archive.ArchiveLogTypeEnum; |
|
|
import com.hxhq.business.enums.study.StudyFormFillResourceTypeEnum; |
|
|
import com.hxhq.business.enums.study.StudyFormFillResourceTypeEnum; |
|
|
import com.hxhq.business.enums.zykgl.*; |
|
|
import com.hxhq.business.enums.zykgl.*; |
|
|
@ -673,44 +674,46 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi |
|
|
Sj sj = sjMap.get(studyFormFillResource.getBh()); |
|
|
Sj sj = sjMap.get(studyFormFillResource.getBh()); |
|
|
//配置的才保存,或更新 |
|
|
//配置的才保存,或更新 |
|
|
if (studyFormFillResource.getType() == null) { |
|
|
if (studyFormFillResource.getType() == null) { |
|
|
if (sj == null) { |
|
|
|
|
|
sj = new Sj(); |
|
|
|
|
|
|
|
|
if(studyFormFill.getSftb().equals(NormalEnum.no.getValue())) { |
|
|
|
|
|
if (sj == null) { |
|
|
|
|
|
sj = new Sj(); |
|
|
|
|
|
} |
|
|
|
|
|
sj.setStudyId(studyId); |
|
|
|
|
|
sj.setStudyFormId(studyFormId); |
|
|
|
|
|
sj.setDeptId(deptId); |
|
|
|
|
|
sj.setZjzt(ZjztEnum.rk.getValue()); |
|
|
|
|
|
sj.setJyzt(JyztEnum.wjy.getValue()); |
|
|
|
|
|
sj.setDeptId(template.getDeptId()); |
|
|
|
|
|
|
|
|
|
|
|
sj.setMc(studyFormFillResource.getMc()); |
|
|
|
|
|
sj.setBh(studyFormFillResource.getBh()); |
|
|
|
|
|
sj.setNd(String.valueOf(studyFormFillResource.getNd())); |
|
|
|
|
|
sj.setNddw(studyFormFillResource.getNddw()); |
|
|
|
|
|
sj.setKc(studyFormFillResource.getKc()); |
|
|
|
|
|
sj.setKcdw(studyFormFillResource.getKcdw()); |
|
|
|
|
|
sj.setLy(studyFormFillResource.getLy()); |
|
|
|
|
|
sj.setSxr(DateUtils.parseDate(studyFormFillResource.getSxrq())); |
|
|
|
|
|
sj.setPzrq(studyFormFill.getStartDate()); |
|
|
|
|
|
sj.setYxzq(studyFormFillResource.getYxzq()); |
|
|
|
|
|
sj.setYxzqdw(studyFormFillResource.getYxzqdw()); |
|
|
|
|
|
|
|
|
|
|
|
if (sj.getId() == null) { |
|
|
|
|
|
this.save(sj); |
|
|
|
|
|
// 稽查轨迹 |
|
|
|
|
|
SjJcgj sjJcgj = sjJcgjService.genJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "配制完成", "Formulation Completed", |
|
|
|
|
|
JcmcysEnum.green.getValue(), null, null, qmr); |
|
|
|
|
|
jcgjList.add(sjJcgj); |
|
|
|
|
|
|
|
|
|
|
|
// 台账 |
|
|
|
|
|
SjTz sjTz = sjTzService.genTz(sj.getId(), "配制完成", "Formulation Completed", sj.getKc(), sj.getKcdw(), null, qmr); |
|
|
|
|
|
tzList.add(sjTz); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.updateById(sj); |
|
|
|
|
|
} |
|
|
|
|
|
sjMap.put(sj.getBh(), sj); |
|
|
|
|
|
sjList.add(sj); |
|
|
|
|
|
studyFormFillResource.setType(StudyFormFillResourceTypeEnum.sj.getValue()); |
|
|
} |
|
|
} |
|
|
sj.setStudyId(studyId); |
|
|
|
|
|
sj.setStudyFormId(studyFormId); |
|
|
|
|
|
sj.setDeptId(deptId); |
|
|
|
|
|
sj.setZjzt(ZjztEnum.rk.getValue()); |
|
|
|
|
|
sj.setJyzt(JyztEnum.wjy.getValue()); |
|
|
|
|
|
sj.setDeptId(template.getDeptId()); |
|
|
|
|
|
|
|
|
|
|
|
sj.setMc(studyFormFillResource.getMc()); |
|
|
|
|
|
sj.setBh(studyFormFillResource.getBh()); |
|
|
|
|
|
sj.setNd(String.valueOf(studyFormFillResource.getNd())); |
|
|
|
|
|
sj.setNddw(studyFormFillResource.getNddw()); |
|
|
|
|
|
sj.setKc(studyFormFillResource.getKc()); |
|
|
|
|
|
sj.setKcdw(studyFormFillResource.getKcdw()); |
|
|
|
|
|
sj.setLy(studyFormFillResource.getLy()); |
|
|
|
|
|
sj.setSxr(DateUtils.parseDate(studyFormFillResource.getSxrq())); |
|
|
|
|
|
sj.setPzrq(studyFormFill.getStartDate()); |
|
|
|
|
|
sj.setYxzq(studyFormFillResource.getYxzq()); |
|
|
|
|
|
sj.setYxzqdw(studyFormFillResource.getYxzqdw()); |
|
|
|
|
|
|
|
|
|
|
|
if (sj.getId() == null) { |
|
|
|
|
|
this.save(sj); |
|
|
|
|
|
// 稽查轨迹 |
|
|
|
|
|
SjJcgj sjJcgj = sjJcgjService.genJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "配制完成", "Formulation Completed", |
|
|
|
|
|
JcmcysEnum.green.getValue(), null, null, qmr); |
|
|
|
|
|
jcgjList.add(sjJcgj); |
|
|
|
|
|
|
|
|
|
|
|
// 台账 |
|
|
|
|
|
SjTz sjTz = sjTzService.genTz(sj.getId(), "配制完成", "Formulation Completed", sj.getKc(), sj.getKcdw(), null, qmr); |
|
|
|
|
|
tzList.add(sjTz); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.updateById(sj); |
|
|
|
|
|
} |
|
|
|
|
|
sjMap.put(sj.getBh(), sj); |
|
|
|
|
|
sjList.add(sj); |
|
|
|
|
|
studyFormFillResource.setType(StudyFormFillResourceTypeEnum.sj.getValue()); |
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
//使用的才更新 Resource |
|
|
//使用的才更新 Resource |
|
|
studyFormFillResource.setMc(sj.getMc()); |
|
|
studyFormFillResource.setMc(sj.getMc()); |
|
|
@ -732,8 +735,7 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi |
|
|
//更新 Resource |
|
|
//更新 Resource |
|
|
studyFormFill.setResource(JSONObject.toJSONString(studyFormFillResourceList)); |
|
|
studyFormFill.setResource(JSONObject.toJSONString(studyFormFillResourceList)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (sjMap.size() > 0) { |
|
|
|
|
|
|
|
|
if(sjMap.size() > 0&&studyFormFill.getSftb().equals(NormalEnum.no.getValue())) { |
|
|
// 存储 |
|
|
// 存储 |
|
|
cc(studyFormFill, sjMap, jcgjList, tzList, qmr); |
|
|
cc(studyFormFill, sjMap, jcgjList, tzList, qmr); |
|
|
// 处置,库存全变为0 |
|
|
// 处置,库存全变为0 |
|
|
|