59 changed files with 1322 additions and 203 deletions
@ -0,0 +1,41 @@ |
|||||||
|
package com.logpm.report.entity; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.tenant.mp.TenantEntity; |
||||||
|
|
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
@Data |
||||||
|
@TableName("logpm_large_screen_data") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@AllArgsConstructor |
||||||
|
public class LargeScreenDataEntity extends TenantEntity { |
||||||
|
|
||||||
|
/** 预留1 */ |
||||||
|
@ApiModelProperty(name = "预留1",notes = "") |
||||||
|
private String reserve1 ; |
||||||
|
/** 预留2 */ |
||||||
|
@ApiModelProperty(name = "预留2",notes = "") |
||||||
|
private String reserve2 ; |
||||||
|
/** 预留3 */ |
||||||
|
@ApiModelProperty(name = "预留3",notes = "") |
||||||
|
private String reserve3 ; |
||||||
|
/** 预留4 */ |
||||||
|
@ApiModelProperty(name = "预留4",notes = "") |
||||||
|
private String reserve4 ; |
||||||
|
/** 预留5 */ |
||||||
|
@ApiModelProperty(name = "预留5",notes = "") |
||||||
|
private String reserve5 ; |
||||||
|
|
||||||
|
@ApiModelProperty(name = "数据",notes = "") |
||||||
|
private Map<String, Object> data; |
||||||
|
|
||||||
|
public LargeScreenDataEntity(Map<String, Object> data) { |
||||||
|
this.data = data; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,70 @@ |
|||||||
|
package com.logpm.report.job; |
||||||
|
|
||||||
|
|
||||||
|
import com.logpm.report.entity.LargeScreenDataEntity; |
||||||
|
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper; |
||||||
|
import com.logpm.report.service.largeScreen.*; |
||||||
|
import com.logpm.report.vo.largeScreen.XxlJobQueryVO; |
||||||
|
import com.xxl.job.core.handler.annotation.XxlJob; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.stereotype.Component; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
|
||||||
|
/** |
||||||
|
* 大屏数据查询job |
||||||
|
*/ |
||||||
|
@AllArgsConstructor |
||||||
|
@Component |
||||||
|
@Log4j2 |
||||||
|
public class LargeScreenQueryXxlJob { |
||||||
|
|
||||||
|
private final IMapWarehouseService mapWarehouseService; |
||||||
|
private final IBillingDataService billingDataService; |
||||||
|
private final ICarsLoadDataService CarsLoad; |
||||||
|
private final INodeDataService nodeData; |
||||||
|
private final IBinLocationService BinLocation; |
||||||
|
private final ITrunkDataService trunkData; |
||||||
|
private final IDeliveryDataService deliveryDataService; |
||||||
|
private final IBusinessRationService businessRatio; |
||||||
|
|
||||||
|
private final LargeScreenDataMapper largeScreenDataMapper; |
||||||
|
|
||||||
|
/** |
||||||
|
* 数据查询 |
||||||
|
*/ |
||||||
|
@XxlJob("LargeScreenQuery") |
||||||
|
public void query() |
||||||
|
{ |
||||||
|
XxlJobQueryVO xxlJobQueryVO = new XxlJobQueryVO(); |
||||||
|
xxlJobQueryVO.setMapWarehouse(mapWarehouseService.list()); |
||||||
|
xxlJobQueryVO.setBillingData(billingDataService.getBillingData()); |
||||||
|
xxlJobQueryVO.setCareerLineDeliveryData(CarsLoad.getCareerLineData(1)); |
||||||
|
xxlJobQueryVO.setCareerLineData(CarsLoad.getCareerLineData(0)); |
||||||
|
xxlJobQueryVO.setNodeData(nodeData.getNodeData()); |
||||||
|
xxlJobQueryVO.setBinLocationData(BinLocation.getBinLocationData()); |
||||||
|
xxlJobQueryVO.setTrunkData(trunkData.getTrunkData()); |
||||||
|
xxlJobQueryVO.setDeliveryData(deliveryDataService.getDeliveryAllData(0)); |
||||||
|
xxlJobQueryVO.setDeliveryYearData(deliveryDataService.getDeliveryAllData(1)); |
||||||
|
xxlJobQueryVO.setBusinessRatio(businessRatio.getBusinessRatioData()); |
||||||
|
xxlJobQueryVO.setWarehouseBillingData(billingDataService.getWarehouseBillingData()); |
||||||
|
xxlJobQueryVO.setMonthBillingData(billingDataService.getMonthBillingData()); |
||||||
|
|
||||||
|
HashMap<String, Object> data = new HashMap<>(); |
||||||
|
data.put("mapWarehouse", xxlJobQueryVO.getMapWarehouse()); |
||||||
|
data.put("billingData", xxlJobQueryVO.getBillingData()); |
||||||
|
data.put("warehouseBillingData", xxlJobQueryVO.getWarehouseBillingData()); |
||||||
|
data.put("monthBillingData", xxlJobQueryVO.getMonthBillingData()); |
||||||
|
data.put("careerLineData", xxlJobQueryVO.getCareerLineData()); |
||||||
|
data.put("careerLineDeliveryData", xxlJobQueryVO.getCareerLineDeliveryData()); |
||||||
|
data.put("nodeData", xxlJobQueryVO.getNodeData()); |
||||||
|
data.put("binLocationData", xxlJobQueryVO.getBinLocationData()); |
||||||
|
data.put("trunkData", xxlJobQueryVO.getTrunkData()); |
||||||
|
data.put("deliveryData", xxlJobQueryVO.getDeliveryData()); |
||||||
|
data.put("deliveryYearData", xxlJobQueryVO.getDeliveryYearData()); |
||||||
|
data.put("businessRatio", xxlJobQueryVO.getBusinessRatio()); |
||||||
|
|
||||||
|
largeScreenDataMapper.insert(new LargeScreenDataEntity(data)); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,17 @@ |
|||||||
|
package com.logpm.report.mapper.largeScreen; |
||||||
|
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
|
||||||
|
@Mapper |
||||||
|
public interface BinLocationMapper { |
||||||
|
// 在库订单数
|
||||||
|
Integer getOrderNum(); |
||||||
|
// 包裹数
|
||||||
|
Integer getPackageNum(); |
||||||
|
// 货柜数
|
||||||
|
Integer getBinLocationNum(); |
||||||
|
// 使用货柜数
|
||||||
|
// 空闲货柜数
|
||||||
|
Integer getIdleBinLocationNum(); |
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||||
|
<mapper namespace="com.logpm.report.mapper.largeScreen.BinLocationMapper"> |
||||||
|
<select id="getOrderNum" resultType="java.lang.Integer"> |
||||||
|
select count(distinct order_code) from logpm_platform.logpm_distribution_parcel_list where order_package_status = '20' |
||||||
|
</select> |
||||||
|
<select id="getPackageNum" resultType="java.lang.Integer"> |
||||||
|
select count(distinct order_package_code) from logpm_platform.logpm_distribution_parcel_list where order_package_status = '20' |
||||||
|
</select> |
||||||
|
<select id="getBinLocationNum" resultType="java.lang.Integer"> |
||||||
|
select count(id) from logpm_platform.logpm_warehouse_goods_allocation where enable_status = 1 |
||||||
|
</select> |
||||||
|
<select id="getIdleBinLocationNum" resultType="java.lang.Integer"> |
||||||
|
select count(*) from logpm_platform.logpm_warehouse_goods_allocation where enable_status = 1 AND allocation_status = 1 |
||||||
|
</select> |
||||||
|
</mapper> |
@ -0,0 +1,15 @@ |
|||||||
|
package com.logpm.report.mapper.largeScreen; |
||||||
|
|
||||||
|
|
||||||
|
import com.logpm.report.vo.largeScreen.BusinessRatio.ItemDataVO; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Mapper |
||||||
|
public interface BusinessRatioMapper { |
||||||
|
|
||||||
|
List<ItemDataVO> getTypeData(String startTime, String endTime); |
||||||
|
|
||||||
|
List<ItemDataVO> getBrandData(String startTime, String endTime); |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||||
|
<mapper namespace="com.logpm.report.mapper.largeScreen.BusinessRatioMapper"> |
||||||
|
<select id="getTypeData" resultType="com.logpm.report.vo.largeScreen.BusinessRatio.ItemDataVO"> |
||||||
|
select |
||||||
|
service_type as name, |
||||||
|
SUM(total_count) as value |
||||||
|
from logpm_platform.logpm_warehouse_waybill |
||||||
|
where create_time between #{startTime} and #{endTime} |
||||||
|
group by service_type |
||||||
|
</select> |
||||||
|
<select id="getBrandData" resultType="com.logpm.report.vo.largeScreen.BusinessRatio.ItemDataVO"> |
||||||
|
select |
||||||
|
brand as name, |
||||||
|
SUM(total_count) as value |
||||||
|
from logpm_platform.logpm_warehouse_waybill |
||||||
|
where create_time between #{startTime} and #{endTime} |
||||||
|
group by brand |
||||||
|
</select> |
||||||
|
</mapper> |
@ -1,14 +1,19 @@ |
|||||||
package com.logpm.report.mapper.largeScreen; |
package com.logpm.report.mapper.largeScreen; |
||||||
|
|
||||||
|
|
||||||
import com.logpm.report.vo.largeScreen.CareerLineData.CareerLineInfoVO; |
import com.logpm.report.vo.largeScreen.CareerLineData.DeptInfoVO; |
||||||
|
import com.logpm.report.vo.largeScreen.CareerLineData.VehicleStowageDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.CareerLineData.WarehouseDeptVO; |
||||||
import org.apache.ibatis.annotations.Mapper; |
import org.apache.ibatis.annotations.Mapper; |
||||||
|
|
||||||
import java.util.List; |
import java.util.List; |
||||||
|
|
||||||
@Mapper |
@Mapper |
||||||
public interface CarsLoadDataMapper { |
public interface CarsLoadDataMapper { |
||||||
public List<CareerLineInfoVO> getCareerLineInfo(); |
public List<DeptInfoVO> getDeptInfo(); |
||||||
|
|
||||||
|
public List<VehicleStowageDataVO> getVehicleStowageData(String startTime, String endTime); |
||||||
|
public List<VehicleStowageDataVO> getDeliveryData(String startTime, String endTime); |
||||||
|
|
||||||
|
public List<WarehouseDeptVO> getWarehouseDept(); |
||||||
} |
} |
||||||
|
@ -1,11 +1,35 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8" ?> |
<?xml version="1.0" encoding="UTF-8" ?> |
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||||
<mapper namespace="com.logpm.report.mapper.largeScreen.CarsLoadDataMapper"> |
<mapper namespace="com.logpm.report.mapper.largeScreen.CarsLoadDataMapper"> |
||||||
<select id="getCareerLineInfo" |
<select id="getDeptInfo" |
||||||
resultType="com.logpm.report.vo.largeScreen.CareerLineData.CareerLineInfoVO"> |
resultType="com.logpm.report.vo.largeScreen.CareerLineData.DeptInfoVO"> |
||||||
SELECT id, |
SELECT id, |
||||||
dept_name as deptName |
dept_name as deptName, |
||||||
|
parent_id as parentId |
||||||
FROM logpm.blade_dept |
FROM logpm.blade_dept |
||||||
WHERE dept_category = 2 AND dept_name like '%事业线%' |
</select> |
||||||
|
<select id="getVehicleStowageData" |
||||||
|
resultType="com.logpm.report.vo.largeScreen.CareerLineData.VehicleStowageDataVO"> |
||||||
|
|
||||||
|
select DATE_FORMAT(create_time, '%Y-%m') as createMonth, |
||||||
|
SUBSTRING_INDEX(end_warehouse_ids, ',', -1) as warehouseId, |
||||||
|
SUM(real_loading_number) as total |
||||||
|
from logpm_platform.logpm_trunkline_cars_load |
||||||
|
where create_time between #{startTime} and #{endTime} |
||||||
|
group by createMonth, warehouseId |
||||||
|
</select> |
||||||
|
<select id="getWarehouseDept" resultType="com.logpm.report.vo.largeScreen.CareerLineData.WarehouseDeptVO"> |
||||||
|
select |
||||||
|
id as warehouseId, |
||||||
|
department as dept |
||||||
|
from logpm_platform.logpm_warehouse_warehouse |
||||||
|
</select> |
||||||
|
<select id="getDeliveryData" resultType="com.logpm.report.vo.largeScreen.CareerLineData.VehicleStowageDataVO"> |
||||||
|
select DATE_FORMAT(create_time, '%Y-%m') as createMonth, |
||||||
|
warehouse_id as warehouseId, |
||||||
|
SUM(delivery_number) as total |
||||||
|
from logpm_platform.logpm_distribution_delivery_list |
||||||
|
where create_time between #{startTime} and #{endTime} |
||||||
|
group by createMonth, warehouseId |
||||||
</select> |
</select> |
||||||
</mapper> |
</mapper> |
||||||
|
@ -0,0 +1,11 @@ |
|||||||
|
package com.logpm.report.mapper.largeScreen; |
||||||
|
|
||||||
|
import com.logpm.report.vo.largeScreen.DeliveryDataVO; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
|
||||||
|
@Mapper |
||||||
|
public interface DeliveryDataMapper { |
||||||
|
public DeliveryDataVO getDeliveryAllData(String startTime, String endTime); |
||||||
|
public DeliveryDataVO getDelivery2BData(String startTime, String endTime); |
||||||
|
public DeliveryDataVO getDelivery2CData(String startTime, String endTime); |
||||||
|
} |
@ -0,0 +1,33 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||||
|
<mapper namespace="com.logpm.report.mapper.largeScreen.DeliveryDataMapper"> |
||||||
|
<select id="getDeliveryAllData" resultType="com.logpm.report.vo.largeScreen.DeliveryDataVO"> |
||||||
|
select |
||||||
|
count(*) as total, |
||||||
|
sum(case when delivery_status = '3' then 0 else 1 end) as toBeSigned |
||||||
|
from logpm_platform.logpm_distribution_delivery_list |
||||||
|
<if test="startTime != null"> |
||||||
|
where create_time between #{startTime} and #{endTime} |
||||||
|
</if> |
||||||
|
</select> |
||||||
|
<select id="getDelivery2BData" resultType="com.logpm.report.vo.largeScreen.DeliveryDataVO"> |
||||||
|
select |
||||||
|
count(*) as total2B, |
||||||
|
sum(case when delivery_status = '3' then 0 else 1 end) as toBeSigned2B |
||||||
|
from logpm_platform.logpm_distribution_delivery_list |
||||||
|
where type = '1' |
||||||
|
<if test="startTime != null"> |
||||||
|
and create_time between #{startTime} and #{endTime} |
||||||
|
</if> |
||||||
|
</select> |
||||||
|
<select id="getDelivery2CData" resultType="com.logpm.report.vo.largeScreen.DeliveryDataVO"> |
||||||
|
select |
||||||
|
count(*) as total2C, |
||||||
|
sum(case when delivery_status = '3' then 0 else 1 end) as toBeSigned2C |
||||||
|
from logpm_platform.logpm_distribution_delivery_list |
||||||
|
where type = '2' |
||||||
|
<if test="startTime != null"> |
||||||
|
and create_time between #{startTime} and #{endTime} |
||||||
|
</if> |
||||||
|
</select> |
||||||
|
</mapper> |
@ -0,0 +1,10 @@ |
|||||||
|
package com.logpm.report.mapper.largeScreen; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.logpm.report.entity.LargeScreenDataEntity; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
|
||||||
|
@Mapper |
||||||
|
public interface LargeScreenDataMapper extends BaseMapper<LargeScreenDataEntity> { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,13 @@ |
|||||||
|
package com.logpm.report.mapper.largeScreen; |
||||||
|
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
|
||||||
|
@Mapper |
||||||
|
public interface NodeDataMapper { |
||||||
|
public Integer getWaybill(String startTime, String endTime); |
||||||
|
public Integer getCarsLoadLoading(String startTime, String endTime); |
||||||
|
public Integer getDeliveryLading(String startTime, String endTime); |
||||||
|
public Integer getArrival(String startTime, String endTime); |
||||||
|
public Integer getSign(String startTime, String endTime); |
||||||
|
} |
@ -0,0 +1,24 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||||
|
<mapper namespace="com.logpm.report.mapper.largeScreen.NodeDataMapper"> |
||||||
|
<select id="getWaybill" resultType="java.lang.Integer"> |
||||||
|
select SUM(total_count) from logpm_platform.logpm_warehouse_waybill where create_time between #{startTime} and #{endTime} |
||||||
|
</select> |
||||||
|
<select id="getCarsLoadLoading" resultType="java.lang.Integer"> |
||||||
|
select SUM(real_loading_number) from logpm_platform.logpm_trunkline_cars_load where create_time between #{startTime} and #{endTime} |
||||||
|
</select> |
||||||
|
<select id="getDeliveryLading" resultType="java.lang.Integer"> |
||||||
|
select SUM(loaded_number) + SUM(loadedin_number) from logpm_platform.logpm_distribution_signfor where create_time between #{startTime} and #{endTime} |
||||||
|
</select> |
||||||
|
<select id="getArrival" resultType="java.lang.Integer"> |
||||||
|
select |
||||||
|
count(*) |
||||||
|
from logpm_platform.logpm_warehouse_waybill w |
||||||
|
INNER JOIN logpm_platform.logpm_trunkline_cars_unload_log l on l.waybill_id = w.id |
||||||
|
where l.create_time between #{startTime} and #{endTime} |
||||||
|
</select> |
||||||
|
<select id="getSign" resultType="java.lang.Integer"> |
||||||
|
select SUM(received_quantity) + SUM(receivedin_quantity) from logpm_platform.logpm_distribution_signfor where create_time between #{startTime} and #{endTime} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
@ -0,0 +1,10 @@ |
|||||||
|
package com.logpm.report.mapper.largeScreen; |
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
|
||||||
|
@Mapper |
||||||
|
public interface TrunkDataMapper { |
||||||
|
public Integer getTotal(String startTime, String endTime); |
||||||
|
public Integer getOnTheWay(); |
||||||
|
public Integer getArrival(String startTime, String endTime); |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||||
|
<mapper namespace="com.logpm.report.mapper.largeScreen.TrunkDataMapper"> |
||||||
|
<select id="getTotal" resultType="java.lang.Integer"> |
||||||
|
select count(*) |
||||||
|
from logpm_platform.logpm_trunkline_cars_load |
||||||
|
where |
||||||
|
create_time between #{startTime} and #{endTime} |
||||||
|
and load_status in ('0', '10', '20', '30', '40', '80') |
||||||
|
</select> |
||||||
|
<select id="getOnTheWay" resultType="java.lang.Integer"> |
||||||
|
select |
||||||
|
count(*) |
||||||
|
from logpm_platform.logpm_trunkline_cars_load |
||||||
|
where load_status in ('10', '20', '30') |
||||||
|
</select> |
||||||
|
<select id="getArrival" resultType="java.lang.Integer"> |
||||||
|
select |
||||||
|
count(*) |
||||||
|
from logpm_platform.logpm_trunkline_cars_load |
||||||
|
where |
||||||
|
create_time between #{startTime} and #{endTime} |
||||||
|
and load_status in ('40', '80') |
||||||
|
</select> |
||||||
|
</mapper> |
@ -0,0 +1,7 @@ |
|||||||
|
package com.logpm.report.service.largeScreen; |
||||||
|
|
||||||
|
import com.logpm.report.vo.largeScreen.BinLocationDataVO; |
||||||
|
|
||||||
|
public interface IBinLocationService { |
||||||
|
BinLocationDataVO getBinLocationData(); |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
package com.logpm.report.service.largeScreen; |
||||||
|
|
||||||
|
import com.logpm.report.vo.largeScreen.BusinessRatioDataVO; |
||||||
|
|
||||||
|
public interface IBusinessRationService { |
||||||
|
|
||||||
|
BusinessRatioDataVO getBusinessRatioData(); |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
package com.logpm.report.service.largeScreen; |
||||||
|
|
||||||
|
|
||||||
|
import com.logpm.report.vo.largeScreen.DeliveryDataVO; |
||||||
|
|
||||||
|
public interface IDeliveryDataService { |
||||||
|
DeliveryDataVO getDeliveryAllData(Integer isYear); |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
package com.logpm.report.service.largeScreen; |
||||||
|
|
||||||
|
import com.logpm.report.vo.largeScreen.NodeDataVO; |
||||||
|
|
||||||
|
public interface INodeDataService { |
||||||
|
NodeDataVO getNodeData(); |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
package com.logpm.report.service.largeScreen; |
||||||
|
|
||||||
|
import com.logpm.report.vo.largeScreen.TrunkDataVO; |
||||||
|
|
||||||
|
public interface ITrunkDataService { |
||||||
|
|
||||||
|
public TrunkDataVO getTrunkData(); |
||||||
|
} |
@ -0,0 +1,63 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.httpImpl; |
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil; |
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import com.logpm.report.entity.LargeScreenDataEntity; |
||||||
|
import com.logpm.report.mapper.largeScreen.BillingDataMapper; |
||||||
|
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper; |
||||||
|
import com.logpm.report.mapper.largeScreen.MapWarehouseMapper; |
||||||
|
import com.logpm.report.service.largeScreen.IBillingDataService; |
||||||
|
import com.logpm.report.vo.largeScreen.BillingDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.MapWarehouse.WarehouseInfoVO; |
||||||
|
import com.logpm.report.vo.largeScreen.MonthBillingDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.WarehouseBillingDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.XxlJobQueryVO; |
||||||
|
import com.logpm.report.vo.largeScreen.billingData.BillingDataInfoVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
@Service("billingDataServiceHttp") |
||||||
|
@Log4j2 |
||||||
|
@AllArgsConstructor |
||||||
|
public class BillingDataServiceImpl implements IBillingDataService { |
||||||
|
|
||||||
|
private final LargeScreenDataMapper largeScreenDataMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public BillingDataVO getBillingData() { |
||||||
|
|
||||||
|
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); |
||||||
|
|
||||||
|
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData()); |
||||||
|
|
||||||
|
return init.getBillingData(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<WarehouseBillingDataVO> getWarehouseBillingData() { |
||||||
|
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); |
||||||
|
|
||||||
|
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData()); |
||||||
|
|
||||||
|
return init.getWarehouseBillingData(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<MonthBillingDataVO> getMonthBillingData() { |
||||||
|
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); |
||||||
|
|
||||||
|
if (largeScreenDataEntity == null) { |
||||||
|
return new ArrayList<>(); |
||||||
|
} |
||||||
|
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData()); |
||||||
|
|
||||||
|
return init.getMonthBillingData(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,32 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.httpImpl; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import com.logpm.report.entity.LargeScreenDataEntity; |
||||||
|
import com.logpm.report.mapper.largeScreen.BinLocationMapper; |
||||||
|
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper; |
||||||
|
import com.logpm.report.service.largeScreen.IBinLocationService; |
||||||
|
import com.logpm.report.vo.largeScreen.BinLocationDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.XxlJobQueryVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Service("binLocationServiceHttp") |
||||||
|
@Log4j2 |
||||||
|
public class BinLocationServiceImpl implements IBinLocationService { |
||||||
|
private final LargeScreenDataMapper largeScreenDataMapper; |
||||||
|
|
||||||
|
public BinLocationDataVO getBinLocationData() { |
||||||
|
|
||||||
|
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); |
||||||
|
|
||||||
|
if (largeScreenDataEntity == null) { |
||||||
|
return new BinLocationDataVO(); |
||||||
|
} |
||||||
|
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData()); |
||||||
|
|
||||||
|
return init.getBinLocationData(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,34 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.httpImpl; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import com.logpm.report.entity.LargeScreenDataEntity; |
||||||
|
import com.logpm.report.mapper.largeScreen.BusinessRatioMapper; |
||||||
|
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper; |
||||||
|
import com.logpm.report.service.largeScreen.IBusinessRationService; |
||||||
|
import com.logpm.report.vo.largeScreen.BusinessRatioDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.XxlJobQueryVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.time.format.DateTimeFormatter; |
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Service("businessRationServiceHttp") |
||||||
|
@Log4j2 |
||||||
|
public class BusinessRationServiceImpl implements IBusinessRationService { |
||||||
|
|
||||||
|
private final LargeScreenDataMapper largeScreenDataMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public BusinessRatioDataVO getBusinessRatioData() { |
||||||
|
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); |
||||||
|
if (largeScreenDataEntity == null) { |
||||||
|
return new BusinessRatioDataVO(); |
||||||
|
} |
||||||
|
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData()); |
||||||
|
|
||||||
|
return init.getBusinessRatio(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,48 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.httpImpl; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import com.logpm.report.entity.LargeScreenDataEntity; |
||||||
|
import com.logpm.report.mapper.largeScreen.CarsLoadDataMapper; |
||||||
|
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper; |
||||||
|
import com.logpm.report.service.largeScreen.ICarsLoadDataService; |
||||||
|
import com.logpm.report.vo.largeScreen.CareerLineData.DeptInfoVO; |
||||||
|
import com.logpm.report.vo.largeScreen.CareerLineData.VehicleStowageDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.CareerLineData.VehicleStowageMonthDataVo; |
||||||
|
import com.logpm.report.vo.largeScreen.CareerLineData.WarehouseDeptVO; |
||||||
|
import com.logpm.report.vo.largeScreen.CareerLineDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.XxlJobQueryVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.time.LocalDate; |
||||||
|
import java.time.format.DateTimeFormatter; |
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Service("carsLoadDataServiceHttp") |
||||||
|
@Log4j2 |
||||||
|
public class CarsLoadDataServiceImpl implements ICarsLoadDataService { |
||||||
|
|
||||||
|
|
||||||
|
private final LargeScreenDataMapper largeScreenDataMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<CareerLineDataVO> getCareerLineData(Integer isDelivery) { |
||||||
|
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); |
||||||
|
|
||||||
|
if (largeScreenDataEntity == null) { |
||||||
|
return new ArrayList<>(); |
||||||
|
} |
||||||
|
|
||||||
|
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData()); |
||||||
|
|
||||||
|
return isDelivery.equals(1) |
||||||
|
? init.getCareerLineDeliveryData() |
||||||
|
: init.getCareerLineData(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.httpImpl; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import com.logpm.report.entity.LargeScreenDataEntity; |
||||||
|
import com.logpm.report.mapper.largeScreen.DeliveryDataMapper; |
||||||
|
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper; |
||||||
|
import com.logpm.report.service.largeScreen.IDeliveryDataService; |
||||||
|
import com.logpm.report.vo.largeScreen.DeliveryDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.XxlJobQueryVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.time.format.DateTimeFormatter; |
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Service("deliveryDataServiceHttp") |
||||||
|
@Log4j2 |
||||||
|
public class DeliveryDataServiceImpl implements IDeliveryDataService { |
||||||
|
|
||||||
|
private final LargeScreenDataMapper largeScreenDataMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public DeliveryDataVO getDeliveryAllData(Integer isYear) { |
||||||
|
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); |
||||||
|
|
||||||
|
if (largeScreenDataEntity == null) { |
||||||
|
return new DeliveryDataVO(); |
||||||
|
} |
||||||
|
|
||||||
|
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData()); |
||||||
|
|
||||||
|
return isYear.equals(1) |
||||||
|
? init.getDeliveryYearData() |
||||||
|
: init.getDeliveryData(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,42 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.httpImpl; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import com.logpm.report.entity.LargeScreenDataEntity; |
||||||
|
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper; |
||||||
|
import com.logpm.report.mapper.largeScreen.MapWarehouseMapper; |
||||||
|
import com.logpm.report.service.largeScreen.IMapWarehouseService; |
||||||
|
import com.logpm.report.vo.largeScreen.MapWarehouse.LineInfoVO; |
||||||
|
import com.logpm.report.vo.largeScreen.MapWarehouse.WarehouseInfoVO; |
||||||
|
import com.logpm.report.vo.largeScreen.MapWarehouseVO; |
||||||
|
import com.logpm.report.vo.largeScreen.XxlJobQueryVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.time.format.DateTimeFormatter; |
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Service("mapWarehouseServiceHttp") |
||||||
|
@Slf4j |
||||||
|
public class MapWarehouseServiceImpl implements IMapWarehouseService { |
||||||
|
|
||||||
|
private final LargeScreenDataMapper largeScreenDataMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<MapWarehouseVO> list() { |
||||||
|
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); |
||||||
|
|
||||||
|
if (largeScreenDataEntity == null) { |
||||||
|
return new ArrayList<>(); |
||||||
|
} |
||||||
|
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData()); |
||||||
|
|
||||||
|
return init.getMapWarehouse(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,32 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.httpImpl; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import com.logpm.report.entity.LargeScreenDataEntity; |
||||||
|
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper; |
||||||
|
import com.logpm.report.service.largeScreen.INodeDataService; |
||||||
|
import com.logpm.report.vo.largeScreen.NodeDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.XxlJobQueryVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Log4j2 |
||||||
|
@Service("nodeDataServiceHttp") |
||||||
|
public class NodeDataServiceImpl implements INodeDataService { |
||||||
|
|
||||||
|
private final LargeScreenDataMapper largeScreenDataMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public NodeDataVO getNodeData() { |
||||||
|
|
||||||
|
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); |
||||||
|
|
||||||
|
if (largeScreenDataEntity == null) { |
||||||
|
return new NodeDataVO(); |
||||||
|
} |
||||||
|
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData()); |
||||||
|
|
||||||
|
return init.getNodeData(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,37 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.httpImpl; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import com.logpm.report.entity.LargeScreenDataEntity; |
||||||
|
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper; |
||||||
|
import com.logpm.report.mapper.largeScreen.TrunkDataMapper; |
||||||
|
import com.logpm.report.service.largeScreen.ITrunkDataService; |
||||||
|
import com.logpm.report.vo.largeScreen.TrunkDataVO; |
||||||
|
import com.logpm.report.vo.largeScreen.XxlJobQueryVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.time.format.DateTimeFormatter; |
||||||
|
|
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Service("trunkDataServiceHttp") |
||||||
|
@Log4j2 |
||||||
|
public class TrunkDataServiceImpl implements ITrunkDataService { |
||||||
|
|
||||||
|
private final LargeScreenDataMapper largeScreenDataMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public TrunkDataVO getTrunkData() { |
||||||
|
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); |
||||||
|
|
||||||
|
if (largeScreenDataEntity == null) { |
||||||
|
return new TrunkDataVO(); |
||||||
|
} |
||||||
|
|
||||||
|
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData()); |
||||||
|
|
||||||
|
return init.getTrunkData(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,30 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.impl; |
||||||
|
|
||||||
|
import com.logpm.report.mapper.largeScreen.BinLocationMapper; |
||||||
|
import com.logpm.report.service.largeScreen.IBinLocationService; |
||||||
|
import com.logpm.report.vo.largeScreen.BinLocationDataVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.context.annotation.Primary; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Service |
||||||
|
@Log4j2 |
||||||
|
@Primary |
||||||
|
public class BinLocationServiceImpl implements IBinLocationService { |
||||||
|
private BinLocationMapper binLocationMapper; |
||||||
|
|
||||||
|
public BinLocationDataVO getBinLocationData() { |
||||||
|
|
||||||
|
BinLocationDataVO binLocationDataVO = new BinLocationDataVO(); |
||||||
|
binLocationDataVO.setOrderNum(binLocationMapper.getOrderNum()); |
||||||
|
binLocationDataVO.setPackageNum(binLocationMapper.getPackageNum()); |
||||||
|
binLocationDataVO.setBinLocationNum(binLocationMapper.getBinLocationNum()); |
||||||
|
binLocationDataVO.setUseBinLocationNum(binLocationMapper.getBinLocationNum() - binLocationMapper.getIdleBinLocationNum()); |
||||||
|
binLocationDataVO.setIdleBinLocationNum(binLocationMapper.getIdleBinLocationNum()); |
||||||
|
|
||||||
|
return binLocationDataVO; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,33 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.impl; |
||||||
|
|
||||||
|
import com.logpm.report.mapper.largeScreen.BusinessRatioMapper; |
||||||
|
import com.logpm.report.service.largeScreen.IBusinessRationService; |
||||||
|
import com.logpm.report.vo.largeScreen.BusinessRatioDataVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.context.annotation.Primary; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.time.format.DateTimeFormatter; |
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Service |
||||||
|
@Log4j2 |
||||||
|
@Primary |
||||||
|
public class BusinessRationServiceImpl implements IBusinessRationService { |
||||||
|
|
||||||
|
private final BusinessRatioMapper businessRatioMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public BusinessRatioDataVO getBusinessRatioData() { |
||||||
|
String startTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-01-01 00:00:00")); |
||||||
|
String endTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-12-31 23:59:59")); |
||||||
|
|
||||||
|
BusinessRatioDataVO businessRatioDataVO = new BusinessRatioDataVO(); |
||||||
|
businessRatioDataVO.setType(businessRatioMapper.getTypeData(startTime, endTime)); |
||||||
|
businessRatioDataVO.setBrand(businessRatioMapper.getBrandData(startTime, endTime)); |
||||||
|
|
||||||
|
return businessRatioDataVO; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.impl; |
||||||
|
|
||||||
|
import com.logpm.report.mapper.largeScreen.DeliveryDataMapper; |
||||||
|
import com.logpm.report.service.largeScreen.IDeliveryDataService; |
||||||
|
import com.logpm.report.vo.largeScreen.DeliveryDataVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.context.annotation.Primary; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.time.format.DateTimeFormatter; |
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Service |
||||||
|
@Log4j2 |
||||||
|
@Primary |
||||||
|
public class DeliveryDataServiceImpl implements IDeliveryDataService { |
||||||
|
|
||||||
|
private final DeliveryDataMapper deliveryDataMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public DeliveryDataVO getDeliveryAllData(Integer isYear) { |
||||||
|
|
||||||
|
DeliveryDataVO deliveryDataVO = new DeliveryDataVO(); |
||||||
|
String startTime = isYear.equals(1) ? LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-01-01 00:00:00")) : null; |
||||||
|
String endTime = isYear.equals(1) ? LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-12-31 23:59:59")) : null; |
||||||
|
|
||||||
|
DeliveryDataVO deliveryAllData = deliveryDataMapper.getDeliveryAllData(startTime, endTime); |
||||||
|
DeliveryDataVO delivery2CData = deliveryDataMapper.getDelivery2CData(startTime, endTime); |
||||||
|
DeliveryDataVO delivery2BData = deliveryDataMapper.getDelivery2BData(startTime, endTime); |
||||||
|
|
||||||
|
deliveryDataVO.setTotal(deliveryAllData.getTotal()); |
||||||
|
deliveryDataVO.setToBeSigned(deliveryAllData.getToBeSigned()); |
||||||
|
deliveryDataVO.setSigned(deliveryAllData.getTotal() - deliveryAllData.getToBeSigned()); |
||||||
|
|
||||||
|
deliveryDataVO.setTotal2B(delivery2BData.getTotal2B()); |
||||||
|
deliveryDataVO.setToBeSigned2B(delivery2BData.getToBeSigned2B()); |
||||||
|
deliveryDataVO.setSigned2B(delivery2BData.getTotal2B() - delivery2BData.getToBeSigned2B()); |
||||||
|
|
||||||
|
deliveryDataVO.setTotal2C(delivery2CData.getTotal2C()); |
||||||
|
deliveryDataVO.setToBeSigned2C(delivery2CData.getToBeSigned2C()); |
||||||
|
deliveryDataVO.setSigned2C(delivery2CData.getTotal2C() - delivery2CData.getToBeSigned2C()); |
||||||
|
|
||||||
|
return deliveryDataVO; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,37 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.impl; |
||||||
|
|
||||||
|
import com.logpm.report.mapper.largeScreen.NodeDataMapper; |
||||||
|
import com.logpm.report.service.largeScreen.INodeDataService; |
||||||
|
import com.logpm.report.vo.largeScreen.NodeDataVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.context.annotation.Primary; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.time.format.DateTimeFormatter; |
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Log4j2 |
||||||
|
@Service |
||||||
|
@Primary |
||||||
|
public class NodeDataServiceImpl implements INodeDataService { |
||||||
|
|
||||||
|
private final NodeDataMapper nodeDataMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public NodeDataVO getNodeData() { |
||||||
|
|
||||||
|
String startTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-01-01 00:00:00")); |
||||||
|
String endTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-12-31 23:59:59")); |
||||||
|
|
||||||
|
NodeDataVO nodeDataVO = new NodeDataVO(); |
||||||
|
nodeDataVO.setWaybill(nodeDataMapper.getWaybill(startTime, endTime)); |
||||||
|
nodeDataVO.setCarsLoadLoading(nodeDataMapper.getCarsLoadLoading(startTime, endTime)); |
||||||
|
nodeDataVO.setDeliveryLading(nodeDataMapper.getDeliveryLading(startTime, endTime)); |
||||||
|
nodeDataVO.setArrival(nodeDataMapper.getArrival(startTime, endTime)); |
||||||
|
nodeDataVO.setSign(nodeDataMapper.getSign(startTime, endTime)); |
||||||
|
|
||||||
|
return nodeDataVO; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,35 @@ |
|||||||
|
package com.logpm.report.service.largeScreen.impl; |
||||||
|
|
||||||
|
import com.logpm.report.mapper.largeScreen.TrunkDataMapper; |
||||||
|
import com.logpm.report.service.largeScreen.ITrunkDataService; |
||||||
|
import com.logpm.report.vo.largeScreen.TrunkDataVO; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.log4j.Log4j2; |
||||||
|
import org.springframework.context.annotation.Primary; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.time.format.DateTimeFormatter; |
||||||
|
|
||||||
|
|
||||||
|
@AllArgsConstructor |
||||||
|
@Service |
||||||
|
@Log4j2 |
||||||
|
@Primary |
||||||
|
public class TrunkDataServiceImpl implements ITrunkDataService { |
||||||
|
|
||||||
|
private final TrunkDataMapper trunkDataMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public TrunkDataVO getTrunkData() { |
||||||
|
String startTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-01-01 00:00:00")); |
||||||
|
String endTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-12-31 23:59:59")); |
||||||
|
|
||||||
|
TrunkDataVO trunkDataVO = new TrunkDataVO(); |
||||||
|
trunkDataVO.setTotal(trunkDataMapper.getTotal(startTime, endTime)); |
||||||
|
trunkDataVO.setOnTheWay(trunkDataMapper.getOnTheWay()); |
||||||
|
trunkDataVO.setArrival(trunkDataMapper.getArrival(startTime, endTime)); |
||||||
|
|
||||||
|
return trunkDataVO; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
package com.logpm.report.vo.largeScreen.BusinessRatio; |
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class ItemDataVO { |
||||||
|
private String name; |
||||||
|
|
||||||
|
private Integer value; |
||||||
|
} |
@ -0,0 +1,14 @@ |
|||||||
|
package com.logpm.report.vo.largeScreen; |
||||||
|
|
||||||
|
import com.logpm.report.vo.largeScreen.BusinessRatio.ItemDataVO; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class BusinessRatioDataVO { |
||||||
|
|
||||||
|
private List<ItemDataVO> type; |
||||||
|
|
||||||
|
private List<ItemDataVO> brand; |
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
package com.logpm.report.vo.largeScreen.CareerLineData; |
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class VehicleStowageDataVO { |
||||||
|
private Long warehouseId; |
||||||
|
|
||||||
|
private String createMonth; |
||||||
|
|
||||||
|
private Integer total; |
||||||
|
} |
@ -0,0 +1,17 @@ |
|||||||
|
package com.logpm.report.vo.largeScreen.CareerLineData; |
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class VehicleStowageMonthDataVo { |
||||||
|
|
||||||
|
private String createMonth; |
||||||
|
|
||||||
|
private Integer total; |
||||||
|
|
||||||
|
public VehicleStowageMonthDataVo(String createMonth, Integer total){ |
||||||
|
this.createMonth = createMonth; |
||||||
|
this.total = total; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
package com.logpm.report.vo.largeScreen.CareerLineData; |
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class WarehouseDeptVO { |
||||||
|
private Long dept; |
||||||
|
|
||||||
|
private Long warehouseId; |
||||||
|
} |
@ -1,7 +1,22 @@ |
|||||||
package com.logpm.report.vo.largeScreen; |
package com.logpm.report.vo.largeScreen; |
||||||
|
|
||||||
|
import com.logpm.report.vo.largeScreen.CareerLineData.VehicleStowageMonthDataVo; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
/** |
/** |
||||||
* 事业线车辆配载数据 |
* 事业线车辆配载数据 |
||||||
*/ |
*/ |
||||||
|
@Data |
||||||
public class CareerLineDataVO { |
public class CareerLineDataVO { |
||||||
|
|
||||||
|
private String careerLineName; |
||||||
|
|
||||||
|
private List<VehicleStowageMonthDataVo> monthData; |
||||||
|
|
||||||
|
public CareerLineDataVO(String careerLineName, List<VehicleStowageMonthDataVo> monthData) { |
||||||
|
this.careerLineName = careerLineName; |
||||||
|
this.monthData = monthData; |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -0,0 +1,66 @@ |
|||||||
|
package com.logpm.report.vo.largeScreen; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class XxlJobQueryVO { |
||||||
|
List<MapWarehouseVO> mapWarehouse; |
||||||
|
BillingDataVO billingData; |
||||||
|
List<WarehouseBillingDataVO> warehouseBillingData; |
||||||
|
List<MonthBillingDataVO> monthBillingData; |
||||||
|
List<CareerLineDataVO> careerLineData; |
||||||
|
List<CareerLineDataVO> careerLineDeliveryData; |
||||||
|
NodeDataVO nodeData; |
||||||
|
BinLocationDataVO binLocationData; |
||||||
|
TrunkDataVO trunkData; |
||||||
|
DeliveryDataVO deliveryData; |
||||||
|
DeliveryDataVO deliveryYearData; |
||||||
|
BusinessRatioDataVO businessRatio; |
||||||
|
|
||||||
|
public static XxlJobQueryVO init(Map<String, Object> data){ |
||||||
|
XxlJobQueryVO xxlJobQueryVO = new XxlJobQueryVO(); |
||||||
|
data.forEach((k,v) -> { |
||||||
|
if (k.equals("mapWarehouse")) { |
||||||
|
xxlJobQueryVO.setMapWarehouse((List<MapWarehouseVO>) v); |
||||||
|
} |
||||||
|
if (k.equals("billingData")) { |
||||||
|
xxlJobQueryVO.setBillingData((BillingDataVO) v); |
||||||
|
} |
||||||
|
if (k.equals("warehouseBillingData")) { |
||||||
|
xxlJobQueryVO.setWarehouseBillingData((List<WarehouseBillingDataVO>) v); |
||||||
|
} |
||||||
|
if (k.equals("monthBillingData")) { |
||||||
|
xxlJobQueryVO.setMonthBillingData((List<MonthBillingDataVO>) v); |
||||||
|
} |
||||||
|
if (k.equals("careerLineData")) { |
||||||
|
xxlJobQueryVO.setCareerLineData((List<CareerLineDataVO>) v); |
||||||
|
} |
||||||
|
if (k.equals("careerLineDeliveryData")) { |
||||||
|
xxlJobQueryVO.setCareerLineDeliveryData((List<CareerLineDataVO>) v); |
||||||
|
} |
||||||
|
if (k.equals("nodeData")) { |
||||||
|
xxlJobQueryVO.setNodeData((NodeDataVO) v); |
||||||
|
} |
||||||
|
if (k.equals("binLocationData")) { |
||||||
|
xxlJobQueryVO.setBinLocationData((BinLocationDataVO) v); |
||||||
|
} |
||||||
|
if (k.equals("trunkData")) { |
||||||
|
xxlJobQueryVO.setTrunkData((TrunkDataVO) v); |
||||||
|
} |
||||||
|
if (k.equals("deliveryData")) { |
||||||
|
xxlJobQueryVO.setDeliveryData((DeliveryDataVO) v); |
||||||
|
} |
||||||
|
if (k.equals("deliveryYearData")) { |
||||||
|
xxlJobQueryVO.setDeliveryYearData((DeliveryDataVO) v); |
||||||
|
} |
||||||
|
if (k.equals("businessRatio")) { |
||||||
|
xxlJobQueryVO.setBusinessRatio((BusinessRatioDataVO) v); |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
return xxlJobQueryVO; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue