|
@@ -5,11 +5,15 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.diagbot.dto.AlgorithmDTO;
|
|
|
import com.diagbot.dto.AnalyzeDTO;
|
|
|
import com.diagbot.dto.QcResultDTO;
|
|
|
+import com.diagbot.dto.SentEntryRecordDTO;
|
|
|
import com.diagbot.entity.BehospitalInfo;
|
|
|
import com.diagbot.entity.MedCheckInfo;
|
|
|
import com.diagbot.entity.MedQcresultCases;
|
|
|
+import com.diagbot.entity.QcCasesEntry;
|
|
|
+import com.diagbot.entity.QcMode;
|
|
|
import com.diagbot.entity.QcresultDetail;
|
|
|
import com.diagbot.entity.QcresultInfo;
|
|
|
+import com.diagbot.entity.SysUser;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -32,6 +36,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -54,6 +59,14 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
|
@Autowired
|
|
|
@Qualifier("medQcresultCasesServiceImpl")
|
|
|
private MedQcresultCasesServiceImpl medQcresultCasesService;
|
|
|
+ @Autowired
|
|
|
+ private QcClientFacade qcClientFacade;
|
|
|
+ @Autowired
|
|
|
+ private QcCasesEntryFacade qcCasesEntryFacade;
|
|
|
+ @Autowired
|
|
|
+ private QcModeFacade qcModeFacade;
|
|
|
+ @Autowired
|
|
|
+ private SysUserFacade sysUserFacade;
|
|
|
|
|
|
/**
|
|
|
* 修改评分结果信息
|
|
@@ -234,6 +247,45 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
|
qcresultDetailAdd.setGmtModified(now);
|
|
|
qcresultDetailAdd.setModifier(useId.toString());
|
|
|
qcresultDetailServiceImpl.save(qcresultDetailAdd);
|
|
|
+ //发送质控人员新增人工缺陷到his系统
|
|
|
+ SentEntryRecordDTO sentEntryRecordDTO = new SentEntryRecordDTO();
|
|
|
+ BeanUtil.copyProperties(qcresultDetailAdd, sentEntryRecordDTO);
|
|
|
+ MedCheckInfo medCheckInfo = medCheckInfoFacade.lambdaQuery()
|
|
|
+ .eq(MedCheckInfo::getBehospitalCode, sentEntryRecordDTO.getBehospitalCode())
|
|
|
+ .eq(MedCheckInfo::getHospitalId, qcresultDetailAdd.getHospitalId())
|
|
|
+ // .eq(MedCheckInfo::getStatus, 1)
|
|
|
+ .in(MedCheckInfo::getCheckType, Arrays.asList(0,2))
|
|
|
+ .eq(MedCheckInfo::getIsDeleted, IsDeleteEnum.N.getKey()).one();
|
|
|
+ if(null != medCheckInfo){
|
|
|
+ sentEntryRecordDTO.setCheckName(medCheckInfo.getCheckName());
|
|
|
+ sentEntryRecordDTO.setCheckTime(medCheckInfo.getCheckTime());
|
|
|
+ }
|
|
|
+ SysUser sysUser = sysUserFacade.lambdaQuery()
|
|
|
+ .eq(SysUser::getId, medCheckInfo.getCheckId())
|
|
|
+ .eq(SysUser::getStatus, 1)
|
|
|
+ .eq(SysUser::getIsDeleted, IsDeleteEnum.N.getKey()).one();
|
|
|
+ if(null != sysUser){
|
|
|
+ sentEntryRecordDTO.setCheckId(sysUser.getUsername());
|
|
|
+ }
|
|
|
+ QcCasesEntry qcCasesEntry = qcCasesEntryFacade.lambdaQuery()
|
|
|
+ .eq(QcCasesEntry::getId, qcresultDetailAdd.getCasesEntryId())
|
|
|
+ .eq(QcCasesEntry::getIsDeleted, IsDeleteEnum.N.getKey()).one();
|
|
|
+ if(null != qcCasesEntry){
|
|
|
+ QcMode qcMode = qcModeFacade.lambdaQuery()
|
|
|
+ .eq(QcMode::getId, qcCasesEntry.getModeId())
|
|
|
+ .eq(QcMode::getIsDeleted, IsDeleteEnum.N.getKey()).one();
|
|
|
+ if(null != qcCasesEntry){
|
|
|
+ sentEntryRecordDTO.setModeName(qcMode.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ try {
|
|
|
+ qcClientFacade.sentEntryRecord(sentEntryRecordDTO);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
case 2:
|
|
|
//删除条目
|