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 b.label_id,a.id,b.is_bind,b.label_code,a.bind_time,b.label_type,mt.type_id,mt.type_name, diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckInfo.java index a97bd18c..c8eafccd 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckInfo.java @@ -26,6 +26,10 @@ public class PurchaseCheckInfo extends BaseEntity @ApiModelProperty(value = "任务ID") private Long taskId; + /** 类型id */ + @ApiModelProperty(value = "类型id") + private Long typeId; + @ApiModelProperty(value = "采购单号") @Excel(name = "采购单号") private String code; @@ -100,6 +104,12 @@ public class PurchaseCheckInfo extends BaseEntity @ApiModelProperty(value = "数据所属组织") private Integer companyId; + @ApiModelProperty(value="开始时间") + private String startTime; + + @ApiModelProperty(value="结束时间") + private String endTime; + public String getKeyWord() { return keyWord; } @@ -289,6 +299,30 @@ public class PurchaseCheckInfo extends BaseEntity this.inputStatus = inputStatus; } + public Long getTypeId() { + return typeId; + } + + public void setTypeId(Long typeId) { + this.typeId = typeId; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml index a4209744..04e8f45a 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml @@ -23,18 +23,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - 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 @@ + + + + + + SELECT sad.id, + unit.unit_name as unitName, + lot.lot_name as proName, + tt.`code`, + tt2.`code` as sourceCode, + mt2.type_name as typeName, + mt.type_name as typeModelName, + mt.unit_name as unit, + mm.ma_code as maCode, + sad.audit_time as scrapTime, + sad.scrap_num as scrapNum, + sad.remark, + su.user_name as userName + FROM scrap_apply_details sad + LEFT JOIN tm_task tt on tt.task_id = sad.task_id + LEFT JOIN repair_audit_details rad on rad.id = sad.parent_id + LEFT JOIN tm_task tt2 on tt2.task_id = rad.task_id + LEFT JOIN tm_task_agreement tta on tta.task_id = sad.task_id + LEFT JOIN bm_agreement_info bai on bai.agreement_id = tta.agreement_id + LEFT JOIN bm_project_lot lot on lot.lot_id = bai.project_id + LEFT JOIN bm_unit_info unit on unit.unit_id = bai.unit_id + LEFT JOIN ma_type mt on mt.type_id = sad.type_id + LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id + LEFT JOIN ma_machine mm on mm.ma_id = sad.ma_id + LEFT JOIN sys_user su on su.user_id = sad.audit_by + WHERE sad.scrap_source = '2' + + and (unit.unit_name like concat('%',#{keyWord},'%') or + lot.lot_name like concat('%',#{keyWord},'%') or + mt2.type_name like concat('%',#{keyWord},'%') or + mt.type_name like concat('%',#{keyWord},'%') or + mt.unit_name like concat('%',#{keyWord},'%') or + mm.ma_code like concat('%',#{keyWord},'%') or + su.user_name like concat('%',#{keyWord},'%')) + + + and mt2.type_name like concat('%',#{typeName},'%') + + + and mt.type_name like concat('%',#{typeModelName},'%') + + + and unit.unit_id = #{unitId} + + + and lot.lot_id = #{proId} + + + AND sad.audit_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') + + + UNION ALL + + SELECT sad.id, + unit.unit_name as unitName, + lot.lot_name as proName, + tt.`code`, + tt2.`code` as sourceCode, + mt2.type_name as typeName, + mt.type_name as typeModelName, + mt.unit_name as unit, + mm.ma_code as maCode, + sad.audit_time as scrapTime, + sad.scrap_num as scrapNum, + sad.remark, + su.user_name as userName + FROM scrap_apply_details sad + LEFT JOIN tm_task tt on tt.task_id = sad.task_id + LEFT JOIN back_apply_info baif on baif.id = sad.parent_id + LEFT JOIN tm_task tt2 on tt2.task_id = baif.task_id + LEFT JOIN tm_task_agreement tta on tta.task_id = sad.task_id + LEFT JOIN bm_agreement_info bai on bai.agreement_id = tta.agreement_id + LEFT JOIN bm_project_lot lot on lot.lot_id = bai.project_id + LEFT JOIN bm_unit_info unit on unit.unit_id = bai.unit_id + LEFT JOIN ma_type mt on mt.type_id = sad.type_id + LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id + LEFT JOIN ma_machine mm on mm.ma_id = sad.ma_id + LEFT JOIN sys_user su on su.user_id = sad.audit_by + WHERE sad.scrap_source = '1' + + and (unit.unit_name like concat('%',#{keyWord},'%') or + lot.lot_name like concat('%',#{keyWord},'%') or + mt2.type_name like concat('%',#{keyWord},'%') or + mt.type_name like concat('%',#{keyWord},'%') or + mt.unit_name like concat('%',#{keyWord},'%') or + mm.ma_code like concat('%',#{keyWord},'%') or + su.user_name like concat('%',#{keyWord},'%')) + + + and mt2.type_name like concat('%',#{typeName},'%') + + + and mt.type_name like concat('%',#{typeModelName},'%') + + + and unit.unit_id = #{unitId} + + + and lot.lot_id = #{proId} + + + AND sad.audit_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') + + + \ 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 @@ + + + + + + + + + + + 发布入库 --> @@ -84,13 +111,13 @@ 已入库 --> - + - + 验收单 - + - 工程名称: + 工程名称: 验收单编号:{{ printData.code }} - 合同名称: + 合同名称: - 合同编号: + 合同编号: - 验收地点: + 验收地点: - 供应商:{{ printTableData[0].supplier }} + 供应商:{{ printTableData[0].supplier }} @@ -232,7 +259,7 @@ 验收负责人: 年 月 日 - + 供应商: @@ -265,7 +292,9 @@