From 1195e51e67436cf2b9513678b5e9d3f27a043de4 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 22 十二月 2025 08:29:40 +0800
Subject: [PATCH] 1、中空选中除膜改为多选 2、流程卡报工情况查询添加工程号条件,添加线路,备注显示
---
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java | 130 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 125 insertions(+), 5 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 29a1038..ea1b390 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,21 +1,141 @@
package com.mes.damage.controller;
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.mes.damage.entity.Damage;
+import com.mes.damage.entity.DamagePrint;
+import com.mes.damage.entity.dto.DamageDTO;
+import com.mes.damage.entity.request.DamageRequest;
+import com.mes.damage.entity.vo.FlowCardDamageVO;
+import com.mes.damage.entity.vo.GlassDamageVO;
+import com.mes.damage.service.DamageService;
+import com.mes.utils.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
-import org.springframework.web.bind.annotation.RestController;
+import java.util.List;
+import java.util.Map;
/**
* <p>
- * 鍓嶇鎺у埗鍣�
+ * 鍓嶇鎺у埗鍣�
* </p>
*
* @author wu
- * @since 2024-06-13
+ * @since 2024-06-25
*/
+@Api(tags = "鎶ュ伐淇℃伅")
@RestController
-@RequestMapping("/glassinfo/damage")
+@RequestMapping("/damage")
+@ResponseBody
+@Slf4j
public class DamageController {
+ @Autowired(required = true)
+ private DamageService damageService;
+
+ @ApiOperation("鎶ュ伐鏁版嵁鏌ヨ")
+ @PostMapping("/selectDamage")
+ public Result<Page<DamageDTO>> 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) {
+ damageList.forEach(damage -> damage.setStatus(3));
+ } else {
+ damageList.forEach(damage -> damage.setStatus(8));
+ }
+ damageService.updateBatchById(damageList);
+ return Result.build(200, "鎶ュ伐鎴愬姛", 1);
+ }
+
+ @ApiOperation("鎶ュ伐鏁版嵁淇敼")
+ @PostMapping("/updateDamage")
+ public Result updateDamage(@RequestBody List<Damage> damageList) {
+ damageService.updateBatchById(damageList);
+ return Result.build(200, "淇敼鎴愬姛", 1);
+ }
+
+ @ApiOperation("鎶ュ伐鏁版嵁鏂板")
+ @PostMapping("/insertDamage")
+ public Result insertDamage(@RequestBody Damage damage) {
+ 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, "鏌ヨ鎴愬姛", "");
+ }
+
+ @ApiOperation("鑷姩鎶ュ伐娴嬭瘯")
+ @PostMapping("/submitReport")
+ public Result submitReport() {
+// for (int i = 0; i < 50; i++) {
+ Damage damage = new Damage();
+ damage.setProcessId("NG25110702A004");
+ damage.setWorkingProcedure("纾ㄨ竟");
+ damage.setOrderNumber(2);
+ damage.setTechnologyNumber(2);
+ damageService.submitReport(damage);
+// log.info("褰撳墠寰幆娆℃暟{}", i);
+// try {
+// // 鏂瑰紡1锛氫娇鐢═hread.sleep锛堟帹鑽愶紝鐩磋锛�
+// Thread.sleep(5000); // 10000姣 = 10绉�
+// // 鏂瑰紡2锛氫娇鐢═imeUnit锛堣涔夋洿娓呮櫚锛屽彲閫夛級
+// // TimeUnit.SECONDS.sleep(10);
+// } catch (InterruptedException e) {
+// // 鎹曡幏涓柇寮傚父锛屾仮澶嶇嚎绋嬩腑鏂姸鎬侊紙閬垮厤鍚庣画閫昏緫寮傚父锛�
+// Thread.currentThread().interrupt();
+// // 鏃ュ織璁板綍涓柇淇℃伅
+// // 鍙�夛細涓柇鍚庢槸鍚﹂��鍑哄惊鐜紙鏍规嵁涓氬姟闇�姹傝皟鏁达級
+// // break; // 涓柇鍒欓��鍑哄惊鐜�
+// // continue; // 涓柇鍒欒烦杩囧綋鍓嶇瓑寰咃紝缁х画涓嬩竴娆″惊鐜�
+// }
+// }
+ return Result.build(200, "鏌ヨ鎴愬姛", "");
+ }
+
+ @ApiOperation("鐜荤拑杩涘害鏌ヨ")
+ @PostMapping("/queryProgress")
+ public Result<List<GlassDamageVO>> queryProgress(@RequestBody DamageRequest damageRequest) {
+ return Result.build(200, "鏌ヨ鎴愬姛", damageService.queryProgress(damageRequest));
+ }
+
+ @ApiOperation("娴佺▼鍗¤繘搴︽煡璇�")
+ @PostMapping("/queryFlowCardIdProgress")
+ public Result<List<FlowCardDamageVO>> queryFlowCardIdProgress(@RequestBody DamageRequest damageRequest) {
+ return Result.build(200, "鏌ヨ鎴愬姛", damageService.queryFlowCardIdProgress(damageRequest));
+ }
}
--
Gitblit v1.8.0