|
|
@ -283,6 +283,8 @@ public class UdiRelevanceController {
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//更新关联表
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
|
|
|
|
BeanUtils.copyProperties(udiRelevanceSaveRequest, udiRelevanceEntity);
|
|
|
|
BeanUtils.copyProperties(udiRelevanceSaveRequest, udiRelevanceEntity);
|
|
|
|
udiRelevanceEntity.setId(udiRelevanceSaveRequest.getId());
|
|
|
|
udiRelevanceEntity.setId(udiRelevanceSaveRequest.getId());
|
|
|
@ -290,8 +292,9 @@ public class UdiRelevanceController {
|
|
|
|
udiRelevanceEntity.setModifyTime(new Date());
|
|
|
|
udiRelevanceEntity.setModifyTime(new Date());
|
|
|
|
udiRelevanceEntity.setUpdateUser(customerService.getUserId() + "");
|
|
|
|
udiRelevanceEntity.setUpdateUser(customerService.getUserId() + "");
|
|
|
|
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
|
|
|
|
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//关联更新
|
|
|
|
UdiProductEntity udiProductEntity = new UdiProductEntity();
|
|
|
|
UdiProductEntity udiProductEntity = new UdiProductEntity();
|
|
|
|
udiProductEntity.setSptm(udiRelevanceSaveRequest.getSptm());
|
|
|
|
|
|
|
|
udiProductEntity.setYbbm(udiRelevanceSaveRequest.getYbbm());
|
|
|
|
udiProductEntity.setYbbm(udiRelevanceSaveRequest.getYbbm());
|
|
|
|
udiProductEntity.setMeasname(udiRelevanceSaveRequest.getMeasname());
|
|
|
|
udiProductEntity.setMeasname(udiRelevanceSaveRequest.getMeasname());
|
|
|
|
udiProductEntity.setManufactory(udiRelevanceSaveRequest.getManufactory());
|
|
|
|
udiProductEntity.setManufactory(udiRelevanceSaveRequest.getManufactory());
|
|
|
@ -313,13 +316,37 @@ public class UdiRelevanceController {
|
|
|
|
udiProductEntity.setProductType(ConstantStatus.PRODUCT_TYPE_UDI);
|
|
|
|
udiProductEntity.setProductType(ConstantStatus.PRODUCT_TYPE_UDI);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
udiProductEntity.setUuid(udiRelevanceSaveRequest.getUuid());
|
|
|
|
udiProductEntity.setUuid(udiRelevanceSaveRequest.getUuid());
|
|
|
|
|
|
|
|
udiProductService.updateUdiInfoByUuid(udiProductEntity);
|
|
|
|
|
|
|
|
|
|
|
|
//关联修改提交
|
|
|
|
return ResultVOUtils.success("更新成功");
|
|
|
|
if (udiRelevanceSaveRequest.getRelSubmit() != null && udiRelevanceSaveRequest.getRelSubmit()) {
|
|
|
|
}
|
|
|
|
udiProductService.updateUdiInfoByUuid(udiProductEntity);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
udiProductService.updateUdiInfo(udiProductEntity);
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
|
|
|
@PostMapping("/udi/udirel/update/di")
|
|
|
|
|
|
|
|
public BaseResponse updateSingel(@RequestBody UdiRelevanceSaveRequest udiRelevanceSaveRequest, BindingResult bindingResult) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//更新关联表
|
|
|
|
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
|
|
|
|
|
|
|
|
udiRelevanceEntity.setId(udiRelevanceSaveRequest.getId());
|
|
|
|
|
|
|
|
udiRelevanceEntity.setUpdateTime(new Date());
|
|
|
|
|
|
|
|
udiRelevanceEntity.setModifyTime(new Date());
|
|
|
|
|
|
|
|
udiRelevanceEntity.setUpdateUser(customerService.getUserId() + "");
|
|
|
|
|
|
|
|
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//单独更新DI
|
|
|
|
|
|
|
|
UdiProductEntity diEntity = new UdiProductEntity();
|
|
|
|
|
|
|
|
// diEntity.setMeasname(udiRelevanceSaveRequest.getMeasname());
|
|
|
|
|
|
|
|
diEntity.setPackUnit(udiRelevanceSaveRequest.getPackUnit());
|
|
|
|
|
|
|
|
diEntity.setSptm(udiRelevanceSaveRequest.getSptm());
|
|
|
|
|
|
|
|
diEntity.setUuid(udiRelevanceSaveRequest.getUuid());
|
|
|
|
|
|
|
|
diEntity.setNameCode(udiRelevanceSaveRequest.getNameCode());
|
|
|
|
|
|
|
|
udiProductService.updateUdiInfo(diEntity);
|
|
|
|
return ResultVOUtils.success("更新成功");
|
|
|
|
return ResultVOUtils.success("更新成功");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|