|
|
|
@ -1,8 +1,9 @@
|
|
|
|
|
package com.logpm.distribution.receiver.report; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import cn.hutool.json.JSONArray; |
|
|
|
|
import cn.hutool.json.JSONObject; |
|
|
|
|
import cn.hutool.json.JSONUtil; |
|
|
|
|
import com.logpm.distribution.pros.DistributionProperties; |
|
|
|
|
import com.logpm.distribution.service.IQualityDeliverService; |
|
|
|
@ -534,9 +535,11 @@ public class ReportListener {
|
|
|
|
|
public void orderExpenseDispatchDetailFinal(String msg, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long tag) { |
|
|
|
|
log.info("生成订单总成本报表: {}", msg); |
|
|
|
|
try { |
|
|
|
|
JSONArray objects = JSONUtil.parseArray(msg); |
|
|
|
|
if(CollUtil.isNotEmpty(objects)){ |
|
|
|
|
qualityDeliverService.orderExpenseDispatchDetailFinal(objects); |
|
|
|
|
JSONObject objects = JSONUtil.parseObj(msg); |
|
|
|
|
if(ObjectUtil.isNotEmpty(objects)){ |
|
|
|
|
JSONArray jas = new JSONArray(); |
|
|
|
|
jas.add(objects); |
|
|
|
|
qualityDeliverService.orderExpenseDispatchDetailFinal(jas); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
@ -557,9 +560,11 @@ public class ReportListener {
|
|
|
|
|
public void expenseWarehouseOrder(String msg, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long tag) { |
|
|
|
|
log.info("生成仓储订单总成本报表: {}", msg); |
|
|
|
|
try { |
|
|
|
|
JSONArray objects = JSONUtil.parseArray(msg); |
|
|
|
|
if(CollUtil.isNotEmpty(objects)){ |
|
|
|
|
qualityDeliverService.expenseWarehouseOrder(objects); |
|
|
|
|
JSONObject objects = JSONUtil.parseObj(msg); |
|
|
|
|
if(ObjectUtil.isNotEmpty(objects)){ |
|
|
|
|
JSONArray jas = new JSONArray(); |
|
|
|
|
jas.add(objects); |
|
|
|
|
qualityDeliverService.expenseWarehouseOrder(jas); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|