Browse Source

rp:修改梦天数据推送没有推送多个车次的问题

dev-warehouse
pref_mail@163.com 2 years ago
parent
commit
20d69a86d3
  1. 5
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceDetailClient.java
  2. 3
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryOrderMainServiceImpl.java
  3. 83
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java
  4. 188
      blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java
  5. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceDetailClient.java
  6. 4
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.java
  7. 70
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.xml
  8. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceDetailService.java
  9. 4
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceDetailServiceImpl.java
  10. 12
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

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

@ -81,10 +81,11 @@ public interface IAdvanceDetailClient {
/** /**
* 根据卸车车次 查询老系统中 这个车次中装的包间明细 * 根据卸车车次 查询老系统中 这个车次中装的包间
* @param unloadCarNum * @param unloadCarNum
* @return * @return
*/ */
@GetMapping(API_PREFIX + "/getByCarNum") @GetMapping(API_PREFIX + "/getByCarNum")
List<AdvanceDetailEntity> getByCarNum(@RequestParam String unloadCarNum); List<String> getByCarNum(@RequestParam String unloadCarNum);
} }

3
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryOrderMainServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.factory.mt.service.impl; package com.logpm.factory.mt.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.logpm.factory.mt.entity.MtFactoryOrderMain; import com.logpm.factory.mt.entity.MtFactoryOrderMain;
import com.logpm.factory.mt.mapper.MtFactoryOrderMainMapper; import com.logpm.factory.mt.mapper.MtFactoryOrderMainMapper;
@ -25,7 +26,7 @@ public class MtFactoryOrderMainServiceImpl extends BaseServiceImpl<MtFactoryOrde
@Override @Override
public List<MtFactoryOrderMain> findMtFactoryOrderMainByInvoiceOrderCode(String invoiceOrderCode) { public List<MtFactoryOrderMain> findMtFactoryOrderMainByInvoiceOrderCode(String invoiceOrderCode) {
LambdaQueryChainWrapper lambdaQueryChainWrapper = new LambdaQueryChainWrapper(MtFactoryOrderMain.class); QueryWrapper<MtFactoryOrderMain> lambdaQueryChainWrapper = new QueryWrapper();
lambdaQueryChainWrapper.eq("invoice_order_code", invoiceOrderCode); lambdaQueryChainWrapper.eq("invoice_order_code", invoiceOrderCode);
List<MtFactoryOrderMain> ls = mtFactoryOrderMainMapper.selectList(lambdaQueryChainWrapper); List<MtFactoryOrderMain> ls = mtFactoryOrderMainMapper.selectList(lambdaQueryChainWrapper);
return ls; return ls;

83
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java

@ -1,6 +1,7 @@
package com.logpm.factory.receiver; package com.logpm.factory.receiver;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
@ -75,58 +76,44 @@ public class UnloadCarComHandler {
3.通过运单查询货物上的包件 3.通过运单查询货物上的包件
4.需要过滤出来 只要梦天的 4.需要过滤出来 只要梦天的
*/ */
List<AdvanceDetailEntity> carNumList = advanceDetailClient.getByCarNum(unloadCarDTO.getUnloadCarNum()); List<String> carNumList = advanceDetailClient.getByCarNum(unloadCarDTO.getUnloadCarNum());
log.info("##################unloadCarComDataHandler carNumList:{}", carNumList); log.info("##################unloadCarComDataHandler carNumList:{}", carNumList);
/** try {
* 安装品类进行分组
*/ List<MTOrderPackageRelationVO> allMtData = mtFactoryOrderMainService.mtOrderPackageRelation();
Map<String, List<AdvanceDetailEntity>> carNumMapList = carNumList.stream().collect(Collectors.groupingBy(AdvanceDetailEntity::getType)); // 对这个集合内进行分组
Map<String, List<MTOrderPackageRelationVO>> stringListMap = allMtData.stream().collect(Collectors.groupingBy(MTOrderPackageRelationVO::getInvoiceOrderCode));
List<AdvanceDetailEntity> mtListdata = carNumMapList.get("梦天"); Set<String> set = stringListMap.keySet();
String carNum = null;
if (mtListdata == null || mtListdata.size() == 0) { for (String s : set) {
log.info("##################{} 车次 不存在梦天的数据 无需返回", unloadCarDTO.getUnloadCarNum()); // 得到某个工厂运输批次的集合
return; List<MTOrderPackageRelationVO> t = stringListMap.get(s);
} //得到这个批次下面所有的包间
List<String> strs = t.stream().map(MTOrderPackageRelationVO::getPackageCode).collect(Collectors.toList());
// 得到车次下面梦天的包条码集合 // 当前批次的包间 在 这个配载计划中存在一个 则进行通知
List<String> mtStrs = mtListdata.stream().map(AdvanceDetailEntity::getUnitNo).collect(Collectors.toList()); for (String mtStr : carNumList) {
if (mtStrs == null || mtStrs.size() == 0) { if (strs.contains(mtStr)) {
log.error("##################{} 车次 梦天的包条数据存在异常! 请联系管理员", unloadCarDTO.getUnloadCarNum()); carNum = s;
return; break;
} }
List<MTOrderPackageRelationVO> allMtData = mtFactoryOrderMainService.mtOrderPackageRelation();
// 对这个集合内进行分组
Map<String, List<MTOrderPackageRelationVO>> stringListMap = allMtData.stream().collect(Collectors.groupingBy(MTOrderPackageRelationVO::getInvoiceOrderCode));
Set<String> set = stringListMap.keySet();
String carNum = null;
for (String s : set) {
// 得到某个工厂运输批次的集合
List<MTOrderPackageRelationVO> t = stringListMap.get(s);
//得到这个批次下面所有的包间
List<String> strs = t.stream().map(MTOrderPackageRelationVO::getPackageCode).collect(Collectors.toList());
// 当前批次的包间 在 这个配载计划中存在一个 则进行通知
for (String mtStr : mtStrs) {
if (strs.contains(mtStr)) {
carNum = s;
break;
} }
}
try { try {
if (StringUtil.isNoneBlank(carNum)) { if (StringUtil.isNoneBlank(carNum)) {
sendDataCarNum(carNum, unloadCarDTO.getCompleteDate()); sendDataCarNum(carNum, unloadCarDTO.getCompleteDate());
}
} catch (ParseException e) {
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (JsonProcessingException e) {
e.printStackTrace();
} }
} catch (ParseException e) {
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (JsonProcessingException e) {
e.printStackTrace();
}
}
}catch (Exception e){
e.printStackTrace();
} }
@ -144,8 +131,8 @@ public class UnloadCarComHandler {
private void sendDataCarNum(String carNum, String completeDate) throws ParseException, NoSuchAlgorithmException, JsonProcessingException { private void sendDataCarNum(String carNum, String completeDate) throws ParseException, NoSuchAlgorithmException, JsonProcessingException {
// 需要判断这个发货单编号是否推送过 // 需要判断这个发货单编号是否推送过
LambdaQueryChainWrapper<MtPushData> lambdaQueryChainWrapper = new LambdaQueryChainWrapper<MtPushData>(MtPushData.class); QueryWrapper<MtPushData> lambdaQueryChainWrapper = new QueryWrapper<MtPushData>();
lambdaQueryChainWrapper.eq(MtPushData::getRefCode, carNum); lambdaQueryChainWrapper.eq("ref_code", carNum);
MtPushData ms = mtPushDataService.getOne(lambdaQueryChainWrapper); MtPushData ms = mtPushDataService.getOne(lambdaQueryChainWrapper);
if (ObjectUtils.isNotNull(ms)) { if (ObjectUtils.isNotNull(ms)) {
log.info("##################{} 车次已经推送过", carNum); log.info("##################{} 车次已经推送过", carNum);

188
blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java

@ -1,21 +1,30 @@
//package com.logpm.factory; //package com.logpm.factory;
// //
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
//import com.baomidou.mybatisplus.extension.conditions.update.UpdateChainWrapper; //import com.baomidou.mybatisplus.extension.conditions.update.UpdateChainWrapper;
//import com.fasterxml.jackson.core.JsonProcessingException; //import com.fasterxml.jackson.core.JsonProcessingException;
//import com.logpm.factory.comfac.controller.FactoryCommonController; //import com.logpm.factory.comfac.controller.FactoryCommonController;
//import com.logpm.factory.comfac.dto.UnloadCarDTO; //import com.logpm.factory.comfac.dto.UnloadCarDTO;
//import com.logpm.factory.mt.entity.MtFactoryOrderMain; //import com.logpm.factory.mt.entity.MtFactoryOrderMain;
//import com.logpm.factory.mt.entity.MtPushData;
//import com.logpm.factory.mt.service.IMtFactoryDataService; //import com.logpm.factory.mt.service.IMtFactoryDataService;
//import com.logpm.factory.mt.service.IMtFactoryOrderMainService; //import com.logpm.factory.mt.service.IMtFactoryOrderMainService;
//import com.logpm.factory.mt.service.IMtPushDataService;
//import com.logpm.factory.mt.service.impl.MtFactoryDataServiceImpl; //import com.logpm.factory.mt.service.impl.MtFactoryDataServiceImpl;
//import com.logpm.factory.snm.vo.MTOrderPackageRelationVO; //import com.logpm.factory.snm.vo.MTOrderPackageRelationVO;
//import com.logpm.oldproject.entity.AdvanceDetailEntity; //import com.logpm.oldproject.entity.AdvanceDetailEntity;
//import com.logpm.oldproject.feign.IAdvanceDetailClient; //import com.logpm.oldproject.feign.IAdvanceDetailClient;
//import com.rabbitmq.client.Channel;
//import org.junit.jupiter.api.Test; //import org.junit.jupiter.api.Test;
//import org.junit.jupiter.api.extension.ExtendWith; //import org.junit.jupiter.api.extension.ExtendWith;
//import org.springblade.core.test.BladeBootTest; //import org.springblade.core.test.BladeBootTest;
//import org.springblade.core.test.BladeSpringExtension; //import org.springblade.core.test.BladeSpringExtension;
//import org.springblade.core.tool.api.R; //import org.springblade.core.tool.api.R;
//import org.springblade.core.tool.api.ResultCode;
//import org.springblade.core.tool.utils.StringUtil;
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
//import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
// //
//import java.security.NoSuchAlgorithmException; //import java.security.NoSuchAlgorithmException;
@ -28,13 +37,11 @@
//import java.util.stream.Collectors; //import java.util.stream.Collectors;
// //
//@ExtendWith(BladeSpringExtension.class) //@ExtendWith(BladeSpringExtension.class)
//@BladeBootTest(appName = "logpm-factory-zhy", enableLoader = true) //@BladeBootTest(appName = "logpm-factory-pref", enableLoader = true)
//public class TestService { //public class TestService {
// //
// //
// //
//
//
// @Autowired // @Autowired
// private IAdvanceDetailClient advanceDetailClient; // private IAdvanceDetailClient advanceDetailClient;
// //
@ -45,102 +52,109 @@
// @Autowired // @Autowired
// private IMtFactoryDataService mtFactoryDataService; // private IMtFactoryDataService mtFactoryDataService;
// //
// @Autowired
// private IMtPushDataService mtPushDataService;
//
//
// //
// @Test
// public void testUpdate(){
// //
//// UpdateChainWrapper<MtFactoryOrderMain> updateChainWrapper =new UpdateChainWrapper<MtFactoryOrderMain>(MtFactoryOrderMain.class);
//// updateChainWrapper.set("push_status","1");
//// updateChainWrapper.set("push_time",new Date());
//// updateChainWrapper.eq("invoice_order_code","HYLEJIA-230730");
//// mtFactoryOrderMainService.update(updateChainWrapper);
// }
// //
// //
// @Test // @Test
// public void contextLoads() { // public void test2() {
// //
///* // /*
// 1.得到传递的车次 // 1.得到传递的车次
// 2. 需要判断这个车次是否市梦天的 // 2. 需要判断这个车次是否市梦天的
// 3. 查询这个车次上的运单是否市梦天的 // 3. 查询这个车次上的运单是否市梦天的
// //
//// 4.查询包间对应的梦天发给我们的批次号 // 4.查询包间对应的梦天发给我们的批次号
//// */ // */
//// UnloadCarDTO unloadCarDTO = new UnloadCarDTO(); // UnloadCarDTO unloadCarDTO = new UnloadCarDTO();
//// unloadCarDTO.setUnloadCarNum("LQGX230719001"); // unloadCarDTO.setCompleteDate("2023-08-08 15:39:40");
//// unloadCarDTO.setCompleteDate("2023-07-19 16:48:45"); // unloadCarDTO.setUnloadCarNum("MTZX230808001");
//// //
//// /* // /*
//// 2.通过车次查询来系统中车次绑定的运单 // 2.通过车次查询来系统中车次绑定的运单
//// 3.通过运单查询货物上的包件 // 3.通过运单查询货物上的包件
//// 4.需要过滤出来 只要梦天的 // 4.需要过滤出来 只要梦天的
//// */ // */
//// List<AdvanceDetailEntity> carNumList = advanceDetailClient.getByCarNum(unloadCarDTO.getUnloadCarNum()); //
//// // try {
//// // List<String> carNumList = advanceDetailClient.getByCarNum(unloadCarDTO.getUnloadCarNum());
//// /** // List<MTOrderPackageRelationVO> allMtData = mtFactoryOrderMainService.mtOrderPackageRelation();
//// * 安装品类进行分组 // // 对这个集合内进行分组
//// */ // Map<String, List<MTOrderPackageRelationVO>> stringListMap = allMtData.stream().collect(Collectors.groupingBy(MTOrderPackageRelationVO::getInvoiceOrderCode));
//// Map<String, List<AdvanceDetailEntity>> carNumMapList = carNumList.stream().collect(Collectors.groupingBy(AdvanceDetailEntity::getType)); // Set<String> set = stringListMap.keySet();
//// //
//// List<AdvanceDetailEntity> mtListdata = carNumMapList.get("梦天"); // for (String s : set) {
//// // String carNum = null;
//// if (mtListdata == null || mtListdata.size() == 0) { // // 得到某个工厂运输批次的集合
//// return; // List<MTOrderPackageRelationVO> t = stringListMap.get(s);
//// } // //得到这个批次下面所有的包间
//// // List<String> strs = t.stream().map(MTOrderPackageRelationVO::getPackageCode).collect(Collectors.toList());
//// // 得到车次下面梦天的包条码集合 // // 当前批次的包间 在 这个配载计划中存在一个 则进行通知
//// List<String> mtStrs = mtListdata.stream().map(AdvanceDetailEntity::getUnitNo).collect(Collectors.toList()); // for (String mtStr : carNumList) {
//// if (mtStrs == null || mtStrs.size() == 0) { // if (strs.contains(mtStr)) {
//// return; // carNum = s;
//// } // break;
//// // }
//// List<MTOrderPackageRelationVO> allMtData = mtFactoryOrderMainService.mtOrderPackageRelation(); // }
//// // 对这个集合内进行分组 //
//// Map<String, List<MTOrderPackageRelationVO>> stringListMap = allMtData.stream().collect(Collectors.groupingBy(MTOrderPackageRelationVO::getInvoiceOrderCode)); // try {
//// Set<String> set = stringListMap.keySet(); // if (StringUtil.isNoneBlank(carNum)) {
//// boolean isPush = false; // sendDataCarNum(carNum, unloadCarDTO.getCompleteDate());
//// for (String s : set) { // }
//// // 得到某个工厂运输批次的集合 // } catch (ParseException e) {
//// List<MTOrderPackageRelationVO> t = stringListMap.get(s); // e.printStackTrace();
//// //得到这个批次下面所有的包间 // } catch (NoSuchAlgorithmException e) {
//// List<String> strs = t.stream().map(MTOrderPackageRelationVO::getPackageCode).collect(Collectors.toList()); // e.printStackTrace();
//// // 当前批次的包间 在 这个配载计划中存在一个 则进行通知 // } catch (JsonProcessingException e) {
//// for (String mtStr : mtStrs) { // e.printStackTrace();
//// if (strs.contains(mtStr)) { // }
//// isPush = true; //
//// break; // }
//// } // } catch (Exception e) {
//// } // e.printStackTrace();
//// if (isPush) { // }
//// break;
//// }
//// }
//// if (isPush) {
//// try {
////
//// Date data = new SimpleDateFormat().parse(unloadCarDTO.getCompleteDate());
//// R r = mtFactoryDataService.sendUnloadCarNum(unloadCarDTO.getUnloadCarNum(), data);
//// // 更新订单状态
//// UpdateChainWrapper<MtFactoryOrderMain> updateChainWrapper =new UpdateChainWrapper<MtFactoryOrderMain>(MtFactoryOrderMain.class);
//// updateChainWrapper.set("push_status","1");
//// updateChainWrapper.set("push_time",data);
//// updateChainWrapper.eq("invoice_order_code",unloadCarDTO.getUnloadCarNum());
//// mtFactoryOrderMainService.update(updateChainWrapper);
////
//// } catch (ParseException e) {
//// e.printStackTrace();
//// } catch (JsonProcessingException e) {
//// e.printStackTrace();
//// } catch (NoSuchAlgorithmException e) {
//// e.printStackTrace();
//// }
////
////
//// }
// //
// //
// } // }
// //
// /**
// * 根基匹配到的发货单编号 推送梦天
// *
// * @param carNum
// * @param completeDate
// * @throws ParseException
// * @throws NoSuchAlgorithmException
// * @throws JsonProcessingException
// */
// private void sendDataCarNum(String carNum, String completeDate) throws ParseException, NoSuchAlgorithmException, JsonProcessingException {
//
// // 需要判断这个发货单编号是否推送过
// QueryWrapper<MtPushData> lambdaQueryChainWrapper = new QueryWrapper<MtPushData>();
// lambdaQueryChainWrapper.eq("ref_code", carNum);
// MtPushData ms = mtPushDataService.getOne(lambdaQueryChainWrapper);
// if (ObjectUtils.isNotNull(ms)) {
// return;
// }
// R r = mtFactoryDataService.sendUnloadCarNum(carNum, completeDate);
// if (r.getCode() == ResultCode.SUCCESS.getCode()) {
// MtPushData mtPushData = new MtPushData();
// mtPushData.setPushTime(new Date());
// mtPushData.setPushStatus(1);// 推送状态
// mtPushData.setRefCode(carNum);
// mtPushData.setRefType(1);// 订单主表
// // todo 这里需要查询主推送单的 ID
// List<MtFactoryOrderMain> mtFactoryOrderMainList = mtFactoryOrderMainService.findMtFactoryOrderMainByInvoiceOrderCode(carNum);
// if (mtFactoryOrderMainList.size() > 0) {
// mtFactoryOrderMainList.get(0);
// mtPushData.setRefId(mtFactoryOrderMainList.get(0).getId());
// }
// // 插入推送数据
// mtPushDataService.save(mtPushData);
// }
// }
//
//} //}

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

@ -87,7 +87,7 @@ public class AdvanceDetailClient implements IAdvanceDetailClient {
} }
@Override @Override
public List<AdvanceDetailEntity> getByCarNum(String unloadCarNum) { public List<String> getByCarNum(String unloadCarNum) {
return advanceDetailService.getByCarNum(unloadCarNum); return advanceDetailService.getByCarNum(unloadCarNum);
} }
} }

4
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.java

@ -54,5 +54,7 @@ public interface AdvanceDetailMapper extends BaseMapper<AdvanceDetailEntity> {
DistributionParcelListEntityVO getByUnitNo(@Param("unitNo") String unitNo); DistributionParcelListEntityVO getByUnitNo(@Param("unitNo") String unitNo);
List<AdvanceDetailEntity> getByCarNum(@Param("unloadCarNum") String unloadCarNum); List<String> getByCarNum(@Param("unloadCarNum") String unloadCarNum);
} }

70
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.xml

@ -112,74 +112,8 @@
</select> </select>
<select id="getByCarNum" resultMap="advanceDetailResultMap"> <select id="getByCarNum" resultType="string" >
SELECT SELECT cls.unitNo FROM ht_cars_load_scan cls LEFT JOIN ht_advance_detail ad on ad.unitNo=cls.unitNo WHERE cls.start_cars_no=#{unloadCarNum} and cls.type=0 and ad.type="梦天"
id,
advance_id,
is_pay,
lineID,
serialKey,
area,
orderSelfNum,
type,
systemType,
orderNum,
is_opai,
mtdsNo,
firstPackName,
firstPackCode,
siteName,
siteCode,
productCode,
secondPackName,
secondPackCode,
thirdPackName,
thirdPackCode,
goodName,
isAddin,
isThirdAddin,
isSuppin,
mscsNum,
mtdsNum,
volume,
unitNo,
mctsTruck,
mctsTruckNo,
date100,
date2,
date3,
date4,
date5,
date6,
create_time,
update_time,
delete_time,
serviceNum,
admin,
administrators_id,
dueDate,
remark,
old_id
FROM
ht_advance_detail
WHERE
advance_id IN (
SELECT
advance_id
FROM
ht_waybill_order
WHERE
way_bill_id IN (
SELECT
waybill_id
FROM
ht_cars_load_waybill
WHERE
start_cars_no = #{unloadCarNum}
)
)
</select> </select>

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

@ -41,5 +41,5 @@ public interface IAdvanceDetailService {
Integer getAllNumByOrderNo(String orderSelfNum); Integer getAllNumByOrderNo(String orderSelfNum);
List<AdvanceDetailEntity> getByCarNum(String unloadCarNum); List<String> getByCarNum(String unloadCarNum);
} }

4
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceDetailServiceImpl.java

@ -74,9 +74,9 @@ public class AdvanceDetailServiceImpl implements IAdvanceDetailService {
} }
@Override @Override
public List<AdvanceDetailEntity> getByCarNum(String unloadCarNum) { public List<String> getByCarNum(String unloadCarNum) {
List<AdvanceDetailEntity> ls = advanceDetailMapper.getByCarNum(unloadCarNum); List<String> ls = advanceDetailMapper.getByCarNum(unloadCarNum);
return ls; return ls;
} }

12
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -107,9 +107,9 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
warehouseWaybill = new WarehouseWaybillEntity(); warehouseWaybill = new WarehouseWaybillEntity();
warehouseWaybill.setWaybillNo(waybillNo); warehouseWaybill.setWaybillNo(waybillNo);
warehouseWaybill.setDestinationWarehouse(warehouseName); warehouseWaybill.setDestinationWarehouseName(warehouseName);
warehouseWaybill.setDestinationWarehouseId(Objects.isNull(endhouse) ? null : endhouse.getId()); warehouseWaybill.setDestinationWarehouseId(Objects.isNull(endhouse) ? null : endhouse.getId());
warehouseWaybill.setDepartureWarehouse(startSite); warehouseWaybill.setDepartureWarehouseName(startSite);
warehouseWaybill.setDepartureWarehouseId(Objects.isNull(starthouse) ? null : starthouse.getId()); warehouseWaybill.setDepartureWarehouseId(Objects.isNull(starthouse) ? null : starthouse.getId());
warehouseWaybill.setCustomerTrain(wayBillEntity.getCarNo()); warehouseWaybill.setCustomerTrain(wayBillEntity.getCarNo());
warehouseWaybill.setBrand(wayBillEntity.getBrand()); warehouseWaybill.setBrand(wayBillEntity.getBrand());
@ -235,12 +235,10 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
// warehouseWayBillDetailService.update(warehouseWayBillDetail); // warehouseWayBillDetailService.update(warehouseWayBillDetail);
// } // }
// } // }
if (isOrder) { if (isOrder) {
//创建在库订单 //创建在库订单
createStockArticle(warehouseWaybill); createStockArticle(warehouseWaybill);
} }
log.info("###############waybillDataHandler: 处理数据结束 waybillNo={}", waybillNo); log.info("###############waybillDataHandler: 处理数据结束 waybillNo={}", waybillNo);
} }
@ -249,12 +247,10 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
//自动生成的在库订单就用运单号作为订单号 //自动生成的在库订单就用运单号作为订单号
String waybillNo = warehouseWaybill.getWaybillNo(); String waybillNo = warehouseWaybill.getWaybillNo();
Long waybillId = warehouseWaybill.getId(); Long waybillId = warehouseWaybill.getId();
String destinationWarehouse = warehouseWaybill.getDestinationWarehouse();//目的仓 String destinationWarehouse = warehouseWaybill.getDestinationWarehouseName();//目的仓
Integer totalCount = warehouseWaybill.getTotalCount();//订单总数量 Integer totalCount = warehouseWaybill.getTotalCount();//订单总数量
Integer stockCount = warehouseWaybill.getStockCount();//订单在库数量 Integer stockCount = warehouseWaybill.getStockCount();//订单在库数量
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.findByName(destinationWarehouse); BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.findByName(destinationWarehouse);
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleClient.findByOrderSelfNum(waybillNo); DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleClient.findByOrderSelfNum(waybillNo);
Long id = null; Long id = null;
@ -267,7 +263,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity.setMallName(warehouseWaybill.getConsigneeName()); distributionStockArticleEntity.setMallName(warehouseWaybill.getConsigneeName());
distributionStockArticleEntity.setMallId(warehouseWaybill.getConsigneeId()); distributionStockArticleEntity.setMallId(warehouseWaybill.getConsigneeId());
distributionStockArticleEntity.setDescriptionGoods(warehouseWaybill.getGoodsName()); distributionStockArticleEntity.setDescriptionGoods(warehouseWaybill.getGoodsName());
distributionStockArticleEntity.setWarehouse(warehouseWaybill.getDestinationWarehouse()); distributionStockArticleEntity.setWarehouse(warehouseWaybill.getDepartureWarehouseName());
distributionStockArticleEntity.setWarehouseEntryTime(date); distributionStockArticleEntity.setWarehouseEntryTime(date);
distributionStockArticleEntity.setTotalNumber(totalCount); distributionStockArticleEntity.setTotalNumber(totalCount);
distributionStockArticleEntity.setHandQuantity(stockCount); distributionStockArticleEntity.setHandQuantity(stockCount);

Loading…
Cancel
Save