Merge pull request 'demand: 组批次规则新增/导入/修改/批量修改校验时间是否交叉。 批量修改报价验重去除自身' (#93) from develop into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/93
This commit is contained in:
heyu 2025-07-04 18:10:22 +08:00
commit 1ffcef43a8
3 changed files with 7 additions and 6 deletions

View File

@ -208,6 +208,8 @@ public class EmisQuotePriceServiceImpl implements IEmisQuotePriceService
// 检查是否重复
List<EmisQuotePrice> listOld = emisQuotePriceMapper.checkUnique(emisQuotePrice);
// 排除自身
listOld.removeIf(i -> i.getQuoteId().equals(emisQuotePrice.getQuoteId()));
if (!CollectionUtil.isEmpty(listOld)) {
String estNameStr = "";
for (EmisQuotePrice item : listOld) {

View File

@ -284,11 +284,9 @@ public class EmisTransPlanRuleServiceImpl extends EmisBaseService implements IEm
for (EmisTransPlanRule existingRule : allRules) {
// 检查产品类型是否有交集
boolean productTypeOverlap = hasOverlap(newProductType, existingRule.getProductType());
// 检查供应商编码是否有交集
boolean supplierCodeOverlap = hasOverlap(newSupplierCode, existingRule.getSupplierCode());
// 如果产品类型和供应商编码都有交集,则认为重复
if (productTypeOverlap && supplierCodeOverlap) {
// 如果产品类型有交集且供应商编码相同,则认为重复
if (productTypeOverlap && compareSupplierCodes(newSupplierCode, existingRule.getSupplierCode())) {
return Arrays.asList(existingRule);
}
}

View File

@ -172,8 +172,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lineCode != null and lineCode != ''">and r.line_code = #{lineCode}</if>
<if test="startSiteCode != null and startSiteCode != ''">and r.start_site_code = #{startSiteCode}</if>
<if test="nextSiteCode != null and nextSiteCode != ''">and r.next_site_code = #{nextSiteCode}</if>
<if test="startDate != null">and r.start_date = #{startDate}</if>
<if test="endDate != null">and r.end_date = #{endDate}</if>
<if test="startDate != null and endDate != null">
and r.start_date &lt;= #{endDate} and r.end_date &gt;= #{startDate}
</if>
</where>
order by id desc
</select>