4eacc416 张雷

人员证书接口开发

1 个父辈 9bbfdead
正在显示 20 个修改的文件 包含 292 行增加74 行删除
......@@ -11,6 +11,7 @@ import com.skua.modules.emergency.entity.DangerousOperation;
import com.skua.modules.emergency.service.IDangerousOperationService;
import com.skua.modules.flow.business.service.FlowBusinessService;
import com.skua.modules.flow.core.entity.FlowAssemblyEntity;
import com.skua.modules.system.vo.UserCertificate;
import com.skua.tool.util.BeanExtUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -262,4 +263,16 @@ public class DangerousOperationController {
return result;
}
@AutoLog(value = "危险作业事件-人员证书列表")
@ApiOperation(value="危险作业事件-人员证书列表", notes="危险作业事件-人员证书列表")
@GetMapping(value = "/getFileList")
public Result<List<UserCertificate>> getFileList(String userType, String userId) {
List<UserCertificate> list = new ArrayList<>();
Result<List<UserCertificate>> result = new Result<List<UserCertificate>>();
list = dangerousOperationService.getFileList(userType, userId);
result.setResult(list);
result.setSuccess(true);
return result;
}
}
......
......@@ -2,11 +2,18 @@ package com.skua.modules.emergency.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.skua.modules.emergency.entity.DangerousOperation;
import com.skua.modules.emergency.entity.EmergencyRiskEvent;
import com.skua.modules.system.vo.UserCertificate;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 应急风险事件
*/
public interface DangerousOperationMapper extends BaseMapper<DangerousOperation> {
List<UserCertificate> getOutFileList(@Param("userId") String userId);
List<UserCertificate> getInFileList(@Param("userId") String userId);
}
......
......@@ -2,4 +2,36 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.skua.modules.emergency.mapper.DangerousOperationMapper">
<select id="getOutFileList" resultType="com.skua.modules.system.vo.UserCertificate">
SELECT
e.file_name AS certifies_name,
d.item_text AS certifies_type,
e.file_path AS certifies_file,
e.expire_date AS end_time
FROM
epiboly_certificate e
LEFT JOIN (
SELECT item_text, item_value FROM sys_dict_item
WHERE dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'epiboly_certificate_type' )
) d ON e.certificate_type = d.item_value
WHERE
e.outer_staff_id = #{userId}
</select>
<select id="getInFileList" resultType="com.skua.modules.system.vo.UserCertificate">
SELECT
f.certifies_name,
d.item_text AS certifies_type,
f.certifies_file,
f.end_time
FROM
sys_factory_user_data f
LEFT JOIN (
SELECT item_text, item_value FROM sys_dict_item
WHERE dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'epiboly_certificate_type' )
) d ON f.certifies_type = d.item_value
WHERE
f.user_id = #{userId}
</select>
</mapper>
......
......@@ -2,6 +2,9 @@ package com.skua.modules.emergency.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.skua.modules.emergency.entity.DangerousOperation;
import com.skua.modules.system.vo.UserCertificate;
import java.util.List;
/**
* 应急风险事件
......@@ -21,4 +24,6 @@ public interface IDangerousOperationService extends IService<DangerousOperation>
void handle(DangerousOperation dangerousOperation);
boolean completeProcess(DangerousOperation dangerousOperation);
List<UserCertificate> getFileList(String userType, String userId);
}
......
package com.skua.modules.emergency.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.skua.core.context.BaseContextHandler;
import com.skua.core.exception.JeecgBootException;
......@@ -19,8 +18,7 @@ import com.skua.modules.flow.custombiz.handle.IFlowCustomHandle;
import com.skua.modules.flow.custombiz.vo.FlowProcessFormFieldInfoVO;
import com.skua.modules.flow.support.Kv;
import com.skua.modules.flow.utils.Func;
import com.skua.modules.system.entity.ProblemReportPlan;
import com.skua.tool.util.UniqIdUtils;
import com.skua.modules.system.vo.UserCertificate;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -28,9 +26,9 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 应急风险事件
......@@ -41,6 +39,8 @@ public class DangerousOperationServiceImpl extends ServiceImpl<DangerousOperatio
private IFlowService flowService;
@Autowired
private FlowBusinessService flowBusinessService;
@Autowired
private DangerousOperationMapper dangerousOperationMapper;
@Override
@Transactional(rollbackFor = Exception.class)
......@@ -98,6 +98,17 @@ public class DangerousOperationServiceImpl extends ServiceImpl<DangerousOperatio
}
@Override
public List<UserCertificate> getFileList(String userType, String userId) {
List<UserCertificate> list = new ArrayList<>();
if("2".equals(userType)){
list = dangerousOperationMapper.getOutFileList(userId);
}else{
list = dangerousOperationMapper.getInFileList(userId);
}
return list;
}
@Override
public List<FlowProcessFormFieldInfoVO> buildCustomData(String s, List<FlowProcessFormFieldInfoVO> list) {
for (FlowProcessFormFieldInfoVO entity : list) {
if ("operationUser".equals(entity.getFieldCode())) {
......
......@@ -96,6 +96,7 @@ spring:
# 多数据源配置
pg-db:
url: jdbc:postgresql://103.85.171.27:10087/postgres?useUnicode=true&characterEncoding=UTF8
# url: jdbc:postgresql://113.249.91.27:10086/postgres?useUnicode=true&characterEncoding=UTF8
username: postgres
password: jkauto@123
driver-class-name: org.postgresql.Driver
......@@ -156,10 +157,10 @@ skua:
isRunTimeInterval: 3600
#视频对接相关配置,未使用,待完善
video:
ip: 118.190.97.62
ip: 113.249.91.27
port: 8667
appkey: 23259573
secretkey: 0zoBqIJeudIhgCysCe0r
appkey: 21656155
secretkey: llQvkzDIzmYnNiXNYxDN
#消息推送
push:
#是否开启流程消息推送
......
......@@ -14,13 +14,20 @@ management:
spring:
servlet:
multipart:
max-file-size: 10MB
max-file-size: 500MB
max-request-size: 10MB
## quartz定时任务,采用数据库方式
quartz:
properties:
org:
quartz:
threadPool:
threadCount: 20
jobStore:
misfireThreshold: 60000
job-store-type: jdbc
#决定当前服务定时是否启用
auto-startup: true
auto-startup: false
#json 时间戳统一转换
jackson:
date-format: yyyy-MM-dd HH:mm:ss
......@@ -62,7 +69,7 @@ spring:
# 初始化大小,最小,最大
initial-size: 5
min-idle: 5
maxActive: 20
maxActive: 30
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
......@@ -82,13 +89,13 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
master:
url: jdbc:mysql://115.28.25.233:6630/sk-se-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800
username: jk_test
password: Jk_test1211rw
url: jdbc:mysql://20.0.99.3:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800
username: root
password: jkauto@123
driver-class-name: com.mysql.jdbc.Driver
# 多数据源配置
pg-db:
url: jdbc:postgresql://103.85.171.27:10087/postgres?useUnicode=true&characterEncoding=UTF8
url: jdbc:postgresql://20.0.99.4:10086/postgres?useUnicode=true&characterEncoding=UTF8
username: postgres
password: jkauto@123
driver-class-name: org.postgresql.Driver
......@@ -98,8 +105,8 @@ spring:
host: 127.0.0.1
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-active: 20 #最大连接数据库连接数,设 0 为没有限制
max-idle: 20 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
......@@ -126,42 +133,42 @@ skua:
web-url: http://103.85.171.27:8096
path:
#文件上传根目录 设置
upload: ../file
upload: /home/skboot/file
#webapp文件路径
webapp: ../file
webapp: /home/skboot/file
# 断点续传路径
# chunk: /app/skboot/cdxr
chunk: E:\\Downloads\\video
chunk: /home/skboot/file/files
#创蓝短信秘钥
sms:
#应用地址
#accessKeyUrl: http://smssh1.253.com/msg/send/json
accessKeyUrl: http://189.200.0.223/msg/send/json
accessKeyUrl: http://smssh1.253.com/msg/send/json
#账户
accessKeyId: N8464035
#密码
accessKeySecret: H9eu8oABz
#数据采集服务频率,单位秒,注意如果调整了数据采集频率,请记得同步修改此配置
collectionFrequency: 10
#报警判断时间间隔 单位秒
alarmTimeInterval: 600
#设备报警判断时间间隔 单位秒
equipAlarmTimeInterval: 300
#判断是否在离线
isRunTimeInterval: 180
isRunTimeInterval: 3600
#视频对接相关配置,未使用,待完善
video:
# ip:
# port:
# username:
# password:
#海康威视需要填写密钥
secretkey:
ip: 113.249.91.27
port: 8667
appkey: 21656155
secretkey: llQvkzDIzmYnNiXNYxDN
#消息推送
push:
#是否开启流程消息推送
process-enable: false
mob:
appSecret: 7552f0cfe1db2b3bb2c4dfbda4ead4e7
appKey: 3440fa94df400
appSecret: 4e21ddb344233a5a3ec6b3446310efe1
appKey: 35e7ed05966f2
pushHostName: http://api.push.mob.com/v3/push/createPush
packageName: com.kongtrol.flutterxingtai
packageName: com.kingtrol.flutter_factoryApp
iosProduction: 0
# 自定义逻辑,以','分割(e.g: messagePush:消息推送完后处理)
flow:
......@@ -174,3 +181,10 @@ flowable:
content:
storage:
create-root: false
#第三方AR远程会议
ar-remote-meeting:
# 接口地址
url: https://47.104.179.187:8443/api/
# mqtt服务地址
mqtt-url: tcp://47.104.179.187:1883
......
......@@ -96,6 +96,7 @@ spring:
# 多数据源配置
pg-db:
url: jdbc:postgresql://103.85.171.27:10087/postgres?useUnicode=true&characterEncoding=UTF8
# url: jdbc:postgresql://113.249.91.27:10086/postgres?useUnicode=true&characterEncoding=UTF8
username: postgres
password: jkauto@123
driver-class-name: org.postgresql.Driver
......@@ -127,15 +128,15 @@ mybatis-plus:
configuration:
call-setters-on-nulls: true
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#数矿专用配置
skua:
web-url: http://192.168.100.29:3000
path:
#文件上传根目录 设置
upload: ../file
upload: D:\IdeaProjects\zhongye\file
#webapp文件路径
webapp: ../file
webapp: D:\IdeaProjects\zhongye\file
# 断点续传路径
chunk: D:\IdeaProjects\zhongye\file\files
#创蓝短信秘钥
......@@ -156,10 +157,10 @@ skua:
isRunTimeInterval: 3600
#视频对接相关配置,未使用,待完善
video:
ip: 118.190.97.62
ip: 113.249.91.27
port: 8667
appkey: 23259573
secretkey: 0zoBqIJeudIhgCysCe0r
appkey: 21656155
secretkey: llQvkzDIzmYnNiXNYxDN
#消息推送
push:
#是否开启流程消息推送
......
......@@ -252,8 +252,7 @@ public class EquipmentSparepartController {
.like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartCode()), "equipment_sparepart_supplies.sparepart_code", equipmentSparepartDTO.getSparepartCode())
.like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSpecification()), "equipment_sparepart_supplies.specification", equipmentSparepartDTO.getSpecification())
.like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartName()), "equipment_sparepart_supplies.sparepart_name", equipmentSparepartDTO.getSparepartName())
.like(StringUtils.isNotEmpty(equipmentSparepartDTO.getIsEmergency()), "equipment_sparepart.is_emergency", equipmentSparepartDTO.getIsEmergency())
.like(StringUtils.isNotEmpty(equipmentSparepartDTO.getIsDangerous()), "equipment_sparepart.is_dangerous", equipmentSparepartDTO.getIsDangerous())
.like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartAttribute()), "equipment_sparepart.sparepart_attribute", equipmentSparepartDTO.getSparepartAttribute())
.in(!sparepartTypeSet.isEmpty(), "equipment_sparepart_supplies.sparepart_type", sparepartTypeSet)
.like(StringUtils.isNotEmpty(equipmentSparepartDTO.getWarehouseName()), "warehouse_name", equipmentSparepartDTO.getWarehouseName())
.like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSuppliesWarehouseId()), "supplies_warehouse_id", equipmentSparepartDTO.getSuppliesWarehouseId())
......@@ -265,6 +264,7 @@ public class EquipmentSparepartController {
Map<String, String> suppliesWarehouseVal2KeyMap = key2ValueService.dictKey2Val("suppliesWarehouse", false);
Map<String, String> departInfoVal2KeyMap = key2ValueService.dictKey2Val("sysDepart", false);
Map<String, String> unitInfoVal2KeyMap = key2ValueService.dictKey2Val("equipment-sparepart_measuring_unit", false);
Map<String, String> attributeVal2KeyMap = key2ValueService.dictKey2Val("sparepart_attribute", false);
JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master");
//品牌厂商
......@@ -275,6 +275,7 @@ public class EquipmentSparepartController {
.addCallback("EquipmentSparepartSupplies_sparepartType", "sparepartType_dictText")
.addCallback("EquipmentSparepartSupplies_manufacturer", "manufacturer_dictText")
.addCallback("suppliesWarehouseId", "suppliesWarehouseId_dictText")
.addCallback("sparepartAttribute", "sparepartAttribute_dictText")
.addCallback("SuppliesWarehouse_departId", "departIdName")
.addCallback("EquipmentSparepartSupplies_measuringUnit", "measuringUnit_dictText")
.maps2MapsWithoutPrefix(mapPage.getRecords(), (targetFieldName, srcFieldVal) -> {
......@@ -288,6 +289,8 @@ public class EquipmentSparepartController {
return suppliesWarehouseVal2KeyMap.getOrDefault(srcFieldVal, "");
}else if ("measuringUnit_dictText".equals(targetFieldName)) {
return unitInfoVal2KeyMap.getOrDefault(srcFieldVal, "");
}else if ("sparepartAttribute_dictText".equals(targetFieldName)) {
return attributeVal2KeyMap.getOrDefault(srcFieldVal, "");
}
return srcFieldVal;
});
......
......@@ -231,16 +231,9 @@ public class EquipmentSparepart {
@ApiModelProperty(value = "所属厂站")
private String departId;
/** 是否应急物资 */
@Excel(name = "是否应急物资", width = 15)
@ApiModelProperty(value = "是否应急物资")
@Dict(dicCode = "yn")
private String isEmergency;
/** 是否危化品 */
@Excel(name = "是否危化品", width = 15)
@ApiModelProperty(value = "是否危化品")
@Dict(dicCode = "yn")
private String isDangerous;
/** 物料属性 */
@ApiModelProperty(value = "物料属性")
@Dict(dicCode = "sparepart_attribute")
private String sparepartAttribute;
}
......
......@@ -235,17 +235,11 @@ public class EquipmentSparepartSupplies {
@ApiModelProperty(value = "生成时间")
private Date inventoryUpdateTime;
/** 是否应急物资 */
@Excel(name = "是否应急物资", width = 15)
@ApiModelProperty(value = "是否应急物资")
@Dict(dicCode = "yn")
private String isEmergency;
/** 是否危化品 */
@Excel(name = "是否危化品", width = 15)
@ApiModelProperty(value = "是否危化品")
@Dict(dicCode = "yn")
private String isDangerous;
/** 物料属性 */
@Excel(name = "物料属性", width = 15)
@ApiModelProperty(value = "物料属性")
@Dict(dicCode = "sparepart_attribute")
private String sparepartAttribute;
......
......@@ -221,13 +221,9 @@ public class EquipmentSparepartSuppliesVO {
@TableField(exist = false)
private String storageWarn;
/** 是否应急物资 */
@ApiModelProperty(value = "是否应急物资")
@Dict(dicCode = "yn")
private String isEmergency;
/** 是否危化品 */
@ApiModelProperty(value = "是否危化品")
@Dict(dicCode = "yn")
private String isDangerous;
/** 物料属性 */
@Excel(name = "物料属性", width = 15)
@ApiModelProperty(value = "物料属性")
@Dict(dicCode = "sparepart_attribute")
private String sparepartAttribute;
}
......
......@@ -426,6 +426,28 @@ public class SysDepartController {
}
/**
* 获取部门人员机构树
*
* @return
*/
@RequestMapping(value = "/queryDeptAndUserTreeList", method = RequestMethod.GET)
public Result<List<TreeData>> queryDeptAndUserTreeList(String departId,String userType) {
//获取数据列表
List<SysDeptUserVO> list = sysDepartService.queryDeptAndUserTreeList(departId,userType);
//将业务数据转换为构造树所需的数据结构
List<TransTreeModel> transTreeModels = list.stream().map(bo -> convertToTreeModel(bo)).collect(Collectors.toList());
List<TreeData> treeList = TreeUtils.buildTree(transTreeModels, departId);
Result<List<TreeData>> result = new Result<>();
try {
result.setResult(treeList);
result.setSuccess(true);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return result;
}
/**
* 获取部门人员机构树-无数据权限
*
* @return
......
......@@ -211,7 +211,7 @@ public class SysFactoryInfoController {
for (SysFactoryTreeVO vo : list) {
if (!vo.getNodeType().equals("group")) {
if (vo.getDepartType().equals("1") || vo.getDepartType().equals("1")) {
if (vo.getDepartType().equals("0") || vo.getDepartType().equals("1")) {
resultList.add(vo);
}
} else {
......
......@@ -28,6 +28,10 @@ public class SysFactoryUserData {
@TableId(type = IdType.ID_WORKER_STR)
@ApiModelProperty(value = "主键")
private String id;
/**基础信息ID*/
@Excel(name = "基础信息ID", width = 15)
@ApiModelProperty(value = "基础信息ID")
private String baseId;
/**成员ID*/
@Excel(name = "成员ID", width = 15)
@ApiModelProperty(value = "成员ID")
......
......@@ -140,4 +140,8 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> {
List<DepartTree> getJimuDepartTree(@Param("pid") String pid);
String getChildDepartId(@Param("departIds") String departIds);
List<SysDeptUserVO> queryDeptAndUserTreeList(@Param("departId") String departId);
List<SysDeptUserVO> queryDeptAndSystemTreeList(@Param("departId") String departId);
}
......
......@@ -51,7 +51,6 @@
ORDER BY
depart_type,
depart_order
</select>
<select id="getParentDepartTree" parameterType="java.lang.String" resultType="com.skua.modules.system.entity.SysDepart">
......@@ -223,4 +222,80 @@
</foreach>
)
</select>
<select id="queryDeptAndUserTreeList" parameterType="java.lang.String" resultType="com.skua.modules.system.vo.SysDeptUserVO">
SELECT
*
FROM
(
SELECT
'dept' AS node_type,
id,
parent_id,
depart_name AS title,
depart_type,
depart_order
FROM
sys_depart
WHERE
FIND_IN_SET(
id,
getDepartTree (
#{departId}
)
)
UNION ALL
SELECT
'emp' AS node_type,
id AS id,
depart_id AS parent_id,
staff_name AS title,
'0' AS depart_type,
0 AS depart_order
FROM
epiboly_outer_staff
) aa
ORDER BY
depart_type,
depart_order
</select>
<select id="queryDeptAndSystemTreeList" parameterType="java.lang.String" resultType="com.skua.modules.system.vo.SysDeptUserVO">
SELECT
*
FROM
(
SELECT
'dept' AS node_type,
id,
parent_id,
depart_name AS title,
depart_type,
depart_order
FROM
sys_depart
WHERE
FIND_IN_SET(
id,
getDepartTree (
#{departId}
)
)
UNION ALL
SELECT
'emp' AS node_type,
b.user_id AS id,
b.dep_id AS parent_id,
realname AS title,
'0' AS depart_type,
0 AS depart_order
FROM
sys_user a
INNER JOIN sys_user_depart b ON a.id = b.user_id
WHERE
a.is_system_user = '0'
and a.del_flag = '0'
) aa
ORDER BY
depart_type,
depart_order
</select>
</mapper>
......
......@@ -170,4 +170,6 @@ public interface ISysDepartService extends IService<SysDepart>{
List<DepartTree> getJimuDepartTree(String pid);
String getChildDepartId(String departIds);
List<SysDeptUserVO> queryDeptAndUserTreeList(String departId,String userType);
}
......
......@@ -452,4 +452,15 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
return sysDepartMapper.getChildDepartId(departIds);
}
@Override
public List<SysDeptUserVO> queryDeptAndUserTreeList(String departId, String userType) {
List<SysDeptUserVO> list = new ArrayList<>();
if("2".equals(userType)){
list = sysDepartMapper.queryDeptAndUserTreeList(departId);
}else{
list = sysDepartMapper.queryDeptAndSystemTreeList(departId);
}
return list;
}
}
......
package com.skua.modules.system.vo;
import com.skua.core.aspect.annotation.Dict;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.util.Date;
/**
* 人员证书
* @author zl
*
*/
@Data
public class UserCertificate {
/**证件名称*/
@ApiModelProperty(value = "证件名称")
private String certifiesName;
/**证件类型*/
@ApiModelProperty(value = "证件类型")
@Dict(dicCode = "epiboly_certificate_type")
private String certifiesType;
/**证件文件*/
@ApiModelProperty(value = "证件文件")
private String certifiesFile;
/**到期时间*/
@ApiModelProperty(value = "到期时间")
private String endTime;
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!