feat: 标准库MQ
This commit is contained in:
+37
-33
@@ -6,6 +6,7 @@ import com.adc.da.att.vo.AttFileVo;
|
||||
import com.adc.da.common.*;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.mq.service.CreateStandMQService;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.dao.PersonShareEODao;
|
||||
import com.adc.da.person.entity.PersonMsgEO;
|
||||
@@ -171,6 +172,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Autowired
|
||||
private ITsResourceService iTsResourceService;
|
||||
|
||||
@Autowired
|
||||
private CreateStandMQService createStandMQService;
|
||||
|
||||
|
||||
/***
|
||||
* @Description: 分页查询
|
||||
@@ -996,39 +1000,39 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
// replaseStandState(sarStandardsInfoEO);
|
||||
// 记录修改日志
|
||||
saveUpdateLog(sarStandardsInfoEO, beforeSarStandardsInfo);
|
||||
// if(elasflag) {
|
||||
// createStandMQService.sendStandMQ(sarStandardsInfoEO,"update");
|
||||
// List<String> bhs = new ArrayList<>(Arrays.asList(String.valueOf(map.get("DTBJH")).split(",")));
|
||||
// for (String bh :bhs) {
|
||||
// SarStandardsInfoEOPage page = new SarStandardsInfoEOPage();
|
||||
// int countStand = 10000;
|
||||
// int countSuccess = 0;
|
||||
// page.setValidFlag("0");
|
||||
// page.setPageSize(countStand);
|
||||
// page.setMenuId("nomenu");
|
||||
// page.setStandType("ALL");
|
||||
// page.setStandNumber(bh);
|
||||
// List<SarStandardsInfo> rowsStand = dao.selectStandardsInfoBynumber(page);
|
||||
// for (SarStandardsInfo sarStandardsInfo : rowsStand) {
|
||||
// List<SarStandardsInfo> sarStandardsInfoEOS = new ArrayList<>();
|
||||
// sarStandardsInfoEOS.add(sarStandardsInfo);
|
||||
// attrInfo(sarStandardsInfoEOS);
|
||||
// if (sarStandardsInfoEOS.size()>0) {
|
||||
// sarStandardsInfo = sarStandardsInfoEOS.get(0);
|
||||
// countSuccess++;
|
||||
// if (sarStandardsInfo.getAttrInfoMap() != null) {
|
||||
// if (sarStandardsInfo.getAttrInfoMap().containsKey("BDTBZBH")){
|
||||
// String bdtbh = String.valueOf(sarStandardsInfo.getAttrInfoMap().get("BDTBZBH"));
|
||||
// sarStandardsInfo.getAttrInfoMap().put("BDTBH", bdtbh);
|
||||
// sarStandardsInfo.setSarStandAttrEOStr(com.alibaba.fastjson.JSONObject.toJSONString(sarStandardsInfo.getAttrInfoMap()));
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// createStandMQService.sendStandMQ(sarStandardsInfo, "update");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if(elasflag) {
|
||||
createStandMQService.sendStandMQ(sarStandardsInfoEO,"update");
|
||||
List<String> bhs = new ArrayList<>(Arrays.asList(String.valueOf(map.get("DTBJH")).split(",")));
|
||||
for (String bh :bhs) {
|
||||
SarStandardsInfoEOPage page = new SarStandardsInfoEOPage();
|
||||
int countStand = 10000;
|
||||
int countSuccess = 0;
|
||||
page.setValidFlag("0");
|
||||
page.setPageSize(countStand);
|
||||
page.setMenuId("nomenu");
|
||||
page.setStandType("ALL");
|
||||
page.setStandNumber(bh);
|
||||
List<SarStandardsInfo> rowsStand = dao.selectStandardsInfoBynumber(page);
|
||||
for (SarStandardsInfo sarStandardsInfo : rowsStand) {
|
||||
List<SarStandardsInfo> sarStandardsInfoEOS = new ArrayList<>();
|
||||
sarStandardsInfoEOS.add(sarStandardsInfo);
|
||||
attrInfo(sarStandardsInfoEOS);
|
||||
if (sarStandardsInfoEOS.size()>0) {
|
||||
sarStandardsInfo = sarStandardsInfoEOS.get(0);
|
||||
countSuccess++;
|
||||
if (sarStandardsInfo.getAttrInfoMap() != null) {
|
||||
if (sarStandardsInfo.getAttrInfoMap().containsKey("BDTBZBH")){
|
||||
String bdtbh = String.valueOf(sarStandardsInfo.getAttrInfoMap().get("BDTBZBH"));
|
||||
sarStandardsInfo.getAttrInfoMap().put("BDTBH", bdtbh);
|
||||
sarStandardsInfo.setSarStandAttrEOStr(com.alibaba.fastjson.JSONObject.toJSONString(sarStandardsInfo.getAttrInfoMap()));
|
||||
}
|
||||
|
||||
}
|
||||
createStandMQService.sendStandMQ(sarStandardsInfo, "update");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user