Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dist.1.3.0
zhaoqiaobo 6 months ago
parent
commit
4c6d49aedb
  1. 2
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataDriverArteryEntity.java
  2. 6
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataDriverArteryVO.java
  3. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  4. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenLabelDTO.java
  5. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroSuppleVO.java
  6. 11
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java
  7. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataDriverArteryDTO.java
  8. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.java
  9. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.xml
  10. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java
  11. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml
  12. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.xml
  13. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataCodeRecordService.java
  14. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeRecordServiceImpl.java
  15. 11
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  16. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java
  17. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  18. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  19. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  20. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  21. 47
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  22. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  23. 29
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  24. 22
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java
  25. 21
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  26. 26
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
  27. 13
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  28. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java
  29. 23
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  30. 59
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  31. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

2
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataDriverArteryEntity.java

@ -62,7 +62,7 @@ public class BasicdataDriverArteryEntity extends TenantEntity {
/**
* 职务类型;1-干线,2-配送
*/
@ApiModelProperty(value = "职务类型;1-干线,2-配送,3-全部")
@ApiModelProperty(value = "职务类型;1-干线,2-配送")
private String jobType;
/**
* 准驾车型;1-A1,2-A2,3-A3,4-B1,5-B2,6-C1,7-C2

6
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataDriverArteryVO.java

@ -50,6 +50,12 @@ public class BasicdataDriverArteryVO extends BasicdataDriverArteryEntity {
@ApiModelProperty(value = "司机关联车辆列表")
private List<BasicdataVehicleEntity> vehicleVOList;
/**
* 司机类型
*/
private List<String> jobTypeString;
private List<BasicdataDriverWarehouseVO> warehouses = new ArrayList<>();

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -81,6 +81,7 @@ public class LoadCarsDTO implements Serializable {
private List<String> orderCodes;
private List<String> orderCodeList;
private Integer enterNum;

2
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenLabelDTO.java

@ -34,6 +34,8 @@ public class OpenLabelDTO implements Serializable {
private BigDecimal volume;
private String materialName;
private String dealerCode;
private String dealerName;

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroSuppleVO.java

@ -12,6 +12,7 @@ public class ZeroSuppleVO implements Serializable {
private String orderCode;
private Integer enterNum;//输入数量
private Long finalNodeId;//目的仓id
private Long signOrderId;//签收单id
}

11
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java

@ -34,6 +34,7 @@ import com.logpm.basicdata.vo.BasicdataDriverWarehouseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import jodd.util.ArraysUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.boot.ctrl.BladeController;
@ -54,10 +55,7 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 司机信息表 控制器
@ -95,6 +93,11 @@ public class BasicdataDriverArteryController extends BladeController {
List<BasicdataDriverWarehouseVO> warehouseIds = basicdataDriverWarehouseService.findByDriverId(driverId);
BasicdataDriverArteryVO basicdataDriverArteryVO = new BasicdataDriverArteryVO();
BeanUtil.copy(detail,basicdataDriverArteryVO);
// 拆分 司机类型
String[] split = basicdataDriverArteryVO.getJobType().split(",");
List<String> list = Arrays.asList(split);
basicdataDriverArteryVO.setJobTypeString(list);
basicdataDriverArteryVO.setWarehouses(warehouseIds);
basicdataDriverArteryVO.setBindVehicles(String.join(",",vehicleIds));
return R.data(basicdataDriverArteryVO);

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataDriverArteryDTO.java

@ -41,4 +41,6 @@ public class BasicdataDriverArteryDTO extends BasicdataDriverArteryEntity {
private String bindVehicles;
private List<Long> warehouseIds = new ArrayList<>();
}

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.java

@ -7,5 +7,5 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface BasicdataCodeRecordMapper extends BaseMapper<BasicdataCodeRecordEntity> {
BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(@Param("type") Integer type, @Param("warehouseCode") String warehouseCode, @Param("year") String year, @Param("month") String month,@Param("day") String day);
BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(@Param("type") Integer type, @Param("warehouseCode") String warehouseCode, @Param("year") String year, @Param("month") String month);
}

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.xml

@ -10,7 +10,6 @@
and warehouse_code = #{warehouseCode}
and `year` = #{year}
and `month` = #{month}
and `day` = #{day}
</select>
</mapper>

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java

@ -69,7 +69,7 @@ public interface BasicdataDriverArteryMapper extends BaseMapper<BasicdataDriverA
*/
BasicdataDriverArteryEntity findDriverListByPhone(@Param("name") String vehicleOwner,@Param("phone") String vehicleOwnerPhone);
List<BasicdataDriverArteryEntity> selectListByWarehouseId(@Param("warehouseId") Long warehouseId);
List<BasicdataDriverArteryEntity> selectListByWarehouseId(@Param("warehouseId") Long warehouseId,@Param("jobType")String jobType);
BasicdataDriverArteryEntity findEntityByPhone(@Param("phone") String phone);
}

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml

@ -168,13 +168,12 @@
left join logpm_basicdata_vehicle lbv on lbv.id = lbdm.brand_id
where lbda.`name` like concat('%',#{driverName},'%')
<if test="jobType != null and jobType = ''">
and lbda.job_type = #{jobType}
and locate(#{jobType},lbda.job_type)>0
</if>
group by lbda.id,
lbda.name,
lbda.phone,
lbda.type
limit 10
</select>
<select id="findDriverListByPhone" resultType="com.logpm.basicdata.entity.BasicdataDriverArteryEntity">
SELECT id,name,bind_vehicle FROM logpm_basicdata_driver_artery WHERE name = #{name} AND phone = #{phone}
@ -186,6 +185,7 @@
from logpm_basicdata_driver_artery lbda
left join logpm_basicdata_driver_warehouse lbdw on lbdw.driver_id = lbda.id
where lbdw.warehouse_id = #{warehouseId}
and locate(${jobType},lbda.job_type)>0
and lbda.is_deleted = 0
</select>

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.xml

@ -39,9 +39,6 @@
<if test="param.type != null and param.type != ''">
and type = #{param.type}
</if>
<if test="param.category != null and param.category != ''">
and category = #{param.category}
</if>
<if test="param.firsts == null or param.firsts == ''">
and (firsts is null or firsts = '')
</if>
@ -60,6 +57,12 @@
<if test="param.thirds != null and param.thirds != ''">
and thirds = #{param.thirds}
</if>
<if test="param.materielName == null or param.materielName == ''">
and (materiel_name is null or materiel_name = '')
</if>
<if test="param.materielName != null and param.materielName != ''">
and materiel_name = #{param.materielName}
</if>
</select>
</mapper>

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataCodeRecordService.java

@ -4,5 +4,5 @@ import com.logpm.basicdata.entity.BasicdataCodeRecordEntity;
import org.springblade.core.mp.base.BaseService;
public interface IBasicdataCodeRecordService extends BaseService<BasicdataCodeRecordEntity> {
BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month,String day);
BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month);
}

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeRecordServiceImpl.java

@ -13,7 +13,7 @@ import org.springframework.stereotype.Service;
@AllArgsConstructor
public class BasicdataCodeRecordServiceImpl extends BaseServiceImpl<BasicdataCodeRecordMapper, BasicdataCodeRecordEntity> implements IBasicdataCodeRecordService {
@Override
public BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month,String day) {
return baseMapper.findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(type,warehouseCode,year,month,day);
public BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month) {
return baseMapper.findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(type,warehouseCode,year,month);
}
}

11
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java

@ -7,7 +7,6 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.service.IBasicdataCodeRecordService;
import com.logpm.basicdata.service.IBasicdataCodeService;
import com.logpm.basicdata.service.IBasicdataWarehouseService;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.CodeDesEnum;
@ -137,6 +136,8 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
//包条 HT+仓库拼音/超管/职能+年月日时分秒+订单索引+包条个数索引CodeNumConstant.PACKAGE
BasicdataCodeRecordEntity basicdataCodeRecordEntity = getBasicdataCodeRecordEntity(CodeDesEnum.PACKAGE.getCodeNum(), basicdataWarehouseEntity);
Calendar calendar = Calendar.getInstance();
Integer day = calendar.get(Calendar.DAY_OF_MONTH);
Integer oldNum = basicdataCodeRecordEntity.getNum();
List<String> packageCodes = new ArrayList<>();
@ -151,7 +152,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
String time = new String(System.currentTimeMillis() + "");
time=time.substring(4);
oldNum = oldNum + 1;
String packageCode = "HT" + warehouseCode + year + CommonUtil.geFourNumberByString(basicdataCodeRecordEntity.getMonth(), 2) + basicdataCodeRecordEntity.getDay() + time;
String packageCode = "HT" + warehouseCode + year + CommonUtil.geFourNumberByString(basicdataCodeRecordEntity.getMonth(), 2) + day + time;
packageCodes.add(packageCode);
}
basicdataCodeRecordEntity.setNum(oldNum);
@ -201,9 +202,9 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
// 获取月份(注意月份从0开始计数)
Integer month = calendar.get(Calendar.MONTH) + 1;
Integer day = calendar.get(Calendar.DAY_OF_MONTH);
// Integer day = calendar.get(Calendar.DAY_OF_MONTH);
BasicdataCodeRecordEntity basicdataCodeRecordEntity = basicdataCodeRecordService.findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(type, basicdataWarehouseEntity.getWarehouseCode(), year + "", month + "", day + "");
BasicdataCodeRecordEntity basicdataCodeRecordEntity = basicdataCodeRecordService.findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(type, basicdataWarehouseEntity.getWarehouseCode(), year + "", month + "");
if (Objects.isNull(basicdataCodeRecordEntity)) {
basicdataCodeRecordEntity = new BasicdataCodeRecordEntity();
@ -213,7 +214,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
basicdataCodeRecordEntity.setWarehouseCode(basicdataWarehouseEntity.getWarehouseCode());
basicdataCodeRecordEntity.setYear(year + "");
basicdataCodeRecordEntity.setMonth(month + "");
basicdataCodeRecordEntity.setDay(day + "");
// basicdataCodeRecordEntity.setDay(day + "");
basicdataCodeRecordEntity.setNum(0);
basicdataCodeRecordService.save(basicdataCodeRecordEntity);
}

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java

@ -140,7 +140,7 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
log.info("################ getDriverList 仓库信息:{}", myCurrentWarehouse);
Long warehouseId = myCurrentWarehouse.getId();
ArrayList<BasicdataDriverArteryVO> basicdataDriverArteryVOS = new ArrayList<>();
List<BasicdataDriverArteryEntity> list = baseMapper.selectListByWarehouseId(warehouseId);
List<BasicdataDriverArteryEntity> list = baseMapper.selectListByWarehouseId(warehouseId,"2");
log.info("################getDriverList list:{}", list);
if(list.isEmpty()){

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -400,7 +400,7 @@ public class DistributionDeliveryListController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "customArgs")
public R getDeliveryZeroOrderDetail(@ApiIgnore @RequestParam Long deliveryId,@RequestParam Long orderId) {
R parcelNumberVOS = distributionDeliveryListService.getDeliveryZeroOrderDetail(deliveryId, orderId);
List<DistributionParcelNumberVO> parcelNumberVOS = distributionDeliveryListService.getDeliveryZeroOrderDetail(deliveryId, orderId);
return R.data(parcelNumberVOS);
}

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

@ -1083,6 +1083,8 @@
LEFT JOIN logpm_distribution_stock_list AS ldsl ON ldrs.stocklist_id = ldsl.id
WHERE
lds.id = #{id} AND lds.is_deleted = 0
GROUP BY
ldrs.stocklist_id
</select>
<select id="selectAbnormalPackageList"
resultType="com.logpm.distribution.vo.DistributionLoadscanAbnormalVO">

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -773,11 +773,11 @@
ldpl.brand_name AS brandName,
ldpn.quantity AS quantity,
ldpn.hand_quantity AS handQuantity,
ldpn.hand_quantity AS number,
ldpn.delivery_quantity AS deliveryQuantity,
ldpn.outbound_quantity AS outboundQuantity,
ldpn.signin_quantity AS signinQuantity,
(ldpn.hand_quantity - ldpn.delivery_quantity) AS reservationNum,
ldpn.quantity AS `number`
(ldpn.hand_quantity - ldpn.delivery_quantity) AS reservationNum
FROM logpm_distribution_stock_article AS ldsa
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldsa.id = ldpl.stock_article_id
LEFT JOIN logpm_distribution_parcel_number AS ldpn ON ldpn.parcel_list_id = ldpl.id

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -285,7 +285,7 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
* @param orderId
* @return
*/
R getDeliveryZeroOrderDetail(Long deliveryId, Long orderId);
List<DistributionParcelNumberVO> getDeliveryZeroOrderDetail(Long deliveryId, Long orderId);
/**
* 零担装车

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

@ -3211,7 +3211,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
});
}
distributionStockArticleService.maintenanceOrderInfo(s.getOrderCode(), myCurrentWarehouse.getId());
} else {
//该客户下增加零担订单
List<DistributionParcelNumberVO> parcelNumberVOS = s.getParcelNumberVOS();
@ -3263,6 +3262,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
}
}
distributionStockArticleService.maintenanceOrderInfo(s.getOrderCode(), myCurrentWarehouse.getId());
reservationStockarticleEntity.setReservationId(reservationEntity.getId());
reservationStockarticleEntity.setStockArticleStatus(ReservationOrderStatusConstant.zengjia.getValue());
reservationStockarticleEntity.setIsHaveData(s.getIsHaveData());
@ -3394,6 +3394,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
BigDecimal yuanlaiNum = new BigDecimal(distributionReservationZeroPackageEntity.getQuantity().toString());
BigDecimal xiugaiNum = new BigDecimal(pn.getReservationNum().toString());
BigDecimal num = dongjieNum.add(xiugaiNum).subtract(yuanlaiNum);
if (Objects.equals(num.intValue(),yuanlaiNum.intValue()) ){
distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update().lambda()
.eq(DistributionParcelListEntity::getId,parcelNumberEntity.getParcelListId())
.set(DistributionParcelListEntity::getOrderPackageReservationStatus,OrderPackageReservationStatusConstant.yiyueyue.getValue())
);
}
parcelNumberEntity.setDeliveryQuantity(num.intValue());
distributionReservationZeroPackageEntity.setQuantity(pn.getReservationNum());
distributionParcelNumberService.updateById(parcelNumberEntity);
@ -3414,6 +3420,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
reservationZeroPackageEntity.setCategoryName(pn.getFirsts());
reservationZeroPackageEntity.setRealityQuantity(0);
distributionReservationZeroPackageService.save(reservationZeroPackageEntity);
distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update().lambda()
.eq(DistributionParcelListEntity::getId,parcelNumberEntity.getParcelListId())
.set(DistributionParcelListEntity::getOrderPackageReservationStatus,OrderPackageReservationStatusConstant.yiyueyue.getValue())
);
parcelNumberEntity.setDeliveryQuantity(parcelNumberEntity.getDeliveryQuantity() + pn.getReservationNum());
distributionParcelNumberService.updateById(parcelNumberEntity);
packageNum.getAndAdd(reservationZeroPackageEntity.getQuantity());
@ -3442,12 +3452,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
}
}
//进行预约订单中间信息的修改
reservationStockarticleEntity.setReservationNum(packageNum.get());
distributionReservationStockarticleService.updateById(reservationStockarticleEntity);
//预约订单上的包件数量维护
packageTotal.getAndAdd(reservationStockarticleEntity.getReservationNum());
//维护订单
distributionStockArticleService.maintenanceOrderInfo(s.getOrderCode(), myCurrentWarehouse.getId());
}
if (!packageLockIds.isEmpty()) {
List<Long> a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + "orderCode:" + s.getOrderCode());
@ -3490,17 +3501,25 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//对零担订单进行移除
//零担
List<DistributionReservationZeroPackageEntity> reservationZeroPackageEntityList = distributionReservationZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda().eq(DistributionReservationZeroPackageEntity::getReservationId, reservationEntity.getId()).eq(DistributionReservationZeroPackageEntity::getStockArticleId, reservationStockarticleEntity.getStockArticleId()).ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()));
reservationZeroPackageEntityList.forEach(rzp -> {
for (DistributionReservationZeroPackageEntity rzp : reservationZeroPackageEntityList) {
rzp.setZeroPackageStatus(ReservationPackageStatusConstant.quxiao.getValue());
distributionReservationZeroPackageService.updateById(rzp);
DistributionParcelNumberEntity parcelNumberEntity = distributionParcelNumberService.getOne(Wrappers.<DistributionParcelNumberEntity>query().lambda().eq(DistributionParcelNumberEntity::getParcelListId, rzp.getParcelListId()));
if (Func.isNotEmpty(parcelNumberEntity)) {
// parcelNumberEntity.setHandQuantity(parcelNumberEntity.getHandQuantity() + rzp.getQuantity());
parcelNumberEntity.setDeliveryQuantity(parcelNumberEntity.getDeliveryQuantity() - rzp.getQuantity());
int totalOutbound = parcelNumberEntity.getDeliveryQuantity() + parcelNumberEntity.getOutboundQuantity();
if (!Objects.equals(totalOutbound,parcelNumberEntity.getQuantity())){
//进行零担包件状态维护
distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update().lambda()
.eq(DistributionParcelListEntity::getId,parcelNumberEntity.getParcelListId())
.set(DistributionParcelListEntity::getOrderPackageReservationStatus,OrderPackageReservationStatusConstant.daiyuyue.getValue())
);
}
distributionParcelNumberService.updateById(parcelNumberEntity);
distributionAsyncService.checkZeroStockArticleReservationStatus(parcelNumberEntity);
}
});
}
} else {
log.error("###########################reservation_stockaticle的isZeroz字段维护错误,reservation_stockarticleID:{}", reservationStockarticleEntity.getId());
throw new RuntimeException("服务器正忙...");
@ -3564,6 +3583,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(parcelNumberEntity)) {
// parcelNumberEntity.setHandQuantity(parcelNumberEntity.getHandQuantity() + rzp.getQuantity());
parcelNumberEntity.setDeliveryQuantity(parcelNumberEntity.getDeliveryQuantity() - rzp.getQuantity());
int totalOutbound = parcelNumberEntity.getDeliveryQuantity() + parcelNumberEntity.getOutboundQuantity();
if (!Objects.equals(totalOutbound,parcelNumberEntity.getQuantity())){
//进行零担包件状态维护
distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update().lambda()
.eq(DistributionParcelListEntity::getId,parcelNumberEntity.getParcelListId())
.set(DistributionParcelListEntity::getOrderPackageReservationStatus,OrderPackageReservationStatusConstant.daiyuyue.getValue())
);
}
distributionParcelNumberService.updateById(parcelNumberEntity);
distributionAsyncService.checkZeroStockArticleReservationStatus(parcelNumberEntity);
}
@ -3649,6 +3676,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
deliveryListEntity.setTaskTime(deliveryListDTO.getTaskTime());
//对配送进行更改
this.updateById(deliveryListEntity);
//对修改计划下的所有包件进行维护
// // 执行发送推送
@ -5662,24 +5691,28 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
@Override
public R getDeliveryZeroOrderDetail(Long deliveryId, Long orderId) {
public List<DistributionParcelNumberVO> getDeliveryZeroOrderDetail(Long deliveryId, Long orderId) {
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, deliveryId)
.eq(DistributionLoadscanEntity::getOrderId, orderId)
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (!Func.isEmpty(loadscanEntityList)){
return R.fail("此订单已进行装车操作,请滞留后编辑");
return null;
}
List<DistributionParcelNumberVO> zeroOrderDetail = distributionStockArticleService.getZeroOrderDetail(orderId);
List<DistributionParcelNumberVO> parcelNumberVOS = baseMapper.selectDeliveryZeroOrderDetail(orderId, deliveryId);
Map<Long, DistributionParcelNumberVO> reservationNum = parcelNumberVOS.stream().collect(Collectors.toMap(DistributionParcelNumberVO::getParcelListId, Function.identity(), (k1, k2) -> k2));
zeroOrderDetail.forEach(z -> {
Integer integer = 0;
if (Func.isNotEmpty(reservationNum.get(z.getParcelListId()))) {
integer = reservationNum.get(z.getParcelListId()).getReservationNum();
z.setReservationNum(reservationNum.get(z.getParcelListId()).getReservationNum());
}
int quantity = z.getHandQuantity() - z.getDeliveryQuantity() + integer;
z.setNumber(quantity);
});
return R.data(zeroOrderDetail);
return zeroOrderDetail;
}
@Override

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

@ -36,7 +36,6 @@ import com.logpm.distribution.vo.*;
import com.logpm.distribution.wrapper.*;
import com.logpm.oldproject.feign.IWayBillClient;
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient;
import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient;
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseGoodsAllocationClient;
@ -349,6 +348,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
ArrayList<DistributionStockArticleVO> distributionStockArticleVOS = new ArrayList<>();
if (Func.isNotEmpty(reservationStockarticleEntityList)) {
reservationStockarticleEntityList.forEach(rs -> {
AtomicInteger num = new AtomicInteger();
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(rs.getStockArticleId());
DistributionStockArticleVO distributionStockArticleVO = DistributionStockArticleWrapper.build().entityVO(stockArticleEntity);
if (rs.getIsZero().equals(IsOrNoConstant.no.getValue())) {
@ -359,6 +359,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isNotEmpty(reservationPackageEntityList)) {
ArrayList<DistributionParcelListVO> distributionParcelListVOS = new ArrayList<>();
reservationPackageEntityList.forEach(rp -> {
num.addAndGet(1);
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(rp.getParceListId());
DistributionParcelListVO parcelListVOS = DistributionParcelListWrapper.build().entityVO(parcelListEntity);
parcelListVOS.setQuantity(parcelListEntity.getQuantity());
@ -380,6 +381,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
DistributionParcelListVO parcelListVOS = DistributionParcelListWrapper.build().entityVO(parcelListEntity);
parcelListVOS.setQuantity(rzp.getQuantity());
distributionParcelListVOS.add(parcelListVOS);
num.addAndGet(rzp.getQuantity());
});
distributionStockArticleVO.setPackageList(distributionParcelListVOS);
} else {
@ -388,6 +390,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
} else {
log.error("####################预约订单中间表isZero字段缺失,reservation_stockArticle的ID为:{}", rs.getId());
}
distributionStockArticleVO.setReservationNum(num.get());
distributionStockArticleVOS.add(distributionStockArticleVO);
});

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

@ -6528,20 +6528,21 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
if (distributionReservationEntity.getReservationStockListNum() > 0) {
//查询库存品扫描签收
List<SignPushDataUnitDTO> loadingPushOldInventory = distributionSignforMapper.selectLoadingPushOldInventory(distributionSignforEntity.getReservationId(), distributionSignforEntity.getDeliveryId());
List<SignPushDataUnitDTO> signingPushOldInventory = distributionSignforMapper.selectSigningPushOldInventory(distributionSignforEntity.getReservationId(), distributionSignforEntity.getDeliveryId());
if (Func.isNotEmpty(loadingPushOldInventory)) {
buildNameAndPhone(loadingPushOldInventory);
signPushDataUnitDTOS.addAll(loadingPushOldInventory);
}
if (Func.isNotEmpty(signingPushOldInventory)) {
buildNameAndPhone(signingPushOldInventory);
signPushDataUnitDTOS.addAll(signingPushOldInventory);
}
}
// if (distributionReservationEntity.getReservationStockListNum() > 0) {
//
// //查询库存品扫描签收
// List<SignPushDataUnitDTO> loadingPushOldInventory = distributionSignforMapper.selectLoadingPushOldInventory(distributionSignforEntity.getReservationId(), distributionSignforEntity.getDeliveryId());
// List<SignPushDataUnitDTO> signingPushOldInventory = distributionSignforMapper.selectSigningPushOldInventory(distributionSignforEntity.getReservationId(), distributionSignforEntity.getDeliveryId());
// if (Func.isNotEmpty(loadingPushOldInventory)) {
// buildNameAndPhone(loadingPushOldInventory);
// signPushDataUnitDTOS.addAll(loadingPushOldInventory);
// }
//
// if (Func.isNotEmpty(signingPushOldInventory)) {
// buildNameAndPhone(signingPushOldInventory);
// signPushDataUnitDTOS.addAll(signingPushOldInventory);
// }
// }
//查询签收图片
List<DistributionSignPrintVO> distributionSignPrintVOS = distributionSignforMapper.selectSignImgsUrl(distributionReservationEntity.getId());

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

@ -236,14 +236,22 @@ public class DistributionDatarepair {
}
List<JSONObject> allSignfor = warehouseMappingDataMapper.findAllBillSign(parmeId);
for (JSONObject entries : allSignfor) {
Long id = entries.getLong("billId");
Boolean b =distrilbutionBillLadingClient.clerkBillCheckPushData(id);
if(b!=null&&b){
warehouseMappingDataMapper.updateClearSignforStatus(id, entries.getLong("warehouseId"), 1);
log.info(">>> pushBillNotification 成功 id={}",id);
}else{
log.error(">>> pushBillNotification 失败 id="+id);
try {
Long id = entries.getLong("billId");
Boolean b =distrilbutionBillLadingClient.clerkBillCheckPushData(id);
if(b!=null&&b){
warehouseMappingDataMapper.updateClearBillSignforStatus(entries.getLong("id"), entries.getLong("warehouseId"), 1);
log.info(">>> pushBillNotification 成功 id={}",id);
}else{
log.error(">>> pushBillNotification 失败 id="+id);
}
Thread.sleep(1000*60);
} catch (InterruptedException e) {
throw new RuntimeException(e);
} finally {
log.error(">>> pushBillNotification 释放");
}
}
return ReturnT.SUCCESS;
}

21
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -52,7 +52,7 @@
and ltcl.load_status = #{param.loadStatus}
</if>
<if test="param.warehouseName != null and param.warehouseName != ''">
and (Locate(#{param.warehouseName},ltcl.start_warehouse_name) > 0 or Locate(#{param.warehouseName},ltcl.end_warehouse_name) > 0)
and (Locate(#{param.warehouseName},ltcl.start_warehouse_name) > 0 or Locate(#{param.warehouseName},ltcl.end_warehouse_names) > 0)
</if>
<if test="param.createTimeStart != null ">
and ltcl.create_time &gt;= #{param.createTimeStart}
@ -135,6 +135,9 @@
<if test="param.warehouseId != null" >
and ltcl.end_warehouse_ids like concat('%',#{param.warehouseId},'%')
</if>
<if test="param.warehouseName != null and param.warehouseName != ''">
and (Locate(#{param.warehouseName},ltcl.start_warehouse_name) > 0 or Locate(#{param.warehouseName},ltcl.end_warehouse_names) > 0)
</if>
<if test="param.loadCarsNo != null and param.loadCarsNo != ''">
and Locate(#{param.loadCarsNo},ltcl.cars_no) > 0
</if>
@ -561,21 +564,33 @@
IFNULL(lww.total_freight,0) totalFreight,
lww.total_count,
lww.remark remark,
ROUND(lww.total_freight/lww.total_count,2) price
ROUND(lww.total_freight/lww.total_count,2) price,
ltlso.load_sign_code loadSignCode,
ltlso.id signOrderId
from logpm_distribution_stock_article ldsa
left join logpm_warehouse_waybill lww on lww.waybill_no = ldsa.waybill_number
left join logpm_trunkline_load_sign_order ltlso on ltlso.mall_name = ldsa.mall_name and ltlso.load_id = #{param.loadId}
where ldsa.is_zero = 1
and lww.destination_warehouse_id != #{param.warehouseId}
and ldsa.hand_quantity > 0
and ldsa.warehouse_id = #{param.warehouseId}
<if test="param.type != null and param.type == 1">
and ltlso.id is not null
</if>
<if test="param.orderCodes != null and param.orderCodes.size() > 0">
and ldsa.order_code not in
<foreach collection="param.orderCodes" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.orderCodeList != null and param.orderCodeList.size() > 0">
and ldsa.order_code in
<foreach collection="param.orderCodeList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.waybillNo != null and param.waybillNo != ''">
and Locate(#{param.waybillNo},lww.waybill_no)
and Locate(#{param.waybillNo},lww.waybill_no) > 0
</if>
</select>

26
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

@ -230,15 +230,17 @@ public class InComingServiceImpl implements IInComingService {
if(incomingType == 1 || incomingType == 2){
for (TrunklineAdvanceDetailEntity trunklineAdvanceDetailEntity : advanceDetailEntityList) {
Long warehouseId1 = trunklineAdvanceDetailEntity.getWarehouseId();
if(!warehouseId1.equals(warehouseId)){
log.warn("############incomingPackage: 包件数据不在当前仓 packageCodes={} warehouseId={}", packageCodes, warehouseId);
return Resp.scanFail(405, "包件数据不在当前仓", "包件数据不在当前仓");
String packageStatus = trunklineAdvanceDetailEntity.getPackageStatus();
if("0".equals(packageStatus)){
Long warehouseId1 = trunklineAdvanceDetailEntity.getWarehouseId();
if(!warehouseId1.equals(warehouseId)){
log.warn("############incomingPackage: 包件数据不在当前仓 packageCodes={} warehouseId={}", packageCodes, warehouseId);
return Resp.scanFail(405, "包件数据不在当前仓", "包件数据不在当前仓");
}
}
}
}
if(StringUtil.isNotBlank(customerTrain)){
for (TrunklineAdvanceDetailEntity advanceDetailEntity : advanceDetailEntityList) {
String trainNumber = advanceDetailEntity.getTrainNumber();
@ -344,9 +346,9 @@ public class InComingServiceImpl implements IInComingService {
map.put("warehouseId", warehouseId);
map.put("orderPackageCode", packageCode);
R r = warehouseTrayTypeClient.orderScanOrderPackageCodeReturnR(map);
Object data = r.getData();
if(!Objects.isNull(data)){
audio.set((String) data);
int code = r.getCode();
if(code != 200){
audio.set(r.getMsg());
}
}
});
@ -442,9 +444,9 @@ public class InComingServiceImpl implements IInComingService {
map.put("warehouseId", warehouseId);
map.put("orderPackageCode", packageCode);
R r = warehouseTrayTypeClient.orderScanOrderPackageCodeReturnR(map);
Object data = r.getData();
if(!Objects.isNull(data)){
audio.set((String) data);
int code = r.getCode();
if(code != 200){
audio.set(r.getMsg());
}
}
});
@ -495,7 +497,7 @@ public class InComingServiceImpl implements IInComingService {
String a = audio.get();
if(StringUtil.isNotBlank(a)){
return Resp.scanSuccess("入库成功",a);
return Resp.scanFail(405,a,a);
}
return R.success("入库成功");

13
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -797,15 +797,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
//异步存入日志
Date date = new Date();
String nickName = AuthUtil.getNickName();
Long userId = AuthUtil.getUserId();
String createOperationRemark = "创建运单" + waybillNo + ",时间:" + CommonUtil.dateToStringGeneral(new Date());
String createOperationRemark = "创建运单" + waybillNo + ",时间:" + CommonUtil.dateToStringGeneral(date);
openOrderAsyncService.saveLog(waybillId, waybillNo, "10", "创建运单", createOperationRemark, nickName, userId, warehouseId, warehouseName);
Integer totalCount = waybillEntity.getTotalCount();
Integer stockCount = waybillEntity.getStockCount();
if (totalCount.equals(stockCount)) {
createOperationRemark = "运单入库:" + stockCount + "/" + totalCount + ",入库类型:【零担开单及入库】,入库时间:" + CommonUtil.dateToStringGeneral(waybillEntity.getCreateTime());
createOperationRemark = "运单入库:" + stockCount + "/" + totalCount + ",入库类型:【零担开单及入库】,入库时间:" + CommonUtil.dateToStringGeneral(date);
openOrderAsyncService.saveLog(waybillId, waybillNo, "20", "已入库", createOperationRemark, nickName, userId, warehouseId, warehouseName);
}
@ -1070,7 +1071,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceEntity.setCustomerName(openLabelDTO.getCustomerName());
advanceEntity.setCustomerPhone(openLabelDTO.getCustomerPhone());
advanceEntity.setCustomerAddress(openLabelDTO.getCustomerAddress());
advanceEntity.setSystemType("线");
advanceEntity.setSystemType("线");
advanceEntity.setServiceNum(openLabelDTO.getServiceNum());
advanceEntity.setMatingType("1");
advanceEntity.setSenderName(openLabelDTO.getSenderName());
@ -1089,7 +1090,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceDetailModel.setAdvanceId(advanceId);
advanceDetailModel.setOrderCode(openLabelDTO.getOrderCode());
advanceDetailModel.setBrand(openLabelDTO.getBrand());
advanceDetailModel.setSystemType("线");
advanceDetailModel.setSystemType("线");
// advanceDetailModel.setOrderPackageCode(basicdataCodeClient.getCodeByType(CodeNumConstant.PACKAGE, warehouseCode, orderCode));
advanceDetailModel.setFirstPackName(firsts);
@ -1106,6 +1107,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceDetailModel.setThirdPackName(thirds);
}
advanceDetailModel.setSiteName(openLabelDTO.getSiteName());
advanceDetailModel.setMaterialName(openLabelDTO.getMaterialName());
advanceDetailModel.setQuantity(1);
advanceDetailModel.setServiceNum(openLabelDTO.getServiceNum());
advanceDetailModel.setPackageStatus("0");
@ -1383,7 +1385,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
String materialName = pacakgeDetailExcelDTO.getMaterialName();
String materialCode = pacakgeDetailExcelDTO.getMaterialCode();
advanceDetailModel.setMaterialName(materialName);
advanceDetailModel.setMaterialCode(materialCode);
if (StringUtil.isNotBlank(materialCode) && StringUtil.isNotBlank(materialName)) {
Long materialId = materialMap.get(materialCode);
if (!Objects.isNull(materialId)) {

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java

@ -300,7 +300,7 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
public R findOrderDetails(OrderDetailsDTO orderDetailsDTO) {
//判断orderDetailsDTO中的订单号 运单号 包件码 服务号 客户车次号至少有一个有值
if (StringUtil.isBlank(orderDetailsDTO.getOrderCode()) && StringUtil.isBlank(orderDetailsDTO.getWaybillNo()) && StringUtil.isBlank(orderDetailsDTO.getOrderPackageCode()) && StringUtil.isBlank(orderDetailsDTO.getServiceNumber()) && StringUtil.isBlank(orderDetailsDTO.getTrunklineCarsNo())) {
if (StringUtil.isBlank(orderDetailsDTO.getDeliveryTrainNumber()) && StringUtil.isBlank(orderDetailsDTO.getTrainNumber()) && StringUtil.isBlank(orderDetailsDTO.getOrderCode()) && StringUtil.isBlank(orderDetailsDTO.getWaybillNo()) && StringUtil.isBlank(orderDetailsDTO.getOrderPackageCode()) && StringUtil.isBlank(orderDetailsDTO.getServiceNumber()) && StringUtil.isBlank(orderDetailsDTO.getTrunklineCarsNo())) {
return R.fail("订单号 运单号 包件码 服务号 客户车次号至少有一个有值");
}

23
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

@ -160,7 +160,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
TrunklineBillladingLogEntity logEntity = new TrunklineBillladingLogEntity();
logEntity.setWarehouseId(warehouseId);
logEntity.setWarehouseName(warehouseName);
logEntity.setCreateUserName(AuthUtil.getUserName());
logEntity.setCreateUserName(AuthUtil.getNickName());
logEntity.setContent("创建提货单 billladingCode="+billladingCode);
logEntity.setBillladingId(billladingId);
logEntity.setAfterOpreation(JSON.toJSONString(trunklineBillladingEntity));
@ -204,7 +204,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
TrunklineBillladingLogEntity logEntity = new TrunklineBillladingLogEntity();
logEntity.setWarehouseId(warehouseId);
logEntity.setWarehouseName(warehouseName);
logEntity.setCreateUserName(AuthUtil.getUserName());
logEntity.setCreateUserName(AuthUtil.getNickName());
logEntity.setContent("修改提货单 billladingCode="+billladingCode+" "+updateMsg);
logEntity.setBillladingId(billladingId);
logEntity.setBeforeOpreation(JSON.toJSONString(billladingEntity));
@ -435,8 +435,8 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
billladingEntity.setBillladingStatus("4");
billladingEntity.setSettlementTime(date);
billladingEntity.setSettlementId(AuthUtil.getUserId());
billladingEntity.setSettlementName(AuthUtil.getUserName());
stringBuffer.append(",提货完成变更为已结算,时间").append(CommonUtil.dateToString(date)).append(",变更人").append(AuthUtil.getUserName());
billladingEntity.setSettlementName(AuthUtil.getNickName());
stringBuffer.append(",提货完成变更为已结算,时间").append(CommonUtil.dateToString(date)).append(",变更人").append(AuthUtil.getNickName());
List<TrunklineBillladingWaybillEntity> billladingWaybillEntities = billladingWaybillService.findNoFinishWaybillByBillladingId(billladingId);
Map<Long,Integer> map = new HashMap<>();
@ -480,7 +480,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
case 6:
//取消提货
billladingEntity.setBillladingStatus("5");
stringBuffer.append(",变更为取消提货,时间").append(CommonUtil.dateToString(new Date())).append(",变更人").append(AuthUtil.getUserName());
stringBuffer.append(",变更为取消提货,时间").append(CommonUtil.dateToString(new Date())).append(",变更人").append(AuthUtil.getNickName());
break;
default:
log.warn("#############updateBillladingStatus: 未知的更新操作");
@ -547,6 +547,13 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
return R.fail(405,"提货单不存在");
}
String billladingStatus = billladingEntity.getBillladingStatus();
if(!"1".equals(billladingStatus) && !"2".equals(billladingStatus)){
log.warn("#############updateBillladingWaybillNum: 提货已经完成 billladingId={}",billladingId);
return R.fail(405,"提货已经完成");
}
Integer stockNum = 0;
BigDecimal stockWeight = BigDecimal.ZERO;
BigDecimal stockVolume = BigDecimal.ZERO;
@ -683,6 +690,12 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
return R.fail(405,"提货单不存在");
}
String billladingStatus = trunklineBillladingEntity.getBillladingStatus();
if(!"1".equals(billladingStatus) && !"2".equals(billladingStatus)){
log.warn("#############addWaybillToBillladingId: 提货已完成 billladingId={}",billladingId);
return R.fail(405,"提货已完成");
}
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(Objects.isNull(warehouseWaybillEntity)){
log.warn("#############addWaybillToBillladingId: 运单不存在 waybillNo={}",waybillNo);

59
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -1749,7 +1749,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
carsLoadEntity.setLoadStatus("40");
}else{
carsLoadEntity.setLoadStatus("20");
Long startWarehouseId = Long.parseLong(split[0]);
if(startWarehouseId.equals(warehouseId)){
carsLoadEntity.setLoadStatus("0");
}else{
carsLoadEntity.setLoadStatus("20");
}
}
updateById(carsLoadEntity);
@ -2875,7 +2880,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionStockArticleClient.submitHandleNumByOrderId(difficult, articleId);
}
audio = (realLoadingNumber+enterNum)+"件";
audio = (enterNum)+"件";
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, goodsName, difficult,
2, isData, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark);
@ -3407,6 +3412,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String orderCode = zeroSuppleVO.getOrderCode();
Integer enterNum = zeroSuppleVO.getEnterNum();
Long finalNodeId = zeroSuppleVO.getFinalNodeId();
Long signOrderId = zeroSuppleVO.getSignOrderId();
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if (Objects.isNull(warehouseWaybillEntity)) {
@ -3447,11 +3453,24 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setUnloadCheck(0);
carsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName());
carsLoadScanEntity.setIsSupple(1);
carsLoadScanEntity.setSignOrderId(signOrderId);
trunklineCarsLoadScanService.save(carsLoadScanEntity);
zeroStockArticleEntity.setHandQuantity(zeroStockArticleEntity.getHandQuantity() - enterNum);
distributionStockArticleClient.saveOrUpdate(zeroStockArticleEntity);
if(!Objects.isNull(signOrderId)){
updateSignOrderNumBySignOrderId(signOrderId);
// TrunklineLoadSignOrderEntity signOrderEntity = trunklineLoadSignOrderService.getById(signOrderId);
// signOrderEntity.setPlanNum(signOrderEntity.getPlanNum() + enterNum);
// signOrderEntity.setLoadingNum(signOrderEntity.getLoadingNum() + enterNum);
// Integer signNum = signOrderEntity.getSignNum();
// if(signNum > 0 ){
// signOrderEntity.setSignStatus("10");
// }
// trunklineLoadSignOrderService.updateById(signOrderEntity);
}
}
//更新数量
updateNumByLoadId(loadId);
@ -5223,10 +5242,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405, "零担已卸车");
}
if ("3".equals(scanStatus)) {
log.warn("##############signZeroOrder: 零担已签收 carsLoadScanId={} scanStatus={}", carsLoadScanId, scanStatus);
return R.fail(405, "零担已签收");
}
// if ("3".equals(scanStatus)) {
// log.warn("##############signZeroOrder: 零担已签收 carsLoadScanId={} scanStatus={}", carsLoadScanId, scanStatus);
// return R.fail(405, "零担已签收");
// }
Long wid = carsLoadScanEntity.getWarehouseId();
@ -5235,6 +5254,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405, "包件不在签收计划中");
}
Integer num = carsLoadScanEntity.getNum();
if(enterNum > num){
log.warn("##############signScanPackageCode: 签收数量不能大于当前数据的装车数量 num={} enterNum={}", num, enterNum);
return R.fail(405, "签收数量不能大于当前数据的装车数量");
}
carsLoadScanEntity.setScanStatus("3");
carsLoadScanEntity.setUnloadNum(enterNum);
carsLoadScanEntity.setUnloadAbnormal(0);
@ -5997,11 +6022,27 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}else{
//直发商家签收单
signOrderEntity.setSignStatus("30");
//处理零担的数据
QueryWrapper<TrunklineCarsLoadScanEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("sign_order_id",signOrderId)
.eq("type",2)
.eq("scan_status","3");
List<TrunklineCarsLoadScanEntity> carsLoadScanEntityList = trunklineCarsLoadScanService.list(queryWrapper);
carsLoadScanEntityList.forEach(carsLoadScanEntity -> {
Integer num = carsLoadScanEntity.getNum();
Integer unloadNum = carsLoadScanEntity.getUnloadNum();
String orderCode = carsLoadScanEntity.getOrderCode();
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
if(unloadNum != num){
int diff = num - unloadNum;
DistributionStockArticleEntity stockArticle = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
distributionStockArticleClient.addHandQuantity(stockArticle.getId(), diff);
}
});
trunklineLoadSignOrderService.updateById(signOrderEntity);
}
return R.success("添加成功");
}

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

@ -3364,8 +3364,8 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
orderDetailVO.setScanNum(scanNum);
List<ParcelListVO> list = warehouseTrayGoodsService.findAllPackageDetailByOrderCode(orderCode,warehouseId);
for (ParcelListVO parcelListVO:list){
String trayName = parcelListVO.getTrayName();
if(trayCode.equals(trayName)){
String trayCode1 = parcelListVO.getTrayCode();
if(trayCode.equals(trayCode1)){
parcelListVO.setDeletedStatus(1);
}else{
parcelListVO.setDeletedStatus(0);

Loading…
Cancel
Save