chenlu
2024-12-05 a8557c74bba5f4f7ff9b2f3c9d84db5d24bb43cd
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -430,11 +430,11 @@
                ifnull(g.completed_quantity,0) as nextQuantitySum,  -- 后工序已完成
                if((f.completed_quantity
                    -ifnull(g.completed_quantity,0))
                    >=
                    >
                   a.completed_quantity,
                    0,
                   (a.completed_quantity-f.completed_quantity
                       +ifnull(g.completed_quantity,0))
                   (f.completed_quantity
                       -ifnull(g.completed_quantity,0))
                    )  as minQuantity -- 修改最小数
            </if>
            <if test="nextProcess == null or nextProcess == ''">  -- 最后一道工序
@@ -533,7 +533,7 @@
                           on rwd.reporting_work_id = rw.reporting_work_id and rwd.order_number = ogd.order_number and
                              rwd.technology_number = ogd.technology_number
        where rw.reviewed_state != 2
          and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
          and DATE_FORMAT((rw.reporting_work_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2}
          and position(#{orderId} in rw.order_id)
          and rw.reviewed_state!=-1
          and o.create_order>0
@@ -576,7 +576,7 @@
                           on rwd.reporting_work_id = rw.reporting_work_id and rwd.order_number = ogd.order_number and
                              rwd.technology_number = ogd.technology_number
        where rw.reviewed_state != 2
          and rw.reporting_work_time between #{selectTime1} and #{selectTime2} and position(#{orderId} in rw.order_id)
          and DATE_FORMAT((rw.reporting_work_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2} and position(#{orderId} in rw.order_id)
          and rw.reviewed_state!=-1
          and o.create_order>0
        <if test="reportingWork.reportingWorkId != null and reportingWork.reportingWorkId != ''">
@@ -705,7 +705,7 @@
                 left join damage_details as dd on dd.reporting_work_id=rw.reporting_work_id
        where rw.reviewed_state != 2
          and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
          and DATE_FORMAT((rw.reporting_work_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2}
          and position(#{processId} in rw.process_id)
          and position(#{state} in dd.quality_ins_status)
          and rw.reviewed_state!=-1
@@ -735,7 +735,7 @@
                 left join damage_details as dd on dd.reporting_work_id=rw.reporting_work_id
        where rw.reviewed_state != 2
          and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
          and DATE_FORMAT((rw.reporting_work_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2}
          and position(#{processId} in rw.process_id)
          and position(#{state} in dd.quality_ins_status)
          and rw.reviewed_state!=-1