标准预警

This commit is contained in:
zhaokaiyao@91isoft.com
2021-08-26 10:23:02 +08:00
parent 426ff38355
commit 6e0091f875
5 changed files with 19 additions and 5 deletions
@@ -56,8 +56,8 @@ public class ScheduledJob {
private SarStandardInfoDao sarStandardInfoDao;
@Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
// @Scheduled(cron="*/5 * * * * ?")
// @Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
@Scheduled(cron="*/5 * * * * ?")
@Async
public void schedulingTasks() {
@@ -24,6 +24,9 @@ public class EarlyWarningEO extends BaseEntity {
@TableId("ID")
private String id;
@TableField("STAND_ID")
private String standId;
@TableField("STAND_TYPE")
private String standType;
@@ -45,6 +48,9 @@ public class EarlyWarningEO extends BaseEntity {
@TableField("ITEMS_ID")
private String itemsId;
@TableField("ITEMS_NUM")
private String itemsNum;
@TableField("ITEMS_NAME")
private String itemsName;
@@ -4,7 +4,7 @@
<!-- Result Map-->
<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_NAME" property="standName" />
<result column="XCXSSRQ" property="XCXSSRQ"/>
@@ -4,7 +4,10 @@
<!-- Result Map-->
<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_NAME" property="standName"/>
<result column="XCXSSRQ" property="XCXSSRQ"/>
@@ -16,12 +19,15 @@
<!-- 查询条件 -->
<select id="select" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
SELECT
items.ID,
STAND_ID,
ITEMS_NUM,
ITEMS_NAME,
TERMS_CONDITIONS,
DUTY_ENGINEER,
APPLY_ARCTIC,
info.STAND_TYPE,
info.STAND_NUMBER,
${str}
FROM
@@ -4,12 +4,13 @@
<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
<if test="warningEOS !=null and warningEOS.size()!=0">
<foreach collection="warningEOS" item="item" index="index" separator=",">
(
#{item.id}
,#{item.standId}
,#{item.standType}
,#{item.standCode}
,#{item.standName}
@@ -17,6 +18,7 @@
,#{item.applyType}
,#{item.dutyEngineer}
,#{item.itemsId}
,#{item.itemsNum}
,#{item.itemsName}
,#{item.policyId}
,#{item.policyName}