Merge branch 'fix_foton_20230613' into 'master'
Fix foton 20230613 See merge request laws-foton-slrs/foton-slrs-system-rest!125
This commit is contained in:
+2
-26
@@ -738,32 +738,8 @@ 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,String taskIds,String standNum){
|
||||||
if (StringUtils.isBlank(standCode) || StringUtils.isBlank(standName)) {
|
return sarBussionessStandEOService.ifStandCodeByStandName(standCode,standName,taskIds,standNum);
|
||||||
return Result.error("企标编号或企标名称不能为空");
|
|
||||||
}
|
|
||||||
QueryWrapper<SarBussionessStand>queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq("STAND_CODE",standCode).eq("VALID_FLAG","0");
|
|
||||||
List<SarBussionessStand> list = sarBussionessStandEOService.list(queryWrapper);
|
|
||||||
if (list == null || list.isEmpty()){
|
|
||||||
return Result.success("校验通过");
|
|
||||||
}
|
|
||||||
for (SarBussionessStand stand :list){
|
|
||||||
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("校验通过");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -72,5 +72,7 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
|||||||
ResponseMessage repeal(String id, String type);
|
ResponseMessage repeal(String id, String type);
|
||||||
|
|
||||||
String selectMaxStandSn(String standSort);
|
String selectMaxStandSn(String standSort);
|
||||||
|
|
||||||
|
ResponseMessage ifStandCodeByStandName(String standCode, String standName, String taskIds, String standNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+55
@@ -68,7 +68,9 @@ import com.adc.da.util.UUIDUtils;
|
|||||||
import com.adc.da.utils.util.*;
|
import com.adc.da.utils.util.*;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
@@ -224,6 +226,9 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
@Autowired
|
@Autowired
|
||||||
private OnlineFileLogDao onlineFileLogDao;
|
private OnlineFileLogDao onlineFileLogDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarBussStandSnService sarBussStandSnService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getStandInfoByReviseStatus(String reviseStatus,String standSort,String taskId){
|
public String getStandInfoByReviseStatus(String reviseStatus,String standSort,String taskId){
|
||||||
DecimalFormat decimalFormat = new DecimalFormat("000");
|
DecimalFormat decimalFormat = new DecimalFormat("000");
|
||||||
@@ -371,6 +376,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
sarStandMenuEO.setId(UUIDUtils.randomUUID20());
|
sarStandMenuEO.setId(UUIDUtils.randomUUID20());
|
||||||
sarBussStandMenuEODao.insertSelective(sarStandMenuEO);
|
sarBussStandMenuEODao.insertSelective(sarStandMenuEO);
|
||||||
}
|
}
|
||||||
|
logger.info("新增的企标数据:"+JSON.toJSONString(sarBussionessStandEO));
|
||||||
int insertresult = this.baseMapper.insert(sarBussionessStandEO);
|
int insertresult = this.baseMapper.insert(sarBussionessStandEO);
|
||||||
if (insertresult >= 1) {
|
if (insertresult >= 1) {
|
||||||
// 根据代替标准号 ,修改代替标准号标准中的,被代替标准号
|
// 根据代替标准号 ,修改代替标准号标准中的,被代替标准号
|
||||||
@@ -4705,6 +4711,55 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
return baseMapper.selectMaxStandSn(standSort);
|
return baseMapper.selectMaxStandSn(standSort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseMessage<?> ifStandCodeByStandName(String standCode, String standName, String taskIds, String standNum) {
|
||||||
|
if (StringUtils.isBlank(standCode) || StringUtils.isBlank(standName)) {
|
||||||
|
return Result.error("企标编号或企标名称不能为空");
|
||||||
|
}
|
||||||
|
// 根据任务ID查询企标顺序表,判断企标顺序号是否作出修改
|
||||||
|
if (StringUtils.isNotBlank(taskIds) && StringUtils.isNotBlank(standNum)){
|
||||||
|
LambdaQueryWrapper<SarBussStandSn> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(SarBussStandSn::getTaskId, taskIds);
|
||||||
|
wrapper.orderByDesc(SarBussStandSn::getModifyTime);
|
||||||
|
List<SarBussStandSn> sarBussStandSnList = sarBussStandSnService.list(wrapper);
|
||||||
|
// 制定 才会生成企标顺序号,在企标顺序表中有数据,如果是修订,则不会生成顺序号,所以结果为空,不作处理
|
||||||
|
if (sarBussStandSnList != null && !sarBussStandSnList.isEmpty()) {
|
||||||
|
SarBussStandSn sarBussStandSn = sarBussStandSnList.get(0);
|
||||||
|
// 若企标顺序表中的顺序号和前端的顺序号不一致,则表示企标顺序号更改了,弃用原有顺序号,保存新的企标顺序号
|
||||||
|
if (!standNum.equals(sarBussStandSn.getStandSn())){
|
||||||
|
// 弃用原有顺序号
|
||||||
|
LambdaUpdateWrapper<SarBussStandSn> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
updateWrapper.eq(SarBussStandSn::getTaskId,taskIds);
|
||||||
|
updateWrapper.set(SarBussStandSn::getValidFlag,"1");
|
||||||
|
updateWrapper.set(SarBussStandSn::getUseStatus,"no");
|
||||||
|
updateWrapper.set(SarBussStandSn::getTaskId,null);
|
||||||
|
sarBussStandSnService.update(updateWrapper);
|
||||||
|
// 保存新的顺序号
|
||||||
|
sarBussStandSn.setId(UUIDUtils.randomUUID20());
|
||||||
|
sarBussStandSn.setStandSn(standNum);
|
||||||
|
sarBussStandSn.setCreationTime(new Date());
|
||||||
|
sarBussStandSn.setModifyTime(new Date());
|
||||||
|
sarBussStandSnService.save(sarBussStandSn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QueryWrapper<SarBussionessStand> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("STAND_CODE",standCode).eq("VALID_FLAG","0");
|
||||||
|
List<SarBussionessStand> list = sarBussionessStandEODao.selectList(queryWrapper);
|
||||||
|
if (list == null || list.isEmpty()){
|
||||||
|
return Result.success("校验通过");
|
||||||
|
}
|
||||||
|
for (SarBussionessStand stand :list){
|
||||||
|
if (standName.equals(stand.getStandName())){
|
||||||
|
logger.info("企标标准号"+ standCode +"和企标名称"+ standName +"已存在");
|
||||||
|
return Result.error("企标标准号"+ standCode +"和企标名称"+ standName +"已存在");
|
||||||
|
}
|
||||||
|
logger.info("企标标准号" + standCode + "已存在");
|
||||||
|
return Result.error("企标标准号" + standCode + "已存在");
|
||||||
|
}
|
||||||
|
return Result.success("校验通过");
|
||||||
|
}
|
||||||
|
|
||||||
public String updateInfo(List<String> asList,String standId,String attfId) {
|
public String updateInfo(List<String> asList,String standId,String attfId) {
|
||||||
//重复的集合
|
//重复的集合
|
||||||
List<AttFileEO> chongfu = new ArrayList<>();
|
List<AttFileEO> chongfu = new ArrayList<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user