Pārlūkot izejas kodu

短视频迁移

liaoyongfei 4 gadi atpakaļ
vecāks
revīzija
2f8d8bc5f2

+ 6 - 7
ymall/src/main/java/com/liangjian11/ymall/handle/SynProfitHandle.java

@@ -70,7 +70,7 @@ public class SynProfitHandle {
     requestPayload.put("appkey", hospitalDomain.appkey);
     requestPayload.put("sign", hospitalDomain.getSign(now));
     requestPayload.put("appid", hospitalDomain.appid);
-    requestPayload.put("beginTime", begin);
+    requestPayload.put("beginTime", begin+1);
     requestPayload.put("endTime", now);
     String res = OkHttpUtils.httpPostJson(hospitalDomain.domainName + hospitalDomain.getWenzhenOrderInfoList, httpHeaders, requestPayload.toJSONString());
     JSONObject resJson = JSONObject.parseObject(res);
@@ -83,14 +83,13 @@ public class SynProfitHandle {
     if (resJson.get("data") != null && resJson.getJSONArray("data").size() > 0)
       jsonArray = resJson.getJSONArray("data");
     JSONObject item;
-    QueryWrapper<InterrogationOrders> hasOrderQuery = new QueryWrapper<>();
-
     for (int i = 0; i < jsonArray.size(); i++) {
       item = jsonArray.getJSONObject(i);
       if (item.get("orderId") == null || item.get("orderId").toString().length() == 0 || item.get("doctorId") == null || item.get("doctorId").toString().length() == 0)
         continue;
+      QueryWrapper<InterrogationOrders> hasOrderQuery = new QueryWrapper<>();
       hasOrderQuery.eq("order_code", item.get("orderId").toString());
-      if (interrogationOrdersService.list(hasOrderQuery).size() > 0)
+      if (interrogationOrdersService.getOne(hasOrderQuery)!=null)
         continue;
       String doctorPhone = DataChangeUtil.ljEncrypt(item.getString("doctorMobile"));
       Doctor doctor = doctorService.getBaseItem(Integer.valueOf(item.get("doctorId").toString()), doctorPhone);
@@ -113,7 +112,7 @@ public class SynProfitHandle {
       orders.setInterrogatorPhone(DataChangeUtil.ljEncrypt(item.getString("patientMobile")));
       orders.setHandle(false);
       orders.setOrderCode(item.getString("orderId"));
-      orders.setProfitGradeId(item.getString("doctorLjLevelCode"));
+      orders.setProfitGradeId(item.getString("doctorLjLevelCode").toLowerCase());
       orders.setStatus(item.getInteger("status"));
       orders.setSynchroTime(nowTime);
       orders.setXcdoctorId(item.getString("doctorId"));
@@ -143,7 +142,7 @@ public class SynProfitHandle {
     requestPayload.put("appkey", hospitalDomain.appkey);
     requestPayload.put("sign", hospitalDomain.getSign(now));
     requestPayload.put("appid", hospitalDomain.appid);
-    requestPayload.put("beginTime", begin);
+    requestPayload.put("beginTime", begin+1);
     requestPayload.put("endTime", now);
     String res = OkHttpUtils.httpPostJson(hospitalDomain.domainName + hospitalDomain.getPrescriptionOrderInfoList, httpHeaders, requestPayload.toJSONString());
     JSONObject resJson = JSONObject.parseObject(res);
@@ -156,11 +155,11 @@ public class SynProfitHandle {
     if (resJson.get("data") != null && resJson.getJSONArray("data").size() > 0)
       jsonArray = resJson.getJSONArray("data");
     JSONObject item;
-    QueryWrapper<PrescriptionOrders> hasOrderQuery = new QueryWrapper<>();
     for (int i = 0; i < jsonArray.size(); i++) {
       item = jsonArray.getJSONObject(i);
       if (item.get("orderId") == null || item.get("orderId").toString().length() == 0 || item.get("doctorId") == null || item.get("doctorId").toString().length() == 0)
         continue;
+      QueryWrapper<PrescriptionOrders> hasOrderQuery = new QueryWrapper<>();
       hasOrderQuery.eq("order_code", item.get("orderId").toString());
       if (prescriptionOrdersService.list(hasOrderQuery).size() > 0)
         continue;