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

This commit is contained in:
zhaokaiyao@91isoft.com
2022-01-11 13:56:45 +08:00
82 changed files with 1648 additions and 277 deletions
@@ -655,6 +655,20 @@
</if>
</delete>
<delete id="deleteByStandIdAndFileTypes" parameterType="java.lang.String">
delete from SAR_STAND_ITEMS
where stand_id = #{standId}
<if test="fileType != null">
and file_type = #{fileType}
</if>
<if test="items != null ">
and items_num in
<foreach item="itemNum" collection="items" open="(" separator="," close=")" index="index">
#{itemNum}
</foreach>
</if>
</delete>
<delete id="deleteByIds" parameterType="java.lang.String">
delete from SAR_STAND_ITEMS
where id in
@@ -0,0 +1,23 @@
<?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.esMatingRelation.dao.EsMatingRelationDao">
<select id="getDatasOld" resultType="com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation">
select es_mating_relation.id , es_mating_relation.stand_id , es_mating_relation.stand_type,sar_standards_info.STAND_NAME as standName,
concat(sar_standards_info.STAND_SORT,concat(' ',concat(concat(sar_standards_info.STAND_NUMBER,concat('-',sar_standards_info.STAND_YEAR))))) as standNumber
from es_mating_relation
left join sar_standards_info on es_mating_relation.stand_id = sar_standards_info.ID
where es_mating_relation.es_id=#{id}
union all
select es_mating_relation.id , es_mating_relation.stand_id , es_mating_relation.stand_type,sar_bussioness_stand.STAND_NAME as standName,
sar_bussioness_stand.STAND_CODE as standNumber
from es_mating_relation
left join sar_bussioness_stand on es_mating_relation.stand_id = sar_bussioness_stand.ID
where es_mating_relation.es_id=#{id}
</select>
<select id="getDatas" resultType="com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation">
select es_mating_relation.id , es_mating_relation.stand_id
from es_mating_relation
where es_mating_relation.es_id=#{id}
</select>
</mapper>
@@ -18,11 +18,19 @@
draft_time,
release_time,
unit,
rqb_json as rqbJson,
ts_json as tsJson,
area,
qblb,
(select sar_bussioness_stand.STAND_NAME from sar_bussioness_stand where sar_bussioness_stand.ID = rqb_json )as rqbName,
(select sar_bussioness_stand.STAND_CODE from sar_bussioness_stand where sar_bussioness_stand.ID = rqb_json )as rqbCode,
(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(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(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>
<result property="esName" column="es_name"></result>
@@ -34,6 +42,39 @@
<result property="draftTime" column="draft_time"></result>
<result property="releaseTime" column="release_time"></result>
<result property="unit" column="unit"></result>
<result property="area" column="area"></result>
<result property="rqbJson" column="rqb_json"></result>
<result property="tsJson" column="ts_json"></result>
<result property="esMatingRelations" column="es_mating_relations"/>
<result property="esStandRelations" column="es_stand_relations"/>
<result property="isRelate" column="is_relate"/>
<result property="isRelate" column="is_relate"/>
<result property="useLevel" column="use_level"/>
<result property="technologic" column="technologic"/>
<result property="bussSort" column="bussSort"/>
</resultMap>
<resultMap id="BaseInfoMapList" type="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan">
<id property="id" column="id"></id>
<result property="esName" column="es_name"></result>
<result property="planStatus" column="plan_status"></result>
<result property="reviseStatus" column="revise_status"></result>
<result property="drafter" column="drafter"></result>
<result property="resPerson" column="res_person"></result>
<result property="wgLeader" column="wg_leader"></result>
<result property="draftTime" column="draft_time"></result>
<result property="releaseTime" column="release_time"></result>
<result property="unit" column="unit"></result>
<result property="area" column="area"></result>
<result property="rqbJson" column="rqb_json"></result>
<result property="tsJson" column="ts_json"></result>
<result property="esMatingRelations" column="es_mating_relations"/>
<result property="esStandRelations" column="es_stand_relations"/>
<result property="isRelate" column="is_relate"/>
<result property="isRelate" column="is_relate"/>
<result property="useLevel" column="use_level"/>
<result property="technologic" column="technologic"/>
<result property="bussSort" column="buss_sort"/>
</resultMap>
<!-- 查询条件-->
<sql id="Conditions">
@@ -41,6 +82,9 @@
<if test="esName != null and esName != ''">
and es_name like concat('%',#{esName},'%')
</if>
<if test="area != null and area != ''">
and area = #{area}
</if>
<if test="planStatus != null and planStatus != ''">
and plan_status = #{planStatus}
</if>
@@ -75,23 +119,179 @@
<include refid="Conditions"></include>
</select>
<!-- 查询所有-->
<select id="selectAll" resultMap="BaseInfoMap" >
select <include refid="BaseInfo"></include> from es_revise_plan
<select id="selectAll" resultMap="BaseInfoMapList" >
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
es_revise_plan.buss_sort,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
(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(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(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
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
<where>
<if test="esName != null and esName != ''">
and es_name like concat('%',#{esName},'%')
</if>
<if test="area != null and area != ''">
and area = #{area}
</if>
<if test="planStatus != null and planStatus != ''">
and plan_status = #{planStatus}
</if>
<if test="reviseStatus != null and reviseStatus != ''">
and revise_status = #{reviseStatus}
</if>
<if test="drafter != null and drafter != ''">
and drafter = #{drafter}
</if>
<if test="resPerson != null and resPerson != ''">
and res_person = #{resPerson}
</if>
<if test="wgLeader != null and wgLeader != ''">
and wg_leader = #{wgLeader}
</if>
<if test="draftTime != null">
and DATE_FORMAT(draft_time,'%Y-%m-%d')=DATE_FORMAT(#{draftTime},'%Y-%m-%d')
</if>
<if test="releaseTime != null">
and DATE_FORMAT(release_time,'%Y-%m-%d')=DATE_FORMAT(#{releaseTime},'%Y-%m-%d')
</if>
<if test="unit != null and unit != ''">
and (select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) like concat('%',#{unit},'%')
</if>
</where>
<include refid="pages">
</include>
</select>
<!-- 多条件查询-->
<select id="queryAll" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan" resultMap="BaseInfoMap">
select <include refid="BaseInfo"></include> from es_revise_plan
<include refid="Conditions">
</include>
<select id="queryAll" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan" resultMap="BaseInfoMapList">
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
es_revise_plan.buss_sort,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
sar_bussioness_stand.stand_number as standNum,
(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(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(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
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
<where>
<if test="esName != null and esName != ''">
and es_revise_plan.es_name like concat('%',#{esName},'%')
</if>
<if test="area != null and area != ''">
and es_revise_plan.area = #{area}
</if>
<if test="planStatusList != null">
and es_revise_plan.plan_status in
<foreach collection="planStatusList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="reviseStatus != null and reviseStatus != ''">
and es_revise_plan.revise_status = #{reviseStatus}
</if>
<if test="drafter != null and drafter != ''">
and es_revise_plan.drafter = #{drafter}
</if>
<if test="resPerson != null and resPerson != ''">
and es_revise_plan.res_person = #{resPerson}
</if>
<if test="wgLeader != null and wgLeader != ''">
and es_revise_plan.wg_leader = #{wgLeader}
</if>
<if test="draftTime != null">
and DATE_FORMAT(es_revise_plan.draft_time,'%Y-%m-%d')=DATE_FORMAT(#{draftTime},'%Y-%m-%d')
</if>
<if test="releaseTime != null">
and DATE_FORMAT(es_revise_plan.release_time,'%Y-%m-%d')=DATE_FORMAT(#{releaseTime},'%Y-%m-%d')
</if>
<if test="unit != null and unit != ''">
and (select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) like concat('%',#{unit},'%')
</if>
</where>
<include refid="pages">
</include>
</select>
<!-- 查询详情-->
<select id="selectOne" parameterType="java.lang.String" resultMap="BaseInfoMap">
select <include refid="BaseInfo"></include> from es_revise_plan
where id = #{id}
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
es_revise_plan.buss_sort,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
(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(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(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
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
where es_revise_plan.id = #{id}
</select>
<!-- 修改-->
<update id="updateOne" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan">
@@ -127,6 +327,33 @@
<if test="unit != null and unit != ''">
unit = #{unit},
</if>
<if test="rqbJson != null and rqbJson != ''">
rqb_json=#{rqbJson},
</if>
<if test="tsJson != null and tsJson != ''">
ts_json=#{tsJson},
</if>
<if test="area != null and area != ''">
area=#{area},
</if>
<if test="esMatingRelations != null and esMatingRelations != ''">
es_mating_relations=#{esMatingRelations},
</if>
<if test="esStandRelations != null and esStandRelations != ''">
es_stand_relations=#{esStandRelations},
</if>
<if test="isRelate != null and isRelate != ''">
is_relate=#{isRelate},
</if>
<if test="useLevel != null and useLevel != ''">
use_level=#{useLevel},
</if>
<if test="technologic != null and technologic != ''">
technologic=#{technologic},
</if>
<if test="bussSort != null and bussSort != ''">
buss_sort=#{bussSort},
</if>
</set>
where id = #{id}
</update>
@@ -164,6 +391,33 @@
<if test="unit != null and unit != ''">
unit,
</if>
<if test="rqbJson != null and rqbJson != ''">
rqb_json,
</if>
<if test="tsJson != null and tsJson != ''">
ts_json,
</if>
<if test="area != null and area != ''">
area,
</if>
<if test="esMatingRelations != null and esMatingRelations != ''">
es_mating_relations,
</if>
<if test="esStandRelations != null and esStandRelations != ''">
es_stand_relations,
</if>
<if test="isRelate != null and isRelate != ''">
is_relate,
</if>
<if test="useLevel != null and useLevel != ''">
use_level,
</if>
<if test="technologic != null and technologic != ''">
technologic,
</if>
<if test="bussSort != null and bussSort != ''">
buss_sort,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -197,6 +451,33 @@
<if test="unit != null and unit != ''">
#{unit},
</if>
<if test="rqbJson != null and rqbJson != ''">
#{rqbJson},
</if>
<if test="tsJson != null and tsJson != ''">
#{tsJson},
</if>
<if test="area != null and area != ''">
#{area},
</if>
<if test="esMatingRelations != null and esMatingRelations != ''">
#{esMatingRelations},
</if>
<if test="esStandRelations != null and esStandRelations != ''">
#{esStandRelations},
</if>
<if test="isRelate != null and isRelate != ''">
#{isRelate},
</if>
<if test="useLevel != null and useLevel != ''">
#{useLevel},
</if>
<if test="technologic != null and technologic != ''">
#{technologic},
</if>
<if test="bussSort != null and bussSort != ''">
#{bussSort},
</if>
</trim>
</insert>
<!-- 删除-->
@@ -212,10 +493,40 @@
</delete>
<select id="selectPageByName" resultMap="BaseInfoMap">
select <include refid="BaseInfo"></include> from es_revise_plan
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
es_revise_plan.buss_sort,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
(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(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(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
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
where es_name = #{esName}
<if test="id != null and id != '' ">
and id != #{id}
and es_revise_plan.id != #{id}
</if>
</select>
</mapper>
@@ -0,0 +1,26 @@
<?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.esStandRelation.dao.EsStandRelationDao">
<select id="getDatasOld" resultType="com.adc.da.slrs.esStandRelation.entity.EsStandRelation">
select es_stand_relation.id , es_stand_relation.stand_id , es_stand_relation.stand_type,sar_standards_info.STAND_NAME as standName,
concat(sar_standards_info.STAND_SORT,concat(' ',concat(concat(sar_standards_info.STAND_NUMBER,concat('-',sar_standards_info.STAND_YEAR))))) as standNumber,
es_stand_relation.is_relate as isRelate,es_stand_relation.technologic,es_stand_relation.use_level as useLevel,ts_dictype.DIC_TYPE_NAME as useLevelName
from es_stand_relation
left join sar_standards_info on es_stand_relation.stand_id = sar_standards_info.ID
left join ts_dictype on es_stand_relation.use_level = ts_dictype.DIC_TYPE_CODE
where es_stand_relation.es_id=#{id}
union all
select es_stand_relation.id , es_stand_relation.stand_id , es_stand_relation.stand_type,sar_bussioness_stand.STAND_NAME as standName,
sar_bussioness_stand.STAND_CODE as standNumber,es_stand_relation.is_relate as isRelate,es_stand_relation.technologic,es_stand_relation.use_level as useLevel
from es_stand_relation
left join sar_bussioness_stand on es_stand_relation.stand_id = sar_bussioness_stand.ID
where es_stand_relation.es_id=#{id}
</select>
<select id="getDatas" resultType="com.adc.da.slrs.esStandRelation.entity.EsStandRelation">
select es_stand_relation.id , es_stand_relation.stand_id , es_stand_relation.stand_type,es_stand_relation.is_relate as isRelate,es_stand_relation.technologic,es_stand_relation.use_level as useLevel,ts_dictype.DIC_TYPE_NAME as useLevelName
from es_stand_relation
left join ts_dictype on es_stand_relation.use_level = ts_dictype.DIC_TYPE_CODE
where es_stand_relation.es_id=#{id}
</select>
</mapper>
@@ -55,7 +55,7 @@
<sql id="Group_Column_List_show" >
stand_status, replaced_stand_num, replace_stand_num,put_time,
issue_time, stand_en_name, stand_name, stand_code,standStatusShow,
issue_time, stand_en_name, stand_name, stand_code,stand_status,
SAR_BUSSIONESS_STAND.id
</sql>
@@ -170,6 +170,8 @@
<if test="standSort != null" >stand_sort,</if>
<if test="standYear != null" >stand_year,</if>
<if test="standNumber != null" >stand_number,</if>
<if test="reviseStatus != null" >REVISE_STATUS,</if>
<if test="standSn != null" >STAND_SN,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
@@ -190,6 +192,8 @@
<if test="standSort != null" >#{standSort, jdbcType=VARCHAR},</if>
<if test="standYear != null" >#{standYear, jdbcType=VARCHAR},</if>
<if test="standNumber != null" >#{standNumber, jdbcType=VARCHAR},</if>
<if test="reviseStatus != null" >#{reviseStatus, jdbcType=VARCHAR},</if>
<if test="standSn != null" >#{standSn, jdbcType=VARCHAR},</if>
</trim>
</insert>
@@ -322,6 +326,12 @@
</select>
<select id="getStandInfoByReviseStatus" resultMap="BaseResultMap" parameterType="java.lang.String">
select LPAD(MAX(DISTINCT CAST(STAND_SN AS decimal(9)))+1, 3, 0) AS newStandSn from sar_bussioness_stand
where revise_status = #{value} and valid_flag=0
</select>
<!-- 删除记录 -->
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from SAR_BUSSIONESS_STAND
@@ -35,6 +35,26 @@
WHERE parent_id=#{institutionId}
</select>
<select id="selectNextUsers" 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,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_institution.name as unit,ts_institution.id as unitId
from ts_user
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 1=1
<if test="institutionIds != null and institutionIds.size()> 0 ">
and ts_user.INSTITUTION_ID in
<foreach collection="institutionIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
order by ts_institution.id
</select>
<!-- 只查询这个部门下的子一级人员-->
<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,
@@ -3,7 +3,7 @@
<mapper namespace="com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao">
<select id="selectLawsById" parameterType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarFindDto" 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,
SELECT distinct 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,dicstandSort.DIC_TYPE_NAME 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
@@ -47,7 +47,7 @@
UNION ALL
SELECT
a.ID,
distinct a.ID,
a.STAND_CODE AS standNumber,
a.STAND_NAME AS standName,
a.STAND_EN_NAME,
@@ -86,7 +86,7 @@
UNION ALL
SELECT
a.ID,
distinct a.ID,
a.LAWS_NUMBER AS standNumber,
a.LAWS_NAME AS standName,
a.LAWS_EN_NAME as STAND_EN_NAME,
@@ -6,7 +6,7 @@
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
sar_public_idea_all.chapter_name as chapterName,sar_public_idea_all.wk_flag,sar_public_idea_all.cause
FROM sar_public_idea
INNER JOIN sar_public_idea_all on sar_public_idea_all.idea_id = sar_public_idea.id
left join ts_user on ts_user.USID = sar_public_idea_all.user_id
@@ -17,7 +17,8 @@
<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
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.cause
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
@@ -33,11 +34,23 @@
</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
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,sar_public_idea_all.cause
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 and type != ''">
and sar_public_idea_all.wk_flag ='1' and sar_public_idea_all.state in ('1','2')
</if>
ORDER BY part_code ASC
</select>
<select id="getPublicAllIdeaExport" 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,sar_public_idea_all.cause
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 cid = #{cid}
<if test="null==type or ''==type">
and sar_public_idea_all.wk_flag is null
</if>
@@ -146,7 +146,7 @@
AND library.project_group LIKE concat(concat('%',#{qu.projectGroup}),'%')
</if>
<if test="qu.projectStatus != null">
AND library.project_status LIKE concat(concat('%',#{qu.projectStatus}),'%')
AND library.project_status = #{qu.projectStatus}
</if>
<if test="qu.currentNode != null">
AND library.current_node LIKE concat(concat('%',#{qu.currentNode}),'%')
@@ -63,6 +63,29 @@
ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.ITEMS_NUM,1,(SELECT LOCATE('.',CONCAT(c.ITEMS_NUM,'.')))),SIGNED) ,c.rows
</select>
<select id="getSarStandUnqualifiedExcel" 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 , concat(ts_user.UNAME,concat('(',concat(ts_user.USID,')'))) 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="ids != null and ids.size()>0 ">
and sar_stand_unqualified.ID in
<foreach item="id" collection="ids" open="(" separator="," close=")" index="index">
#{id}
</foreach>
</if>
order by sar_stand_unqualified.ID,sar_stand_unqualified.STAND_ID ,sar_stand_unqualified.ITEMS_NUM asc
)c
ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.ITEMS_NUM,1,(SELECT LOCATE('.',CONCAT(c.ITEMS_NUM,'.')))),SIGNED) ,c.rows
</select>
<select id="getSarStandUnqualifiedCount" resultType="java.lang.Integer">
SELECT
@@ -17,6 +17,12 @@
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'
<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>
group by
PRODUCT_NAME,
sar_stand_project_library.project_group,
@@ -25,12 +31,6 @@
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}
@@ -46,6 +46,12 @@
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'
<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>
group by
PRODUCT_NAME,
sar_stand_project_library.project_group,
@@ -54,12 +60,6 @@
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>
@@ -258,7 +258,7 @@
</select>
<!-- 查询SAR_STAND_COMPARE_HIS列表 -->
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select <include refid="Base_Column_List" /> from
(select tmp_tb.* from
(select <include refid="Base_Column_List" /> from SAR_STAND_COMPARE_HIS
@@ -11,13 +11,11 @@
</select>
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO">
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
select wg_net_info.net_id,wg_net_info.name 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 ,wg_net_info.unit as unit
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}
where wg_work_group.type = #{type}
</select>
</mapper>
@@ -45,6 +45,10 @@
select * from wg_work_group where wg_work_group.pid = #{data} and wg_work_group.status = #{status}
</select>
<select id="researchDatasCheck" resultType="com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroup">
select * from wg_work_group where wg_work_group.id = #{data} and wg_work_group.status = #{status}
</select>
<select id="researchAllData" resultMap="WgWorkGroups">
select * from wg_work_group where wg_work_group.type =#{type}
</select>