|
@@ -2,6 +2,7 @@ package com.rongwei.rwapsserver.aps.controller;
|
|
|
|
|
|
import com.rongwei.rwapsserver.aps.domain.EquipmentRunTime;
|
|
|
import com.rongwei.rwapsserver.aps.service.ProductionScheduleService;
|
|
|
+import com.rongwei.rwapsserver.aps.util.ApsException;
|
|
|
import com.rongwei.rwapsserver.aps.vo.ProductionScheduleRetVo;
|
|
|
import com.rongwei.rwapsserver.aps.vo.ProductionScheduleVo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -29,7 +30,19 @@ public class ApsSchedulingController {
|
|
|
*/
|
|
|
@PostMapping("/productionSchedule")
|
|
|
public ProductionScheduleRetVo productionSchedule(@RequestBody ProductionScheduleVo productionScheduleVo) throws Exception{
|
|
|
- ProductionScheduleRetVo productionScheduleRetVo = productionScheduleService.productionSchedule(productionScheduleVo);
|
|
|
+ ProductionScheduleRetVo productionScheduleRetVo = null;
|
|
|
+ try{
|
|
|
+ productionScheduleRetVo = productionScheduleService.productionSchedule(productionScheduleVo);
|
|
|
+ productionScheduleRetVo.setCode("200");
|
|
|
+ }catch(ApsException ae){
|
|
|
+ productionScheduleRetVo = new ProductionScheduleRetVo();
|
|
|
+ productionScheduleRetVo.setCode("500");
|
|
|
+ productionScheduleRetVo.setMsg(ae.getMessage());
|
|
|
+ }catch(Exception e){
|
|
|
+ productionScheduleRetVo = new ProductionScheduleRetVo();
|
|
|
+ productionScheduleRetVo.setCode("500");
|
|
|
+ productionScheduleRetVo.setMsg("排程异常,请联系管理员");
|
|
|
+ }
|
|
|
return productionScheduleRetVo;
|
|
|
}
|
|
|
|