소스 검색

每次上传都重新生成msgid和签名

lighter 2 일 전
부모
커밋
505dcf1b48
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      src/main/java/thyyxxk/sizyfeeoprnsystm/service/SiZyFeeService.java

+ 5 - 5
src/main/java/thyyxxk/sizyfeeoprnsystm/service/SiZyFeeService.java

@@ -237,8 +237,6 @@ public class SiZyFeeService {
         if (feeQueue.isEmpty()) {
             return result;
         }
-        JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.UPLOAD_HOSPITALIZATION_FEE_DETAILS,
-                p.getAdmdvs(), p.getStaffId());
         List<FeeDtle> tempList = new ArrayList<>();
         while (!feeQueue.isEmpty()) {
             FeeDtle feeDtle = feeQueue.poll();
@@ -285,7 +283,7 @@ public class SiZyFeeService {
 
             tempList.add(feeDtle);
             if (tempList.size() == 50) {
-                int[] upldres = executeUploadFees(input, tempList, p);
+                int[] upldres = executeUploadFees(tempList, p);
                 index += upldres[0];
                 if (upldres[1] > 0) {
                     result[1] = 1;
@@ -297,7 +295,7 @@ public class SiZyFeeService {
             }
         }
         if (!tempList.isEmpty()) {
-            int[] upldres = executeUploadFees(input, tempList, p);
+            int[] upldres = executeUploadFees(tempList, p);
             index += upldres[0];
             if (upldres[1] > 0) {
                 result[1] = 1;
@@ -358,7 +356,9 @@ public class SiZyFeeService {
         template.postForObject(cfg.getApiUrl(), js, String.class);
     }
 
-    private int[] executeUploadFees(JSONObject input, List<FeeDtle> fees, ZyPatientInfo p) {
+    private int[] executeUploadFees(List<FeeDtle> fees, ZyPatientInfo p) {
+        JSONObject input = exec.makeTradeHeaderWithInsureArea(
+                SiFunction.UPLOAD_HOSPITALIZATION_FEE_DETAILS, p.getAdmdvs(), p.getStaffId());
         String ref = JSONArray.toJSONString(fees);
         input.getJSONObject("input").put("feedetail", JSONArray.parse(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.UPLOAD_HOSPITALIZATION_FEE_DETAILS);