Merge pull request 'demand: 扫描漏组批次过滤面单删除的,扫描一周以前的。漏组批次从表格复制查询优化' (#88) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/88
This commit is contained in:
commit
873677b59b
@ -10,7 +10,10 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||||||
import com.xdadan.erp.emis.domain.*;
|
import com.xdadan.erp.emis.domain.*;
|
||||||
import com.xdadan.erp.emis.mapper.*;
|
import com.xdadan.erp.emis.mapper.*;
|
||||||
import com.xdadan.erp.emis.service.EmisBaseService;
|
import com.xdadan.erp.emis.service.EmisBaseService;
|
||||||
|
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||||
|
import jodd.util.StringUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -67,7 +70,19 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
|
|||||||
@Override
|
@Override
|
||||||
public List<EmisTmsSiteBatchMiss> selectEmisTmsSiteBatchMissList(EmisTmsSiteBatchMiss emisTmsSiteBatchMiss) {
|
public List<EmisTmsSiteBatchMiss> selectEmisTmsSiteBatchMissList(EmisTmsSiteBatchMiss emisTmsSiteBatchMiss) {
|
||||||
log.info("Selecting TMS site batch miss list with params: {}", emisTmsSiteBatchMiss);
|
log.info("Selecting TMS site batch miss list with params: {}", emisTmsSiteBatchMiss);
|
||||||
return emisTmsSiteBatchMissMapper.selectEmisTmsSiteBatchMissList(emisTmsSiteBatchMiss);
|
List<EmisTmsSiteBatchMiss> list = null;
|
||||||
|
// 如果单号不为空,则去除其他参数
|
||||||
|
if(!StringUtils.isEmpty(emisTmsSiteBatchMiss.getBillCode())){
|
||||||
|
emisTmsSiteBatchMiss.setBillCode(WaybillHelper.formatQueryValue(emisTmsSiteBatchMiss.getBillCode()));
|
||||||
|
String[] billCodeSortList = emisTmsSiteBatchMiss.getBillCode().split(",");
|
||||||
|
if(billCodeSortList.length>1){
|
||||||
|
emisTmsSiteBatchMiss.getParams().put("billCodeSortList",Arrays.asList(billCodeSortList));
|
||||||
|
}
|
||||||
|
list = emisTmsSiteBatchMissMapper.selectEmisTmsSiteBatchMissList(emisTmsSiteBatchMiss);
|
||||||
|
}else{
|
||||||
|
list = emisTmsSiteBatchMissMapper.selectEmisTmsSiteBatchMissList(emisTmsSiteBatchMiss);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -164,8 +164,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
left join emis_country c2 on w.receive_country=c2.code and c2.del_flag=0
|
left join emis_country c2 on w.receive_country=c2.code and c2.del_flag=0
|
||||||
<where>
|
<where>
|
||||||
b.site_batch_status = '1'
|
b.site_batch_status = '1'
|
||||||
<if test="billCode != null and billCode != ''">
|
<if test="billCode != null and billCode != '' and ( params.billCodeSortList == null or (params.billCodeSortList != null and params.billCodeSortList.size() == 1 ) )">
|
||||||
AND w.bill_code REGEXP REPLACE(#{billCode}, '\n', '|')
|
and ( b.`bill_code`=#{billCode} or b.bill_code like concat('%',#{billCode}) )
|
||||||
|
</if>
|
||||||
|
<if test="params.billCodeSortList != null and params.billCodeSortList.size() > 1 ">
|
||||||
|
and b.bill_code in
|
||||||
|
<foreach collection="params.billCodeSortList" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="lineCode != null and lineCode != ''">
|
<if test="lineCode != null and lineCode != ''">
|
||||||
AND w.trans_line_type = #{lineCode}
|
AND w.trans_line_type = #{lineCode}
|
||||||
@ -225,8 +231,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="billCode != null and billCode != ''">
|
<if test="billCode != null and billCode != '' and ( params.billCodeSortList == null or (params.billCodeSortList != null and params.billCodeSortList.size() == 1 ) )">
|
||||||
AND m.bill_code REGEXP REPLACE(#{billCode}, '\n', '|')
|
and ( m.`bill_code`=#{billCode} or m.bill_code like concat('%',#{billCode}) )
|
||||||
|
</if>
|
||||||
|
<if test="params.billCodeSortList != null and params.billCodeSortList.size() > 1 ">
|
||||||
|
and m.bill_code in
|
||||||
|
<foreach collection="params.billCodeSortList" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="missReason != null and missReason != ''">
|
<if test="missReason != null and missReason != ''">
|
||||||
AND m.miss_reason like concat('%', #{missReason}, '%')
|
AND m.miss_reason like concat('%', #{missReason}, '%')
|
||||||
|
|||||||
@ -3808,14 +3808,15 @@
|
|||||||
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
|
||||||
from emis_waybill a
|
from emis_waybill a
|
||||||
left join emis_waybill_batch_status b on a.bill_code = b.bill_code
|
left join emis_waybill_batch_status b on a.bill_code = b.bill_code
|
||||||
where a.bl_sign = '1'
|
where a.del_flag = '0'
|
||||||
and a.del_flag = '0'
|
|
||||||
and (b.site_batch_status is null or b.site_batch_status != '1')
|
and (b.site_batch_status is null or b.site_batch_status != '1')
|
||||||
<if test="lineCode != null and lineCode != ''">
|
<if test="lineCode != null and lineCode != ''">
|
||||||
and a.trans_line_type = #{lineCode}
|
and a.trans_line_type = #{lineCode}
|
||||||
</if>
|
</if>
|
||||||
and a.send_date <![CDATA[ > ]]> '2025-01-01 00:00:00'
|
and a.send_date <![CDATA[ > ]]> '2025-01-01 00:00:00'
|
||||||
and (a.virtual_remark is null or virtual_remark = '')
|
and a.send_date <![CDATA[ <= ]]> DATE_SUB(CURDATE(), INTERVAL 7 DAY)
|
||||||
|
and (a.virtual_remark is null or virtual_remark = '' or virtual_remark = ' ')
|
||||||
|
and (a.problem_type is null or a.problem_type != 151)
|
||||||
order by a.create_time desc
|
order by a.create_time desc
|
||||||
limit #{offset}, #{pageSize}
|
limit #{offset}, #{pageSize}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user