Browse Source

修改盘点pc导出,添加客服工单修改

training
caoyizhong 1 year ago
parent
commit
70c4ff8294
  1. 4
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessorEntity.java
  2. 6
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReturnRecordEntity.java
  3. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessingResultsController.java
  4. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesReturnRecordController.java
  5. 12
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  6. 21
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java
  7. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessingResultsService.java
  8. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesReturnRecordService.java
  9. 7
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
  10. 23
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesExchangeServiceImpl.java
  11. 20
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java
  12. 36
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesReturnRecordServiceImpl.java
  13. 97
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  14. 43
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/TaskQuestController.java
  15. 134
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/QuestContrastExcel.java
  16. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml
  17. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java
  18. 17
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

4
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;

6
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;
}

2
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));
}
/**

2
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));
}
/**

12
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));
}
/**
* 客服异常工单 修改
*/

21
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java

@ -36,15 +36,36 @@ public class AftersalesWorkOrderDTO extends AftersalesWorkOrderEntity {
* 包件
*/
private List<AftersalesAbnormalPackageEntity> packageEntityList;
/**
* 清除的ID包件
*/
private List<Long> unPpackageEntityList;
/**
* 责任方和处理方
*/
private List<AftersalesProcessorEntity> processorEntityList;
/**
* 取消的 责任方和处理方
*/
private List<Long> unProcessorEntityList;
/**
* 货损图片
*/
private List<AftersalesDecreaseImageEntity> decreaseImageEntityList;
/**
* 取消的货损图片
*/
private List<Long> unDecreaseImageEntityList;
/**
* 异常工单完结处理结果受款方
*/
private List<AftersalesCompletionRecipientEntity> completionRecipientEntities;
/**
* 异常工单完结处理结果赔款方
*/
private List<AftersalesCompletionRecordEntity> completionRecordEntities;
}

6
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessingResultsService.java

@ -49,4 +49,10 @@ public interface IAftersalesProcessingResultsService extends BaseService<Aftersa
*/
List<AftersalesProcessingResultsExcel> exportAftersalesProcessingResults(Wrapper<AftersalesProcessingResultsEntity> queryWrapper);
/**
* 添加或修改出来结果
* @param aftersalesProcessingResults
* @return
*/
boolean ownSaveOrUpdate(AftersalesProcessingResultsEntity aftersalesProcessingResults);
}

6
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesReturnRecordService.java

@ -49,4 +49,10 @@ public interface IAftersalesReturnRecordService extends BaseService<AftersalesRe
*/
List<AftersalesReturnRecordExcel> exportAftersalesReturnRecord(Wrapper<AftersalesReturnRecordEntity> queryWrapper);
/**
* 添加或修改数据
* @param aftersalesReturnRecord
* @return
*/
boolean ownSaveOrUpdate(AftersalesReturnRecordEntity aftersalesReturnRecord);
}

7
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java

@ -64,4 +64,11 @@ public interface IAftersalesWorkOrderService extends BaseService<AftersalesWorkO
* @return
*/
IPage<AftersalesWorkOrderVO> getPendingWorkOrder(AftersalesWorkOrderDTO aftersalesWorkOrder, IPage<Object> page);
/**
* 完结异常工单
* @param aftersalesWorkOrder
* @return
*/
boolean addCompletionEnd(AftersalesWorkOrderDTO aftersalesWorkOrder);
}

23
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<AftersalesExc
*/
@Override
public boolean ownSaveOrUpdate(AftersalesExchangeEntity aftersalesExchange) {
BladeUser user = AuthUtil.getUser();
if(ObjectUtil.isNull(aftersalesExchange.getId())){
//添加回复处理交流数据
aftersalesExchange.setCreateTime(new Date());
aftersalesExchange.setCreateDept(Long.valueOf(user.getDeptId()));
aftersalesExchange.setCreateUser(user.getUserId());
aftersalesExchange.setStatus(1);
aftersalesExchange.setIsDeleted(0);
baseMapper.insert(aftersalesExchange);
}else{
//修改
}
return false;
}

20
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java

@ -16,6 +16,7 @@
*/
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.aftersales.entity.AftersalesProcessingResultsEntity;
import com.logpm.aftersales.vo.AftersalesProcessingResultsVO;
import com.logpm.aftersales.excel.AftersalesProcessingResultsExcel;
@ -51,4 +52,23 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<Afte
return aftersalesProcessingResultsList;
}
/**
* 出来修改结果
* @param aftersalesProcessingResults
* @return
*/
@Override
public boolean ownSaveOrUpdate(AftersalesProcessingResultsEntity aftersalesProcessingResults) {
if(ObjectUtil.isNull(aftersalesProcessingResults.getId())){
//添加
baseMapper.insert(aftersalesProcessingResults);
return true;
}else{
//修改
baseMapper.updateById(aftersalesProcessingResults);
return true;
}
}
}

36
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesReturnRecordServiceImpl.java

