From d5055b7870d0406f9b00d429cb47d2bfb79b902c Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 10 十二月 2025 11:37:09 +0800
Subject: [PATCH] 补片流程卡添加打印次数
---
north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml | 4 ++++
north-glass-erp/northglass-erp/src/views/pp/replenish/PrintReplenishFlowCard.vue | 14 +++++++++-----
north-glass-erp/src/main/java/com/example/erp/mapper/pp/PatchLogMapper.java | 3 +++
north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java | 13 +++++++++++++
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java | 9 +++++++++
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 5 +++--
6 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/replenish/PrintReplenishFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/replenish/PrintReplenishFlowCard.vue
index 6c23854..f324be1 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/replenish/PrintReplenishFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/replenish/PrintReplenishFlowCard.vue
@@ -367,6 +367,11 @@
{field: 'glass_child', title: t('reportingWorks.glassChild'),width:110,filters: [{data: ''}],slots: {filter: 'num1_filter'}, filterMethod: filterChanged},
{field: 'reporting_work_id', title: t('reportingWorks.reportingWorkId'),width:120,filters: [{data: ''}],slots: {filter: 'num1_filter'}, filterMethod: filterChanged},
{field: 'create_time', title: t('basicData.reportData'),width:120},
+ {
+ field: 'print_num',
+ title: t('processCard.printStatus'),
+ width: 120
+ },
],//琛ㄥご鎸夐挳
toolbarConfig: {
@@ -712,10 +717,9 @@
// 鐩戝惉鎵撳嵃瀹屾垚浜嬩欢
const printNumber = () =>{
-
- selectRecordsData.value.printList=selectRecords
- let printState=0
- request.post(`/processCard/updatePrintState/${printState}`, selectRecordsData.value).then((res) => {
+ const $grid = xGrid.value
+ selectRecords = $grid.getCheckboxRecords()
+ request.post(`/Replenish/updatePrintNum`, selectRecords).then((res) => {
if (res.code == 200 && res.data === true) {
} else {
@@ -848,7 +852,7 @@
destroy-on-close
style="width: 75%;height:75% ">
<template #header="{ close, titleId, titleClass }">
- <el-button v-print="printContent" :icon="Printer" circle />
+ <el-button v-print="printContent" :icon="Printer" circle @click="printNumber"/>
</template>
<print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal" :printLike="printRow.like"
:mergeTechnologyNumber="printRow.mergeTechnologyNumber"
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java
index a9a1d17..c559028 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java
@@ -108,4 +108,13 @@
//鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
DownExcel.download(response, exportReplenishDTO.class, replenishService.exportReplenishSv(dates), "PatchLogAddDTO");
}
+
+ @ApiOperation("淇敼鎵撳嵃娆℃暟")
+ @PostMapping("/updatePrintNum")
+ public Result updatePrintNum(
+ @RequestBody List<Map<String, Object>> object
+ ) {
+
+ return Result.success(replenishService.updatePrintNumSv(object));
+ }
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/PatchLogMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/PatchLogMapper.java
index 8eb6174..95666d2 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/PatchLogMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/PatchLogMapper.java
@@ -7,6 +7,7 @@
import com.example.erp.entity.pp.PatchLog;
import com.example.erp.entity.pp.ReportingWork;
import com.github.yulichang.base.MPJBaseMapper;
+import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -55,5 +56,7 @@
Integer selectProjectCount(String processId, String patchId, Integer technologyNumber);
List<exportReplenishDTO> exportReplenishMp(List<LocalDate> dates);
+
+ Boolean updatePrintNumMp(Integer id);
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java
index 9025211..602db86 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java
@@ -432,5 +432,18 @@
public List<exportReplenishDTO> exportReplenishSv(List<LocalDate> dates) {
return patchMapper.exportReplenishMp(dates);
}
+
+ public Boolean updatePrintNumSv(List<Map<String, Object>> list) {
+ if (!list.isEmpty()){
+ for (Map<String, Object> item : list) {
+ Integer id = (Integer) item.get("id");
+ patchMapper.updatePrintNumMp(id);
+ }
+ return true;
+ }else {
+ return false;
+ }
+
+ }
}
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 cdef190..de8a8cd 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -1284,7 +1284,7 @@
</select>
<select id="selectReplenishPrintMp">
- select fc.id,
+ select pl.id,
fc.order_id,
fc.process_id,
o.customer_name,
@@ -1309,7 +1309,8 @@
pl.reporting_work_id,
JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber,
pl.patch_id,
- date(pl.create_time) as create_time
+ date(pl.create_time) as create_time,
+ pl.print_num
from flow_card as fc
left join sd.order_glass_detail as ogd
diff --git a/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml b/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
index b554941..77c5044 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
@@ -474,4 +474,8 @@
</where>
order by r.review_status,r.id desc
</select>
+
+ <update id="updatePrintNumMp">
+ update pp.patch_log set print_num=IFNULL(print_num,0)+1 where id=#{id}
+ </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0