This commit is contained in:
linfso 2024-09-30 16:01:33 +08:00
parent f2668259a3
commit 660cbcc000
3 changed files with 102 additions and 5 deletions

View File

@ -665,7 +665,9 @@ public class EmisWaybillController extends EmisBaseController
if( "1".equals(waybillStatType)){
// 获取未接单数据
list = emisWaybillService.selectWaitGotOrderList(emisWaybill);
}else{
}
else{
// 如果不带查询本人开单的数据
if(StringUtils.isEmpty(emisWaybill.getBillCode())){
try {
@ -675,8 +677,20 @@ public class EmisWaybillController extends EmisBaseController
}
}
// 设置通用权限查询参数
list = emisWaybillService.selectEmisWaybillList(emisWaybill);
// 查询已取消的订单
if( "2".equals(waybillStatType)){
emisWaybill.setOrderStatus("2");
list = emisWaybillService.selectEmisWaybillList(emisWaybill);
}
// 转单数据
// else if( "2".equals(waybillStatType)){
// emisWaybill.setOrderStatus("2");
// list = emisWaybillService.selectEmisWaybillList(emisWaybill);
// }
else{
list = emisWaybillService.selectEmisWaybillList(emisWaybill);
}
}
}
return getDataTable(list);

View File

@ -333,6 +333,7 @@ public class EmisBaseService {
int waitDoNum=0;
int hasDoNum=0;
int hasCancelNum=0;
int statType_1_num=0;
int statType_2_num=0;
@ -355,6 +356,17 @@ public class EmisBaseService {
//
// }
// }
List<Map> dbStatMapList = emisWaybillMapper.getWaybillStatMap(emisWaybill);
if(!CollectionUtils.isEmpty(dbStatMapList)){
Map item0=dbStatMapList.get(0);
waitDoNum=MapUtils.getIntValue(item0,"waitGotCount",0);
hasDoNum=MapUtils.getIntValue(item0,"hasDoCount",0);
hasCancelNum=MapUtils.getIntValue(item0,"hasCancelCount",0);
statType_1_num=waitDoNum;
statType_2_num=hasDoNum;
statType_3_num=hasCancelNum;
}
List<Map> statNumList = new ArrayList<>();
// statType 1

View File

@ -1645,7 +1645,7 @@
<if test="params.waybillStatType != null and params.waybillStatType == 1">
and a.waybill_status='0' and a.order_status='0'
and a.waybill_status='0' and a.order_status in('0','1')
</if>
<if test="params.problemQueryType != null and params.problemQueryType == 1 and params.problemQueryIds != null and params.problemQueryIds !=''">
@ -1881,7 +1881,7 @@
<!-- where take_piece_employee_code is not null-->
<select id="getWaybillStatMap" parameterType="EmisWaybill" resultType="Map">
<select id="getWaybillStatMap_old" parameterType="EmisWaybill" resultType="Map">
select a.waybill_status as waybillStatus,count(1) as cnt from emis_waybill a
<where>
a.del_flag='0'
@ -1932,6 +1932,77 @@
group by a.waybill_status
</select>
<select id="getWaybillStatMap" parameterType="EmisWaybill" resultType="Map">
select tba.waitGotCount,tbb.hasDoCount,tbc.hasCancelCount from (
select count(1) as waitGotCount
from emis_waybill a
where a.del_flag='0'
and a.order_type='0'
and a.waybill_status='0'
and a.order_status in('0','2')
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.send_site_code in (
SELECT t1.site_code FROM (
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
#{params.privSiteCode} ) pd
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
UNION
SELECT #{params.privSiteCode} FROM dual
)
and (
a.take_piece_employee_code=#{params.privEmpCode} or (a.take_piece_employee_code is null)
)
)
</if>
) tba,
(
select count(1) as hasDoCount
from emis_waybill a
where a.del_flag='0'
and a.waybill_status!='0'
and a.order_status!='0' and a.order_status!='3'
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.send_site_code in (
SELECT t1.site_code FROM (
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
#{params.privSiteCode} ) pd
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
UNION
SELECT #{params.privSiteCode} FROM dual
)
and (
a.take_piece_employee_code=#{params.privEmpCode} or (a.take_piece_employee_code is null)
)
)
</if>
) tbb,
(
select count(1) as hasCancelCount
from emis_waybill a
where a.del_flag='0'
and a.waybill_status!='0'
and a.order_status!='0' and a.order_status!='3'
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.send_site_code in (
SELECT t1.site_code FROM (
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
#{params.privSiteCode} ) pd
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
UNION
SELECT #{params.privSiteCode} FROM dual
)
and (
a.take_piece_employee_code=#{params.privEmpCode} or (a.take_piece_employee_code is null)
)
)
</if>
) tbc
</select>
<select id="selectEmisWaybillById" parameterType="Long" resultMap="EmisWaybillResult">
<include refid="selectEmisWaybillVo"/>
where a.id = #{id}