| | |
| | | <result column="total_thickness" property="totalThickness"/> |
| | | <result column="thickness" property="thickness"/> |
| | | </association> |
| | | |
| | | |
| | | <!--<result column="g_typeId" property="glassTypes.typeId"/> |
| | | <result column="g_type" property="glassTypes.type"/>--> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap id="damageDetailsTableMap" type="com.example.erp.entity.pp.DamageDetails"> |
| | | <result column="responsible_process" property="responsibleProcess"/> |
| | | <result column="responsible_team" property="responsibleTeam"/> |
| | | <result column="breakage_type" property="breakageType"/> |
| | | <result column="breakage_reason" property="breakageReason"/> |
| | | <result column="breakage_quantity" property="breakageQuantity"/> |
| | | <result column="area" property="area"/> |
| | | <result column="reporting_work_id" property="reportingWork.reportingWorkId"/> |
| | | <result column="reporting_work_time" property="reportingWork.reportingWorkTime"/> |
| | | <result column="this_process" property="reportingWork.thisProcess"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="order_id" property="order.orderId"/> |
| | | <result column="glass_child" property="orderGlassDetail.glassChild"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 流程卡进度--> |
| | | <select id="processCardProgressMp"> |
| | | select |
| | |
| | | where a.order_id = #{orderId} |
| | | |
| | | </select> |
| | | |
| | | <select id="getProcessBreaking" resultMap="damageDetailsTableMap"> |
| | | select rw.reporting_work_id,rw.reporting_work_time,dd.responsible_process,dd.responsible_team, |
| | | dd.breakage_type,dd.breakage_reason,ROUND((dd.breakage_quantity)) as breakage_quantity, |
| | | round(ogd.child_width*ogd.child_height*(dd.breakage_quantity)/1000000,2) as area,rw.this_process, |
| | | o.project,o.order_id,ogd.glass_child |
| | | from |
| | | damage_details as dd |
| | | left join reporting_work as rw |
| | | on rw.reporting_work_id=dd.reporting_work_id |
| | | left join sd.order as o |
| | | on rw.order_id=o.order_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id=o.order_id and ogd.order_number=dd.order_number |
| | | and ogd.technology_number and dd.technology_number |
| | | where date(rw.reporting_work_time)>=#{startDate} and date(rw.reporting_work_time) <= #{endDate} |
| | | and rw.this_worn_quantity>0 and dd.available=0 |
| | | and reviewed_state!=2 |
| | | and rw.this_process!=dd.responsible_process |
| | | GROUP BY dd.id |
| | | order by dd.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | | <select id="getProcessBreakingTotal"> |
| | | select |
| | | CEILING(count(dd.id)/#{pageSize}) as 'pageTotal', |
| | | count(distinct dd.id) as 'total' |
| | | from |
| | | damage_details as dd |
| | | left join reporting_work as rw |
| | | on rw.reporting_work_id=dd.reporting_work_id |
| | | left join sd.order as o |
| | | on rw.order_id=o.order_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id=o.order_id and ogd.order_number=dd.order_number |
| | | and ogd.technology_number and dd.technology_number |
| | | where date(rw.reporting_work_time)>=#{startDate} and date(rw.reporting_work_time) <= #{endDate} |
| | | and rw.this_worn_quantity>0 and dd.available=0 |
| | | and reviewed_state!=2 |
| | | and rw.this_process!=dd.responsible_process |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | | </mapper> |