From 8916b4d19f885eabfd96488cf6978f144fae87c2 Mon Sep 17 00:00:00 2001
From: hongchao <3228015117@qq.com>
Date: Tue, 30 Sep 2025 18:54:18 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=80=E6=96=99=EF=BC=8C=E6=96=B0=E8=B4=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../back/mapper/BackApplyInfoMapper.java | 2 ++
.../impl/BackApplyInfoServiceImpl.java | 25 +++++++++++++++++++
.../purchase/domain/PurchaseCheckDetails.java | 3 +++
.../material/back/BackApplyInfoMapper.xml | 14 +++++++++++
.../purchase/PurchaseCheckDetailsMapper.xml | 8 ++++--
5 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java
index 12b6a5d7..bb937c27 100644
--- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java
+++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java
@@ -515,4 +515,6 @@ public interface BackApplyInfoMapper {
int syncProjectDetails(BackApplyInfo backApplyInfo2);
BackApplyDetails selectCheckREDetails(BackApplyDetails details);
+
+ BackApplyDetails selectIsFinishByMaId(Long maId);
}
diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java
index a23fe89d..aa2573f1 100644
--- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java
+++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java
@@ -688,6 +688,17 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
if (dto == null || dto.getBackApplyInfo() == null || CollectionUtils.isEmpty(dto.getBackApplyDetailsList())) {
return AjaxResult.error("参数为空,请重新选择后上传!");
}
+ //判断编码设备是否已经被新增(未提交)
+ for (BackApplyDetails backApplyDetails : dto.getBackApplyDetailsList()) {
+ if (backApplyDetails.getMaId() != null) {
+ //去check_details表中查该maId的is_finish是否存在0
+ BackApplyDetails backApplyDetails1 = backApplyInfoMapper.selectIsFinishByMaId(backApplyDetails.getMaId());
+ if (backApplyDetails1 != null) {
+ return AjaxResult.error("设备编码" + backApplyDetails.getMaCode() + "已存在未完成退料任务,请勿重复提交!");
+ }
+ }
+ }
+
//对传入的手机号进行校验
if (StringUtils.isNotBlank(dto.getBackApplyInfo().getPhone()) && !PhoneUtil.isMobile(dto.getBackApplyInfo().getPhone())) {
return AjaxResult.error("手机号格式不正确,请重新填写!");
@@ -1305,6 +1316,20 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
}
} else if (dto != null && dto.getBackApplyInfo() != null && dto.getBackApplyInfo().getId() != null
&& ((dto.getBackApplyDetails() != null) || CollectionUtils.isNotEmpty(dto.getBackApplyDetailsList()))) {
+
+ if (dto.getBackApplyDetails() != null){
+ //判断编码设备是否已经被新增(未提交)
+ for (MaCodeDto maVo : dto.getBackApplyDetails().getMaVos()) {
+ if (maVo.getMaId() != null) {
+ //去check_details表中查该maId的is_finish是否存在0
+ BackApplyDetails backApplyDetails1 = backApplyInfoMapper.selectIsFinishByMaId(maVo.getMaId());
+ if (backApplyDetails1 != null) {
+ return AjaxResult.error("设备编码" + maVo.getMaCode() + "已存在未完成退料任务,请勿重复提交!");
+ }
+ }
+ }
+ }
+
if (dto.getBackApplyDetails() != null) {
//编码退料入库
dto.getBackApplyInfo().setTypeId(String.valueOf(dto.getBackApplyDetails().getTypeId()));
diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckDetails.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckDetails.java
index 627f5d7d..96cf42dd 100644
--- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckDetails.java
+++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckDetails.java
@@ -69,6 +69,9 @@ public class PurchaseCheckDetails extends BaseEntity {
@ApiModelProperty(value = "物资名称--规格parent类型")
private String maTypeName;
+ @ApiModelProperty(value = "物资类型")
+ private String maTypeModel;
+
/** 采购单价(不含税) */
@Excel(name = "购置单价(不含税)", sort = 6)
@ApiModelProperty(value = "采购单价(不含税)")
diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml
index a056d513..40ed1d85 100644
--- a/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml
+++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml
@@ -1605,4 +1605,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckDetailsMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckDetailsMapper.xml
index d76b756e..b16707c9 100644
--- a/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckDetailsMapper.xml
+++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckDetailsMapper.xml
@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -48,11 +50,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select pcd.id, pcd.task_id, pcd.type_id, pcd.purchase_price, pcd.purchase_tax_price, pcd.purchase_num, pcd.check_num, pcd.bind_num, pcd.check_result,
pcd.supplier_id, pcd.status, pcd.create_by, pcd.production_time, pcd.create_time, pcd.update_by, pcd.update_time,
pcd.remark, pcd.check_url_name, pcd.check_url, pcd.input_num, pcd.input_status, pcd.input_time, pcd.file_name,
- pcd.file_url, pcd.company_id, pcd.fix_code, mt.type_name, mt.unit_name, mt.unit_value,mtp.type_name as ma_type_name, mt.manage_type as manage_type,
- pcd.warn_documents as warnDocuments, pcd.reason as reason, mt.rent_price as rentPrice, su.sign_url as signUrl, su.sign_type as signType
+ pcd.file_url, pcd.company_id, pcd.fix_code, mt.type_name, mt.unit_name, mt.unit_value,mtp.type_name as ma_type_name,mtp2.type_name as ma_type_model, mt.manage_type as manage_type,
+ pcd.warn_documents as warnDocuments, pcd.reason as reason, mt.rent_price as rentPrice, su.sign_url as signUrl, su.sign_type as signType,msi.supplier as supplier_name
from purchase_check_details pcd
+ left join ma_supplier_info msi on msi.supplier_id = pcd.supplier_id
left join ma_type mt on pcd.type_id = mt.type_id
left join ma_type mtp on mt.parent_id = mtp.type_id
+ left join ma_type mtp2 on mtp.parent_id = mtp2.type_id
left join sys_user su on pcd.check_user = su.user_id