@ -16,11 +16,18 @@
*/
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.aftersales.entity.AftersalesReturnRecordEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.service.IAftersalesWorkOrderService;
import com.logpm.aftersales.vo.AftersalesReturnRecordVO;
import com.logpm.aftersales.excel.AftersalesReturnRecordExcel;
import com.logpm.aftersales.mapper.AftersalesReturnRecordMapper;
import com.logpm.aftersales.service.IAftersalesReturnRecordService;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -34,8 +41,12 @@ import java.util.List;
* @since 2023-11-17
*/
@Service
@AllArgsConstructor
public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<AftersalesReturnRecordMapper, AftersalesReturnRecordEntity> implements IAftersalesReturnRecordService {
private final IAftersalesWorkOrderService aftersalesWorkOrderService;
@Override
public IPage<AftersalesReturnRecordVO> selectAftersalesReturnRecordPage(IPage<AftersalesReturnRecordVO> page, AftersalesReturnRecordVO aftersalesReturnRecord) {
return page.setRecords(baseMapper.selectAftersalesReturnRecordPage(page, aftersalesReturnRecord));
@ -51,4 +62,29 @@ public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<Aftersale
return aftersalesReturnRecordList;
}
/**
* 添加或修改 打回数据
* @param aftersalesReturnRecord
* @return
*/
@Override
public boolean ownSaveOrUpdate(AftersalesReturnRecordEntity aftersalesReturnRecord) {
if(ObjectUtil.isNull(aftersalesReturnRecord.getId())){
//修改异常工单的状态
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderVO();
workOrderEntity.setId(aftersalesReturnRecord.getWorkOrderId());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.daichuli.getValue());
aftersalesWorkOrderService.updateById(workOrderEntity);
//添加
baseMapper.insert(aftersalesReturnRecord);
return true;
}else{
//修改
baseMapper.updateById(aftersalesReturnRecord);
return true;
}
}
}

97
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -16,19 +16,17 @@
*/
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.AftersalesAbnormalPackageEntity;
import com.logpm.aftersales.entity.AftersalesDecreaseImageEntity;
import com.logpm.aftersales.entity.AftersalesProcessorEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.service.IAftersalesAbnormalPackageService;
import com.logpm.aftersales.service.IAftersalesDecreaseImageService;
import com.logpm.aftersales.service.IAftersalesProcessorService;
import com.logpm.aftersales.service.*;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
import com.logpm.aftersales.mapper.AftersalesWorkOrderMapper;
import com.logpm.aftersales.service.IAftersalesWorkOrderService;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import lombok.AllArgsConstructor;
@ -67,6 +65,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
private final IAftersalesAbnormalPackageService aftersalesAbnormalPackageService;
private final IAftersalesDecreaseImageService aftersalesDecreaseImageService;
private final IAftersalesProcessorService aftersalesProcessorService;
private final IAftersalesCompletionRecordService completionRecordService;
private final IAftersalesCompletionRecipientService completionRecipientService;
private final IBasicdataWarehouseClient warehouseClient;
@ -128,10 +128,39 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId());
aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.daichuli.getValue());
baseMapper.insert(aftersalesWorkOrder);
}else{
//修改
if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnPpackageEntityList())){
//删除修改包件
aftersalesAbnormalPackageService.deleteLogic(aftersalesWorkOrder.getUnPpackageEntityList());
}
if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnProcessorEntityList())){
//责任方 处理方
List<AftersalesProcessorEntity> list = new ArrayList<>();
aftersalesWorkOrder.getUnProcessorEntityList().forEach(i ->{
AftersalesProcessorEntity processorEntity = new AftersalesProcessorEntity();
processorEntity.setId(i);
processorEntity.setConditions("3");
list.add(processorEntity);
});
if(!list.isEmpty()){
aftersalesProcessorService.saveOrUpdateBatch(list);
}
}
if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnDecreaseImageEntityList())){
//图片修改
aftersalesDecreaseImageService.deleteLogic(aftersalesWorkOrder.getUnDecreaseImageEntityList());
}
baseMapper.updateById(aftersalesWorkOrder);
}
//添加包件信息
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getPackageEntityList())){
//包件信息
List<AftersalesAbnormalPackageEntity> list = new ArrayList<>();
aftersalesWorkOrder.getPackageEntityList().stream().forEach(i ->{
aftersalesWorkOrder.getPackageEntityList().forEach(i ->{
AftersalesAbnormalPackageEntity packageEntity = new AftersalesAbnormalPackageEntity();
BeanUtil.copyProperties(i,packageEntity);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId());
@ -142,46 +171,42 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesAbnormalPackageService.saveBatch(list);
}
}
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getDecreaseImageEntityList())){
//货损图片
List<AftersalesDecreaseImageEntity> list = new ArrayList<>();
aftersalesWorkOrder.getDecreaseImageEntityList().stream().forEach(i ->{
AftersalesDecreaseImageEntity packageEntity = new AftersalesDecreaseImageEntity();
//添加责任方 处理方
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())){
//责任方 处理方
List<AftersalesProcessorEntity> 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()){
aftersalesDecreaseImageService.saveBatch(list);
aftersalesProcessorService.saveBatch(list);
}
}
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())){
//责任方 处理方
List<AftersalesProcessorEntity> list = new ArrayList<>();
aftersalesWorkOrder.getProcessorEntityList().stream().forEach(i ->{
AftersalesProcessorEntity packageEntity = new AftersalesProcessorEntity();
//添加图片信息
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getDecreaseImageEntityList())){
//货损图片
List<AftersalesDecreaseImageEntity> list = new ArrayList<>();
aftersalesWorkOrder.getDecreaseImageEntityList().forEach(i ->{
AftersalesDecreaseImageEntity packageEntity = new AftersalesDecreaseImageEntity();
BeanUtil.copyProperties(i,packageEntity);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId());
packageEntity.setConditions("1");//正常
packageEntity.setWarehouseId(myCurrentWarehouse.getId());
list.add(packageEntity);
});
if(!list.isEmpty()){
aftersalesProcessorService.saveBatch(list);
}
aftersalesDecreaseImageService.saveBatch(list);
}
return true;
}else{
//修改
}
return baseMapper.updateById(aftersalesWorkOrder) > 0 ? true : false;
}
return true;
}
/**
@ -197,4 +222,24 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
return list;
}
/**
* 完成异常工单数据
* @param aftersalesWorkOrder
* @return
*/
@Override
public boolean addCompletionEnd(AftersalesWorkOrderDTO aftersalesWorkOrder) {
if(ObjectUtils.isNull(aftersalesWorkOrder.getCompletionRecordEntities()) ){
throw new ServiceException("赔款方数据不能为空");
}
//添加赔付方信息
completionRecordService.saveBatch(aftersalesWorkOrder.getCompletionRecordEntities());
//添加受款方信息,可以为空
if(ObjectUtils.isNull(aftersalesWorkOrder.getCompletionRecipientEntities())){
completionRecipientService.saveBatch(aftersalesWorkOrder.getCompletionRecipientEntities());
}
return true;
}
}

