diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java index ac3d7117..7646308f 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java @@ -363,6 +363,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService { * @return */ private R reportHzToSap(MesReportWork workOrder){ + Date nowTime = DateUtils.getNowDate(); SapRFW sapRFW = new SapRFW(); sapRFW.setAufnr(workOrder.getWorkorderCodeSap());//虚拟工单号 sapRFW.setGamng(workOrder.getQuantityFeedback().toString());//报工数量 @@ -403,7 +404,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService { workOrder.setUploadStatus("2"); workOrder.setUploadMsg(r.getMsg()); } - workOrder.setUploadTime(DateUtils.getNowDate()); + workOrder.setUploadTime(nowTime); mesReportWorkMapper.updateSyncSapStatus(workOrder); return R.ok(); diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index c82bc128..632865c5 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -481,7 +481,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mrw.workTime,mrw.useMan,mrw.uploadStatus,mrw.unit, pow.order_code orderCode,pow.quantity_split quantity, pow.workorder_code_sap workorderCodeSap, - pow.product_date productDate + pow.product_date productDate, + mrw.uploadTime, + mrw.uploadMsg from ( select workorder_code workorderCode, product_code productCode, @@ -493,7 +495,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sum(work_time) workTime, sum(use_man) useMan, upload_status uploadStatus, - + upload_time uploadTime, + upload_msg uploadMsg, unit from mes_report_work where del_flag = '0' and parent_order = '0' @@ -505,7 +508,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and upload_status = #{uploadStatus} group by workorder_code, product_code,product_name,machine_code,machine_name,shift_code ,upload_status,unit - + ,upload_time,upload_msg ) mrw left join pro_order_workorder pow on mrw.workorderCode = pow.workorder_code diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java index 66c3a91d..329d7bd9 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java @@ -123,6 +123,11 @@ public class QcProCheckServiceImpl implements QcProCheckService { public List getCheckTaskList(QcCheckTaskIncome qcCheckTaskIncome) { DynamicDataSourceContextHolder.push(qcCheckTaskIncome.getFactoryCode()); List dtos = qcProCheckMapper.getCheckTaskList(qcCheckTaskIncome); + for(QcCheckTaskIncome dto:dtos){ + if(StringUtils.isEmpty(dto.getWorkorderCodeSap())){ + dto.setWorkorderCodeSap(dto.getOrderNo()); + } + } return dtos; } diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcProCheckMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcProCheckMapper.xml index db99de73..69f8e4ba 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcProCheckMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcProCheckMapper.xml @@ -256,12 +256,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" qct.check_status, qct.check_man_code,qct.check_man_name, qct.check_time, qct.check_result, qct.status,qct.create_by,qct.create_time,qct.check_type, qct.noOk_quality,qct.aNoOkquality,qct.bNoOkquality,qct.cNoOkquality,qct.sample_quality - ,pow.workorder_code_sap workorderCodeSap + + ,pow.workorder_code_sap workorderCodeSap + from qc_check_task qct left join qc_check_task_user qctu on qctu.belong_to = qct.record_id - left join pro_order_workorder pow on pow.workorder_code = qct.order_no + + left join pro_order_workorder pow on pow.workorder_code = qct.order_no + - and qct.del_flag = '0' and pow.del_flag = '0' + and qct.del_flag = '0' + + and pow.del_flag = '0' + and qct.check_type = #{checkType} and qctu.check_man_code = #{checkManCode} and qct.check_status in (${checkStatus})