| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | |
| | | @Autowired |
| | | private EmpowerJoinMapper empowerMapper; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private DeviceMapper deviceMapper; |
| | |
| | | List<Empower> list = getDealListDetail(); |
| | | if(list == null || list.size() ==0){ |
| | | return; |
| | | } |
| | | int tryNum = 1; |
| | | try { |
| | | tryNum = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.RETRY_CONNECT_NUM).getCode()); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | for(Empower c : list){ |
| | | TaskPersonDetailRequest param = new TaskPersonDetailRequest(); |
| | |
| | | .set(Empower::getSendStatus,Constants.EmpowerStatus.fail) ); |
| | | } |
| | | }else{ |
| | | //如果是已删除的数据,下发失败(防止设备离线),则尝试重新下发任务 |
| | | if(Constants.equalsInteger(c.getIsdeleted(), Constants.ONE) ){ |
| | | // && Constants.formatIntegerNum(c.getTryNum())+1 < tryNum ){ |
| | | empowerMapper.update(null, new UpdateWrapper<Empower>() |
| | | .lambda() |
| | | .eq(Empower::getId, c.getId()) |
| | | .set(Empower::getRemark, "下发失败,等待重新删除权限") |
| | | // .set(Empower::getHkId,null) |
| | | // .set(Empower::getSendDate,null) |
| | | .set(Empower::getTryNum,Constants.formatIntegerNum(c.getTryNum())+1) |
| | | .set(Empower::getSendInfo, "下发失败,等待重新删除权限") |
| | | .set(Empower::getSendStatus, Constants.EmpowerStatus.wait)); |
| | | }else{ |
| | | empowerMapper.update(null,new UpdateWrapper<Empower>() |
| | | .lambda() |
| | | .eq(Empower::getId,c.getId() ) |
| | |
| | | .set(Empower::getSendInfo,"下发失败" ) |
| | | .set(Empower::getSendStatus,Constants.EmpowerStatus.fail) ); |
| | | } |
| | | |
| | | /* empowerMapper.update(null, new UpdateWrapper<Empower>() |
| | | .lambda() |
| | | .eq(Empower::getId, c.getId()) |
| | | .set(Empower::getRemark, Constants.equalsInteger(c.getIsdeleted(), Constants.ZERO) ? "下发失败" : "删除权限成功") |
| | | .set(Empower::getSendInfo, "删除权限成功") |
| | | .set(Empower::getSendStatus, Constants.equalsInteger(c.getIsdeleted(), Constants.ZERO) ? Constants.EmpowerStatus.fail : Constants.EmpowerStatus.pass)); |
| | | */ |
| | | } |
| | | checkDelMemberTask(c.getMemberId()); |
| | | } |
| | | } |