feat: There is no way the
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package com.adc.da.mq.service;
|
package com.adc.da.mq.service;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
|
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import org.springframework.amqp.core.AmqpTemplate;
|
import org.springframework.amqp.core.AmqpTemplate;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -29,4 +31,27 @@ public class CreateStandMQService {
|
|||||||
//发送消息队列
|
//发送消息队列
|
||||||
this.rabbitTemplate.convertAndSend("stand-exchange_SQ_GSAR", "stand-key_SQ_GSAR", standMap);
|
this.rabbitTemplate.convertAndSend("stand-exchange_SQ_GSAR", "stand-key_SQ_GSAR", standMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sendLawsMQ(SarLawsInfo sarLawsInfoEO, String addOrUpdate) throws Exception{
|
||||||
|
JSONObject json = JSONObject.fromObject(sarLawsInfoEO);
|
||||||
|
String sarLawsInfoStr = json.toString();
|
||||||
|
Map<String,Object> lawsMap = new HashMap<String,Object>();
|
||||||
|
lawsMap.put("sarLaws", sarLawsInfoStr);
|
||||||
|
lawsMap.put("addOrUpdate", addOrUpdate);
|
||||||
|
|
||||||
|
//发送消息队列
|
||||||
|
this.rabbitTemplate.convertAndSend("laws-exchange_SQ_GSAR", "laws-key_SQ_GSAR", lawsMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendBussStandMQ(SarBussionessStand sarBussionessStandEO, String addOrUpdate) throws Exception{
|
||||||
|
JSONObject json = JSONObject.fromObject(sarBussionessStandEO);
|
||||||
|
String sarBussInfoStr = json.toString();
|
||||||
|
Map<String,Object> bussMap = new HashMap<String,Object>();
|
||||||
|
bussMap.put("sarBuss", sarBussInfoStr);
|
||||||
|
bussMap.put("addOrUpdate", addOrUpdate);
|
||||||
|
|
||||||
|
//发送消息队列
|
||||||
|
this.rabbitTemplate.convertAndSend("buss-exchange_SQ_GSAR", "buss-key_SQ_GSAR", bussMap);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,408 @@
|
|||||||
|
//package com.adc.da.mq.service;
|
||||||
|
//
|
||||||
|
//import com.adc.da.lawss.entity.OtSvppsEO;
|
||||||
|
//import com.adc.da.lawss.entity.SarBussionessStandEO;
|
||||||
|
//import com.adc.da.lawss.entity.SarFullNumEO;
|
||||||
|
//import com.adc.da.lawss.page.SarFullNumEOPage;
|
||||||
|
//import com.adc.da.lawss.service.OtSvppsEOService;
|
||||||
|
//import com.adc.da.lawss.service.SarFullNumEOService;
|
||||||
|
//import com.adc.da.lawss.service.SarStandAndLawsEOService;
|
||||||
|
//import com.adc.da.lawss.service.SysInfoEOService;
|
||||||
|
//import com.adc.da.search.entity.StandLawsEO;
|
||||||
|
//import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
||||||
|
//import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
|
//import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||||
|
//import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||||
|
//import com.adc.da.sys.dao.DicTypeEODao;
|
||||||
|
//import com.adc.da.utils.util.InitStandAttrUtil;
|
||||||
|
//import com.rabbitmq.client.Channel;
|
||||||
|
//import net.sf.json.JSONObject;
|
||||||
|
//import org.apache.commons.lang.StringUtils;
|
||||||
|
//import org.json.JSONTokener;
|
||||||
|
//import org.slf4j.Logger;
|
||||||
|
//import org.slf4j.LoggerFactory;
|
||||||
|
//import org.springframework.amqp.rabbit.annotation.Exchange;
|
||||||
|
//import org.springframework.amqp.rabbit.annotation.Queue;
|
||||||
|
//import org.springframework.amqp.rabbit.annotation.QueueBinding;
|
||||||
|
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||||
|
//import org.springframework.amqp.support.AmqpHeaders;
|
||||||
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
//import org.springframework.messaging.Message;
|
||||||
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
|
//import java.text.ParseException;
|
||||||
|
//import java.text.SimpleDateFormat;
|
||||||
|
//import java.util.*;
|
||||||
|
//import java.util.stream.Collectors;
|
||||||
|
//
|
||||||
|
//@Component
|
||||||
|
//public class SendBussMQService {
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private ISarStandardsInfoService sarStandardsInfoService;
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private SysInfoEOService sysInfoEOService;
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private DicTypeEODao dicTypeEODao;
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private IOtSvppsService otSvppsEOService;
|
||||||
|
//
|
||||||
|
// private static final Logger logger = LoggerFactory.getLogger(SendBussMQService.class);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// @RabbitListener(bindings = @QueueBinding(
|
||||||
|
// value = @Queue(value = "createBussMQ_SQ_GSAR", durable = "true"),
|
||||||
|
// exchange = @Exchange(value = "buss-exchange_SQ_GSAR", ignoreDeclarationExceptions = "true"),
|
||||||
|
// key = "buss-key_SQ_GSAR"))
|
||||||
|
// public void createMQ(Map<String,Object> bussMap, Message message, Channel channel) throws Exception{
|
||||||
|
// try{
|
||||||
|
// try{
|
||||||
|
// Thread.sleep(5000);
|
||||||
|
// insertOrUpdateBussInfo(bussMap);
|
||||||
|
// }catch(InterruptedException e){
|
||||||
|
// logger.error(e.toString());
|
||||||
|
// Thread.currentThread().interrupt();
|
||||||
|
// }
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// logger.error("搜索中心企业标准消息队列进入转换前失败!");
|
||||||
|
// logger.error(e.getMessage(),e);
|
||||||
|
// } finally {
|
||||||
|
// Long tag = (Long) message.getHeaders().get(AmqpHeaders.DELIVERY_TAG);
|
||||||
|
// channel.basicAck(tag,false);
|
||||||
|
// logger.debug("消息确认成功!!!!!!!!!");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void insertOrUpdateBussInfo(Map<String,Object> bussMap) throws Exception {
|
||||||
|
// String addOrUpdate = bussMap.get("addOrUpdate").toString();
|
||||||
|
// String FZRQFSRQ = null;
|
||||||
|
// if ("updateFromAct".equals(addOrUpdate)){
|
||||||
|
// addOrUpdate = "update";
|
||||||
|
// FZRQFSRQ = "1";
|
||||||
|
// }
|
||||||
|
// String sarBuss = bussMap.get("sarBuss").toString();
|
||||||
|
// JSONObject jsonobject = JSONObject.fromObject(sarBuss);
|
||||||
|
// SarBussionessStand infoEO = (SarBussionessStand) JSONObject.toBean(jsonobject, SarBussionessStand.class);
|
||||||
|
// String jsonobject1 = infoEO.getSarStandAttrEOStr();
|
||||||
|
// Map<String,Object> map1 = new HashMap<>();
|
||||||
|
// if (StringUtils.isEmpty(jsonobject1)){
|
||||||
|
// map1.put("null","null");
|
||||||
|
// }else {
|
||||||
|
// map1 = JSONObject.fromObject(jsonobject1);
|
||||||
|
// }
|
||||||
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
// //修改索引信息表
|
||||||
|
// // 往索引表中插入数据
|
||||||
|
// String baseSearchContent = "";
|
||||||
|
// String getCodeName = "";
|
||||||
|
// Map<String,Object> saveMap = new HashMap<>();
|
||||||
|
// String a = null;
|
||||||
|
// try{
|
||||||
|
// a = sdf.format(infoEO.getIssueTime());
|
||||||
|
// saveMap.put("issue_time"," "+a);
|
||||||
|
// }catch (Exception e){
|
||||||
|
// saveMap.put("issue_time"," ");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// //发布日期 高级查询
|
||||||
|
// Date issue_time_data = null;
|
||||||
|
// if (StringUtils.isNotBlank(a)) {
|
||||||
|
// try {
|
||||||
|
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
// issue_time_data = format.parse(saveMap.get("issue_time")+" 00:00:00");
|
||||||
|
// } catch (ParseException ignored) {
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (issue_time_data != null) {
|
||||||
|
// Calendar calendar = Calendar.getInstance();
|
||||||
|
// calendar.setTime(issue_time_data);
|
||||||
|
// int month = calendar.get(Calendar.MONTH)+1;
|
||||||
|
// String times = calendar.get(Calendar.YEAR) + String.format("%02d", month) + String.format("%02d",calendar.get(Calendar.DAY_OF_MONTH));
|
||||||
|
// saveMap.put("issue_time_data",Long.valueOf(times));
|
||||||
|
// }else{
|
||||||
|
// saveMap.put("issue_time_data",-1000000000000000000L);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// try{
|
||||||
|
// saveMap.put("put_time"," "+ sdf.format(infoEO.getPutTime()));
|
||||||
|
// }catch (Exception e){
|
||||||
|
// saveMap.put("put_time"," ");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //实施日期 高级查询
|
||||||
|
// Date put_time_data = null;
|
||||||
|
// if (StringUtils.isNotBlank(a)) {
|
||||||
|
// try {
|
||||||
|
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
// put_time_data = format.parse(saveMap.get("put_time")+" 00:00:00");
|
||||||
|
// } catch (ParseException ignored) {
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (put_time_data != null) {
|
||||||
|
// Calendar calendar = Calendar.getInstance();
|
||||||
|
// calendar.setTime(put_time_data);
|
||||||
|
// int month = calendar.get(Calendar.MONTH)+1;
|
||||||
|
// String times = calendar.get(Calendar.YEAR) + String.format("%02d", month) + String.format("%02d",calendar.get(Calendar.DAY_OF_MONTH));
|
||||||
|
// saveMap.put("put_time_data",Long.valueOf(times));
|
||||||
|
// }else{
|
||||||
|
// saveMap.put("put_time_data",-1000000000000000000L);
|
||||||
|
// }
|
||||||
|
//// saveMap.put("put_time",sdf.format(infoEO.getPutTime()));
|
||||||
|
//
|
||||||
|
// saveMap.put("id",infoEO.getId());
|
||||||
|
// saveMap.put("standSort",infoEO.getStandSort());
|
||||||
|
// saveMap.put("stand_sort",infoEO.getStandSort());
|
||||||
|
// if(StringUtils.isNotEmpty(infoEO.getStandSort())){
|
||||||
|
// String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort());
|
||||||
|
// saveMap.put("standSortShow",codeName);
|
||||||
|
// getCodeName = codeName;
|
||||||
|
// }
|
||||||
|
// String realContent = "";
|
||||||
|
// if (map1.containsKey("QBWB")) {
|
||||||
|
// String content = String.valueOf(map1.get("QBWB"));
|
||||||
|
// String[] ids = content.split(",");
|
||||||
|
// for (String id :ids) {
|
||||||
|
// if (!"null".equals(id) && StringUtils.isNotBlank(id)) {
|
||||||
|
// if ("".equals(realContent)) {
|
||||||
|
// realContent += id;
|
||||||
|
// } else {
|
||||||
|
// realContent = realContent + "," + id;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (map1.containsKey("GCWB")) {
|
||||||
|
// String content = String.valueOf(map1.get("GCWB"));
|
||||||
|
// String[] ids = content.split(",");
|
||||||
|
// for (String id :ids) {
|
||||||
|
// if (!"null".equals(id) && StringUtils.isNotBlank(id)) {
|
||||||
|
// if ("".equals(realContent)) {
|
||||||
|
// realContent += id;
|
||||||
|
// } else {
|
||||||
|
// realContent = realContent + "," + id;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// saveMap.put("content",realContent);
|
||||||
|
// saveMap.put("standYear",infoEO.getStandYear());
|
||||||
|
// saveMap.put("stand_year",infoEO.getStandYear());
|
||||||
|
// saveMap.put("standNumber",infoEO.getStandCode());
|
||||||
|
// saveMap.put("stand_code",infoEO.getStandCode());
|
||||||
|
// saveMap = dealNumberMsg(saveMap,infoEO,getCodeName);
|
||||||
|
// saveMap.put("nameshow",infoEO.getStandName());
|
||||||
|
// saveMap.put("stand_name",infoEO.getStandName());
|
||||||
|
// saveMap.put("standEnName",infoEO.getStandEnName());
|
||||||
|
// saveMap.put("stand_en_name",infoEO.getStandEnName());
|
||||||
|
// saveMap.put("replaceStandNum",infoEO.getReplaceStandNum());
|
||||||
|
// saveMap.put("replace_stand_num",infoEO.getReplaceStandNum());
|
||||||
|
// saveMap.put("replacedStandNum",infoEO.getReplacedStandNum());
|
||||||
|
// saveMap.put("replaced_stand_num",infoEO.getReplacedStandNum());
|
||||||
|
// saveMap.put("statecode",infoEO.getStandStatus());
|
||||||
|
// saveMap.put("stand_status",infoEO.getStandStatus());
|
||||||
|
// if (StringUtils.isNotEmpty(infoEO.getStandStatus())) {
|
||||||
|
// String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandStatus());
|
||||||
|
// saveMap.put("standstateshow",codeName);
|
||||||
|
// }
|
||||||
|
// //新加字段
|
||||||
|
// saveMap.put("country",infoEO.getApplyCountry());
|
||||||
|
// if(StringUtils.isNotEmpty(infoEO.getApplyCountry())){
|
||||||
|
// String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getApplyCountry());
|
||||||
|
// saveMap.put("countryShow",codeName);
|
||||||
|
// }
|
||||||
|
// // 自定义属性字段
|
||||||
|
// String sarStandAttrEOStr = infoEO.getSarStandAttrEOStr();
|
||||||
|
// Map<String,Object> attrInfoMap = new HashMap<>();
|
||||||
|
// if (StringUtils.isEmpty(sarStandAttrEOStr)){
|
||||||
|
// attrInfoMap.put("null","null");
|
||||||
|
// }else {
|
||||||
|
// attrInfoMap = JSONObject.fromObject(sarStandAttrEOStr);
|
||||||
|
// }
|
||||||
|
// if (attrInfoMap != null && !attrInfoMap.isEmpty()) {
|
||||||
|
// attrInfoMap = sysInfoEOService.changeSelectInfo(attrInfoMap, "bussstand",baseSearchContent);
|
||||||
|
// saveMap.putAll(attrInfoMap);
|
||||||
|
// }
|
||||||
|
// String FSRQ = null;
|
||||||
|
// if (attrInfoMap != null) {
|
||||||
|
// if (attrInfoMap.containsKey("FSRQ")){
|
||||||
|
// if ("1".equals(FZRQFSRQ)){
|
||||||
|
// Long times = Long.valueOf(String.valueOf(attrInfoMap.get("FSRQ")).trim());
|
||||||
|
// Date fsrq1 = new Date(times);
|
||||||
|
// attrInfoMap.put("FSRQ",sdf.format(fsrq1));
|
||||||
|
// }
|
||||||
|
// try{
|
||||||
|
// if (String.valueOf(attrInfoMap.get("FSRQ")).trim().length()>10) {
|
||||||
|
// FSRQ = String.valueOf(attrInfoMap.get("FSRQ")).trim().substring(0, 10) + " 00:00:00";
|
||||||
|
// }else{
|
||||||
|
// FSRQ = String.valueOf(attrInfoMap.get("FSRQ")).trim() + " 00:00:00";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// saveMap.put("FSRQString"," "+FSRQ.substring(0, 10));
|
||||||
|
// saveMap.put("FSRQDate"," "+FSRQ.substring(0, 10).replace("-",""));
|
||||||
|
// FSRQ = String.valueOf(FSRQ.substring(0, 10).replace("-",""));
|
||||||
|
// saveMap.put("FSRQ"," "+FSRQ);
|
||||||
|
// }catch (Exception e){
|
||||||
|
// saveMap.put("FSRQString"," ");
|
||||||
|
// saveMap.put("FSRQDate"," "+" ");
|
||||||
|
// }
|
||||||
|
// }else{
|
||||||
|
// saveMap.put("FSRQString"," ");
|
||||||
|
// saveMap.put("FSRQDate"," "+" ");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// String FZRQ = null;
|
||||||
|
// if (attrInfoMap != null && attrInfoMap.containsKey("FZRQ")) {
|
||||||
|
// if ("1".equals(FZRQFSRQ)){
|
||||||
|
// Long times = Long.valueOf(String.valueOf(attrInfoMap.get("FZRQ")).trim());
|
||||||
|
// Date fzrq1 = new Date(times);
|
||||||
|
// String timeFzrq = sdf.format(fzrq1);
|
||||||
|
// if (timeFzrq.trim().length()>10){
|
||||||
|
// timeFzrq = timeFzrq.trim().substring(0,10);
|
||||||
|
// }
|
||||||
|
// attrInfoMap.put("FZRQ",timeFzrq);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// try{
|
||||||
|
// if (String.valueOf(attrInfoMap.get("FZRQ")).trim().length()>10) {
|
||||||
|
// FZRQ = String.valueOf(attrInfoMap.get("FZRQ")).trim().substring(0, 10) + " 00:00:00";
|
||||||
|
// }else{
|
||||||
|
// FZRQ = String.valueOf(attrInfoMap.get("FZRQ")).trim() + " 00:00:00";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// saveMap.put("FZRQString"," "+FZRQ.substring(0,10));
|
||||||
|
// saveMap.put("FZRQDate"," "+FZRQ.replace("-",""));
|
||||||
|
// FZRQ = String.valueOf(sdf.parse(FZRQ).getTime());
|
||||||
|
// saveMap.put("FZRQ"," "+FZRQ);
|
||||||
|
// }catch (Exception e) {
|
||||||
|
// saveMap.put("FZRQString", " " + FZRQ);
|
||||||
|
// saveMap.put("FZRQDate"," "+" ");
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// saveMap.put("FZRQString", " ");
|
||||||
|
// saveMap.put("FZRQDate"," "+" ");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //废止日期 高级查询
|
||||||
|
// Date fzrq_time_data = null;
|
||||||
|
// if (StringUtils.isNotBlank(a)) {
|
||||||
|
// try {
|
||||||
|
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
// fzrq_time_data = format.parse(saveMap.get("FZRQString")+" 00:00:00");
|
||||||
|
// } catch (ParseException ignored) {
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (fzrq_time_data != null) {
|
||||||
|
// Calendar calendar = Calendar.getInstance();
|
||||||
|
// calendar.setTime(fzrq_time_data);
|
||||||
|
// int month = calendar.get(Calendar.MONTH)+1;
|
||||||
|
// String times = calendar.get(Calendar.YEAR) + String.format("%02d", month) + String.format("%02d",calendar.get(Calendar.DAY_OF_MONTH));
|
||||||
|
// saveMap.put("FZRQ",Long.valueOf(times));
|
||||||
|
// }else{
|
||||||
|
// saveMap.put("FZRQ",-1000000000000000000L);
|
||||||
|
// }
|
||||||
|
// saveMap.put("type","bussstand");
|
||||||
|
//
|
||||||
|
// String fieldInfo = InitStandAttrUtil.queryField;
|
||||||
|
// List<String> fieldInfoList = Arrays.asList(fieldInfo .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||||
|
//
|
||||||
|
// // 动态存储属性字段
|
||||||
|
// for (String field : fieldInfoList) {
|
||||||
|
// saveMap.put(field,attrInfoMap.getOrDefault(field,""));
|
||||||
|
// String fieldValue = "";
|
||||||
|
// if(infoMap.get(field) != null && StringUtils.isNotBlank(infoMap.get(field).toString())){
|
||||||
|
// Object json= new JSONTokener(infoMap.get(field).toString()).nextValue();
|
||||||
|
// if(!json.toString().equals("null")){
|
||||||
|
// fieldValue = infoMap.get(field).toString();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// saveMap.put(field+"Name",fieldValue);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //添加次数
|
||||||
|
// SarFullNumEOPage sarFullNumEOPage = new SarFullNumEOPage();
|
||||||
|
// sarFullNumEOPage.setSarId(infoEO.getId());
|
||||||
|
// List<SarFullNumEO> sarFullNumEOList = sarFullNumEOService.queryByList(sarFullNumEOPage);
|
||||||
|
// String num = "";
|
||||||
|
// if (null != sarFullNumEOList && !sarFullNumEOList.isEmpty()){
|
||||||
|
// num = sarFullNumEOList.get(0).getReadNum();
|
||||||
|
// }
|
||||||
|
// if (StringUtils.isEmpty(num)){
|
||||||
|
// saveMap.put("readNum", 0L);
|
||||||
|
// }else {
|
||||||
|
// saveMap.put("readNum", Long.valueOf(num));
|
||||||
|
// }
|
||||||
|
// if (saveMap.containsKey("QBMJ") && null != saveMap.get("QBMJ") && !String.valueOf(saveMap.get("QBMJ")).equals("ACF675Z88W")) {
|
||||||
|
// saveMap.put("baseSearchContent", baseSearchContent);
|
||||||
|
// saveMap.put("validFlag", "0");
|
||||||
|
// saveMap.put("content", infoEO.getFileIds());
|
||||||
|
// if ("add".equals(addOrUpdate)) {
|
||||||
|
// sarStandAndLawsEOService.insertIntoIndexForMap(saveMap);
|
||||||
|
// } else {
|
||||||
|
// sarStandAndLawsEOService.updateIntoIndexForMap(saveMap);
|
||||||
|
// }
|
||||||
|
// }else{
|
||||||
|
// if (saveMap.containsKey("QBMJ") && null != saveMap.get("QBMJ") && String.valueOf(saveMap.get("QBMJ")).equals("ACF675Z88W")){
|
||||||
|
// StandLawsEO standLawsEO = new StandLawsEO();
|
||||||
|
// standLawsEO.setId(infoEO.getId());
|
||||||
|
// standLawsEO.setType("bussstand");
|
||||||
|
// sarStandAndLawsEOService.deleteFomrIndex(standLawsEO);
|
||||||
|
// }else{
|
||||||
|
// if ("add".equals(addOrUpdate)) {
|
||||||
|
// sarStandAndLawsEOService.insertIntoIndexForMap(saveMap);
|
||||||
|
// } else {
|
||||||
|
// sarStandAndLawsEOService.updateIntoIndexForMap(saveMap);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public Map<String,Object> dealNumberMsg (Map<String,Object> saveMap,SarBussionessStand infoEO,String getCodeName) {
|
||||||
|
// /*if(StringUtils.isNotEmpty(infoEO.getStandYear())){
|
||||||
|
// String num = getCodeName + " " + infoEO.getStandCode() + "-" + infoEO.getStandYear();
|
||||||
|
// saveMap.put("numbershow",num);
|
||||||
|
// int index = infoEO.getStandCode().indexOf(".");
|
||||||
|
// int index1 = infoEO.getStandCode().indexOf(":");
|
||||||
|
// String numberExpNull = "";
|
||||||
|
// if(index > -1){
|
||||||
|
// numberExpNull = getCodeName + infoEO.getStandCode() + "-" + num.replaceAll(" ","")
|
||||||
|
// + "-" + getCodeName + infoEO.getStandCode().substring(0,index) + "-" + infoEO.getStandCode().substring(0,index);
|
||||||
|
// }else if(index1 > -1){
|
||||||
|
// numberExpNull = getCodeName + infoEO.getStandCode() + "-" + num.replaceAll(" ","")
|
||||||
|
// + "-" + getCodeName + infoEO.getStandCode().substring(0,index1) + "-" + infoEO.getStandCode().substring(0,index1);
|
||||||
|
// }else{
|
||||||
|
// numberExpNull = getCodeName + infoEO.getStandCode() + "-" + num.replaceAll(" ","");
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// String number = getCodeName + " " + infoEO.getStandCode();
|
||||||
|
// saveMap.put("numbershow",number);
|
||||||
|
// String numberExpNull = "";
|
||||||
|
// int index = infoEO.getStandCode().indexOf(".");
|
||||||
|
// if(index > -1){
|
||||||
|
// numberExpNull = getCodeName + infoEO.getStandCode() + "-" + number.replaceAll(" ","")
|
||||||
|
// + "-" + getCodeName + infoEO.getStandCode().substring(0,index) + "-" + infoEO.getStandCode().substring(0,index);
|
||||||
|
// }else{
|
||||||
|
// numberExpNull = getCodeName + infoEO.getStandCode() + "-" + number.replaceAll(" ","");
|
||||||
|
// }
|
||||||
|
// saveMap.put("numberExpNull",numberExpNull);
|
||||||
|
// }*/
|
||||||
|
// String number = infoEO.getStandCode();
|
||||||
|
// saveMap.put("numbershow",number);
|
||||||
|
// String numberExpNull = "";
|
||||||
|
// int index = infoEO.getStandCode().indexOf(".");
|
||||||
|
// if(index > -1){
|
||||||
|
// numberExpNull = infoEO.getStandCode() + "-" + number.replaceAll(" ","")
|
||||||
|
// + "-" + infoEO.getStandCode().substring(0,index) + "-" + infoEO.getStandCode().substring(0,index);
|
||||||
|
// }else{
|
||||||
|
// numberExpNull = infoEO.getStandCode() + "-" + number.replaceAll(" ","");
|
||||||
|
// }
|
||||||
|
// saveMap.put("numberExpNull",numberExpNull);
|
||||||
|
// return saveMap;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//}
|
||||||
+66
@@ -1,10 +1,14 @@
|
|||||||
package com.adc.da.slrs.sarBussionessStand.dao;
|
package com.adc.da.slrs.sarBussionessStand.dao;
|
||||||
|
|
||||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||||
|
import com.adc.da.sys.entity.UserEO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,4 +34,66 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
|||||||
|
|
||||||
List<SarBussionessStand> getBussionessStandInfoPage(SarBussionessStandEOPage page);
|
List<SarBussionessStand> getBussionessStandInfoPage(SarBussionessStandEOPage page);
|
||||||
|
|
||||||
|
List<SarBussionessStand> getBussionessStandInfoPageByRole(SarBussionessStandEOPage page);
|
||||||
|
|
||||||
|
//企标复审使用
|
||||||
|
List<SarBussionessStand> getBussionessStandInfoQbfs(SarBussionessStandEOPage page);
|
||||||
|
|
||||||
|
int getBussionessStandInfoCountByRole(SarBussionessStandEOPage page);
|
||||||
|
|
||||||
|
List<SarBussionessStand> getSarBussionessStand(SarBussionessStandEOPage page);
|
||||||
|
//liwenxuan:标准法规更新数量及清单:企业标准
|
||||||
|
Integer selectBussionessStandardsCount(Date visitTime);
|
||||||
|
//liwenxuan:标准法规更新数量及清单:企业标准All
|
||||||
|
Integer selectBussionessStandardsCountAll();
|
||||||
|
|
||||||
|
|
||||||
|
List<SarBussionessStand> selectSarBussionesDownloadFileInfo(String id);
|
||||||
|
|
||||||
|
List<SarBussionessStand> selectStandardsByStandnumber(SarBussionessStand sarStandardsInfoEO);
|
||||||
|
|
||||||
|
List<SarBussionessStand> selectStandByStandNumber(@Param("standCode") String standCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索中心查询相关推荐
|
||||||
|
*
|
||||||
|
* @param:
|
||||||
|
* @auther: gaoyan
|
||||||
|
* @date: 2018/11/10 9:22
|
||||||
|
*/
|
||||||
|
List<RecommendVO> selectRecommendStand(SarBussionessStandEOPage pagenew);
|
||||||
|
|
||||||
|
List<RecommendVO> selectCloseStand(SarBussionessStandEOPage pagenew);
|
||||||
|
|
||||||
|
List<SarBussionessStand> queryByPutTimeList(SarBussionessStand sarBussionessStandEO);
|
||||||
|
|
||||||
|
int updateByStandNum(SarBussionessStand s);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据唯一的标准code,修改标准的被代替标准号
|
||||||
|
* @param:
|
||||||
|
* @auther: gaoyan
|
||||||
|
* @date: 2018/11/10 9:22
|
||||||
|
*/
|
||||||
|
int updateRelacedNumByNumber(SarBussionessStandEOPage pagenew);
|
||||||
|
|
||||||
|
int updateRelaceNumByNumber(SarBussionessStandEOPage pagenew);
|
||||||
|
|
||||||
|
List<SarBussionessStand> selectBussStandByIdAndRole(SarBussionessStandEOPage pagenew);
|
||||||
|
|
||||||
|
void updateReplacedNumById(SarBussionessStand sarBussionessStandEO);
|
||||||
|
|
||||||
|
Integer selectStandColumn(@Param("columnName") String columnName);
|
||||||
|
|
||||||
|
List<SarBussionessStand> standRemindInfo(@Param("standCode") String standCode, @Param("standName") String standName);
|
||||||
|
|
||||||
|
int selectIsExit(@Param("id") String id);
|
||||||
|
|
||||||
|
List<String> selectPerson(String qbid);
|
||||||
|
|
||||||
|
List<UserEO> selectPersonAll(String qbid);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelectiveTimeNotNull(SarBussionessStand sarBussionessStandEO);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+165
-8
@@ -8,6 +8,11 @@ import com.adc.da.common.SelectionTypeEnum;
|
|||||||
import com.adc.da.common.UseModuleEnum;
|
import com.adc.da.common.UseModuleEnum;
|
||||||
import com.adc.da.mq.dao.OtConvertEODao;
|
import com.adc.da.mq.dao.OtConvertEODao;
|
||||||
import com.adc.da.mq.service.CreateMQService;
|
import com.adc.da.mq.service.CreateMQService;
|
||||||
|
import com.adc.da.mq.service.CreateStandMQService;
|
||||||
|
import com.adc.da.person.entity.PersonShareEO;
|
||||||
|
import com.adc.da.person.entity.TsPersonCollect;
|
||||||
|
import com.adc.da.person.page.PersonCollectEOPage;
|
||||||
|
import com.adc.da.person.page.PersonShareEOPage;
|
||||||
import com.adc.da.person.service.IPersonCollectEOService;
|
import com.adc.da.person.service.IPersonCollectEOService;
|
||||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||||
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
||||||
@@ -27,10 +32,12 @@ import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
|||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||||
|
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
||||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||||
import com.adc.da.sys.constant.ValueStateEnum;
|
import com.adc.da.sys.constant.ValueStateEnum;
|
||||||
import com.adc.da.sys.dao.DicTypeEODao;
|
import com.adc.da.sys.dao.DicTypeEODao;
|
||||||
|
import com.adc.da.sys.entity.DicTypeEO;
|
||||||
import com.adc.da.sys.util.LoginUserUtil;
|
import com.adc.da.sys.util.LoginUserUtil;
|
||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.adc.da.utils.util.FieldConvertUtil;
|
import com.adc.da.utils.util.FieldConvertUtil;
|
||||||
@@ -38,10 +45,14 @@ import com.adc.da.utils.util.InitStandAttrUtil;
|
|||||||
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;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.sql.Clob;
|
import java.sql.Clob;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,6 +66,17 @@ import java.util.*;
|
|||||||
@Service
|
@Service
|
||||||
public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStandDao, SarBussionessStand> implements ISarBussionessStandService {
|
public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStandDao, SarBussionessStand> implements ISarBussionessStandService {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(SarBussionessStandServiceImpl.class);
|
||||||
|
|
||||||
|
@Value("${elas.flag}")
|
||||||
|
private boolean elasflag; //ES是否启用
|
||||||
|
|
||||||
|
@Value("${file.path}")
|
||||||
|
private String filePath;//文件存储路径
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SarBussionessStandDao sarBussionessStandEODao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITsUserService tsUserService;
|
private ITsUserService tsUserService;
|
||||||
|
|
||||||
@@ -91,6 +113,12 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SarStandardsInfoDao sarStandardsInfoEODao;
|
private SarStandardsInfoDao sarStandardsInfoEODao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CreateStandMQService createStandMQService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarUpdLogService sarUpdLogEOService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
||||||
|
|
||||||
@@ -126,18 +154,147 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
}
|
}
|
||||||
createStandAttrInfo(sarBussionessStandEO);
|
createStandAttrInfo(sarBussionessStandEO);
|
||||||
// 根据代替标准号 ,修改代替标准号标准中的,被代替标准号
|
// 根据代替标准号 ,修改代替标准号标准中的,被代替标准号
|
||||||
// updateReplaceConnect(sarBussionessStandEO);
|
updateReplaceConnect(sarBussionessStandEO);
|
||||||
// //修改收藏分享编号名称
|
//修改收藏分享编号名称
|
||||||
// updateCollectAndShare(sarBussionessStandEO);
|
updateCollectAndShare(sarBussionessStandEO);
|
||||||
// // 记录修改日志
|
// 记录修改日志
|
||||||
// saveUpdateLog(sarBussionessStandEO,beforeStandEO);
|
saveUpdateLog(sarBussionessStandEO,beforeStandEO);
|
||||||
// if (elasflag) {
|
if (elasflag) {
|
||||||
// createStandMQService.sendBussStandMQ(sarBussionessStandEO, "update");
|
createStandMQService.sendBussStandMQ(sarBussionessStandEO, "update");
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
return sarBussionessStandEO;
|
return sarBussionessStandEO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void saveUpdateLog(SarBussionessStand sarStandardsInfoEO,SarBussionessStand beforeSarStandardsInfo) throws Exception{
|
||||||
|
Map<String,Object> newMap = new HashMap<>();
|
||||||
|
Map<String,Object> oldMap = beforeSarStandardsInfo.getAttrInfoMap();
|
||||||
|
String attrStr = sarStandardsInfoEO.getSarStandAttrEOStr();
|
||||||
|
if (StringUtils.isNotBlank(attrStr)) {
|
||||||
|
newMap = JSONObject.fromObject(attrStr);
|
||||||
|
}
|
||||||
|
newMap = changeMap(sarStandardsInfoEO,newMap);
|
||||||
|
oldMap = changeMap(beforeSarStandardsInfo,oldMap);
|
||||||
|
String sortName = sysInfoEOService.getDicNamesByCodes(sarStandardsInfoEO.getStandSort());
|
||||||
|
String number = sortName + " " + sarStandardsInfoEO.getStandCode();
|
||||||
|
if (StringUtils.isNotBlank(sarStandardsInfoEO.getStandYear())) {
|
||||||
|
number += "-" + sarStandardsInfoEO.getStandYear();
|
||||||
|
}
|
||||||
|
String content = number + " 《" + sarStandardsInfoEO.getStandName() + "》";
|
||||||
|
sarUpdLogEOService.createUpdateLog(SarTypeEnum.BUSINESS.getValue(),sarStandardsInfoEO.getId(),oldMap,newMap,content);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String,Object> changeMap (SarBussionessStand sarStandardsInfoEO,Map<String,Object> map) {
|
||||||
|
map.put("country",sarStandardsInfoEO.getApplyCountry());
|
||||||
|
map.put("standSort",sarStandardsInfoEO.getStandSort());
|
||||||
|
map.put("standNumber",sarStandardsInfoEO.getStandCode());
|
||||||
|
map.put("standYear",sarStandardsInfoEO.getStandYear());
|
||||||
|
map.put("standName",sarStandardsInfoEO.getStandName());
|
||||||
|
map.put("standEnName",sarStandardsInfoEO.getStandEnName());
|
||||||
|
map.put("standNature",sarStandardsInfoEO.getStandNature());
|
||||||
|
map.put("standState",sarStandardsInfoEO.getStandStatus());
|
||||||
|
if (sarStandardsInfoEO.getIssueTime() != null) {
|
||||||
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
String issueStr = format.format(sarStandardsInfoEO.getIssueTime());
|
||||||
|
map.put("issueTime",issueStr);
|
||||||
|
}
|
||||||
|
if (sarStandardsInfoEO.getPutTime() != null) {
|
||||||
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
String issueStr = format.format(sarStandardsInfoEO.getPutTime());
|
||||||
|
map.put("putTime",issueStr);
|
||||||
|
}
|
||||||
|
map.put("replaceStandNum",sarStandardsInfoEO.getReplaceStandNum());
|
||||||
|
map.put("replacedStandNum",sarStandardsInfoEO.getReplacedStandNum());
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateCollectAndShare(SarBussionessStand sarBussionessStandEO) throws Exception {
|
||||||
|
//修改收藏表中
|
||||||
|
String number = sarBussionessStandEO.getStandCode()+ ")";
|
||||||
|
PersonCollectEOPage personCollectEOPage = new PersonCollectEOPage();
|
||||||
|
personCollectEOPage.setValidFlag("0");
|
||||||
|
personCollectEOPage.setCollectResId(sarBussionessStandEO.getId());
|
||||||
|
List<TsPersonCollect> listCollect = personCollectEOService.queryByList(personCollectEOPage);
|
||||||
|
if (listCollect != null && listCollect.size() > 0) {
|
||||||
|
for (TsPersonCollect getCollect : listCollect) {
|
||||||
|
TsPersonCollect collectEO = new TsPersonCollect();
|
||||||
|
collectEO.setId(getCollect.getId());
|
||||||
|
collectEO.setCollectTitle(sarBussionessStandEO.getStandName() + " " + "( 编号:" + number);
|
||||||
|
personCollectEOService.updateByPrimaryKeySelective(collectEO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void updateReplaceConnect(SarBussionessStand sarBussionessStandEO) throws Exception{
|
||||||
|
if(StringUtils.isNotEmpty(sarBussionessStandEO.getReplaceStandNum())){
|
||||||
|
SarBussionessStandEOPage sarStandardsInfoEOPage = new SarBussionessStandEOPage();
|
||||||
|
//当前代替标准号的标准类别为类别name,需修改为code
|
||||||
|
String[] replaceList = sarBussionessStandEO.getReplaceStandNum().trim().split(",");
|
||||||
|
String replaceListNew[];
|
||||||
|
int countre = 0;
|
||||||
|
// List<String> newReplaceList = new ArrayList<>();
|
||||||
|
if (replaceList!=null && replaceList.length>0) {
|
||||||
|
for(String replaceNum : replaceList){
|
||||||
|
if(replaceNum.indexOf(" ")!=-1){
|
||||||
|
String dicName = replaceNum.substring(0,replaceNum.lastIndexOf(" "));
|
||||||
|
DicTypeEO dicTypeEO = new DicTypeEO();
|
||||||
|
dicTypeEO.setDicTypeName(dicName);
|
||||||
|
dicTypeEO.setDicTypeCode("BUSSSTANDCLASS");
|
||||||
|
List<DicTypeEO> getDicCode = dicTypeEODao.getDicTypeByDicTypeName(dicTypeEO);
|
||||||
|
if(getDicCode!= null && getDicCode.size()>0){
|
||||||
|
replaceNum = replaceNum.replaceFirst(dicName,getDicCode.get(0).getDicTypeCode());
|
||||||
|
replaceList[countre] = replaceNum;
|
||||||
|
countre++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sarStandardsInfoEOPage.setReplaceStandNumList(replaceList);
|
||||||
|
// 2021/03/30 刘慧文修改 标准类别已不存在
|
||||||
|
if(StringUtils.isNotEmpty(sarBussionessStandEO.getStandYear())){
|
||||||
|
sarStandardsInfoEOPage.setReplacedStandNum(sarBussionessStandEO.getStandCode()+"-"+sarBussionessStandEO.getStandYear());
|
||||||
|
} else {
|
||||||
|
sarStandardsInfoEOPage.setReplacedStandNum(sarBussionessStandEO.getStandCode());
|
||||||
|
}
|
||||||
|
int updateResult = sarBussionessStandEODao.updateRelacedNumByNumber(sarStandardsInfoEOPage);
|
||||||
|
|
||||||
|
//编写预警信息
|
||||||
|
// writeWarnings(sarBussionessStandEO);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(sarBussionessStandEO.getReplacedStandNum())) {
|
||||||
|
SarBussionessStandEOPage sarStandardsInfoEOPage = new SarBussionessStandEOPage();
|
||||||
|
//当前代替标准号的标准类别为类别name,需修改为code
|
||||||
|
String[] replaceList = sarBussionessStandEO.getReplacedStandNum().trim().split(",");
|
||||||
|
int countre = 0;
|
||||||
|
// List<String> newReplaceList = new ArrayList<>();
|
||||||
|
if (replaceList!=null && replaceList.length>0) {
|
||||||
|
for(String replaceNum : replaceList){
|
||||||
|
if(replaceNum.indexOf(" ")!=-1){
|
||||||
|
String dicName = replaceNum.substring(0,replaceNum.lastIndexOf(" "));
|
||||||
|
DicTypeEO dicTypeEO = new DicTypeEO();
|
||||||
|
dicTypeEO.setDicTypeName(dicName);
|
||||||
|
dicTypeEO.setDicTypeCode("BUSSSTANDCLASS");
|
||||||
|
List<DicTypeEO> getDicCode = dicTypeEODao.getDicTypeByDicTypeName(dicTypeEO);
|
||||||
|
if(getDicCode!= null && getDicCode.size()>0){
|
||||||
|
replaceNum = replaceNum.replaceFirst(dicName,getDicCode.get(0).getDicTypeCode());
|
||||||
|
replaceList[countre] = replaceNum;
|
||||||
|
countre++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sarStandardsInfoEOPage.setReplacedStandNumList(replaceList);
|
||||||
|
// 2021/03/30 刘慧文修改 标准类别已不存在
|
||||||
|
if(StringUtils.isNotEmpty(sarBussionessStandEO.getStandYear())){
|
||||||
|
sarStandardsInfoEOPage.setReplaceStandNum(sarBussionessStandEO.getStandCode()+"-"+sarBussionessStandEO.getStandYear());
|
||||||
|
} else {
|
||||||
|
sarStandardsInfoEOPage.setReplaceStandNum(sarBussionessStandEO.getStandCode());
|
||||||
|
}
|
||||||
|
int updateResult = sarBussionessStandEODao.updateRelaceNumByNumber(sarStandardsInfoEOPage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* @Description: 新增属性表数据
|
* @Description: 新增属性表数据
|
||||||
* @Author: yangxuenan
|
* @Author: yangxuenan
|
||||||
|
|||||||
Reference in New Issue
Block a user