From 14dedcf440dbc2c56bf34fa6c872fd2b9b1c2381 Mon Sep 17 00:00:00 2001 From: bns_han <1604366271@qq.com> Date: Wed, 6 Mar 2024 17:59:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/base/MaLabelBindMapper.xml | 2 +- .../material/domain/PurchaseCheckInfo.java | 34 ++++++ .../material/PurchaseCheckInfoMapper.xml | 33 +++-- .../mapper/material/ScrapRecordMapper.xml | 112 +++++++++++++++++ .../newBuy/newDevices/newDevicesList.vue | 114 +++++++++++++++--- 5 files changed, 267 insertions(+), 28 deletions(-) create mode 100644 sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapRecordMapper.xml diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaLabelBindMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaLabelBindMapper.xml index 1b4cc0ad..449dd93c 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaLabelBindMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaLabelBindMapper.xml @@ -68,7 +68,7 @@ and mt3.type_name = #{wpName} and b.is_bind = #{isBind} - ORDER BY b.is_bind ASC,a.bind_time DESC,b.create_time DESC + ORDER BY b.is_bind ASC,b.label_id DESC - select pci.id,pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by, pci.create_time, pci.update_by, - pci.update_time, pci.remark, pci.company_id ,dict.name purchasingStatus,tk.code,su.user_name purchaserName,tk.task_status taskStatus + select pci.id,pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by, pci.create_time, + pci.update_by, + pci.update_time, pci.remark, pci.company_id ,dict.name purchasingStatus,tk.code,su.user_name + purchaserName,tk.task_status taskStatus from purchase_check_info pci left join tm_task tk on pci.task_id = tk.task_id left join (select id,name from sys_dic where p_id = 23) dict on tk.task_status = dict.id left join sys_user su on pci.purchaser = su.user_id + LEFT JOIN purchase_check_details pcd on pcd.task_id=pci.task_id where task_type = 23 - and tk.code like concat('%',#{keyWord},'%') - and pci.purchase_time = #{purchaseTime} - and pci.arrival_time = #{arrivalTime} - and pci.purchaser = #{purchaser} - and pci.company_id = #{companyId} + + and (tk.code like concat('%',#{keyWord},'%') or + su.user_name like concat('%',#{keyWord},'%') + ) + + and pci.purchase_time = #{purchaseTime} + and pci.arrival_time = #{arrivalTime} + and pci.purchaser = #{purchaser} + and pci.company_id = #{companyId} + AND #{typeId} IN (SELECT mt2.type_id + FROM purchase_check_details pcd + LEFT JOIN ma_type mt on mt.type_id=pcd.type_id + LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id + WHERE pcd.task_id = pci.task_id + ) + + + AND ((pci.purchase_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')) + or (pci.arrival_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59'))) + + GROUP BY pcd.task_id order by pci.create_time desc diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapRecordMapper.xml new file mode 100644 index 00000000..06d510ed --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapRecordMapper.xml @@ -0,0 +1,112 @@ + + + + + + \ No newline at end of file diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue index 3d09e1ff..6fda24af 100644 --- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue +++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue @@ -1,6 +1,33 @@ --> - + - +