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