del: 删除不用的
parent
196d271b01
commit
ff7acadd56
@ -1,12 +0,0 @@
|
||||
//package com.shxy.xymanager_admin;
|
||||
//
|
||||
//import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
//import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
//
|
||||
//public class SpringBootStartApplication extends SpringBootServletInitializer {
|
||||
// @Override
|
||||
// protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
|
||||
// // 注意这里要指向原先用main方法执行的Application启动类
|
||||
// return builder.sources(XymanagerAdminApplication.class);
|
||||
// }
|
||||
//}
|
@ -1,25 +0,0 @@
|
||||
package com.shxy.xymanager_framework.timeTask.TerminalTime;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author Bobi_huo
|
||||
* @date 2020-12-22 15:12
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("TerminalTask")
|
||||
public class TerminalTask {
|
||||
|
||||
// @Autowired
|
||||
// TerminalScheduleRuleService terminalScheduleRuleService;
|
||||
/**
|
||||
* 下发结束
|
||||
*/
|
||||
public void execute() {
|
||||
// terminalScheduleRuleService.timerscheckScheldule();
|
||||
log.info("-- >>> 下发结束");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,231 +0,0 @@
|
||||
//package com.shxy.xymanager_service.impl;
|
||||
//
|
||||
//import cn.hutool.core.bean.BeanUtil;
|
||||
//import cn.hutool.core.collection.CollectionUtil;
|
||||
//import cn.hutool.core.date.DateTime;
|
||||
//import cn.hutool.core.util.StrUtil;
|
||||
//import cn.hutool.json.JSONObject;
|
||||
//import com.shxy.xymanager_common.constant.Constants;
|
||||
//import com.shxy.xymanager_common.constant.UuidUtils;
|
||||
//import com.shxy.xymanager_common.dto.TerminalsWithHeart;
|
||||
//import com.shxy.xymanager_common.entity.*;
|
||||
//import com.shxy.xymanager_common.util.CmaUtil;
|
||||
//import com.shxy.xymanager_common.util.MyDateUtils;
|
||||
//import com.shxy.xymanager_common.util.xinyin.ProcessExecUtils;
|
||||
//import com.shxy.xymanager_common.util.xinyin.TerminalUtils;
|
||||
//import com.shxy.xymanager_common.vo.OpenCmdidVo;
|
||||
//import com.shxy.xymanager_common.vo.OpenDeviceCaptureVo;
|
||||
//import com.shxy.xymanager_common.vo.UserLoginVo;
|
||||
//import com.shxy.xymanager_dao.dao.SysUserDao;
|
||||
//import com.shxy.xymanager_dao.dao.TerminalStatusDao;
|
||||
//import com.shxy.xymanager_dao.dao.TerminalsDao;
|
||||
//import com.shxy.xymanager_service.service.OpenService;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.beans.factory.annotation.Value;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import java.math.BigInteger;
|
||||
//import java.util.Date;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 第三方对外接口
|
||||
// */
|
||||
//@Service
|
||||
//@Component
|
||||
//@Slf4j
|
||||
//public class OpenServiceImpl implements OpenService {
|
||||
// @Autowired
|
||||
// private SysUserMapperDao sysUserMapperDao;
|
||||
//
|
||||
// @Autowired
|
||||
// private SysUserDao sysUserDao;
|
||||
//
|
||||
// @Autowired
|
||||
// private TerminalsDao terminalsDao;
|
||||
//
|
||||
// @Autowired
|
||||
// private TerminalStatusDao terminalStatusDao;
|
||||
//
|
||||
//
|
||||
// @Value("${session.open_expire_time}")
|
||||
// public Integer time;
|
||||
//
|
||||
// /**
|
||||
// * 登录鉴权
|
||||
// *
|
||||
// * @param vo
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public JSONObject cmaUserLogin(UserLoginVo vo) {
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// String username = vo.getUserName();
|
||||
// String userPassword = vo.getPassWord();
|
||||
//
|
||||
// SysUserExample example = new SysUserExample();
|
||||
// example.createCriteria().andUserNameEqualTo(username);
|
||||
// List<SysUser> sysUsers = sysUserDao.selectByExample(example);
|
||||
// // 判断用户是否存在
|
||||
// if (CollectionUtil.isEmpty(sysUsers)) {
|
||||
// jsonObject.putOpt("errcode", 1);
|
||||
// jsonObject.putOpt("errmsg", "用户不存在");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// // 判断密码是否存在
|
||||
// String password = vo.getPassWord();
|
||||
// if (BeanUtil.isEmpty(password)) {
|
||||
// jsonObject.putOpt("errcode", 2);
|
||||
// jsonObject.putOpt("errmsg", "密码错误");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// SysUser sysUser = sysUsers.get(0);
|
||||
// // 密码对比
|
||||
// if (!sysUser.getPassword().equals(userPassword)) {
|
||||
// jsonObject.putOpt("errcode", 2);
|
||||
// jsonObject.putOpt("errmsg", "密码错误");
|
||||
// return jsonObject;
|
||||
// }
|
||||
//
|
||||
// Date date = new Date();
|
||||
// String sessionId = UuidUtils.getUUID();
|
||||
// SysUserSession sysUserSession = new SysUserSession();
|
||||
// sysUserSession.setUserName(username);
|
||||
// sysUserSession.setRole(sysUser.getRole());
|
||||
// sysUserSession.setSessionId(sessionId);
|
||||
// long expiretime = MyDateUtils.TimeMillSecond2Second(MyDateUtils.offsetMinute(date, time));
|
||||
// sysUserSession.setExpireTime(BigInteger.valueOf(expiretime));
|
||||
// sysUserDao.insertOrUpdate(sysUserSession, date, date);
|
||||
// jsonObject.set("errcode", 0);
|
||||
// jsonObject.set("errmsg", "OK");
|
||||
// jsonObject.set("sessionid", sessionId);
|
||||
// jsonObject.set("keepingtime", time);
|
||||
//
|
||||
// return jsonObject;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 控制拍照视频
|
||||
// *
|
||||
// * @param vo
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public JSONObject ctrlCmaDeviceCapture(OpenDeviceCaptureVo vo) {
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// String sessionID = vo.getSessionID();
|
||||
// String deviceID = vo.getDeviceID();
|
||||
// Integer operateType = vo.getOperateType();
|
||||
// if (StrUtil.isEmpty(sessionID)) {
|
||||
// jsonObject.set("errcode", 1);
|
||||
// jsonObject.set("errmsg", "invalid session");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// if (StrUtil.isEmpty(deviceID)) {
|
||||
// jsonObject.set("errcode", 2);
|
||||
// jsonObject.set("errmsg", "device not register");
|
||||
// return jsonObject;
|
||||
// }
|
||||
//
|
||||
// SysUserSession sysUserSession = sysUserMapperDao.selectBySessionId(sessionID);
|
||||
// if (BeanUtil.isEmpty(sysUserSession)) {
|
||||
// jsonObject.set("errcode", 1);
|
||||
// jsonObject.set("errmsg", "invalid session");
|
||||
// return jsonObject;
|
||||
// } else {
|
||||
// BigInteger expireTime = sysUserSession.getExpireTime();
|
||||
// long currentTime = MyDateUtils.TimeMillSecond2Second(new DateTime());
|
||||
// if ((currentTime - expireTime.longValue()) > time.longValue()) {
|
||||
// jsonObject.set("errcode", 1);
|
||||
// jsonObject.set("errmsg", "invalid session");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// TerminalsExample example = new TerminalsExample();
|
||||
// example.createCriteria().andCmdidEqualTo(deviceID);
|
||||
// List<Terminals> list = terminalsDao.selectByExample(example);
|
||||
// if (CollectionUtil.isEmpty(list)) {
|
||||
// jsonObject.set("errcode", 2);
|
||||
// jsonObject.set("errmsg", "device not register");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// if (operateType == 1) {
|
||||
// operateType = 0;
|
||||
// } else if (operateType == 2) {
|
||||
// operateType = 1;
|
||||
// } else {
|
||||
// jsonObject.set("errcode", 3);
|
||||
// jsonObject.set("errmsg", "invalid protocol");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// int requestId = Constants.REQUEST_ID.addAndGet(1);
|
||||
// String cmd1 = CmaUtil.takePic(vo.getDeviceID(), 1,255, operateType, requestId);
|
||||
// ProcessExecUtils.exec(cmd1);
|
||||
// int requestId2 = Constants.REQUEST_ID.addAndGet(1);
|
||||
// String cmd2 = CmaUtil.takePic(vo.getDeviceID(), 2,255, operateType,requestId2);
|
||||
// ProcessExecUtils.exec(cmd2);
|
||||
// jsonObject.set("errcode", 0);
|
||||
// jsonObject.set("errmsg", "OK");
|
||||
//
|
||||
// return jsonObject;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询设备在线状态
|
||||
// *
|
||||
// * @param vo
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public JSONObject cmaDeviceStatus(OpenCmdidVo vo) {
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// String sessionID = vo.getSessionID();
|
||||
// String deviceID = vo.getDeviceID();
|
||||
// if (StrUtil.isEmpty(sessionID)) {
|
||||
// jsonObject.set("errcode", 1);
|
||||
// jsonObject.set("errmsg", "invalid session");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// SysUserSession sysUserSession = sysUserMapperDao.selectBySessionId(sessionID);
|
||||
// if (BeanUtil.isEmpty(sysUserSession)) {
|
||||
// jsonObject.set("errcode", 1);
|
||||
// jsonObject.set("errmsg", "invalid session");
|
||||
// return jsonObject;
|
||||
// } else {
|
||||
// BigInteger expireTime = sysUserSession.getExpireTime();
|
||||
// long currentTime = MyDateUtils.TimeMillSecond2Second(new DateTime());
|
||||
// if ((currentTime - expireTime.longValue()) > time.longValue()) {
|
||||
// jsonObject.set("errcode", 1);
|
||||
// jsonObject.set("errmsg", "invalid session");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// }
|
||||
// if (StrUtil.isEmpty(deviceID)) {
|
||||
// jsonObject.set("errcode", 2);
|
||||
// jsonObject.set("errmsg", "device not register");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// TerminalsWithHeart terminalsWithHeart = terminalStatusDao.selectByCmdId(deviceID);
|
||||
// if (BeanUtil.isEmpty(terminalsWithHeart)) {
|
||||
// jsonObject.set("errcode", 2);
|
||||
// jsonObject.set("errmsg", "device not register");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// BigInteger lastheartbeat = terminalsWithHeart.getLastheartbeat();
|
||||
// boolean b = TerminalUtils.judgeTerminalStatus(lastheartbeat);
|
||||
// if (b) {
|
||||
// jsonObject.set("isonline", true);
|
||||
// jsonObject.set("errcode", 0);
|
||||
// jsonObject.set("errmsg", "ok");
|
||||
// } else {
|
||||
// jsonObject.set("isonline", false);
|
||||
// jsonObject.set("errcode", 0);
|
||||
// jsonObject.set("errmsg", "ok");
|
||||
// }
|
||||
//
|
||||
// return jsonObject;
|
||||
// }
|
||||
//}
|
@ -1,62 +0,0 @@
|
||||
//package com.shxy.xymanager_service.impl;
|
||||
//
|
||||
//import com.shxy.xymanager_common.bean.ServiceBody;
|
||||
////import com.shxy.xymanager_common.entity.MaintainCmds;
|
||||
////import com.shxy.xymanager_common.entity.MaintainCmdsHistory;
|
||||
//import com.shxy.xymanager_common.exception.Asserts;
|
||||
//import com.shxy.xymanager_common.model.MaintainCmdModel;
|
||||
//import com.shxy.xymanager_common.vo.YWCmdVo;
|
||||
//import com.shxy.xymanager_dao.dao.MaintainCmdsDao;
|
||||
////import com.shxy.xymanager_dao.dao.MaintainCmdsHistoryDao;
|
||||
//import com.shxy.xymanager_service.service.YwService;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//
|
||||
//import java.util.Date;
|
||||
//
|
||||
///**
|
||||
// * 运维服务实现层
|
||||
// *
|
||||
// * @author 晶晶
|
||||
// */
|
||||
//@Slf4j
|
||||
//@Service
|
||||
//public class YwServiceImpl implements YwService {
|
||||
//
|
||||
// @Autowired
|
||||
// MaintainCmdsDao maintainCmdsDao;
|
||||
//
|
||||
// @Autowired
|
||||
// MaintainCmdsHistoryDao maintainCmdsHistoryDao;
|
||||
//
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public ServiceBody postYwCmd(YWCmdVo vo) {
|
||||
// MaintainCmdModel model = new MaintainCmdModel();
|
||||
// Integer termId = vo.getTermId();
|
||||
// MaintainCmds cmds = maintainCmdsDao.selectByTermId(termId);
|
||||
// String cmdid = cmds.getCmd();
|
||||
// Long id = cmds.getId();
|
||||
// Integer cmdtermId = cmds.getTermId();
|
||||
// String name = cmds.getName();
|
||||
// Date createTime = cmds.getCreateTime();
|
||||
// model.setCmd(cmdid);
|
||||
// model.setName(name);
|
||||
// model.setTermId(cmdtermId);
|
||||
//
|
||||
// MaintainCmdsHistory record = new MaintainCmdsHistory();
|
||||
// record.setId(id);
|
||||
// record.setTermId(cmdtermId);
|
||||
// record.setName(name);
|
||||
// record.setCmd(cmdid);
|
||||
// record.setCreateTime(createTime);
|
||||
// record.setUpdateTime(new Date());
|
||||
// maintainCmdsHistoryDao.insert(record);
|
||||
// maintainCmdsDao.deleteByPrimaryKey(id);
|
||||
//
|
||||
// return Asserts.success(model);
|
||||
// }
|
||||
//}
|
||||
//
|
@ -1,22 +0,0 @@
|
||||
//package com.shxy.xymanager_service.service;
|
||||
//
|
||||
//
|
||||
//import cn.hutool.json.JSONObject;
|
||||
//import com.shxy.xymanager_common.vo.OpenCmdidVo;
|
||||
//import com.shxy.xymanager_common.vo.OpenDeviceCaptureVo;
|
||||
//import com.shxy.xymanager_common.vo.UserLoginVo;
|
||||
//
|
||||
///**
|
||||
// * 第三方接口
|
||||
// *
|
||||
// * @author 晶晶
|
||||
// */
|
||||
//public interface OpenService {
|
||||
//
|
||||
// JSONObject cmaUserLogin(UserLoginVo vo);
|
||||
//
|
||||
// JSONObject ctrlCmaDeviceCapture(OpenDeviceCaptureVo vo);
|
||||
//
|
||||
// JSONObject cmaDeviceStatus(OpenCmdidVo vo);
|
||||
//
|
||||
//}
|
@ -1,22 +0,0 @@
|
||||
//package com.shxy.xymanager_service.service;
|
||||
//
|
||||
//import com.shxy.xymanager_common.bean.ServiceBody;
|
||||
//import com.shxy.xymanager_common.vo.*;
|
||||
//
|
||||
///**
|
||||
// * 运维服务
|
||||
// *
|
||||
// * @author jingjing
|
||||
// */
|
||||
//public interface YwService {
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 获取运维指令
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// ServiceBody postYwCmd(YWCmdVo vo);
|
||||
//
|
||||
//
|
||||
//}
|
Loading…
Reference in New Issue