From 34e8b050cc0dd76593d5cee7499c43aaf69497b2 Mon Sep 17 00:00:00 2001
From: "liang.chao" <1360241448@qq.com>
Date: Thu, 21 Nov 2024 13:51:50 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E6=9C=BA=E5=85=B7=E4=BD=BF?=
=?UTF-8?q?=E7=94=A8=E6=9F=A5=E8=AF=A2=E9=9C=80=E6=B1=82=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../sgzb/material/domain/ProjUsingRecord.java | 11 ++++
.../mapper/material/ProjUsingRecordMapper.xml | 15 +++++
sgzb-ui/src/views/stquery/projUsingRecord.vue | 64 +++++++++++++++++--
3 files changed, 83 insertions(+), 7 deletions(-)
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java
index d6e05a7b..40082a38 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java
@@ -49,6 +49,17 @@ public class ProjUsingRecord {
@ApiModelProperty(value = "工程Id")
private Integer proId;
+ /**
+ * 库管员id
+ */
+ @ApiModelProperty(value = "库管员id")
+ private Integer userId;
+ /**
+ * 库管员名字
+ */
+ @ApiModelProperty(value = "库管员名字")
+ private String typeKeepName;
+
/**
* 工程名称
*/
diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ProjUsingRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ProjUsingRecordMapper.xml
index f0768995..5210c861 100644
--- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ProjUsingRecordMapper.xml
+++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ProjUsingRecordMapper.xml
@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
subquery1.typeName,
subquery1.typeModelName,
subquery1.unit,
+ subquery3.typeKeepName,
IFNULL(subquery1.outNum, 0) as outNum,
IFNULL(subquery2.backNum, 0) as backNum,
CASE
@@ -122,5 +123,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY bai.agreement_id,
mt.type_id) AS subquery2 ON subquery1.type_id = subquery2.type_id
AND subquery1.agreement_id = subquery2.agreement_id
+ LEFT JOIN (
+ SELECT
+ mkt.type_id,
+ GROUP_CONCAT( su.nick_name SEPARATOR ', ' ) AS typeKeepName,
+ GROUP_CONCAT( su.user_id SEPARATOR ', ' ) AS userIds
+ FROM
+ ma_type_keeper mkt
+ LEFT JOIN sys_user su ON mkt.user_id = su.user_id
+ GROUP BY
+ mkt.type_id
+ ) AS subquery3 ON subquery3.type_id = subquery1.type_id
+
+ WHERE LOCATE(#{userId}, subquery3.userIds) > 0
+
\ No newline at end of file
diff --git a/sgzb-ui/src/views/stquery/projUsingRecord.vue b/sgzb-ui/src/views/stquery/projUsingRecord.vue
index 8f83e8da..2756d572 100644
--- a/sgzb-ui/src/views/stquery/projUsingRecord.vue
+++ b/sgzb-ui/src/views/stquery/projUsingRecord.vue
@@ -95,7 +95,24 @@
@keyup.enter.native="handleQuery"
/>
-
+
+
+
+
+
+
+
@@ -210,6 +233,7 @@ import {
getProData,
usingRecord,
} from '@/api/stquery/projUsingRecord'
+import {getTypeKeeper} from "@/api/stquery/deviceStatusRecord";
export default {
name: 'backRecord',
@@ -247,6 +271,7 @@ export default {
types: 1, // 1申请列表 2审核列表
},
unitList: [], //来往单位集合
+ keepIdList: [], //库管员id集合
proList: [], //工程集合
}
},
@@ -254,6 +279,7 @@ export default {
this.getList()
this.getUnitList()
this.getProList()
+ this.getKeepIdList()
},
methods: {
// 获取 申请列表
@@ -263,6 +289,7 @@ export default {
const params = {
unitId: this.queryParams.unitId,
proId: this.queryParams.proId,
+ userId: this.queryParams.userId,
keyWord: this.queryParams.keyWord,
// agreementCode:this.queryParams.agreementCode,
typeName: this.queryParams.typeName,
@@ -279,6 +306,16 @@ export default {
this.leaseAuditList = res.data.rows
this.total = res.data.total
},
+ // 获取 库管员列表
+ async getKeepIdList() {
+ this.loading = true
+ const params = {
+ }
+ const res = await getTypeKeeper(params)
+ console.log('机具状态', res)
+ this.loading = false
+ this.keepIdList = res.data
+ },
// 获取 来往单位 列表数据
async getUnitList() {
@@ -335,6 +372,19 @@ export default {
unitChange(val) {
this.getProList(val)
},
+ keepUserChange(val) {
+ this.getTypeKeeper(val)
+ },
+ // 获取 库管员
+ async getTypeKeeper() {
+ const params = {
+ }
+ const res = await getTypeKeeper(params)
+ this.keepIdList = res.data
+ console.log('GetProData ======================', res)
+ },
+
+
},
}