From 2b91b242113bd10f1be241d19ab154e9ad6506cd Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期二, 10 六月 2025 14:18:00 +0800
Subject: [PATCH] 国际化命名

---
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java |   43 +++++++++++++++++++++++++++++++------------
 1 files changed, 31 insertions(+), 12 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 ea9bcb2..bf3275c 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,8 +1,8 @@
 package com.mes.damage.controller;
 
 
-import cn.hutool.core.date.DateTime;
 import com.mes.damage.entity.Damage;
+import com.mes.damage.entity.DamagePrint;
 import com.mes.damage.service.DamageService;
 import com.mes.utils.Result;
 import io.swagger.annotations.Api;
@@ -10,7 +10,6 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -22,14 +21,15 @@
  * @author wu
  * @since 2024-06-25
  */
-@Api(description = "鎶ュ伐淇℃伅")
+@Api(tags = "鎶ュ伐淇℃伅")
 @RestController
 @RequestMapping("/damage")
 @ResponseBody
 public class DamageController {
 
-    @Autowired
+    @Autowired(required=true)
     private DamageService damageService;
+
     @ApiOperation("鎶ュ伐鏁版嵁鏌ヨ")
     @PostMapping("/selectDamage")
     public Result selectDamage(@RequestBody Map map) {
@@ -38,18 +38,19 @@
         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));
+        return Result.build(200,"鏌ヨ鎴愬姛",damageService.selectDamage(startTime,endTime,type,status, workingProcedure));
     }
 
     @ApiOperation("鎶ュ伐")
     @PostMapping("/submitDamage")
-    public Result submitDamage(@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();
-        damageService.submitDamage(startTime,endTime,type,status,workingProcedure);
+    public Result submitDamage(@RequestBody List<Damage> damageList) {
+        damageService.submitDamage(damageList);
+        if(damageList.get(0).getStatus()==1){
+            damageList.forEach(damage -> damage.setStatus(3));
+        }else{
+            damageList.forEach(damage -> damage.setStatus(8));
+        }
+        damageService.updateBatchById(damageList);
         return Result.build(200,"鎶ュ伐鎴愬姛",1);
     }
 
@@ -66,6 +67,24 @@
         damageService.insertDamage(damage);
         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);
+    }
+    @ApiOperation("鎷胯蛋鎵撳嵃鏌ヨ")
+    @PostMapping("/selectDamagePrintDetails")
+    public Result selectDamagePrintDetails(@RequestBody Damage damage) {
+        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,"鏌ヨ鎴愬姛","");
+    }
 
 }
 

--
Gitblit v1.8.0