定时任务 根据时间更新 文本状态
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
package com.adc.da.mq;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO;
|
||||||
|
import org.springframework.amqp.core.AmqpTemplate;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class CreateStandardMQService {
|
||||||
|
@Autowired
|
||||||
|
private AmqpTemplate rabbitTemplate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author yuezhihang
|
||||||
|
* @Description 创建消息队列
|
||||||
|
* Date 2018/8/24 13:59
|
||||||
|
* @Param [convert, convertType]
|
||||||
|
* @return int
|
||||||
|
**/
|
||||||
|
public void sendMQ(List<DSarStandardDTO> changeJJSS, List<DSarStandardDTO> changeXXYX ){
|
||||||
|
Map<String,Object> map=new HashMap<>();
|
||||||
|
map.put("changeJJSS",changeJJSS);
|
||||||
|
map.put("changeXXYX",changeXXYX);
|
||||||
|
// map.put("map",hashMap);
|
||||||
|
//发送消息队列
|
||||||
|
this.rabbitTemplate.convertAndSend("standard-exchange_updateText_RELEASE", "standard-key_updateText_RELEASE", map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import com.adc.da.slrs.sarLawsAttrInfo.service.ISarLawsAttrInfoService;
|
|||||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||||
import com.adc.da.slrs.sarLawsStandInfo.service.ISarLawsStandInfoService;
|
import com.adc.da.slrs.sarLawsStandInfo.service.ISarLawsStandInfoService;
|
||||||
import com.adc.da.slrs.sarStandAttrInfo.service.ISarStandAttrInfoService;
|
import com.adc.da.slrs.sarStandAttrInfo.service.ISarStandAttrInfoService;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||||
import com.adc.da.sys.service.IDicTypeEOService;
|
import com.adc.da.sys.service.IDicTypeEOService;
|
||||||
@@ -201,6 +202,77 @@ public class SendQdUpdateMQService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@RabbitListener(bindings = @QueueBinding(
|
||||||
|
value = @Queue(value = "createMQ_Standard_updateText_RELEASE", durable = "true"),
|
||||||
|
exchange = @Exchange(value = "standard-exchange_updateText_RELEASE", ignoreDeclarationExceptions = "true"),
|
||||||
|
key = "standard-key_updateText_RELEASE"))
|
||||||
|
public void createStandardMQ(Map<String, Object> bussMap, Message message, Channel channel) throws Exception {
|
||||||
|
|
||||||
|
//数据字典数据组装
|
||||||
|
//数据字典数据组装
|
||||||
|
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCode();
|
||||||
|
Map<String, String> map = new HashMap<>();
|
||||||
|
List<Map<String, String>> arr = (List<Map<String, String>>) dicTypeEO.get("WBZTCLASS");
|
||||||
|
arr.forEach(stringStringMap -> {
|
||||||
|
map.put(stringStringMap.get("label"), stringStringMap.get("value"));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
List<DSarStandardDTO> changeJJSS= (List<DSarStandardDTO>) bussMap.get("changeJJSS");
|
||||||
|
List<DSarStandardDTO> changeXXYX= (List<DSarStandardDTO>) bussMap.get("changeXXYX");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//写修改逻辑
|
||||||
|
Thread.sleep(5000);
|
||||||
|
for (DSarStandardDTO jjss : changeJJSS) {
|
||||||
|
QueryWrapper<SarStandardsInfo> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("ID", jjss.getId());
|
||||||
|
List<SarStandardsInfo> infos = sarStandardsInfoService.list(wrapper);
|
||||||
|
if (null != infos && infos.size() > 0) {
|
||||||
|
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||||
|
sarStandardsInfo.setId(jjss.getId());
|
||||||
|
sarStandardsInfo.setModifyTime(new Date());
|
||||||
|
sarStandardsInfo.setTextStatus(map.get("即将实施"));
|
||||||
|
Map<String, Object> bussAttrInfoMap = iSarStandAttrInfoService.getBussAttrInfo(jjss.getId());
|
||||||
|
if (bussAttrInfoMap != null) {
|
||||||
|
sarStandardsInfo.setSarStandAttrEOStr(JSONObject.toJSONString(bussAttrInfoMap));
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
|
||||||
|
sarStandardsInfoService.updateSarStandardsInfo(sarStandardsInfo);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (DSarStandardDTO jjss : changeXXYX) {
|
||||||
|
QueryWrapper<SarStandardsInfo> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("ID", jjss.getId());
|
||||||
|
List<SarStandardsInfo> infos = sarStandardsInfoService.list(wrapper);
|
||||||
|
if (null != infos && infos.size() > 0) {
|
||||||
|
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||||
|
sarStandardsInfo.setId(jjss.getId());
|
||||||
|
sarStandardsInfo.setModifyTime(new Date());
|
||||||
|
sarStandardsInfo.setTextStatus(map.get("现行有效"));
|
||||||
|
Map<String, Object> bussAttrInfoMap = iSarStandAttrInfoService.getBussAttrInfo(jjss.getId());
|
||||||
|
if (bussAttrInfoMap != null) {
|
||||||
|
sarStandardsInfo.setSarStandAttrEOStr(JSONObject.toJSONString(bussAttrInfoMap));
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
sarStandardsInfoService.updateSarStandardsInfo(sarStandardsInfo);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
package com.adc.da.scheduled;
|
package com.adc.da.scheduled;
|
||||||
|
|
||||||
|
import com.adc.da.mq.CreateStandardMQService;
|
||||||
import com.adc.da.scheduled.dao.SarStandardInfoDao;
|
import com.adc.da.scheduled.dao.SarStandardInfoDao;
|
||||||
import com.adc.da.scheduled.dao.SarStandardItemDao;
|
import com.adc.da.scheduled.dao.SarStandardItemDao;
|
||||||
import com.adc.da.scheduled.dao.SarStandardWarningDao;
|
import com.adc.da.scheduled.dao.SarStandardWarningDao;
|
||||||
import com.adc.da.scheduled.entity.TermDTO;
|
import com.adc.da.scheduled.entity.TermDTO;
|
||||||
|
|
||||||
import com.adc.da.slrs.ActivityDatas.entity.DataList;
|
import com.adc.da.slrs.ActivityDatas.entity.DataList;
|
||||||
|
import com.adc.da.slrs.processModel.utils.TrainFormDate;
|
||||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||||
|
|
||||||
@@ -13,8 +15,10 @@ import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
|||||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||||
import com.adc.da.slrs.sarStandWarning.service.IWarningDateService;
|
import com.adc.da.slrs.sarStandWarning.service.IWarningDateService;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||||
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
||||||
|
import com.adc.da.sys.service.IDicTypeEOService;
|
||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -35,6 +39,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
@@ -73,6 +79,12 @@ public class ScheduledJob {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IWarningDateService iWarningDateService;// 预警日期
|
private IWarningDateService iWarningDateService;// 预警日期
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
CreateStandardMQService createStandardMQService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IDicTypeEOService dicTypeEOService;
|
||||||
|
|
||||||
// @PostConstruct //程序启动时执行一次
|
// @PostConstruct //程序启动时执行一次
|
||||||
// @Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
// @Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
||||||
// @Scheduled(cron="*/5 * * * * ?")
|
// @Scheduled(cron="*/5 * * * * ?")
|
||||||
@@ -174,10 +186,6 @@ public class ScheduledJob {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarUpdLogService sarUpdLogEOService;
|
private ISarUpdLogService sarUpdLogEOService;
|
||||||
|
|
||||||
@@ -289,8 +297,6 @@ public class ScheduledJob {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//一个被代替标准号时,文本状态更新为废止状态,两个及以上时更新为被代替状态
|
//一个被代替标准号时,文本状态更新为废止状态,两个及以上时更新为被代替状态
|
||||||
for (String key : replaceIdCountMap.keySet()) {
|
for (String key : replaceIdCountMap.keySet()) {
|
||||||
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||||
@@ -334,7 +340,6 @@ public class ScheduledJob {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void saveUpdateLog(SarStandardsInfo sarStandardsInfoEO, SarStandardsInfo beforeSarStandardsInfo, String reasonMsg) throws Exception {
|
public void saveUpdateLog(SarStandardsInfo sarStandardsInfoEO, SarStandardsInfo beforeSarStandardsInfo, String reasonMsg) throws Exception {
|
||||||
Map<String, Object> newMap = new HashMap<>();
|
Map<String, Object> newMap = new HashMap<>();
|
||||||
Map<String, Object> oldMap = new HashMap<>();
|
Map<String, Object> oldMap = new HashMap<>();
|
||||||
@@ -352,4 +357,117 @@ public class ScheduledJob {
|
|||||||
String content = "==定时任务执行修改==:" + number + " 《" + sarStandardsInfoEO.getStandName() + "》" + reasonMsg;
|
String content = "==定时任务执行修改==:" + number + " 《" + sarStandardsInfoEO.getStandName() + "》" + reasonMsg;
|
||||||
sarUpdLogEOService.createUpdateLog(sarStandardsInfoEO.getStandType() + "_STAND", sarStandardsInfoEO.getId(), oldMap, newMap, content);
|
sarUpdLogEOService.createUpdateLog(sarStandardsInfoEO.getStandType() + "_STAND", sarStandardsInfoEO.getId(), oldMap, newMap, content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
||||||
|
// @Scheduled(cron = "*/30 * * * * ?")
|
||||||
|
@Async
|
||||||
|
public void TextStatusUpdateStandard() {
|
||||||
|
Logger logger = LoggerFactory.getLogger(ScheduledJob.class);
|
||||||
|
logger.info("=======================================开始更新文本状态======================================");
|
||||||
|
//第一步 查询满足条件的数据 第一步只能查询 需要的标准id和日期
|
||||||
|
//查询出两组数据
|
||||||
|
Map<String, String> map = new HashMap<>();
|
||||||
|
List<String> types = new ArrayList<>();
|
||||||
|
types.add("WBZTCLASS");
|
||||||
|
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCodeByType(types);
|
||||||
|
List<Map<String, String>> arr = (List<Map<String, String>>) dicTypeEO.get("WBZTCLASS");
|
||||||
|
arr.forEach(stringStringMap -> {
|
||||||
|
stringStringMap.keySet().forEach(s -> {
|
||||||
|
map.put(stringStringMap.get("label"), stringStringMap.get("value"));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//只针对国内标准 INLAND
|
||||||
|
|
||||||
|
// 查询国标 实施日期 晚于现在
|
||||||
|
// 标准状态属于发布
|
||||||
|
// 标准状态改为即将实施
|
||||||
|
List<DSarStandardDTO> changeJJSS = new ArrayList<>();
|
||||||
|
List<String> strings = new ArrayList<>();
|
||||||
|
strings.add(map.get("发布"));
|
||||||
|
List<DSarStandardDTO> sarStandardsInfos = sarStandardsInfoDao.dealWithDS("INLAND", strings);
|
||||||
|
//判定时间
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
if (null != sarStandardsInfos && sarStandardsInfos.size() > 0) {
|
||||||
|
for (DSarStandardDTO s : sarStandardsInfos) {
|
||||||
|
if (null != s.getSSRQ()) {
|
||||||
|
if (s.getSSRQ().contains(",")) {
|
||||||
|
//多个日期拆分 一个满足就都满足
|
||||||
|
if (findFirstTime(s.getSSRQ()).compareTo(new Date()) >= 0 && !changeJJSS.contains(s)) {
|
||||||
|
changeJJSS.add(s);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Date date = null;
|
||||||
|
try {
|
||||||
|
date = dateFormat.parse(TrainFormDate.dealWithTimeZoneyyyy(s.getSSRQ(), "yyyy-MM-dd"));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
logger.info("时间为:" + date);
|
||||||
|
//与现在时间进行比较
|
||||||
|
if (date.compareTo(new Date()) >= 0 && !changeJJSS.contains(s)) {
|
||||||
|
changeJJSS.add(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 标桩状态 属于即将实施 或 发布
|
||||||
|
// 实施日期 在今天之前
|
||||||
|
// 标准状态 改为现行有效
|
||||||
|
List<DSarStandardDTO> changeXXYX = new ArrayList<>();
|
||||||
|
List<String> strings2 = new ArrayList<>();
|
||||||
|
strings2.add(map.get("即将实施"));
|
||||||
|
strings2.add(map.get("发布"));
|
||||||
|
List<DSarStandardDTO> sarStandardsInfos1 = sarStandardsInfoDao.dealWithDS("INLAND", strings2);
|
||||||
|
if (null != sarStandardsInfos1 && sarStandardsInfos1.size() > 0) {
|
||||||
|
for (DSarStandardDTO s : sarStandardsInfos1) {
|
||||||
|
if (null != s.getSSRQ()) {
|
||||||
|
if (s.getSSRQ().contains(",")) {
|
||||||
|
//多个日期拆分 一个满足就都满足
|
||||||
|
if (findFirstTime(s.getSSRQ()).compareTo(new Date()) < 0 && !changeXXYX.contains(s)) {
|
||||||
|
changeXXYX.add(s);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Date date = null;
|
||||||
|
try {
|
||||||
|
date = dateFormat.parse(TrainFormDate.dealWithTimeZoneyyyy(s.getSSRQ(), "yyyy-MM-dd"));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
logger.info("时间为:" + date);
|
||||||
|
//与现在时间进行比较
|
||||||
|
if (date.compareTo(new Date()) < 0 && !changeXXYX.contains(s)) {
|
||||||
|
changeXXYX.add(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger.info("改为即将实施的有" + changeJJSS.size() + "条");
|
||||||
|
logger.info("改为现行有效的有" + changeXXYX.size() + "条");
|
||||||
|
logger.info("=============================");
|
||||||
|
createStandardMQService.sendMQ(changeJJSS,changeXXYX);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Date findFirstTime(String ssrq) {
|
||||||
|
String[] as = ssrq.split(",");
|
||||||
|
List<Date> dates = new ArrayList<>();
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
for (String s : as) {
|
||||||
|
Date date = null;
|
||||||
|
try {
|
||||||
|
date = dateFormat.parse(TrainFormDate.dealWithTimeZoneyyyy(s, "yyyy-MM-dd"));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
dates.add(date);
|
||||||
|
}
|
||||||
|
dates.sort(Comparator.comparing(date -> date));
|
||||||
|
return dates.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.adc.da.slrs.sarQaInfo.entity;
|
||||||
|
|
||||||
|
import com.adc.da.base.page.BasePage;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 标准法规问答信息表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yzh
|
||||||
|
* @since 2022-05-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value="SarQaInfo对象", description="标准法规问答信息表")
|
||||||
|
public class SarQaInfoPage extends BasePage {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
@TableId("ID")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "资源类型-标准、法规、企标")
|
||||||
|
@TableField("RES_TYPE")
|
||||||
|
private String resType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "资源ID")
|
||||||
|
@TableField("RES_ID")
|
||||||
|
private String resId;
|
||||||
|
|
||||||
|
@TableField("QUE_USER")
|
||||||
|
private String queUser;
|
||||||
|
|
||||||
|
@TableField("ANSWER_USER")
|
||||||
|
private String answerUser;
|
||||||
|
|
||||||
|
@TableField("RE_ANSWER_USER")
|
||||||
|
private String reAnswerUser;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "提问时间")
|
||||||
|
@TableField("QUE_TIME")
|
||||||
|
private LocalDateTime queTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否解答")
|
||||||
|
@TableField("ANSWER_FLAG")
|
||||||
|
private BigDecimal answerFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否有效")
|
||||||
|
@TableField("VALID_FLAG")
|
||||||
|
private BigDecimal validFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@TableField("CREATED_TIME")
|
||||||
|
private LocalDateTime createdTime;
|
||||||
|
|
||||||
|
@TableField("CREATED_USER")
|
||||||
|
private String createdUser;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
@TableField("MODIFY_TIME")
|
||||||
|
private LocalDateTime modifyTime;
|
||||||
|
|
||||||
|
@TableField("MODIFY_USER")
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+1
-1
@@ -829,7 +829,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
|||||||
return "1";
|
return "1";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//处理 代替被代替数据 关系
|
||||||
@ApiOperation(value = "国内海外数据处理接口")
|
@ApiOperation(value = "国内海外数据处理接口")
|
||||||
@GetMapping("/replaceBdtbzhforDtbzh")
|
@GetMapping("/replaceBdtbzhforDtbzh")
|
||||||
public String replaceBdtbzhforDtbzh(SarStandardsInfo sarStandardsInfo) {
|
public String replaceBdtbzhforDtbzh(SarStandardsInfo sarStandardsInfo) {
|
||||||
|
|||||||
+3
@@ -1,5 +1,6 @@
|
|||||||
package com.adc.da.slrs.sarStandardsInfo.dao;
|
package com.adc.da.slrs.sarStandardsInfo.dao;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
||||||
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;
|
||||||
@@ -84,4 +85,6 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
|||||||
|
|
||||||
List<String> selectIdFormDTBZH(String DTBZHCode);
|
List<String> selectIdFormDTBZH(String DTBZHCode);
|
||||||
|
|
||||||
|
List<DSarStandardDTO> dealWithDS(@Param("type") String standType, @Param("status")List<String> strings);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DSarStandardDTO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
@TableId("ID")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String SSRQ;
|
||||||
|
|
||||||
|
// 新添加字段
|
||||||
|
@ApiModelProperty(value = "文本状态")
|
||||||
|
@TableField("TEXT_STATUS")
|
||||||
|
private String textStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+16
@@ -1844,5 +1844,21 @@
|
|||||||
) = REPLACE ( #{DTBZHCode},' ', '')
|
) = REPLACE ( #{DTBZHCode},' ', '')
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
<select id="dealWithDS" resultType="com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO">
|
||||||
|
SELECT ss.ID , ss.TEXT_STATUS , ssa.SSRQ from sar_standards_info ss
|
||||||
|
LEFT JOIN sar_stand_attr_info ssa ON ssa.STAND_ID = ss.id
|
||||||
|
<where>
|
||||||
|
1=1 and ss.valid_flag = 0 and ssa.valid_flag = 0
|
||||||
|
<if test="type != null">
|
||||||
|
and ss.STAND_TYPE = #{type}
|
||||||
|
</if>
|
||||||
|
<if test=" null != status and status.size() >0 ">
|
||||||
|
and ss.TEXT_STATUS in
|
||||||
|
<foreach item="texts" collection="status" open="(" separator="," close=")" index="index">
|
||||||
|
#{texts}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
4.13------------------
|
4.13------------------
|
||||||
INSERT INTO `foton_slrs_test2`.`sar_menu`(`ID`, `SOR_DIVIDE`, `MENU_NAME`, `PARENT_ID`, `PARENT_IDS`, `LEVEL`, `DISPLAY_SEQ`, `HREF`, `VALID_FLAG`, `CREATION_TIME`, `MODIFY_TIME`, `REMARKS`) VALUES ('asdzcfgk', NULL, '政策法规库', NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL);
|
INSERT INTO `foton_slrs_test2`.`sar_menu`(`ID`, `SOR_DIVIDE`, `MENU_NAME`, `PARENT_ID`, `PARENT_IDS`, `LEVEL`, `DISPLAY_SEQ`, `HREF`, `VALID_FLAG`, `CREATION_TIME`, `MODIFY_TIME`, `REMARKS`) VALUES ('asdzcfgk', NULL, '政策法规库', NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
5-7 新增文本状态-----
|
||||||
|
INSERT INTO `foton_slrs`.`ts_dictype`(`ID`, `DIC_ID`, `DIC_TYPE_NAME`, `DIC_TYPE_CODE`, `DESCRIBES`, `SHOW_INDEX`, `PARENT_ID`, `TREE_PID`, `OTHERS`, `CREATION_USER`, `VALID_FLAG`, `CREATION_TIME`, `MODIFY_TIME`) VALUES ('gycree7258tly7fhrs1n', 'd1c9oygu5yvrtj8qt6w2', '发布', 'hc99551723c', '', 10, NULL, NULL, NULL, 'WY8J26MH23', '0', '2022-05-7 08:08:48', '2022-05-7 08:08:48');
|
||||||
Reference in New Issue
Block a user