Browse Source

1.干线模块装车,卸车提交

2.
newStockUp
zhenghaoyu 1 year ago
parent
commit
c75b24de99
  1. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java
  2. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java
  3. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java
  4. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java
  5. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  6. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
  7. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  8. 43
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java
  9. 34
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  10. 31
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java
  11. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  12. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml
  13. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
  14. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml
  15. 69
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  16. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java

@ -127,4 +127,7 @@ public interface IDistributionStockListClient {
@GetMapping(API_PREFIX+"/getEntityByMarketNameAndMaterialCodeAndIncomingBatch")
DistributionStockListEntity getEntityByMarketNameAndMaterialCodeAndIncomingBatch(@RequestParam("marketName") String marketName, @RequestParam("materialCode") String materialCode, @RequestParam("incomingBatch") String incomingBatch, @RequestParam("warehouseId") Long warehouseId);
@GetMapping(API_PREFIX+"/updeteSourceTypeById")
void updeteSourceTypeById(@RequestParam String sourceType, @RequestParam Long stockListId);
}

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

@ -9,6 +9,7 @@ public class UnloadPackageVO implements Serializable {
private String orderPackageCode;
private Integer num;
private Integer unloadNum;
private String trayName;
private String trayCode;
private String scanStatus;

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java

@ -195,4 +195,9 @@ public class DistributionStockListClient implements IDistributionStockListClient
return distributionStockListService.getOne(queryWrapper);
}
@Override
public void updeteSourceTypeById(String sourceType, Long stockListId) {
distributionStockListService.updeteSourceTypeById(sourceType,stockListId);
}
}

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java

@ -21,7 +21,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.excel.DistributionStockListExcel;
import com.logpm.distribution.vo.DistributionStockListAllocationVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.DistributionStockupStockListInfoVO;
@ -118,4 +117,6 @@ public interface DistributionStockListMapper extends BaseMapper<DistributionStoc
* @param loadedNub
*/
int deductionQuantityStock(@Param("stockListId") Long inventoryId,@Param("decreaseNum") Integer loadedNub);
void updeteSourceTypeById(@Param("sourceType") String sourceType, @Param("stockListId") Long stockListId);
}

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml

@ -506,4 +506,10 @@
LEFT JOIN logpm_distribution_stock_list ldsl ON ldsl.incoming_batch = t.order_code and ldsl.cargo_number=t.material_code
</select>
<update id="updeteSourceTypeById" >
update logpm_distribution_stock_list
set source_type = #{sourceType}
where id = #{stockListId}
</update>
</mapper>

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java

@ -16,7 +16,6 @@
*/
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.entity.DistributionStockListEntity;
@ -175,6 +174,8 @@ public interface IDistributionStockListService extends BaseService<DistributionS
*/
OrderPackgeCodeDataVO showInventorySourcePackageCode(String incomingBatch, Long packageIds) throws Exception;
void updeteSourceTypeById(String sourceType, Long stockListId);
// /**
// * 查询库存品详情

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -17,7 +17,6 @@
package com.logpm.distribution.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@ -26,7 +25,6 @@ import com.logpm.basic.entity.BasicMaterialEntity;
import com.logpm.basic.entity.BasicPrintTemplateEntity;
import com.logpm.basic.feign.IBasicMaterialClient;
import com.logpm.basic.feign.IBasicPrintTemplateClient;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.entity.BasicdataClientUserEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataClientClient;
@ -47,12 +45,10 @@ import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.utils.QRCodeUtil;
import org.springblade.common.utils.TemplateUtil;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.secure.utils.AuthUtil;
@ -62,7 +58,6 @@ import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.cache.DictCache;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -626,6 +621,11 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
orderPackgeCodeDataVO.setDataList(data);
return orderPackgeCodeDataVO;
}
@Override
public void updeteSourceTypeById(String sourceType, Long stockListId) {
baseMapper.updeteSourceTypeById(sourceType,stockListId);
}
}
// @Override

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

