diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/vo/MaLabelBindVO.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/vo/MaLabelBindVO.java
index aae5ad3b..88bdeeed 100644
--- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/vo/MaLabelBindVO.java
+++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/vo/MaLabelBindVO.java
@@ -74,4 +74,7 @@ public class MaLabelBindVO {
@ApiModelProperty(value = "中间表主键")
private String id;
+
+ @ApiModelProperty(value = "关键字")
+ private String keyWord;
}
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 1f6f16aa..1b4cc0ad 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
@@ -38,25 +38,36 @@
mt4.type_name as kindName ,a.status,a.binder,dic.name,ma.ma_code,user.user_name
FROM ma_machine_label b
left join ma_label_bind a on a.ma_id = b.ma_id
- LEFT JOIN ma_type mt ON a.type_id = mt.type_id
+ LEFT JOIN ma_type mt ON a.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
LEFT JOIN ma_type_repair mtk ON mtk.type_id = mt.type_id
LEFT JOIN sys_dic dic ON dic.id = b.label_type
- LEFT JOIN ma_machine ma ON ma.ma_id = a.ma_id
+ LEFT JOIN ma_machine ma ON ma.ma_id = a.ma_id
LEFT JOIN sys_user user on user.user_id =a.binder
-
- and a.label_code = #{labelCode}
- and a.type_id = #{typeId}
- and a.bind_time = #{bindTime}
- and a.binder = #{binder}
- and a.label_type = #{labelType}
- and a.company_id = #{companyId}
- and mt2.type_id= #{modelId}
- and mt3.type_name = #{wpName}
- and b.is_bind = #{isBind}
-
+ where 1=1
+
+ and (b.label_code like concat('%',#{keyWord},'%') or
+ mt2.type_name like concat('%',#{keyWord},'%') or
+ mt.type_name like concat('%',#{keyWord},'%') or
+ ma.ma_code like concat('%',#{keyWord},'%')
+ )
+
+
+ and mt2.type_id = #{typeId}
+
+
+ and mt.type_id= #{modelId}
+
+
+ and a.label_code = #{labelCode}
+ and a.bind_time = #{bindTime}
+ and a.binder = #{binder}
+ and a.company_id = #{companyId}
+
+ and mt3.type_name = #{wpName}
+ and b.is_bind = #{isBind}
ORDER BY b.is_bind ASC,a.bind_time DESC,b.create_time DESC
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapRecordController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapRecordController.java
new file mode 100644
index 00000000..c74b7e33
--- /dev/null
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapRecordController.java
@@ -0,0 +1,59 @@
+package com.bonus.sgzb.material.controller;
+
+import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
+import com.bonus.sgzb.common.core.web.controller.BaseController;
+import com.bonus.sgzb.common.core.web.domain.AjaxResult;
+import com.bonus.sgzb.common.log.annotation.Log;
+import com.bonus.sgzb.common.log.enums.BusinessType;
+import com.bonus.sgzb.material.domain.BackRecord;
+import com.bonus.sgzb.material.domain.ScrapRecord;
+import com.bonus.sgzb.material.service.BackRecordService;
+import com.bonus.sgzb.material.service.ScrapRecordService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+* @description 综合查询--机具报废查询
+* @author hay
+* @date 2024/2/26 14:15
+*/
+@Api(tags = "综合查询--机具报废查询")
+@RestController
+@RequestMapping("/scrapRecord")
+public class ScrapRecordController extends BaseController {
+ @Autowired
+ private ScrapRecordService scrapRecordService;
+
+ /**
+ * 机具报废查询列表
+ */
+ @ApiOperation(value = "综合查询--机具报废查询列表")
+ @GetMapping("/getScrapRecordList")
+ public AjaxResult getBackRecordList(ScrapRecord bean) {
+ startPage();
+ List list = scrapRecordService.getScrapRecordList(bean);
+ return AjaxResult.success(getDataTable(list));
+ }
+
+ /**
+ * 导出综合查询机具报废查询列表
+ */
+ @ApiOperation("导出综合查询机具报废查询列表")
+ @Log(title = "导出综合查询机具报废查询列表", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ScrapRecord bean)
+ {
+ List list = scrapRecordService.getScrapRecordList(bean);
+ ExcelUtil util = new ExcelUtil(ScrapRecord.class);
+ util.exportExcel(response, list, "综合查询--报废记录");
+ }
+
+}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapRecord.java
new file mode 100644
index 00000000..b6432d41
--- /dev/null
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapRecord.java
@@ -0,0 +1,209 @@
+package com.bonus.sgzb.material.domain;
+
+import com.bonus.sgzb.common.core.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+* @description 综合查询--机具报废查询
+* @author hay
+* @date 2024/2/26 14:51
+*/
+@ApiModel(description = "机具报废查询")
+@Data
+public class ScrapRecord {
+
+ private static final long serialVersionUID = 2227217051604273598L;
+
+ @ApiModelProperty(value = "")
+ private Integer id;
+
+ /**
+ * 单位Id
+ */
+ @ApiModelProperty(value = "单位Id")
+ private Integer unitId;
+
+ /**
+ * 往来单位
+ */
+ @ApiModelProperty(value = "往来单位")
+ @Excel(name = "往来单位")
+ private String unitName;
+
+ /**
+ * 工程Id
+ */
+ @ApiModelProperty(value = "工程Id")
+ private Integer proId;
+
+ /**
+ * 工程名称
+ */
+ @ApiModelProperty(value = "工程名称")
+ @Excel(name = "工程名称")
+ private String proName;
+
+ /**
+ * 报废单号
+ */
+ @ApiModelProperty(value = "报废单号")
+ @Excel(name = "报废单号")
+ private String code;
+
+ /**
+ * 来源单号
+ */
+ @ApiModelProperty(value = "来源单号")
+ @Excel(name = "来源单号")
+ private String sourceCode;
+
+ /**
+ * 机具名称
+ */
+ @ApiModelProperty(value = "机具名称")
+ @Excel(name = "机具名称")
+ private String typeName;
+
+ /**
+ * 规格ID
+ */
+ @ApiModelProperty(value = "规格ID")
+ private Integer typeId;
+
+ /**
+ * 规格型号
+ */
+ @ApiModelProperty(value = "规格型号")
+ @Excel(name = "规格型号")
+ private String typeModelName;
+
+ /**
+ * 单位
+ */
+ @ApiModelProperty(value = "单位")
+ @Excel(name = "单位")
+ private String unit;
+
+ /**
+ * 协议号
+ */
+ @ApiModelProperty(value = "协议号")
+ private String agreementCode;
+
+ /**
+ * 设备编号
+ */
+ @ApiModelProperty(value = "设备编号")
+ @Excel(name = "设备编号")
+ private String maCode;
+
+ /**
+ * 报废时间
+ */
+ @ApiModelProperty(value = "报废时间")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "报废时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date scrapTime;
+
+ /**
+ * 报废数量
+ */
+ @ApiModelProperty(value = "报废数量")
+ @Excel(name = "报废数量",cellType = Excel.ColumnType.NUMERIC)
+ private Double scrapNum;
+
+ /**
+ * 退料人
+ */
+ @ApiModelProperty(value = "退料人")
+ private String backPerson;
+
+
+
+ /**
+ * 创建者
+ */
+ @ApiModelProperty(value = "创建者")
+ private String createBy;
+
+ /**
+ * 创建时间
+ */
+ @ApiModelProperty(value = "创建时间")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ @ApiModelProperty(value = "更新者")
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ @ApiModelProperty(value = "更新时间 ")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date updateTime;
+
+ /**
+ * 报废原因
+ */
+ @ApiModelProperty(value = "报废原因")
+ @Excel(name = "报废原因")
+ private String remark;
+
+ /**
+ * 报废人
+ */
+ @ApiModelProperty(value = "报废人")
+ @Excel(name = "报废人")
+ private String userName;
+
+ /**
+ * 关键字
+ */
+ @ApiModelProperty(value = "关键字")
+ private String keyWord;
+
+ @ApiModelProperty(value="开始时间")
+ private String startTime;
+
+ @ApiModelProperty(value="结束时间")
+ private String endTime;
+
+
+ /**
+ * 设备所属类型
+ */
+ @ApiModelProperty(value = "数据所属组织")
+ private Integer companyId;
+
+ /**
+ * 装备管理方式(0编号 1计数)
+ */
+ @ApiModelProperty(value = "装备管理方式")
+ private int manageType;
+
+ /**
+ * 装备管理方式(0编号 1计数)
+ */
+ @ApiModelProperty(value = "装备管理方式名称")
+ private String manageTypeName;
+
+ /**
+ * 实时库存
+ */
+ @ApiModelProperty(value = "实时库存")
+ private Double num;
+
+}
\ No newline at end of file
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ScrapRecordMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ScrapRecordMapper.java
new file mode 100644
index 00000000..0011a382
--- /dev/null
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ScrapRecordMapper.java
@@ -0,0 +1,23 @@
+package com.bonus.sgzb.material.mapper;
+
+import com.bonus.sgzb.material.domain.BackRecord;
+import com.bonus.sgzb.material.domain.ScrapRecord;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * @description 综合查询--机具报废查询
+ * @author hay
+ * @date 2024/2/26 14:19
+ */
+@Mapper
+public interface ScrapRecordMapper {
+
+ /**
+ * 综合查询--机具报废查询
+ * @param bean
+ * @return List
+ */
+ List getScrapRecordList(ScrapRecord bean);
+}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/ScrapRecordService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/ScrapRecordService.java
new file mode 100644
index 00000000..9eb631f4
--- /dev/null
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/ScrapRecordService.java
@@ -0,0 +1,21 @@
+package com.bonus.sgzb.material.service;
+
+import com.bonus.sgzb.material.domain.BackRecord;
+import com.bonus.sgzb.material.domain.ScrapRecord;
+
+import java.util.List;
+
+/**
+* @description 综合查询--机具报废查询
+* @author hay
+* @date 2024/2/26 14:19
+*/
+public interface ScrapRecordService {
+
+ /**
+ * 综合查询--机具报废查询列表
+ * @param bean
+ * @return List
+ */
+ List getScrapRecordList(ScrapRecord bean);
+}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapRecordServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapRecordServiceImpl.java
new file mode 100644
index 00000000..8a237fb1
--- /dev/null
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapRecordServiceImpl.java
@@ -0,0 +1,29 @@
+package com.bonus.sgzb.material.service.impl;
+
+import com.bonus.sgzb.material.domain.BackRecord;
+import com.bonus.sgzb.material.domain.ScrapRecord;
+import com.bonus.sgzb.material.mapper.BackRecordMapper;
+import com.bonus.sgzb.material.mapper.ScrapRecordMapper;
+import com.bonus.sgzb.material.service.BackRecordService;
+import com.bonus.sgzb.material.service.ScrapRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author hay
+ * @date 2023/12/20 14:55
+ */
+@Service
+public class ScrapRecordServiceImpl implements ScrapRecordService {
+
+ @Autowired
+ private ScrapRecordMapper scrapRecordMapper;
+
+
+ @Override
+ public List getScrapRecordList(ScrapRecord bean) {
+ return scrapRecordMapper.getScrapRecordList(bean);
+ }
+}
diff --git a/sgzb-ui/src/api/stquery/deviceScrapQuery.js b/sgzb-ui/src/api/stquery/deviceScrapQuery.js
index e69de29b..1244bc32 100644
--- a/sgzb-ui/src/api/stquery/deviceScrapQuery.js
+++ b/sgzb-ui/src/api/stquery/deviceScrapQuery.js
@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+
+//综合查询
+// 查询报废记录列表
+export function scrapRecord(query) {
+ return request({
+ url: '/material/scrapRecord/getScrapRecordList',
+ method: 'get',
+ params: query
+ })
+}
+
+// 列表导出
+export function exportList(params = {}){
+ return request({
+ url: '/material/scrapRecord/export',
+ method: 'post',
+ data: params
+ })
+}
+
+// 获取 来往单位 列表
+export function getUnitData(params = {}){
+ return request({
+ url: '/system/select/getUnitCbx',
+ method: 'post',
+ data: params
+ })
+}
+
+// 获取 工程 列表
+export function getProData(params = {}){
+ return request({
+ url: '/system/select/getSectionEngineeringCbx',
+ method: 'post',
+ data: params
+ })
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sgzb-ui/src/views/store/label/labelBinding.vue b/sgzb-ui/src/views/store/label/labelBinding.vue
index 56663bc2..0ac81644 100644
--- a/sgzb-ui/src/views/store/label/labelBinding.vue
+++ b/sgzb-ui/src/views/store/label/labelBinding.vue
@@ -11,9 +11,9 @@
label-width="68px"
style="z-index: 10000"
>
-
+
+
diff --git a/sgzb-ui/src/views/stquery/deviceScrapQuery.vue b/sgzb-ui/src/views/stquery/deviceScrapQuery.vue
index e69de29b..6f7f7a31 100644
--- a/sgzb-ui/src/views/stquery/deviceScrapQuery.vue
+++ b/sgzb-ui/src/views/stquery/deviceScrapQuery.vue
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+