Browse Source

1.修复上架bug

2.修复获取部门id的bug
pull/1/head
zhenghaoyu 7 months ago
parent
commit
da58dcd761
  1. 1
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java
  2. 10
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  3. 23
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java
  4. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java
  5. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java
  6. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java
  7. 59
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

1
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java

@ -37,5 +37,6 @@ public class WarehouseWaybillVO extends WarehouseWaybillEntity {
List<WarehouseWayBillDetail> detailList = new ArrayList<>(); List<WarehouseWayBillDetail> detailList = new ArrayList<>();
private Integer handleNum;
} }

10
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java

@ -208,10 +208,12 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
boolean flag = false; boolean flag = false;
for (String s : split) { for (String s : split) {
Dept d = deptClient.findEntityById(Long.parseLong(s)); Dept d = deptClient.findEntityById(Long.parseLong(s));
Integer deptCategory = d.getDeptCategory(); if(!Objects.isNull(d)){
if(deptCategory.equals(5)){ Integer deptCategory = d.getDeptCategory();
flag = true; if(deptCategory.equals(5)){
break; flag = true;
break;
}
} }
List<Dept> userDeptNode = deptClient.getUserDeptNode(Long.parseLong(s)); List<Dept> userDeptNode = deptClient.getUserDeptNode(Long.parseLong(s));

23
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java

@ -94,19 +94,16 @@ public class WarehouseWaybillController extends BladeController {
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入warehouseWaybill") @ApiOperation(value = "分页", notes = "传入warehouseWaybill")
public R<IPage<WarehouseWaybillVO>> list(@ApiIgnore @RequestParam Map<String, Object> warehouseWaybill, Query query) { public R<IPage<WarehouseWaybillVO>> list(@ApiIgnore @RequestParam Map<String, Object> warehouseWaybill, Query query) {
// QueryWrapper<WarehouseWaybillEntity> queryWrapper = Condition.getQueryWrapper(warehouseWaybill, WarehouseWaybillEntity.class);
// //获取当前登录人仓库 BasicdataWarehouseEntity basicdataWarehouseEntity = warehouseClient.getMyCurrentWarehouse();
// List<BasicdataWarehouseEntity> myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); if(Objects.isNull(basicdataWarehouseEntity)){
// List<Long> collect = myWatchWarehouse.stream() log.warn("################pageInfo: 请选择仓库");
// .map(BasicdataWarehouseEntity::getId) throw new CustomerException(405,"请选择仓库");
// .collect(Collectors.toList()); }
// queryWrapper.lambda() warehouseWaybill.put("warehouseId",basicdataWarehouseEntity.getId());
// .in(collect.size() > 0, WarehouseWaybillEntity::getDepartureWarehouseId, collect)
// .or() IPage<WarehouseWaybillVO> pages = warehouseWaybillService.pageInfo(Condition.getPage(query), warehouseWaybill);
// .in(collect.size() > 0, WarehouseWaybillEntity::getDestinationWarehouseId, collect); return R.data(pages);
IPage<WarehouseWaybillEntity> pages = warehouseWaybillService.pageInfo(Condition.getPage(query), warehouseWaybill);
return R.data(WarehouseWaybillWrapper.build().pageVO(pages));
} }
/** /**

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

@ -47,7 +47,7 @@ public interface WarehouseWaybillMapper extends BaseMapper<WarehouseWaybillEntit
List<WarehouseWaybillVO> exportWarehouseWarehousingDetail(@Param("ew") QueryWrapper<WarehouseWaybillEntity> queryWrapper); List<WarehouseWaybillVO> exportWarehouseWarehousingDetail(@Param("ew") QueryWrapper<WarehouseWaybillEntity> queryWrapper);
IPage<WarehouseWaybillEntity> pageInfo(IPage<Object> page,@Param("param") WarehouseWaybillDTO warehouseWaybillDTO); IPage<WarehouseWaybillVO> pageInfo(IPage<Object> page,@Param("param") WarehouseWaybillDTO warehouseWaybillDTO);
IPage<WarehouseWaybillVO> pageList(IPage<Object> page, @Param("param") WarehouseWaybillDTO waybillDTO); IPage<WarehouseWaybillVO> pageList(IPage<Object> page, @Param("param") WarehouseWaybillDTO waybillDTO);

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

@ -47,7 +47,7 @@ public interface IWarehouseWaybillService extends BaseService<WarehouseWaybillEn
*/ */
List<WarehouseWaybillExcel> exportWarehouseWarehousingDetail(Map<String, Object> warehouseWaybillEntity); List<WarehouseWaybillExcel> exportWarehouseWarehousingDetail(Map<String, Object> warehouseWaybillEntity);
IPage<WarehouseWaybillEntity> pageInfo(IPage<Object> page, Map<String, Object> warehouseWaybill); IPage<WarehouseWaybillVO> pageInfo(IPage<Object> page, Map<String, Object> warehouseWaybill);
IPage<WarehouseWaybillVO> pageList(WarehouseWaybillDTO waybillDTO); IPage<WarehouseWaybillVO> pageList(WarehouseWaybillDTO waybillDTO);

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

@ -2412,11 +2412,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
stringBuffer.append("{").append(materialCode).append("},"); stringBuffer.append("{").append(materialCode).append("},");
continue; continue;
} }
updownGoodsEntity = new WarehouseUpdownGoodsEntity();
updownGoodsEntity.setCreateUser(1714696768639311873L); updownGoodsEntity.setCreateUser(1714696768639311873L);
updownGoodsEntity.setUpdateUser(1714696768639311873L); updownGoodsEntity.setUpdateUser(1714696768639311873L);
updownGoodsEntity.setCreateDept(1649331096241836033L); updownGoodsEntity.setCreateDept(1649331096241836033L);
updownGoodsEntity.setTenantId(TenantNum.HUITONGCODE); updownGoodsEntity.setTenantId(TenantNum.HUITONGCODE);
updownGoodsEntity = new WarehouseUpdownGoodsEntity();
updownGoodsEntity.setUpdownTypeId(updownTypeEntity.getId()); updownGoodsEntity.setUpdownTypeId(updownTypeEntity.getId());
updownGoodsEntity.setAreaId(updownTypeEntity.getAreaId()); updownGoodsEntity.setAreaId(updownTypeEntity.getAreaId());
updownGoodsEntity.setAreaTitle(updownTypeEntity.getAreaTitle()); updownGoodsEntity.setAreaTitle(updownTypeEntity.getAreaTitle());

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

@ -171,11 +171,11 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
//判断是否需要创建在库订单 //判断是否需要创建在库订单
} }
//创建在库订单 //创建在库订单
createStockArticle(warehouseWaybill); createStockArticle(warehouseWaybill,allNum);
log.info("###############waybillDataHandler: 处理数据结束 waybillNo={}", waybillNo); log.info("###############waybillDataHandler: 处理数据结束 waybillNo={}", waybillNo);
} }
private void createStockArticle(WarehouseWaybillEntity warehouseWaybill) { private void createStockArticle(WarehouseWaybillEntity warehouseWaybill,Integer allNum) {
//判断新系统是否有这条订单数据 //判断新系统是否有这条订单数据
//自动生成的在库订单就用运单号作为订单号 //自动生成的在库订单就用运单号作为订单号
String waybillNo = warehouseWaybill.getWaybillNo(); String waybillNo = warehouseWaybill.getWaybillNo();
@ -254,6 +254,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity.setAcceptWarehouseId(warehouseWaybill.getDestinationWarehouseId()); distributionStockArticleEntity.setAcceptWarehouseId(warehouseWaybill.getDestinationWarehouseId());
distributionStockArticleEntity.setAcceptWarehouseName(warehouseWaybill.getDestinationWarehouseName()); distributionStockArticleEntity.setAcceptWarehouseName(warehouseWaybill.getDestinationWarehouseName());
distributionStockArticleEntity.setIsZero("1"); distributionStockArticleEntity.setIsZero("1");
distributionStockArticleEntity.setIncomingNum(allNum);
distributionStockArticleEntity.setTenantId(TenantNum.HUITONGCODE); distributionStockArticleEntity.setTenantId(TenantNum.HUITONGCODE);
List<WarehouseWayBillDetail> details = warehouseWayBillDetailService.findByWaybillId(waybillId); List<WarehouseWayBillDetail> details = warehouseWayBillDetailService.findByWaybillId(waybillId);
@ -694,23 +695,39 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
} }
@Override @Override
public IPage<WarehouseWaybillEntity> pageInfo(IPage<Object> page, Map<String, Object> warehouseWaybill) { public IPage<WarehouseWaybillVO> pageInfo(IPage<Object> page, Map<String, Object> warehouseWaybill) {
WarehouseWaybillDTO warehouseWaybillDTO = JSON.parseObject(JSONObject.toJSONString(warehouseWaybill), WarehouseWaybillDTO.class); WarehouseWaybillDTO warehouseWaybillDTO = JSON.parseObject(JSONObject.toJSONString(warehouseWaybill), WarehouseWaybillDTO.class);
// QueryWrapper<WarehouseWaybillEntity> queryWrapper = Condition.getQueryWrapper(warehouseWaybill, WarehouseWaybillEntity.class);
//获取当前登录人仓库 Long warehouseId = warehouseWaybillDTO.getWarehouseId();
List<BasicdataWarehouseEntity> myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse();
List<Long> collect = myWatchWarehouse.stream() IPage<WarehouseWaybillVO> warehouseWaybillVOIPage = baseMapper.pageInfo(page, warehouseWaybillDTO);
.map(BasicdataWarehouseEntity::getId)
.collect(Collectors.toList()); List<WarehouseWaybillVO> records = warehouseWaybillVOIPage.getRecords();
// queryWrapper.lambda()
// .in(collect.size() > 0, WarehouseWaybillEntity::getDepartureWarehouseId, collect) for (WarehouseWaybillVO record : records) {
// .or() String deliveryMethodStr = DictBizCache.getValue(DictBizConstant.DELIVERY_METHOD, record.getDeliveryMethod());
// .in(collect.size() > 0, WarehouseWaybillEntity::getDestinationWarehouseId, collect); record.setDeliveryMethodStr(deliveryMethodStr);
if(!collect.isEmpty()){ String urgencyStr = DictBizCache.getValue(DictBizConstant.URGENCY, record.getUrgency());
warehouseWaybillDTO.setDepartureWarehouseIds(collect); record.setUrgencyStr(urgencyStr);
warehouseWaybillDTO.setDestinationWarehouseIds(collect); String statsStr = DictBizCache.getValue(DictBizConstant.WAY_BILL_STATUS, record.getStats());
record.setStatsStr(statsStr);
String typeStr = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, record.getServiceType());
record.setServiceTypeStr(typeStr);
String freezeStatusStr = DictBizCache.getValue(DictBizConstant.FREEZE_STATUS, record.getFreezeStatus());
record.setFreezeStatusStr(freezeStatusStr);
Integer waybillType = record.getWaybillType();
if(waybillType.equals(2)){
String orderCode = record.getWaybillNo();
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(!Objects.isNull(stockArticleEntity)){
record.setHandleNum(stockArticleEntity.getHandQuantity());
}
}
} }
return baseMapper.pageInfo(page,warehouseWaybillDTO); warehouseWaybillVOIPage.setRecords(records);
return warehouseWaybillVOIPage;
} }
@Override @Override
@ -719,9 +736,17 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
page.setCurrent(waybillDTO.getPageNum()); page.setCurrent(waybillDTO.getPageNum());
page.setSize(waybillDTO.getPageSize()); page.setSize(waybillDTO.getPageSize());
Long warehouseId = waybillDTO.getWarehouseId();
IPage<WarehouseWaybillVO> pageList = baseMapper.pageList(page,waybillDTO); IPage<WarehouseWaybillVO> pageList = baseMapper.pageList(page,waybillDTO);
List<WarehouseWaybillVO> records = pageList.getRecords(); List<WarehouseWaybillVO> records = pageList.getRecords();
for (WarehouseWaybillVO record : records) { for (WarehouseWaybillVO record : records) {
// Integer waybillType = record.getWaybillType();
// if(waybillType.equals(2)){
// String orderCode = record.getWaybillNo();
// DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
// record.setHandleNum(stockArticleEntity.getHandQuantity());
// }
Long waybillId = record.getId(); Long waybillId = record.getId();
List<WarehouseWayBillDetail> wayBillDetailList = warehouseWayBillDetailService.findByWaybillId(waybillId); List<WarehouseWayBillDetail> wayBillDetailList = warehouseWayBillDetailService.findByWaybillId(waybillId);
record.setDetailList(wayBillDetailList); record.setDetailList(wayBillDetailList);

Loading…
Cancel
Save