| | |
| | | BufferedImage bufferedImage = ImageIO.read(in2); |
| | | int width = bufferedImage.getWidth(); |
| | | int height = bufferedImage.getHeight(); |
| | | staticFieldValue = new PictureRenderData(width, height, ".png", in); |
| | | if (width > 900 ) { |
| | | height = (height * 900) / width; |
| | | staticFieldValue = new PictureRenderData(900, height, ".png", in); |
| | | } else { |
| | | staticFieldValue = new PictureRenderData(width, height, ".png", in); |
| | | } |
| | | /*staticFieldValue = new PictureRenderData(80, 100, "d://" + valStr);*/ |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } else { |
| | | staticFieldValue = new PictureRenderData(100, 30, localPath+"template/noSign.png"); |
| | | staticFieldValue = new PictureRenderData(100, 30, localPath + "template/noSign.png"); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | <select id="getShipList" resultType="com.zt.life.core.model.Product"> |
| | | select a.*, a.level2 as LEVEL |
| | | from CORE_PRODUCT a |
| | | from core_product a |
| | | where a.is_delete = 0 and a.status = 1 and a.level2='L2' |
| | | <if test="localAear!=null"> |
| | | and ship_id in (select ship_id from SYS_AREA_SHIP where area='${localAear}') |
| | | and ship_id in (select ship_id from sys_area_ship where area='${localAear}') |
| | | </if> |
| | | ORDER BY sort |
| | | </select> |
| | | |
| | | <select id="getList" resultType="com.zt.life.core.model.Product"> |
| | | select a.*, a.level2 as LEVEL |
| | | from CORE_PRODUCT a |
| | | from core_product a |
| | | <where> |
| | | <if test="whereSql!=null"> |
| | | ${whereSql} |
| | |
| | | <select id="getLevelList" parameterType="java.lang.String" resultType="com.zt.life.core.model.Product"> |
| | | SELECT |
| | | a.*, a.level2 as LEVEL |
| | | FROM CORE_PRODUCT a |
| | | FROM core_product a |
| | | WHERE |
| | | a.level2 = #{level} |
| | | </select> |
| | | |
| | | <select id="getSubList" parameterType="java.lang.String" resultType="com.zt.life.core.model.Product"> |
| | | SELECT id, product_id, name, level2 as level |
| | | FROM CORE_PRODUCT |
| | | FROM core_product |
| | | WHERE 1=1 AND is_delete=0 |
| | | <if test='pid=="0"'> |
| | | and product_id IN( SELECT SHIP_ID |
| | | and product_id IN( SELECT ship_id |
| | | FROM |
| | | SYS_AREA_SHIP |
| | | sys_area_ship |
| | | WHERE |
| | | AREA = 'sy' |
| | | area = 'sy' |
| | | ) |
| | | </if> |
| | | <if test="pid!='0'.toString()"> |
| | | and Parent_Product_ID = #{pid} |
| | | and parent_product_id = #{pid} |
| | | </if> |
| | | |
| | | </select> |
| | | <select id="getListByIds" parameterType="java.lang.String" resultType="com.zt.life.core.model.Product"> |
| | | SELECT id, product_id, name, level2 as level |
| | | FROM CORE_PRODUCT |
| | | FROM core_product |
| | | WHERE 1=1 AND is_delete=0 |
| | | <if test="ids!=null and ids!=''"> |
| | | and CONCAT(',',#{ids},',') like CONCAT('%,',product_id,',%') |
| | | </if> |
| | | <if test="ids==null or ids==''"> |
| | | and Parent_Product_ID = -1 |
| | | and parent_product_id = -1 |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getAllNodeByShipId" parameterType="java.lang.Long" resultType="com.zt.common.entity.MapData"> |
| | | SELECT PRODUCT_ID as id,name |
| | | FROM CORE_PRODUCT |
| | | SELECT product_id as id,name |
| | | FROM core_product |
| | | WHERE 1=1 AND is_delete=0 |
| | | and status=1 and ship_id = #{shipId} |
| | | </select> |
| | | |
| | | <select id="getIdByName" resultType="java.lang.Long"> |
| | | SELECT |
| | | PRODUCT_ID |
| | | product_id |
| | | FROM |
| | | view_zt_boat_tree |
| | | WHERE 1=1 |
| | |
| | | and layer in (${levels}) |
| | | </if> |
| | | <if test="productId != null and productId != ''"> |
| | | and CONNECT_ID = concat(#{productId}) |
| | | and connect_id = concat(#{productId}) |
| | | </if> |
| | | group by info_id |
| | | order by label |
| | |
| | | SELECT |
| | | a.id, |
| | | a.product_id, |
| | | CONCAT(d.name,'-',a.`YEAR`,'-',c.Dict_label) AS `name`, |
| | | CONCAT(d.name,'-',a.`year`,'-',c.dict_label) AS `name`, |
| | | 'qd' as area |
| | | FROM |
| | | wx_qd_project a |
| | |
| | | where isdelete = 0 and layer = 'side' |
| | | group by info_id |
| | | ) d on d.info_id = concat(a.product_id) |
| | | LEFT JOIN QD_SYS_DICT_DATA c ON a.maintain_level = c.Dict_Value AND dict_type_id IN (SELECT id FROM SYS_DICT_TYPE WHERE DICT_TYPE='question_level_type') |
| | | LEFT JOIN qd_sys_dict_data c ON a.maintain_level = c.dict_value AND dict_type_id IN (SELECT id FROM sys_dict_type WHERE dict_type='question_level_type') |
| | | WHERE |
| | | a.is_delete = 0 |
| | | <if test="sideId != null and sideId != ''"> |
| | | and a.PRODUCT_ID = #{sideId} |
| | | and a.product_id = #{sideId} |
| | | </if> |
| | | UNION |
| | | SELECT |
| | |
| | | 'sy' as area |
| | | FROM |
| | | wx_project a |
| | | LEFT JOIN SYS_DICT_DATA c ON a.maintain_level = c.Dict_Value AND dict_type_id IN (SELECT id FROM SYS_DICT_TYPE WHERE DICT_TYPE='question_level_type') |
| | | LEFT JOIN sys_dict_data c ON a.maintain_level = c.dict_value AND dict_type_id IN (SELECT id FROM sys_dict_type WHERE dict_type='question_level_type') |
| | | WHERE |
| | | a.is_delete = 0 |
| | | <if test="sideId != null and sideId != ''"> |
| | | and a.PRODUCT_ID = #{sideId} |
| | | and a.product_id = #{sideId} |
| | | </if> |
| | | ) b |
| | | </select> |
| | |
| | | a.id, |
| | | a.product_id, |
| | | /*d.parent_product_id,*/ |
| | | a.`YEAR` |
| | | a.`year` |
| | | FROM |
| | | wx_qd_project a |
| | | /*left join view_zt_boat_tree d on d.product_id = concat(a.product_id)*/ |
| | |
| | | a.id, |
| | | a.product_id, |
| | | /* d.parent_product_id,*/ |
| | | a.`YEAR` |
| | | a.`year` |
| | | FROM |
| | | wx_project a |
| | | /* left join view_zt_boat_tree d on d.product_id = concat(a.product_id)*/ |
| | |
| | | LIMIT 1; |
| | | </select> |
| | | <select id="getIdByNameByProductId" resultType="java.lang.Long"> |
| | | SELECT PRODUCT_ID |
| | | SELECT product_id |
| | | FROM view_zt_boat_tree |
| | | WHERE is_delete = 0 |
| | | and (`level` = 'system1' or `level` = 'system2') |
| | | and name = #{name} |
| | | and concat(',', parent_Product_Ids, ',') like concat('%,', #{productId}, ',%') |
| | | and concat(',', parent_product_ids, ',') like concat('%,', #{productId}, ',%') |
| | | </select> |
| | | </mapper> |
| | |
| | | </delete> |
| | | |
| | | <select id="searchNodes" resultType="com.zt.life.core.dto.SearchNodesDto"> |
| | | SELECT INFO_ID AS id, |
| | | LABEL AS name, |
| | | CONNECT_GROUP AS groups, |
| | | LAYER AS level |
| | | SELECT info_id AS id, |
| | | label AS name, |
| | | layer AS level, |
| | | connect_group AS `GROUPS` |
| | | from zt_boat_tree |
| | | where label like '%${name}%' |
| | | and CONNECT_GROUP like '%${pid}%' |
| | | group by INFO_ID |
| | | order by LABEL |
| | | and connect_group like '%${pid}%' |
| | | group by info_id |
| | | order by label |
| | | </select> |
| | | |
| | | <select id="getNamesByIds" resultType="com.zt.common.entity.MapData"> |
| | | SELECT INFO_ID AS id, |
| | | LABEL AS name |
| | | SELECT info_id AS id, |
| | | label AS name |
| | | from zt_boat_tree |
| | | where INFO_ID in (${ids}) |
| | | where info_id in (${ids}) |
| | | and layer in ('side','system1','system2','equipment','componentFolder') |
| | | group by INFO_ID |
| | | group by info_id |
| | | order by name |
| | | </select> |
| | | |
| | | <select id="getAll" resultType="com.zt.life.core.model.ZtProduct"> |
| | | select * |
| | | from ( |
| | | SELECT ID as dataId, |
| | | INFO_ID AS productId, |
| | | LABEL AS name, |
| | | CONNECT_ID AS parentProductId, |
| | | CONNECT_GROUP AS parentProductIds, |
| | | LAYER AS level, |
| | | PROJECT, |
| | | SORT, |
| | | ISDELETE AS is_delete, |
| | | CREATE_BY AS CREATEOR, |
| | | CREATE_TIME AS CREATE_DATE, |
| | | SELECT id as dataId, |
| | | info_id AS productId, |
| | | label AS name, |
| | | connect_id AS parentProductId, |
| | | connect_group AS parentProductIds, |
| | | layer AS level, |
| | | project, |
| | | sort, |
| | | isdelete AS is_delete, |
| | | create_by AS CREATEOR, |
| | | create_time AS CREATE_DATE, |
| | | case when exists(select 1 from eqpt_used c where b.info_ID = c.product_id) then 0 else 1 end |
| | | as hasNotData |
| | | FROM (SELECT A.* |
| | | -- ROW_NUMBER() OVER (PARTITION BY A.INFO_ID ORDER BY A.CREATE_TIME desc) AS NEWINDEX |
| | | FROM ZT_BOAT_TREE A |
| | | where ISDELETE = 0 |
| | | FROM zt_boat_tree A |
| | | where isdelete = 0 |
| | | ) B |
| | | ) c order by sort |
| | | </select> |
| | | |
| | | <select id="getAllNodes" resultType="com.zt.life.core.model.ZtProduct"> |
| | | SELECT data_Id, |
| | | product_Id, |
| | | SELECT data_id, |
| | | product_id, |
| | | name, |
| | | parent_Product_Id, |
| | | parent_Product_Ids, |
| | | parent_product_id, |
| | | parent_product_ids, |
| | | level |
| | | FROM VIEW_ZT_BOAT_TREE |
| | | where level is not null and name is not null and product_Id is not null |
| | | FROM view_zt_boat_tree |
| | | where level is not null and name is not null and product_id is not null |
| | | </select> |
| | | |
| | | <select id="getTreeNodes" resultType="com.zt.life.core.model.ZtProduct"> |
| | | select * from ( |
| | | SELECT b.*, |
| | | case when exists(select 1 from view_zt_boat_tree c where b.product_id = c.parent_Product_Id and c.IS_DELETE=0 and c.level in ('system1','system2','equipment')) then 0 else 1 end |
| | | case when exists(select 1 from view_zt_boat_tree c where b.product_id = c.parent_product_id and c.is_delete=0 and c.level in ('system1','system2','equipment')) then 0 else 1 end |
| | | as leaf, |
| | | case when exists(select 1 from product_data c where c.id = b.product_id and hasLifeData = 1) then 0 else 1 end |
| | | case when exists(select 1 from product_data c where c.id = b.product_id ) then 0 else 1 end |
| | | as hasNotData |
| | | FROM view_zt_boat_tree B |
| | | where IS_DELETE = 0 |
| | | where is_delete = 0 |
| | | <if test="pid!=null and pid!=''"> |
| | | and parent_Product_Id=#{pid} and level in ('system1','system2','equipment') |
| | | and parent_product_id=#{pid} and level in ('system1','system2','equipment') |
| | | </if> |
| | | <if test="pid==null or pid==''"> |
| | | and level in ('side') |
| | |
| | | |
| | | <select id="getShipList" resultType="com.zt.life.core.model.ZtProduct"> |
| | | SELECT |
| | | ID as dataId, |
| | | INFO_ID AS productId, |
| | | LABEL AS name, |
| | | CONNECT_ID AS parentProductId, |
| | | CONNECT_GROUP AS parentProductIds, |
| | | LAYER AS level, |
| | | PROJECT, |
| | | SORT, |
| | | ISDELETE AS is_delete, |
| | | CREATE_BY AS CREATEOR, |
| | | CREATE_TIME AS CREATE_DATE |
| | | id as dataId, |
| | | info_id AS productId, |
| | | label AS name, |
| | | connect_id AS parentProductId, |
| | | connect_group AS parentProductIds, |
| | | layer AS level, |
| | | project, |
| | | sort, |
| | | isdelete AS is_delete, |
| | | create_by AS CREATEOR, |
| | | create_time AS CREATE_DATE |
| | | |
| | | FROM ZT_BOAT_TREE A |
| | | where a.ISDELETE = 0 and a.LAYER='side' |
| | | FROM zt_boat_tree A |
| | | where a.isdelete = 0 and a.layer='side' |
| | | <if test="localAear!=null and localAear != ''"> |
| | | and INFO_ID in (select ship_id from SYS_AREA_SHIP where area='${localAear}') |
| | | and info_id in (select ship_id from sys_area_ship where area='${localAear}') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | FROM view_zt_boat_tree |
| | | WHERE 1=1 AND is_delete=0 |
| | | <if test='pid=="0"'> |
| | | and product_id IN( SELECT SHIP_ID |
| | | and product_id IN( SELECT ship_id |
| | | FROM |
| | | SYS_AREA_SHIP |
| | | sys_area_ship |
| | | WHERE |
| | | AREA = 'sy' |
| | | area = 'sy' |
| | | ) |
| | | </if> |
| | | <if test="pid!='0'.toString()"> |
| | | and Parent_Product_ID = #{pid} |
| | | and parent_product_id = #{pid} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSubList" parameterType="java.lang.String" resultType="com.zt.life.core.model.ZtProduct"> |
| | | SELECT INFO_ID as product_id, LABEL as name, layer level |
| | | SELECT info_id as product_id, label as name, layer level |
| | | FROM zt_boat_tree |
| | | WHERE 1=1 AND ISDELETE=0 |
| | | WHERE 1=1 AND isdelete=0 |
| | | <if test='pid=="0"'> |
| | | layer = 'side' |
| | | </if> |
| | |
| | | and CONCAT(',',#{ids},',') like CONCAT('%,',product_id,',%') |
| | | </if> |
| | | <if test="ids==null or ids==''"> |
| | | and Parent_Product_ID = -1 |
| | | and parent_product_id = -1 |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | product_id AS id, |
| | | name |
| | | FROM view_zt_boat_tree A |
| | | where a.IS_DELETE = 0 |
| | | where a.is_delete = 0 |
| | | <if test="shipId!=null"> |
| | | and PARENT_PRODUCT_IDS like concat('%,',#{shipId},',%') |
| | | and parent_product_ids like concat('%,',#{shipId},',%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | view_zt_boat_tree b |
| | | where a.level in ('side','system1','system2','equipment','componentFolder') |
| | | and b.product_id = '${id}' |
| | | and (concat(',',b.parent_Product_Ids,',') like concat('%,',a.product_id,',%') or b.product_id = a.product_id) |
| | | and (concat(',',b.parent_product_ids,',') like concat('%,',a.product_id,',%') or b.product_id = a.product_id) |
| | | order by level2 |
| | | ) c |
| | | </select> |
| | | |
| | | <select id="getOneByProductId" resultType="com.zt.life.core.model.ZtProduct"> |
| | | SELECT `p`.`ID` AS `data_id`, |
| | | `p`.`INFO_ID` AS `product_Id`, |
| | | `p`.`LABEL` AS `name`, |
| | | `p`.`CONNECT_ID` AS `parent_Product_Id`, |
| | | `p`.`CONNECT_GROUP` AS `parent_Product_Ids`, |
| | | `p`.`LAYER` AS `level`, |
| | | `p`.`PROJECT` AS `PROJECT`, |
| | | `p`.`SORT` AS `SORT`, |
| | | `p`.`ISDELETE` AS `is_delete`, |
| | | `p`.`CREATE_BY` AS `CREATEOR`, |
| | | `p`.`CREATE_TIME` AS `CREATE_DATE` |
| | | SELECT `p`.`id` as `data_id`, |
| | | `p`.`info_id` as `product_id`, |
| | | `p`.`label` as `name`, |
| | | `p`.`connect_id` as `parent_product_id`, |
| | | `p`.`connect_group` as `parent_product_ids`, |
| | | `p`.`layer` as `level`, |
| | | `p`.`project` as `project`, |
| | | `p`.`sort` as `sort`, |
| | | `p`.`isdelete` as `is_delete`, |
| | | `p`.`create_by` as `createor`, |
| | | `p`.`create_time` as `create_date` |
| | | FROM zt_boat_tree p |
| | | WHERE p.isdelete = 0 |
| | | and p.info_id =concat(#{productId}) |
| | |
| | | </select> |
| | | |
| | | <select id="getByProductIdList" resultType="com.zt.life.core.model.ZtProduct"> |
| | | SELECT `p`.`ID` AS `data_id`, |
| | | `p`.`INFO_ID` AS `product_Id`, |
| | | `p`.`LABEL` AS `name`, |
| | | `p`.`CONNECT_ID` AS `parent_Product_Id`, |
| | | `p`.`CONNECT_GROUP` AS `parent_Product_Ids`, |
| | | `p`.`LAYER` AS `level`, |
| | | `p`.`PROJECT` AS `PROJECT`, |
| | | `p`.`SORT` AS `SORT`, |
| | | `p`.`ISDELETE` AS `is_delete`, |
| | | `p`.`CREATE_BY` AS `CREATEOR`, |
| | | `p`.`CREATE_TIME` AS `CREATE_DATE` |
| | | SELECT `p`.`id` as `data_id`, |
| | | `p`.`info_id` as `product_id`, |
| | | `p`.`label` as `name`, |
| | | `p`.`connect_id` as `parent_product_id`, |
| | | `p`.`connect_group` as `parent_product_ids`, |
| | | `p`.`layer` as `level`, |
| | | `p`.`project` as `project`, |
| | | `p`.`sort` as `sort`, |
| | | `p`.`isdelete` as `is_delete`, |
| | | `p`.`create_by` as `createor`, |
| | | `p`.`create_time` as `create_date` |
| | | FROM zt_boat_tree p |
| | | WHERE p.isdelete = 0 |
| | | and (concat(',',#{parentProductIds},',') like concat('%,',p.info_id,',%')) |
| | | and p.layer in ('model','side','system1','system2','equipment','componentFolder') |
| | | group by INFO_ID |
| | | group by info_id |
| | | </select> |
| | | |
| | | <select id="getByProductId" resultType="com.zt.life.core.model.ZtProduct"> |
| | |
| | | ,p6.product_id as deviceProductId |
| | | ,p6.name as deviceName |
| | | FROM view_zt_boat_tree p |
| | | left join view_zt_boat_tree p2 on concat(',',p.parent_Product_Ids,',',p.product_id,',') like concat('%,',p2.product_id,',%') and p2.level = 'model' |
| | | left join view_zt_boat_tree p3 on concat(',',p.parent_Product_Ids,',',p.product_id,',') like concat('%,',p3.product_id,',%') and p3.level = 'side' |
| | | left join view_zt_boat_tree p4 on concat(',',p.parent_Product_Ids,',',p.product_id,',') like concat('%,',p4.product_id,',%') and p4.level = 'system1' |
| | | left join view_zt_boat_tree p5 on concat(',',p.parent_Product_Ids,',',p.product_id,',') like concat('%,',p5.product_id,',%') and p5.level = 'system2' |
| | | left join view_zt_boat_tree p6 on concat(',',p.parent_Product_Ids,',',p.product_id,',') like concat('%,',p6.product_id,',%') and p6.level in ('equipment','componentFolder') |
| | | left join view_zt_boat_tree p2 on concat(',',p.parent_product_ids,',',p.product_id,',') like concat('%,',p2.product_id,',%') and p2.level = 'model' |
| | | left join view_zt_boat_tree p3 on concat(',',p.parent_product_ids,',',p.product_id,',') like concat('%,',p3.product_id,',%') and p3.level = 'side' |
| | | left join view_zt_boat_tree p4 on concat(',',p.parent_product_ids,',',p.product_id,',') like concat('%,',p4.product_id,',%') and p4.level = 'system1' |
| | | left join view_zt_boat_tree p5 on concat(',',p.parent_product_ids,',',p.product_id,',') like concat('%,',p5.product_id,',%') and p5.level = 'system2' |
| | | left join view_zt_boat_tree p6 on concat(',',p.parent_product_ids,',',p.product_id,',') like concat('%,',p6.product_id,',%') and p6.level in ('equipment','componentFolder') |
| | | WHERE p.is_delete = 0 and p.product_id =concat(#{productId}) |
| | | limit 1 |
| | | </select> |
| | |
| | | |
| | | <select id="getList" resultType="com.zt.life.sys.model.SysOssConfig"> |
| | | select a.* |
| | | from SYS_OSS_CONFIG a |
| | | from sys_oss_config a |
| | | <where> |
| | | a.is_delete = 0 |
| | | <if test="whereSql!=null"> |
| | |
| | | </select> |
| | | <select id="existsSameTypeAndFiledGroup" resultType="java.lang.Integer"> |
| | | SELECT |
| | | case when exists(select 1 FROM `sys_oss_config` where is_delete=0 and BUSI_FIELD_GROUP=#{busiFieldGroup} and BUSI_TYPE |
| | | case when exists(select 1 FROM `sys_oss_config` where is_delete=0 and busi_field_group=#{busiFieldGroup} and busi_type |
| | | <> #{busiType} and id <> #{id}) |
| | | then 1 |
| | | when exists(select 1 FROM `sys_oss_config` where is_delete=0 and BUSI_FIELD_GROUP=#{busiFieldGroup} and BUSI_TYPE = #{busiType} and id |
| | | when exists(select 1 FROM `sys_oss_config` where is_delete=0 and busi_field_group=#{busiFieldGroup} and busi_type = #{busiType} and id |
| | | <> #{id}) |
| | | then 2 |
| | | else 0 end |
| | | </select> |
| | | <select id="existsSameGroupById" resultType="java.lang.Integer"> |
| | | select count(1) FROM `sys_oss_config` where is_delete=0 and BUSI_FIELD_GROUP = #{busiFiledGroup} |
| | | select count(1) FROM `sys_oss_config` where is_delete=0 and busi_field_group = #{busiFiledGroup} |
| | | <if test="id!=null"> |
| | | and busi_type <> #{id} |
| | | </if> |
| | | </select> |
| | | <update id="updateByBusiType"> |
| | | update sys_oss_config set IS_DELETE=1,UPDATE_DATE = CURRENT_TIMESTAMP where BUSI_TYPE=#{busiType} |
| | | update sys_oss_config set is_delete=1,update_date = CURRENT_TIMESTAMP where busi_type=#{busiType} |
| | | </update> |
| | | </mapper> |
| | |
| | | |
| | | <select id="existUsername" resultType="java.lang.Integer"> |
| | | select count(1) |
| | | from SYS_USER a |
| | | from sys_user a |
| | | <where> |
| | | is_delete = 0 |
| | | <if test="whereSql!=null"> |
| | |
| | | </select> |
| | | |
| | | <update id="test"> |
| | | update SYS_USER set real_name = #{realName} where username = #{userName} |
| | | update sys_user set real_name = #{realName} where username = #{userName} |
| | | </update> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <select id="existUsername" resultType="java.lang.Integer"> |
| | | select count(1) |
| | | from SYS_USER a |
| | | from sys_user a |
| | | where |
| | | del_flag = 0 |
| | | and user_name = #{userName} |
| | |
| | | |
| | | <select id="getByUserName" resultType="com.zt.life.sys.model.SysUserRegister"> |
| | | select * |
| | | from SYS_USER a |
| | | from sys_user a |
| | | where |
| | | del_flag = 0 |
| | | and user_name = #{userName} |
| | |
| | | |
| | | <update id="changePassword"> |
| | | UPDATE |
| | | SYS_USER |
| | | sys_user |
| | | SET |
| | | password = #{password}, |
| | | changepass_date = now(), |
| | |
| | | data.setId(baselineId); |
| | | BaselineRelease baseline = this.get(baselineId); |
| | | data.setBaseline(baseline); |
| | | if (projectId == null) { |
| | | if (baseline != null && projectId == null) { |
| | | projectId = baseline.getProjectId(); |
| | | } |
| | | List<BaselineReleaseRemark> remarkList = remarkService.getList(baselineId); |
| | |
| | | baseline.setPageCode(pageCode); |
| | | data.setBaseline(baseline); |
| | | } |
| | | if ("demand".equals(pageCode)){ |
| | | if ("demand".equals(pageCode)) { |
| | | data.getBaseline().setBaselineType("1"); |
| | | }else if("product".equals(pageCode)){ |
| | | } else if ("product".equals(pageCode)) { |
| | | data.getBaseline().setBaselineType("2"); |
| | | } |
| | | for (BaselineReleaseRemark remark : data.getRemarkList()) { |
| | | if (remark.getWarehouseDetailId() != null) { |
| | | Long configItemId = remark.getWarehouseDetailId(); |
| | | OssDto ossDto = sysOssConfigService.getOssByBusiType(configItemId, "config_item_warehouse"); |
| | | if (ossDto != null) { |
| | | remark.setFiles(ossDto); |
| | | } |
| | | Long configItemId = remark.getWarehouseDetailId(); |
| | | OssDto ossDto = sysOssConfigService.getOssByBusiType(configItemId, "config_item_warehouse"); |
| | | if (ossDto != null) { |
| | | remark.setFiles(ossDto); |
| | | } |
| | | } |
| | | } |
| | | if (projectId != null) { |
| | |
| | | import com.zt.common.validator.group.AddGroup; |
| | | import com.zt.common.validator.group.DefaultGroup; |
| | | import com.zt.common.validator.group.UpdateGroup; |
| | | import com.zt.life.modules.configAuditReport.dto.ConfigAuditDto; |
| | | import com.zt.life.modules.configAuditReport.model.ConfigAuditReport; |
| | | import com.zt.life.modules.configAuditReport.service.ConfigAuditReportService; |
| | | import com.zt.life.sys.service.SysOssConfigService; |
| | | import com.zt.modules.coderule.service.SysCodeRuleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private ConfigAuditReportService configAuditReportService; |
| | | |
| | | @Autowired |
| | | private SysCodeRuleService sysCodeRuleService; |
| | | |
| | | @Autowired |
| | | private SysOssConfigService sysOssConfigService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | | @ApiImplicitParams({ |
| | |
| | | |
| | | return PageResult.ok(configAuditReportService.page(queryFilter)); |
| | | } |
| | | |
| | | @GetMapping("{id}") |
| | | /* @GetMapping("getDto") |
| | | @ApiOperation("信息") |
| | | public Result<ConfigAuditReport> get(@PathVariable("id") Long id){ |
| | | ConfigAuditReport data = configAuditReportService.get(id); |
| | | |
| | | public Result<ConfigAuditDto> getDto(Long projectId, Long reportId) { |
| | | //ConfigAuditDto data =configAuditReportService.getDto(projectId, reportId); |
| | | if (reportId!=null) { |
| | | for (WarehouseConfigItem configItem : data.getConfigItemList()) { |
| | | Long configItemId = configItem.getId(); |
| | | OssDto ossDto = sysOssConfigService.getOssByBusiType(configItemId, "config_item_warehouse"); |
| | | if (ossDto != null) { |
| | | configItem.setFiles(ossDto); |
| | | } |
| | | } |
| | | } |
| | | return Result.ok(data); |
| | | } |
| | | }*/ |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | | @LogOperation("新增") |
| | | public Result insert(@RequestBody ConfigAuditReport configAuditReport){ |
| | | public Result insert(@RequestBody ConfigAuditDto configAuditDto){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(configAuditReport, AddGroup.class, DefaultGroup.class); |
| | | configAuditReportService.insert(configAuditReport); |
| | | |
| | | ValidatorUtils.validateEntity(configAuditDto, AddGroup.class, DefaultGroup.class); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("funCode", "config_audit_report"); |
| | | map.put("projectId",configAuditDto.getProjectId().toString()); |
| | | configAuditDto.getAuditReport().setCode(sysCodeRuleService.getNewCode(map)); |
| | | // Boolean result = configAuditReportService.save(configAuditDto); |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("修改") |
| | | @LogOperation("修改") |
| | | public Result update(@RequestBody ConfigAuditReport configAuditReport){ |
| | | public Result update(@RequestBody ConfigAuditDto configAuditDto){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(configAuditReport, UpdateGroup.class, DefaultGroup.class); |
| | | configAuditReportService.update(configAuditReport); |
| | | ValidatorUtils.validateEntity(configAuditDto, UpdateGroup.class, DefaultGroup.class); |
| | | // Boolean result = configAuditReportService.save(configAuditDto); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | |
| | | @DeleteMapping("deleteConfigAudit") |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | configAuditReportService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
New file |
| | |
| | | package com.zt.life.modules.configAuditReport.dto; |
| | | |
| | | import com.zt.life.modules.configAuditReport.model.ConfigAuditReport; |
| | | import com.zt.life.modules.configAuditReport.model.ConfigAuditReportContent; |
| | | import com.zt.life.modules.configAuditReport.model.ConfigAuditReportProblem; |
| | | import com.zt.life.modules.configItemWarehouse.model.ConfigItemWarehouse; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseCmAudit; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseQaAudit; |
| | | import com.zt.life.modules.project.model.Project; |
| | | import com.zt.modules.workflow.dto.FlowInfoDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ConfigAuditDto { |
| | | private Long id; |
| | | private Long projectId; |
| | | private Long reportId; |
| | | |
| | | @ApiModelProperty(value = "配置审核报告") |
| | | private ConfigAuditReport auditReport; |
| | | @ApiModelProperty(value = "测试项目基本信息") |
| | | private Project project; |
| | | |
| | | |
| | | private FlowInfoDto flowInfoDto; |
| | | |
| | | @ApiModelProperty(value = "审核内容") |
| | | private List<ConfigAuditReportContent> contentList = new ArrayList<>(); |
| | | @ApiModelProperty(value = "发现的问题") |
| | | private List<ConfigAuditReportProblem> problemList = new ArrayList<>(); |
| | | |
| | | } |
| | | |
| | |
| | | package com.zt.life.modules.configAuditReport.service; |
| | | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.common.utils.CommonUtils; |
| | | import com.zt.life.export.service.WordFileService; |
| | | import com.zt.life.modules.configAuditReport.dao.ConfigAuditReportDao; |
| | | import com.zt.life.modules.configAuditReport.dto.ConfigAuditDto; |
| | | import com.zt.life.modules.configAuditReport.model.ConfigAuditReport; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseCmAudit; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseQaAudit; |
| | | import com.zt.life.modules.configItemWarehouse.service.WarehouseCmAuditService; |
| | | import com.zt.life.modules.configItemWarehouse.service.WarehouseConfigItemService; |
| | | import com.zt.life.modules.configItemWarehouse.service.WarehouseQaAuditService; |
| | | import com.zt.life.modules.mainPart.utils.GetFilesPath; |
| | | import com.zt.life.modules.mainPart.utils.GetShowDictList; |
| | | import com.zt.life.modules.project.service.ProjectService; |
| | | import com.zt.life.modules.testCheckOrder.model.TestCheckOrder; |
| | | import com.zt.life.modules.testCheckOrder.service.TestCheckOrderService; |
| | | import com.zt.life.sys.service.SysOssConfigService; |
| | | import com.zt.modules.coderule.service.SysCodeRuleService; |
| | | import com.zt.modules.oss.service.SysOssService; |
| | | import com.zt.modules.workflow.dto.FlowInfoDto; |
| | | import com.zt.modules.workflow.service.WorkflowService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | public class ConfigAuditReportService extends BaseService<ConfigAuditReportDao, ConfigAuditReport> { |
| | | @Autowired |
| | | private SysOssConfigService sysOssConfigService; |
| | | |
| | | @Autowired |
| | | private SysOssService sysOssService; |
| | | |
| | | @Autowired |
| | | private SysCodeRuleService sysCodeRuleService; |
| | | |
| | | @Autowired |
| | | private ProjectService projectService; |
| | | |
| | | @Autowired |
| | | private GetShowDictList getShowDictList; |
| | | |
| | | @Autowired |
| | | private WordFileService wordFileService; |
| | | |
| | | @Autowired |
| | | private GetFilesPath getFilesPath; |
| | | /** |
| | | * 分页查询 |
| | | * |
| | |
| | | public void delete(Long[] ids) { |
| | | super.deleteLogic(ids); |
| | | } |
| | | /* |
| | | public ConfigAuditDto getDto(Long projectId, Long reportId) { |
| | | |
| | | } |
| | | |
| | | public Boolean save(ConfigAuditDto configAuditDto) { |
| | | Long warehouseId = configItemDto.getConfigItemWarehouse().getId(); |
| | | if (warehouseId != null) |
| | | baseDao.updateById(configItemDto.getConfigItemWarehouse()); |
| | | else { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("funCode", "config_item_warehouse"); |
| | | map.put("projectId", configItemDto.getProjectId().toString()); |
| | | configItemDto.getConfigItemWarehouse().setProjectId(configItemDto.getProjectId()); |
| | | configItemDto.getConfigItemWarehouse().setCode(sysCodeRuleService.getNewCode(map)); |
| | | baseDao.insert(configItemDto.getConfigItemWarehouse()); |
| | | warehouseId = configItemDto.getConfigItemWarehouse().getId(); |
| | | } |
| | | |
| | | for (WarehouseConfigItem configItem : configItemDto.getConfigItemList()) { |
| | | configItem.setWarehouseId(warehouseId); |
| | | if (configItem.getId() != null) { |
| | | WarehouseConfigItem configItem2 = configItemService.get(configItem.getId()); |
| | | if (CommonUtils.isActureChangeData(configItem,configItem2)) { |
| | | configItemService.update(configItem); |
| | | } |
| | | if(CommonUtils.isActureChangeData(configItemDto.getConfigItemWarehouse().getLibraryType(),configItem.getLibraryType())){ |
| | | configItem.setLibraryType(configItemDto.getConfigItemWarehouse().getLibraryType()); |
| | | configItemService.update(configItem); |
| | | } |
| | | } else { |
| | | Map<String, String> map = new HashMap<>(); |
| | | String pageCode = configItem.getPageCode(); |
| | | if (StringUtils.isNotBlank(pageCode) && "plan,explain,record,report".contains(pageCode)) { |
| | | map.put("funCode", "test_" + pageCode); |
| | | configItem.setItemIdentify(sysCodeRuleService.getNewCode(map)); |
| | | } |
| | | configItem.setLibraryType(configItemDto.getConfigItemWarehouse().getLibraryType()); |
| | | configItem.setWarehouseId(warehouseId); |
| | | configItem.setProjectId(configItemDto.getConfigItemWarehouse().getProjectId()); |
| | | configItemService.insert(configItem); |
| | | } |
| | | Long checkId = configItem.getCheckId(); |
| | | if (checkId != null) { |
| | | TestCheckOrder testCheckOrder = testCheckOrderService.get(checkId); |
| | | if (testCheckOrder.getConfigItemId() == null) { |
| | | Long configItemId = configItem.getId(); |
| | | testCheckOrder.setConfigItemId(configItemId); |
| | | testCheckOrder.setConfigOrderId(warehouseId); |
| | | testCheckOrderService.update(testCheckOrder); |
| | | } |
| | | } |
| | | sysOssConfigService.updateOss(configItem.getId(), configItem.getFiles());// 保存附件 |
| | | } |
| | | |
| | | for (WarehouseCmAudit cmAudit : configItemDto.getCmAuditList()) { |
| | | cmAudit.setWarehouseId(warehouseId); |
| | | if (cmAudit.getId() != null) { |
| | | cmAuditService.update(cmAudit); |
| | | } else { |
| | | cmAudit.setWarehouseId(warehouseId); |
| | | cmAuditService.insert(cmAudit); |
| | | } |
| | | } |
| | | |
| | | for (WarehouseQaAudit qaAudit : configItemDto.getQaAuditList()) { |
| | | qaAudit.setWarehouseId(warehouseId); |
| | | if (qaAudit.getId() != null) { |
| | | qaAuditService.update(qaAudit); |
| | | } else { |
| | | qaAudit.setWarehouseId(warehouseId); |
| | | qaAuditService.insert(qaAudit); |
| | | } |
| | | } |
| | | |
| | | Long bizId = configItemDto.getConfigItemWarehouse().getId(); |
| | | FlowInfoDto flowInfoDto = configItemDto.getFlowInfoDto(); |
| | | |
| | | if (flowInfoDto != null && flowInfoDto.getSubmitType() != null && "tj,bl".contains(flowInfoDto.getSubmitType())) { |
| | | if ("tj".equals(flowInfoDto.getSubmitType())) { |
| | | workflowService.startFlow(flowInfoDto.getFlowCode(), bizId); |
| | | } |
| | | workflowService.approvePass(flowInfoDto.getFlowCode(), bizId, flowInfoDto.getStepIdMark()); |
| | | } |
| | | return true; |
| | | }*/ |
| | | } |
| | |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | configItemChangeService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | |
| | | configItemDto.getConfigItemChange().setCode(sysCodeRuleService.getNewCode(map)); |
| | | baseDao.insert(configItemDto.getConfigItemChange()); |
| | | changeId = configItemDto.getConfigItemChange().getId(); |
| | | |
| | | } |
| | | |
| | | for (WarehouseConfigItem configItem : configItemDto.getConfigChangeList()) { |
| | |
| | | /** |
| | | * config_item_warehouse |
| | | * |
| | | * @author zt generator |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-11-27 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/configItemWarehouse/ConfigItemWarehouse/") |
| | | @Api(tags="config_item_warehouse") |
| | | @Api(tags = "config_item_warehouse") |
| | | public class ConfigItemWarehouseController { |
| | | @Autowired |
| | | private ConfigItemWarehouseService configItemWarehouseService; |
| | |
| | | |
| | | @Autowired |
| | | private SysOssConfigService sysOssConfigService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "code", value = "配置项入库编号", dataType = Constant.QT.STRING, format = "a.code^LK"), |
| | | @ApiImplicitParam(name = "projectCode", value = "项目编号", dataType = Constant.QT.STRING, format = "p.code^EQ"), |
| | | @ApiImplicitParam(name = "softwareName", value = "项目名称", dataType = Constant.QT.STRING, format = "p.software_name^EQ"), |
| | | @ApiImplicitParam(name = "libraryType", value = "库类型", dataType = Constant.QT.STRING, format = "a.library_type^EQ") }) |
| | | public PageResult<ConfigItemWarehouse> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | List<ConfigItemWarehouse> configItemWarehouse=configItemWarehouseService.page(queryFilter); |
| | | @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "code", value = "配置项入库编号", dataType = Constant.QT.STRING, format = "a.code^LK"), |
| | | @ApiImplicitParam(name = "projectCode", value = "项目编号", dataType = Constant.QT.STRING, format = "p.code^EQ"), |
| | | @ApiImplicitParam(name = "softwareName", value = "项目名称", dataType = Constant.QT.STRING, format = "p.software_name^EQ"), |
| | | @ApiImplicitParam(name = "libraryType", value = "库类型", dataType = Constant.QT.STRING, format = "a.library_type^EQ")}) |
| | | public PageResult<ConfigItemWarehouse> page(@ApiIgnore @QueryParam QueryFilter queryFilter) { |
| | | List<ConfigItemWarehouse> configItemWarehouse = configItemWarehouseService.page(queryFilter); |
| | | return PageResult.ok(configItemWarehouse); |
| | | } |
| | | |
| | | @GetMapping("getDto") |
| | | @ApiOperation("信息") |
| | | public Result<ConfigItemWarehouseDto> getDto(Long projectId, Long warehouseId) { |
| | | ConfigItemWarehouseDto data =configItemWarehouseService.getDto(projectId, warehouseId); |
| | | if (warehouseId!=null) { |
| | | for (WarehouseConfigItem configItem : data.getConfigItemList()) { |
| | | public Result<ConfigItemWarehouseDto> getDto(Long projectId, Long warehouseId, String libraryType) { |
| | | ConfigItemWarehouseDto data = configItemWarehouseService.getDto(projectId, warehouseId, libraryType); |
| | | if (warehouseId != null) { |
| | | for (WarehouseConfigItem configItem : data.getConfigItemList()) { |
| | | Long configItemId = configItem.getId(); |
| | | OssDto ossDto = sysOssConfigService.getOssByBusiType(configItemId, "config_item_warehouse"); |
| | | if (ossDto != null) { |
| | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | | @LogOperation("新增") |
| | | public Result insert(@RequestBody ConfigItemWarehouseDto configItemDto){ |
| | | public Result insert(@RequestBody ConfigItemWarehouseDto configItemDto) { |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(configItemDto, AddGroup.class, DefaultGroup.class); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("funCode", "config_item_warehouse"); |
| | | map.put("projectId",configItemDto.getProjectId().toString()); |
| | | map.put("projectId", configItemDto.getProjectId().toString()); |
| | | configItemDto.getConfigItemWarehouse().setCode(sysCodeRuleService.getNewCode(map)); |
| | | Boolean result = configItemWarehouseService.save(configItemDto); |
| | | return Result.ok(); |
| | |
| | | @PutMapping |
| | | @ApiOperation("修改") |
| | | @LogOperation("修改") |
| | | public Result update(@RequestBody ConfigItemWarehouseDto configItemDto){ |
| | | public Result update(@RequestBody ConfigItemWarehouseDto configItemDto) { |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(configItemDto, UpdateGroup.class, DefaultGroup.class); |
| | | Boolean result = configItemWarehouseService.save(configItemDto); |
| | |
| | | @DeleteMapping("deleteConfigItem") |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | | public Result delete(@RequestBody Long[] ids) { |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | configItemWarehouseService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @GetMapping("exportWarehouseOrder") |
| | | @ApiOperation("打印入库申请单") |
| | | @LogOperation("打印入库申请单") |
| | | public void exportWarehouseOrder(Long id,HttpServletRequest request, HttpServletResponse response) { |
| | | configItemWarehouseService.exportWarehouseOrder(id,request, response); |
| | | public void exportWarehouseOrder(Long id, HttpServletRequest request, HttpServletResponse response,String libraryType) { |
| | | configItemWarehouseService.exportWarehouseOrder(id, request, response,libraryType); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zt.life.modules.configItemWarehouse.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.core.sys.dto.DictIstance; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | |
| | | |
| | | List<WarehouseConfigItem> getList(Map<String, Object> params); |
| | | |
| | | List<WarehouseConfigItem> itemList(Long projectId); |
| | | List<WarehouseConfigItem> itemList(Long projectId,String ids); |
| | | |
| | | List<WarehouseConfigItem> selectList(Long projectId,String ids,String type); |
| | | } |
| | |
| | | @ApiModelProperty(value = "项目工程ID") |
| | | private Long projectId; |
| | | |
| | | @ApiModelProperty(value = "来源记录ID") |
| | | private Long srcId; |
| | | |
| | | @ApiModelProperty(value = "检查单ID") |
| | | private Long checkId; |
| | | |
| | |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseCmAudit; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseQaAudit; |
| | | import com.zt.life.modules.itemCirculatOrder.dto.ItemCirculatOrderDto; |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrder; |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrderTechnical; |
| | | import com.zt.life.modules.itemCirculatOrder.service.ItemCirculatOrderTechnicalService; |
| | | import com.zt.life.modules.mainPart.utils.GetFilesPath; |
| | | import com.zt.life.modules.mainPart.utils.GetShowDictList; |
| | | import com.zt.life.modules.project.model.SoftwareTestOrderDeliverable; |
| | | import com.zt.life.modules.project.model.SoftwareTestOrderMeasured; |
| | | import com.zt.life.modules.project.service.ProjectService; |
| | | import com.zt.life.modules.sysBaseInfo.service.TestAgencyInfoService; |
| | | import com.zt.life.modules.testCheckOrder.model.TestCheckOrder; |
| | | import com.zt.life.modules.testCheckOrder.service.TestCheckOrderService; |
| | | import com.zt.life.sys.service.SysOssConfigService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private GetFilesPath getFilesPath; |
| | | |
| | | @Autowired |
| | | private ItemCirculatOrderTechnicalService technicalService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | |
| | | * @return |
| | | */ |
| | | public List<ConfigItemWarehouse> page(QueryFilter queryFilter) { |
| | | List<ConfigItemWarehouse> list= baseDao.getList(queryFilter.getQueryParams()); |
| | | List<ConfigItemWarehouse> list = baseDao.getList(queryFilter.getQueryParams()); |
| | | if (list.size() > 0) { |
| | | workflowService.getRunFlow(list, "pzxrk"); |
| | | } |
| | |
| | | |
| | | for (WarehouseConfigItem configItem : configItemDto.getConfigItemList()) { |
| | | configItem.setWarehouseId(warehouseId); |
| | | if (configItem.getId() != null) { |
| | | WarehouseConfigItem configItem2 = configItemService.get(configItem.getId()); |
| | | if (CommonUtils.isActureChangeData(configItem,configItem2)) { |
| | | configItemService.update(configItem); |
| | | } |
| | | if(CommonUtils.isActureChangeData(configItemDto.getConfigItemWarehouse().getLibraryType(),configItem.getLibraryType())){ |
| | | if (configItem.getItemName() != null) { |
| | | if (configItem.getId() != null) { |
| | | WarehouseConfigItem configItem2 = configItemService.get(configItem.getId()); |
| | | if (CommonUtils.isActureChangeData(configItem, configItem2)) { |
| | | configItemService.update(configItem); |
| | | } |
| | | if (CommonUtils.isActureChangeData(configItemDto.getConfigItemWarehouse().getLibraryType(), configItem.getLibraryType())) { |
| | | configItem.setLibraryType(configItemDto.getConfigItemWarehouse().getLibraryType()); |
| | | configItemService.update(configItem); |
| | | } |
| | | } else { |
| | | Map<String, String> map = new HashMap<>(); |
| | | String pageCode = configItem.getPageCode(); |
| | | if (StringUtils.isNotBlank(pageCode) && "plan,explain,record,report".contains(pageCode)) { |
| | | map.put("funCode", "test_" + pageCode); |
| | | configItem.setItemIdentify(sysCodeRuleService.getNewCode(map)); |
| | | } |
| | | configItem.setLibraryType(configItemDto.getConfigItemWarehouse().getLibraryType()); |
| | | configItemService.update(configItem); |
| | | configItem.setWarehouseId(warehouseId); |
| | | configItem.setProjectId(configItemDto.getConfigItemWarehouse().getProjectId()); |
| | | configItemService.insert(configItem); |
| | | } |
| | | } else { |
| | | Map<String, String> map = new HashMap<>(); |
| | | String pageCode = configItem.getPageCode(); |
| | | if (StringUtils.isNotBlank(pageCode) && "plan,explain,record,report".contains(pageCode)) { |
| | | map.put("funCode", "test_" + pageCode); |
| | | configItem.setItemIdentify(sysCodeRuleService.getNewCode(map)); |
| | | Long checkId = configItem.getCheckId(); |
| | | if (checkId != null) { |
| | | TestCheckOrder testCheckOrder = testCheckOrderService.get(checkId); |
| | | if (testCheckOrder.getConfigItemId() == null) { |
| | | Long configItemId = configItem.getId(); |
| | | testCheckOrder.setConfigItemId(configItemId); |
| | | testCheckOrder.setConfigOrderId(warehouseId); |
| | | testCheckOrderService.update(testCheckOrder); |
| | | } |
| | | } |
| | | configItem.setLibraryType(configItemDto.getConfigItemWarehouse().getLibraryType()); |
| | | configItem.setWarehouseId(warehouseId); |
| | | configItem.setProjectId(configItemDto.getConfigItemWarehouse().getProjectId()); |
| | | configItemService.insert(configItem); |
| | | sysOssConfigService.updateOss(configItem.getId(), configItem.getFiles());// 保存附件 |
| | | } |
| | | Long checkId = configItem.getCheckId(); |
| | | if (checkId != null) { |
| | | TestCheckOrder testCheckOrder = testCheckOrderService.get(checkId); |
| | | if (testCheckOrder.getConfigItemId() == null) { |
| | | Long configItemId = configItem.getId(); |
| | | testCheckOrder.setConfigItemId(configItemId); |
| | | testCheckOrder.setConfigOrderId(warehouseId); |
| | | testCheckOrderService.update(testCheckOrder); |
| | | } |
| | | } |
| | | sysOssConfigService.updateOss(configItem.getId(), configItem.getFiles());// 保存附件 |
| | | } |
| | | |
| | | for (WarehouseCmAudit cmAudit : configItemDto.getCmAuditList()) { |
| | |
| | | return true; |
| | | } |
| | | |
| | | public ConfigItemWarehouseDto getDto(Long projectId, Long warehouseId) { |
| | | public ConfigItemWarehouseDto getDto(Long projectId, Long warehouseId, String libraryType) { |
| | | ConfigItemWarehouseDto data = new ConfigItemWarehouseDto(); |
| | | if (warehouseId != null) { |
| | | data.setId(warehouseId); |
| | | ConfigItemWarehouse configItemWarehouse = this.get(warehouseId); |
| | | data.setConfigItemWarehouse(configItemWarehouse); |
| | | |
| | | if (projectId == null) { |
| | | if (configItemWarehouse != null && projectId == null) { |
| | | projectId = configItemWarehouse.getProjectId(); |
| | | } |
| | | List<WarehouseCmAudit> CmAuditList = cmAuditService.getList(warehouseId); |
| | |
| | | |
| | | } else { |
| | | ConfigItemWarehouse configItemWarehouse = new ConfigItemWarehouse(); |
| | | configItemWarehouse.setLibraryType(libraryType); |
| | | data.setConfigItemWarehouse(configItemWarehouse); |
| | | List<?> cmList = baseDao.itemList("warehouse_cm_audit"); |
| | | List<?> CmAuditList = cmList; |
| | |
| | | List<?> qaList = baseDao.itemList("warehouse_qa_audit"); |
| | | List<?> QaAuditList = qaList; |
| | | data.setQaAuditList((List<WarehouseQaAudit>) QaAuditList); |
| | | List<?> resultList = configItemService.ConfigItemList(projectId); |
| | | List<?> resultList = new ArrayList<>(); |
| | | if ("1".equals(libraryType)) { |
| | | List<String> srcId = technicalService.getsrcId(projectId); |
| | | /* String ids = String.join(", ", srcId.stream() |
| | | .map(id -> "\"" + id + "\"") |
| | | .collect(Collectors.toList()));*/ |
| | | String ids = String.join(", ", srcId); |
| | | resultList = configItemService.ConfigItemList(projectId, ids); |
| | | } |
| | | List<?> ConfigItemList = resultList; |
| | | data.setConfigItemList((List<WarehouseConfigItem>) ConfigItemList); |
| | | } |
| | |
| | | return data; |
| | | } |
| | | |
| | | public void exportWarehouseOrder(Long id, HttpServletRequest request, HttpServletResponse response) { |
| | | public void exportWarehouseOrder(Long id, HttpServletRequest request, HttpServletResponse response, String libraryType) { |
| | | try { |
| | | ConfigItemWarehouseDto dataObj = this.getDto(null, id); |
| | | ConfigItemWarehouseDto dataObj = this.getDto(null, id, libraryType); |
| | | |
| | | String qaAuditorPath = "文件图片:"+ getFilesPath.getSignPath(Convert.toLong(dataObj.getConfigItemWarehouse().getQaAuditorId())); |
| | | String qaAuditorPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getConfigItemWarehouse().getQaAuditorId())); |
| | | dataObj.getConfigItemWarehouse().setQaAuditor(qaAuditorPath); |
| | | String cmAuditorPath = "文件图片:"+getFilesPath.getSignPath(Convert.toLong(dataObj.getConfigItemWarehouse().getCmAuditorId())); |
| | | String cmAuditorPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getConfigItemWarehouse().getCmAuditorId())); |
| | | dataObj.getConfigItemWarehouse().setCmAuditor(cmAuditorPath); |
| | | String approvalSignPath = "文件图片:"+getFilesPath.getSignPath(Convert.toLong(dataObj.getConfigItemWarehouse().getApprovalId())); |
| | | String approvalSignPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getConfigItemWarehouse().getApprovalId())); |
| | | dataObj.getConfigItemWarehouse().setApprovalSign(approvalSignPath); |
| | | String operatorPath = "文件图片:"+getFilesPath.getSignPath(Convert.toLong(dataObj.getConfigItemWarehouse().getOperatorId())); |
| | | String operatorPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getConfigItemWarehouse().getOperatorId())); |
| | | dataObj.getConfigItemWarehouse().setOperator(operatorPath); |
| | | //通用字典列表字符串生成 |
| | | String libraryTypeStr = getShowDictList.getShowDictList(dataObj.getConfigItemWarehouse().getLibraryType(), "library_type", false); |
| | |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrderTechnical; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | /** |
| | | * warehouse_config_item |
| | | * |
| | | * @author zt generator |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-11-27 |
| | | */ |
| | | @Service |
| | | public class WarehouseConfigItemService extends BaseService<WarehouseConfigItemDao, WarehouseConfigItem> { |
| | | public class WarehouseConfigItemService extends BaseService<WarehouseConfigItemDao, WarehouseConfigItem> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | |
| | | |
| | | public List<WarehouseConfigItem> getList(Long warehouseId) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("warehouseId",warehouseId); |
| | | params.put("warehouseId", warehouseId); |
| | | return baseDao.getList(params); |
| | | } |
| | | |
| | | public List<WarehouseConfigItem> ConfigItemList(Long projectId) { |
| | | return baseDao.itemList(projectId); |
| | | public List<WarehouseConfigItem> ConfigItemList(Long projectId,String ids) { |
| | | return baseDao.itemList(projectId,ids); |
| | | } |
| | | |
| | | public List<WarehouseConfigItem> warehouseConfigList(Long projectId,String ids,String type) { |
| | | return baseDao.selectList(projectId,ids,type); |
| | | public List<WarehouseConfigItem> warehouseConfigList(Long projectId, String ids, String type) { |
| | | return baseDao.selectList(projectId, ids, type); |
| | | } |
| | | } |
| | |
| | | @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "reviewType", value = "评审阶段", dataType = Constant.QT.STRING, format = "a.review_phase^EQ"), |
| | | @ApiImplicitParam(name = "reviewType", value = "评审阶段", dataType = Constant.QT.STRING, format = "a.review_type^EQ"), |
| | | @ApiImplicitParam(name = "orderCode", value = "委托单编号", dataType = Constant.QT.STRING, format = "s.code^EQ"), |
| | | }) |
| | | public PageResult<ContractReview> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "code", value = "物品流转单编号", dataType = Constant.QT.STRING, format = "a.code^LK"), |
| | | @ApiImplicitParam(name = "softwareName", value = "物品名称", dataType = Constant.QT.STRING, format = "p.software_name^EQ"), |
| | | @ApiImplicitParam(name = "softwareIdentity", value = "物品编号", dataType = Constant.QT.STRING, format = "p.software_identity^EQ") |
| | | @ApiImplicitParam(name = "softwareName", value = "物品名称", dataType = Constant.QT.STRING, format = "p.software_name^LK"), |
| | | @ApiImplicitParam(name = "softwareIdentity", value = "物品编号", dataType = Constant.QT.STRING, format = "p.software_identity^LK") |
| | | }) |
| | | public PageResult<ItemCirculatOrder> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | |
| | |
| | | List<ItemCirculatOrderTechnical> getList(Map<String, Object> params); |
| | | List<DictIstance> itemList(Long projectId); |
| | | |
| | | List<String> getsrcId(Long projectId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public List<ItemCirculatOrder> page(QueryFilter queryFilter) { |
| | | List<ItemCirculatOrder> list= baseDao.getList(queryFilter.getQueryParams()); |
| | | List<ItemCirculatOrder> list = baseDao.getList(queryFilter.getQueryParams()); |
| | | if (list.size() > 0) { |
| | | workflowService.getRunFlow(list, "wplz"); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /**yi |
| | | /** |
| | | * yi |
| | | * 删除 |
| | | * |
| | | * @param ids |
| | |
| | | } |
| | | |
| | | for (ItemCirculatOrderTechnical circulatOrderTechnical : itemCirculatOrderDto.getTechnicalList()) { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderId); |
| | | if (circulatOrderTechnical.getId() != null) { |
| | | technicalService.update(circulatOrderTechnical); |
| | | } else { |
| | | if (circulatOrderTechnical.getName() != null) { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderId); |
| | | technicalService.insert(circulatOrderTechnical); |
| | | if (circulatOrderTechnical.getId() != null) { |
| | | technicalService.update(circulatOrderTechnical); |
| | | } else { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderId); |
| | | technicalService.insert(circulatOrderTechnical); |
| | | } |
| | | sysOssConfigService.updateOss(circulatOrderTechnical.getId(), circulatOrderTechnical.getFiles());// 保存附件 |
| | | } |
| | | sysOssConfigService.updateOss(circulatOrderTechnical.getId(), circulatOrderTechnical.getFiles());// 保存附件 |
| | | } |
| | | |
| | | if (itemCirculatOrderDto.getTestAgencyInfo().getId() == 10000) { |
| | |
| | | try { |
| | | ItemCirculatOrderDto dataObj = this.getDto(null, id); |
| | | |
| | | String acceptorPath = "文件图片:"+ getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getItemAcceptorId())); |
| | | String acceptorPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getItemAcceptorId())); |
| | | dataObj.getCirculatOrder().setItemAcceptor(acceptorPath); |
| | | String detectorPath = "文件图片:"+getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getCalibratDetectorId())); |
| | | String detectorPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getCalibratDetectorId())); |
| | | dataObj.getCirculatOrder().setCalibratDetector(detectorPath); |
| | | String issuerPath = "文件图片:"+getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getItemIssuerId())); |
| | | String issuerPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getItemIssuerId())); |
| | | dataObj.getCirculatOrder().setItemIssuer(issuerPath); |
| | | //通用字典列表字符串生成 |
| | | String itemRequireStr = getShowDictList.getShowDictList(dataObj.getCirculatOrder().getItemRequire(), "is_or_not", false); |
| | |
| | | return baseDao.itemList(projectId); |
| | | } |
| | | |
| | | public List<String> getsrcId(Long projectId) { |
| | | return baseDao.getsrcId(projectId); |
| | | } |
| | | } |
| | |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "code", value = "编号", dataType = Constant.QT.STRING, format = "a.CODE^LK"), |
| | | @ApiImplicitParam(name = "softwareName", value = "软件名称", dataType = Constant.QT.STRING, format = "p.software_name^EQ"),}) |
| | | @ApiImplicitParam(name = "softwareName", value = "软件名称", dataType = Constant.QT.STRING, format = "p.software_name^LK"),}) |
| | | public PageResult<Environ> page(@ApiIgnore @QueryParam QueryFilter queryFilter) { |
| | | |
| | | return PageResult.ok(environService.page(queryFilter)); |
| | |
| | | @ApiImplicitParam(name = "pageCode", value = "页面标识", dataType = Constant.QT.STRING), |
| | | }) |
| | | public PageResult<Project> page(@ApiIgnore @QueryParam QueryFilter queryFilter) { |
| | | if (queryFilter.getParams().containsValue("baseline_release")||queryFilter.getParams().containsValue("config_item_warehouse")){ |
| | | queryFilter.getParams().replace("tableName",""); |
| | | } |
| | | List<Project> Project =projectService.page(queryFilter); |
| | | return PageResult.ok(Project); |
| | | } |
| | |
| | | dataObj.getSoftwareTestOrder().setTestLevelStr(testLevelStr); |
| | | |
| | | String test = dataObj.getSoftwareTestOrder().getOtherRequire(); |
| | | String otherRequireStr = getShowDictList.getShowDictList(test, "other_require", false); |
| | | String otherRequireStr = getShowDictList.getShowDictList(test, "is_or_not", false); |
| | | dataObj.getSoftwareTestOrder().setOtherRequireStr(otherRequireStr); |
| | | |
| | | String articleNatureStr = getShowDictList.getShowDictList(dataObj.getSoftwareTestOrder().getArticleNature(), "article_nature", false); |
| | |
| | | <mapper namespace="com.zt.life.modules.configItemChange.dao.ConfigItemChangeDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.configItemChange.model.ConfigItemChange"> |
| | | select a.* ,p.software_name,p.CODE AS projectCode |
| | | select a.* ,p.software_name,p.code AS projectCode |
| | | from config_item_change a |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | <where> |
| | |
| | | SELECT dd.dict_label AS examineItem, |
| | | (@row_number := @row_number + 1) AS no |
| | | FROM sys_dict_type dt |
| | | JOIN sys_dict_data dd ON dt.ID = dd.DICT_TYPE_ID |
| | | JOIN sys_dict_data dd ON dt.id = dd.dict_type_id |
| | | <where> |
| | | dd.IS_DELETE = 0 |
| | | dd.is_delete = 0 |
| | | <if test="dictType != null and dictType != ''"> |
| | | and dt.DICT_TYPE = #{dictType} |
| | | </if> |
| | |
| | | <mapper namespace="com.zt.life.modules.configItemOutbound.dao.ConfigItemOutboundDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.configItemOutbound.model.ConfigItemOutbound"> |
| | | select a.* ,p.software_name,p.CODE AS projectCode |
| | | select a.* ,p.software_name,p.code AS projectCode |
| | | from config_item_outbound a |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | <where> |
| | |
| | | </if> |
| | | </select> |
| | | <select id="getFilesByBusiId" resultType="com.zt.modules.oss.model.SysOss"> |
| | | select b.* from config_item_outbound_detail a , sys_oss b where a.outbound_id= #{id} and a.IS_DELETE=0 and b.IS_DELETE=0 and |
| | | a.select_id=b.BUSI_ID and BUSI_TYPE='config_item_warehouse' |
| | | select b.* from config_item_outbound_detail a , sys_oss b where a.outbound_id= #{id} and a.is_delete=0 and b.is_delete=0 and |
| | | a.select_id=b.busi_id and busi_type='config_item_warehouse' |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="com.zt.life.modules.configItemWarehouse.dao.ConfigItemWarehouseDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.configItemWarehouse.model.ConfigItemWarehouse"> |
| | | select a.* ,p.software_name,p.CODE AS projectCode |
| | | select a.* ,p.software_name,p.code AS projectCode |
| | | from config_item_warehouse a |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | <where> |
| | |
| | | SELECT dd.dict_label AS examineItem, |
| | | (@row_number := @row_number + 1) AS no |
| | | FROM sys_dict_type dt |
| | | JOIN sys_dict_data dd ON dt.ID = dd.DICT_TYPE_ID |
| | | JOIN sys_dict_data dd ON dt.id = dd.dict_type_id |
| | | <where> |
| | | dd.IS_DELETE = 0 |
| | | dd.is_delete = 0 |
| | | <if test="dictType != null and dictType != ''"> |
| | | and dt.DICT_TYPE = #{dictType} |
| | | </if> |
| | |
| | | </select> |
| | | <select id="itemList" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem"> |
| | | SET @row_number = 0; |
| | | SELECT (@row_number := @row_number + 1) AS no, |
| | | p.secret_class, |
| | | SUBSTRING(t.name, LOCATE('软件', t.name), LENGTH(t.name)) AS itemName, |
| | | t.identify AS version, |
| | | t.name AS Item_identify |
| | | SELECT (@row_number := @row_number + 1) AS no, |
| | | p.secret_class, |
| | | SUBSTRING(t.name, LOCATE('软件', t.name), LENGTH(t.name)) AS itemName, |
| | | t.identify AS version, |
| | | t.name AS Item_identify, |
| | | t.id as src_id |
| | | FROM item_circulat_order_technical t |
| | | JOIN item_circulat_order i ON i.project_id = ${projectId} |
| | | JOIN project p ON p.id = ${projectId} |
| | | JOIN item_circulat_order i ON i.project_id = ${projectId} |
| | | JOIN project p ON p.id = ${projectId} |
| | | WHERE t.is_delete = 0 |
| | | AND i.id = t.circulat_order_id |
| | | AND i.id = t.circulat_order_id |
| | | <if test="ids!=null and ids!=''"> |
| | | AND t.id not in (${ids}) |
| | | </if> |
| | | UNION |
| | | SELECT (@row_number := @row_number + 1) AS no, |
| | | NULL AS secretClass, |
| | | '软件测试委托单' AS itemName, |
| | | NULL AS version, |
| | | s.code AS itemIdentify |
| | | NULL AS secretClass, |
| | | '软件测试委托单' AS itemName, |
| | | NULL AS version, |
| | | s.code AS itemIdentify, |
| | | s.id as src_id |
| | | FROM software_test_order s |
| | | WHERE s.is_delete = 0 |
| | | AND s.project_id = ${projectId} |
| | | AND s.project_id = ${projectId} |
| | | <if test="ids!=null and ids!=''"> |
| | | AND s.id not in (${ids}) |
| | | </if> |
| | | UNION |
| | | SELECT (@row_number := @row_number + 1) AS no, |
| | | NULL AS secretClass, |
| | | '物品流转单' AS itemName, |
| | | NULL AS version, |
| | | i.code AS itemIdentify |
| | | NULL AS secretClass, |
| | | '物品流转单' AS itemName, |
| | | NULL AS version, |
| | | i.code AS itemIdentify, |
| | | i.id as src_id |
| | | FROM item_circulat_order i |
| | | WHERE i.is_delete = 0 |
| | | AND i.project_id = ${projectId} |
| | | AND i.project_id = ${projectId} |
| | | <if test="ids!=null and ids!=''"> |
| | | AND i.id not in (${ids}) |
| | | </if> |
| | | </select> |
| | | <select id="selectList" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem"> |
| | | SET @row_number = 0; |
| | |
| | | SELECT dd.dict_label AS item, |
| | | (@row_number := @row_number + 1) AS no |
| | | FROM sys_dict_type dt |
| | | JOIN sys_dict_data dd ON dt.ID = dd.DICT_TYPE_ID |
| | | JOIN sys_dict_data dd ON dt.id = dd.dict_type_id |
| | | <where> |
| | | dd.IS_DELETE = 0 |
| | | dd.is_delete = 0 |
| | | <if test="dictType != null and dictType != ''"> |
| | | and dt.DICT_TYPE = #{dictType} |
| | | and dt.dict_type = #{dictType} |
| | | </if> |
| | | </where> |
| | | ORDER BY dd.sort |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getsrcId" resultType="java.lang.String"> |
| | | SELECT a.src_id |
| | | FROM config_item_warehouse_detail a |
| | | WHERE a.is_delete = 0 AND a.project_id = ${projectId} |
| | | </select> |
| | | </mapper> |
| | |
| | | a.biz_group_id, |
| | | a.opinion, |
| | | (case when status = 1 then '被驳回' else '' end) as statusName, |
| | | DateDiff(CURRENT_DATE,a.RECEIVE_TIME) as idleDays, |
| | | DateDiff(CURRENT_DATE,a.receive_time) as idleDays, |
| | | a.topic AS taskName, |
| | | a.step_name as taskType, |
| | | a.biz_id as id, |
| | | 0 as Product_id, |
| | | 0 as MAINTAIN_LEVEL, |
| | | 0 as YEAR, |
| | | a.RECEIVE_NAME as apply_user, |
| | | date_add(a.RECEIVE_TIME,interval 7 day) AS finishTime, |
| | | a.STEP_ID as APPROVE_STEP_ID, |
| | | a.STEP_MARKER, |
| | | a.FLOW_CODE, |
| | | a.APPLY_USER as taskPeople, |
| | | a.receive_name as apply_user, |
| | | date_add(a.receive_time,interval 7 day) AS finishTime, |
| | | a.step_id as APPROVE_STEP_ID, |
| | | a.step_marker, |
| | | a.flow_code, |
| | | a.apply_user as taskPeople, |
| | | 2 code, |
| | | a.title as summary, |
| | | b.STEP_ROUTER, |
| | | b.STEP_ROUTER_ID |
| | | FROM WF_RUN_TASK a |
| | | left join WF_DEF_STEP b on a.step_id = b.id |
| | | b.step_router, |
| | | b.step_router_id |
| | | FROM wf_run_task a |
| | | left join wf_def_step b on a.step_id = b.id |
| | | WHERE a.is_delete =0 and a.status in (0,1) |
| | | AND a.RECEIVE_ID = #{userId} |
| | | AND a.receive_id = #{userId} |
| | | <if test="projectId != null and projectId != ''"> |
| | | and a.biz_group_id = #{projectId} |
| | | </if> |
| | | <if test="djxlSystem != null and djxlSystem != ''"> |
| | | and a.FLOW_ID in (select id from wf_def where system_type = #{djxlSystem}) |
| | | and a.flow_id in (select id from wf_def where system_type = #{djxlSystem}) |
| | | </if> |
| | | ORDER BY a.receive_time DESC |
| | | </select> |
| | |
| | | a1.receive_time, |
| | | a1.finish_time as finish_time, |
| | | a1.status |
| | | FROM WF_RUN_TASK a1 |
| | | FROM wf_run_task a1 |
| | | WHERE a1.is_delete = 0 |
| | | and (a1.receive_id=#{userId} |
| | | or EXISTS(SELECT 1 FROM sys_role s1,sys_role_user s2 WHERE s1.ID = s2.role_id AND s2.USER_id = #{userId} AND |
| | | s2.is_delete=0 and s1.CODE in ('all','xtglybm'))) |
| | | or EXISTS(SELECT 1 FROM sys_role s1,sys_role_user s2 WHERE s1.id = s2.role_id AND s2.user_id = #{userId} AND |
| | | s2.is_delete=0 and s1.code in ('all','xtglybm'))) |
| | | <if test="djxlSystem != null and djxlSystem != ''"> |
| | | and a1.FLOW_ID in (select id from wf_def where system_type = #{djxlSystem}) |
| | | and a1.flow_id in (select id from wf_def where system_type = #{djxlSystem}) |
| | | </if> |
| | | |
| | | ) a2 |
| | |
| | | b1.receive_time, |
| | | b1.status |
| | | from ${pageDone_temp1} a1, |
| | | WF_RUN_TASK b1 |
| | | wf_run_task b1 |
| | | WHERE b1.is_delete = 0 |
| | | and b1.status in(0,1,100) |
| | | |
| | |
| | | a.biz_id, |
| | | a.flow_code, |
| | | a.biz_group_id, |
| | | c.STEP_READ_ROUTER_ID, |
| | | c.step_read_router_id, |
| | | a.sender_name, |
| | | a.finish_time, |
| | | b.prev_id, |
| | | b.step_marker, |
| | | b.step_name, |
| | | case when c.CAN_RECALL=1 and a.id=b.prev_id and c.step_no < d.step_no and d.step_no < 100 |
| | | case when c.can_recall=1 and a.id=b.prev_id and c.step_no < d.step_no and d.step_no < 100 |
| | | then 1 else 0 end as canRecall, |
| | | c.step_no as myStepNo, |
| | | d.step_no as curStepNo, |
| | |
| | | a.sender_name as finishUserName |
| | | FROM ${pageDone_temp1} a |
| | | join ${pageDone_temp2} b on a.biz_id = b.biz_id and a.flow_code = b.flow_code |
| | | left join WF_DEF_STEP c on a.step_id = c.id |
| | | left join WF_DEF_STEP d on b.step_id = d.id |
| | | left join wf_def_step c on a.step_id = c.id |
| | | left join wf_def_step d on b.step_id = d.id |
| | | group by a.biz_id,a.flow_code,a.step_id |
| | | ORDER BY a.receive_time DESC |
| | | </select> |
| | |
| | | SELECT |
| | | 0 as bizGroupId, |
| | | CONCAT(p.Name, '-', a.YEAR, '-', c.Dict_label ) AS topic, |
| | | case when a.CURRENT_STATE =1 then '助理修改计划' else '处长审批计划' end AS step_name, |
| | | case when a.CURRENT_STATE =1 then '驳回' else '' end AS statusName, |
| | | case when a.current_state =1 then '助理修改计划' else '处长审批计划' end AS step_name, |
| | | case when a.current_state =1 then '驳回' else '' end AS statusName, |
| | | a.id, |
| | | '80' STEP_ID, |
| | | case when a.CURRENT_STATE =1 then 'zl' else 'cz' end AS STEP_MARKER, |
| | | case when a.current_state =1 then 'zl' else 'cz' end AS STEP_MARKER, |
| | | 'yearPlan' as FLOW_CODE, |
| | | u.nick_name as APPLY_USER, |
| | | 2 as code, |
| | |
| | | a.create_date AS RECEIVE_TIME, |
| | | DateDiff(CURRENT_DATE,a.create_date) as idleDays |
| | | FROM |
| | | ZHGL_ANNUAL_PLAN a |
| | | zhgl_annual_plan a |
| | | LEFT JOIN view_zt_boat_tree p on concat(a.product_id) = p.product_id |
| | | LEFT JOIN SYS_DICT_DATA c ON a.maintain_level = c.Dict_Value |
| | | AND dict_type_id IN(SELECT id FROM SYS_DICT_TYPE WHERE DICT_TYPE = 'question_level_type') |
| | | LEFT JOIN SYS_USER u ON u.user_id = a.CREATOR |
| | | LEFT JOIN sys_dict_data c ON a.maintain_level = c.dict_value |
| | | AND dict_type_id IN(SELECT id FROM sys_dict_type WHERE dict_type = 'question_level_type') |
| | | LEFT JOIN sys_user u ON u.user_id = a.creator |
| | | WHERE a.is_delete = 0 |
| | | and ( |
| | | (CURRENT_STATE = 1 |
| | | (current_state = 1 |
| | | and EXISTS(SELECT 1 FROM sys_role s1,sys_role_user s2 |
| | | WHERE s1.ID = s2.role_id AND s2.USER_id = #{userId} AND |
| | | WHERE s1.id = s2.role_id AND s2.user_id = #{userId} AND |
| | | s2.is_delete=0 and s1.CODE = 'zlbm') |
| | | ) or ( |
| | | CURRENT_STATE = '5' |
| | | current_state = '5' |
| | | and EXISTS(SELECT 1 FROM sys_role s1,sys_role_user s2 |
| | | WHERE s1.ID = s2.role_id AND s2.USER_id = #{userId} AND |
| | | WHERE s1.id = s2.role_id AND s2.user_id = #{userId} AND |
| | | s2.is_delete=0 and s1.CODE = 'czbm') |
| | | ) |
| | | ) |
| | | order by a.update_date desc limit 0,1 |
| | | </select> |
| | | |
| | | <select id="pageDone2" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | select *, |
| | | case |
| | | when STEP_MARKER = 'zl' then '处长审核' |
| | | when STEP_MARKER = 'cz' then '助理编报' |
| | | else '处长审核' end as finishStepName, |
| | | case |
| | | when STEP_MARKER = 'zl' then '处长' |
| | | when STEP_MARKER = 'cz' then '助理' |
| | | else '处长' end as finishUserName |
| | | from ( |
| | | SELECT 0 as bizGroupId, |
| | | CONCAT(p.Name, '-', a.YEAR, '-', c.Dict_label) AS topic, |
| | | case |
| | | when a.CURRENT_STATE = 1 then '助理修改计划' |
| | | when a.CURRENT_STATE = 5 then '处长审批计划' |
| | | else '完成' end AS step_name, |
| | | case when a.CURRENT_STATE = 1 then '驳回' else '' end AS statusName, |
| | | a.id, |
| | | '90' as STEP_ID, |
| | | case |
| | | when a.CURRENT_STATE = 1 then 'zl' |
| | | when a.CURRENT_STATE = 5 then 'cz' |
| | | else 'wc' end as STEP_MARKER, |
| | | a.id as bizId, |
| | | 'yearPlan2' as FLOW_CODE, |
| | | u.nick_name as APPLY_USER, |
| | | 2 as code, |
| | | '年度修理计划' as title, |
| | | '年度修理计划' as remark, |
| | | a.UPDATE_DATE AS RECEIVE_TIME, |
| | | case |
| | | when a.CURRENT_STATE = 1 then '助理' |
| | | when a.CURRENT_STATE = 5 then '处长' |
| | | else '' end AS receiveName, |
| | | DateDiff(CURRENT_DATE, a.create_date) as idleDays |
| | | FROM ZHGL_ANNUAL_PLAN a |
| | | LEFT JOIN view_zt_boat_tree p on concat(a.product_id) = p.product_id |
| | | LEFT JOIN SYS_DICT_DATA c ON a.maintain_level = c.Dict_Value |
| | | AND dict_type_id IN (SELECT id FROM SYS_DICT_TYPE WHERE DICT_TYPE = 'question_level_type') |
| | | LEFT JOIN SYS_USER u ON u.user_id = a.UPDATER |
| | | WHERE a.is_delete = 0 |
| | | and ( |
| | | (CURRENT_STATE in (1, 10) |
| | | and EXISTS(SELECT 1 |
| | | FROM sys_role s1, |
| | | sys_role_user s2 |
| | | WHERE s2.IS_DELETE = 0 |
| | | and s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'czbm') |
| | | ) |
| | | or ( |
| | | CURRENT_STATE in (5, 10) |
| | | and EXISTS(SELECT 1 |
| | | FROM sys_role s1, |
| | | sys_role_user s2 |
| | | WHERE s2.IS_DELETE = 0 |
| | | and s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'zlbm') |
| | | ) |
| | | or ( CURRENT_STATE in (1, 5, 10) |
| | | and EXISTS(SELECT 1 |
| | | FROM sys_role s1, |
| | | sys_role_user s2 |
| | | WHERE s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s2.is_delete = 0 |
| | | and s1.CODE in ('all', 'xtglybm')) |
| | | ) |
| | | ) |
| | | ) as c |
| | | order by c.RECEIVE_TIME desc |
| | | </select> |
| | | |
| | | <!-- |
| | | <select id="page3" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | select |
| | | a.stepRouterId, |
| | | a.project_id as bizGroupId, |
| | | b.MODEL_NAME AS topic, |
| | | '日计划' as title, |
| | | plan_date as remark, |
| | | step_name, |
| | | a.id, |
| | | '0' STEP_ID, |
| | | a.STEP_MARKER, |
| | | 'rjhFlow' as FLOW_CODE, |
| | | c.user_name as APPLY_USER, |
| | | '' as code, |
| | | a.create_date AS RECEIVE_TIME, |
| | | DateDiff(CURRENT_DATE,a.create_date) as idleDays |
| | | from |
| | | ( |
| | | SELECT |
| | | *,'rjh_hz' as STEP_MARKER,'总厂汇总' as STEP_Name,'1648318473140449281' as stepRouterId |
| | | FROM |
| | | wx_daily_plan |
| | | WHERE |
| | | IS_DELETE =0 |
| | | and FLOW_Status = 'rjh_hz' |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | sys_role s1, |
| | | sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'zcbm' |
| | | ) |
| | | union |
| | | SELECT |
| | | *,'rjh_sh' as STEP_MARKER,'部门长审核' as STEP_Name,'1648318806923161601' as stepRouterId |
| | | FROM |
| | | wx_daily_plan |
| | | WHERE |
| | | IS_DELETE =0 |
| | | and FLOW_Status = 'rjh_sh' |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | sys_role s1, |
| | | sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'ywzbm' |
| | | ) |
| | | union |
| | | SELECT |
| | | *,'rjh_cjfk' as STEP_MARKER,'厂家反馈情况' as STEP_MARKER,'1648319132719919106' as stepRouterId |
| | | FROM |
| | | wx_daily_plan |
| | | WHERE |
| | | IS_DELETE =0 |
| | | and FLOW_Status = 'rjh_fk' |
| | | AND cjfk_Status = 0 |
| | | AND MAINTAIN_UNIT = #{deptId} |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | sys_role s1, |
| | | sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'cjbm' |
| | | ) |
| | | union |
| | | SELECT |
| | | *,'rjh_tyfk' as STEP_MARKER,'艇员反馈助修情况' as STEP_Name,'1648318988234534914' as stepRouterId |
| | | FROM |
| | | wx_daily_plan |
| | | WHERE |
| | | IS_DELETE =0 |
| | | and FLOW_Status = 'rjh_fk' |
| | | AND tyfk_Status = 0 |
| | | AND REPAIR_PERSONNEL = #{userId} |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | sys_role s1, |
| | | sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'tybm' |
| | | ) |
| | | GROUP BY |
| | | project_id, |
| | | plan_date |
| | | ) a |
| | | left join wx_project b on a.project_id = b.id |
| | | left join sys_user c on a.SUBMIT_PERSONNEL = c.user_id |
| | | </select> |
| | | --> |
| | | |
| | | <select id="page3" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | select |
| | | a.stepRouterId, |
| | | a.project_id as bizGroupId, |
| | | b.MODEL_NAME AS topic, |
| | | a.title, |
| | | a.remark, |
| | | step_name, |
| | | a.id, |
| | | '0' STEP_ID, |
| | | a.STEP_MARKER, |
| | | a.FLOW_CODE, |
| | | c.user_name as APPLY_USER, |
| | | '' as code, |
| | | a.create_date AS RECEIVE_TIME, |
| | | DateDiff(CURRENT_DATE,a.create_date) as idleDays |
| | | from |
| | | ( |
| | | SELECT |
| | | id,project_id,create_date,SUBMIT_PERSONNEL, |
| | | '月计划' as title, |
| | | concat('月计划 (', select_date, ')') as remark, |
| | | 'monthPlanFlow' as FLOW_CODE, |
| | | 'yjh_hz' as STEP_MARKER,'总厂汇总' as STEP_Name,'1660911405324423170' as stepRouterId |
| | | FROM |
| | | wx_weekly_month_plan |
| | | WHERE |
| | | IS_DELETE = 0 |
| | | and PLAN_TYPE = 1 |
| | | and FLOW_Status = 'yjh_hz' |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | sys_role s1, |
| | | sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s1.IS_DELETE=0 |
| | | AND s2.IS_DELETE=0 |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'zcbm' |
| | | ) |
| | | GROUP BY |
| | | project_id, select_date |
| | | union |
| | | SELECT |
| | | id,project_id,create_date,SUBMIT_PERSONNEL, |
| | | '周计划' as title, |
| | | concat('周计划 (', select_date, ')') as remark, |
| | | 'weekPlanFlow' as FLOW_CODE, |
| | | 'zjh_hz' as STEP_MARKER,'总厂汇总' as STEP_Name,'1660904721482895361' as stepRouterId |
| | | FROM |
| | | wx_weekly_month_plan |
| | | WHERE |
| | | IS_DELETE = 0 |
| | | and PLAN_TYPE = 0 |
| | | and FLOW_Status = 'zjh_hz' |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | sys_role s1, |
| | | sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s1.IS_DELETE=0 |
| | | AND s2.IS_DELETE=0 |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'zcbm' |
| | | ) |
| | | GROUP BY |
| | | project_id, select_date |
| | | union |
| | | SELECT |
| | | id,project_id,create_date,SUBMIT_PERSONNEL, |
| | | '日计划' as title, |
| | | concat('日计划 (', plan_date, ')') as remark, |
| | | 'rjhFlow' as FLOW_CODE, |
| | | 'rjh_hz' as STEP_MARKER,'总厂汇总' as STEP_Name,'1648318473140449281' as stepRouterId |
| | | FROM |
| | | wx_daily_plan |
| | | WHERE |
| | | IS_DELETE = 0 |
| | | and FLOW_Status = 'rjh_hz' |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | sys_role s1, |
| | | sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s1.IS_DELETE=0 |
| | | AND s2.IS_DELETE=0 |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'zcbm' |
| | | ) |
| | | GROUP BY |
| | | project_id, plan_date |
| | | ) a |
| | | left join wx_project b on a.project_id = b.id |
| | | left join sys_user c on a.SUBMIT_PERSONNEL = c.user_id |
| | | </select> |
| | | |
| | | <select id="getRowByProjectId" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT |
| | |
| | | a.biz_group_id, |
| | | a.opinion, |
| | | (case when status = 1 then '被驳回' else '' end) as statusName, |
| | | DateDiff(CURRENT_DATE,a.RECEIVE_TIME) as idleDays, |
| | | DateDiff(CURRENT_DATE,a.receive_time) as idleDays, |
| | | a.topic AS taskName, |
| | | a.step_name as taskType, |
| | | a.biz_id as id, |
| | | 0 as Product_id, |
| | | 0 as MAINTAIN_LEVEL, |
| | | 0 as YEAR, |
| | | a.RECEIVE_TIME AS finishTime, |
| | | a.STEP_ID as APPROVE_STEP_ID, |
| | | a.STEP_MARKER, |
| | | a.FLOW_CODE, |
| | | a.APPLY_USER as taskPeople, |
| | | a.receive_time AS finishTime, |
| | | a.step_id as APPROVE_STEP_ID, |
| | | a.step_marker, |
| | | a.flow_code, |
| | | a.apply_user as taskPeople, |
| | | 2 code, |
| | | a.title as summary, |
| | | b.STEP_ROUTER, |
| | | b.STEP_ROUTER_ID |
| | | FROM WF_RUN_TASK a |
| | | left join WF_DEF_STEP b on a.step_id = b.id |
| | | b.step_router, |
| | | b.step_router_id |
| | | FROM wf_run_task a |
| | | left join wf_def_step b on a.step_id = b.id |
| | | WHERE a.is_delete =0 and a.status in (0,1) |
| | | and a.topic=(select model_name from wx_project where id=#{projectId}) |
| | | and a.step_marker='jsfa_sc' |
| | |
| | | |
| | | <update id="oneKeyDoneCy"> |
| | | update wf_run_task |
| | | set status=20, UPDATER=#{userId}, UPDATE_DATE=CURRENT_TIMESTAMP |
| | | where STEP_MARKER in('rjh_cy','zjh_cy','yjh_cy') and status=0 and RECEIVE_ID=#{userId} |
| | | set status=20, updater=#{userId}, update_date=CURRENT_TIMESTAMP |
| | | where step_marker in('rjh_cy','zjh_cy','yjh_cy') and status=0 and receive_id=#{userId} |
| | | </update> |
| | | </mapper> |
| | |
| | | <if test="whereSql!=null"> |
| | | and ${whereSql} |
| | | </if> |
| | | <if test="tableName!=null"> |
| | | <if test="tableName!=null and tableName!=''"> |
| | | and id not in (select project_id from ${tableName} where is_delete = 0 |
| | | <if test="pageCode !=null and pageCode !='' "> |
| | | and page_code = '${pageCode}' |
| | |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item class="marginTopAndMarginBottom2" label="库类型" style="width: 99%"> |
| | | <zt-dict :disabled="stepMarker!=='pzxrk_first'" v-model="dataForm.configItemWarehouse.libraryType" :radio="true" dict="library_type"></zt-dict> |
| | | <zt-dict disabled="disabled" v-model="dataForm.configItemWarehouse.libraryType" :radio="true" dict="library_type"></zt-dict> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="el-flexManageDialog el-border-bottom"> |
| | |
| | | if (row.projectId) { |
| | | this.dataForm.projectId = row.projectId |
| | | } |
| | | if (row.libraryType) { |
| | | console.log(row.libraryType,"row.libraryType") |
| | | this.dataForm.configItemWarehouse.libraryType = row.libraryType |
| | | } |
| | | this.getInfo() |
| | | if (!this.dataForm.disabled) { |
| | | if (!row.stepMarker) { |
| | |
| | | } |
| | | console.log(this.dataForm.id, this.dataForm.projectId, 'params params') |
| | | }, |
| | | // addConfigItemWarehouseRow(){ |
| | | // this.dataForm.configItemList.push({}) |
| | | // this.$nextTick(()=>{ |
| | | // const tableBody=this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper') |
| | | // tableBody.scrollTop = tableBody.scrollHeight; |
| | | // }) |
| | | // }, |
| | | handleCommand(pageCode) { |
| | | const selectedItem = this.menuOptions.find(item => item.pageCode === pageCode); |
| | | console.log(selectedItem, "handleCommand(pageCode) selectedItem") |
| | |
| | | async getInfo() { |
| | | let params = { |
| | | warehouseId: this.dataForm.id, |
| | | projectId: this.dataForm.projectId |
| | | projectId: this.dataForm.projectId, |
| | | libraryType:this.dataForm.configItemWarehouse.libraryType |
| | | } |
| | | let res = await this.$http.get(`/configItemWarehouse/ConfigItemWarehouse/getDto`, {params: params}) |
| | | this.dataForm = { |
| | |
| | | <template> |
| | | <div class="fa-card-a"> |
| | | <zt-table-wraper query-url="/configItemWarehouse/ConfigItemWarehouse/page" delete-url="/configItemWarehouse/ConfigItemWarehouse/deleteConfigItem" v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <el-input v-model="dataForm.code" placeholder="请输入配置项入库编号" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input v-model="dataForm.projectCode" placeholder="请输入项目编号" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input v-model="dataForm.softwareName" placeholder="请输入项目名称" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-dict v-model="dataForm.libraryType" dict="library_type" placeholder="请选择库类型"clearable></zt-dict> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="query" @click="table.query()"/> |
| | | <zt-button type="primary" class="el-icon-edit" perm="configItemWarehouse:add" @click="add()">新增</zt-button> |
| | | <zt-button type="delete" perm="configItemWarehouse:delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column :selectable="isCheckbox" align="center" type="selection" width="40"/> |
| | | <el-table-column prop="code" label="配置项入库编号"/> |
| | | <el-table-column prop="projectCode" label="项目编号"/> |
| | | <el-table-column prop="softwareName" label="项目名称"/> |
| | | <zt-table-column-dict prop="libraryType" label="库类型" dict="library_type"/> |
| | | <zt-table-column-handle :table="table" edit-perm="configItemWarehouse:update" delete-perm="configItemWarehouse::delete"/> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update ref="addOrUpdate" @refreshDataList="table.query"/> |
| | | <ProjectSelect ref="projectSelect" |
| | | @refreshDataList="table.query" |
| | | @setProjectInfo="openAddWin"> |
| | | </ProjectSelect> |
| | | </zt-table-wraper> |
| | | <zt-table-wraper query-url="/configItemWarehouse/ConfigItemWarehouse/page" |
| | | delete-url="/configItemWarehouse/ConfigItemWarehouse/deleteConfigItem" v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <el-input v-model="dataForm.code" placeholder="请输入配置项入库编号" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input v-model="dataForm.projectCode" placeholder="请输入项目编号" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input v-model="dataForm.softwareName" placeholder="请输入项目名称" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-dict v-model="dataForm.libraryType" dict="library_type" placeholder="请选择库类型" clearable></zt-dict> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="query" @click="table.query()"/> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-dropdown trigger="click"> |
| | | <zt-button type="primary" class="el-icon-edit" perm="configItemWarehouse:add">新增</zt-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item @click.native="add('1')">受控库</el-dropdown-item> |
| | | <el-dropdown-item @click.native="add('2')">产品库</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="delete" perm="configItemWarehouse:delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" |
| | | border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column :selectable="isCheckbox" align="center" type="selection" width="40"/> |
| | | <el-table-column prop="code" label="配置项入库编号"/> |
| | | <el-table-column prop="projectCode" label="项目编号"/> |
| | | <el-table-column prop="softwareName" label="项目名称"/> |
| | | <zt-table-column-dict prop="libraryType" label="库类型" dict="library_type"/> |
| | | <zt-table-column-handle :table="table" edit-perm="configItemWarehouse:update" |
| | | delete-perm="configItemWarehouse::delete"/> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update ref="addOrUpdate" @refreshDataList="table.query"/> |
| | | <ProjectSelect ref="projectSelect" |
| | | @refreshDataList="table.query" |
| | | @setProjectInfo="openAddWin"> |
| | | </ProjectSelect> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import AddOrUpdate from './ConfigItemWarehouse-AddOrUpdate' |
| | | import ProjectSelect from "../project/Project-select"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | libraryType: '1', |
| | | dataForm: { |
| | | code: '', |
| | | projectCode: '', |
| | |
| | | AddOrUpdate, |
| | | ProjectSelect |
| | | }, |
| | | methods:{ |
| | | add() { |
| | | methods: { |
| | | add(libraryType) { |
| | | if (libraryType==='2'){ |
| | | this.libraryType='2' |
| | | } |
| | | this.$refs.projectSelect.$refs.dialog.init("config_item_warehouse") |
| | | }, |
| | | isCheckbox(row,index){ |
| | | isCheckbox(row, index) { |
| | | return !(row.flowInfo && row.flowInfo.bizId); |
| | | }, |
| | | openAddWin(row) { |
| | | console.log(row.id, 'row.id') |
| | | // this.$refs.addOrUpdate.$refs.dialog.init(null, {id: null, projectId: row.id}) |
| | | this.$refs.addOrUpdate.$refs.dialog.init(null, {id: null, projectId: row.id}) |
| | | this.$refs.addOrUpdate.$refs.dialog.init(null, {id: null, projectId: row.id, libraryType: this.libraryType}) |
| | | this.libraryType='1' |
| | | }, |
| | | } |
| | | } |
| | |
| | | <el-input v-model="dataForm.project.softwareName" placeholder="被测软件"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="版本" style="width: 49%"> |
| | | <el-input v-model="dataForm.project.softwareIdentity" placeholder="版本"></el-input> |
| | | <el-input v-model="dataForm.project.version" placeholder="版本"></el-input> |
| | | </el-form-item> |
| | | <div class="el-flexConfigDialog el-form-border"> |
| | | <div class="DFormWidth DAlign DHold"> |
| | |
| | | virusDatabaseVersion: '', |
| | | }, |
| | | project: { |
| | | softwareIdentity: '', |
| | | version: '', |
| | | softwareName: '', |
| | | }, |
| | | testAgencyInfo: { |
| | |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | this.dataForm.project.version='1.0.0' |
| | | this.getImageUrl() |
| | | } |
| | | }, |
| | |
| | | <el-form-item style="width:12%"> |
| | | <zt-dict v-model="dataForm.criticalLevel" placeholder="关键等级" dict="critical_level" clearable></zt-dict> |
| | | </el-form-item> |
| | | <!-- <el-form-item style="width:12%"> |
| | | <zt-dict v-model="dataForm.testLevel" placeholder="测试级别" dict="test_level" clearable></zt-dict> |
| | | </el-form-item>--> |
| | | <el-form-item style="width:12%"> |
| | | <zt-dict v-model="dataForm.softwareType" placeholder="软件类型" dict="software_type" clearable></zt-dict> |
| | | </el-form-item> |
| | |
| | | v-adaptive="{bottomOffset:150}" |
| | | @row-dblclick="selectedProject" |
| | | border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column prop="entrustUnitName" label="委托单位名称"/> |
| | | <el-table-column prop="developUnitName" label="开发单位名称"/> |
| | | <el-table-column prop="softwareName" label="软件名称"/> |
| | | <el-table-column prop="code" label="项目编号"/> |
| | | <el-table-column prop="softwareIdentity" label="项目标识"/> |
| | | <el-table-column prop="entrustUnitName" label="委托单位名称"/> |
| | | <el-table-column prop="developUnitName" label="开发单位名称"/> |
| | | <zt-table-column-dict prop="secretClass" label="密级" dict="secret_class"/> |
| | | <zt-table-column-dict prop="criticalLevel" label="关键等级" dict="critical_level"/> |
| | | <!--<zt-table-column-dict prop="testLevel" label="测试级别" dict="test_level"/>--> |
| | | <zt-table-column-dict prop="softwareType" width="150px" label="软件类型" dict="software_type"/> |
| | | <el-table-column prop="projectLeader" label="项目负责人"/> |
| | | <zt-table-column-dict prop="isContract" label="是否签署合同" dict="is_or_not"/> |
| | |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" align="center" width="40"/> |
| | | <el-table-column prop="entrustUnitName" label="委托单位名称"/> |
| | | <el-table-column prop="developUnitName" label="开发单位名称"/> |
| | | <el-table-column prop="softwareName" label="软件名称"/> |
| | | <el-table-column prop="code" label="项目编号"/> |
| | | <el-table-column prop="softwareIdentity" label="项目标识"/> |
| | | <el-table-column prop="entrustUnitName" label="委托单位名称"/> |
| | | <el-table-column prop="developUnitName" label="开发单位名称"/> |
| | | <zt-table-column-dict prop="secretClass" label="密级" dict="secret_class"/> |
| | | <zt-table-column-dict prop="criticalLevel" label="关键等级" dict="critical_level"/> |
| | | <!-- <zt-table-column-dict prop="testLevel" label="测试级别" dict="test_level"/>--> |
| | |
| | | :data="dataList" |
| | | style='margin-top:10px;transition: .5s;' |
| | | border highlight-current-row> |
| | | <el-table-column align="center" prop="index" width="80" label="序号"> |
| | | <el-table-column align="center" prop="index" width="60" label="序号"> |
| | | <template slot-scope="scope"> |
| | | <span v-html="indexFormat(scope.$index)"></span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column align="left" prop="topic" label="工程" width="150"/> |
| | | <el-table-column align="left" prop="topic" label="项目名称" /> |
| | | <!-- <el-table-column align="left" prop="title" label="流程名称" width="200"/>--> |
| | | <el-table-column align="left" prop="remark" label="摘要" /> |
| | | <el-table-column align="left" prop="remark" label="摘要" width="250"/> |
| | | <el-table-column align="center" prop="finishStepName" label="完成节点" width="240px"/> |
| | | <el-table-column align="center" v-if ='$store.state.user.isAdmin' prop="finishUserName" label="完成人员" width="120px"/> |
| | | <el-table-column align="center" prop="finishTime" label="完成时间" width="160px"/> |
| | | <el-table-column align="center" prop="stepName" label="当前状态" width="240px"/> |
| | | <el-table-column align="center" prop="receiveName" label="办理人" width="120px"/> |
| | | <el-table-column align="center" prop="finishTime" label="完成时间" width="120px"/> |
| | | <el-table-column align="center" prop="stepName" label="当前状态" width="100px"/> |
| | | <el-table-column align="center" prop="receiveName" label="办理人" width="100px"/> |
| | | <!-- <el-table-column align="center" prop="statusName" label="我的意见" />--> |
| | | <el-table-column label="操作" width="180px"> |
| | | <template v-slot="{ row }"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import qs from "qs"; |
| | | import Cookies from "js-cookie"; |
| | | import qs from "qs"; |
| | | import Cookies from "js-cookie"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | pageCode: '', |
| | | stepMarker: '', |
| | | configDetailRow: null, |
| | | subtitle: '', |
| | | pageName: { |
| | | plan: '软件测试计划', explain: '软件测试说明', record: '软件测试记录', report: '软件测试报告', |
| | | contract: '合同评审阶段', require: '测试需求分析与策划阶段',execute:'测试设计与实现、执行阶段',summary:'测试总结阶段' |
| | | }, |
| | | dataForm: { |
| | | id: '', |
| | | projectId: '', |
| | | project: { |
| | | softwareIdentity: '', |
| | | softwareName: '', |
| | | export default { |
| | | data() { |
| | | return { |
| | | pageCode: '', |
| | | stepMarker: '', |
| | | configDetailRow: null, |
| | | subtitle: '', |
| | | pageName: { |
| | | plan: '软件测试计划', explain: '软件测试说明', record: '软件测试记录', report: '软件测试报告', |
| | | contract: '合同评审阶段', require: '测试需求分析与策划阶段', execute: '测试设计与实现、执行阶段', summary: '测试总结阶段' |
| | | }, |
| | | checkOrder: { |
| | | code: '', |
| | | examiner: '', |
| | | examDate: '', |
| | | problemDescription: '', |
| | | problemProcess: '', |
| | | processor: '', |
| | | verifier: '', |
| | | }, |
| | | checkOrderList: [] |
| | | dataForm: { |
| | | id: '', |
| | | projectId: '', |
| | | project: { |
| | | softwareIdentity: '', |
| | | softwareName: '', |
| | | }, |
| | | checkOrder: { |
| | | code: '', |
| | | examiner: '', |
| | | examDate: '', |
| | | problemDescription: '', |
| | | problemProcess: '', |
| | | processor: '', |
| | | verifier: '', |
| | | }, |
| | | checkOrderList: [] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | getDict() { |
| | | if (this.pageCode && (this.pageCode === 'plan' || this.pageCode === 'explain' || this.pageCode === 'record' || this.pageCode === 'report')) { |
| | | }, |
| | | computed: { |
| | | getDict() { |
| | | if (this.pageCode && (this.pageCode === 'plan' || this.pageCode === 'explain' || this.pageCode === 'record' || this.pageCode === 'report')) { |
| | | return 'tristate1' |
| | | } else { |
| | | return 'tristate2' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | init(id, row) { |
| | | this.configDetailRow = row |
| | | if (row.checkId) { |
| | | console.log('配置项入库审核进来的 TestCheckOrder-AddOrUpdate.vue init row.checkId') |
| | | if (row.checkId != -1) { |
| | | this.dataForm.id = row.checkId |
| | | } |
| | | } else if (id) { |
| | | this.dataForm.id = id |
| | | } else { |
| | | this.dataForm.id = row.id |
| | | } |
| | | this.pageCode = row.pageCode |
| | | this.subtitle = this.pageName[this.pageCode] |
| | | |
| | | if (row.projectId) { |
| | | this.dataForm.projectId = row.projectId |
| | | } |
| | | if (this.configDetailRow) { |
| | | if (!row.stepMarker) { |
| | | this.stepMarker = 'csjcd_first' |
| | | this.title = '发起测试检查单' |
| | | }, |
| | | methods: { |
| | | init(id, row) { |
| | | this.configDetailRow = row |
| | | if (row.checkId) { |
| | | console.log('配置项入库审核进来的 TestCheckOrder-AddOrUpdate.vue init row.checkId') |
| | | if (row.checkId != -1) { |
| | | this.dataForm.id = row.checkId |
| | | } |
| | | } else if (id) { |
| | | this.dataForm.id = id |
| | | } else { |
| | | this.title = row.stepName |
| | | this.stepMarker = row.stepMarker |
| | | this.dataForm.id = row.id |
| | | } |
| | | } |
| | | //this.dataForm.disabled |
| | | this.getInfo() |
| | | this.pageCode = row.pageCode |
| | | this.subtitle = this.pageName[this.pageCode] |
| | | |
| | | //console.log(this.dataForm.id, this.dataForm.projectId, this.stepMarker, 'this.dataForm.id, this.dataForm.projectId,this.stepMarker') |
| | | }, |
| | | indexFormat(index) { |
| | | return index += 1 |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | | let params = { |
| | | checkId: this.dataForm.id, |
| | | projectId: this.dataForm.projectId, |
| | | pageCode: this.pageCode |
| | | } |
| | | console.log(this.pageCode, "getInfo pageCode") |
| | | let res = await this.$http.get(`/testCheckOrder/TestCheckOrder/getDto`, {params: params}) |
| | | this.dataForm = { |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | console.log(this.dataForm, 'this.dataForm this.dataForm') |
| | | }, |
| | | async print() { |
| | | var params = qs.stringify({ |
| | | token: Cookies.get('token'), |
| | | id: this.dataForm.id, |
| | | pageCode: this.pageCode |
| | | }) |
| | | let apiURL = `/testCheckOrder/TestCheckOrder/exportCheckOrder` |
| | | window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit(submitType) { |
| | | let isFlow = false |
| | | if (submitType == 'tj') { |
| | | for (let item of this.dataForm.checkOrderList) { |
| | | if (!item.checkResult) { |
| | | this.$alert("有未填写的数据") |
| | | return |
| | | } else if (item.checkResult == "2") { |
| | | isFlow = true |
| | | if (row.projectId) { |
| | | this.dataForm.projectId = row.projectId |
| | | } |
| | | if (this.configDetailRow) { |
| | | if (!row.stepMarker) { |
| | | this.stepMarker = 'csjcd_first' |
| | | this.title = '发起测试检查单' |
| | | } else { |
| | | this.title = row.stepName |
| | | this.stepMarker = row.stepMarker |
| | | } |
| | | } |
| | | if (submitType == 'tj' && !isFlow) { |
| | | submitType == '' |
| | | //this.dataForm.disabled |
| | | this.getInfo() |
| | | |
| | | //console.log(this.dataForm.id, this.dataForm.projectId, this.stepMarker, 'this.dataForm.id, this.dataForm.projectId,this.stepMarker') |
| | | }, |
| | | indexFormat(index) { |
| | | return index += 1 |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | | let params = { |
| | | checkId: this.dataForm.id, |
| | | projectId: this.dataForm.projectId, |
| | | pageCode: this.pageCode |
| | | } |
| | | } |
| | | if (submitType == 'bl') { |
| | | isFlow = true |
| | | } |
| | | if (submitType == 'tj' && isFlow || submitType == 'bl' && isFlow) { |
| | | let flowInfo = { |
| | | flowCode: 'csjcd', |
| | | stepIdMark: this.stepMarker, |
| | | submitType: submitType |
| | | console.log(this.pageCode, "getInfo pageCode") |
| | | let res = await this.$http.get(`/testCheckOrder/TestCheckOrder/getDto`, {params: params}) |
| | | this.pageCode = res.data.checkOrder.pageCode |
| | | this.dataForm = { |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | this.dataForm.flowInfoDto = flowInfo; |
| | | } |
| | | console.log(this.dataForm, "this.dataForm formSubmit(submitType)") |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/testCheckOrder/TestCheckOrder/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('recall', res.data, this.configDetailRow) |
| | | this.$emit('refreshDataList') |
| | | console.log(this.dataForm, 'this.dataForm this.dataForm') |
| | | }, |
| | | async print() { |
| | | var params = qs.stringify({ |
| | | token: Cookies.get('token'), |
| | | id: this.dataForm.id, |
| | | pageCode: this.pageCode |
| | | }) |
| | | let apiURL = `/testCheckOrder/TestCheckOrder/exportCheckOrder` |
| | | window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit(submitType) { |
| | | let isFlow = false |
| | | if (submitType == 'tj') { |
| | | for (let item of this.dataForm.checkOrderList) { |
| | | if (!item.checkResult) { |
| | | this.$alert("有未填写的数据") |
| | | return |
| | | } else if (item.checkResult == "2") { |
| | | isFlow = true |
| | | } |
| | | } |
| | | if (submitType == 'tj' && !isFlow) { |
| | | submitType == '' |
| | | } |
| | | } |
| | | if (submitType == 'bl') { |
| | | isFlow = true |
| | | } |
| | | if (submitType == 'tj' && isFlow || submitType == 'bl' && isFlow) { |
| | | let flowInfo = { |
| | | flowCode: 'csjcd', |
| | | stepIdMark: this.stepMarker, |
| | | submitType: submitType |
| | | } |
| | | this.dataForm.flowInfoDto = flowInfo; |
| | | } |
| | | console.log(this.dataForm, "this.dataForm formSubmit(submitType)") |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/testCheckOrder/TestCheckOrder/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('recall', res.data, this.configDetailRow) |
| | | this.$emit('refreshDataList') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .el-flexCirculationDialog { |
| | | display: flex; |
| | | align-items: center |
| | | } |
| | | .el-flexCirculationDialog { |
| | | display: flex; |
| | | align-items: center |
| | | } |
| | | |
| | | .testCheckFormAuto .acceptDate > .el-form-item > .el-form-item__content { |
| | | width: 100%; |
| | | } |
| | | .testCheckFormAuto .acceptDate > .el-form-item > .el-form-item__content { |
| | | width: 100%; |
| | | } |
| | | |
| | | .testCheckFormAuto .acceptDate1 > .el-form-item > .el-form-item__content { |
| | | width: 100%; |
| | | } |
| | | .testCheckFormAuto .acceptDate1 > .el-form-item > .el-form-item__content { |
| | | width: 100%; |
| | | } |
| | | |
| | | .testCheckFormAuto .marginTopAndMarginBottom { |
| | | margin-top: 10px !important; |
| | | margin-bottom: 0 !important; |
| | | } |
| | | .testCheckFormAuto .marginTopAndMarginBottom { |
| | | margin-top: 10px !important; |
| | | margin-bottom: 0 !important; |
| | | } |
| | | |
| | | .testCheckFormAuto .marginTopAndMarginBottom2 { |
| | | margin-top: -10px !important; |
| | | margin-bottom: 10px !important; |
| | | } |
| | | .testCheckFormAuto .marginTopAndMarginBottom2 { |
| | | margin-top: -10px !important; |
| | | margin-bottom: 10px !important; |
| | | } |
| | | |
| | | .testCheckFormAuto .marginTopAndMarginBottom3 { |
| | | margin-top: 0 !important; |
| | | margin-bottom: 10px !important; |
| | | } |
| | | .testCheckFormAuto .marginTopAndMarginBottom3 { |
| | | margin-top: 0 !important; |
| | | margin-bottom: 10px !important; |
| | | } |
| | | |
| | | .testCheckFormAuto .acceptDate > .el-form-item > .el-form-item__content { |
| | | line-height: 78px; |
| | | } |
| | | .testCheckFormAuto .acceptDate > .el-form-item > .el-form-item__content { |
| | | line-height: 78px; |
| | | } |
| | | |
| | | .testCheckContentWidth > .el-form-item > .el-form-item__content { |
| | | width: calc(100% - 120px); |
| | | } |
| | | .testCheckContentWidth > .el-form-item > .el-form-item__content { |
| | | width: calc(100% - 120px); |
| | | } |
| | | |
| | | .testCheckFormAuto .el-radio { |
| | | margin-right: 10px; |
| | | } |
| | | .testCheckFormAuto .el-radio { |
| | | margin-right: 10px; |
| | | } |
| | | </style> |
| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="query" @click="table.query()"/> |
| | | <zt-button type="primary" v-if="!(pageCode==='plan' || pageCode==='explain' || pageCode==='record' || pageCode==='report')" class="el-icon-edit" @click="add()">新增</zt-button> |
| | | <zt-button type="primary" v-if="!(pageCode==='plan' || pageCode==='explain' || pageCode==='record' || pageCode==='report')&& showColumn" class="el-icon-edit" @click="add()">新增</zt-button> |
| | | <zt-button type="delete" perm="testCheckOrder:delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column :selectable="isCheckbox" align="center" type="selection" width="40"/> |
| | | <el-table-column prop="code" label="编号"/> |
| | | <el-table-column prop="softwareIdentity" label="项目标识"/> |
| | | <el-table-column prop="softwareName" label="项目名称"/> |
| | | <el-table-column prop="softwareIdentity" label="项目标识"/> |
| | | <zt-table-column-handle :table="table" :hasEdit='false' edit-perm="testCheckOrder:update" |
| | | delete-perm="testCheckOrder::delete"> |
| | | <template v-slot="{row}"> |
| | |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | showColumn: false, |
| | | pageCode: '', |
| | | QueryUrl:'', |
| | | dataForm: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | const roleName = localStorage.getItem('roleName') |
| | | if (roleName && roleName.includes('QA')) { |
| | | this.showColumn = true; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.pageCode = this.$route.query.pageCode |
| | | this.dataForm.pageCode = this.$route.query.pageCode |
| | |
| | | <div> |
| | | <div v-show="isOpenDocPreviewDialog" class="preview-dialog"> |
| | | <button @click="closePreviewDialog('doc')" class="close-button">关闭</button> |
| | | <div :id="pageMarkerfun+'-doc'" style="overflow: auto; width: 100%; height: 90%;"></div> |
| | | <div :id="pageMarkerfun+'-doc'" style="overflow: auto; width: 100% !important;; height: 90%;margin: 0px; padding: 0px!important"></div> |
| | | <div class="file-name">{{ docName }}</div> |
| | | </div> |
| | | <div v-show="isOpenPdfPreviewDialog" class="preview-dialog"> |
| | |
| | | position: fixed; |
| | | top: 120px; |
| | | right: 10px; |
| | | background: gray; |
| | | background: #ccc; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .preview-dialog .docx-wrapper{ |
| | | padding: 10px 0 0 0 !important; |
| | | background: inherit !important; |
| | | } |
| | | .preview-dialog .docx-wrapper>section.docx{ |
| | | width: 850.3pt !important; |
| | | padding: 0 !important; |
| | | } |
| | | .preview-dialog .docx-wrapper>section.docx>article{ |
| | | margin: 0 auto; |
| | | } |
| | | .preview-dialog .docx-wrapper>section.docx>article>.docx_4{ |
| | | width: 685.45pt !important; |
| | | } |
| | | .close-button { |
| | | position: absolute; |
| | | top: 10px; |
| | |
| | | <select id="defaultShowConfigList" resultType="com.zt.defaultShowConfig.model.DefaultShowConfig"> |
| | | SELECT |
| | | id, |
| | | PAGE_NAME, |
| | | PAGE_CODE, |
| | | USER_ID, |
| | | COLUMN_NAME, |
| | | IS_SHOW |
| | | page_name, |
| | | page_code, |
| | | user_id, |
| | | column_name, |
| | | is_show |
| | | FROM |
| | | comm_default_show_config |
| | | WHERE |
| | | is_delete = 0 |
| | | AND PAGE_NAME = #{pageName} |
| | | AND page_name = #{pageName} |
| | | <if test="pageCode != null and pageCode != ''"> |
| | | AND PAGE_CODE = #{pageCode} |
| | | AND page_code = #{pageCode} |
| | | </if> |
| | | AND USER_ID = #{userId} |
| | | AND user_id = #{userId} |
| | | </select> |
| | | |
| | | <delete id="defaultShowConfigDelete"> |
| | |
| | | <select id="getList" resultType="com.zt.modules.log.model.SysLogLogin"> |
| | | select * from ( |
| | | select a.* |
| | | ,(SELECT replace(GROUP_CONCAT(aa.name),',',';') FROM SYS_ROLE aa,SYS_ROLE_USER bb WHERE aa.id=bb."ROLE_ID" AND bb."USER_ID" = a."CREATOR") AS role_names |
| | | from SYS_LOG_LOGIN a |
| | | ,(SELECT replace(GROUP_CONCAT(aa.name),',',';') FROM sys_role aa,sys_role_user bb WHERE aa.id=bb.role_id AND bb.user_id = a.creator) AS role_names |
| | | from sys_log_login a |
| | | ) a |
| | | <where> |
| | | <if test="status!=null"> |
| | |
| | | <sql id="custom_where"> |
| | | <choose> |
| | | <when test="startCreateTime!=null and endCreateTime!=null"> |
| | | and a.CREATE_DATE between #{startCreateTime} and #{endCreateTime} |
| | | and a.create_date between #{startCreateTime} and #{endCreateTime} |
| | | </when> |
| | | <when test="startCreateTime!=null"> |
| | | and a.CREATE_DATE >= #{startCreateTime} |
| | | and a.create_date >= #{startCreateTime} |
| | | </when> |
| | | <when test="endCreateTime!=null"> |
| | | and a.CREATE_DATE <= #{endCreateTime} |
| | | and a.create_date <= #{endCreateTime} |
| | | </when> |
| | | <otherwise> |
| | | </otherwise> |
| | |
| | | <select id="getList" resultType="com.zt.modules.log.model.SysLogOperation"> |
| | | select * from ( |
| | | select a.* |
| | | ,(SELECT replace(GROUP_CONCAT(aa.name),',',';') FROM SYS_ROLE aa,SYS_ROLE_USER bb WHERE aa.id=bb.ROLE_ID AND bb.USER_ID = a.CREATOR) AS role_names |
| | | from SYS_LOG_OPERATION a |
| | | ,(SELECT replace(GROUP_CONCAT(aa.name),',',';') FROM sys_role aa,sys_role_user bb WHERE aa.id=bb.role_id AND bb.user_id = a.creator) AS role_names |
| | | from sys_log_operation a |
| | | ) a |
| | | <where> |
| | | <if test="whereSql!=null"> |
| | |
| | | </if> |
| | | <if test="action == 'xtbmybm'"> |
| | | and role_names NOT LIKE '%xtgly%' OR role_names NOT LIKE '%xtsjy%' |
| | | and REQUEST_URI not IN ( |
| | | and request_uri not IN ( |
| | | SELECT |
| | | a.DICT_LABEL AS urlLabel |
| | | a.dict_label AS urlLabel |
| | | FROM |
| | | SYS_DICT_DATA a, |
| | | SYS_DICT_TYPE b |
| | | sys_dict_data a, |
| | | sys_dict_type b |
| | | WHERE 1=1 |
| | | AND b.DICT_TYPE = 'adminURL' |
| | | AND b.ID = a.DICT_TYPE_ID |
| | | AND b.IS_DELETE = 0 |
| | | AND b.dict_type = 'adminURL' |
| | | AND b.id = a.dict_type_id |
| | | AND b.is_delete = 0 |
| | | ) |
| | | </if> |
| | | <if test="action == 'xtsjybm'"> |
| | | and role_names LIKE '%xtgly%' OR role_names LIKE '%xtsjy%' |
| | | and REQUEST_URI IN ( |
| | | and request_uri IN ( |
| | | SELECT |
| | | a.DICT_LABEL AS urlLabel |
| | | a.dict_label AS urlLabel |
| | | FROM |
| | | SYS_DICT_DATA a, |
| | | SYS_DICT_TYPE b |
| | | sys_dict_data a, |
| | | sys_dict_type b |
| | | WHERE 1=1 |
| | | AND b.DICT_TYPE = 'adminURL' |
| | | AND b.ID = a.DICT_TYPE_ID |
| | | AND b.IS_DELETE = 0 |
| | | AND b.dict_type = 'adminURL' |
| | | AND b.id = a.dict_type_id |
| | | AND b.is_delete = 0 |
| | | ) |
| | | </if> |
| | | <if test="action == 'other'"> |
| | | and a.CREATOR = ${currentUserId} |
| | | and a.creator = ${currentUserId} |
| | | </if> |
| | | <if test="status != null"> |
| | | and a.status = ${status} |
| | | </if> |
| | | <if test="startCreateTime!=null and endCreateTime!=null and startCreateTime!=''and endCreateTime!=''"> |
| | | and a.CREATE_DATE between #{startCreateTime} and #{endCreateTime} |
| | | and a.create_date between #{startCreateTime} and #{endCreateTime} |
| | | </if> |
| | | <if test="startCreateTime!=null and startCreateTime!=''"> |
| | | and a.CREATE_DATE >= #{startCreateTime} |
| | | and a.create_date >= #{startCreateTime} |
| | | </if> |
| | | <if test="endCreateTime!=null and endCreateTime!=''"> |
| | | and a.CREATE_DATE <= #{endCreateTime} |
| | | and a.create_date <= #{endCreateTime} |
| | | </if> |
| | | and IS_DELETE = 0 |
| | | ORDER BY a.CREATE_DATE DESC |
| | | and is_delete = 0 |
| | | ORDER BY a.create_date DESC |
| | | </where> |
| | | </select> |
| | | |
| | | <update id="deleteCondition"> |
| | | <foreach collection="list" item="item" index="index" open="" close="" separator=";"> |
| | | update SYS_LOG_OPERATION |
| | | update sys_log_operation |
| | | <set> |
| | | IS_DELETE = 1 |
| | | is_delete = 1 |
| | | </set> |
| | | where id = ${item.id} |
| | | </foreach> |
| | |
| | | <!-- 获取我的通知列表 --> |
| | | <select id="getMyNoticeList" resultType="com.zt.modules.message.model.SysNotice"> |
| | | select t2.id, t2.title, t2.type, t2.sender_id, t3.nick_name sender_name, t2.send_date, t1.status |
| | | from SYS_NOTICE_USER t1 |
| | | left join SYS_NOTICE t2 on t1.notice_id = t2.id |
| | | left join SYS_USER t3 on t2.sender_id = t3.user_id |
| | | from sys_notice_user t1 |
| | | left join sys_notice t2 on t1.notice_id = t2.id |
| | | left join sys_user t3 on t2.sender_id = t3.user_id |
| | | where t1.receiver_id = #{value} |
| | | order by t2.create_date desc |
| | | </select> |
| | |
| | | <!-- 获取被通知的用户列表 --> |
| | | <select id="getNoticeUserList" resultType="com.zt.modules.message.model.SysNoticeUser"> |
| | | select t2.nick_name as receiver_name, t1.status, t1.read_date |
| | | from SYS_NOTICE_USER t1 |
| | | left SYS_USER t2 on t1.receiver_id = t2.user_id |
| | | from sys_notice_user t1 |
| | | left join sys_user t2 on t1.receiver_id = t2.user_id |
| | | where t1.notice_id = #{value} |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="getUserMenuList" resultType="com.zt.modules.sys.model.SysMenu"> |
| | | select t1.* |
| | | from SYS_MENU t1 |
| | | from sys_menu t1 |
| | | where t1.is_delete =0 |
| | | <if test="userId != null and userId != 0"> |
| | | and t1.id in (select menu_id |
| | | from SYS_ROLE_MENU t2, SYS_ROLE_USER t3 |
| | | from sys_role_menu t2, sys_role_user t3 |
| | | where t3.user_id=#{userId} |
| | | and t2.is_delete=0 |
| | | and t3.is_delete=0 |
| | |
| | | </if> |
| | | <if test="tenantId != null and tenantId != 0"> |
| | | and t1.id in (select menu_id |
| | | from SYS_ROLE_MENU t4 |
| | | from sys_role_menu t4 |
| | | where t4.role_id = #{tenantId} |
| | | and t4.is_delete=0 |
| | | ) |
| | |
| | | |
| | | <select id="getUserMenuListExcept" resultType="com.zt.modules.sys.model.SysMenu"> |
| | | select t1.* |
| | | from SYS_MENU t1 |
| | | from sys_menu t1 |
| | | where t1.is_delete =0 |
| | | <if test="userId != null and userId != 0"> |
| | | and t1.id in (select menu_id |
| | | from SYS_ROLE_MENU_EXCEPT t2, SYS_ROLE_USER t3 |
| | | from sys_role_menu_except t2, sys_role_user t3 |
| | | where t3.user_id=#{userId} |
| | | and t2.is_delete=0 |
| | | and t3.is_delete=0 |
| | |
| | | </if> |
| | | <if test="tenantId != null and tenantId != 0"> |
| | | and t1.id in (select menu_id |
| | | from SYS_ROLE_MENU t4 |
| | | from sys_role_menu t4 |
| | | where t4.role_id = #{tenantId} |
| | | and t4.is_delete=0 |
| | | ) |
| | |
| | | |
| | | <select id="getUserMenuListComm" resultType="com.zt.modules.sys.model.SysMenu"> |
| | | select t1.* |
| | | from SYS_MENU t1 |
| | | from sys_menu t1 |
| | | where t1.is_delete =0 |
| | | and t1.id in (select menu_id |
| | | from SYS_ROLE_MENU t2, SYS_ROLE t3 |
| | | from sys_role_menu t2, sys_role t3 |
| | | where t2.is_delete=0 |
| | | and t3.is_delete=0 |
| | | and t2.role_id = t3.id |
| | |
| | | </select> |
| | | |
| | | <select id="getPermissionsList" resultType="java.lang.String"> |
| | | select permissions from SYS_MENU |
| | | select permissions from sys_menu |
| | | </select> |
| | | |
| | | <select id="getSystems" resultType="com.zt.modules.sys.model.SysMenu"> |
| | | select menu_id as id, sys_id as pid, sys_name as name, menu_name as remark ,url,ICON,type,ICON_NO |
| | | from SYS_MENU_HOME where is_delete=0 |
| | | select menu_id as id, sys_id as pid, sys_name as name, menu_name as remark ,url,icon,type,icon_no |
| | | from sys_menu_home where is_delete=0 |
| | | <if test="type != null and type != 0"> |
| | | and TYPE = #{type} |
| | | and type = #{type} |
| | | </if> |
| | | order by SORT |
| | | order by sort |
| | | </select> |
| | | </mapper> |
| | |
| | | <mapper namespace="com.zt.modules.sys.dao.SysRoleMenuDao"> |
| | | |
| | | <select id="getByRoleId" resultType="com.zt.modules.sys.model.SysRoleMenu"> |
| | | select * from SYS_ROLE_MENU where role_id = #{value} and is_delete = 0 |
| | | select * from sys_role_menu where role_id = #{value} and is_delete = 0 |
| | | </select> |
| | | |
| | | <select id="roleMenu" resultType="com.zt.modules.sys.model.SysRoleMenu"> |
| | | SELECT |
| | | m.* |
| | | FROM |
| | | SYS_ROLE_MENU m |
| | | LEFT JOIN SYS_ROLE_USER r ON r.ROLE_ID = m.role_id |
| | | LEFT JOIN SYS_USER u ON u.id = r.USER_ID |
| | | sys_role_menu m |
| | | LEFT JOIN sys_role_user r ON r.role_id = m.role_id |
| | | LEFT JOIN sys_user u ON u.id = r.user_id |
| | | WHERE 1=1 |
| | | AND m.role_id = #{id} |
| | | AND m.menu_id in(1385805134214275073,1386158810275553282) |
| | |
| | | |
| | | <select id="getUserRoles" resultType="com.zt.modules.sys.dto.RoleDto"> |
| | | select a.id, a.code, a.name |
| | | from SYS_ROLE a left join SYS_ROLE_USER b on a.id = b.role_id |
| | | from sys_role a left join sys_role_user b on a.id = b.role_id |
| | | where a.is_delete = 0 |
| | | and b.is_delete = 0 |
| | | and b.user_id = #{userId} |
| | |
| | | </select> |
| | | |
| | | <select id="getRoleUsers" resultType="com.zt.core.sys.model.SysUser"> |
| | | select b.user_id as id |
| | | ,b.user_name as username |
| | | ,b.nick_name as real_name |
| | | ,b.phonenumber as MOBILE |
| | | ,c.dept_name |
| | | from SYS_ROLE_USER a |
| | | inner join SYS_USER b on a.user_id =b.user_id |
| | | LEFT JOIN SYS_DEPT c ON b.dept_id =c.dept_id |
| | | select b.id |
| | | ,b. username |
| | | ,b.real_name |
| | | ,b.MOBILE |
| | | ,c.name |
| | | from sys_role_user a |
| | | inner join sys_user b on a.user_id =b.id |
| | | LEFT JOIN sys_dept c ON b.dept_id =c.id |
| | | where a.is_delete =0 |
| | | and b.del_flag =0 |
| | | and b.is_delete =0 |
| | | and a.role_id = #{roleId} |
| | | order by order_num |
| | | </select> |
| | | |
| | | <select id="getSingleRoleUsers" resultType="com.zt.modules.sys.model.SysRoleUser"> |
| | | select a.* |
| | | from SYS_ROLE_USER a |
| | | from sys_role_user a |
| | | where a.role_id = #{roleId} |
| | | and a.user_id = #{userId} |
| | | </select> |
| | |
| | | <mapper namespace="com.zt.modules.sys.dao.SysTenantDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.modules.sys.model.SysTenant"> |
| | | select a.*, u.MOBILE adminMobile, u.real_name adminRealName |
| | | from SYS_TENANT a left join SYS_USER u on a.admin_user_id = u.id |
| | | select a.*, u.mobile adminMobile, u.real_name adminRealName |
| | | from sys_tenant a left join sys_user u on a.admin_user_id = u.id |
| | | where a.is_delete = 0 |
| | | <if test="code != null"> |
| | | and a.code like #{code} |
| | |
| | | |
| | | <select id="getList" resultType="com.zt.core.sys.model.SysUser"> |
| | | select a.* |
| | | ,(select t2.name from SYS_DEPT t2 where t2.id = a.dept_id) deptName |
| | | from SYS_USER a |
| | | ,(select t2.name from sys_dept t2 where t2.id = a.dept_id) deptName |
| | | from sys_user a |
| | | where a.is_delete = 0 |
| | | <if test="username != null and username.trim() != ''"> |
| | | and (a.username like #{username} or a.nick_name like #{username}) |
| | |
| | | , '1271368584383188993' as TENANT_ID |
| | | , a.username |
| | | , a.real_name |
| | | , a.MOBILE |
| | | , (select t2.name from SYS_DEPT t2 where t2.id = a.dept_id) deptName |
| | | from SYS_USER a |
| | | where a.del_flag = 0 |
| | | , a.mobile |
| | | , (select t2.name from sys_dept t2 where t2.id = a.dept_id) deptName |
| | | from sys_user a |
| | | where a.is_delete = 0 |
| | | and a.id = #{value} |
| | | limit 1 |
| | | </select> |
| | |
| | | , '1271368584383188993' as TENANT_ID |
| | | , a.username |
| | | , a.real_name |
| | | , a.MOBILE |
| | | , (select t2.name from SYS_DEPT t2 where t2.id = a.dept_id) deptName |
| | | , a.mobile |
| | | , (select t2.name from sys_dept t2 where t2.id = a.dept_id) deptName |
| | | , a.password |
| | | from SYS_USER a |
| | | from sys_user a |
| | | where a.is_delete = 0 |
| | | and username = #{value} |
| | | limit 1 |
| | | </select> |
| | | <select id="checkUserArea" resultType="com.zt.core.sys.model.SysUser"> |
| | | select a.* |
| | | from SYS_USER a, |
| | | from sys_user a, |
| | | sys_role_user b, |
| | | sys_role c |
| | | where b.IS_DELETE = 0 |
| | | and c.IS_DELETE = 0 |
| | | where b.is_delete = 0 |
| | | and c.is_delete = 0 |
| | | and a.id = #{userId} |
| | | and b.user_id = a.id |
| | | and c.id = b.role_id |
| | |
| | | ,'1271368584383188993' as TENANT_ID |
| | | ,a.username |
| | | ,a.real_name |
| | | ,a.MOBILE |
| | | ,a.mobile |
| | | ,a.password |
| | | from |
| | | SYS_USER a |
| | | sys_user a |
| | | where is_delete = 0 |
| | | and user_name = #{username} |
| | | <if test="unitid != null and unitid != ''"> |
| | | and dept_id = #{unitid} |
| | | </if> |
| | | <if test="code != null and code != ''"> |
| | | or dept_id in (select id from SYS_DEPT where code=#{code})) |
| | | or dept_id in (select id from sys_dept where code=#{code})) |
| | | </if> |
| | | <if test="password != null and password != ''"> |
| | | and password = #{password} |
| | |
| | | , '1271368584383188993' as TENANT_ID |
| | | , a.username |
| | | , a.real_name |
| | | , a.MOBILE |
| | | , (select t2.name from SYS_DEPT t2 where t2.id = a.dept_id) deptName |
| | | from SYS_USER a |
| | | , a.mobile |
| | | , (select t2.name from sys_dept t2 where t2.id = a.dept_id) deptName |
| | | from sys_user a |
| | | where a.is_delete = 0 |
| | | # and a.code = #{code} |
| | | </select> |
| | |
| | | SELECT |
| | | a.real_Name, |
| | | c.name as roleName, |
| | | (select name from SYS_DEPT d where a.DEPT_ID = d.ID AND d.is_delete=0 limit 1 ) as deptName |
| | | (select name from sys_dept d where a.dept_id = d.ID AND d.is_delete=0 limit 1 ) as deptName |
| | | FROM |
| | | SYS_USER a, |
| | | SYS_ROLE_USER b, |
| | | SYS_ROLE c, |
| | | sys_ROLE_MENU e, |
| | | sys_MENU f |
| | | sys_user a, |
| | | sys_role_user b, |
| | | sys_role c, |
| | | sys_role_menu e, |
| | | sys_menu f |
| | | WHERE 1=1 |
| | | <if test="userId != null and userId != ''"> |
| | | and a.id = #{userId} |
| | |
| | | <if test="username != null and username != ''"> |
| | | and a.username = #{username} |
| | | </if> |
| | | and a.ID = b.USER_ID |
| | | AND b.ROLE_ID = c.id |
| | | and a.id = b.user_id |
| | | AND b.role_id = c.id |
| | | and c.id = e.role_id |
| | | and e.menu_id = f.id |
| | | AND b.is_delete=0 |
| | |
| | | |
| | | <select id="getRoles" resultType="java.lang.String"> |
| | | SELECT group_concat(b.role_id) AS role_id |
| | | FROM SYS_ROLE_USER b |
| | | FROM sys_role_user b |
| | | WHERE b.is_delete = 0 |
| | | AND b.user_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="getRoleNames" resultType="java.lang.String"> |
| | | SELECT group_concat(a.name) AS name |
| | | FROM SYS_ROLE a, |
| | | SYS_ROLE_USER b |
| | | FROM sys_role a, |
| | | sys_role_user b |
| | | WHERE b.is_delete = 0 |
| | | AND b.user_id = #{userId} |
| | | and a.is_delete = 0 |
| | |
| | | |
| | | <update id="updateLogin"> |
| | | update |
| | | SYS_USER |
| | | sys_user |
| | | <trim prefix="set" suffixOverrides=","> |
| | | <if test="loginErrorCount!=null">login_error_count=#{loginErrorCount},</if> |
| | | <if test="isLocked!=null">is_locked=#{isLocked},</if> |
| | |
| | | ,'1271368584383188993' as TENANT_ID |
| | | ,b.username |
| | | ,b.real_name |
| | | ,b.MOBILE |
| | | ,b.mobile |
| | | FROM |
| | | SYS_USER b |
| | | sys_user b |
| | | WHERE |
| | | b.is_delete = 0 |
| | | and dept_id in |
| | |
| | | , '1271368584383188993' as TENANT_ID |
| | | , b.username |
| | | , b.real_name |
| | | , b.MOBILE |
| | | FROM SYS_USER b |
| | | , b.mobile |
| | | FROM sys_user b |
| | | WHERE b.is_delete = 0 |
| | | and b.id = #{id} |
| | | limit 1 |
| | |
| | | sys_role_user b, |
| | | sys_role c |
| | | WHERE |
| | | b.IS_DELETE = 0 |
| | | AND c.IS_DELETE = 0 |
| | | AND c.id = b.ROLE_ID |
| | | AND c.`CODE` IN ( 'xtglybm', 'ztsxlbm', 'dbsbm', 'zlbm', 'bzbm', 'czbm' ) |
| | | b.is_delete = 0 |
| | | AND c.is_delete = 0 |
| | | AND c.id = b.role_id |
| | | AND c.`code` IN ( 'xtglybm', 'ztsxlbm', 'dbsbm', 'zlbm', 'bzbm', 'czbm' ) |
| | | ) |
| | | ) |
| | | </select> |
| | |
| | | </select> |
| | | <update id="updatePassword"> |
| | | update |
| | | SYS_USER |
| | | sys_user |
| | | set password = #{password} |
| | | WHERE id=#{id} |
| | | </update> |
| | |
| | | ,b.dept_id |
| | | ,b.username |
| | | ,b.real_name |
| | | ,b.MOBILE |
| | | ,b.mobile |
| | | FROM |
| | | SYS_USER b |
| | | sys_user b |
| | | WHERE |
| | | is_delete = 0 |
| | | <if test="roleId!=null and roleId!=''"> |
| | | AND ID IN( |
| | | AND id IN( |
| | | SELECT |
| | | USER_ID |
| | | user_id |
| | | FROM |
| | | SYS_ROLE_USER |
| | | WHERE IS_DELETE = 0 and |
| | | ROLE_ID IN( |
| | | sys_role_user |
| | | WHERE is_delete = 0 and |
| | | role_id IN( |
| | | SELECT |
| | | ID |
| | | id |
| | | FROM |
| | | SYS_ROLE |
| | | sys_role |
| | | WHERE |
| | | CONCAT( ',', #{roleId}, ',' ) LIKE CONCAT( '%,', id, ',%' ) |
| | | ) |
| | |
| | | SELECT |
| | | id |
| | | FROM |
| | | SYS_DEPT |
| | | sys_dept |
| | | WHERE |
| | | CONCAT( ',', #{deptIds}, ',' ) LIKE CONCAT( '%,', id, ',%' ) |
| | | ) |
| | |
| | | , b.dept_id |
| | | , b.username |
| | | , b.real_name |
| | | , b.MOBILE |
| | | FROM SYS_USER b |
| | | , b.mobile |
| | | FROM sys_user b |
| | | WHERE is_delete = 0 |
| | | and id in ( |
| | | SELECT USER_ID |
| | | FROM SY_PROJECT_EXPERT |
| | | WHERE biz_ID = #{bizId} |
| | | SELECT user_id |
| | | FROM sy_project_expert |
| | | WHERE biz_id = #{bizId} |
| | | and flow_Code = #{code} |
| | | and step_Marker = #{stepMarker} |
| | | and step_marker = #{stepMarker} |
| | | and is_delete = 0 |
| | | ) |
| | | </select> |
| | |
| | | , b.dept_id |
| | | , b.username |
| | | , b.real_name |
| | | , b.MOBILE |
| | | FROM SYS_USER b |
| | | , b.mobile |
| | | FROM sys_user b |
| | | WHERE is_delete = 0 |
| | | and id = #{userId} |
| | | limit 1 |
| | |
| | | |
| | | <select id="getFlowFinish" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT id |
| | | FROM WF_RUN_TASK |
| | | WHERE IS_DELETE = 0 |
| | | AND (CONCAT('', flow_id) = #{wfDefIdCode} or flow_id in (select id from WF_DEF where code = #{wfDefIdCode})) |
| | | FROM wf_run_task |
| | | WHERE is_delete = 0 |
| | | AND (CONCAT('', flow_id) = #{wfDefIdCode} or flow_id in (select id from wf_def where code = #{wfDefIdCode})) |
| | | and biz_id = #{bizId} |
| | | AND status IN (100) |
| | | </select> |
| | | |
| | | <select id="queryCurrentTaskStep" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | SELECT * |
| | | FROM WF_DEF_STEP wds |
| | | WHERE IS_DELETE = 0 |
| | | and STEP_TYPE = 0 |
| | | FROM wf_def_step wds |
| | | WHERE is_delete = 0 |
| | | and step_type = 0 |
| | | AND id IN ( |
| | | SELECT step_id |
| | | FROM WF_RUN_TASK |
| | | WHERE IS_DELETE = 0 |
| | | AND (CONCAT('', flow_id) = #{wfDefIdCode} or flow_id in (select id from WF_DEF where IS_DELETE = 0 AND code = #{wfDefIdCode})) |
| | | FROM wf_run_task |
| | | WHERE is_delete = 0 |
| | | AND (CONCAT('', flow_id) = #{wfDefIdCode} or flow_id in (select id from wf_def where is_delete = 0 AND code = #{wfDefIdCode})) |
| | | and biz_id = #{bizId} |
| | | AND status IN (0, 1) |
| | | ) |
| | |
| | | |
| | | <select id="queryCurrentTaskStep100" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | SELECT * |
| | | FROM WF_DEF_STEP wds |
| | | WHERE IS_DELETE = 0 |
| | | and STEP_TYPE = 0 |
| | | FROM wf_def_step wds |
| | | WHERE is_delete = 0 |
| | | and step_type = 0 |
| | | AND id IN ( |
| | | SELECT step_id |
| | | FROM WF_RUN_TASK |
| | | WHERE IS_DELETE = 0 |
| | | AND (CONCAT('', flow_id) = #{wfDefIdCode} or flow_id in (select id from WF_DEF where IS_DELETE = 0 AND code = #{wfDefIdCode})) |
| | | FROM wf_run_task |
| | | WHERE is_delete = 0 |
| | | AND (CONCAT('', flow_id) = #{wfDefIdCode} or flow_id in (select id from wf_def where is_delete = 0 AND code = #{wfDefIdCode})) |
| | | and biz_id = #{bizId} |
| | | AND status IN (0, 1,100) |
| | | ) |
| | | </select> |
| | | |
| | | <update id="deleteFlowTask"> |
| | | update WF_RUN_TASK |
| | | update wf_run_task |
| | | set is_delete = 1 |
| | | ,UPDATE_DATE = CURRENT_TIMESTAMP |
| | | where IS_DELETE = 0 |
| | | ,update_date = CURRENT_TIMESTAMP |
| | | where is_delete = 0 |
| | | <if test="wfIdCodes!=null and wfIdCodes!=''"> |
| | | and FLOW_CODE = #{wfIdCodes} |
| | | and flow_code = #{wfIdCodes} |
| | | </if> |
| | | <if test="bizId!=null and bizId!=''"> |
| | | and biz_Id = #{bizId} |
| | | </if>; |
| | | update WF_RUN_INSTANCE |
| | | update wf_run_instance |
| | | set is_delete = 1 |
| | | ,UPDATE_DATE = CURRENT_TIMESTAMP |
| | | where IS_DELETE = 0 |
| | | ,update_date = CURRENT_TIMESTAMP |
| | | where is_delete = 0 |
| | | <if test="wfIdCodes!=null and wfIdCodes!=''"> |
| | | and FLOW_CODE = #{wfIdCodes} |
| | | and flow_code = #{wfIdCodes} |
| | | </if> |
| | | <if test="bizId!=null and bizId!=''"> |
| | | and biz_Id = #{bizId} |
| | |
| | | </update> |
| | | |
| | | <update id="setTaskStatus"> |
| | | update WF_RUN_TASK |
| | | update wf_run_task |
| | | set status=CASE WHEN receive_id = #{userId} THEN #{status} |
| | | ELSE #{status}+1 end |
| | | ,status2 = 0 |
| | |
| | | ,finish_time2 = NOW() |
| | | ,finish_id = #{userId} |
| | | ,finish_name = #{realName} |
| | | ,OPINION = #{option} |
| | | ,UPDATE_DATE = CURRENT_TIMESTAMP |
| | | where IS_DELETE = 0 |
| | | ,opinion = #{option} |
| | | ,update_date = CURRENT_TIMESTAMP |
| | | where is_delete = 0 |
| | | AND biz_id=#{bizId} |
| | | and step_id=#{stepId} |
| | | and status in (0,1) |
| | | <if test="taskGroup=='cj'"> |
| | | and RECEIVE_ID in (select user_id from SYS_USER where dept_ID in (select dept_ID from SYS_USER where user_id=#{userId})) |
| | | and receive_id in (select user_id from sys_user where dept_ID in (select dept_ID from sys_user where user_id=#{userId})) |
| | | </if> |
| | | <if test="taskGroup=='zy'"> |
| | | and RECEIVE_ID in (select teamgroup from SYS_user where user_id =#{userId}) |
| | | and receive_id in (select teamgroup from sys_user where user_id =#{userId}) |
| | | </if> |
| | | <if test="taskGroup=='br'"> |
| | | and RECEIVE_ID = #{userId} |
| | | and receive_id = #{userId} |
| | | </if> |
| | | <if test="taskGroup=='js'"> |
| | | and Group_id2 in (select ROLE_ID from sys_role_user where user_id =#{userId} and is_delete=0) |
| | | and group_id2 in (select role_id from sys_role_user where user_id =#{userId} and is_delete=0) |
| | | </if> |
| | | </update> |
| | | |
| | | <update id="setTaskPartFinish"> |
| | | UPDATE |
| | | WF_RUN_TASK |
| | | SET STATUS2 = ${status} |
| | | , UPDATE_DATE = CURRENT_TIMESTAMP |
| | | WHERE IS_DELETE = 0 |
| | | wf_run_task |
| | | SET status2 = ${status} |
| | | , update_date = CURRENT_TIMESTAMP |
| | | WHERE is_delete = 0 |
| | | AND biz_id = #{bizId} |
| | | AND STEP_ID = #{currentStepId} |
| | | AND step_id = #{currentStepId} |
| | | AND status in (0,1) |
| | | AND status2 not in (1) |
| | | </update> |
| | | |
| | | <update id="setTaskPartFinish2"> |
| | | UPDATE |
| | | WF_RUN_TASK |
| | | SET STATUS = ${status} |
| | | , UPDATE_DATE = CURRENT_TIMESTAMP |
| | | WHERE IS_DELETE = 0 |
| | | wf_run_task |
| | | SET status = ${status} |
| | | , update_date = CURRENT_TIMESTAMP |
| | | WHERE is_delete = 0 |
| | | AND biz_id = #{bizId} |
| | | AND receive_id = #{receiveId} |
| | | AND status in (0,1) |
| | |
| | | |
| | | <update id="setTaskPartFinish3"> |
| | | UPDATE |
| | | WF_RUN_TASK a, |
| | | wf_run_task a, |
| | | sys_user b |
| | | SET a.STATUS = ${status} |
| | | , a.UPDATE_DATE = CURRENT_TIMESTAMP |
| | | WHERE a.IS_DELETE = 0 |
| | | SET a.status = ${status} |
| | | , a.update_date = CURRENT_TIMESTAMP |
| | | WHERE a.is_delete = 0 |
| | | AND a.biz_id = #{bizId} |
| | | AND a.receive_id = b.id and b.dept_id = #{receiveDeptId} |
| | | AND a.status in (0,1) |
| | |
| | | |
| | | <update id="setTaskRefuse"> |
| | | UPDATE |
| | | WF_RUN_TASK |
| | | SET STATUS2 = ${status} |
| | | , UPDATE_DATE = CURRENT_TIMESTAMP |
| | | WHERE IS_DELETE = 0 |
| | | wf_run_task |
| | | SET status2 = ${status} |
| | | , update_date = CURRENT_TIMESTAMP |
| | | WHERE is_delete = 0 |
| | | AND biz_id = #{bizId} |
| | | AND STEP_ID IN ( |
| | | AND step_id IN ( |
| | | SELECT id |
| | | FROM ( |
| | | SELECT id |
| | | FROM WF_DEF_STEP |
| | | WHERE IS_DELETE = 0 |
| | | AND WF_DEF_ID IN ( |
| | | SELECT WF_DEF_ID |
| | | FROM WF_DEF_STEP |
| | | FROM wf_def_step |
| | | WHERE is_delete = 0 |
| | | AND wf_def_id IN ( |
| | | SELECT wf_def_id |
| | | FROM wf_def_step |
| | | WHERE id = #{currentStepId} |
| | | ) |
| | | AND step_no > ( |
| | | SELECT step_no |
| | | FROM WF_DEF_STEP |
| | | FROM wf_def_step |
| | | WHERE id = #{currentStepId} |
| | | ) |
| | | ) cc |
| | |
| | | |
| | | <select id="getSingleFlowStatus" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | |
| | | SELECT s.STEP_NO,b.*, |
| | | (select group_concat(RECEIVE_NAME) from WF_RUN_TASK c WHERE c.group_id=b.group_id AND (b.status=1 OR c.status in(20)) limit 0,3) AS RECEIVE_NAME |
| | | SELECT s.step_no,b.*, |
| | | (select group_concat(receive_name) from wf_run_task c WHERE c.group_id=b.group_id AND (b.status=1 OR c.status in(20)) limit 0,3) AS RECEIVE_NAME |
| | | FROM ( |
| | | SELECT id,biz_id,biz_group_id,flow_code,step_id,step_marker,group_id, |
| | | CASE WHEN status IN (20,21,100) THEN 20 |
| | |
| | | ELSE 0 end AS status |
| | | FROM (SELECT |
| | | * |
| | | FROM WF_RUN_TASK |
| | | WHERE IS_delete =0 |
| | | FROM wf_run_task |
| | | WHERE is_delete =0 |
| | | <if test="wfIdCodes!=null and wfIdCodes!=''"> |
| | | and ( CONCAT(',',#{wfIdCodes},',') like Concat('%,',CONCAT('',flow_id ),',%') |
| | | or CONCAT(',',#{wfIdCodes},',') like Concat('%,',flow_code,',%') ) |
| | |
| | | </select> |
| | | |
| | | <select id="getFlowStatus" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT s.STEP_NO,b.*, |
| | | (select group_concat(RECEIVE_NAME) from WF_RUN_TASK c WHERE c.group_id=b.group_id AND (b.status=1 OR c.status in(20)) limit 0,3) AS RECEIVE_NAME |
| | | SELECT s.step_no,b.*, |
| | | (select group_concat(receive_name) from wf_run_task c WHERE c.group_id=b.group_id AND (b.status=1 OR c.status in(20)) limit 0,3) AS RECEIVE_NAME |
| | | FROM ( |
| | | SELECT id,biz_id,biz_group_id,flow_code,step_id,step_marker,group_id, |
| | | CASE WHEN status IN (20,21,100) THEN 20 |
| | |
| | | FROM (SELECT |
| | | a.* |
| | | FROM |
| | | WF_RUN_TASK a |
| | | wf_run_task a |
| | | WHERE IS_delete =0 |
| | | and flow_code in (select code from WF_DEF where type = '1') |
| | | and flow_code in (select code from wf_def where type = '1') |
| | | <if test="wfIdCodes!=null and wfIdCodes!=''"> |
| | | and ( CONCAT(',',#{wfIdCodes},',') like Concat('%,',CONCAT('',flow_id ),',%') |
| | | or CONCAT(',',#{wfIdCodes},',') like Concat('%,',flow_code,',%') ) |
| | |
| | | group BY biz_id, |
| | | flow_code, |
| | | step_marker |
| | | )b ,WF_DEF_STEP s where b.step_id = s.id |
| | | )b ,wf_def_step s where b.step_id = s.id |
| | | order by flow_code,STEP_NO |
| | | </select> |
| | | |
| | | <select id="getFlowStatus2" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT s.STEP_NO, |
| | | SELECT s.step_no, |
| | | b.*, |
| | | (select group_concat(distinct RECEIVE_NAME) |
| | | from WF_RUN_TASK c |
| | | (select group_concat(distinct receive_name) |
| | | from wf_run_task c |
| | | WHERE (b.status = 1 OR c.status in (20)) |
| | | and group_id in (select group_id |
| | | from ( |
| | | select group_id, biz_id, flow_code, step_marker |
| | | from ( |
| | | SELECT group_id, biz_id, flow_code, step_marker |
| | | FROM WF_RUN_TASK |
| | | FROM wf_run_task |
| | | WHERE biz_group_id = #{bizGroupId} |
| | | ORDER BY receive_time desc |
| | | ) cc |
| | |
| | | sum(CASE WHEN status IN (20, 21, 100) THEN 1 ELSE 0 end) AS finishNum |
| | | FROM (select * |
| | | from (SELECT * |
| | | FROM WF_RUN_TASK |
| | | WHERE IS_delete = 0 |
| | | and flow_code in (select code from WF_DEF where type = '2') |
| | | FROM wf_run_task |
| | | WHERE is_delete = 0 |
| | | and flow_code in (select code from wf_def where type = '2') |
| | | and status IN (0, 1, 20, 21, 100) |
| | | and biz_group_id = #{bizGroupId} |
| | | ORDER BY receive_time desc |
| | |
| | | SELECT biz_group_id, |
| | | flow_code, |
| | | count(DISTINCT biz_group_id, flow_code, biz_id) AS totalNum |
| | | FROM WF_RUN_TASK a |
| | | WHERE IS_delete = 0 |
| | | and flow_code in (select code from WF_DEF where type = '2') |
| | | FROM wf_run_task a |
| | | WHERE is_delete = 0 |
| | | and flow_code in (select code from wf_def where type = '2') |
| | | and biz_group_id = #{bizGroupId} |
| | | GROUP BY biz_group_id, flow_code |
| | | ) b |
| | | WHERE a.biz_group_id = b.biz_group_id |
| | | AND a.flow_code = b.flow_code |
| | | ) b, |
| | | WF_DEF_STEP s |
| | | wf_def_step s |
| | | where b.step_marker = s.step_marker |
| | | order by flow_code, STEP_NO |
| | | </select> |
| | |
| | | FROM ( |
| | | SELECT |
| | | biz_group_id,flow_code,count(DISTINCT biz_id) AS totalNum, |
| | | (SELECT count(1) FROM WF_RUN_TASK b WHERE b.biz_group_id=a.biz_group_id AND b.status=100) AS finishNum |
| | | FROM WF_RUN_TASK a |
| | | (SELECT count(1) FROM wf_run_task b WHERE b.biz_group_id=a.biz_group_id AND b.status=100) AS finishNum |
| | | FROM wf_run_task a |
| | | WHERE IS_delete =0 |
| | | and flow_code in (select code from WF_DEF where type = '2') |
| | | <if test="wfIdCodes!=null and wfIdCodes!=''"> |
| | |
| | | </select> |
| | | |
| | | <select id="getPhaseFlowStatus" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | select CODE as FLOW_CODE, |
| | | select code as FLOW_CODE, |
| | | case |
| | | when exists(select 1 |
| | | from wf_run_instance b |
| | | where b.FLOW_ID = a.id |
| | | and b.BIZ_GROUP_ID = #{bizId} |
| | | where b.flow_id = a.id |
| | | and b.biz_group_id = #{bizId} |
| | | and b.status in (0, 1)) then 1 |
| | | when exists(select 1 |
| | | from wf_run_instance b |
| | | where b.FLOW_ID = a.id |
| | | and b.BIZ_GROUP_ID = #{bizId} |
| | | where b.flow_id = a.id |
| | | and b.biz_group_id = #{bizId} |
| | | and b.status in (20, 100)) then 20 |
| | | else 0 |
| | | end as status |
| | |
| | | </select> |
| | | |
| | | <select id="getFlowStepStatus" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT a.* FROM WF_RUN_TASK a, |
| | | SELECT a.* FROM wf_run_task a, |
| | | ( |
| | | SELECT a.id, |
| | | CASE WHEN finish_TIME IS NULL THEN cast('2500-1-1' AS DATE) |
| | | ELSE finish_TIME end finish_TIME |
| | | FROM WF_RUN_TASK a |
| | | WHERE IS_delete =0 |
| | | CASE WHEN finish_time IS NULL THEN cast('2500-1-1' AS DATE) |
| | | ELSE finish_time end finish_TIME |
| | | FROM wf_run_task a |
| | | WHERE is_delete =0 |
| | | AND status IN (0,1,20,100) |
| | | <if test="wfIdCodes!=null and wfIdCodes!=''"> |
| | | and ( CONCAT(',',#{wfIdCodes},',') like Concat('%,',CONCAT('',flow_id ),',%') |
| | |
| | | |
| | | <select id="isMyStep" resultType="java.lang.Integer"> |
| | | SELECT count(1) |
| | | FROM WF_RUN_TASK |
| | | FROM wf_run_task |
| | | WHERE is_delete = 0 |
| | | and biz_id = #{bizId} |
| | | and step_Marker = #{stepMarker} |
| | | and receive_Id = #{userId} |
| | | and receive_id = #{userId} |
| | | AND status IN (0, 1) |
| | | </select> |
| | | |
| | | <select id="isMyStepFinish" resultType="java.lang.Integer"> |
| | | SELECT count(1) |
| | | FROM WF_RUN_TASK |
| | | FROM wf_run_task |
| | | WHERE is_delete = 0 |
| | | and biz_id = #{bizId} |
| | | and step_Marker = #{stepMarker} |
| | | and receive_Id = #{userId} |
| | | and step_marker = #{stepMarker} |
| | | and receive_id = #{userId} |
| | | AND status in (20, 21) |
| | | </select> |
| | | |
| | | <select id="getFlowStepFinish" resultType="java.lang.Integer"> |
| | | SELECT count(1) |
| | | FROM WF_RUN_TASK |
| | | FROM wf_run_task |
| | | WHERE is_delete = 0 |
| | | and biz_id = #{bizId} |
| | | and step_Marker = #{stepIdMark} |
| | | and step_marker = #{stepIdMark} |
| | | and (CONCAT('', flow_id) = #{wfIdCode} or flow_code = #{wfIdCode}) |
| | | AND status IN (0, 1) |
| | | </select> |
| | | |
| | | <select id="getFlowStepFinish2" resultType="java.lang.Integer"> |
| | | SELECT count(1) |
| | | FROM WF_RUN_TASK |
| | | FROM wf_run_task |
| | | WHERE is_delete = 0 |
| | | and biz_id = #{bizId} |
| | | and step_Marker = #{stepIdMark} |
| | | and step_marker = #{stepIdMark} |
| | | and (CONCAT('', flow_id) = #{wfIdCode} or flow_code = #{wfIdCode}) |
| | | AND status IN (20, 21, 100) |
| | | </select> |
| | |
| | | <select id="getStepCount" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT * |
| | | FROM ( |
| | | SELECT a.step_marker, (CASE WHEN b.num IS NULL THEN 0 ELSE b.num end) status, a.STEP_NO |
| | | FROM WF_DEF_STEP a /*liquan*/ |
| | | SELECT a.step_marker, (CASE WHEN b.num IS NULL THEN 0 ELSE b.num end) status, a.step_no |
| | | FROM wf_def_step a /*liquan*/ |
| | | LEFT JOIN ( |
| | | SELECT step_marker, count(1) AS Num |
| | | FROM (select * |
| | | from (SELECT * |
| | | FROM WF_RUN_TASK |
| | | WHERE IS_delete = 0 |
| | | FROM wf_run_task |
| | | WHERE is_delete = 0 |
| | | and status IN (0, 1, 100) |
| | | and biz_Group_id = #{bizId} |
| | | and biz_group_id = #{bizId} |
| | | and flow_code = #{wfIdCode} |
| | | ORDER BY receive_time desc |
| | | ) d /*liquan*/ |
| | |
| | | ) cc |
| | | GROUP BY biz_group_id, flow_id, flow_code, step_marker |
| | | ) b ON a.step_marker = b.step_marker |
| | | WHERE a.WF_DEF_ID IN (SELECT id FROM WF_DEF WHERE CODE = #{wfIdCode}) |
| | | WHERE a.wf_def_id IN (SELECT id FROM wf_def WHERE code = #{wfIdCode}) |
| | | UNION |
| | | SELECT 'total', |
| | | count(DISTINCT biz_group_id, flow_code, biz_id) AS status, |
| | | 900 |
| | | FROM WF_RUN_TASK a |
| | | WHERE IS_delete = 0 |
| | | and biz_Group_id = #{bizId} |
| | | FROM wf_run_task a |
| | | WHERE is_delete = 0 |
| | | and biz_group_id = #{bizId} |
| | | and flow_code = #{wfIdCode} |
| | | GROUP BY biz_group_id, flow_code |
| | | ) c |
| | |
| | | |
| | | <select id="getBizTaskCount" resultType="java.lang.Integer"> |
| | | SELECT count(1) |
| | | FROM WF_RUN_TASK |
| | | FROM wf_run_task |
| | | WHERE is_delete = 0 |
| | | and biz_id = #{bizId} |
| | | and flow_code = #{wfIdCode} |
| | | </select> |
| | | |
| | | <update id="setTaskRecall"> |
| | | UPDATE WF_RUN_TASK |
| | | SET STATUS = 0 |
| | | , UPDATE_DATE = CURRENT_TIMESTAMP |
| | | WHERE IS_DELETE = 0 |
| | | UPDATE wf_run_task |
| | | SET status = 0 |
| | | , update_date = CURRENT_TIMESTAMP |
| | | WHERE is_delete = 0 |
| | | AND id = #{taskId} |
| | | and (CONCAT('', flow_id) = #{wfIdCode} or flow_code = #{wfIdCode}); |
| | | |
| | | UPDATE WF_RUN_TASK |
| | | SET IS_DELETE = 1 |
| | | , UPDATE_DATE = CURRENT_TIMESTAMP |
| | | WHERE IS_DELETE = 0 |
| | | AND PREV_ID = #{taskId} |
| | | UPDATE wf_run_task |
| | | SET is_delete = 1 |
| | | , update_date = CURRENT_TIMESTAMP |
| | | WHERE is_delete = 0 |
| | | AND prev_id = #{taskId} |
| | | </update> |
| | | |
| | | |
| | |
| | | and a.user_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="getPlanStatus" resultType="java.lang.Integer"> |
| | | SELECT CURRENT_STATE |
| | | FROM zhgl_annual_plan a |
| | | WHERE a.is_delete = 0 |
| | | and a.id = #{bizId} |
| | | </select> |
| | | <select id="getConnectInformation" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT * |
| | | FROM `wf_run_task` |
| | | where STEP_MARKER in ('yxsc_bb', 'sgqd_bb', 'plan_tybx') |
| | | where step_marker in ('yxsc_bb', 'sgqd_bb', 'plan_tybx') |
| | | and status in (0, 1) |
| | | and RECEIVE_ID in |
| | | and receive_id in |
| | | (select user_id from sys_user where DEPT_ID = #{oldShipTeam}) |
| | | and is_delete = 0 |
| | | group by FLOW_CODE, STEP_MARKER, BIZ_ID |
| | | group by flow_code, step_marker, biz_id |
| | | </select> |
| | | |
| | | <select id="getFlowTrack" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | select * from ( |
| | | select step_name,RECEIVE_NAME,RECEIVE_TIME,FINISH_TIME |
| | | select step_name,receive_name,receive_time,finish_time |
| | | from wf_run_task |
| | | where FLOW_CODE=#{flowCode} and BIZ_ID=#{bizId} and is_delete = 0 and status='20' |
| | | where flow_code=#{flowCode} and biz_id=#{bizId} and is_delete = 0 and status='20' |
| | | union |
| | | select step_name,GROUP_CONCAT(RECEIVE_NAME) as RECEIVE_NAME,RECEIVE_TIME,FINISH_TIME |
| | | select step_name,GROUP_CONCAT(receive_name) as RECEIVE_NAME,receive_time,finish_time |
| | | from wf_run_task |
| | | where FLOW_CODE=#{flowCode} and BIZ_ID=#{bizId} and is_delete = 0 |
| | | where flow_code=#{flowCode} and biz_id=#{bizId} and is_delete = 0 |
| | | and status in (0,1) |
| | | group by step_name,RECEIVE_TIME,FINISH_TIME |
| | | ) b order by RECEIVE_TIME |
| | | group by step_name,receive_time,finish_time |
| | | ) b order by receive_time |
| | | </select> |
| | | |
| | | <select id="isExistsStep" resultType="java.lang.Integer"> |
| | |
| | | wf_def_step b |
| | | where |
| | | a.biz_id = #{bizId} and a.status in (0,20) |
| | | and a.step_id = b.id and b.EXEC_ONE = 1 |
| | | and a.step_id = b.id and b.exec_one = 1 |
| | | <if test="currentStepId != 0"> |
| | | and a.STEP_ID = #{currentStepId} |
| | | and a.step_id = #{currentStepId} |
| | | </if> |
| | | <if test="stepMarker != null"> |
| | | and a.STEP_MARKER = #{stepMarker} |
| | | and a.step_marker = #{stepMarker} |
| | | </if> |
| | | |
| | | </select> |
| | |
| | | a.biz_id = #{bizId} and a.status in (0,1) |
| | | and a.step_id = b.id and a.is_delete = 0 and b.is_delete = 0 |
| | | <if test="currentStepId != 0"> |
| | | and a.STEP_ID = #{currentStepId} |
| | | and a.step_id = #{currentStepId} |
| | | </if> |
| | | <if test="stepMarker != null"> |
| | | and a.STEP_MARKER = #{stepMarker} |
| | | and a.step_marker = #{stepMarker} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getFlowStepName" resultType="java.lang.String"> |
| | | SELECT |
| | | STEP_NAME |
| | | step_name |
| | | FROM |
| | | wf_run_task |
| | | WHERE |
| | | FLOW_CODE = #{wfIdCodes} |
| | | AND BIZ_ID = #{bizId} |
| | | AND `STATUS` = 0 |
| | | flow_code = #{wfIdCodes} |
| | | AND biz_id = #{bizId} |
| | | AND `status` = 0 |
| | | LIMIT 0,1 |
| | | </select> |
| | | <select id="getRunFlow" resultType="com.zt.common.entity.FlowInfo"> |
| | | select * from ( |
| | | select distinct(a.biz_id) biz_id, a.STEP_MARKER,b.STEP_NO |
| | | select distinct(a.biz_id) biz_id, a.step_marker,b.step_no |
| | | from wf_run_task a |
| | | ,wf_def_step b |
| | | where a.STEP_ID = b.id and a.FLOW_CODE ='${flowCode}' |
| | | where a.step_id = b.id and a.flow_code ='${flowCode}' |
| | | <if test="bizIds != null"> |
| | | and a.BIZ_ID in |
| | | and a.biz_id in |
| | | <foreach item="item" collection="bizIds" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | |
| | | |
| | | <update id="updateConnect"> |
| | | update `wf_run_task` |
| | | set is_delete =1,UPDATE_DATE = CURRENT_TIMESTAMP |
| | | where STEP_MARKER in ('yxsc_bb', 'sgqd_bb', 'plan_tybx') |
| | | set is_delete =1,update_date = CURRENT_TIMESTAMP |
| | | where step_marker in ('yxsc_bb', 'sgqd_bb', 'plan_tybx') |
| | | and status in (0, 1) |
| | | and RECEIVE_ID in |
| | | (select user_id from sys_user where DEPT_ID = #{oldShipTeam}) |
| | | and receive_id in |
| | | (select user_id from sys_user where dept_id = #{oldShipTeam}) |
| | | and is_delete = 0 |
| | | </update> |
| | | |
| | | <update id="setReStartStatus"> |
| | | update `wf_run_task` |
| | | set status = 150,UPDATE_DATE = CURRENT_TIMESTAMP |
| | | set status = 150,update_date = CURRENT_TIMESTAMP |
| | | where flow_code = #{wfIdCode} |
| | | and biz_id = #{bizId} |
| | | and is_delete = 0 |
| | |
| | | |
| | | <update id="deleteFlowStep"> |
| | | delete from wf_run_task |
| | | where FLOW_CODE = #{wfIdCode} |
| | | and STEP_MARKER = #{stepIdMark} |
| | | and BIZ_ID = #{bizId} |
| | | where flow_code = #{wfIdCode} |
| | | and step_marker = #{stepIdMark} |
| | | and biz_id = #{bizId} |
| | | </update> |
| | | </mapper> |
| | |
| | | wds.*, |
| | | s1.name as stepRouterName, |
| | | s2.name as stepReadRouterName, |
| | | case when task_Group='cj' then '厂家' |
| | | when task_Group='zy' then '专业' |
| | | case when task_group='cj' then '厂家' |
| | | when task_group='zy' then '专业' |
| | | else '' end as taskGroupName |
| | | FROM |
| | | WF_DEF_STEP wds |
| | | LEFT JOIN WF_DEF a ON a.id = WF_DEF_ID |
| | | left join SYS_MENU s1 on s1.id = wds.STEP_ROUTER_ID |
| | | left join SYS_MENU s2 on s2.id = wds.STEP_READ_ROUTER_ID |
| | | wf_def_step wds |
| | | LEFT JOIN wf_def a ON a.id = wf_def_id |
| | | left join sys_menu s1 on s1.id = wds.step_router_id |
| | | left join sys_menu s2 on s2.id = wds.step_read_router_id |
| | | <where> |
| | | <if test="whereSql!=null"> |
| | | ${whereSql} |
| | |
| | | and a.id = #{id} |
| | | and wds.is_delete = 0 |
| | | </where> |
| | | order by wds.STEP_NO |
| | | order by wds.step_no |
| | | </select> |
| | | |
| | | <select id="workflowSelect" resultType="com.zt.modules.workflowconfig.model.WfDef"> |
| | | SELECT |
| | | id, |
| | | NAME |
| | | name |
| | | FROM |
| | | WF_DEF |
| | | wf_def |
| | | WHERE |
| | | status = 1 and is_delete = 0 |
| | | order by id |
| | |
| | | <select id="getUserByWorkflowSteps" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | SELECT |
| | | a.id as stepId, |
| | | b.user_id as userId, |
| | | b.id as userId, |
| | | b.user_name as userName, |
| | | b.nick_name as realName, |
| | | c.dept_name AS deptName, |
| | | d.dept_name AS companyName |
| | | FROM |
| | | WF_DEF_STEP a |
| | | LEFT JOIN SYS_USER b ON instr(a.APPROVER_IDS,b.id) > 0 |
| | | LEFT JOIN SYS_DEPT c ON b.dept_id = c.id |
| | | LEFT JOIN SYS_DEPT d ON b.COMPANY_ID = d.id |
| | | wf_def_step a |
| | | LEFT JOIN sys_user b ON instr(a.approver_ids,b.id) > 0 |
| | | LEFT JOIN sys_dept c ON b.dept_id = c.id |
| | | LEFT JOIN sys_dept d ON b.company_id = d.id |
| | | WHERE |
| | | a.is_delete = 0 |
| | | AND a.id = #{stepsId} |
| | |
| | | SELECT |
| | | a.* |
| | | FROM |
| | | SYS_USER a, |
| | | WF_DEF_STEP b |
| | | sys_user a, |
| | | wf_def_step b |
| | | WHERE |
| | | ( |
| | | b.APPROVER_IDS IS NULL |
| | | or CONCAT( ',', b.APPROVER_IDS, ',' ) NOT LIKE CONCAT( '%,', a.user_id, ',%' ) |
| | | b.approver_ids IS NULL |
| | | or CONCAT( ',', b.approver_ids, ',' ) NOT LIKE CONCAT( '%,', a.user_id, ',%' ) |
| | | ) |
| | | <if test="whereSql!=null"> |
| | | and ${whereSql} |
| | |
| | | AND a.is_delete = 0 |
| | | ORDER BY a.name |
| | | ) a |
| | | LEFT JOIN SYS_DEPT c ON a.dept_id = c.id |
| | | LEFT JOIN sys_dept c ON a.dept_id = c.id |
| | | </select> |
| | | |
| | | <update id="addWorkflowStepsUser"> |
| | | update WF_DEF_STEP set APPROVER_IDS = #{userId},UPDATE_DATE = CURRENT_TIMESTAMP where id = #{stepId} |
| | | update wf_def_step set approver_ids = #{userId},update_date = CURRENT_TIMESTAMP where id = #{stepId} |
| | | </update> |
| | | |
| | | <update id="deleteWorkflowStepsUser"> |
| | | update WF_DEF_STEP set APPROVER_IDS = #{userId},UPDATE_DATE = CURRENT_TIMESTAMP where id = #{stepId} |
| | | update wf_def_step set approver_ids = #{userId},update_date = CURRENT_TIMESTAMP where id = #{stepId} |
| | | </update> |
| | | |
| | | <update id="delete"> |
| | | update WF_DEF_STEP set is_delete = 1,UPDATE_DATE = CURRENT_TIMESTAMP where id = #{id} |
| | | update wf_def_step set is_delete = 1,update_date = CURRENT_TIMESTAMP where id = #{id} |
| | | </update> |
| | | |
| | | <select id="getRoleByWorkflowSteps" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | |
| | | b.name as roleName, |
| | | d.name AS companyName |
| | | FROM |
| | | WF_DEF_STEP a |
| | | LEFT JOIN SYS_ROLE b ON instr(a.APPROVER_ROLE_IDS,b.id) > 0 |
| | | LEFT JOIN SYS_DEPT d ON b.COMPANY_ID = d.id |
| | | wf_def_step a |
| | | LEFT JOIN sys_role b ON instr(a.approver_role_ids,b.id) > 0 |
| | | LEFT JOIN sys_dept d ON b.company_id = d.id |
| | | WHERE |
| | | a.is_delete = 0 |
| | | AND a.id = #{stepsId} |
| | |
| | | SELECT |
| | | a.* |
| | | FROM |
| | | SYS_ROLE a, |
| | | WF_DEF_STEP b |
| | | sys_role a, |
| | | wf_def_step b |
| | | WHERE |
| | | ( |
| | | b.APPROVER_ROLE_IDS IS NULL |
| | | or CONCAT( ',', b.APPROVER_ROLE_IDS, ',' ) NOT LIKE CONCAT( '%,', a.id, ',%' ) |
| | | b.approver_role_ids IS NULL |
| | | or CONCAT( ',', b.approver_role_ids, ',' ) NOT LIKE CONCAT( '%,', a.id, ',%' ) |
| | | ) |
| | | <if test="whereSql!=null"> |
| | | and ${whereSql} |
| | |
| | | AND a.is_delete = 0 |
| | | |
| | | ) a |
| | | LEFT JOIN SYS_DEPT d ON a.COMPANY_ID = d.id |
| | | LEFT JOIN sys_dept d ON a.company_id = d.id |
| | | ORDER BY d.name, a.sort |
| | | </select> |
| | | |
| | | <update id="addWorkflowStepsRole"> |
| | | update WF_DEF_STEP set APPROVER_ROLE_IDS = #{roleId},UPDATE_DATE = CURRENT_TIMESTAMP where id = #{stepId} |
| | | update wf_def_step set approver_role_ids = #{roleId},update_date = CURRENT_TIMESTAMP where id = #{stepId} |
| | | </update> |
| | | |
| | | <update id="deleteWorkflowStepsRole"> |
| | | update WF_DEF_STEP set APPROVER_ROLE_IDS = #{roleId},UPDATE_DATE = CURRENT_TIMESTAMP where id = #{stepId} |
| | | update wf_def_step set approver_role_ids = #{roleId},update_date = CURRENT_TIMESTAMP where id = #{stepId} |
| | | </update> |
| | | |
| | | <update id="deleteFlowMenu"> |
| | | update SYS_ROLE_MENU set is_delete=0,UPDATE_DATE = CURRENT_TIMESTAMP WHERE ID IN |
| | | update sys_role_menu set is_delete=0,update_date = CURRENT_TIMESTAMP WHERE ID IN |
| | | ( |
| | | SELECT id FROM ( |
| | | SELECT * FROM ( |
| | | SELECT a.STEP_ROUTER_ID AS menu_id,b.id AS role_id FROM WF_DEF_STEP a ,SYS_ROLE b |
| | | WHERE a.IS_DELETE =0 AND b.IS_DELETE=0 |
| | | AND CONCAT(',',a.APPROVER_ROLE_IDS,',') LIKE CONCAT(',',b.id,',') |
| | | SELECT a.step_router_id AS menu_id,b.id AS role_id FROM wf_def_step a ,sys_role b |
| | | WHERE a.is_delete =0 AND b.is_delete=0 |
| | | AND CONCAT(',',a.approver_role_ids,',') LIKE CONCAT(',',b.id,',') |
| | | UNION |
| | | SELECT a.STEP_READ_ROUTER_ID AS menu_id,b.id AS role_id FROM WF_DEF_STEP a ,SYS_ROLE b |
| | | WHERE a.IS_DELETE =0 AND b.IS_DELETE=0 |
| | | AND CONCAT(',',a.APPROVER_ROLE_IDS,',') LIKE CONCAT(',',b.id,',') |
| | | SELECT a.step_read_router_id AS menu_id,b.id AS role_id FROM wf_def_step a ,sys_role b |
| | | WHERE a.is_delete =0 AND b.is_delete=0 |
| | | AND CONCAT(',',a.approver_role_ids,',') LIKE CONCAT(',',b.id,',') |
| | | ) |
| | | WHERE menu_id IS NOT NULL |
| | | GROUP BY menu_id,role_id |
| | | ) b,SYS_ROLE_MENU c WHERE b.menu_id=c.menu_id AND b.role_id=c.role_id |
| | | ) b,sys_role_menu c WHERE b.menu_id=c.menu_id AND b.role_id=c.role_id |
| | | ) |
| | | </update> |
| | | |
| | | <select id="selectFlowMenu" resultType="com.zt.modules.workflowconfig.dto.FlowMenuDto"> |
| | | select c.*,d.id as id2,d.menu_id as menuId2 from ( |
| | | SELECT * FROM ( |
| | | SELECT a.STEP_ROUTER_ID AS menu_id,b.id AS role_id |
| | | FROM WF_DEF_STEP a ,SYS_ROLE b |
| | | WHERE a.IS_DELETE =0 AND b.IS_DELETE=0 |
| | | AND CONCAT(',',a.APPROVER_ROLE_IDS,',') LIKE CONCAT('%,',b.id,',%') |
| | | SELECT a.step_router_id AS menu_id,b.id AS role_id |
| | | FROM wf_def_step a ,sys_role b |
| | | WHERE a.is_delete =0 AND b.is_delete=0 |
| | | AND CONCAT(',',a.approver_role_ids,',') LIKE CONCAT('%,',b.id,',%') |
| | | UNION |
| | | SELECT a.STEP_READ_ROUTER_ID AS menu_id,b.id AS role_id |
| | | FROM WF_DEF_STEP a ,SYS_ROLE b |
| | | WHERE a.IS_DELETE =0 AND b.IS_DELETE=0 |
| | | AND CONCAT(',',a.APPROVER_ROLE_IDS,',') LIKE CONCAT('%,',b.id,',%') |
| | | SELECT a.step_read_router_id AS menu_id,b.id AS role_id |
| | | FROM wf_def_step a ,sys_role b |
| | | WHERE a.is_delete =0 AND b.is_delete=0 |
| | | AND CONCAT(',',a.approver_role_ids,',') LIKE CONCAT('%,',b.id,',%') |
| | | ) b |
| | | WHERE menu_id IS NOT NULL AND menu_id <> 0 |
| | | GROUP BY menu_id,role_id |
| | | )c |
| | | left join sys_role_menu d on d.role_id = c.role_id and d.menu_id = c.menu_id |
| | | where d.IS_DELETE is null or d.IS_DELETE = 1 |
| | | where d.is_delete is null or d.is_delete = 1 |
| | | </select> |
| | | <update id="deleteRoleFlowMenu"> |
| | | update sys_role_menu set is_delete =1,UPDATE_DATE = CURRENT_TIMESTAMP where id in (select id2 from (select c.*,d.id as id2 from ( |
| | | update sys_role_menu set is_delete =1,update_date = CURRENT_TIMESTAMP where id in (select id2 from (select c.*,d.id as id2 from ( |
| | | SELECT * FROM ( |
| | | SELECT a.STEP_ROUTER_ID AS menu_id,b.id AS role_id |
| | | FROM WF_DEF_STEP a ,SYS_ROLE b |
| | | WHERE a.IS_DELETE =0 AND b.IS_DELETE=0 |
| | | AND CONCAT(',',a.APPROVER_ROLE_IDS,',') LIKE CONCAT('%,',b.id,',%') |
| | | SELECT a.step_router_id AS menu_id,b.id AS role_id |
| | | FROM wf_def_step a ,sys_role b |
| | | WHERE a.is_delete =0 AND b.is_delete=0 |
| | | AND CONCAT(',',a.approver_role_ids,',') LIKE CONCAT('%,',b.id,',%') |
| | | UNION |
| | | SELECT a.STEP_READ_ROUTER_ID AS menu_id,b.id AS role_id |
| | | FROM WF_DEF_STEP a ,SYS_ROLE b |
| | | WHERE a.IS_DELETE =0 AND b.IS_DELETE=0 |
| | | AND CONCAT(',',a.APPROVER_ROLE_IDS,',') LIKE CONCAT('%,',b.id,',%') |
| | | SELECT a.step_read_router_id AS menu_id,b.id AS role_id |
| | | FROM wf_def_step a ,sys_role b |
| | | WHERE a.is_delete =0 AND b.is_delete=0 |
| | | AND CONCAT(',',a.approver_role_ids,',') LIKE CONCAT('%,',b.id,',%') |
| | | ) b |
| | | WHERE menu_id IS NOT NULL AND menu_id <> 0 |
| | | GROUP BY menu_id,role_id |
| | | )c |
| | | join sys_role_menu d |
| | | join sys_menu m |
| | | where d.menu_id = c.menu_id and d.MENU_ID = m.id and m.SHOW_MENU = 0 |
| | | where d.menu_id = c.menu_id and d.menu_id = m.id and m.show_menu = 0 |
| | | ) f where f.role_id is null |
| | | ) |
| | | </update> |
| | | |
| | | <select id="selectFlowMenuOld" resultType="com.zt.modules.workflowconfig.dto.FlowMenuDto"> |
| | | WITH menuList AS ( |
| | | SELECT STEP_ROUTER_ID AS step_menu_id FROM WF_DEF_STEP WHERE IS_DELETE =0 AND STEP_ROUTER_ID IS NOT null |
| | | SELECT step_router_id AS step_menu_id FROM wf_def_step WHERE is_delete =0 AND step_router_id IS NOT null |
| | | UNION |
| | | SELECT STEP_READ_ROUTER_ID AS step_menu_id FROM WF_DEF_STEP WHERE IS_DELETE =0 AND STEP_READ_ROUTER_ID IS NOT null |
| | | SELECT step_read_router_id AS step_menu_id FROM wf_def_step WHERE is_delete =0 AND step_read_router_id IS NOT null |
| | | ), |
| | | shoudList AS ( |
| | | SELECT * FROM ( |
| | | SELECT a.STEP_ROUTER_ID AS menu_id,b.id AS role_id |
| | | FROM WF_DEF_STEP a ,SYS_ROLE b |
| | | WHERE a.IS_DELETE =0 AND b.IS_DELETE=0 |
| | | AND CONCAT(',',a.APPROVER_ROLE_IDS,',') LIKE CONCAT('%,',b.id,',%') |
| | | SELECT a.step_router_id AS menu_id,b.id AS role_id |
| | | FROM wf_def_step a ,sys_role b |
| | | WHERE a.is_delete =0 AND b.is_delete=0 |
| | | AND CONCAT(',',a.approver_role_ids,',') LIKE CONCAT('%,',b.id,',%') |
| | | UNION |
| | | SELECT a.STEP_READ_ROUTER_ID AS menu_id,b.id AS role_id |
| | | FROM WF_DEF_STEP a ,SYS_ROLE b |
| | | WHERE a.IS_DELETE =0 AND b.IS_DELETE=0 |
| | | AND CONCAT(',',a.APPROVER_ROLE_IDS,',') LIKE CONCAT('%,',b.id,',%') |
| | | SELECT a.step_read_router_id AS menu_id,b.id AS role_id |
| | | FROM wf_def_step a ,sys_role b |
| | | WHERE a.is_delete =0 AND b.is_delete=0 |
| | | AND CONCAT(',',a.approver_role_ids,',') LIKE CONCAT('%,',b.id,',%') |
| | | ) |
| | | WHERE menu_id IS NOT NULL AND menu_id <> 0 |
| | | GROUP BY menu_id,role_id |
| | | ),existList as( |
| | | SELECT id as id2, menu_id AS menu_id2, role_id AS role_id2, is_delete AS is_delete2 |
| | | FROM SYS_ROLE_MENU b |
| | | FROM sys_role_menu b |
| | | WHERE menu_id IN (SELECT step_menu_id from menuList) |
| | | AND role_id NOT IN (1331061516255227905,1271368584383188993) |
| | | ) |
| | |
| | | |
| | | <select id="querySteps" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | |
| | | SELECT wds.* FROM WF_DEF_STEP wds LEFT JOIN WF_DEF wd ON wds.WF_DEF_ID=wd.ID WHERE |
| | | wd.CODE=#{wfCode} AND wds.IS_DELETE=0 ORDER BY wds.STEP_NO ASC LIMIT 1 |
| | | SELECT wds.* FROM wf_def_step wds LEFT JOIN wf_def wd ON wds.wf_def_id=wd.ID WHERE |
| | | wd.code=#{wfCode} AND wds.is_delete=0 ORDER BY wds.step_no ASC LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="queryAllSteps" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | SELECT wds.* FROM WF_DEF_STEP wds LEFT JOIN WF_DEF wd ON wds.WF_DEF_ID=wd.ID WHERE |
| | | wd.CODE=#{wfCode} AND wds.IS_DELETE=0 ORDER BY wds.STEP_NO ASC LIMIT 100 |
| | | SELECT wds.* FROM wf_def_step wds LEFT JOIN wf_def wd ON wds.wf_def_id=wd.id WHERE |
| | | wd.code=#{wfCode} AND wds.is_delete=0 ORDER BY wds.step_no ASC LIMIT 100 |
| | | </select> |
| | | |
| | | <select id="getAllSteps" resultType="java.lang.String"> |
| | | SELECT STEP_MARKER |
| | | FROM WF_DEF_STEP |
| | | SELECT step_marker |
| | | FROM wf_def_step |
| | | WHERE is_delete = 0 |
| | | AND STEP_NO <> 100 |
| | | ORDER BY WF_DEF_ID,STEP_NO |
| | | AND step_no <> 100 |
| | | ORDER BY wf_def_id,step_no |
| | | </select> |
| | | |
| | | <select id="queryWfDefFirstStep" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | SELECT * FROM WF_DEF_STEP wds |
| | | SELECT * FROM wf_def_step wds |
| | | WHERE 1=1 |
| | | <if test="wfDefIdCode!=null"> |
| | | and (CONCAT('',WF_DEF_ID ) =#{wfDefIdCode} or WF_DEF_ID in (select id from WF_DEF where code=#{wfDefIdCode})) |
| | | and (CONCAT('',wf_def_id ) =#{wfDefIdCode} or wf_def_id in (select id from wf_def where code=#{wfDefIdCode})) |
| | | </if> |
| | | ORDER BY wds.STEP_NO ASC LIMIT 1 |
| | | ORDER BY wds.step_no ASC LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="queryWfDefFinallyStep" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | SELECT * FROM WF_DEF_STEP wds |
| | | WHERE 1=1 and wds.IS_DELETE=0 |
| | | SELECT * FROM wf_def_step wds |
| | | WHERE 1=1 and wds.is_delete=0 |
| | | <if test="wfDefIdCode!=null"> |
| | | and (CONCAT('',WF_DEF_ID ) = #{wfDefIdCode} or WF_DEF_ID in (select id from WF_DEF where code=#{wfDefIdCode})) |
| | | and (CONCAT('',wf_def_id ) = #{wfDefIdCode} or wf_def_id in (select id from wf_def where code=#{wfDefIdCode})) |
| | | </if> |
| | | ORDER BY wds.STEP_NO desc LIMIT 1 |
| | | ORDER BY wds.step_no desc LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="queryWfDefStep" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | SELECT * FROM WF_DEF_STEP wds |
| | | SELECT * FROM wf_def_step wds |
| | | WHERE 1=1 |
| | | <if test="wfDefIdCode!=null"> |
| | | and (CONCAT('',WF_DEF_ID ) =#{wfDefIdCode} or WF_DEF_ID in (select id from WF_DEF where code=#{wfDefIdCode})) /*liquan*/ |
| | | and (CONCAT('',wf_def_id ) =#{wfDefIdCode} or wf_def_id in (select id from wf_def where code=#{wfDefIdCode})) /*liquan*/ |
| | | </if> |
| | | <if test="stepIdMarker!=null"> |
| | | and (CONCAT('',id) = #{stepIdMarker} or step_Marker = #{stepIdMarker}) /*liquan*/ |
| | | </if> |
| | | ORDER BY wds.STEP_NO desc LIMIT 1 |
| | | ORDER BY wds.step_no desc LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="queryWfDefNextStep" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | <![CDATA[ |
| | | SELECT * |
| | | FROM WF_DEF_STEP wds |
| | | WHERE is_Delete = 0 |
| | | and STEP_TYPE = 0 |
| | | and wds.WF_DEF_ID=#{wfDefId} |
| | | AND wds.STEP_NO > #{stepNo} |
| | | ORDER BY wds.STEP_NO ASC LIMIT 1 |
| | | FROM wf_def_step wds |
| | | WHERE is_delete = 0 |
| | | and step_type = 0 |
| | | and wds.wf_def_id=#{wfDefId} |
| | | AND wds.step_no > #{stepNo} |
| | | ORDER BY wds.step_no ASC LIMIT 1 |
| | | ]]> |
| | | </select> |
| | | |
| | | <select id="queryWfDefPreStep" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | <![CDATA[ |
| | | SELECT * |
| | | FROM WF_DEF_STEP wds |
| | | WHERE is_Delete = 0 |
| | | and STEP_TYPE = 0 |
| | | AND wds.WF_DEF_ID = #{wfDefId} |
| | | AND wds.STEP_NO < #{stepNo} |
| | | ORDER BY wds.STEP_NO DESC LIMIT 1 |
| | | FROM wf_def_step wds |
| | | WHERE is_delete = 0 |
| | | and step_type = 0 |
| | | AND wds.wf_def_id = #{wfDefId} |
| | | AND wds.step_no < #{stepNo} |
| | | ORDER BY wds.step_no DESC LIMIT 1 |
| | | ]]> |
| | | </select> |
| | | |
| | | <select id="queryStepsBYMap" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | SELECT * FROM WF_DEF_STEP a, |
| | | WF_DEF b |
| | | WHERE a.is_Delete=0 |
| | | and a.is_Delete=0 |
| | | SELECT * FROM wf_def_step a, |
| | | wf_def b |
| | | WHERE a.is_delete=0 |
| | | and a.is_delete=0 |
| | | <if test="wfId!=null"> |
| | | AND b.ID=#{wfId} |
| | | AND b.id=#{wfId} |
| | | </if> |
| | | <if test="wfCode!=null"> |
| | | AND b.Code=#{wfCode} |
| | | AND b.code=#{wfCode} |
| | | </if> |
| | | <if test="wfDefId!=null"> |
| | | AND a.WF_DEF_ID=#{wfDefId} |
| | | AND a.wf_def_id=#{wfDefId} |
| | | </if> |
| | | <if test="stepMarker!=null"> |
| | | AND a.STEP_MARKER=#{stepMarker} |
| | | AND a.step_marker=#{stepMarker} |
| | | </if> |
| | | ORDER BY a.STEP_NO |
| | | ORDER BY a.step_no |
| | | </select> |
| | | |
| | | <select id="getWorkflowStepByCode" resultType="com.zt.modules.workflowconfig.model.WfDefStep"> |
| | | <![CDATA[ |
| | | SELECT * |
| | | FROM WF_DEF_STEP wds |
| | | WHERE is_Delete = 0 |
| | | AND wds.STEP_Marker = #{stepMarker} |
| | | ORDER BY wds.STEP_NO ASC LIMIT 1 |
| | | FROM wf_def_step wds |
| | | WHERE is_delete = 0 |
| | | AND wds.step_marker = #{stepMarker} |
| | | ORDER BY wds.step_no ASC LIMIT 1 |
| | | ]]> |
| | | </select> |
| | | |