|
|
|
|
@ -343,17 +343,23 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public void synTemporary() { |
|
|
|
|
public void synTemporary(String yoCode) { |
|
|
|
|
List<MesRbPacturnrecord> pacturnrecordList = null; |
|
|
|
|
if(StringUtils.isNotEmpty(yoCode)){ |
|
|
|
|
pacturnrecordList=mesRbPacturnrecordService.getMesRbPacturnrecordList(null,yoCode); |
|
|
|
|
}else { |
|
|
|
|
//用字典的code查更新日期
|
|
|
|
|
String selectTime=apsOrderClient.getSelectTime("SYCN_PACTURNRECORD_TIME"); |
|
|
|
|
//从ERP视图查询最大日期
|
|
|
|
|
// String newlevdateMax=mesRbPacturnrecordService.getNewlevdateMax(selectTime);
|
|
|
|
|
// apsOrderClient.upByDateMax(newlevdateMax, "SYCN_PACTURNRECORD_TIME");
|
|
|
|
|
List<MesRbPacturnrecord> pacturnrecordList=mesRbPacturnrecordService.getMesRbPacturnrecordList(selectTime); |
|
|
|
|
//String newlevdateMax=mesRbPacturnrecordService.getNewlevdateMax(selectTime);
|
|
|
|
|
//apsOrderClient.upByDateMax(newlevdateMax, "SYCN_PACTURNRECORD_TIME");
|
|
|
|
|
pacturnrecordList=mesRbPacturnrecordService.getMesRbPacturnrecordList(selectTime,null); |
|
|
|
|
if(!CollectionUtils.isEmpty(pacturnrecordList)){ |
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
apsOrderClient.upByDateMax(sdf.format(pacturnrecordList.get(0).getCdate()), "SYCN_PACTURNRECORD_TIME"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(pacturnrecordList); |
|
|
|
|
log.info("qyl:同步临时工单 data: {}", jsonString); |
|
|
|
|
@ -419,16 +425,21 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public void synSinter() { |
|
|
|
|
public void synSinter(String yoCode) { |
|
|
|
|
List<MesRbSjso> rbtosoList = null; |
|
|
|
|
if(StringUtils.isNotEmpty(yoCode)){ |
|
|
|
|
rbtosoList=mesRbSjsoService.getMesRbSjsoList(null,yoCode); |
|
|
|
|
}else { |
|
|
|
|
//用字典的code查更新日期
|
|
|
|
|
String selectTime=apsOrderClient.getSelectTime("SYCN_TRANSFERSJ_TIME"); |
|
|
|
|
//从ERP视图查询最大日期
|
|
|
|
|
// String newlevdateMax=mesRbSjsoService.getNewlevdateMax(selectTime);
|
|
|
|
|
// apsOrderClient.upByDateMax(newlevdateMax, "SYCN_TRANSFERSJ_TIME");
|
|
|
|
|
List<MesRbSjso> rbtosoList=mesRbSjsoService.getMesRbSjsoList(selectTime); |
|
|
|
|
rbtosoList=mesRbSjsoService.getMesRbSjsoList(selectTime,null); |
|
|
|
|
if(!CollectionUtils.isEmpty(rbtosoList)){ |
|
|
|
|
apsOrderClient.upByDateMax(DateFormatUtils.format(rbtosoList.get(0).getNewlevdate(),"yyyy-MM-dd HH:mm:ss"), "SYCN_TRANSFERSJ_TIME"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(rbtosoList); |
|
|
|
|
log.info("qyl:同步烧结数据 data: {}", jsonString); |
|
|
|
|
@ -488,16 +499,20 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public void synPurchaseLOTTJ() { |
|
|
|
|
public void synPurchaseLOTTJ(String yoCode) { |
|
|
|
|
List<MesRbWxpromotion> wxpromotionList= null; |
|
|
|
|
if(StringUtils.isNotEmpty(yoCode)){ |
|
|
|
|
wxpromotionList=mesRbWxpromotionService.getMesRbWxpromotionList(null,yoCode); |
|
|
|
|
}else { |
|
|
|
|
//用字典的code查更新日期
|
|
|
|
|
String selectTime=apsOrderClient.getSelectTime("SYCN_BUYTRANSFER_TIME"); |
|
|
|
|
//从ERP视图查询最大日期
|
|
|
|
|
// String dateMax=mesRbWxpromotionService.getNewlevdateMax(selectTime);
|
|
|
|
|
// apsOrderClient.upByDateMax(dateMax,"SYCN_BUYTRANSFER_TIME");
|
|
|
|
|
List<MesRbWxpromotion> wxpromotionList=mesRbWxpromotionService.getMesRbWxpromotionList(selectTime); |
|
|
|
|
wxpromotionList=mesRbWxpromotionService.getMesRbWxpromotionList(selectTime,null); |
|
|
|
|
if(!CollectionUtils.isEmpty(wxpromotionList)){ |
|
|
|
|
apsOrderClient.upByDateMax(DateFormatUtils.format(wxpromotionList.get(0).getNewlevdate(),"yyyy-MM-dd HH:mm:ss"),"SYCN_BUYTRANSFER_TIME"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(wxpromotionList); |
|
|
|
|
log.info("qyl:同步采购LOTTJ data: {}", jsonString); |
|
|
|
|
@ -571,16 +586,21 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public void synOutsourcing() { |
|
|
|
|
public void synOutsourcing(String yoCode) { |
|
|
|
|
List<MesRbSodelrecwx> mesRbSodelrecwxList= null; |
|
|
|
|
if(StringUtils.isNotEmpty(yoCode)){ |
|
|
|
|
mesRbSodelrecwxList=erpMesRbSodelrecwxService.getMesRbSodelrecwxList(null,yoCode); |
|
|
|
|
}else { |
|
|
|
|
//用字典的code查更新日期
|
|
|
|
|
String selectTime=apsOrderClient.getSelectTime("SYCN_TRANSFERWX_TIME"); |
|
|
|
|
//从ERP视图查询最大日期
|
|
|
|
|
// String dateMax=erpMesRbSodelrecwxService.getNewlevdateMax(selectTime);
|
|
|
|
|
// apsOrderClient.upByDateMax(dateMax,"SYCN_TRANSFERWX_TIME");
|
|
|
|
|
List<MesRbSodelrecwx> mesRbSodelrecwxList=erpMesRbSodelrecwxService.getMesRbSodelrecwxList(selectTime); |
|
|
|
|
mesRbSodelrecwxList=erpMesRbSodelrecwxService.getMesRbSodelrecwxList(selectTime,null); |
|
|
|
|
if(!CollectionUtils.isEmpty(mesRbSodelrecwxList)){ |
|
|
|
|
apsOrderClient.upByDateMax(DateFormatUtils.format(mesRbSodelrecwxList.get(0).getNewlevdate(),"yyyy-MM-dd HH:mm:ss"),"SYCN_TRANSFERWX_TIME"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(mesRbSodelrecwxList); |
|
|
|
|
log.info("qyl:同步外协工单 data: {}", jsonString); |
|
|
|
|
@ -649,17 +669,19 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public void synCraft() { |
|
|
|
|
public void synCraft(String yoCode) { |
|
|
|
|
List<MesRbSodelreczg> mesRbSodelreczgList= null; |
|
|
|
|
if(StringUtils.isNotEmpty(yoCode)){ |
|
|
|
|
mesRbSodelreczgList=erpMesRbSodelreczgService.getMesRbSodelreczgList(null,yoCode); |
|
|
|
|
}else { |
|
|
|
|
//用字典的code查更新日期
|
|
|
|
|
String selectTime=apsOrderClient.getSelectTime("SYCN_TRANSFERZG_TIME1"); |
|
|
|
|
//从ERP视图查询最大日期
|
|
|
|
|
// String dateMax=erpMesRbSodelreczgService.getNewlevdateMax(selectTime);
|
|
|
|
|
// //更新配置表的基准时间
|
|
|
|
|
// apsOrderClient.upByDateMax(dateMax,"SYCN_TRANSFERZG_TIME1");
|
|
|
|
|
List<MesRbSodelreczg> mesRbSodelreczgList=erpMesRbSodelreczgService.getMesRbSodelreczgList(selectTime); |
|
|
|
|
mesRbSodelreczgList=erpMesRbSodelreczgService.getMesRbSodelreczgList(selectTime,null); |
|
|
|
|
if(!CollectionUtils.isEmpty(mesRbSodelreczgList)){ |
|
|
|
|
apsOrderClient.upByDateMax(DateFormatUtils.format(mesRbSodelreczgList.get(0).getNewlevdate(),"yyyy-MM-dd HH:mm:ss"),"SYCN_TRANSFERZG_TIME1"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(mesRbSodelreczgList); |
|
|
|
|
log.info("qyl:同步工艺工单 data: {}", jsonString); |
|
|
|
|
@ -736,16 +758,20 @@ public class ErpMesRbWoServiceImpl implements IErpMesRbWoService { |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public void synSupportingFacilities() { |
|
|
|
|
public void synSupportingFacilities(String yoCode) { |
|
|
|
|
List<MesRbPk> mesRbPkList= null; |
|
|
|
|
if(StringUtils.isNotEmpty(yoCode)){ |
|
|
|
|
mesRbPkList=erpMesRbPkService.getMesRbPkList(null,yoCode); |
|
|
|
|
}else { |
|
|
|
|
//用字典的code查更新日期
|
|
|
|
|
String selectTime=apsOrderClient.getSelectTime("SYCN_TRANSFERPK_TIME"); |
|
|
|
|
//从ERP视图查询最大日期
|
|
|
|
|
// String dateMax=erpMesRbPkService.getNewlevdateMax(selectTime);
|
|
|
|
|
// apsOrderClient.upByDateMax(dateMax,"SYCN_TRANSFERPK_TIME");
|
|
|
|
|
List<MesRbPk> mesRbPkList=erpMesRbPkService.getMesRbPkList(selectTime); |
|
|
|
|
mesRbPkList=erpMesRbPkService.getMesRbPkList(selectTime,null); |
|
|
|
|
if(!CollectionUtils.isEmpty(mesRbPkList)){ |
|
|
|
|
apsOrderClient.upByDateMax(DateFormatUtils.format(mesRbPkList.get(0).getNewlevdate(),"yyyy-MM-dd HH:mm:ss"),"SYCN_TRANSFERPK_TIME"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Gson gson = new Gson(); |
|
|
|
|
String jsonString = gson.toJson(mesRbPkList); |
|
|
|
|
log.info("qyl:同步配套工单 data: {}", jsonString); |
|
|
|
|
|