diff --git a/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicDelineNodeEntity.java b/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicDelineNodeEntity.java index 3021d8e0f..f1679c296 100644 --- a/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicDelineNodeEntity.java +++ b/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicDelineNodeEntity.java @@ -62,15 +62,15 @@ public class BasicDelineNodeEntity extends TenantEntity { @ApiModelProperty(value = "联系电话") private String telephone; /** - * 预留1 + * 经度 */ - @ApiModelProperty(value = "预留1") - private String reserve1; + @ApiModelProperty(value = "经度") + private String longitude; /** - * 预留2 + * 纬度 */ - @ApiModelProperty(value = "预留2") - private String reserve2; + @ApiModelProperty(value = "纬度") + private String latitude; /** * 预留3 */ diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataClientEntity.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataClientEntity.java index 4f7655493..b74446146 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataClientEntity.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataClientEntity.java @@ -16,12 +16,15 @@ */ package com.logpm.basicdata.entity; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.Date; +import java.util.List; + import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; @@ -68,10 +71,40 @@ public class BasicdataClientEntity extends TenantEntity { @ApiModelProperty(value = "客户名称") private String clientName; /** - * 客户类型 + * 客户类型 1 工厂 2 商场 3装饰 4个人 */ - @ApiModelProperty(value = "客户类型") + @ApiModelProperty(value = "客户类型 ") private String clientType; + /** + * 详细地址 + */ + @ApiModelProperty(value = "详细地址 ") + private String detailedly; + + /** + * 费用类型 + */ + @ApiModelProperty(value = "费用类型 ") + @TableField(exist = false) + private String businessType; + /** + * 三方商城 + */ + @ApiModelProperty(value = "三方商城") + @TableField(exist = false) + private String tripartiteMall; + /** + * 开票信息 + */ + @ApiModelProperty(value = "开票信息") + private String billingInformation; + + /** + * 服务类型 + */ + @ApiModelProperty(value = "服务类型 ") + @TableField(exist = false) + private List typeServiceList; /** * 联系人 */ @@ -112,6 +145,11 @@ public class BasicdataClientEntity extends TenantEntity { */ @ApiModelProperty(value = "文件名称") private String fileName; + /** + * 父ID + */ + @ApiModelProperty(value = "父ID") + private String pid; /** * 是否控货 */ diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataGoodsAllocationEntity.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataGoodsAllocationEntity.java index 66bcae3e6..e9ca3b64a 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataGoodsAllocationEntity.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataGoodsAllocationEntity.java @@ -85,7 +85,7 @@ public class BasicdataGoodsAllocationEntity extends TenantEntity { * 所在列 */ @ApiModelProperty(value = "所在列") - private String columnNum; + private Integer columnNum; /** * 启用状态;1-启用;2-禁用 */ @@ -100,7 +100,7 @@ public class BasicdataGoodsAllocationEntity extends TenantEntity { * 所在层 */ @ApiModelProperty(value = "所在层") - private String layerNum; + private Integer layerNum; /** * 层编码 diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataShopEntity.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataShopEntity.java index f86bd195a..431e7c19c 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataShopEntity.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataShopEntity.java @@ -25,6 +25,7 @@ import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; import java.util.Date; +import java.util.List; /** * 基础门店表 实体类 @@ -97,12 +98,12 @@ public class BasicdataShopEntity extends TenantEntity { * 业务类型 */ @ApiModelProperty(value = "业务类型") - private String business_type; + private String businessType; /** * 服务类型 */ @ApiModelProperty(value = "服务类型") - private String type_service; + private List typeService; /** * 配送方式 */ diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataStoreBusinessEntity.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataStoreBusinessEntity.java index b2656120e..4140eae75 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataStoreBusinessEntity.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataStoreBusinessEntity.java @@ -65,16 +65,16 @@ public class BasicdataStoreBusinessEntity extends TenantEntity { * 服务类型;1 提 2干 3仓 4配 5装 */ @ApiModelProperty(value = "服务类型;1 提 2干 3仓 4配 5装") - private Integer typeService; + private String typeService; /** - * 门店ID + * 客户ID */ - @ApiModelProperty(value = "门店ID") - private String shopId; + @ApiModelProperty(value = "客户ID") + private String clientId; /** * 服务类型—类型 */ @ApiModelProperty(value = "服务类型—类型") - private Integer mold; + private String mold; } diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataTripartiteMallEntity.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataTripartiteMallEntity.java new file mode 100644 index 000000000..12a582c68 --- /dev/null +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataTripartiteMallEntity.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.basicdata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +/** + * 客户三方商城 实体类 + * + * @author cyz + * @since 2023-06-21 + */ +@Data +@TableName("logpm_basicdata_tripartite_mall") +@ApiModel(value = "BasicdataTripartiteMall对象", description = "客户三方商城") +@EqualsAndHashCode(callSuper = true) +public class BasicdataTripartiteMallEntity extends TenantEntity { + + /** + * 预留1 + */ + @ApiModelProperty(value = "预留1") + private String reserve1; + /** + * 预留2 + */ + @ApiModelProperty(value = "预留2") + private String reserve2; + /** + * 预留3 + */ + @ApiModelProperty(value = "预留3") + private String reserve3; + /** + * 预留4 + */ + @ApiModelProperty(value = "预留4") + private String reserve4; + /** + * 预留5 + */ + @ApiModelProperty(value = "预留5") + private String reserve5; + /** + * 客户ID + */ + @ApiModelProperty(value = "客户ID") + private String client; + /** + * 三方商城 + */ + @ApiModelProperty(value = "三方商城") + private String tripartiteMall; + /** + * 三方编码 + */ + @ApiModelProperty(value = "三方编码") + private String tripartiteCoding; + +} diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataStoreBusinessClient.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataStoreBusinessClient.java index 3664ad028..58d0efc18 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataStoreBusinessClient.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataStoreBusinessClient.java @@ -34,7 +34,7 @@ import org.springframework.web.bind.annotation.RequestParam; public interface IBasicdataStoreBusinessClient { String API_PREFIX = "/client"; - String TOP = API_PREFIX + "/top"; + String TOP = API_PREFIX + "/t11op"; /** * 获取门店业务记录列表 diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java new file mode 100644 index 000000000..86f13565a --- /dev/null +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.basicdata.feign; + +import org.springblade.core.mp.support.BladePage; +import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * 客户三方商城 Feign接口类 + * + * @author cyz + * @since 2023-06-21 + */ +@FeignClient( + value = "blade-basicdataTripartiteMall" +) +public interface IBasicdataTripartiteMallClient { + + String API_PREFIX = "/client"; + String TOP = API_PREFIX + "/1top"; + + /** + * 获取客户三方商城列表 + * + * @param current 页号 + * @param size 页数 + * @return BladePage + */ + @GetMapping(TOP) + BladePage top(@RequestParam("current") Integer current, @RequestParam("size") Integer size); + +} diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataTripartiteMallVO.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataTripartiteMallVO.java new file mode 100644 index 000000000..a6974bbb2 --- /dev/null +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataTripartiteMallVO.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.basicdata.vo; + +import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; +import org.springblade.core.tool.node.INode; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 客户三方商城 视图实体类 + * + * @author cyz + * @since 2023-06-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class BasicdataTripartiteMallVO extends BasicdataTripartiteMallEntity { + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionAddvalueEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionAddvalueEntity.java index ddddc543c..c8206c254 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionAddvalueEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionAddvalueEntity.java @@ -78,7 +78,7 @@ public class DistributionAddvalueEntity extends TenantEntity { * 订单配送单编号 */ @ApiModelProperty(value = "订单配送单编号") - private Long deliveryId; + private Long stockArticleId; /** * 距离 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryInfoEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryInfoEntity.java new file mode 100644 index 000000000..9ecc1ce64 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryInfoEntity.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +/** + * 配送装车中间表 实体类 + * + * @author TJJ + * @since 2023-06-16 + */ +@Data +@TableName("logpm_distribution_delivery_info") +@ApiModel(value = "DistributionDeliveryInfo对象", description = "配送装车中间表") +@EqualsAndHashCode(callSuper = true) +public class DistributionDeliveryInfoEntity extends TenantEntity { + + /** + * 客户表Id + */ + @ApiModelProperty(value = "客户表Id") + private Long reservationId; + /** + * 配送表id + */ + @ApiModelProperty(value = "配送表id") + private Long deliveryId; + /** + * 包条表id + */ + @ApiModelProperty(value = "包条表id") + private Long packageId; + /** + * 订单表id + */ + @ApiModelProperty(value = "订单表id") + private Long orderId; + /** + * 装车状态(1-未装车,2-已装车) + */ + @ApiModelProperty(value = "装车状态(1-未装车,2-已装车)") + private String loadedState; + /** + * 装车数量 + */ + @ApiModelProperty(value = "装车数量") + private Integer loadedNub; + /** + * 预留3 + */ + @ApiModelProperty(value = "预留3") + private String reserve3; + /** + * 预留4 + */ + @ApiModelProperty(value = "预留4") + private String reserve4; + /** + * 预留5 + */ + @ApiModelProperty(value = "预留5") + private String reserve5; + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java index 53d1b7f38..4416ff3fa 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java @@ -68,10 +68,15 @@ public class DistributionDeliveryListEntity extends TenantEntity { @ApiModelProperty(value = "车次") private String trainNumber; /** - * 仓库 + * 仓库id */ - @ApiModelProperty(value = "仓库") - private String warehouse; + @ApiModelProperty(value = "仓库id") + private String warehouseId; + /** + * 仓库名称 + */ + @ApiModelProperty(value = "仓库名称") + private String warehouseName; /** * 配送类型;1-市配,2-商配 */ @@ -84,15 +89,25 @@ public class DistributionDeliveryListEntity extends TenantEntity { @ApiModelProperty(value = "配送类型;1-自主配送,2-三方配送") private String kind; /** - * 配送车辆 + * 配送车辆(id) + */ + @ApiModelProperty(value = "配送车辆(id)") + private String vehicleId; + /** + * 配送司机(id) */ - @ApiModelProperty(value = "配送车辆") - private String vehicle; + @ApiModelProperty(value = "配送司机(id)") + private String driverId; /** - * 配送司机 + * 配送车辆(名称) */ - @ApiModelProperty(value = "配送司机") - private String driver; + @ApiModelProperty(value = "配送车辆(名称)") + private String vehicleName; + /** + * 配送司机(名称) + */ + @ApiModelProperty(value = "配送司机(名称)") + private String driverName; /** * 配送公司;1-货拉拉,2-京东 */ @@ -134,14 +149,34 @@ public class DistributionDeliveryListEntity extends TenantEntity { @ApiModelProperty(value = "扫描件数") private Integer scannedNumber; /** - * 装卸班组 + * 装卸班组(id) + */ + @ApiModelProperty(value = "装卸班组(id)") + private String loadingTeamId; + /** + * 装卸班组(名称) */ - @ApiModelProperty(value = "装卸班组") - private String loadingTeam; + @ApiModelProperty(value = "装卸班组(名称)") + private String loadingTeamName; /** - * 预约表id + * 关联预约表id(客户) */ - @ApiModelProperty(value = "预约表id") + @ApiModelProperty(value = "关联预约表id(客户)") private String reservationId; + /** + * 关联订单id + */ + @ApiModelProperty(value = "关联订单id") + private String orderId; + /** + * 备货时间 + */ + @ApiModelProperty(value = "备货时间") + private String leadTime; + /** + * 装车时间 + */ + @ApiModelProperty(value = "装车时间") + private String loadingTime; } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionPackadeliEntity.java similarity index 53% rename from blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryEntity.java rename to blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionPackadeliEntity.java index 10ddaf16a..ea564c2f6 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionPackadeliEntity.java @@ -21,87 +21,21 @@ import lombok.Data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.Date; -import java.math.BigDecimal; import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; /** - * 配送单 实体类 + * 配送包条中间表 实体类 * - * @author TJJ - * @since 2023-06-15 + * @author lmy + * @since 2023-06-17 */ @Data -@TableName("logpm_distribution_delivery") -@ApiModel(value = "DistributionDelivery对象", description = "配送单") +@TableName("logpm_distribution_packadeli") +@ApiModel(value = "DistributionPackadeli对象", description = "配送包条中间表") @EqualsAndHashCode(callSuper = true) -public class DistributionDeliveryEntity extends TenantEntity { +public class DistributionPackadeliEntity extends TenantEntity { - /** - * 订单自编号 - */ - @ApiModelProperty(value = "订单自编号") - private String orderId; - /** - * 运单号 - */ - @ApiModelProperty(value = "运单号") - private String waybillId; - /** - * 商城编号 - */ - @ApiModelProperty(value = "商城编号") - private String shoppingId; - /** - * 收货地址 - */ - @ApiModelProperty(value = "收货地址") - private String deliveryAddress; - /** - * 收货人 - */ - @ApiModelProperty(value = "收货人") - private String consignee; - /** - * 在库时长 - */ - @ApiModelProperty(value = "在库时长") - private String durationInStock; - /** - * 总件数 - */ - @ApiModelProperty(value = "总件数") - private String goodsTotal; - /** - * 配载件数 - */ - @ApiModelProperty(value = "配载件数") - private String allocateTotal; - /** - * 体积 - */ - @ApiModelProperty(value = "体积") - private String volume; - /** - * 重量 - */ - @ApiModelProperty(value = "重量") - private String weight; - /** - * 到付费用 - */ - @ApiModelProperty(value = "到付费用") - private BigDecimal collectFee; - /** - * 待收货款 - */ - @ApiModelProperty(value = "待收货款") - private BigDecimal replaceFee; - /** - * 增值服务费用 - */ - @ApiModelProperty(value = "增值服务费用") - private BigDecimal addvalueFee; /** * 预留1 */ @@ -127,5 +61,30 @@ public class DistributionDeliveryEntity extends TenantEntity { */ @ApiModelProperty(value = "预留5") private String reserve5; + /** + * 配送管理表id + */ + @ApiModelProperty(value = "配送管理表id") + private Long deliveryId; + /** + * 包件表id + */ + @ApiModelProperty(value = "包件表id") + private Long parcelListId; + /** + * 配送状态 + */ + @ApiModelProperty(value = "配送状态") + private String state; + /** + * 数量 + */ + @ApiModelProperty(value = "数量") + private Integer number; + /** + * 出库数量 + */ + @ApiModelProperty(value = "出库数量") + private Integer outboundNumber; } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java index d6d5f57c7..36486ba95 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java @@ -17,6 +17,7 @@ package com.logpm.distribution.entity; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -38,7 +39,7 @@ import org.springblade.core.tenant.mp.TenantEntity; public class DistributionReservationEntity extends TenantEntity { /** - * 订单自编号;订单自编号,关联订单表 + * 订单自编号;展示使用 */ @ApiModelProperty(value = "订单自编号;订单自编号,关联订单表") private String orderId; @@ -56,6 +57,7 @@ public class DistributionReservationEntity extends TenantEntity { * 预约时间 */ @ApiModelProperty(value = "预约时间") + @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd") private Date reservationDate; /** * 服务类型;预约服务类型;1-上楼、2-超区、3-拆样、4-平移、5-分拣、6-搬运、7-返货; @@ -122,6 +124,12 @@ public class DistributionReservationEntity extends TenantEntity { */ @ApiModelProperty(value = "预约单编号") private String reservationId; + /** + * 时段 + */ + @ApiModelProperty(value = "时段;1-上午、2-下午、3-全天") + private String periodOfTime; + /** /** * 预留1 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSigndetailEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSigndetailEntity.java index 4cd3104a6..81b1f15d6 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSigndetailEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSigndetailEntity.java @@ -150,9 +150,10 @@ public class DistributionSigndetailEntity extends TenantEntity { private String brand; /** - * 查询创建时间 + * 是否签收 */ - @ApiModelProperty(value = "品牌") - private String createTime_query; + @ApiModelProperty(value = "是否签收") + private String isSignfor; + } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignforEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignforEntity.java index 5cb8bcb0a..0d715a1ad 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignforEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignforEntity.java @@ -73,15 +73,20 @@ public class DistributionSignforEntity extends TenantEntity { @ApiModelProperty(value = "预约关联Id;预约关联id") private Long reservationId; /** - * 收货人 + * 收货人(id) */ - @ApiModelProperty(value = "收货人") - private String consignee; + @ApiModelProperty(value = "收货人(id)") + private String consigneeId; + /** + * 收货人(名称) + */ + @ApiModelProperty(value = "收货人(名称)") + private String consigneeName; /** * 收货人手机 */ @ApiModelProperty(value = "收货人手机") - private String consigneePhone; + private String deliveryPhone; /** * 收货地址 */ @@ -90,13 +95,18 @@ public class DistributionSignforEntity extends TenantEntity { /** * 服务类型 */ - @ApiModelProperty(value = "服务类型") + @ApiModelProperty(value = "服务类型;预约服务类型;1-上楼、2-超区、3-拆样、4-平移、5-分拣、6-搬运、7-返货;") private String serveType; /** - * 配送仓库 + * 配送仓库(id) */ @ApiModelProperty(value = "配送仓库") - private String distributingWarehouse; + private String warehouseId; + /** + * 配送仓库(名称) + */ + @ApiModelProperty(value = "配送仓库(名称)") + private String warehouseName; /** * 配送车次 */ @@ -123,10 +133,15 @@ public class DistributionSignforEntity extends TenantEntity { @ApiModelProperty(value = "签收数") private Integer receivedQuantity; /** - * 送货司机 + * 送货司机(id) + */ + @ApiModelProperty(value = "送货司机(id)") + private String deliveryDriverId; + /** + * 送货司机(名称) */ - @ApiModelProperty(value = "送货司机") - private String deliveryDriver; + @ApiModelProperty(value = "送货司机(名称)") + private String deliveryDriverName; /** * 送货司机手机号 */ @@ -145,10 +160,15 @@ public class DistributionSignforEntity extends TenantEntity { // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private String sjsigningTime; /** - * 签收人 + * 签收人(id) */ - @ApiModelProperty(value = "签收人") - private String signee; + @ApiModelProperty(value = "签收人(id)") + private String signeeId; + /** + * 签收人(名称) + */ + @ApiModelProperty(value = "签收人(名称)") + private String signeeName; /** * 签收状态;1-未签收,2-司机签收,3-文员签收 */ @@ -179,6 +199,16 @@ public class DistributionSignforEntity extends TenantEntity { */ @ApiModelProperty(value = "备注") private String notes; + /** + * 送货车辆(id) + */ + @ApiModelProperty(value = "送货车辆(id)") + private String deliveryVehicleId; + /** + * 送货车辆(值) + */ + @ApiModelProperty(value = "送货车辆(值)") + private String deliveryVehicleName; /** diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java index d1d0f3fe4..edcd5cd75 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java @@ -21,6 +21,8 @@ import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; + +import java.math.BigDecimal; import java.util.Date; import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; @@ -155,4 +157,16 @@ public class DistributionStockArticleEntity extends TenantEntity { @ApiModelProperty(value = "状态;1 已通知 2 未通知") private Integer notification; + /** + * 预约编号 + */ + @ApiModelProperty(value = "预约编号") + private Long reservationId; + + /** + * 增值服务总费用 + */ + @ApiModelProperty(value = "预约编号") + private BigDecimal fee; + } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryChargeClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryChargeClient.java index 0d522f0e6..ca69d93f9 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryChargeClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryChargeClient.java @@ -16,6 +16,7 @@ */ package com.logpm.distribution.feign; +import org.springblade.common.constant.ModuleNameConstant; import org.springblade.core.mp.support.BladePage; import com.logpm.distribution.entity.DistributionDeliveryChargeEntity; import org.springframework.cloud.openfeign.FeignClient; @@ -29,11 +30,11 @@ import org.springframework.web.bind.annotation.RequestParam; * @since 2023-06-14 */ @FeignClient( - value = "blade-distributionDeliveryCharge" + value = ModuleNameConstant.APPLICATION_DISTRIBUTION_NAME ) public interface IDistributionDeliveryChargeClient { - String API_PREFIX = "/client"; + String API_PREFIX = "DeliveryCharge/client"; String TOP = API_PREFIX + "/top12312"; /** diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryInfoClient.java similarity index 75% rename from blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryClient.java rename to blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryInfoClient.java index 09f1ceeec..21ee43d52 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryInfoClient.java @@ -16,34 +16,34 @@ */ package com.logpm.distribution.feign; -import com.logpm.distribution.entity.DistributionDeliveryEntity; import org.springblade.core.mp.support.BladePage; +import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; /** - * 配送单 Feign接口类 + * 配送装车中间表 Feign接口类 * * @author TJJ - * @since 2023-06-15 + * @since 2023-06-16 */ @FeignClient( - value = "delivery" + value = "deliveryInfo" ) -public interface IDistributionDeliveryClient { +public interface IDistributionDeliveryInfoClient { - String API_PREFIX = "delivery/client"; + String API_PREFIX = "deliveryInfo/client"; String TOP = API_PREFIX + "/top"; /** - * 获取配送单列表 + * 获取配送装车中间表 * * @param current 页号 * @param size 页数 * @return BladePage */ @GetMapping(TOP) - BladePage deliveryTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size); + BladePage deliveryInfoTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size); } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionPackadeliClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionPackadeliClient.java new file mode 100644 index 000000000..c21ad7911 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionPackadeliClient.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.feign; + +import org.springblade.common.constant.ModuleNameConstant; +import org.springblade.core.mp.support.BladePage; +import com.logpm.distribution.entity.DistributionPackadeliEntity; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * 配送包条中间表 Feign接口类 + * + * @author lmy + * @since 2023-06-17 + */ +@FeignClient( + value = ModuleNameConstant.APPLICATION_DISTRIBUTION_NAME +) +public interface IDistributionPackadeliClient { + + String API_PREFIX = "packadeli/client"; + String TOP = API_PREFIX + "/top"; + + /** + * 获取配送包条中间表列表 + * + * @param current 页号 + * @param size 页数 + * @return BladePage + */ + @GetMapping(TOP) + BladePage top(@RequestParam("current") Integer current, @RequestParam("size") Integer size); + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java similarity index 83% rename from blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryVO.java rename to blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java index c78f6843c..5a0d66cb3 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java @@ -16,20 +16,20 @@ */ package com.logpm.distribution.vo; -import com.logpm.distribution.entity.DistributionDeliveryEntity; +import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; import org.springblade.core.tool.node.INode; import lombok.Data; import lombok.EqualsAndHashCode; /** - * 配送单 视图实体类 + * 配送装车中间表 视图实体类 * * @author TJJ - * @since 2023-06-15 + * @since 2023-06-16 */ @Data @EqualsAndHashCode(callSuper = true) -public class DistributionDeliveryVO extends DistributionDeliveryEntity { +public class DistributionDeliveryInfoVO extends DistributionDeliveryInfoEntity { private static final long serialVersionUID = 1L; } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryListVO.java index 15346aa16..cfdaf6113 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryListVO.java @@ -22,6 +22,8 @@ import org.springblade.core.tool.node.INode; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.List; + /** * 配送管理 视图实体类 * @@ -33,10 +35,10 @@ import lombok.EqualsAndHashCode; public class DistributionDeliveryListVO extends DistributionDeliveryListEntity { private static final long serialVersionUID = 1L; /** - * 预留4 + * 包条数据 */ - @ApiModelProperty(value = "预留4") - private String reserve4; + @ApiModelProperty(value = "包条数据") + private List packadeList; } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionPackadeliVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionPackadeliVO.java new file mode 100644 index 000000000..d64f6b808 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionPackadeliVO.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.vo; + +import com.logpm.distribution.entity.DistributionPackadeliEntity; +import io.swagger.annotations.ApiModelProperty; +import org.springblade.core.tool.node.INode; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 配送包条中间表 视图实体类 + * + * @author lmy + * @since 2023-06-17 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DistributionPackadeliVO extends DistributionPackadeliEntity { + private static final long serialVersionUID = 1L; + + /** + * 仓库 + */ + @ApiModelProperty(value = "仓库") + private String warehouse; + /** + * 状态 + */ + @ApiModelProperty(value = "状态") + private Integer conditions; + /** + * 包条码 + */ + @ApiModelProperty(value = "包条码") + private String packetBarCode; + /** + * 货位信息 + */ + @ApiModelProperty(value = "货位信息") + private String goodsAllocation; + /** + * 所在托盘 + */ + @ApiModelProperty(value = "所在托盘") + private String pallet; + /** + * 一级品 + */ + @ApiModelProperty(value = "一级品") + private String firsts; + /** + * 二级品 + */ + @ApiModelProperty(value = "二级品") + private String second; + /** + * 三级品 + */ + @ApiModelProperty(value = "三级品") + private String thirdProduct; + /** + * 物料 + */ + @ApiModelProperty(value = "物料") + private String material; + /** + * 数量 + */ + @ApiModelProperty(value = "数量") + private Integer quantity; + /** + * 车次号 + */ + @ApiModelProperty(value = "车次号") + private String trainNumber; + /** + * 在库订单ID + */ + @ApiModelProperty(value = "在库订单ID") + private String stockArticleId; + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java index d78f9191d..88324e366 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java @@ -46,7 +46,7 @@ public class DistributionSigndetailVO extends DistributionSigndetailEntity { * 客户电话 */ @ApiModelProperty(value = "客户电话") - private String consigneePhone; + private String deliveryPhone; /** * 收货地址 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java index 31d6a1a1c..90f4dfd89 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java @@ -17,6 +17,7 @@ package com.logpm.distribution.vo; import com.logpm.distribution.entity.DistributionSignforEntity; +import io.swagger.annotations.ApiModelProperty; import org.springblade.core.tool.node.INode; import lombok.Data; import lombok.EqualsAndHashCode; @@ -31,5 +32,4 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) public class DistributionSignforVO extends DistributionSignforEntity { private static final long serialVersionUID = 1L; - } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforsnmbVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforsnmbVO.java new file mode 100644 index 000000000..b79928e5a --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforsnmbVO.java @@ -0,0 +1,39 @@ +package com.logpm.distribution.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 车次统计 + * + * @author lmy + * @since 2023-06-19 + */ +@Data +public class DistributionSignforsnmbVO { + + /** + * 客户总数 + */ + @ApiModelProperty(value = "客户总数") + private Integer customNub; + + /** + * 订单总数 + */ + @ApiModelProperty(value = "订单总数") + private Integer ordersNub; + + /** + * 已签收总数 + */ + @ApiModelProperty(value = "已签收总数") + private Integer signedNub; + /** + * 未签收总数 + */ + @ApiModelProperty(value = "未签收总数") + private Integer unsignedNub; + + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionstatisticsnmbVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionstatisticsnmbVO.java new file mode 100644 index 000000000..831db666d --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionstatisticsnmbVO.java @@ -0,0 +1,47 @@ +package com.logpm.distribution.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 车次统计 + * + * @author lmy + * @since 2023-06-19 + */ +@Data +public class DistributionstatisticsnmbVO { + + /** + * 配送总车数 + */ + @ApiModelProperty(value = "配送总车数") + private Integer vehiclesNub; + + /** + * 配送总件数 + */ + @ApiModelProperty(value = "配送总件数") + private Integer deliveriesTotal; + + /** + * 商配总车次 + */ + @ApiModelProperty(value = "商配总车次") + private Integer commercialNub; + /** + * 商配总件数 + */ + @ApiModelProperty(value = "商配总件数") + private Integer commercialTotal; + /** + * 市配总车数 + */ + @ApiModelProperty(value = "市配总车数") + private Integer marketNub; + /** + * 市配总件数 + */ + @ApiModelProperty(value = "市配总件数") + private Integer marketTotal; +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataCategoryController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataCategoryController.java index 9f8312e41..fdcfbe6a1 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataCategoryController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataCategoryController.java @@ -26,6 +26,7 @@ import javax.validation.Valid; import org.springblade.core.secure.BladeUser; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springframework.web.bind.annotation.*; @@ -98,6 +99,7 @@ public class BasicdataCategoryController extends BladeController { @ApiOperationSupport(order = 5) @ApiOperation(value = "懒加载树形结构", notes = "树形结构") public R> lazyTree(String tenantId, Long parentId, BladeUser bladeUser) { + AuthUtil.getTenantId(); List tree = basicdataCategoryService.lazyTree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()),parentId); return R.data(tree); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java index 1946918c5..01c4d5dd2 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java @@ -16,6 +16,7 @@ */ package com.logpm.basicdata.controller; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -78,6 +79,7 @@ public class BasicdataClientController extends BladeController { public R> list(@ApiIgnore @RequestParam Map basicdataClient, Query query) { Object o = basicdataClient.get("contractStartTime"); Object o1 = basicdataClient.get("contractEntTime"); + Object o2 = basicdataClient.get("pid"); basicdataClient.put("contractStartTime",null); basicdataClient.put("contractEntTime",null); QueryWrapper queryWrapper = Condition.getQueryWrapper(basicdataClient, BasicdataClientEntity.class); @@ -85,6 +87,11 @@ public class BasicdataClientController extends BladeController { "date_format (contract_start_time,'%Y-%m-%d') >= date_format ({0},'%Y-%m-%d')", o) .apply(o1 != null, "date_format (contract_ent_time,'%Y-%m-%d') <= date_format ({0},'%Y-%m-%d')", o1); + if(ObjectUtils.isNotNull(o2)){ + queryWrapper.eq("pid",o2); + }else{ + queryWrapper.eq("pid","0"); + } IPage pages = basicdataClientService.page(Condition.getPage(query),queryWrapper); return R.data(pages); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataTripartiteMallController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataTripartiteMallController.java new file mode 100644 index 000000000..6d7750d60 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataTripartiteMallController.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.basicdata.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import org.springblade.core.secure.BladeUser; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; +import com.logpm.basicdata.vo.BasicdataTripartiteMallVO; +import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel; +import com.logpm.basicdata.service.IBasicdataTripartiteMallService; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.excel.util.ExcelUtil; +import org.springblade.core.tool.constant.BladeConstant; +import springfox.documentation.annotations.ApiIgnore; +import java.util.Map; +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +/** + * 客户三方商城 控制器 + * + * @author cyz + * @since 2023-06-21 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/basicdataTripartiteMall") +@Api(value = "客户三方商城", tags = "客户三方商城接口") +public class BasicdataTripartiteMallController extends BladeController { + + private final IBasicdataTripartiteMallService basicdataTripartiteMallService; + + /** + * 客户三方商城 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入basicdataTripartiteMall") + public R detail(BasicdataTripartiteMallEntity basicdataTripartiteMall) { + BasicdataTripartiteMallEntity detail = basicdataTripartiteMallService.getOne(Condition.getQueryWrapper(basicdataTripartiteMall)); + return R.data(detail); + } + /** + * 客户三方商城 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入basicdataTripartiteMall") + public R> list(@ApiIgnore @RequestParam Map basicdataTripartiteMall, Query query) { + IPage pages = basicdataTripartiteMallService.page(Condition.getPage(query), Condition.getQueryWrapper(basicdataTripartiteMall, BasicdataTripartiteMallEntity.class)); + return R.data(pages); + } + + /** + * 客户三方商城 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入basicdataTripartiteMall") + public R> page(BasicdataTripartiteMallVO basicdataTripartiteMall, Query query) { + IPage pages = basicdataTripartiteMallService.selectBasicdataTripartiteMallPage(Condition.getPage(query), basicdataTripartiteMall); + return R.data(pages); + } + + /** + * 客户三方商城 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入basicdataTripartiteMall") + public R save(@Valid @RequestBody BasicdataTripartiteMallEntity basicdataTripartiteMall) { + return R.status(basicdataTripartiteMallService.save(basicdataTripartiteMall)); + } + + /** + * 客户三方商城 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入basicdataTripartiteMall") + public R update(@Valid @RequestBody BasicdataTripartiteMallEntity basicdataTripartiteMall) { + return R.status(basicdataTripartiteMallService.updateById(basicdataTripartiteMall)); + } + + /** + * 客户三方商城 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入basicdataTripartiteMall") + public R submit(@Valid @RequestBody BasicdataTripartiteMallEntity basicdataTripartiteMall) { + return R.status(basicdataTripartiteMallService.saveOrUpdate(basicdataTripartiteMall)); + } + + /** + * 客户三方商城 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(basicdataTripartiteMallService.deleteLogic(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @GetMapping("/export-basicdataTripartiteMall") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "导出数据", notes = "传入basicdataTripartiteMall") + public void exportBasicdataTripartiteMall(@ApiIgnore @RequestParam Map basicdataTripartiteMall, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(basicdataTripartiteMall, BasicdataTripartiteMallEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(BasicdataTripartiteMall::getTenantId, bladeUser.getTenantId()); + //} + queryWrapper.lambda().eq(BasicdataTripartiteMallEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = basicdataTripartiteMallService.exportBasicdataTripartiteMall(queryWrapper); + ExcelUtil.export(response, "客户三方商城数据" + DateUtil.time(), "客户三方商城数据表", list, BasicdataTripartiteMallExcel.class); + } + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataTrayDTO.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataTrayDTO.java index 76998dcf0..fae466fd3 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataTrayDTO.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataTrayDTO.java @@ -31,4 +31,9 @@ import lombok.EqualsAndHashCode; public class BasicdataTrayDTO extends BasicdataTrayEntity { private static final long serialVersionUID = 1L; + /** + * 托盘数量 + */ + private Integer number; + } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataTripartiteMallDTO.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataTripartiteMallDTO.java new file mode 100644 index 000000000..3a57d159d --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataTripartiteMallDTO.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.basicdata.dto; + +import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 客户三方商城 数据传输对象实体类 + * + * @author cyz + * @since 2023-06-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class BasicdataTripartiteMallDTO extends BasicdataTripartiteMallEntity { + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataTripartiteMallExcel.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataTripartiteMallExcel.java new file mode 100644 index 000000000..3e271a5b4 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataTripartiteMallExcel.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.basicdata.excel; + + +import lombok.Data; + +import java.util.Date; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import java.io.Serializable; + + +/** + * 客户三方商城 Excel实体类 + * + * @author cyz + * @since 2023-06-21 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class BasicdataTripartiteMallExcel implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("租户号") + private String tenantId; + /** + * 是否已删除 + */ + @ColumnWidth(20) + @ExcelProperty("是否已删除") + private Integer isDeleted; + /** + * 预留1 + */ + @ColumnWidth(20) + @ExcelProperty("预留1") + private String reserve1; + /** + * 预留2 + */ + @ColumnWidth(20) + @ExcelProperty("预留2") + private String reserve2; + /** + * 预留3 + */ + @ColumnWidth(20) + @ExcelProperty("预留3") + private String reserve3; + /** + * 预留4 + */ + @ColumnWidth(20) + @ExcelProperty("预留4") + private String reserve4; + /** + * 预留5 + */ + @ColumnWidth(20) + @ExcelProperty("预留5") + private String reserve5; + /** + * 客户ID + */ + @ColumnWidth(20) + @ExcelProperty("客户ID") + private String client; + /** + * 三方商城 + */ + @ColumnWidth(20) + @ExcelProperty("三方商城") + private String tripartiteMall; + /** + * 三方编码 + */ + @ColumnWidth(20) + @ExcelProperty("三方编码") + private String tripartiteCoding; + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java new file mode 100644 index 000000000..4be3d0bcd --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.basicdata.feign; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; +import com.logpm.basicdata.service.IBasicdataTripartiteMallService; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +/** + * 客户三方商城 Feign实现类 + * + * @author cyz + * @since 2023-06-21 + */ +@ApiIgnore() +@RestController +@AllArgsConstructor +public class BasicdataTripartiteMallClient implements IBasicdataTripartiteMallClient { + + private final IBasicdataTripartiteMallService basicdataTripartiteMallService; + + @Override + @GetMapping(TOP) + public BladePage top(Integer current, Integer size) { + Query query = new Query(); + query.setCurrent(current); + query.setSize(size); + IPage page = basicdataTripartiteMallService.page(Condition.getPage(query)); + return BladePage.of(page); + } + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml index a124e8d14..aac21267b 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml @@ -37,26 +37,26 @@ + select * from logpm_basicdata_tripartite_mall where is_deleted = 0 + + + + + + diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java new file mode 100644 index 000000000..3e1c89a99 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.basicdata.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; +import com.logpm.basicdata.vo.BasicdataTripartiteMallVO; +import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springblade.core.mp.base.BaseService; +import java.util.List; + +/** + * 客户三方商城 服务类 + * + * @author cyz + * @since 2023-06-21 + */ +public interface IBasicdataTripartiteMallService extends BaseService { + /** + * 自定义分页 + * + * @param page + * @param basicdataTripartiteMall + * @return + */ + IPage selectBasicdataTripartiteMallPage(IPage page, BasicdataTripartiteMallVO basicdataTripartiteMall); + + + /** + * 导出数据 + * + * @param queryWrapper + * @return + */ + List exportBasicdataTripartiteMall(Wrapper queryWrapper); + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java index 042c9bcc0..1f5a26fab 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java @@ -19,16 +19,12 @@ package com.logpm.basicdata.service.impl; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.logpm.basicdata.entity.BasicdataClientEntity; -import com.logpm.basicdata.entity.BasicdataHistoricalContractEntity; -import com.logpm.basicdata.entity.BasicdataStoreContactEntity; +import com.logpm.basicdata.entity.*; import com.logpm.basicdata.mapper.BasicdataHistoricalContractMapper; -import com.logpm.basicdata.service.IBasicdataHistoricalContractService; -import com.logpm.basicdata.service.IBasicdataStoreContactService; +import com.logpm.basicdata.service.*; import com.logpm.basicdata.vo.BasicdataClientVO; import com.logpm.basicdata.excel.BasicdataClientExcel; import com.logpm.basicdata.mapper.BasicdataClientMapper; -import com.logpm.basicdata.service.IBasicdataClientService; import com.logpm.basicdata.vo.BasicdataHistoricalContractVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -54,6 +50,8 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl selectBasicdataClientPage(IPage page, BasicdataClientVO basicdataClient) { @@ -83,6 +81,9 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl 0){ + for (String s : basicdataClient.getTypeServiceList()) { + //添加服务类型 + BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = new BasicdataStoreBusinessEntity(); + basicdataStoreBusinessEntity.setTypeService(s); + basicdataStoreBusinessEntity.setClientId(basicdataClient.getId().toString()); + if(s.equals("3")){ + basicdataStoreBusinessEntity.setMold(basicdataClient.getBusinessType()); + } + basicdataStoreBusinessService.save(basicdataStoreBusinessEntity); + } + }else{ + log.info("服务类型没有!!!"); + return false; + } + //添加三方商城 + if(StringUtils.isNotBlank(basicdataClient.getTripartiteMall())){ + BasicdataTripartiteMallEntity basicdataTripartiteMall = new BasicdataTripartiteMallEntity(); + basicdataTripartiteMall.setTripartiteMall(basicdataClient.getTripartiteMall()); + basicdataTripartiteMall.setClient(basicdataClient.getId().toString()); + basicdataTripartiteMallService.save(basicdataTripartiteMall); + } } if(ObjectUtils.isNull(basicdataClient.getId())){ log.info("没有必要的ID了!!!"); return false; } + + //添加历史合同 BasicdataHistoricalContractEntity basicdataHistoricalContract = new BasicdataHistoricalContractEntity(); basicdataHistoricalContract.setClientId(basicdataClient.getId().toString()); basicdataHistoricalContract.setContractEntTime(basicdataClient.getContractEntTime()); diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsShelfServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsShelfServiceImpl.java index 37a15a8d4..96457003a 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsShelfServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsShelfServiceImpl.java @@ -27,9 +27,12 @@ import com.logpm.basic.entity.BasicPrintTemplateEntity; import com.logpm.basic.feign.IBasicPrintTemplateClient; import com.logpm.basic.feign.IBasicTenantCodeClient; import com.logpm.basicdata.dto.BasicdataGoodsShelfDTO; +import com.logpm.basicdata.entity.BasicdataGoodsAllocationEntity; import com.logpm.basicdata.entity.BasicdataGoodsShelfEntity; import com.logpm.basicdata.excel.BasicdataGoodsShelfExcel; +import com.logpm.basicdata.mapper.BasicdataGoodsAllocationMapper; import com.logpm.basicdata.mapper.BasicdataGoodsShelfMapper; +import com.logpm.basicdata.service.IBasicdataGoodsAllocationService; import com.logpm.basicdata.service.IBasicdataGoodsShelfService; import com.logpm.basicdata.vo.BasicdataGoodsShelfVO; import lombok.AllArgsConstructor; @@ -75,6 +78,9 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl selectBasicdataGoodsShelfPage(IPage page, BasicdataGoodsShelfVO basicdataGoodsShelfVO) { @@ -135,9 +141,32 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl ids) { if (Func.isEmpty(ids)){ diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataShopServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataShopServiceImpl.java index 400109705..5ae1f8dc9 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataShopServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataShopServiceImpl.java @@ -21,15 +21,21 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.basicdata.dto.BasicdataShopDTO; import com.logpm.basicdata.entity.BasicdataShopEntity; +import com.logpm.basicdata.entity.BasicdataStoreBusinessEntity; +import com.logpm.basicdata.service.IBasicdataStoreBusinessService; import com.logpm.basicdata.vo.BasicdataShopVO; import com.logpm.basicdata.excel.BasicdataShopExcel; import com.logpm.basicdata.mapper.BasicdataShopMapper; import com.logpm.basicdata.service.IBasicdataShopService; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; import java.text.SimpleDateFormat; import java.util.List; @@ -42,8 +48,12 @@ import java.util.Map; * @since 2023-05-16 */ @Service +@AllArgsConstructor +@Slf4j public class BasicdataShopServiceImpl extends BaseServiceImpl implements IBasicdataShopService { +// private final IBasicdataStoreBusinessService basicdataStoreBusinessService; + @Override public IPage selectBasicdataShopPage(IPage page, BasicdataShopVO basicdataShop) { return page.setRecords(baseMapper.selectBasicdataShopPage(page, basicdataShop)); @@ -66,7 +76,12 @@ public class BasicdataShopServiceImpl extends BaseServiceImpl typeService = basicdataShop.getTypeService(); + String businessType = basicdataShop.getBusinessType(); + List basicdataShopEntities = baseMapper.selectList(Wrappers.query().lambda() .eq(BasicdataShopEntity::getClientId, basicdataShop.getClientId()) .eq(BasicdataShopEntity::getStoreCode, basicdataShop.getStoreCode()) @@ -75,7 +90,32 @@ public class BasicdataShopServiceImpl extends BaseServiceImpl 0 ){ throw new RuntimeException("客户已绑定此门店!"); } - return this.saveOrUpdate(basicdataShop); + basicdataShop.setTypeService(null); + basicdataShop.setBusinessType(null); + //添加客户信息 + this.save(basicdataShop); + + try{ +// if(typeService.size() > 0){ +// for (String s : typeService) { +// //添加服务类型 +// BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = new BasicdataStoreBusinessEntity(); +// basicdataStoreBusinessEntity.setTypeService(s); +// basicdataStoreBusinessEntity.setShopId(basicdataShop.getCustomerStoreId()); +// if(s.equals("3")){ +// basicdataStoreBusinessEntity.setMold(businessType); +// } +// basicdataStoreBusinessService.save(basicdataStoreBusinessEntity); +// } +// return true; +// } + return false; + }catch (Exception e){ + log.info("报错信息",e.getMessage()); + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return false; + } + } } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java index fc0a286b0..d9d07e375 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java @@ -29,14 +29,15 @@ import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.RandomType; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springframework.transaction.annotation.Transactional; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.math.BigInteger; +import java.util.*; /** * 托盘 服务实现类 @@ -50,6 +51,7 @@ public class BasicdataTrayServiceImpl extends BaseServiceImpl implements IBasicdataTripartiteMallService { + + @Override + public IPage selectBasicdataTripartiteMallPage(IPage page, BasicdataTripartiteMallVO basicdataTripartiteMall) { + return page.setRecords(baseMapper.selectBasicdataTripartiteMallPage(page, basicdataTripartiteMall)); + } + + + @Override + public List exportBasicdataTripartiteMall(Wrapper queryWrapper) { + List basicdataTripartiteMallList = baseMapper.exportBasicdataTripartiteMall(queryWrapper); + //basicdataTripartiteMallList.forEach(basicdataTripartiteMall -> { + // basicdataTripartiteMall.setTypeName(DictCache.getValue(DictEnum.YES_NO, BasicdataTripartiteMall.getType())); + //}); + return basicdataTripartiteMallList; + } + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryController.java deleted file mode 100644 index f32589f07..000000000 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryController.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.logpm.distribution.controller; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import lombok.AllArgsConstructor; -import javax.validation.Valid; - -import org.springblade.core.secure.BladeUser; -import org.springblade.core.mp.support.Condition; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.Func; -import org.springframework.web.bind.annotation.*; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.logpm.distribution.entity.DistributionDeliveryEntity; -import com.logpm.distribution.vo.DistributionDeliveryVO; -import com.logpm.distribution.excel.DistributionDeliveryExcel; -import com.logpm.distribution.service.IDistributionDeliveryService; -import org.springblade.core.boot.ctrl.BladeController; -import org.springblade.core.tool.utils.DateUtil; -import org.springblade.core.excel.util.ExcelUtil; -import org.springblade.core.tool.constant.BladeConstant; -import springfox.documentation.annotations.ApiIgnore; -import java.util.Map; -import java.util.List; -import javax.servlet.http.HttpServletResponse; - -/** - * 配送单 控制器 - * - * @author TJJ - * @since 2023-06-15 - */ -@RestController -@AllArgsConstructor -@RequestMapping("/delivery") -@Api(value = "配送单", tags = "配送单接口") -public class DistributionDeliveryController extends BladeController { - - private final IDistributionDeliveryService distributionDeliveryService; - - /** - * 配送单 详情 - */ - @GetMapping("/detail") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入distributionDelivery") - public R detail(DistributionDeliveryEntity distributionDelivery) { - DistributionDeliveryEntity detail = distributionDeliveryService.getOne(Condition.getQueryWrapper(distributionDelivery)); - return R.data(detail); - } - /** - * 配送单 分页 - */ - @GetMapping("/list") - @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入distributionDelivery") - public R> list(@ApiIgnore @RequestParam Map distributionDelivery, Query query) { - IPage pages = distributionDeliveryService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionDelivery, DistributionDeliveryEntity.class)); - return R.data(pages); - } - - /** - * 配送单 自定义分页 - */ - @GetMapping("/page") - @ApiOperationSupport(order = 3) - @ApiOperation(value = "分页", notes = "传入distributionDelivery") - public R> page(DistributionDeliveryVO distributionDelivery, Query query) { - IPage pages = distributionDeliveryService.selectDistributionDeliveryPage(Condition.getPage(query), distributionDelivery); - return R.data(pages); - } - - /** - * 配送单 新增 - */ - @PostMapping("/save") - @ApiOperationSupport(order = 4) - @ApiOperation(value = "新增", notes = "传入distributionDelivery") - public R save(@Valid @RequestBody DistributionDeliveryEntity distributionDelivery) { - return R.status(distributionDeliveryService.save(distributionDelivery)); - } - - /** - * 配送单 修改 - */ - @PostMapping("/update") - @ApiOperationSupport(order = 5) - @ApiOperation(value = "修改", notes = "传入distributionDelivery") - public R update(@Valid @RequestBody DistributionDeliveryEntity distributionDelivery) { - return R.status(distributionDeliveryService.updateById(distributionDelivery)); - } - - /** - * 配送单 新增或修改 - */ - @PostMapping("/submit") - @ApiOperationSupport(order = 6) - @ApiOperation(value = "新增或修改", notes = "传入distributionDelivery") - public R submit(@Valid @RequestBody DistributionDeliveryEntity distributionDelivery) { - return R.status(distributionDeliveryService.saveOrUpdate(distributionDelivery)); - } - - /** - * 配送单 删除 - */ - @PostMapping("/remove") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { - return R.status(distributionDeliveryService.deleteLogic(Func.toLongList(ids))); - } - - - /** - * 导出数据 - */ - @GetMapping("/export-distributionDelivery") - @ApiOperationSupport(order = 9) - @ApiOperation(value = "导出数据", notes = "传入distributionDelivery") - public void exportDistributionDelivery(@ApiIgnore @RequestParam Map distributionDelivery, BladeUser bladeUser, HttpServletResponse response) { - QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionDelivery, DistributionDeliveryEntity.class); - //if (!AuthUtil.isAdministrator()) { - // queryWrapper.lambda().eq(DistributionDelivery::getTenantId, bladeUser.getTenantId()); - //} - queryWrapper.lambda().eq(DistributionDeliveryEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); - List list = distributionDeliveryService.exportDistributionDelivery(queryWrapper); - ExcelUtil.export(response, "配送单数据" + DateUtil.time(), "配送单数据表", list, DistributionDeliveryExcel.class); - } - - /** - * 配送单 添加增值服务 - */ - @PostMapping("/addIncrement") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R addIncrement(@ApiParam(value = "主键集合", required = true) @RequestBody Map addvalueInfo) { - R result = distributionDeliveryService.addIncrement(addvalueInfo); - return result; - } - - - -} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryInfoController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryInfoController.java new file mode 100644 index 000000000..dd5efe115 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryInfoController.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import org.springblade.core.secure.BladeUser; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; +import com.logpm.distribution.vo.DistributionDeliveryInfoVO; +import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; +import com.logpm.distribution.service.IDistributionDeliveryInfoService; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.excel.util.ExcelUtil; +import org.springblade.core.tool.constant.BladeConstant; +import springfox.documentation.annotations.ApiIgnore; +import java.util.Map; +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +/** + * 配送装车中间表 控制器 + * + * @author TJJ + * @since 2023-06-16 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/deliveryInfo") +@Api(value = "配送装车中间表", tags = "配送装车中间表接口") +public class DistributionDeliveryInfoController extends BladeController { + + private final IDistributionDeliveryInfoService distributionDeliveryInfoService; + + /** + * 配送装车中间表 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入distributionDeliveryInfo") + public R detail(DistributionDeliveryInfoEntity distributionDeliveryInfo) { + DistributionDeliveryInfoEntity detail = distributionDeliveryInfoService.getOne(Condition.getQueryWrapper(distributionDeliveryInfo)); + return R.data(detail); + } + /** + * 配送装车中间表 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入distributionDeliveryInfo") + public R> list(@ApiIgnore @RequestParam Map distributionDeliveryInfo, Query query) { + IPage pages = distributionDeliveryInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionDeliveryInfo, DistributionDeliveryInfoEntity.class)); + return R.data(pages); + } + + /** + * 配送装车中间表 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入distributionDeliveryInfo") + public R> page(DistributionDeliveryInfoVO distributionDeliveryInfo, Query query) { + IPage pages = distributionDeliveryInfoService.selectDistributionDeliveryInfoPage(Condition.getPage(query), distributionDeliveryInfo); + return R.data(pages); + } + + /** + * 配送装车中间表 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入distributionDeliveryInfo") + public R save(@Valid @RequestBody DistributionDeliveryInfoEntity distributionDeliveryInfo) { + return R.status(distributionDeliveryInfoService.save(distributionDeliveryInfo)); + } + + /** + * 配送装车中间表 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入distributionDeliveryInfo") + public R update(@Valid @RequestBody DistributionDeliveryInfoEntity distributionDeliveryInfo) { + return R.status(distributionDeliveryInfoService.updateById(distributionDeliveryInfo)); + } + + /** + * 配送装车中间表 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入distributionDeliveryInfo") + public R submit(@Valid @RequestBody DistributionDeliveryInfoEntity distributionDeliveryInfo) { + return R.status(distributionDeliveryInfoService.saveOrUpdate(distributionDeliveryInfo)); + } + + /** + * 配送装车中间表 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(distributionDeliveryInfoService.deleteLogic(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @GetMapping("/export-distributionDeliveryInfo") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "导出数据", notes = "传入distributionDeliveryInfo") + public void exportDistributionDeliveryInfo(@ApiIgnore @RequestParam Map distributionDeliveryInfo, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionDeliveryInfo, DistributionDeliveryInfoEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(DistributionDeliveryInfo::getTenantId, bladeUser.getTenantId()); + //} + queryWrapper.lambda().eq(DistributionDeliveryInfoEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = distributionDeliveryInfoService.exportDistributionDeliveryInfo(queryWrapper); + ExcelUtil.export(response, "配送装车中间表数据" + DateUtil.time(), "配送装车中间表数据表", list, DistributionDeliveryInfoExcel.class); + } + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java index 4d9839be4..2a5bc0139 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java @@ -17,7 +17,9 @@ package com.logpm.distribution.controller; import cn.hutool.core.util.BooleanUtil; +import com.baomidou.mybatisplus.core.metadata.OrderItem; import com.logpm.distribution.dto.DistributionDeliveryListDTO; +import com.logpm.distribution.vo.DistributionstatisticsnmbVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -83,6 +85,29 @@ public class DistributionDeliveryListController extends BladeController { return R.data(pages); } + + /** + * 配送管理 配送车次统计 + */ + @GetMapping("/statistics") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入distributionDeliveryList") + public R statistics(DistributionDeliveryListDTO distributionDeliveryList) { + DistributionstatisticsnmbVO distributionstatisticsnmbVO = distributionDeliveryListService.getNubTotal(distributionDeliveryList); + return R.data(distributionstatisticsnmbVO); + } + + /** + * 配送管理 点击发车 + */ + @GetMapping("/start") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入distributionDeliveryList") + public R start(DistributionDeliveryListDTO distributionDeliveryList) { + Integer i = distributionDeliveryListService.start(distributionDeliveryList); + return R.data(i); + } + /** * 配送管理 自定义分页 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionPackadeliController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionPackadeliController.java new file mode 100644 index 000000000..c5ce2ce9e --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionPackadeliController.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import org.springblade.core.secure.BladeUser; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.entity.DistributionPackadeliEntity; +import com.logpm.distribution.vo.DistributionPackadeliVO; +import com.logpm.distribution.excel.DistributionPackadeliExcel; +import com.logpm.distribution.service.IDistributionPackadeliService; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.excel.util.ExcelUtil; +import org.springblade.core.tool.constant.BladeConstant; +import springfox.documentation.annotations.ApiIgnore; +import java.util.Map; +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +/** + * 配送包条中间表 控制器 + * + * @author lmy + * @since 2023-06-17 + */ +@RestController +@AllArgsConstructor +@RequestMapping("packadeli/distributionPackadeli") +@Api(value = "配送包条中间表", tags = "配送包条中间表接口") +public class DistributionPackadeliController extends BladeController { + + private final IDistributionPackadeliService distributionPackadeliService; + + /** + * 配送包条中间表 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入distributionPackadeli") + public R detail(DistributionPackadeliEntity distributionPackadeli) { + DistributionPackadeliEntity detail = distributionPackadeliService.getOne(Condition.getQueryWrapper(distributionPackadeli)); + return R.data(detail); + } + /** + * 配送包条中间表 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入distributionPackadeli") + public R> list(@ApiIgnore @RequestParam Map distributionPackadeli, Query query) { + IPage pages = distributionPackadeliService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionPackadeli, DistributionPackadeliEntity.class)); + return R.data(pages); + } + + /** + * 配送包条中间表 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入distributionPackadeli") + public R> page(DistributionPackadeliVO distributionPackadeli, Query query) { + IPage pages = distributionPackadeliService.selectDistributionPackadeliPage(Condition.getPage(query), distributionPackadeli); + return R.data(pages); + } + + /** + * 配送包条中间表 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入distributionPackadeli") + public R save(@Valid @RequestBody DistributionPackadeliEntity distributionPackadeli) { + return R.status(distributionPackadeliService.save(distributionPackadeli)); + } + + /** + * 配送包条中间表 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入distributionPackadeli") + public R update(@Valid @RequestBody DistributionPackadeliEntity distributionPackadeli) { + return R.status(distributionPackadeliService.updateById(distributionPackadeli)); + } + + /** + * 配送包条中间表 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入distributionPackadeli") + public R submit(@Valid @RequestBody DistributionPackadeliEntity distributionPackadeli) { + return R.status(distributionPackadeliService.saveOrUpdate(distributionPackadeli)); + } + + /** + * 配送包条中间表 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(distributionPackadeliService.deleteLogic(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @GetMapping("/export-distributionPackadeli") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "导出数据", notes = "传入distributionPackadeli") + public void exportDistributionPackadeli(@ApiIgnore @RequestParam Map distributionPackadeli, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionPackadeli, DistributionPackadeliEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(DistributionPackadeli::getTenantId, bladeUser.getTenantId()); + //} + queryWrapper.lambda().eq(DistributionPackadeliEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = distributionPackadeliService.exportDistributionPackadeli(queryWrapper); + ExcelUtil.export(response, "配送包条中间表数据" + DateUtil.time(), "配送包条中间表数据表", list, DistributionPackadeliExcel.class); + } + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionPrintController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionPrintController.java index 6415a97dc..b8f19bcfb 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionPrintController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionPrintController.java @@ -65,6 +65,7 @@ public class DistributionPrintController extends BladeController { @GetMapping("/detail") @ApiOperationSupport(order = 1) @ApiOperation(value = "详情", notes = "传入distributionPrint") + public R detail(DistributionPrintEntity distributionPrint) { DistributionPrintEntity detail = distributionPrintService.getOne(Condition.getQueryWrapper(distributionPrint)); return R.data(DistributionPrintWrapper.build().entityVO(detail)); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java index 9ba886268..069c15c9e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java @@ -65,10 +65,10 @@ public class DistributionReservationController extends BladeController { @GetMapping("/detail") @ApiOperationSupport(order = 1) @ApiOperation(value = "详情", notes = "传入distrbutionReservation") - public R detail(@ApiIgnore @RequestParam String reservationId) { - DistributionReservationVO distributionReservationVO = reservationService.getReservationDetail(reservationId); -// ReservationEntity detail = reservationService.getOne(Condition.getQueryWrapper(distrbutionReservation)); - return R.data(distributionReservationVO); + public R detail(DistributionReservationEntity distributionReservationEntity) { +// DistributionReservationVO distributionReservationVO = reservationService.getReservationDetail(reservationId); + DistributionReservationEntity detail = reservationService.getOne(Condition.getQueryWrapper(distributionReservationEntity)); + return R.data(detail); } /** * 预约列表 分页 @@ -100,8 +100,9 @@ public class DistributionReservationController extends BladeController { @ApiOperationSupport(order = 4) @ApiOperation(value = "新增", notes = "传入distrbutionReservation") public R save(@Valid @RequestBody DistributionReservationDTO distributionReservationDTO) { + boolean result = reservationService.insertReservation(distributionReservationDTO); - return R.status(reservationService.save(distributionReservationDTO)); + return R.status(result); } /** @@ -157,8 +158,8 @@ public class DistributionReservationController extends BladeController { @PostMapping("/confirmReservations") @ApiOperationSupport(order = 7) @ApiOperation(value = "批量确认预约", notes = "传入ids") - public R addIds(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { - R result = reservationService.addReservations(ids); + public R addIds( @RequestBody Map param) { + R result = reservationService.addReservations(param); return result; } @@ -168,9 +169,19 @@ public class DistributionReservationController extends BladeController { @PostMapping("/stockUpTask") @ApiOperationSupport(order = 7) @ApiOperation(value = "批量预约转备货任务") - public R stockUpTask(@ApiParam(value = "主键集合", required = true)@RequestBody Map stockUpInfo) { + public R stockUpTask(@RequestBody Map stockUpInfo) { R result = reservationService.stockUpTask(stockUpInfo); return result; } + /** + * 批量预约转备货任务 + */ + @GetMapping("/getReservationAddr") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "查询指定预约信息地址") + public R> getReservationAddr(@ApiParam(value = "主键集合", required = true)@RequestParam String ids) { + List result = reservationService.getReservationAddr(ids); + return R.data(result); + } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java index dfaa5d0b5..2e787e528 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java @@ -18,6 +18,8 @@ package com.logpm.distribution.controller; import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.service.IDistributionReservationService; +import com.logpm.distribution.vo.DistributionSignforsnmbVO; +import com.logpm.distribution.vo.DistributionstatisticsnmbVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -79,6 +81,18 @@ public class DistributionSignforController extends BladeController { return R.data(distributionSignforVO); } + + /** + * 签收管理 签收订单统计 + */ + @GetMapping("/statistics") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入distributionSignfor") + public R statistics(DistributionSignforDTO distributionSignfor) { + DistributionSignforsnmbVO distributionSignforsnmbVO = distributionSignforService.getNubTotal(distributionSignfor); + return R.data(distributionSignforsnmbVO); + } + /** * 签收管理 分页 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java index 857ea72a7..0f45aae35 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java @@ -157,4 +157,15 @@ public class DistributionStockArticleController extends BladeController { ExcelUtil.export(response, "配送在库订单数据" + DateUtil.time(), "配送在库订单数据表", list, DistributionStockArticleExcel.class); } + /** + * 配送单 添加增值服务 + */ + @PostMapping("/addIncrement") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R addIncrement(@ApiParam(value = "主键集合", required = true) @RequestBody Map addvalueInfo) { + R result = distributionStockArticleService.addIncrement(addvalueInfo); + return result; + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryInfoDTO.java similarity index 82% rename from blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryDTO.java rename to blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryInfoDTO.java index 30acd9bc3..aef86bb93 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryInfoDTO.java @@ -16,19 +16,19 @@ */ package com.logpm.distribution.dto; -import com.logpm.distribution.entity.DistributionDeliveryEntity; +import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; import lombok.Data; import lombok.EqualsAndHashCode; /** - * 配送单 数据传输对象实体类 + * 配送装车中间表 数据传输对象实体类 * * @author TJJ - * @since 2023-06-15 + * @since 2023-06-16 */ @Data @EqualsAndHashCode(callSuper = true) -public class DistributionDeliveryDTO extends DistributionDeliveryEntity { +public class DistributionDeliveryInfoDTO extends DistributionDeliveryInfoEntity { private static final long serialVersionUID = 1L; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryListDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryListDTO.java index 66a5ae247..8dee5a04e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryListDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryListDTO.java @@ -17,6 +17,7 @@ package com.logpm.distribution.dto; import com.logpm.distribution.entity.DistributionDeliveryListEntity; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; @@ -30,5 +31,9 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) public class DistributionDeliveryListDTO extends DistributionDeliveryListEntity { private static final long serialVersionUID = 1L; - + /** + * 查询创建时间 + */ + @ApiModelProperty(value = "查询创建时间") + private String createTime_query; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionPackadeliDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionPackadeliDTO.java new file mode 100644 index 000000000..f31238c6c --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionPackadeliDTO.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.dto; + +import com.logpm.distribution.entity.DistributionPackadeliEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 配送包条中间表 数据传输对象实体类 + * + * @author lmy + * @since 2023-06-17 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DistributionPackadeliDTO extends DistributionPackadeliEntity { + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationDTO.java index 4fe816250..ed0916854 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationDTO.java @@ -36,23 +36,29 @@ import java.util.Map; public class DistributionReservationDTO extends DistributionReservationEntity { private static final long serialVersionUID = 1L; - /** - * 备货区编号 - */ - @ApiModelProperty(value = "备货区编号") - private String goddsAreaId; - - /** - * 备货时间 - */ - @ApiModelProperty(value = "备货时间") - private Date stockupDate; +// /** +// * 备货区编号 +// */ +// @ApiModelProperty(value = "备货区编号") +// private String goddsAreaId; +// +// /** +// * 备货时间 +// */ +// @ApiModelProperty(value = "备货时间") +// private Date stockupDate; +// +// /** +// * 增值服务 +// */ +// @ApiModelProperty(value = "增值服务") +// private List addvalueInfo; /** - * 增值服务 + * 订单配送单编号,多条订单信息 */ - @ApiModelProperty(value = "增值服务") - private List addvalueInfo; + @ApiModelProperty(value = "订单配送单编号") + private String ids; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSigndetailDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSigndetailDTO.java index 0375fafcc..93a15c093 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSigndetailDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSigndetailDTO.java @@ -69,4 +69,12 @@ public class DistributionSigndetailDTO extends DistributionSigndetailEntity { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date sjsigningTime; + + /** + * 查询创建时间 + */ + @ApiModelProperty(value = "查询创建时间") + private String createTime_query; + + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforDTO.java index e8d6f6eb2..de3e1981f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforDTO.java @@ -17,6 +17,7 @@ package com.logpm.distribution.dto; import com.logpm.distribution.entity.DistributionSignforEntity; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; @@ -30,5 +31,9 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) public class DistributionSignforDTO extends DistributionSignforEntity { private static final long serialVersionUID = 1L; - + /** + * 查询创建时间 + */ + @ApiModelProperty(value = "查询创建时间") + private String createTime_query; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleDTO.java index ab97b6246..4292fe21b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleDTO.java @@ -16,10 +16,13 @@ */ package com.logpm.distribution.dto; +import com.logpm.distribution.entity.DistributionAddvalueEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.List; + /** * 配送在库订单 数据传输对象实体类 * @@ -31,4 +34,5 @@ import lombok.EqualsAndHashCode; public class DistributionStockArticleDTO extends DistributionStockArticleEntity { private static final long serialVersionUID = 1L; + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryInfoExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryInfoExcel.java new file mode 100644 index 000000000..f951565c5 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryInfoExcel.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.excel; + + +import lombok.Data; + +import java.util.Date; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import java.io.Serializable; + + +/** + * 配送装车中间表 Excel实体类 + * + * @author TJJ + * @since 2023-06-16 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class DistributionDeliveryInfoExcel implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("租户号") + private String tenantId; + /** + * 是否已删除 + */ + @ColumnWidth(20) + @ExcelProperty("是否已删除") + private Integer isDeleted; + /** + * 预约编号 + */ + @ColumnWidth(20) + @ExcelProperty("预约编号") + private String reservationId; + /** + * 配送单编号 + */ + @ColumnWidth(20) + @ExcelProperty("配送单编号") + private String deliveryId; + /** + * 预留1 + */ + @ColumnWidth(20) + @ExcelProperty("预留1") + private String reserve1; + /** + * 预留2 + */ + @ColumnWidth(20) + @ExcelProperty("预留2") + private String reserve2; + /** + * 预留3 + */ + @ColumnWidth(20) + @ExcelProperty("预留3") + private String reserve3; + /** + * 预留4 + */ + @ColumnWidth(20) + @ExcelProperty("预留4") + private String reserve4; + /** + * 预留5 + */ + @ColumnWidth(20) + @ExcelProperty("预留5") + private String reserve5; + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionPackadeliExcel.java similarity index 63% rename from blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryExcel.java rename to blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionPackadeliExcel.java index 07813a663..dc2472c7e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryExcel.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionPackadeliExcel.java @@ -20,7 +20,6 @@ package com.logpm.distribution.excel; import lombok.Data; import java.util.Date; -import java.math.BigDecimal; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ContentRowHeight; @@ -29,16 +28,16 @@ import java.io.Serializable; /** - * 配送单 Excel实体类 + * 配送包条中间表 Excel实体类 * - * @author TJJ - * @since 2023-06-15 + * @author lmy + * @since 2023-06-17 */ @Data @ColumnWidth(25) @HeadRowHeight(20) @ContentRowHeight(18) -public class DistributionDeliveryExcel implements Serializable { +public class DistributionPackadeliExcel implements Serializable { private static final long serialVersionUID = 1L; @@ -54,78 +53,6 @@ public class DistributionDeliveryExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("是否已删除") private Integer isDeleted; - /** - * 订单自编号 - */ - @ColumnWidth(20) - @ExcelProperty("订单自编号") - private String orderId; - /** - * 运单号 - */ - @ColumnWidth(20) - @ExcelProperty("运单号") - private String waybillId; - /** - * 商城编号 - */ - @ColumnWidth(20) - @ExcelProperty("商城编号") - private String shoppingId; - /** - * 收货地址 - */ - @ColumnWidth(20) - @ExcelProperty("收货地址") - private String deliveryAddress; - /** - * 收货人 - */ - @ColumnWidth(20) - @ExcelProperty("收货人") - private String consignee; - /** - * 在库时长 - */ - @ColumnWidth(20) - @ExcelProperty("在库时长") - private String durationInStock; - /** - * 总件数 - */ - @ColumnWidth(20) - @ExcelProperty("总件数") - private String goodsTotal; - /** - * 配载件数 - */ - @ColumnWidth(20) - @ExcelProperty("配载件数") - private String allocateTotal; - /** - * 体积 - */ - @ColumnWidth(20) - @ExcelProperty("体积") - private String volume; - /** - * 重量 - */ - @ColumnWidth(20) - @ExcelProperty("重量") - private String weight; - /** - * 到付费用 - */ - @ColumnWidth(20) - @ExcelProperty("到付费用") - private BigDecimal collectFee; - /** - * 待收货款 - */ - @ColumnWidth(20) - @ExcelProperty("待收货款") - private BigDecimal replaceFee; /** * 预留1 */ @@ -156,5 +83,35 @@ public class DistributionDeliveryExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("预留5") private String reserve5; + /** + * 配送管理表id + */ + @ColumnWidth(20) + @ExcelProperty("配送管理表id") + private Long deliveryId; + /** + * 包件表id + */ + @ColumnWidth(20) + @ExcelProperty("包件表id") + private Long parcelListId; + /** + * 配送状态 + */ + @ColumnWidth(20) + @ExcelProperty("配送状态") + private String state; + /** + * 数量 + */ + @ColumnWidth(20) + @ExcelProperty("数量") + private Integer number; + /** + * 出库数量 + */ + @ColumnWidth(20) + @ExcelProperty("出库数量") + private Integer outboundNumber; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryInfoClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryInfoClient.java new file mode 100644 index 000000000..366ef63a9 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryInfoClient.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.feign; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; +import com.logpm.distribution.service.IDistributionDeliveryInfoService; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +/** + * 配送装车中间表 Feign实现类 + * + * @author TJJ + * @since 2023-06-16 + */ +@ApiIgnore() +@RestController +@AllArgsConstructor +public class DistributionDeliveryInfoClient implements IDistributionDeliveryInfoClient { + + private final IDistributionDeliveryInfoService distributionDeliveryInfoService; + + @GetMapping(TOP) + @Override + public BladePage deliveryInfoTop(Integer current, Integer size) { + Query query = new Query(); + query.setCurrent(current); + query.setSize(size); + IPage page = distributionDeliveryInfoService.page(Condition.getPage(query)); + return BladePage.of(page); + } +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionPackadeliClient.java similarity index 72% rename from blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryClient.java rename to blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionPackadeliClient.java index 126d813b7..8a31f6481 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionPackadeliClient.java @@ -21,32 +21,32 @@ import lombok.AllArgsConstructor; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; -import com.logpm.distribution.entity.DistributionDeliveryEntity; -import com.logpm.distribution.service.IDistributionDeliveryService; +import com.logpm.distribution.entity.DistributionPackadeliEntity; +import com.logpm.distribution.service.IDistributionPackadeliService; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; /** - * 配送单 Feign实现类 + * 配送包条中间表 Feign实现类 * - * @author TJJ - * @since 2023-06-15 + * @author lmy + * @since 2023-06-17 */ @ApiIgnore() @RestController @AllArgsConstructor -public class DistributionDeliveryClient implements IDistributionDeliveryClient { +public class DistributionPackadeliClient implements IDistributionPackadeliClient { - private final IDistributionDeliveryService distributionDeliveryService; + private final IDistributionPackadeliService distributionPackadeliService; @Override @GetMapping(TOP) - public BladePage deliveryTop(Integer current, Integer size) { + public BladePage top(Integer current, Integer size) { Query query = new Query(); query.setCurrent(current); query.setSize(size); - IPage page = distributionDeliveryService.page(Condition.getPage(query)); + IPage page = distributionPackadeliService.page(Condition.getPage(query)); return BladePage.of(page); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml index b0cacc6a9..c7f9c4e3e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml @@ -26,7 +26,7 @@ - + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java similarity index 65% rename from blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryMapper.java rename to blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java index 4df428c02..5475a3260 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java @@ -16,9 +16,9 @@ */ package com.logpm.distribution.mapper; -import com.logpm.distribution.entity.DistributionDeliveryEntity; -import com.logpm.distribution.vo.DistributionDeliveryVO; -import com.logpm.distribution.excel.DistributionDeliveryExcel; +import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; +import com.logpm.distribution.vo.DistributionDeliveryInfoVO; +import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -26,21 +26,21 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * 配送单 Mapper 接口 + * 配送装车中间表 Mapper 接口 * * @author TJJ - * @since 2023-06-15 + * @since 2023-06-16 */ -public interface DistributionDeliveryMapper extends BaseMapper { +public interface DistributionDeliveryInfoMapper extends BaseMapper { /** * 自定义分页 * * @param page - * @param distributionDelivery + * @param distributionDeliveryInfo * @return */ - List selectDistributionDeliveryPage(IPage page, DistributionDeliveryVO distributionDelivery); + List selectDistributionDeliveryInfoPage(IPage page, DistributionDeliveryInfoVO distributionDeliveryInfo); /** @@ -49,6 +49,6 @@ public interface DistributionDeliveryMapper extends BaseMapper exportDistributionDelivery(@Param("ew") Wrapper queryWrapper); + List exportDistributionDeliveryInfo(@Param("ew") Wrapper queryWrapper); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml new file mode 100644 index 000000000..f7fcaba4b --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java index 297b21720..7ab71f2c2 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java @@ -16,6 +16,7 @@ */ package com.logpm.distribution.mapper; +import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.entity.DistributionDeliveryListEntity; import com.logpm.distribution.vo.DistributionDeliveryListVO; import com.logpm.distribution.excel.DistributionDeliveryListExcel; @@ -50,5 +51,28 @@ public interface DistributionDeliveryListMapper extends BaseMapper exportDistributionDeliveryList(@Param("ew") Wrapper queryWrapper); - + /** + * 商配车次 + * + * @return + */ + Integer selectBycommercialNub(@Param("param") DistributionDeliveryListDTO distributionDeliveryList); + /** + * 商配件数 + * + * @return + */ + Integer selectcommercialTotal(@Param("param") DistributionDeliveryListDTO distributionDeliveryList); + /** + * 市配车次 + * + * @return + */ + Integer selectmarketNub(@Param("param") DistributionDeliveryListDTO distributionDeliveryList); + /** + * 市配件数 + * + * @return + */ + Integer selectmarketTotal(DistributionDeliveryListDTO distributionDeliveryList); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml index aea9b9e18..b4ee0158f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml @@ -45,5 +45,125 @@ + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryMapper.xml deleted file mode 100644 index fe94b0226..000000000 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryMapper.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPackadeliMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPackadeliMapper.java new file mode 100644 index 000000000..44dd8bb4f --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPackadeliMapper.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.mapper; + +import com.logpm.distribution.entity.DistributionPackadeliEntity; +import com.logpm.distribution.vo.DistributionPackadeliVO; +import com.logpm.distribution.excel.DistributionPackadeliExcel; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * 配送包条中间表 Mapper 接口 + * + * @author lmy + * @since 2023-06-17 + */ +public interface DistributionPackadeliMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param distributionPackadeli + * @return + */ + List selectDistributionPackadeliPage(IPage page, DistributionPackadeliVO distributionPackadeli); + + + /** + * 获取导出数据 + * + * @param queryWrapper + * @return + */ + List exportDistributionPackadeli(@Param("ew") Wrapper queryWrapper); + /** + * 通过配送id查询包条数据 + * + * @param id + * @return DistributionPackadeliVO + */ + List selectjointList(Long id); +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPackadeliMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPackadeliMapper.xml new file mode 100644 index 000000000..2f5cd761a --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPackadeliMapper.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml index 452cad779..c61a98f70 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml @@ -29,6 +29,7 @@ + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml index b7c86aba3..5ebce6708 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml @@ -57,7 +57,7 @@ ldsf.consignee consignee, ldsf.signing_time signingTime, ldsf.sjsigning_time sjsigningTime, - ldsf.consignee_phone consigneePhone, + ldsf.delivery_phone deliveryPhone, ldsf.delivery_address deliveryAddress FROM logpm_distribution_signdetail ldsd diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java index 1a76e4c4a..a9995e8b2 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java @@ -16,6 +16,7 @@ */ package com.logpm.distribution.mapper; +import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.vo.DistributionSignforVO; import com.logpm.distribution.excel.DistributionSignforExcel; @@ -50,5 +51,32 @@ public interface DistributionSignforMapper extends BaseMapper exportDistributionSignfor(@Param("ew") Wrapper queryWrapper); - + /** + * 订单总数 + * + * @param distributionSignfor + * @return + */ + Integer selectOrdersNub(DistributionSignforDTO distributionSignfor); + /** + * 签收总数 + * + * @param distributionSignfor + * @return + */ + Integer selectSignedNub(DistributionSignforDTO distributionSignfor); + /** + * 未签收总数 + * + * @param distributionSignfor + * @return + */ + Integer selectUnsignedNub(DistributionSignforDTO distributionSignfor); + /** + * 客户总数 + * + * @param distributionSignfor + * @return + */ + List selectCustomNub(DistributionSignforDTO distributionSignfor); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index e718796d8..f98112f02 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml @@ -39,7 +39,7 @@ - + @@ -51,5 +51,17 @@ + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index 5a5e3bb12..706862dba 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -35,6 +35,8 @@ + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java similarity index 58% rename from blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryService.java rename to blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java index 3b6af8d5a..e74c452cb 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java @@ -17,31 +17,28 @@ package com.logpm.distribution.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.logpm.distribution.entity.DistributionDeliveryEntity; -import com.logpm.distribution.vo.DistributionDeliveryVO; -import com.logpm.distribution.excel.DistributionDeliveryExcel; +import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; +import com.logpm.distribution.vo.DistributionDeliveryInfoVO; +import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseService; -import org.springblade.core.tool.api.R; - import java.util.List; -import java.util.Map; /** - * 配送单 服务类 + * 配送装车中间表 服务类 * * @author TJJ - * @since 2023-06-15 + * @since 2023-06-16 */ -public interface IDistributionDeliveryService extends BaseService { +public interface IDistributionDeliveryInfoService extends BaseService { /** * 自定义分页 * * @param page - * @param distributionDelivery + * @param distributionDeliveryInfo * @return */ - IPage selectDistributionDeliveryPage(IPage page, DistributionDeliveryVO distributionDelivery); + IPage selectDistributionDeliveryInfoPage(IPage page, DistributionDeliveryInfoVO distributionDeliveryInfo); /** @@ -50,13 +47,6 @@ public interface IDistributionDeliveryService extends BaseService exportDistributionDelivery(Wrapper queryWrapper); - - /** - * 配送单添加增值服务 - * @param addvalueInfo 增值服务信息和配送单编号 - * @return - */ - R addIncrement(Map addvalueInfo); + List exportDistributionDeliveryInfo(Wrapper queryWrapper); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java index 36228f254..f2aed76b2 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java @@ -17,11 +17,14 @@ package com.logpm.distribution.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.entity.DistributionDeliveryListEntity; import com.logpm.distribution.vo.DistributionDeliveryListVO; import com.logpm.distribution.excel.DistributionDeliveryListExcel; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.vo.DistributionstatisticsnmbVO; import org.springblade.core.mp.base.BaseService; + import java.util.List; /** @@ -48,6 +51,7 @@ public interface IDistributionDeliveryListService extends BaseService exportDistributionDeliveryList(Wrapper queryWrapper); + /** * 获取其他表信息 * @@ -55,4 +59,19 @@ public interface IDistributionDeliveryListService extends BaseService { + /** + * 自定义分页 + * + * @param page + * @param distributionPackadeli + * @return + */ + IPage selectDistributionPackadeliPage(IPage page, DistributionPackadeliVO distributionPackadeli); + + + /** + * 导出数据 + * + * @param queryWrapper + * @return + */ + List exportDistributionPackadeli(Wrapper queryWrapper); + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java index b13631ed2..33eb2853e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java @@ -58,7 +58,7 @@ public interface IDistributionReservationService extends BaseService param); /** * 查询预约项详情 @@ -82,4 +82,10 @@ public interface IDistributionReservationService extends BaseService stockUpTask(Map stockUpInfo); + /** + * 查询指定预约信息地址信息 + * @param ids id字符串 + * @return + */ + List getReservationAddr(String ids); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java index 60f8b89bd..392a2f1fb 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java @@ -17,10 +17,13 @@ package com.logpm.distribution.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.vo.DistributionSignforVO; import com.logpm.distribution.excel.DistributionSignforExcel; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.vo.DistributionSignforsnmbVO; +import com.logpm.distribution.vo.DistributionstatisticsnmbVO; import org.springblade.core.mp.base.BaseService; import java.util.List; @@ -48,5 +51,10 @@ public interface IDistributionSignforService extends BaseService exportDistributionSignfor(Wrapper queryWrapper); - + /** + * 签收订单统计 + * + * @return + */ + DistributionSignforsnmbVO getNubTotal(DistributionSignforDTO distributionSignfor); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java index d1b14c762..779293284 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java @@ -22,7 +22,10 @@ import com.logpm.distribution.vo.DistributionStockArticleVO; import com.logpm.distribution.excel.DistributionStockArticleExcel; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseService; +import org.springblade.core.tool.api.R; + import java.util.List; +import java.util.Map; /** * 配送在库订单 服务类 @@ -50,4 +53,12 @@ public interface IDistributionStockArticleService extends BaseService exportDistributionStockArticle(Wrapper queryWrapper); Boolean saveStock(String ids); + + /** + * 订单添加增值服务 + * @param addvalueInfo + * @return + */ + R addIncrement(Map addvalueInfo); + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java new file mode 100644 index 000000000..8fa0088fd --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.service.impl; + +import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; +import com.logpm.distribution.vo.DistributionDeliveryInfoVO; +import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; +import com.logpm.distribution.mapper.DistributionDeliveryInfoMapper; +import com.logpm.distribution.service.IDistributionDeliveryInfoService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springblade.core.mp.base.BaseServiceImpl; +import java.util.List; + +/** + * 配送装车中间表 服务实现类 + * + * @author TJJ + * @since 2023-06-16 + */ +@Service +public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl implements IDistributionDeliveryInfoService { + + @Override + public IPage selectDistributionDeliveryInfoPage(IPage page, DistributionDeliveryInfoVO distributionDeliveryInfo) { + return page.setRecords(baseMapper.selectDistributionDeliveryInfoPage(page, distributionDeliveryInfo)); + } + + + @Override + public List exportDistributionDeliveryInfo(Wrapper queryWrapper) { + List distributionDeliveryInfoList = baseMapper.exportDistributionDeliveryInfo(queryWrapper); + //distributionDeliveryInfoList.forEach(distributionDeliveryInfo -> { + // distributionDeliveryInfo.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionDeliveryInfo.getType())); + //}); + return distributionDeliveryInfoList; + } + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index ef93cc809..bf13a53a6 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -16,16 +16,32 @@ */ package com.logpm.distribution.service.impl; -import com.logpm.distribution.entity.DistributionDeliveryListEntity; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.logpm.distribution.dto.DistributionDeliveryListDTO; +import com.logpm.distribution.dto.DistributionSignforDTO; +import com.logpm.distribution.entity.*; +import com.logpm.distribution.mapper.*; import com.logpm.distribution.vo.DistributionDeliveryListVO; import com.logpm.distribution.excel.DistributionDeliveryListExcel; -import com.logpm.distribution.mapper.DistributionDeliveryListMapper; import com.logpm.distribution.service.IDistributionDeliveryListService; +import com.logpm.distribution.vo.DistributionPackadeliVO; +import com.logpm.distribution.vo.DistributionSignforVO; +import com.logpm.distribution.vo.DistributionstatisticsnmbVO; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.formula.functions.T; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigInteger; +import java.text.SimpleDateFormat; +import java.util.Arrays; import java.util.List; /** @@ -35,7 +51,13 @@ import java.util.List; * @since 2023-06-16 */ @Service +@AllArgsConstructor +@Slf4j public class DistributionDeliveryListServiceImpl extends BaseServiceImpl implements IDistributionDeliveryListService { + private final DistributionPackadeliMapper distributionPackadeliMapper; + private final DistributionDeliveryInfoMapper distributionDeliveryInfoMapper; + private final DistributionReservationMapper distributionReservationMapper; + private final DistributionSignforMapper distributionSignforMapper; @Override public IPage selectDistributionDeliveryListPage(IPage page, DistributionDeliveryListVO distributionDeliveryList) { @@ -56,8 +78,61 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl list = distributionPackadeliMapper.selectjointList(detail.getId()); + distributionDeliveryListVO.setPackadeList(list); + return distributionDeliveryListVO; + } + + @Override + public DistributionstatisticsnmbVO getNubTotal(DistributionDeliveryListDTO distributionDeliveryList) { + //转换创建时间 + if (null != distributionDeliveryList.getCreateTime()) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + distributionDeliveryList.setCreateTime_query(sdf.format(distributionDeliveryList.getCreateTime())); + } + DistributionstatisticsnmbVO distributionstatisticsnmbVO = new DistributionstatisticsnmbVO(); + //商配车次 + Integer commercialNub = baseMapper.selectBycommercialNub(distributionDeliveryList); + //商配件数 + Integer commercialTotal = baseMapper.selectcommercialTotal(distributionDeliveryList); + //市配车次 + Integer marketNub = baseMapper.selectmarketNub(distributionDeliveryList); + //市配件数 + Integer marketTotal = baseMapper.selectmarketTotal(distributionDeliveryList); + //配送总车次 + distributionstatisticsnmbVO.setVehiclesNub(commercialNub + marketNub); + //配送总件数 + distributionstatisticsnmbVO.setDeliveriesTotal(commercialTotal + marketTotal); + distributionstatisticsnmbVO.setCommercialNub(commercialNub); + distributionstatisticsnmbVO.setCommercialTotal(commercialTotal); + distributionstatisticsnmbVO.setMarketNub(marketNub); + distributionstatisticsnmbVO.setMarketTotal(marketTotal); + return distributionstatisticsnmbVO; + } + + @Override + @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class) + public Integer start(DistributionDeliveryListDTO distributionDeliveryList) { + log.info("开始发车>>>>>>>>>{}", distributionDeliveryList); + //获取关联的客户信息 + String reservationId = distributionDeliveryList.getReservationId(); + List reservationIds = Arrays.asList(Long.valueOf(String.valueOf(reservationId.split(",")))); + //查询客户信息,装车情况 + List distributionDeliveryInfoEntities = distributionDeliveryInfoMapper.selectList(new QueryWrapper().lambda() + .eq(DistributionDeliveryInfoEntity::getLoadedState, "2") + .in(null != reservationIds && reservationIds.size() > 0, DistributionDeliveryInfoEntity::getReservationId, reservationIds) + ); + //统计客户的配送数量,加入签收表(通过预约单查询总数量) + List distributionReservationEntities = distributionReservationMapper.selectBatchIds(reservationIds); + DistributionSignforVO distributionSignforVO = new DistributionSignforVO(); + + //插入配送管理表 + //获取关联订单 + String orderId = distributionDeliveryList.getOrderId(); + List orderIds = Arrays.asList(Long.valueOf(String.valueOf(orderId.split(",")))); return null; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryServiceImpl.java deleted file mode 100644 index cde4e4ee5..000000000 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryServiceImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.logpm.distribution.service.impl; - -import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; -import com.logpm.distribution.entity.DistributionAddvalueEntity; -import com.logpm.distribution.entity.DistributionDeliveryEntity; -import com.logpm.distribution.mapper.DistributionAddvalueMapper; -import com.logpm.distribution.service.IDistributionAddvalueService; -import com.logpm.distribution.vo.DistributionDeliveryVO; -import com.logpm.distribution.excel.DistributionDeliveryExcel; -import com.logpm.distribution.mapper.DistributionDeliveryMapper; -import com.logpm.distribution.service.IDistributionDeliveryService; -import lombok.AllArgsConstructor; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.Func; -import org.springframework.beans.BeanUtils; -import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springblade.core.mp.base.BaseServiceImpl; -import org.springframework.transaction.annotation.Transactional; - -import java.math.BigDecimal; -import java.util.List; -import java.util.Map; - -/** - * 配送单 服务实现类 - * - * @author TJJ - * @since 2023-06-15 - */ -@Service -@AllArgsConstructor -public class DistributionDeliveryServiceImpl extends BaseServiceImpl implements IDistributionDeliveryService { - - private DistributionDeliveryMapper distributionDeliveryMapper; - - private IDistributionAddvalueService distributionAddvalueService; - - @Override - public IPage selectDistributionDeliveryPage(IPage page, DistributionDeliveryVO distributionDelivery) { - return page.setRecords(baseMapper.selectDistributionDeliveryPage(page, distributionDelivery)); - } - - - @Override - public List exportDistributionDelivery(Wrapper queryWrapper) { - List distributionDeliveryList = baseMapper.exportDistributionDelivery(queryWrapper); - //distributionDeliveryList.forEach(distributionDelivery -> { - // distributionDelivery.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionDelivery.getType())); - //}); - return distributionDeliveryList; - } - - @Override - @Transactional - public R addIncrement(Map addvalueInfo) { - boolean result = false; - if (!Func.isEmpty(addvalueInfo)){ - String deliveryId = (String) addvalueInfo.get("id"); - DistributionDeliveryEntity distributionDeliveryEntity = distributionDeliveryMapper.selectById(deliveryId); - //获取配送单增值服务费用 - BigDecimal addvalueFee = distributionDeliveryEntity.getAddvalueFee(); - if (!Func.isEmpty(distributionDeliveryEntity)){ - List> addvalueEntities = (List>) addvalueInfo.get("addvalue"); - if (!Func.isEmpty(addvalueEntities)){ - for (Map addvalueEntityInfo : addvalueEntities) { - //这里需要针对增值服务类型的价格进行查询并且进行累加,这里目前采取使用用户填写的方式 - //TODO 这里应该和基础价格进行联动,不遵循用户填写而是依靠价格基础表 - String feeStr = (String) addvalueEntityInfo.get("fee"); - BigDecimal fee = new BigDecimal(feeStr); - DistributionAddvalueEntity addvalueEntity = Func.copy(addvalueEntityInfo, DistributionAddvalueEntity.class); - //设置关联的配送编号 - addvalueEntity.setDeliveryId(distributionDeliveryEntity.getId()); - //完成每一项的增值服务费用累加 - addvalueEntity.setFee(fee); - addvalueFee.add(fee); - result = distributionAddvalueService.save(addvalueEntity); - - } - //TODO 这里就应该对累加的增值服务费用和配送单本身费用进行累加并完成数据修改 - result = SqlHelper.retBool(distributionDeliveryMapper.updateById(distributionDeliveryEntity)); - if (!result){ - - log.error("sql执行结果:+{"+result+"}"); - return R.fail("服务器正忙,请稍后再试!!!"); - } - } - } - } - //这里根据id查询配送单信息 - return R.status(result); - } - -} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionPackadeliServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionPackadeliServiceImpl.java new file mode 100644 index 000000000..2677a5f38 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionPackadeliServiceImpl.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.service.impl; + +import com.logpm.distribution.entity.DistributionPackadeliEntity; +import com.logpm.distribution.vo.DistributionPackadeliVO; +import com.logpm.distribution.excel.DistributionPackadeliExcel; +import com.logpm.distribution.mapper.DistributionPackadeliMapper; +import com.logpm.distribution.service.IDistributionPackadeliService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springblade.core.mp.base.BaseServiceImpl; +import java.util.List; + +/** + * 配送包条中间表 服务实现类 + * + * @author lmy + * @since 2023-06-17 + */ +@Service +public class DistributionPackadeliServiceImpl extends BaseServiceImpl implements IDistributionPackadeliService { + + @Override + public IPage selectDistributionPackadeliPage(IPage page, DistributionPackadeliVO distributionPackadeli) { + return page.setRecords(baseMapper.selectDistributionPackadeliPage(page, distributionPackadeli)); + } + + + @Override + public List exportDistributionPackadeli(Wrapper queryWrapper) { + List distributionPackadeliList = baseMapper.exportDistributionPackadeli(queryWrapper); + //distributionPackadeliList.forEach(distributionPackadeli -> { + // distributionPackadeli.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionPackadeli.getType())); + //}); + return distributionPackadeliList; + } + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java index d9df251bc..5e8969b91 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java @@ -16,24 +16,21 @@ */ package com.logpm.distribution.service.impl; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; import com.logpm.distribution.dto.DistributionReservationDTO; import com.logpm.distribution.entity.DistributionReservationEntity; +import com.logpm.distribution.entity.DistributionStockArticleEntity; import com.logpm.distribution.entity.DistributionStockupEntity; import com.logpm.distribution.entity.DistributionStockupInfoEntity; import com.logpm.distribution.excel.DistributionReservationExcel; import com.logpm.distribution.mapper.DistributionReservationMapper; import com.logpm.distribution.mapper.DistributionStockupInfoMapper; -import com.logpm.distribution.mapper.DistributionStockupMapper; import com.logpm.distribution.service.IDistributionReservationService; -import com.logpm.distribution.service.IDistributionStockupInfoService; +import com.logpm.distribution.service.IDistributionStockArticleService; import com.logpm.distribution.service.IDistributionStockupService; import com.logpm.distribution.vo.DistributionReservationVO; import lombok.AllArgsConstructor; -import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; -import org.springblade.common.utils.CommonUtil; -import org.springblade.core.secure.BladeUser; -import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springframework.beans.BeanUtils; @@ -44,10 +41,10 @@ import org.springblade.core.mp.base.BaseServiceImpl; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; -import java.text.DateFormat; +import java.math.BigDecimal; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.time.LocalDate; +import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; @@ -68,6 +65,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl selectDistrbutionReservationPage(IPage page, DistributionReservationVO distrbutionReservation) { @@ -85,7 +83,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl addReservations(String ids) { + public R addReservations(Map param) { + String ids = (String) param.get("ids"); //对参数进行校验 List longs = Func.toLongList(ids); if (Func.isEmpty(longs)){ @@ -112,15 +111,60 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl ids = Func.toLongList(idsStr); + if (Func.isEmpty(ids)){ + log.error("ids参数错误:+{"+ids+"}"); + return false; + } + BigDecimal collectFee = new BigDecimal("0"); + BigDecimal replaceFee = new BigDecimal("0") ; + StringBuffer buffer = new StringBuffer(); + List deliveryEntities = new ArrayList<>(); + for (int i = 0; i < ids.size(); i++) { + BaseMapper stockArticleMapper = distributionStockArticleService.getBaseMapper(); + DistributionStockArticleEntity distributionStockArticleEntity = stockArticleMapper.selectById(ids.get(i)); +// deliveryEntities.add(distributionDeliveryEntity); +// collectFee = collectFee.add(distributionDeliveryEntity.getCollectFee()); +// //待收货款累加 +// replaceFee = replaceFee.add(distributionDeliveryEntity.getReplaceFee()); +// String orderId = distributionDeliveryEntity.getOrderId(); + buffer.append(distributionStockArticleEntity.getId()).append(","); + } + buffer.deleteCharAt(buffer.length()-1); + DistributionReservationEntity distributionReservationEntity = new DistributionReservationEntity(); + BeanUtils.copyProperties(distributionReservationDTO, distributionReservationEntity); + distributionReservationEntity.setCollectFee(collectFee); + distributionReservationEntity.setReplaceFee(replaceFee); + //设置订单自编号,这里的数据属于冗余部分 + distributionReservationEntity.setOrderId(buffer.toString()); + //设置状态未备货 + distributionReservationEntity.setStockupStatus("1"); + //设置预约状态为待确认 + distributionReservationEntity.setReservationStatus("1"); + //设置预约信息来源是自建的方式 + distributionReservationEntity.setOrderSource("3"); + + //这里就对新增的预约信息进行保存 + this.save(distributionReservationEntity); + Long reservationEntityId = distributionReservationEntity.getId(); + //保存完之后获取新插入的预约服务获取ID然后订单派送单进行绑定 + deliveryEntities.forEach(i->{ + i.setReservationId(reservationEntityId); + distributionStockArticleService.getBaseMapper().updateById(i); + }); + }catch (Exception e){ + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + log.error("出现异常:+{"+e.getMessage()+"}"); return false; } - DistributionReservationEntity distributionReservationEntity = new DistributionReservationEntity(); - BeanUtils.copyProperties(distributionReservationDTO, distributionReservationEntity); - //这里还需要对DTO中的服务内容进行保存 - - return false; + return true; } @@ -157,7 +201,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl getReservationAddr(String ids) { + if (Func.isBlank(ids)){ + return null; + } + String[] split = ids.split(","); + List distributionReservationVOS = new ArrayList<>(); + if (split.length==1){ + DistributionReservationEntity reservationEntity = this.getBaseMapper().selectById(ids); + distributionReservationVOS.add(reservationEntity); + }else { + for (String s : split) { + DistributionReservationEntity reservationEntity = this.getBaseMapper().selectById(s); + distributionReservationVOS.add(reservationEntity); + } + } + return distributionReservationVOS; + } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 8108652cc..5ad0ad46e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -16,15 +16,20 @@ */ package com.logpm.distribution.service.impl; +import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.vo.DistributionSignforVO; import com.logpm.distribution.excel.DistributionSignforExcel; import com.logpm.distribution.mapper.DistributionSignforMapper; import com.logpm.distribution.service.IDistributionSignforService; +import com.logpm.distribution.vo.DistributionSignforsnmbVO; +import com.logpm.distribution.vo.DistributionstatisticsnmbVO; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseServiceImpl; + +import java.text.SimpleDateFormat; import java.util.List; /** @@ -51,4 +56,27 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionSignforEntityList = baseMapper.selectCustomNub(distributionSignfor); + //订单总数 + Integer OrdersNub = baseMapper.selectOrdersNub(distributionSignfor); + //已签收总数 + Integer SignedNub = baseMapper.selectSignedNub(distributionSignfor); +// //未签收总数 +// Integer UnsignedNub = baseMapper.selectUnsignedNub(distributionSignfor); + distributionSignforsnmbVO.setCustomNub(distributionSignforEntityList.size()); + distributionSignforsnmbVO.setOrdersNub(OrdersNub); + distributionSignforsnmbVO.setUnsignedNub(OrdersNub - SignedNub); + distributionSignforsnmbVO.setSignedNub(SignedNub); + return distributionSignforsnmbVO; + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index af00d0341..c604b9026 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -16,10 +16,12 @@ */ package com.logpm.distribution.service.impl; -import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; +import com.logpm.distribution.entity.DistributionAddvalueEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity; import com.logpm.distribution.entity.DistributionStockListEntity; +import com.logpm.distribution.service.IDistributionAddvalueService; import com.logpm.distribution.service.IDistributionStockListService; import com.logpm.distribution.vo.DistributionStockArticleVO; import com.logpm.distribution.excel.DistributionStockArticleExcel; @@ -27,13 +29,17 @@ import com.logpm.distribution.mapper.DistributionStockArticleMapper; import com.logpm.distribution.service.IDistributionStockArticleService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseServiceImpl; import org.springframework.transaction.annotation.Transactional; +import java.math.BigDecimal; import java.util.List; +import java.util.Map; /** * 配送在库订单 服务实现类 @@ -48,6 +54,10 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl selectDistributionStockArticlePage(IPage page, DistributionStockArticleVO distributionStockArticle) { return page.setRecords(baseMapper.selectDistributionStockArticlePage(page, distributionStockArticle)); @@ -103,4 +113,42 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl addIncrement(Map addvalueInfo) { + boolean result = false; + if (!Func.isEmpty(addvalueInfo)){ + String id = (String) addvalueInfo.get("id"); + DistributionStockArticleEntity distributionStockArticleEntity = baseMapper.selectById(Long.parseLong(id)); +// //获取配送单增值服务费用 + if (!Func.isEmpty(distributionStockArticleEntity)){ + List> addvalueEntities = (List>) addvalueInfo.get("addvalue"); + if (!Func.isEmpty(addvalueEntities)){ + BigDecimal sum = BigDecimal.ZERO; + for (Map addvalueEntityInfo : addvalueEntities) { + //这里需要针对增值服务类型的价格进行查询并且进行累加,这里目前采取使用用户填写的方式 + //TODO 这里应该和基础价格进行联动,不遵循用户填写而是依靠价格基础表 + String feeStr = (String) addvalueEntityInfo.get("fee"); + BigDecimal fee = new BigDecimal(feeStr); + DistributionAddvalueEntity addvalueEntity = Func.copy(addvalueEntityInfo, DistributionAddvalueEntity.class); + //设置关联的配送编号 + addvalueEntity.setStockArticleId(distributionStockArticleEntity.getId()); + //完成每一项的增值服务费用累加 + addvalueEntity.setFee(fee); + sum = sum.add(fee); + result = distributionAddvalueService.save(addvalueEntity); + + } + //TODO 这里就应该对累加的增值服务费用和配送单本身费用进行累加并完成数据修改 + distributionStockArticleEntity.setFee(sum); + result = SqlHelper.retBool(this.getBaseMapper().updateById(distributionStockArticleEntity)); + if (!result){ + log.error("sql执行结果:+{"+result+"}"); + return R.fail("服务器正忙,请稍后再试!!!"); + } + } + } + } + return R.status(result); + } + } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/bean/Resp.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/bean/Resp.java index 8ff501472..3e7383b06 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/bean/Resp.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/bean/Resp.java @@ -7,13 +7,23 @@ import org.springblade.core.tool.api.R; public class Resp extends R { private String orderNo; + private String deliveryNumber; - public static Resp successOrderNo(String orderNo,String msg){ + public static Resp successOrderNo(String orderNo,String deliveryNumber,String msg){ Resp resp = new Resp(); resp.setMsg(msg); resp.setCode(1); resp.setSuccess(true); resp.setOrderNo(orderNo); + resp.setDeliveryNumber(deliveryNumber); + return resp; + } + + public static Resp fail(int code,String message){ + Resp resp = new Resp(); + resp.setMsg(message); + resp.setCode(code); + resp.setSuccess(false); return resp; } } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/controller/PanFactoryDataController.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/controller/PanFactoryDataController.java index 92ee6f8d7..3c134eaaf 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/controller/PanFactoryDataController.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/controller/PanFactoryDataController.java @@ -18,6 +18,7 @@ package com.logpm.factory.snm.controller; import cn.hutool.core.bean.BeanUtil; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.factory.snm.bean.Resp; import com.logpm.factory.snm.dto.*; @@ -39,6 +40,7 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * 皮阿诺数据 控制器 @@ -106,6 +108,16 @@ public class PanFactoryDataController extends BladeController { panOrderStatusLog.setType(3); panOrderStatusLogService.save(panOrderStatusLog); + //判断数据是否已存入 + String orderNo = factoryOrderDTO.getOrderNo(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("order_no",orderNo); + PanFactoryOrder one = factoryOrderService.getOne(queryWrapper); + if(!Objects.isNull(one)){ + log.warn("############data: 订单数据已存在 orderNo={}",orderNo); + return Resp.fail(400,"订单数据已存在"); + } + PanFactoryOrder factoryOrder = new PanFactoryOrder(); BeanUtil.copyProperties(factoryOrderDTO,factoryOrder); factoryOrder.setCorpid(corpId); @@ -141,7 +153,7 @@ public class PanFactoryDataController extends BladeController { //开启异步线程处理数据 syncDataService.handlerPanDataToHt(); - return Resp.successOrderNo(factoryOrder.getOrderNo(),"SUCCESS"); + return Resp.successOrderNo(factoryOrder.getOrderNo(),factoryOrder.getDeliveryNumber(),"SUCCESS"); } diff --git a/doc/dpm/物流租户系统.pdma.json b/doc/dpm/物流租户系统.pdma.json index 471d49ca9..060e61990 100644 --- a/doc/dpm/物流租户系统.pdma.json +++ b/doc/dpm/物流租户系统.pdma.json @@ -4,7 +4,7 @@ "avatar": "", "version": "4.5.1", "createdTime": "2023-3-27 13:32:56", - "updatedTime": "2023-6-19 15:16:48", + "updatedTime": "2023-6-21 15:20:31", "dbConns": [], "profile": { "default": { @@ -24071,8 +24071,8 @@ "defKey": "create_dept", "defName": "创建部门", "comment": "", - "type": "", - "len": "", + "type": "VARCHAR", + "len": 20, "scale": "", "primaryKey": false, "notNull": false, @@ -24081,10 +24081,27 @@ "hideInGraph": false, "refDict": null, "extProps": {}, - "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "domain": "", "id": "44A60BE3-F1F2-4B66-8C87-4207CFBDC673", "uiHint": null }, + { + "defKey": "pid", + "defName": "父id", + "comment": "", + "type": "VARCHAR", + "len": 20, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "DA41B24B-31CC-4D6E-9686-AB6D93DF4D57" + }, { "defKey": "id", "defName": "主键", @@ -24215,8 +24232,8 @@ "defKey": "type_service", "defName": "客户类型", "comment": "1 C端 2 B端", - "type": "", - "len": "", + "type": "VARCHAR", + "len": 1, "scale": "", "primaryKey": false, "notNull": false, @@ -24225,7 +24242,7 @@ "hideInGraph": false, "refDict": null, "extProps": {}, - "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "domain": "", "id": "91D28E58-99BE-4949-B0F8-B4F23EEE1366", "uiHint": null }, @@ -24336,6 +24353,23 @@ "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", "id": "6F07DDC1-CD80-440D-9169-64D3DFFC6AA8", "uiHint": null + }, + { + "defKey": "client_type", + "defName": "客户类型", + "comment": "1 工厂 2 商场 3装饰 4个人", + "type": "VARCHAR", + "len": 1, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "C6ED09EE-8941-4810-ACD6-632EDEC631F5" } ], "correlations": [], @@ -48615,7 +48649,7 @@ } }, "defKey": "logpm_basicdata_store_business", - "defName": "门店业务记录", + "defName": "客户业务类型记录", "comment": "", "properties": { "partitioned by": "(date string)", @@ -48996,8 +49030,8 @@ "defKey": "type_service", "defName": "服务类型", "comment": "1 提 2干 3仓 4配 5装", - "type": "", - "len": "", + "type": "VARCHAR", + "len": 1, "scale": "", "primaryKey": false, "notNull": false, @@ -49006,12 +49040,12 @@ "hideInGraph": false, "refDict": "", "extProps": {}, - "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "domain": "", "id": "28C73092-7B20-4C92-BD21-24D83AB25B3E" }, { - "defKey": "shop_id", - "defName": "门店ID", + "defKey": "client_id", + "defName": "客户类型", "comment": "", "type": "VARCHAR", "len": 20, @@ -49046,6 +49080,447 @@ ], "correlations": [], "indexes": [] + }, + { + "id": "0781B8B3-6956-45F3-A2CA-8CF2180577BD", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } + }, + "defKey": "logpm_basicdata_tripartite_mall", + "defName": "客户三方商城", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + }, + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "tenant_id", + "defName": "租户号", + "comment": "", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "refDict": "", + "uiHint": "", + "id": "3496EF62-6B3D-46CA-AA12-3D4FD7B799CB" + }, + { + "defKey": "create_user", + "defName": "创建人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "06869D26-E9C6-45F3-A6E2-86942F9A63F0" + }, + { + "defKey": "create_time", + "defName": "创建时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "DD43FFCC-192F-487B-B657-610EC75CDD41" + }, + { + "defKey": "update_user", + "defName": "更新人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "FD924B56-8042-47F0-83DF-1C438C24D4B0" + }, + { + "defKey": "update_time", + "defName": "更新时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "7B9C8E59-157B-4737-AEB4-85C6C2E1A5E8" + }, + { + "defKey": "status", + "defName": "状态", + "comment": "", + "type": "INT", + "len": 2, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "8C22F71D-3495-46AC-A2B1-DB8AFEFF0023" + }, + { + "defKey": "is_deleted", + "defName": "是否已删除", + "comment": "", + "type": "INT", + "len": 2, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "1DC02C6F-B577-4CD5-9387-57F884C7D0C6" + }, + { + "defKey": "create_dept", + "defName": "创建部门", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "3FDE7DB5-A53D-440B-A06C-F55B35C6E987" + }, + { + "defKey": "id", + "defName": "主键", + "comment": "", + "type": "INT", + "len": 20, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "C0FCE8D7-633E-4F2B-88EF-0A549A851356" + }, + { + "defKey": "reserve1", + "defName": "预留1", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "DB5B1289-A6F2-4C41-9803-485CD1669ABA" + }, + { + "defKey": "reserve2", + "defName": "预留2", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "F018FCF9-993F-4778-8194-BB54364AC9F3" + }, + { + "defKey": "reserve3", + "defName": "预留3", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "DE3A9664-369B-4F9A-A12F-E735455DADE0" + }, + { + "defKey": "reserve4", + "defName": "预留4", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "781B1F51-F891-4F6B-A2FA-BE14C89C3428" + }, + { + "defKey": "reserve5", + "defName": "预留5", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "02EF13CE-BEA7-4370-8557-733F801B36CB" + }, + { + "defKey": "client", + "defName": "客户ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "8A3579EB-9294-4EB3-B9DA-F149083C5510" + }, + { + "defKey": "tripartite_mall", + "defName": "三方商城", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "0A43D4D4-034E-4733-B84B-7E09650C3BED" + }, + { + "defKey": "tripartite_coding", + "defName": "三方编码", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "EAB3535F-E4FE-43C6-8759-F658171BA9CF" + } + ], + "correlations": [], + "indexes": [] } ], "views": [], @@ -49128,7 +49603,8 @@ "B8E50F9F-033E-4F86-8443-D849F4A0F013", "865E2039-46B4-4BF2-948F-696FFB16E73E", "74441E51-EDB1-49F8-AD27-8506AF889909", - "02AD799B-26B6-4490-AC39-A95DC978399D" + "02AD799B-26B6-4490-AC39-A95DC978399D", + "0781B8B3-6956-45F3-A2CA-8CF2180577BD" ], "refViews": [], "refDiagrams": [], @@ -49710,4 +50186,4 @@ } ], "dbConn": [] -} \ No newline at end of file +}