Sfoglia il codice sorgente

修复个微采集表提交信息逻辑

cgp 3 giorni fa
parent
commit
89f051bf3b

+ 7 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsPrescribeServiceImpl.java

@@ -1405,6 +1405,13 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
     @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
     public void confirmPrescribe(FsPrescribeParam param) {
         FsPrescribe fsPrescribe = fsPrescribeMapper.selectFsPrescribeByPrescribeId(param.getPrescribeId());
+        if (fsPrescribe != null&&fsPrescribe.getCollectionId()!=null) {
+            FsUserInformationCollection collection = collectionMapper.selectFsUserInformationCollectionById(fsPrescribe.getCollectionId());
+            if (collection.getQwTag()==1){
+                log.error("开方流程异常,此接口不支持个微信息采集处方开方");
+                throw new CustomException("开方流程异常,不支持个微信息采集处方开方");
+            }
+        }
         fsPrescribe.setDoctorConfirm(1);
         //医生操作结束时间(第一次确认处方)
         if (fsPrescribe.getEndOperateTime() == null) {

+ 9 - 2
fs-service/src/main/java/com/fs/hisStore/service/impl/FsUserInformationCollectionServiceImpl.java

@@ -471,7 +471,9 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
             fsPrescribe.setPatientBirthday(birthday);
             fsPrescribe.setPatientAge(String.valueOf(calculateAge(birthday)));
         }
-        fsPrescribe.setWeight(String.valueOf(param.getPatientInfo().getWeight()));
+        if (param.getPatientInfo().getWeight()!=null){
+            fsPrescribe.setWeight(String.valueOf(param.getPatientInfo().getWeight()));
+        }
         fsPrescribe.setPatientId(param.getPatientInfo().getPatientId());
         fsPrescribe.setPatientName(param.getPatientInfo().getPatientName());
         fsPrescribe.setPatientTel(param.getPatientInfo().getMobile());
@@ -1593,7 +1595,12 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
             throw new CustomException("用户采集信息不存在");
         }
         //校验填写用户与信息采集信息用户是否一致
-        if (!param.getUserId().equals(informationCollection.getUserId())) {
+        FsUser fsUser = userService.selectFsUserByUserId(param.getUserId());
+        if (fsUser == null) {
+            log.error("用户信息不存在");
+            throw new CustomException("请登录");
+        }
+        if (!informationCollection.getUserId().equals(param.getUserId())) {
             log.error("信息采集用户信息不一致,当前用户userId:{},信息采集表实际userId:{}", param.getUserId(), informationCollection.getUserId());
             throw new CustomException("用户信息不一致,请检查");
         }

+ 1 - 0
fs-service/src/main/resources/mapper/his/FsPrescribeMapper.xml

@@ -318,6 +318,7 @@
         fse.store_name,
         main_infoc.id as collectionId,
         main_infoc.complete_status as completeStatus,
+        main_infoc.personal_collect_status as personalCollectStatus,
         main_infoc.qw_tag as qwTag,
         CASE
         WHEN uics.order_code IS NOT NULL THEN 1         <!--  处方来源"信息采集进度表"-->