| | |
| | | <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="qualityInspector" column="quality_inspector"/> |
| | | <result property="qualityInsTime" column="quality_ins_time"/> |
| | | <result property="notes" column="notes"/> |
| | | <result property="reviewed" column="reviewed"/> |
| | | |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result property="customerId" column="customer_id"/> |
| | |
| | | <select id="SelectTechnologicalProcess"> |
| | | select ifnull((select ogd.process |
| | | from sd.order_glass_detail as ogd |
| | | left join sd.`order` as o on o.order_id=ogd.order_id |
| | | where ogd.production_id = LEFT(#{processIdStr}, 11) |
| | | and o.create_order>0 |
| | | and POSITION(ogd.technology_number in #{technologyStr}) |
| | | limit 1),'') as process |
| | | |
| | |
| | | and b.order_id = SUBSTR(#{processId} from 1 for 10) |
| | | and b.process = #{thisProcess} |
| | | and b.process_id = a.process_id |
| | | left join (select sum(patch_num) as patchNumSum,order_sort,technology_number,process_id |
| | | left join (select sum(patch_num) as patchNumSum,order_sort,technology_number,process_id,patch_processes |
| | | from patch_log |
| | | group by order_sort,technology_number) as c |
| | | group by process_id,order_sort,technology_number,patch_processes) as c |
| | | on |
| | | c.process_id = a.process_id |
| | | and c.order_sort = a.order_number |
| | | and c.technology_number = a.technology_number |
| | | |
| | | and c.patch_processes= #{thisProcess} |
| | | where |
| | | a.process_id=SUBSTR(#{processId} from 1 for 14) |
| | | and a.order_number = #{orderNumber} |
| | |
| | | rw.device_name, |
| | | rw.teams_groups_name, |
| | | rw.reviewed_state, |
| | | rw.notes |
| | | rw.notes, |
| | | rw.reviewed |
| | | # (IF(rw.reviewed_state = 0, '未审核', IF(rw.reviewed_state = 1, '审核通过', '审核不通过'))) as reviewed_state |
| | | from sd.order as o |
| | | left join sd.order_glass_detail as ogd on ogd.order_id = o.order_id |
| | |
| | | and rw.reporting_work_time 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 != ''"> |
| | | and rw.reporting_work_id regexp #{reportingWork.reportingWorkId} |
| | | </if> |
| | |
| | | where rw.reviewed_state != 2 |
| | | and rw.reporting_work_time 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 != ''"> |
| | | and rw.reporting_work_id regexp #{reportingWork.reportingWorkId} |
| | | </if> |
| | |
| | | <update id="ReviewReportingWorkMp"> |
| | | update reporting_work as rw |
| | | left join reporting_work_detail as rwd on rw.reporting_work_id = rwd.reporting_work_id |
| | | set rw.reviewed_state = 1 |
| | | set rw.reviewed_state = 1 ,rw.reviewed=#{userName} |
| | | where rw.process_id = #{substring} and rw.this_process=#{process} |
| | | and POSITION(rwd.technology_number in #{result}) and reviewed_state=0 |
| | | </update> |