use of com.megagao.production.ssm.domain.customize.CustomResult in project production_ssm by megagao.
the class PMeasureCheckController method deleteBatch.
@RequestMapping(value = "/delete_batch")
@ResponseBody
private CustomResult deleteBatch(String[] ids) throws Exception {
System.out.println(ids);
CustomResult result = pMeasureCheckService.deleteBatch(ids);
return result;
}
use of com.megagao.production.ssm.domain.customize.CustomResult in project production_ssm by megagao.
the class ManufactureController method deleteBatch.
@RequestMapping(value = "/delete_batch")
@ResponseBody
private CustomResult deleteBatch(String[] ids) throws Exception {
System.out.println(ids);
CustomResult result = manufactureService.deleteBatch(ids);
return result;
}
use of com.megagao.production.ssm.domain.customize.CustomResult in project production_ssm by megagao.
the class PCountCheckController method deleteBatch.
@RequestMapping(value = "/delete_batch")
@ResponseBody
private CustomResult deleteBatch(String[] ids) throws Exception {
System.out.println(ids);
CustomResult result = pCountCheckService.deleteBatch(ids);
return result;
}
use of com.megagao.production.ssm.domain.customize.CustomResult in project production_ssm by megagao.
the class PCountCheckController method insert.
@RequestMapping(value = "/insert", method = RequestMethod.POST)
@ResponseBody
private CustomResult insert(@Valid ProcessCountCheck processCountCheck, BindingResult bindingResult) throws Exception {
CustomResult result;
if (bindingResult.hasErrors()) {
FieldError fieldError = bindingResult.getFieldError();
return CustomResult.build(100, fieldError.getDefaultMessage());
}
result = pCountCheckService.insert(processCountCheck);
return result;
}
use of com.megagao.production.ssm.domain.customize.CustomResult in project production_ssm by megagao.
the class OrderController method insert.
@RequestMapping(value = "/insert", method = RequestMethod.POST)
@ResponseBody
private CustomResult insert(@Valid COrder cOrder, BindingResult bindingResult) throws Exception {
CustomResult result;
if (bindingResult.hasErrors()) {
FieldError fieldError = bindingResult.getFieldError();
System.out.println(fieldError.getDefaultMessage());
return CustomResult.build(100, fieldError.getDefaultMessage());
}
if (orderService.get(cOrder.getOrderId()) != null) {
result = new CustomResult(0, "该订单编号已经存在,请更换订单编号!", null);
} else {
result = orderService.insert(cOrder);
}
return result;
}
Aggregations