From 57fca4f8e41c2504246459656cb3791621a039f0 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 23 十月 2025 08:29:05 +0800
Subject: [PATCH] 1、报工查询界面改为分页 2、查询工程添加工程名称

---
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java |   47 +++++++++++++++++++++++++++--------------------
 1 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java
index bf3275c..0a55b53 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java
@@ -1,9 +1,11 @@
 package com.mes.damage.controller;
 
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.mes.damage.entity.Damage;
 import com.mes.damage.entity.DamagePrint;
 import com.mes.damage.service.DamageService;
+import com.mes.opctask.entity.LoadGlassDeviceTaskHistory;
 import com.mes.utils.Result;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -15,7 +17,7 @@
 
 /**
  * <p>
- *  鍓嶇鎺у埗鍣�
+ * 鍓嶇鎺у埗鍣�
  * </p>
  *
  * @author wu
@@ -27,63 +29,68 @@
 @ResponseBody
 public class DamageController {
 
-    @Autowired(required=true)
+    @Autowired(required = true)
     private DamageService damageService;
 
     @ApiOperation("鎶ュ伐鏁版嵁鏌ヨ")
     @PostMapping("/selectDamage")
-    public Result selectDamage(@RequestBody Map map) {
-        String startTime=map.get("startTime").toString();
-        String endTime=map.get("endTime").toString();
-        int type =Integer.parseInt(map.get("type").toString());
-        int status =Integer.parseInt(map.get("status").toString());
-        String workingProcedure =map.get("workingProcedure").toString();
-        return Result.build(200,"鏌ヨ鎴愬姛",damageService.selectDamage(startTime,endTime,type,status, workingProcedure));
+    public Result<Page<Damage>> selectDamage(@RequestBody Map map) {
+        String startTime = map.get("startTime").toString();
+        String endTime = map.get("endTime").toString();
+        int type = Integer.parseInt(map.get("type").toString());
+        int status = Integer.parseInt(map.get("status").toString());
+        String workingProcedure = map.get("workingProcedure").toString();
+        int pageNo = Integer.parseInt(map.get("pageNo").toString());
+        int pageSize = Integer.parseInt(map.get("pageSize").toString());
+        return Result.build(200, "鏌ヨ鎴愬姛", damageService.selectDamage(startTime, endTime, type, status, workingProcedure, pageNo, pageSize));
     }
 
     @ApiOperation("鎶ュ伐")
     @PostMapping("/submitDamage")
     public Result submitDamage(@RequestBody List<Damage> damageList) {
         damageService.submitDamage(damageList);
-        if(damageList.get(0).getStatus()==1){
+        if (damageList.get(0).getStatus() == 1) {
             damageList.forEach(damage -> damage.setStatus(3));
-        }else{
+        } else {
             damageList.forEach(damage -> damage.setStatus(8));
         }
         damageService.updateBatchById(damageList);
-        return Result.build(200,"鎶ュ伐鎴愬姛",1);
+        return Result.build(200, "鎶ュ伐鎴愬姛", 1);
     }
 
     @ApiOperation("鎶ュ伐鏁版嵁淇敼")
     @PostMapping("/updateDamage")
     public Result updateDamage(@RequestBody List<Damage> damageList) {
         damageService.updateBatchById(damageList);
-        return Result.build(200,"淇敼鎴愬姛",1);
+        return Result.build(200, "淇敼鎴愬姛", 1);
     }
 
     @ApiOperation("鎶ュ伐鏁版嵁鏂板")
     @PostMapping("/insertDamage")
     public Result insertDamage(@RequestBody Damage damage) {
         damageService.insertDamage(damage);
-        return Result.build(200,"鏂板鎴愬姛",1);
+        return Result.build(200, "鏂板鎴愬姛", 1);
     }
+
     @ApiOperation("鎷胯蛋鏁版嵁鏌ヨ")
     @PostMapping("/selectDamagePrint")
     public Result selectDamagePrint(@RequestBody Damage damage) {
-        List<DamagePrint> damage2=damageService.selectDamagePrint(damage);
-        return Result.build(200,"鏌ヨ鎴愬姛",damage2);
+        List<DamagePrint> damage2 = damageService.selectDamagePrint(damage);
+        return Result.build(200, "鏌ヨ鎴愬姛", damage2);
     }
+
     @ApiOperation("鎷胯蛋鎵撳嵃鏌ヨ")
     @PostMapping("/selectDamagePrintDetails")
     public Result selectDamagePrintDetails(@RequestBody Damage damage) {
-        List<DamagePrint> damage2=damageService.selectDamagePrintDetails(damage);
-        return Result.build(200,"鏌ヨ鎴愬姛",damage2);
+        List<DamagePrint> damage2 = damageService.selectDamagePrintDetails(damage);
+        return Result.build(200, "鏌ヨ鎴愬姛", damage2);
     }
+
     @ApiOperation("鑷姩鎶ュ伐")
     @PostMapping("/autoSubmitReport")
     public Result autoSubmitReport(String glassId, int deviceId, String workingProcedure, String remark, int type) {
-        damageService.autoSubmitReport(glassId,deviceId,workingProcedure,remark,type);
-        return Result.build(200,"鏌ヨ鎴愬姛","");
+        damageService.autoSubmitReport(glassId, deviceId, workingProcedure, remark, type);
+        return Result.build(200, "鏌ヨ鎴愬姛", "");
     }
 
 }

--
Gitblit v1.8.0