diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareDetailMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareDetailMapper.java index dcf271f2..141e9258 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareDetailMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareDetailMapper.java @@ -67,8 +67,8 @@ public interface MesPrepareDetailMapper { /** * 通过主领料单id查询领料详情list - * @param prepareId + * @param workorderCode * @return */ - List selectPrintPrepareDetailList(String prepareId); + List selectPrintPrepareDetailList(String workorderCode); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareDetailServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareDetailServiceImpl.java index fe9e9250..c4f01a1a 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareDetailServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareDetailServiceImpl.java @@ -16,7 +16,7 @@ import com.op.mes.service.IMesPrepareDetailService; /** * mes备料单明细Service业务层处理 - * + * * @author Open Platform * @date 2023-08-04 */ @@ -29,7 +29,7 @@ public class MesPrepareDetailServiceImpl implements IMesPrepareDetailService { /** * 查询mes备料单明细 - * + * * @param recordId mes备料单明细主键 * @return mes备料单明细 */ @@ -40,7 +40,7 @@ public class MesPrepareDetailServiceImpl implements IMesPrepareDetailService { /** * 查询mes备料单明细列表 - * + * * @param mesPrepareDetail mes备料单明细 * @return mes备料单明细 */ @@ -51,7 +51,7 @@ public class MesPrepareDetailServiceImpl implements IMesPrepareDetailService { /** * 新增mes备料单明细 - * + * * @param mesPrepareDetail mes备料单明细 * @return 结果 */ @@ -63,7 +63,7 @@ public class MesPrepareDetailServiceImpl implements IMesPrepareDetailService { /** * 修改mes备料单明细 - * + * * @param mesPrepareDetail mes备料单明细 * @return 结果 */ @@ -75,7 +75,7 @@ public class MesPrepareDetailServiceImpl implements IMesPrepareDetailService { /** * 批量删除mes备料单明细 - * + * * @param recordIds 需要删除的mes备料单明细主键 * @return 结果 */ @@ -86,7 +86,7 @@ public class MesPrepareDetailServiceImpl implements IMesPrepareDetailService { /** * 删除mes备料单明细信息 - * + * * @param recordId mes备料单明细主键 * @return 结果 */ @@ -103,7 +103,7 @@ public class MesPrepareDetailServiceImpl implements IMesPrepareDetailService { @DS("#header.poolName") public AjaxResult printPrepareByCode(String workorderCode) { MesPrepare mesPrepare = mesPrepareMapper.selectMesPrepareByCode(workorderCode); - List mesPrepareDetailList = mesPrepareDetailMapper.selectPrintPrepareDetailList(mesPrepare.getPrepareId()); + List mesPrepareDetailList = mesPrepareDetailMapper.selectPrintPrepareDetailList(workorderCode); PrintPrepareVo printPrepareVo = new PrintPrepareVo(); printPrepareVo.setMesPrepare(mesPrepare); printPrepareVo.setMesPrepareDetailList(mesPrepareDetailList); diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml index 80e2e6bc..20656537 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml @@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + @@ -63,12 +63,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where record_id = #{recordId} - + select + mp.workorder_name workorderCode, + mpd.material_code materialCode, + mpd.material_name materialName, + mpd.quantity, + mpd.unit, + mpd.status, + mpd.fund_quanlity fundQuanlity, + mpd.factory_code factoryCode, + ow.product_date productDate + from pro_order_workorder ow + left join mes_prepare mp on ow.workorder_code = mp.workorder_code + left join mes_prepare_detail mpd on mp.prepare_id = mpd.prepare_id + where ow.belong_work_order = #{workorderCode} + order by mp.workorder_name desc diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareMapper.xml index 9cfc6423..71e99649 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareMapper.xml @@ -39,63 +39,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select prepare_id, workorder_code, workorder_name, parent_order, order_id, order_code, product_id, product_code, prod_type, product_name, product_spc, wet_detail_plan_id, product_date, shift_id, ancestors, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, material_code, material_name, material_spc, unit, quantity from mes_prepare + select prepare_id, workorder_code, workorder_name, parent_order, order_id, order_code, product_id, + product_code, prod_type, product_name, product_spc, wet_detail_plan_id, product_date, + shift_id, ancestors, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, + update_by, update_time, factory_code, material_code, material_name, material_spc, unit, quantity + from mes_prepare - select - ms.prepare_id, - ms.workorder_code, - ms.workorder_name, - ms.parent_order, - ms.order_id, - ms.order_code, - ms.product_id, - ms.product_code, - ms.prod_type, - ms.product_name, - ms.product_spc, - ms.wet_detail_plan_id, - ms.product_date, - ms.shift_id, - ms.ancestors, - ms.status, - ms.remark, - ms.attr1, - ms.attr2, - ms.attr3, - ms.attr4, - ms.create_by, - ms.create_time, - ms.update_by, - ms.update_time, - ms.factory_code, - msd.prepare_id id, - msd.material_code, - msd.material_name, - msd.material_spc, - msd.unit, - msd.quantity - from mes_prepare ms,mes_prepare_detail msd + ms.workorder_name workorderCodeSap, + ow.workorder_code workorderCode, + ow.product_code productCode, + ow.product_name productName, + ow.product_date productDate, + ow.quantity_split quantity, + ow.unit + from mes_prepare ms + left join pro_order_workorder ow on ms.workorder_code = ow.workorder_code - and workorder_code like concat('%', #{workorderCode}, '%') - and workorder_name like concat('%', #{workorderName}, '%') - and parent_order = #{parentOrder} - and order_id like concat('%', #{orderId}, '%') - and order_code = #{orderCode} - and product_id = #{productId} - and product_code like concat('%', #{productCode}, '%') - and prod_type = #{prodType} - and product_name like concat('%', #{productName}, '%') - and product_spc = #{productSpc} - and wet_detail_plan_id = #{wetDetailPlanId} - and product_date = #{productDate} - and shift_id = #{shiftId} - and ancestors = #{ancestors} - and ms.status = #{status} - and factory_code = #{factoryCode} + ow.del_flag = '0' and ow.parent_order = '0' + and ow.workorder_code like concat('%', #{workorderCode}, '%') + and ms.workorder_name like concat('%', #{workorderCodeSap}, '%') + and ow.product_code like concat('%', #{productCode}, '%') + and ow.product_name like concat('%', #{productName}, '%') + and ow.product_date = #{productDate} and ms.del_flag = '0' + order by ow.product_date desc diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcInterfaceMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcInterfaceMapper.xml index d93c44fc..6de815bf 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcInterfaceMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcInterfaceMapper.xml @@ -57,4 +57,101 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" group by qctd.project_no,qctd.rule_name + + + diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml index 861aa428..79ff3c66 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml @@ -24,8 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" qct.supplier_code supplierCode,qct.supplier_name supplierName, count(0) batchs,sum(qct.quality) nums from qc_check_task qct - left join qc_check_type qc on qc.order_code = qct.check_type - where qc.type_code = #{qc.typeCode} + where qct.type_code = #{qc.typeCode} and qct.del_flag = '0' and CONVERT(varchar(7),qct.income_time, 120) = #{qc.yearMonth} @@ -44,8 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" qct.supplier_code supplierCode,qct.supplier_name supplierName, sum(qct.noOk_quality) noOkNums from qc_check_task qct - left join qc_check_type qc on qc.order_code = qct.check_type - where qc.type_code = #{qc.typeCode} + where qct.type_code = #{qc.typeCode} and qct.del_flag = '0' and CONVERT(varchar(7),qct.income_time, 120) = #{qc.yearMonth} @@ -66,8 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" qct.cNoOkquality, qct.income_time from qc_check_task qct - left join qc_check_type qc on qc.order_code = qct.check_type - where qct.del_flag = '0' and qc.type_code = 'produce' + where qct.del_flag = '0' and qct.type_code = 'produce' and qct.material_code in (${materialCode}) and qct.supplier_code = #{workCenter} and CONVERT(varchar(10),qct.income_time, 120) >= #{ymArrayStart} @@ -77,8 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select distinct qct.material_code materialCode, qct.material_name materialName from qc_check_task qct - left join qc_check_type qc on qc.order_code = qct.check_type - where qct.del_flag = '0' and qc.type_code = 'produce' + where qct.del_flag = '0' and qct.type_code = 'produce' and qct.material_code in (${materialCode}) and qct.supplier_code = #{workCenter} and CONVERT(varchar(10),qct.income_time, 120) >= #{ymArrayStart} @@ -95,8 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sum(qct.cNoOkquality) cNoOkquality, CONVERT(varchar(7),qct.income_time, 120) incomeTime from qc_check_task qct - left join qc_check_type qc on qc.order_code = qct.check_type - where qct.del_flag = '0' and qc.type_code = 'produce' + where qct.del_flag = '0' and qct.type_code = 'produce' and qct.material_code in (${materialCode}) and qct.supplier_code = #{workCenter} and CONVERT(varchar(10),qct.income_time, 120) >= #{ymArrayStart}