新增企业 代替企业编号校验 和 导入功能中代替企标编号校验
This commit is contained in:
+6
-5
@@ -21,6 +21,7 @@ import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.service.ISarBussStandAttrInfoService;
|
||||
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandState;
|
||||
@@ -108,6 +109,9 @@ public class ActSarItemsBussEOService {
|
||||
@Autowired
|
||||
private EsRevisePlanLogDao esRevisePlanLogDao;
|
||||
|
||||
@Autowired
|
||||
private SarBussionessStandDao sarBussionessStandEODao;
|
||||
|
||||
|
||||
public void processCreateFsBuss(String standJson) throws Exception {
|
||||
Map<String,Object> standMap = new HashMap();
|
||||
@@ -339,6 +343,7 @@ public class ActSarItemsBussEOService {
|
||||
String prcName = String.valueOf(standMap.get("prcName"));
|
||||
String prcCreateUser = String.valueOf(standMap.get("prcCreateUser"));
|
||||
String standType = String.valueOf(standMap.get("standType"));
|
||||
String DTQBBHBUSS = String.valueOf(standMap.get("DTQBBHBUSS"));
|
||||
// String isJudge = String.valueOf(standMap.get("ifIn")); //是否经过技术评估
|
||||
SarBussionessStand sarBussionessStand = new SarBussionessStand();
|
||||
// if(standMap.containsKey("standId")) {
|
||||
@@ -407,11 +412,6 @@ public class ActSarItemsBussEOService {
|
||||
}
|
||||
}
|
||||
|
||||
//企标实施时间
|
||||
// if (StringUtils.isBlank(sarBussionessStand.getPutTime())){
|
||||
// logger.info("企标实施日期不能为空");
|
||||
// throw new AdcDaBaseException("企标实施日期不能为空");
|
||||
// }
|
||||
|
||||
List<SarBussionessStand> lawsList = iSarBussionessStandService.selectStandardsByStandNumber(standCode);
|
||||
// if (StringUtils.isBlank(sarStandardsInfoEO.getMenuId()) && "INLAND".equals(sarStandardsInfoEO.getStandType())) {
|
||||
@@ -486,6 +486,7 @@ public class ActSarItemsBussEOService {
|
||||
} else {//标准号、ID都不存在的情况
|
||||
// 新增方法
|
||||
sarBussionessStand.setPrcCreateUser(prcCreateUser);
|
||||
sarBussionessStand.setReplaceStandNum(DTQBBHBUSS);
|
||||
// 根据标准号判断数据是否已存在
|
||||
// QueryWrapper<SarBussionessStand>queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.eq(sarBussionessStand.getStandCode() != null,"STAND_CODE",sarBussionessStand.getStandCode())
|
||||
|
||||
+2
@@ -131,5 +131,7 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
String setDtqbbhbuss(String dtqbbhbuss);
|
||||
|
||||
String selectByStandCode(String standCode);
|
||||
|
||||
SarBussionessStand selectByReplaceStandNum(String standCode);
|
||||
}
|
||||
|
||||
|
||||
+21
-1
@@ -708,6 +708,15 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
if(beforeStandEO!=null){
|
||||
attrInfoDetails(beforeStandEO);
|
||||
}
|
||||
//判断是否有代替标准号
|
||||
if (StringUtils.isNotBlank(sarBussionessStandEO.getReplaceStandNum()) && sarBussionessStandEO != null){
|
||||
SarBussionessStand sarBussionessStand2 = sarBussionessStandEODao.selectByReplaceStandNum(sarBussionessStandEO.getReplaceStandNum());
|
||||
//9z741h2m3j 有效,3lqnlgmgcn 作废
|
||||
if (sarBussionessStand2 != null && (sarBussionessStandEO.getTextStatusBuss().equals("9z741h2m3j")|| sarBussionessStandEO.getTextStatusBuss().equals("3lqnlgmgcn"))){
|
||||
sarBussionessStand2.setTextStatusBuss("3lqnlgmgcn");
|
||||
baseMapper.updateById(sarBussionessStand2);
|
||||
}
|
||||
}
|
||||
//规范性引用文件,如有数据,删除以前关联
|
||||
int resultCount = this.baseMapper.updateById(sarBussionessStandEO);
|
||||
if (resultCount >= 1) {
|
||||
@@ -2875,6 +2884,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
String bussId = "";
|
||||
if (standMap != null && !standMap.isEmpty()) {
|
||||
|
||||
String DTQBBHBUSS = String.valueOf(standMap.get("dtqbbhbuss"));
|
||||
SarBussionessStand sarBussionessStand = new SarBussionessStand();
|
||||
|
||||
Map<String,Object> attInfoMap = new HashMap<>();
|
||||
@@ -2944,7 +2954,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
iSarBussionessStandService.updateSarBussionessStand(sarBussionessStand);
|
||||
} else {//标准号、ID都不存在的情况
|
||||
// 新增方法
|
||||
//sarBussionessStand.setTextStatusBussShow(textStatusBussShow);
|
||||
sarBussionessStand.setReplaceStandNum(DTQBBHBUSS);
|
||||
saveSarBussionessStand(sarBussionessStand);
|
||||
}
|
||||
}
|
||||
@@ -4735,6 +4745,16 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
sarStandMenuEO.setId(UUIDUtils.randomUUID20());
|
||||
sarBussStandMenuEODao.insertSelective(sarStandMenuEO);
|
||||
}
|
||||
//判断是否有代替标准号
|
||||
if (StringUtils.isNotBlank(sarBussionessStandEO.getReplaceStandNum()) && sarBussionessStandEO != null){
|
||||
SarBussionessStand sarBussionessStand2 = sarBussionessStandEODao.selectByReplaceStandNum(sarBussionessStandEO.getReplaceStandNum());
|
||||
//9z741h2m3j 有效,3lqnlgmgcn 作废
|
||||
if (sarBussionessStand2 != null && (sarBussionessStandEO.getTextStatusBuss().equals("9z741h2m3j")|| sarBussionessStandEO.getTextStatusBuss().equals("3lqnlgmgcn"))){
|
||||
sarBussionessStand2.setTextStatusBuss("3lqnlgmgcn");
|
||||
baseMapper.updateById(sarBussionessStand2);
|
||||
}
|
||||
}
|
||||
|
||||
int insertresult = this.baseMapper.insert(sarBussionessStandEO);
|
||||
if (insertresult >= 1) {
|
||||
// 根据代替标准号 ,修改代替标准号标准中的,被代替标准号
|
||||
|
||||
+4
@@ -1253,6 +1253,10 @@
|
||||
<select id="selectByStandCode" resultType="java.lang.String">
|
||||
select id from sar_bussioness_stand where stand_code = #{standCode} and VALID_FLAG = 0 limit 1
|
||||
</select>
|
||||
<select id="selectByReplaceStandNum"
|
||||
resultType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand">
|
||||
select * from sar_bussioness_stand where stand_code = #{standCode} and VALID_FLAG = 0 limit 1
|
||||
</select>
|
||||
|
||||
<update id="updateByIdInfo" >
|
||||
update sar_buss_stand_attr_info ss set ss.FBGBUSS = #{strFile}
|
||||
|
||||
Reference in New Issue
Block a user