Browse Source

备货和售后BUG修复

visual
汤建军 3 months ago
parent
commit
db88e39cf0
  1. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  2. 11
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java
  3. 10
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  5. 15
      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/controller/AftersalesWorkOrderController.java

@ -665,7 +665,7 @@ public class AftersalesWorkOrderController extends BladeController {
return R.fail(s.getMessage());
} catch (Exception e){
log.error("工单提交异常》》》{}",e.getMessage());
return R.fail("系统异常!!!");
return R.fail(e.getMessage());
}
}

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

@ -32,6 +32,8 @@ import com.logpm.aftersales.vo.AftersalesProcessingResultsVO;
import com.logpm.aftersales.excel.AftersalesProcessingResultsExcel;
import com.logpm.aftersales.mapper.AftersalesProcessingResultsMapper;
import com.logpm.aftersales.service.IAftersalesProcessingResultsService;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
@ -52,6 +54,7 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* 异常工单处理结果 服务实现类
@ -64,6 +67,8 @@ import java.util.List;
public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<AftersalesProcessingResultsMapper, AftersalesProcessingResultsEntity> implements IAftersalesProcessingResultsService {
private final IBasicdataWarehouseClient warehouseClient;
private final IAftersalesProcessingMoneyService aftersalesProcessingMoneyService;
@Override
public IPage<AftersalesProcessingResultsVO> selectAftersalesProcessingResultsPage(IPage<AftersalesProcessingResultsVO> page, AftersalesProcessingResultsVO aftersalesProcessingResults) {
@ -94,9 +99,13 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<Afte
// if(ObjectUtil.isNotNull(aftersalesProcessingResults.getId())){
// baseMapper.deleteById(aftersalesProcessingResults.getId());
// }
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)){
throw new ServiceException("未选择仓库");
}
if(ObjectUtil.isNull(aftersalesProcessingResults.getId())){
aftersalesProcessingResults.setCreateUser(AuthUtil.getUserId());
aftersalesProcessingResults.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
aftersalesProcessingResults.setCreateDept(myCurrentWarehouse.getDepartment());
aftersalesProcessingResults.setCreateTime(new Date());
aftersalesProcessingResults.setStatus(1);
aftersalesProcessingResults.setIsDeleted(0);

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

@ -327,6 +327,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
@Override
@Transactional
public boolean extractedSaveAndUpdate(AftersalesWorkOrderDTO aftersalesWorkOrder, BladeUser user, BasicdataWarehouseEntity myCurrentWarehouse) {
if (ObjectUtils.isNull(aftersalesWorkOrder.getId())) {
//新增
@ -1869,7 +1871,13 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
public boolean addProcessingResults(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
BladeUser user = AuthUtil.getUser();
R<List<String>> roleNames = sysClient.getRoleNames(user.getRoleId());
if (!roleNames.getData().isEmpty()) {
boolean contains = roleNames.getData().contains("仓库客服");
if (!contains){
throw new ServiceException("当前登录人无仓库客服权限,请联系管理员!");
}
}
//查询异常工单完结接口
AftersalesWorkOrderEntity byId = baseMapper.selectById(aftersalesWorkOrderDTO.getId());
if (byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yichuli.getValue())) {

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

@ -892,7 +892,7 @@
<select id="getReservationNumStockSelf" resultType="Integer">
select SUM(lddd.quantity)
from logpm_distribution_delivery_details lddd
where lddd.inventory_status in (1,2) and lddd.bill_lading_id = #{reservationId} and lddd.stock_list_id =
where lddd.inventory_status in (1,3) and lddd.bill_lading_id = #{reservationId} and lddd.stock_list_id =
#{stockListId}
</select>
<select id="selectInventoryListByReservation"

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

@ -3359,19 +3359,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (isStrictLoading == Integer.parseInt(IsOrNoConstant.yes.getValue())) {
return R.fail("操作失败,存在未装车包件");
}
//这里装车的数据需要进行补录
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfDTO();
if (deliveryListEntity.getKind().equals(ServiceConstant.DELIVERLIST_KIND_SELF)) {
distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectOne(new QueryWrapper<DistributionDeliverySelfEntity>().lambda()
.eq(DistributionDeliverySelfEntity::getIsMaster, ServiceConstant.IS_MASTER_YES)
.eq(DistributionDeliverySelfEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
);
} else {
DistributionDeliveryTripartiteEntity distributionDeliveryTripartiteEntity = distributionDeliveryTripartiteMapper.selectOne(new QueryWrapper<DistributionDeliveryTripartiteEntity>().lambda()
.eq(DistributionDeliveryTripartiteEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()));
BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity);
distributionDeliverySelfEntity.setVehicleNub(distributionDeliveryTripartiteEntity.getVehicleNum());
}
Boolean driver = distributionDeliveryListService.judgeIsDriver(AuthUtil.getUser());
DistributionDeliverySelfEntity distributionDeliverySelfEntity = this.getDriver(deliveryListEntity, AuthUtil.getUser(), driver);
DistributionDeliveryListEntity listEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
if (Func.isEmpty(listEntity)) {
log.error("##########配送计划异常:{}", listEntity);

Loading…
Cancel
Save