From a954cbdb3059cc746903dda483c0de97e8cd76bb Mon Sep 17 00:00:00 2001
From: "1539530615@qq.com" <1539530615@qq.com>
Date: Mon, 15 Jan 2024 16:42:18 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=AF=95=E7=AE=A1=E7=90=86=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../base/controller/RepairController.java | 2 +-
.../resources/mapper/base/RepairMapper.xml | 6 +-
.../RepairAuditDetailsController.java | 19 +++-
.../ScrapApplyDetailsController.java | 19 +++-
.../material/domain/RepairAuditDetails.java | 12 +--
.../material/domain/ScrapApplyDetails.java | 13 +--
.../material/RepairAuditDetailsMapper.xml | 98 ++++++++++++++-----
.../material/ScrapApplyDetailsMapper.xml | 58 ++++++++---
8 files changed, 167 insertions(+), 60 deletions(-)
diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/RepairController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/RepairController.java
index 5ebab5e8..9bc50320 100644
--- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/RepairController.java
+++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/RepairController.java
@@ -46,7 +46,7 @@ public class RepairController extends BaseController {
/**
* 导出维修任务列表
*/
- @RequiresPermissions("domain:details:export")
+ //@RequiresPermissions("domain:details:export")
@Log(title = "导出维修任务列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, RepairTask bean)
diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/RepairMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/RepairMapper.xml
index b34c6dc6..caa8ca97 100644
--- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/RepairMapper.xml
+++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/RepairMapper.xml
@@ -98,7 +98,7 @@
AND bui.unit_id = #{backUnit}
- AND bpi.pro_id = #{backPro}
+ AND bpi.lot_id = #{backPro}
AND mt2.type_id = #{type}
@@ -200,7 +200,9 @@
where rad.task_id = #{taskId}
AND (locate(#{keyword}, mm.ma_code) > 0
- or locate(#{keyword}, su.user_name) > 0)
+ or locate(#{keyword}, su.user_name) > 0
+ or locate(#{keyword}, mt2.type_name) > 0
+ or locate(#{keyword}, mt.type_name) > 0)
AND mt.type_id = #{type}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairAuditDetailsController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairAuditDetailsController.java
index f8bf2a43..10f23146 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairAuditDetailsController.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairAuditDetailsController.java
@@ -1,6 +1,7 @@
package com.bonus.sgzb.material.controller;
import java.util.List;
+import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.bonus.sgzb.material.domain.RepairAuditDetails;
@@ -48,6 +49,14 @@ public class RepairAuditDetailsController extends BaseController
public TableDataInfo questList(RepairAuditDetails repairAuditDetails)
{
startPage();
+ Map params = repairAuditDetails.getParams();
+ if (!params.isEmpty()){
+ String beginTime = (String) params.get("beginTime");
+ String endTime = (String) params.get("endTime");
+ params.put("beginTime", beginTime+" 00:00:00");
+ params.put("endTime", endTime+" 23:59:59");
+ repairAuditDetails.setParams(params);
+ }
List list = repairAuditDetailsService.selectRepairQuestList(repairAuditDetails);
return getDataTable(list);
}
@@ -55,11 +64,19 @@ public class RepairAuditDetailsController extends BaseController
/**
* 导出修试审核任务列表
*/
- @RequiresPermissions("domain:details:export")
+ //@RequiresPermissions("domain:details:export")
@Log(title = "导出修试审核任务列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, RepairAuditDetails bean)
{
+ Map params = bean.getParams();
+ if (!params.isEmpty()){
+ String beginTime = (String) params.get("beginTime");
+ String endTime = (String) params.get("endTime");
+ params.put("beginTime", beginTime+" 00:00:00");
+ params.put("endTime", endTime+" 23:59:59");
+ bean.setParams(params);
+ }
List list = repairAuditDetailsService.exportRepairQuestList(bean);
ExcelUtil util = new ExcelUtil(RepairAuditDetailsVO.class);
util.exportExcel(response, list, "修试审核任务列表");
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java
index 0ca7d1fd..94d4c33c 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java
@@ -1,6 +1,7 @@
package com.bonus.sgzb.material.controller;
import java.util.List;
+import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.bonus.sgzb.material.domain.RepairAuditDetails;
@@ -49,6 +50,14 @@ public class ScrapApplyDetailsController extends BaseController
public TableDataInfo list(ScrapApplyDetails scrapApplyDetails)
{
startPage();
+ Map params = scrapApplyDetails.getParams();
+ if (!params.isEmpty()){
+ String beginTime = (String) params.get("beginTime");
+ String endTime = (String) params.get("endTime");
+ params.put("beginTime", beginTime+" 00:00:00");
+ params.put("endTime", endTime+" 23:59:59");
+ scrapApplyDetails.setParams(params);
+ }
List list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails);
return getDataTable(list);
}
@@ -56,11 +65,19 @@ public class ScrapApplyDetailsController extends BaseController
/**
* 导出报废任务列表
*/
- @RequiresPermissions("domain:details:export")
+ //@RequiresPermissions("domain:details:export")
@Log(title = "导出报废任务列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ScrapApplyDetails bean)
{
+ Map params = bean.getParams();
+ if (!params.isEmpty()){
+ String beginTime = (String) params.get("beginTime");
+ String endTime = (String) params.get("endTime");
+ params.put("beginTime", beginTime+" 00:00:00");
+ params.put("endTime", endTime+" 23:59:59");
+ bean.setParams(params);
+ }
List list = scrapApplyDetailsService.exportScrapApplyDetailsList(bean);
ExcelUtil util = new ExcelUtil(ScrapApplyDetailsVO.class);
util.exportExcel(response, list, "报废任务列表");
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairAuditDetails.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairAuditDetails.java
index 8238dcc0..56f0dbcc 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairAuditDetails.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairAuditDetails.java
@@ -86,7 +86,6 @@ public class RepairAuditDetails extends BaseEntity
@ApiModelProperty(value = "试检状态")
private String taskStatus;
-
// 传入参数
@ApiModelProperty(value = "单位id")
private Integer backUnit;
@@ -95,7 +94,9 @@ public class RepairAuditDetails extends BaseEntity
@ApiModelProperty(value = "工机具类型id")
private Integer type;
@ApiModelProperty(value = "维修单号")
- private Integer backCode;
+ private String backCode;
+ private String keyword;
+ private String typeName;
public void setId(Long id)
{
@@ -263,13 +264,6 @@ public class RepairAuditDetails extends BaseEntity
this.type = type;
}
- public Integer getBackCode() {
- return backCode;
- }
-
- public void setBackCode(Integer backCode) {
- this.backCode = backCode;
- }
@Override
public String toString() {
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java
index b482b662..d33b9628 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java
@@ -101,10 +101,13 @@ public class ScrapApplyDetails extends BaseEntity
@ApiModelProperty(value = "工机具类型id")
private Integer type;
@ApiModelProperty(value = "维修单号")
- private Integer backCode;
+ private String backCode;
@ApiModelProperty(value = "数据状态")
private Integer repairStatus;
+
+ private String keyword;
+ private String typeName;
private Long createById;
@@ -292,14 +295,6 @@ public class ScrapApplyDetails extends BaseEntity
this.type = type;
}
- public Integer getBackCode() {
- return backCode;
- }
-
- public void setBackCode(Integer backCode) {
- this.backCode = backCode;
- }
-
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml
index 42eab152..6234ee97 100644
--- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml
+++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml
@@ -36,6 +36,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_type mt1 on mt.parent_id = mt1.type_id
left join ma_machine mma on rad.ma_id= mma.ma_id
where rad.task_id = #{taskId}
+
+ AND (locate(#{keyword}, mma.ma_code) > 0
+ or locate(#{keyword}, mt.type_name) > 0
+ or locate(#{keyword}, mt1.type_name) > 0)
+
+
+ AND mt.type_id = #{type}
+
+
+ AND mt1.type_id = #{typeName}
+
order by rad.create_time desc
@@ -124,33 +135,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -194,20 +233,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_machine mma on rad.ma_id= mma.ma_id
WHERE
tk.task_type = 45
-
+
+ AND (locate(#{keyword}, su.user_name) > 0
+ or locate(#{keyword}, tk.CODE) > 0
+ or locate(#{keyword}, bui.unit_name) > 0
+ or locate(#{keyword}, bpl.lot_name) > 0)
+
+
and bui.unit_id = #{backUnit}
-
+
and tk.task_status = #{taskStatus}
-
+
and bpl.lot_id = #{backPro}
-
+
and mt1.type_id = #{type}
-
- and tk.code = #{backCode}
+
+ and locate(#{backCode}, tk.code) > 0
+
+
+ and tk.create_time between #{params.beginTime} and #{params.endTime}
ORDER BY
tk.create_time DESC
diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml
index b4d6a62f..bf2f3b04 100644
--- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml
+++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml
@@ -67,20 +67,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
sad.scrap_source IN ( '1', '2' )
AND tk.task_type = 57
-
+
+ AND (locate(#{keyword}, tk.create_by) > 0
+ or locate(#{keyword}, tk.CODE) > 0
+ or locate(#{keyword}, bui.unit_name) > 0
+ or locate(#{keyword}, bpl.lot_name) > 0
+ or locate(#{keyword}, tk1.CODE) > 0)
+
+
and bui.unit_id = #{backUnit}
-
+
and tk.task_status = #{repairStatus}
-
+
and bpl.lot_id = #{backPro}
-
+
and mt1.type_id = #{type}
-
- and tk.code = #{backCode}
+
+ and locate(#{backCode}, tk.code) > 0
+
+
+ and tk.create_time between #{params.beginTime} and #{params.endTime}
GROUP BY tk.CODE
order by tk.create_time desc
@@ -125,21 +135,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
sad.scrap_source IN ( '1', '2' )
AND tk.task_type = 57
-
+
+ AND (locate(#{keyword}, tk.create_by) > 0
+ or locate(#{keyword}, tk.CODE) > 0
+ or locate(#{keyword}, bui.unit_name) > 0
+ or locate(#{keyword}, bpl.lot_name) > 0
+ or locate(#{keyword}, tk1.CODE) > 0)
+
+
and bui.unit_id = #{backUnit}
-
+
and tk.task_status = #{repairStatus}
-
+
and bpl.lot_id = #{backPro}
-
+
and mt1.type_id = #{type}
-
- and tk.code = #{backCode}
+
+ and locate(#{backCode}, tk.code) > 0
+
+ and tk.create_time between #{params.beginTime} and #{params.endTime}
+
+ GROUP BY tk.CODE
+ order by tk.create_time desc