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. 135
      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") @ApiModelProperty(value = "异常工单ID")
private Long workOrderId; private Long workOrderId;
/** /**
* 状态 * 状态 状态 1正常 2新增 3取消
*/ */
@ApiModelProperty(value = "状态") @ApiModelProperty(value = "状态")
private String conditions; private String conditions;
/** /**
* 类型 * 类型 类型 1 责任方 2 处理方
*/ */
@ApiModelProperty(value = "类型") @ApiModelProperty(value = "类型")
private String typesOf; 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 * 异常工单ID
*/ */
@ApiModelProperty(value = "异常工单ID") @ApiModelProperty(value = "异常工单ID")
private String workOrderId; private Long workOrderId;
/** /**
* 待处理营业部ID * 待处理营业部ID
*/ */
@ApiModelProperty(value = "待处理营业部ID") @ApiModelProperty(value = "待处理营业部ID")
private String businessId; private Long businessId;
/** /**
* 待处理营业部名称 * 待处理营业部名称
*/ */
@ -85,6 +85,6 @@ public class AftersalesReturnRecordEntity extends TenantEntity {
* 仓库Id * 仓库Id
*/ */
@ApiModelProperty(value = "仓库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) @ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入aftersalesProcessingResults") @ApiOperation(value = "新增或修改", notes = "传入aftersalesProcessingResults")
public R submit(@Valid @RequestBody AftersalesProcessingResultsEntity 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) @ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入aftersalesReturnRecord") @ApiOperation(value = "新增或修改", notes = "传入aftersalesReturnRecord")
public R submit(@Valid @RequestBody AftersalesReturnRecordEntity 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)); 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; private List<AftersalesAbnormalPackageEntity> packageEntityList;
/**
* 清除的ID包件
*/
private List<Long> unPpackageEntityList;
/** /**
* 责任方和处理方 * 责任方和处理方
*/ */
private List<AftersalesProcessorEntity> processorEntityList; private List<AftersalesProcessorEntity> processorEntityList;
/**
* 取消的 责任方和处理方
*/
private List<Long> unProcessorEntityList;
/** /**
* 货损图片 * 货损图片
*/ */
private List<AftersalesDecreaseImageEntity> decreaseImageEntityList; 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); 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); 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 * @return
*/ */
IPage<AftersalesWorkOrderVO> getPendingWorkOrder(AftersalesWorkOrderDTO aftersalesWorkOrder, IPage<Object> page); 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; package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.aftersales.entity.AftersalesExchangeEntity; import com.logpm.aftersales.entity.AftersalesExchangeEntity;
import com.logpm.aftersales.vo.AftersalesExchangeVO; 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.mapper.AftersalesExchangeMapper;
import com.logpm.aftersales.service.IAftersalesExchangeService; import com.logpm.aftersales.service.IAftersalesExchangeService;
import org.springblade.core.mp.support.Condition; 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 org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -61,6 +67,23 @@ public class AftersalesExchangeServiceImpl extends BaseServiceImpl<AftersalesExc
*/ */
@Override @Override
public boolean ownSaveOrUpdate(AftersalesExchangeEntity aftersalesExchange) { 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; 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; package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.aftersales.entity.AftersalesProcessingResultsEntity; import com.logpm.aftersales.entity.AftersalesProcessingResultsEntity;
import com.logpm.aftersales.vo.AftersalesProcessingResultsVO; import com.logpm.aftersales.vo.AftersalesProcessingResultsVO;
import com.logpm.aftersales.excel.AftersalesProcessingResultsExcel; import com.logpm.aftersales.excel.AftersalesProcessingResultsExcel;
@ -51,4 +52,23 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<Afte
return aftersalesProcessingResultsList; 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; package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.aftersales.entity.AftersalesReturnRecordEntity; 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.vo.AftersalesReturnRecordVO;
import com.logpm.aftersales.excel.AftersalesReturnRecordExcel; import com.logpm.aftersales.excel.AftersalesReturnRecordExcel;
import com.logpm.aftersales.mapper.AftersalesReturnRecordMapper; import com.logpm.aftersales.mapper.AftersalesReturnRecordMapper;
import com.logpm.aftersales.service.IAftersalesReturnRecordService; 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 org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -34,8 +41,12 @@ import java.util.List;
* @since 2023-11-17 * @since 2023-11-17
*/ */
@Service @Service
@AllArgsConstructor
public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<AftersalesReturnRecordMapper, AftersalesReturnRecordEntity> implements IAftersalesReturnRecordService { public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<AftersalesReturnRecordMapper, AftersalesReturnRecordEntity> implements IAftersalesReturnRecordService {
private final IAftersalesWorkOrderService aftersalesWorkOrderService;
@Override @Override
public IPage<AftersalesReturnRecordVO> selectAftersalesReturnRecordPage(IPage<AftersalesReturnRecordVO> page, AftersalesReturnRecordVO aftersalesReturnRecord) { public IPage<AftersalesReturnRecordVO> selectAftersalesReturnRecordPage(IPage<AftersalesReturnRecordVO> page, AftersalesReturnRecordVO aftersalesReturnRecord) {
return page.setRecords(baseMapper.selectAftersalesReturnRecordPage(page, aftersalesReturnRecord)); return page.setRecords(baseMapper.selectAftersalesReturnRecordPage(page, aftersalesReturnRecord));
@ -51,4 +62,29 @@ public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<Aftersale
return aftersalesReturnRecordList; 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;
}
}
} }

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

@ -16,19 +16,17 @@
*/ */
package com.logpm.aftersales.service.impl; package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO; import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.AftersalesAbnormalPackageEntity; import com.logpm.aftersales.entity.AftersalesAbnormalPackageEntity;
import com.logpm.aftersales.entity.AftersalesDecreaseImageEntity; import com.logpm.aftersales.entity.AftersalesDecreaseImageEntity;
import com.logpm.aftersales.entity.AftersalesProcessorEntity; import com.logpm.aftersales.entity.AftersalesProcessorEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity; import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.service.IAftersalesAbnormalPackageService; import com.logpm.aftersales.service.*;
import com.logpm.aftersales.service.IAftersalesDecreaseImageService;
import com.logpm.aftersales.service.IAftersalesProcessorService;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO; import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel; import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
import com.logpm.aftersales.mapper.AftersalesWorkOrderMapper; import com.logpm.aftersales.mapper.AftersalesWorkOrderMapper;
import com.logpm.aftersales.service.IAftersalesWorkOrderService;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -67,6 +65,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
private final IAftersalesAbnormalPackageService aftersalesAbnormalPackageService; private final IAftersalesAbnormalPackageService aftersalesAbnormalPackageService;
private final IAftersalesDecreaseImageService aftersalesDecreaseImageService; private final IAftersalesDecreaseImageService aftersalesDecreaseImageService;
private final IAftersalesProcessorService aftersalesProcessorService; private final IAftersalesProcessorService aftersalesProcessorService;
private final IAftersalesCompletionRecordService completionRecordService;
private final IAftersalesCompletionRecipientService completionRecipientService;
private final IBasicdataWarehouseClient warehouseClient; private final IBasicdataWarehouseClient warehouseClient;
@ -128,60 +128,85 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId()); aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId());
aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.daichuli.getValue()); aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.daichuli.getValue());
baseMapper.insert(aftersalesWorkOrder); baseMapper.insert(aftersalesWorkOrder);
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getPackageEntityList())){
//包件信息
List<AftersalesAbnormalPackageEntity> 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<AftersalesDecreaseImageEntity> 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<AftersalesProcessorEntity> list = new ArrayList<>(); List<AftersalesProcessorEntity> list = new ArrayList<>();
aftersalesWorkOrder.getProcessorEntityList().stream().forEach(i ->{ aftersalesWorkOrder.getUnProcessorEntityList().forEach(i ->{
AftersalesProcessorEntity packageEntity = new AftersalesProcessorEntity(); AftersalesProcessorEntity processorEntity = new AftersalesProcessorEntity();
BeanUtil.copyProperties(i,packageEntity); processorEntity.setId(i);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId()); processorEntity.setConditions("3");
packageEntity.setConditions("1");//正常 list.add(processorEntity);
packageEntity.setWarehouseId(myCurrentWarehouse.getId());
list.add(packageEntity);
}); });
if(!list.isEmpty()){ 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<AftersalesAbnormalPackageEntity> 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<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()){
aftersalesProcessorService.saveBatch(list);
}
}
//添加图片信息
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.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<AftersalesWo
return list; 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.QuestDetailDTO;
import com.logpm.warehouse.dto.TaskQuestDTO; import com.logpm.warehouse.dto.TaskQuestDTO;
import com.logpm.warehouse.dto.TaskSearchDTO; import com.logpm.warehouse.dto.TaskSearchDTO;
import com.logpm.warehouse.excel.QuestContrastExcel;
import com.logpm.warehouse.vo.QuestContrastVO; import com.logpm.warehouse.vo.QuestContrastVO;
import com.logpm.warehouse.vo.QuestDetailVO; import com.logpm.warehouse.vo.QuestDetailVO;
import com.logpm.warehouse.wrapper.TaskQuestVOWrapper; import com.logpm.warehouse.wrapper.TaskQuestVOWrapper;
@ -82,6 +83,7 @@ public class TaskQuestController extends BladeController {
/** /**
* 盘点任务 任务下的包条 * 盘点任务 任务下的包条
*/ */
/*
@GetMapping("/SelectStrip") @GetMapping("/SelectStrip")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 任务下的包条", notes = "传入taskQuest") @ApiOperation(value = "盘点任务 任务下的包条", notes = "传入taskQuest")
@ -89,28 +91,29 @@ public class TaskQuestController extends BladeController {
IPage<QuestDetailVO> list = taskQuestService.selectStrip(Condition.getPage(query),id); IPage<QuestDetailVO> list = taskQuestService.selectStrip(Condition.getPage(query),id);
return R.data(list); return R.data(list);
} }
*/
/** /**
* 盘点任务 任务下的库存品 * 盘点任务 任务下的库存品
*/ */
@GetMapping("/SelectInventory") /* @GetMapping("/SelectInventory")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 任务下的库存品", notes = "传入id") @ApiOperation(value = "盘点任务 任务下的库存品", notes = "传入id")
public R<IPage<QuestDetailVO>> SelectInventory(Long id,Query query) { public R<IPage<QuestDetailVO>> SelectInventory(Long id,Query query) {
IPage<QuestDetailVO> list = taskQuestService.selectInventory(Condition.getPage(query),id); IPage<QuestDetailVO> list = taskQuestService.selectInventory(Condition.getPage(query),id);
return R.data(list); return R.data(list);
} }*/
/** /**
* 盘点任务 任务下的零担 * 盘点任务 任务下的零担
*/ */
@GetMapping("/SelectZreo") /*@GetMapping("/SelectZreo")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 任务下的零担", notes = "传入id") @ApiOperation(value = "盘点任务 任务下的零担", notes = "传入id")
public R<IPage<QuestDetailVO>> SelectZero(Long id,Query query) { public R<IPage<QuestDetailVO>> SelectZero(Long id,Query query) {
IPage<QuestDetailVO> list = taskQuestService.selectZero(Condition.getPage(query),id); IPage<QuestDetailVO> list = taskQuestService.selectZero(Condition.getPage(query),id);
return R.data(list); return R.data(list);
} }*/
/** /**
* 删除盘点数据 * 删除盘点数据
@ -156,6 +159,38 @@ public class TaskQuestController extends BladeController {
return R.data(page); 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 * @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} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.questNum != null and param.questNum != ''"> and ltq.quest_num like concat("%",#{param.questNum},"%")</if>
</where> </where>
ORDER BY ltq.create_time desc ORDER BY ltq.create_time desc
</select> </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.QuestDetailChildEntity;
import com.logpm.warehouse.entity.QuestDetailEntity; import com.logpm.warehouse.entity.QuestDetailEntity;
import com.logpm.warehouse.entity.TaskQuestEntity; import com.logpm.warehouse.entity.TaskQuestEntity;
import com.logpm.warehouse.excel.QuestContrastExcel;
import com.logpm.warehouse.excel.TaskQuestExcel; import com.logpm.warehouse.excel.TaskQuestExcel;
import com.logpm.warehouse.vo.*; import com.logpm.warehouse.vo.*;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
@ -261,4 +262,11 @@ public interface ITaskQuestService extends BaseService<TaskQuestEntity> {
* @return * @return
*/ */
List<QuestDetailChildEntity> selectQuestChildInfo( QuestDetailDTO questDetailDTO); 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.TaskQuestDTO;
import com.logpm.warehouse.dto.TaskSearchDTO; import com.logpm.warehouse.dto.TaskSearchDTO;
import com.logpm.warehouse.entity.*; import com.logpm.warehouse.entity.*;
import com.logpm.warehouse.excel.QuestContrastExcel;
import com.logpm.warehouse.excel.TaskQuestExcel; import com.logpm.warehouse.excel.TaskQuestExcel;
import com.logpm.warehouse.mapper.TaskQuestMapper; import com.logpm.warehouse.mapper.TaskQuestMapper;
import com.logpm.warehouse.mapper.WarehouseTrayGoodsMapper; import com.logpm.warehouse.mapper.WarehouseTrayGoodsMapper;
@ -1155,6 +1156,22 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
return baseMapper.selectQuestDetailChildInfo(questDetailDTO.getQuestNum()+"_child",questDetailChild); 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 * @param taskSearchDTO

Loading…
Cancel
Save