@ -128,24 +128,21 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
// continue;
// }
//查询订单是否在盘点任务中有被盘点到
// InventoryDetailEntity inventoryDetailEntity = inventoryDetailClient.findOrderIsExist(orderCode,inventoryId);
// if(!Objects.isNull(inventoryDetailEntity)){
try{
//定单
saveOrderInfoAndInventoryId(orderCode,oldWarehouseId,newWarehouseId,inventoryId);
InventoryDetailEntity inventoryDetailEntity = inventoryDetailClient.findOrderIsExist(orderCode,inventoryId);
if(!Objects.isNull(inventoryDetailEntity)){
try{
//定单
saveOrderInfoAndInventoryId(orderCode,oldWarehouseId,newWarehouseId,inventoryId);
//存入打托信息
// saveTrayTypeInfoPackage(orderCode,oldWarehouseId,newWarehouseId);
saveTrayTypeInfoPackageNew(orderCode,oldWarehouseId,newWarehouseId,inventoryId);
saveTrayTypeInfoPackageNew(orderCode,oldWarehouseId,newWarehouseId,inventoryId);
}catch (CustomerException e){
log.error("同步订单"+orderCode+"失败: "+e.message,e);
}catch (Exception e){
log.error("同步订单"+orderCode+"失败",e);
}
}catch (CustomerException e){
log.error("同步订单"+orderCode+"失败: "+e.message,e);
}catch (Exception e){
log.error("同步订单"+orderCode+"失败",e);
}
// }
}
}
@ -1105,6 +1102,8 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
}
}else{
id = distributionStockArticleEntity.getId();
distributionStockArticleEntity.setTotalNumber(total);
distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity);
}
//保存包件信息
@ -1122,13 +1121,13 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
String unitNo = orderDetailEntity.getUnitNo();
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCode(unitNo);
if(!Objects.isNull(parcelListEntity)){
log.info("###########saveOrderPackageAndInventoryId: 包条已存在,不同步 unitNo={}",unitNo);
log.info("###########saveOrderPackage: 包条已存在,不同步 unitNo={}",unitNo);
continue;
}
InventoryDetailEntity inventoryDetailEntity = inventoryDetailClient.findUnitNoIsExist(unitNo,inventoryId);
if(Objects.isNull(inventoryDetailEntity)){
log.info("###########saveOrderPackageAndInventoryId: 包条不在盘点任务中存在,不同步 unitNo={}",unitNo);
log.info("###########saveOrderPackage: 包条不在盘点任务中存在,不同步 unitNo={}",unitNo);
continue;
}
@ -1144,6 +1143,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
DistributionParcelListEntity entity = new DistributionParcelListEntity();
BeanUtil.copyProperties(vo, entity);
entity.setQuantity(1);
entity.setOrderPackageCode(vo.getPacketBarCode());
entity.setConditions(1);
entity.setWarehouse(distributionStockArticleEntity.getWarehouse());
@ -1157,9 +1157,9 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
// if(3==carsType||4 == carsType){
// entity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue());
// }
if(2 == signState){
entity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
}
// if(2 == signState){
// entity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
// }
entity.setOrderPackageFreezeStatus(OrderPackageFreezeStatusConstant.weidongjie.getValue());
entity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
entity.setOrderPackageGroundingStatus(OrderPackageGroundingStatusConstant.daishangjia.getValue());
@ -1201,9 +1201,9 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
}
boolean b = distributionParcelListClient.add(entity);
if (!b) {
log.warn("#################saveOrderPackageAndInventoryId: 保存包件信息失败 orderCode={}", entity.getOrderCode());
log.warn("#################handleDataToPlatform: 保存包件信息失败 orderCode={}", entity.getOrderCode());
}else{
log.info("################saveOrderPackageAndInventoryId: 保存包件成功 OrderPackageCode={}",vo.getPacketBarCode());
log.info("################handleDataToPlatform: 保存包件成功 OrderPackageCode={}",vo.getPacketBarCode());
Integer handQuantity = distributionStockArticleEntity.getHandQuantity();
Integer totalNumber = distributionStockArticleEntity.getTotalNumber();
@ -1216,6 +1216,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue());
distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue());
}
distributionStockArticleEntity.setHandQuantity(handQuantity + 1);
distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity);
}

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

