Przeglądaj źródła

评分接口优化

songxinlu 3 lat temu
rodzic
commit
45b9ecd3fc

+ 3 - 3
security-center/src/main/java/com/lantone/security/facade/UserPagesetManagementFacade.java

@@ -42,7 +42,7 @@ public class UserPagesetManagementFacade {
         List<UserPageset> sysUserPagesetList = userPagesetService.list(
                 new QueryWrapper<UserPageset>()
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("user_id", SysUserUtils.getCurrentPrinciple())
+                        .eq("user_id", SysUserUtils.getCurrentPrincipleId())
                         .eq("page_type", sysUserPagesetQueryVO.getPageType())
                         .orderByAsc("order_no")
         );
@@ -75,12 +75,12 @@ public class UserPagesetManagementFacade {
         }
         userPagesetService.remove(
                 new QueryWrapper<UserPageset>()
-                        .eq("user_id", SysUserUtils.getCurrentPrinciple())
+                        .eq("user_id", SysUserUtils.getCurrentPrincipleId())
                         .eq("page_type", sysUserPagesetSaveVO.getPageType())
         );
         List<UserPageset> saveList = new ArrayList<>();
         Date now = DateUtil.now();
-        String userId = SysUserUtils.getCurrentPrinciple();
+            String userId = SysUserUtils.getCurrentPrincipleId().toString();
         for (SysUserPagesetVO sysUserPagesetVO : sysUserPagesetSaveVO.getSysUserPagesetVOList()) {
             UserPageset sysUserPageset = new UserPageset();
             BeanUtil.copyProperties(sysUserPagesetVO, sysUserPageset);

+ 5 - 0
security-center/src/main/java/com/lantone/security/facade/analyze/BehospitalInfoManagementFacade.java

@@ -125,6 +125,7 @@ import com.lantone.dblayermbg.service.impl.analyze.MedQcresultCasesServiceImpl;
 import com.lantone.dblayermbg.service.impl.analyze.MedQcresultDetailServiceImpl;
 import com.lantone.dblayermbg.service.impl.analyze.StrInformedConsentServiceImpl;
 import com.lantone.security.enums.CheckStatusEnum;
+import org.apache.commons.collections.MapUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -474,6 +475,9 @@ public class BehospitalInfoManagementFacade {
         }
         // 获取病历所有数据
         Map<String, Map<String, Map<String, String>>> allDicMap = redisService.get(AuthConstant.DIC_MAP_KEY);
+        if (!MapUtils.isNotEmpty(allDicMap)) {
+            Asserts.fail("字典数据为空!");
+        }
         Map<String, Map<String, String>> dicMap = new HashMap<>(); // 获取字典信息
         dicMap.putAll(allDicMap.get("1"));
         dicMap.putAll(allDicMap.get("2"));
@@ -1565,6 +1569,7 @@ public class BehospitalInfoManagementFacade {
         }
         return res;
     }
+
     /**
      * 保存评分结果信息
      *

+ 2 - 2
security-center/src/main/java/com/lantone/security/web/BehospitalInfoManagementController.java

@@ -37,14 +37,14 @@ public class BehospitalInfoManagementController {
 
     @ApiOperation(value = "评分[by:zhoutg]",
             notes = "")
-    @PostMapping("/analyze===")
+    @PostMapping("/analyze")
     @Transactional
     public CommonResult<AnalyzeDTO> analyze(@RequestBody AnalyzeVO analyzeVO) {
         return CommonResult.success(behospitalInfoManagementFacade.analyze(analyzeVO));
     }
 
     @ApiOperation(value = "评分[by:zhoutg]",notes = "")
-    @PostMapping("/analyze")
+    @PostMapping("/analyzeNew")
     @Transactional
     public CommonResult<AnalyzeDTO> analyzeNew(@RequestBody AnalyzeVO analyzeVO) {
         return CommonResult.success(behospitalInfoManagementFacadeNew.analyze(analyzeVO));