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. 2
      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<>();
private Integer handleNum;
}

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

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

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

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);
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);

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("},");
continue;
}
updownGoodsEntity = new WarehouseUpdownGoodsEntity();
updownGoodsEntity.setCreateUser(1714696768639311873L);
updownGoodsEntity.setUpdateUser(1714696768639311873L);
updownGoodsEntity.setCreateDept(1649331096241836033L);
updownGoodsEntity.setTenantId(TenantNum.HUITONGCODE);
updownGoodsEntity = new WarehouseUpdownGoodsEntity();
updownGoodsEntity.setUpdownTypeId(updownTypeEntity.getId());
updownGoodsEntity.setAreaId(updownTypeEntity.getAreaId());
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);
}
private void createStockArticle(WarehouseWaybillEntity warehouseWaybill) {
private void createStockArticle(WarehouseWaybillEntity warehouseWaybill,Integer allNum) {
//判断新系统是否有这条订单数据
//自动生成的在库订单就用运单号作为订单号
String waybillNo = warehouseWaybill.getWaybillNo();
@ -254,6 +254,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity.setAcceptWarehouseId(warehouseWaybill.getDestinationWarehouseId());
distributionStockArticleEntity.setAcceptWarehouseName(warehouseWaybill.getDestinationWarehouseName());
distributionStockArticleEntity.setIsZero("1");
distributionStockArticleEntity.setIncomingNum(allNum);
distributionStockArticleEntity.setTenantId(TenantNum.HUITONGCODE);
List<WarehouseWayBillDetail> details = warehouseWayBillDetailService.findByWaybillId(waybillId);
@ -694,23 +695,39 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
}
@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);
// QueryWrapper<WarehouseWaybillEntity> queryWrapper = Condition.getQueryWrapper(warehouseWaybill, WarehouseWaybillEntity.class);
//获取当前登录人仓库
List<BasicdataWarehouseEntity> myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse();
List<Long> collect = myWatchWarehouse.stream()
.map(BasicdataWarehouseEntity::getId)
.collect(Collectors.toList());
// queryWrapper.lambda()
// .in(collect.size() > 0, WarehouseWaybillEntity::getDepartureWarehouseId, collect)
// .or()
// .in(collect.size() > 0, WarehouseWaybillEntity::getDestinationWarehouseId, collect);
if(!collect.isEmpty()){
warehouseWaybillDTO.setDepartureWarehouseIds(collect);
warehouseWaybillDTO.setDestinationWarehouseIds(collect);
Long warehouseId = warehouseWaybillDTO.getWarehouseId();
IPage<WarehouseWaybillVO> warehouseWaybillVOIPage = baseMapper.pageInfo(page, warehouseWaybillDTO);
List<WarehouseWaybillVO> records = warehouseWaybillVOIPage.getRecords();
for (WarehouseWaybillVO record : records) {
String deliveryMethodStr = DictBizCache.getValue(DictBizConstant.DELIVERY_METHOD, record.getDeliveryMethod());
record.setDeliveryMethodStr(deliveryMethodStr);
String urgencyStr = DictBizCache.getValue(DictBizConstant.URGENCY, record.getUrgency());
record.setUrgencyStr(urgencyStr);
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
@ -719,9 +736,17 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
page.setCurrent(waybillDTO.getPageNum());
page.setSize(waybillDTO.getPageSize());
Long warehouseId = waybillDTO.getWarehouseId();
IPage<WarehouseWaybillVO> pageList = baseMapper.pageList(page,waybillDTO);
List<WarehouseWaybillVO> records = pageList.getRecords();
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();
List<WarehouseWayBillDetail> wayBillDetailList = warehouseWayBillDetailService.findByWaybillId(waybillId);
record.setDetailList(wayBillDetailList);

Loading…
Cancel
Save