From 7d424cbcf8c2b538022c375e3d9e6c181e569952 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Mon, 11 Nov 2024 17:33:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E6=96=B9=E5=95=86=E5=9F=8E=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E3=80=81=E5=B9=B2=E7=BA=BF=E5=8C=85=E4=BB=B6=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=B8=A6=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/BasicdataTripartiteMallVO.java | 10 +++++ .../AftersalesAbnormalPackageController.java | 16 +++++++ .../AftersalesWorkOrderController.java | 12 +----- .../AftersalesAbnormalPackageMapper.java | 9 ++++ .../AftersalesAbnormalPackageMapper.xml | 43 ++++++++++++++++++- .../IAftersalesAbnormalPackageService.java | 10 +++++ .../AftersalesAbnormalPackageServiceImpl.java | 35 +++++++++++++++ .../BasicdataTripartiteMallController.java | 12 ++++++ .../mapper/BasicdataTripartiteMallMapper.java | 10 +++++ .../mapper/BasicdataTripartiteMallMapper.xml | 24 +++++++++++ .../IBasicdataTripartiteMallService.java | 10 +++++ .../BasicdataTripartiteMallServiceImpl.java | 9 ++++ 12 files changed, 188 insertions(+), 12 deletions(-) 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 index 8e4cf2c87..83b359b84 100644 --- 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 @@ -31,4 +31,14 @@ import lombok.EqualsAndHashCode; public class BasicdataTripartiteMallVO extends BasicdataTripartiteMallEntity { private static final long serialVersionUID = 1L; + /** + * 客户名称 + */ + private String clientName; + + /** + * 服务类型 + */ + private String typeService; + } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAbnormalPackageController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAbnormalPackageController.java index 634343fc1..daa1b2bbf 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAbnormalPackageController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAbnormalPackageController.java @@ -103,6 +103,22 @@ public class AftersalesAbnormalPackageController extends BladeController { return R.data(pages); } + /** + * 异常处理包件记录 查询包件是否处理过的信息 + */ + @GetMapping("/getAdvanceAbnormalPackage") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查询包件是否处理过的信息", notes = "传入aftersalesAbnormalPackage") + public R getAdvanceAbnormalPackage(@ApiIgnore @RequestParam Map aftersalesAbnormalPackage, Query query) { + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if (Func.isEmpty(myCurrentWarehouse)){ + return R.fail(403,"未授权!!!"); + } + log.info("查询包件的数据》》》{}",aftersalesAbnormalPackage); + R r= aftersalesAbnormalPackageService.getAdvanceAbnormalPackage( aftersalesAbnormalPackage,Condition.getPage(query)); + return r; + } + /** * 异常处理包件记录 自定义分页 */ diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java index f5c3683c7..4947723bf 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java @@ -20,15 +20,12 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.logpm.aftersales.dto.AftersalesWorkOrderDTO; import com.logpm.aftersales.dto.AftersalesWorkOrderListExcelDTO; -import com.logpm.aftersales.entity.AftersaleSurveyRecordEntity; import com.logpm.aftersales.entity.AftersalesAppealEntity; import com.logpm.aftersales.entity.AftersalesSettlementEntity; import com.logpm.aftersales.excel.AftersalesWorkOrderImporter; -import com.logpm.aftersales.mapper.AftersalesCompletionRecordMapper; import com.logpm.aftersales.service.IAftersalesCompletionRecordService; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; -import com.xxl.job.core.handler.annotation.XxlJob; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -37,16 +34,13 @@ import lombok.AllArgsConstructor; import javax.validation.Valid; import lombok.extern.slf4j.Slf4j; -import org.springblade.common.constant.aftersales.WorkOrderStatusConstant; import org.springblade.core.log.exception.ServiceException; 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.springblade.system.entity.User; -import org.springframework.scheduling.annotation.Scheduled; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.aftersales.entity.AftersalesWorkOrderEntity; @@ -60,10 +54,7 @@ import org.springblade.core.excel.util.ExcelUtil; import org.springframework.web.multipart.MultipartFile; import springfox.documentation.annotations.ApiIgnore; -import java.util.ArrayList; -import java.util.Date; -import java.util.Map; -import java.util.List; +import java.util.*; import javax.servlet.http.HttpServletResponse; /** @@ -727,6 +718,7 @@ public class AftersalesWorkOrderController extends BladeController { } + @GetMapping("/exportAllWorkOrder") @ApiOperationSupport(order = 9) @ApiOperation(value = "导出数据", notes = "传入aftersalesWorkOrder") diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalPackageMapper.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalPackageMapper.java index b6900a0da..4930d309a 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalPackageMapper.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalPackageMapper.java @@ -16,6 +16,7 @@ */ package com.logpm.aftersales.mapper; +import com.logpm.aftersales.dto.AftersalesAbnormalPackageDTO; import com.logpm.aftersales.entity.AftersalesAbnormalPackageEntity; import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO; import com.logpm.aftersales.excel.AftersalesAbnormalPackageExcel; @@ -63,4 +64,12 @@ public interface AftersalesAbnormalPackageMapper extends BaseMapper getDeliver(@Param("orderPackageCode") String orderPackageCode); void updateAftersalesAbnormalPackageByWorkOrderIdAndPackCodeAndOtherNodex(@Param("workId") Long workId,@Param("orderPackageCode") String orderPackageCode, @Param("packageFinish") Integer packageFinish); + + /** + * 查询暂存单包件信息 + * @param aftersalesAbnormalPackageDTO + * @return + */ + List getAdvanceAbnormalPackage(@Param("param")AftersalesAbnormalPackageDTO aftersalesAbnormalPackageDTO); + } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalPackageMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalPackageMapper.xml index 9b2acf20a..262bbf321 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalPackageMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalPackageMapper.xml @@ -39,8 +39,19 @@ SELECT * FROM logpm_aftersales_abnormal_package ${ew.customSqlSegment} + diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalPackageService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalPackageService.java index 6aa89a4f8..ad61a5b13 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalPackageService.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalPackageService.java @@ -22,6 +22,8 @@ import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO; import com.logpm.aftersales.excel.AftersalesAbnormalPackageExcel; 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; @@ -57,4 +59,12 @@ public interface IAftersalesAbnormalPackageService extends BaseService getAbnormalPackage(Map aftersalesAbnormalPackage, IPage page); + + /** + * 查询暂存单包件信息 + * @param aftersalesAbnormalPackage + * @param page + * @return + */ + R getAdvanceAbnormalPackage(Map aftersalesAbnormalPackage, IPage page); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalPackageServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalPackageServiceImpl.java index ff53ba050..973b8639d 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalPackageServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalPackageServiceImpl.java @@ -18,6 +18,7 @@ package com.logpm.aftersales.service.impl; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.logpm.aftersales.dto.AftersalesAbnormalPackageDTO; import com.logpm.aftersales.entity.AftersalesAbnormalPackageEntity; import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO; import com.logpm.aftersales.excel.AftersalesAbnormalPackageExcel; @@ -32,6 +33,7 @@ import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import lombok.AllArgsConstructor; import org.springblade.common.constant.DictBizConstant; import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.tool.api.R; import org.springblade.system.cache.DictBizCache; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; @@ -41,6 +43,7 @@ import org.springblade.core.mp.base.BaseServiceImpl; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; /** * 异常处理包件记录 服务实现类 @@ -115,4 +118,36 @@ public class AftersalesAbnormalPackageServiceImpl extends BaseServiceImpl aftersalesAbnormalPackage, IPage page) { + AftersalesAbnormalPackageDTO aftersalesAbnormalPackageDTO = JSONObject.parseObject(JSONObject.toJSONString(aftersalesAbnormalPackage), AftersalesAbnormalPackageDTO.class); + if (Objects.isNull(aftersalesAbnormalPackageDTO.getPackageCode())){ + return R.fail("orderPackageCode参数缺失"); + } + List abnormalPackage = baseMapper.getAdvanceAbnormalPackage(aftersalesAbnormalPackageDTO); + if (!abnormalPackage.isEmpty()){ + abnormalPackage.forEach(i ->{ + if (ObjectUtils.isNotNull(i.getPackageCode())){ + i.setTrunklines( baseMapper.getTrunklines(i.getPackageCode())); + i.setDeliver(baseMapper.getDeliver(i.getPackageCode())); + } + if(ObjectUtils.isNotNull(i.getMallId())){ + List byClientIdList = basicdataStoreBusinessClient.findByClientIdList(i.getMallId()); + if(!byClientIdList.isEmpty()){ + StringBuffer stringBu = new StringBuffer(); + byClientIdList.forEach(a ->{ + String value = DictBizCache.getValue( DictBizConstant.BASIC_FREIGHT_TYPE,a.getTypeService()); + stringBu.append(value); + }); + i.setTypeServiceName(stringBu.toString()); + } + } + }); + return R.data(abnormalPackage); + }else { + return R.data(null,"未查询到相关信息,请手动录入数据"); + } + + } + } 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 index c59666cd6..3dc36698f 100644 --- 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 @@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.logpm.basicdata.dto.BasicdataTripartiteMallDTO; import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel; import com.logpm.basicdata.service.IBasicdataTripartiteMallService; @@ -99,6 +100,17 @@ public class BasicdataTripartiteMallController extends BladeController { return R.data(pages); } + /** + * 客户三方商城 自定义分页 + */ + @GetMapping("/pageList") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入basicdataTripartiteMall") + public R> pageList(Map basicdataTripartiteMall, Query query) { + IPage pages = basicdataTripartiteMallService.pageList(Condition.getPage(query), basicdataTripartiteMall); + return R.data(pages); + } + /** * 客户三方商城 新增 */ 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 index 60fb9a1f0..3e0adbea0 100644 --- 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 @@ -19,12 +19,14 @@ package com.logpm.basicdata.mapper; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.basicdata.dto.BasicdataTripartiteMallDTO; import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel; import com.logpm.basicdata.vo.BasicdataTripartiteMallVO; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 客户三方商城 Mapper 接口 @@ -57,4 +59,12 @@ public interface BasicdataTripartiteMallMapper extends BaseMapper getOwn(); Long getClientIdByNameAndBrandAndCode(@Param("name") String name, @Param("code") String code, @Param("brand") String brand); + + /** + * 查询三方商城分页 + * @param page + * @param aftersalesAbnormalPackageDTO + * @return + */ + IPage pageList(IPage page,@Param("param") Map aftersalesAbnormalPackageDTO); } 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 index b13846305..8c1084a0e 100644 --- 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 @@ -62,5 +62,29 @@ limit 1 + 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 index f5277d532..0d7a38b16 100644 --- 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 @@ -18,6 +18,7 @@ package com.logpm.basicdata.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.basicdata.dto.BasicdataTripartiteMallDTO; import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel; import com.logpm.basicdata.vo.BasicdataTripartiteMallVO; @@ -25,6 +26,7 @@ import org.springblade.core.mp.base.BaseService; import org.springblade.core.tool.api.R; import java.util.List; +import java.util.Map; /** * 客户三方商城 服务类 @@ -70,4 +72,12 @@ public interface IBasicdataTripartiteMallService extends BaseService pageList(IPage page, Map basicdataTripartiteMall); } 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 index 323fe4da7..726cfa008 100644 --- 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 @@ -16,8 +16,10 @@ */ package com.logpm.basicdata.service.impl; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.basicdata.dto.BasicdataTripartiteMallDTO; import com.logpm.basicdata.entity.BasicdataClientEntity; import com.logpm.basicdata.entity.BasicdataClientLogEntity; import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; @@ -38,6 +40,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -187,6 +190,12 @@ public class BasicdataTripartiteMallServiceImpl extends BaseServiceImpl pageList(IPage page, Map basicdataTripartiteMall) { + + return baseMapper.pageList(page,basicdataTripartiteMall); + } + private String comparisonBasicdataTripartiteMall(BasicdataTripartiteMallEntity entity, BasicdataTripartiteMallEntity basicdataTripartiteMall) { StringBuilder builder = new StringBuilder(); String str1 = entity.getTripartiteCoding().isEmpty() ? "空" : entity.getTripartiteCoding();