From 7d1dcd74604d8a1b4369cf2f966cc6b628893fc7 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 17 七月 2024 11:13:43 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java | 39 ++++++++++++++++++++++++++++-----------
1 files changed, 28 insertions(+), 11 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 e81a0ae..2b03502 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
@@ -5,14 +5,12 @@
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
import com.example.erp.common.Constants;
import com.example.erp.entity.pp.DamageDetails;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.ReportingWork;
import com.example.erp.entity.pp.ReportingWorkDetail;
import com.example.erp.entity.sd.Order;
-import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.sd.OrderProcessDetail;
import com.example.erp.exception.ServiceException;
import com.example.erp.mapper.pp.*;
@@ -20,7 +18,6 @@
import com.example.erp.mapper.sd.OrderMapper;
import com.example.erp.mapper.sd.OrderProcessDetailMapper;
import com.example.erp.service.sd.OrderProcessDetailService;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -66,7 +63,7 @@
public Map<String, Object> AddSelectLastWorkSv(String processIdStr, String technologyStr, String process) {
Map<String, Object> map = new HashMap<>();
//鏌ヨ娴佺▼鍗″伐鑹烘祦绋�
- String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(processIdStr);
+ String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(processIdStr,technologyStr);
@@ -102,6 +99,9 @@
}
}
+ //宸ヨ壓娴佺▼
+ map.put("technologicalProcess", technologicalProcess);
+
//璁惧涓嬫媺妗�
map.put("device", reportingWorkMapper.SelectWorkBasicDeviceMp(process));
//鐝粍涓嬫媺妗�
@@ -112,6 +112,8 @@
//鏌ヨ鏈伐搴忔姤宸ラ渶瑕佸摢鍑犲眰锛屼笂宸ュ簭鏄粈涔�
String obtainTechnology = reportingWorkMapper.SelectWorkTechnologyMp(processIdStr);
+
+ map.put("numberList", flowCardMapper.getGlassNumber(Integer.valueOf(technologyStr),processIdStr));
//鍒ゆ柇鏈伐搴忔槸涓嶆槸绗竴閬撳伐搴�
if (interceptProcess.equals(process)) {
@@ -198,11 +200,18 @@
});
}
//鏌ヨ娴佺▼鍗″伐鑹烘祦绋�
- String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(reportingWork.getProcessId());
+ String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(reportingWork.getProcessId(), reportingWorkDetail.getTechnologyNumber());
int index = technologicalProcess.indexOf("-");
- //鑾峰彇宸ヨ壓娴佺▼绗竴涓伐搴�
- String interceptProcess = technologicalProcess.substring(0, index);
+ String interceptProcess = "";
+ if (index <0){
+ interceptProcess = technologicalProcess;
+ }
+ else {
+ //鑾峰彇宸ヨ壓娴佺▼绗竴涓伐搴�
+ interceptProcess = technologicalProcess.substring(0, index);
+ }
+
//鍒ゆ柇褰撳墠宸ュ簭鏄惁涓虹涓�閬撳伐搴忓伐搴忥紝浣跨敤娴佺▼鍗¤〃鏁伴噺鎴栬�呭皬鐗囨祦绋嬭〃涓婂伐搴忔暟閲�
int processNum = 0;
@@ -278,8 +287,12 @@
public boolean ReviewReportingWorkSv(Map<String, String> reportingWork) {
String processId = reportingWork.get("processId");
+ String thisProcess = reportingWork.get("thisProcess");
+ int index = processId.lastIndexOf("/") + 1;
+ String result = processId.substring(index);
- LambdaUpdateWrapper
+if (thisProcess.equals("澶硅兌") || thisProcess.equals("涓┖") || thisProcess.equals("浠撳偍")){
+ LambdaUpdateWrapper
<ReportingWork> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper
.eq(ReportingWork::getProcessId, processId.substring(0, 14))
@@ -287,8 +300,10 @@
.eq(ReportingWork::getReviewedState, 0)
.setSql("reviewed_state =1");
reportingWorkMapper.update(null, updateWrapper);
+}else {
+ reportingWorkMapper.ReviewReportingWorkMp(processId.substring(0, 14),reportingWork.get("process"),result);
-
+}
return true;
}
@@ -303,6 +318,8 @@
.eq(Order::getOrderId, reportingWork.getOrderId())));
reportingWork.setFlowCard(new FlowCard());
+
+
List<Map<String, Object>> reportingWorkDetails = reportingWorkMapper.selectByReportingWorkId(reportingWorkId, reportingWork.getNextProcess());
reportingWorkDetails.forEach(reportingWorkDetail -> {
List<DamageDetails> damageDetailsList = new ArrayList<>();
@@ -312,8 +329,8 @@
.eq(DamageDetails::getTechnologyNumber, reportingWorkDetail.get("technology_number"))
);
reportingWorkDetail.put("damageDetails", damageDetailsList);
- });
+ });
Map<String, Object> map = new HashMap<>();
map.put("reportingWork", reportingWork);
@@ -321,7 +338,7 @@
map.put("basic", getReportingWorkBase(reportingWork.getProcessId(), reportingWork.getThisProcess()));
//鏍规嵁鎶ュ伐缂栧彿鑾峰彇灞�
map.put("layer", reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId));
-
+ map.put("numberList", flowCardMapper.getGlassNumber(reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId),reportingWork.getProcessId()));
return map;
--
Gitblit v1.8.0