Browse Source

Merge branch 'dev' into pre-production

single_db
pref_mail@163.com 1 year ago
parent
commit
3db5f29d53
  1. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
  2. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAppealServiceImpl.java
  3. 76
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesReturnRecordServiceImpl.java
  4. 36
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  6. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  7. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  8. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

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

@ -223,7 +223,7 @@ public interface IAftersalesWorkOrderService extends BaseService<AftersalesWorkO
*
* @return
*/
Boolean addSurveyRecord(Long workOrderId,String results,String difference);
Boolean addSurveyRecord(BladeUser user,Long workOrderId,String results,String difference);
/**
* 修改完结数据

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAppealServiceImpl.java

@ -132,7 +132,7 @@ public class AftersalesAppealServiceImpl extends BaseServiceImpl<AftersalesAppea
aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.shenshuzhong.getValue());
aftersalesWorkOrderService.updateById(aftersalesWorkOrder);
//添加操作记录
aftersalesWorkOrderService.addSurveyRecord(aftersalesAppeal.getWorkOrderId(),"申述操作","3");
aftersalesWorkOrderService.addSurveyRecord(user,aftersalesAppeal.getWorkOrderId(),"申述操作","3");
}
if(ObjectUtil.isNotNull( aftersalesAppeal.getPeopleEntityList())){
//添加实际收货人

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

@ -17,6 +17,7 @@
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.nacos.plugin.auth.constant.Constants;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.aftersales.dto.AftersalesReturnRecordDTO;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
@ -32,13 +33,18 @@ import org.springblade.common.constant.aftersales.ProcessorProcessingStatusStatu
import org.springblade.common.constant.aftersales.ProcessorTypesOfStatusConstant;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.stream.Collectors;
@ -57,6 +63,7 @@ public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<Aftersale
private final IAftersalesProcessorService aftersalesProcessorService;
private final IAftersalesAbnormalPackageService aftersalesAbnormalPackageService;
private final IAftersalesDecreaseImageService aftersalesDecreaseImageService;
private final IAftersaleSurveyRecordService aftersaleSurveyRecordService;
@Override
public IPage<AftersalesReturnRecordVO> selectAftersalesReturnRecordPage(IPage<AftersalesReturnRecordVO> page, AftersalesReturnRecordVO aftersalesReturnRecord) {
@ -104,7 +111,9 @@ public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<Aftersale
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public boolean batchRepulse(AftersalesReturnRecordDTO aftersalesReturnRecord) {
BladeUser user = AuthUtil.getUser();
if(ObjectUtil.isNotNull(aftersalesReturnRecord)){
List<AftersalesProcessorEntity> processorEntityList = new ArrayList<>();
//打回的异常工单
@ -114,22 +123,60 @@ public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<Aftersale
.eq(AftersalesProcessorEntity::getWorkOrderId, i)
.eq(AftersalesProcessorEntity::getTypesOf, ProcessorTypesOfStatusConstant.chulifang.getValue())
);
List<AftersalesProcessorEntity> processorEntities = new ArrayList<>(); //新增
List<Long> pro = new ArrayList<>(); //修改为待回复的
List<AftersaleSurveyRecordEntity> surveyRecordEntities = new ArrayList<>();
//判断是否是已有处理方
if(!list.isEmpty()){
//删除
List<Long> collect = list.stream().map(AftersalesProcessorEntity::getId).collect(Collectors.toList());
aftersalesProcessorService.deleteLogic(collect);
list.forEach( a -> {
Iterator<AftersalesReturnRecordDTO.Processor> iterator = aftersalesReturnRecord.getProcessorList().iterator();
while (iterator.hasNext()){
AftersalesReturnRecordDTO.Processor q = iterator.next();
if(a.getBusinessId().equals(q.getId())){
//修改为待回复方
pro.add(a.getId());
//添加指定记录 1 调查记录 2 指定记录 3 操作记录
aftersalesWorkOrderService.addSurveyRecord(user,i,aftersalesReturnRecord.getReasonReturn(),"1"); //
aftersalesWorkOrderService.addSurveyRecord(user,i,user.getRoleName()+"指定处理方->"+q.getName(),"2");
iterator.remove();
}
}
});
if(!aftersalesReturnRecord.getProcessorList().isEmpty()){
aftersalesReturnRecord.getProcessorList().forEach(q ->{
//添加新的处理方
AftersalesProcessorEntity processor = new AftersalesProcessorEntity();
processor.setBusinessId(q.getId());
processor.setBusinessName(q.getName());
processor.setProcessingStatus(ProcessorProcessingStatusStatusConstant.daichuli.getValue());
processor.setConditions(ProcessorConditionsStatusConstant.xinzeng.getValue());
processor.setTypesOf(ProcessorTypesOfStatusConstant.chulifang.getValue());
processor.setWorkOrderId(i);
processor.setAssignTime(new Date());
processorEntities.add(processor);
//添加操作记录
aftersalesWorkOrderService.addSurveyRecord(user,i,aftersalesReturnRecord.getReasonReturn(),"1"); //
aftersalesWorkOrderService.addSurveyRecord(user,i,user.getRoleName()+"指定处理方->"+q.getName(),"2");
});
}
}
//修改处理方为已回复
aftersalesProcessorService.update(Wrappers.<AftersalesProcessorEntity>update().lambda()
.eq(AftersalesProcessorEntity::getWorkOrderId,i)
.eq(AftersalesProcessorEntity::getProcessingStatus,ProcessorProcessingStatusStatusConstant.tijiaofang.getValue())
.set(AftersalesProcessorEntity::getProcessingStatus,ProcessorProcessingStatusStatusConstant.yichuli.getValue())
);
//修改处理方
if(!pro.isEmpty()){
aftersalesProcessorService.update(Wrappers.<AftersalesProcessorEntity>update().lambda()
.in(AftersalesProcessorEntity::getId,pro)
.set(AftersalesProcessorEntity::getProcessingStatus,ProcessorProcessingStatusStatusConstant.daichuli.getValue())
);
}
//添加处理方
if(!processorEntities.isEmpty()){
aftersalesProcessorService.saveBatch(processorEntities);
}
//直接添加
aftersalesReturnRecord.getProcessorList().forEach(q ->{
AftersalesProcessorEntity processor = new AftersalesProcessorEntity();
processor.setBusinessId(q.getId());
processor.setBusinessName(q.getName());
processor.setProcessingStatus(ProcessorProcessingStatusStatusConstant.daichuli.getValue());
processor.setConditions(ProcessorConditionsStatusConstant.xinzeng.getValue());
processor.setTypesOf(ProcessorTypesOfStatusConstant.chulifang.getValue());
processor.setWorkOrderId(i);
processorEntityList.add(processor);
});
//修改异常工单的状态
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderVO();
workOrderEntity.setId(i);
@ -139,6 +186,7 @@ public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<Aftersale
BeanUtil.copyProperties(aftersalesReturnRecord,returnRecordEntity);
returnRecordEntity.setWorkOrderId(i);
baseMapper.insert(returnRecordEntity);
aftersalesWorkOrderService.addSurveyRecord(user,i,user.getRoleName()+"打回了该异常工单","3");
});
return true;
}

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

@ -565,10 +565,11 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
return false;
}).findFirst();
Object workOrderStatus = aftersalesWorkOrder.get("workOrderStatus");
if(first.isPresent()){
//存在
String dictValue = first.get().getDictKey();
Object workOrderStatus = aftersalesWorkOrder.get("workOrderStatus");
switch (dictValue){
case "1": //客服经理 查询全部待处理工单
//待处理
@ -635,6 +636,29 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}else{
throw new ServiceException("请选择仓库!");
}
//已处理
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yichuli.getValue())){
aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("handleStatus","30");
}
//待处理
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.daichuli.getValue())){
aftersalesWorkOrder.put("handleStatus","40");
}
//处理中
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.chulizhong.getValue())){
aftersalesWorkOrder.put("handleStatus","50");
}
//已完结
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())){
aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("handleStatus","20");
}
//全部
if(ObjectUtils.isNotNull(workOrderStatus) && "1000".equals(workOrderStatus)){
aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("handleStatus","10");
}
}
}
AftersalesWorkOrderEntity workOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderEntity.class);
@ -1615,12 +1639,18 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
* @return
*/
@Override
public Boolean addSurveyRecord(Long workOrderId,String results,String difference) {
@Async
public Boolean addSurveyRecord(BladeUser user,Long workOrderId,String results,String difference) {
//添加跟踪记录
BladeUser user = AuthUtil.getUser();
AftersaleSurveyRecordDTO aftersaleSurveyRecordDTO = changName(new AftersalesWorkOrderDTO(), user);
AftersaleSurveyRecordEntity surveyRecordEntity = new AftersaleSurveyRecordEntity();
BeanUtil.copyProperties(aftersaleSurveyRecordDTO,surveyRecordEntity);
if(ObjectUtils.isNull( aftersaleSurveyRecordDTO.getContent())){
surveyRecordEntity.setContent(results);
}
surveyRecordEntity.setTenantId(user.getTenantId());
surveyRecordEntity.setCreateUser(user.getUserId());
surveyRecordEntity.setCreateDept(Long.valueOf(user.getDeptId()));
surveyRecordEntity.setDifference(difference);
surveyRecordEntity.setTypesOf("1");
surveyRecordEntity.setWorkOrderId(workOrderId);

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -107,7 +107,7 @@
</select>
<select id="selectDistributionParcelListPage" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT
SELECT DISTINCT
ldpl.warehouse_id warehouseId,
ldpl.id id,
lww.name warehouse,

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -5246,7 +5246,18 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionParcelListVO> allPackageList = new ArrayList<>();
List<DistributionParcelListEntity> reservationPackageList = baseMapper.getPackageListByDeliveryId(deliveryId, orderId);
DistributionReservationOrderPackageVO reservationOrderPackageVO = new DistributionReservationOrderPackageVO();
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, orderId).eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()).notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(), OrderPackageStatusConstant.yichuku.getValue()));
LambdaQueryWrapper<DistributionParcelListEntity> parcelListEntityLambdaQueryWrapper = Wrappers.<DistributionParcelListEntity>query().lambda()
.notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(),OrderPackageStatusConstant.yichuku.getValue())
.ne(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.yizhuangche.getValue())
.eq(DistributionParcelListEntity::getStockArticleId, orderId);
if (Func.isNotEmpty(reservationPackageList)){
List<Long> packageIds = reservationPackageList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList());
if (Func.isNotEmpty(packageIds)){
parcelListEntityLambdaQueryWrapper.notIn(DistributionParcelListEntity::getId,packageIds);
}
}
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(parcelListEntityLambdaQueryWrapper);
if (Func.isNotEmpty(reservationPackageList)) {
List<DistributionParcelListVO> parcelListVOS = DistributionParcelListWrapper.build().listVO(reservationPackageList);
allPackageList.addAll(DistributionParcelListWrapper.build().listVO(reservationPackageList));

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -3589,6 +3589,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
log.info(method+"检测当前取消包件存在装车或者签收操作:packageId{}",distributionCancelReservationPackageDTO.getPackageIds());
throw new RuntimeException("包件存在装车、签收,无法进行取消");
}
//修改包件状态
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue());
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
distributionParcelListMapper.updateById(parcelListEntity);
/**
* 取消指定预约下包件
*/
@ -3617,7 +3621,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionDeliveryListService.maintenanceDeliveryNum(distributionCancelReservationPackageDTO.getDeliveryId());
break;
}
return R.status(true);
}

