Commit e7677441266be53a758be305bc538b59c4575059
1 parent
1545a255
update...
Showing
1 changed file
with
23 additions
and
22 deletions
src/main/java/com/bsth/controller/realcontrol/ServiceDataInterface.java
| 1 | 1 | package com.bsth.controller.realcontrol; |
| 2 | 2 | |
| 3 | 3 | import com.alibaba.fastjson.JSON; |
| 4 | -import com.alibaba.fastjson.JSONObject; | |
| 5 | 4 | import com.bsth.data.BasicData; |
| 6 | 5 | import com.bsth.data.directive.DayOfDirectives; |
| 7 | 6 | import com.bsth.data.directive.DirectiveCreator; |
| ... | ... | @@ -50,33 +49,35 @@ public class ServiceDataInterface { |
| 50 | 49 | * @return |
| 51 | 50 | */ |
| 52 | 51 | @RequestMapping("/execSchList") |
| 53 | - public List<JSONObject> execSchList(@RequestParam String secretKey){ | |
| 52 | + public List<Map<String, Object>> execSchList(@RequestParam String secretKey){ | |
| 54 | 53 | if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) |
| 55 | 54 | return null; |
| 56 | 55 | |
| 57 | - List<JSONObject> rs = new ArrayList<>(); | |
| 56 | + List<Map<String, Object>> rs = new ArrayList<>(); | |
| 58 | 57 | Collection<ScheduleRealInfo> list = dayOfSchedule.execPlanMap().values(); |
| 59 | 58 | |
| 60 | - JSONObject obj; | |
| 59 | + Map<String, Object> map; | |
| 61 | 60 | for(ScheduleRealInfo sch : list){ |
| 62 | - obj = new JSONObject(); | |
| 63 | - obj.put("clZbh", sch.getClZbh()); | |
| 64 | - obj.put("jGh", sch.getjGh()); | |
| 65 | - obj.put("sGh", sch.getsGh()); | |
| 66 | - obj.put("lpName", sch.getLpName()); | |
| 67 | - obj.put("xlBm", sch.getXlBm()); | |
| 68 | - obj.put("xlName", sch.getXlName()); | |
| 69 | - obj.put("xlDir", sch.getXlDir()); | |
| 70 | - obj.put("qdzName", sch.getQdzName()); | |
| 71 | - obj.put("zdzName", sch.getZdzName()); | |
| 72 | - obj.put("fcsj", sch.getFcsj()); | |
| 73 | - obj.put("dfsj", sch.getDfsj()); | |
| 74 | - obj.put("zdsj", sch.getZdsj()); | |
| 75 | - obj.put("bcType", sch.getBcType()); | |
| 76 | - obj.put("remarks", sch.getRemark()); | |
| 77 | - obj.put("status", sch.getStatus()); | |
| 78 | - | |
| 79 | - rs.add(obj); | |
| 61 | + if(null == sch) | |
| 62 | + continue; | |
| 63 | + map = new HashMap<>(); | |
| 64 | + map.put("clZbh", sch.getClZbh()); | |
| 65 | + map.put("jGh", sch.getjGh()); | |
| 66 | + map.put("sGh", sch.getsGh()); | |
| 67 | + map.put("lpName", sch.getLpName()); | |
| 68 | + map.put("xlBm", sch.getXlBm()); | |
| 69 | + map.put("xlName", sch.getXlName()); | |
| 70 | + map.put("xlDir", sch.getXlDir()); | |
| 71 | + map.put("qdzName", sch.getQdzName()); | |
| 72 | + map.put("zdzName", sch.getZdzName()); | |
| 73 | + map.put("fcsj", sch.getFcsj()); | |
| 74 | + map.put("dfsj", sch.getDfsj()); | |
| 75 | + map.put("zdsj", sch.getZdsj()); | |
| 76 | + map.put("bcType", sch.getBcType()); | |
| 77 | + map.put("remarks", sch.getRemark()); | |
| 78 | + map.put("status", sch.getStatus()); | |
| 79 | + | |
| 80 | + rs.add(map); | |
| 80 | 81 | } |
| 81 | 82 | return rs; |
| 82 | 83 | } | ... | ... |