[add] 添加人员手机号、银行卡加密,添加施工人员分类

This commit is contained in:
lcj
2025-07-09 19:51:56 +08:00
parent d51c0402ff
commit 81f4284b9c
12 changed files with 58 additions and 92 deletions

View File

@ -2,7 +2,7 @@
spring.boot.admin.client:
# 增加客户端开关
enabled: false
url: http://localhost:9090/admin
url: http://192.168.110.119:9090/admin
instance:
service-host-type: IP
metadata:
@ -19,7 +19,7 @@ snail-job:
# SnailJob 接入验证令牌 详见 script/sql/ry_job.sql `sj_group_config` 表
token: "SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT"
server:
host: 127.0.0.1
host: 192.168.110.119
port: 17888
# 命名空间UUID 详见 script/sql/ry_job.sql `sj_namespace`表`unique_id`字段
namespace: ${spring.profiles.active}

View File

@ -119,7 +119,8 @@ security:
- /error
- /*/api-docs
- /*/api-docs/**
- /warm-flow-ui/config
- /warm-flow-ui/**
- /warm-flow/**
- /other/ys7Device/webhook
# todo 仅测试
- /facility/matrix/**

View File

@ -38,7 +38,7 @@ spring.boot.admin.client:
# 增加客户端开关
enabled: true
# 设置 Spring Boot Admin Server 地址
url: http://localhost:9090/admin
url: http://192.168.110.119:9090/admin
instance:
service-host-type: IP
metadata:

View File

@ -2,9 +2,9 @@ spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root
password: root
url: jdbc:mysql://192.168.110.2:13386/xinnengyuandev?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: xinnengyuandev
password: StRWCZdZirysNSs2
hikari:
connection-timeout: 30000
validation-timeout: 5000
@ -43,7 +43,7 @@ snail-job:
spring.boot.admin.client:
# 增加客户端开关
enabled: true
url: http://localhost:9090/admin
url: http://192.168.110.119:9090/admin
instance:
service-host-type: IP
metadata:

View File

@ -179,6 +179,11 @@ public class SubConstructionUser extends BaseEntity {
*/
private Long salary;
/**
* 用户角色
*/
private String userRole;
/**
* 备注
*/

View File

@ -60,11 +60,6 @@ public class SubConstructionUserQueryReq implements Serializable {
*/
private String isPinch;
/**
* 联系电话
*/
private String phone;
/**
* 0:保密 1:男 2女
*/
@ -75,31 +70,16 @@ public class SubConstructionUserQueryReq implements Serializable {
*/
private String nation;
/**
* 身份证号码
*/
private String sfzNumber;
/**
* 籍贯
*/
private String nativePlace;
/**
* 银行卡号
*/
private String yhkNumber;
/**
* 开户行
*/
private String yhkOpeningBank;
/**
* 持卡人
*/
private String yhkCardholder;
/**
* 工种(字典type_of_work)
*/
@ -116,13 +96,13 @@ public class SubConstructionUserQueryReq implements Serializable {
private String clock;
/**
* 薪水
* 用户角色
*/
private Long salary;
private String userRole;
/**
* 备注
* 不是用户角色
*/
private String remark;
private String notUserRole;
}

View File

@ -235,6 +235,11 @@ public class SubConstructionUserVo implements Serializable {
@ExcelProperty(value = "薪水")
private Long salary;
/**
* 用户角色
*/
private String userRole;
/**
* 文件上传状态
*/

View File

@ -666,6 +666,12 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
String decrypt = idCardEncryptorUtil.decrypt(constructionUserVo.getSfzNumber());
String hide = DesensitizedUtil.idCardNum(decrypt, 1, 2);
constructionUserVo.setSfzNumber(hide);
// 隐藏手机号码
String hidePhone = DesensitizedUtil.mobilePhone(constructionUserVo.getPhone());
constructionUserVo.setPhone(hidePhone);
// 隐藏银行卡号
String hideBank = DesensitizedUtil.bankCard(constructionUserVo.getYhkNumber());
constructionUserVo.setYhkNumber(hideBank);
return constructionUserVo;
}
@ -691,29 +697,20 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
String teamName = req.getTeamName();
String status = req.getStatus();
String isPinch = req.getIsPinch();
String phone = req.getPhone();
String sex = req.getSex();
String nation = req.getNation();
String sfzNumber = req.getSfzNumber();
String nativePlace = req.getNativePlace();
String yhkNumber = req.getYhkNumber();
String yhkOpeningBank = req.getYhkOpeningBank();
String yhkCardholder = req.getYhkCardholder();
String typeOfWork = req.getTypeOfWork();
String wageMeasureUnit = req.getWageMeasureUnit();
String clock = req.getClock();
Long salary = req.getSalary();
String remark = req.getRemark();
String userRole = req.getUserRole();
String notUserRole = req.getNotUserRole();
// 模糊查询
lqw.like(StringUtils.isNotBlank(userName), SubConstructionUser::getUserName, userName);
lqw.like(StringUtils.isNotBlank(remark), SubConstructionUser::getRemark, remark);
lqw.like(StringUtils.isNotBlank(phone), SubConstructionUser::getPhone, phone);
lqw.like(StringUtils.isNotBlank(nation), SubConstructionUser::getNation, nation);
lqw.like(StringUtils.isNotBlank(sfzNumber), SubConstructionUser::getSfzNumber, sfzNumber);
lqw.like(StringUtils.isNotBlank(nativePlace), SubConstructionUser::getNativePlace, nativePlace);
lqw.like(StringUtils.isNotBlank(yhkNumber), SubConstructionUser::getYhkNumber, yhkNumber);
lqw.like(StringUtils.isNotBlank(yhkOpeningBank), SubConstructionUser::getYhkOpeningBank, yhkOpeningBank);
lqw.like(StringUtils.isNotBlank(yhkCardholder), SubConstructionUser::getYhkCardholder, yhkCardholder);
lqw.like(StringUtils.isNotBlank(teamName), SubConstructionUser::getTeamName, teamName);
// 精确查询
lqw.eq(StringUtils.isNotBlank(status), SubConstructionUser::getStatus, status);
@ -725,8 +722,8 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
lqw.eq(StringUtils.isNotBlank(sex), SubConstructionUser::getSex, sex);
lqw.eq(ObjectUtils.isNotEmpty(typeOfWork), SubConstructionUser::getTypeOfWork, typeOfWork);
lqw.eq(ObjectUtils.isNotEmpty(clock), SubConstructionUser::getClock, clock);
lqw.eq(ObjectUtils.isNotEmpty(salary), SubConstructionUser::getSalary, salary);
lqw.eq(StringUtils.isNotBlank(wageMeasureUnit), SubConstructionUser::getWageMeasureUnit, wageMeasureUnit);
lqw.eq(StringUtils.isNotBlank(userRole), SubConstructionUser::getUserRole, userRole);
// 精准查询,不等于
if (ObjectUtils.isNotEmpty(notTeamId)) {
lqw.and(wrapper -> wrapper
@ -741,6 +738,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
lqw.notIn(SubConstructionUser::getId, blackUserIdList);
}
}
lqw.ne(StringUtils.isNotBlank(notUserRole), SubConstructionUser::getUserRole, notUserRole);
return lqw;
}
@ -818,6 +816,12 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
String decrypt = idCardEncryptorUtil.decrypt(constructionUserVo.getSfzNumber());
String hide = DesensitizedUtil.idCardNum(decrypt, 1, 2);
constructionUserVo.setSfzNumber(hide);
// 隐藏手机号码
String hidePhone = DesensitizedUtil.mobilePhone(constructionUserVo.getPhone());
constructionUserVo.setPhone(hidePhone);
// 隐藏银行卡号
String hideBank = DesensitizedUtil.bankCard(constructionUserVo.getYhkNumber());
constructionUserVo.setYhkNumber(hideBank);
return constructionUserVo;
}).toList();
constructionUserVoPage.setRecords(constructionUserVoList);

