白坯工单导出增加字段2

master
zhaoxiaolin 12 months ago
parent 02e87e5d04
commit 07c7aa498a

@ -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<ProOrderWorkorder> selectProOrderWorkorderList999(ProOrderWorkorder proOrderWorkorder);
ProWetMaterialPlanDetail getWetMaterial(String workorderId);
}

@ -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);
}

@ -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
<where>
<if test="workorderCode != null and workorderCode != ''"> and pow.workorder_code like concat('%', #{workorderCode}, '%')</if>
<if test="workorderName != null and workorderName != ''"> and pow.workorder_name like concat('%', #{workorderName}, '%')</if>
@ -124,7 +123,7 @@
<if test="endFlag != null and endFlag != ''"> and pow.end_flag = #{endFlag}</if>
<if test="productDateStart != null "> and CONVERT(varchar(10),pow.product_date, 120) >= '${productDateStart}'</if>
<if test="productDateEnd != null "> and '${productDateEnd}%' >= CONVERT(varchar(10),pow.product_date, 120)</if>
and pow.del_flag = '0' and pwd.del_flag = '0'
and pow.del_flag = '0'
</where>
</select>
<select id="selectProOrderWorkorderByWorkorderId" parameterType="String" resultMap="ProOrderWorkorderResult">
@ -414,6 +413,12 @@
where workorder_code = #{workorderCode}
and del_flag = '0'
</select>
<select id="getWetMaterial" resultType="com.op.plan.domain.ProWetMaterialPlanDetail">
select top 1 material_code materialCode,
material_name materialName
from pro_wet_material_plan_detail
where workorder_id = #{workorderId} and del_flag = '0'
</select>
<insert id="createPrepareDetails">
insert into mes_prepare_detail

Loading…
Cancel
Save