浏览代码

Merge remote-tracking branch 'origin/dev/mix20200403_tiaoyou' into dev/mix20200403_tiaoyou

gaodm 5 年之前
父节点
当前提交
8545e51fc6

+ 2 - 2
aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -86,8 +86,8 @@ public interface TranServiceClient {
      * @param hosCodeVO
      * @return
      */
-    @PostMapping("/pacsConfig/getPacsConfigByHosCode")
-    RespDTO<Map<String, String>> getPacsConfigByHosCode(@RequestBody HosCodeVO hosCodeVO);
+    @PostMapping("/pacsConfig/getPacsConfigByMealNameAndHosCode")
+    RespDTO<Map<String, List<String>>> getPacsConfigByMealNameAndHosCode(@RequestBody HosCodeVO hosCodeVO);
 
     /**
      * 获取辅检映射关系

+ 2 - 2
aipt-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -79,8 +79,8 @@ public class TranServiceHystrix implements TranServiceClient {
      * @return
      */
     @Override
-    public RespDTO<Map<String, String>> getPacsConfigByHosCode(@RequestBody HosCodeVO hosCodeVO) {
-        log.error("【hystrix】调用{}异常", "getPacsConfigByHosCode");
+    public RespDTO<Map<String, List<String>>> getPacsConfigByMealNameAndHosCode(@RequestBody HosCodeVO hosCodeVO) {
+        log.error("【hystrix】调用{}异常", "getPacsConfigByMealNameAndHosCode");
         return null;
     }
 

+ 13 - 10
aipt-service/src/main/java/com/diagbot/facade/TranEnDeFacade.java

@@ -75,11 +75,11 @@ public class TranEnDeFacade {
      * @param hosCodeVO
      * @return
      */
-    public Map<String, String> getPacsConfigByHosCode(@RequestBody HosCodeVO hosCodeVO) {
-        RespDTO<Map<String, String>> respDTO = tranServiceClient.getPacsConfigByHosCode(hosCodeVO);
-        Map<String, String> retMap = new LinkedHashMap<>();
+    public Map<String, List<String>> getPacsConfigByMealNameAndHosCode(@RequestBody HosCodeVO hosCodeVO) {
+        RespDTO<Map<String, List<String>>> respDTO = tranServiceClient.getPacsConfigByMealNameAndHosCode(hosCodeVO);
+        Map<String, List<String>> retMap = new LinkedHashMap<>();
         if (RespDTOUtil.respIsOK(respDTO)) {
-            Map<String, String> map = respDTO.data;
+            Map<String, List<String>> map = respDTO.data;
             retMap = map;
         }
         return retMap;
@@ -91,13 +91,16 @@ public class TranEnDeFacade {
      * @param hosCodeVO
      * @return
      */
-    public Map<String, String> getPacsConfigByHosCode_en(@RequestBody HosCodeVO hosCodeVO) {
-        RespDTO<Map<String, String>> respDTO = tranServiceClient.getPacsConfigByHosCode(hosCodeVO);
-        Map<String, String> retMap = new LinkedHashMap<>();
+    public Map<String, List<String>> getPacsConfigByMealNameAndHosCode_en(@RequestBody HosCodeVO hosCodeVO) {
+        RespDTO<Map<String, List<String>>> respDTO = tranServiceClient.getPacsConfigByMealNameAndHosCode(hosCodeVO);
+        Map<String, List<String>> retMap = new LinkedHashMap<>();
         if (RespDTOUtil.respIsOK(respDTO)) {
-            Map<String, String> map = respDTO.data;
-            for (Map.Entry<String, String> entry : map.entrySet()) {
-                retMap.put(CryptUtil.encrypt_char(entry.getKey()), CryptUtil.encrypt_char(entry.getValue()));
+            Map<String, List<String>> map = respDTO.data;
+            for (Map.Entry<String, List<String>> entry : map.entrySet()) {
+                if (ListUtil.isNotEmpty(entry.getValue())) {
+                    CryptUtil.encryptList(entry.getValue());
+                }
+                retMap.put(CryptUtil.encrypt_char(entry.getKey()), entry.getValue());
             }
         }
         return retMap;

+ 0 - 18
icss-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -169,15 +169,6 @@ public interface TranServiceClient {
     @PostMapping("/inquiryInfo/getExportInquirys")
     RespDTO<List<GetExportInquirysDTO>> getExportInquirys(@RequestBody List<Long> inquiryIds);
 
-    /**
-     * 根据医院编码获取辅检公表映射关系
-     *
-     * @param hosCodeVO
-     * @return
-     */
-    @PostMapping("/pacsConfig/getPacsConfigByHosCode")
-    RespDTO<Map<String, String>> getPacsConfigByHosCode(@RequestBody HosCodeVO hosCodeVO);
-
     /**
      * 根据医院编码获取提示信息标题映射关系
      *
@@ -196,15 +187,6 @@ public interface TranServiceClient {
     @PostMapping("/diseaseIcd/getDiseaseIcdByHosCode")
     RespDTO<Map<String, String>> getDiseaseIcdByHosCode(@RequestBody HosCodeVO hosCodeVO);
 
-    /**
-     * 根据医院编码查询辅检公表映射,公表项做key
-     *
-     * @param hosCodeVO
-     * @return
-     */
-    @PostMapping("/pacsConfig/getPacsConfigByUniqueNameAndHosCode")
-    RespDTO<Map<String, List<String>>> getPacsConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO);
-
     @PostMapping("/lisDockingImports/lisDockingImports")
     public RespDTO<LisRetrieveListAllDTO> getLisDatas(@RequestBody @Valid LisArgumentsVO lisArgumentsVO);
 

+ 0 - 24
icss-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -136,18 +136,6 @@ public class TranServiceHystrix implements TranServiceClient {
         return null;
     }
 
-    /**
-     * 根据医院编码获取辅检公表映射关系
-     *
-     * @param hosCodeVO
-     * @return
-     */
-    @Override
-    public RespDTO<Map<String, String>> getPacsConfigByHosCode(@RequestBody HosCodeVO hosCodeVO) {
-        log.error("【hystrix】调用{}异常", "getPacsConfigByHosCode");
-        return null;
-    }
-
     /**
      * 根据医院编码获取提示信息标题映射关系
      *
@@ -172,18 +160,6 @@ public class TranServiceHystrix implements TranServiceClient {
         return null;
     }
 
-    /**
-     * 根据医院编码查询辅检公表映射,公表项做key
-     *
-     * @param hosCodeVO
-     * @return
-     */
-    @Override
-    public RespDTO<Map<String, List<String>>> getPacsConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO) {
-        log.error("【hystrix】调用{}异常", "getPacsConfigByUniqueNameAndHosCode");
-        return null;
-    }
-
     @Override
     public RespDTO<LisRetrieveListAllDTO> getLisDatas(@RequestBody @Valid LisArgumentsVO lisArgumentsVO) {
         log.error("【hystrix】调用{}异常", "getLisDatas");

+ 23 - 11
tran-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java

@@ -24,18 +24,22 @@ import java.util.stream.Collectors;
 public class PacsConfigFacade extends PacsConfigServiceImpl{
 
     /**
-     * 根据医院编码获取辅检公表映射关系 Map<mealName,uniqueName>
+     * 根据医院编码获取辅检公表映射关系 Map<mealName,List<uniqueName>>
      *
      * @return
      */
-    public Map<String, String> getPacsConfigByHosCode(String hosCode) {
+    public Map<String, List<String>> getPacsConfigByMealNameAndHosCode(String hosCode) {
+        Map<String, List<String>> retMap = new LinkedHashMap<>();
         QueryWrapper<PacsConfig> pacsConfigQueryWrapper = new QueryWrapper<>();
         pacsConfigQueryWrapper
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("hospital_code", hosCode);
         List<PacsConfig> pacsConfigList = this.list(pacsConfigQueryWrapper);
-        Map<String, String> retMap
-                = EntityUtil.makeMapWithKeyValue(pacsConfigList, "mealName", "uniqueName");
+        Map<String, List<PacsConfig>> pacsConfigMap
+                = EntityUtil.makeEntityListMap(pacsConfigList, "mealName");
+        for (Map.Entry<String, List<PacsConfig>> entry : pacsConfigMap.entrySet()) {
+            retMap.put(entry.getKey(), EntityUtil.makeListByFieldName(entry.getValue(), "uniqueName"));
+        }
         return retMap;
     }
 
@@ -55,18 +59,26 @@ public class PacsConfigFacade extends PacsConfigServiceImpl{
             pacsConfigQueryWrapper.in("meal_name", pacsConfigVO.getMealNameList());
             List<PacsConfig> pacsConfigList = this.list(pacsConfigQueryWrapper);
             pacsMap = EntityUtil.makeEntityListMap(pacsConfigList, "mealName");
+            for (Map.Entry<String, List<PacsConfig>> entry : pacsMap.entrySet()) {
+                map.put(entry.getKey(), entry.getValue()
+                        .stream()
+                        .map(pacsConfig -> pacsConfig.getUniqueName())
+                        .distinct()
+                        .collect(Collectors.toList()));
+            }
         } else if (ListUtil.isNotEmpty(pacsConfigVO.getUniqueNameList())) {
             pacsConfigQueryWrapper.in("unique_name", pacsConfigVO.getUniqueNameList());
             List<PacsConfig> pacsConfigList = this.list(pacsConfigQueryWrapper);
             pacsMap = EntityUtil.makeEntityListMap(pacsConfigList, "uniqueName");
+            for (Map.Entry<String, List<PacsConfig>> entry : pacsMap.entrySet()) {
+                map.put(entry.getKey(), entry.getValue()
+                        .stream()
+                        .map(pacsConfig -> pacsConfig.getMealName())
+                        .distinct()
+                        .collect(Collectors.toList()));
+            }
         }
-        for (Map.Entry<String, List<PacsConfig>> entry : pacsMap.entrySet()) {
-            map.put(entry.getKey(), entry.getValue()
-                    .stream()
-                    .map(pacsConfig -> pacsConfig.getUniqueName())
-                    .distinct()
-                    .collect(Collectors.toList()));
-        }
+
         return map;
     }
 

+ 12 - 4
tran-service/src/main/java/com/diagbot/facade/TranLisConfigFacade.java

@@ -56,9 +56,13 @@ public class TranLisConfigFacade extends TranLisConfigServiceImpl{
 				.select("hospital_code,meal_name,ifnull(item_name,'') as item_name,unique_name,unique_id")
 				.eq("is_deleted", IsDeleteEnum.N.getKey())
 				.eq("hospital_code", lisConfigVO.getHosCode());
-		if (ListUtil.isNotEmpty(lisConfigVO.getMealNameList())) {
+		/*if (ListUtil.isNotEmpty(lisConfigVO.getMealNameList())) {
 			lisConfigQueryWrapper.in("meal_name", lisConfigVO.getMealNameList());
-		}
+		}*/
+		lisConfigQueryWrapper.in(ListUtil.isNotEmpty(lisConfigVO.getMealNameList()),
+				"meal_name", lisConfigVO.getMealNameList());
+		lisConfigQueryWrapper.in(ListUtil.isNotEmpty(lisConfigVO.getUniqueNameList()),
+				"unique_name", lisConfigVO.getUniqueNameList());
 		List<TranLisConfig> lisConfigList = this.list(lisConfigQueryWrapper);
 		Map<String, List<TranLisConfig>> lisConfigMap
 				= EntityUtil.makeEntityListMap(lisConfigList, "mealName");
@@ -96,9 +100,13 @@ public class TranLisConfigFacade extends TranLisConfigServiceImpl{
 		tranLisConfigQueryWrapper
 				.eq("is_deleted", IsDeleteEnum.N.getKey())
 				.eq("hospital_code", lisConfigVO.getHosCode());
-		if (ListUtil.isNotEmpty(lisConfigVO.getUniqueNameList())) {
+		/*if (ListUtil.isNotEmpty(lisConfigVO.getUniqueNameList())) {
 			tranLisConfigQueryWrapper.in("unique_name", lisConfigVO.getUniqueNameList());
-		}
+		}*/
+		tranLisConfigQueryWrapper.in(ListUtil.isNotEmpty(lisConfigVO.getMealNameList()),
+				"meal_name", lisConfigVO.getMealNameList());
+		tranLisConfigQueryWrapper.in(ListUtil.isNotEmpty(lisConfigVO.getUniqueNameList()),
+				"unique_name", lisConfigVO.getUniqueNameList());
 		List<TranLisConfig> tranLisConfigList = this.list(tranLisConfigQueryWrapper);
 		Map<String, List<TranLisConfig>> lisConfigMap
 				= EntityUtil.makeEntityListMap(tranLisConfigList, "uniqueName");

+ 6 - 6
tran-service/src/main/java/com/diagbot/web/PacsConfigController.java

@@ -30,15 +30,15 @@ public class PacsConfigController {
     @Autowired
     PacsConfigFacade pacsConfigFacade;
 
-    @ApiOperation(value = "根据医院编码查询辅检公表映射:[by:zhaops]",
+    @ApiOperation(value = "根据医院编码查询辅检公表映射,Map<外部名称,List<内部名称>>:[by:zhaops]",
             notes = "hosCode: 医院编码,必填<br>")
-    @PostMapping("/getPacsConfigByHosCode")
-    @SysLogger("getPacsConfigByHosCode")
-    public RespDTO<Map<String, String>> getPacsConfigByHosCode(@RequestBody HosCodeVO hosCodeVO) {
-        return RespDTO.onSuc(pacsConfigFacade.getPacsConfigByHosCode(hosCodeVO.getHosCode()));
+    @PostMapping("/getPacsConfigByMealNameAndHosCode")
+    @SysLogger("getPacsConfigByMealNameAndHosCode")
+    public RespDTO<Map<String, List<String>>> getPacsConfigByMealNameAndHosCode(@RequestBody HosCodeVO hosCodeVO) {
+        return RespDTO.onSuc(pacsConfigFacade.getPacsConfigByMealNameAndHosCode(hosCodeVO.getHosCode()));
     }
 
-    @ApiOperation(value = "根据医院编码查询辅检公表映射,公表项做key :[by:zhaops]",
+    @ApiOperation(value = "根据医院编码查询辅检公表映射,公表项做key ,Map<内部名称,List<外部名称>>:[by:zhaops]",
             notes = "hosCode: 医院编码,必填<br>")
     @PostMapping("/getPacsConfigByUniqueNameAndHosCode")
     @SysLogger("getPacsConfigByUniqueNameAndHosCode")

+ 2 - 2
tran-service/src/main/java/com/diagbot/web/TranLisConfigController.java

@@ -39,7 +39,7 @@ public class TranLisConfigController {
 		return RespDTO.onSuc(tranLisConfigFacade.getLisConfigByhospitalIds(lisHospitalCodeVO));
 	}
 
-	@ApiOperation(value = "根据医院编码和套餐名称获取化验公表映射关系:[by:zhaops]",
+	@ApiOperation(value = "根据医院编码和套餐名称获取化验公表映射关系Map,<大项,Map<小项,List<公表>>>:[by:zhaops]",
 			notes = "hosCode: 医院编码,必填<br>")
 	@PostMapping("/getLisConfigByMealNameAndHosCode")
 	@SysLogger("getLisConfigByMealNameAndHosCode")
@@ -47,7 +47,7 @@ public class TranLisConfigController {
 		return RespDTO.onSuc(tranLisConfigFacade.getLisConfigByMealNameAndHosCode(lisConfigVO));
 	}
 
-	@ApiOperation(value = "根据医院编码获取化验公表映射关系,公表项做key :[by:zhaops]",
+	@ApiOperation(value = "根据医院编码获取化验公表映射关系,公表项做key,Map<公表,List<大项>> :[by:zhaops]",
 			notes = "hosCode: 医院编码,必填<br>")
 	@PostMapping("/getLisConfigByUniqueNameAndHosCode")
 	@SysLogger("getLisConfigByUniqueNameAndHosCode")