View File

@ -132,7 +132,7 @@ public class SubContractorServiceImpl extends ServiceImpl<SubContractorMapper, S
throw new ServiceException("项目不存在", HttpStatus.NOT_FOUND);
}
// 创建部门
Long deptId = project.getDeptId();
/* Long deptId = project.getDeptId();
SysDeptBo createBo = new SysDeptBo();
createBo.setParentId(deptId);
createBo.setDeptName(name);
@ -150,7 +150,7 @@ public class SubContractorServiceImpl extends ServiceImpl<SubContractorMapper, S
Boolean result = postService.insertPostByDeptId(newDeptId);
if (!result) {
throw new ServiceException("对应岗位类型保存失败");
}
}*/
// 操作数据库
boolean save = this.save(contractor);
if (!save) {

View File

@ -1,7 +1,6 @@
package org.dromara.project.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -130,15 +129,4 @@ public class BusLeave extends BaseEntity {
*/
private String remark;
/**
* 删除时间
*/
private Date deletedAt;
/**
* 是否删除0正常 1删除
*/
@TableLogic
private Long isDelete;
}

View File

@ -280,21 +280,23 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
Map<Long, List<SubContractor>> projectIdContractorList = contractorService.list(lqw).stream()
.collect(Collectors.groupingBy(SubContractor::getProjectId));
// 获取封装
return projectList.stream().map(project -> {
BusProjectContractorListVo projectContractorListResp = new BusProjectContractorListVo();
// 添加项目信息
projectContractorListResp.setId(project.getId());
projectContractorListResp.setProjectName(project.getProjectName());
// 获取分包公司列表
List<SubContractor> contractorList = projectIdContractorList.get(project.getId());
if (CollUtil.isEmpty(contractorList)) {
throw new ServiceException("项目:" + project.getProjectName() + "下无分包单位,请创建后再进行操作", HttpStatus.BAD_REQUEST);
}
List<IdAndNameVO> idAndNameVOS = contractorList.stream()
.map(contractor -> IdAndNameVO.build(contractor.getId(), contractor.getName())).toList();
projectContractorListResp.setContractorList(idAndNameVOS);
return projectContractorListResp;
}).toList();
return projectList.stream()
.filter(project -> {
List<SubContractor> contractorList = projectIdContractorList.get(project.getId());
return !CollUtil.isEmpty(contractorList); // 过滤掉没有分包单位的项目
})
.map(project -> {
BusProjectContractorListVo projectContractorListResp = new BusProjectContractorListVo();
// 添加项目信息
projectContractorListResp.setId(project.getId());
projectContractorListResp.setProjectName(project.getProjectName());
// 获取分包公司列表
List<SubContractor> contractorList = projectIdContractorList.get(project.getId());
List<IdAndNameVO> idAndNameVOS = contractorList.stream()
.map(contractor -> IdAndNameVO.build(contractor.getId(), contractor.getName())).toList();
projectContractorListResp.setContractorList(idAndNameVOS);
return projectContractorListResp;
}).toList();
}
/**

View File

@ -1,19 +0,0 @@
package org.dromara.workflow.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author lcj
* @date 2025/7/8 15:23
*/
@RestController
@RequestMapping("/workflow/design")
public class WorkflowDesignController {
@RequestMapping("/index")
public String forwardWorkflowDesign() {
return "forward:/index.html";
}
}