lighter_217 1 місяць тому
батько
коміт
15e7a780a9

+ 5 - 0
src/main/java/thyyxxk/simzfeeoprnsystm/controller/SiMzFeeController.java

@@ -123,4 +123,9 @@ public class SiMzFeeController {
     public ResultVo<JSONObject> medicineInquiry(@RequestBody MedicineInquiry inquiry) throws Exception {
         return rxService.medicineInquiry(inquiry);
     }
+
+    @GetMapping("/drInquiry")
+    public ResultVo<JSONObject> drInquiry() throws Exception {
+        return rxService.drInquiry();
+    }
 }

+ 0 - 5
src/main/java/thyyxxk/simzfeeoprnsystm/pojo/SiSetldetail.java

@@ -61,9 +61,4 @@ public class SiSetldetail implements Serializable {
 	 */
 	private String fundPayTypeName;
 
-	/**
-	 * 结算过程信息
-	 */
-	private String setlProcInfo;
-
 }

+ 26 - 1
src/main/java/thyyxxk/simzfeeoprnsystm/service/DigitalReceiptService.java

@@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
+import thyyxxk.simzfeeoprnsystm.config.MedinsurConfig;
 import thyyxxk.simzfeeoprnsystm.dao.RxDao;
 import thyyxxk.simzfeeoprnsystm.dicts.SiFunction;
 import thyyxxk.simzfeeoprnsystm.pojo.CodeName;
@@ -34,19 +35,41 @@ public class DigitalReceiptService {
     private final ExecService exec;
     private final RxDao rxDao;
     private final RestTemplate template;
+    private final MedinsurConfig cfg;
     // 处方流转正式地址
     // private final static String cflzUrl = "http://130.150.161.72:8079/cflz";
     // private final static String ypcxUrl =  "http://130.150.161.72:8079/cflzYpcx";
+    // private final static String drCxUrl = "http://130.150.161.72:8079/drCx";
 
     // 处方流转测试地址
     private final static String cflzUrl = "http://130.150.161.72:8079/testCflz";
     private final static String ypcxUrl =  "http://130.150.161.72:8079/testCflzYpcx";
+    private final static String drcxUrl = "http://130.150.161.72:8079/testDrCx";
 
     @Autowired
-    public DigitalReceiptService(ExecService exec, RxDao rxDao, RestTemplate template) {
+    public DigitalReceiptService(ExecService exec, RxDao rxDao, RestTemplate template, MedinsurConfig cfg) {
         this.exec = exec;
         this.rxDao = rxDao;
         this.template = template;
+        this.cfg = cfg;
+    }
+
+    public ResultVo<JSONObject> drInquiry() throws Exception {
+        JSONObject data = new JSONObject();
+        data.put("fixmedinsCode", cfg.getHospId());
+        data.put("mdtrtareaAdmvs", cfg.getHospArea());
+        JSONObject input = HseEncAndDecUtil.encryptMsg(data);
+        log.info("查询定点医师信息明文:{}", data);
+        JSONObject result = template.postForObject(drcxUrl, input, JSONObject.class);
+        if (null == result) {
+            return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
+        }
+        Integer code = result.getInteger("code");
+        if (null == code || code != 0){
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString("message"));
+        }
+        JSONObject decryptResult = HseEncAndDecUtil.decryptMsg(result);
+        return ResultVoUtil.success(decryptResult);
     }
 
     public ResultVo<JSONObject> medicineInquiry(MedicineInquiry inquiry) throws Exception {
@@ -126,6 +149,8 @@ public class DigitalReceiptService {
         if (null == phar || StringUtil.isBlank(phar.getYbCode())) {
             return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "审方药师医保编码不能为空。");
         }
+        request.getRxMdtrtinfo().setPrscDrCertType("01");
+        request.getRxMdtrtinfo().setPrscDrCertno("320823197007280258");
         String dataRef = JSONObject.toJSONStringWithDateFormat(request.getRxPreCheck(), "yyyy-MM-dd HH:mm:ss");
         JSONObject data = JSONObject.parseObject(dataRef);
         String rxdrugdetailRef = JSONArray.toJSONStringWithDateFormat(request.getRxDrugDetailList(), "yyyy-MM-dd HH:mm:ss");

+ 9 - 8
src/main/java/thyyxxk/simzfeeoprnsystm/service/SiMzFeeService.java

@@ -678,14 +678,15 @@ public class SiMzFeeService {
         }
 
         String staffDept = mzDao.selectStaffDepartment(p.getStaffId());
-        if (!Objects.equals(staffDept, "3020100") &&
-                !Objects.equals(staffDept, "3060000") &&
-                !Objects.equals(staffDept, "3100000")) {
-            if (!Objects.equals(p.getStaffId(), setlinfo.getStaffId())) {
-                return ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR, "您没有权限撤销本条医保业务,请到收费窗口退处方,或者联系医保科处理。");
-            }
-        }
-
+//        if (!Objects.equals(staffDept, "3020100") &&
+//                !Objects.equals(staffDept, "3060000") &&
+//                !Objects.equals(staffDept, "3100000")) {
+//            if (!Objects.equals(p.getStaffId(), setlinfo.getStaffId())) {
+//                return ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR, "您没有权限撤销本条医保业务,请到收费窗口退处方,或者联系医保科处理。");
+//            }
+//        }
+
+        // todo 把下方 3060000 换成财务科室的编码
         if (BigDecimal.ZERO.compareTo(setlinfo.getPsnCashPay()) == 0
                 && !Objects.equals(staffDept, "3060000")) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "本次结算【个人现金支付为0】,请到收费窗口做退费操作。");