From 70c4ff82947385dd15d14a3b0088602d92fa5e80 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080> Date: Sat, 25 Nov 2023 10:55:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=98=E7=82=B9pc=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=9C=8D=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/AftersalesProcessorEntity.java | 4 +- .../entity/AftersalesReturnRecordEntity.java | 6 +- ...AftersalesProcessingResultsController.java | 2 +- .../AftersalesReturnRecordController.java | 2 +- .../AftersalesWorkOrderController.java | 12 ++ .../dto/AftersalesWorkOrderDTO.java | 21 +++ .../IAftersalesProcessingResultsService.java | 6 + .../IAftersalesReturnRecordService.java | 6 + .../service/IAftersalesWorkOrderService.java | 7 + .../impl/AftersalesExchangeServiceImpl.java | 23 +++ ...ftersalesProcessingResultsServiceImpl.java | 20 +++ .../AftersalesReturnRecordServiceImpl.java | 36 +++++ .../impl/AftersalesWorkOrderServiceImpl.java | 135 ++++++++++++------ .../controller/TaskQuestController.java | 43 +++++- .../warehouse/excel/QuestContrastExcel.java | 134 +++++++++++++++++ .../warehouse/mapper/TaskQuestMapper.xml | 1 + .../warehouse/service/ITaskQuestService.java | 8 ++ .../service/impl/TaskQuestServiceImpl.java | 17 +++ 18 files changed, 427 insertions(+), 56 deletions(-) create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/QuestContrastExcel.java diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessorEntity.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessorEntity.java index 7d043fffc..449822710 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessorEntity.java +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessorEntity.java @@ -77,12 +77,12 @@ public class AftersalesProcessorEntity extends TenantEntity { @ApiModelProperty(value = "异常工单ID") private Long workOrderId; /** - * 状态 + * 状态 状态 1正常 2新增 3取消 */ @ApiModelProperty(value = "状态") private String conditions; /** - * 类型 + * 类型 类型 1 责任方 2 处理方 */ @ApiModelProperty(value = "类型") private String typesOf; diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReturnRecordEntity.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReturnRecordEntity.java index 4f1882bf3..92d5dfb30 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReturnRecordEntity.java +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReturnRecordEntity.java @@ -65,12 +65,12 @@ public class AftersalesReturnRecordEntity extends TenantEntity { * 异常工单ID */ @ApiModelProperty(value = "异常工单ID") - private String workOrderId; + private Long workOrderId; /** * 待处理营业部ID */ @ApiModelProperty(value = "待处理营业部ID") - private String businessId; + private Long businessId; /** * 待处理营业部名称 */ @@ -85,6 +85,6 @@ public class AftersalesReturnRecordEntity extends TenantEntity { * 仓库Id */ @ApiModelProperty(value = "仓库Id") - private String warehouseId; + private Long warehouseId; } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessingResultsController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessingResultsController.java index 5ec410391..9e19101d7 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessingResultsController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessingResultsController.java @@ -118,7 +118,7 @@ public class AftersalesProcessingResultsController extends BladeController { @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入aftersalesProcessingResults") public R submit(@Valid @RequestBody AftersalesProcessingResultsEntity aftersalesProcessingResults) { - return R.status(aftersalesProcessingResultsService.saveOrUpdate(aftersalesProcessingResults)); + return R.status(aftersalesProcessingResultsService.ownSaveOrUpdate(aftersalesProcessingResults)); } /** diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesReturnRecordController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesReturnRecordController.java index 3bcb4cbe7..b022a9374 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesReturnRecordController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesReturnRecordController.java @@ -118,7 +118,7 @@ public class AftersalesReturnRecordController extends BladeController { @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入aftersalesReturnRecord") public R submit(@Valid @RequestBody AftersalesReturnRecordEntity aftersalesReturnRecord) { - return R.status(aftersalesReturnRecordService.saveOrUpdate(aftersalesReturnRecord)); + return R.status(aftersalesReturnRecordService.ownSaveOrUpdate(aftersalesReturnRecord)); } /** 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 4e2ba919e..6b3d64f02 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 @@ -112,6 +112,18 @@ public class AftersalesWorkOrderController extends BladeController { return R.status(aftersalesWorkOrderService.save(aftersalesWorkOrder)); } + + /** + * 客服异常工单 完结处理熟练 + */ + @PostMapping("/addCompletionEnd") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入aftersalesWorkOrder") + public R addCompletionEnd(@Valid @RequestBody AftersalesWorkOrderDTO aftersalesWorkOrder) { + + return R.status(aftersalesWorkOrderService.addCompletionEnd(aftersalesWorkOrder)); + } + /** * 客服异常工单 修改 */ diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java index b185efcea..2ba5180cc 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java @@ -36,15 +36,36 @@ public class AftersalesWorkOrderDTO extends AftersalesWorkOrderEntity { * 包件 */ private List packageEntityList; + /** + * 清除的ID包件 + */ + private List unPpackageEntityList; /** * 责任方和处理方 */ private List processorEntityList; + /** + * 取消的 责任方和处理方 + */ + private List unProcessorEntityList; /** * 货损图片 */ private List decreaseImageEntityList; + /** + * 取消的货损图片 + */ + private List unDecreaseImageEntityList; + /** + * 异常工单完结处理结果受款方 + */ + private List completionRecipientEntities; + + /** + * 异常工单完结处理结果赔款方 + */ + private List completionRecordEntities; } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessingResultsService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessingResultsService.java index 381aaea9d..175aa95e0 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessingResultsService.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessingResultsService.java @@ -49,4 +49,10 @@ public interface IAftersalesProcessingResultsService extends BaseService exportAftersalesProcessingResults(Wrapper queryWrapper); + /** + * 添加或修改出来结果 + * @param aftersalesProcessingResults + * @return + */ + boolean ownSaveOrUpdate(AftersalesProcessingResultsEntity aftersalesProcessingResults); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesReturnRecordService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesReturnRecordService.java index b447d132b..0f36e95cd 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesReturnRecordService.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesReturnRecordService.java @@ -49,4 +49,10 @@ public interface IAftersalesReturnRecordService extends BaseService exportAftersalesReturnRecord(Wrapper queryWrapper); + /** + * 添加或修改数据 + * @param aftersalesReturnRecord + * @return + */ + boolean ownSaveOrUpdate(AftersalesReturnRecordEntity aftersalesReturnRecord); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java index 09a5dc6b3..bba8f6554 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java @@ -64,4 +64,11 @@ public interface IAftersalesWorkOrderService extends BaseService getPendingWorkOrder(AftersalesWorkOrderDTO aftersalesWorkOrder, IPage page); + + /** + * 完结异常工单 + * @param aftersalesWorkOrder + * @return + */ + boolean addCompletionEnd(AftersalesWorkOrderDTO aftersalesWorkOrder); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesExchangeServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesExchangeServiceImpl.java index acfeb13f8..0c698aebc 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesExchangeServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesExchangeServiceImpl.java @@ -16,6 +16,7 @@ */ package com.logpm.aftersales.service.impl; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.logpm.aftersales.entity.AftersalesExchangeEntity; import com.logpm.aftersales.vo.AftersalesExchangeVO; @@ -23,10 +24,15 @@ import com.logpm.aftersales.excel.AftersalesExchangeExcel; import com.logpm.aftersales.mapper.AftersalesExchangeMapper; import com.logpm.aftersales.service.IAftersalesExchangeService; import org.springblade.core.mp.support.Condition; +import org.springblade.core.secure.BladeUser; +import org.springblade.core.secure.utils.AuthUtil; +import org.springblade.core.tool.utils.AesUtil; 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.Date; import java.util.List; import java.util.Map; @@ -61,6 +67,23 @@ public class AftersalesExchangeServiceImpl extends BaseServiceImpl implements IAftersalesReturnRecordService { + + private final IAftersalesWorkOrderService aftersalesWorkOrderService; + @Override public IPage selectAftersalesReturnRecordPage(IPage page, AftersalesReturnRecordVO aftersalesReturnRecord) { return page.setRecords(baseMapper.selectAftersalesReturnRecordPage(page, aftersalesReturnRecord)); @@ -51,4 +62,29 @@ public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl list = new ArrayList<>(); - aftersalesWorkOrder.getPackageEntityList().stream().forEach(i ->{ - AftersalesAbnormalPackageEntity packageEntity = new AftersalesAbnormalPackageEntity(); - BeanUtil.copyProperties(i,packageEntity); - packageEntity.setWorkOrderId(aftersalesWorkOrder.getId()); - packageEntity.setWarehouseId(myCurrentWarehouse.getId()); - list.add(packageEntity); - }); - if(!list.isEmpty()){ - aftersalesAbnormalPackageService.saveBatch(list); - } - } - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getDecreaseImageEntityList())){ - //货损图片 - List list = new ArrayList<>(); - aftersalesWorkOrder.getDecreaseImageEntityList().stream().forEach(i ->{ - AftersalesDecreaseImageEntity packageEntity = new AftersalesDecreaseImageEntity(); - BeanUtil.copyProperties(i,packageEntity); - packageEntity.setWorkOrderId(aftersalesWorkOrder.getId()); - packageEntity.setWarehouseId(myCurrentWarehouse.getId()); - list.add(packageEntity); - }); - if(!list.isEmpty()){ - aftersalesDecreaseImageService.saveBatch(list); - } + + }else{ + //修改 + if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnPpackageEntityList())){ + //删除修改包件 + aftersalesAbnormalPackageService.deleteLogic(aftersalesWorkOrder.getUnPpackageEntityList()); } - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())){ + if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnProcessorEntityList())){ //责任方 处理方 List list = new ArrayList<>(); - aftersalesWorkOrder.getProcessorEntityList().stream().forEach(i ->{ - AftersalesProcessorEntity packageEntity = new AftersalesProcessorEntity(); - BeanUtil.copyProperties(i,packageEntity); - packageEntity.setWorkOrderId(aftersalesWorkOrder.getId()); - packageEntity.setConditions("1");//正常 - packageEntity.setWarehouseId(myCurrentWarehouse.getId()); - list.add(packageEntity); + aftersalesWorkOrder.getUnProcessorEntityList().forEach(i ->{ + AftersalesProcessorEntity processorEntity = new AftersalesProcessorEntity(); + processorEntity.setId(i); + processorEntity.setConditions("3"); + list.add(processorEntity); }); if(!list.isEmpty()){ - aftersalesProcessorService.saveBatch(list); + aftersalesProcessorService.saveOrUpdateBatch(list); } } - return true; + if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnDecreaseImageEntityList())){ + //图片修改 + aftersalesDecreaseImageService.deleteLogic(aftersalesWorkOrder.getUnDecreaseImageEntityList()); + } + baseMapper.updateById(aftersalesWorkOrder); - }else{ - //修改 + } + //添加包件信息 + if(ObjectUtils.isNotNull(aftersalesWorkOrder.getPackageEntityList())){ + //包件信息 + List list = new ArrayList<>(); + aftersalesWorkOrder.getPackageEntityList().forEach(i ->{ + AftersalesAbnormalPackageEntity packageEntity = new AftersalesAbnormalPackageEntity(); + BeanUtil.copyProperties(i,packageEntity); + packageEntity.setWorkOrderId(aftersalesWorkOrder.getId()); + packageEntity.setWarehouseId(myCurrentWarehouse.getId()); + list.add(packageEntity); + }); + if(!list.isEmpty()){ + aftersalesAbnormalPackageService.saveBatch(list); + } + } + //添加责任方 处理方 + if(ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())){ + //责任方 处理方 + List list = new ArrayList<>(); + aftersalesWorkOrder.getProcessorEntityList().forEach(i ->{ + AftersalesProcessorEntity packageEntity = new AftersalesProcessorEntity(); + BeanUtil.copyProperties(i,packageEntity); + packageEntity.setWorkOrderId(aftersalesWorkOrder.getId()); + packageEntity.setConditions("1");//正常 + packageEntity.setWarehouseId(myCurrentWarehouse.getId()); + list.add(packageEntity); + }); + if(!list.isEmpty()){ + aftersalesProcessorService.saveBatch(list); + } + } + //添加图片信息 + if(ObjectUtils.isNotNull(aftersalesWorkOrder.getDecreaseImageEntityList())){ + //货损图片 + List list = new ArrayList<>(); + aftersalesWorkOrder.getDecreaseImageEntityList().forEach(i ->{ + AftersalesDecreaseImageEntity packageEntity = new AftersalesDecreaseImageEntity(); + BeanUtil.copyProperties(i,packageEntity); + packageEntity.setWorkOrderId(aftersalesWorkOrder.getId()); + packageEntity.setWarehouseId(myCurrentWarehouse.getId()); + list.add(packageEntity); + }); + if(!list.isEmpty()){ + aftersalesDecreaseImageService.saveBatch(list); + } + } - return baseMapper.updateById(aftersalesWorkOrder) > 0 ? true : false; - } + return true; } /** @@ -197,4 +222,24 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list = taskQuestService.selectStrip(Condition.getPage(query),id); return R.data(list); } +*/ /** * 盘点任务 任务下的库存品 */ - @GetMapping("/SelectInventory") +/* @GetMapping("/SelectInventory") @ApiOperationSupport(order = 1) @ApiOperation(value = "盘点任务 任务下的库存品", notes = "传入id") public R> SelectInventory(Long id,Query query) { IPage list = taskQuestService.selectInventory(Condition.getPage(query),id); return R.data(list); - } + }*/ /** * 盘点任务 任务下的零担 */ - @GetMapping("/SelectZreo") + /*@GetMapping("/SelectZreo") @ApiOperationSupport(order = 1) @ApiOperation(value = "盘点任务 任务下的零担", notes = "传入id") public R> SelectZero(Long id,Query query) { IPage list = taskQuestService.selectZero(Condition.getPage(query),id); return R.data(list); - } + }*/ /** * 删除盘点数据 @@ -156,6 +159,38 @@ public class TaskQuestController extends BladeController { return R.data(page); } + + /** + * 查询盘点对比数据 + * @return + */ + @GetMapping("/export-getContrastInfo") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "导出数据 盘点对比数据", notes = "传入questDetailDTO") + public void exportGetContrastInfo(QuestDetailDTO questDetailDTO, HttpServletResponse response){ + List list = taskQuestService.exportGetContrastInfo(questDetailDTO); + ExcelUtil.export(response, "盘点任务数据" + DateUtil.time(), "盘点任务对比明细数据表", list, QuestContrastExcel.class); + + } + + /** + * 导出数据 + */ +// @GetMapping("/export-taskQuest") +// @ApiOperationSupport(order = 9) +// @ApiOperation(value = "导出数据", notes = "传入taskQuest") +// public void exportTaskQuest(@ApiIgnore @RequestParam Map taskQuest, BladeUser bladeUser, HttpServletResponse response) { +// QueryWrapper queryWrapper = Condition.getQueryWrapper(taskQuest, TaskQuestEntity.class); +// //if (!AuthUtil.isAdministrator()) { +// // queryWrapper.lambda().eq(TaskQuest::getTenantId, bladeUser.getTenantId()); +// //} +// queryWrapper.lambda().eq(TaskQuestEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); +// List list = taskQuestService.exportTaskQuest(queryWrapper); +// ExcelUtil.export(response, "盘点任务数据" + DateUtil.time(), "盘点任务数据表", list, TaskQuestExcel.class); +// } + + + /** * 修改盘点数据 * @return diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/QuestContrastExcel.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/QuestContrastExcel.java new file mode 100644 index 000000000..804df5bea --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/QuestContrastExcel.java @@ -0,0 +1,134 @@ +package com.logpm.warehouse.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import lombok.Data; + +import java.util.Date; + +@Data +public class QuestContrastExcel { + + /** + * 订单自编号 + */ + @ColumnWidth(20) + @ExcelProperty("订单自编号") + private String orderCode; + /** + * 品牌名称 + */ + @ColumnWidth(20) + @ExcelProperty("品牌名称") + private String brandName; + /** + * 入库批次号 + */ + @ColumnWidth(20) + @ExcelProperty("入库批次号") + private String incomingBatch; + /** + * 商场 名称 + */ + @ColumnWidth(20) + @ExcelProperty("商场名称") + private String mallName; + /*** + * 客户名称 + */ + @ColumnWidth(20) + @ExcelProperty("客户名称") + private String customerName; + /** + * 三级名称 + */ + @ColumnWidth(20) + @ExcelProperty("三级名称") + private String thirdProduct; + /** + * 物料名称 + */ + @ColumnWidth(20) + @ExcelProperty("物料名称") + private String materialName; + /** + * 总件数 + */ + @ColumnWidth(20) + @ExcelProperty("总件数") + private Integer totalNumber; + /** + * 在库数据 + */ + @ColumnWidth(20) + @ExcelProperty("在库数据") + private Integer handQuantity; + /** + * 所在托盘 + */ + @ColumnWidth(20) + @ExcelProperty("所在托盘") + private String pallet; + /** + * 货物信息 + */ + @ColumnWidth(20) + @ExcelProperty("货物信息") + private String goodsAllocation; + /** + * 盘点人 + */ + @ColumnWidth(20) + @ExcelProperty("盘点人") + private String updateUser; + /** + * 盘点时间 + */ + /* @ColumnWidth(20) + @ExcelProperty("盘点时间") + private Date updateTime;*/ + + /** + * 盘点时间 + */ + @ColumnWidth(20) + @ExcelProperty("盘点时间") + private String updateTimes; + /** + * 盘点数据 + */ + @ColumnWidth(20) + @ExcelProperty("盘点数据") + private Integer questNum; + /** + * 差异数 + */ + @ColumnWidth(20) + @ExcelProperty("差异数") + private Integer differenceNum; + /** + * 托盘码 + */ + @ColumnWidth(20) + @ExcelProperty("托盘码") + private String trayCode; + + @ColumnWidth(20) + @ExcelProperty("货区-货架-货位") + private String positionCode; + + /** + * 更新的货物信息 + */ + @ColumnWidth(20) + @ExcelProperty("更新的货位") + private String groundingPositionCode; + /** + * 货物状态 + */ + @ColumnWidth(20) + @ExcelProperty("货物状态") + private String questStatusName; + + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml index bb421c515..9705432b3 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml @@ -42,6 +42,7 @@ #{item} + and ltq.quest_num like concat("%",#{param.questNum},"%") ORDER BY ltq.create_time desc diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java index b165ae3ad..1b383e8e0 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java @@ -24,6 +24,7 @@ import com.logpm.warehouse.dto.TaskSearchDTO; import com.logpm.warehouse.entity.QuestDetailChildEntity; import com.logpm.warehouse.entity.QuestDetailEntity; import com.logpm.warehouse.entity.TaskQuestEntity; +import com.logpm.warehouse.excel.QuestContrastExcel; import com.logpm.warehouse.excel.TaskQuestExcel; import com.logpm.warehouse.vo.*; import org.springblade.core.mp.base.BaseService; @@ -261,4 +262,11 @@ public interface ITaskQuestService extends BaseService { * @return */ List selectQuestChildInfo( QuestDetailDTO questDetailDTO); + + /** + * 盘点对比明细数据导出 + * @param questDetailDTO + * @return + */ + List exportGetContrastInfo(QuestDetailDTO questDetailDTO); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java index 85ed31d7a..654606830 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java @@ -37,6 +37,7 @@ import com.logpm.warehouse.dto.QuestDetailDTO; import com.logpm.warehouse.dto.TaskQuestDTO; import com.logpm.warehouse.dto.TaskSearchDTO; import com.logpm.warehouse.entity.*; +import com.logpm.warehouse.excel.QuestContrastExcel; import com.logpm.warehouse.excel.TaskQuestExcel; import com.logpm.warehouse.mapper.TaskQuestMapper; import com.logpm.warehouse.mapper.WarehouseTrayGoodsMapper; @@ -1155,6 +1156,22 @@ public class TaskQuestServiceImpl extends BaseServiceImpl exportGetContrastInfo(QuestDetailDTO questDetailDTO) { + List list = new ArrayList<>(); + List questDetailChildEntities = selectQuestChildInfo(questDetailDTO); + if(ObjectUtils.isNull(questDetailChildEntities)) { + return list; + } + questDetailChildEntities.forEach( i -> { + QuestContrastExcel questContrastExcel = new QuestContrastExcel(); + BeanUtil.copyProperties(i,questContrastExcel); + list.add(questContrastExcel); + }); + return list; + + } + /** * 查询货位上的数据 * @param taskSearchDTO