|
@@ -493,7 +493,7 @@
|
|
where a.rn_asc=1 or a.rn_desc=1 order by a.PLANENDDATE
|
|
where a.rn_asc=1 or a.rn_desc=1 order by a.PLANENDDATE
|
|
</select>
|
|
</select>
|
|
<select id="selectPageReport" resultType="com.rongwei.bsentity.vo.ProductPlanReportVo">
|
|
<select id="selectPageReport" resultType="com.rongwei.bsentity.vo.ProductPlanReportVo">
|
|
- SELECT a.* from (SELECT
|
|
|
|
|
|
+ SELECT a.*,ado.DELIVERYOFFSET,IF(ado.DELIVERYOFFSET > 0,'是','否') AS 'isOutPromiseDate' from (SELECT
|
|
apo.*,
|
|
apo.*,
|
|
abo.PROMISEDATESTART AS 'promiseDateStart',
|
|
abo.PROMISEDATESTART AS 'promiseDateStart',
|
|
abo.PROMISEDATEEND AS 'promiseDateEnd',
|
|
abo.PROMISEDATEEND AS 'promiseDateEnd',
|
|
@@ -577,7 +577,7 @@
|
|
<if test="param.tenantId != ''">
|
|
<if test="param.tenantId != ''">
|
|
AND apo.TENANTID = #{param.tenantId}
|
|
AND apo.TENANTID = #{param.tenantId}
|
|
</if>
|
|
</if>
|
|
- )a
|
|
|
|
|
|
+ )a left join (select BLANKID,MAX(DELIVERYOFFSET) AS 'DELIVERYOFFSET' from aps_delivery_offset where DELETED = 0 GROUP BY BLANKID) ado ON a.blankId = ado.BLANKID
|
|
<where>
|
|
<where>
|
|
<if test="param.productionOrderStatus != ''">
|
|
<if test="param.productionOrderStatus != ''">
|
|
AND a.productionOrderStatus = #{param.productionOrderStatus}
|
|
AND a.productionOrderStatus = #{param.productionOrderStatus}
|
|
@@ -588,6 +588,9 @@
|
|
<if test="param.customOrderNo != ''">
|
|
<if test="param.customOrderNo != ''">
|
|
AND a.newCustomOrderNo like concat('%',#{param.customOrderNo},'%')
|
|
AND a.newCustomOrderNo like concat('%',#{param.customOrderNo},'%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="param.isOutPromiseDate != ''">
|
|
|
|
+ AND IF(ado.DELIVERYOFFSET > 0,'是','否') = #{param.isOutPromiseDate}
|
|
|
|
+ </if>
|
|
<if test="param.likeSearchAll != ''">
|
|
<if test="param.likeSearchAll != ''">
|
|
AND (a.newCustomName like concat('%',#{param.likeSearchAll},'%')
|
|
AND (a.newCustomName like concat('%',#{param.likeSearchAll},'%')
|
|
OR a.newCustomOrderNo like concat('%',#{param.likeSearchAll},'%')
|
|
OR a.newCustomOrderNo like concat('%',#{param.likeSearchAll},'%')
|