wuyunfeng hai 1 ano
pai
achega
e1ada80da0

+ 1 - 1
ncs-ms-feign/src/main/java/com/wdklian/ncs/ms/feignclient/system/ShopFeignClient.java

@@ -36,6 +36,6 @@ public interface ShopFeignClient {
     @GetMapping("/{part_id}")
     CommonResult<ShopDO> getPartById(@NotNull(message = "科室主键不能为空") @PathVariable("part_id") Integer partId);
 
-    @GetMapping("list-type/{part_type}")
+    @GetMapping("/list-type/{part_type}")
     CommonResult<List<ShopDO>> listShopByType(@NotNull(message = "科室类型不能为空") @PathVariable("part_type") Integer partType);
 }

+ 1 - 1
ncs-system-service/src/main/java/com/wdklian/ncs/ms/system/controller/ShopController.java

@@ -63,7 +63,7 @@ public class ShopController {
     }
 
 
-    @GetMapping("list-type/{part_type}")
+    @GetMapping("/list-type/{part_type}")
     @ApiOperation(value = "根据机构类型获取机构列表", response = ShopDO.class, responseContainer = "list")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "part_type", value = "科室类型", required = true, dataType = "int", paramType = "path")

+ 1 - 1
ncs-system-service/src/main/java/com/wdklian/ncs/ms/system/service/impl/NurseConfigOptionServiceImpl.java

@@ -59,7 +59,7 @@ public class NurseConfigOptionServiceImpl extends SystemCRUDManagerImpl<NurseCon
     @Override
     public int clearCustomerNurseByPartId(Integer partId) {
 
-        String sql = "DELETE map FROM ncs_customer_mapping map LEFT JOIN ncs_nurse_config_option op ON map.nurse_config_option_id=op.id LEFT JOIN ncs_nurse_config cf ON op.ncfg_id=cf.id left join ncs_customer customer on map.customer_id=customer.id WHERE (cf.bool_manual=0 or cf.id is null) AND map.part_id=? and customer.status=0";
+        String sql = "DELETE map FROM ncs_customer_mapping map LEFT JOIN ncs_nurse_config_option op ON map.nurse_config_option_id=op.id LEFT JOIN ncs_nurse_config cf ON op.ncfg_id=cf.id left join ncs_customer customer on map.customer_id=customer.id WHERE (cf.bool_manual=0 or cf.id is null) AND map.part_id=? and map.nurse_config_option_id is not null and customer.status=0";
         return this.daoSupport.execute(sql, partId);
     }
 

+ 1 - 1
ncs-system-service/src/main/java/com/wdklian/ncs/ms/system/service/impl/NurseConfigServiceImpl.java

@@ -177,7 +177,7 @@ public class NurseConfigServiceImpl extends SystemCRUDManagerImpl<NurseConfigDO>
             List<CustomerDO> partInHospitalCustomers = customerDOS.stream().filter(p -> p.getPartId().equals(part.getShopId())).collect(Collectors.toList());
             List<NurseConfigDO> partNurseConfig = rangePartNurseConfig.stream().filter(p -> p.getPartId().equals(part.getShopId())).collect(Collectors.toList());
             //可能有新的自动生成的项目,取出科室所有的护理标识项目
-            List<NurseConfigOptionDO> partNurseOptions = nurseConfigOptionService.listNurseConfigOptionByPartIds(Arrays.asList(part.getShopId())); //rangePartNurseOptions.stream().filter(p -> p.getPartId().equals(part.getShopId())).collect(Collectors.toList());
+            List<NurseConfigOptionDO> partNurseOptions = nurseConfigOptionService.listNurseConfigOptionByPartIds(Collections.singletonList(part.getShopId())); //rangePartNurseOptions.stream().filter(p -> p.getPartId().equals(part.getShopId())).collect(Collectors.toList());
 //            Future<List<CustomerDO>> task = threadPoolTaskExecutor.submit(() -> {
 //
 //                        return nurseConfigOptionService.handleNurseAdviceForPart(part.getShopId(), partAdviceMap,doctorAdviceCategoryVOS,partInHospitalCustomers, partNurseConfig, partNurseOptions, partNurseOptionConfig);

+ 2 - 1
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/controller/CCEYSyncController.java

