增加二次校验重复
parent
5b685f36fb
commit
7085938f28
|
@ -307,8 +307,15 @@ public class WmInQmIController extends BaseController {
|
|||
|
||||
|
||||
wmInQmIEntity.setBinSta("Y");
|
||||
systemService.save(wmToUpGoodsEntity);
|
||||
systemService.saveOrUpdate(wmInQmIEntity);
|
||||
//重复增加二次判断
|
||||
List<WmToUpGoodsEntity> listall = systemService.findByProperty(WmToUpGoodsEntity.class,"orderIdI",wmToUpGoodsEntity.getOrderIdI());
|
||||
if(listall!=null&&listall.size()>0){
|
||||
return true;
|
||||
}
|
||||
//重复增加二次判断
|
||||
|
||||
systemService.save(wmToUpGoodsEntity);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -467,19 +467,33 @@ public class WmToUpGoodsController extends BaseController {
|
|||
//保存
|
||||
try{
|
||||
D0.setOK(true);
|
||||
WmInQmIEntity wmInQmIEntity = systemService.get(WmInQmIEntity.class,wmToUpGoods.getWmToUpId());
|
||||
WmInQmIEntity wmInQmIEntity = systemService.get(WmInQmIEntity.class,wmToUpGoods.getOrderIdI());
|
||||
if(wmInQmIEntity!=null){
|
||||
wmInQmIEntity.setBinSta("Y");
|
||||
systemService.updateEntitie(wmInQmIEntity);
|
||||
}
|
||||
if(StringUtil.isNotEmpty(wmToUpGoods.getWmToUpId())){
|
||||
List<WmToUpGoodsEntity> wmToUpGoodsEntity = systemService.findByProperty(WmToUpGoodsEntity.class,"wmToUpId",wmToUpGoods.getWmToUpId());
|
||||
if(wmToUpGoodsEntity!=null&&wmToUpGoodsEntity.size()>0){
|
||||
if("Y".equals(wmInQmIEntity.getBinSta())){
|
||||
D0.setOK(false);
|
||||
D0.setErrorMsg("已经上架,不能重复上架");
|
||||
return new ResponseEntity(D0, HttpStatus.OK);
|
||||
}
|
||||
wmInQmIEntity.setBinSta("Y");
|
||||
systemService.updateEntitie(wmInQmIEntity);
|
||||
}else{
|
||||
D0.setOK(false);
|
||||
D0.setErrorMsg("验收任务已经删除,不能上架");
|
||||
|
||||
return new ResponseEntity(D0, HttpStatus.OK);
|
||||
}
|
||||
if(StringUtil.isNotEmpty(wmToUpGoods.getOrderIdI())){
|
||||
List<WmToUpGoodsEntity> wmToUpGoodsEntity = systemService.findByProperty(WmToUpGoodsEntity.class,"orderIdI",wmToUpGoods.getOrderIdI());
|
||||
if(wmToUpGoodsEntity!=null&&wmToUpGoodsEntity.size()>0){
|
||||
D0.setOK(false);
|
||||
D0.setErrorMsg("已经上架,不能重复上架");
|
||||
return new ResponseEntity(D0, HttpStatus.OK);
|
||||
}
|
||||
}else{
|
||||
D0.setOK(false);
|
||||
D0.setErrorMsg("验收记录为空,不能上架");
|
||||
|
||||
return new ResponseEntity(D0, HttpStatus.OK);
|
||||
}
|
||||
|
||||
wmToUpGoods.setGoodsName(wmInQmIEntity.getGoodsName());
|
||||
|
|
Loading…
Reference in New Issue