Merge pull request 'demand: 大客户单独报价修改bug修改' (#100) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/100
This commit is contained in:
commit
792e71302b
@ -1,6 +1,7 @@
|
||||
package com.xdadan.erp.emis.service.impl;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Future;
|
||||
@ -198,6 +199,32 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
|
||||
// 关闭线程池
|
||||
executorService.shutdown();
|
||||
|
||||
// 构建运单号到EmisWaybill的映射
|
||||
Map<String, EmisWaybill> waybillMap = allWaybills.stream()
|
||||
.collect(Collectors.toMap(EmisWaybill::getBillCode, Function.identity(), (a, b) -> a));
|
||||
|
||||
allWaybills = allWaybills.stream()
|
||||
.filter(wb -> {
|
||||
String virtualRemark = wb.getVirtualRemark();
|
||||
if (StringUtils.isBlank(virtualRemark)) {
|
||||
return true;
|
||||
}
|
||||
// 解析virtualRemark中的运单号
|
||||
String[] relatedNos = virtualRemark.split(",");
|
||||
for (String no : relatedNos) {
|
||||
EmisWaybill related = waybillMap.get(no.trim());
|
||||
if (related != null && Objects.equals(related.getProblemType(), 173)) {
|
||||
return false; // 只要有一个关联运单problemType=173,则过滤掉
|
||||
}
|
||||
}
|
||||
return true;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
allWaybills = allWaybills.stream()
|
||||
.filter(wb -> !Objects.equals(wb.getProblemType(), 170))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 按1000条数据分组处理
|
||||
List<List<EmisWaybill>> batches = new ArrayList<>();
|
||||
for (int i = 0; i < allWaybills.size(); i += pageSize) {
|
||||
|
||||
@ -168,6 +168,7 @@
|
||||
<select id="checkUnique" parameterType="EmisQuotePrice" resultMap="EmisQuotePriceResult">
|
||||
<include refid="selectEmisQuotePriceVo"/>
|
||||
where del_flag='0'
|
||||
and status='1'
|
||||
and quote_type = #{quoteType}
|
||||
|
||||
<if test="quoteId != null "> and quote_id != #{quoteId}</if>
|
||||
|
||||
@ -3812,7 +3812,7 @@
|
||||
</insert>
|
||||
|
||||
<select id="selectWaybillListBySiteBatchStatus" resultMap="EmisWaybillResult">
|
||||
select a.id, a.bill_code,a.trans_line_type, a.product_type,a.start_site_code,a.send_site_code
|
||||
select a.id, a.bill_code,a.trans_line_type, a.product_type,a.start_site_code,a.send_site_code,a.problem_type
|
||||
from emis_waybill a
|
||||
left join emis_waybill_batch_status b on a.bill_code = b.bill_code
|
||||
where a.del_flag = '0'
|
||||
@ -3822,11 +3822,7 @@
|
||||
</if>
|
||||
and a.send_date <![CDATA[ > ]]> '2025-01-01 00:00:00'
|
||||
and a.send_date <![CDATA[ <= ]]> DATE_SUB(CURDATE(), INTERVAL 7 DAY)
|
||||
and (
|
||||
(a.receive_country = '0086' and a.problem_type not in (173,170,151))
|
||||
or
|
||||
(a.receive_country != '0086' and (a.virtual_remark is null or a.virtual_remark = '' or a.virtual_remark = ' ')and (a.problem_type is null or a.problem_type != 151))
|
||||
)
|
||||
and a.problem_type != 151
|
||||
and a.order_status not in ('0','2')
|
||||
order by a.create_time desc
|
||||
limit #{offset}, #{pageSize}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user