|
@@ -155,8 +155,9 @@ public class WODispatchPlanTmDoBizFun {
|
|
|
jsonParam.put("data",jsonArray);
|
|
|
ResponseRes res = ServiceMgrProxy.getInstance().applyTaskServiceApi().postPlanCommand(jsonParam);
|
|
|
JSONObject resDataObj = JSONObject.parseObject(res.getResdata().toString());
|
|
|
- if (ResponseCode.RESULT_NORMAL.equals(res.getRescode())
|
|
|
- &&resDataObj.getJSONArray("data").size()>0
|
|
|
+ System.out.println("0".equals(resDataObj.getJSONArray("data").getJSONObject(0).getString("code")));
|
|
|
+ if (ResponseCode.RESULT_NORMAL.toStrCode().equals(res.getRescode())
|
|
|
+ &&!resDataObj.getJSONArray("data").isEmpty()
|
|
|
&&"0".equals(resDataObj.getJSONArray("data").getJSONObject(0).getString("code"))) {
|
|
|
//TODO 再计算下一次的时间,并且更新至调度计划的数据库
|
|
|
Map<String, Object> upPlanUpWhere = new HashMap<>();//修改计划的条件
|
|
@@ -180,6 +181,8 @@ public class WODispatchPlanTmDoBizFun {
|
|
|
} else {
|
|
|
upPlan.put("next_take_time", returnNextTakeTime(nextTimeModel));
|
|
|
}
|
|
|
+ //TODO 计算成功数
|
|
|
+
|
|
|
upPlan.put("last_take_time",resDataObj.getJSONArray("data").getJSONObject(0).getLong("okTime"));
|
|
|
getThisDBService().updateWiths(upPlan, upPlanUpWhere);
|
|
|
|