数据同步接口 不走es
This commit is contained in:
@@ -61,5 +61,7 @@ public class SearchStandContext implements Serializable {
|
|||||||
|
|
||||||
private String standCode;
|
private String standCode;
|
||||||
|
|
||||||
|
private String standId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,4 +28,7 @@ public class StandData {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "标准分类+空格+标准号+空格+标准名称")
|
@ApiModelProperty(value = "标准分类+空格+标准号+空格+标准名称")
|
||||||
private String documentName;
|
private String documentName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "标准分类+空格+标准号+空格+标准名称")
|
||||||
|
private String standNum;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -61,6 +61,10 @@ public class SarBussStandAttrInfo extends BaseEntity {
|
|||||||
@TableField("BDTQBBHBUSS")
|
@TableField("BDTQBBHBUSS")
|
||||||
private String bdtqbbhbuss;
|
private String bdtqbbhbuss;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "被代替企标编号")
|
||||||
|
@TableField("DTQBBHBUSS")
|
||||||
|
private String dtqbbhbuss;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String glwj;
|
private String glwj;
|
||||||
//
|
//
|
||||||
|
|||||||
+10
-10
@@ -951,10 +951,10 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||||
model.setStandName(sarStandardsInfo.getStandName());
|
model.setStandName(sarStandardsInfo.getStandName());
|
||||||
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
||||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
||||||
model.setSycpx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString():"");
|
model.setSycpx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("sycpx") ?sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString():"");
|
||||||
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString():"");
|
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbm") ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString():"");
|
||||||
model.setSycx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString():"");
|
model.setSycx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("cllx") ?sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString():"");
|
||||||
result.add(model);
|
result.add(model);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -978,10 +978,10 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||||
model.setStandName(sarStandardsInfo.getStandName());
|
model.setStandName(sarStandardsInfo.getStandName());
|
||||||
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
||||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
||||||
model.setSycpx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString():"");
|
model.setSycpx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("sycpx") ?sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString():"");
|
||||||
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString():"");
|
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbm") ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString():"");
|
||||||
model.setSycx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString():"");
|
model.setSycx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("cllx") ?sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString():"");
|
||||||
result.add(model);
|
result.add(model);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1004,10 +1004,10 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||||
model.setStandName(sarStandardsInfo.getLawsName());
|
model.setStandName(sarStandardsInfo.getLawsName());
|
||||||
model.setStandEnName(sarStandardsInfo.getLawsEnName());
|
model.setStandEnName(sarStandardsInfo.getLawsEnName());
|
||||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws").toString():"");
|
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws").toString():"");
|
||||||
//没有使用产品线
|
//没有使用产品线
|
||||||
// model.setSycpx(null!=sarStandardsInfo.getLawsSycx() ?sarStandardsInfo.getLawsSycx():"");
|
// model.setSycpx(null!=sarStandardsInfo.getLawsSycx() ?sarStandardsInfo.getLawsSycx():"");
|
||||||
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbmlaws").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbmlaws").toString():"");
|
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbmlaws") ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbmlaws").toString():"");
|
||||||
model.setSycx(null!=sarStandardsInfo.getLawsSycx() ?sarStandardsInfo.getLawsSycx():"");
|
model.setSycx(null!=sarStandardsInfo.getLawsSycx() ?sarStandardsInfo.getLawsSycx():"");
|
||||||
result.add(model);
|
result.add(model);
|
||||||
});
|
});
|
||||||
|
|||||||
+5
-1
@@ -50,7 +50,7 @@ public class SarStandAttrInfo extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "修改时间")
|
@ApiModelProperty(value = "修改时间")
|
||||||
@TableField("MODIFY_TIME")
|
@TableField("MODIFY_TIME")
|
||||||
private LocalDateTime modifyTime;
|
private Date modifyTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "归口管理部门")
|
@ApiModelProperty(value = "归口管理部门")
|
||||||
@TableField("GKDW")
|
@TableField("GKDW")
|
||||||
@@ -234,5 +234,9 @@ public class SarStandAttrInfo extends BaseEntity {
|
|||||||
@TableField("TXLB")
|
@TableField("TXLB")
|
||||||
private String txlb;
|
private String txlb;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "体系类别")
|
||||||
|
@TableField("BDTBZH")
|
||||||
|
private String bdtbzh;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+15
@@ -822,6 +822,21 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
|||||||
return "1";
|
return "1";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "国内海外数据处理接口")
|
||||||
|
@GetMapping("/replaceBdtbzhforDtbzh")
|
||||||
|
public String replaceBdtbzhforDtbzh(SarStandardsInfo sarStandardsInfo) {
|
||||||
|
sarStandardsInfoEOService.replaceBdtbzhforDtbzh();
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "企标数据处理接口")
|
||||||
|
@GetMapping("/replaceBdtbzhforDtbzhQb")
|
||||||
|
public String replaceBdtbzhforDtbzhQb(SarStandardsInfo sarStandardsInfo) {
|
||||||
|
sarStandardsInfoEOService.replaceBdtbzhforDtbzhQb();
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "|SarStandardsInfoEO|自定义分页查询")
|
@ApiOperation(value = "|SarStandardsInfoEO|自定义分页查询")
|
||||||
@GetMapping("/checkIsOnly")
|
@GetMapping("/checkIsOnly")
|
||||||
public ResponseMessage checkIsOnly (SarStandardsInfoEOPage page){
|
public ResponseMessage checkIsOnly (SarStandardsInfoEOPage page){
|
||||||
|
|||||||
+4
@@ -60,4 +60,8 @@ public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
|||||||
void insertIntoIndexForMap(Map<String,Object> attrInfoMap);
|
void insertIntoIndexForMap(Map<String,Object> attrInfoMap);
|
||||||
|
|
||||||
void updateIntoIndexForMap(Map<String,Object> attrInfoMap);
|
void updateIntoIndexForMap(Map<String,Object> attrInfoMap);
|
||||||
|
|
||||||
|
void replaceBdtbzhforDtbzh();
|
||||||
|
|
||||||
|
void replaceBdtbzhforDtbzhQb();
|
||||||
}
|
}
|
||||||
|
|||||||
+243
-10
@@ -3,10 +3,19 @@ package com.adc.da.slrs.sarStandardsInfo.service.impl;
|
|||||||
import com.adc.da.att.entity.AttFileEO;
|
import com.adc.da.att.entity.AttFileEO;
|
||||||
import com.adc.da.person.entity.StandInfo;
|
import com.adc.da.person.entity.StandInfo;
|
||||||
import com.adc.da.person.entity.TsPersonCollect;
|
import com.adc.da.person.entity.TsPersonCollect;
|
||||||
|
import com.adc.da.slrs.regulations.dao.StandDataDao;
|
||||||
|
import com.adc.da.slrs.regulations.entity.SearchStandContext;
|
||||||
|
import com.adc.da.slrs.regulations.entity.StandData;
|
||||||
|
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.entity.SarBussionessStand;
|
||||||
|
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarFindDto;
|
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarFindDto;
|
||||||
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||||
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||||
|
import com.adc.da.slrs.sarStandAttrInfo.service.ISarStandAttrInfoService;
|
||||||
import com.adc.da.slrs.sarStandWarning.dao.WarningDateDao;
|
import com.adc.da.slrs.sarStandWarning.dao.WarningDateDao;
|
||||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||||
import com.adc.da.slrs.sarStandWarning.service.Impl.WarningDateServiceImpl;
|
import com.adc.da.slrs.sarStandWarning.service.Impl.WarningDateServiceImpl;
|
||||||
@@ -241,6 +250,25 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private TsDicTypeDao tsDicTypeDao;
|
private TsDicTypeDao tsDicTypeDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarStandAttrInfoService iSarStandAttrInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarStandardsInfoService sarStandardsInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarBussStandAttrInfoService iSarBussStandAttrInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarBussionessStandService iSarBussionessStandService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SarBussStandAttrInfoDao standAttrInfoDao;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StandDataDao standDataDao;
|
||||||
// /**
|
// /**
|
||||||
// * 反向操作标准
|
// * 反向操作标准
|
||||||
// */
|
// */
|
||||||
@@ -296,6 +324,217 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void replaceBdtbzhforDtbzh() {
|
||||||
|
//第一步先处理国内海外数据
|
||||||
|
//获取代替标准号不为空的数据
|
||||||
|
QueryWrapper<SarStandAttrInfo> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.isNotNull("DTBJH");
|
||||||
|
wrapper.ne("DTBJH", "");
|
||||||
|
wrapper.eq("valid_flag", "0");
|
||||||
|
List<SarStandAttrInfo> sarStandAttrInfos = sarStandAttrInfoEODao.selectList(wrapper);
|
||||||
|
if (null != sarStandAttrInfos && !sarStandAttrInfos.isEmpty()) {
|
||||||
|
//获取数据以及更新自身 新查询当前标准数据并将格式化之后的数据更新到代替标准号中
|
||||||
|
int i = 1;
|
||||||
|
for (SarStandAttrInfo sarStandAttrInfo : sarStandAttrInfos) {
|
||||||
|
String dtbzh = convertStandCodeHandle(sarStandAttrInfo.getDtbjh());
|
||||||
|
logger.info("第" + i + "行数据代替标准号为" + dtbzh + "转换前标准号为" + sarStandAttrInfo.getDtbjh());
|
||||||
|
logger.info("第" + i + "行数据为" + sarStandAttrInfo.toString());
|
||||||
|
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
|
||||||
|
wrapper2.eq("valid_flag", "0");
|
||||||
|
wrapper2.eq("stand_id", sarStandAttrInfo.getStandId());
|
||||||
|
List<SarStandAttrInfo> attrInfoList = sarStandAttrInfoEODao.selectList(wrapper2);
|
||||||
|
attrInfoList.get(0).setDtbjh(dtbzh);
|
||||||
|
sarStandAttrInfoEODao.update(attrInfoList.get(0), wrapper2);
|
||||||
|
|
||||||
|
|
||||||
|
//找到用来代替的标准号
|
||||||
|
SearchStandContext searchStandContext1 = new SearchStandContext();
|
||||||
|
searchStandContext1.setStandId(sarStandAttrInfo.getStandId());
|
||||||
|
List<StandData> list1 = standDataDao.searchStandDataThree(searchStandContext1);
|
||||||
|
if (null != list1 && list1.size() > 0) {
|
||||||
|
String bdtbzh = list1.get(0).getStandNum();
|
||||||
|
|
||||||
|
//现在针对处理一波代替标准号 根据标准号找到
|
||||||
|
if (dtbzh.contains(",") && !dtbzh.isEmpty() && !"".equals(dtbzh) && !dtbzh.contains("null") && !dtbzh.contains("Q/FT")) {
|
||||||
|
//判定是不是多个
|
||||||
|
List<String> strings = new ArrayList<>(Arrays.asList(dtbzh.split(",")));
|
||||||
|
strings.forEach(s -> {
|
||||||
|
if (StringUtils.isNotBlank(s)) {
|
||||||
|
SearchStandContext searchStandContext = new SearchStandContext();
|
||||||
|
searchStandContext.setStandCode(s);
|
||||||
|
List<StandData> list = standDataDao.searchStandDataThree(searchStandContext);
|
||||||
|
if (null != list && list.size() > 0) {
|
||||||
|
QueryWrapper<SarStandAttrInfo> wrapper1 = new QueryWrapper<>();
|
||||||
|
wrapper1.eq("valid_flag", "0");
|
||||||
|
wrapper1.eq("stand_id", list.get(0).getStandId());
|
||||||
|
List<SarStandAttrInfo> attrInfos = sarStandAttrInfoEODao.selectList(wrapper1);
|
||||||
|
if (null != attrInfos && attrInfos.size() > 0) {
|
||||||
|
if (null != attrInfos.get(0).getBdtbzh() && !"".equals(attrInfos.get(0).getBdtbzh())) {
|
||||||
|
if (!attrInfos.get(0).getBdtbzh().contains(bdtbzh)) {
|
||||||
|
attrInfos.get(0).setBdtbzh(attrInfos.get(0).getBdtbzh() + "," + bdtbzh);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
attrInfos.get(0).setBdtbzh(bdtbzh);
|
||||||
|
}
|
||||||
|
sarStandAttrInfoEODao.update(attrInfos.get(0), wrapper1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else if (!dtbzh.isEmpty() && !"".equals(dtbzh) && !dtbzh.contains("null") && !dtbzh.contains("Q/FT")) {
|
||||||
|
//单个
|
||||||
|
SearchStandContext searchStandContext = new SearchStandContext();
|
||||||
|
searchStandContext.setStandCode(dtbzh);
|
||||||
|
List<StandData> list = standDataDao.searchStandDataThree(searchStandContext);
|
||||||
|
if (null != list && list.size() > 0) {
|
||||||
|
QueryWrapper<SarStandAttrInfo> wrapper1 = new QueryWrapper<>();
|
||||||
|
wrapper1.eq("valid_flag", "0");
|
||||||
|
wrapper1.eq("stand_id", list.get(0).getStandId());
|
||||||
|
List<SarStandAttrInfo> attrInfos = sarStandAttrInfoEODao.selectList(wrapper1);
|
||||||
|
if (null != attrInfos && attrInfos.size() > 0) {
|
||||||
|
if (null != attrInfos.get(0).getBdtbzh() && !"".equals(attrInfos.get(0).getBdtbzh())) {
|
||||||
|
if (!attrInfos.get(0).getBdtbzh().contains(bdtbzh)) {
|
||||||
|
attrInfos.get(0).setBdtbzh(attrInfos.get(0).getBdtbzh() + "," + bdtbzh);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
attrInfos.get(0).setBdtbzh(bdtbzh);
|
||||||
|
}
|
||||||
|
sarStandAttrInfoEODao.update(attrInfos.get(0), wrapper1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void replaceBdtbzhforDtbzhQb() {
|
||||||
|
//第一步先处理国内海外数据
|
||||||
|
//获取代替标准号不为空的数据
|
||||||
|
QueryWrapper<SarBussStandAttrInfo> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.isNotNull("DTQBBHBUSS");
|
||||||
|
wrapper.ne("DTQBBHBUSS", "");
|
||||||
|
wrapper.eq("valid_flag", "0");
|
||||||
|
// wrapper.eq("STAND_ID","ruxmkyu3d6bgdg7wehkv");
|
||||||
|
List<SarBussStandAttrInfo> sarStandAttrInfos = standAttrInfoDao.selectList(wrapper);
|
||||||
|
if (null != sarStandAttrInfos && !sarStandAttrInfos.isEmpty()) {
|
||||||
|
//获取数据以及更新自身 新查询当前标准数据并将格式化之后的数据更新到代替标准号中
|
||||||
|
int i = 1;
|
||||||
|
for (SarBussStandAttrInfo sarBussStandAttrInfo : sarStandAttrInfos) {
|
||||||
|
String dtbzh = convertStandCodeHandle(sarBussStandAttrInfo.getDtqbbhbuss());
|
||||||
|
logger.info("第" + i + "行数据代替标准号为" + dtbzh + "转换前标准号为" + sarBussStandAttrInfo.getDtqbbhbuss());
|
||||||
|
logger.info("第" + i + "行数据为" + sarBussStandAttrInfo.toString());
|
||||||
|
QueryWrapper<SarBussStandAttrInfo> wrapper2 = new QueryWrapper<>();
|
||||||
|
wrapper2.eq("valid_flag", "0");
|
||||||
|
wrapper2.eq("stand_id", sarBussStandAttrInfo.getStandId());
|
||||||
|
List<SarBussStandAttrInfo> attrInfoList = standAttrInfoDao.selectList(wrapper2);
|
||||||
|
attrInfoList.get(0).setDtqbbhbuss(dtbzh);
|
||||||
|
standAttrInfoDao.update(attrInfoList.get(0), wrapper2);
|
||||||
|
|
||||||
|
|
||||||
|
//找到用来代替的标准号
|
||||||
|
SearchStandContext searchStandContext1 = new SearchStandContext();
|
||||||
|
searchStandContext1.setStandId(sarBussStandAttrInfo.getStandId());
|
||||||
|
List<StandData> list1 = standDataDao.searchStandDataThree(searchStandContext1);
|
||||||
|
if (null != list1 && list1.size() > 0) {
|
||||||
|
String bdtbzh = list1.get(0).getStandNum();
|
||||||
|
|
||||||
|
//现在针对处理一波代替标准号 根据标准号找到
|
||||||
|
if (dtbzh.contains(",") && !dtbzh.isEmpty() && !"".equals(dtbzh) ) {
|
||||||
|
//判定是不是多个
|
||||||
|
List<String> strings = new ArrayList<>(Arrays.asList(dtbzh.split(",")));
|
||||||
|
strings.forEach(s -> {
|
||||||
|
if (StringUtils.isNotBlank(s)) {
|
||||||
|
SearchStandContext searchStandContext = new SearchStandContext();
|
||||||
|
searchStandContext.setStandCode(s);
|
||||||
|
List<StandData> list = standDataDao.searchStandDataThree(searchStandContext);
|
||||||
|
if (null != list && list.size() > 0) {
|
||||||
|
QueryWrapper<SarBussStandAttrInfo> wrapper1 = new QueryWrapper<>();
|
||||||
|
wrapper1.eq("valid_flag", "0");
|
||||||
|
wrapper1.eq("stand_id", list.get(0).getStandId());
|
||||||
|
List<SarBussStandAttrInfo> attrInfos = standAttrInfoDao.selectList(wrapper1);
|
||||||
|
if (null != attrInfos && attrInfos.size() > 0) {
|
||||||
|
if (null != attrInfos.get(0).getBdtqbbhbuss() && !"".equals(attrInfos.get(0).getBdtqbbhbuss())) {
|
||||||
|
if (!attrInfos.get(0).getBdtqbbhbuss().contains(bdtbzh)) {
|
||||||
|
attrInfos.get(0).setBdtqbbhbuss(attrInfos.get(0).getBdtqbbhbuss() + "," + bdtbzh);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
attrInfos.get(0).setBdtqbbhbuss(bdtbzh);
|
||||||
|
}
|
||||||
|
standAttrInfoDao.update(attrInfos.get(0), wrapper1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else if (!dtbzh.isEmpty() && !"".equals(dtbzh) ) {
|
||||||
|
//单个
|
||||||
|
SearchStandContext searchStandContext = new SearchStandContext();
|
||||||
|
searchStandContext.setStandCode(dtbzh);
|
||||||
|
List<StandData> list = standDataDao.searchStandDataThree(searchStandContext);
|
||||||
|
if (null != list && list.size() > 0) {
|
||||||
|
QueryWrapper<SarBussStandAttrInfo> wrapper1 = new QueryWrapper<>();
|
||||||
|
wrapper1.eq("valid_flag", "0");
|
||||||
|
wrapper1.eq("stand_id", list.get(0).getStandId());
|
||||||
|
List<SarBussStandAttrInfo> attrInfos = standAttrInfoDao.selectList(wrapper1);
|
||||||
|
if (null != attrInfos && attrInfos.size() > 0) {
|
||||||
|
if (null != attrInfos.get(0).getBdtqbbhbuss() && !"".equals(attrInfos.get(0).getBdtqbbhbuss())) {
|
||||||
|
if (!attrInfos.get(0).getBdtqbbhbuss().contains(bdtbzh)) {
|
||||||
|
attrInfos.get(0).setBdtqbbhbuss(attrInfos.get(0).getBdtqbbhbuss() + "," + bdtbzh);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
attrInfos.get(0).setBdtqbbhbuss(bdtbzh);
|
||||||
|
}
|
||||||
|
standAttrInfoDao.update(attrInfos.get(0), wrapper1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private String convertStandCodeHandle(String standCode) {
|
||||||
|
if (StringUtils.isNotBlank(standCode)) {
|
||||||
|
standCode = standCode.replaceAll("—", "-");
|
||||||
|
standCode = standCode.replaceAll(" -", "-");
|
||||||
|
standCode = standCode.replaceAll("-", "-");
|
||||||
|
standCode = standCode.replaceAll(" - ", "-");
|
||||||
|
standCode = standCode.replaceAll(" ", " ");
|
||||||
|
standCode = standCode.replaceAll("—", "-");
|
||||||
|
standCode = standCode.replaceAll("Q-QCBFC", "Q/QCBFC");
|
||||||
|
standCode = standCode.replaceAll("Q-FT", "Q/FT");
|
||||||
|
standCode = standCode.replaceAll("Q/ FT", "Q/FT");
|
||||||
|
standCode = standCode.replaceAll(" -", "-");
|
||||||
|
standCode = standCode.replaceAll("-", "-");
|
||||||
|
standCode = standCode.replaceAll("Q/QCFLC", "Q/QCFLC");
|
||||||
|
standCode = standCode.replaceAll(" ", " ");
|
||||||
|
standCode = standCode.replaceAll("—", "-");
|
||||||
|
standCode = standCode.replaceAll("(", "(");
|
||||||
|
standCode = standCode.replaceAll(")", ")");
|
||||||
|
standCode = standCode.replaceAll(" -", "-");
|
||||||
|
standCode = standCode.replaceAll("-", "-");
|
||||||
|
standCode = standCode.replaceAll(":", ":");
|
||||||
|
standCode = standCode.replaceAll("Part", "PART");
|
||||||
|
standCode = standCode.replaceAll(",", ",");
|
||||||
|
standCode = standCode.replaceAll("、", ",");
|
||||||
|
// standCode = standCode.replaceAll("--", "");
|
||||||
|
// standCode = standCode.replaceAll("-", "");
|
||||||
|
// standCode = standCode.replaceAll("_", "");
|
||||||
|
if ("--".equals(standCode) || "-".equals(standCode) || "_".equals(standCode)) {
|
||||||
|
standCode = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return standCode;
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* @Description: 分页查询
|
* @Description: 分页查询
|
||||||
* @Author: super_liu
|
* @Author: super_liu
|
||||||
@@ -706,7 +945,8 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
value = String.join(",", stringList.isEmpty() ? valArr : stringList);
|
value = String.join(",", stringList.isEmpty() ? valArr : stringList);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:value = dicTypeEODao.getDicNamesByCodes(valArr,"");
|
default:
|
||||||
|
value = dicTypeEODao.getDicNamesByCodes(valArr, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -815,7 +1055,6 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
String value = "";
|
String value = "";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ("SVPPS".equals(name)) {
|
if ("SVPPS".equals(name)) {
|
||||||
Object svpps = entry.getValue();
|
Object svpps = entry.getValue();
|
||||||
if (svpps != null && StringUtils.isNotBlank(svpps.toString())) {
|
if (svpps != null && StringUtils.isNotBlank(svpps.toString())) {
|
||||||
@@ -1159,7 +1398,6 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void createStandPutTime(String standId, Map<String, String> multiTimeMap) throws Exception {
|
public void createStandPutTime(String standId, Map<String, String> multiTimeMap) throws Exception {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
if (multiTimeMap != null && multiTimeMap.size() > 0) {
|
if (multiTimeMap != null && multiTimeMap.size() > 0) {
|
||||||
@@ -1568,8 +1806,6 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
//2.判断修改的标准的"国家/地区"与清单中的是否一致,一致则添加到清单中,不一致不作处理
|
//2.判断修改的标准的"国家/地区"与清单中的是否一致,一致则添加到清单中,不一致不作处理
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String standId = sarStandardsInfoEO.getId();
|
String standId = sarStandardsInfoEO.getId();
|
||||||
// 查询修改前数据信息,为修改代替标准号使用
|
// 查询修改前数据信息,为修改代替标准号使用
|
||||||
SarStandardsInfo beforeSarStandardsInfo = dao.selectById(standId);
|
SarStandardsInfo beforeSarStandardsInfo = dao.selectById(standId);
|
||||||
@@ -2547,7 +2783,6 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SarStandardsInfo> getStandInfoByList(String limit) {
|
public List<SarStandardsInfo> getStandInfoByList(String limit) {
|
||||||
|
|
||||||
@@ -2765,8 +3000,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
attrInfoMap.put("content", content.toString());
|
attrInfoMap.put("content", content.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
attrInfoMap.put("content", "");
|
attrInfoMap.put("content", "");
|
||||||
}
|
}
|
||||||
standLawsSearchService.addStandLawsSearchForMap(attrInfoMap);
|
standLawsSearchService.addStandLawsSearchForMap(attrInfoMap);
|
||||||
@@ -2832,8 +3066,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
attrInfoMap.put("content", content.toString());
|
attrInfoMap.put("content", content.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
attrInfoMap.put("content", "");
|
attrInfoMap.put("content", "");
|
||||||
}
|
}
|
||||||
standLawsSearchService.updateStandLawsSearchForMap(attrInfoMap);
|
standLawsSearchService.updateStandLawsSearchForMap(attrInfoMap);
|
||||||
|
|||||||
@@ -62,11 +62,14 @@
|
|||||||
<select id="searchStandDataThree" resultMap="BaseResultMap">
|
<select id="searchStandDataThree" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
t.standId,
|
t.standId,
|
||||||
t.standType
|
t.standType,
|
||||||
|
t.standNum
|
||||||
FROM (
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
sar_standards_info.id AS standId,
|
sar_standards_info.id AS standId,
|
||||||
sar_standards_info.STAND_TYPE AS standType
|
sar_standards_info.STAND_TYPE AS standType,
|
||||||
|
concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||||
|
SAR_STANDARDS_INFO.STAND_YEAR) as standNum
|
||||||
FROM
|
FROM
|
||||||
sar_standards_info
|
sar_standards_info
|
||||||
LEFT JOIN SAR_STAND_ATTR_INFO ON (
|
LEFT JOIN SAR_STAND_ATTR_INFO ON (
|
||||||
@@ -82,6 +85,9 @@
|
|||||||
and (SAR_STAND_ATTR_INFO.KCCVPPSCN like concat('%',#{vppsName},'%') or SAR_STAND_ATTR_INFO.CYCVPPSCN like
|
and (SAR_STAND_ATTR_INFO.KCCVPPSCN like concat('%',#{vppsName},'%') or SAR_STAND_ATTR_INFO.CYCVPPSCN like
|
||||||
concat('%',#{vppsName},'%'))
|
concat('%',#{vppsName},'%'))
|
||||||
</if>
|
</if>
|
||||||
|
<if test="standId != null and standId != ''">
|
||||||
|
and sar_standards_info.ID = #{standId}
|
||||||
|
</if>
|
||||||
<if test="standCode != null and standCode != ''">
|
<if test="standCode != null and standCode != ''">
|
||||||
and (
|
and (
|
||||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||||
@@ -93,7 +99,8 @@
|
|||||||
UNION
|
UNION
|
||||||
SELECT
|
SELECT
|
||||||
sar_bussioness_stand.id AS standId,
|
sar_bussioness_stand.id AS standId,
|
||||||
'BUSINESS_STAND' AS standType
|
'BUSINESS_STAND' AS standType,
|
||||||
|
SAR_BUSSIONESS_STAND.STAND_CODE as standNum
|
||||||
FROM
|
FROM
|
||||||
sar_bussioness_stand
|
sar_bussioness_stand
|
||||||
LEFT JOIN sar_buss_stand_attr_info ON (
|
LEFT JOIN sar_buss_stand_attr_info ON (
|
||||||
@@ -113,11 +120,15 @@
|
|||||||
and (SAR_BUSSIONESS_STAND.STAND_CODE = #{standCode}
|
and (SAR_BUSSIONESS_STAND.STAND_CODE = #{standCode}
|
||||||
or REPLACE( SAR_BUSSIONESS_STAND.STAND_CODE,' ','') = REPLACE( #{standCode},' ',''))
|
or REPLACE( SAR_BUSSIONESS_STAND.STAND_CODE,' ','') = REPLACE( #{standCode},' ',''))
|
||||||
</if>
|
</if>
|
||||||
|
<if test="standId != null and standId != ''">
|
||||||
|
and sar_bussioness_stand.ID = #{standId}
|
||||||
|
</if>
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
SELECT
|
SELECT
|
||||||
SAR_LAWS_STAND_INFO.id AS standId,
|
SAR_LAWS_STAND_INFO.id AS standId,
|
||||||
'LAWS_TYPE' AS standType
|
'LAWS_TYPE' AS standType,
|
||||||
|
SAR_LAWS_STAND_INFO.LAWS_NUMBER as standNum
|
||||||
FROM
|
FROM
|
||||||
SAR_LAWS_STAND_INFO
|
SAR_LAWS_STAND_INFO
|
||||||
LEFT JOIN sar_laws_attr_info ON (
|
LEFT JOIN sar_laws_attr_info ON (
|
||||||
@@ -129,7 +140,9 @@
|
|||||||
<if test="standCode != null and standCode != ''">
|
<if test="standCode != null and standCode != ''">
|
||||||
and SAR_LAWS_STAND_INFO.LAWS_NUMBER = #{standCode}
|
and SAR_LAWS_STAND_INFO.LAWS_NUMBER = #{standCode}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="standId != null and standId != ''">
|
||||||
|
and SAR_LAWS_STAND_INFO.ID = #{standId}
|
||||||
|
</if>
|
||||||
) t
|
) t
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user