Merge remote-tracking branch 'origin/master'

highway
wws 12 months ago
commit 54a704ba27

@ -280,7 +280,7 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService {
for (EquPlanEquSpare spare : spares) { for (EquPlanEquSpare spare : spares) {
EquSpareApply apply = new EquSpareApply(); EquSpareApply apply = new EquSpareApply();
apply.setApplyId(IdUtils.fastSimpleUUID()); apply.setApplyId(IdUtils.fastSimpleUUID());
apply.setApplyCode("A"+DateUtils.dateTimeNow(DateUtils.YYYYMMDD)+String.format("%03d",applySerialNum)); apply.setApplyCode("A"+orderCode+String.format("%03d",applySerialNum));
applySerialNum++; applySerialNum++;
apply.setSpareCode(spare.getMaterialCode()); apply.setSpareCode(spare.getMaterialCode());
apply.setSpareName(spare.getMaterialDesc()); apply.setSpareName(spare.getMaterialDesc());
@ -305,6 +305,7 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService {
System.out.println(plan.getPlanCode()+"========equ_spare_apply:"+sce); System.out.println(plan.getPlanCode()+"========equ_spare_apply:"+sce);
} }
/**equ_plan_detail->equ_order_detail*******************************************************/ /**equ_plan_detail->equ_order_detail*******************************************************/
EquPlanDetail itqo = new EquPlanDetail(); EquPlanDetail itqo = new EquPlanDetail();
itqo.setParentCode(plan.getPlanEquId()); itqo.setParentCode(plan.getPlanEquId());

@ -22,6 +22,7 @@
ep.work_outsourcing_unit workOutsourcingUnit, ep.work_outsourcing_unit workOutsourcingUnit,
ep.work_connection workConnection, ep.work_connection workConnection,
ep.work_reason workReason, ep.work_reason workReason,
ep.plan_code planCode,
epe.equipment_code equipmentCode, epe.equipment_code equipmentCode,
epe.equipment_name equipmentName, epe.equipment_name equipmentName,
epe.id planEquId epe.id planEquId

@ -79,6 +79,7 @@ public class SapController extends BaseController {
R<List<Map<String, String>>> dateSources0 = remoteUserService.getPoolNameList(sysUser); R<List<Map<String, String>>> dateSources0 = remoteUserService.getPoolNameList(sysUser);
List<Map<String, String>> dateSources = dateSources0.getData(); List<Map<String, String>> dateSources = dateSources0.getData();
dateSources.forEach(dateSource -> { dateSources.forEach(dateSource -> {
if(!"ds_999".equals(dateSource.get("poolName"))){
logger.info("++++++++++++" + dateSource.get("poolName") + "++++product同步开始++++++++++"); logger.info("++++++++++++" + dateSource.get("poolName") + "++++product同步开始++++++++++");
DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key
@ -96,6 +97,7 @@ public class SapController extends BaseController {
logger.error("++++++++++++" + dateSource.get("poolName")+"同步product失败错误信息"+ r.getMsg()); logger.error("++++++++++++" + dateSource.get("poolName")+"同步product失败错误信息"+ r.getMsg());
} }
logger.error("++++++++++++" + dateSource.get("poolName") + "++++product同步结束++++++++++"); logger.error("++++++++++++" + dateSource.get("poolName") + "++++product同步结束++++++++++");
}
}); });
return R.ok(); return R.ok();
} }
@ -115,11 +117,12 @@ public class SapController extends BaseController {
R<List<Map<String, String>>> dateSources0 = remoteUserService.getPoolNameList(sysUser); R<List<Map<String, String>>> dateSources0 = remoteUserService.getPoolNameList(sysUser);
List<Map<String, String>> dateSources = dateSources0.getData(); List<Map<String, String>> dateSources = dateSources0.getData();
dateSources.forEach(dateSource -> { dateSources.forEach(dateSource -> {
if(!"ds_999".equals(dateSource.get("poolName"))) {
logger.info("++++++++++++" + dateSource.get("poolName") + "++++bom同步开始++++++++++"); logger.info("++++++++++++" + dateSource.get("poolName") + "++++bom同步开始++++++++++");
DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key
Date maxTime0 = sapBomMapper.getProductMaxTime(); Date maxTime0 = sapBomMapper.getProductMaxTime();
if(maxTime0 != null){ if (maxTime0 != null) {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.setTime(maxTime0); calendar.setTime(maxTime0);
calendar.add(Calendar.DAY_OF_YEAR, 1); calendar.add(Calendar.DAY_OF_YEAR, 1);
@ -128,10 +131,11 @@ public class SapController extends BaseController {
} }
R r = sapBomService.bomSync(qo); R r = sapBomService.bomSync(qo);
if(r.getCode()!=200){ if (r.getCode() != 200) {
logger.error("++++++++++++" + dateSource.get("poolName")+"同步bom失败错误信息"+ r.getMsg()); logger.error("++++++++++++" + dateSource.get("poolName") + "同步bom失败错误信息" + r.getMsg());
} }
logger.error("++++++++++++" + dateSource.get("poolName") + "++++bom同步结束++++++++++"); logger.error("++++++++++++" + dateSource.get("poolName") + "++++bom同步结束++++++++++");
}
}); });
return R.ok(); return R.ok();
@ -152,27 +156,28 @@ public class SapController extends BaseController {
R<List<Map<String, String>>> dateSources0 = remoteUserService.getPoolNameList(sysUser); R<List<Map<String, String>>> dateSources0 = remoteUserService.getPoolNameList(sysUser);
List<Map<String, String>> dateSources = dateSources0.getData(); List<Map<String, String>> dateSources = dateSources0.getData();
dateSources.forEach(dateSource -> { dateSources.forEach(dateSource -> {
if(!"ds_999".equals(dateSource.get("poolName"))) {
logger.info("++++++++++++" + dateSource.get("poolName") + "++++工艺同步开始++++++++++"); logger.info("++++++++++++" + dateSource.get("poolName") + "++++工艺同步开始++++++++++");
DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key
Date maxTime0 = sapBomMapper.getRouteMaxTime(); Date maxTime0 = sapBomMapper.getRouteMaxTime();
if(maxTime0 != null){ if (maxTime0 != null) {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.setTime(maxTime0); calendar.setTime(maxTime0);
calendar.add(Calendar.DAY_OF_YEAR, 1); calendar.add(Calendar.DAY_OF_YEAR, 1);
Date maxTime = calendar.getTime(); Date maxTime = calendar.getTime();
qo.setAedat(DateFormatUtils.format(maxTime, "yyyyMMdd"));//修改日期20230923 qo.setAedat(DateFormatUtils.format(maxTime, "yyyyMMdd"));//修改日期20230923
} }
qo.setWerks(dateSource.get("poolName").replace("ds_",""));//工厂 qo.setWerks(dateSource.get("poolName").replace("ds_", ""));//工厂
R r = sapRouterService.sapRouterSync(qo); R r = sapRouterService.sapRouterSync(qo);
if(r.getCode()!=200){ if (r.getCode() != 200) {
logger.error("++++++++++++" + dateSource.get("poolName")+"同步工艺失败,错误信息:"+ r.getMsg()); logger.error("++++++++++++" + dateSource.get("poolName") + "同步工艺失败,错误信息:" + r.getMsg());
} }
logger.error("++++++++++++" + dateSource.get("poolName") + "++++工艺同步结束++++++++++"); logger.error("++++++++++++" + dateSource.get("poolName") + "++++工艺同步结束++++++++++");
}
}); });
return R.ok(); return R.ok();
} }
/** /**

Loading…
Cancel
Save