From e14730d85fa4c784e7f3555d35a1c8b057b1d383 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期一, 09 十二月 2024 17:57:08 +0800
Subject: [PATCH] 1、fixbug:钢化小片表状态更新 2、中空校验 3、磨边发送宽高改为磨边前
---
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
index 0923dd2..1f43e77 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
@@ -1,5 +1,6 @@
package com.mes.uppattenusage.service.impl;
+import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -99,8 +100,15 @@
@Override
public void saveUpPattenUsage(List<UpPattenUsage> upPattenUsage) {
- this.saveBatch(upPattenUsage);
- //淇濆瓨鍘熺墖浣跨敤璇︽儏琛�
+ if (CollectionUtil.isEmpty(upPattenUsage)){
+ return;
+ }
+ String engineerId = upPattenUsage.get(0).getEngineeringId();
+ int count = this.count(new LambdaQueryWrapper<UpPattenUsage>().eq(UpPattenUsage::getEngineeringId, engineerId));
+ if (count <=0){
+ //淇濆瓨鍘熺墖浣跨敤璇︽儏琛�
+ this.saveBatch(upPattenUsage);
+ }
}
@Override
--
Gitblit v1.8.0