预警查询
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
package com.adc.da.slrs.sarStandWarning.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
public interface IWarningDateService extends IService<WarningDate> {
|
||||
|
||||
}
|
||||
-4
@@ -1,12 +1,10 @@
|
||||
package com.adc.da.slrs.sarStandWarning.service.Impl;
|
||||
|
||||
|
||||
import com.adc.da.scheduled.entity.DataDTO;
|
||||
import com.adc.da.slrs.sarStandWarning.dao.EarlyWarningEODao;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.StandWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.service.EarlyWarningEOService;
|
||||
import com.adc.da.sys.util.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -16,9 +14,7 @@ import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service("EarlyWarningEOService")
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.adc.da.slrs.sarStandWarning.service.Impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandWarning.dao.WarningDateDao;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.adc.da.slrs.sarStandWarning.service.IWarningDateService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class WarningDateServiceImpl extends ServiceImpl<WarningDateDao, WarningDate> implements IWarningDateService {
|
||||
}
|
||||
+9
-4
@@ -5,6 +5,7 @@ import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||
import com.adc.da.slrs.sarStandWarning.dao.WarningDateDao;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.adc.da.slrs.sarStandWarning.service.Impl.WarningDateServiceImpl;
|
||||
import com.adc.da.slrs.sarUser.entity.TsUser;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
@@ -125,6 +126,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Value("${file.path}")
|
||||
private String filePath;//文件存储路径
|
||||
|
||||
@Autowired
|
||||
WarningDateServiceImpl warningDateService;
|
||||
|
||||
@Autowired
|
||||
private ITsPositionService iTsPositionService;
|
||||
|
||||
@@ -815,6 +819,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
* @Param: [sarStandardsInfoEO]
|
||||
* @Return: void
|
||||
*/
|
||||
@Transactional
|
||||
public void createStandAttrInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception {
|
||||
String sarStandAttrEOStr = sarStandardsInfoEO.getSarStandAttrEOStr();
|
||||
String mustFields = FieldConvertUtil.mustFields;
|
||||
@@ -1003,8 +1008,6 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
return Pattern.matches(verifyType,str);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
WarningDateDao warningDateDao;
|
||||
|
||||
|
||||
public void createStandPutTime(String standId, Map<String, String> multiTimeMap) throws Exception {
|
||||
@@ -1052,8 +1055,10 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
|
||||
if (warningDateList != null && warningDateList.size()>0){
|
||||
warningDateDao.deleteById(standId);
|
||||
//TODO 实施日期存表
|
||||
QueryWrapper<WarningDate> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("law_id",standId);
|
||||
warningDateService.remove(wrapper);
|
||||
warningDateService.saveBatch(warningDateList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-30
@@ -51,7 +51,7 @@
|
||||
</if>
|
||||
<if test="waringEO.startPutTime != null and waringEO.startPutTime != '' and waringEO.endPutTime != null and waringEO.endPutTime != '' ">
|
||||
AND (
|
||||
DATE_FORMAT( sarInfo.PUT_TIME, '%Y-%m-%d') >= DATE_FORMAT(
|
||||
DATE_FORMAT(sarInfo.PUT_TIME, '%Y-%m-%d') >= DATE_FORMAT(
|
||||
#{waringEO.endPutTime},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
@@ -65,16 +65,10 @@
|
||||
</if>
|
||||
<if test="waringEO.startSSRQ != null and waringEO.startSSRQ != '' and waringEO.endSSRQ != null and waringEO.endSSRQ != ''">
|
||||
AND (
|
||||
DATE_FORMAT( attr.SSRQ, '%Y-%m-%d') >= DATE_FORMAT(
|
||||
#{waringEO.startSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
|
||||
sarInfo.ID IN (SELECT DISTINCT law_id FROM warning_date as t WHERE
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') >= DATE_FORMAT(#{waringEO.startSSRQ}, '%Y-%m-%d')
|
||||
AND
|
||||
DATE_FORMAT( attr.SSRQ, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') <= DATE_FORMAT(#{waringEO.endSSRQ}, '%Y-%m-%d') AND t.time_name = 'SSRQ' )
|
||||
)
|
||||
</if>
|
||||
</sql>
|
||||
@@ -98,37 +92,25 @@
|
||||
LEFT JOIN sar_stand_attr_info AS attr on attr.STAND_ID=warning.STAND_ID
|
||||
<where>
|
||||
POWER = '1'
|
||||
|
||||
AND (MARK = 'stand')
|
||||
<include refid="stand_where"/>
|
||||
<if test="waringEO.applyType != null and waringEO.applyType != ''">
|
||||
AND attr.CLLX LIKE CONCAT('%', #{waringEO.applyType},'%')
|
||||
</if>
|
||||
<if test="waringEO.startXCXSSRQ != null and waringEO.startXCXSSRQ != '' and waringEO.endXCXSSRQ != null and waringEO.endXCXSSRQ != ''">
|
||||
AND (
|
||||
DATE_FORMAT( attr.XCXSSRQ, '%Y-%m-%d') >= DATE_FORMAT(
|
||||
#{waringEO.startXCXSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
|
||||
sarInfo.ID IN (SELECT DISTINCT law_id FROM warning_date as t WHERE
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') >= DATE_FORMAT(#{waringEO.startXCXSSRQ}, '%Y-%m-%d')
|
||||
AND
|
||||
DATE_FORMAT( attr.XCXSSRQ, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endXCXSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') <= DATE_FORMAT(#{waringEO.endXCXSSRQ}, '%Y-%m-%d') AND t.time_name = 'XCXSSRQ' )
|
||||
)
|
||||
</if>
|
||||
<if test="waringEO.startZCCSSRQ != null and waringEO.startZCCSSRQ != '' and waringEO.endZCCSSRQ != null and waringEO.endZCCSSRQ != ''">
|
||||
AND (
|
||||
DATE_FORMAT( attr.ZCCSSRQ, '%Y-%m-%d') >= DATE_FORMAT(
|
||||
#{waringEO.startZCCSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
|
||||
sarInfo.ID IN (SELECT DISTINCT law_id FROM warning_date as t WHERE
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') >= DATE_FORMAT(#{waringEO.startZCCSSRQ}, '%Y-%m-%d')
|
||||
AND
|
||||
DATE_FORMAT( attr.ZCCSSRQ, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endZCCSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') <= DATE_FORMAT(#{waringEO.startZCCSSRQ}, '%Y-%m-%d') AND t.time_name = 'ZCCSSRQ' )
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
@@ -156,7 +138,7 @@
|
||||
LEFT JOIN sar_stand_attr_info AS attr ON attr.STAND_ID = warning.STAND_ID
|
||||
<where>
|
||||
POWER = '1'
|
||||
|
||||
AND (MARK = 'item')
|
||||
<include refid="stand_where"/>
|
||||
<if test="waringEO.applyType != null and waringEO.applyType != ''">
|
||||
AND items.APPLY_ARCTIC LIKE CONCAT('%', #{waringEO.applyType},'%')
|
||||
|
||||
Reference in New Issue
Block a user