新增'企标发布节点完成任务和入库接口执行前先执行校验编号和名称校验'接口
This commit is contained in:
+21
@@ -734,5 +734,26 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
public ResponseMessage repeal(String id,String type){
|
||||
return sarBussionessStandEOService.repeal(id,type);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "企业标准完成流程和入库前的校验")
|
||||
@PostMapping("/ifStandCodebyStandName")
|
||||
public ResponseMessage ifStandCodebyStandName(@RequestBody String standCode,String standName){
|
||||
QueryWrapper<SarBussionessStand>queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(standCode != null,"STAND_CODE",standCode)
|
||||
.eq(standName != null,"STAND_NAME",standName);
|
||||
List<SarBussionessStand> list = sarBussionessStandEOService.list(queryWrapper);
|
||||
Integer valIdFlag = 0;
|
||||
for (SarBussionessStand stand :list){
|
||||
if ((list.size() ==1 && !list.get(0).getId().equals(stand.getId())) || list.size() >1){
|
||||
valIdFlag = stand.getValidFlag();
|
||||
if (valIdFlag == 0){
|
||||
logger.info("企标标准号"+ standCode +"和企标名称"+ standName +"已存在");
|
||||
return Result.error("企标标准号"+ standCode +"和企标名称"+ standName +"已存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.success("校验通过");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user