Browse Source

Merge branch 'dev' into pre-production

single_db
pref_mail@163.com 1 year ago
parent
commit
aee42d903c
  1. 3
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataGoodsAllocationClient.java
  2. 3
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IWayBillClient.java
  3. 6
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  4. 17
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroSuppleVO.java
  5. 74
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/config/XxlJobConfig.java
  6. 20
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  7. 36
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/jobhandler/AftersalesXxlJob.java
  8. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  9. 3
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  10. 4
      blade-service/logpm-aftersales/src/main/resources/application.yml
  11. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataGoodsAllocationClient.java
  12. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.java
  13. 6
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml
  14. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAllocationService.java
  15. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java
  16. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  17. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  18. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  19. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  20. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  21. 104
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  22. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  23. 100
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  24. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  25. 99
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  26. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  27. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  28. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java
  29. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  30. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  31. 49
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  32. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  33. 41
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  34. 6
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/feign/MtOrderMainClinet.java
  35. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  36. 18
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OldWaybillClient.java
  37. 5
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/WayBillClient.java
  38. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/WayBillMapper.java
  39. 12
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/WayBillMapper.xml
  40. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IWayBillService.java
  41. 5
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/WayBillServiceImpl.java
  42. 6
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java
  43. 76
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java
  44. 195
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  45. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  46. 11
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java
  47. 202
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  48. 28
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java
  49. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java
  50. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

3
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataGoodsAllocationClient.java

@ -66,4 +66,7 @@ public interface IBasicdataGoodsAllocationClient {
@GetMapping(API_PREFIX+"/findListByShelfId")
List<BasicdataGoodsAllocationEntity> findListByShelfId(@RequestParam Long shelfId);
@GetMapping(API_PREFIX+"/findAllAllocationIdByWarehouseId")
List<Long> findAllAllocationIdByWarehouseId(@RequestParam Long warehouseId);
}

3
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IWayBillClient.java

@ -48,4 +48,7 @@ public interface IWayBillClient {
@GetMapping(API_PREFIX + "/findAdvanceIdsByWaybillNo")
List<Integer> findAdvanceIdsByWaybillNo(@RequestParam String waybillNo);
@GetMapping(API_PREFIX + "/getByWayBillByOrderCode")
WayBillEntity getByWayBillByOrderCode(@RequestParam String orderCode);
}

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

@ -1,6 +1,7 @@
package com.logpm.trunkline.dto;
import com.logpm.trunkline.vo.ZeroOrderVO;
import com.logpm.trunkline.vo.ZeroSuppleVO;
import lombok.Data;
import java.io.Serializable;
@ -49,6 +50,9 @@ public class LoadCarsDTO implements Serializable {
private String orderCode;
private String trayCode;
private String trayType;
private Integer isZero;
private String scanCode;
private List<LoadingPackageDTO> packageList = new ArrayList<>();
private List<LoadingZeroDTO> zeroList = new ArrayList<>();
@ -65,4 +69,6 @@ public class LoadCarsDTO implements Serializable {
private List<ZeroOrderVO> zeroOrderList = new ArrayList<>();
private List<ZeroSuppleVO> zeroSuppleList = new ArrayList<>();
}

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

@ -0,0 +1,17 @@
package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class ZeroSuppleVO implements Serializable {
private String waybillNo;
private String orderCode;
private Integer enterNum;//输入数量
private Long finalNodeId;//目的仓id
}

74
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/config/XxlJobConfig.java

@ -0,0 +1,74 @@
package com.logpm.aftersales.config;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* xxl-job config
*
* @author xuxueli 2017-04-28
*/
@Configuration(proxyBeanMethods = false)
public class XxlJobConfig {
private final Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
@Value("${xxl.job.admin.addresses}")
private String adminAddresses;
@Value("${xxl.job.executor.appname}")
private String appName;
@Value("${xxl.job.executor.ip}")
private String ip;
@Value("${xxl.job.executor.port}")
private int port;
@Value("${xxl.job.accessToken}")
private String accessToken;
@Value("${xxl.job.executor.logpath}")
private String logPath;
@Value("${xxl.job.executor.logretentiondays}")
private int logRetentionDays;
@Bean
public XxlJobSpringExecutor xxlJobExecutor() {
logger.info(">>>>>>>>>>> xxl-job config init.");
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
xxlJobSpringExecutor.setAppName(appName);
xxlJobSpringExecutor.setIp(ip);
xxlJobSpringExecutor.setPort(port);
xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setLogPath(logPath);
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
return xxlJobSpringExecutor;
}
/**
* 针对多网卡容器内部署等情况可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP
*
* 1引入依赖
* <dependency>
* <groupId>org.springframework.cloud</groupId>
* <artifactId>spring-cloud-commons</artifactId>
* <version>${version}</version>
* </dependency>
*
* 2配置文件或者容器启动变量
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
*
* 3获取IP
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
*/
}

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

@ -150,27 +150,27 @@ public class AftersalesWorkOrderController extends BladeController {
* 客服异常工单 查询处理超时的数据 待处理r
*/
// @GetMapping("/isItTimeout")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "查询处理超时的数据", notes = "传入aftersalesWorkOrder")
@XxlJob("syncWarehouseToNew")
// @ApiOperationSupport(order = 2)
// @ApiOperation(value = "查询处理超时的数据", notes = "传入aftersalesWorkOrder")
// @XxlJob("syncWarehouseToNew")
// @Scheduled(cron = "0 0/1 * * * ?")
public void getIsItTimeout() {
log.info("查询处理超时的数据>>>>>>>>");
aftersalesWorkOrderService.getIsItTimeout();
}
// public void getIsItTimeout() {
// log.info("查询处理超时的数据>>>>>>>>");
// aftersalesWorkOrderService.getIsItTimeout();
// }
/**
* 客服异常工单 修改理赔工单是否可以申述
*/
// @GetMapping("/isItTimeout")
@ApiOperationSupport(order = 2)
/* @ApiOperationSupport(order = 2)
@ApiOperation(value = "修改理赔工单是否可以申述", notes = "传入aftersalesWorkOrder")
@XxlJob("modifyClaimStatus")
// @Scheduled(cron = "0 0/1 * * * ?")
@Scheduled(cron = "0 0/1 * * * ?")
public void updateModifyClaimStatus() {
log.info("修改理赔工单是否可以申述>>>>>>>>");
aftersalesWorkOrderService.updateModifyClaimStatus();
}
}*/
/**

36
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/jobhandler/AftersalesXxlJob.java

@ -0,0 +1,36 @@
package com.logpm.aftersales.jobhandler;
import com.logpm.aftersales.service.IAftersalesWorkOrderService;
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.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
/**
* @author 12702
*/
@AllArgsConstructor
@Component
public class AftersalesXxlJob {
private static final Logger logger = LoggerFactory.getLogger(AftersalesXxlJob.class);
private final IAftersalesWorkOrderService aftersalesWorkOrderService;
@XxlJob("syncWarehouseToNew")
public ReturnT<String> getIsItTimeout(String param) throws Exception {
logger.info("查询处理超时的数据>>>>>>>>{}",param);
aftersalesWorkOrderService.getIsItTimeout();
return ReturnT.SUCCESS;
}
@XxlJob("modifyClaimStatus")
public ReturnT<String> updateModifyClaimStatus(String param) throws Exception {
logger.info("修改理赔工单是否可以申述>>>>>>>>{}",param);
aftersalesWorkOrderService.updateModifyClaimStatus();
return ReturnT.SUCCESS;
}
}

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

@ -94,7 +94,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test="param.investigationProcess != null and param.investigationProcess != '' ">and lawo.investigation_process = #{param.investigationProcess } </if>
<if test="param.relatedWorkOrdersId != null and param.relatedWorkOrdersId != '' ">and lawo.related_work_orders_id = #{param.relatedWorkOrdersId } </if>
<if test="param.customerIdentification != null and param.customerIdentification == 1 ">
and lawo.work_order_status in ('30','40','50','60','70','80','90')
and lawo.work_order_status in ('30','40','50','60','70','80','90') and lawo.customer_service_id is null
</if>
</where>

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

@ -511,6 +511,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
switch (dictValue){
case "1": //客服经理 查询全部待处理工单
aftersalesWorkOrder.put("customerIdentification", "1");
break;
case "2": // 营业部客服
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
@ -521,7 +522,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
break;
case "3": //职能客服 查询自己的待处理工单
aftersalesWorkOrder.put("customer_service_id",user.getUserId());
aftersalesWorkOrder.put("customerServiceId",user.getUserId());
break;
}

4
blade-service/logpm-aftersales/src/main/resources/application.yml

@ -43,9 +43,9 @@ xxl:
admin:
addresses: http://127.0.0.1:7009/xxl-job-admin
executor:
appname: logpm-factory-xxljob
appname: logpm-aftersales-xxljob
ip: 127.0.0.1
logpath: ../data/applogs/logpm-factory-xxljob/jobhandler
logpath: ../data/applogs/logpm-aftersales-xxljob/jobhandler
logretentiondays: -1
port: 7018
logpm:

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataGoodsAllocationClient.java

@ -99,4 +99,9 @@ public class BasicdataGoodsAllocationClient implements IBasicdataGoodsAllocation
return BasicdataGoodsAllocationService.list(queryWrapper);
}
@Override
public List<Long> findAllAllocationIdByWarehouseId(Long warehouseId) {
return BasicdataGoodsAllocationService.findAllAllocationIdByWarehouseId(warehouseId);
}
}

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

