4eacc416 张雷

人员证书接口开发

1 个父辈 9bbfdead
正在显示 20 个修改的文件 包含 292 行增加74 行删除
...@@ -11,6 +11,7 @@ import com.skua.modules.emergency.entity.DangerousOperation; ...@@ -11,6 +11,7 @@ import com.skua.modules.emergency.entity.DangerousOperation;
11 import com.skua.modules.emergency.service.IDangerousOperationService; 11 import com.skua.modules.emergency.service.IDangerousOperationService;
12 import com.skua.modules.flow.business.service.FlowBusinessService; 12 import com.skua.modules.flow.business.service.FlowBusinessService;
13 import com.skua.modules.flow.core.entity.FlowAssemblyEntity; 13 import com.skua.modules.flow.core.entity.FlowAssemblyEntity;
14 import com.skua.modules.system.vo.UserCertificate;
14 import com.skua.tool.util.BeanExtUtils; 15 import com.skua.tool.util.BeanExtUtils;
15 import io.swagger.annotations.Api; 16 import io.swagger.annotations.Api;
16 import io.swagger.annotations.ApiOperation; 17 import io.swagger.annotations.ApiOperation;
...@@ -262,4 +263,16 @@ public class DangerousOperationController { ...@@ -262,4 +263,16 @@ public class DangerousOperationController {
262 return result; 263 return result;
263 } 264 }
264 265
266 @AutoLog(value = "危险作业事件-人员证书列表")
267 @ApiOperation(value="危险作业事件-人员证书列表", notes="危险作业事件-人员证书列表")
268 @GetMapping(value = "/getFileList")
269 public Result<List<UserCertificate>> getFileList(String userType, String userId) {
270 List<UserCertificate> list = new ArrayList<>();
271 Result<List<UserCertificate>> result = new Result<List<UserCertificate>>();
272 list = dangerousOperationService.getFileList(userType, userId);
273 result.setResult(list);
274 result.setSuccess(true);
275 return result;
276 }
277
265 } 278 }
......
...@@ -2,11 +2,18 @@ package com.skua.modules.emergency.mapper; ...@@ -2,11 +2,18 @@ package com.skua.modules.emergency.mapper;
2 2
3 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 3 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import com.skua.modules.emergency.entity.DangerousOperation; 4 import com.skua.modules.emergency.entity.DangerousOperation;
5 import com.skua.modules.emergency.entity.EmergencyRiskEvent; 5 import com.skua.modules.system.vo.UserCertificate;
6 import org.apache.ibatis.annotations.Param;
7
8 import java.util.List;
6 9
7 /** 10 /**
8 * 应急风险事件 11 * 应急风险事件
9 */ 12 */
10 public interface DangerousOperationMapper extends BaseMapper<DangerousOperation> { 13 public interface DangerousOperationMapper extends BaseMapper<DangerousOperation> {
11 14
15 List<UserCertificate> getOutFileList(@Param("userId") String userId);
16
17 List<UserCertificate> getInFileList(@Param("userId") String userId);
18
12 } 19 }
......
...@@ -2,4 +2,36 @@ ...@@ -2,4 +2,36 @@
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 <mapper namespace="com.skua.modules.emergency.mapper.DangerousOperationMapper"> 3 <mapper namespace="com.skua.modules.emergency.mapper.DangerousOperationMapper">
4 4
5 <select id="getOutFileList" resultType="com.skua.modules.system.vo.UserCertificate">
6 SELECT
7 e.file_name AS certifies_name,
8 d.item_text AS certifies_type,
9 e.file_path AS certifies_file,
10 e.expire_date AS end_time
11 FROM
12 epiboly_certificate e
13 LEFT JOIN (
14 SELECT item_text, item_value FROM sys_dict_item
15 WHERE dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'epiboly_certificate_type' )
16 ) d ON e.certificate_type = d.item_value
17 WHERE
18 e.outer_staff_id = #{userId}
19 </select>
20
21 <select id="getInFileList" resultType="com.skua.modules.system.vo.UserCertificate">
22 SELECT
23 f.certifies_name,
24 d.item_text AS certifies_type,
25 f.certifies_file,
26 f.end_time
27 FROM
28 sys_factory_user_data f
29 LEFT JOIN (
30 SELECT item_text, item_value FROM sys_dict_item
31 WHERE dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'epiboly_certificate_type' )
32 ) d ON f.certifies_type = d.item_value
33 WHERE
34 f.user_id = #{userId}
35 </select>
36
5 </mapper> 37 </mapper>
......
...@@ -2,6 +2,9 @@ package com.skua.modules.emergency.service; ...@@ -2,6 +2,9 @@ package com.skua.modules.emergency.service;
2 2
3 import com.baomidou.mybatisplus.extension.service.IService; 3 import com.baomidou.mybatisplus.extension.service.IService;
4 import com.skua.modules.emergency.entity.DangerousOperation; 4 import com.skua.modules.emergency.entity.DangerousOperation;
5 import com.skua.modules.system.vo.UserCertificate;
6
7 import java.util.List;
5 8
6 /** 9 /**
7 * 应急风险事件 10 * 应急风险事件
...@@ -21,4 +24,6 @@ public interface IDangerousOperationService extends IService<DangerousOperation> ...@@ -21,4 +24,6 @@ public interface IDangerousOperationService extends IService<DangerousOperation>
21 void handle(DangerousOperation dangerousOperation); 24 void handle(DangerousOperation dangerousOperation);
22 25
23 boolean completeProcess(DangerousOperation dangerousOperation); 26 boolean completeProcess(DangerousOperation dangerousOperation);
27
28 List<UserCertificate> getFileList(String userType, String userId);
24 } 29 }
......
1 package com.skua.modules.emergency.service.impl; 1 package com.skua.modules.emergency.service.impl;
2 2
3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 3 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5 import com.skua.core.context.BaseContextHandler; 4 import com.skua.core.context.BaseContextHandler;
6 import com.skua.core.exception.JeecgBootException; 5 import com.skua.core.exception.JeecgBootException;
...@@ -19,8 +18,7 @@ import com.skua.modules.flow.custombiz.handle.IFlowCustomHandle; ...@@ -19,8 +18,7 @@ import com.skua.modules.flow.custombiz.handle.IFlowCustomHandle;
19 import com.skua.modules.flow.custombiz.vo.FlowProcessFormFieldInfoVO; 18 import com.skua.modules.flow.custombiz.vo.FlowProcessFormFieldInfoVO;
20 import com.skua.modules.flow.support.Kv; 19 import com.skua.modules.flow.support.Kv;
21 import com.skua.modules.flow.utils.Func; 20 import com.skua.modules.flow.utils.Func;
22 import com.skua.modules.system.entity.ProblemReportPlan; 21 import com.skua.modules.system.vo.UserCertificate;
23 import com.skua.tool.util.UniqIdUtils;
24 import org.apache.commons.lang3.StringUtils; 22 import org.apache.commons.lang3.StringUtils;
25 import org.springframework.beans.BeanUtils; 23 import org.springframework.beans.BeanUtils;
26 import org.springframework.beans.factory.annotation.Autowired; 24 import org.springframework.beans.factory.annotation.Autowired;
...@@ -28,9 +26,9 @@ import org.springframework.stereotype.Service; ...@@ -28,9 +26,9 @@ import org.springframework.stereotype.Service;
28 import org.springframework.transaction.annotation.Transactional; 26 import org.springframework.transaction.annotation.Transactional;
29 27
30 import java.text.SimpleDateFormat; 28 import java.text.SimpleDateFormat;
29 import java.util.ArrayList;
31 import java.util.Date; 30 import java.util.Date;
32 import java.util.List; 31 import java.util.List;
33 import java.util.Map;
34 32
35 /** 33 /**
36 * 应急风险事件 34 * 应急风险事件
...@@ -41,6 +39,8 @@ public class DangerousOperationServiceImpl extends ServiceImpl<DangerousOperatio ...@@ -41,6 +39,8 @@ public class DangerousOperationServiceImpl extends ServiceImpl<DangerousOperatio
41 private IFlowService flowService; 39 private IFlowService flowService;
42 @Autowired 40 @Autowired
43 private FlowBusinessService flowBusinessService; 41 private FlowBusinessService flowBusinessService;
42 @Autowired
43 private DangerousOperationMapper dangerousOperationMapper;
44 44
45 @Override 45 @Override
46 @Transactional(rollbackFor = Exception.class) 46 @Transactional(rollbackFor = Exception.class)
...@@ -98,6 +98,17 @@ public class DangerousOperationServiceImpl extends ServiceImpl<DangerousOperatio ...@@ -98,6 +98,17 @@ public class DangerousOperationServiceImpl extends ServiceImpl<DangerousOperatio
98 } 98 }
99 99
100 @Override 100 @Override
101 public List<UserCertificate> getFileList(String userType, String userId) {
102 List<UserCertificate> list = new ArrayList<>();
103 if("2".equals(userType)){
104 list = dangerousOperationMapper.getOutFileList(userId);
105 }else{
106 list = dangerousOperationMapper.getInFileList(userId);
107 }
108 return list;
109 }
110
111 @Override
101 public List<FlowProcessFormFieldInfoVO> buildCustomData(String s, List<FlowProcessFormFieldInfoVO> list) { 112 public List<FlowProcessFormFieldInfoVO> buildCustomData(String s, List<FlowProcessFormFieldInfoVO> list) {
102 for (FlowProcessFormFieldInfoVO entity : list) { 113 for (FlowProcessFormFieldInfoVO entity : list) {
103 if ("operationUser".equals(entity.getFieldCode())) { 114 if ("operationUser".equals(entity.getFieldCode())) {
......
...@@ -96,6 +96,7 @@ spring: ...@@ -96,6 +96,7 @@ spring:
96 # 多数据源配置 96 # 多数据源配置
97 pg-db: 97 pg-db:
98 url: jdbc:postgresql://103.85.171.27:10087/postgres?useUnicode=true&characterEncoding=UTF8 98 url: jdbc:postgresql://103.85.171.27:10087/postgres?useUnicode=true&characterEncoding=UTF8
99 # url: jdbc:postgresql://113.249.91.27:10086/postgres?useUnicode=true&characterEncoding=UTF8
99 username: postgres 100 username: postgres
100 password: jkauto@123 101 password: jkauto@123
101 driver-class-name: org.postgresql.Driver 102 driver-class-name: org.postgresql.Driver
...@@ -156,10 +157,10 @@ skua: ...@@ -156,10 +157,10 @@ skua:
156 isRunTimeInterval: 3600 157 isRunTimeInterval: 3600
157 #视频对接相关配置,未使用,待完善 158 #视频对接相关配置,未使用,待完善
158 video: 159 video:
159 ip: 118.190.97.62 160 ip: 113.249.91.27
160 port: 8667 161 port: 8667
161 appkey: 23259573 162 appkey: 21656155
162 secretkey: 0zoBqIJeudIhgCysCe0r 163 secretkey: llQvkzDIzmYnNiXNYxDN
163 #消息推送 164 #消息推送
164 push: 165 push:
165 #是否开启流程消息推送 166 #是否开启流程消息推送
......
...@@ -14,13 +14,20 @@ management: ...@@ -14,13 +14,20 @@ management:
14 spring: 14 spring:
15 servlet: 15 servlet:
16 multipart: 16 multipart:
17 max-file-size: 10MB 17 max-file-size: 500MB
18 max-request-size: 10MB 18 max-request-size: 10MB
19 ## quartz定时任务,采用数据库方式 19 ## quartz定时任务,采用数据库方式
20 quartz: 20 quartz:
21 properties:
22 org:
23 quartz:
24 threadPool:
25 threadCount: 20
26 jobStore:
27 misfireThreshold: 60000
21 job-store-type: jdbc 28 job-store-type: jdbc
22 #决定当前服务定时是否启用 29 #决定当前服务定时是否启用
23 auto-startup: true 30 auto-startup: false
24 #json 时间戳统一转换 31 #json 时间戳统一转换
25 jackson: 32 jackson:
26 date-format: yyyy-MM-dd HH:mm:ss 33 date-format: yyyy-MM-dd HH:mm:ss
...@@ -62,7 +69,7 @@ spring: ...@@ -62,7 +69,7 @@ spring:
62 # 初始化大小,最小,最大 69 # 初始化大小,最小,最大
63 initial-size: 5 70 initial-size: 5
64 min-idle: 5 71 min-idle: 5
65 maxActive: 20 72 maxActive: 30
66 # 配置获取连接等待超时的时间 73 # 配置获取连接等待超时的时间
67 maxWait: 60000 74 maxWait: 60000
68 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 75 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
...@@ -82,13 +89,13 @@ spring: ...@@ -82,13 +89,13 @@ spring:
82 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 89 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
83 datasource: 90 datasource:
84 master: 91 master:
85 url: jdbc:mysql://115.28.25.233:6630/sk-se-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800 92 url: jdbc:mysql://20.0.99.3:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800
86 username: jk_test 93 username: root
87 password: Jk_test1211rw 94 password: jkauto@123
88 driver-class-name: com.mysql.jdbc.Driver 95 driver-class-name: com.mysql.jdbc.Driver
89 # 多数据源配置 96 # 多数据源配置
90 pg-db: 97 pg-db:
91 url: jdbc:postgresql://103.85.171.27:10087/postgres?useUnicode=true&characterEncoding=UTF8 98 url: jdbc:postgresql://20.0.99.4:10086/postgres?useUnicode=true&characterEncoding=UTF8
92 username: postgres 99 username: postgres
93 password: jkauto@123 100 password: jkauto@123
94 driver-class-name: org.postgresql.Driver 101 driver-class-name: org.postgresql.Driver
...@@ -98,8 +105,8 @@ spring: ...@@ -98,8 +105,8 @@ spring:
98 host: 127.0.0.1 105 host: 127.0.0.1
99 lettuce: 106 lettuce:
100 pool: 107 pool:
101 max-active: 8 #最大连接数据库连接数,设 0 为没有限制 108 max-active: 20 #最大连接数据库连接数,设 0 为没有限制
102 max-idle: 8 #最大等待连接中的数量,设 0 为没有限制 109 max-idle: 20 #最大等待连接中的数量,设 0 为没有限制
103 max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。 110 max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
104 min-idle: 0 #最小等待连接中的数量,设 0 为没有限制 111 min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
105 shutdown-timeout: 100ms 112 shutdown-timeout: 100ms
...@@ -126,42 +133,42 @@ skua: ...@@ -126,42 +133,42 @@ skua:
126 web-url: http://103.85.171.27:8096 133 web-url: http://103.85.171.27:8096
127 path: 134 path:
128 #文件上传根目录 设置 135 #文件上传根目录 设置
129 upload: ../file 136 upload: /home/skboot/file
130 #webapp文件路径 137 #webapp文件路径
131 webapp: ../file 138 webapp: /home/skboot/file
132 # 断点续传路径 139 # 断点续传路径
133 # chunk: /app/skboot/cdxr 140 chunk: /home/skboot/file/files
134 chunk: E:\\Downloads\\video
135 #创蓝短信秘钥 141 #创蓝短信秘钥
136 sms: 142 sms:
137 #应用地址 143 #应用地址
138 #accessKeyUrl: http://smssh1.253.com/msg/send/json 144 accessKeyUrl: http://smssh1.253.com/msg/send/json
139 accessKeyUrl: http://189.200.0.223/msg/send/json
140 #账户 145 #账户
141 accessKeyId: N8464035 146 accessKeyId: N8464035
142 #密码 147 #密码
143 accessKeySecret: H9eu8oABz 148 accessKeySecret: H9eu8oABz
144 #数据采集服务频率,单位秒,注意如果调整了数据采集频率,请记得同步修改此配置 149 #数据采集服务频率,单位秒,注意如果调整了数据采集频率,请记得同步修改此配置
145 collectionFrequency: 10 150 collectionFrequency: 10
151 #报警判断时间间隔 单位秒
152 alarmTimeInterval: 600
153 #设备报警判断时间间隔 单位秒
154 equipAlarmTimeInterval: 300
146 #判断是否在离线 155 #判断是否在离线
147 isRunTimeInterval: 180 156 isRunTimeInterval: 3600
148 #视频对接相关配置,未使用,待完善 157 #视频对接相关配置,未使用,待完善
149 video: 158 video:
150 # ip: 159 ip: 113.249.91.27
151 # port: 160 port: 8667
152 # username: 161 appkey: 21656155
153 # password: 162 secretkey: llQvkzDIzmYnNiXNYxDN
154 #海康威视需要填写密钥
155 secretkey:
156 #消息推送 163 #消息推送
157 push: 164 push:
158 #是否开启流程消息推送 165 #是否开启流程消息推送
159 process-enable: false 166 process-enable: false
160 mob: 167 mob:
161 appSecret: 7552f0cfe1db2b3bb2c4dfbda4ead4e7 168 appSecret: 4e21ddb344233a5a3ec6b3446310efe1
162 appKey: 3440fa94df400 169 appKey: 35e7ed05966f2
163 pushHostName: http://api.push.mob.com/v3/push/createPush 170 pushHostName: http://api.push.mob.com/v3/push/createPush
164 packageName: com.kongtrol.flutterxingtai 171 packageName: com.kingtrol.flutter_factoryApp
165 iosProduction: 0 172 iosProduction: 0
166 # 自定义逻辑,以','分割(e.g: messagePush:消息推送完后处理) 173 # 自定义逻辑,以','分割(e.g: messagePush:消息推送完后处理)
167 flow: 174 flow:
...@@ -174,3 +181,10 @@ flowable: ...@@ -174,3 +181,10 @@ flowable:
174 content: 181 content:
175 storage: 182 storage:
176 create-root: false 183 create-root: false
184
185 #第三方AR远程会议
186 ar-remote-meeting:
187 # 接口地址
188 url: https://47.104.179.187:8443/api/
189 # mqtt服务地址
190 mqtt-url: tcp://47.104.179.187:1883
......
...@@ -96,6 +96,7 @@ spring: ...@@ -96,6 +96,7 @@ spring:
96 # 多数据源配置 96 # 多数据源配置
97 pg-db: 97 pg-db:
98 url: jdbc:postgresql://103.85.171.27:10087/postgres?useUnicode=true&characterEncoding=UTF8 98 url: jdbc:postgresql://103.85.171.27:10087/postgres?useUnicode=true&characterEncoding=UTF8
99 # url: jdbc:postgresql://113.249.91.27:10086/postgres?useUnicode=true&characterEncoding=UTF8
99 username: postgres 100 username: postgres
100 password: jkauto@123 101 password: jkauto@123
101 driver-class-name: org.postgresql.Driver 102 driver-class-name: org.postgresql.Driver
...@@ -127,15 +128,15 @@ mybatis-plus: ...@@ -127,15 +128,15 @@ mybatis-plus:
127 configuration: 128 configuration:
128 call-setters-on-nulls: true 129 call-setters-on-nulls: true
129 # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 130 # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
130 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 131 # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
131 #数矿专用配置 132 #数矿专用配置
132 skua: 133 skua:
133 web-url: http://192.168.100.29:3000 134 web-url: http://192.168.100.29:3000
134 path: 135 path:
135 #文件上传根目录 设置 136 #文件上传根目录 设置
136 upload: ../file 137 upload: D:\IdeaProjects\zhongye\file
137 #webapp文件路径 138 #webapp文件路径
138 webapp: ../file 139 webapp: D:\IdeaProjects\zhongye\file
139 # 断点续传路径 140 # 断点续传路径
140 chunk: D:\IdeaProjects\zhongye\file\files 141 chunk: D:\IdeaProjects\zhongye\file\files
141 #创蓝短信秘钥 142 #创蓝短信秘钥
...@@ -156,10 +157,10 @@ skua: ...@@ -156,10 +157,10 @@ skua:
156 isRunTimeInterval: 3600 157 isRunTimeInterval: 3600
157 #视频对接相关配置,未使用,待完善 158 #视频对接相关配置,未使用,待完善
158 video: 159 video:
159 ip: 118.190.97.62 160 ip: 113.249.91.27
160 port: 8667 161 port: 8667
161 appkey: 23259573 162 appkey: 21656155
162 secretkey: 0zoBqIJeudIhgCysCe0r 163 secretkey: llQvkzDIzmYnNiXNYxDN
163 #消息推送 164 #消息推送
164 push: 165 push:
165 #是否开启流程消息推送 166 #是否开启流程消息推送
......
...@@ -252,8 +252,7 @@ public class EquipmentSparepartController { ...@@ -252,8 +252,7 @@ public class EquipmentSparepartController {
252 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartCode()), "equipment_sparepart_supplies.sparepart_code", equipmentSparepartDTO.getSparepartCode()) 252 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartCode()), "equipment_sparepart_supplies.sparepart_code", equipmentSparepartDTO.getSparepartCode())
253 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSpecification()), "equipment_sparepart_supplies.specification", equipmentSparepartDTO.getSpecification()) 253 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSpecification()), "equipment_sparepart_supplies.specification", equipmentSparepartDTO.getSpecification())
254 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartName()), "equipment_sparepart_supplies.sparepart_name", equipmentSparepartDTO.getSparepartName()) 254 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartName()), "equipment_sparepart_supplies.sparepart_name", equipmentSparepartDTO.getSparepartName())
255 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getIsEmergency()), "equipment_sparepart.is_emergency", equipmentSparepartDTO.getIsEmergency()) 255 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartAttribute()), "equipment_sparepart.sparepart_attribute", equipmentSparepartDTO.getSparepartAttribute())
256 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getIsDangerous()), "equipment_sparepart.is_dangerous", equipmentSparepartDTO.getIsDangerous())
257 .in(!sparepartTypeSet.isEmpty(), "equipment_sparepart_supplies.sparepart_type", sparepartTypeSet) 256 .in(!sparepartTypeSet.isEmpty(), "equipment_sparepart_supplies.sparepart_type", sparepartTypeSet)
258 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getWarehouseName()), "warehouse_name", equipmentSparepartDTO.getWarehouseName()) 257 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getWarehouseName()), "warehouse_name", equipmentSparepartDTO.getWarehouseName())
259 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSuppliesWarehouseId()), "supplies_warehouse_id", equipmentSparepartDTO.getSuppliesWarehouseId()) 258 .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSuppliesWarehouseId()), "supplies_warehouse_id", equipmentSparepartDTO.getSuppliesWarehouseId())
...@@ -265,6 +264,7 @@ public class EquipmentSparepartController { ...@@ -265,6 +264,7 @@ public class EquipmentSparepartController {
265 Map<String, String> suppliesWarehouseVal2KeyMap = key2ValueService.dictKey2Val("suppliesWarehouse", false); 264 Map<String, String> suppliesWarehouseVal2KeyMap = key2ValueService.dictKey2Val("suppliesWarehouse", false);
266 Map<String, String> departInfoVal2KeyMap = key2ValueService.dictKey2Val("sysDepart", false); 265 Map<String, String> departInfoVal2KeyMap = key2ValueService.dictKey2Val("sysDepart", false);
267 Map<String, String> unitInfoVal2KeyMap = key2ValueService.dictKey2Val("equipment-sparepart_measuring_unit", false); 266 Map<String, String> unitInfoVal2KeyMap = key2ValueService.dictKey2Val("equipment-sparepart_measuring_unit", false);
267 Map<String, String> attributeVal2KeyMap = key2ValueService.dictKey2Val("sparepart_attribute", false);
268 268
269 JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master"); 269 JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master");
270 //品牌厂商 270 //品牌厂商
...@@ -275,6 +275,7 @@ public class EquipmentSparepartController { ...@@ -275,6 +275,7 @@ public class EquipmentSparepartController {
275 .addCallback("EquipmentSparepartSupplies_sparepartType", "sparepartType_dictText") 275 .addCallback("EquipmentSparepartSupplies_sparepartType", "sparepartType_dictText")
276 .addCallback("EquipmentSparepartSupplies_manufacturer", "manufacturer_dictText") 276 .addCallback("EquipmentSparepartSupplies_manufacturer", "manufacturer_dictText")
277 .addCallback("suppliesWarehouseId", "suppliesWarehouseId_dictText") 277 .addCallback("suppliesWarehouseId", "suppliesWarehouseId_dictText")
278 .addCallback("sparepartAttribute", "sparepartAttribute_dictText")
278 .addCallback("SuppliesWarehouse_departId", "departIdName") 279 .addCallback("SuppliesWarehouse_departId", "departIdName")
279 .addCallback("EquipmentSparepartSupplies_measuringUnit", "measuringUnit_dictText") 280 .addCallback("EquipmentSparepartSupplies_measuringUnit", "measuringUnit_dictText")
280 .maps2MapsWithoutPrefix(mapPage.getRecords(), (targetFieldName, srcFieldVal) -> { 281 .maps2MapsWithoutPrefix(mapPage.getRecords(), (targetFieldName, srcFieldVal) -> {
...@@ -288,6 +289,8 @@ public class EquipmentSparepartController { ...@@ -288,6 +289,8 @@ public class EquipmentSparepartController {
288 return suppliesWarehouseVal2KeyMap.getOrDefault(srcFieldVal, ""); 289 return suppliesWarehouseVal2KeyMap.getOrDefault(srcFieldVal, "");
289 }else if ("measuringUnit_dictText".equals(targetFieldName)) { 290 }else if ("measuringUnit_dictText".equals(targetFieldName)) {
290 return unitInfoVal2KeyMap.getOrDefault(srcFieldVal, ""); 291 return unitInfoVal2KeyMap.getOrDefault(srcFieldVal, "");
292 }else if ("sparepartAttribute_dictText".equals(targetFieldName)) {
293 return attributeVal2KeyMap.getOrDefault(srcFieldVal, "");
291 } 294 }
292 return srcFieldVal; 295 return srcFieldVal;
293 }); 296 });
......
...@@ -231,16 +231,9 @@ public class EquipmentSparepart { ...@@ -231,16 +231,9 @@ public class EquipmentSparepart {
231 @ApiModelProperty(value = "所属厂站") 231 @ApiModelProperty(value = "所属厂站")
232 private String departId; 232 private String departId;
233 233
234 /** 是否应急物资 */ 234 /** 物料属性 */
235 @Excel(name = "是否应急物资", width = 15) 235 @ApiModelProperty(value = "物料属性")
236 @ApiModelProperty(value = "是否应急物资") 236 @Dict(dicCode = "sparepart_attribute")
237 @Dict(dicCode = "yn") 237 private String sparepartAttribute;
238 private String isEmergency;
239
240 /** 是否危化品 */
241 @Excel(name = "是否危化品", width = 15)
242 @ApiModelProperty(value = "是否危化品")
243 @Dict(dicCode = "yn")
244 private String isDangerous;
245 238
246 } 239 }
......
...@@ -235,17 +235,11 @@ public class EquipmentSparepartSupplies { ...@@ -235,17 +235,11 @@ public class EquipmentSparepartSupplies {
235 @ApiModelProperty(value = "生成时间") 235 @ApiModelProperty(value = "生成时间")
236 private Date inventoryUpdateTime; 236 private Date inventoryUpdateTime;
237 237
238 /** 是否应急物资 */ 238 /** 物料属性 */
239 @Excel(name = "是否应急物资", width = 15) 239 @Excel(name = "物料属性", width = 15)
240 @ApiModelProperty(value = "是否应急物资") 240 @ApiModelProperty(value = "物料属性")
241 @Dict(dicCode = "yn") 241 @Dict(dicCode = "sparepart_attribute")
242 private String isEmergency; 242 private String sparepartAttribute;
243
244 /** 是否危化品 */
245 @Excel(name = "是否危化品", width = 15)
246 @ApiModelProperty(value = "是否危化品")
247 @Dict(dicCode = "yn")
248 private String isDangerous;
249 243
250 244
251 245
......
...@@ -221,13 +221,9 @@ public class EquipmentSparepartSuppliesVO { ...@@ -221,13 +221,9 @@ public class EquipmentSparepartSuppliesVO {
221 @TableField(exist = false) 221 @TableField(exist = false)
222 private String storageWarn; 222 private String storageWarn;
223 223
224 /** 是否应急物资 */ 224 /** 物料属性 */
225 @ApiModelProperty(value = "是否应急物资") 225 @Excel(name = "物料属性", width = 15)
226 @Dict(dicCode = "yn") 226 @ApiModelProperty(value = "物料属性")
227 private String isEmergency; 227 @Dict(dicCode = "sparepart_attribute")
228 228 private String sparepartAttribute;
229 /** 是否危化品 */
230 @ApiModelProperty(value = "是否危化品")
231 @Dict(dicCode = "yn")
232 private String isDangerous;
233 } 229 }
......
...@@ -426,6 +426,28 @@ public class SysDepartController { ...@@ -426,6 +426,28 @@ public class SysDepartController {
426 } 426 }
427 427
428 /** 428 /**
429 * 获取部门人员机构树
430 *
431 * @return
432 */
433 @RequestMapping(value = "/queryDeptAndUserTreeList", method = RequestMethod.GET)
434 public Result<List<TreeData>> queryDeptAndUserTreeList(String departId,String userType) {
435 //获取数据列表
436 List<SysDeptUserVO> list = sysDepartService.queryDeptAndUserTreeList(departId,userType);
437 //将业务数据转换为构造树所需的数据结构
438 List<TransTreeModel> transTreeModels = list.stream().map(bo -> convertToTreeModel(bo)).collect(Collectors.toList());
439 List<TreeData> treeList = TreeUtils.buildTree(transTreeModels, departId);
440 Result<List<TreeData>> result = new Result<>();
441 try {
442 result.setResult(treeList);
443 result.setSuccess(true);
444 } catch (Exception e) {
445 log.error(e.getMessage(), e);
446 }
447 return result;
448 }
449
450 /**
429 * 获取部门人员机构树-无数据权限 451 * 获取部门人员机构树-无数据权限
430 * 452 *
431 * @return 453 * @return
......
...@@ -211,7 +211,7 @@ public class SysFactoryInfoController { ...@@ -211,7 +211,7 @@ public class SysFactoryInfoController {
211 211
212 for (SysFactoryTreeVO vo : list) { 212 for (SysFactoryTreeVO vo : list) {
213 if (!vo.getNodeType().equals("group")) { 213 if (!vo.getNodeType().equals("group")) {
214 if (vo.getDepartType().equals("1") || vo.getDepartType().equals("1")) { 214 if (vo.getDepartType().equals("0") || vo.getDepartType().equals("1")) {
215 resultList.add(vo); 215 resultList.add(vo);
216 } 216 }
217 } else { 217 } else {
......
...@@ -28,6 +28,10 @@ public class SysFactoryUserData { ...@@ -28,6 +28,10 @@ public class SysFactoryUserData {
28 @TableId(type = IdType.ID_WORKER_STR) 28 @TableId(type = IdType.ID_WORKER_STR)
29 @ApiModelProperty(value = "主键") 29 @ApiModelProperty(value = "主键")
30 private String id; 30 private String id;
31 /**基础信息ID*/
32 @Excel(name = "基础信息ID", width = 15)
33 @ApiModelProperty(value = "基础信息ID")
34 private String baseId;
31 /**成员ID*/ 35 /**成员ID*/
32 @Excel(name = "成员ID", width = 15) 36 @Excel(name = "成员ID", width = 15)
33 @ApiModelProperty(value = "成员ID") 37 @ApiModelProperty(value = "成员ID")
......
...@@ -140,4 +140,8 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> { ...@@ -140,4 +140,8 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> {
140 List<DepartTree> getJimuDepartTree(@Param("pid") String pid); 140 List<DepartTree> getJimuDepartTree(@Param("pid") String pid);
141 141
142 String getChildDepartId(@Param("departIds") String departIds); 142 String getChildDepartId(@Param("departIds") String departIds);
143
144 List<SysDeptUserVO> queryDeptAndUserTreeList(@Param("departId") String departId);
145
146 List<SysDeptUserVO> queryDeptAndSystemTreeList(@Param("departId") String departId);
143 } 147 }
......
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
51 ORDER BY 51 ORDER BY
52 depart_type, 52 depart_type,
53 depart_order 53 depart_order
54
55 </select> 54 </select>
56 55
57 <select id="getParentDepartTree" parameterType="java.lang.String" resultType="com.skua.modules.system.entity.SysDepart"> 56 <select id="getParentDepartTree" parameterType="java.lang.String" resultType="com.skua.modules.system.entity.SysDepart">
...@@ -223,4 +222,80 @@ ...@@ -223,4 +222,80 @@
223 </foreach> 222 </foreach>
224 ) 223 )
225 </select> 224 </select>
225 <select id="queryDeptAndUserTreeList" parameterType="java.lang.String" resultType="com.skua.modules.system.vo.SysDeptUserVO">
226 SELECT
227 *
228 FROM
229 (
230 SELECT
231 'dept' AS node_type,
232 id,
233 parent_id,
234 depart_name AS title,
235 depart_type,
236 depart_order
237 FROM
238 sys_depart
239 WHERE
240 FIND_IN_SET(
241 id,
242 getDepartTree (
243 #{departId}
244 )
245 )
246 UNION ALL
247 SELECT
248 'emp' AS node_type,
249 id AS id,
250 depart_id AS parent_id,
251 staff_name AS title,
252 '0' AS depart_type,
253 0 AS depart_order
254 FROM
255 epiboly_outer_staff
256 ) aa
257 ORDER BY
258 depart_type,
259 depart_order
260 </select>
261 <select id="queryDeptAndSystemTreeList" parameterType="java.lang.String" resultType="com.skua.modules.system.vo.SysDeptUserVO">
262 SELECT
263 *
264 FROM
265 (
266 SELECT
267 'dept' AS node_type,
268 id,
269 parent_id,
270 depart_name AS title,
271 depart_type,
272 depart_order
273 FROM
274 sys_depart
275 WHERE
276 FIND_IN_SET(
277 id,
278 getDepartTree (
279 #{departId}
280 )
281 )
282 UNION ALL
283 SELECT
284 'emp' AS node_type,
285 b.user_id AS id,
286 b.dep_id AS parent_id,
287 realname AS title,
288 '0' AS depart_type,
289 0 AS depart_order
290 FROM
291 sys_user a
292 INNER JOIN sys_user_depart b ON a.id = b.user_id
293 WHERE
294 a.is_system_user = '0'
295 and a.del_flag = '0'
296 ) aa
297 ORDER BY
298 depart_type,
299 depart_order
300 </select>
226 </mapper> 301 </mapper>
......
...@@ -170,4 +170,6 @@ public interface ISysDepartService extends IService<SysDepart>{ ...@@ -170,4 +170,6 @@ public interface ISysDepartService extends IService<SysDepart>{
170 List<DepartTree> getJimuDepartTree(String pid); 170 List<DepartTree> getJimuDepartTree(String pid);
171 171
172 String getChildDepartId(String departIds); 172 String getChildDepartId(String departIds);
173
174 List<SysDeptUserVO> queryDeptAndUserTreeList(String departId,String userType);
173 } 175 }
......
...@@ -452,4 +452,15 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart ...@@ -452,4 +452,15 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
452 return sysDepartMapper.getChildDepartId(departIds); 452 return sysDepartMapper.getChildDepartId(departIds);
453 } 453 }
454 454
455 @Override
456 public List<SysDeptUserVO> queryDeptAndUserTreeList(String departId, String userType) {
457 List<SysDeptUserVO> list = new ArrayList<>();
458 if("2".equals(userType)){
459 list = sysDepartMapper.queryDeptAndUserTreeList(departId);
460 }else{
461 list = sysDepartMapper.queryDeptAndSystemTreeList(departId);
462 }
463 return list;
464 }
465
455 } 466 }
......
1 package com.skua.modules.system.vo;
2
3 import com.skua.core.aspect.annotation.Dict;
4 import io.swagger.annotations.ApiModelProperty;
5 import lombok.Data;
6 import org.jeecgframework.poi.excel.annotation.Excel;
7
8 import java.util.Date;
9
10 /**
11 * 人员证书
12 * @author zl
13 *
14 */
15 @Data
16 public class UserCertificate {
17 /**证件名称*/
18 @ApiModelProperty(value = "证件名称")
19 private String certifiesName;
20 /**证件类型*/
21 @ApiModelProperty(value = "证件类型")
22 @Dict(dicCode = "epiboly_certificate_type")
23 private String certifiesType;
24 /**证件文件*/
25 @ApiModelProperty(value = "证件文件")
26 private String certifiesFile;
27 /**到期时间*/
28 @ApiModelProperty(value = "到期时间")
29 private String endTime;
30 }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!