From 9dbdbf4558907bd47a750da111954f9e9e53b0dc Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Mon, 19 Jun 2023 18:02:53 +0800 Subject: [PATCH 1/6] =?UTF-8?q?1.=E9=85=8D=E9=80=81=E8=BD=A6=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/entity/BasicDelineNodeEntity.java | 12 +- .../DistributionDeliveryListEntity.java | 10 ++ .../entity/DistributionPackadeliEntity.java | 90 +++++++++++ .../entity/DistributionSigndetailEntity.java | 5 - .../feign/IDistributionPackadeliClient.java | 50 ++++++ .../vo/DistributionDeliveryListVO.java | 8 +- .../vo/DistributionPackadeliVO.java | 97 +++++++++++ .../vo/DistributionstatisticsnmbVO.java | 47 ++++++ .../DistributionDeliveryListController.java | 14 ++ .../DistributionPackadeliController.java | 150 ++++++++++++++++++ .../dto/DistributionDeliveryListDTO.java | 7 +- .../dto/DistributionPackadeliDTO.java | 34 ++++ .../dto/DistributionSigndetailDTO.java | 8 + .../excel/DistributionPackadeliExcel.java | 117 ++++++++++++++ .../feign/DistributionPackadeliClient.java | 53 +++++++ .../DistributionDeliveryListMapper.java | 26 ++- .../mapper/DistributionDeliveryListMapper.xml | 120 ++++++++++++++ .../mapper/DistributionPackadeliMapper.java | 60 +++++++ .../mapper/DistributionPackadeliMapper.xml | 62 ++++++++ .../IDistributionDeliveryListService.java | 12 ++ .../IDistributionPackadeliService.java | 52 ++++++ .../DistributionDeliveryListServiceImpl.java | 43 ++++- .../DistributionPackadeliServiceImpl.java | 54 +++++++ 23 files changed, 1113 insertions(+), 18 deletions(-) create mode 100644 blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionPackadeliEntity.java create mode 100644 blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionPackadeliClient.java create mode 100644 blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionPackadeliVO.java create mode 100644 blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionstatisticsnmbVO.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionPackadeliController.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionPackadeliDTO.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionPackadeliExcel.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionPackadeliClient.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPackadeliMapper.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPackadeliMapper.xml create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionPackadeliService.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionPackadeliServiceImpl.java 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-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..9afd60813 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 @@ -143,5 +143,15 @@ public class DistributionDeliveryListEntity extends TenantEntity { */ @ApiModelProperty(value = "预约表id") private String reservationId; + /** + * 备货时间 + */ + @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/DistributionPackadeliEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionPackadeliEntity.java new file mode 100644 index 000000000..ea564c2f6 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionPackadeliEntity.java @@ -0,0 +1,90 @@ +/* + * 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 lmy + * @since 2023-06-17 + */ +@Data +@TableName("logpm_distribution_packadeli") +@ApiModel(value = "DistributionPackadeli对象", description = "配送包条中间表") +@EqualsAndHashCode(callSuper = true) +public class DistributionPackadeliEntity 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 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/DistributionSigndetailEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSigndetailEntity.java index 4cd3104a6..9e894a2c8 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 @@ -149,10 +149,5 @@ public class DistributionSigndetailEntity extends TenantEntity { @ApiModelProperty(value = "品牌") private String brand; - /** - * 查询创建时间 - */ - @ApiModelProperty(value = "品牌") - private String createTime_query; } 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/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/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-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..ca1b9a66d 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,18 @@ 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); + } + /** * 配送管理 自定义分页 */ 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/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/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/excel/DistributionPackadeliExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionPackadeliExcel.java new file mode 100644 index 000000000..dc2472c7e --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionPackadeliExcel.java @@ -0,0 +1,117 @@ +/* + * 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 lmy + * @since 2023-06-17 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class DistributionPackadeliExcel 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 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/DistributionPackadeliClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionPackadeliClient.java new file mode 100644 index 000000000..8a31f6481 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionPackadeliClient.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.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.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实现类 + * + * @author lmy + * @since 2023-06-17 + */ +@ApiIgnore() +@RestController +@AllArgsConstructor +public class DistributionPackadeliClient implements IDistributionPackadeliClient { + + private final IDistributionPackadeliService distributionPackadeliService; + + @Override + @GetMapping(TOP) + public BladePage top(Integer current, Integer size) { + Query query = new Query(); + query.setCurrent(current); + query.setSize(size); + 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/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/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/service/IDistributionDeliveryListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java index 36228f254..36a6cfce3 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,12 @@ 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/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index ef93cc809..764e871e2 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,25 @@ */ package com.logpm.distribution.service.impl; +import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.entity.DistributionDeliveryListEntity; +import com.logpm.distribution.entity.DistributionPackadeliEntity; +import com.logpm.distribution.mapper.DistributionPackadeliMapper; 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.DistributionstatisticsnmbVO; +import lombok.AllArgsConstructor; 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 java.math.BigInteger; +import java.text.SimpleDateFormat; import java.util.List; /** @@ -35,8 +44,9 @@ import java.util.List; * @since 2023-06-16 */ @Service +@AllArgsConstructor public class DistributionDeliveryListServiceImpl extends BaseServiceImpl implements IDistributionDeliveryListService { - + private final DistributionPackadeliMapper distributionPackadeliMapper; @Override public IPage selectDistributionDeliveryListPage(IPage page, DistributionDeliveryListVO distributionDeliveryList) { return page.setRecords(baseMapper.selectDistributionDeliveryListPage(page, distributionDeliveryList)); @@ -57,8 +67,37 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl list = distributionPackadeliMapper.selectjointList(detail.getId()); + distributionDeliveryListVO.setPackadeList(list); + return distributionDeliveryListVO; + } - return null; + @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; } } 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; + } + +} From 14e9fc3fdca4a84c80330e1a0bd076a2b1031726 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 20 Jun 2023 17:15:51 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E9=A2=84=E7=BA=A6=E9=85=8D=E9=80=81?= =?UTF-8?q?=E4=B8=AD=E9=97=B4=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicdataGoodsAllocationEntity.java | 4 +- .../entity/DistributionAddvalueEntity.java | 2 +- ...va => DistributionDeliveryInfoEntity.java} | 78 ++------- .../entity/DistributionReservationEntity.java | 10 +- .../DistributionStockArticleEntity.java | 14 ++ ...a => IDistributionDeliveryInfoClient.java} | 16 +- ...O.java => DistributionDeliveryInfoVO.java} | 8 +- .../logpm/basicdata/dto/BasicdataTrayDTO.java | 5 + .../basicdata/mapper/BasicdataTrayMapper.xml | 40 ++--- .../impl/BasicdataGoodsShelfServiceImpl.java | 36 +++- .../impl/BasicdataTrayServiceImpl.java | 48 +++--- .../DistributionDeliveryController.java | 163 ------------------ .../DistributionDeliveryInfoController.java | 150 ++++++++++++++++ .../DistributionPrintController.java | 1 + .../DistributionReservationController.java | 27 ++- .../DistributionStockArticleController.java | 11 ++ ....java => DistributionDeliveryInfoDTO.java} | 8 +- .../dto/DistributionReservationDTO.java | 34 ++-- .../dto/DistributionStockArticleDTO.java | 4 + ...ava => DistributionDeliveryInfoExcel.java} | 79 +-------- ...va => DistributionDeliveryInfoClient.java} | 31 ++-- .../mapper/DistributionAddvalueMapper.xml | 2 +- ...va => DistributionDeliveryInfoMapper.java} | 18 +- .../mapper/DistributionDeliveryInfoMapper.xml | 35 ++++ .../mapper/DistributionDeliveryMapper.xml | 46 ----- .../mapper/DistributionReservationMapper.xml | 1 + .../mapper/DistributionStockArticleMapper.xml | 2 + ... => IDistributionDeliveryInfoService.java} | 28 +-- .../IDistributionReservationService.java | 8 +- .../IDistributionStockArticleService.java | 11 ++ .../DistributionDeliveryInfoServiceImpl.java | 54 ++++++ .../impl/DistributionDeliveryServiceImpl.java | 111 ------------ .../DistributionReservationServiceImpl.java | 97 +++++++++-- .../DistributionStockArticleServiceImpl.java | 50 +++++- 34 files changed, 623 insertions(+), 609 deletions(-) rename blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/{DistributionDeliveryEntity.java => DistributionDeliveryInfoEntity.java} (52%) rename blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/{IDistributionDeliveryClient.java => IDistributionDeliveryInfoClient.java} (75%) rename blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/{DistributionDeliveryVO.java => DistributionDeliveryInfoVO.java} (83%) delete mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryController.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryInfoController.java rename blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/{DistributionDeliveryDTO.java => DistributionDeliveryInfoDTO.java} (82%) rename blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/{DistributionDeliveryExcel.java => DistributionDeliveryInfoExcel.java} (60%) rename blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/{DistributionDeliveryClient.java => DistributionDeliveryInfoClient.java} (65%) rename blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/{DistributionDeliveryMapper.java => DistributionDeliveryInfoMapper.java} (65%) create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml delete mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryMapper.xml rename blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/{IDistributionDeliveryService.java => IDistributionDeliveryInfoService.java} (58%) create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java delete mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryServiceImpl.java 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-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/DistributionDeliveryEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryInfoEntity.java similarity index 52% 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/DistributionDeliveryInfoEntity.java index 10ddaf16a..fd316579a 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/DistributionDeliveryInfoEntity.java @@ -21,87 +21,31 @@ 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 + * @since 2023-06-16 */ @Data -@TableName("logpm_distribution_delivery") -@ApiModel(value = "DistributionDelivery对象", description = "配送单") +@TableName("logpm_distribution_delivery_info") +@ApiModel(value = "DistributionDeliveryInfo对象", description = "配送预约中间表") @EqualsAndHashCode(callSuper = true) -public class DistributionDeliveryEntity extends TenantEntity { +public class DistributionDeliveryInfoEntity extends TenantEntity { /** - * 订单自编号 + * 预约编号 */ - @ApiModelProperty(value = "订单自编号") - private String orderId; + @ApiModelProperty(value = "预约编号") + private String reservationId; /** - * 运单号 + * 配送单编号 */ - @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; + @ApiModelProperty(value = "配送单编号") + private String deliveryId; /** * 预留1 */ 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/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/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..0c6cc6de3 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/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..4b1e0fde3 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/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/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_distribution_delivery_info where is_deleted = 0 + + + + + + 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/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/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..2afecbbe6 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/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/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..65237a93c --- /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/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/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/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); + } + } From 6e982cf3857332a44295e5703c24426c24384794 Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Tue, 20 Jun 2023 18:08:50 +0800 Subject: [PATCH 3/6] =?UTF-8?q?1.=E5=8F=91=E8=BD=A6=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionDeliveryInfoEntity.java | 36 ++++++++++------- .../DistributionDeliveryListEntity.java | 9 ++++- .../entity/DistributionSigndetailEntity.java | 6 +++ .../IDistributionDeliveryChargeClient.java | 5 ++- .../IDistributionDeliveryInfoClient.java | 4 +- .../vo/DistributionDeliveryInfoVO.java | 2 +- .../vo/DistributionSignforsnmbVO.java | 39 +++++++++++++++++++ .../DistributionDeliveryInfoController.java | 22 +++++------ .../DistributionDeliveryListController.java | 11 ++++++ .../DistributionSignforController.java | 14 +++++++ .../dto/DistributionDeliveryInfoDTO.java | 2 +- .../dto/DistributionSignforDTO.java | 7 +++- .../excel/DistributionDeliveryInfoExcel.java | 2 +- .../feign/DistributionDeliveryInfoClient.java | 2 +- .../DistributionDeliveryInfoMapper.java | 2 +- .../mapper/DistributionSignforMapper.java | 30 +++++++++++++- .../mapper/DistributionSignforMapper.xml | 12 ++++++ .../IDistributionDeliveryInfoService.java | 2 +- .../IDistributionDeliveryListService.java | 7 ++++ .../service/IDistributionSignforService.java | 10 ++++- .../DistributionDeliveryInfoServiceImpl.java | 2 +- .../DistributionDeliveryListServiceImpl.java | 23 +++++++++++ .../impl/DistributionSignforServiceImpl.java | 28 +++++++++++++ 23 files changed, 237 insertions(+), 40 deletions(-) create mode 100644 blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforsnmbVO.java 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 index fd316579a..96c982f71 100644 --- 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 @@ -25,37 +25,47 @@ 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 = "配送预约中间表") +@ApiModel(value = "DistributionDeliveryInfo对象", description = "配送装车中间表") @EqualsAndHashCode(callSuper = true) public class DistributionDeliveryInfoEntity extends TenantEntity { /** - * 预约编号 + * 客户表Id */ - @ApiModelProperty(value = "预约编号") - private String reservationId; + @ApiModelProperty(value = "客户表Id") + private Long reservationId; /** - * 配送单编号 + * 配送表id */ - @ApiModelProperty(value = "配送单编号") + @ApiModelProperty(value = "配送表id") private String deliveryId; /** - * 预留1 + * 包条表id */ - @ApiModelProperty(value = "预留1") - private String reserve1; + @ApiModelProperty(value = "包条表id") + private String packageId; /** - * 预留2 + * 订单表id */ - @ApiModelProperty(value = "预留2") - private String reserve2; + @ApiModelProperty(value = "订单表id") + private String orderId; + /** + * 装车状态(1-未装车,2-已装车) + */ + @ApiModelProperty(value = "装车状态(1-未装车,2-已装车)") + private String loadedState; + /** + * 装车数量 + */ + @ApiModelProperty(value = "装车数量") + private Integer loadedNub; /** * 预留3 */ 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 9afd60813..865cffa96 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 @@ -139,10 +139,15 @@ public class DistributionDeliveryListEntity extends TenantEntity { @ApiModelProperty(value = "装卸班组") private String loadingTeam; /** - * 预约表id + * 预约表id(客户) */ - @ApiModelProperty(value = "预约表id") + @ApiModelProperty(value = "预约表id(客户)") private String reservationId; + /** + * 关联订单id + */ + @ApiModelProperty(value = "关联订单id") + private String orderId; /** * 备货时间 */ 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 9e894a2c8..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 @@ -149,5 +149,11 @@ public class DistributionSigndetailEntity extends TenantEntity { @ApiModelProperty(value = "品牌") private String brand; + /** + * 是否签收 + */ + @ApiModelProperty(value = "是否签收") + private String isSignfor; + } 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/IDistributionDeliveryInfoClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryInfoClient.java index 0c6cc6de3..21ee43d52 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryInfoClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryInfoClient.java @@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; /** - * 配送预约中间表 Feign接口类 + * 配送装车中间表 Feign接口类 * * @author TJJ * @since 2023-06-16 @@ -37,7 +37,7 @@ public interface IDistributionDeliveryInfoClient { String TOP = API_PREFIX + "/top"; /** - * 获取配送预约中间表列表 + * 获取配送装车中间表 * * @param current 页号 * @param size 页数 diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java index 4b1e0fde3..5a0d66cb3 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java @@ -22,7 +22,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; /** - * 配送预约中间表 视图实体类 + * 配送装车中间表 视图实体类 * * @author TJJ * @since 2023-06-16 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/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 index 263d0a289..dd5efe115 100644 --- 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 @@ -45,21 +45,21 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; /** - * 配送预约中间表 控制器 + * 配送装车中间表 控制器 * * @author TJJ * @since 2023-06-16 */ @RestController @AllArgsConstructor -@RequestMapping("deliveryInfo/distributionDeliveryInfo") -@Api(value = "配送预约中间表", tags = "配送预约中间表接口") +@RequestMapping("/deliveryInfo") +@Api(value = "配送装车中间表", tags = "配送装车中间表接口") public class DistributionDeliveryInfoController extends BladeController { private final IDistributionDeliveryInfoService distributionDeliveryInfoService; /** - * 配送预约中间表 详情 + * 配送装车中间表 详情 */ @GetMapping("/detail") @ApiOperationSupport(order = 1) @@ -69,7 +69,7 @@ public class DistributionDeliveryInfoController extends BladeController { return R.data(detail); } /** - * 配送预约中间表 分页 + * 配送装车中间表 分页 */ @GetMapping("/list") @ApiOperationSupport(order = 2) @@ -80,7 +80,7 @@ public class DistributionDeliveryInfoController extends BladeController { } /** - * 配送预约中间表 自定义分页 + * 配送装车中间表 自定义分页 */ @GetMapping("/page") @ApiOperationSupport(order = 3) @@ -91,7 +91,7 @@ public class DistributionDeliveryInfoController extends BladeController { } /** - * 配送预约中间表 新增 + * 配送装车中间表 新增 */ @PostMapping("/save") @ApiOperationSupport(order = 4) @@ -101,7 +101,7 @@ public class DistributionDeliveryInfoController extends BladeController { } /** - * 配送预约中间表 修改 + * 配送装车中间表 修改 */ @PostMapping("/update") @ApiOperationSupport(order = 5) @@ -111,7 +111,7 @@ public class DistributionDeliveryInfoController extends BladeController { } /** - * 配送预约中间表 新增或修改 + * 配送装车中间表 新增或修改 */ @PostMapping("/submit") @ApiOperationSupport(order = 6) @@ -121,7 +121,7 @@ public class DistributionDeliveryInfoController extends BladeController { } /** - * 配送预约中间表 删除 + * 配送装车中间表 删除 */ @PostMapping("/remove") @ApiOperationSupport(order = 7) @@ -144,7 +144,7 @@ public class DistributionDeliveryInfoController extends BladeController { //} queryWrapper.lambda().eq(DistributionDeliveryInfoEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); List list = distributionDeliveryInfoService.exportDistributionDeliveryInfo(queryWrapper); - ExcelUtil.export(response, "配送预约中间表数据" + DateUtil.time(), "配送预约中间表数据表", list, DistributionDeliveryInfoExcel.class); + 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 ca1b9a66d..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 @@ -97,6 +97,17 @@ public class DistributionDeliveryListController extends BladeController { 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/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/dto/DistributionDeliveryInfoDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryInfoDTO.java index f2d9e81ed..aef86bb93 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryInfoDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryInfoDTO.java @@ -21,7 +21,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; /** - * 配送预约中间表 数据传输对象实体类 + * 配送装车中间表 数据传输对象实体类 * * @author TJJ * @since 2023-06-16 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/excel/DistributionDeliveryInfoExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryInfoExcel.java index 1264ece78..f951565c5 100644 --- 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 @@ -28,7 +28,7 @@ import java.io.Serializable; /** - * 配送预约中间表 Excel实体类 + * 配送装车中间表 Excel实体类 * * @author TJJ * @since 2023-06-16 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 index edae12442..366ef63a9 100644 --- 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 @@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; /** - * 配送预约中间表 Feign实现类 + * 配送装车中间表 Feign实现类 * * @author TJJ * @since 2023-06-16 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java index 20fa04acd..5475a3260 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java @@ -26,7 +26,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * 配送预约中间表 Mapper 接口 + * 配送装车中间表 Mapper 接口 * * @author TJJ * @since 2023-06-16 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..2dcbcdb78 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 @@ -51,5 +51,17 @@ + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java index 2afecbbe6..e74c452cb 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java @@ -25,7 +25,7 @@ import org.springblade.core.mp.base.BaseService; import java.util.List; /** - * 配送预约中间表 服务类 + * 配送装车中间表 服务类 * * @author TJJ * @since 2023-06-16 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 36a6cfce3..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 @@ -67,4 +67,11 @@ public interface IDistributionDeliveryListService extends BaseService exportDistributionSignfor(Wrapper queryWrapper); - + /** + * 签收订单统计 + * + * @return + */ + DistributionSignforsnmbVO getNubTotal(DistributionSignforDTO distributionSignfor); } 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 index 65237a93c..8fa0088fd 100644 --- 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 @@ -28,7 +28,7 @@ import org.springblade.core.mp.base.BaseServiceImpl; import java.util.List; /** - * 配送预约中间表 服务实现类 + * 配送装车中间表 服务实现类 * * @author TJJ * @since 2023-06-16 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 764e871e2..2639fb2f0 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 @@ -27,14 +27,20 @@ import com.logpm.distribution.service.IDistributionDeliveryListService; import com.logpm.distribution.vo.DistributionPackadeliVO; 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; /** @@ -45,6 +51,7 @@ import java.util.List; */ @Service @AllArgsConstructor +@Slf4j public class DistributionDeliveryListServiceImpl extends BaseServiceImpl implements IDistributionDeliveryListService { private final DistributionPackadeliMapper distributionPackadeliMapper; @Override @@ -100,4 +107,20 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl>>>>>>>>{}",distributionDeliveryList); + //获取关联的客户信息 + String reservationId = distributionDeliveryList.getReservationId(); + List reservationIds = Arrays.asList(Long.valueOf(String.valueOf(reservationId.split(",")))); + //查询客户信息 + + //插入配送管理表 + //获取关联订单 + 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/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; + } + } From 4f0dca7725bcbd93b4a770274b908af84eb5aa84 Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Wed, 21 Jun 2023 15:20:22 +0800 Subject: [PATCH 4/6] =?UTF-8?q?1.=E5=86=97=E4=BD=99=E9=85=8D=E9=80=81?= =?UTF-8?q?=E8=A1=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionDeliveryInfoEntity.java | 6 +- .../DistributionDeliveryListEntity.java | 48 +++++++++++----- .../entity/DistributionSignforEntity.java | 56 ++++++++++++++----- .../vo/DistributionSigndetailVO.java | 2 +- .../vo/DistributionSignforVO.java | 2 +- .../mapper/DistributionSigndetailMapper.xml | 2 +- .../mapper/DistributionSignforMapper.xml | 2 +- .../DistributionDeliveryListServiceImpl.java | 35 ++++++++---- 8 files changed, 108 insertions(+), 45 deletions(-) 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 index 96c982f71..9ecc1ce64 100644 --- 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 @@ -45,17 +45,17 @@ public class DistributionDeliveryInfoEntity extends TenantEntity { * 配送表id */ @ApiModelProperty(value = "配送表id") - private String deliveryId; + private Long deliveryId; /** * 包条表id */ @ApiModelProperty(value = "包条表id") - private String packageId; + private Long packageId; /** * 订单表id */ @ApiModelProperty(value = "订单表id") - private String orderId; + private Long orderId; /** * 装车状态(1-未装车,2-已装车) */ 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 865cffa96..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,19 @@ 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 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/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/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.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index 2dcbcdb78..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 @@ - + 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 2639fb2f0..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,15 +16,16 @@ */ package com.logpm.distribution.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.logpm.distribution.dto.DistributionDeliveryListDTO; -import com.logpm.distribution.entity.DistributionDeliveryListEntity; -import com.logpm.distribution.entity.DistributionPackadeliEntity; -import com.logpm.distribution.mapper.DistributionPackadeliMapper; +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; @@ -54,6 +55,10 @@ import java.util.List; @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) { return page.setRecords(baseMapper.selectDistributionDeliveryListPage(page, distributionDeliveryList)); @@ -73,7 +78,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl list = distributionPackadeliMapper.selectjointList(detail.getId()); distributionDeliveryListVO.setPackadeList(list); @@ -83,7 +88,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl>>>>>>>>{}",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(",")))); From 8d38f4da465c05b50798e66ccccce5a66dc92ada Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Wed, 21 Jun 2023 18:18:00 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/BasicdataClientEntity.java | 42 +- .../basicdata/entity/BasicdataShopEntity.java | 5 +- .../entity/BasicdataStoreBusinessEntity.java | 10 +- .../entity/BasicdataTripartiteMallEntity.java | 80 +++ .../feign/IBasicdataStoreBusinessClient.java | 2 +- .../feign/IBasicdataTripartiteMallClient.java | 49 ++ .../vo/BasicdataTripartiteMallVO.java | 35 ++ .../BasicdataCategoryController.java | 2 + .../controller/BasicdataClientController.java | 7 + .../BasicdataTripartiteMallController.java | 150 ++++++ .../dto/BasicdataTripartiteMallDTO.java | 34 ++ .../excel/BasicdataTripartiteMallExcel.java | 105 ++++ .../feign/BasicdataTripartiteMallClient.java | 53 ++ .../mapper/BasicdataTripartiteMallMapper.java | 54 ++ .../mapper/BasicdataTripartiteMallMapper.xml | 36 ++ .../IBasicdataTripartiteMallService.java | 52 ++ .../impl/BasicdataClientServiceImpl.java | 38 +- .../impl/BasicdataShopServiceImpl.java | 42 +- .../BasicdataTripartiteMallServiceImpl.java | 54 ++ doc/dpm/物流租户系统.pdma.json | 506 +++++++++++++++++- 20 files changed, 1324 insertions(+), 32 deletions(-) create mode 100644 blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataTripartiteMallEntity.java create mode 100644 blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java create mode 100644 blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataTripartiteMallVO.java create mode 100644 blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataTripartiteMallController.java create mode 100644 blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataTripartiteMallDTO.java create mode 100644 blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataTripartiteMallExcel.java create mode 100644 blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java create mode 100644 blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.java create mode 100644 blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml create mode 100644 blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java create mode 100644 blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java 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/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/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/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/BasicdataTripartiteMallMapper.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.java new file mode 100644 index 000000000..c382cd639 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.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.basicdata.mapper; + +import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; +import com.logpm.basicdata.vo.BasicdataTripartiteMallVO; +import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel; +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 cyz + * @since 2023-06-21 + */ +public interface BasicdataTripartiteMallMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param basicdataTripartiteMall + * @return + */ + List selectBasicdataTripartiteMallPage(IPage page, BasicdataTripartiteMallVO basicdataTripartiteMall); + + + /** + * 获取导出数据 + * + * @param queryWrapper + * @return + */ + List exportBasicdataTripartiteMall(@Param("ew") Wrapper queryWrapper); + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml new file mode 100644 index 000000000..b2ee5e851 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/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/BasicdataTripartiteMallServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java new file mode 100644 index 000000000..781b4edca --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.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.basicdata.service.impl; + +import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; +import com.logpm.basicdata.vo.BasicdataTripartiteMallVO; +import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel; +import com.logpm.basicdata.mapper.BasicdataTripartiteMallMapper; +import com.logpm.basicdata.service.IBasicdataTripartiteMallService; +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 cyz + * @since 2023-06-21 + */ +@Service +public class BasicdataTripartiteMallServiceImpl 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/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 +} From 8ae06e25b2c1b5f1ea6d45e2b21046cfbe1ab4d3 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Sat, 24 Jun 2023 12:43:06 +0800 Subject: [PATCH 6/6] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E7=9A=AE=E9=98=BF?= =?UTF-8?q?=E8=AF=BA=20=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=95=B0=E6=8D=AE=202.=E5=A2=9E=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9A=AE=E9=98=BF=E8=AF=BA=E6=95=B0=E6=8D=AE=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E6=8E=A5=E5=8F=A3=E8=AE=A2=E5=8D=95=E8=87=AA=E7=BC=96?= =?UTF-8?q?=E5=8F=B7=E9=87=8D=E5=A4=8D=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/logpm/factory/snm/bean/Resp.java | 12 +++++++++++- .../snm/controller/PanFactoryDataController.java | 14 +++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) 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"); }