Browse Source

Merge branch 'dev' into pre-production

dev-pushdata-important
汤建军 1 year ago
parent
commit
b72daa9de7
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java
  2. 5
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesArbitrationOrderEntity.java
  3. 32
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  4. 14
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java
  5. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  6. 7
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
  7. 38
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  9. 71
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java
  10. 26
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/ISyncDistributionParceListMapper.xml
  11. 16
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/ISyncDistributionParcelListMapper.java
  12. 17
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncDistributionParcelListService.java
  13. 27
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncDistributionParcelListServiceImpl.java
  14. 2
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java
  15. 39
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  16. 47
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java

@ -8,7 +8,7 @@ public interface ModuleNameConstant {
/**
* 如果不需要 ""
*/
public static final String DEVAUTH ="";
public static final String DEVAUTH ="-tjj";
/**
* 工厂对接服务名称

5
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesArbitrationOrderEntity.java

@ -85,4 +85,9 @@ public class AftersalesArbitrationOrderEntity extends TenantEntity {
*/
private String customerServiceName;
/**
* 申请原因
*/
private String reasonRemarks;
}

32
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -163,6 +163,9 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getAftersalesProcessingResultsDTO())){
throw new ServiceException("异常工单处理结果不能为空");
}
if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getResultIdentification())){
throw new ServiceException("异常工单处理结果标识不能为空!!");
}
try {
return R.status(aftersalesWorkOrderService.addProcessingResults(aftersalesWorkOrderDTO));
}catch (ServiceException s){
@ -212,7 +215,11 @@ public class AftersalesWorkOrderController extends BladeController {
try{
List<User> list = aftersalesWorkOrderService.getCustomerServicePersonnel();
return R.data(list);
}catch(Exception e){
}catch(ServiceException s){
log.error("查询客服人员信息>>>>{}",s.getMessage());
return R.fail(s.getMessage());
}
catch(Exception e){
log.error("查询客服人员信息>>>>{}",e.getMessage());
return R.fail("系统异常!!");
}
@ -481,6 +488,9 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesWorkOrder) || aftersalesWorkOrder.getAssignList().isEmpty()){
throw new ServiceException("数据不能为空!!");
}
if(ObjectUtils.isNull(aftersalesWorkOrder) || aftersalesWorkOrder.getReasonRemarks().isEmpty()){
throw new ServiceException("申请理由不能为空!!");
}
try {
return R.status(aftersalesWorkOrderService.updateArbitrate(aftersalesWorkOrder));
}catch (ServiceException s){
@ -528,10 +538,28 @@ public class AftersalesWorkOrderController extends BladeController {
log.error("工单修改异常》》》{}",e.getMessage());
return R.fail("系统异常!!");
}
}
/**
* 客服异常工单 修改客服结束仲裁
*/
@PostMapping("/updateArbitrateStatus")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入aftersalesWorkOrder")
public R updateArbitrateStatus (@Valid @RequestBody AftersalesWorkOrderDTO aftersalesWorkOrder) {
log.info("修改参数》》》{}",aftersalesWorkOrder.toString());
if(ObjectUtils.isNull(aftersalesWorkOrder) || ObjectUtils.isNull( aftersalesWorkOrder.getAssignList())){
throw new ServiceException("参数不全assignList!");
}
try {
return R.status(aftersalesWorkOrderService.updateArbitrateStatus(aftersalesWorkOrder));
}catch (Exception e){
log.error("工单修改异常》》》{}",e.getMessage());
return R.fail("系统异常!!");
}
}
/**
* 客服异常工单 客服经理确定数据
*/

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

@ -129,5 +129,19 @@ public class AftersalesWorkOrderDTO extends AftersalesWorkOrderEntity {
*/
private Long appealId;
/**
* 申述原因
*/
private String reasonRemarks;
/**
* 是否提交处理结果标识 1 2
*/
private String resultIdentification;
/**
* 是否提交到理赔金额未出标识 1
*/
private String claimIdentification;
}

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -179,7 +179,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
</select>
<select id="getListSettlement" resultType="com.logpm.aftersales.entity.AftersalesSettlementEntity">
select las.work_order_number workOrderNumber,las.business_name businessName,las.brand_name brandName,las.mall_name mallName,
GROUP_CONCAT(DISTINCT las.waybill_number) AS waybillNumber,
las.waybill_number AS waybillNumber,
las.work_order_type workOrderType,las.result_type resultType,las.laprId, las.discovery_node discoveryNode, las.result_description resultDescription,
las.vehicle_route vehicleRoute,las.indemnitor,las.reason,las.money,las.lawoId,las.create_time createTime,las.process_number processNumber,
las.work_order_status workOrderStatus

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

