|
|
|
@ -119,6 +119,11 @@ public class BasicBussinessTypeController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (bussinessTypeSaveRequest != null) {
|
|
|
|
|
boolean exists = basicBussinessTypeService.checkBusTypeNameExists(bussinessTypeSaveRequest.getName(), null);
|
|
|
|
|
if (exists) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "单据类型名称重复!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bussinessTypeSaveRequest.setAction("SC" + CustomUtil.getId());
|
|
|
|
|
BasicBussinessTypeEntity basicBussinessTypeEntity = new BasicBussinessTypeEntity();
|
|
|
|
|
BeanUtil.copyProperties(bussinessTypeSaveRequest, basicBussinessTypeEntity);
|
|
|
|
@ -141,7 +146,13 @@ public class BasicBussinessTypeController extends BaseController {
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (bussinessTypeSaveRequest != null) {
|
|
|
|
|
boolean exists = basicBussinessTypeService.checkBusTypeNameExists(bussinessTypeSaveRequest.getName(), bussinessTypeSaveRequest.getId().intValue());
|
|
|
|
|
if (exists) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "单据类型名称重复!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BasicBussinessTypeEntity basicBussinessTypeEntity = new BasicBussinessTypeEntity();
|
|
|
|
|
BeanUtil.copyProperties(bussinessTypeSaveRequest, basicBussinessTypeEntity);
|
|
|
|
|
basicBussinessTypeService.updateBussinessType(basicBussinessTypeEntity);
|
|
|
|
@ -276,10 +287,6 @@ public class BasicBussinessTypeController extends BaseController {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.DATA_ERROR);
|
|
|
|
|
}
|
|
|
|
|
List<BasicBussinessTypeEntity> bussinessTypeEntities = basicBussinessTypeService.candidateBussinessType(candidateRequest.getMainAction());
|
|
|
|
|
if (StrUtil.isNotBlank(candidateRequest.getCurAction())) {
|
|
|
|
|
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(candidateRequest.getCurAction());
|
|
|
|
|
bussinessTypeEntities.add(bussinessTypeEntity);
|
|
|
|
|
}
|
|
|
|
|
//查询补单单据类型
|
|
|
|
|
return ResultVOUtils.success(bussinessTypeEntities);
|
|
|
|
|
}
|
|
|
|
|