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

This commit is contained in:
王奎兴
2026-05-28 16:46:08 +08:00
5 changed files with 76 additions and 77 deletions
@@ -222,7 +222,7 @@ public class BusinessDocumentOrderImpl extends ServiceImpl<BusinessDocumentOrder
String userAreaAddress = user.getUserAreaAddress();
subOrder.setUnloadAddress(userAreaAddress);
subOrder.setUnloadName(userAreaName);
subOrder.setDischargerName(user.getUserName());
subOrder.setDischargerName(businessDeliveryDetailsLinkDTO.getDeliveryName());
subOrder.setUnloadPhone(user.getUserPhone());
subOrder.setInvoiceNumber(businessDeliveryDetailsLinkDTO.getInvoiceNumber());
subOrder.setCustomerNumber(businessDeliveryDetailsLinkDTO.getCustomerNumber());
@@ -257,7 +257,7 @@ public class BusinessDocumentOrderImpl extends ServiceImpl<BusinessDocumentOrder
unloadAddress.setAreaCode(userAreaAddress);
unloadAddress.setAreaName(userAreaName);
unloadAddress.setAddress(userAreaAddress);
unloadAddress.setContactName(user.getUserName());
unloadAddress.setContactName(businessDeliveryDetailsLinkDTO.getDeliveryName());
unloadAddress.setContactPhone(user.getUserPhone());
unloadAddress.setLayType(2L);
unloadAddress.setSort(1L);
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.aliyun.oss.ServiceException;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mhd.common.core.domain.po.UserShipperPo;
import com.mhd.common.core.utils.DateUtils;
import com.mhd.common.core.utils.OrderSequence;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.oms.domain.businessDeliveryDetailsLink.entity.BusinessDeliveryDetailsLink;
@@ -339,6 +340,8 @@ public class BusinessDocumentOrderDomainService {
} else {
tmsOrder.setSplicingOrderType(0L); // 普通单
}
//一小时候后
tmsOrder.setDocumentDate(DateUtils.addHours(new Date(), 1));
boolean istrue = businessDocumentOrderMapper.insert(tmsOrder) > 0;
@@ -213,4 +213,12 @@ public class ExecuteOrderPO extends BaseVOEntity{
@ApiModelProperty("客户编号")
@Excel(name = "客户编号")
private String customerNumber;
@ApiModelProperty("主单业务单号")
@Excel(name = "主单业务单号")
private String mainOrderNumber;
@ApiModelProperty("卸货联系人")
@Excel(name = "卸货联系人")
private String dischargerName;
}
@@ -186,20 +186,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectBusinessDocumentOrderPo">
SELECT bdo.*,
NVL(tms_count.total, 0) AS tms_order_status_count
FROM business_document_order bdo
LEFT JOIN (
SELECT child.MAIN_ORDER_NUM, COUNT(1) AS total
FROM business_document_order child
INNER JOIN NGWL_TEST_WLHY.TMS_ORDER t
ON t.EXECUTE_ORDER_NUMBER = child.goods_number
AND t.SPLICING_ORDER_TYPE = 2
INNER JOIN NGWL_TEST_WLHY.TMS_TRANSPORT_NOTE tr
ON tr.ORDER_ID = t.ID
AND tr.WAYBILL_STATUS IN (8,9,10,11)
GROUP BY child.MAIN_ORDER_NUM
) tms_count ON tms_count.MAIN_ORDER_NUM = bdo.goods_number
-- SELECT bdo.*,
-- NVL(tms_count.total, 0) AS tms_order_status_count
-- FROM business_document_order bdo
@@ -208,15 +194,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-- FROM business_document_order child
-- INNER JOIN NGWL_TEST_WLHY.TMS_ORDER t
-- ON t.EXECUTE_ORDER_NUMBER = child.goods_number
-- AND t.ORDER_STATUS IN (7, 8)
-- AND t.SPLICING_ORDER_TYPE = 2
-- INNER JOIN NGWL_TEST_WLHY.TMS_TRANSPORT_NOTE tr
-- ON tr.ORDER_ID = t.ID
-- AND tr.WAYBILL_STATUS IN (8,9,10,11)
-- GROUP BY child.MAIN_ORDER_NUM
-- ) tms_count ON tms_count.MAIN_ORDER_NUM = bdo.goods_number
SELECT bdo.*,
NVL(tms_count.total, 0) AS tms_order_status_count
FROM business_document_order bdo
LEFT JOIN (
SELECT child.MAIN_ORDER_NUM, COUNT(1) AS total
FROM business_document_order child
INNER JOIN NGWL_TEST_WLHY.TMS_ORDER t
ON t.EXECUTE_ORDER_NUMBER = child.goods_number
AND t.ORDER_STATUS IN (7, 8)
AND t.SPLICING_ORDER_TYPE =1
GROUP BY child.MAIN_ORDER_NUM
) tms_count ON tms_count.MAIN_ORDER_NUM = bdo.goods_number
</sql>
<sql id="selectBusinessDocumentOrderPo1">
<where>
bdo.SPLICING_ORDER_TYPE in (0, 2, 4)
and bdo.del_flag=1
<if test="id != null ">
and bdo.ID = #{id}
@@ -722,7 +723,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * from NGWL_TEST_USER."USER" where user_member_code =#{customerNumber}
</select>
<select id="getTmsOrderInfo" resultType="java.lang.String">
select id from NGWL_TEST_WLHY.TMS_ORDER where EXECUTE_ORDER_NUMBER = #{goodsNumber} and SPLICING_ORDER_TYPE = 2
select id from NGWL_TEST_WLHY.TMS_ORDER where EXECUTE_ORDER_NUMBER = #{goodsNumber} and SPLICING_ORDER_TYPE = 1
</select>
<select id="getTmsTransportNote" resultType="com.mhd.system.api.domain.TmsTransportNote">
select * from NGWL_TEST_WLHY.TMS_TRANSPORT_NOTE where ORDER_ID = #{tmsOrderId}
@@ -25,79 +25,66 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectExecuteOrderPo">
select * from execute_order
SELECT
eo.*,
bdo.main_order_num
FROM
execute_order eo
LEFT JOIN
BUSINESS_DOCUMENT_ORDER bdo
ON
eo.BUSINESS_DOCUMENT_NUMBER = bdo.goods_number
</sql>
<sql id="selectExecuteOrderPo1">
<where>
<!-- <if test="id != null ">-->
<!-- and ID = #{id}-->
<!-- </if>-->
<!-- <if test="realCreateBy != null and realCreateBy != ''">-->
<!-- and REAL_CREATE_BY = #{realCreateBy}-->
<!-- </if>-->
<!-- <if test="realCreateName != null and realCreateName != ''">-->
<!-- and REAL_CREATE_NAME like concat('%', #{realCreateName}, '%')-->
<!-- </if>-->
<!-- <if test="createBy != null and createBy != ''">-->
<!-- and CREATE_BY = #{createBy}-->
<!-- </if>-->
<!-- <if test="createCompanyId != null and createCompanyId != ''">-->
<!-- and CREATE_COMPANY_ID = #{createCompanyId}-->
<!-- </if>-->
<!-- <if test="createTime != null ">-->
<!-- and CREATE_TIME = #{createTime}-->
<!-- </if>-->
<!-- <if test="updateBy != null and updateBy != ''">-->
<!-- and UPDATE_BY = #{updateBy}-->
<!-- </if>-->
<!-- <if test="updateTime != null ">-->
<!-- and UPDATE_TIME = #{updateTime}-->
<!-- </if>-->
<!-- <if test="delFlag != null ">-->
<!-- and DEL_FLAG = #{delFlag}-->
<!-- </if>-->
<if test="createStartTime != null">
and CREATE_TIME &gt;= #{createStartTime}
and eo.CREATE_TIME &gt;= #{createStartTime}
</if>
<if test="createEndTime != null">
and CREATE_TIME &lt;= #{createEndTime} + 1 - 1/86400
and eo.CREATE_TIME &lt;= #{createEndTime} + 1 - 1/86400
</if>
<if test="issueStartTime != null">
and ISSUE_TIME &gt;= #{issueStartTime}
and eo.ISSUE_TIME &gt;= #{issueStartTime}
</if>
<if test="issueEndTime != null">
and ISSUE_TIME &lt;= #{issueEndTime} + 1 - 1/86400
and eo.ISSUE_TIME &lt;= #{issueEndTime} + 1 - 1/86400
</if>
<if test="goodsNumber != null and goodsNumber != ''">
and GOODS_NUMBER like concat('%', #{goodsNumber}, '%')
and eo.GOODS_NUMBER like concat('%', #{goodsNumber}, '%')
</if>
<if test="businessUnit != null and businessUnit != ''">
and BUSINESS_UNIT like concat('%', #{businessUnit}, '%')
and eo.BUSINESS_UNIT like concat('%', #{businessUnit}, '%')
</if>
<if test="orgName != null and orgName != ''">
and ORG_NAME like concat('%', #{orgName}, '%')
and eo.ORG_NAME like concat('%', #{orgName}, '%')
</if>
<if test="organizationId != null ">
and ORGANIZATION_ID = #{organizationId}
and eo.ORGANIZATION_ID = #{organizationId}
</if>
<if test="businessDocumentId != null ">
and BUSINESS_DOCUMENT_ID = #{businessDocumentId}
and eo.BUSINESS_DOCUMENT_ID = #{businessDocumentId}
</if>
<!-- 已修复:支持 单据号 OR 主订单号 模糊查询 -->
<if test="businessDocumentNumber != null and businessDocumentNumber != ''">
and BUSINESS_DOCUMENT_NUMBER like concat('%', #{businessDocumentNumber}, '%')
and (
eo.BUSINESS_DOCUMENT_NUMBER like concat('%', #{businessDocumentNumber}, '%')
or bdo.main_order_num like concat('%', #{businessDocumentNumber}, '%')
)
</if>
<if test="appointShipper != null and appointShipper != ''">
and appoint_shipper like concat('%', #{appointShipper}, '%')
and eo.appoint_shipper like concat('%', #{appointShipper}, '%')
</if>
<if test="orderStatus != null and orderStatus != ''">
and order_status = #{orderStatus}
and eo.order_status = #{orderStatus}
</if>
<if test="organizationName != null and organizationName != ''">
and ORGANIZATION_NAME like concat('%', #{organizationName}, '%')
and eo.ORGANIZATION_NAME like concat('%', #{organizationName}, '%')
</if>
<if test="topOrganizationId != null ">
and TOP_ORGANIZATION_ID = #{topOrganizationId}
and eo.TOP_ORGANIZATION_ID = #{topOrganizationId}
</if>
</where>
</sql>