From ecfd47af61f29888d2b69fec73867bd475f376b6 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期一, 14 四月 2025 08:09:38 +0800
Subject: [PATCH] 提交部分手机app后端程序
---
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java | 23 +++++++++++++++++++++++
north-glass-erp/northglass-erp/src/components/sd/order/OrderSizeCheck.vue | 3 +--
north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml | 19 +++++++++++++++++++
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java | 6 ++++++
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderProcessDetailMapper.java | 3 +++
5 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/sd/order/OrderSizeCheck.vue b/north-glass-erp/northglass-erp/src/components/sd/order/OrderSizeCheck.vue
index bdfc1b2..477a3b6 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/order/OrderSizeCheck.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/order/OrderSizeCheck.vue
@@ -73,7 +73,7 @@
if ($grid) {
switch (code) {
case 'review' :{
-
+ $grid.clearEdit()
const $table = xGrid.value.getTableData().fullData
const $oldTable = props.OrderDetail
$table.forEach((item,index)=>{
@@ -85,7 +85,6 @@
}
}
}
-
})
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
index d27b7fe..ea96099 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
@@ -163,4 +163,10 @@
return Result.seccess(reportingWorkService.reportingWorkTransferSv(reportingWork));
}
+ @ApiOperation("鎵嬫満鏌ヨ褰撶彮浜ч噺")
+ @PostMapping ("/selectShiftQuantity")
+ public Result selectShiftQuantity(@RequestBody Map<String,Object> reportingWork) {
+ return Result.seccess(reportingWorkService.selectShiftQuantitySv(reportingWork));
+ }
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderProcessDetailMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderProcessDetailMapper.java
index 4e42af8..dc24e8a 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderProcessDetailMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderProcessDetailMapper.java
@@ -8,6 +8,7 @@
import org.apache.ibatis.annotations.Param;
import java.sql.Date;
+import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@@ -31,4 +32,6 @@
List<Map<String, Integer>> getGlassLRowCollect(Date selectTime1, Date selectTime2);
String selectNextProcess(String processId, String technologyNumber, String thisProcess);
+
+ List<Map<String, String>> selectShiftQuantitySv(String creatorId, String startDate,String endDate);
}
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 1eb8bb5..b31d8ae 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
@@ -41,6 +41,8 @@
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
import java.util.*;
@Service
@@ -1137,4 +1139,25 @@
return result;
}
+
+ public Map<String, Object> selectShiftQuantitySv(Map<String, Object> reportingWork) {
+ String creatorId = (String) reportingWork.get("userId");
+ List<LocalDateTime> dateList = (List<LocalDateTime>) reportingWork.get("searchDate");
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+ String startDate = LocalDateTime.now().with(LocalTime.MIN).format(formatter);
+ String endDate = LocalDateTime.now().format(formatter);
+ if (dateList.get(0)!=null){
+ startDate = String.valueOf(dateList.get(0));
+ }
+ if (dateList.get(1)!=null){
+ endDate = String.valueOf(dateList.get(1));
+ }
+ List<String> date = new ArrayList<>();
+ date.add(startDate);
+ date.add(endDate);
+ Map<String, Object> result = new HashMap<>();
+ result.put("data",orderProcessDetailMapper.selectShiftQuantitySv(creatorId, startDate, endDate));
+ result.put("date",date);
+ return result;
+ }
}
diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml
index 9a5ca38..30f80d8 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml
@@ -164,4 +164,23 @@
and a.technology_number=#{technologyNumber}
</select>
+
+ <select id="selectShiftQuantitySv">
+ select CAST(concat(b.order_id,'/',a.order_number,'/',a.technology_number) as char ) as 'order_id',
+ c.child_width,
+ c.child_height,
+ a.completed_quantity,
+ a.breakage_quantity
+ from pp.reporting_work as b
+ left join pp.reporting_work_detail as a
+ on a.reporting_work_id = b.reporting_work_id
+ left join sd.order_glass_detail as c
+ on b.order_id = c.order_id
+ and c.order_number = a.order_number
+ and c.technology_number = a.technology_number
+ where b.reviewed_state >=0
+ and b.creator_id = #{creatorId}
+ and UNIX_TIMESTAMP(b.reporting_work_time) BETWEEN UNIX_TIMESTAMP(#{startDate}) and UNIX_TIMESTAMP(#{endDate})
+ order by b.id desc
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0