@ -273,4 +273,11 @@ public interface IAftersalesWorkOrderService extends BaseService<AftersalesWorkO
* @return
*/
boolean updateByIdAppel(AftersalesAppealEntity aftersalesAppeal);
/**
* 修改结束仲裁状态
* @param aftersalesWorkOrder
* @return
*/
boolean updateArbitrateStatus(AftersalesWorkOrderDTO aftersalesWorkOrder);
}

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

@ -899,11 +899,12 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
public R updateAssignCustomerService(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
BladeUser user = AuthUtil.getUser();
for (Long i : aftersalesWorkOrderDTO.getAssignList()) {
//查询有没有指派过
AftersalesWorkOrderEntity workOrderEntity = baseMapper.selectById(i);
if(ObjectUtils.isNotNull(workOrderEntity.getCustomerServiceId())){
throw new ServiceException("包含已指派的工单数据!请勿重复指派!");
}
// if(ObjectUtils.isNotNull(workOrderEntity.getCustomerServiceId())){
// throw new ServiceException("包含已指派的工单数据!请勿重复指派!");
// }
AftersalesWorkOrderEntity aftersalesWorkOrder = new AftersalesWorkOrderVO();
aftersalesWorkOrder.setCustomerServiceId(aftersalesWorkOrderDTO.getCustomerServiceId());
@ -1139,6 +1140,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
});
String roleIds = stringList.stream().collect(Collectors.joining(","));
R<List<User>> listR = userSearchClient.listByRole(roleIds); //查询角色下的所有人员数据
return listR.getData();
}
}
@ -1162,6 +1165,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesArbitrationOrderEntity.setWorkOrderId(i);
aftersalesArbitrationOrderEntity.setOperateType("正常");
aftersalesArbitrationOrderEntity.setTypesOf(WorkOrderTypesOfStatusConstant.kaiqi.getValue());
aftersalesArbitrationOrderEntity.setReasonRemarks(aftersalesWorkOrder.getReasonRemarks());
arbitrationOrderList.add(aftersalesArbitrationOrderEntity);
//添加跟踪记录
AftersaleSurveyRecordEntity surveyRecordEntity = new AftersaleSurveyRecordEntity();
@ -1176,7 +1180,6 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if(!arbitrationOrderList.isEmpty()){
//添加仲裁记录
aftersalesArbitrationOrderService.saveBatch(arbitrationOrderList);
return true;
}
return false;
@ -1465,9 +1468,19 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
//修改异常工单处理信息!
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(aftersalesWorkOrderDTO.getId());
if(!byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.lipeijineweichu.getValue())){
// if(!byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.lipeijineweichu.getValue())){
// workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.chulijeiguoyitianxei.getValue());
// }
//是否为已提交
if("1".equals(aftersalesWorkOrderDTO.getResultIdentification())){
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue());
}else{
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.chulijeiguoyitianxei.getValue());
}
//是否为已提交
if("1".equals(aftersalesWorkOrderDTO.getClaimIdentification())){
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.lipeijineweichu.getValue());
}
workOrderEntity.setCompletionName(myCurrentWarehouse.getName());
workOrderEntity.setCompletionId(myCurrentWarehouse.getId());
baseMapper.updateById(workOrderEntity);
@ -1921,6 +1934,21 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
return aftersalesAppealService.updateById(aftersalesAppeal) > 0;
}
/**
* 修改结束仲裁
* @param aftersalesWorkOrder
* @return
*/
@Override
public boolean updateArbitrateStatus(AftersalesWorkOrderDTO aftersalesWorkOrder) {
//修改
LambdaUpdateWrapper<AftersalesWorkOrderEntity> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(AftersalesWorkOrderEntity::getId,aftersalesWorkOrder.getAssignList());
updateWrapper.set(AftersalesWorkOrderEntity::getWorkOrderStatus,WorkOrderStatusConstant.chulizhong.getValue());
baseMapper.update(aftersalesWorkOrder,updateWrapper);
return true;
}
/**
* 添加处理处理方信息
* @param aftersalesWorkOrderDTO

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

@ -1055,7 +1055,7 @@
LEFT JOIN logpm_distribution_loadscan AS ldl ON ldla.package_id = ldl.package_id
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldla.package_id = ldpl.id
WHERE
ldla.reservation_id = #{reservationId} and ldla.delivery_list_id = #{deliveryListId} AND ldl.scan_status != 1
ldla.reservation_id = #{reservationId} and ldl.reservation_id = #{reservationId} and ldla.delivery_list_id = #{deliveryListId} AND ldl.scan_status != 1
</select>
<select id="selectSignImgsUrl" resultType="com.logpm.distribution.vo.DistributionSignPrintVO">
SELECT * FROM logpm_distribution_sign_print WHERE reservation_id = #{reservationId} and is_deleted = 0

71
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java

@ -1,13 +1,20 @@
package com.logpm.patch.jobhandle;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.patch.service.ISyncDistributionParcelListService;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 配送数据修复
*/
@ -17,21 +24,81 @@ import org.springframework.stereotype.Component;
public class DistributionDatarepair {
// private final ISyncDistributionParcelListService distributionParcelListService;
private final ISyncDistributionParcelListService iSyncDistributionParcelListService;
private final IWarehouseUpdownTypeClient warehouseUpdownTypeClient;
/**
* 预约状态修复
*
* @param param
* @return
*/
@XxlJob("reservationDatarepair")
public ReturnT<String> reservationDatarepair(String param) {
return null;
}
/**
* 对已出库包件进行下架解托
*
* @return
*/
@XxlJob("downOldPackage")
public ReturnT<String> downOldPackage(String params) {
//查询已装车且还在库内的包件
List<DistributionParcelListEntity> deliveryParcelListEntities = iSyncDistributionParcelListService.selectDeliveryOnWarehouse();
//将装车为下架的包件进行下架
StringBuffer stringBuffer = new StringBuffer();
if (Func.isNotEmpty(deliveryParcelListEntities)) {
Map<Long, List<DistributionParcelListEntity>> packageMap = deliveryParcelListEntities.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getWarehouseId));
packageMap.forEach((k, v) -> {
String orderPackageCodes = v.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(","));
stringBuffer.append("仓库:"+k).append("包件下架"+orderPackageCodes);;
warehouseUpdownTypeClient.downDeliveryPackage(orderPackageCodes, k);
});
}
log.info("执行包件下架操作>>>>>>>>>>>>>"+stringBuffer.toString());
return ReturnT.SUCCESS;
}
return null;
/**
* 对已签收包件进行解托
* @return
*/
@XxlJob("downTrayOldPackage")
public ReturnT<String> downTrayOldPackage(String params) {
//查询已装车且还在库内的包件
List<DistributionParcelListEntity> deliveryParcelListEntities = iSyncDistributionParcelListService.selectSigningOnTray();
//将装车为下架的包件进行下架
StringBuffer stringBuffer = new StringBuffer();
if (Func.isNotEmpty(deliveryParcelListEntities)) {
Map<Long, List<DistributionParcelListEntity>> packageMap = deliveryParcelListEntities.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getWarehouseId));
packageMap.forEach((k, v) -> {
String orderPackageCodes = v.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(","));
stringBuffer.append("仓库:"+k).append("包件解托"+orderPackageCodes);;
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes, k);
});
}
log.info("执行包件下架操作>>>>>>>>>>>>>"+stringBuffer.toString());
return ReturnT.SUCCESS;
}
/**
* 维护
* @return
*/
@XxlJob("maintenanceDeliveryStatus")
public ReturnT<String> maintenanceDeliveryStatus(String params) {
//维护配送的状态
Integer row = iSyncDistributionParcelListService.updateCompleteDeliveryStatus();
return ReturnT.SUCCESS;
}

