Merge branch 'develop_master' into develop_1
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -126,6 +126,7 @@ public class ScheduledJob {
|
||||
|
||||
//持久化至预警表 忽略标准id和标志位都一样的数据
|
||||
if (warningList.size()!=0){
|
||||
//此表的STAND_CODE和MARK字段需建立唯一性约束
|
||||
int count = sarStandardWarningDao.ignoreInsert(warningList);
|
||||
System.out.println("已预警 " + count + " 条标准或条款!!");
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
+3
-1
@@ -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}
|
||||
|
||||
@@ -164,8 +164,8 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
|
||||
saveWordFileName=UUIDUtils.randomUUID20()+"_"+wordFile.getOriginalFilename();
|
||||
saveWordFilePath=ocrFilePath+saveWordFileName;
|
||||
logger.info(saveWordFilePath);
|
||||
//FileUtils.copyInputStreamToFile(wordFile.getInputStream(),new File(saveWordFilePath));
|
||||
savePic(wordFile.getInputStream(),saveWordFilePath);
|
||||
FileUtils.copyInputStreamToFile(wordFile.getInputStream(),new File(saveWordFilePath));
|
||||
// savePic(wordFile.getInputStream(),saveWordFilePath);
|
||||
logger.info("word存储完成");
|
||||
}
|
||||
String saveJsonFilePath=null;
|
||||
@@ -174,8 +174,8 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
|
||||
saveJsonFileName=UUIDUtils.randomUUID20()+"_"+jsonFile.getOriginalFilename();
|
||||
saveJsonFilePath=ocrFilePath+saveJsonFileName;
|
||||
logger.info(saveJsonFilePath);
|
||||
//FileUtils.copyInputStreamToFile(jsonFile.getInputStream(),new File(saveJsonFilePath));
|
||||
savePic(jsonFile.getInputStream(),saveJsonFilePath);
|
||||
FileUtils.copyInputStreamToFile(jsonFile.getInputStream(),new File(saveJsonFilePath));
|
||||
// savePic(jsonFile.getInputStream(),saveJsonFilePath);
|
||||
logger.info("Json存储完成");
|
||||
}
|
||||
//开始将文件保存至数据库中
|
||||
|
||||
Reference in New Issue
Block a user