17
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -506,6 +506,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!flag){
distributionAsyncService.releaseSource(distributionSignfor.getReservationId(), myCurrentWarehouse.getId());
}
//维护配送状态
distributionDeliveryListService.maintenanceDeliveryInfo(distributionSignfor.getDeliveryId());
return R.success("操作成功");
}
@ -1735,7 +1737,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.eq(DistributionDeliveryTripartiteEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()));
BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity);
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//查询装车扫描表
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
@ -3576,6 +3578,19 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(reservationStockarticleEntity.getStockArticleId());
reservationEntity.setStockArticleId(reservationEntity.getStockArticleId() + stockArticleEntity.getOrderCode());
}
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getReservationId, a.getReservationId())
.eq(DistributionLoadscanEntity::getDeliveryId, a.getDeliveryListId())
.eq(DistributionLoadscanEntity::getPackageId, a.getPackageId())
.eq(DistributionLoadscanEntity::getOrderPackageCode, a.getPackageCode())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
loadscanEntity.setIsAbnormalLoading(1);
if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())){
//已经进行签收了 这里就需要将异常签收的状态变更为正常
loadscanEntity.setIsAbnormalSigning(1);
}
distributionLoadscanService.updateById(loadscanEntity);
//构建新包件信息
DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity();
reservationPackageEntity.setReservationId(reservationEntity.getId());

Loading…
Cancel
Save