add:添加企标入库日志,企标编号重复问题处理
This commit is contained in:
+2
-1
@@ -332,13 +332,14 @@ public class ActSarItemsBussEOService {
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 国内外标准流程入库"
|
||||
* @Description: 企业标准流程入库"
|
||||
* @Date: 2020/12/7 13:48
|
||||
* @Param: [standJson]
|
||||
* @Return: void
|
||||
*/
|
||||
public String processCreateBuss(String standJson) throws Exception{
|
||||
Map<String,Object> standMap = new HashMap();
|
||||
logger.info("企标入库JSON单:{}",standJson);
|
||||
standMap = JSONObject.parseObject(standJson);
|
||||
String bussId = "";
|
||||
if (standMap != null && !standMap.isEmpty()) {
|
||||
|
||||
+19
-9
@@ -739,19 +739,29 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
@ApiOperation(value = "企标发布节点完成任务和入库接口执行前先执行校验编号和名称校验")
|
||||
@PostMapping("/ifStandCodebyStandName")
|
||||
public ResponseMessage ifStandCodebyStandName(String standCode,String standName){
|
||||
if (StringUtils.isBlank(standCode) || StringUtils.isBlank(standName)) {
|
||||
return Result.error("企标编号或企标名称不能为空");
|
||||
}
|
||||
QueryWrapper<SarBussionessStand>queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(standCode != null,"STAND_CODE",standCode)
|
||||
.eq(standName != null,"STAND_NAME",standName);
|
||||
queryWrapper.eq("STAND_CODE",standCode).eq("VALID_FLAG","0");
|
||||
List<SarBussionessStand> list = sarBussionessStandEOService.list(queryWrapper);
|
||||
Integer valIdFlag = 0;
|
||||
if (list == null || list.isEmpty()){
|
||||
return Result.success("校验通过");
|
||||
}
|
||||
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 +"已存在");
|
||||
}
|
||||
if (standName.equals(stand.getStandName())){
|
||||
logger.info("企标标准号"+ standCode +"和企标名称"+ standName +"已存在");
|
||||
return Result.error("企标标准号"+ standCode +"和企标名称"+ standName +"已存在");
|
||||
}
|
||||
logger.info("企标标准号" + standCode + "已存在");
|
||||
return Result.error("企标标准号" + standCode + "已存在");
|
||||
// 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