Merge remote-tracking branch 'origin/develop_master' into develop_1
This commit is contained in:
@@ -390,10 +390,10 @@
|
||||
and ITEMS_NAME like CONCAT('%', #{itemsName},'%')
|
||||
</if>
|
||||
<if test="XCXSSRQ !=null">
|
||||
and XCXSSRQ=#{XCXSSRQ}
|
||||
and XCXSSRQ like concat('%', #{XCXSSRQ},'%')
|
||||
</if>
|
||||
<if test="ZCCSSRQ !=null">
|
||||
and ZCCSSRQ=#{ZCCSSRQ}
|
||||
and ZCCSSRQ like concat('%',#{ZCCSSRQ},'%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
@@ -17,7 +17,11 @@
|
||||
wg_leader,
|
||||
draft_time,
|
||||
release_time,
|
||||
unit
|
||||
unit,
|
||||
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,res_person) ) as res_personName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,wg_leader) ) as wg_leaderName
|
||||
</sql>
|
||||
<resultMap id="BaseInfoMap" type="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan">
|
||||
<id property="id" column="id"></id>
|
||||
@@ -206,4 +210,12 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectPageByName" resultMap="BaseInfoMap">
|
||||
select <include refid="BaseInfo"></include> from es_revise_plan
|
||||
where es_name = #{esName}
|
||||
<if test="id != null and id != '' ">
|
||||
and id != #{id}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?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.evaluationIndex.dao.EvaluationIndexDao">
|
||||
|
||||
</mapper>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?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.fileMaterialCenter.dao.FileMaterialDao">
|
||||
|
||||
<update id="topping">
|
||||
UPDATE file_material
|
||||
SET is_top = (
|
||||
(
|
||||
SELECT
|
||||
Max(is_top)
|
||||
FROM
|
||||
(SELECT * FROM file_material) AS x
|
||||
) + 1
|
||||
)
|
||||
WHERE
|
||||
id = #{id}
|
||||
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.fileMaterialCerter.dao.MaterialDao">
|
||||
|
||||
</mapper>
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.adc.da.slrs.sapMeetInfo.dao.SapMeetingDao">
|
||||
|
||||
<sql id="BaseSelect">
|
||||
id,title,date,content,type,attend,files
|
||||
id,title,date,content,type,attend,files,place
|
||||
</sql>
|
||||
<sql id="Search">
|
||||
type = #{type}
|
||||
@@ -19,6 +19,7 @@
|
||||
<if test="type != null">type,</if>
|
||||
<if test="attend != null">attend,</if>
|
||||
<if test="files != null">files,</if>
|
||||
<if test="place != null">place,</if>
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -29,6 +30,7 @@
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="attend != null">#{attend},</if>
|
||||
<if test="files != null">#{files},</if>
|
||||
<if test="place != null">#{place},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
+12
-3
@@ -37,19 +37,20 @@
|
||||
<result column="standSortShow" property="standSortShow" />
|
||||
<result column="stand_year" property="standYear" />
|
||||
<result column="text_status_buss" property="textStatusBuss" />
|
||||
<result column="stand_number" property="standNumber" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_BUSSIONESS_STAND table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
modify_time, creation_time, valid_flag, stand_status, replaced_stand_num,replace_stand_num,
|
||||
put_time, issue_time,stand_en_name,stand_name, stand_code, id,apply_country, stand_nature, stand_sort,text_status_buss
|
||||
put_time, issue_time,stand_en_name,stand_name, stand_code, id,apply_country, stand_nature, stand_sort,text_status_buss,stand_number
|
||||
</sql>
|
||||
<sql id="Base_Column_List_show" >
|
||||
SAR_BUSSIONESS_STAND.modify_time,
|
||||
SAR_BUSSIONESS_STAND.creation_time, SAR_BUSSIONESS_STAND.valid_flag,
|
||||
SAR_BUSSIONESS_STAND.apply_country, SAR_BUSSIONESS_STAND.stand_nature,SAR_BUSSIONESS_STAND.stand_sort,SAR_BUSSIONESS_STAND.stand_year,
|
||||
stand_status, replaced_stand_num,replace_stand_num,put_time,issue_time,stand_en_name,
|
||||
stand_name, stand_code,SAR_BUSSIONESS_STAND.id,SAR_BUSSIONESS_STAND.text_status_buss
|
||||
stand_name, stand_code,SAR_BUSSIONESS_STAND.id,SAR_BUSSIONESS_STAND.text_status_buss,SAR_BUSSIONESS_STAND.stand_number
|
||||
</sql>
|
||||
|
||||
<sql id="Group_Column_List_show" >
|
||||
@@ -168,6 +169,7 @@
|
||||
<if test="standNature != null" >stand_Nature,</if>
|
||||
<if test="standSort != null" >stand_sort,</if>
|
||||
<if test="standYear != null" >stand_year,</if>
|
||||
<if test="standNumber != null" >stand_number,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
@@ -187,6 +189,7 @@
|
||||
<if test="standNature != null" >#{standNature, jdbcType=VARCHAR},</if>
|
||||
<if test="standSort != null" >#{standSort, jdbcType=VARCHAR},</if>
|
||||
<if test="standYear != null" >#{standYear, jdbcType=VARCHAR},</if>
|
||||
<if test="standNumber != null" >#{standNumber, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -246,6 +249,9 @@
|
||||
<if test="standYear != null" >
|
||||
stand_year = #{standYear},
|
||||
</if>
|
||||
<if test="standNumber != null" >
|
||||
stand_number = #{standNumber},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -301,6 +307,9 @@
|
||||
<if test="standYear != null" >
|
||||
stand_year = #{standYear},
|
||||
</if>
|
||||
<if test="standNumber != null" >
|
||||
stand_number = #{standNumber},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -373,7 +382,7 @@
|
||||
when tmp_tb.stand_code like concat('%', 'Q/QCFLC', '%') THEN 16
|
||||
ELSE 17
|
||||
END,
|
||||
tmp_tb.stand_sort ASC
|
||||
tmp_tb.stand_sort ASC,CAST(tmp_tb.STAND_NUMBER AS decimal(9,2)) ASC,tmp_tb.STAND_YEAR DESC,tmp_tb.id
|
||||
</sql>
|
||||
<sql id="standSort_out">
|
||||
ORDER BY
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?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.sarEnterpriseStandardEvaluation.dao.EvaluationIndexDao">
|
||||
|
||||
</mapper>
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
<?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.sarEnterpriseStandardEvaluation.dao.QualityEvaluationDao">
|
||||
|
||||
<select id="getHistory"
|
||||
resultType="com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation">
|
||||
|
||||
SELECT
|
||||
`user`.UNAME AS userName,
|
||||
eva.user_id,
|
||||
`index`.value_type as valueType,
|
||||
eva.evaluation_type as evaluationType,
|
||||
process_node as processNode,
|
||||
avg(eva.score * `index`.weight) AS score,
|
||||
min(eva.create_time) as createTiem,
|
||||
max(eva.modify_time) as modifyTime
|
||||
FROM
|
||||
quality_evaluation AS eva
|
||||
LEFT JOIN ts_user `user` ON eva.user_id = `user`.USID
|
||||
LEFT JOIN evaluation_index AS `index` ON eva.evaluation_index = `index`.id
|
||||
${ew.customSqlSegment}
|
||||
GROUP BY
|
||||
userName,
|
||||
eva.user_id,
|
||||
index_type,
|
||||
valueType,
|
||||
evaluationType,
|
||||
process_node
|
||||
ORDER BY modifyTime DESC,process_node ASC
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="getEvaluationForm"
|
||||
resultType="com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation">
|
||||
|
||||
SELECT
|
||||
UNAME AS userName,
|
||||
score,
|
||||
reason,
|
||||
evaluation_index as evaluationIndex,
|
||||
process_node as processNode,
|
||||
quality_evaluation.create_time AS createTime,
|
||||
quality_evaluation.modify_time AS modifyTime,
|
||||
`index`.value_type AS valueType,
|
||||
`index`.three_index_title as indexTitle,
|
||||
`index`.one_index_title as oneIndexTitle,
|
||||
`index`.two_index_title as twoIndexTitle,
|
||||
`index`.three_index_title as threeIndexTitle,
|
||||
`index`.weight as weight
|
||||
FROM
|
||||
quality_evaluation
|
||||
LEFT JOIN ts_user `user` ON quality_evaluation.user_id = `user` .USID
|
||||
LEFT JOIN evaluation_index AS `index` ON `index`.id = quality_evaluation.evaluation_index
|
||||
${ew.customSqlSegment}
|
||||
|
||||
ORDER BY `index`.index_sort
|
||||
</select>
|
||||
</mapper>
|
||||
+8
-4
@@ -38,11 +38,14 @@
|
||||
<!-- 只查询这个部门下的子一级人员-->
|
||||
<select id="selectNextUser" resultMap="TsUser">
|
||||
select ts_user.EMAIL,ts_user.ACCOUNT,ts_user.CREATION_TIME,ts_user.DISABLE_FLAG,ts_user.EXT_INFO,ts_user.USID,
|
||||
ts_user.INSTITUTION_ID,ts_user.INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
|
||||
ts_user.INSTITUTION_ID,t2.name as INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
|
||||
ts_user.POSITION_ID,ts_user.POSITION_NAME,ts_user.SEX,ts_user.SSO_ID,ts_user.STATE,ts_user.UNLOCK_FLAG,ts_user.USER_SOURCE,
|
||||
ts_user.USER_TYPE,ts_user.VALID_FLAG,ts_user.WORK_NUM,concat(ts_user.UNAME,concat(concat("(",ts_user.ACCOUNT),")")) as uname
|
||||
ts_user.USER_TYPE,ts_user.VALID_FLAG,ts_user.WORK_NUM,concat(ts_user.UNAME,concat(concat("(",ts_user.ACCOUNT),")")) as uname,
|
||||
ts_institution.name as unit,ts_institution.id as unitId
|
||||
from ts_user
|
||||
WHERE institution_id=#{institutionId}
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
|
||||
left join ts_institution t2 on t2.id=ts_user.INSTITUTION_ID
|
||||
WHERE institution_id=#{institutionId}
|
||||
<if test="userName != null and userName != '' ">
|
||||
and ( ts_user.ACCOUNT like concat(concat('%',#{userName}),'%') or ts_user.UNAME like concat(concat('%',#{userName}),'%') )
|
||||
</if>
|
||||
@@ -50,10 +53,11 @@
|
||||
|
||||
<select id="selectNextUserByIds" resultMap="TsUser">
|
||||
select ts_user.EMAIL,ts_user.ACCOUNT,ts_user.CREATION_TIME,ts_user.DISABLE_FLAG,ts_user.EXT_INFO,ts_user.USID,
|
||||
ts_user.INSTITUTION_ID,ts_user.INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
|
||||
ts_user.INSTITUTION_ID,ts_institution.name as INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
|
||||
ts_user.POSITION_ID,ts_user.POSITION_NAME,ts_user.SEX,ts_user.SSO_ID,ts_user.STATE,ts_user.UNLOCK_FLAG,ts_user.USER_SOURCE,
|
||||
ts_user.USER_TYPE,ts_user.VALID_FLAG,ts_user.WORK_NUM,concat(ts_user.UNAME,concat(concat("(",ts_user.ACCOUNT),")")) as uname
|
||||
from ts_user
|
||||
left join ts_institution on ts_user.INSTITUTION_ID=ts_institution.id
|
||||
WHERE 1=1
|
||||
<if test="ids != null and ids.size()> 0 ">
|
||||
and ts_user.USID in
|
||||
|
||||
+156
-67
@@ -44,6 +44,86 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
a.ID,
|
||||
a.STAND_CODE AS standNumber,
|
||||
a.STAND_NAME AS standName,
|
||||
a.STAND_EN_NAME,
|
||||
b.NYLXCLASS,
|
||||
null AS SSRQ,
|
||||
null AS XCXSSRQGJ,
|
||||
null AS ZCCSSRQGJ,
|
||||
null as ZRBM,
|
||||
null as SYCPX,
|
||||
null as CYCVPPSBM,
|
||||
null as CYCVPPSCN,
|
||||
null as KCCVPPSBM,
|
||||
null as KCCVPPSCN,
|
||||
null as typeApplicable,
|
||||
dicstandSort.DIC_TYPE_NAME AS standSortShow,
|
||||
null as standYear,
|
||||
null as issueTime,
|
||||
null asstandType,
|
||||
null AS textStatus
|
||||
FROM
|
||||
sar_bussioness_stand a
|
||||
LEFT JOIN sar_buss_stand_attr_info b ON a.ID = b.STAND_ID
|
||||
LEFT JOIN TS_DICTYPE dicstandSort ON (
|
||||
dicstandSort.dic_type_code = a.stand_sort
|
||||
AND dicstandSort.dic_id IS NOT NULL
|
||||
AND dicstandSort.valid_flag = 0
|
||||
AND dicstandSort.PARENT_ID IS NULL
|
||||
)
|
||||
<where>
|
||||
a.ID IN
|
||||
<foreach collection="param1" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
a.ID,
|
||||
a.LAWS_NUMBER AS standNumber,
|
||||
a.LAWS_NAME AS standName,
|
||||
a.LAWS_EN_NAME as STAND_EN_NAME,
|
||||
b.NYLXLAWS,
|
||||
b.SSRQLAWS AS SSRQ,
|
||||
b.XCXSSRQLAWS AS XCXSSRQGJ,
|
||||
b.ZCXSSRQLAWS AS ZCCSSRQGJ,
|
||||
b.ZRBMLAWS as ZRBM,
|
||||
null as SYCPX,
|
||||
null as CYCVPPSBM,
|
||||
null as CYCVPPSCN,
|
||||
null as KCCVPPSBM,
|
||||
null as KCCVPPSCN,
|
||||
null as typeApplicable,
|
||||
dicstandSort.DIC_TYPE_NAME AS standSortShow,
|
||||
a.LAWS_YEAR as standYear,
|
||||
a.ISSUE_TIME as issueTime,
|
||||
null asstandType,
|
||||
null AS textStatus
|
||||
FROM
|
||||
sar_laws_stand_info a
|
||||
LEFT JOIN sar_laws_attr_info b ON a.ID = b.LAWS_ID
|
||||
LEFT JOIN TS_DICTYPE dicstandSort ON (
|
||||
dicstandSort.dic_type_code = a.LAWS_TYPE
|
||||
AND dicstandSort.dic_id IS NOT NULL
|
||||
AND dicstandSort.valid_flag = 0
|
||||
AND dicstandSort.PARENT_ID IS NULL
|
||||
)
|
||||
<where>
|
||||
a.ID IN
|
||||
<foreach collection="param1" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectLawsByIdE" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||
@@ -99,118 +179,127 @@
|
||||
order by number
|
||||
</select>
|
||||
<select id="selectLawsByIdC" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||
select distinct c.ID,c.* from (
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as
|
||||
SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as
|
||||
standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||
a.ID = b.STAND_ID
|
||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||
FROM sar_stand_items ssi
|
||||
left join sar_standards_info a on ssi.stand_id = a.id
|
||||
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||
<where>
|
||||
1=1 and a.ID is not null
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
and
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
ssi.FILE_TYPE = #{fileType} and
|
||||
and ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
a.STAND_TYPE = #{standType} and
|
||||
and a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="param1 != null and param1.size()>0">
|
||||
and a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
UNION
|
||||
UNION all
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||
a.ID = b.STAND_ID
|
||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||
FROM sar_stand_items ssi
|
||||
left join sar_standards_info a on ssi.stand_id = a.id
|
||||
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||
<where>
|
||||
1=1 and a.ID is not null
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
and
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
ssi.FILE_TYPE = #{fileType} and
|
||||
and ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
a.STAND_TYPE = #{standType} and
|
||||
and a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
<if test="param1 != null and param1.size()>0">
|
||||
and a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
)c
|
||||
limit #{start},#{end}
|
||||
</select>
|
||||
|
||||
<select id="selectLawsByIdCount" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||
select distinct c.ID,c.* from (
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as
|
||||
SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as
|
||||
standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||
a.ID = b.STAND_ID
|
||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||
FROM sar_stand_items ssi
|
||||
left join sar_standards_info a on ssi.stand_id = a.id
|
||||
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||
<where>
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
and
|
||||
ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
and
|
||||
a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
|
||||
<if test="param1 !=null and param1.size()>0 " >
|
||||
and
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
UNION
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||
a.ID = b.STAND_ID
|
||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||
<where>
|
||||
1=1
|
||||
1=1 and a.ID is not null
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
and
|
||||
ssi.FILE_TYPE = #{fileType}
|
||||
and ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
and
|
||||
a.STAND_TYPE = #{standType}
|
||||
and a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
<if test="param1 !=null and param1.size()>0 " >
|
||||
and
|
||||
a.ID IN
|
||||
<if test="param1 != null and param1.size()>0">
|
||||
and a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
UNION all
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as
|
||||
SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as
|
||||
standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_stand_items ssi
|
||||
left join sar_standards_info a on ssi.stand_id = a.id
|
||||
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||
<where>
|
||||
1=1 and a.ID is not null
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
and ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
and a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
<if test="param1 != null and param1.size()>0">
|
||||
and a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
)c
|
||||
</select>
|
||||
|
||||
<select id="selectTimes" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandRegionalTimeDto">
|
||||
|
||||
+135
-5
@@ -95,7 +95,8 @@
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NUMBER like concat(concat('%',#{lawsNumber}),'%')
|
||||
</if>
|
||||
<if test="numberName != null and numberName != ''">
|
||||
and (LAWS_NAME like concat(concat('%',#{numberName}),'%')
|
||||
and (SAR_LAWS_STAND_INFO.LAWS_NAME like concat(concat('%',#{numberName}),'%')
|
||||
or SAR_LAWS_STAND_INFO.LAWS_NUMBER like concat(concat('%',#{numberName}),'%')
|
||||
or SAR_LAWS_STAND_INFO.LAWS_EN_NAME like concat(concat('%',#{numberName}),'%'))
|
||||
</if>
|
||||
<if test="lawsName != null and lawsName != ''">
|
||||
@@ -283,7 +284,7 @@
|
||||
parameterType="com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage">
|
||||
select
|
||||
DISTINCT SAR_LAWS_STAND_INFO.ID,
|
||||
SAR_LAWS_STAND_INFO.LAWS_TYPE,
|
||||
laws_type_show.DIC_TYPE_NAME as LAWS_TYPE,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NUMBER,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NAME,
|
||||
SAR_LAWS_STAND_INFO.LAWS_EN_NAME,
|
||||
@@ -293,8 +294,8 @@
|
||||
SAR_LAWS_STAND_INFO.COMMENT_CYCLE_START,
|
||||
SAR_LAWS_STAND_INFO.COMMENT_CYCLE_END,
|
||||
SAR_LAWS_STAND_INFO.LAWS_TEXT_STATE,
|
||||
SAR_LAWS_STAND_INFO.LAWS_SYQY,
|
||||
SAR_LAWS_STAND_INFO.LAWS_SYCX,
|
||||
laws_sycx_show.DIC_TYPE_NAME as LAWS_SYCX,
|
||||
laws_syqy_show.DIC_TYPE_NAME as LAWS_SYQY,
|
||||
SAR_LAWS_STAND_INFO.IS_RELATE_ACCESS,
|
||||
SAR_LAWS_STAND_INFO.LAWS_YEAR,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NOTISYNC_NUM,
|
||||
@@ -305,7 +306,7 @@
|
||||
SAR_LAWS_STAND_INFO.MODIFY_TIME,
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow
|
||||
from SAR_LAWS_STAND_INFO
|
||||
<include refid="SarStandardsInfo_in_left"/>
|
||||
<include refid="export_condition"/>
|
||||
order by
|
||||
<if test='orderByA != null and orderByA != "" and order1 != null and order1 != ""'>
|
||||
${orderByA} ${order1},
|
||||
@@ -313,4 +314,133 @@
|
||||
SAR_LAWS_STAND_INFO.id
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="export_condition">
|
||||
left join SAR_LAWS_MENU ON SAR_LAWS_STAND_INFO.id = SAR_LAWS_MENU.laws_id
|
||||
LEFT JOIN TS_DICTYPE dicstandTextStatus ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_TEXT_STATE
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
<!--适用车型-->
|
||||
LEFT JOIN TS_DICTYPE laws_sycx_show ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_SYCX
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
<!--适用区域-->
|
||||
LEFT JOIN TS_DICTYPE laws_syqy_show ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_SYQY
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
<!--政策分类-->
|
||||
LEFT JOIN TS_DICTYPE laws_type_show ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_TYPE
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
left join SAR_LAWS_ATTR_INFO on (SAR_LAWS_ATTR_INFO.LAWS_ID = SAR_LAWS_STAND_INFO.id and SAR_LAWS_ATTR_INFO.valid_flag=0)
|
||||
where 1=1 and SAR_LAWS_STAND_INFO.valid_flag=0
|
||||
<trim suffixOverrides=",">
|
||||
<!-- 基本搜索项 -->
|
||||
<if test="lawsType != null and lawsType != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_TYPE like concat(concat('%',#{lawsType}),'%')
|
||||
</if>
|
||||
<if test="lawsNumber != null and lawsNumber != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NUMBER like concat(concat('%',#{lawsNumber}),'%')
|
||||
</if>
|
||||
<if test="numberName != null and numberName != ''">
|
||||
and (LAWS_NAME like concat(concat('%',#{numberName}),'%')
|
||||
or SAR_LAWS_STAND_INFO.LAWS_EN_NAME like concat(concat('%',#{numberName}),'%'))
|
||||
</if>
|
||||
<if test="lawsName != null and lawsName != ''">
|
||||
and LAWS_NAME like concat(concat('%',#{lawsName}),'%')
|
||||
</if>
|
||||
<if test="lawsEnName != null and lawsEnName != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_EN_NAME like concat(concat('%',#{lawsEnName}),'%')
|
||||
</if>
|
||||
<if test="lawsNo != null and lawsNo != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NO like concat(concat('%',#{lawsNo}),'%')
|
||||
</if>
|
||||
<if test="issueTime != null and issueTime != ''">
|
||||
and DATE_FORMAT(SAR_LAWS_STAND_INFO.ISSUE_TIME,'%Y-%m-%d') = #{issueTime}
|
||||
</if>
|
||||
<if test="issueCompany != null and issueCompany != ''">
|
||||
and SAR_LAWS_STAND_INFO.ISSUE_COMPANY like concat(concat('%',#{issueCompany}),'%')
|
||||
</if>
|
||||
<if test="commentCycleStart != null and commentCycleStart != ''">
|
||||
and DATE_FORMAT(SAR_LAWS_STAND_INFO.COMMENT_CYCLE_START ,'%Y-%m-%d') = DATE_FORMAT(#{commentCycleStart},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="commentCycleEnd != null and commentCycleEnd != ''">
|
||||
and DATE_FORMAT(SAR_LAWS_STAND_INFO.COMMENT_CYCLE_END ,'%Y-%m-%d') = DATE_FORMAT(#{commentCycleEnd},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="lawsTextState != null and lawsTextState != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_TEXT_STATE = #{lawsTextState}
|
||||
</if>
|
||||
<if test="lawsSyqy != null and lawsSyqy != ''">
|
||||
and FIND_IN_SET(#{lawsSyqy},SAR_LAWS_STAND_INFO.LAWS_SYQY)
|
||||
</if>
|
||||
<if test="lawsSycx != null and lawsSycx != ''">
|
||||
and FIND_IN_SET(#{lawsSycx},SAR_LAWS_STAND_INFO.LAWS_SYCX)
|
||||
</if>
|
||||
<if test="isRelateAccess != null and isRelateAccess != ''">
|
||||
and SAR_LAWS_STAND_INFO.IS_RELATE_ACCESS = #{isRelateAccess}
|
||||
</if>
|
||||
<if test="lawsYear != null and lawsYear != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_YEAR like concat(concat('%',#{lawsYear}),'%')
|
||||
</if>
|
||||
<if test="lawsNotisyncNum != null and lawsNotisyncNum != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NOTISYNC_NUM like concat(concat('%',#{lawsNotisyncNum}),'%')
|
||||
</if>
|
||||
<if test="lawsBulletin != null and lawsBulletin != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_BULLETIN like concat(concat('%',#{lawsBulletin}),'%')
|
||||
</if>
|
||||
<if test="lawsLabel != null and lawsLabel != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_LABEL like concat(concat('%',#{lawsLabel}),'%')
|
||||
</if>
|
||||
<if test="lawsRemark != null and lawsRemark != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_REMARK like concat(concat('%',#{lawsRemark}),'%')
|
||||
</if>
|
||||
<!-- 国家、地区 -->
|
||||
<if test="country != null and country != ''">
|
||||
and SAR_LAWS_STAND_INFO.country = #{country}
|
||||
</if>
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null">
|
||||
and SAR_LAWS_MENU.MENU_ID in
|
||||
<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_LAWS_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 导出数据过程中,选择的id -->
|
||||
<if test="idlist != null">
|
||||
and SAR_LAWS_STAND_INFO.id in
|
||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
<if test="collectMenuId != null and collectMenuId != ''">
|
||||
and SAR_LAWS_STAND_INFO.id in (
|
||||
select COLLECT_RES_ID from TS_PERSON_COLLECT where TS_PERSON_COLLECT.VALID_FLAG=0
|
||||
and (collect_type='INLAND_STAND' or collect_type='FOREIGN_STAND')
|
||||
and TS_PERSON_COLLECT.user_id=#{userId}
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="advanceSearchStr != null and advanceSearchStr != ''">
|
||||
and (${advanceSearchStr})
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
+41
-2
@@ -3,8 +3,47 @@
|
||||
<mapper namespace="com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao">
|
||||
|
||||
<select id="getPublicIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
|
||||
SELECT sar_public_idea_all.* FROM sar_public_idea
|
||||
SELECT sar_public_idea_all.id,sar_public_idea_all.reason,ts_institution.name as dept_name,ts_institution.name as department,sar_public_idea_all.old_text,
|
||||
sar_public_idea_all.new_text,ts_user.INSTITUTION_ID as dept_id,sar_public_idea_all.part_code,sar_public_idea_all.user_name,
|
||||
sar_public_idea_all.user_id,sar_public_idea_all.content,sar_public_idea_all.idea_id,sar_public_idea_all.cid,
|
||||
sar_public_idea_all.chapter_name as chapterName,sar_public_idea_all.wk_flag
|
||||
FROM sar_public_idea
|
||||
INNER JOIN sar_public_idea_all on sar_public_idea_all.idea_id = sar_public_idea.id
|
||||
WHERE sar_public_idea_all.idea_id IS NOT NULL and sar_public_idea.uniques = #{unique}
|
||||
left join ts_user on ts_user.USID = sar_public_idea_all.user_id
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
WHERE sar_public_idea_all.idea_id IS NOT NULL and sar_public_idea.uniques = #{unique} and sar_public_idea_all.wk_flag is null
|
||||
</select>
|
||||
|
||||
<select id="getAllDataByIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
|
||||
SELECT sar_public_idea_all.id,sar_public_idea_all.reason,ts_institution.name as dept_name,sar_public_idea_all.old_text,sar_public_idea_all.wk_flag,
|
||||
sar_public_idea_all.new_text,ts_user.INSTITUTION_ID as dept_id,sar_public_idea_all.part_code,sar_public_idea_all.user_name,
|
||||
sar_public_idea_all.user_id,sar_public_idea_all.content,sar_public_idea_all.idea_id,sar_public_idea_all.cid,sar_public_idea_all.chapter_name as chapterName
|
||||
FROM sar_public_idea_all
|
||||
left join ts_user on sar_public_idea_all.user_id=ts_user.USID
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
WHERE
|
||||
sar_public_idea_all.idea_id = #{ideaId} and sar_public_idea_all.wk_flag is null
|
||||
LIMIT ${(page-1)*size},${size}
|
||||
</select>
|
||||
|
||||
<select id="getAllDataByIdeaCount" resultType="java.lang.Integer">
|
||||
SELECT count(id)
|
||||
FROM sar_public_idea_all WHERE
|
||||
idea_id = #{ideaId} and sar_public_idea_all.wk_flag is null
|
||||
</select>
|
||||
|
||||
<select id="getPublicAllIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
|
||||
SELECT sar_public_idea_all.id,reason,ts_institution.name as deptName,old_text,new_text,dept_id,part_code,user_name,user_id,content,idea_id,cid,chapter_name,wk_flag,sar_public_idea_all.state
|
||||
FROM sar_public_idea_all
|
||||
left join ts_user on ts_user.USID=sar_public_idea_all.user_id
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
WHERE sar_public_idea_all.idea_id = #{cid}
|
||||
<if test="null==type or ''==type">
|
||||
and sar_public_idea_all.wk_flag is null
|
||||
</if>
|
||||
<if test="null!=type and type != ''">
|
||||
and sar_public_idea_all.wk_flag ='1'
|
||||
</if>
|
||||
ORDER BY part_code ASC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+27
-8
@@ -39,6 +39,17 @@
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="updateByProjectIdBath">
|
||||
update sar_stand_project_library
|
||||
<if test="id != null">
|
||||
set detailed_list_version = #{version} where id in
|
||||
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<select id="selectCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(
|
||||
@@ -50,10 +61,10 @@
|
||||
WHERE
|
||||
|
||||
<if test="flag == 1">
|
||||
library.id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id NOT IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 2">
|
||||
library.id IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 4">
|
||||
1=1
|
||||
@@ -109,10 +120,10 @@
|
||||
ON team.project_code = library.project_number
|
||||
WHERE
|
||||
<if test="flag == 1">
|
||||
library.id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id NOT IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 2">
|
||||
library.id IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 4">
|
||||
1=1
|
||||
@@ -157,7 +168,7 @@
|
||||
</if>
|
||||
</if>
|
||||
|
||||
limit ${(page-1)*size},${page*size}
|
||||
limit ${(page-1)*size},${size}
|
||||
</select>
|
||||
|
||||
<select id="selectPagessolostar" resultType="java.lang.String">
|
||||
@@ -174,10 +185,10 @@
|
||||
ON team.project_code = library.project_number
|
||||
WHERE
|
||||
<if test="flag == 1">
|
||||
library.id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id NOT IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 2">
|
||||
library.id IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 4">
|
||||
1=1
|
||||
@@ -245,7 +256,7 @@
|
||||
</if>
|
||||
</if>
|
||||
)
|
||||
limit ${(page-1)*size},${page*size}
|
||||
limit ${(page-1)*size},${size}
|
||||
|
||||
</select>
|
||||
|
||||
@@ -349,4 +360,12 @@
|
||||
<select id="getAllStand" resultType="java.lang.String">
|
||||
SELECT DISTINCT ID FROM sar_standards_info where VALID_FLAG=0
|
||||
</select>
|
||||
<select id="selectListByids" resultType="java.lang.String">
|
||||
select distinct sar_stand_project_relation.project_id as projectId
|
||||
from sar_stand_project_relation
|
||||
where sar_stand_project_relation.stand_id in
|
||||
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+68
-6
@@ -31,7 +31,7 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getSarStandUnqualifiedPage" resultType="com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified">
|
||||
<select id="getSarStandUnqualifiedPageNew" resultType="com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified">
|
||||
SELECT
|
||||
sar_stand_unqualified.*, sar_standards_info.STAND_TYPE as standType
|
||||
from
|
||||
@@ -49,13 +49,45 @@
|
||||
and RESPONSIBLE_UNIT = #{sar.responsibleUnit}
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||
and (REPLACE(STAND_SERIAL_NUMBER,' ','') like concat(concat('%',REPLACE(#{sar.standSerialNumber},' ','')),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%'))
|
||||
</if>
|
||||
order by sar_stand_unqualified.STAND_ID ,sar_stand_unqualified.ITEMS_NUM asc
|
||||
limit #{start},#{end}
|
||||
</select>
|
||||
|
||||
<select id="getSarStandUnqualifiedCount" resultType="java.lang.Integer">
|
||||
<select id="getSarStandUnqualifiedPage" resultType="com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified">
|
||||
SELECT
|
||||
c.*
|
||||
FROM
|
||||
(
|
||||
SELECT (@i:=@i+1) as rows,sar_stand_unqualified.* ,sar_standards_info.STAND_TYPE as standType , ts_user.UNAME as dutyEngineerName , ts_institution.name as responsibleUnit FROM
|
||||
(sar_stand_unqualified,(SELECT @i:=0)j)
|
||||
left join sar_standards_info on sar_stand_unqualified.STAND_ID = sar_standards_info.id
|
||||
left join ts_user on ts_user.USID = sar_stand_unqualified.DUTY_ENGINEER
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
WHERE
|
||||
sar_stand_unqualified.close_state = 1
|
||||
<if test="sar.standId != null and sar.standId != '' ">
|
||||
and sar_stand_unqualified.STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="sar.productName != null and sar.productName != '' ">
|
||||
and sar_stand_unqualified.PRODUCT_NAME like concat(concat('%',#{sar.productName}),'%')
|
||||
</if>
|
||||
<if test="sar.responsibleUnit != null and sar.responsibleUnit != '' ">
|
||||
and ts_institution.name like concat('%',#{sar.responsibleUnit},'%')
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and (REPLACE(sar_stand_unqualified.STAND_SERIAL_NUMBER,' ','') like concat(concat('%',REPLACE(#{sar.standSerialNumber},' ','')),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%'))
|
||||
</if>
|
||||
order by sar_stand_unqualified.STAND_ID ,sar_stand_unqualified.ITEMS_NUM asc
|
||||
limit #{start},#{end}
|
||||
)c
|
||||
ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.ITEMS_NUM,1,(SELECT LOCATE('.',CONCAT(c.ITEMS_NUM,'.')))),SIGNED) ,c.rows
|
||||
</select>
|
||||
|
||||
<select id="getSarStandUnqualifiedCountNew" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(sar_stand_unqualified.ID)
|
||||
from
|
||||
@@ -73,8 +105,38 @@
|
||||
and RESPONSIBLE_UNIT = #{sar.responsibleUnit}
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||
and (REPLACE(STAND_SERIAL_NUMBER,' ','') like concat(concat('%',REPLACE(#{sar.standSerialNumber},' ','')),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%'))
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getSarStandUnqualifiedCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(c.ID)
|
||||
FROM
|
||||
(
|
||||
SELECT b.*,sar_standards_info.STAND_TYPE as standType FROM (
|
||||
SELECT (@i:=@i+1) as rows,sar_stand_unqualified.* FROM
|
||||
sar_stand_unqualified,(SELECT @i:=0)j
|
||||
WHERE
|
||||
close_state = 1
|
||||
<if test="sar.standId != null and sar.standId != '' ">
|
||||
and STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="sar.productName != null and sar.productName != '' ">
|
||||
and PRODUCT_NAME like concat(concat('%',#{sar.productName}),'%')
|
||||
</if>
|
||||
<if test="sar.responsibleUnit != null and sar.responsibleUnit != '' ">
|
||||
and RESPONSIBLE_UNIT = #{sar.responsibleUnit}
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and (REPLACE(STAND_SERIAL_NUMBER,' ','') like concat(concat('%',REPLACE(#{sar.standSerialNumber},' ','')),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%'))
|
||||
</if>
|
||||
order by sar_stand_unqualified.STAND_ID ,sar_stand_unqualified.ITEMS_NUM asc
|
||||
)b
|
||||
left join sar_standards_info on b.STAND_ID = sar_standards_info.id
|
||||
)c
|
||||
ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.ITEMS_NUM,1,(SELECT LOCATE('.',CONCAT(c.ITEMS_NUM,'.')))),SIGNED) ,c.rows
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+285
@@ -0,0 +1,285 @@
|
||||
<?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">
|
||||
warning.id AS ID,
|
||||
sarInfo.ID AS STAND_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 like concat('%', #{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 (
|
||||
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(t.SSRQ, '%Y-%m-%d') <= DATE_FORMAT(#{waringEO.endSSRQ}, '%Y-%m-%d') AND t.time_name = 'SSRQ' )
|
||||
)
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<sql id="export_column">
|
||||
warning.id AS ID,
|
||||
sarInfo.ID AS STAND_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,
|
||||
case stand_type
|
||||
when 'INLAND' then '国内标准'
|
||||
when 'FOREIGN' then '国外标准'
|
||||
ELSE ''
|
||||
END
|
||||
as standTypeShow
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<select id="exportWarning" resultType="com.adc.da.slrs.sarStandWarning.entity.WarningExportVO">
|
||||
|
||||
SELECT WARNING_RESULT.* FROM
|
||||
(
|
||||
|
||||
SELECT
|
||||
<include refid="export_column"/> ,
|
||||
dicType.DIC_TYPE_NAME AS applyTypeShow,
|
||||
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
|
||||
LEFT JOIN ts_dictype as dicType on dicType.DIC_TYPE_CODE =attr.CLLX
|
||||
<where>
|
||||
POWER = '1'
|
||||
AND (MARK = 'stand')
|
||||
<if test="idList != null and idList.size() > 0">
|
||||
AND
|
||||
warning.ID
|
||||
IN
|
||||
<foreach collection="idList" item="id" open="(" close=")" separator=",">
|
||||
<!-- 每个遍历需要生成的串 -->
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
</where>
|
||||
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
<include refid="export_column"/> ,
|
||||
dicType.DIC_TYPE_NAME AS applyTypeShow,
|
||||
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
|
||||
LEFT JOIN ts_dictype as dicType on dicType.DIC_TYPE_CODE =items.APPLY_ARCTIC
|
||||
<where>
|
||||
POWER = '1'
|
||||
AND (MARK = 'item')
|
||||
<if test="idList != null and idList.size() > 0">
|
||||
AND
|
||||
warning.ID
|
||||
IN
|
||||
<foreach collection="idList" item="id" open="(" close=")" separator=",">
|
||||
<!-- 每个遍历需要生成的串 -->
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
WARNING_RESULT
|
||||
LEFT JOIN
|
||||
(
|
||||
SELECT law_id,MIN(SSRQ) SSRQ_MIN FROM warning_date
|
||||
GROUP BY warning_date.law_id
|
||||
) warning_date
|
||||
ON warning_date.law_id = WARNING_RESULT.STAND_ID
|
||||
ORDER BY warning_date.SSRQ_MIN
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectWarningPage" resultMap="resultMap">
|
||||
SELECT WARNING_RESULT.* FROM
|
||||
(
|
||||
|
||||
|
||||
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'
|
||||
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 (
|
||||
sarInfo.ID IN (SELECT DISTINCT law_id FROM warning_date as t WHERE
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') between DATE_FORMAT(#{waringEO.startXCXSSRQ}, '%Y-%m-%d') AND 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 (
|
||||
sarInfo.ID IN (SELECT DISTINCT law_id FROM warning_date as t WHERE
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') between DATE_FORMAT(#{waringEO.startZCCSSRQ}, '%Y-%m-%d') AND DATE_FORMAT(#{waringEO.startZCCSSRQ}, '%Y-%m-%d')
|
||||
AND t.time_name = 'ZCCSSRQ' )
|
||||
)
|
||||
</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'
|
||||
AND (MARK = 'item')
|
||||
<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') between DATE_FORMAT(#{waringEO.startXCXSSRQ},'%Y-%m-%d')
|
||||
AND
|
||||
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') between DATE_FORMAT(#{waringEO.startZCCSSRQ},'%Y-%m-%d') AND DATE_FORMAT(#{waringEO.endZCCSSRQ},'%Y-%m-%d' )
|
||||
)
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
WARNING_RESULT
|
||||
LEFT JOIN
|
||||
(
|
||||
SELECT law_id,MIN(SSRQ) SSRQ_MIN FROM warning_date
|
||||
GROUP BY warning_date.law_id
|
||||
) warning_date
|
||||
ON warning_date.law_id = WARNING_RESULT.STAND_ID
|
||||
ORDER BY warning_date.SSRQ_MIN
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -3,33 +3,24 @@
|
||||
<mapper namespace="com.adc.da.scheduled.dao.SarStandardInfoDao">
|
||||
|
||||
<!-- Result Map-->
|
||||
<resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO" >
|
||||
<id column="ID" property="standId" />
|
||||
<result column="STAND_NUMBER" property="standNum" />
|
||||
<result column="STAND_NAME" property="standName" />
|
||||
<result column="STAND_SORT" property="standSort"/>
|
||||
<result column="STAND_YEAR" property="standYear"/>
|
||||
<result column="XCXSSRQ" property="XCXSSRQ"/>
|
||||
<result column="ZCCSSRQ" property="ZCCSSRQ"/>
|
||||
<result column="SSRQ" property="SSRQ"/>
|
||||
<result column="CLLX" property="applyType" />
|
||||
<result column="STAND_TYPE" property="standType" />
|
||||
<result column="ZRGCS" property="dutyEngineer" />
|
||||
</resultMap>
|
||||
<!-- <resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO" >-->
|
||||
<!-- <id column="ID" property="standId" />-->
|
||||
<!-- <result column="STAND_NUMBER" property="standNum" />-->
|
||||
<!-- <result column="STAND_NAME" property="standName" />-->
|
||||
<!-- <result column="STAND_SORT" property="standSort"/>-->
|
||||
<!-- <result column="STAND_YEAR" property="standYear"/>-->
|
||||
<!-- <result column="XCXSSRQ" property="XCXSSRQ"/>-->
|
||||
<!-- <result column="ZCCSSRQ" property="ZCCSSRQ"/>-->
|
||||
<!-- <result column="SSRQ" property="SSRQ"/>-->
|
||||
<!-- <result column="CLLX" property="applyType" />-->
|
||||
<!-- <result column="STAND_TYPE" property="standType" />-->
|
||||
<!-- <result column="ZRGCS" property="dutyEngineer" />-->
|
||||
<!-- </resultMap>-->
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<select id="selectWithinTerm" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
|
||||
<select id="selectWithinTerm" resultType="java.lang.String" parameterType="com.adc.da.scheduled.entity.TermDTO">
|
||||
SELECT
|
||||
info.ID,
|
||||
info.STAND_SORT,
|
||||
info.STAND_YEAR,
|
||||
info.STAND_NUMBER,
|
||||
info.STAND_NAME,
|
||||
info.STAND_TYPE,
|
||||
attrInfo.CLLX,
|
||||
attrInfo.ZRGCS,
|
||||
attrInfo.SSRQ,
|
||||
attrInfo.${str}
|
||||
info.ID
|
||||
FROM
|
||||
sar_standards_info AS info
|
||||
JOIN sar_stand_attr_info AS attrInfo ON info.id = attrinfo.stand_id
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<result column="STAND_YEAR" property="standYear"/>
|
||||
</resultMap>
|
||||
<!-- 查询条件 -->
|
||||
<select id="selectWithinTerm" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
|
||||
<select id="selectWithinTerm" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.TermDTO">
|
||||
SELECT
|
||||
items.ID,
|
||||
items.ITEMS_NUM,
|
||||
|
||||
+117
-10
@@ -4,30 +4,137 @@
|
||||
|
||||
<insert id="ignoreInsert" parameterType="java.util.LinkedList">
|
||||
|
||||
REPLACE 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)
|
||||
REPLACE INTO sar_stand_warning (ID,STAND_ID,ITEMS_ID,POLICY_ID,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}
|
||||
,#{item.putTime}
|
||||
,#{item.applyType}
|
||||
,#{item.dutyEngineer}
|
||||
,#{item.itemsId}
|
||||
,#{item.itemsNum}
|
||||
,#{item.itemsName}
|
||||
,#{item.policyId}
|
||||
,#{item.policyName}
|
||||
,#{item.mark}
|
||||
,#{item.power}
|
||||
)
|
||||
</foreach>
|
||||
</if>
|
||||
</insert>
|
||||
<delete id="autoCancelWarning">
|
||||
UPDATE sar_stand_warning
|
||||
SET POWER ='0'
|
||||
WHERE
|
||||
STAND_ID IN (
|
||||
SELECT
|
||||
law_id
|
||||
FROM
|
||||
warning_date
|
||||
WHERE
|
||||
DATE_FORMAT(SSRQ, '%Y-%m-%d') < DATE_FORMAT(now(), '%Y-%m-%d')
|
||||
UNION
|
||||
SELECT
|
||||
ID
|
||||
FROM
|
||||
sar_standards_info
|
||||
WHERE
|
||||
DATE_FORMAT(PUT_TIME, '%Y-%m-%d') < DATE_FORMAT(now(), '%Y-%m-%d')
|
||||
UNION
|
||||
SELECT
|
||||
STAND_ID
|
||||
FROM
|
||||
sar_stand_items
|
||||
WHERE
|
||||
DATE_FORMAT(XCXSSRQ, '%Y-%m-%d') < DATE_FORMAT(now(), '%Y-%m-%d')
|
||||
OR DATE_FORMAT(ZCCSSRQ, '%Y-%m-%d') < DATE_FORMAT(now(), '%Y-%m-%d')
|
||||
)
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="getWarningId" resultType="com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO">
|
||||
SELECT
|
||||
law_id AS standId,
|
||||
item_id AS itemId,
|
||||
CASE
|
||||
WHEN item_id = '-1' THEN
|
||||
'stand'
|
||||
WHEN
|
||||
item_id IS NULL THEN
|
||||
'stand'
|
||||
ELSE
|
||||
'item'
|
||||
END AS mark,
|
||||
'1' as power
|
||||
FROM
|
||||
warning_date AS warning
|
||||
WHERE
|
||||
DATE_FORMAT(warning.SSRQ,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDate}, '%Y-%m-%d') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d')
|
||||
<!-- UNION
|
||||
SELECT
|
||||
STAND_ID,
|
||||
ID AS itemsId,
|
||||
'item' AS mark,
|
||||
'1' as power
|
||||
FROM
|
||||
sar_stand_items AS item
|
||||
WHERE
|
||||
DATE_FORMAT(item.XCXSSRQ,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDate}, '%Y-%m-%d') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d')
|
||||
OR
|
||||
DATE_FORMAT(item.ZCCSSRQ,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDate}, '%Y-%m-%d') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d') -->
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getWarningDate" resultType="com.adc.da.slrs.sarStandWarning.entity.WarningDate">
|
||||
|
||||
|
||||
SELECT
|
||||
lawId,
|
||||
itemId,
|
||||
timeName,
|
||||
DATE_FORMAT(SSRQ, '%Y-%m-%d') AS SSRQ
|
||||
FROM
|
||||
(
|
||||
select attr.STAND_ID as lawId,'-1' as itemId,'SSRQ' as timeName,
|
||||
substring_index(substring_index(attr.SSRQ,',',b.help_topic_id+1),',',-1) SSRQ
|
||||
from sar_stand_attr_info attr
|
||||
join mysql.help_topic b
|
||||
on b.help_topic_id > (length(attr.SSRQ) - length(replace(attr.SSRQ,',',''))+1)
|
||||
|
||||
UNION ALL
|
||||
|
||||
select attr.STAND_ID as lawId,'-1' as itemId,'XCXSSRQ' as timeName,
|
||||
substring_index(substring_index(attr.SSRQ,',',b.help_topic_id+1),',',-1) SSRQ
|
||||
from sar_stand_attr_info attr
|
||||
join mysql.help_topic b
|
||||
on b.help_topic_id > (length(attr.XCXSSRQ) - length(replace(attr.XCXSSRQ,',',''))+1)
|
||||
|
||||
|
||||
|
||||
UNION ALL
|
||||
select attr.STAND_ID as lawId,'-1' as itemId,'ZCCSSRQ' as timeName,
|
||||
substring_index(substring_index(attr.ZCCSSRQ,',',b.help_topic_id+1),',',-1) SSRQ
|
||||
from sar_stand_attr_info attr
|
||||
join mysql.help_topic b
|
||||
on b.help_topic_id > (length(attr.SSRQ) - length(replace(attr.ZCCSSRQ,',',''))+1)
|
||||
|
||||
|
||||
|
||||
UNION All
|
||||
select item.STAND_ID as lawId,item.ID as itemId,'ZCCSSRQ' as timeName,
|
||||
substring_index(substring_index(item.ZCCSSRQ,',',b.help_topic_id+1),',',-1) SSRQ
|
||||
from sar_stand_items item
|
||||
join mysql.help_topic b
|
||||
on b.help_topic_id > (length(item.ZCCSSRQ) - length(replace(item.ZCCSSRQ,',',''))+1)
|
||||
|
||||
UNION All
|
||||
select item.STAND_ID as lawId,item.ID as itemId,'XCXSSRQ' as timeName,
|
||||
substring_index(substring_index(item.XCXSSRQ,',',b.help_topic_id+1),',',-1) SSRQ
|
||||
from sar_stand_items item
|
||||
join mysql.help_topic b
|
||||
on b.help_topic_id > (length(item.XCXSSRQ) - length(replace(item.XCXSSRQ,',',''))+1)
|
||||
|
||||
) as T
|
||||
WHERE
|
||||
DATE_FORMAT(T.SSRQ,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDate}, '%Y-%m-%d') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d')
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
+79
@@ -6,4 +6,83 @@
|
||||
resultType="com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarBaseStandardInfo">
|
||||
select distinct STAND_ID as standard_id, STAND_NUMBER as standard_number, STAND_NAME as standard_name, STAND_TYPE as standard_type, INTERPRETATION_TIME from sar_interpretation_national_standard
|
||||
</select>
|
||||
|
||||
<update id="updateData">
|
||||
update sar_interpretation_national_standard set risk_degree = #{find.riskDegree}
|
||||
where sar_interpretation_national_standard.STAND_ID = #{find.standId}
|
||||
and sar_interpretation_national_standard.STAND_NUMBER =#{find.standNumber}
|
||||
and sar_interpretation_national_standard.STAND_NAME=#{find.standName}
|
||||
and sar_interpretation_national_standard.INTERPRETATION_TIME = #{find.interpretationTime}
|
||||
</update>
|
||||
|
||||
<select id="getAllDatas"
|
||||
resultType="com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard">
|
||||
|
||||
SELECT c.* FROM (
|
||||
SELECT
|
||||
(@i:=@i+1) as rows,
|
||||
id,
|
||||
INTERPRETATION_TIME,
|
||||
STAND_NUMBER,
|
||||
specific_item,
|
||||
compared_with_previous,
|
||||
CREATION_USER,
|
||||
CREATION_TIME,
|
||||
VALID_FLAG,
|
||||
LAST_VERSION_NUMBER,
|
||||
risk_degree,
|
||||
compliance_state,
|
||||
INTERPRETATION_STATE,
|
||||
STAND_TYPE,
|
||||
MODIFY_TIME,
|
||||
STAND_SORT,
|
||||
STAND_ID,
|
||||
STAND_NAME,
|
||||
core_technical_requirement
|
||||
FROM
|
||||
sar_interpretation_national_standard ,(SELECT @i:=0)j
|
||||
WHERE
|
||||
1=1
|
||||
<if test="interpretationTime!=null ">
|
||||
and INTERPRETATION_TIME = #{interpretationTime}
|
||||
</if>
|
||||
<if test="standId!=null and standId!=''">
|
||||
AND STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="standNumber!=null and standNumber!=''">
|
||||
AND STAND_NUMBER like concat(concat('%',#{standNumber}),'%')
|
||||
</if>
|
||||
<if test="standName!=null and standName!=''">
|
||||
AND STAND_NAME like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="specificItem!=null and specificItem!=''">
|
||||
AND specific_item like concat(concat('%',#{specificItem}),'%')
|
||||
</if>
|
||||
ORDER BY STAND_ID, specific_item
|
||||
LIMIT ${(current-1)*size},${size}
|
||||
) c ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.specific_item,1,(SELECT LOCATE('.',CONCAT(c.specific_item,'.')))),SIGNED) ,rows
|
||||
</select>
|
||||
<select id="getAllDatasCout" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(id)
|
||||
FROM
|
||||
sar_interpretation_national_standard
|
||||
WHERE
|
||||
1=1
|
||||
<if test="interpretationTime!=null ">
|
||||
and INTERPRETATION_TIME = #{interpretationTime}
|
||||
</if>
|
||||
<if test="standId!=null and standId!=''">
|
||||
AND STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="standNumber!=null and standNumber!=''">
|
||||
AND STAND_NUMBER like concat(concat('%',#{standNumber}),'%')
|
||||
</if>
|
||||
<if test="standName!=null and standName!=''">
|
||||
AND STAND_NAME like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="specificItem!=null and specificItem!=''">
|
||||
AND specific_item like concat(concat('%',#{specificItem}),'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+59
@@ -3,5 +3,64 @@
|
||||
<mapper namespace="com.adc.da.slrs.sarStandardComplianceAssessResult.dao.SarStandardComplianceProductAssessDao">
|
||||
|
||||
|
||||
<select id="selectPages"
|
||||
resultType="com.adc.da.slrs.sarStandardComplianceAssessResult.entity.unCountDTO">
|
||||
select PRODUCT_NAME as productName,sar_stand_project_library.project_group as projectGroup,
|
||||
sar_stand_project_library.id as sarId,
|
||||
sar_stand_project_library.product_line as productLine,sar_stand_project_library.project_number as productId,
|
||||
sar_stand_project_library.project_manager as projectManager,ts_user.UNAME as uName,
|
||||
(SELECT count(*) FROM sar_stand_unqualified WHERE sar_stand_unqualified.STAND_ID = #{product.standId}) unCount
|
||||
FROM
|
||||
sar_stand_project_library
|
||||
LEFT JOIN sar_stand_unqualified ON sar_stand_unqualified.product_id = sar_stand_project_library.project_number
|
||||
LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager
|
||||
WHERE
|
||||
sar_stand_project_library.project_number in ( SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
|
||||
AND CLOSE_STATE = '1'
|
||||
group by
|
||||
PRODUCT_NAME,
|
||||
sar_stand_project_library.project_group,
|
||||
sar_stand_project_library.product_line,
|
||||
sar_stand_project_library.project_manager,
|
||||
sar_stand_project_library.project_number,
|
||||
sar_stand_project_library.id,
|
||||
ts_user.UNAME
|
||||
<if test="null != product.productName and ''!= product.productName">
|
||||
and product_name like concat(concat('%',#{product.productName}),'%')
|
||||
</if>
|
||||
<if test="null != product.productId and ''!= product.productId">
|
||||
and project_number like concat(concat('%',#{product.productId}),'%')
|
||||
</if>
|
||||
ORDER BY
|
||||
PRODUCT_NAME ASC
|
||||
limit ${(page-1)*pageSize},${pageSize}
|
||||
</select>
|
||||
|
||||
<select id="selectPagesCount"
|
||||
resultType="java.lang.Integer">
|
||||
select count(sar_stand_unqualified.product_id)
|
||||
FROM
|
||||
sar_stand_project_library
|
||||
LEFT JOIN sar_stand_unqualified ON sar_stand_unqualified.product_id = sar_stand_project_library.project_number
|
||||
LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager
|
||||
WHERE
|
||||
sar_stand_project_library.project_number in (SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
|
||||
AND CLOSE_STATE = '1'
|
||||
group by
|
||||
PRODUCT_NAME,
|
||||
sar_stand_project_library.project_group,
|
||||
sar_stand_project_library.product_line,
|
||||
sar_stand_project_library.project_manager,
|
||||
sar_stand_project_library.project_number,
|
||||
sar_stand_project_library.id,
|
||||
ts_user.UNAME
|
||||
<if test="null != product.productName and ''!= product.productName">
|
||||
and product_name like concat(concat('%',#{product.productName}),'%')
|
||||
</if>
|
||||
<if test="null != product.productId and ''!= product.productId">
|
||||
and project_number like concat(concat('%',#{product.productId}),'%')
|
||||
</if>
|
||||
ORDER BY
|
||||
PRODUCT_NAME ASC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+190
-22
@@ -79,19 +79,19 @@
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standTextStatusShow,
|
||||
(
|
||||
CASE
|
||||
WHEN SAR_STAND_ATTR_INFO.SSRQ ='' THEN '9999-01-01'
|
||||
WHEN SAR_STAND_ATTR_INFO.SSRQ ='' THEN ''
|
||||
ELSE SAR_STAND_ATTR_INFO.SSRQ
|
||||
END
|
||||
) AS SSRQ,
|
||||
(
|
||||
CASE
|
||||
WHEN SAR_STAND_ATTR_INFO.ZCCSSRQ ='' THEN '9999-01-01'
|
||||
WHEN SAR_STAND_ATTR_INFO.ZCCSSRQ ='' THEN ''
|
||||
ELSE SAR_STAND_ATTR_INFO.ZCCSSRQ
|
||||
END
|
||||
) AS ZCCSSRQ,
|
||||
(
|
||||
CASE
|
||||
WHEN SAR_STAND_ATTR_INFO.XCXSSRQ ='' THEN '9999-01-01'
|
||||
WHEN SAR_STAND_ATTR_INFO.XCXSSRQ ='' THEN ''
|
||||
ELSE SAR_STAND_ATTR_INFO.XCXSSRQ
|
||||
END
|
||||
) AS XCXSSRQ
|
||||
@@ -441,10 +441,11 @@
|
||||
<!-- 标准编号111 -->
|
||||
<if test="standNumber != null and standNumber != ''">
|
||||
and (
|
||||
(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) like concat(concat('%',#{standNumber}),'%')
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = '')
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),' ',''))
|
||||
)
|
||||
<!-- and SAR_STANDARDS_INFO.STAND_YEAR = '' -->
|
||||
or (stand_name like concat(concat('%',#{standNumber}),'%'))
|
||||
)
|
||||
</if>
|
||||
@@ -603,7 +604,7 @@
|
||||
when 'HJ' THEN 7
|
||||
ELSE 8
|
||||
END,
|
||||
sar_standards_info.stand_sort ASC,sar_standards_info.STAND_NUMBER ASC,sar_standards_info.STAND_YEAR DESC,sar_standards_info.id
|
||||
sar_standards_info.stand_sort ASC,CAST(sar_standards_info.STAND_NUMBER AS decimal(9,2)) ASC,sar_standards_info.STAND_YEAR DESC,sar_standards_info.id
|
||||
</if>
|
||||
<if test='page.standType != null and page.standType == "FOREIGN"'>
|
||||
CASE sar_standards_info.stand_sort
|
||||
@@ -633,7 +634,7 @@
|
||||
when 'ADR' THEN 23
|
||||
ELSE 24
|
||||
END,
|
||||
sar_standards_info.stand_sort ASC,sar_standards_info.STAND_NUMBER ASC,sar_standards_info.STAND_YEAR DESC,sar_standards_info.id
|
||||
sar_standards_info.stand_sort ASC,CAST(sar_standards_info.STAND_NUMBER AS decimal(9,2)) ASC,sar_standards_info.STAND_YEAR DESC,sar_standards_info.id
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="standSort_out">
|
||||
@@ -757,16 +758,20 @@
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{page.standNumber}),'%'),' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{page.standNumber}),'%'),' ',''))
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = '')
|
||||
or (stand_name like concat(concat('%',#{page.standNumber}),'%'))
|
||||
<if test="mark == 996">
|
||||
or (trim(replace(stand_name,' ','')) like trim(replace(concat(concat('%',#{page.standNumber}),'%'),' ','')) )
|
||||
</if>
|
||||
)
|
||||
<!-- and SAR_STANDARDS_INFO.STAND_YEAR = ''-->
|
||||
<!-- or (stand_name like concat(concat('%',#{page.standNumber}),'%')) -->
|
||||
)
|
||||
</if>
|
||||
<!-- 标准名称 -->
|
||||
<if test="page.standName != null and page.standName != ''">
|
||||
and stand_name like concat(concat('%',#{page.standName}),'%')
|
||||
or STAND_NUMBER like concat(concat('%',#{page.standName}),'%')
|
||||
or STAND_YEAR like concat(concat('%',#{page.standName}),'%')
|
||||
or STAND_SORT like concat(concat('%',#{page.standName}),'%')
|
||||
<!-- or STAND_NUMBER like concat(concat('%',#{page.standName}),'%') -->
|
||||
<!-- or STAND_YEAR like concat(concat('%',#{page.standName}),'%') -->
|
||||
<!-- or STAND_SORT like concat(concat('%',#{page.standName}),'%') -->
|
||||
</if>
|
||||
<if test="page.standEnName != null and page.standEnName != ''">
|
||||
and stand_en_name like concat(concat('%',#{page.standEnName}),'%')
|
||||
@@ -827,9 +832,19 @@
|
||||
<if test="page.standYear != null and page.standYear != ''">
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = #{page.standYear}
|
||||
</if>
|
||||
<!-- 发布日期日期-->
|
||||
<if test="page.issueTime != null and page.issueTime != ''">
|
||||
and DATE_FORMAT(SAR_STANDARDS_INFO.ISSUE_TIME ,'%Y-%m-%d') = #{page.issueTime}
|
||||
</if>
|
||||
<!-- 范围查询 发布日期日期-->
|
||||
<if test="page.startIssueTime != null and page.startIssueTime != '' and page.endIssueTime != null and page.endIssueTime != ''">
|
||||
and
|
||||
DATE_FORMAT(SAR_STANDARDS_INFO.ISSUE_TIME ,'%Y-%m-%d')
|
||||
between
|
||||
DATE_FORMAT(#{page.startIssueTime} ,'%Y-%m-%d')
|
||||
and
|
||||
DATE_FORMAT(#{page.endIssueTime} ,'%Y-%m-%d')
|
||||
</if>
|
||||
<!--内容摘要-->
|
||||
<if test="page.synopsis != null and page.synopsis != ''" >
|
||||
AND dbms_lob.instr(SYNOPSIS, #{page.synopsis} ,1,1) > 0
|
||||
@@ -884,16 +899,142 @@
|
||||
</if>
|
||||
<!-- 标准编号111 -->
|
||||
<if test="standNumber != null and standNumber != ''">
|
||||
and (
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),
|
||||
' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like
|
||||
trim(replace(concat(concat('%',#{standNumber}),'%'),' ',''))
|
||||
)
|
||||
)
|
||||
</if>
|
||||
<!-- 标准名称 -->
|
||||
<if test="standName != null and standName != ''">
|
||||
and stand_name like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="standEnName != null and standEnName != ''">
|
||||
and stand_en_name like concat(concat('%',#{standEnName}),'%')
|
||||
</if>
|
||||
<!-- 标准状态 -->
|
||||
<if test="standState != null and standState != ''">
|
||||
and stand_state = #{standState}
|
||||
</if>
|
||||
<!-- 高级检索项 -->
|
||||
<!-- 标准性质 -->
|
||||
<if test="standNature != null and standNature != ''">
|
||||
and stand_nature = #{standNature}
|
||||
</if>
|
||||
<!-- 代替标准 允许输入的时候输入多个-->
|
||||
<if test="replaceStandNum != null and replaceStandNum != ''">
|
||||
and replace_stand_num like concat(concat('%',#{replaceStandNum}),'%')
|
||||
</if>
|
||||
<!-- 被代替标准 -->
|
||||
<if test="replacedStandNum != null and replacedStandNum != ''">
|
||||
and replaced_stand_num like concat(concat('%',#{replacedStandNum}),'%')
|
||||
</if>
|
||||
<if test="isRelateAccess != null and isRelateAccess != ''" >
|
||||
and is_relate_access = #{isRelateAccess}
|
||||
</if>
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null">
|
||||
and SAR_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- <if test="(menuId == null or menuId =='') and standType =='FOREIGN'">-->
|
||||
<!-- and SAR_STAND_MENU.MENU_ID in (-->
|
||||
<!-- select TS_RESOURCE.id from TS_RESOURCE start with id=(select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null-->
|
||||
<!-- and sor_divide-->
|
||||
<!-- ='FOREIGN_STAND') connect by prior id= parent_id-->
|
||||
<!-- )-->
|
||||
<!-- </if>-->
|
||||
<!-- 导出数据过程中,选择的id -->
|
||||
<if test="idlist != null">
|
||||
and SAR_STANDARDS_INFO.id in
|
||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="standSort != null and standSort != ''" >
|
||||
and SAR_STANDARDS_INFO.stand_sort = #{standSort}
|
||||
</if>
|
||||
<!--标准年份-->
|
||||
<if test="standYear != null and standYear != ''">
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = #{standYear}
|
||||
</if>
|
||||
<if test="issueTime != null and issueTime != ''">
|
||||
and DATE_FORMAT(SAR_STANDARDS_INFO.ISSUE_TIME ,'%Y-%m-%d') = #{issueTime}
|
||||
</if>
|
||||
|
||||
<if test="startIssueTime != null and startIssueTime != '' and endIssueTime != null and endIssueTime != ''">
|
||||
and
|
||||
(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
DATE_FORMAT(SAR_STANDARDS_INFO.ISSUE_TIME ,'%Y-%m-%d')
|
||||
between
|
||||
DATE_FORMAT( #{startIssueTime} ,'%Y-%m-%d')
|
||||
and
|
||||
DATE_FORMAT( #{startIssueTime} ,'%Y-%m-%d')
|
||||
</if>
|
||||
<!--内容摘要-->
|
||||
<if test="synopsis != null and synopsis != ''" >
|
||||
AND dbms_lob.instr(SYNOPSIS, #{synopsis} ,1,1) > 0
|
||||
</if>
|
||||
|
||||
<!--文本状态-->
|
||||
<if test="textStatus != null and textStatus != ''" >
|
||||
and SAR_STANDARDS_INFO.TEXT_STATUS = #{textStatus}
|
||||
</if>
|
||||
<!--是否纳入法规清单-->
|
||||
<if test="isRelateAccess != null and isRelateAccess != ''" >
|
||||
and SAR_STANDARDS_INFO.IS_RELATE_ACCESS = #{isRelateAccess}
|
||||
</if>
|
||||
|
||||
<if test="collectMenuId != null and collectMenuId != ''">
|
||||
and SAR_STANDARDS_INFO.id in (
|
||||
select COLLECT_RES_ID from TS_PERSON_COLLECT where TS_PERSON_COLLECT.VALID_FLAG=0
|
||||
and (collect_type='INLAND_STAND' or collect_type='FOREIGN_STAND')
|
||||
and TS_PERSON_COLLECT.user_id=#{userId}
|
||||
)
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<sql id="SarStandardsInfo_in_left_wk">
|
||||
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
||||
where 1=1 and SAR_STANDARDS_INFO.valid_flag=0
|
||||
<trim suffixOverrides=",">
|
||||
<!-- 标准分类 国内标准,国外标准 必要搜索项 -->
|
||||
<if test='standType != null and standType != "ALL"'>
|
||||
and stand_type = #{standType}
|
||||
</if>
|
||||
<!-- 基本搜索项 -->
|
||||
<!-- 国家、地区 -->
|
||||
<if test="country != null and country != ''">
|
||||
and country = #{country}
|
||||
</if>
|
||||
<!-- 标准编号111 -->
|
||||
<if test="standNumber != null and standNumber != ''">
|
||||
and (
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),
|
||||
' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like
|
||||
trim(replace(concat(concat('%',#{standNumber}),'%'),' ',''))
|
||||
)
|
||||
or (trim(replace(stand_name,' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),' ','')) )
|
||||
)
|
||||
</if>
|
||||
<!-- 标准名称 -->
|
||||
<if test="standName != null and standName != ''">
|
||||
and stand_name like concat(concat('%',#{standName}),'%')
|
||||
or STAND_NUMBER like concat(concat('%',#{standName}),'%')
|
||||
or STAND_YEAR like concat(concat('%',#{standName}),'%')
|
||||
or STAND_SORT like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="standEnName != null and standEnName != ''">
|
||||
and stand_en_name like concat(concat('%',#{standEnName}),'%')
|
||||
@@ -1012,6 +1153,14 @@
|
||||
GROUP BY SAR_STANDARDS_INFO.id) a
|
||||
</select>
|
||||
|
||||
<select id="getSarStandardsInfoCountWk1" resultType="java.lang.Integer"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
select count(1) from (select count(*) from SAR_STANDARDS_INFO
|
||||
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
|
||||
<include refid="SarStandardsInfo_in_left_wk"/>
|
||||
GROUP BY SAR_STANDARDS_INFO.id) a
|
||||
</select>
|
||||
|
||||
<select id="selectByPrimaryKeyAndModifyTime" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
@@ -1038,16 +1187,28 @@
|
||||
</if>
|
||||
<if test="standNumber != null">
|
||||
and (
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),' ',''))
|
||||
)
|
||||
<!-- and SAR_STANDARDS_INFO.STAND_YEAR = '' -->
|
||||
or (stand_name like concat(concat('%',#{standNumber}),'%'))
|
||||
)
|
||||
|
||||
|
||||
|
||||
<!-- and (
|
||||
( ( #{standNumber}) like CONCAT('%',dicstandSort.DIC_TYPE_NAME,'%')
|
||||
and
|
||||
( #{standNumber}) like CONCAT('%',SAR_STANDARDS_INFO.STAND_NUMBER,'%')
|
||||
and
|
||||
( #{standNumber}) like CONCAT('%',SAR_STANDARDS_INFO.STAND_YEAR,'%') and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
( #{standNumber}) like CONCAT('%',SAR_STANDARDS_INFO.STAND_YEAR,'%') and SAR_STANDARDS_INFO.STAND_YEAR != '' )
|
||||
or (( #{standNumber}) like CONCAT('%',dicstandSort.DIC_TYPE_NAME,'%')
|
||||
and
|
||||
( #{standNumber}) like CONCAT('%',SAR_STANDARDS_INFO.STAND_NUMBER,'%')
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = '')
|
||||
)
|
||||
)
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = ''
|
||||
) -->
|
||||
</if>
|
||||
<if test="sychronId != null">
|
||||
and id != #{sychronId}
|
||||
@@ -1254,6 +1415,13 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateISRELATEACCESSById">
|
||||
|
||||
UPDATE sar_standards_info set IS_RELATE_ACCESS = #{IS_RELATE_ACCESS} WHERE ID IN
|
||||
<foreach collection="list" item="id" index="index" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectStandardsInfoByIdAndRoleAll" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
select SAR_STANDARDS_INFO.id
|
||||
|
||||
+2
-2
@@ -205,7 +205,7 @@
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="modifyUser != null" >modify_user,</if>
|
||||
|
||||
<if test="editFlag != null" >edit_flag,</if>
|
||||
<if test="fo != null" >fo,</if>
|
||||
<if test="dutyEngineer != null" >duty_engineer,</if>
|
||||
<if test="claimType != null" >claim_type,</if>
|
||||
@@ -233,7 +233,7 @@
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
|
||||
|
||||
<if test="editFlag != null" >#{editFlag,jdbcType=VARCHAR}</if>
|
||||
<if test="fo != null" >#{fo, jdbcType=VARCHAR},</if>
|
||||
<if test="dutyEngineer != null" >#{dutyEngineer, jdbcType=VARCHAR},</if>
|
||||
<if test="claimType != null" >#{claimType, jdbcType=VARCHAR},</if>
|
||||
|
||||
+13
-3
@@ -19,11 +19,12 @@
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="new_file_type" property="newFileType" />
|
||||
<result column="new_sar_type" property="newSarType" />
|
||||
<result column="compare_status" property="compareStatus"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_STAND_COMPARE_HIS table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
compare_type, id, old_stand_id, old_stand_num, old_stand_name, new_stand_id, new_stand_num, new_stand_name, old_file_type, old_sar_type, create_user, create_time, modify_user, modify_time, new_file_type, new_sar_type
|
||||
compare_type, id, old_stand_id, old_stand_num, old_stand_name, new_stand_id, new_stand_num, new_stand_name, old_file_type, old_sar_type, create_user, create_time, modify_user, modify_time, new_file_type, new_sar_type ,compare_status
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
@@ -89,6 +90,9 @@
|
||||
</if>
|
||||
<if test="newSarType != null" >
|
||||
and new_sar_type ${newSarTypeOperator} #{newSarType}
|
||||
</if>
|
||||
<if test="compareStatus != null" >
|
||||
and compare_status = #{compareStatus}
|
||||
</if>
|
||||
<if test="oldNumOrName != null" >
|
||||
and (old_stand_num like concat('%',#{oldNumOrName},'%') OR old_stand_name like concat('%',#{oldNumOrName},'%'))
|
||||
@@ -105,7 +109,7 @@
|
||||
SELECT SEQ_SAR_STAND_COMPARE_HIS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_STAND_COMPARE_HIS(<include refid="Base_Column_List" />)
|
||||
values (#{compareType, jdbcType=VARCHAR}, #{id, jdbcType=VARCHAR}, #{oldStandId, jdbcType=VARCHAR}, #{oldStandNum, jdbcType=VARCHAR}, #{oldStandName, jdbcType=VARCHAR}, #{newStandId, jdbcType=VARCHAR}, #{newStandNum, jdbcType=VARCHAR}, #{newStandName, jdbcType=VARCHAR}, #{oldFileType, jdbcType=VARCHAR}, #{oldSarType, jdbcType=VARCHAR}, #{createUser, jdbcType=VARCHAR}, #{createTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR}, #{modifyTime, jdbcType=TIMESTAMP}, #{newFileType, jdbcType=VARCHAR}, #{newSarType, jdbcType=VARCHAR})
|
||||
values (#{compareType, jdbcType=VARCHAR}, #{id, jdbcType=VARCHAR}, #{oldStandId, jdbcType=VARCHAR}, #{oldStandNum, jdbcType=VARCHAR}, #{oldStandName, jdbcType=VARCHAR}, #{newStandId, jdbcType=VARCHAR}, #{newStandNum, jdbcType=VARCHAR}, #{newStandName, jdbcType=VARCHAR}, #{oldFileType, jdbcType=VARCHAR}, #{oldSarType, jdbcType=VARCHAR}, #{createUser, jdbcType=VARCHAR}, #{createTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR}, #{modifyTime, jdbcType=TIMESTAMP}, #{newFileType, jdbcType=VARCHAR}, #{newSarType, jdbcType=VARCHAR},#{compareStatus, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
@@ -131,6 +135,7 @@
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="newFileType != null" >new_file_type,</if>
|
||||
<if test="newSarType != null" >new_sar_type,</if>
|
||||
<if test="compareStatus != null" >compare_status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="compareType != null" >#{compareType, jdbcType=VARCHAR},</if>
|
||||
@@ -149,6 +154,7 @@
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="newFileType != null" >#{newFileType, jdbcType=VARCHAR},</if>
|
||||
<if test="newSarType != null" >#{newSarType, jdbcType=VARCHAR},</if>
|
||||
<if test="compareStatus != null" >#{compareStatus, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -169,7 +175,8 @@
|
||||
modify_user = #{modifyUser},
|
||||
modify_time = #{modifyTime},
|
||||
new_file_type = #{newFileType},
|
||||
new_sar_type = #{newSarType}
|
||||
new_sar_type = #{newSarType},
|
||||
compare_status = #{compareStatus}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@@ -222,6 +229,9 @@
|
||||
<if test="newSarType != null" >
|
||||
new_sar_type = #{newSarType},
|
||||
</if>
|
||||
<if test="compareStatus != null" >
|
||||
compare_status = #{compareStatus},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@@ -312,6 +312,56 @@
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="getStandFileListByPageCount" parameterType="com.adc.da.base.page.BasePage"
|
||||
resultType="java.lang.Integer">
|
||||
select count(*) from
|
||||
(select tmp_tb.* from
|
||||
(
|
||||
SELECT
|
||||
SAR_STAND_FILE.id AS resId,
|
||||
SAR_STAND_FILE.stand_id,
|
||||
SAR_STAND_FILE.STAND_FILE_CLASSIFY,
|
||||
SAR_STAND_FILE.file_name,
|
||||
(
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) ) AS standNumber,
|
||||
SAR_STANDARDS_INFO.stand_name as standName,
|
||||
SAR_STAND_FILE.att_id AS attId1,
|
||||
SAR_STANDARDS_INFO.STAND_TYPE as sarType
|
||||
FROM
|
||||
SAR_STAND_FILE
|
||||
RIGHT JOIN SAR_STANDARDS_INFO ON ( SAR_STAND_FILE.STAND_ID = SAR_STANDARDS_INFO.ID AND SAR_STANDARDS_INFO.VALID_FLAG = 0 )
|
||||
where SAR_STANDARDS_INFO.VALID_FLAG =0 and SAR_STAND_FILE.VALID_FLAG =0
|
||||
<if test="fileSuffixList != null">
|
||||
and SAR_STAND_FILE.file_suffix in
|
||||
<foreach collection="fileSuffixList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="standNumber != null">
|
||||
and
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) like concat(concat('%',#{standNumber}),'%')
|
||||
</if>
|
||||
<if test="standName != null">
|
||||
and SAR_STANDARDS_INFO.stand_name like concat(concat ('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="standFileClassify != null">
|
||||
and SAR_STAND_FILE.STAND_FILE_CLASSIFY = #{standFileClassify}
|
||||
</if>
|
||||
<if test="fileType != null">
|
||||
and SAR_STANDARDS_INFO.STAND_TYPE = #{fileType}
|
||||
</if>
|
||||
order by SAR_STAND_FILE.modify_time desc,SAR_STAND_FILE.id
|
||||
) tmp_tb ) a
|
||||
</select>
|
||||
|
||||
<select id="queryStandFileListByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from (
|
||||
SELECT
|
||||
|
||||
@@ -3,19 +3,23 @@
|
||||
<mapper namespace="com.adc.da.slrs.wgDept.dao.WgDeptDao">
|
||||
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
|
||||
select wg_dept.* ,ts_user.UNAME as name ,ts_user.PHONE as phone ,ts_user.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName
|
||||
select wg_dept.* ,ts_user.UNAME as name ,wg_dept.PHONE as phone ,wg_dept.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,t2.name as deptName ,ts_institution.name as unitName , ts_institution.id as unit
|
||||
from wg_dept
|
||||
left join ts_user on ts_user.ACCOUNT = wg_dept.dept_people_id
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
|
||||
left join ts_institution t2 on t2.id=ts_user.INSTITUTION_ID
|
||||
where wg_dept.wg_id =#{data}
|
||||
</select>
|
||||
|
||||
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
|
||||
select wg_dept.* ,ts_user.UNAME as name ,ts_user.PHONE as phone ,ts_user.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName
|
||||
select wg_dept.* ,concat(ts_user.UNAME,concat('(',concat(ts_user.USID,')'))) as name ,wg_dept.PHONE as phone ,wg_dept.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,t2.name as deptName ,ts_institution.name as unit , ts_institution.id as unitId
|
||||
from wg_dept
|
||||
left join ts_user on ts_user.ACCOUNT = wg_dept.dept_people_id
|
||||
left join wg_work_group on wg_work_group.id = wg_dept.wg_id
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
|
||||
left join ts_institution t2 on t2.id=ts_user.INSTITUTION_ID
|
||||
where wg_work_group.type = #{type}
|
||||
</select>
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
<select id="getMeetingAllPeoples"
|
||||
resultType="com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow">
|
||||
select wg_meeting_user_relation.*,ts_user.UNAME as name from wg_meeting_user_relation
|
||||
select wg_meeting_user_relation.*,concat(ts_user.UNAME,concat('(',concat(ts_user.USID,')'))) as name from wg_meeting_user_relation
|
||||
left join ts_user on ts_user.ACCOUNT = wg_meeting_user_relation.user_id
|
||||
left join wg_meeting_info on wg_meeting_info.id = wg_meeting_user_relation.meeting_id
|
||||
left join wg_work_group on wg_work_group.id = wg_meeting_info.wg_id
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.adc.da.slrs.wgNetInfo.dao.WgNetInfoDao">
|
||||
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO">
|
||||
select wg_net_info.net_id,ts_user.UNAME as name ,ts_user.PHONE as phone, ts_user.EMAIL as email
|
||||
select wg_net_info.net_id,ts_user.UNAME as name ,wg_net_info.PHONE as phone, wg_net_info.EMAIL as email
|
||||
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id
|
||||
from wg_net_info
|
||||
left join ts_user on ts_user.ACCOUNT = wg_net_info.net_id
|
||||
@@ -11,11 +11,12 @@
|
||||
</select>
|
||||
|
||||
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO">
|
||||
select wg_net_info.net_id,ts_user.UNAME as name ,ts_user.PHONE as phone, ts_user.EMAIL as email
|
||||
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id
|
||||
select wg_net_info.net_id,concat(ts_user.UNAME,concat('(',concat(ts_user.USID,')'))) as name ,wg_net_info.PHONE as phone, wg_net_info.EMAIL as email
|
||||
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id ,ts_institution.name as unit , ts_institution.id as unitId
|
||||
from wg_net_info
|
||||
left join ts_user on ts_user.ACCOUNT = wg_net_info.net_id
|
||||
left join wg_work_group on wg_work_group.id = wg_net_info.wg_id
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
|
||||
where wg_work_group.type = #{type}
|
||||
</select>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
and name like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="project_id != null and project_id != ''">
|
||||
and project_id = #{project_id}
|
||||
and project_id = #{projectId}
|
||||
</if>
|
||||
<if test="project_name != null and project_name != ''">
|
||||
and project_name = #{project_name}
|
||||
@@ -111,7 +111,7 @@
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="project_id != null and project_id != ''">
|
||||
project_id = #{project_id},
|
||||
project_id = #{projectId},
|
||||
</if>
|
||||
<if test="project_name != null and project_name != ''">
|
||||
project_name = #{project_name},
|
||||
@@ -254,7 +254,7 @@
|
||||
#{name},
|
||||
</if>
|
||||
<if test="project_id != null and project_id != ''">
|
||||
#{project_id},
|
||||
#{projectId},
|
||||
</if>
|
||||
<if test="project_name != null and project_name != ''">
|
||||
#{project_name},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.adc.da.slrs.wgdCensusLeo.dao.WgdZcbDao">
|
||||
<!-- 基础信息-->
|
||||
<sql id="BaseInfo">
|
||||
id,name,cost,use,annex
|
||||
id,name,cost,purposes,annexs
|
||||
</sql>
|
||||
<!-- 查询条件-->
|
||||
<sql id="Conditions">
|
||||
@@ -12,18 +12,17 @@
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%',#{name},'%')
|
||||
and name = #{name}
|
||||
</if>
|
||||
<if test="cost != null and cost != ''">
|
||||
and cost like concat('%',#{cost},'%')
|
||||
and cost = #{cost}
|
||||
</if>
|
||||
<if test="use != null and use != ''">
|
||||
and use like concat('%',#{use},'%')
|
||||
<if test="purposes != null and purposes != ''">
|
||||
and purposes = #{purposes}
|
||||
</if>
|
||||
<if test="annex != null and annex != ''">
|
||||
and annex = #{annex}
|
||||
<if test="annexs != null and annexs != ''">
|
||||
and annexs = #{annexs}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</sql>
|
||||
<select id="getTotal" resultType="java.lang.Integer">
|
||||
@@ -57,13 +56,13 @@
|
||||
<if test="cost != null and cost != ''">
|
||||
cost = #{cost},
|
||||
</if>
|
||||
<if test="use != null and use != ''">
|
||||
use = #{use},
|
||||
<if test="purposes != null and purposes != ''">
|
||||
purposes = #{purposes},
|
||||
</if>
|
||||
<if test="annex != null and annex != ''">
|
||||
annex = #{annex},
|
||||
<if test="annexs != null and annexs != ''">
|
||||
annexs = #{annexs},
|
||||
</if>
|
||||
|
||||
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -80,13 +79,13 @@
|
||||
<if test="cost != null and cost != ''">
|
||||
cost,
|
||||
</if>
|
||||
<if test="use != null and use != ''">
|
||||
use,
|
||||
<if test="purposes != null and purposes != ''">
|
||||
purposes,
|
||||
</if>
|
||||
<if test="annex != null and annex != ''">
|
||||
annex,
|
||||
<if test="annexs != null and annexs != ''">
|
||||
annexs,
|
||||
</if>
|
||||
|
||||
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -99,11 +98,11 @@
|
||||
<if test="cost != null and cost != ''">
|
||||
#{cost},
|
||||
</if>
|
||||
<if test="use != null and use != ''">
|
||||
#{use},
|
||||
<if test="purposes != null and purposes != ''">
|
||||
#{purposes},
|
||||
</if>
|
||||
<if test="annex != null and annex != ''">
|
||||
#{annex},
|
||||
<if test="annexs != null and annexs != ''">
|
||||
#{annexs},
|
||||
</if>
|
||||
|
||||
</trim>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
</if>
|
||||
<if test="scName != null and scName != ''">
|
||||
and (
|
||||
sc_name like concat('%',#{scName} ,'%')
|
||||
ssc_name like concat('%',#{scName} ,'%')
|
||||
sc_name like concat('%',#{scName} ,'%') or
|
||||
ssc_name like concat('%',#{scName} ,'%') or
|
||||
wg_name like concat('%',#{scName} ,'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
</if>
|
||||
<if test="scName != null and scName != ''">
|
||||
and (
|
||||
sc_name like concat('%',#{scName} ,'%')
|
||||
ssc_name like concat('%',#{scName} ,'%')
|
||||
sc_name like concat('%',#{scName} ,'%') or
|
||||
ssc_name like concat('%',#{scName} ,'%') or
|
||||
wg_name like concat('%',#{scName} ,'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
</if>
|
||||
<if test="scName != null and scName != ''">
|
||||
and (
|
||||
sc_name like concat('%',#{scName} ,'%')
|
||||
ssc_name like concat('%',#{scName} ,'%')
|
||||
wg_name like concat('%',#{scName} ,'%')
|
||||
)
|
||||
sc_name like concat('%',#{scName} ,'%') or
|
||||
ssc_name like concat('%',#{scName} ,'%') or
|
||||
wg_name like concat('%',#{scName} ,'%')
|
||||
)
|
||||
</if>
|
||||
<if test="role != null and role != ''">
|
||||
and role = #{role}
|
||||
|
||||
Reference in New Issue
Block a user