|
@@ -83,6 +83,61 @@
|
|
|
m.createtime DESC
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getMonthListStatreWork" resultType="org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail">
|
|
|
+ SELECT
|
|
|
+ mo.cost_item_code as itemCode,
|
|
|
+ ftp.memo as workCenter,
|
|
|
+ m.MoId,
|
|
|
+ m.MoCode,
|
|
|
+ i.cInvCode,
|
|
|
+ i.cInvStd,
|
|
|
+ i.cInvName,
|
|
|
+ i.cInvDefine13,
|
|
|
+ mo.Qty,
|
|
|
+ mo.QualifiedInQty,
|
|
|
+ m.Define12,
|
|
|
+ m.cost_item_code as costItemCode,
|
|
|
+ mm.StartDate,
|
|
|
+ mm.DueDate,
|
|
|
+ mo.SortSeq as sortSeq,
|
|
|
+ mo.SAPStatus as SAPStatus,
|
|
|
+ ftp.id as fbsTechnologicalProcessId,
|
|
|
+ ftp.name as fbsTechnologicalProcessName,
|
|
|
+ (select group_concat(name ORDER BY sort separator '-->') from fbs_technological_process_item where ftp.id=fbs_technological_process_id) as processSequence
|
|
|
+ FROM
|
|
|
+ mom_orderdetail mo
|
|
|
+ LEFT JOIN mom_order m ON mo.MoId= m.MoId
|
|
|
+ LEFT JOIN Inventory i ON mo.InvCode= i.cInvCode
|
|
|
+ left join mom_morder mm on mo.MoDId=mm.MoDId
|
|
|
+ left join fbs_technological_process ftp on mo.InvCode=ftp.name
|
|
|
+ WHERE
|
|
|
+
|
|
|
+
|
|
|
+ MONTH,
|
|
|
+ mm.StartDate,
|
|
|
+ getdate()) =0-->
|
|
|
+ mo.Status = 3
|
|
|
+ <if test="fbsMomOrderdetail.mocode!=null and fbsMomOrderdetail.mocode!=''">
|
|
|
+ AND m.MoCode=#{fbsMomOrderdetail.mocode}
|
|
|
+ </if>
|
|
|
+ <if test="fbsMomOrderdetail.itemCode!=null and fbsMomOrderdetail.itemCode!=''">
|
|
|
+ AND mo.cost_item_code=#{fbsMomOrderdetail.itemCode}
|
|
|
+ </if>
|
|
|
+ <if test="fbsMomOrderdetail.costitemname!=null and fbsMomOrderdetail.costitemname!=''">
|
|
|
+ AND mo.CostItemName LIKE "%" #{fbsMomOrderdetail.costitemname} "%"
|
|
|
+ </if>
|
|
|
+ <if test="fbsMomOrderdetail.workCenter!=null and fbsMomOrderdetail.workCenter!=''">
|
|
|
+ AND ftp.memo LIKE "%" #{fbsMomOrderdetail.workCenter} "%"
|
|
|
+ </if>
|
|
|
+ <if test="fbsMomOrderdetail.cinvcode!=null and fbsMomOrderdetail.cinvcode!=''">
|
|
|
+ AND i.cInvCode=#{fbsMomOrderdetail.cinvcode}
|
|
|
+ </if>
|
|
|
+ <if test="fbsMomOrderdetail.cinvname!=null and fbsMomOrderdetail.cinvname!=''">
|
|
|
+ AND i.cInvName=#{fbsMomOrderdetail.cinvname}
|
|
|
+ </if>
|
|
|
+ ORDER BY
|
|
|
+ m.createtime DESC
|
|
|
+ </select>
|
|
|
|
|
|
<select id="getMonthListStatre" resultType="org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail">
|
|
|
SELECT
|