Commit 69222f2e974afcb0974d06eb4c06bc1b5fd18abf
1 parent
630da36a
修改前置验证规则controller
Showing
1 changed file
with
18 additions
and
1 deletions
src/main/java/com/bsth/controller/schedule/core/SchedulePlanController_dubbo.java
| ... | ... | @@ -20,6 +20,8 @@ public class SchedulePlanController_dubbo extends BController_facade<Long, PlanD |
| 20 | 20 | @Autowired |
| 21 | 21 | private PlanPreValidateFacade planPreValidateFacade; |
| 22 | 22 | |
| 23 | + // TODO:save方法独立出来 | |
| 24 | + | |
| 23 | 25 | /** |
| 24 | 26 | * 创建指定线路,指定时间范围内的排班计划,使用的时刻表情况 |
| 25 | 27 | * @param xlid 线路id |
| ... | ... | @@ -40,5 +42,20 @@ public class SchedulePlanController_dubbo extends BController_facade<Long, PlanD |
| 40 | 42 | return rtn; |
| 41 | 43 | } |
| 42 | 44 | |
| 43 | - // TODO | |
| 45 | + /** | |
| 46 | + * 验证排班计划时间范围内规则的正确性。 | |
| 47 | + * @return | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @RequestMapping(value = "/valttrule/{xlid}/{from}/{to}", method = RequestMethod.GET) | |
| 51 | + public Map<String, Object> validateRule( | |
| 52 | + @PathVariable(value = "xlid") Integer xlid, | |
| 53 | + @PathVariable(value = "from") Date from, | |
| 54 | + @PathVariable(value = "to") Date to | |
| 55 | + ) throws Exception { | |
| 56 | + Map<String, Object> rtn = new HashMap<>(); | |
| 57 | + rtn.put("status", ResponseCode.SUCCESS); | |
| 58 | + rtn.put("data", planPreValidateFacade.validateRule(xlid, from, to)); | |
| 59 | + return rtn; | |
| 60 | + } | |
| 44 | 61 | } | ... | ... |