Browse Source

Merge branch 'dev' into pre-production

master
zhaoqiaobo 8 months ago
parent
commit
1df3c6c1cd
  1. 4
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceCategoryWarehouseEntity.java
  2. 4
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceWarehouseBasicVO.java
  3. 14
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  4. 368
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml

4
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceCategoryWarehouseEntity.java

@ -60,8 +60,10 @@ public class BasicdataPriceCategoryWarehouseEntity extends TenantEntity {
private Double withinThirtyPrice; private Double withinThirtyPrice;
@ApiModelProperty(value = "30-60天") @ApiModelProperty(value = "30-60天")
private Double betweenThirtySixtyPrice; private Double betweenThirtySixtyPrice;
@ApiModelProperty(value = "60天外") @ApiModelProperty(value = "60-90天外")
private Double beyondSixtyPrice; private Double beyondSixtyPrice;
@ApiModelProperty(value = "90天外")
private Double beyondNinetyPrice;
@ApiModelProperty(value = "上限价格") @ApiModelProperty(value = "上限价格")
private Double maximumPrice; private Double maximumPrice;
@ApiModelProperty(value = "操作/装卸费") @ApiModelProperty(value = "操作/装卸费")

4
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceWarehouseBasicVO.java

@ -38,8 +38,10 @@ public class PriceWarehouseBasicVO implements Serializable {
private Double withinThirtyPrice; private Double withinThirtyPrice;
@ApiModelProperty(value = "30-60天") @ApiModelProperty(value = "30-60天")
private Double betweenThirtySixtyPrice; private Double betweenThirtySixtyPrice;
@ApiModelProperty(value = "60天") @ApiModelProperty(value = "60-90天")
private Double beyondSixtyPrice; private Double beyondSixtyPrice;
@ApiModelProperty(value = "90天外")
private Double beyondNinetyPrice;
@ApiModelProperty(value = "上限价格") @ApiModelProperty(value = "上限价格")
private Double maximumPrice; private Double maximumPrice;

14
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -57,11 +57,12 @@
lawo.work_order_type, lawo.work_order_type,
lawo.discovery_node, lawo.discovery_node,
lawo.work_order_number, lawo.work_order_number,
lawo.waybill_number, laap.waybill_number,
lawo.order_code, lawo.order_code,
lawo.train_number, lawo.train_number,
lawo.FIRST, GROUP_CONCAT(laap.`first` separator ',') as `first`,
lawo.secondary, GROUP_CONCAT(laap.secondary separator ',') as secondary,
group_concat( DISTINCT laap.brand_name SEPARATOR ',' ) AS brandName,
lawo.vehicle_route, lawo.vehicle_route,
lawo.deliver_goods_time, lawo.deliver_goods_time,
lawo.discovery_time, lawo.discovery_time,
@ -84,7 +85,6 @@
lawo.process_number, lawo.process_number,
lawo.customer_service_name customerServiceName, lawo.customer_service_name customerServiceName,
lawo.warehouse_id warehouseId, lawo.warehouse_id warehouseId,
lawo.brand_name brandName,
lawo.customer_service_id customerServiceId lawo.customer_service_id customerServiceId
FROM FROM
logpm_aftersales_work_order lawo logpm_aftersales_work_order lawo
@ -93,6 +93,7 @@
AND lap.conditions IN ( 1, 2 ) AND lap.conditions IN ( 1, 2 )
LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id
AND lacr.is_deleted = '0' AND lacr.is_deleted = '0'
left join logpm_aftersales_abnormal_package laap on lawo.id = laap.work_order_id
<where> <where>
lawo.is_deleted = 0 lawo.is_deleted = 0
<if test="param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' ">and lawo.work_order_status = #{param.workOrderStatusNameS } </if> <if test="param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' ">and lawo.work_order_status = #{param.workOrderStatusNameS } </if>
@ -156,9 +157,10 @@
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if> <if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.handleStatus != 40 "> and lawo.work_order_status in ( #{param.workOrderStatus }) </if> <if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.handleStatus != 40 "> and lawo.work_order_status in ( #{param.workOrderStatus }) </if>
<if test="param.customerServiceState!= null and param.customerServiceState == 80 ">and lawo.work_order_status in ('10') </if> <if test="param.customerServiceState!= null and param.customerServiceState == 80 ">and lawo.work_order_status in ('10') </if>
ORDER BY lawo.create_time DESC
</where>
</where>
group by lawo.id
ORDER BY lawo.create_time DESC
</select> </select>
<update id="updateList"> <update id="updateList">
<foreach collection="list" separator=";" close="" index="index" item="item" open=""> <foreach collection="list" separator=";" close="" index="index" item="item" open="">

368
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml

@ -27,198 +27,194 @@
ss_num, ss_num,
unloading_team_name unloading_team_name
from (select from (select
d.train_number train_number, d.train_number train_number,
d.task_time task_time, d.task_time task_time,
d.warehouse_name warehouse_name, d.warehouse_name warehouse_name,
CASE CASE
WHEN d.type = 1 THEN WHEN d.type = 1 THEN
'商配' '商配'
WHEN d.type = 2 THEN WHEN d.type = 2 THEN
'市配' '市配'
ELSE '' ELSE ''
END type, END type,
CASE CASE
WHEN d.kind = 1 THEN WHEN d.kind = 1 THEN
'自主配送' '自主配送'
WHEN d.kind = 2 THEN WHEN d.kind = 2 THEN
'自主配送' '自主配送'
ELSE '' ELSE ''
END kind, END kind,
d.vehicle_name vehicle_name, d.vehicle_name vehicle_name,
d.driver_name driver_name, d.driver_name driver_name,
d.distribution_company distribution_company, d.distribution_company distribution_company,
CASE CASE
WHEN d.delivery_status = 1 THEN WHEN d.delivery_status = 1 THEN
'待配送' '待配送'
WHEN d.delivery_status = 2 THEN WHEN d.delivery_status = 2 THEN
'配送中' '配送中'
WHEN d.delivery_status = 3 THEN WHEN d.delivery_status = 3 THEN
'已完成' '已完成'
ELSE '' ELSE ''
END delivery_status, END delivery_status,
d.customers_number customers_number, d.customers_number customers_number,
d.price, d.price,
d.order_number order_number, d.order_number order_number,
rn.num reservation_num, rn.num reservation_num,
rn.stnum reservation_stock_listNum, rn.stnum reservation_stock_listNum,
IFNULL(loadScan.loadedNum, 0) loaded_num, IFNULL(loadScan.loadedNum, 0) loaded_num,
IFNULL(loadscaninvn.loadedNum, 0) invn_loaded_num, IFNULL(loadscaninvn.loadedNum, 0) invn_loaded_num,
IFNULL(loadScan.exLoadedNum, 0) ex_loaded_num, IFNULL(loadScan.exLoadedNum, 0) ex_loaded_num,
IFNULL(loadScan.reNum, 0) re_num, IFNULL(loadScan.reNum, 0) re_num,
IFNULL(loadscaninvn.reNum, 0) invn_re_num, IFNULL(loadscaninvn.reNum, 0) invn_re_num,
IFNULL(loadScan.exReNum, 0) ex_reNum, IFNULL(loadScan.exReNum, 0) ex_reNum,
ifnull(rn.dsNum, 0) ds_num, ifnull(rn.dsNum, 0) ds_num,
ifnull(rn.ssNum, 0) ss_num, ifnull(rn.ssNum, 0) ss_num,
ifnull(d.unloading_team_name, '') unloading_team_name ifnull(d.unloading_team_name, '') unloading_team_name
from from logpm_distribution_delivery_list d
logpm_distribution_delivery_list d LEFT JOIN (SELECT lds.delivery_id,
LEFT JOIN ( COALESCE(sum(ldr1.reservation_num), 0) num,
SELECT lds.delivery_id, COALESCE(sum(ldr1.reservation_stock_list_num), 0) stnum,
COALESCE(sum(ldr1.reservation_num), 0) num, SUM(CASE
COALESCE(sum(ldr1.reservation_stock_list_num), 0) stnum, WHEN lds.driver_signing = 2 THEN
SUM(CASE 1
WHEN lds.driver_signing = 2 THEN ELSE
1 0
ELSE END) dsNum,
0 SUM(CASE
END) dsNum, WHEN lds.signing_status = 2 THEN
SUM(CASE 1
WHEN lds.signing_status = 2 THEN ELSE
1 0
ELSE END) ssNum
0 FROM logpm_distribution_signfor lds
END) ssNum left JOIN logpm_distribution_reservation ldr1 ON lds.reservation_id = ldr1.id
FROM logpm_distribution_signfor lds WHERE ldr1.reservation_status <![CDATA[<]]> '40'
JOIN logpm_distribution_reservation ldr1 ON lds.reservation_id = ldr1.id GROUP BY lds.delivery_id
WHERE ldr1.reservation_status != '40' order by null) rn ON rn.delivery_id = d.id
GROUP BY lds.delivery_id order by null left join (select t.delivery_id,
) rn ON rn.delivery_id = d.id SUM(t.loaded_nub) loadedNum,
left join (select t.delivery_id, sum(t.received_quantity) reNum,
SUM(t.loaded_nub) loadedNum, sum(if(t.is_abnormal_loading = 1, 0, 1)) exLoadedNum,
sum(t.received_quantity) reNum, sum(if(t.is_abnormal_signing = 1, 0, 1)) exReNum
sum(if(t.is_abnormal_loading = 1, 0, 1)) exLoadedNum, from logpm_distribution_loadscan t
sum(if(t.is_abnormal_signing = 1, 0, 1)) exReNum where t.scan_status != 1
from logpm_distribution_loadscan t group by t.delivery_id
where t.scan_status != 1 order by null) loadScan on loadScan.delivery_id = d.id
group by t.delivery_id order by null) loadScan on loadScan.delivery_id = d.id left join (select t.delivery_id,
left join (select t.delivery_id, SUM(t.loaded_nub) loadedNum,
SUM(t.loaded_nub) loadedNum, sum(t.received_quantity) reNum
sum(t.received_quantity) reNum from logpm_distribution_loadscaninvn t
from logpm_distribution_loadscaninvn t where t.scan_status != 1
where t.scan_status != 1 group by t.delivery_id
group by t.delivery_id order by null) loadscaninvn on loadscaninvn.delivery_id = d.id order by null) loadscaninvn on loadscaninvn.delivery_id = d.id
where d.customers_number != 0) t where
d.customers_number > 0
and rn.num > 0) t
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>
<select id="getCustomerPage" resultType="com.logpm.report.vo.ReportCustomerVO"> <select id="getCustomerPage" resultType="com.logpm.report.vo.ReportCustomerVO">
select train_number, select train_number,
reservation_code, reservation_code,
stock_article_id, stock_article_id,
task_time, task_time,
warehouse_name, warehouse_name,
receiving_unit, receiving_unit,
mall_name, mall_name,
consignee, consignee,
delivery_phone, delivery_phone,
delivery_address, delivery_address,
type, type,
kind, kind,
vehicle_name, vehicle_name,
driver_name, driver_name,
distribution_company, distribution_company,
delivery_status, delivery_status,
order_number, order_number,
reservation_num, reservation_num,
reservation_stock_sist_num, reservation_stock_sist_num,
loaded_num, loaded_num,
invn_loaded_num, invn_loaded_num,
ex_loaded_num, ex_loaded_num,
re_num, re_num,
invn_re_num, invn_re_num,
ex_re_num, ex_re_num,
sjsigning_time, sjsigning_time,
signee_name, signee_name,
signing_time, signing_time,
examine_user_name examine_user_name
from (select lddl.train_number train_number, from (select lddl.train_number train_number,
obj.reservation_code reservation_code, obj.reservation_code reservation_code,
obj.stock_article_id stock_article_id, stockarticle.code stock_article_id,
lddl.task_time task_time, lddl.task_time task_time,
lddl.warehouse_name warehouse_name, lddl.warehouse_name warehouse_name,
obj.receiving_unit receiving_unit, obj.receiving_unit receiving_unit,
obj.mall_name mall_name, obj.mall_name mall_name,
obj.consignee, obj.consignee,
obj.delivery_phone delivery_phone, obj.delivery_phone delivery_phone,
obj.delivery_address delivery_address, obj.delivery_address delivery_address,
CASE CASE
WHEN lddl.type = 1 THEN WHEN lddl.type = 1 THEN
'商配' '商配'
WHEN lddl.type = 2 THEN WHEN lddl.type = 2 THEN
'市配' '市配'
ELSE '' ELSE ''
END type, END type,
CASE CASE
WHEN lddl.kind = 1 THEN WHEN lddl.kind = 1 THEN
'自主配送' '自主配送'
WHEN lddl.kind = 2 THEN WHEN lddl.kind = 2 THEN
'自主配送' '自主配送'
ELSE '' ELSE ''
END kind, END kind,
lddl.vehicle_name vehicle_name, lddl.vehicle_name vehicle_name,
lddl.driver_name driver_name, lddl.driver_name driver_name,
lddl.distribution_company distribution_company, lddl.distribution_company distribution_company,
CASE CASE
WHEN lddl.delivery_status = 1 THEN WHEN lddl.delivery_status = 1 THEN
'待配送' '待配送'
WHEN lddl.delivery_status = 2 THEN WHEN lddl.delivery_status = 2 THEN
'配送中' '配送中'
WHEN lddl.delivery_status = 3 THEN WHEN lddl.delivery_status = 3 THEN
'已完成' '已完成'
ELSE '' ELSE ''
END delivery_status, END delivery_status,
lddl.order_number order_number, stockarticle.num order_number,
rn.num reservation_num, obj.reservation_num reservation_num,
rsln.num reservation_stock_sist_num, obj.reservation_stock_list_num reservation_stock_sist_num,
IFNULL(loadScan.loadedNum, 0) loaded_num, IFNULL(loadScan.loadedNum, 0) loaded_num,
IFNULL(loadscaninvn.loadedNum, 0) invn_loaded_num, IFNULL(loadscaninvn.loadedNum, 0) invn_loaded_num,
IFNULL(loadScan.exLoadedNum, 0) ex_loaded_num, IFNULL(loadScan.exLoadedNum, 0) ex_loaded_num,
IFNULL(loadScan.reNum, 0) re_num, IFNULL(loadScan.reNum, 0) re_num,
IFNULL(loadscaninvn.reNum, 0) invn_re_num, IFNULL(loadscaninvn.reNum, 0) invn_re_num,
IFNULL(loadScan.exReNum, 0) ex_re_num, IFNULL(loadScan.exReNum, 0) ex_re_num,
lds.sjsigning_time sjsigning_time, lds.sjsigning_time sjsigning_time,
lds.signee_name signee_name, lds.signee_name signee_name,
lds.signing_time signing_time, lds.signing_time signing_time,
lds.examine_user_name examine_user_name lds.examine_user_name examine_user_name
from logpm_distribution_reservation obj from logpm_distribution_reservation obj
left join logpm_distribution_signfor lds on lds.reservation_id = obj.id left join logpm_distribution_signfor lds on lds.reservation_id = obj.id
left join logpm_distribution_delivery_list lddl on lds.delivery_id = lddl.id left join logpm_distribution_delivery_list lddl on lds.delivery_id = lddl.id
LEFT JOIN (SELECT lds.delivery_id, left join (select stockarticle.reservation_id, count(*) num, group_concat(ldsa.order_code) code
COALESCE(sum(ldr.reservation_num), 0) num from logpm_distribution_reservation_stockarticle stockarticle
FROM logpm_distribution_signfor lds left join logpm_distribution_stock_article ldsa on ldsa.id = stockarticle.stock_article_id
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id where stockarticle.stock_article_status != 2
WHERE ldr.reservation_status != '40' group by stockarticle.reservation_id order by null) stockarticle on stockarticle.reservation_id = obj.id
GROUP BY lds.delivery_id) rn ON rn.delivery_id = lddl.id left join (select t.reservation_id,
SUM(t.loaded_nub) loadedNum,
LEFT JOIN (SELECT lds.delivery_id, sum(t.received_quantity) reNum,
COALESCE(sum(ldr.reservation_stock_list_num), 0) num sum(if(t.is_abnormal_loading = 1, 0, 1)) exLoadedNum,
FROM logpm_distribution_signfor lds sum(if(t.is_abnormal_signing = 1, 0, 1)) exReNum
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id from logpm_distribution_loadscan t
GROUP BY lds.delivery_id) rsln ON rsln.delivery_id = lddl.id where t.scan_status != 1
group by t.reservation_id) loadScan on loadScan.reservation_id = obj.id
left join (select t.delivery_id,
SUM(t.loaded_nub) loadedNum,
sum(t.received_quantity) reNum,
sum(if(t.is_abnormal_loading = 1, 0, 1)) exLoadedNum,
sum(if(t.is_abnormal_signing = 1, 0, 1)) exReNum
from logpm_distribution_loadscan t
where t.scan_status != 1
group by t.delivery_id) loadScan on loadScan.delivery_id = lddl.id
left join (select t.delivery_id, left join (select t.reservation_id,
SUM(t.loaded_nub) loadedNum, SUM(t.loaded_nub) loadedNum,
sum(t.received_quantity) reNum sum(t.received_quantity) reNum
from logpm_distribution_loadscaninvn t from logpm_distribution_loadscaninvn t
group by t.delivery_id) loadscaninvn on loadscaninvn.delivery_id = lddl.id) t group by t.reservation_id) loadscaninvn on loadscaninvn.reservation_id = obj.id
where obj.reservation_status <![CDATA[<]]> '40'
) t
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>
<select id="getDetailsPage" resultType="com.logpm.report.vo.ReportDetailVO"> <select id="getDetailsPage" resultType="com.logpm.report.vo.ReportDetailVO">

Loading…
Cancel
Save