|
@@ -185,32 +185,81 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
|
qcresultInfo.setModifier(useId.toString());
|
|
|
this.save(qcresultInfo);
|
|
|
//更新质控评分明细信息
|
|
|
- //逻辑删除记录
|
|
|
- qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
- .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .set("is_deleted", IsDeleteEnum.Y.getKey())
|
|
|
- .set("modifier", useId)
|
|
|
- .set("gmt_modified", now));
|
|
|
- //批量插入新的数据
|
|
|
- List<QcresultDetail> qcresultDetailList = new ArrayList<>();
|
|
|
- List<QcResultAlgVO> qcResultAlgVORes = algorithmVO.getQcResultAlgVOList();
|
|
|
- if (ListUtil.isNotEmpty(qcResultAlgVORes)) {
|
|
|
- for (QcResultAlgVO qcResultAlgVO : qcResultAlgVORes) {
|
|
|
- QcresultDetail qcresultDetail = new QcresultDetail();
|
|
|
- BeanUtil.copyProperties(qcResultAlgVO, qcresultDetail);
|
|
|
- qcresultDetail.setHospitalId(analyzeVO.getHospitalId());
|
|
|
- qcresultDetail.setBehospitalCode(analyzeVO.getBehospitalCode());
|
|
|
- qcresultDetail.setGmtCreate(now);
|
|
|
- qcresultDetail.setCreator(useId.toString());
|
|
|
- qcresultDetail.setGmtModified(now);
|
|
|
- qcresultDetail.setModifier(useId.toString());
|
|
|
- qcresultDetail.setInfo(StringUtil.isNotBlank(qcResultAlgVO.getInfo()) ? qcResultAlgVO.getInfo() : "");
|
|
|
- qcresultDetailList.add(qcresultDetail);
|
|
|
- }
|
|
|
- qcresultDetailServiceImpl.saveBatch(qcresultDetailList);
|
|
|
+ switch (algorithmVO.getType()) {
|
|
|
+ //自动评分
|
|
|
+ case 0:
|
|
|
+ //删除记录
|
|
|
+ qcresultDetailServiceImpl.remove(new QueryWrapper<QcresultDetail>()
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode()));
|
|
|
+ //批量插入新的数据
|
|
|
+ List<QcresultDetail> qcresultDetailList = new ArrayList<>();
|
|
|
+ List<QcResultAlgVO> qcResultAlgVORes = algorithmVO.getQcResultAlgVOList();
|
|
|
+ if (ListUtil.isNotEmpty(qcResultAlgVORes)) {
|
|
|
+ for (QcResultAlgVO qcResultAlgVO : qcResultAlgVORes) {
|
|
|
+ QcresultDetail qcresultDetail = new QcresultDetail();
|
|
|
+ BeanUtil.copyProperties(qcResultAlgVO, qcresultDetail);
|
|
|
+ qcresultDetail.setHospitalId(analyzeVO.getHospitalId());
|
|
|
+ qcresultDetail.setBehospitalCode(analyzeVO.getBehospitalCode());
|
|
|
+ qcresultDetail.setGradeType(1);
|
|
|
+ qcresultDetail.setOptType(1);
|
|
|
+ qcresultDetail.setGmtCreate(now);
|
|
|
+ qcresultDetail.setCreator(useId.toString());
|
|
|
+ qcresultDetail.setGmtModified(now);
|
|
|
+ qcresultDetail.setModifier(useId.toString());
|
|
|
+ qcresultDetail.setInfo(StringUtil.isNotBlank(qcResultAlgVO.getInfo()) ? qcResultAlgVO.getInfo() : "");
|
|
|
+ qcresultDetailList.add(qcresultDetail);
|
|
|
+ }
|
|
|
+ qcresultDetailServiceImpl.saveBatch(qcresultDetailList);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ //新增条目
|
|
|
+ QcresultDetail qcresultDetailAdd = new QcresultDetail();
|
|
|
+ BeanUtil.copyProperties(algorithmVO.getOptResultAlgVO(), qcresultDetailAdd);
|
|
|
+ qcresultDetailAdd.setGradeType(2);
|
|
|
+ qcresultDetailAdd.setOptType(1);
|
|
|
+ qcresultDetailAdd.setHospitalId(analyzeVO.getHospitalId());
|
|
|
+ qcresultDetailAdd.setBehospitalCode(analyzeVO.getBehospitalCode());
|
|
|
+ qcresultDetailAdd.setGmtCreate(now);
|
|
|
+ qcresultDetailAdd.setCreator(useId.toString());
|
|
|
+ qcresultDetailAdd.setGmtModified(now);
|
|
|
+ qcresultDetailAdd.setModifier(useId.toString());
|
|
|
+ qcresultDetailServiceImpl.save(qcresultDetailAdd);
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ //删除条目
|
|
|
+ qcresultDetailServiceImpl.remove(new QueryWrapper<QcresultDetail>()
|
|
|
+ .eq("id", algorithmVO.getOptResultAlgVO().getId())
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ );
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ //修改条目
|
|
|
+ qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
|
+ .eq("id", algorithmVO.getOptResultAlgVO().getId())
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .set("msg", algorithmVO.getOptResultAlgVO().getMsg())
|
|
|
+ .set("score", algorithmVO.getOptResultAlgVO().getScore())
|
|
|
+ .set("opt_type", 3)
|
|
|
+ .set("modifier", useId)
|
|
|
+ .set("gmt_modified", now)
|
|
|
+ );
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ /* DO NOTHING */
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ //自动评分
|
|
|
+ if (algorithmVO.getType().equals(0)) {
|
|
|
+
|
|
|
+ } else if (algorithmVO.getType().equals(1)) {
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
//长兴的数据
|
|
|
if (algorithmVO.getHospitalId().equals(1L)) {
|
|
|
//质控模块评分数据
|