Browse Source

2024/06/17

master
zelian_wu 2 years ago
parent
commit
cff5b58687
  1. 4
      src/main/java/com/spring/modules/shipment/entity/Shipment.java
  2. 9
      src/main/resources/mapper/shipment/ShipmentDetailMapper.xml
  3. 6
      src/main/resources/mapper/shipment/ShipmentMapper.xml

4
src/main/java/com/spring/modules/shipment/entity/Shipment.java

@ -22,4 +22,8 @@ public class Shipment {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date shipDate; private Date shipDate;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createDate;
} }

9
src/main/resources/mapper/shipment/ShipmentDetailMapper.xml

@ -3,13 +3,9 @@
<mapper namespace="com.spring.modules.shipment.mapper.ShipmentDetailMapper"> <mapper namespace="com.spring.modules.shipment.mapper.ShipmentDetailMapper">
<sql id="columns"> <sql id="columns">
ifs.shipment_id, ifs.shipment_id,
ifs.site,
ifs.part_no, ifs.part_no,
ifs.part_desc,
ifs.sale_qty, ifs.sale_qty,
ifs.order_ref1,
ifs.order_ref2,
ifs.order_ref3
ifs.lot_batch_no
</sql> </sql>
<select id="queryShipmentDetailList" resultType="com.spring.modules.shipment.entity.ShipmentDetail"> <select id="queryShipmentDetailList" resultType="com.spring.modules.shipment.entity.ShipmentDetail">
@ -17,9 +13,6 @@
<include refid="columns"/> <include refid="columns"/>
from v_ifs_shipment_line ifs from v_ifs_shipment_line ifs
<where> <where>
<if test="site != null and site != ''">
and ifs.site = #{site}
</if>
<if test="shipmentId != null and shipmentId != ''"> <if test="shipmentId != null and shipmentId != ''">
and ifs.shipment_id like #{shipmentId} and ifs.shipment_id like #{shipmentId}
</if> </if>

6
src/main/resources/mapper/shipment/ShipmentMapper.xml

@ -3,14 +3,14 @@
<mapper namespace="com.spring.modules.shipment.mapper.ShipmentMapper"> <mapper namespace="com.spring.modules.shipment.mapper.ShipmentMapper">
<sql id="columns"> <sql id="columns">
ifs.shipment_id,ifs.site,ifs.customer_no,ifs.customer_name,ifs.ship_date
ifs.shipment_id,ifs.site,ifs.customer_no,ifs.customer_name,ifs.ship_date,sh.create_date
</sql> </sql>
<select id="selectShipmentList" resultType="com.spring.modules.shipment.entity.Shipment"> <select id="selectShipmentList" resultType="com.spring.modules.shipment.entity.Shipment">
select <include refid="columns" /> from v_ifs_shipment ifs select <include refid="columns" /> from v_ifs_shipment ifs
left join shipment_handle sh on ifs.shipment_id = sh.shipment_id and ifs.site = sh.site left join shipment_handle sh on ifs.shipment_id = sh.shipment_id and ifs.site = sh.site
<where> <where>
and sh.create_date is null
<!-- and sh.create_date is null-->
<if test="site != null and site != ''"> <if test="site != null and site != ''">
and ifs.site = #{site} and ifs.site = #{site}
</if> </if>
@ -30,7 +30,7 @@
select <include refid="columns" /> from v_ifs_shipment ifs select <include refid="columns" /> from v_ifs_shipment ifs
left join shipment_handle sh on ifs.shipment_id = sh.shipment_id and ifs.site = sh.site left join shipment_handle sh on ifs.shipment_id = sh.shipment_id and ifs.site = sh.site
<where> <where>
and sh.create_date is null
<!-- and sh.create_date is null-->
<if test="params.site != null and params.site != ''"> <if test="params.site != null and params.site != ''">
and ifs.site = #{params.site} and ifs.site = #{params.site}
</if> </if>

Loading…
Cancel
Save