| | |
| | | <result property="thisProcess" column="this_process"/> |
| | | <result property="reviewedState" column="reviewed_state"/> |
| | | <result property="previousProcessQuantity" column="previous_process_quantity"/> |
| | | <result property="reportingWorkTime" column="reporting_work_time"/> |
| | | <result property="thisCompletedQuantity" column="this_completed_quantity"/> |
| | | <result property="thisWornQuantity" column="this_worn_quantity"/> |
| | | <result property="deviceName" column="device_name"/> |
| | | <result property="teamsGroupsName" column="teams_groups_name"/> |
| | | <result property="reviewedState" column="reviewed_state"/> |
| | | <result property="reportingWorkId" column="reporting_work_id"/> |
| | | <result property="processId" column="process_id"/> |
| | | <result property="completedArea" column="completedArea"/> |
| | | <result property="wornArea" column="wornArea"/> |
| | | |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result property="customerId" column="customer_id"/> |
| | | <result property="customerName" column="customer_name"/> |
| | | <result property="project" column="project"/> |
| | | <result property="batch" column="batch"/> |
| | | </association> |
| | | <association property="flowCard" javaType="com.example.erp.entity.pp.FlowCard"> |
| | | <result property="orderId" column="order_id"/> |
| | |
| | | </association> |
| | | <association property="reportingWorkDetail" javaType="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | <result property="completedQuantity" column="completed_quantity"/> |
| | | </association> |
| | | <association property="orderGlassDetail" javaType="com.example.erp.entity.sd.OrderGlassDetail"> |
| | | <result property="area" column="area"/> |
| | | </association> |
| | | |
| | | </resultMap> |
| | |
| | | od.shape, |
| | | fc.quantity -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as quantity, |
| | | fc.quantity -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as completedQuantity, |
| | | odpd.reporting_work_num_count as completed, |
| | | odpd.broken_num as onceBroken |
| | | odpd.reporting_work_num as completed, |
| | | odpd.broken_num as onceBroken, |
| | | if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag -- 判断是否已经完成,已经完成不序号和同序号数量相同才能提交 |
| | | FROM |
| | | sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | |
| | | od.shape, |
| | | odpds.reporting_work_num -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as quantity, |
| | | odpds.reporting_work_num -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as completedQuantity, |
| | | odpd.reporting_work_num_count as completed, |
| | | odpd.reporting_work_num as completed, |
| | | odpd.broken_num as onceBroken, |
| | | ogd.`group` |
| | | ogd.`group`, |
| | | if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag -- 判断是否已经完成,已经完成不序号和同序号数量相同才能提交 |
| | | |
| | | |
| | | FROM |
| | |
| | | a.completed_quantity as 'completedQuantity', -- 完工数 |
| | | a.breakage_quantity as 'breakageQuantity', -- 破损数 |
| | | f.completed_quantity as thisQuantitySum ,-- 本工序完工和 |
| | | if(c.quantity-f.completed_quantity = 0 ,true,false) as saveFlag, |
| | | <if test="nextProcess != null and nextProcess != ''"> -- 非最后一道工序 |
| | | ifnull(g.completed_quantity,0) as nextQuantitySum, -- 后工序已完成 |
| | | if((f.completed_quantity |
| | |
| | | 0, |
| | | (a.completed_quantity-f.completed_quantity |
| | | +ifnull(g.completed_quantity,0)) |
| | | ) as minQuantity1 -- 修改最小数 |
| | | ) as minQuantity -- 修改最小数 |
| | | </if> |
| | | <if test="nextProcess == null or nextProcess == ''"> -- 最后一道工序 |
| | | c.received_quantity, -- 已入库数量 |
| | | c.inventory_quantity, -- 库存数量 |
| | | # c.received_quantity, -- 已入库数量 |
| | | # c.inventory_quantity, -- 库存数量 |
| | | if(ifnull(inventory_quantity,0) |
| | | -ifnull(c.received_quantity,0) |
| | | >= a.completed_quantity,0, |
| | | (a.completed_quantity-(ifnull(c.inventory_quantity,0) |
| | | -ifnull(c.received_quantity,0))) |
| | | ) |
| | | as minQuantity2 -- 修改最小数 |
| | | as minQuantity -- 修改最小数 |
| | | </if> |
| | | -- e.thisQuantitySum |
| | | from |
| | |
| | | </if> |
| | | where a.reporting_work_id = #{reportingWorkId} |
| | | </select> |
| | | <select id="selectReportingWorkMp" resultMap="reportingWorkMap"> |
| | | <select id="selectReportingWorkMp" resultMap="reportingWorkMap"> |
| | | select rw.reporting_work_id, |
| | | (rw.reporting_work_time) as reporting_work_time, |
| | | o.order_id, |