标准预警查询完全体
This commit is contained in:
+2
-2
@@ -42,7 +42,7 @@ public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
|
||||
* @author zj
|
||||
* date 2021-06-15
|
||||
**/
|
||||
@GetMapping("/StandWarning")
|
||||
@GetMapping("/${restPath}/StandWarning")
|
||||
@ApiOperation("标准预警查询")
|
||||
public ResponseMessage newPageInfo(@RequestParam(defaultValue = "1", value = "newStandPage")int newStandPage, @RequestParam(defaultValue = "10", value = "newStandPageSize") int newStandPageSize,
|
||||
@RequestParam(defaultValue = "1", value = "oldStandPage")int oldStandPage, @RequestParam(defaultValue = "10", value = "oldStandPageSize") int oldStandPageSize,
|
||||
@@ -55,7 +55,7 @@ public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
|
||||
return getResponseMessage(list1, list2, list3, list4);
|
||||
}
|
||||
|
||||
@GetMapping("/StandWarning")
|
||||
@GetMapping("/getStandWarning")
|
||||
@ApiOperation("标准预警查询")
|
||||
public ResponseMessage<IPage<StandWarningEO>> getStandWaring(StandWarningEO queryPageEO){
|
||||
IPage<StandWarningEO> standWarning = earlyWarningEOService.getStandWarning(queryPageEO);
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class EarlyWarningEO extends BaseEntity {
|
||||
@TableField("STAND_TYPE")
|
||||
private String standType;
|
||||
|
||||
@ApiModelProperty("标准编号")
|
||||
@ApiModelProperty("标准号")
|
||||
@TableField("STAND_CODE")
|
||||
private String standCode;
|
||||
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.sarStandWarning.dao.EarlyWarningEODao">
|
||||
|
||||
<!-- Result Map-->
|
||||
<resultMap id="resultMap" type="com.adc.da.slrs.sarStandWarning.entity.StandWarningEO" >
|
||||
<id column="ID" property="id" />
|
||||
<result column="STAND_ID" property="standId"></result>
|
||||
<result column="STAND_TYPE" property="standType"></result>
|
||||
<result column="STAND_CODE" property="standCode"></result>
|
||||
<result column="STAND_NAME" property="standName"></result>
|
||||
<result column="PUT_TIME" property="putTime"></result>
|
||||
<result column="APPLY_TYPE" property="applyType"></result>
|
||||
<result column="DUTY_ENGINEER" property="dutyEngineer"></result>
|
||||
<result column="ITEMS_ID" property="itemsId"></result>
|
||||
<result column="ITEMS_NUM" property="itemsNum"></result>
|
||||
<result column="ITEMS_NAME" property="itemsName"></result>
|
||||
<result column="POLICY_ID" property="policyId"></result>
|
||||
<result column="POLICY_NAME" property="policyName"></result>
|
||||
<result column="MARK" property="mark"></result>
|
||||
<result column="POWER" property="power"></result>
|
||||
|
||||
<result column="XCXSSRQ" property="XCXSSRQ"></result>
|
||||
<result column="ZCCSSRQ" property="ZCCSSRQ"></result>
|
||||
<result column="SSRQ" property="SSRQ"></result>
|
||||
</resultMap>
|
||||
|
||||
<sql id="stand_column">
|
||||
sarInfo.ID,
|
||||
sarInfo.STAND_TYPE,
|
||||
CONCAT(sarInfo.STAND_SORT,' ',sarInfo.STAND_NUMBER,'-',sarInfo.STAND_YEAR) AS STAND_CODE,
|
||||
sarInfo.STAND_NAME,
|
||||
sarInfo.PUT_TIME,
|
||||
attr.SSRQ as SSRQ
|
||||
</sql>
|
||||
|
||||
|
||||
<sql id="stand_where">
|
||||
<if test="waringEO.standCode != null and waringEO.standCode != ''">
|
||||
trim(replace(CONCAT(
|
||||
sarInfo.STAND_SORT,
|
||||
' ',
|
||||
sarInfo.STAND_NUMBER,
|
||||
'-',
|
||||
sarInfo.STAND_YEAR
|
||||
),' ','')) LIKE trim(replace(CONCAT('%',#{waringEO.standCode},'%'),' ',''))
|
||||
</if>
|
||||
<if test="waringEO.standName != null and waringEO.standName != ''">
|
||||
sarInfo.STAND_NAME = #{waringEO.standName}
|
||||
</if>
|
||||
<if test="waringEO.putTime != null and waringEO.putTime != ''">
|
||||
|
||||
DATE_FORMAT( sarInfo.PUT_TIME, '%Y-%m-%d') = DATE_FORMAT(
|
||||
#{waringEO.putTime},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
</if>
|
||||
<if test="waringEO.SSRQ != null and waringEO.SSRQ != ''">
|
||||
DATE_FORMAT(attr.SSRQ, '%Y-%m-%d') = DATE_FORMAT(
|
||||
#{waringEO.SSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectWarningPage" resultMap="resultMap">
|
||||
SELECT
|
||||
<include refid="stand_column"/> ,
|
||||
attr.CLLX as APPLY_TYPE ,
|
||||
attr.ZRGCS as DUTY_ENGINEER ,
|
||||
NULL AS ITEMS_ID ,
|
||||
NULL AS ITEMS_NUM ,
|
||||
NULL as ITEMS_NAME ,
|
||||
NULL as POLICY_ID ,
|
||||
NULL as POLICY_NAME ,
|
||||
MARK ,
|
||||
POWE R ,
|
||||
attr.XCXSSRQ as XCXSSRQ ,
|
||||
attr.ZCCSSRQ as ZCCSSRQ
|
||||
FROM sar_stand_warning as warning
|
||||
LEFT JOIN sar_standards_info as sarInfo on sarInfo.id=warning.STAND_ID
|
||||
LEFT JOIN sar_stand_attr_info as attr on attr.STAND_ID=warning.STAND_ID
|
||||
<where>
|
||||
|
||||
<if test="waringEO.applyType != null and waringEO.applyType != ''">
|
||||
attr.CLLX = #{waringEO.applyType}
|
||||
</if>
|
||||
<if test="waringEO.XCXSSRQ != null and waringEO.XCXSSRQ != ''">
|
||||
DATE_FORMAT(attr.XCXSSRQ, '%Y-%m-%d') = DATE_FORMAT(
|
||||
#{waringEO.XCXSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
</if>
|
||||
<if test="waringEO.ZCCSSRQ != null and waringEO.ZCCSSRQ != ''">
|
||||
DATE_FORMAT(attr.ZCCSSRQ, '%Y-%m-%d') = DATE_FORMAT(
|
||||
#{waringEO.ZCCSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
<include refid="stand_column"/> ,
|
||||
items.APPLY_ARCTIC AS APPLY_TYPE ,
|
||||
items.DUTY_ENGINEER AS DUTY_ENGINEER ,
|
||||
items.ID as ITEMS_ID ,
|
||||
items.ITEMS_NUM ,
|
||||
items.ITEMS_NAME ,
|
||||
NULL as POLICY_ID ,
|
||||
NULL as POLICY_NAME ,
|
||||
MARK ,
|
||||
POWER ,
|
||||
items.XCXSSRQ as XCXSSRQ ,
|
||||
items.ZCCSSRQ as ZCCSSRQ
|
||||
FROM
|
||||
sar_stand_warning AS warning
|
||||
LEFT JOIN sar_standards_info AS sarInfo ON sarInfo.id = warning.STAND_ID
|
||||
LEFT JOIN sar_stand_items AS items ON items.STAND_ID = warning.STAND_ID
|
||||
LEFT JOIN sar_stand_attr_info AS attr ON attr.STAND_ID = warning.STAND_ID
|
||||
<where>
|
||||
|
||||
|
||||
<if test="waringEO.applyType != null and waringEO.applyType != ''">
|
||||
items.APPLY_ARCTIC = #{waringEO.applyType}
|
||||
</if>
|
||||
|
||||
<if test="waringEO.XCXSSRQ != null and waringEO.XCXSSRQ != ''">
|
||||
DATE_FORMAT(items.XCXSSRQ, '%Y-%m-%d') = DATE_FORMAT(
|
||||
#{waringEO.XCXSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
</if>
|
||||
<if test="waringEO.ZCCSSRQ != null and waringEO.ZCCSSRQ != ''">
|
||||
DATE_FORMAT(items.ZCCSSRQ, '%Y-%m-%d') = DATE_FORMAT(
|
||||
#{waringEO.ZCCSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
+185
@@ -0,0 +1,185 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.sarStandWarning.dao.EarlyWarningEODao">
|
||||
|
||||
<!-- Result Map-->
|
||||
<resultMap id="resultMap" type="com.adc.da.slrs.sarStandWarning.entity.StandWarningEO" >
|
||||
<id column="ID" property="id" />
|
||||
<result column="STAND_ID" property="standId"></result>
|
||||
<result column="STAND_TYPE" property="standType"></result>
|
||||
<result column="STAND_CODE" property="standCode"></result>
|
||||
<result column="STAND_NAME" property="standName"></result>
|
||||
<result column="PUT_TIME" property="putTime"></result>
|
||||
<result column="APPLY_TYPE" property="applyType"></result>
|
||||
<result column="DUTY_ENGINEER" property="dutyEngineer"></result>
|
||||
<result column="ITEMS_ID" property="itemsId"></result>
|
||||
<result column="ITEMS_NUM" property="itemsNum"></result>
|
||||
<result column="ITEMS_NAME" property="itemsName"></result>
|
||||
<result column="POLICY_ID" property="policyId"></result>
|
||||
<result column="POLICY_NAME" property="policyName"></result>
|
||||
<result column="MARK" property="mark"></result>
|
||||
<result column="POWER" property="power"></result>
|
||||
|
||||
<result column="XCXSSRQ" property="XCXSSRQ"></result>
|
||||
<result column="ZCCSSRQ" property="ZCCSSRQ"></result>
|
||||
<result column="SSRQ" property="SSRQ"></result>
|
||||
</resultMap>
|
||||
|
||||
<sql id="stand_column">
|
||||
sarInfo.ID,
|
||||
sarInfo.STAND_TYPE,
|
||||
CONCAT(sarInfo.STAND_SORT,' ',sarInfo.STAND_NUMBER,'-',sarInfo.STAND_YEAR) AS STAND_CODE,
|
||||
sarInfo.STAND_NAME,
|
||||
sarInfo.PUT_TIME,
|
||||
attr.SSRQ as SSRQ
|
||||
</sql>
|
||||
|
||||
|
||||
<sql id="stand_where">
|
||||
<if test="waringEO.standCode != null and waringEO.standCode != ''">
|
||||
AND trim(replace(CONCAT(
|
||||
sarInfo.STAND_SORT,
|
||||
' ',
|
||||
sarInfo.STAND_NUMBER,
|
||||
'-',
|
||||
sarInfo.STAND_YEAR
|
||||
),' ','')) LIKE trim(replace(CONCAT('%',#{waringEO.standCode},'%'),' ',''))
|
||||
</if>
|
||||
<if test="waringEO.standName != null and waringEO.standName != ''">
|
||||
AND sarInfo.STAND_NAME = #{waringEO.standName}
|
||||
</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(
|
||||
#{waringEO.endPutTime},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
|
||||
AND
|
||||
DATE_FORMAT( sarInfo.PUT_TIME, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endPutTime},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
)
|
||||
</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'
|
||||
)
|
||||
|
||||
AND
|
||||
DATE_FORMAT( attr.SSRQ, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
)
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectWarningPage" resultMap="resultMap">
|
||||
SELECT
|
||||
<include refid="stand_column"/> ,
|
||||
attr.CLLX AS APPLY_TYPE ,
|
||||
attr.ZRGCS AS DUTY_ENGINEER ,
|
||||
NULL AS ITEMS_ID ,
|
||||
NULL AS ITEMS_NUM ,
|
||||
NULL AS ITEMS_NAME ,
|
||||
NULL AS POLICY_ID ,
|
||||
NULL AS POLICY_NAME ,
|
||||
MARK ,
|
||||
POWER,
|
||||
attr.XCXSSRQ AS XCXSSRQ ,
|
||||
attr.ZCCSSRQ AS ZCCSSRQ
|
||||
FROM sar_stand_warning AS warning
|
||||
LEFT JOIN sar_standards_info AS sarInfo on sarInfo.id=warning.STAND_ID
|
||||
LEFT JOIN sar_stand_attr_info AS attr on attr.STAND_ID=warning.STAND_ID
|
||||
<where>
|
||||
POWER = '1'
|
||||
|
||||
<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'
|
||||
)
|
||||
|
||||
AND
|
||||
DATE_FORMAT( attr.XCXSSRQ, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endXCXSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
)
|
||||
</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'
|
||||
)
|
||||
|
||||
AND
|
||||
DATE_FORMAT( attr.ZCCSSRQ, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endZCCSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
<include refid="stand_column"/> ,
|
||||
items.APPLY_ARCTIC AS APPLY_TYPE ,
|
||||
items.DUTY_ENGINEER AS DUTY_ENGINEER ,
|
||||
items.ID AS ITEMS_ID ,
|
||||
items.ITEMS_NUM ,
|
||||
items.ITEMS_NAME ,
|
||||
NULL AS POLICY_ID ,
|
||||
NULL AS POLICY_NAME ,
|
||||
MARK ,
|
||||
POWER,
|
||||
items.XCXSSRQ AS XCXSSRQ ,
|
||||
items.ZCCSSRQ AS ZCCSSRQ
|
||||
FROM
|
||||
sar_stand_warning AS warning
|
||||
LEFT JOIN sar_standards_info AS sarInfo ON sarInfo.id = warning.STAND_ID
|
||||
LEFT JOIN sar_stand_items AS items ON items.STAND_ID = warning.STAND_ID
|
||||
LEFT JOIN sar_stand_attr_info AS attr ON attr.STAND_ID = warning.STAND_ID
|
||||
<where>
|
||||
POWER = '1'
|
||||
|
||||
<include refid="stand_where"/>
|
||||
<if test="waringEO.applyType != null and waringEO.applyType != ''">
|
||||
AND items.APPLY_ARCTIC LIKE CONCAT('%', #{waringEO.applyType},'%')
|
||||
</if>
|
||||
|
||||
<if test="waringEO.startXCXSSRQ != null and waringEO.startXCXSSRQ != '' and waringEO.endXCXSSRQ != null and waringEO.endXCXSSRQ != ''">
|
||||
AND (
|
||||
DATE_FORMAT( items.XCXSSRQ, '%Y-%m-%d') >= DATE_FORMAT(#{waringEO.startXCXSSRQ},'%Y-%m-%d')
|
||||
AND
|
||||
DATE_FORMAT( items.XCXSSRQ, '%Y-%m-%d') <= DATE_FORMAT(#{waringEO.endXCXSSRQ},'%Y-%m-%d')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="waringEO.startZCCSSRQ != null and waringEO.startZCCSSRQ != '' and waringEO.endZCCSSRQ != null and waringEO.endZCCSSRQ != ''">
|
||||
AND(
|
||||
DATE_FORMAT( items.ZCCSSRQ, '%Y-%m-%d') >= DATE_FORMAT(#{waringEO.startZCCSSRQ},'%Y-%m-%d')
|
||||
AND
|
||||
DATE_FORMAT( items.ZCCSSRQ, '%Y-%m-%d') <= DATE_FORMAT(#{waringEO.endZCCSSRQ},'%Y-%m-%d' )
|
||||
)
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user