From 7c6225f16afab5a30bf6dfe3343ae8c9902f3148 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期六, 23 十一月 2024 17:39:33 +0800
Subject: [PATCH] 装箱单打印调整
---
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java | 77 ++++++++++++++++++++++++++++----------
1 files changed, 56 insertions(+), 21 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
index 95c2bd1..f77a9b7 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -25,7 +25,6 @@
import com.example.erp.service.userInfo.LogService;
import com.example.erp.service.userInfo.SysErrorService;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
@@ -132,31 +131,55 @@
//鏌ヨ鏈伐搴忔姤宸ラ渶瑕佸摢鍑犲眰锛屼笂宸ュ簭鏄粈涔�
String obtainTechnology = reportingWorkMapper.SelectWorkTechnologyMp(processIdStr);
- map.put("numberList", flowCardMapper.getGlassNumber(Integer.valueOf(technologyStr),processIdStr));
+ map.put("numberList", flowCardMapper.getGlassNumber(technologyStr,processIdStr));
//鍒ゆ柇鏈伐搴忔槸涓嶆槸绗竴閬撳伐搴�
if (interceptProcess.equals(process)) {
//鏄涓�閬撳伐搴忥紝鏌ヨ娴佺▼鍗℃暟鎹�
map.put("Detail", reportingWorkMapper.SelectTechnologicalNumMp(processIdStr, technologyStr, process,reportType));
} else {
- //涓嶆槸绗竴閬撳伐搴忥紝鏌ヨ鎶ュ伐鏁版嵁
- List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess);
- if(process.equals("涓┖")){
- String orderId = processIdStr.substring(0,10);
- details.forEach( detail -> {
- Integer glassId = orderGlassDetailMapper.
- getMinIdByGroup(orderId,
- String.valueOf(detail.get("order_number")),
- String.valueOf(detail.get("group")));
- int listGlassId = Integer.parseInt(String.valueOf(detail.get("glassId")));
- if(listGlassId !=glassId){
- detail.put("rowClass","latter");
+ ReportingWork retrievedData = (ReportingWork) map.get("data");
+ if (retrievedData!=null){
+ Integer reviewedState = retrievedData.getReviewedState();
+ //鏍规嵁瀹℃牳鐘舵�佹煡璇㈡湭瀹℃牳鏁版嵁
+ if (reviewedState==1){//宸插鏍�
+ //涓嶆槸绗竴閬撳伐搴忥紝鏌ヨ鎶ュ伐鏁版嵁
+ List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess);
+ if(process.equals("涓┖")){
+ String orderId = processIdStr.substring(0,10);
+ details.forEach( detail -> {
+ Integer glassId = orderGlassDetailMapper.
+ getMinIdByGroup(orderId,
+ String.valueOf(detail.get("order_number")),
+ String.valueOf(detail.get("group")));
+ int listGlassId = Integer.parseInt(String.valueOf(detail.get("glassId")));
+ if(listGlassId !=glassId){
+ detail.put("rowClass","latter");
+ }
+ });
}
- });
+ map.put("Detail",details );
+ }else {
+ //涓嶆槸绗竴閬撳伐搴忥紝鏌ヨ鎶ュ伐鏁版嵁
+ List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMpReview(processIdStr, technologyStr, process,previousProcess);
+ if(process.equals("涓┖")){
+ String orderId = processIdStr.substring(0,10);
+ details.forEach( detail -> {
+ Integer glassId = orderGlassDetailMapper.
+ getMinIdByGroup(orderId,
+ String.valueOf(detail.get("order_number")),
+ String.valueOf(detail.get("group")));
+ int listGlassId = Integer.parseInt(String.valueOf(detail.get("glassId")));
+ if(listGlassId !=glassId){
+ detail.put("rowClass","latter");
+ }
+ });
+ }
+
+
+ map.put("Detail",details );
+ }
}
-
-
- map.put("Detail",details );
}
// 绗竴閬撳伐搴忥紙娴佺▼鍗℃暟+琛ョ墖鏁伴噺-瀹屽伐鏁�-娆$牬鏁�-杩斿伐鏈畬鎴愭暟-绂佺敤鏁伴噺锛�
@@ -178,9 +201,21 @@
}
//鏌ヨ宸ュ簭
- public Map<String, Object> SelectProcessSv() {
+ public Map<String, Object> SelectProcessSv(String userId) {
Map<String, Object> map = new HashMap<>();
- map.put("process", reportingWorkMapper.SelectProcessMp());
+ String process = reportingWorkMapper.selectUserProcess(userId);
+ if (process==null) {
+ map.put("process", reportingWorkMapper.SelectProcessMp());
+ }
+ else {
+ if (process.equals("澶硅兌")){
+ map.put("process",reportingWorkMapper.getSelectProcessJiajiao() );
+ }
+ if (process.equals("鎶�鏈儴澶氭洸")){
+ map.put("process",reportingWorkMapper.getSelectProcessDuoqu() );
+ }
+ }
+
return map;
}
@@ -309,7 +344,7 @@
}
//鏇存柊娴佺▼鍗¤〃鐨勬姤宸ユ暟閲�
- if (Objects.equals(reportingWork.getNextProcess(), "")) {
+ if (Objects.equals(reportingWork.getNextProcess(), "")|| Objects.equals(reportingWork.getNextProcess(), null)) {
LambdaUpdateWrapper<FlowCard> flowCardLambdaUpdateWrapper =
new LambdaUpdateWrapper<>();
flowCardLambdaUpdateWrapper
--
Gitblit v1.8.0