修改bug

master
wangwei 2 years ago
parent 2bffc13f85
commit 91089caa40

@ -166,18 +166,23 @@ public class ThrProductsController {
*/
@AuthRuleAnnotation("")
@PostMapping("/udiwms/udiinfo/erp/products/saveProduct")
public BaseResponse saveProduct(@RequestBody ThrProductsEntity thrProductsEntity) {
public BaseResponse saveProduct(@RequestBody ThrProductsEntity thrProductsEntity,FilterThrProductsRequest filterThrProductsRequest) {
if (null == thrProductsEntity)
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
BeanUtils.copyProperties(thrProductsEntity,filterThrProductsRequest);
List<ThrProductsEntity> thrProductsEntities = thrProductsService.filterThrProducts(filterThrProductsRequest);
if(thrProductsEntities.size()==0){
thrProductsEntity.setUpdateUser(String.valueOf(customerService.getUserId()));
thrProductsEntity.setCreateUser(String.valueOf(customerService.getUserId()));
thrProductsEntity.setUpdateTime(new Date());
thrProductsEntity.setCreateTime(new Date());
thrProductsService.insertThrProducts(thrProductsEntity);
return ResultVOUtils.success();
}
return ResultVOUtils.error(999,"数据已存在!");
// //新增主系统产品信息直接加到耗材字典里
@ -186,7 +191,7 @@ public class ThrProductsController {
// if (!udiContrastService.isExit(null, thrProductsEntity.getCode(), null)) {
// udiContrastService.createOnlyMainId(thrProductsEntity.getCode());
// }
return ResultVOUtils.success();
}
}
Loading…
Cancel
Save