Merge remote-tracking branch 'lanjuMes/master' into mes

master
FCD 2 months ago
commit c8b4f3128f

@ -6,6 +6,8 @@ import com.op.common.core.utils.StringUtils;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.web.page.TableDataInfo;
import com.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.quality.domain.*;
import com.op.quality.service.*;
import com.op.system.api.RemoteMesService;

@ -460,22 +460,37 @@
pow.workorder_name checkLoc,
pow.product_code materialCode,
pow.product_name materialName,
pow.quantity_split quality,
-- pow.quantity_split quality,
pow.unit,
be.workshop_code supplierCode,
be.workshop_name supplierName,
pow.product_date incomeTime,
pow.workorder_name checkLoc,
pow.prod_type productType,
qct.check_no
qct.check_no,
SUM(mr.quantity_feedback) AS quality
from pro_order_workorder pow
left join base_equipment be on be.equipment_code = pow.workorder_name and be.equipment_type_code = 'equ_type_bzx'
left join qc_check_task qct on qct.order_no = pow.workorder_code and qct.check_type='checkTypeCP' and qct.del_flag = '0'
LEFT JOIN mes_report_work mr ON mr.workorder_code = pow.workorder_code
where pow.del_flag = '0'
and pow.status = #{status} and pow.parent_order = '0'
and (pow.product_date = CONVERT(varchar(10),GETDATE(), 120)
or pow.product_date = CONVERT(varchar(10),DATEADD(DAY, -1, GETDATE()), 120))
and qct.check_no is null
GROUP BY -- 新增分组以计算总和
pow.factory_code,
pow.workorder_code,
pow.workorder_name,
pow.product_code,
pow.product_name,
pow.quantity_split,
pow.unit,
be.workshop_code,
be.workshop_name,
pow.product_date,
pow.prod_type,
qct.check_no;
</select>
<select id="getLastXJTask" resultType="com.op.quality.domain.QcCheckTaskProduce">
select top 1

Loading…
Cancel
Save