26
blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/ISyncDistributionParceListMapper.xml

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.patch.mapper.ISyncDistributionParcelListMapper">
<update id="updateCompleteDeliveryStatus">
UPDATE logpm_distribution_delivery_list
SET delivery_status = 3
WHERE
id IN (
SELECT
a.id
FROM
( SELECT customers_number, id FROM logpm_distribution_delivery_list WHERE delivery_status != 3 AND warehouse_id = '1713372842906734594' ) AS a
INNER JOIN ( SELECT count(*) AS signNum, delivery_id FROM logpm_distribution_signfor WHERE signing_status = 2 GROUP BY delivery_id ) AS b ON a.id = b.delivery_id
WHERE
a.customers_number = b.signNum)
</update>
<select id="selectDeliveryOnWarehousePackage"
resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT * FROM logpm_distribution_parcel_list WHERE order_package_code IN (SELECT association_value FROM logpm_warehouse_updown_goods WHERE association_value IN (SELECT order_package_code FROM `logpm_distribution_loadscan`))
</select>
<select id="selectSigningOnTray" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT * FROM logpm_distribution_parcel_list WHERE order_package_code IN (SELECT association_value FROM logpm_warehouse_tray_goods WHERE association_value IN (SELECT order_package_code FROM `logpm_distribution_loadscan` WHERE signfor_state = 2))
</select>
</mapper>

