From df6bb7f982ca8a4ba57a87ef85aad58bfc4dd524 Mon Sep 17 00:00:00 2001 From: wenwj <‘1106994300@qq.com> Date: 星期三, 09 四月 2025 17:37:30 +0800 Subject: [PATCH] 焊缝统计相关 --- aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamServiceImpl.java | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamServiceImpl.java index 74cf169..9299fc9 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamServiceImpl.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamServiceImpl.java @@ -2,6 +2,7 @@ import java.util.List; +import com.aps.common.core.utils.StringUtils; import com.aps.common.core.utils.uuid.IdUtils; import com.aps.core.domain.ApsPartPlan; import com.aps.core.domain.ApsPartPlanTemp; @@ -13,6 +14,7 @@ import com.aps.core.mapper.ApsWeldSeamMapper; import com.aps.core.domain.ApsWeldSeam; import com.aps.core.service.IApsWeldSeamService; +import org.springframework.transaction.annotation.Transactional; /** * 鐒婄紳Service涓氬姟灞傚鐞� @@ -112,9 +114,17 @@ ids[i]=apsWeldSeamTemps.get(i).getId(); ApsWeldSeam apsWeldSeam=new ApsWeldSeam(); BeanUtils.copyProperties(apsWeldSeamTemps.get(i), apsWeldSeam); - apsWeldSeam.setId(IdUtils.fastUUID()); - //鎻掑叆姝e紡琛紝骞惰褰� - apsWeldSeamMapper.insertApsWeldSeam(apsWeldSeam); + //閫氳繃宸ュ崟鍙锋煡璇㈡槸鍚﹀瓨鍦ㄦ暟鎹� + ApsWeldSeam apsWeldSeam1=apsWeldSeamMapper.selectApsWeldSeamByWorkOrderNo(apsWeldSeam.getWorkOrderNo()); + //褰撳伐鍗曞彿瀛樺湪鍒欐洿鏂版暟鎹惁鍒欐彃鍏ユ暟鎹� + if(StringUtils.isNotEmpty(apsWeldSeam1.getId())){ + apsWeldSeam.setId(apsWeldSeam1.getId()); + apsWeldSeamMapper.updateApsWeldSeam(apsWeldSeam); + }else { + //鎻掑叆姝e紡琛紝骞惰褰� + apsWeldSeam.setId(IdUtils.fastUUID()); + apsWeldSeamMapper.insertApsWeldSeam(apsWeldSeam); + } count++; } //鎻掑叆鏁伴噺涓庝复鏃惰〃鏌ヨ涓�鐩村垯鍒犻櫎涓存椂琛ㄦ暟鎹� -- Gitblit v1.9.3