|
@@ -44,12 +44,12 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
|
|
|
if (BladeApplication.isLocalDev()) {
|
|
|
GET_ACCESS_TOKEN_ACTION_URL = "http://106.14.146.72:8087/portal/getAccessTokenAction.do?AppId=1&AppSecret=a2b1c2d3";
|
|
|
STOCK_ACCEPT_ACTION = "http://106.14.146.72:8087/SrmWeb/stockAcceptAction.do?action=custom&access_token=";
|
|
|
- SELECT_PUBLISHED_SQL = "select Id,Content from `cap.published_copy1` where handle is null";
|
|
|
+ SELECT_PUBLISHED_SQL = "select Id id,Content content from `cap.published_copy1` where handle is null";
|
|
|
UPDATE_PUBLISHED_SQL = "UPDATE `cap.published_copy1` SET handle=1 WHERE id=";
|
|
|
} else {
|
|
|
GET_ACCESS_TOKEN_ACTION_URL = "http://mes.cfmfactory.com:8087/portal/getAccessTokenAction.do?AppId=1&AppSecret=a2b1c2d3";
|
|
|
STOCK_ACCEPT_ACTION = "http://mes.cfmfactory.com:8087/SrmWeb/stockAcceptAction.do?action=custom&access_token=";
|
|
|
- SELECT_PUBLISHED_SQL = "select Id,Content from `cap.published` where handle is null";
|
|
|
+ SELECT_PUBLISHED_SQL = "select Id id,Content content from `cap.published` where handle is null";
|
|
|
UPDATE_PUBLISHED_SQL = "UPDATE `cap.published` SET handle=1 WHERE id=";
|
|
|
}
|
|
|
}
|
|
@@ -63,7 +63,8 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
|
|
|
String token = getToken(GET_ACCESS_TOKEN_ACTION_URL);
|
|
|
|
|
|
for (Map<String, Object> stringStringMap : selectPublishedList) {
|
|
|
- String content = stringStringMap.get("Content").toString();
|
|
|
+
|
|
|
+ String content = stringStringMap.get("content").toString();
|
|
|
// 内容
|
|
|
JSONObject contentMap = JSONObject.parseObject(content);
|
|
|
JSONObject value = contentMap.getJSONObject("Value");
|
|
@@ -72,7 +73,7 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
|
|
|
Map<String, String> userIdAndJobNo = scheduleTaskMapper.selectUserIdAndJobNo(userId);
|
|
|
|
|
|
if (userIdAndJobNo.get("ID").equals(userIdAndJobNo.get("JobNo"))) {
|
|
|
- scheduleTaskMapper.updatePublished(UPDATE_PUBLISHED_SQL + stringStringMap.get("Id"));
|
|
|
+ scheduleTaskMapper.updatePublished(UPDATE_PUBLISHED_SQL + stringStringMap.get("id"));
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -92,7 +93,7 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
|
|
|
String stockAcceptActionBody = stockAcceptActionResult.getBody();
|
|
|
|
|
|
if (JSONObject.parseObject(stockAcceptActionBody).getBoolean("success")) {
|
|
|
- scheduleTaskMapper.updatePublished(UPDATE_PUBLISHED_SQL + stringStringMap.get("Id"));
|
|
|
+ scheduleTaskMapper.updatePublished(UPDATE_PUBLISHED_SQL + stringStringMap.get("id"));
|
|
|
}
|
|
|
|
|
|
} catch (Exception e) {
|