sap报工添加关闭订单,修改工单报工状态逻辑

highway
zhaoxiaolin 1 year ago
parent 34c1159514
commit 473f789631

@ -76,4 +76,6 @@ public interface MesReportWorkMapper {
String getTitleName(MesDailyReport mesDailyReport);
List<SysFactoryDto> getWorkcenterList(MesDailyReport mesDailyReport);
public void updateWorkOrderStatus(MesReportWork work);
}

@ -277,6 +277,12 @@ public class MesPrepareServiceImpl implements IMesPrepareService {
}
work.setUploadTime(DateUtils.getNowDate());
mesReportWorkMapper.updateSyncSapStatus(work);
//关闭订单
remoteSapService.sapCloseOrder(work.getOrderCode());
//pro_work_order status->w4报工
work.setStatus("w4");
work.setUpdateTime(DateUtils.getNowDate());
mesReportWorkMapper.updateWorkOrderStatus(work);
}
}
public static void main(String args[]) {

@ -157,7 +157,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productDateEnd != null "> and #{productDateEnd} >= CONVERT(varchar(10),mrw.feedback_time, 120)</if>
</select>
<select id="getReportWorkList" resultType="com.op.mes.domain.MesReportWork">
select ow.workorder_code_sap workorderCodeSap,
select ow.order_code orderCode,
ow.workorder_code workorderCode,
ow.workorder_code_sap workorderCodeSap,
ow.route_code routeCode,
rte.tec_machine sac1,
rte.tec_man sac2,
@ -331,6 +333,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where id = #{id}
</update>
<update id="updateWorkOrderStatus">
update pro_order_workorder set status = #{status} where workorder_code = #{workorderCode}
</update>
<delete id="deleteMesReportWorkById" parameterType="String">
delete from mes_report_work where id = #{id}

Loading…
Cancel
Save