Browse Source

2026-06-15

询价新增特殊权限:
必需存在已完成/审批中的报价记录或询价金额大于0
master
fengyuan_yang 5 days ago
parent
commit
e70d28a399
  1. 15
      src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java
  2. 2
      src/main/java/com/spring/modules/quotation/mapper/QuotationInformationMapper.java
  3. 13
      src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java
  4. 8
      src/main/resources/mapper/quotation/QuotationInformationMapper.xml

15
src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

@ -934,13 +934,6 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
throw new RuntimeException("ifs 库存件修改异常信息:" + updateInventoryPartResponse.get("resultMsg"));
}
}
if (data.getCommGroup3InfoFlag() != null && data.getCommGroup3InfoFlag()) {
PartIfsInventory partIfsInventory = getPartIfsInventory(data); // 主表对象
Map<String, String> 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<PartInformationMappe
log.info("ifsProperty 为空,跳过物料属性同步");
}
}
// 商品组3的编辑放到最后调用
if (data.getCommGroup3InfoFlag() != null && data.getCommGroup3InfoFlag()) {
PartIfsInventory partIfsInventory = getPartIfsInventory(data); // 主表对象
Map<String, String> modifyCommGroup3Response = inventoryServiceBean.modifyInventoryPartCommGroup3(srv, partIfsInventory);
if (!"200".equals(modifyCommGroup3Response.get("resultCode"))) {
throw new RuntimeException("ifs 库存件CommGroup3修改异常信息:" + modifyCommGroup3Response.get("resultMsg"));
}
}
}
@Transactional

2
src/main/java/com/spring/modules/quotation/mapper/QuotationInformationMapper.java

@ -63,4 +63,6 @@ public interface QuotationInformationMapper extends BaseMapper<QuotationInformat
IPage<QuotationInformationVo> quotationInfoSearchByAnyField(Page<PlmProjectInfoData> plmProjectInfoDataPage,@Param("query") Map<String, String> params);
List<QuotationInformationVo> getQuotationInfoByPart(@Param("site") String site, @Param("buNo") String buNo, @Param("testPartNo") String testPartNo, @Param("finalPartNo") String finalPartNo);
List<String> queryQuoteByQuotationBatchNo2(@Param("site") String site, @Param("quotationBatchNo") String quotationNo);
}

13
src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java

@ -891,16 +891,23 @@ public class QuotationInformationServiceImpl extends ServiceImpl<QuotationInform
}
private void checkProcessControl(Integer roleId, String site, String quotationBatchNo, BigDecimal quotationAmount) {
// 查询改询价批次号的询价条数
int count = baseMapper.queryQuotationByQuotationBatchNo(site,quotationBatchNo);
if (roleId.equals(3)){
// 判断是的存在报价明细 通过询价批次号获得报价中询价单号分组条数
List<String> 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<String> quoteList = baseMapper.queryQuoteByQuotationBatchNo2(site,quotationBatchNo);
// 不相等即条目不匹配有询价单号未产生报价
if (count != quoteList.size() && quotationAmount.compareTo(BigDecimal.ZERO) <= 0) {
throw new RuntimeException("必需存在已下达的报价记录或询价金额大于0,才能提交!");
throw new RuntimeException("必需存在已完成/审批中的报价记录或询价金额大于0,才能提交!");
}
}
}

8
src/main/resources/mapper/quotation/QuotationInformationMapper.xml

@ -802,6 +802,14 @@
group by site, internal_inquiry_no
</select>
<select id="queryQuoteByQuotationBatchNo2" resultType="java.lang.String">
select
internal_inquiry_no
from plm_quote_detail d
where site = #{site} and d.internal_inquiry_no like #{quotationBatchNo}+'%' and status in ('下达', '审批中')
group by site, internal_inquiry_no
</select>
<select id="queryQuotationByQuotationBatchNo" resultType="int">
select count(1) from plm_quotation_information where site = #{site} and quotation_batch_no = #{quotationBatchNo}
</select>

Loading…
Cancel
Save