diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairRecordController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairRecordController.java new file mode 100644 index 00000000..421e6502 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairRecordController.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.RepairRecord; +import com.bonus.sgzb.material.service.BackRecordService; +import com.bonus.sgzb.material.service.RepairRecordService; +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("/repairRecord") +public class RepairRecordController extends BaseController { + @Autowired + private RepairRecordService repairRecordService; + + /** + * 维修记录列表 + */ + @ApiOperation(value = "综合查询--维修记录列表") + @GetMapping("/getRepairRecordList") + public AjaxResult getRepairRecordList(RepairRecord bean) { + startPage(); + List list = repairRecordService.getRepairRecordList(bean); + return AjaxResult.success(getDataTable(list)); + } + + /** + * 导出综合查询维修记录列表 + */ + @ApiOperation("导出综合查询维修记录列表") + @Log(title = "导出综合查询维修记录列表", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, RepairRecord bean) + { + List list = repairRecordService.getRepairRecordList(bean); + ExcelUtil util = new ExcelUtil(RepairRecord.class); + util.exportExcel(response, list, "综合查询--维修记录"); + } + +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairRecord.java index 71506ee5..b94b37d2 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairRecord.java @@ -1,5 +1,6 @@ package com.bonus.sgzb.material.domain; +import com.bonus.sgzb.common.core.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -90,16 +91,7 @@ public class RepairRecord implements Serializable { */ @ApiModelProperty(value = "返厂名称") private String supplier; - /** - * 配件数量 - */ - @ApiModelProperty(value = "配件数量") - private int partNum; - /** - * 配件单价 - */ - @ApiModelProperty(value = "配件单价") - private String partPrice; + /** * 维修内容 */ @@ -110,11 +102,7 @@ public class RepairRecord implements Serializable { */ @ApiModelProperty(value = "类型(0不收费,1收费)") private String partType; - /** - * 配件名称 - */ - @ApiModelProperty(value = "配件名称") - private String partName; + /** * 维修人 */ @@ -127,4 +115,75 @@ public class RepairRecord implements Serializable { */ @ApiModelProperty(value = "损坏照片id") private String fileIds; + + /** + * 维修单号 + */ + @Excel(name = "维修单号") + private String code; + + /** + * 机具类型 + */ + @Excel(name = "机具类型") + private String typeName; + + /** + * 规格型号 + */ + @Excel(name = "规格型号") + private String typeModelName; + + /** + * 配件名称 + */ + @ApiModelProperty(value = "配件名称") + @Excel(name = "配件名称") + private String partName; + + /** + * 配件数量 + */ + @ApiModelProperty(value = "配件数量") + @Excel(name = "配件数量",cellType = Excel.ColumnType.NUMERIC) + private int partNum; + + /** + * 配件单价 + */ + @ApiModelProperty(value = "配件单价") + @Excel(name = "配件单价") + private String partPrice; + + /** + * 工程名称 + */ + @ApiModelProperty(value = "工程名称") + @Excel(name = "退料工程") + private String proName; + + /** + * 单位名称 + */ + @ApiModelProperty(value = "单位名称") + @Excel(name = "退料单位") + private String unitName; + + /** + * 关键字 + */ + @ApiModelProperty(value = "关键字") + private String keyWord; + + /** + * unitId + */ + @ApiModelProperty(value = "unitId") + private Integer unitId; + + /** + * proId + */ + @ApiModelProperty(value = "proId") + private Integer proId; } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairRecordMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairRecordMapper.java new file mode 100644 index 00000000..c60abeda --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairRecordMapper.java @@ -0,0 +1,27 @@ +package com.bonus.sgzb.material.mapper; + +import com.bonus.sgzb.base.api.domain.SltAgreementInfo; +import com.bonus.sgzb.material.domain.BackApplyInfo; +import com.bonus.sgzb.material.domain.BackRecord; +import com.bonus.sgzb.material.domain.RepairRecord; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @description 综合查询--维修记录查询 + * @author hay + * @date 2024/2/26 14:19 + */ +@Mapper +public interface RepairRecordMapper { + + /** + * 综合查询--维修记录列表 + * @param bean + * @return List + */ + List getRepairRecordList(RepairRecord bean); + +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairRecordService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairRecordService.java new file mode 100644 index 00000000..14521a03 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairRecordService.java @@ -0,0 +1,21 @@ +package com.bonus.sgzb.material.service; + +import com.bonus.sgzb.material.domain.BackRecord; +import com.bonus.sgzb.material.domain.RepairRecord; + +import java.util.List; + +/** +* @description 综合查询--维修记录查询 +* @author hay +* @date 2024/2/26 14:19 +*/ +public interface RepairRecordService { + + /** + * 综合查询--维修记录列表 + * @param bean + * @return List + */ + List getRepairRecordList(RepairRecord bean); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairRecordServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairRecordServiceImpl.java new file mode 100644 index 00000000..1f79b313 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairRecordServiceImpl.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.RepairRecord; +import com.bonus.sgzb.material.mapper.BackRecordMapper; +import com.bonus.sgzb.material.mapper.RepairRecordMapper; +import com.bonus.sgzb.material.service.BackRecordService; +import com.bonus.sgzb.material.service.RepairRecordService; +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 RepairRecordServiceImpl implements RepairRecordService { + + @Autowired + private RepairRecordMapper repairRecordMapper; + + + @Override + public List getRepairRecordList(RepairRecord bean) { + return repairRecordMapper.getRepairRecordList(bean); + } +} diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairRecordMapper.xml new file mode 100644 index 00000000..e6f540f8 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairRecordMapper.xml @@ -0,0 +1,59 @@ + + + + + \ No newline at end of file diff --git a/sgzb-ui/src/api/stquery/deviceFixQuery.js b/sgzb-ui/src/api/stquery/deviceFixQuery.js index 6c8c87af..3052be9f 100644 --- a/sgzb-ui/src/api/stquery/deviceFixQuery.js +++ b/sgzb-ui/src/api/stquery/deviceFixQuery.js @@ -1,10 +1,10 @@ import request from '@/utils/request' //综合查询 -// 查询领料记录列表 -export function backRecord(query) { +// 查询维修记录列表 +export function repairRecord(query) { return request({ - url: '/material/backRecord/getBackRecordList', + url: '/material/repairRecord/getRepairRecordList', method: 'get', params: query }) @@ -13,7 +13,7 @@ export function backRecord(query) { // 列表导出 export function exportList(params = {}){ return request({ - url: '/material/backRecord/export', + url: '/material/repairRecord/export', method: 'post', data: params }) diff --git a/sgzb-ui/src/views/stquery/deviceFixQuery.vue b/sgzb-ui/src/views/stquery/deviceFixQuery.vue index 1fcd85f8..fbec0ecc 100644 --- a/sgzb-ui/src/views/stquery/deviceFixQuery.vue +++ b/sgzb-ui/src/views/stquery/deviceFixQuery.vue @@ -1,16 +1,6 @@