2021与蓝度共同重构项目,服务端
liuhaonan
2022-04-19 9330e9b0e4e70151d36084ecb5695b818cfda2db
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PlayPlanNvService.java
@@ -33,12 +33,16 @@
    private final LedPlayerEntityService ledPlayerEntityService;
    private VnnoxAPIUtil vnnoxAPIUtil;
    private final LEDProgramService ledProgramService;
    private final ClientService clientService;
    public boolean addPlan(PlayPlanParam playPlanParam) {
        PlayPlanNv playPlan = new PlayPlanNv();
        if (AdministratorEnums.CUSTOMER.getCode().equals(SecurityUtils.getAdministratorIdentity())) {
        if (SecurityUtils.getClientId()!=null){
            playPlan.setUserId(SecurityUtils.getUserId());
            if(clientService.findClientId()){
                playPlan.setClientId(clientService.getClientId());
            }
        }
        playPlan.setName(playPlanParam.getName());
        playPlan.setLedProgramName(playPlanParam.getLedProgramName());
@@ -113,28 +117,12 @@
        program.setPages(JSON.parseObject(pushToLed.getPages(), List.class));
        program.setSchedule(JSON.parseObject(pushToLed.getSchedule(), Map.class));
        program.setNoticeUrl(VnnoxConstant.NOTIFY_URL);
      /*  Map schedule = JSON.parseObject(pushToLed.getSchedule(), Map.class);
        Map<String,Object> push=new HashMap<>();
        push.put("playerIds",playerIds);
        push.put("pages",pages);
        push.put("schedule",schedule);
        push.put("noticeUrl", VnnoxConstant.SCREEN_SHOT_NOTIFY_URL);
*/
        VnnoxResultResponse vnnoxResultResponse = vnnoxProgramAPIUtil.normalProgram(program);
        VnnoxResult vnnoxResult = vnnoxAPIUtil.volChange(playerIds, Integer.valueOf(one.getVolume()).intValue());
        // VnnoxResultResponse vnnoxResultResponse = vnnoxProgramAPIUtil.normalProgram(push);
        List<String> success = new ArrayList<>();
        List<String> fail = new ArrayList<>();
//        List<String> success=new ArrayList<>();
//        if(vnnoxResultResponse.getData().getSuccess()!=null&&vnnoxResultResponse.getData()!=null){
//            success = vnnoxResultResponse.getData().getSuccess();
//        }
//        //success.addAll(vnnoxResult.getSuccess());
//        if(vnnoxResultResponse.getData().getFail()!=null&vnnoxResultResponse.getData()!=null){
//            fail= vnnoxResultResponse.getData().getFail();
//        }
        if (vnnoxResultResponse.getData() != null) {
            success = vnnoxResultResponse.getData().getSuccess();
            fail = vnnoxResultResponse.getData().getFail();