16
blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/ISyncDistributionParcelListMapper.java

@ -1,5 +1,6 @@
package com.logpm.patch.mapper;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -9,6 +10,19 @@ import java.util.Map;
public interface ISyncDistributionParcelListMapper {
List<Map<String,Integer>> selectAllErrorReservationOrder();
List<Map<String,Integer>> selectAllErrorReservationOrder();
/**
* 查询在配送中且还在仓库内的包件
* @return
*/
List<DistributionParcelListEntity> selectDeliveryOnWarehousePackage();
/**
* 查询在配送中且在托盘内的包件
* @return
*/
List<DistributionParcelListEntity> selectSigningOnTray();
Integer updateCompleteDeliveryStatus();
}

17
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncDistributionParcelListService.java

@ -1,5 +1,7 @@
package com.logpm.patch.service;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import java.util.List;
import java.util.Map;
@ -11,4 +13,19 @@ public interface ISyncDistributionParcelListService {
*/
List<Map<String,Integer>> selectAllErrorReservationOrder();
/**
* 查询未进行下架的包件信息
* @return
*/
List<DistributionParcelListEntity> selectDeliveryOnWarehouse();
/**
* 查询签收还和托盘存在绑定关系的包件
* @return
*/
List<DistributionParcelListEntity> selectSigningOnTray();
Integer updateCompleteDeliveryStatus();
}

27
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncDistributionParcelListServiceImpl.java

@ -1,15 +1,42 @@
package com.logpm.patch.service.impl;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.patch.mapper.ISyncDistributionParcelListMapper;
import com.logpm.patch.service.ISyncDistributionParcelListService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@AllArgsConstructor
@Service
public class SyncDistributionParcelListServiceImpl implements ISyncDistributionParcelListService {
private ISyncDistributionParcelListMapper distributionParcelListMapper;
@Override
public List<Map<String, Integer>> selectAllErrorReservationOrder() {
return null;
}
@Override
public List<DistributionParcelListEntity> selectDeliveryOnWarehouse() {
return distributionParcelListMapper.selectDeliveryOnWarehousePackage();
}
@Override
public List<DistributionParcelListEntity> selectSigningOnTray() {
return distributionParcelListMapper.selectSigningOnTray();
}
@Override
public Integer updateCompleteDeliveryStatus() {
return distributionParcelListMapper.updateCompleteDeliveryStatus();
}
}

2
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

