diff --git a/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java b/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java index 8d94e8fe..bf7b76bc 100644 --- a/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java +++ b/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java @@ -934,13 +934,6 @@ public class PartInformationServiceImpl extends ServiceImpl modifyCommGroup3Response = inventoryServiceBean.modifyInventoryPartCommGroup3(srv, partIfsInventory); - if (!"200".equals(modifyCommGroup3Response.get("resultCode"))) { - throw new RuntimeException("ifs 库存件CommGroup3修改异常信息:" + modifyCommGroup3Response.get("resultMsg")); - } - } if (data.getCostsInfoFlag()) { PartIfsInventoryConfig partIfsInventoryConfig = getPartIfsInventoryConfig(data); // costs对象 // 同步Costs表数据 @@ -989,6 +982,14 @@ public class PartInformationServiceImpl extends ServiceImpl modifyCommGroup3Response = inventoryServiceBean.modifyInventoryPartCommGroup3(srv, partIfsInventory); + if (!"200".equals(modifyCommGroup3Response.get("resultCode"))) { + throw new RuntimeException("ifs 库存件CommGroup3修改异常信息:" + modifyCommGroup3Response.get("resultMsg")); + } + } } @Transactional diff --git a/src/main/java/com/spring/modules/quotation/mapper/QuotationInformationMapper.java b/src/main/java/com/spring/modules/quotation/mapper/QuotationInformationMapper.java index 1e36245e..eae4fa96 100644 --- a/src/main/java/com/spring/modules/quotation/mapper/QuotationInformationMapper.java +++ b/src/main/java/com/spring/modules/quotation/mapper/QuotationInformationMapper.java @@ -63,4 +63,6 @@ public interface QuotationInformationMapper extends BaseMapper quotationInfoSearchByAnyField(Page plmProjectInfoDataPage,@Param("query") Map params); List getQuotationInfoByPart(@Param("site") String site, @Param("buNo") String buNo, @Param("testPartNo") String testPartNo, @Param("finalPartNo") String finalPartNo); + + List queryQuoteByQuotationBatchNo2(@Param("site") String site, @Param("quotationBatchNo") String quotationNo); } \ No newline at end of file diff --git a/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java b/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java index 7fb918f4..59005b24 100644 --- a/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java +++ b/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java @@ -891,16 +891,23 @@ public class QuotationInformationServiceImpl extends ServiceImpl quoteList = baseMapper.queryQuoteByQuotationBatchNo(site,quotationBatchNo); - // 查询改询价批次号的询价条数 - int count = baseMapper.queryQuotationByQuotationBatchNo(site,quotationBatchNo); + // 不相等即条目不匹配,有询价单号未产生报价 + if (count != quoteList.size() && quotationAmount.compareTo(BigDecimal.ZERO) <= 0) { + throw new RuntimeException("必需存在已完成的报价记录或询价金额大于0,才能提交!"); + } + } else if (roleId.equals(15)) { + // 判断是的存在报价明细 通过询价批次号获得报价中询价单号分组条数 + List quoteList = baseMapper.queryQuoteByQuotationBatchNo2(site,quotationBatchNo); // 不相等即条目不匹配,有询价单号未产生报价 if (count != quoteList.size() && quotationAmount.compareTo(BigDecimal.ZERO) <= 0) { - throw new RuntimeException("必需存在已下达的报价记录或询价金额大于0,才能提交!"); + throw new RuntimeException("必需存在已完成/审批中的报价记录或询价金额大于0,才能提交!"); } } } diff --git a/src/main/resources/mapper/quotation/QuotationInformationMapper.xml b/src/main/resources/mapper/quotation/QuotationInformationMapper.xml index a3a3ada2..80059820 100644 --- a/src/main/resources/mapper/quotation/QuotationInformationMapper.xml +++ b/src/main/resources/mapper/quotation/QuotationInformationMapper.xml @@ -802,6 +802,14 @@ group by site, internal_inquiry_no + +