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:
commit
1ffcef43a8
@ -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) {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 <= #{endDate} and r.end_date >= #{startDate}
|
||||
</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user