@ -105,7 +105,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
//存入打托信息
// saveTrayTypeInfoPackage(orderCode,oldWarehouseId,newWarehouseId);
saveTrayTypeInfoPackage(orderCode,oldWarehouseId,newWarehouseId);
// saveTrayTypeInfoPackage(orderCode,oldWarehouseId,newWarehouseId);
if(!StringUtil.isBlank(tableName)){
orderClient.updateStatusWithTableName(1,orderCode,tableName);

39
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -49,6 +49,7 @@ import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache;
@ -2130,24 +2131,32 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
trayGoodsQueryWrapper.eq("association_type","3")
.eq("association_value",orderPackageCode);
WarehouseTrayGoodsEntity trayGoodsEntity = warehouseTrayGoodsService.getOne(trayGoodsQueryWrapper);
Long trayGoodsId = trayGoodsEntity.getId();
Long trayTypeId = trayGoodsEntity.getTrayTypeId();
Long trayId = trayGoodsEntity.getTrayId();
WarehouseTrayTypeEntity trayTypeEntity = baseMapper.selectById(trayTypeId);
//解除绑定
Integer residueNum = warehouseTrayGoodsService.deleteByTrayGoodsId(trayGoodsId,warehouseId);
StringBuffer stringBuffer = new StringBuffer();
if (Func.isNotEmpty(trayGoodsEntity)){
Long trayGoodsId = trayGoodsEntity.getId();
Long trayTypeId = trayGoodsEntity.getTrayTypeId();
Long trayId = trayGoodsEntity.getTrayId();
WarehouseTrayTypeEntity trayTypeEntity = baseMapper.selectById(trayTypeId);
//解除绑定
Integer residueNum = warehouseTrayGoodsService.deleteByTrayGoodsId(trayGoodsId,warehouseId);
if(residueNum == 0){
//空置托盘
removeById(trayTypeId);
//更新托盘状态
basicdataTrayClient.updateTrayStatus(trayId,1);
}
if(residueNum == 0){
//空置托盘
removeById(trayTypeId);
//更新托盘状态
basicdataTrayClient.updateTrayStatus(trayId,1);
}
//添加下托日志
warehouseTrayGoodsLogService.saveLogPackage(parcelListEntity,trayTypeEntity,"0",remark,"1");
//添加下托日志
warehouseTrayGoodsLogService.saveLogPackage(parcelListEntity,trayTypeEntity,"0",remark,"1");
updateNumByTrayTypeId(trayTypeEntity);
updateNumByTrayTypeId(trayTypeEntity);
}else {
stringBuffer.append(orderPackageCode);
}
if (Func.isNotEmpty(stringBuffer)){
log.error("托盘商品不存在,trayId:{}",stringBuffer.toString());
}
}
@Override

47
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

@ -23,6 +23,7 @@ import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -1313,31 +1314,35 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
Long updownGoodsId = updownGoodsEntity.getId();
Long updownTypeId = updownGoodsEntity.getUpdownTypeId();
WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId);
QueryWrapper<WarehouseTaryAllocationEntity> taryAllocationEntityQueryWrapper = new QueryWrapper<>();
taryAllocationEntityQueryWrapper.eq("allocation_id",allocationId)
.eq("is_deleted",0);
WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.getOne(taryAllocationEntityQueryWrapper);
if (Func.isNotEmpty(updownTypeEntity)){
QueryWrapper<WarehouseTaryAllocationEntity> taryAllocationEntityQueryWrapper = new QueryWrapper<>();
taryAllocationEntityQueryWrapper.eq("allocation_id",allocationId)
.eq("is_deleted",0);
WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.getOne(taryAllocationEntityQueryWrapper);
// BasicdataTrayEntity trayEntity = warehouseTaryAllocationService.getTrayByAllocationId(allocationId);
if(!Objects.isNull(taryAllocationEntity)){
//有托盘,托盘下托
warehouseTrayTypeService.downPackageByOrderPackageCode(orderPackageCode,"包件下架:同步下托",warehouseId);
}
Integer residue = warehouseUpdownGoodsService.deleteByUpdownGoodsId(updownGoodsId);
if(residue == 0){
//删除上架方式
removeById(updownTypeId);
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId,"1");
//如果有托盘还要删除托盘与库位的绑定
if(!Objects.isNull(taryAllocationEntity)){
warehouseTaryAllocationService.deleteById(taryAllocationEntity);
//有托盘,托盘下托
warehouseTrayTypeService.downPackageByOrderPackageCode(orderPackageCode,"包件下架:同步下托",warehouseId);
}
}
warehouseUpdownGoodsLogService.saveAllocationAndPackage(updownTypeEntity,parcelListEntity,"2",0,"包件下架:包件下架");
updateUpdownTypeNum(updownTypeEntity);
Integer residue = warehouseUpdownGoodsService.deleteByUpdownGoodsId(updownGoodsId);
if(residue == 0){
//删除上架方式
removeById(updownTypeId);
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId,"1");
//如果有托盘还要删除托盘与库位的绑定
if(!Objects.isNull(taryAllocationEntity)){
warehouseTaryAllocationService.deleteById(taryAllocationEntity);
}
}
warehouseUpdownGoodsLogService.saveAllocationAndPackage(updownTypeEntity,parcelListEntity,"2",0,"包件下架:包件下架");
updateUpdownTypeNum(updownTypeEntity);
num = num + quantity;
warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString());
num = num + quantity;
warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString());
}else {
log.error("包件下架失败,找不到上架方式,updownTypeId:{}",updownTypeId);
}
}
return Resp.scanSuccess("下架成功","成功下架"+num+"件");
}

Loading…
Cancel
Save