From cc8efc81d2d35bed40e47d0a5b0920a4b6f8095f Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期四, 23 十月 2025 11:04:05 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java | 453 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 411 insertions(+), 42 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
index f51e8f7..38731d4 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -4,6 +4,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.dynamic.datasource.annotation.DS;
+import com.example.erp.tools.AreaComputed.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -23,12 +24,14 @@
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.sql.Date;
+import java.sql.SQLOutput;
import java.time.LocalDate;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import static cn.hutool.core.convert.Convert.toDouble;
+import static com.example.erp.tools.AreaComputed.computeArea;
@Service
@DS("pp")
@@ -137,7 +140,7 @@
}
//娴佺▼鍗¤繘搴︽柟娉�
- public Map<String, Object> processCardProgressSv(String orderId, List<Integer> columns) {
+ public Map<String, Object> processCardProgressSv(String orderId, List<String> columns) {
Map<String, Object> map = new HashMap<>();
//鑾峰彇琛ㄦ牸鍐呭鏁版嵁
List<Map<String, String>> dataList = reportMapper.processCardProgressMp(orderId);
@@ -148,6 +151,7 @@
map.put("title", uniqueList);
Map<String,Integer> clos = new HashMap<>();
+ HashMap<String,HashMap<String,Map<String, Integer>>> rowCount = new HashMap<String,HashMap<String,Map<String, Integer>>>();
for (int i=0;i<uniqueList.size();i++){
//鏍规嵁娴佺▼鏌ヨ鍩虹鏁版嵁
BasicData basicData = basicDataMapper.selectOne(
@@ -156,35 +160,55 @@
.eq("basic_name",uniqueList.get(i).get("process"))
.last("limit 1")
);
+
//鍒ゆ柇澶硅兌鍜屽す鑳跺悗宸ュ簭
//Objects.equals(basicData.getNickname(), "stepA") || Objects.equals(basicData.getNickname(), "stepC")
if(Objects.equals(basicData.getNickname(), "stepA") || Objects.equals(basicData.getNickname(), "stepC")){
- clos.put(uniqueList.get(i).get("process"), 16+i);
+ clos.put(uniqueList.get(i).get("process"), 14+i);
}
//鍒ゆ柇涓┖鍜屼腑绌哄悗宸ュ簭
//Objects.equals(basicData.getNickname(), "stepB") || Objects.equals(basicData.getNickname(), "stepD")
if(Objects.equals(basicData.getNickname(), "stepB") || Objects.equals(basicData.getNickname(), "stepD")){
- columns.add(16+i);
+ columns.add("reportWorkQuantity."+uniqueList.get(i).get("process"));
}
}
List<Map<String, Object>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
- List<Map<String, Integer>> rowCount = new ArrayList<>();
- columns.forEach(col -> {
- getRowCount.forEach(row -> {
- Map<String, Integer> getRow = new HashMap<>();
- // { row: 0, col: 1, rowspan: 3, colspan: 0},
- getRow.put("row", ((Number) row.get("RowNum")).intValue());
- getRow.put("col", col);
- getRow.put("rowspan", ((Number) row.get("rowCount")).intValue());
- getRow.put("colspan", 0);
- rowCount.add(getRow);
- });
+ HashMap<Integer,Map<String, Object>> getRowCountMap = new HashMap<>();
+ getRowCount.forEach(col -> {
+ Integer getRowCountOrderNumber = ((Number) col.get("order_number")).intValue();
+ getRowCountMap.put(getRowCountOrderNumber, col);
});
- //寰幆缁撴灉
+ //寰幆缁撴灉
for (int i=0;i<dataList.size();i++ ) {
+ Integer orderNumber = Integer.parseInt(String.valueOf(dataList.get(i).get("order_number")));
+ Integer technologyNumber = Integer.parseInt(String.valueOf(dataList.get(i).get("technology_number")));
+ int finalI1 = i;
+ columns.forEach(col -> {
+ if(rowCount.get(col) == null){
+ rowCount.put(col, new HashMap<String,Map<String,Integer>>());
+ }
+
+ if(getRowCountMap.get(orderNumber) != null){
+ Map<String,Object> row = getRowCountMap.get(orderNumber);
+ Map<String, Integer> getRow = new HashMap<>();
+ //鍒ゆ柇褰撳墠姝ゆ 鏄惁涓虹涓�琛� 骞朵笖鐩稿悓搴忓彿
+ if(technologyNumber==1){
+ getRow.put("rowspan", ((Number) row.get("rowCount")).intValue());
+ getRow.put("colspan", 1);
+ }else{
+ getRow.put("rowspan", 0);
+ getRow.put("colspan", 0);
+ }
+ rowCount.get(col).put(finalI1+"_"+col, getRow);
+ }
+
+
+ });
+
+
Map<String, String> data = JSON.parseObject(dataList.get(i).get("reportWorkQuantity"),
new TypeReference<Map<String, String>>() {
});
@@ -193,14 +217,15 @@
});
//鍒ゆ柇鍚庡伐搴忔娴佺▼鍗″彿鏄惁鏈夋鐮�
List<DamageDetails> hasBreak = damageDetailsMapper
- .selectList(new LambdaQueryWrapper<DamageDetails>()
- .eq(DamageDetails::getProcessId, dataList.get(i).get("processId"))
- .eq(DamageDetails::getOrderNumber, dataList.get(i).get("order_number"))
- .eq(DamageDetails::getTechnologyNumber, dataList.get(i).get("technology_number"))
- .eq(DamageDetails::getPatchStatus, 0)
- .gt(DamageDetails::getBreakageQuantity,0)
-
+ .getNotReview(dataList.get(i).get("processId"),
+ String.valueOf(dataList.get(i).get("order_number")),
+ String.valueOf(dataList.get(i).get("technology_number"))
);
+
+
+
+
+
if(!hasBreak.isEmpty()){
int finalI = i;
data.forEach((thisProcess, index)->{
@@ -211,12 +236,13 @@
thisProcess,
orderId
);
+
if(behindProcess!=null &&!behindProcess.isEmpty()){
Integer behindDamageSum = damageDetailsMapper.getBehindDamageSum(
dataList.get(finalI).get("processId"),
String.valueOf(dataList.get(finalI).get("order_number")),
String.valueOf(dataList.get(finalI).get("technology_number")),
- behindProcess
+ behindProcess,1
);
if(behindDamageSum>0){
data.put(thisProcess, String.valueOf(Integer.parseInt(data.get(thisProcess) )- behindDamageSum));
@@ -227,7 +253,7 @@
});
}
-
+ //澶硅兌宸ュ簭鍒ゆ柇鍚堝苟琛屾暟
if(!clos.isEmpty()){
Integer max = orderGlassDetailMapper
@@ -243,19 +269,23 @@
for (String key : clos.keySet()) {
if(data.get(key) != null){
-
+ if (rowCount.get("reportWorkQuantity."+key)==null){
+ rowCount.put("reportWorkQuantity."+key, new HashMap<String,Map<String,Integer>>());
+ }
+ Map<String, Integer> getRow = new HashMap<>();
if(min == Integer.parseInt(String.valueOf(dataList.get(i).get("technology_number"))) ){
- Map<String, Integer> getRow = new HashMap<>();
- // { row: 0, col: 1, rowspan: 3, colspan: 0},
- getRow.put("row", i );
- getRow.put("col", clos.get(key));
- getRow.put("rowspan", max-min+1);
- getRow.put("colspan", 0);
- rowCount.add(getRow);
+
+ // { row: 0, col: 1, rowspan: 3, colspan: 0},
+ //getRow.put("row", i );
+ getRow.put("rowspan", max-min+1);
+ getRow.put("colspan", 1);
+
}else{
+ getRow.put("rowspan", 0);
+ getRow.put("colspan", 0);
data.put(key,"0");
}
-
+ rowCount.get("reportWorkQuantity."+key).put(i+"_reportWorkQuantity."+key, getRow);
}
}
}
@@ -306,7 +336,7 @@
if ("null".equals(optionVal)) {
optionVal = ("");
}
- if (selectProcesses.equals("鍏ㄩ儴")){
+ if (selectProcesses.equals("all")){
selectProcesses="";
}
String laminating = reportMapper.getLaminating(selectProcesses);
@@ -382,7 +412,7 @@
return map;
}
- public Map<String, Object> yieldSv(Date selectTime1, Date selectTime2, String selectProcesses, Report report) {
+ public Map<String, Object> yieldSv(String selectTime1, String selectTime2, String selectProcesses, Report report) {
Map<String, Object> map = new HashMap<>();
map.put("data", reportMapper.yieldMp(selectTime1, selectTime2, selectProcesses, report));
map.put("process", productionSchedulingMapper.selectProcess());
@@ -588,7 +618,7 @@
public List exportWorkInProgressSv(Map<String, Object> dates) {
String process= (String) dates.get("processes");
- if (process.equals("鍏ㄩ儴")){
+ if (process.equals("all")){
process="";
}
String inputVal= (String) dates.get("inputVal");
@@ -625,12 +655,13 @@
}
public Map<String, Object> teamOutputSv(Integer pageNum, Integer pageSize, String selectTime1, String selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO) {
- if (selectProcesses.equals("鍏ㄩ儴")){
+ if (selectProcesses.equals("all")){
selectProcesses="";
}
Integer offset = (pageNum - 1) * pageSize;
Map<String, Object> map = new HashMap<>();
String laminating = reportMapper.getLaminating(selectProcesses);
+
map.put("data", reportMapper.teamOutputMp(offset, pageSize, selectTime1, selectTime2,selectProcesses,laminating, teamOutputDTO));
map.put("process", productionSchedulingMapper.selectProcess());
map.put("total", reportMapper.teamOutputPageTotal(offset, pageSize, selectTime1, selectTime2,selectProcesses,laminating, teamOutputDTO));
@@ -656,7 +687,7 @@
public List exportTeamOutputSv(Map<String, Object> dates) {
List<LocalDate> date= (List<LocalDate>) dates.get("date");
String process= (String) dates.get("processes");
- if (process.equals("鍏ㄩ儴")){
+ if (process.equals("all")){
process="";
}
String laminating = reportMapper.getLaminating(process);
@@ -697,7 +728,7 @@
if ("null".equals(optionVal)) {
optionVal = "";
}
- if ("鍏ㄩ儴".equals(selectProcesses)) {
+ if ("all".equals(selectProcesses)) {
selectProcesses = "";
}
@@ -775,7 +806,7 @@
public List exportWorkInProgressCombinationSv(Map<String, Object> dates) {
String process= (String) dates.get("processes");
- if (process.equals("鍏ㄩ儴")){
+ if (process.equals("all")){
process="";
}
String inputVal= (String) dates.get("inputVal");
@@ -820,14 +851,352 @@
return resultList;
}
- public Object processCardProgressCollectSv(String orderId, List<Integer> columns) {
+ public Object processCardProgressCollectSv(String orderId, List<String> columns) {
Map<String, Object> map = new HashMap<>();
//鑾峰彇琛ㄦ牸鍐呭鏁版嵁
List<Map<String, String>> dataList = reportMapper.processCardProgressCollectMp(orderId);
//鑾峰彇琛ㄥご宸ュ簭绛涢�夋暟鎹�
List<Map<String, String>> uniqueList = orderProcessDetailMapper.filterOrderProcess(orderId);
+ map.put("title", uniqueList);
+ Map<String,Map<String,Object>> clos = new HashMap<>();
+ for (int i=0;i<uniqueList.size();i++){
+ //鏍规嵁娴佺▼鏌ヨ鍩虹鏁版嵁
+ BasicData basicData = basicDataMapper.selectOne(
+ new QueryWrapper<BasicData>()
+ .eq("basic_category","process")
+ .eq("basic_name",uniqueList.get(i).get("process"))
+ .last("limit 1")
+ );
+ Map<String,Object> getCol = new HashMap<>();
+ //鍒ゆ柇澶硅兌鍜屽す鑳跺悗宸ュ簭
+ //Objects.equals(basicData.getNickname(), "stepA") || Objects.equals(basicData.getNickname(), "stepC")
+ if(Objects.equals(basicData.getNickname(), "stepA") || Objects.equals(basicData.getNickname(), "stepC")){
+ getCol.put("col", 11+i);
+ getCol.put("step","stepA");
+ clos.put(uniqueList.get(i).get("process"), getCol);
+ }
+ //鍒ゆ柇涓┖鍜屼腑绌哄悗宸ュ簭
+ //Objects.equals(basicData.getNickname(), "stepB") || Objects.equals(basicData.getNickname(), "stepD")
+ if(Objects.equals(basicData.getNickname(), "stepB") || Objects.equals(basicData.getNickname(), "stepD")){
+ columns.add("reportWorkQuantity."+uniqueList.get(i).get("process"));
+ getCol.put("col", 11+i);
+ getCol.put("step","stepB");
+ clos.put(uniqueList.get(i).get("process"), getCol);
+ }
+ }
+ List<Map<String, Object>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
+ HashMap<String,Map<String, Object>> getRowCountMap = new HashMap<>();
+ getRowCount.forEach(col -> {
+ String getRowCountProcessId = String.valueOf(col.get("process_id"));
+ getRowCountMap.put(getRowCountProcessId, col);
+ });
+ HashMap<String,HashMap<String,Map<String, Integer>>> rowCount = new HashMap<String,HashMap<String,Map<String, Integer>>>();
+ //寰幆缁撴灉
+ for (int i=0;i<dataList.size();i++ ) {
+ String processId = String.valueOf(dataList.get(i).get("process_id"));
+ Integer technologyNumber = Integer.parseInt(String.valueOf(dataList.get(i).get("technology_number")));
+ int finalI1 = i;
+ columns.forEach(col -> {
+ if(rowCount.get(col) == null){
+ rowCount.put(col, new HashMap<String,Map<String,Integer>>());
+ }
+
+ if(getRowCountMap.get(processId) != null){
+ Map<String,Object> row = getRowCountMap.get(processId);
+ Map<String, Integer> getRow = new HashMap<>();
+ //鍒ゆ柇褰撳墠姝ゆ 鏄惁涓虹涓�琛� 骞朵笖鐩稿悓搴忓彿
+ if(technologyNumber==1){
+ getRow.put("rowspan", ((Number) row.get("rowCount")).intValue());
+ getRow.put("colspan", 1);
+ }else{
+ getRow.put("rowspan", 0);
+ getRow.put("colspan", 0);
+ }
+ rowCount.get(col).put(finalI1+"_"+col, getRow);
+ }
+
+
+ });
+
+
+ dataList.get(i).put("reportWorkQuantityShow",dataList.get(i).get("reportWorkQuantity"));
+ Map<String, String> data = JSON.parseObject(dataList.get(i).get("reportWorkQuantity"),
+ new TypeReference<Map<String, String>>() {
+ });
+ Map<String, String> dataShow = JSON.parseObject(dataList.get(i).get("reportWorkQuantityShow"),
+ new TypeReference<Map<String, String>>() {
+ });
+ //鍒ゆ柇鍚庡伐搴忔娴佺▼鍗″彿鏄惁鏈夋鐮�
+ List<DamageDetails> hasBreak = damageDetailsMapper
+ .getNotReview(dataList.get(i).get("process_id"),
+ null,
+ String.valueOf(dataList.get(i).get("technology_number"))
+ );
+
+ if(!hasBreak.isEmpty()){
+ int finalI = i;
+ data.forEach((thisProcess, index)->{
+ String behindProcess = orderProcessDetailMapper.getBehindProcess(
+ dataList.get(finalI).get("process_id"),
+ String.valueOf(dataList.get(finalI).get("order_number")),
+ String.valueOf(dataList.get(finalI).get("technology_number")),
+ thisProcess,
+ orderId
+ );
+
+ if(behindProcess!=null &&!behindProcess.isEmpty()){
+ Integer behindDamageSum = damageDetailsMapper.getBehindDamageSum(
+ dataList.get(finalI).get("process_id"),
+ String.valueOf(dataList.get(finalI).get("order_number")),
+ String.valueOf(dataList.get(finalI).get("technology_number")),
+ behindProcess,
+ null
+ );
+ if(behindDamageSum>0){
+ data.put(thisProcess, String.valueOf(Integer.parseInt(data.get(thisProcess) )- behindDamageSum));
+ dataShow.put(thisProcess, String.valueOf(Integer.parseInt(dataShow.get(thisProcess) )- behindDamageSum));
+ }
+
+ }
+ });
+
+ }
+
+ if(!clos.isEmpty()){
+ Integer max = orderGlassDetailMapper
+ .getMaxTechnologyNumberByGroup(dataList.get(i).get("order_id"),
+ String.valueOf(dataList.get(i).get("order_number")),
+ String.valueOf(dataList.get(i).get("group"))
+ );
+ Integer min = orderGlassDetailMapper
+ .getMinTechnologyNumberByGroup(dataList.get(i).get("order_id"),
+ String.valueOf(dataList.get(i).get("order_number")),
+ String.valueOf(dataList.get(i).get("group"))
+ );
+
+ for (String key : clos.keySet()) {
+ if(data.get(key) != null){
+ //鍒ゆ柇鏄す鑳跺伐搴�
+ if( clos.get(key).get("step")=="stepA"){
+ if (rowCount.get("reportWorkQuantity."+key)==null){
+ rowCount.put("reportWorkQuantity."+key, new HashMap<String,Map<String,Integer>>());
+ }
+ Map<String, Integer> getRow = new HashMap<>();
+ if(min == Integer.parseInt(String.valueOf(dataList.get(i).get("technology_number"))) ){
+ getRow.put("rowspan", max-min+1);
+ getRow.put("colspan", 1);
+ }else{
+ getRow.put("rowspan", 0);
+ getRow.put("colspan", 0);
+ data.put(key,"0");
+ }
+ rowCount.get("reportWorkQuantity."+key).put(i+"_reportWorkQuantity."+key, getRow);
+ }else{//涓┖锛屼腑绌哄悗宸ュ簭
+ //灏忕墖搴忓彿涓嶆槸1 鐨勬椂鍊欒祴鍊�0
+ if(Integer.parseInt(String.valueOf(dataList.get(i).get("technology_number"))) !=1){
+ data.put(key,"0");
+ }
+ }
+
+ }
+
+ }
+ }
+ dataList.get(i).put("reportWorkQuantity",JSON.toJSONString(data));
+ dataList.get(i).put("reportWorkQuantityShow",JSON.toJSONString(dataShow));
+
+ }
+
+ map.put("mergeCells", rowCount);
+
+ map.put("data",dataList);
+
+
+ return map;
+ }
+
+ public Map<String, Object> processCardProgressReportSv(String orderId, List<String> columns) {
+ Map<String, Object> map = new HashMap<>();
+ //鑾峰彇琛ㄦ牸鍐呭鏁版嵁
+ List<Map<String, String>> dataList = reportMapper.processCardProgressReportMp(orderId);
+
+ //鑾峰彇琛ㄥご宸ュ簭绛涢�夋暟鎹�
+ List<Map<String, String>> uniqueList = orderProcessDetailMapper.filterOrderProcess(orderId);
map.put("title", uniqueList);
- return null;
+ Map<String,Integer> clos = new HashMap<>();
+ HashMap<String,HashMap<String,Map<String, Integer>>> rowCount = new HashMap<String,HashMap<String,Map<String, Integer>>>();
+ for (int i=0;i<uniqueList.size();i++){
+ //鏍规嵁娴佺▼鏌ヨ鍩虹鏁版嵁
+ BasicData basicData = basicDataMapper.selectOne(
+ new QueryWrapper<BasicData>()
+ .eq("basic_category","process")
+ .eq("basic_name",uniqueList.get(i).get("process"))
+ .last("limit 1")
+ );
+
+ //鍒ゆ柇澶硅兌鍜屽す鑳跺悗宸ュ簭
+ //Objects.equals(basicData.getNickname(), "stepA") || Objects.equals(basicData.getNickname(), "stepC")
+ if(Objects.equals(basicData.getNickname(), "stepA") || Objects.equals(basicData.getNickname(), "stepC")){
+ clos.put(uniqueList.get(i).get("process"), 14+i);
+ }
+ //鍒ゆ柇涓┖鍜屼腑绌哄悗宸ュ簭
+ //Objects.equals(basicData.getNickname(), "stepB") || Objects.equals(basicData.getNickname(), "stepD")
+ if(Objects.equals(basicData.getNickname(), "stepB") || Objects.equals(basicData.getNickname(), "stepD")){
+ columns.add("reportWorkQuantity."+uniqueList.get(i).get("process"));
+ }
+ }
+
+
+ List<Map<String, Object>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
+ HashMap<Integer,Map<String, Object>> getRowCountMap = new HashMap<>();
+ getRowCount.forEach(col -> {
+ Integer getRowCountOrderNumber = ((Number) col.get("order_number")).intValue();
+ getRowCountMap.put(getRowCountOrderNumber, col);
+ });
+
+ //寰幆缁撴灉
+ for (int i=0;i<dataList.size();i++ ) {
+ Integer orderNumber = Integer.parseInt(String.valueOf(dataList.get(i).get("order_number")));
+ Integer technologyNumber = Integer.parseInt(String.valueOf(dataList.get(i).get("technology_number")));
+ int finalI1 = i;
+ columns.forEach(col -> {
+ if(rowCount.get(col) == null){
+ rowCount.put(col, new HashMap<String,Map<String,Integer>>());
+ }
+
+ if(getRowCountMap.get(orderNumber) != null){
+ Map<String,Object> row = getRowCountMap.get(orderNumber);
+ Map<String, Integer> getRow = new HashMap<>();
+ //鍒ゆ柇褰撳墠姝ゆ 鏄惁涓虹涓�琛� 骞朵笖鐩稿悓搴忓彿
+ if(technologyNumber==1){
+ getRow.put("rowspan", ((Number) row.get("rowCount")).intValue());
+ getRow.put("colspan", 1);
+ }else{
+ getRow.put("rowspan", 0);
+ getRow.put("colspan", 0);
+ }
+ rowCount.get(col).put(finalI1+"_"+col, getRow);
+ }
+
+
+ });
+
+
+ Map<String, String> data = JSON.parseObject(dataList.get(i).get("reportWorkQuantity"),
+ new TypeReference<Map<String, String>>() {
+ });
+ Map<String, String> dataShow = JSON.parseObject(dataList.get(i).get("reportWorkQuantityShow"),
+ new TypeReference<Map<String, String>>() {
+ });
+ //鍒ゆ柇鍚庡伐搴忔娴佺▼鍗″彿鏄惁鏈夋鐮�
+ List<DamageDetails> hasBreak = damageDetailsMapper
+ .getNotReview(dataList.get(i).get("processId"),
+ String.valueOf(dataList.get(i).get("order_number")),
+ String.valueOf(dataList.get(i).get("technology_number"))
+ );
+
+
+
+
+
+ if(!hasBreak.isEmpty()){
+ int finalI = i;
+ data.forEach((thisProcess, index)->{
+ String behindProcess = orderProcessDetailMapper.getBehindProcess(
+ dataList.get(finalI).get("processId"),
+ String.valueOf(dataList.get(finalI).get("order_number")),
+ String.valueOf(dataList.get(finalI).get("technology_number")),
+ thisProcess,
+ orderId
+ );
+
+ if(behindProcess!=null &&!behindProcess.isEmpty()){
+ Integer behindDamageSum = damageDetailsMapper.getBehindDamageSum(
+ dataList.get(finalI).get("processId"),
+ String.valueOf(dataList.get(finalI).get("order_number")),
+ String.valueOf(dataList.get(finalI).get("technology_number")),
+ behindProcess,1
+ );
+ if(behindDamageSum>0){
+ data.put(thisProcess, String.valueOf(Integer.parseInt(data.get(thisProcess) )- behindDamageSum));
+ dataShow.put(thisProcess, String.valueOf(Integer.parseInt(dataShow.get(thisProcess) )- behindDamageSum));
+ }
+
+ }
+ });
+
+ }
+ //澶硅兌宸ュ簭鍒ゆ柇鍚堝苟琛屾暟
+ if(!clos.isEmpty()){
+
+ Integer max = orderGlassDetailMapper
+ .getMaxTechnologyNumberByGroup(dataList.get(i).get("order_id"),
+ String.valueOf(dataList.get(i).get("order_number")),
+ String.valueOf(dataList.get(i).get("group"))
+ );
+ Integer min = orderGlassDetailMapper
+ .getMinTechnologyNumberByGroup(dataList.get(i).get("order_id"),
+ String.valueOf(dataList.get(i).get("order_number")),
+ String.valueOf(dataList.get(i).get("group"))
+ );
+
+ for (String key : clos.keySet()) {
+ if(data.get(key) != null){
+ if (rowCount.get("reportWorkQuantity."+key)==null){
+ rowCount.put("reportWorkQuantity."+key, new HashMap<String,Map<String,Integer>>());
+ }
+ Map<String, Integer> getRow = new HashMap<>();
+ if(min == Integer.parseInt(String.valueOf(dataList.get(i).get("technology_number"))) ){
+
+ // { row: 0, col: 1, rowspan: 3, colspan: 0},
+ //getRow.put("row", i );
+ getRow.put("rowspan", max-min+1);
+ getRow.put("colspan", 1);
+
+ }else{
+ getRow.put("rowspan", 0);
+ getRow.put("colspan", 0);
+ data.put(key,"0");
+ }
+ rowCount.get("reportWorkQuantity."+key).put(i+"_reportWorkQuantity."+key, getRow);
+ }
+ }
+ }
+ dataList.get(i).put("reportWorkQuantity",JSON.toJSONString(data));
+ dataList.get(i).put("reportWorkQuantityShow",JSON.toJSONString(dataShow));
+
+ }
+
+
+
+
+ map.put("data",dataList );
+ map.put("mergeCells", rowCount);
+
+ return map;
+ }
+
+ public Map<String, Object> yieldProcessSv(String selectTime1, String selectTime2, Report report) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", reportMapper.yieldProcessMp(selectTime1, selectTime2, report));
+ map.put("process", productionSchedulingMapper.selectProcess());
+ return map;
+ }
+
+ public Map<String, Object> selectProcessCompletedSv(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report) {
+ if ("null".equals(orderId)) {
+ orderId = "";
+ }
+ if ("null".equals(inputProject)) {
+ inputProject = "";
+ }
+ Map<String, Object> map = new HashMap<>();
+ String laminating = reportMapper.getLaminating(selectProcesses);
+ map.put("data", reportMapper.selectProcessCompletedMp(selectTime1, selectTime2, orderId, inputProject, selectProcesses,laminating, report));
+ map.put("process", productionSchedulingMapper.selectProcess());
+ map.put("footSum" ,reportMapper.processToBeCompletedFootSum(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
+
+ return map;
}
}
--
Gitblit v1.8.0