|
|
@ -147,7 +147,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
private ITrunklinePackageTrackLogClient trunklinePackageTrackLogClient; |
|
|
|
private ITrunklinePackageTrackLogClient trunklinePackageTrackLogClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<DistributionStockListVO> selectDistributionStockListPage(IPage<DistributionStockListVO> page, DistributionStockListVO distributionStockList) { |
|
|
|
public IPage<DistributionStockListVO> selectDistributionStockListPage(IPage<DistributionStockListVO> page, DistributionStockListVO distributionStockList) { |
|
|
|
return page.setRecords(baseMapper.selectDistributionStockListPage(page, distributionStockList)); |
|
|
|
return page.setRecords(baseMapper.selectDistributionStockListPage(page, distributionStockList)); |
|
|
@ -192,7 +191,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
List<DistributionStockListEntity> distributionStockListEntities = baseMapper.exportDistributionStockList(queryWrapper); |
|
|
|
List<DistributionStockListEntity> distributionStockListEntities = baseMapper.exportDistributionStockList(queryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DistributionStockListExcel> excelList = new ArrayList<>(); |
|
|
|
List<DistributionStockListExcel> excelList = new ArrayList<>(); |
|
|
|
distributionStockListEntities.forEach(stockList -> { |
|
|
|
distributionStockListEntities.forEach(stockList -> { |
|
|
|
// stockList.setServiceType(DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, stockList.getServiceType()));
|
|
|
|
// stockList.setServiceType(DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, stockList.getServiceType()));
|
|
|
@ -308,6 +306,76 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public OrderPackgeCodeDataVO showInvnetoryPackgeCodes(String orderPackgeCodes) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OrderPackgeCodeDataVO orderPackgeCodeDataVO = new OrderPackgeCodeDataVO(); |
|
|
|
|
|
|
|
List<Map> data = new ArrayList<>(); |
|
|
|
|
|
|
|
BasicPrintTemplateEntity template = basicPrintTemplateClient.getPrintTemplate(PrintTemplateStatusConstant.daiqueren_11.getValue()); |
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(template)) { |
|
|
|
|
|
|
|
throw new CustomerException("模板内容未找到"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (orderPackgeCodes.isEmpty()) { |
|
|
|
|
|
|
|
throw new CustomerException("模板内容未找到"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String[] packageCodes = orderPackgeCodes.split(","); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String html = null; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
html = TemplateUtil.getTemplateByUrl(template.getTemplateUrl()); |
|
|
|
|
|
|
|
orderPackgeCodeDataVO.setTemplateHtml(html); |
|
|
|
|
|
|
|
orderPackgeCodeDataVO.setTemplateId(template.getId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (String packageCode : packageCodes) { |
|
|
|
|
|
|
|
//查询库存品包件
|
|
|
|
|
|
|
|
LambdaQueryWrapper<DisStockListDetailEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
wrapper.eq(DisStockListDetailEntity::getStockPackageCode, packageCode); |
|
|
|
|
|
|
|
DisStockListDetailEntity disStockListDetail = disStockListDetailService.getOne(wrapper); |
|
|
|
|
|
|
|
if (Func.isEmpty(disStockListDetail)) { |
|
|
|
|
|
|
|
log.error("##################查询库存品包件失败 packageCode:{}", packageCode); |
|
|
|
|
|
|
|
throw new ServiceException("库存品包件查询失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询库存品信息
|
|
|
|
|
|
|
|
DistributionStockListEntity stockListEntity = this.getById(disStockListDetail.getStockListId()); |
|
|
|
|
|
|
|
if (Func.isEmpty(stockListEntity)) { |
|
|
|
|
|
|
|
log.info("##############查询ID:{}", disStockListDetail.getStockListId()); |
|
|
|
|
|
|
|
throw new ServiceException("查询库存品信息失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(disStockListDetail.getReservationId()); |
|
|
|
|
|
|
|
if (Func.isEmpty(distributionReservationEntity)) { |
|
|
|
|
|
|
|
log.info("##############查询ID:{}", distributionReservationEntity); |
|
|
|
|
|
|
|
throw new ServiceException("查询库存品信息失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Map<String, Object> map = JSONObject.parseObject(JSONObject.toJSONString(stockListEntity), Map.class); |
|
|
|
|
|
|
|
map.put("id", disStockListDetail.getId()); |
|
|
|
|
|
|
|
map.put("customerName", distributionReservationEntity.getConsignee()); |
|
|
|
|
|
|
|
map.put("customerTelephone", distributionReservationEntity.getDeliveryPhone()); |
|
|
|
|
|
|
|
map.put("customerAddress", distributionReservationEntity.getDeliveryAddress()); |
|
|
|
|
|
|
|
map.put("shipperName", " "); |
|
|
|
|
|
|
|
map.put("shipperAddress", " "); |
|
|
|
|
|
|
|
map.put("stockPackageCode", disStockListDetail.getStockPackageCode()); |
|
|
|
|
|
|
|
String filename = QRCodeUtil.createCodeToFile(disStockListDetail.getStockPackageCode()); |
|
|
|
|
|
|
|
map.put("img", QRCodeUtil.getEmpAutograph(filename)); |
|
|
|
|
|
|
|
if (Func.isNotEmpty(stockListEntity.getOrderCode())) { |
|
|
|
|
|
|
|
String fileTypeName = QRCodeUtil.createCodeToFile(stockListEntity.getOrderCode()); |
|
|
|
|
|
|
|
map.put("imgType", QRCodeUtil.getEmpAutograph(fileTypeName)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
data.add(map); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
orderPackgeCodeDataVO.setDataList(data); |
|
|
|
|
|
|
|
return orderPackgeCodeDataVO; |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
throw new CustomerException(e.getMessage()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void importUser(List<DistributionStockListExcel> data, Boolean isCovered) { |
|
|
|
public void importUser(List<DistributionStockListExcel> data, Boolean isCovered) { |
|
|
@ -344,7 +412,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
|
|
|
|
* @param distributionStockListDTO |
|
|
|
* @param distributionStockListDTO |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -397,8 +464,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
if (Func.isNotEmpty(one2)) { |
|
|
|
if (Func.isNotEmpty(one2)) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询是否存在有拆包产物
|
|
|
|
//查询是否存在有拆包产物
|
|
|
|
//存在则是进行数量的累加
|
|
|
|
//存在则是进行数量的累加
|
|
|
|
//有修改
|
|
|
|
//有修改
|
|
|
@ -521,9 +586,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// //不存在拆包产物
|
|
|
|
// //不存在拆包产物
|
|
|
|
// //添加新的库存品信息
|
|
|
|
// //添加新的库存品信息
|
|
|
|
// list = this.list(Wrappers.<DistributionStockListEntity>query().lambda()
|
|
|
|
// list = this.list(Wrappers.<DistributionStockListEntity>query().lambda()
|
|
|
@ -627,6 +689,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 查询客户信息 |
|
|
|
* 查询客户信息 |
|
|
|
|
|
|
|
* |
|
|
|
* @param |
|
|
|
* @param |
|
|
|
* @param distributionStockListEntity |
|
|
|
* @param distributionStockListEntity |
|
|
|
* @return |
|
|
|
* @return |
|
|
@ -671,6 +734,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 添加 |
|
|
|
* 添加 |
|
|
|
|
|
|
|
* |
|
|
|
* @param distributionStockList |
|
|
|
* @param distributionStockList |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -728,7 +792,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
|
|
|
|
* @param reservationId |
|
|
|
* @param reservationId |
|
|
|
* @param stockListId |
|
|
|
* @param stockListId |
|
|
|
* @return |
|
|
|
* @return |
|
|
@ -824,7 +887,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
|
|
|
|
* @param distributionStockListEntity |
|
|
|
* @param distributionStockListEntity |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -841,8 +903,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
return baseMapper.selectStockInforByOrderPackageCode(orderPackageCode); |
|
|
|
return baseMapper.selectStockInforByOrderPackageCode(orderPackageCode); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -1140,8 +1200,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return distributionMerchantStockListVOS; |
|
|
|
return distributionMerchantStockListVOS; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1207,8 +1265,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
.in(DistributionParcelListEntity::getId, packageIds); |
|
|
|
.in(DistributionParcelListEntity::getId, packageIds); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//清理包件的物料信息
|
|
|
|
//清理包件的物料信息
|
|
|
|
boolean update = distributionParcelListService.update(up); |
|
|
|
boolean update = distributionParcelListService.update(up); |
|
|
|
//维护订单信息
|
|
|
|
//维护订单信息
|
|
|
@ -1237,7 +1293,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse, BladeUser user, String orderPackageCode, String content, Integer node) { |
|
|
|
private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse, BladeUser user, String orderPackageCode, String content, Integer node) { |
|
|
|
JSONObject trunklinePackageTrackLog = new JSONObject(); |
|
|
|
JSONObject trunklinePackageTrackLog = new JSONObject(); |
|
|
|
trunklinePackageTrackLog.put("tenantId", user.getTenantId()); |
|
|
|
trunklinePackageTrackLog.put("tenantId", user.getTenantId()); |
|
|
|