Merge remote-tracking branch 'origin/develop_master' into develop_3

This commit is contained in:
zhaokaiyao@91isoft.com
2021-12-02 19:36:06 +08:00
26 changed files with 492 additions and 52 deletions
@@ -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
@@ -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(
@@ -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>
@@ -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},${page*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>
@@ -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}