班组产量报表添加字段,报工审核添加根据是否合片工序字段判断而非写死
| | |
| | | {field: 'edgingType', width: 110, title: t('order.edgingType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'completedQuantity', width: 90, title: t('reportingWorks.completedQuantity')}, |
| | | {field: 'area', width: 100, title: t('reportingWorks.completedArea')}, |
| | | {field: 'reviewed', title: t('processCard.reviewed')}, |
| | | {field: 'examineTime', title: t('ingredientsStock.reviewedTime')}, |
| | | {field: 'productName', title: t('order.product')}, |
| | | ],//表头按钮 |
| | | |
| | |
| | | private String productName; |
| | | @ExcelProperty("编号") |
| | | private String code; |
| | | @ExcelProperty("审核人") |
| | | private String reviewed; |
| | | @ExcelProperty("审核时间") |
| | | private String examineTime; |
| | | } |
| | |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | |
| | |
| | | String result = processId.substring(index); |
| | | String technologyStr = reportingWork.get("technologyStr"); |
| | | String[] processIdStr = processId.split("/"); |
| | | String nowDate = LocalDate.now().toString(); |
| | | //获取报工工序是否为复合工程 |
| | | String laminating = reportingWorkMapper.getProcessLaminating(thisProcess); |
| | | //合片工序 |
| | | if (thisProcess.equals("夹胶") || thisProcess.equals("中空") || thisProcess.equals("包装")){ |
| | | if (laminating.equals("laminating")){ |
| | | LambdaUpdateWrapper |
| | | <ReportingWork> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper |
| | |
| | | .eq(ReportingWork::getThisProcess, reportingWork.get("process")) |
| | | .eq(ReportingWork::getReviewedState, 0) |
| | | .setSql("reviewed_state =1") |
| | | .set(ReportingWork::getReviewed, userName); |
| | | .set(ReportingWork::getReviewed, userName) |
| | | .set(ReportingWork::getExamineTime, nowDate); |
| | | reportingWorkMapper.update(null, updateWrapper); |
| | | }else { |
| | | reportingWorkMapper.ReviewReportingWorkMp(processIdStr[0],reportingWork.get("process"),technologyStr,userName); |
| | |
| | | <result column="area" property="area"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="code" property="code"/> |
| | | <result column="reviewed" property="reviewed"/> |
| | | <result column="examine_time" property="examineTime"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="scheduleProductionScheduleMap" type="com.example.erp.dto.pp.ScheduleProductionScheduleDTO"> |
| | |
| | | rwd.completed_quantity as completed_quantity, |
| | | ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area, |
| | | od.product_name, |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code, |
| | | rw.reviewed, |
| | | rw.examine_time |
| | | FROM |
| | | reporting_work as rw left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id |
| | | left join flow_card as fc on fc.order_id=rw.order_id and fc.process_id=rw.process_id and fc.order_number=rwd.order_number and fc.technology_number=rwd.technology_number |
| | |
| | | <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 ,rw.reviewed=#{userName} |
| | | set rw.reviewed_state = 1 ,rw.reviewed=#{userName},rw.examine_time=NOW() |
| | | where rw.process_id = #{substring} and rw.this_process=#{process} |
| | | and POSITION(rwd.technology_number in #{result}) and reviewed_state=0 |
| | | </update> |