|
|
@@ -51,6 +51,11 @@ public class OrderChangeApiController extends CertifyApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 新增变更项目
|
|
|
+ * @param t
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@RequestMapping(value = "/addChangeTask", method = RequestMethod.POST)
|
|
|
public Result addChangeTask(TChangeTask t){
|
|
|
Result res = new Result();
|
|
|
@@ -62,6 +67,10 @@ public class OrderChangeApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "项目金额"));
|
|
|
return res;
|
|
|
}
|
|
|
+ if (orderChangeService.checkTaskMain(t)){
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "", "主项目"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
if(null==t.getCommodityQuantity()){
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "项目数量"));
|
|
|
return res;
|
|
|
@@ -134,6 +143,10 @@ public class OrderChangeApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","变更项目id"));
|
|
|
return res;
|
|
|
}
|
|
|
+ if (orderChangeService.checkTaskMain(t)){
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "", "主项目"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
res.setData(orderChangeService.updateChangeTask(t));
|
|
|
return res;
|
|
|
}
|