@ -1053,4 +1053,38 @@ public class CarsLoadController {
}
@ResponseBody
@PostMapping("/loadingDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "三方中转装车明细", notes = "传入loadCarsDTO")
public R loadingDetail(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############loadingDetail: ";
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(400,"三方中转id为空");
}
return carsLoadService.loadingDetail(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,"系统异常");
}
}
}

31
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java

@ -346,38 +346,7 @@ public class TripartiteTransferController {
}
@ResponseBody
@PostMapping("/loadingDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "三方中转装车明细", notes = "传入loadCarsDTO")
public R loadingDetail(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############loadingDetail: ";
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(400,"三方中转id为空");
}
return carsLoadService.loadingDetail(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,"系统异常");
}
}

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -144,12 +144,13 @@
<select id="findUnloadPackageList" resultType="com.logpm.trunkline.vo.UnloadPackageVO">
select scan_code orderPackageCode,
num num,
unload_num unloadNum,
tray_code trayCode,
tray_name trayName,
scan_status scanStatus
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
and warehouse_id = #{warehouseId}
and final_node_id = #{warehouseId}
and waybill_no = #{waybillNo}
and order_code = #{orderCode}
</select>

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineBillladingLogMapper">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineCarsLoadingLogMapper">
</mapper>

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml

@ -53,10 +53,9 @@
ltco.order_code orderCode,
ltco.plan_num planNum,
sum(ltcls.num) loadingNum,
sum(ltcus.num) unloadingNum
sum(ltcls.unload_num) unloadingNum
from logpm_trunkline_cars_order ltco
left join logpm_trunkline_cars_load_scan ltcls on ltcls.waybill_no = ltco.waybill_no
left join logpm_trunkline_cars_unload_scan ltcus on ltcus.waybill_no = ltco.waybill_no
left join logpm_trunkline_cars_load_scan ltcls on ltcls.waybill_no = ltco.waybill_no and ltco.order_code = ltcls.order_code and ltco.load_id = ltcls.load_id
where ltco.load_id = #{loadId}
and ltco.node_id = #{nodeId}
and ltco.type = 2
@ -71,7 +70,7 @@
real_num loadingNum,
unload_num unloadNum
from logpm_trunkline_cars_order
where is_deleted = 0,
where is_deleted = 0
and load_id = #{loadId}
and final_node_id = #{warehouseId}
and `type` = 2

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml

@ -39,8 +39,4 @@
and waybill_no = #{waybillNo}
</select>
<resultMap id="unloadOrderMap" type="com.logpm.trunkline.vo.UnloadScanOrderVO">
<result
</resultMap>
</mapper>

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

