|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
package org.springblade.erpdata.service.impl; |
|
|
|
|
|
|
|
|
|
import com.alibaba.nacos.shaded.com.google.gson.Gson; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
@ -75,6 +76,9 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
String newlevdateMax = mesRbWoMapper.getNewlevdateMax(selectTime); |
|
|
|
|
apsOrderClient.upByDateMax(newlevdateMax, "SYCN_MESRBWO_TIME"); |
|
|
|
|
List<MesRbWo> mesRbWoList = mesRbWoMapper.getYieldPlanErpList(newlevdateMax); |
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(mesRbWoList); |
|
|
|
|
log.info("qyl:同步生产计划 data: {}", jsonString); |
|
|
|
|
/** |
|
|
|
|
* 有多个实体类 |
|
|
|
|
* b1. 根据零件号从`DS_PART`表中查询零件信息 |
|
|
|
|
@ -207,6 +211,9 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
String newlevdateMax=mesRbPurtosoService.getNewlevdateMax(selectTime); |
|
|
|
|
apsOrderClient.upByDateMax(newlevdateMax, "SYCN_TRANSFERCG_TIME1"); |
|
|
|
|
List<MesRbPurtoso> purtosoList=mesRbPurtosoService.getMesRbPurtosoList(newlevdateMax); |
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(purtosoList); |
|
|
|
|
log.info("qyl:同步物资转车间协作加工 data: {}", jsonString); |
|
|
|
|
List<YieldOrder> yieldOrderList=new ArrayList<>(); |
|
|
|
|
purtosoList.forEach(mesRbPurtoso -> { |
|
|
|
|
YieldOrder yieldOrder=new YieldOrder(); |
|
|
|
|
@ -259,6 +266,9 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
String newlevdateMax=mesRbPacturnrecordService.getNewlevdateMax(selectTime); |
|
|
|
|
apsOrderClient.upByDateMax(newlevdateMax, "SYCN_PACTURNRECORD_TIME"); |
|
|
|
|
List<MesRbPacturnrecord> pacturnrecordList=mesRbPacturnrecordService.getMesRbPacturnrecordList(newlevdateMax); |
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(pacturnrecordList); |
|
|
|
|
log.info("qyl:同步临时工单 data: {}", jsonString); |
|
|
|
|
List<YieldOrder> yieldOrderList=new ArrayList<>(); |
|
|
|
|
pacturnrecordList.forEach(mesRbPacturnrecord -> { |
|
|
|
|
YieldOrder yieldOrder=new YieldOrder(); |
|
|
|
|
@ -307,6 +317,9 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
String newlevdateMax=mesRbSjsoService.getNewlevdateMax(selectTime); |
|
|
|
|
apsOrderClient.upByDateMax(newlevdateMax, "SYCN_TRANSFERSJ_TIME"); |
|
|
|
|
List<MesRbSjso> rbtosoList=mesRbSjsoService.getMesRbSjsoList(newlevdateMax); |
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(rbtosoList); |
|
|
|
|
log.info("qyl:同步烧结数据 data: {}", jsonString); |
|
|
|
|
List<YieldOrder> yieldOrderList=new ArrayList<>(); |
|
|
|
|
rbtosoList.forEach(mesRbtoso -> { |
|
|
|
|
YieldOrder yieldOrder=new YieldOrder(); |
|
|
|
|
@ -348,6 +361,9 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
String dateMax=mesRbWxpromotionService.getNewlevdateMax(selectTime); |
|
|
|
|
apsOrderClient.upByDateMax(dateMax,"SYCN_BUYTRANSFER_TIME"); |
|
|
|
|
List<MesRbWxpromotion> wxpromotionList=mesRbWxpromotionService.getMesRbWxpromotionList(dateMax); |
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(wxpromotionList); |
|
|
|
|
log.info("qyl:同步采购LOTTJ data: {}", jsonString); |
|
|
|
|
List<YieldOrder> yieldOrderList=new ArrayList<>(); |
|
|
|
|
wxpromotionList.forEach(mesRbWxpromotion -> { |
|
|
|
|
YieldOrder yieldOrder=new YieldOrder(); |
|
|
|
|
@ -398,6 +414,9 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
String dateMax=erpMesRbSodelrecwxService.getNewlevdateMax(selectTime); |
|
|
|
|
apsOrderClient.upByDateMax(dateMax,"SYCN_TRANSFERWX_TIME"); |
|
|
|
|
List<MesRbSodelrecwx> mesRbSodelrecwxList=erpMesRbSodelrecwxService.getMesRbSodelrecwxList(dateMax); |
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(mesRbSodelrecwxList); |
|
|
|
|
log.info("qyl:同步外协工单 data: {}", jsonString); |
|
|
|
|
List<YieldOrder> yieldOrderList=new ArrayList<>(); |
|
|
|
|
mesRbSodelrecwxList.forEach(mesRbSodelrecwx -> { |
|
|
|
|
YieldOrder yieldOrder=new YieldOrder(); |
|
|
|
|
@ -448,6 +467,9 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
//更新配置表的基准时间
|
|
|
|
|
apsOrderClient.upByDateMax(dateMax,"SYCN_TRANSFERZG_TIME1"); |
|
|
|
|
List<MesRbSodelreczg> mesRbSodelreczgList=erpMesRbSodelreczgService.getMesRbSodelreczgList(dateMax); |
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(mesRbSodelreczgList); |
|
|
|
|
log.info("qyl:同步工艺工单 data: {}", jsonString); |
|
|
|
|
List<YieldOrder> yieldOrderList=new ArrayList<>(); |
|
|
|
|
mesRbSodelreczgList.forEach(mesRbSodelreczg -> { |
|
|
|
|
//将查询出的数据放到单个的变量中
|
|
|
|
|
@ -505,6 +527,9 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
String dateMax=erpMesRbPkService.getNewlevdateMax(selectTime); |
|
|
|
|
apsOrderClient.upByDateMax(dateMax,"SYCN_TRANSFERPK_TIME"); |
|
|
|
|
List<MesRbPk> mesRbPkList=erpMesRbPkService.getMesRbPkList(dateMax); |
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(mesRbPkList); |
|
|
|
|
log.info("qyl:同步配套工单 data: {}", jsonString); |
|
|
|
|
List<YieldOrder> yieldOrderList=new ArrayList<>(); |
|
|
|
|
mesRbPkList.forEach(mesRbPk -> { |
|
|
|
|
YieldOrder yieldOrder=new YieldOrder(); |
|
|
|
|
|