散租推送优化

This commit is contained in:
zhou-hongcheng
2026-02-28 17:08:48 +08:00
parent c92e3e0ec6
commit c6484779ea
4 changed files with 24 additions and 11 deletions
@@ -71,4 +71,7 @@ public class BusinessDataPushDTO{
@ApiModelProperty("费用类型code(服务项)")
private String serviceItemsCode;
@ApiModelProperty("数据来源(1-系统生成,2-手工录入)")
private Integer dataSources;
}
@@ -459,6 +459,7 @@ public class LeaseApplicationService {
businessDataPushDTO.setSettlementEntityId(leasePO.getShipperId());
businessDataPushDTO.setSecondSubjectCode("26WMS01");
businessDataPushDTO.setServiceItemsCode("26WMS费用");
businessDataPushDTO.setDataSources(1);
bmsServiceFeign.businessDocumentApiSave(businessDataPushDTO);
}
log.info("定时任务整租推送到bms触发--结束");
@@ -485,9 +486,6 @@ public class LeaseApplicationService {
if (ajaxResult != null && "200".equals(String.valueOf(ajaxResult.get("code")))) {
List<MaterialInventoryPO> batchDetailFeignPOList = JSON.parseArray(
com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult.get("data")), MaterialInventoryPO.class);
if (batchDetailFeignPOList != null && batchDetailFeignPOList.size() > 0) {
continue;//没有货跳过
}
totalVolume = batchDetailFeignPOList.stream()
.map(MaterialInventoryPO::getVolume)
.filter(Objects::nonNull)
@@ -507,6 +505,7 @@ public class LeaseApplicationService {
businessDataPushDTO.setSettlementEntityId(leasePO.getShipperId());
businessDataPushDTO.setSecondSubjectCode("26WMS01");
businessDataPushDTO.setServiceItemsCode("26WMS费用");
businessDataPushDTO.setDataSources(1);
bmsServiceFeign.businessDocumentApiSave(businessDataPushDTO);
}
}
@@ -109,7 +109,7 @@ public class LeaseApi extends BaseController{
}
/**
* 批量作废租赁
* 整租同步到bms计费单据
*/
@ApiOperation("整租同步到bms计费单据")
@GetMapping("/wholeRentSynchronization")
@@ -119,4 +119,15 @@ public class LeaseApi extends BaseController{
return AjaxResult.success();
}
/**
* 散租同步到bms计费单据
*/
@ApiOperation("散租同步到bms计费单据")
@GetMapping("/scatteredRentalSynchronization")
public AjaxResult ScatteredRentalSynchronization()
{
leaseApplicationService.ScatteredRentalSynchronization();
return AjaxResult.success();
}
}
@@ -99,13 +99,13 @@ public class MaterialInventoryApplicationService {
}
}
// 前端有传warehouseId则优先使用传参;未传时才使用"用户关联仓库"作为默认值
if (materialInventoryDO.getWarehouseId() == null) {
AssociationWarehouseCacheDO associationWarehouseCacheDO =
SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
if (associationWarehouseCacheDO != null) {
materialInventoryDO.setWarehouseId(associationWarehouseCacheDO.getWarehouseId());
}
}
// if (materialInventoryDO.getWarehouseId() == null) {
// AssociationWarehouseCacheDO associationWarehouseCacheDO =
// SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
// if (associationWarehouseCacheDO != null) {
// materialInventoryDO.setWarehouseId(associationWarehouseCacheDO.getWarehouseId());
// }
// }
}
return materialInventoryDomainService.queryList(materialInventoryDO);
}