@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.xml.bind.JAXBException;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -55,7 +56,7 @@ public class CCEYSyncController {
             @ApiImplicitParam(name = "dqks", value = "科室代码", required = true, dataType = "string", paramType = "form"),
     })
     public List<PatientDO> getPatientsByDqks(@RequestParam("dqks") String dqks) throws JAXBException {
-        List<PatientDO> patientDOS = this.cceyCustomerInfoService.CCEYCustomerInfo(dqks);
+        List<PatientDO> patientDOS = this.cceyCustomerInfoService.CCEYCustomerInfo(dqks,new ArrayList<>());
 //        this.entracePatientFeignClient.syncPatient(patientDOS);
         return patientDOS;
     }

+ 7 - 4
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/service/CCEYCustomerInfoService.java

@@ -18,6 +18,8 @@ import javax.xml.bind.JAXBException;
 import java.time.LocalDate;
 import java.time.Period;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -41,7 +43,7 @@ public class CCEYCustomerInfoService {
 
     private final List<EmployeeDO> employees = new ArrayList<>();
 
-    public List<PatientDO> CCEYCustomerInfo(String dqks) throws JAXBException {
+    public List<PatientDO> CCEYCustomerInfo(String dqks,List<DoctorAdviceDO> patientAdvices) throws JAXBException {
         List<PatientDO> patients = new ArrayList<>();
 
         String partKey = dqks.split("_")[0];
@@ -141,14 +143,15 @@ public class CCEYCustomerInfoService {
 
                     if (item.getJcglbz() != null && !"".equals(item.getJcglbz())) {
                         DoctorAdviceDO doctorAdviceDO = new DoctorAdviceDO();
-                        doctorAdviceDO.setAdviceContent(item.getJcglbz());
+                        doctorAdviceDO.setAdviceContent("接触隔离");
                         doctorAdviceDO.setHisKey(item.getPatientId() + "_JCGLBZ");
                         doctorAdviceDO.setPatientKey(item.getPatientId());
-                        doctorAdviceDO.setState("1");
+                        doctorAdviceDO.setState(item.getJcglbz());
                         doctorAdviceDO.setAdviceTime(item.getInTime());
                         doctorAdviceDO.setPatientName(item.getPatientName());
                         doctorAdviceDO.setHisPartKey(item.getDeptId() + "_" + item.getNurseUnitCode());
-                        this.entraceDoctorAdviceFeignClient.syncSingleDoctorAdvice(doctorAdviceDO);
+                        patientAdvices.add(doctorAdviceDO);
+//                        this.entraceDoctorAdviceFeignClient.syncDoctorAdvice(Collections.singletonList(doctorAdviceDO));
                     }
 //                    log.info(patientDO.toString());
 //                    syncPs.add(patientDO);

+ 7 - 3
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/service/CCEYMainDataQueryService.java

@@ -103,13 +103,13 @@ public class CCEYMainDataQueryService {
         List<DoctorAdviceDO> advices = new ArrayList<>();
         List<PatientDO> patientsByShop = new ArrayList<>();
         List<DoctorAdviceDO> advicesByPatient = new ArrayList<>();
-
+        List<DoctorAdviceDO> adviceGL = new ArrayList<>();
 
         ObjectMapper mapper = new ObjectMapper();
         String jsonStr = "";
         for (ShopDO shopDO : shops) {
             log.info("目前同步科室的键值 ===================> " + shopDO.getHisCode());
-            patientsByShop = this.cceyCustomerInfoService.CCEYCustomerInfo(shopDO.getHisCode());
+            patientsByShop = this.cceyCustomerInfoService.CCEYCustomerInfo(shopDO.getHisCode(),adviceGL);
             if (!patientsByShop.isEmpty()) {
                 patients.addAll(patientsByShop);
             }
@@ -120,7 +120,7 @@ public class CCEYMainDataQueryService {
         if (!attachHisCode.isEmpty()) {
             for (String hisCode : attachHisCode) {
                 log.info("目前同步科室的键值 ===================> " + hisCode);
-                patientsByShop = this.cceyCustomerInfoService.CCEYCustomerInfo(hisCode);
+                patientsByShop = this.cceyCustomerInfoService.CCEYCustomerInfo(hisCode,adviceGL);
                 if (!patientsByShop.isEmpty()) {
                     patients.addAll(patientsByShop);
                 }
@@ -178,6 +178,10 @@ public class CCEYMainDataQueryService {
 //            log.info("同步患者医嘱 =====> " + patientDO.getName());
         }
 //        log.info("同步医嘱数据");
+
+        if(!adviceGL.isEmpty()){
+            advices.addAll(adviceGL);
+        }
         if (!advices.isEmpty()) {
             Map<String, List<DoctorAdviceDO>> adviceMap = advices.stream().collect(Collectors.groupingBy(DoctorAdviceDO::getHisPartKey));
             try {