From a8edbfab2f16f5a375a542416978b0d0e9c6a239 Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Fri, 4 Jul 2025 13:43:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=92=8C=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E8=BF=94=E5=9B=9E=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/controller/ProjectController.java | 12 ++++++++++++ .../evaluate/controller/TeamGroupController.java | 10 ++++++++++ .../sub/evaluate/evaluate/dao/TeamGroupDao.java | 2 +- .../evaluate/service/TeamGroupServiceImpl.java | 10 +++++++++- .../mappers/evaluate/TeamGroupMapper.xml | 9 ++++++--- .../static/js/evaluate/project/subcontractor.js | 7 ++++++- .../js/evaluate/teamGroup/editPersonForm.js | 4 ++-- .../static/js/evaluate/teamGroup/teamGroupList.js | 15 +++++++++++++-- .../static/js/evaluate/teamGroup/teamMemBer.js | 14 ++++++++++++-- .../pages/evaluate/project/subcontractor.html | 2 ++ .../pages/evaluate/teamGroup/editPersonForm.html | 2 ++ .../pages/evaluate/teamGroup/teamGroupList.html | 2 ++ .../pages/evaluate/teamGroup/teamMemBer.html | 2 ++ 13 files changed, 79 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/ProjectController.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/ProjectController.java index cb6a3d3..8a93bbb 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/ProjectController.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/ProjectController.java @@ -5,10 +5,12 @@ import com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean; import com.bonus.gs.sub.evaluate.evaluate.beans.PersonBean; import com.bonus.gs.sub.evaluate.evaluate.beans.ProjectBean; import com.bonus.gs.sub.evaluate.evaluate.service.ProjectService; +import com.bonus.gs.sub.evaluate.manager.utils.AesCbcUtils; import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes; import com.bonus.gs.sub.evaluate.manager.utils.GlobalConst; import com.bonus.gs.sub.evaluate.outsourceEnterprise.beans.ViolationBean; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.*; @@ -92,6 +94,16 @@ public class ProjectController { AjaxRes ar = new AjaxRes(); try { List subcontractorList = service.getProjectSubcontractor(bean); + for (ViolationBean violationBean : subcontractorList) { + String phone = violationBean.getPhone(); + if (StringUtils.isNotBlank(phone)) { + violationBean.setPhone(AesCbcUtils.encrypt(phone)); + } + String idCard = violationBean.getIdCard(); + if (StringUtils.isNotBlank(idCard)) { + violationBean.setIdCard(AesCbcUtils.encrypt(idCard)); + } + } ar.setListSucceed(subcontractorList); } catch (Exception e) { ar.setFailMsg(GlobalConst.DATA_FAIL); diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/TeamGroupController.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/TeamGroupController.java index e6bd4ea..0c06c7b 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/TeamGroupController.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/TeamGroupController.java @@ -78,6 +78,16 @@ public class TeamGroupController extends BaseController { AjaxRes ar = new AjaxRes(); try { List teamGroupList = teamGroupService.getTeamGroupPerson(teamGroupBean); + for (TeamGroupBean groupBean : teamGroupList) { + String phone = groupBean.getPhone(); + if (StringUtils.isNotBlank(phone)) { + groupBean.setPhone(AesCbcUtils.encrypt(phone)); + } + String idCard = groupBean.getIdCard(); + if (StringUtils.isNotBlank(idCard)) { + groupBean.setIdCard(AesCbcUtils.encrypt(idCard)); + } + } ar.setListSucceed(teamGroupList); } catch (Exception e) { ar.setFailMsg(GlobalConst.DATA_FAIL); diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/TeamGroupDao.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/TeamGroupDao.java index 2c1aac5..b9fc1bb 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/TeamGroupDao.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/TeamGroupDao.java @@ -51,7 +51,7 @@ public interface TeamGroupDao { String getWorkTypeId(String workType); - String selectTeamLeaser(TeamGroupBean groupBean); + TeamGroupBean selectTeamLeaser(TeamGroupBean groupBean); List getTeamGroupPersons(TeamGroupBean teamGroupBean); } diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/TeamGroupServiceImpl.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/TeamGroupServiceImpl.java index d2dd9b6..24cf201 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/TeamGroupServiceImpl.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/TeamGroupServiceImpl.java @@ -2,6 +2,7 @@ package com.bonus.gs.sub.evaluate.evaluate.service; import com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean; import com.bonus.gs.sub.evaluate.evaluate.dao.TeamGroupDao; +import com.bonus.gs.sub.evaluate.manager.utils.AesCbcUtils; import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes; import com.bonus.gs.sub.evaluate.manager.utils.UserUtil; import org.apache.commons.lang3.StringUtils; @@ -31,7 +32,14 @@ public class TeamGroupServiceImpl implements TeamGroupService { public List getTeamGroupList(TeamGroupBean teamGroupBean) { List teamGroupList = teamGroupDao.getTeamGroupList(teamGroupBean); for (TeamGroupBean groupBean : teamGroupList) { - groupBean.setTeamLeader(teamGroupDao.selectTeamLeaser(groupBean)); + TeamGroupBean bean = teamGroupDao.selectTeamLeaser(groupBean); + if (bean != null){ + groupBean.setName(bean.getName()); + String phone = bean.getPhone(); + if (StringUtils.isNotBlank(phone)) { + groupBean.setPhone(AesCbcUtils.encrypt(phone)); + } + } } return teamGroupList; } diff --git a/src/main/resources/mappers/evaluate/TeamGroupMapper.xml b/src/main/resources/mappers/evaluate/TeamGroupMapper.xml index 4ffb983..d6615ac 100644 --- a/src/main/resources/mappers/evaluate/TeamGroupMapper.xml +++ b/src/main/resources/mappers/evaluate/TeamGroupMapper.xml @@ -123,9 +123,7 @@ - + + diff --git a/src/main/resources/static/js/evaluate/project/subcontractor.js b/src/main/resources/static/js/evaluate/project/subcontractor.js index 54a54b9..d46e205 100644 --- a/src/main/resources/static/js/evaluate/project/subcontractor.js +++ b/src/main/resources/static/js/evaluate/project/subcontractor.js @@ -66,7 +66,12 @@ function initTable() { }, {field: "enterpriseName", align: "center", title: "外包商名称"}, {field: "corporateName", align: "center", title: "法人"}, - {field: "phone", align: "center", title: "法人联系方式"}, + { field: 'phone', title: '法人联系方式', width: '15%', align: "center", + templet: function (d) { + let phone = decryptCBC(d.phone); + return maskSensitiveInfo(phone, "phone"); + } + }, { fixed: "right", width: 180, diff --git a/src/main/resources/static/js/evaluate/teamGroup/editPersonForm.js b/src/main/resources/static/js/evaluate/teamGroup/editPersonForm.js index 586de01..7bc5b33 100644 --- a/src/main/resources/static/js/evaluate/teamGroup/editPersonForm.js +++ b/src/main/resources/static/js/evaluate/teamGroup/editPersonForm.js @@ -14,8 +14,8 @@ function setParams(obj, layerIndex) { $("#sex").val(2); } - $("#idCard").val(objParam.idCard); - $("#phone").val(objParam.phone); + $("#idCard").val(decryptCBC(objParam.idCard)); + $("#phone").val(decryptCBC(objParam.phone)); if (objParam.faceUrl != null && objParam.faceUrl !== '') { $('#fileInfo').html(objParam.faceUrl); } diff --git a/src/main/resources/static/js/evaluate/teamGroup/teamGroupList.js b/src/main/resources/static/js/evaluate/teamGroup/teamGroupList.js index 6c24e21..80954d0 100644 --- a/src/main/resources/static/js/evaluate/teamGroup/teamGroupList.js +++ b/src/main/resources/static/js/evaluate/teamGroup/teamGroupList.js @@ -100,13 +100,24 @@ function initTable() { {field: "subContractor", align: "center", title: "所属分包商"}, {field: "project", align: "center", title: "所属项目"}, {field: "teamGroupName", align: "center", title: "班组名称"}, - {field: "teamLeader", align: "center", title: "班组长"}, + {field: "name", align: "center", title: "班组长姓名"}, + { + field: 'phone', title: '联系电话', width: '15%', align: "center", + templet: function (d) { + if (d.phone) { + let phone = decryptCBC(d.phone); + return maskSensitiveInfo(phone, "phone"); + } else { + return ""; + } + } + }, {field: "teamType", align: "center", title: "班组类型"}, { field: "teamPersonNum", align: "center", title: "班组人数", - templet: function(d) { + templet: function (d) { return '' + d.teamPersonNum + ''; } }, diff --git a/src/main/resources/static/js/evaluate/teamGroup/teamMemBer.js b/src/main/resources/static/js/evaluate/teamGroup/teamMemBer.js index 88a507e..43f4e8c 100644 --- a/src/main/resources/static/js/evaluate/teamGroup/teamMemBer.js +++ b/src/main/resources/static/js/evaluate/teamGroup/teamMemBer.js @@ -86,8 +86,18 @@ function initTable() { type: "numbers", }, {field: "name", align: "center", title: "姓名"}, - {field: "idCard", align: "center", title: "身份证"}, - {field: "phone", align: "center", title: "电话"}, + { field: 'idCard', title: '身份证', width: '15%', align: "center", + templet: function (d) { + let idCard = decryptCBC(d.idCard); + return maskSensitiveInfo(idCard, "idCard"); + } + }, + { field: 'phone', title: '电话', width: '15%', align: "center", + templet: function (d) { + let phone = decryptCBC(d.phone); + return maskSensitiveInfo(phone, "phone"); + } + }, {field: "sex", align: "center", title: "性别"}, {field: "workType", align: "center", title: "工种"}, { diff --git a/src/main/resources/static/pages/evaluate/project/subcontractor.html b/src/main/resources/static/pages/evaluate/project/subcontractor.html index 26344cd..add9b3e 100644 --- a/src/main/resources/static/pages/evaluate/project/subcontractor.html +++ b/src/main/resources/static/pages/evaluate/project/subcontractor.html @@ -55,6 +55,8 @@ + + diff --git a/src/main/resources/static/pages/evaluate/teamGroup/editPersonForm.html b/src/main/resources/static/pages/evaluate/teamGroup/editPersonForm.html index ab88ef6..8d5af72 100644 --- a/src/main/resources/static/pages/evaluate/teamGroup/editPersonForm.html +++ b/src/main/resources/static/pages/evaluate/teamGroup/editPersonForm.html @@ -150,6 +150,8 @@ + + diff --git a/src/main/resources/static/pages/evaluate/teamGroup/teamGroupList.html b/src/main/resources/static/pages/evaluate/teamGroup/teamGroupList.html index bdcd7aa..c4d8243 100644 --- a/src/main/resources/static/pages/evaluate/teamGroup/teamGroupList.html +++ b/src/main/resources/static/pages/evaluate/teamGroup/teamGroupList.html @@ -64,6 +64,8 @@ + + diff --git a/src/main/resources/static/pages/evaluate/teamGroup/teamMemBer.html b/src/main/resources/static/pages/evaluate/teamGroup/teamMemBer.html index 5a0bed0..07284e9 100644 --- a/src/main/resources/static/pages/evaluate/teamGroup/teamMemBer.html +++ b/src/main/resources/static/pages/evaluate/teamGroup/teamMemBer.html @@ -74,6 +74,8 @@ + +