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

# Conflicts:
#	adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsDetailedList/service/impl/SarLawsDetailedListServiceImpl.java
#	adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandUnqualified/dao/SarStandUnqualifiedDao.java
#	adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandUnqualified/service/impl/SarStandUnqualifiedServiceImpl.java
#	adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsAttrDetailedList/SarLawsAttrDetailedListMapper.xml
This commit is contained in:
zzy
2021-07-22 16:25:23 +08:00
52 changed files with 1202 additions and 167 deletions
@@ -643,7 +643,7 @@
<select id="selectAllItemsByIds" resultType="com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto">
select ID,STAND_ID,ITEMS_NUM,ITEMS_NAME,RESPONSIBLE_UNIT,SVPPS,APPLY_ARCTIC,CLAIM_TYPE,BUS_STAND_COVER
select ID,STAND_ID,ITEMS_NUM,ITEMS_NAME,RESPONSIBLE_UNIT,SVPPS,APPLY_ARCTIC,CLAIM_TYPE,BUS_STAND_COVER,DUTY_ENGINEER as responsibleEngineer
from SAR_STAND_ITEMS
where FILE_TYPE=#{type}
@@ -0,0 +1,164 @@
<?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.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo" >
<result column="id" property="id" />
<result column="stand_id" property="standId" />
<result column="creation_user" property="creationUser" />
<result column="valid_flag" property="validFlag" />
<result column="creation_time" property="creationTime" />
<result column="modify_time" property="modifyTime" />
</resultMap>
<!-- SAR_BUSS_STAND_ATTR_INFO table all fields -->
<sql id="Base_Column_List" >
id, stand_id, creation_user, valid_flag, creation_time, modify_time
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1
<trim suffixOverrides="," >
<if test="id != null" >
and id ${idOperator} #{id}
</if>
<if test="standId != null" >
and stand_id ${standIdOperator} #{standId}
</if>
<if test="creationUser != null" >
and creation_user ${creationUserOperator} #{creationUser}
</if>
<if test="validFlag != null" >
and valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="creationTime != null" >
and creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null" >
and creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null" >
and creation_time &lt;= #{creationTime2}
</if>
<if test="modifyTime != null" >
and modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null" >
and modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null" >
and modify_time &lt;= #{modifyTime2}
</if>
</trim>
</sql>
<!-- 插入记录 -->
<insert id="insert" parameterType="com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo" >
insert into SAR_BUSS_STAND_ATTR_INFO(<include refid="Base_Column_List" />)
values (#{id, jdbcType=VARCHAR}, #{standId, jdbcType=VARCHAR}, #{creationUser, jdbcType=VARCHAR}, #{validFlag, jdbcType=VARCHAR}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP})
</insert>
<!-- 动态插入记录 主键是序列 -->
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo" >
insert into SAR_BUSS_STAND_ATTR_INFO
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >id,</if>
<if test="standId != null" >stand_id,</if>
<if test="creationUser != null" >creation_user,</if>
<if test="validFlag != null" >valid_flag,</if>
<if test="creationTime != null" >creation_time,</if>
<if test="modifyTime != null" >modify_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
<if test="standId != null" >#{standId, jdbcType=VARCHAR},</if>
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
<if test="validFlag != null" >#{validFlag, jdbcType=VARCHAR},</if>
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
</trim>
</insert>
<!-- SAR_BUSS_STAND_ATTR_INFO 列表总数-->
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
select count(1) from SAR_BUSS_STAND_ATTR_INFO
<include refid="Base_Where_Clause"/>
</select>
<!-- 查询SAR_BUSS_STAND_ATTR_INFO列表 -->
<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_BUSS_STAND_ATTR_INFO
<include refid="Base_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
${pager.orderCondition}
</if>
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
</select>
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select <include refid="Base_Column_List"/> from SAR_BUSS_STAND_ATTR_INFO
<include refid="Base_Where_Clause"/>
<if test="pager.productNameLike != null and pager.productNameLike != ''">
and PRODUCT_NAME like concat(concat('%',#{pager.productNameLike}),'%')
</if>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
${pager.orderCondition}
</if>
</select>
<!-- 新增字段-->
<insert id="alterStandAttr" parameterType="java.lang.String" >
alter table SAR_BUSS_STAND_ATTR_INFO
add ${fieldInfo}
</insert>
<!-- 删除字段-->
<insert id="deleteStandAttr" parameterType="java.lang.String" >
alter table SAR_BUSS_STAND_ATTR_INFO
drop COLUMN ${fieldInfo}
</insert>
<!-- 查询表中已存在字段-->
<select id="selectStandAttrColumn" resultType="java.lang.Integer" parameterType="java.lang.String">
SELECT COUNT(*)
FROM information_schema.columns
WHERE TABLE_NAME = 'SAR_BUSS_STAND_ATTR_INFO' AND COLUMN_NAME = #{columnName}
</select>
<!-- 修改字段长度-->
<update id="updateAttrLen" parameterType="java.lang.String" >
ALTER table SAR_BUSS_STAND_ATTR_INFO
MODIFY ${fieldInfo}
</update>
<!-- 查询字段及对应数据-->
<select id="selectStandFieldAndData" resultType="Map">
SELECT ${fieldInfo}
FROM SAR_BUSS_STAND_ATTR_INFO
WHERE valid_flag=0 and stand_id = #{standId}
</select>
<insert id="insertStandAttr" parameterType="java.lang.String" >
insert into SAR_BUSS_STAND_ATTR_INFO(${fieldInfo})
values (${fieldValue})
</insert>
<update id="deleteStandAttrByStandId" parameterType="java.lang.String" >
delete from SAR_BUSS_STAND_ATTR_INFO
where stand_id = #{standId}
</update>
<update id="updateStandInfo" parameterType="java.lang.String" >
update SAR_BUSS_STAND_ATTR_INFO set ${field}=#{value}
where stand_id = #{standId}
</update>
<select id="selectFieldValByStandId" resultType="java.lang.String" parameterType="java.lang.String">
SELECT ${field}
FROM SAR_BUSS_STAND_ATTR_INFO
WHERE stand_id = #{standId} and valid_flag=0
</select>
</mapper>
@@ -14,11 +14,44 @@
<result column="institution_id" property="institutionId"/>
</collection>
</resultMap>
<resultMap id="TsInstitution" type="com.adc.da.slrs.sarInstitution.entity.TsInstitution">
<result column="parent_id" property="parentId"/>
<result column="level" property="level"/>
<result column="name" property="name"/>
<result column="has_child" property="hasChild"/>
</resultMap>
<resultMap id="TsUser" type="com.adc.da.slrs.sarInstitution.entity.TsUserVO">
<result column="usid" property="id"/>
<result column="account" property="account"/>
<result column="uname" property="name"/>
<result column="institution_id" property="institutionId"/>
</resultMap>
<!-- 只查询这个部门下的子一级部门-->
<select id="selectNextInstitution" resultMap="TsInstitution">
select * from ts_institution
WHERE parent_id=#{institutionId}
</select>
<!-- 只查询这个部门下的子一级人员-->
<select id="selectNextUser" resultMap="TsUser">
select * from ts_user
WHERE institution_id=#{institutionId}
</select>
<select id="selectRootAndUser" resultMap="InstitutionAndUser">
select i.*,u.usid,u.account,u.uname,u.institution_id from ts_institution i
left join ts_user u
on i.id=u.institution_id
where i.parent_id not in (select id from ts_institution)
<if test="userName == null">
where i.parent_id not in (select id from ts_institution)
</if>
<if test="userName != null">
where u.uname like concat('%','${userName}','%')
</if>
</select>
<select id="selectAndUserByParent" resultMap="InstitutionAndUser">
@@ -41,8 +41,13 @@
</where>
order by number
</select>
<select id="selectTypeApplicable" resultType="java.lang.String">
SELECT APPLY_ARCTIC
FROM sar_stand_items
WHERE ID =#{param1,jdbcType=VARCHAR}
</select>
<select id="selectLawsByIdC" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable
SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
a.ID = b.STAND_ID
<where>
@@ -60,25 +65,12 @@
</foreach>
</where>
</select>
<select id="selectTimes" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandRegionalTimeDto">
SELECT
b.country_area AS country,
a.putTime AS putTime,
a.xcxssrq AS xcxssrq,
a.zccssrq AS zccssrq
FROM
sar_laws_attr_detailed_list a
LEFT JOIN sar_laws_detailed_list b ON b.id = a.detailed_list_id
WHERE
b.sort_key = 1
AND a.stand_id = #{standId}
</select>
<insert id="insertList">
INSERT INTO sar_laws_attr_detailed_list ( id, number, detailed_list_id, stand_id ,putTime,xcxssrq,zccssrq) VALUES
INSERT INTO sar_laws_attr_detailed_list ( id, number, detailed_list_id, stand_id ) VALUES
<foreach collection ="sarLawsAttrDetailedLists" item="list" separator =",">
(#{list.id,jdbcType=VARCHAR}, #{list.number}, #{list.detailedListId,jdbcType=VARCHAR}, #{list.standId,jdbcType=VARCHAR},#{list.putTime,jdbcType=VARCHAR},#{list.xcxssrq,jdbcType=VARCHAR},#{list.zccssrq,jdbcType=VARCHAR})
(#{list.id,jdbcType=VARCHAR}, #{list.number}, #{list.detailedListId,jdbcType=VARCHAR}, #{list.standId,jdbcType=VARCHAR})
</foreach >
</insert>
@@ -9,14 +9,15 @@
</insert>
<!-- <select id="queryProjectManagerPage" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">-->
<!-- select s.product_line,t.UNAME as uName-->
<!-- from sar_stand_project_library s-->
<!-- INNER JOIN ts_user t-->
<!-- ON s.project_manager=t.USID-->
<!-- GROUP BY s.product_line-->
<!-- limit #{current},#{pageSize}-->
<!-- </select>-->
<select id="queryProjectManagerPage" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">
select s.product_line,t.UNAME as uName ,s.project_manager as projectManager
from sar_stand_project_library s
INNER JOIN ts_user t
ON s.project_manager=t.USID
GROUP BY s.product_line
limit #{current},#{pageSize}
</select>
<delete id="deleteByIds">
delete from sar_stand_project_relation where stand_id in (
<foreach collection="ids" item="list" separator=",">
@@ -2,4 +2,31 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarStandUnqualified.dao.SarStandUnqualifiedDao">
<select id="getAllDatasByPage" resultType="com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified">
SELECT
a.*,
b.UNAME AS qaEngineerName,
c.UNAME AS authEngineerName,
d.UNAME AS dutyEngineerName
FROM
sar_stand_unqualified a
LEFT JOIN ts_user b ON a.QA_ENGINEER = b.USID
LEFT JOIN ts_user c ON a.AUTH_ENGINEER = c.USID
LEFT JOIN ts_user d ON a.DUTY_ENGINEER = d.USID
WHERE
a.close_state = 1
<if test="sar.productName != null and sar.productName != '' ">
and a.product_name like concat(concat('%',#{sar.productName}),'%')
</if>
<if test="sar.standName != null and sar.standName != '' ">
and a.stand_name like concat(concat('%',#{sar.standName}),'%')
</if>
<if test="sar.productName != null and sar.productName != '' ">
and a.responsible_unit = #{responsibleUnit}
</if>
<if test="sar.standId != null and sar.standId != '' ">
and a.stand_id = #{standId}
</if>
</select>
</mapper>