From fcc1781bd060ef3710d3934728fb36ef74525fca Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 05 十一月 2025 13:47:43 +0800
Subject: [PATCH] 在制品报表,添加按钮显示与不显示终止状态

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue |    5 -
 north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgressCombination.vue    |   35 ++++++++++-
 north-glass-erp/src/main/resources/mapper/pp/Report.xml                             |   25 ++++++++
 north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue               |   39 +++++++++++-
 north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java         |   44 +++++++++-----
 north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java           |   12 ++--
 north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java   |   10 ++-
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml                           |    2 
 8 files changed, 132 insertions(+), 40 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
index baca82f..ffab797 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
@@ -150,10 +150,7 @@
         inputErrorMessage: t('processCard.terminationMsg'),
         inputValue:row.quantity
       }).then(({ value }) => {
-        if (completedOk.value <  value  ) {
-          ElMessage.warning(t('processCard.terminationMsg'))
-          return
-        }
+
         request.post(`/processCard/updateTermination/${processId}/${orderNumber}/${value}`).then((res) => {
           if (res.code == 200 && res.data === true) {
             ElMessage.success(t('basicData.msg.saveSuccess'))
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
index 6099d82..ec19396 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
@@ -4,7 +4,7 @@
 import {useRouter} from 'vue-router'
 import request from "@/utils/request";
 import deepClone from "@/utils/deepClone";
-import {ElDatePicker, ElMessage} from "element-plus";
+import {ElCheckbox, ElDatePicker, ElMessage} from "element-plus";
 import {useI18n} from 'vue-i18n'
 import footSum from "@/hook/footSum"
 import {addListener} from "@/hook/mouseMove";
@@ -22,6 +22,8 @@
 
 //宸ュ簭
 const valueProcess = ref()
+//缁堟鐘舵��
+let terminationVal = ref(1)
 
 //鏍规嵁浠ヤ笅瀛楁姹囨�绘煡璇�
 const stateValue = ref('')
@@ -135,7 +137,11 @@
   if (optionVal == '') {
     optionVal = null
   }
-  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+  let terminationVals = terminationVal.value
+  if (terminationVals == '') {
+    terminationVals = null
+  }
+  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
     if (res.code == 200) {
       total.value = res.data.total
       produceList = deepClone(res.data.data)
@@ -167,7 +173,11 @@
   if (optionVal == '') {
     optionVal = null
   }
-  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+  let terminationVals = terminationVal.value
+  if (terminationVals == '') {
+    terminationVals = null
+  }
+  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
 
     if (res.code == 200) {
       total.dataTotal = res.data.total.total * 1
@@ -229,7 +239,11 @@
   if (optionVal == '') {
     optionVal = null
   }
-  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+  let terminationVals = terminationVal.value
+  if (terminationVals == '') {
+    terminationVals = null
+  }
+  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
 
     if (res.code == 200) {
       total.dataTotal = res.data.total.total * 1
@@ -399,6 +413,10 @@
   if (inputProject == '') {
     inputProject = null
   }
+  let terminationVals = terminationVal.value
+  if (terminationVals == '') {
+    terminationVals = null
+  }
   if(date===null){
     ElMessage.warning(t('report.pleaseSelectADateFirst'))
     return
@@ -421,7 +439,8 @@
     date: date,
     processes: processes,
     orderId: inputVal,
-    project: inputProject
+    project: inputProject,
+    terminationVals:terminationVals
   })
   request.post(url,dataMp.value,{responseType :'blob'}).then(res => {
     const blob = new Blob([res])
@@ -467,6 +486,9 @@
 const handleCellDblClick = ({ row, column, cell, $event }) => {
   VxeUI.clipboard.copy(row[column.property])
 }
+function onlandingTerminationChange(checked) {
+  terminationVal.value = checked ? 0 : 1
+}
 </script>
 
 <template>
@@ -498,6 +520,13 @@
               :value="item.basic_name"
           />
         </el-select>
+      &nbsp;
+      <el-checkbox
+          :model-value="terminationVal === 0"
+          @change="onlandingTerminationChange"
+      >
+        {{ t('processCard.termination') }}
+      </el-checkbox>
         &nbsp;
         <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button>
     </div>
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgressCombination.vue b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgressCombination.vue
index f4ebd43..a88e7a1 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgressCombination.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgressCombination.vue
@@ -23,6 +23,8 @@
 
 //椤圭洰鍚嶇О姹囨��
 let projectSummary= ref(1)
+//缁堟鐘舵��
+let terminationVal = ref(1)
 //宸ュ簭
 const value = ref()
 
@@ -105,6 +107,10 @@
 if (optionVal == '') {
   optionVal = null
 }
+let terminationVals = terminationVal.value
+if (terminationVals == '') {
+  terminationVals = null
+}
 //绗竴娆″姞杞芥暟鎹�
 request.post(`/report/workInProgressCombinationProcess/1/${total.pageSize}/${selectProcesses}/${inputVal}/${inputProject}/${optionVal}`, filterData.value).then((res) => {
 
@@ -138,7 +144,11 @@
   if (optionVal == '') {
     optionVal = null
   }
-  request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+  let terminationVals = terminationVal.value
+  if (terminationVals == '') {
+    terminationVals = null
+  }
+  request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
     if (res.code == 200) {
       total.value = res.data.total
       produceList = deepClone(res.data.data)
@@ -170,7 +180,11 @@
   if (optionVal == '') {
     optionVal = null
   }
-  request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+  let terminationVals = terminationVal.value
+  if (terminationVals == '') {
+    terminationVals = null
+  }
+  request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
 
     if (res.code == 200) {
       // total.dataTotal = res.data.total.total * 1
@@ -296,6 +310,10 @@
   projectSummary.value = checked ? 0 : 1
 }
 
+function onlandingTerminationChange(checked) {
+  terminationVal.value = checked ? 0 : 1
+}
+
 function exportExcel(url, fileName,date) {
 
   let processes = value.value
@@ -306,6 +324,10 @@
   let inputProject = form.project
   if (inputProject == '') {
     inputProject = null
+  }
+  let terminationVals = terminationVal.value
+  if (terminationVals == '') {
+    terminationVals = null
   }
   if(date===null){
     ElMessage.warning(t('report.pleaseSelectADateFirst'))
@@ -329,7 +351,8 @@
     date: date,
     processes: processes,
     orderId: inputVal,
-    project: inputProject
+    project: inputProject,
+    terminationVals:terminationVals
   })
   request.post(url,dataMp.value,{responseType :'blob'}).then(res => {
     const blob = new Blob([res])
@@ -381,6 +404,12 @@
       >
         {{ t('order.project') }}
       </el-checkbox>
+      <el-checkbox
+          :model-value="terminationVal === 0"
+          @change="onlandingTerminationChange"
+      >
+        {{ t('processCard.termination') }}
+      </el-checkbox>
       &nbsp;
         <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button>
     </div>
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
index e75dfb3..7af6750 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
@@ -67,7 +67,7 @@
     }
 
     @ApiOperation("鍦ㄥ埗鍝佹姤琛�")
-    @PostMapping("/workInProgress/{pageNum}/{pageSize}/{orderId}/{inputProject}/{selectProcesses}/{optionVal}")
+    @PostMapping("/workInProgress/{pageNum}/{pageSize}/{orderId}/{inputProject}/{selectProcesses}/{optionVal}/{terminationVals}")
     public Result workInProgress(
             @PathVariable Integer pageNum,
             @PathVariable Integer pageSize,
@@ -75,8 +75,9 @@
             @PathVariable String inputProject,
             @PathVariable String selectProcesses,
             @PathVariable String optionVal,
+            @PathVariable String terminationVals,
             @RequestBody WorkInProgressDTO workInProgressDTO) {
-        return Result.success(reportService.workInProgressSv(pageNum, pageSize, orderId, inputProject, selectProcesses,optionVal, workInProgressDTO));
+        return Result.success(reportService.workInProgressSv(pageNum, pageSize, orderId, inputProject, selectProcesses,optionVal,terminationVals, workInProgressDTO));
 
     }
 
@@ -327,7 +328,7 @@
     }
 
     @ApiOperation("鍦ㄥ埗鍝佹眹鎬绘姤琛�")
-    @PostMapping("/workInProgressCombination/{pageNum}/{pageSize}/{orderId}/{inputProject}/{selectProcesses}/{optionVal}")
+    @PostMapping("/workInProgressCombination/{pageNum}/{pageSize}/{orderId}/{inputProject}/{selectProcesses}/{optionVal}/{terminationVal}")
     public Result workInProgressCombination(
             @PathVariable Integer pageNum,
             @PathVariable Integer pageSize,
@@ -335,8 +336,9 @@
             @PathVariable String inputProject,
             @PathVariable String selectProcesses,
             @PathVariable String optionVal,
+            @PathVariable String terminationVal,
             @RequestBody WorkInProgressDTO workInProgressDTO) {
-        return Result.success(reportService.workInProgressCombinationSv(pageNum, pageSize, orderId, inputProject,selectProcesses,optionVal, workInProgressDTO));
+        return Result.success(reportService.workInProgressCombinationSv(pageNum, pageSize, orderId, inputProject,selectProcesses,optionVal,terminationVal, workInProgressDTO));
 
     }
 
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
index bd4fa9a..9a0986c 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
@@ -60,7 +60,7 @@
 
     List<ProcessToBeCompletedDTO> exportProcessToBeCompletedMp(List<LocalDate> date, String process, String inputVal, String project);
 
-    List<WorkInProgressDTO> exportWorkInProgressMp( String process, String inputVal, String project);
+    List<WorkInProgressDTO> exportWorkInProgressMp( String process, String inputVal, String project,String terminationVals);
 
     List<TaskCompletionStatusDTO> exportTaskCompletionStatusMp(Map<String, Object> dates);
 
@@ -92,7 +92,7 @@
 
     List<TeamOutputDTO> exportTeamOutputMp(List<LocalDate> date, String process, String laminating);
 
-    Map<String,Float> workInProgressOrderFootSum(Integer offset, Integer pageSize, String orderId, String inputProject, String selectProcesses, WorkInProgressDTO workInProgressDTO);
+    Map<String,Float> workInProgressOrderFootSum(Integer offset, Integer pageSize, String orderId, String inputProject, String selectProcesses,String terminationVals, WorkInProgressDTO workInProgressDTO);
 
     Map<String,Float> processToBeCompletedFootSum(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report);
 
@@ -102,7 +102,7 @@
 
     String getLaminating(String selectProcesses);
 
-    List<WorkInProgressDTO> workInProgressMpdataList1(Integer offset, Integer pageSize, String orderId, String inputProject, String selectProcesses, String laminating, WorkInProgressDTO workInProgressDTO);
+    List<WorkInProgressDTO> workInProgressMpdataList1(Integer offset, Integer pageSize, String orderId, String inputProject, String selectProcesses, String laminating,String terminationVals, WorkInProgressDTO workInProgressDTO);
 
     List<WorkInProgressDTO> workInProgressMpdataList2(Integer offset, Integer pageSize, String orderId, String inputProject, String selectProcesses, WorkInProgressDTO workInProgressDTO);
 
@@ -118,13 +118,13 @@
 
     Map<String,Float> workInProgressCombinationOrderFootSum(Integer offset, Integer pageSize, String orderId, String inputProject, String selectProcesses, WorkInProgressDTO workInProgressDTO);
 
-    List<Map<String, Object>> getWorkInProgressCombination(String process, String laminating, String optionVal);
+    List<Map<String, Object>> getWorkInProgressCombination(String process, String laminating, String optionVal,String terminationVal);
 
     List<String> selectProcess();
 
-    Map<String,Object> getWorkInProgressCombinationFootSum(String process, String laminating, String optionVal);
+    Map<String,Object> getWorkInProgressCombinationFootSum(String process, String laminating, String optionVal, String terminationVal);
 
-    List<WorkInProgressCombinationDTO> exportWorkInProgressCombination(String process, String laminating, String inputVal);
+    List<WorkInProgressCombinationDTO> exportWorkInProgressCombination(String process, String laminating, String inputVal,String terminationVal);
 
     List<Map<String, String>> processCardProgressCollectMp(String orderId);
 
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 e006a77..d1ea006 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
@@ -485,13 +485,14 @@
     public Map<String, Object> workInProgressSv(
             Integer pageNum, Integer pageSize,
             String orderId, String inputProject, String selectProcesses,
-            String optionVal, WorkInProgressDTO workInProgressDTO) {
+            String optionVal,String terminationVals, WorkInProgressDTO workInProgressDTO) {
 
         Integer offset = (pageNum - 1) * pageSize;
 
         if ("null".equals(orderId)) orderId = "";
         if ("null".equals(inputProject)) inputProject = "";
         if ("null".equals(optionVal)) optionVal = "";
+        if ("null".equals(terminationVals)) terminationVals = "";
         if ("all".equals(selectProcesses)) selectProcesses = "";
 
         String laminating = reportMapper.getLaminating(selectProcesses);
@@ -502,6 +503,7 @@
             String finalOrderId = orderId;
             String finalInputProject = inputProject;
             String finalSelectProcesses = selectProcesses;
+            String finalTerminationVals = terminationVals;
             CompletableFuture<List<WorkInProgressDTO>> dataList2Future =
                     asyncExecutor.runAsync(() ->
                             reportMapper.workInProgressMpdataList2(
@@ -519,7 +521,7 @@
 
                 totalFuture = asyncExecutor.runAsync(() ->
                         reportMapper.workInProgressOrderFootSum(
-                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses, workInProgressDTO));
+                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses,finalTerminationVals, workInProgressDTO));
 
             } else if ("2".equals(optionVal)) {
                 // 娴佺▼鍗″彿姹囨��
@@ -529,25 +531,25 @@
 
                 totalFuture = asyncExecutor.runAsync(() ->
                         reportMapper.workInProgressOrderFootSum(
-                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses, workInProgressDTO));
+                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses,finalTerminationVals, workInProgressDTO));
 
             } else if ("3".equals(optionVal)) {
                 dataList1Future = asyncExecutor.runAsync(() ->
                         reportMapper.workInProgressMpdataList1(
-                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses, laminating, workInProgressDTO));
+                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses, laminating,finalTerminationVals, workInProgressDTO));
                 totalFuture = asyncExecutor.runAsync(() ->
                         reportMapper.workInProgressOrderFootSum(
-                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses, workInProgressDTO));
+                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses,finalTerminationVals, workInProgressDTO));
 
             } else {
                 // 涓嶅垎缁�
                 dataList1Future = asyncExecutor.runAsync(() ->
                         reportMapper.workInProgressMpdataList1(
-                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses, laminating, workInProgressDTO));
+                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses, laminating,finalTerminationVals, workInProgressDTO));
 
                 totalFuture = asyncExecutor.runAsync(() ->
                         reportMapper.workInProgressOrderFootSum(
-                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses, workInProgressDTO));
+                                offset, pageSize, finalOrderId, finalInputProject, finalSelectProcesses,finalTerminationVals, workInProgressDTO));
             }
 
             // 绛夊緟鍏ㄩ儴浠诲姟瀹屾垚
@@ -970,13 +972,17 @@
         }
         String inputVal= (String) dates.get("inputVal");
         String project= (String) dates.get("project");
+        String terminationVals= (String) dates.get("terminationVals");
         if ("null".equals(inputVal)) {
             inputVal = "";
         }
         if ("null".equals(project)) {
             project = "";
         }
-        List<WorkInProgressDTO> dataList1  =reportMapper.exportWorkInProgressMp(process,inputVal,project);
+        if ("null".equals(terminationVals)) {
+            terminationVals = "";
+        }
+        List<WorkInProgressDTO> dataList1  =reportMapper.exportWorkInProgressMp(process,inputVal,project,terminationVals);
         List<WorkInProgressDTO> dataList2  =reportMapper.exportWorkInProgressMpdataList2(process);
 
         mergeTeamsGroupsName(dataList1, dataList2);
@@ -1139,7 +1145,7 @@
     public Map<String, Object> workInProgressCombinationSv(
             Integer pageNum, Integer pageSize,
             String orderId, String inputProject, String selectProcesses,
-            String optionVal, WorkInProgressDTO workInProgressDTO) {
+            String optionVal,String terminationVal, WorkInProgressDTO workInProgressDTO) {
 
         Integer offset = (pageNum - 1) * pageSize;
 
@@ -1151,6 +1157,9 @@
         }
         if ("null".equals(optionVal)) {
             optionVal = "";
+        }
+        if ("null".equals(terminationVal)) {
+            terminationVal = "";
         }
         if ("all".equals(selectProcesses)) {
             selectProcesses = "";
@@ -1168,17 +1177,16 @@
 
         // 鏈�缁堟暟鎹泦鍚�
         List<Map<String, Object>> resultList = new ArrayList<>();
-
         if (!"".equals(selectProcesses)) {
             laminating = reportingWorkMapper.getProcessLaminating(selectProcesses);
             List<Map<String, Object>> singleResult =
-                    reportMapper.getWorkInProgressCombination(selectProcesses, laminating, optionVal);
+                    reportMapper.getWorkInProgressCombination(selectProcesses, laminating, optionVal,terminationVal);
             if (singleResult != null && !singleResult.isEmpty()) {
                 resultList.addAll(singleResult);
             }
 
             Map<String, Object> total =
-                    reportMapper.getWorkInProgressCombinationFootSum(selectProcesses, laminating, optionVal);
+                    reportMapper.getWorkInProgressCombinationFootSum(selectProcesses, laminating, optionVal,terminationVal);
             if (total != null) {
                 BigDecimal stockNum = (BigDecimal) total.get("stockNum");
                 BigDecimal stockArea = (BigDecimal) total.get("stockArea");
@@ -1196,14 +1204,14 @@
                 laminating = reportingWorkMapper.getProcessLaminating(process);
 
                 List<Map<String, Object>> singleResult =
-                        reportMapper.getWorkInProgressCombination(process, laminating, optionVal);
+                        reportMapper.getWorkInProgressCombination(process, laminating, optionVal,terminationVal);
 
                 if (singleResult != null && !singleResult.isEmpty()) {
                     resultList.addAll(singleResult);
                 }
 
                 Map<String, Object> total =
-                        reportMapper.getWorkInProgressCombinationFootSum(process, laminating, optionVal);
+                        reportMapper.getWorkInProgressCombinationFootSum(process, laminating, optionVal,terminationVal);
                 if (total != null) {
                     BigDecimal stockNum = (BigDecimal) total.get("stockNum");
                     BigDecimal stockArea = (BigDecimal) total.get("stockArea");
@@ -1235,11 +1243,15 @@
         }
         String inputVal= (String) dates.get("inputVal");
         String project= (String) dates.get("project");
+        String terminationVals= (String) dates.get("terminationVals");
         if ("null".equals(inputVal)) {
             inputVal = "";
         }
         if ("null".equals(project)) {
             project = "";
+        }
+        if ("null".equals(terminationVals)) {
+            terminationVals = "";
         }
 
         String laminating = "";
@@ -1253,7 +1265,7 @@
         if (!"".equals(process)) {
             laminating = reportingWorkMapper.getProcessLaminating(process);
             List<WorkInProgressCombinationDTO> singleResult =
-                    reportMapper.exportWorkInProgressCombination(process, laminating, inputVal);
+                    reportMapper.exportWorkInProgressCombination(process, laminating, inputVal,terminationVals);
             if (singleResult != null && !singleResult.isEmpty()) {
                 resultList.addAll((Collection<? extends WorkInProgressCombinationDTO>) singleResult);
             }
@@ -1264,7 +1276,7 @@
                 laminating = reportingWorkMapper.getProcessLaminating(processVal);
 
                 List<WorkInProgressCombinationDTO> singleResult =
-                        reportMapper.exportWorkInProgressCombination(processVal, laminating, inputVal);
+                        reportMapper.exportWorkInProgressCombination(processVal, laminating, inputVal,terminationVals);
 
                 if (singleResult != null && !singleResult.isEmpty()) {
                     resultList.addAll((Collection<? extends WorkInProgressCombinationDTO>) singleResult);
diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index 96e5a07..6f57226 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -3880,6 +3880,6 @@
     </update>
 
     <update id="updateTerminationNoMp">
-        update pp.flow_card set termination_status=0 where process_id = #{processId} and order_number = #{orderNumber}
+        update pp.flow_card set termination_status=0 , termination_quantity=0 where process_id = #{processId} and order_number = #{orderNumber}
     </update>
 </mapper>
\ No newline at end of file
diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index a439b52..0964cfe 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -1516,7 +1516,9 @@
           and position(#{process} in odpd.process)
           and position(ifnull(#{inputVal}, '') in od.order_id)
           and position(ifnull(#{project}, '') in o.project)
-
+        <if test="terminationVals != '1' and terminationVals != 1">
+            and fc.termination_status !=1
+        </if>
         group by fc.process_id, fc.order_number, fc.technology_number,odpd.process
         order by fc.process_id, fc.order_number, fc.technology_number
     </select>
@@ -2379,6 +2381,9 @@
         and position(#{selectProcesses} in d.process)
         and position(#{orderId} in od.order_id)
         and position(#{inputProject} in o.project)
+        <if test="terminationVals != '1' and terminationVals != 1">
+            and fc.termination_status !=1
+        </if>
         <if test="workInProgressDTO.customerName != null and workInProgressDTO.customerName != ''">
             and o.customer_name regexp #{workInProgressDTO.customerName}
         </if>
@@ -2702,6 +2707,9 @@
         and d.process!=SUBSTRING_INDEX(ogd.process, '->', 1)
         and position(#{orderId} in od.order_id)
         and position(#{inputProject} in o.project)
+        <if test="terminationVals != '1' and terminationVals != 1">
+            and fc.termination_status !=1
+        </if>
         <if test="workInProgressDTO.thisProcess != null and workInProgressDTO.thisProcess != ''">
             and d.process regexp #{workInProgressDTO.thisProcess}
         </if>
@@ -3157,8 +3165,13 @@
                                         ) AS cb ON cb.process_id = b.process_id
                                         AND cb.order_sort = b.order_number
                                         AND cb.technology_number = b.technology_number
+                             left join pp.flow_card as fc on fc.order_id= d.order_id and fc.order_number = d.order_number
+                                       and fc.technology_number = d.technology_number
                              where a.processing_card>0
                                and a.warehousing!=2
+                          <if test=" terminationVal != '1' and terminationVal != 1">
+                               and termination_status !=1
+                            </if>
                              GROUP BY  b.process_id, b.order_number,
                                  b.technology_number) as f
                                 LEFT JOIN sd.order_process_detail as e
@@ -3247,8 +3260,13 @@
         ) AS cb ON cb.process_id = b.process_id
         AND cb.order_sort = b.order_number
         AND cb.technology_number = b.technology_number
+        left join pp.flow_card as fc on fc.order_id= d.order_id and fc.order_number = d.order_number
+        and fc.technology_number = d.technology_number
         where a.processing_card>0
         and a.warehousing!=2
+        <if test="terminationVal != '1' and terminationVal != 1">
+            and termination_status !=1
+        </if>
         GROUP BY  b.process_id, b.order_number,
         b.technology_number) as f
         LEFT JOIN sd.order_process_detail as e
@@ -3333,8 +3351,13 @@
         ) AS cb ON cb.process_id = b.process_id
         AND cb.order_sort = b.order_number
         AND cb.technology_number = b.technology_number
+        left join pp.flow_card as fc on fc.order_id= d.order_id and fc.order_number = d.order_number
+        and fc.technology_number = d.technology_number
         where a.processing_card>0
         and a.warehousing!=2
+        <if test="terminationVal != '1' and terminationVal != 1">
+            and termination_status !=1
+        </if>
         and (c.quantity-b.reporting_work_num_count)>0
         GROUP BY  b.process_id, b.order_number,
         b.technology_number) as f

--
Gitblit v1.8.0