| | |
| | | <id column="id" property="id" /> |
| | | <result column="product_no" property="productNo" /> |
| | | <result column="production_operation_task_id" property="productionOperationTaskId" /> |
| | | <result column="report_type" property="reportType" /> |
| | | <result column="audit_status" property="auditStatus" /> |
| | | <result column="audit_remark" property="auditRemark" /> |
| | | <result column="dept_id" property="deptId" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | |
| | | |
| | | <select id="listPageProductionProductMainDto" resultType="com.ruoyi.production.bean.dto.ProductionProductMainDto"> |
| | | select ppm.*, |
| | | ppm.product_no as reportNo, |
| | | case ppm.report_type |
| | | when 0 then '合格' |
| | | when 1 then '轻微返工' |
| | | when 2 then '严重返工' |
| | | when 3 then '报废' |
| | | else '未知' |
| | | end as reportTypeName, |
| | | case ppm.audit_status |
| | | when 0 then '待审核' |
| | | when 1 then '审核通过' |
| | | when 2 then '审核不通过' |
| | | else '未知' |
| | | end as auditStatusName, |
| | | pot.work_order_no as workOrderNo, |
| | | case pot.status |
| | | when 1 then '待确认' |
| | |
| | | <if test="c.productNo != null and c.productNo != ''"> |
| | | and ppm.product_no like concat('%', #{c.productNo}, '%') |
| | | </if> |
| | | <if test="c.auditStatus != null"> |
| | | and ppm.audit_status = #{c.auditStatus} |
| | | </if> |
| | | <if test="c.reportType != null"> |
| | | and ppm.report_type = #{c.reportType} |
| | | </if> |
| | | <if test="c.workOrderNo != null and c.workOrderNo != ''"> |
| | | and pot.work_order_no like concat('%', #{c.workOrderNo}, '%') |
| | | </if> |
| | |
| | | |
| | | <select id="listProductionDetails" resultType="com.ruoyi.production.bean.dto.ProductionProductMainDto"> |
| | | select ppm.*, |
| | | ppm.product_no as reportNo, |
| | | case ppm.report_type |
| | | when 0 then '合格' |
| | | when 1 then '轻微返工' |
| | | when 2 then '严重返工' |
| | | when 3 then '报废' |
| | | else '未知' |
| | | end as reportTypeName, |
| | | case ppm.audit_status |
| | | when 0 then '待审核' |
| | | when 1 then '审核通过' |
| | | when 2 then '审核不通过' |
| | | else '未知' |
| | | end as auditStatusName, |
| | | pot.work_order_no as workOrderNo, |
| | | p.product_name as productName, |
| | | pm.model as productModelName, |
| | |
| | | left join production_product_output ppo on ppo.production_product_main_id = ppm.id |
| | | <where> |
| | | <if test="c != null"> |
| | | <if test="c.auditStatus != null"> |
| | | and ppm.audit_status = #{c.auditStatus} |
| | | </if> |
| | | <if test="c.reportType != null"> |
| | | and ppm.report_type = #{c.reportType} |
| | | </if> |
| | | <if test="c.productCategory != null and c.productCategory != ''"> |
| | | and p_parent.product_name like concat('%', #{c.productCategory}, '%') |
| | | </if> |