diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java index 44d874a3..8c6e050f 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java @@ -805,6 +805,12 @@ public class TAbilityApplicationController { temp.put("system", index.getSystem()); temp.put("resourceId", index.getResourceId()); ResourceDTO resourceDTO = resourceService.get(Long.parseLong(index.getResourceId())); + try { + temp.put("resourceDept", sysDeptService.get(resourceDTO.getDeptId()).getName()); + } catch (Exception exception) { + temp.put("resourceDept", "-"); + } + temp.put("description", resourceDTO.getDescription()); if ("应用资源".equals(resourceDTO.getType())) { temp.put("resourceTYpe", "应用资源"); } else if ("组件服务".equals(resourceDTO.getType())) { diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java index 6515baa7..0476efb0 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java @@ -85,9 +85,9 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl + aht.ASSIGNEE_ = #{userId} + and su.real_name like CONCAT('%', #{userName} ,'%') @@ -71,7 +71,7 @@ and ahp.END_TIME_ IS NOT NULL - ORDER BY + ORDER BY ahp.START_TIME_ DESC diff --git a/renren-admin/src/main/resources/mapper/demanData/TDemandDataDao.xml b/renren-admin/src/main/resources/mapper/demanData/TDemandDataDao.xml index aa0e8894..a8915212 100644 --- a/renren-admin/src/main/resources/mapper/demanData/TDemandDataDao.xml +++ b/renren-admin/src/main/resources/mapper/demanData/TDemandDataDao.xml @@ -23,7 +23,7 @@ - + diff --git a/renren-admin/src/main/resources/mapper/fuse/TbFuseDao.xml b/renren-admin/src/main/resources/mapper/fuse/TbFuseDao.xml index b0e46a7d..ccaee692 100644 --- a/renren-admin/src/main/resources/mapper/fuse/TbFuseDao.xml +++ b/renren-admin/src/main/resources/mapper/fuse/TbFuseDao.xml @@ -33,7 +33,8 @@ trc.user_id = #{userId})>0 , 'true', 'false') as isCollect FROM tb_fuse tf - LEFT JOIN ( SELECT id, resource_Id, user_id FROM tb_resource_collection WHERE 1 = 1 AND del_flag = 0 ) trc ON tf.id = trc.resource_id + LEFT JOIN ( SELECT id, resource_Id, user_id FROM tb_resource_collection WHERE 1 = 1 AND del_flag = 0 ) trc ON + tf.id = trc.resource_id WHERE 1 =1 diff --git a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml index 9b78d09d..08e3c565 100644 --- a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml +++ b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml @@ -68,9 +68,9 @@ UPDATE t_ability_application taa SET expire_date = '2022-04-01 00:00:00' WHERE id IN - - #{item} - + + #{item} + SELECT DISTINCT - sd.id, - sd.NAME + sd.id, + sd.NAME FROM - t_ability_application taa, - sys_dept sd, - sys_user su + t_ability_application taa, + sys_dept sd, + sys_user su WHERE 1 = 1 - AND taa.user_id = su.id - AND su.dept_id = sd.id - AND taa.del_flag = 0 + AND taa.user_id = su.id + AND su.dept_id = sd.id + AND taa.del_flag = 0 UNION SELECT - sd.id, - tmb.dept + sd.id, + tmb.dept FROM - sys_dept sd, - t_meetingroom_book tmb + sys_dept sd, + t_meetingroom_book tmb WHERE - sd.NAME = tmb.dept + sd.NAME = tmb.dept SELECT - districtId, - districtName, - SUM( applyPrice ) AS "applyPrice" + districtId, + districtName, + SUM( applyPrice ) AS "applyPrice" FROM - ( - SELECT - srg.id AS "districtId", - srg.NAME AS "districtName", - CONVERT ( - IFNULL( SUM( taa.apply_price ), 0 ) / 10000, - DECIMAL ( 15, 1 )) AS "applyPrice", - srg.sort - FROM - ( SELECT id, NAME, sort FROM sys_region WHERE tree_level = 3 AND 9 >= sort ) srg - LEFT JOIN sys_dept sd ON sd.district = srg.id - LEFT JOIN sys_user su ON su.dept_id = sd.id - LEFT JOIN ( - SELECT - user_id, - SUM( apply_price ) AS "apply_price", - COUNT( id ) AS "applyCount" - FROM - t_ability_application taa - WHERE - taa.del_flag = 0 - AND taa.approve_status = '通过' - GROUP BY - user_id - ) taa ON taa.user_id = su.id - GROUP BY - srg.id - - UNION ALL - SELECT - tmb.district AS "districtId", - srg.NAME AS "districtName", - SUM( tmb.applyPrice ) AS "applyPrice", - srg.sort - FROM - ( - SELECT - sd.id AS "deptId", - tmb.dept AS "deptName", - CONVERT ( - IFNULL( SUM( tmb.apply_price ), 0 ) / 10000, - DECIMAL ( 15, 1 )) AS "applyPrice", - sd.district - FROM - t_meetingroom_book tmb - LEFT JOIN ( SELECT id, NAME, district FROM sys_dept ) sd ON tmb.dept = sd.NAME - WHERE - tmb.state = 2 - GROUP BY - sd.id, - tmb.dept - ) tmb - LEFT JOIN ( SELECT id, NAME, tree_level, sort FROM sys_region ) srg ON tmb.district = srg.id - WHERE - srg.tree_level = 3 - GROUP BY - tmb.district - ) temp + ( + SELECT + srg.id AS "districtId", + srg.NAME AS "districtName", + CONVERT ( + IFNULL( SUM( taa.apply_price ), 0 ) / 10000, + DECIMAL ( 15, 1 )) AS "applyPrice", + srg.sort + FROM + ( SELECT id, NAME, sort FROM sys_region WHERE tree_level = 3 AND 9 >= sort ) srg + LEFT JOIN sys_dept sd ON sd.district = srg.id + LEFT JOIN sys_user su ON su.dept_id = sd.id + LEFT JOIN ( + SELECT + user_id, + SUM( apply_price ) AS "apply_price", + COUNT( id ) AS "applyCount" + FROM + t_ability_application taa WHERE - temp.districtId IS NOT NULL + taa.del_flag = 0 + AND taa.approve_status = '通过' GROUP BY - temp.districtId, - temp.districtName, - temp.sort + user_id + ) taa ON taa.user_id = su.id + GROUP BY + srg.id + + UNION ALL + SELECT + tmb.district AS "districtId", + srg.NAME AS "districtName", + SUM( tmb.applyPrice ) AS "applyPrice", + srg.sort + FROM + ( + SELECT + sd.id AS "deptId", + tmb.dept AS "deptName", + CONVERT ( + IFNULL( SUM( tmb.apply_price ), 0 ) / 10000, + DECIMAL ( 15, 1 )) AS "applyPrice", + sd.district + FROM + t_meetingroom_book tmb + LEFT JOIN ( SELECT id, NAME, district FROM sys_dept ) sd ON tmb.dept = sd.NAME + WHERE + tmb.state = 2 + GROUP BY + sd.id, + tmb.dept + ) tmb + LEFT JOIN ( SELECT id, NAME, tree_level, sort FROM sys_region ) srg ON tmb.district = srg.id + WHERE + srg.tree_level = 3 + GROUP BY + tmb.district + ) temp + WHERE + temp.districtId IS NOT NULL + GROUP BY + temp.districtId, + temp.districtName, + temp.sort ORDER BY - temp.sort + temp.sort SELECT - '会客厅' AS "resourceName", - convert(IFNULL( SUM( apply_price ), 0 ) / 10000, decimal(15,1)) AS "applyPrice" + '会客厅' AS "resourceName", + convert(IFNULL( SUM( apply_price ), 0 ) / 10000, decimal(15,1)) AS "applyPrice" FROM - t_meetingroom_book tmb + t_meetingroom_book tmb WHERE - tmb.state = 2 + tmb.state = 2 diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index bdc9a064..0b11ea44 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -109,13 +109,13 @@ UPDATE tb_data_resource SET del_flag = 0, - undercarriage_reason = NULL, - undercarriage_user_name = NULL, - apply_number = NULL, - undercarriage_enclosure = NULL, - undercarriage_title = NULL, - undercarriage_phone = NULL, - undercarriage_enclosure_name = NULL + undercarriage_reason = NULL, + undercarriage_user_name = NULL, + apply_number = NULL, + undercarriage_enclosure = NULL, + undercarriage_title = NULL, + undercarriage_phone = NULL, + undercarriage_enclosure_name = NULL WHERE id = #{resourceId} @@ -1517,8 +1517,8 @@ SELECT - sd.name AS deptName, - tdr.name AS resourceName, - tdr.type, - DATE_FORMAT(tdr.create_date,'%Y-%m-%d %T') AS createDate, - CASE WHEN tdr.del_flag = 0 THEN '通过' WHEN tdr.del_flag = 6 THEN '不通过' ELSE '审核中' END AS approveStatus, - trma.instance_id AS applyNumber + sd.name AS deptName, + tdr.name AS resourceName, + tdr.type, + DATE_FORMAT(tdr.create_date,'%Y-%m-%d %T') AS createDate, + CASE WHEN tdr.del_flag = 0 THEN '通过' WHEN tdr.del_flag = 6 THEN '不通过' ELSE '审核中' END AS approveStatus, + trma.instance_id AS applyNumber FROM (SELECT - IF(d.type = '组件服务', a.attr_value, d.type) AS type, - d.id, - d.del_flag, - d.dept_id, - d.create_date, - d.name - FROM tb_data_resource d - LEFT JOIN tb_data_attr a ON d.id = a.data_resource_id AND a.attr_type = '组件类型' AND a.del_flag = 0 - WHERE - 1 = 1 - AND d.del_flag NOT IN (1, 5) - AND d.type IN ('应用资源','组件服务') + IF(d.type = '组件服务', a.attr_value, d.type) AS type, + d.id, + d.del_flag, + d.dept_id, + d.create_date, + d.name + FROM tb_data_resource d + LEFT JOIN tb_data_attr a ON d.id = a.data_resource_id AND a.attr_type = '组件类型' AND a.del_flag = 0 + WHERE + 1 = 1 + AND d.del_flag NOT IN (1, 5) + AND d.type IN ('应用资源','组件服务') ) tdr LEFT JOIN t_resource_mount_apply trma on tdr.id = trma.resource_id, sys_dept sd WHERE 1 = 1 - AND tdr.dept_id = sd.id + AND tdr.dept_id = sd.id AND tdr.del_flag = 0 @@ -2042,7 +2042,7 @@ - UNION ALL + UNION ALL SELECT tmb.dept AS 'deptName', tm.`name` AS 'resourceName', @@ -2058,9 +2058,9 @@ sys_dept sd, sys_region sr WHERE - tmb.room_id = tm.id - AND tmb.dept = sd.name - AND sd.district = sr.id + tmb.room_id = tm.id + AND tmb.dept = sd.name + AND sd.district = sr.id AND tmb.state=2 @@ -2116,7 +2116,8 @@ tb_data_attr a INNER JOIN mysql.help_topic b ON a.attr_type = '应用领域' AND a.del_flag = 0 - AND b.help_topic_id < ( length( a.attr_value ) - length( REPLACE ( a.attr_value, ';', '' )) + 1 )) tda ON tdr.id = tda.data_resource_id + AND b.help_topic_id < ( length( a.attr_value ) - length( REPLACE ( a.attr_value, ';', '' )) + 1 )) tda ON + tdr.id = tda.data_resource_id LEFT JOIN ( SELECT sdd.sort, @@ -2394,40 +2395,41 @@ SELECT DISTINCT '应用资源' AS "resourceType" FROM - tb_data_resource tdr + tb_data_resource tdr WHERE - tdr.del_flag = 0 - AND tdr.id IN - - #{id} - UNION ALL + tdr.del_flag = 0 + AND tdr.id IN + + #{id} + + UNION ALL SELECT DISTINCT - tda.attr_value + tda.attr_value FROM - tb_data_resource tdr, - tb_data_attr tda + tb_data_resource tdr, + tb_data_attr tda WHERE - tdr.id = tda.data_resource_id - AND tdr.del_flag = 0 - AND tda.del_flag = 0 - AND tda.attr_type = '组件类型' - AND tdr.id IN - - #{id} - + tdr.id = tda.data_resource_id + AND tdr.del_flag = 0 + AND tda.del_flag = 0 + AND tda.attr_type = '组件类型' + AND tdr.id IN + + #{id} + diff --git a/renren-admin/src/main/resources/mapper/sys/SysMenuDao.xml b/renren-admin/src/main/resources/mapper/sys/SysMenuDao.xml index d46e66fb..422b71ae 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysMenuDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysMenuDao.xml @@ -19,10 +19,10 @@ 1 = 1 - and t1.type = #{type} + and t1.type = #{type} - and lang.field_value like CONCAT('%', #{name}, '%') + and lang.field_value like CONCAT('%', #{name}, '%') and lang.table_name = 'sys_menu' and lang.field_name = 'name' diff --git a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml index cdf6dbdf..a35ee2be 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml @@ -261,22 +261,22 @@ LIMIT ${pageNum}, ${pageSize}