@ -77,4 +77,6 @@ public interface BasicdataGoodsAllocationMapper extends BaseMapper<BasicdataGood
* @return
*/
List<BasicdataNodeVO> selectFourthNode(@Param("warehouseId") String warehouseId,@Param("areaId") String areaId,@Param("goodsShelfId") String goodsShelfId);
List<Long> findAllAllocationIdByWarehouseId(@Param("warehouseId") Long warehouseId);
}

6
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml

@ -174,4 +174,10 @@
lwga1.is_deleted = 0 AND lwga.warehouse_id = #{warehouseId} AND lwga.goods_area_id = #{areaId} and lwga.goods_shelf_id = #{goodsShelfId}
</select>
<select id="findAllAllocationIdByWarehouseId" resultType="java.lang.Long">
select id
from logpm_warehouse_goods_allocation
where warehouse_id = #{warehouseId}
</select>
</mapper>

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

@ -24,9 +24,6 @@ import com.logpm.basicdata.excel.BasicdataGoodsAllocationExcel;
import com.logpm.basicdata.vo.BasicdataGoodsAllocationVO;
import com.logpm.basicdata.vo.BasicdataNodeVO;
import com.logpm.basicdata.vo.FreightSpaceVO;
import com.logpm.warehouse.vo.WarehouseStockArticleZationVO;
import com.logpm.warehouse.vo.WarehouseStockListZationVO;
import com.logpm.warehouse.vo.WarehouseVisualizationVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
@ -124,4 +121,5 @@ public interface IBasicdataGoodsAllocationService extends BaseService<BasicdataG
*/
List<BasicdataNodeVO> getStockUpAllocation();
List<Long> findAllAllocationIdByWarehouseId(Long warehouseId);
}

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java

