Merge branch 'develop_3' into 'develop_master'

Develop 3

See merge request !135
This commit is contained in:
super_liu
2021-08-26 02:27:07 +00:00
5 changed files with 20 additions and 5 deletions
@@ -56,8 +56,8 @@ public class ScheduledJob {
private SarStandardInfoDao sarStandardInfoDao; private SarStandardInfoDao sarStandardInfoDao;
@Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行 // @Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
// @Scheduled(cron="*/5 * * * * ?") @Scheduled(cron="*/5 * * * * ?")
@Async @Async
public void schedulingTasks() { public void schedulingTasks() {
@@ -126,6 +126,7 @@ public class ScheduledJob {
//持久化至预警表 忽略标准id和标志位都一样的数据 //持久化至预警表 忽略标准id和标志位都一样的数据
if (warningList.size()!=0){ if (warningList.size()!=0){
//此表的STAND_CODE和MARK字段需建立唯一性约束
int count = sarStandardWarningDao.ignoreInsert(warningList); int count = sarStandardWarningDao.ignoreInsert(warningList);
System.out.println("已预警 " + count + " 条标准或条款!!"); System.out.println("已预警 " + count + " 条标准或条款!!");
} }
@@ -24,6 +24,9 @@ public class EarlyWarningEO extends BaseEntity {
@TableId("ID") @TableId("ID")
private String id; private String id;
@TableField("STAND_ID")
private String standId;
@TableField("STAND_TYPE") @TableField("STAND_TYPE")
private String standType; private String standType;
@@ -45,6 +48,9 @@ public class EarlyWarningEO extends BaseEntity {
@TableField("ITEMS_ID") @TableField("ITEMS_ID")
private String itemsId; private String itemsId;
@TableField("ITEMS_NUM")
private String itemsNum;
@TableField("ITEMS_NAME") @TableField("ITEMS_NAME")
private String itemsName; private String itemsName;
@@ -4,7 +4,7 @@
<!-- Result Map--> <!-- Result Map-->
<resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO" > <resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO" >
<id column="ID" property="id" /> <id column="ID" property="standId" />
<result column="STAND_NUMBER" property="standCode" /> <result column="STAND_NUMBER" property="standCode" />
<result column="STAND_NAME" property="standName" /> <result column="STAND_NAME" property="standName" />
<result column="XCXSSRQ" property="XCXSSRQ"/> <result column="XCXSSRQ" property="XCXSSRQ"/>
@@ -4,7 +4,10 @@
<!-- Result Map--> <!-- Result Map-->
<resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO"> <resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO">
<id column="ID" property="id"/> <id column="ID" property="itemsId"/>
<result column="STAND_ID" property="standId"/>
<result column="ITEMS_NAME" property="itemsName"/>
<result column="ITEMS_NUM" property="itemsNum"/>
<result column="STAND_NUMBER" property="standCode"/> <result column="STAND_NUMBER" property="standCode"/>
<result column="STAND_NAME" property="standName"/> <result column="STAND_NAME" property="standName"/>
<result column="XCXSSRQ" property="XCXSSRQ"/> <result column="XCXSSRQ" property="XCXSSRQ"/>
@@ -16,12 +19,15 @@
<!-- 查询条件 --> <!-- 查询条件 -->
<select id="select" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO"> <select id="select" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
SELECT SELECT
items.ID,
STAND_ID, STAND_ID,
ITEMS_NUM, ITEMS_NUM,
ITEMS_NAME,
TERMS_CONDITIONS, TERMS_CONDITIONS,
DUTY_ENGINEER, DUTY_ENGINEER,
APPLY_ARCTIC, APPLY_ARCTIC,
info.STAND_TYPE, info.STAND_TYPE,
info.STAND_NUMBER,
${str} ${str}
FROM FROM
@@ -4,12 +4,13 @@
<insert id="ignoreInsert" parameterType="java.util.LinkedList"> <insert id="ignoreInsert" parameterType="java.util.LinkedList">
INSERT IGNORE INTO sar_stand_warning (ID, STAND_TYPE, STAND_CODE,STAND_NAME,PUT_TIME,APPLY_TYPE,DUTY_ENGINEER,ITEMS_ID,ITEMS_NAME,POLICY_ID,POLICY_NAME,MARK,POWER) INSERT IGNORE INTO sar_stand_warning (ID,STAND_ID, STAND_TYPE, STAND_CODE,STAND_NAME,PUT_TIME,APPLY_TYPE,DUTY_ENGINEER,ITEMS_ID,ITEMS_NUM,ITEMS_NAME,POLICY_ID,POLICY_NAME,MARK,POWER)
VALUES VALUES
<if test="warningEOS !=null and warningEOS.size()!=0"> <if test="warningEOS !=null and warningEOS.size()!=0">
<foreach collection="warningEOS" item="item" index="index" separator=","> <foreach collection="warningEOS" item="item" index="index" separator=",">
( (
#{item.id} #{item.id}
,#{item.standId}
,#{item.standType} ,#{item.standType}
,#{item.standCode} ,#{item.standCode}
,#{item.standName} ,#{item.standName}
@@ -17,6 +18,7 @@
,#{item.applyType} ,#{item.applyType}
,#{item.dutyEngineer} ,#{item.dutyEngineer}
,#{item.itemsId} ,#{item.itemsId}
,#{item.itemsNum}
,#{item.itemsName} ,#{item.itemsName}
,#{item.policyId} ,#{item.policyId}
,#{item.policyName} ,#{item.policyName}