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