@ -1,6 +1,5 @@
package com.logpm.trunkline.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -14,8 +13,12 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.feign.IDistributionParcelListClient;
import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.trunkline.bean.Resp;
import com.logpm.trunkline.dto.*;
import com.logpm.trunkline.entity.*;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper;
import com.logpm.trunkline.service.*;
import com.logpm.trunkline.vo.*;
@ -1487,6 +1490,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
}else{
String orderPackageStatus = parcelListEntity.getOrderPackageStatus();
if("60".equals(orderPackageStatus) || "70".equals(orderPackageStatus)){
log.warn("##################loadingScan: 包件已出库 orderPackageStatus={}",orderPackageStatus);
return R.fail(405,"包件已出库");
}
//有包件所以是有数据的包件扫描
carsLoadScanEntity.setIsData(1);
//补全数据信息
@ -1539,8 +1549,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
distributionParcelListClient.updateOrderPackageCodeById(packageId,"60");
distributionStockArticleClient.submitHandleNumByOrderId(1,articleId);
updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId);
if (StringUtil.isBlank(trayCode)){
updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId);
}
}
trunklineCarsLoadScanService.save(carsLoadScanEntity);
loadScanId = carsLoadScanEntity.getId();
@ -1666,6 +1677,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setTrayName(trayName);
carsLoadScanEntity.setTrayCode(trayCode);
carsLoadScanEntity.setRemark(remark);
carsLoadScanEntity.setFromWarehouseId(warehouseId);
carsLoadScanEntity.setFinalNodeId(carsOrderEntity.getFinalNodeId());
trunklineCarsLoadScanService.save(carsLoadScanEntity);
loadScanId = carsLoadScanEntity.getId();
difficult = enterNum;
@ -1828,17 +1841,23 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
if("1".equals(associationType)){
String orderCode = jsonObject.getString("associationValue");
JSONArray plDetail = new JSONArray();
List<DistributionParcelListEntity> plList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
for (DistributionParcelListEntity parcelListEntity : plList) {
Integer quantity = parcelListEntity.getQuantity();
String firsts = parcelListEntity.getFirsts();
JSONObject detail = new JSONObject();
detail.put("productName",firsts);
detail.put("stockNum",quantity);
plDetail.add(detail);
// JSONArray plDetail = new JSONArray();
// List<DistributionParcelListEntity> plList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
// for (DistributionParcelListEntity parcelListEntity : plList) {
// Integer quantity = parcelListEntity.getQuantity();
// String firsts = parcelListEntity.getFirsts();
// JSONObject detail = new JSONObject();
// detail.put("productName",firsts);
// detail.put("stockNum",quantity);
// plDetail.add(detail);
// }
// jsonObject.put("details",plDetail);
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(!Objects.isNull(stockArticleEntity)){
jsonObject.put("waybillNo",stockArticleEntity.getWaybillNumber());
}else{
jsonObject.put("waybillNo","");
}
jsonObject.put("details",plDetail);
zeroList.add(jsonObject);
}
if("3".equals(associationType)){
@ -1878,6 +1897,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405,"节点不是到车状态");
}
Integer pacakagNum = 0;
Integer zeroNum = 0;
for (LoadingPackageDTO loadingPackageDTO : packageList) {
String orderPackageCode = loadingPackageDTO.getOrderPackageCode();
loadingScan(loadId,warehouseId,orderPackageCode,trayCode);
@ -1893,7 +1914,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//下架托盘
updownTypeClient.downTray(trayCode,warehouseId);
return R.success("整托装车成功");
return Resp.scanSuccess("整托装车成功","装车成功包件"+pacakagNum+"件,零担"+zeroNum+"件");
}
@Override
@ -1986,16 +2007,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Integer type = carsLoadScanEntity.getType();
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
if(isData == 1){
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
if(Objects.isNull(stockArticleEntity)){
log.warn("##################removeCarsLoadScan: 订单信息不存在 fromWarehouseId={} orderCode={}",fromWarehouseId,orderCode);
return R.fail(405,"订单信息不存在");
}
stockArticleEntity.setHandQuantity(stockArticleEntity.getHandQuantity() + num);
distributionStockArticleClient.saveOrUpdate(stockArticleEntity);
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
if(Objects.isNull(stockArticleEntity)){
log.warn("##################removeCarsLoadScan: 订单信息不存在 fromWarehouseId={} orderCode={}",fromWarehouseId,orderCode);
return R.fail(405,"订单信息不存在");
}
Long articleId = stockArticleEntity.getId();
distributionStockArticleClient.submitHandleNumByOrderId(-num,articleId);
if(isData == 1){
if(type == 1){
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(scanCode, fromWarehouseId);
if(Objects.isNull(parcelListEntity)){
@ -2267,6 +2287,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId);
}
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId,warehouseName,loadId,loadCode,waybillId,waybillNo,orderCode,orderPackageCode,1,
1,1,isAbnormal,trayId,trayCode,trayName,fromWarehouseId,loadScanId,remark);

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

@ -2213,6 +2213,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
.eq("incoming_batch",incomingBatch);
WarehouseUpdownGoodsEntity updownGoodsEntity = warehouseUpdownGoodsService.getOne(queryWrapper);
DistributionStockListEntity stockListEntity = distributionStockListClient.getEntityByMarketIdAndMaterialCodeAndIncomingBatch(marketId, materialCode,incomingBatch,warehouseId);
String sourceType = stockListEntity.getSourceType();
if("1".equals(sourceType)){
Long stockListId = stockListEntity.getId();
distributionStockListClient.updeteSourceTypeById("2",stockListId);
}
//查询原库存数量
Integer totalNum = 0 ;
List<PositionVO> updownGoodsByStock = warehouseUpdownGoodsService.getUpdownGoodsByStock(marketId, materialCode, incomingBatch,warehouseId);

Loading…
Cancel
Save