|
|
|
@ -138,6 +138,12 @@ public class UdiRelController extends BaseController {
|
|
|
|
|
@PostMapping("udi/basic/rel/update")
|
|
|
|
|
public BaseResponse updateRel(@RequestBody BasicUdiRelRequest basicUdiRelRequest) {
|
|
|
|
|
|
|
|
|
|
if (basicUdiRelRequest.getAgengtStartDate() != null && basicUdiRelRequest.getAgengtEndDate() != null) {
|
|
|
|
|
if (basicUdiRelRequest.getAgengtStartDate().getTime() > basicUdiRelRequest.getAgengtEndDate().getTime()) {
|
|
|
|
|
return ResultVOUtils.error(999, "代理起始时间不能小于代理截止时间!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity();
|
|
|
|
|
BeanUtils.copyProperties(basicUdiRelRequest, basicUdiRelEntity);
|
|
|
|
|
basicUdiRelEntity.setUpdateTime(new Date());
|
|
|
|
@ -150,6 +156,8 @@ public class UdiRelController extends BaseController {
|
|
|
|
|
basicUdiProductEntity.setManufactory(basicUdiRelRequest.getManufactory());
|
|
|
|
|
basicUdiProductEntity.setMeasname(basicUdiRelRequest.getMeasname());
|
|
|
|
|
basicUdiProductEntity.setSpmc(basicUdiRelRequest.getSpmc());
|
|
|
|
|
basicUdiProductEntity.setMeasname(basicUdiRelRequest.getMeasname());
|
|
|
|
|
basicUdiProductEntity.setManufactory(basicUdiRelRequest.getManufactory());
|
|
|
|
|
basicUdiProductService.updateByUuid(basicUdiProductEntity);
|
|
|
|
|
return ResultVOUtils.success("添加成功!");
|
|
|
|
|
}
|
|
|
|
|