|
@@ -14,10 +14,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-import java.util.ArrayList;
|
|
+import java.util.*;
|
|
-import java.util.Collections;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
@Slf4j
|
|
@Slf4j
|
|
@@ -73,17 +70,32 @@ public class CtrlController {
|
|
try {
|
|
try {
|
|
List<String> resourceCodeList = new ArrayList<>();
|
|
List<String> resourceCodeList = new ArrayList<>();
|
|
|
|
|
|
- for (String modelId : modelIdList) {
|
|
+
|
|
- resourceCodeList.add(CommonUtil.getConfValueByKeyApp(modelId));
|
|
+
|
|
|
|
+ Iterator<String> iterator = modelIdList.iterator();
|
|
|
|
+ while (iterator.hasNext()){
|
|
|
|
+ String modelId = iterator.next();
|
|
|
|
+ String fhResourceCode = CommonUtil.getConfValueByKeyApp(modelId);
|
|
|
|
+
|
|
|
|
+ if(!"yhybk".equals(fhResourceCode) && !"deving".equals(fhResourceCode)){
|
|
|
|
+ resourceCodeList.add(fhResourceCode);
|
|
|
|
+ } else {
|
|
|
|
+ iterator.remove();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
+
|
|
List<String> newResourceCodeList = CommonUtil.deduplicateList(resourceCodeList);
|
|
List<String> newResourceCodeList = CommonUtil.deduplicateList(resourceCodeList);
|
|
String modelIdListStr = modelIdList.toString();
|
|
String modelIdListStr = modelIdList.toString();
|
|
- if(modelIdListStr.contains("DRYJ") && !modelIdListStr.contains("JJYJ")){
|
|
+
|
|
|
|
+ if(modelIdListStr.contains("DRYJ") && !modelIdListStr.contains("JJYJ")){
|
|
ctrlService.processDRYJCtrl(taskId, clueList, newResourceCodeList, areaIdList, endCtrlTime);
|
|
ctrlService.processDRYJCtrl(taskId, clueList, newResourceCodeList, areaIdList, endCtrlTime);
|
|
- } else if(modelIdListStr.contains("JJYJ") && !modelIdListStr.contains("DRYJ")){
|
|
+ }
|
|
|
|
+
|
|
|
|
+ else if(modelIdListStr.contains("JJYJ") && !modelIdListStr.contains("DRYJ")){
|
|
ctrlService.processJJYJCtrl(taskId, clueList, newResourceCodeList, areaIdList);
|
|
ctrlService.processJJYJCtrl(taskId, clueList, newResourceCodeList, areaIdList);
|
|
- } else {
|
|
+ }
|
|
|
|
+
|
|
|
|
+ else {
|
|
|
|
|
|
List<String> dryjResourceCodeList = new ArrayList<>();
|
|
List<String> dryjResourceCodeList = new ArrayList<>();
|
|
List<String> jjyjResourceCodeList = new ArrayList<>();
|
|
List<String> jjyjResourceCodeList = new ArrayList<>();
|
|
@@ -98,7 +110,7 @@ public class CtrlController {
|
|
ctrlService.processJJYJCtrl(taskId, clueList, CommonUtil.deduplicateList(jjyjResourceCodeList), areaIdList);
|
|
ctrlService.processJJYJCtrl(taskId, clueList, CommonUtil.deduplicateList(jjyjResourceCodeList), areaIdList);
|
|
}
|
|
}
|
|
return AjaxResult.success(Constants.CTRL_ING_MSG);
|
|
return AjaxResult.success(Constants.CTRL_ING_MSG);
|
|
- }catch (Exception e){
|
|
+ } catch (Exception e){
|
|
log.error("任务布控发生异常", e);
|
|
log.error("任务布控发生异常", e);
|
|
}
|
|
}
|
|
return AjaxResult.error(Constants.SERVER_ERROR_MSG);
|
|
return AjaxResult.error(Constants.SERVER_ERROR_MSG);
|
|
@@ -149,7 +161,7 @@ public class CtrlController {
|
|
JSONArray modelIdListInfo = reqBody.getJSONArray("modelIdListInfo");
|
|
JSONArray modelIdListInfo = reqBody.getJSONArray("modelIdListInfo");
|
|
JSONArray clueInfo = reqBody.getJSONArray("clueInfo");
|
|
JSONArray clueInfo = reqBody.getJSONArray("clueInfo");
|
|
JSONArray modelInfo = reqBody.getJSONArray("modelInfo");
|
|
JSONArray modelInfo = reqBody.getJSONArray("modelInfo");
|
|
- if(taskInfo == null || modelIdListInfo.size() == 0 || clueInfo.size() == 0 || modelInfo.size() == 0){
|
|
+ if(taskInfo == null || modelIdListInfo.isEmpty() || clueInfo.isEmpty() || modelInfo.isEmpty()){
|
|
return AjaxResult.error(Constants.PARAMS_EMPTY_MSG);
|
|
return AjaxResult.error(Constants.PARAMS_EMPTY_MSG);
|
|
}
|
|
}
|
|
try{
|
|
try{
|
|
@@ -167,7 +179,7 @@ public class CtrlController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PostMapping("/getCtrlWarningInfo")
|
|
@PostMapping("/getCtrlWarningInfo")
|
|
- public AjaxResult getCtrlWarningInfo(){
|
|
+ public AjaxResult getCtrlWarningInfo(@RequestBody JSONObject reqBody){
|
|
try{
|
|
try{
|
|
return AjaxResult.success(ctrlService.getWarningInfoByInc());
|
|
return AjaxResult.success(ctrlService.getWarningInfoByInc());
|
|
} catch (Exception e){
|
|
} catch (Exception e){
|