Merge remote-tracking branch 'origin/dev' into dev

dev
anthonywj 2 years ago
commit 1c32645b85

@ -1204,5 +1204,18 @@ public class IoCodeTempController extends BaseController {
else return ResultVOUtils.error(500, "修改失败!"); else return ResultVOUtils.error(500, "修改失败!");
} }
@AuthRuleAnnotation("")
@PostMapping("warehouse/inout/checkTempCode")
public BaseResponse checkTempCode(@RequestBody IoCodeTempEntity codeTempEntity) {
Boolean falg=codeTempService.checkTempCode(codeTempEntity);
if(!falg){
return ResultVOUtils.error(999,"该产品已存在,请勿重复录入");
}
return ResultVOUtils.success();
}
} }

@ -38,4 +38,6 @@ public interface IoCodeTempService {
* @return * @return
*/ */
List<IoCodeTempResponse> findCodeList(FilterCodeRequest filterCodeRequest); List<IoCodeTempResponse> findCodeList(FilterCodeRequest filterCodeRequest);
Boolean checkTempCode(IoCodeTempEntity ioCodeTempEntity);
} }

@ -86,4 +86,21 @@ public class IoCodeTempServiceImpl implements IoCodeTempService {
return ioCodeTempDao.selectCodeList(filterCodeRequest); return ioCodeTempDao.selectCodeList(filterCodeRequest);
} }
@Override
public Boolean checkTempCode(IoCodeTempEntity ioCodeTempEntity) {
QueryWrapper<IoCodeTempEntity> ew=new QueryWrapper<>();
ew.eq("code",ioCodeTempEntity.getCode());
ew.eq("corpOrderId",ioCodeTempEntity.getCorpOrderId());
ew.eq("batchNo",ioCodeTempEntity.getBatchNo());
ew.eq("produceDate",ioCodeTempEntity.getProduceDate());
ew.eq("expireDate",ioCodeTempEntity.getExpireDate());
ew.eq("serialNo",ioCodeTempEntity.getSerialNo());
Long count = ioCodeTempDao.selectCount(ew);
if(count>0){
return false;
}
return true;
}
} }

Loading…
Cancel
Save