diff --git a/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderMapper.java b/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderMapper.java index 9bd51bca..3dd9f5ae 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderMapper.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderMapper.java @@ -2,6 +2,7 @@ package com.op.plan.mapper; import com.op.plan.domain.ProOrder; import com.op.plan.domain.ProOrderWorkorder; +import com.op.plan.domain.ProWetMaterialPlanDetail; import com.op.system.api.domain.dto.BaseBomComponentDTO; import com.op.system.api.domain.dto.MesPrepareDTO; import com.op.system.api.domain.dto.MesPrepareDetailDTO; @@ -168,5 +169,7 @@ public interface ProOrderWorkorderMapper { ProOrderWorkorder getPWorkOrder(ProOrderWorkorder whiteOrder); List selectProOrderWorkorderList999(ProOrderWorkorder proOrderWorkorder); + + ProWetMaterialPlanDetail getWetMaterial(String workorderId); } diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java index 45379106..a23f44bf 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java @@ -99,6 +99,11 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { String factoryCode = request.getHeader(key.substring(8)).replace("ds_",""); if("999".equals(factoryCode)){ workorderList = proOrderWorkorderMapper.selectProOrderWorkorderList999(proOrderWorkorder); + for(ProOrderWorkorder owork:workorderList){ + ProWetMaterialPlanDetail material = proOrderWorkorderMapper.getWetMaterial(owork.getWorkorderId()); + owork.setMaterialCode(material.getMaterialCode()); + owork.setMaterialName(material.getMaterialName()); + } }else{ workorderList = proOrderWorkorderMapper.selectProOrderWorkorderList(proOrderWorkorder); } diff --git a/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderMapper.xml b/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderMapper.xml index 9ca3c1f2..4de92b32 100644 --- a/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderMapper.xml +++ b/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderMapper.xml @@ -94,7 +94,6 @@ pow.update_by, pow.update_time, pow.prod_type, pow.factory_code , pow.end_flag , pow.car_num,pow.sort_no, pow.workorder_code_sap,pwd.material_code,pwd.material_name from pro_order_workorder pow - left join pro_wet_material_plan_detail pwd on pow.workorder_id = pwd.workorder_id and pow.workorder_code like concat('%', #{workorderCode}, '%') and pow.workorder_name like concat('%', #{workorderName}, '%') @@ -124,7 +123,7 @@ and pow.end_flag = #{endFlag} and CONVERT(varchar(10),pow.product_date, 120) >= '${productDateStart}' and '${productDateEnd}%' >= CONVERT(varchar(10),pow.product_date, 120) - and pow.del_flag = '0' and pwd.del_flag = '0' + and pow.del_flag = '0' + insert into mes_prepare_detail