@ -331,4 +331,9 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl<Basicda
}
return null;
}
@Override
public List<Long> findAllAllocationIdByWarehouseId(Long warehouseId) {
return baseMapper.findAllAllocationIdByWarehouseId(warehouseId);
}
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -276,7 +276,7 @@ public class DistributionStockupAppController extends BladeController {
map.put("consignee", reservationEntity.getConsignee());
String stockupArea = distributionStockupService.selectStockupAreaByReservationId(reservationEntity.getId());
map.put("goodsAreaName", stockupArea);
if (orderStatus.equals(1)) {
if (orderStatus==1) {
//查询客户订单对应的
List<DistributionStockupOrderListVO> list = distributionStockupService.selectStockupOrderList(stockupDTO);
@ -305,7 +305,7 @@ public class DistributionStockupAppController extends BladeController {
map.put("planNum", planNum);
map.put("scanNum", scanNum);
map.put("orderList", list);
} else if (orderStatus.equals(2)) {
} else if (orderStatus==2) {
//查询客户订单对应的库存品

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

@ -149,6 +149,7 @@ public class DistributionDeliveryListController extends BladeController {
@ApiOperationSupport(order = 1)
@ApiOperation(value = "异常工单查询配送信息", notes = "传入distributionDeliveryList")
public R<IPage<DistributionDeliveryWordVO>> getShippingInformation (DistributionDeliveryListDTO distributionDeliveryInfoDTO, Query query) {
log.info("异常工单查询配送信息参数》》》》》{}",distributionDeliveryInfoDTO.toString());
IPage<DistributionDeliveryWordVO> pages = distributionDeliveryListService.getShippingInformation(Condition.getPage(query), distributionDeliveryInfoDTO);
return R.data(pages);
}

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java

@ -385,14 +385,9 @@ public class DistributionReservationController extends BladeController {
@GetMapping("/getReservationPackageListByOrderId")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入distrbutionReservation")
public R getReservationPackageListByorderId(@ApiIgnore @RequestParam Long orderId, @ApiIgnore @RequestParam Long reservationId, Query query) {
R parcelListVOIPage = reservationService.getReservationPackageListByOrderId(orderId,reservationId,Condition.getPage(query));
public R getReservationPackageListByorderId(@ApiIgnore @RequestParam Map<String,Object> packageDTO, Query query) {
R parcelListVOIPage = reservationService.getReservationPackageListByOrderId(packageDTO,Condition.getPage(query));
return R.data(parcelListVOIPage);
}
}

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java

@ -146,8 +146,11 @@ public class DistributionStockArticleController extends BladeController {
@GetMapping("/getPackageListByStockArticleId")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionStockArticle")
public R<IPage<DistributionParcelListVO>> getPackageListByStockArticleId(@ApiIgnore @RequestParam Long orderId, Query query) {
IPage<DistributionParcelListVO> pages = distributionStockArticleService.getPackageListByStockArticleId(Condition.getPage(query), orderId);
public R<IPage<DistributionParcelListVO>> getPackageListByStockArticleId(@ApiIgnore @RequestParam Map<String,Object> packageDTO, Query query) {
if (Func.isEmpty(packageDTO.get("id"))){
return null;
}
IPage<DistributionParcelListVO> pages = distributionStockArticleService.getPackageListByStockArticleId(Condition.getPage(query), packageDTO);
return R.data(pages);
}

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

@ -140,4 +140,20 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
* @param packageIds
*/
Integer updateLoadingAndSigningByIds(@Param("packageIds")List<Long> packageIds);
/**
* 根据二维码查询包件信息
* @param orderPackageCode
* @param warehouseId
* @return
*/
DistributionParcelListEntity selectByOrderPackageCode(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId);
/**
* 查询订单包件列表
* @param packageDTO
* @param id
* @return
*/
List<DistributionParcelListEntity> getPackageListByMap(@Param("param") Map<String, Object> packageDTO,@Param("warehouseId") Long id);
}

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

@ -621,8 +621,6 @@
</if>
<if test="param.conditions != null and param.conditions != ''">and ldpl.conditions = #{param.conditions}
</if>
</where>
GROUP BY ldpl.id
</select>
@ -868,6 +866,108 @@
where order_package_code = #{orderPackageCode}
and order_package_status in ('20','30')
</select>
<select id="selectByOrderPackageCode"
resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT * FROM logpm_distribution_parcel_list WHERE order_package_code = #{orderPackageCode} and warehouse_id = #{warehouseId}
</select>
<select id="getPackageListByMap" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT
ldpl.id,
ldpl.tenant_id,
ldpl.create_user,
ldpl.create_time,
ldpl.update_user,
ldpl.update_time,
ldpl.status,
ldpl.is_deleted,
ldpl.create_dept,
ldpl.reserve1,
ldpl.reserve2,
ldpl.reserve3,
ldpl.reserve4,
ldpl.reserve5,
ldpl.warehouse_id,
ldpl.warehouse,
ldpl.conditions,
ldpl.order_package_code,
ldpl.cargo_title,
ldpl.shelf_title,
ldpl.goods_allocation,
ldpl.pallet,
ldpl.firsts_code,
ldpl.firsts,
ldpl.second_code,
ldpl.second,
ldpl.third_code,
ldpl.third_product,
ldpl.quantity,
ldpl.train_number,
ldpl.stock_article_id,
ldpl.order_code,
ldpl.service_number,
ldpl.material_id,
ldpl.material_name,
ldpl.material_code,
ldpl.material_unit,
ldpl.brand_id,
ldpl.brand_name,
ldpl.order_package_status,
ldpl.order_package_freeze_status,
ldpl.order_package_grounding_status,
ldpl.order_package_stockup_status,
ldpl.order_package_reservation_status,
ldpl.order_package_loading_status,
ldpl.waybill_number,
ldpl.waybill_id,
ldpl.warehouse_entry_time_end,
ldpl.dealer_name,
ldpl.dealer_code,
ldpl.send_warehouse_id,
ldpl.send_warehouse_name,
ldpl.accept_warehouse_id,
ldpl.accept_warehouse_name,
ldpl.order_package_delivery_status,
ldpl.weight,
ldpl.volume
FROM
logpm_distribution_parcel_list AS ldpl
WHERE
ldpl.order_package_reservation_status = 10 and ldpl.order_package_freeze_status = 10 AND ldpl.order_package_loading_status = 10 AND order_package_status IN (10,20)
and ldpl.stock_article_id = #{param.orderId} and ldpl.warehouse_id = #{warehouseId}
<if test="param.waybillNumber != null and param.waybillNumber != ''">
and ldpl.waybill_number like concat('%',#{param.waybillNumber},'%')
</if>
<if test="param.serviceNumber != null and param.serviceNumber != ''">
and ldpl.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<if test="param.orderCode != null and param.orderCode != ''">
and ldpl.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.orderCode != null and param.orderCode != ''">
and ldpl.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.orderPackageCode != null and param.orderPackageCode != ''">
and ldpl.order_package_code like concat('%',#{param.orderPackageCode},'%')
</if>
<if test="param.warehouse != null and param.warehouse != ''">
and ldpl.warehouse like concat('%',#{param.warehouse},'%')
</if>
<if test="param.warehouse != null and param.warehouse != ''">
and ldpl.warehouse like concat('%',#{param.warehouse},'%')
</if>
<if test="param.sendWarehouseName != null and param.sendWarehouseName != ''">
and ldpl.send_warehouse_name like concat('%',#{param.sendWarehouseName},'%')
</if>
<if test="param.firsts != null and param.firsts != ''">
and ldpl.firsts like concat('%',#{param.firsts},'%')
</if>
<if test="param.second != null and param.second != ''">
and ldpl.second like concat('%',#{param.second},'%')
</if>
<if test="param.thirdProduct != null and param.thirdProduct != ''">
and ldpl.third_product like concat('%',#{param.thirdProduct},'%')
</if>
</select>
<update id="updateOrderPackageCodeById">
update logpm_distribution_parcel_list

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

@ -331,5 +331,13 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
* @param id
* @return
*/
DistributionStockupStockListVO selectStockupStockListByStockListId(@Param("reservationId") Long reservationId,@Param("stockListId") Long id);
DistributionStockupStockListVO selectStockupStockListByStockListId(@Param("reservationId") Long reservationId,@Param("stockListId") Long stockListId);
/**
* 查询预约指定订单的包件信息
* @param packageDTO
* @param id
* @return
*/
List<DistributionParcelListEntity> selectPackageByMap(@Param("param") Map<String, Object> packageDTO,@Param("warehouseId") Long warehouseId);
}

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

@ -1437,5 +1437,105 @@
WHERE
ldrs.reservation_id = #{reservationId} and ldrs.stocklist_id = #{stockListId}
</select>
<select id="selectPackageByMap" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT
ldpl.id,
ldpl.tenant_id,
ldpl.create_user,
ldpl.create_time,
ldpl.update_user,
ldpl.update_time,
ldpl.STATUS,
ldpl.is_deleted,
ldpl.create_dept,
ldpl.reserve1,
ldpl.reserve2,
ldpl.reserve3,
ldpl.reserve4,
ldpl.reserve5,
ldpl.warehouse_id,
ldpl.warehouse,
ldpl.conditions,
ldpl.order_package_code,
ldpl.cargo_title,
ldpl.shelf_title,
ldpl.goods_allocation,
ldpl.pallet,
ldpl.firsts_code,
ldpl.firsts,
ldpl.second_code,
ldpl.SECOND,
ldpl.third_code,
ldpl.third_product,
ldpl.quantity,
ldpl.train_number,
ldpl.stock_article_id,
ldpl.order_code,
ldpl.service_number,
ldpl.material_id,
ldpl.material_name,
ldpl.material_code,
ldpl.material_unit,
ldpl.brand_id,
ldpl.brand_name,
ldpl.order_package_status,
ldpl.order_package_freeze_status,
ldpl.order_package_grounding_status,
ldpl.order_package_stockup_status,
ldpl.order_package_reservation_status,
ldpl.order_package_loading_status,
ldpl.waybill_number,
ldpl.waybill_id,
ldpl.warehouse_entry_time_end,
ldpl.dealer_name,
ldpl.dealer_code,
ldpl.send_warehouse_id,
ldpl.send_warehouse_name,
ldpl.accept_warehouse_id,
ldpl.accept_warehouse_name,
ldpl.order_package_delivery_status,
ldpl.weight,
ldpl.volume
FROM
logpm_distribution_reservation_package AS ldrp
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id
WHERE
ldrp.reservation_id = #{param.reservationId}
AND ldpl.order_package_freeze_status = 10
AND ldpl.warehouse_id = #{warehouseId}
<if test="param.waybillNumber != null and param.waybillNumber != ''">
and ldpl.waybill_number like concat('%',#{param.waybillNumber},'%')
</if>
<if test="param.serviceNumber != null and param.serviceNumber != ''">
and ldpl.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<if test="param.orderCode != null and param.orderCode != ''">
and ldpl.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.orderCode != null and param.orderCode != ''">
and ldpl.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.orderPackageCode != null and param.orderPackageCode != ''">
and ldpl.order_package_code like concat('%',#{param.orderPackageCode},'%')
</if>
<if test="param.warehouse != null and param.warehouse != ''">
and ldpl.warehouse like concat('%',#{param.warehouse},'%')
</if>
<if test="param.warehouse != null and param.warehouse != ''">
and ldpl.warehouse like concat('%',#{param.warehouse},'%')
</if>
<if test="param.sendWarehouseName != null and param.sendWarehouseName != ''">
and ldpl.send_warehouse_name like concat('%',#{param.sendWarehouseName},'%')
</if>
<if test="param.firsts != null and param.firsts != ''">
and ldpl.firsts like concat('%',#{param.firsts},'%')
</if>
<if test="param.second != null and param.second != ''">
and ldpl.second like concat('%',#{param.second},'%')
</if>
<if test="param.thirdProduct != null and param.thirdProduct != ''">
and ldpl.third_product like concat('%',#{param.thirdProduct},'%')
</if>
</select>
</mapper>

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

@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionStockArticleOweDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.vo.DistributionParcelNumberVO;
import com.logpm.distribution.vo.DistributionStockArticleGroundingVO;
@ -140,4 +141,13 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
void addIncomingNumk(@Param("orderId") Long orderId,@Param("num") Integer num);
IPage<JSONObject> findZeroListByWarehouseId(IPage<Object> page,@Param("warehouseId") Long warehouseId);
/**
* 查询订单包件信息
* @param packageDTO
* @param id
* @return
*/
List<DistributionParcelListEntity> selectOrderPackageListByMap(@Param("param") Map<String, Object> packageDTO,@Param("warehouseId") Long id);
}

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

@ -888,5 +888,104 @@
where ldsa.is_zero = 1
and ldsa.warehouse_id = #{warehouseId}
</select>
<select id="selectOrderPackageListByMap"
resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT
ldpl.id,
ldpl.tenant_id,
ldpl.create_user,
ldpl.create_time,
ldpl.update_user,
ldpl.update_time,
ldpl.status,
ldpl.is_deleted,
ldpl.create_dept,
ldpl.reserve1,
ldpl.reserve2,
ldpl.reserve3,
ldpl.reserve4,
ldpl.reserve5,
ldpl.warehouse_id,
ldpl.warehouse,
ldpl.conditions,
ldpl.order_package_code,
ldpl.cargo_title,
ldpl.shelf_title,
ldpl.goods_allocation,
ldpl.pallet,
ldpl.firsts_code,
ldpl.firsts,
ldpl.second_code,
ldpl.second,
ldpl.third_code,
ldpl.third_product,
ldpl.quantity,
ldpl.train_number,
ldpl.stock_article_id,
ldpl.order_code,
ldpl.service_number,
ldpl.material_id,
ldpl.material_name,
ldpl.material_code,
ldpl.material_unit,
ldpl.brand_id,
ldpl.brand_name,
ldpl.order_package_status,
ldpl.order_package_freeze_status,
ldpl.order_package_grounding_status,
ldpl.order_package_stockup_status,
ldpl.order_package_reservation_status,
ldpl.order_package_loading_status,
ldpl.waybill_number,
ldpl.waybill_id,
ldpl.warehouse_entry_time_end,
ldpl.dealer_name,
ldpl.dealer_code,
ldpl.send_warehouse_id,
ldpl.send_warehouse_name,
ldpl.accept_warehouse_id,
ldpl.accept_warehouse_name,
ldpl.order_package_delivery_status,
ldpl.weight,
ldpl.volume
FROM
logpm_distribution_parcel_list AS ldpl
WHERE
ldpl.order_package_reservation_status = 10 and ldpl.order_package_freeze_status = 10 AND ldpl.order_package_loading_status = 10 AND order_package_status IN (10,20)
and ldpl.stock_article_id = #{param.id} and ldpl.warehouse_id = #{warehouseId}
<if test="param.waybillNumber != null and param.waybillNumber != ''">
and ldpl.waybill_number like concat('%',#{param.waybillNumber},'%')
</if>
<if test="param.serviceNumber != null and param.serviceNumber != ''">
and ldpl.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<if test="param.orderCode != null and param.orderCode != ''">
and ldpl.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.orderCode != null and param.orderCode != ''">
and ldpl.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.orderPackageCode != null and param.orderPackageCode != ''">
and ldpl.order_package_code like concat('%',#{param.orderPackageCode},'%')
</if>
<if test="param.warehouse != null and param.warehouse != ''">
and ldpl.warehouse like concat('%',#{param.warehouse},'%')
</if>
<if test="param.warehouse != null and param.warehouse != ''">
and ldpl.warehouse like concat('%',#{param.warehouse},'%')
</if>
<if test="param.sendWarehouseName != null and param.sendWarehouseName != ''">
and ldpl.send_warehouse_name like concat('%',#{param.sendWarehouseName},'%')
</if>
<if test="param.firsts != null and param.firsts != ''">
and ldpl.firsts like concat('%',#{param.firsts},'%')
</if>
<if test="param.second != null and param.second != ''">
and ldpl.second like concat('%',#{param.second},'%')
</if>
<if test="param.thirdProduct != null and param.thirdProduct != ''">
and ldpl.third_product like concat('%',#{param.thirdProduct},'%')
</if>
</select>
</mapper>

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java

@ -161,4 +161,12 @@ public interface IDistributionParcelListService extends BaseService<Distribution
DistributionParcelListEntity findByOrderPackageCodeAndStatus(String orderPackageCode);
void updateOrderPackageCodeById(Long packageId, String orderPackageStatus);
/**
* 根据二维码查询包件
* @param barcode
* @param id
* @return
*/
DistributionParcelListEntity selectByOrderPackageCode(String orderPackageCode, Long warehouseId);
}

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

@ -223,7 +223,7 @@ public interface IDistributionReservationService extends BaseService<Distributio
* @param reservationId
* @return
*/
R getReservationPackageListByOrderId(Long orderId, Long reservationId,IPage<DistributionReservationOrderPackageVO> page);
R getReservationPackageListByOrderId(Map<String,Object> packageDTO,IPage<DistributionReservationOrderPackageVO> page);
/**

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

@ -178,7 +178,7 @@ public interface IDistributionStockArticleService extends BaseService<Distributi
*/
List<DistributionStockArticleEntity> findStockArticleByCodeAndMarketAndWarehouseId(String code, String marketNames,Long warehouseId);
IPage<DistributionParcelListVO> getPackageListByStockArticleId(IPage<DistributionParcelListVO> page, Long orderId);
IPage<DistributionParcelListVO> getPackageListByStockArticleId(IPage<DistributionParcelListVO> page, Map<String,Object> packageDTO);
List<DistributionStockArticleQRCodeVO> selectTemplate(List<Long> ids);

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

@ -6641,6 +6641,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
public IPage<DistributionDeliveryWordVO> getShippingInformation(IPage<Object> page, DistributionDeliveryListDTO distributionDeliveryInfoDTO) {
if(ObjectUtils.isNotNull(distributionDeliveryInfoDTO) && ObjectUtils.isNotNull( distributionDeliveryInfoDTO.getTaskTime())){
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String format1 = format.format(distributionDeliveryInfoDTO.getTaskTime());
}

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

@ -619,6 +619,11 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
baseMapper.updateOrderPackageCodeById(packageId,orderPackageStatus);
}
@Override
public DistributionParcelListEntity selectByOrderPackageCode(String orderPackageCode, Long warehouseId) {
return baseMapper.selectByOrderPackageCode(orderPackageCode,warehouseId);
}
/**
* @param distributionParcelList 包件信息
* @return

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

@ -3358,31 +3358,38 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
@Override
public R getReservationPackageListByOrderId(Long orderId, Long reservationId, IPage<DistributionReservationOrderPackageVO> page) {
public R getReservationPackageListByOrderId(Map<String,Object> packageDTO, IPage<DistributionReservationOrderPackageVO> page) {
if (Func.isEmpty(packageDTO.get("orderId"))){
return null;
}
if (Func.isEmpty(packageDTO.get("reservationId"))){
return null;
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
return R.fail(403,"未授权!!!");
}
List<DistributionParcelListVO> allPackageList = new ArrayList<>();
List<DistributionReservationPackageEntity> reservationPackageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda().eq(DistributionReservationPackageEntity::getReservationId, reservationId).eq(DistributionReservationPackageEntity::getStockArticleId, orderId).ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()));
List<DistributionReservationPackageEntity> reservationPackageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda().eq(DistributionReservationPackageEntity::getReservationId, packageDTO.get("reservationId")).eq(DistributionReservationPackageEntity::getStockArticleId, packageDTO.get("orderId")).ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()));
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()));
if (Func.isNotEmpty(reservationPackageEntityList)) {
List<Long> packageIds = reservationPackageEntityList.stream().map(DistributionReservationPackageEntity::getParceListId).collect(Collectors.toList());
List<DistributionParcelListEntity> reservationPackageList = distributionParcelListService.listByIds(packageIds);
String packageListIds = reservationPackageEntityList.stream().map(DistributionReservationPackageEntity::getParceListId).map(String::valueOf).collect(Collectors.joining(","));
List<DistributionParcelListVO> parcelListVOS = DistributionParcelListWrapper.build().listVO(reservationPackageList);
allPackageList.addAll(parcelListVOS);
reservationOrderPackageVO.setReservationPackageList(parcelListVOS);
reservationOrderPackageVO.setPackageListIds(packageListIds);
}
if (Func.isNotEmpty(parcelListEntities)) {
allPackageList.addAll(DistributionParcelListWrapper.build().listVO(parcelListEntities));
}
if (Func.isEmpty(allPackageList)) {
log.error("###########################包件查询结果异常:{}", allPackageList);
return null;
//查询不属于当前预约的包件信息 通过订单
List<DistributionParcelListEntity> orderPackageList = distributionParcelListMapper.getPackageListByMap(packageDTO,myCurrentWarehouse.getId());
if (Func.isNotEmpty(orderPackageList)){
List<DistributionParcelListVO> distributionParcelListVOS = DistributionParcelListWrapper.build().listVO(orderPackageList);
allPackageList.addAll(distributionParcelListVOS);
}
//查询预约的包件信息
List<DistributionParcelListEntity> reservationPackageList = distributionReservationMapper.selectPackageByMap(packageDTO,myCurrentWarehouse.getId());
if (Func.isNotEmpty(reservationPackageList)){
List<DistributionParcelListVO> distributionParcelListVOS = DistributionParcelListWrapper.build().listVO(reservationPackageList);
allPackageList.addAll(distributionParcelListVOS);
String ids = reservationPackageList.stream().map(DistributionParcelListEntity::getId).map(String::valueOf).distinct().collect(Collectors.joining(","));
reservationOrderPackageVO.setReservationPackageList(distributionParcelListVOS);
reservationOrderPackageVO.setPackageListIds(ids);
}
reservationOrderPackageVO.setPackageList(allPackageList);
return R.data(reservationOrderPackageVO);
}

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

@ -654,11 +654,16 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
// ---------------------------------2023-09-09 包件签收调整---------------------------------------------------------------
//思路: 在于一个客户下不会出现重复的包条码
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)) {
throw new CustomerException(403, "仓库信息不能为空");
}
DistributionParcelListEntity parcelListEntity = distributionParcelListService.selectByOrderPackageCode(distrilbutionloadingscanDTO.getBarcode(),myCurrentWarehouse.getId());
if (Func.isEmpty(parcelListEntity)){
return Resp.scanFail("包件信息不存在","包件信息不存在");
}
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(distrilbutionloadingscanDTO.getReservationId());
if (Func.isEmpty(distributionReservationEntity)){
log.error("########无效的预约单,reservationId:{}",distrilbutionloadingscanDTO.getReservationId());
@ -794,6 +799,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
List<DistributionParcelListEntity> parcelListEntities = distributionDeliveryListMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
//该货物是否属于该计划
List<DistributionParcelListEntity> distributionParcelListEntities = parcelListEntities.stream().filter(p -> p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
if (Func.isNotEmpty(distributionParcelListEntities) && distributionParcelListEntities.size() == 1) {
//这里按道理也具备签收条件,需要标注该装车记录不正常
log.error("#####################distributionParcelListEntities窜货", distributionParcelListEntities);
@ -802,7 +808,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//判断该货物是否属于该客户
// 异常签收
// return Resp.scanFail("异常签收包件","异常签收包件");
//判断客户
boolean flag = judgmentClient(distributionReservationEntity,parcelListEntity.getStockArticleId());
if (flag){
return R.fail(3006, "异常签收");
}else {
return Resp.scanFail("异常签收包件","不满足签收条件");
}
}
} else {
//一个客户下出现重复包条码
@ -814,6 +826,27 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanSuccess("签收成功", str);
}
private boolean judgmentClient(DistributionReservationEntity distributionReservationEntity, Long stockArticleId) {
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(stockArticleId);
switch (distributionReservationEntity.getDeliveryType()){
case "1":
//商配
if (stockArticleEntity.getConsigneeUnit().equals(distributionReservationEntity.getReceivingUnit()) && stockArticleEntity.getConsigneePerson().equals(distributionReservationEntity.getConsignee()) && stockArticleEntity.getMallName().equals(distributionReservationEntity.getMallName())){
return true;
}else {
return false;
}
case "2":
if (stockArticleEntity.getCustomerName().equals(distributionReservationEntity.getConsignee()) && stockArticleEntity.getCustomerAddress().equals(distributionReservationEntity.getDeliveryAddress()) && stockArticleEntity.getCustomerTelephone().equals(distributionReservationEntity.getDeliveryPhone())){
return true;
}else {
return false;
}
//市配
}
return false;
}
// List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
// .ne(DistributionLoadscanEntity::getScanStatus, 1)
// .eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())
@ -952,6 +985,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
v.stream().forEach(i -> {
DistributionSignPrintEntity distributionSignPrint = new DistributionSignPrintEntity();
BeanUtils.copyProperties(i, distributionSignPrint);
distributionSignPrint.setId(null);
distributionSignPrint.setReservationId(distributionSignfor.getReservationId());
distributionSignPrintList.add(distributionSignPrint);
});
@ -1346,6 +1380,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
//查询已完成备货的库存品包件
List<DisStockListDetailEntity> detailEntities = distributionReservationMapper.selectInventoryListByReservation(distrilbutionloadingscanDTO.getReservationId());
if (Func.isEmpty(detailEntities)) {
return Resp.scanFail("此码无效", "此码无效");
@ -1353,7 +1388,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
boolean isHaveCode = detailEntities.stream().anyMatch(inven -> Func.isNotEmpty(inven.getStockPackageCode()));
if (isHaveCode) {
List<DisStockListDetailEntity> inventory = detailEntities.stream().filter(i -> i.getStockPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
List<DisStockListDetailEntity> inventory = detailEntities.stream().filter(i ->Func.isNotEmpty(i.getStockPackageCode()) && i.getStockPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
if (Func.isNotEmpty(inventory) && inventory.size() == 1) {
//查看这个库存品是否进行装车,
DistributionLoadscaninvnEntity loadscaninvnEntity = distributionLoadscaninvnService.getOne(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
@ -1457,7 +1492,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error("同一个配送任务中出现了相同的库存品码");
return Resp.scanFail("服务器正忙", "服务器正忙");
} else {
return R.fail(3006, "该库存品并未装车处理");
return Resp.scanFail("不属于当前车次", "不属于当前车次");
}
} else {
log.error("出现重复库存品包件码:{}", inventory);

41
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -50,8 +50,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
@ -1215,11 +1213,19 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
}
@Override
public IPage<DistributionParcelListVO> getPackageListByStockArticleId(IPage<DistributionParcelListVO> page, Long orderId) {
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, orderId)
.eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue())
.ne(DistributionParcelListEntity::getConditions,2)
.notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(), OrderPackageStatusConstant.yichuku.getValue()));
public IPage<DistributionParcelListVO> getPackageListByStockArticleId(IPage<DistributionParcelListVO> page, Map<String,Object> packageDTO) {
// List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, orderId)
// .eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue())
// .ne(DistributionParcelListEntity::getConditions,2)
// .notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(), OrderPackageStatusConstant.yichuku.getValue()));
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
log.error("无仓库信息~~");
return null;
}
List<DistributionParcelListEntity> parcelListEntityList = baseMapper.selectOrderPackageListByMap(packageDTO,myCurrentWarehouse.getId());
List<DistributionParcelListVO> parcelListVOS = DistributionParcelListWrapper.build().listVO(parcelListEntityList);
return page.setRecords(parcelListVOS);
}
@ -1289,12 +1295,20 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
Integer handleNum = 0;
Integer outNum = 0;
Integer signNum = 0;
Integer reservationNum = 0;
Long firstEntryTime = 0L;
Long lastEntryTime = 0L;
String reservationStatus = "10";
for (DistributionParcelListEntity parcelListEntity : list) {
incomingNum = incomingNum + 1;
String orderPackageStatus = parcelListEntity.getOrderPackageStatus();
String orderPackageReservationStatus = parcelListEntity.getOrderPackageReservationStatus();
if("20".equals(orderPackageReservationStatus)){
reservationNum = reservationNum + 1;
}
if(!"60".equals(orderPackageStatus) && !"70".equals(orderPackageStatus)){
handleNum = handleNum + 1;
}else if ("60".equals(orderPackageStatus)){
@ -1333,6 +1347,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
stockArticleEntity.setOrderReceiveStatus("10");
stockArticleEntity.setCompleteSet(1);
stockArticleEntity.setOrderStatus("0");
stockArticleEntity.setReservationStatus("10");
}else if (0 < incomingNum && incomingNum < totalNumber){
stockArticleEntity.setOrderReceiveStatus("20");
stockArticleEntity.setCompleteSet(1);
@ -1348,6 +1363,11 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
stockArticleEntity.setOrderStatus("70");
}
if(reservationNum == 0){
stockArticleEntity.setReservationStatus("10");
}else{
stockArticleEntity.setReservationStatus("20");
}
}else{
stockArticleEntity.setOrderReceiveStatus("30");
stockArticleEntity.setCompleteSet(2);
@ -1367,6 +1387,13 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
}
}
if(reservationNum == 0){
stockArticleEntity.setReservationStatus("10");
}else if(reservationNum > 0 && reservationNum < totalNumber){
stockArticleEntity.setReservationStatus("20");
}else{
stockArticleEntity.setReservationStatus("30");
}
}
stockArticleEntity.setIncomingNum(incomingNum);

6
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/feign/MtOrderMainClinet.java

@ -27,13 +27,15 @@ public class MtOrderMainClinet implements IMtOrderMainClinet {
@Override
@GetMapping(TOP)
public R sendOrderPackageScan(String orderPackageCode, String operationTime, String distributionContactId, String distributionContactCode, String destinationWarehouse) throws NoSuchAlgorithmException, JsonProcessingException {
return mtFactoryDataService.qianshouScanForNewSystem(orderPackageCode,operationTime,distributionContactId,destinationWarehouse);
// return mtFactoryDataService.qianshouScanForNewSystem(orderPackageCode,operationTime,distributionContactId,destinationWarehouse);
return null;
}
@Override
@PostMapping(SENDRECEIVEINFOBYNEWSYSTEM)
public R sendReceiveInfoByNewSystem(MtReceiveDTO mtReceiveDTO) throws NoSuchAlgorithmException, JsonProcessingException {
return mtFactoryDataService.sendReceiveInfoByNewSystem(mtReceiveDTO);
// return mtFactoryDataService.sendReceiveInfoByNewSystem(mtReceiveDTO);
return null;
}
}

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

@ -449,10 +449,10 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
distributionStockArticleEntity.setCreateDept(basicdataWarehouseEntity.getDepartment());
}
WayBillEntity wayBillEntity = wayBillClient.getByWayBillByAdvanceId(advanceEntity.getId());
WayBillEntity wayBillEntity = wayBillClient.getByWayBillByOrderCode(orderSelfNum);
if(null==wayBillEntity){
if(Objects.isNull(wayBillEntity)){
logger.error("包条同步失败 ----> 数据异常 包条对应的运单不存在 包件 {} 运单对象 {},",unitNo,wayBillEntity);
return ;

18
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OldWaybillClient.java

@ -13,7 +13,6 @@ import jodd.util.StringUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.OldSystemDataPushConfig;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
@ -23,6 +22,7 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@ApiIgnore()
@RestController
@ -48,10 +48,10 @@ public class OldWaybillClient implements IOldWaybillClient {
WayBillEntity byWaybillId = wayBillService.getByWaybillId(Integer.parseInt(waybillId));
if(byWaybillId==null){
return null;
while (Objects.isNull(byWaybillId)){
byWaybillId = wayBillService.getByWaybillId(Integer.parseInt(waybillId));
}
log.info(">>>>>>>>>>>>>>>>> 运单信息 {}", byWaybillId);
log.info(">>>>>>>>>>>>>>>>> 旧仓库ID 集合 {}", OldSystemDataPushConfig.getWarehourseIdList());
@ -59,17 +59,18 @@ public class OldWaybillClient implements IOldWaybillClient {
// 需要验证当前需要开启的数据推送仓库 null+""
if (!OldSystemDataPushConfig.getWarehourseIdList().contains(byWaybillId.getWarehouseId() + "")) {
log.info(">>> waybillDataHandler 当前开单仓库不是目前系统上线运行仓库 {}", byWaybillId.getWarehouseId());
return null;
return R.fail(405,"当前仓不处理");
}
String authCode = oldLogin(byWaybillId.getArriveSiteId() + "");
String url = oldSystemProperties.getUrl() + "openApi/newSystem.WaybillQuery/index?waybillId=" + waybillId;
log.info("#############waybillDataHandler: 请求地址为 url={}",url);
String body = HttpRequest.get(url).header("token", authCode).execute().body();
log.info(">>>>> waybillDataHandler 老系统返回结果 {} ",body);
JSONObject jsonObject = JSONObject.parseObject(body);
if (200 == Integer.parseInt(jsonObject.get("code").toString())) {
Integer code = jsonObject.getInteger("code");
if (200 == code) {
// 请求成功
JSONArray jsonArray = jsonObject.getJSONArray("data");
// 循环结果
@ -85,12 +86,9 @@ public class OldWaybillClient implements IOldWaybillClient {
String operationTime = DateUtil.format(new Date(), "yyyy-MM-dd hh:mm:ss");
oldSystemWaybillClient.handleDataToPlatform(unitNo, operationTime);
}
}
} else {
log.error("##################waybillDataHandler: 请求老系统接口 失败,url:{},waybillId:{}", url, waybillId);
// 请求失败
}
} catch (Exception e) {
log.error(">>>> 运单信息查询解析报错 ", e);

5
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/WayBillClient.java

@ -61,4 +61,9 @@ public class WayBillClient implements IWayBillClient {
public List<Integer> findAdvanceIdsByWaybillNo(String waybillNo) {
return wayBillService.findAdvanceIdsByWaybillNo(waybillNo);
}
@Override
public WayBillEntity getByWayBillByOrderCode(String orderCode) {
return wayBillService.getByWayBillByOrderCode(orderCode);
}
}

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/WayBillMapper.java

@ -12,4 +12,6 @@ public interface WayBillMapper extends BaseMapper<WayBillEntity> {
WayBillEntity getByWayBillByAdvanceId(@Param("advId") Integer advId);
List<Integer> findAdvanceIdsByWaybillNo(@Param("waybillNo") String waybillNo);
WayBillEntity getByWayBillByOrderCode(@Param("orderCode") String orderCode);
}

12
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/WayBillMapper.xml

@ -15,4 +15,16 @@ select ht_way_bill.* FROM ht_way_bill LEFT JOIN ht_advance on ht_advance.waybi
and waybill_no = #{waybillNo}
</select>
<select id="getByWayBillByOrderCode" resultType="com.logpm.oldproject.entity.WayBillEntity">
SELECT
ht_way_bill.*
FROM
ht_way_bill
LEFT JOIN ht_advance ON ht_advance.waybill_no = ht_way_bill.waybill_no
WHERE
ht_advance.orderSelfNum = #{orderCode}
and ht_way_bill.`status` !=-1
limit 1
</select>
</mapper>

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IWayBillService.java

@ -18,4 +18,6 @@ public interface IWayBillService {
List<Integer> findAdvanceIdsByWaybillNo(String waybillNo);
WayBillEntity getByWayBillByOrderCode(String orderCode);
}

5
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/WayBillServiceImpl.java

@ -42,4 +42,9 @@ public class WayBillServiceImpl implements IWayBillService {
public List<Integer> findAdvanceIdsByWaybillNo(String waybillNo) {
return wayBillMapper.findAdvanceIdsByWaybillNo(waybillNo);
}
@Override
public WayBillEntity getByWayBillByOrderCode(String orderCode) {
return wayBillMapper.getByWayBillByOrderCode(orderCode);
}
}

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

@ -1267,7 +1267,11 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
total = total + entity.getTotal();
}
WayBillEntity wayBillEntity = wayBillClient.getByWayBillByAdvanceId(advanceId);
WayBillEntity wayBillEntity = wayBillClient.getByWayBillByOrderCode(orderCode);
if(Objects.isNull(wayBillEntity)){
log.warn("#################saveOrderInfo: 运单信息为空 orderCode={}",orderCode);
throw new CustomerException(403,"运单信息为空");
}
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(newWarehouseId);
if(Objects.isNull(basicdataWarehouseEntity)){

76
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java

@ -682,6 +682,82 @@ public class CarsLoadApiController {
}
@ResponseBody
@PostMapping("/unloadTrayAllOne")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "卸分一体", notes = "传入loadCarsDTO")
public R unloadTrayAllOne(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############unloadTrayAllOne: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
String trayCode = loadCarsDTO.getTrayCode();
String trayType = loadCarsDTO.getTrayType();
Integer isZero = loadCarsDTO.getIsZero();
String orderPackageCode = loadCarsDTO.getOrderPackageCode();
String orderCode = loadCarsDTO.getOrderCode();
String waybillNo = loadCarsDTO.getWaybillNo();
Integer enterNum = loadCarsDTO.getEnterNum();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载计划id为空 loadId={}",loadId);
return R.fail(405,"配载计划id为空");
}
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码为空 trayCode={}",trayCode);
return R.fail(405,"托盘码为空");
}
if(StringUtil.isBlank(trayType)){
log.warn(method+"打托方式不能为空 trayType={}",trayType);
return R.fail(405,"打托方式不能为空");
}
if(Objects.isNull(isZero)){
log.warn(method+"是否是零担为空 isZero={}",isZero);
return R.fail(405,"是否是零担为空");
}
if(0 == isZero){
if(StringUtil.isBlank(orderPackageCode)){
log.warn(method+"包件码为空 orderPackageCode={}",orderPackageCode);
return R.fail(405,"包件码为空");
}
}else{
if(StringUtil.isBlank(orderCode)){
log.warn(method+"订单号为空 orderCode={}",orderCode);
return R.fail(405,"订单号为空");
}
if(StringUtil.isBlank(waybillNo)){
log.warn(method+"订单号为空 waybillNo={}",waybillNo);
return R.fail(405,"订单号为空");
}
if(enterNum == 0){
log.warn(method+"数量不正确 enterNum={}",enterNum);
return R.fail(405,"数量不正确");
}
}
return carsLoadService.unloadTrayAllOne(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
}

195
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -10,6 +10,7 @@ import com.logpm.trunkline.dto.TrunklineCarsLoadLineDTO;
import com.logpm.trunkline.dto.TrunklineCarsOrderDTO;
import com.logpm.trunkline.service.ITrunklineCarsLoadService;
import com.logpm.trunkline.vo.TrunklineCarsLoadVO;
import com.logpm.trunkline.vo.ZeroSuppleVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
@ -1277,4 +1278,198 @@ public class CarsLoadController {
}
}
@ResponseBody
@PostMapping("/addZeroSupple")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "添加零担补录", notes = "传入loadCarsDTO")
public R addZeroSupple(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############addZeroSupple: ";
log.info(method+"请求参数{}",loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();//配载id
List<ZeroSuppleVO> zeroSuppleList = loadCarsDTO.getZeroSuppleList();//零担补录数据
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载id为空 loadId={}",loadId);
return R.fail(405,"配载id为空");
}
for (ZeroSuppleVO zeroSuppleVO : zeroSuppleList) {
String waybillNo = zeroSuppleVO.getWaybillNo();
String orderCode = zeroSuppleVO.getOrderCode();
Integer enterNum = zeroSuppleVO.getEnterNum();
Long finalNodeId = zeroSuppleVO.getFinalNodeId();
if(StringUtil.isBlank(waybillNo)){
log.warn(method+"运单号为空 waybillNo={}",waybillNo);
return R.fail(405,"运单号为空");
}
if(StringUtil.isBlank(orderCode)){
log.warn(method+"订单号为空 orderCode={}",orderCode);
return R.fail(405,"订单号为空");
}
if(Objects.isNull(enterNum) || enterNum == 0){
log.warn(method+"补录件数为空 enterNum={}",enterNum);
return R.fail(405,"补录件数为空");
}
if(Objects.isNull(finalNodeId) ){
log.warn(method+"目的仓id为空 finalNodeId={}",finalNodeId);
return R.fail(405,"目的仓id为空");
}
}
return carsLoadService.addZeroSupple(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/updateZeroSuppleNum")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "更新零担补录的数量", notes = "传入loadCarsDTO")
public R updateZeroSuppleNum(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############updateZeroSuppleNum: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long carsLoadScanId = loadCarsDTO.getCarsLoadScanId();
Integer enterNum = loadCarsDTO.getEnterNum();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(carsLoadScanId)){
log.warn(method+"装车id为空 carsLoadScanId={}",carsLoadScanId);
return R.fail(405,"装车id为空");
}
if(Objects.isNull(enterNum)){
log.warn(method+"装车数量为空 enterNum={}",enterNum);
return R.fail(405,"装车数量为空");
}
if(enterNum == 0){
//直接删除
return carsLoadService.deleteZeroSuppleById(carsLoadScanId,myCurrentWarehouse.getId());
}else{
return carsLoadService.updateZeroSuppleNum(loadCarsDTO);
}
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/deleteZeroSuppleById")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "通过id删除零担补录", notes = "传入loadCarsDTO")
public R deleteZeroSuppleById(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############deleteZeroSuppleById: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long carsLoadScanId = loadCarsDTO.getCarsLoadScanId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(carsLoadScanId)){
log.warn(method+"装车id为空 carsLoadScanId={}",carsLoadScanId);
return R.fail(405,"装车id为空");
}
return carsLoadService.deleteZeroSuppleById(carsLoadScanId,myCurrentWarehouse.getId());
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/findNextNodeList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询当前节点以后的节点id", notes = "传入loadCarsDTO")
public R findNextNodeList(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############findNextNodeList: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载id为空 loadId={}",loadId);
return R.fail(405,"配载id为空");
}
return carsLoadService.findNextNodeList(loadId,myCurrentWarehouse.getId());
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
}

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

@ -363,7 +363,7 @@
left join logpm_warehouse_waybill lww on lww.waybill_no = ldsa.waybill_number
where ldsa.is_zero = 1
and ldsa.warehouse_id = #{param.warehouseId}
<if test="param.orderCodes != null and param.orderCodes.length > 0">
<if test="param.orderCodes != null and param.orderCodes.size() > 0">
and ldsa.order_code in
<foreach collection="param.orderCodes" item="item" open="(" separator="," close=")">
#{item}
@ -377,11 +377,22 @@
ltcls.order_code orderCode,
ltcls.waybill_no waybillNo,
lww.create_time createTime,
lww.destination destination,
lww.destination_warehouse_name destinationWarehouseName,
lww.shipper shipper,
lww.consignee consignee,
lww.consignee_name consigneeName,
lww.goods_name goodsName,
ltcls.num loadingNum,
IFNULL(lww.total_freight/lww.total_count,0) price,
lww.remark remark,
IFNULL(lww.total_freight/lww.total_count,0)*ltcls.num freight
from logpm_trunkline_cars_load_scan ltcls
left join logpm_warehouse_waybill lww on lww.waybill_no = ltcls.waybill_no
where ltcls.is_supple = 1
and ltcls.type = 2
and ltcls.load_id = #{param.load_id}
and ltcls.warehouse_id = #{param.warehouseId}
</select>
</mapper>

11
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java

@ -118,4 +118,15 @@ public interface ITrunklineCarsLoadService extends BaseService<TrunklineCarsLoad
R zeroSuppleList(LoadCarsDTO loadCarsDTO);
R useZeroList(LoadCarsDTO loadCarsDTO);
R addZeroSupple(LoadCarsDTO loadCarsDTO);
R deleteZeroSuppleById(Long carsLoadScanId,Long warehouseId);
R updateZeroSuppleNum(LoadCarsDTO loadCarsDTO);
R findNextNodeList(Long loadId, Long warehouseId);
R unloadTrayAllOne(LoadCarsDTO loadCarsDTO);
}

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

@ -1981,6 +1981,208 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.data(pageList);
}
@Override
public R addZeroSupple(LoadCarsDTO loadCarsDTO) {
Long loadId = loadCarsDTO.getLoadId();
Long warehouseId = loadCarsDTO.getWarehouseId();
List<ZeroSuppleVO> zeroSuppleList = loadCarsDTO.getZeroSuppleList();
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
if(Objects.isNull(carsLoadEntity)){
log.warn("##########addZeroSupple: 配载计划信息不存在 loadId={}",loadId);
return R.fail(405,"配载计划信息不存在");
}
TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId);
if(Objects.isNull(carsLoadLineEntity)){
log.warn("##########addZeroSupple: 配载计划节点信息不存在 loadId={} warehouseId={}",loadId,warehouseId);
return R.fail(405,"配载计划节点信息不存在");
}
for (ZeroSuppleVO zeroSuppleVO : zeroSuppleList) {
String waybillNo = zeroSuppleVO.getWaybillNo();
String orderCode = zeroSuppleVO.getOrderCode();
Integer enterNum = zeroSuppleVO.getEnterNum();
Long finalNodeId = zeroSuppleVO.getFinalNodeId();
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(Objects.isNull(warehouseWaybillEntity)){
log.warn("##########addZeroSupple: 运单信息不存在 loadId={} waybillNo={}",loadId,waybillNo);
return R.fail(405,"运单信息不存在");
}
DistributionStockArticleEntity zeroStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(Objects.isNull(zeroStockArticleEntity)){
log.warn("##########addZeroSupple: 订单信息不存在 loadId={} orderCode={}",loadId,orderCode);
return R.fail(405,"订单信息不存在");
}
TrunklineCarsLoadScanEntity carsLoadScanEntity = new TrunklineCarsLoadScanEntity();
carsLoadScanEntity.setLoadId(loadId);
carsLoadScanEntity.setLoadCode(carsLoadEntity.getCarsNo());
carsLoadScanEntity.setWarehouseId(carsLoadLineEntity.getNodeId());
carsLoadScanEntity.setWarehouseName(carsLoadLineEntity.getNodeName());
carsLoadScanEntity.setWaybillId(warehouseWaybillEntity.getId());
carsLoadScanEntity.setWaybillNo(waybillNo);
carsLoadScanEntity.setOrderCode(orderCode);
carsLoadScanEntity.setScanCode(warehouseWaybillEntity.getGoodsName());
carsLoadScanEntity.setScanStatus("1");
carsLoadScanEntity.setNum(enterNum);
carsLoadScanEntity.setType(2);
carsLoadScanEntity.setIsData(1);
carsLoadScanEntity.setLoadingAbnormal(1);
carsLoadScanEntity.setFromWarehouseId(warehouseId);
carsLoadScanEntity.setUnloadNum(0);
carsLoadScanEntity.setFinalNodeId(finalNodeId);
carsLoadScanEntity.setRemark("零担补录异常装车");
carsLoadScanEntity.setUnloadCheck(0);
carsLoadScanEntity.setIsSupple(1);
trunklineCarsLoadScanService.save(carsLoadScanEntity);
zeroStockArticleEntity.setHandQuantity(zeroStockArticleEntity.getHandQuantity() - enterNum);
distributionStockArticleClient.saveOrUpdate(zeroStockArticleEntity);
}
return R.success("添加成功");
}
@Override
public R deleteZeroSuppleById(Long carsLoadScanId,Long warehouseId) {
TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanService.getById(carsLoadScanId);
if(Objects.isNull(carsLoadScanEntity)){
log.warn("##########deleteZeroSuppleById: 零担补录装车信息不存在 carsLoadScanId={}",carsLoadScanId);
return R.fail(405,"零担补录装车信息不存在");
}
String orderCode = carsLoadScanEntity.getOrderCode();
Integer num = carsLoadScanEntity.getNum();
Integer unloadNum = carsLoadScanEntity.getUnloadNum();
if(unloadNum != 0){
log.warn("##########deleteZeroSuppleById: 零担补录已卸车不能删除 carsLoadScanId={}",carsLoadScanId);
return R.fail(405,"零担补录已卸车不能删除");
}
trunklineCarsLoadScanService.removeById(carsLoadScanId);
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(Objects.isNull(stockArticleEntity)){
log.warn("##########deleteZeroSuppleById: 零担订单信息不存在 orderCode={} warehouseId={}",orderCode,warehouseId);
return R.fail(405,"零担订单信息不存在");
}
stockArticleEntity.setHandQuantity(stockArticleEntity.getHandQuantity() + num);
distributionStockArticleClient.saveOrUpdate(stockArticleEntity);
return R.success("删除成功");
}
@Override
public R updateZeroSuppleNum(LoadCarsDTO loadCarsDTO) {
Long carsLoadScanId = loadCarsDTO.getCarsLoadScanId();
Long warehouseId = loadCarsDTO.getWarehouseId();
Integer enterNum = loadCarsDTO.getEnterNum();
TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanService.getById(carsLoadScanId);
if(Objects.isNull(carsLoadScanEntity)){
log.warn("##########deleteZeroSuppleById: 零担补录装车信息不存在 carsLoadScanId={}",carsLoadScanId);
return R.fail(405,"零担补录装车信息不存在");
}
String orderCode = carsLoadScanEntity.getOrderCode();
Integer num = carsLoadScanEntity.getNum();
Integer unloadNum = carsLoadScanEntity.getUnloadNum();
if(enterNum < unloadNum){
log.warn("##########deleteZeroSuppleById: 零担补录数量不能小于卸车数量 carsLoadScanId={} enterNum={}",carsLoadScanId,enterNum);
return R.fail(405,"零担补录数量不能小于卸车数量");
}
int diffeuct = num - enterNum;
carsLoadScanEntity.setNum(enterNum);
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(Objects.isNull(stockArticleEntity)){
log.warn("##########deleteZeroSuppleById: 零担订单信息不存在 orderCode={} warehouseId={}",orderCode,warehouseId);
return R.fail(405,"零担订单信息不存在");
}
stockArticleEntity.setHandQuantity(stockArticleEntity.getHandQuantity() + diffeuct);
distributionStockArticleClient.saveOrUpdate(stockArticleEntity);
return R.success("修改成功");
}
@Override
public R findNextNodeList(Long loadId, Long warehouseId) {
TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId);
if(Objects.isNull(carsLoadLineEntity)){
log.warn("##########findNextNodeList: 当前节点信息不存在 loadId={} warehouseId={}",loadId,warehouseId);
return R.fail(405,"当前节点信息不存在");
}
Integer sort = carsLoadLineEntity.getSort();
List<TrunklineCarsLoadLineEntity> listMoreSortByLoadId = trunklineCarsLoadLineService.findListMoreSortByLoadId(loadId, sort);
List<JSONObject> ls = new ArrayList<>();
for (TrunklineCarsLoadLineEntity trunklineCarsLoadLineEntity : listMoreSortByLoadId) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("warehouseId",trunklineCarsLoadLineEntity.getNodeId());
jsonObject.put("warehouseName",trunklineCarsLoadLineEntity.getNodeName());
ls.add(jsonObject);
}
return R.data(ls);
}
@Override
public R unloadTrayAllOne(LoadCarsDTO loadCarsDTO) {
Long loadId = loadCarsDTO.getLoadId();
String trayCode = loadCarsDTO.getTrayCode();
String trayType = loadCarsDTO.getTrayType();
Integer isZero = loadCarsDTO.getIsZero();
String orderPackageCode = loadCarsDTO.getOrderPackageCode();
String orderCode = loadCarsDTO.getOrderCode();
String waybillNo = loadCarsDTO.getWaybillNo();
Integer enterNum = loadCarsDTO.getEnterNum();
Long warehouseId = loadCarsDTO.getWarehouseId();
if(0 == isZero){
unloadPackage(loadId,orderPackageCode,warehouseId,1,"卸分一体 卸车");
Map<String,Object> map = new HashMap<>();
map.put("trayType",trayType);
map.put("trayCode",trayCode);
map.put("warehouseId",warehouseId);
map.put("orderPackageCode",orderPackageCode);
boolean b = trayTypeClient.orderScanOrderPackageCode(map);
if(!b){
log.warn("##########findNextNodeList: 打托失败 trayCode={} orderPackageCode={}",trayCode,orderPackageCode);
return R.fail(405,"打托失败");
}
}else{
unloadZero(loadId,waybillNo,enterNum,warehouseId,1,null,orderCode,"卸分一体 卸车");
Map<String,Object> map = new HashMap<>();
map.put("trayType",trayType);
map.put("trayCode",trayCode);
map.put("warehouseId",warehouseId);
map.put("orderCode",orderCode);
map.put("num",enterNum);
boolean b = trayTypeClient.enterZeroOrderByTrayCode(map);
if(!b){
log.warn("##########findNextNodeList: 打托失败 trayCode={} orderCode={}",trayCode,orderCode);
return R.fail(405,"打托失败");
}
}
return R.success("打托成功");
}
@Override
public R loadingTrayInfo(LoadCarsDTO loadCarsDTO) {
log.info("##############loadingTrayInfo: 查询托盘的货物信息");

28
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java

@ -1021,4 +1021,32 @@ public class WarehouseUpdownTypeApiController {
}
}
@ResponseBody
@PostMapping("/findAllAllocationId")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询所有库位集合", notes = "传入trayTypeDTO")
public R findAllAllocationId(@RequestBody UpdownTypeDTO updownTypeDTO) {
String method = "###########findAllAllocationId: ";
log.info(method + "移库库位 updownTypeDTO={}", updownTypeDTO);
try{
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息不能为空");
return R.fail(403,"仓库信息不能为空");
}
//查询该库位的货物信息
return warehouseUpdownTypeService.findAllAllocationId(myCurrentWarehouse.getId());
}catch (CustomerException e){
log.warn(e.message);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常,联系管理员",e);
return R.fail(500,"系统异常,联系管理员");
}
}
}

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java

@ -74,4 +74,6 @@ public interface IWarehouseUpdownTypeService extends BaseService<WarehouseUpdown
R findAllGoodsByAllocationId(Long allocationId, Long warehouseId);
List<JSONObject> findZeroAllocation(String orderCode, Long warehouseId);
R findAllAllocationId(Long warehouseId);
}

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

@ -100,6 +100,14 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
return objects;
}
@Override
public R findAllAllocationId(Long warehouseId) {
List<Long> allocationIds = basicdataGoodsAllocationClient.findAllAllocationIdByWarehouseId(warehouseId);
return R.data(allocationIds);
}
private void packageChangeStockByAllocaton(WarehouseUpdownGoodsEntity one) {

Loading…
Cancel
Save