From 65d90a55e6085e9ce2f049b002f1a1715abf6e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Thu, 6 Jun 2024 22:13:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../checkDetection/checkDetectionDrawer.vue | 2 +- .../views/project/checkDetection/index.vue | 536 +++++++++++++----- .../src/views/project/materialSeal/index.vue | 2 +- .../projectMaterialSealDrawer.vue | 2 +- .../views/project/projectChecking/index.vue | 2 +- .../projectChecking/projectCheckingDrawer.vue | 2 +- .../views/project/projectMeasure/index.vue | 2 +- .../projectMeasure/projectMeasureDrawer.vue | 2 +- .../mapper/SurProjectUserinfoMapper.java | 8 + .../impl/SurProjectUserinfoServiceImpl.java | 7 + .../jh/project/task/AttendanceJgwTask.java | 3 +- .../project/SurProjectUserinfoMapper.xml | 11 + 12 files changed, 443 insertions(+), 136 deletions(-) diff --git a/ruoyi-ui/src/views/project/checkDetection/checkDetectionDrawer.vue b/ruoyi-ui/src/views/project/checkDetection/checkDetectionDrawer.vue index 3c588c3f..e35e1198 100644 --- a/ruoyi-ui/src/views/project/checkDetection/checkDetectionDrawer.vue +++ b/ruoyi-ui/src/views/project/checkDetection/checkDetectionDrawer.vue @@ -89,7 +89,7 @@ - {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} diff --git a/ruoyi-ui/src/views/project/checkDetection/index.vue b/ruoyi-ui/src/views/project/checkDetection/index.vue index 6db557d3..7a9a7864 100644 --- a/ruoyi-ui/src/views/project/checkDetection/index.vue +++ b/ruoyi-ui/src/views/project/checkDetection/index.vue @@ -1,16 +1,37 @@ - + - + - + - + - + - + - - + + - + - + - + - 搜索 + 搜索 重置 @@ -110,35 +165,80 @@ - - + + {{ scope.row.projectName }} - + - + - - - + + + 已提供 未提供 - + {{ scope.row.witnessUserName }} {{ scope.row.witnessUser }} - + {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} @@ -154,12 +254,24 @@ --> - + + + 待登记检测结果 + - {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} @@ -171,52 +283,127 @@ - 下载检测报告 + 下载检测报告 - + - 登记检测结果 - 审批日志 - 处理审批 - 修改 - 删除 + 登记检测结果 + 审批日志 + 处理审批 + 修改 + 删除 - + - + - + - - + + - - + + @@ -246,45 +433,75 @@ - - - + + + + - - - + + + - - - - + - + - - + + @@ -293,8 +510,13 @@ - + @@ -307,47 +529,97 @@ - - - @@ -379,7 +654,12 @@ export default { indexDrawer, approveCheckDetectionDrawer, }, - dicts: ["sys_yes_no", "project_check_status", "project_checking_result", "check_detection_check_type"], + dicts: [ + "sys_yes_no", + "project_check_status", + "project_checking_result", + "check_detection_check_type", + ], data() { return { // 遮罩层 @@ -450,12 +730,8 @@ export default { qualifiedFlag: [ { required: true, message: "请选择是否提供合格证", trigger: "blur" }, ], - trustDeed:[ - {required:true,message:'请上传委托单',trigger:"blur"} - ], - specimenPhoto:[ - {required:true,message:'请上传样品照片',trigger:"blur"} - ], + trustDeed: [{ required: true, message: "请上传委托单", trigger: "blur" }], + specimenPhoto: [{ required: true, message: "请上传样品照片", trigger: "blur" }], witnessUser: [ { required: true, message: "请选择监理单位监理专员", trigger: "blur" }, ], @@ -466,7 +742,9 @@ export default { checkTime: [{ required: true, message: "请选择送检时间", trigger: "blur" }], }, resultrules: { - detectionResult: [{ required: false, message: "请选择检测结果", trigger: "blur" }], + detectionResult: [ + { required: false, message: "请选择检测结果", trigger: "blur" }, + ], detectionFile: [{ required: true, message: "请上传检测报告", trigger: "blur" }], }, deptUserData: [], @@ -477,11 +755,11 @@ export default { }, }; }, - created() { + created() { this.getList(); }, methods: { - doDown(row){ + doDown(row) { this.files = row.detectionFile.split(","); this.files.forEach((item) => { this.$download.resource(item); @@ -508,8 +786,8 @@ export default { } this.queryCount(this.queryParams); listCheckDetection(this.queryParams).then((response) => { - this.checkDetectionList = (response.rows||[]).map(d=>{ - d.attachmentFiles=this.$tryToJson(d.attachment,[]); + this.checkDetectionList = (response.rows || []).map((d) => { + d.attachmentFiles = this.$tryToJson(d.attachment, []); return d; }); this.total = response.total; @@ -588,14 +866,14 @@ export default { this.reset(); const id = row.id || this.ids; getCheckDetection(id).then((response) => { - let obj= response.data; - obj.attachmentFiles=this.$tryToJson(obj.attachment||'[]',[]).map(d=>{ + let obj = response.data; + obj.attachmentFiles = this.$tryToJson(obj.attachment || "[]", []).map((d) => { return { - name:d, - url:d - } + name: d, + url: d, + }; }); - this.form =obj; + this.form = obj; this.open = true; this.title = "修改材料取样复试"; }); @@ -622,7 +900,9 @@ export default { submitForm() { this.$refs["form"].validate((valid) => { if (valid) { - this.form.attachment=this.form.attachmentFiles?JSON.stringify(this.form.attachmentFiles.map(d=>d.url)):"[]"; + this.form.attachment = this.form.attachmentFiles + ? JSON.stringify(this.form.attachmentFiles.map((d) => d.url)) + : "[]"; if (this.form.id != null) { updateCheckDetection(this.form).then((response) => { this.$modal.msgSuccess("修改成功"); @@ -666,7 +946,7 @@ export default { this.getList(); this.$modal.msgSuccess("删除成功"); }) - .catch(() => { }); + .catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -687,7 +967,7 @@ export default { } }); }); - }, + }, /** 审批日志 */ handleAuditinfo(row) { row.title = "材料取样复试"; @@ -698,51 +978,51 @@ export default { handleAudit(row) { row.typeName = "材料封样"; this.$refs.approveCheckDetectionDrawer.show(row); - } + }, }, }; \ No newline at end of file + diff --git a/ruoyi-ui/src/views/project/materialSeal/index.vue b/ruoyi-ui/src/views/project/materialSeal/index.vue index 0311be92..eb7ab730 100644 --- a/ruoyi-ui/src/views/project/materialSeal/index.vue +++ b/ruoyi-ui/src/views/project/materialSeal/index.vue @@ -286,7 +286,7 @@ - {{ parseTime(scope.row.measureTime, "{y}-{m}-{d}") }} + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} - {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} diff --git a/ruoyi-ui/src/views/project/projectChecking/index.vue b/ruoyi-ui/src/views/project/projectChecking/index.vue index 1da8e571..213dc8de 100644 --- a/ruoyi-ui/src/views/project/projectChecking/index.vue +++ b/ruoyi-ui/src/views/project/projectChecking/index.vue @@ -338,7 +338,7 @@ - {{ parseTime(scope.row.measureTime, "{y}-{m}-{d}") }} + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} - {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} diff --git a/ruoyi-ui/src/views/project/projectMeasure/index.vue b/ruoyi-ui/src/views/project/projectMeasure/index.vue index 575f3a74..5e337480 100644 --- a/ruoyi-ui/src/views/project/projectMeasure/index.vue +++ b/ruoyi-ui/src/views/project/projectMeasure/index.vue @@ -287,7 +287,7 @@ - {{ parseTime(scope.row.measureTime, "{y}-{m}-{d}") }} + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} - {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/mapper/SurProjectUserinfoMapper.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/mapper/SurProjectUserinfoMapper.java index 9d7c9d58..397872ab 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/mapper/SurProjectUserinfoMapper.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/mapper/SurProjectUserinfoMapper.java @@ -91,4 +91,12 @@ public interface SurProjectUserinfoMapper * @return */ public List selectDesignUsers(); + + /** + * 批量删除项目用户 + * + * @param userIds 需要删除的数据主键集合 + * @return 结果 + */ + public List findProjectUserExists(Long[] userIds); } diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectUserinfoServiceImpl.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectUserinfoServiceImpl.java index 832fb5ca..d7ea5650 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectUserinfoServiceImpl.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectUserinfoServiceImpl.java @@ -9,6 +9,7 @@ import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.enums.DeptTypeEnum; import com.ruoyi.common.enums.PublicStateEnum; import com.ruoyi.common.enums.SysRoleEnum; +import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; @@ -219,6 +220,7 @@ public class SurProjectUserinfoServiceImpl implements ISurProjectUserinfoService */ surProjectUserinfo.setCreateTime(DateUtils.getNowDate()); SysDept sysDept = deptMapper.selectDeptById(surProjectUserinfo.getDeptId()); + //如果时城建公司的人&&当前选的单位非子公司,这里自己查询项目的所属单位 if(DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag()) || DeptTypeEnum.JTGS.getCode().equals(sysDept.getTypeFlag())){ SurProject surProject = surProjectMapper.selectSurProjectById(surProjectUserinfo.getProjectId()); @@ -233,6 +235,11 @@ public class SurProjectUserinfoServiceImpl implements ISurProjectUserinfoService //集团人进入项目也是责任主体 surProjectUserinfo.setDeptType(DeptTypeEnum.ZGS.getCode()); }else{ + //查询当前人是否已在其它项目 + List exists = surProjectUserinfoMapper.findProjectUserExists(surProjectUserinfo.getUserIds()); + if(StringUtils.isNotEmpty(exists)){ + throw new ServiceException(exists.get(0).getNickName()+"已加入"+exists.get(0).getProjectName()); + } surProjectUserinfo.setDeptType(sysDept.getTypeFlag()); } surProjectUserinfo.setDeptName(sysDept.getDeptName()); diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/task/AttendanceJgwTask.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/task/AttendanceJgwTask.java index b44325c4..35d666a9 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/task/AttendanceJgwTask.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/task/AttendanceJgwTask.java @@ -204,7 +204,8 @@ public class AttendanceJgwTask { String appid="6a6f24fe35b04ee0bcf31cfb46ed1051"; String secret="c3h5enh4MjAyNHN1Yw=="; //String prjId="db955e11ef774e63968a47c3dc2acc15";//"b67f1baa6dca4558a16bf90a4681b82e";// - String prjId="cace2f676371427e8f6da20d2924f64e";//泾河新城荟锦坊二期 + //String prjId="cace2f676371427e8f6da20d2924f64e";//泾河新城荟锦坊二期 + String prjId="209aa0c01d8248b6a56a0921d1b88c83";//泾河新城锦樾坊项目 String phone="15619028761"; String token= getToken(appid,secret); if(token==null || token.length()==0){ diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectUserinfoMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectUserinfoMapper.xml index 49cc5d7d..182f3a8b 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectUserinfoMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectUserinfoMapper.xml @@ -198,4 +198,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND (u.dept_id = 101 or find_in_set(101, d.ancestors)) order by d.dept_id + + + select spu.id, spu.project_id, spu.dept_id, spu.dept_name, spu.dept_type, spu.job_type, spu.user_id, spu.is_del, spu.create_by, spu.create_time, spu.update_by, spu.update_time, spu.remark, sp.projectName, su.nick_name, su.phonenumber from sur_project_userinfo spu + left join sys_user su on spu.user_id = su.user_id + left join sur_project sp on spu.project_id = sp.id + where spu.is_del=0 and spu.user_id in + + #{id} + + + \ No newline at end of file