43
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/TaskQuestController.java

@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.warehouse.dto.QuestDetailDTO;
import com.logpm.warehouse.dto.TaskQuestDTO;
import com.logpm.warehouse.dto.TaskSearchDTO;
import com.logpm.warehouse.excel.QuestContrastExcel;
import com.logpm.warehouse.vo.QuestContrastVO;
import com.logpm.warehouse.vo.QuestDetailVO;
import com.logpm.warehouse.wrapper.TaskQuestVOWrapper;
@ -82,6 +83,7 @@ public class TaskQuestController extends BladeController {
/**
* 盘点任务 任务下的包条
*/
/*
@GetMapping("/SelectStrip")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 任务下的包条", notes = "传入taskQuest")
@ -89,28 +91,29 @@ public class TaskQuestController extends BladeController {
IPage<QuestDetailVO> list = taskQuestService.selectStrip(Condition.getPage(query),id);
return R.data(list);
}
*/
/**
* 盘点任务 任务下的库存品
*/
@GetMapping("/SelectInventory")
/* @GetMapping("/SelectInventory")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 任务下的库存品", notes = "传入id")
public R<IPage<QuestDetailVO>> SelectInventory(Long id,Query query) {
IPage<QuestDetailVO> list = taskQuestService.selectInventory(Condition.getPage(query),id);
return R.data(list);
}
}*/
/**
* 盘点任务 任务下的零担
*/
@GetMapping("/SelectZreo")
/*@GetMapping("/SelectZreo")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 任务下的零担", notes = "传入id")
public R<IPage<QuestDetailVO>> SelectZero(Long id,Query query) {
IPage<QuestDetailVO> 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<QuestContrastExcel> 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<String, Object> taskQuest, BladeUser bladeUser, HttpServletResponse response) {
// QueryWrapper<TaskQuestEntity> 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<TaskQuestExcel> list = taskQuestService.exportTaskQuest(queryWrapper);
// ExcelUtil.export(response, "盘点任务数据" + DateUtil.time(), "盘点任务数据表", list, TaskQuestExcel.class);
// }
/**
* 修改盘点数据
* @return

134
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;
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml

@ -42,6 +42,7 @@
#{item}
</foreach>
</if>
<if test="param.questNum != null and param.questNum != ''"> and ltq.quest_num like concat("%",#{param.questNum},"%")</if>
</where>
ORDER BY ltq.create_time desc
</select>

8
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<TaskQuestEntity> {
* @return
*/
List<QuestDetailChildEntity> selectQuestChildInfo( QuestDetailDTO questDetailDTO);
/**
* 盘点对比明细数据导出
* @param questDetailDTO
* @return
*/
List<QuestContrastExcel> exportGetContrastInfo(QuestDetailDTO questDetailDTO);
}

17
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<TaskQuestMapper, TaskQ
return baseMapper.selectQuestDetailChildInfo(questDetailDTO.getQuestNum()+"_child",questDetailChild);
}
@Override
public List<QuestContrastExcel> exportGetContrastInfo(QuestDetailDTO questDetailDTO) {
List<QuestContrastExcel> list = new ArrayList<>();
List<QuestDetailChildEntity> 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

Loading…
Cancel
Save