Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
zhou-hongcheng
2026-03-14 17:38:12 +08:00
8 changed files with 63 additions and 20 deletions
@@ -31,4 +31,6 @@ public interface BillManageMapper extends BaseMapper<BillManage>
String getServiceItemsCodeNc(@Param("name") String name);
String getNcUrl(@Param("interfaceType") String interfaceType,@Param("organizationName") String organizationName,@Param("organizationId") Long organizationId);
}
@@ -192,13 +192,11 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
count++;
List<Ysitem> ysitemList=new ArrayList<Ysitem>();
String url = "";
SysDepartInterfaceInfoDTO query= new SysDepartInterfaceInfoDTO();
query.setOrganizationId(reconciliation.getOrganizationId());
query.setOrganizationName(reconciliation.getOrganizationName());
query.setInterfaceType("nc");
List<SysDepartInterfaceInfoPo> urlList = thirdPartyServiceFeign.queryList(query);
if (urlList != null && urlList.size() > 0) {
url = urlList.get(0).getInterfaceTypeValue();
Long organizationId = reconciliation.getOrganizationId();
String organizationName = reconciliation.getOrganizationName();
String ncUrl = billManageMapper.getNcUrl("nc", organizationName, organizationId);
if (ncUrl!=null&&ncUrl!="") {
url = ncUrl;
} else {
throw new ServiceException("未找到该组织的推送地址!");
}
@@ -438,13 +436,11 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
ReconciliationDTO reconciliationDTO=new ReconciliationDTO();
reconciliationDTO.setInnerNumber(reconciliation.getBillNumber());
String url = "";
SysDepartInterfaceInfoDTO query= new SysDepartInterfaceInfoDTO();
query.setOrganizationId(reconciliation.getOrganizationId());
query.setOrganizationName(reconciliation.getOrganizationName());
query.setInterfaceType("nc");
List<SysDepartInterfaceInfoPo> urlList = thirdPartyServiceFeign.queryList(query);
if (urlList != null && urlList.size() > 0) {
url = urlList.get(0).getInterfaceTypeValue();
Long organizationId = reconciliation.getOrganizationId();
String organizationName = reconciliation.getOrganizationName();
String ncUrl = billManageMapper.getNcUrl("nc", organizationName, organizationId);
if (ncUrl!=null&&ncUrl!="") {
url = ncUrl;
} else {
throw new ServiceException("未找到该组织的推送地址!");
}
@@ -101,7 +101,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getServiceItemsCodeNc" parameterType="java.lang.String" resultType="java.lang.String">
SELECT SERVICE_ITEMS_CODE_NC FROM NGWL_TEST_SYSTEM."SERVICE_ITEMS_MANAGE" where DEL_FLAG = '0' and SERVICE_ITEMS_NAME = #{name} limit 1
SELECT SERVICE_ITEMS_CODE_NC FROM NGWL_TEST_SYSTEM."SERVICE_ITEMS_MANAGE" where DEL_FLAG = '1' and SERVICE_ITEMS_NAME = #{name} limit 1
</select>
<select id="getNcUrl" resultType="java.lang.String">
SELECT INTERFACE_TYPE_VALUE FROM NGWL_TEST_THIRDPARTY."SYS_DEPART_INTERFACE_INFO"
where DEL_FLAG = '1'
and organization_id = #{organizationId}
and organization_name = #{organizationName}
and interface_type = #{interfaceType} limit 1
</select>
</mapper>
@@ -413,8 +413,9 @@ public class StockReceiptOrderApplicationService {
if (CollectionUtils.isEmpty(children)) {
continue;
}
// 主行 alreadyReceiptQuantity = 主行 receiptQuantity + 所有子项 receiptQuantity
BigDecimal alreadyReceiptQuantitySum = parent.getReceiptQuantity() != null ? parent.getReceiptQuantity() : BigDecimal.ZERO;
// 若存在 parent_copy(子项 uniqueId 与主项相同),主行数量仅取自子项,避免重复累加
boolean hasParentCopy = children.stream().anyMatch(c -> parent.getUniqueId() != null && parent.getUniqueId().equals(c.getUniqueId()));
BigDecimal alreadyReceiptQuantitySum = (hasParentCopy ? BigDecimal.ZERO : (parent.getReceiptQuantity() != null ? parent.getReceiptQuantity() : BigDecimal.ZERO));
Integer maxReceiptStatus = parent.getReceiptStatus();
for (ReceiptMaterialDetailPO child : children) {
if (child.getReceiptQuantity() != null) {
@@ -194,6 +194,20 @@ public class StockShelfOrderApplicationService {
ShelfMaterialDetailDO shelfMaterialDetailDO = new ShelfMaterialDetailDO();
shelfMaterialDetailDO.setShelfOrderNumber(stockShelfOrderPO.getShelfOrderNumber());
List<ShelfMaterialDetailPO> shelfMaterialDetailPOList = shelfMaterialDetailDomainService.queryListChildren(shelfMaterialDetailDO);
// 主项无子项时:添加 parent_copy 到 children,供详情页展示(详情页从 children 读取数据)
for (ShelfMaterialDetailPO parent : shelfMaterialDetailPOList) {
if (CollectionUtils.isEmpty(parent.getChildren())) {
ShelfMaterialDetailPO parentCopy = new ShelfMaterialDetailPO();
BeanUtils.copyProperties(parent, parentCopy, "children");
parentCopy.setLevel(2);
parentCopy.setParentUniqueId(parent.getUniqueId());
parentCopy.setQuantity(null);
parentCopy.setChildren(new ArrayList<>());
List<ShelfMaterialDetailPO> children = new ArrayList<>();
children.add(parentCopy);
parent.setChildren(children);
}
}
// 性能优化:批量获取批次属性,避免N+1查询问题
// 1. 收集所有唯一的materialBaseInfoId
@@ -1,5 +1,6 @@
package com.mhd.wms.domain.stockOutTaskOrder.repository.po;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseVOEntity;
import com.mhd.wms.domain.taskPickingMaterialDetail.repository.po.TaskPickingMaterialDetailPO;
@@ -68,4 +69,12 @@ public class TaskMaterialPO extends BaseVOEntity {
@ApiModelProperty("拣货作业物料详情")
private List<TaskPickingMaterialDetailPO> taskPickingMaterialDetailList;
/**
* 与 taskPickingMaterialDetailList 同值,供详情页从 children 读取(与收货单、上架单结构一致)
*/
@JsonProperty("children")
public List<TaskPickingMaterialDetailPO> getChildren() {
return taskPickingMaterialDetailList;
}
}
@@ -228,10 +228,23 @@ public class StockReceiptOrderDomainService {
receiptMaterialDetailPOChildren.setQuantity(null);
});
} else {
// 主项无子项时(点击分批收货前):确保主项也有批次属性,否则 PDA 不显示
// 主项无子项时:添加 parent_copy 到 children,供详情页展示(详情页从 children 读取数据)
if (CollectionUtils.isEmpty(receiptMaterialDetailPO.getMaterialMoreDetailList())) {
receiptMaterialDetailPO.setMaterialMoreDetailList(getMaterialMoreDetail(receiptMaterialDetailPO));
}
ReceiptMaterialDetailPO parentCopy = new ReceiptMaterialDetailPO();
BeanUtils.copyProperties(receiptMaterialDetailPO, parentCopy, "children");
parentCopy.setLevel(2);
parentCopy.setParentUniqueId(receiptMaterialDetailPO.getUniqueId());
parentCopy.setQuantity(null);
parentCopy.setChildren(new ArrayList<>());
if (CollectionUtils.isEmpty(parentCopy.getMaterialMoreDetailList())) {
parentCopy.setMaterialMoreDetailList(receiptMaterialDetailPO.getMaterialMoreDetailList());
}
List<InMaterialDetailSerialNumberPO> serialList = inMaterialDetailSerialNumberMap.get(receiptMaterialDetailPO.getUniqueId());
parentCopy.setMaterialDetailSerialNumberList(serialList != null ? serialList : new ArrayList<>());
receiptMaterialDetailPOChildrenList = new ArrayList<>();
receiptMaterialDetailPOChildrenList.add(parentCopy);
}
receiptMaterialDetailPO.setChildren(receiptMaterialDetailPOChildrenList != null ? receiptMaterialDetailPOChildrenList : new ArrayList<>());
});
@@ -38,7 +38,7 @@ public class StockOutOrderAppApi extends BaseController {
/**
* 分页查询出库单列表PDA复核查询
* 查询条件warehouse_id用户关联仓库check_operators_by当前用户check_status&lt;3
* 查询条件warehouse_id用户关联仓库check_operators_by当前用户check_status&gt;2
*/
@ApiOperation("查询出库单列表")
@GetMapping("/list")
@@ -50,7 +50,7 @@ public class StockOutOrderAppApi extends BaseController {
stockOutOrderDO.setCheckOperatorsBy(userPo.getUserId());
stockOutOrderDO.setOrganizationId(userPo.getOrganizationId());
stockOutOrderDO.setTopOrganizationId(userPo.getTopOrganizationId());
stockOutOrderDO.setLtCheckStatus(3);
stockOutOrderDO.setGtCheckStatus(2);
stockOutOrderDO.setDelFlag(1);
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
if (associationWarehouseCacheDO != null) {