Merge branch 'schedule' of http://dev.xinyingpower.com:8080/git/xymp/backend into schedule
commit
6a6add6b60
@ -0,0 +1,60 @@
|
||||
//package com.shxy.xymanager_admin.controller;
|
||||
//
|
||||
//import com.shxy.xymanager_common.annotation.Log;
|
||||
//import com.shxy.xymanager_common.base.BaseController;
|
||||
//import com.shxy.xymanager_common.base.ResponseReult;
|
||||
//import com.shxy.xymanager_common.bean.ServiceBody;
|
||||
//import com.shxy.xymanager_common.bean.ServiceStatus;
|
||||
//import com.shxy.xymanager_common.vo.*;
|
||||
//import com.shxy.xymanager_service.service.YwService;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
//import io.swagger.annotations.ApiResponse;
|
||||
//import io.swagger.annotations.ApiResponses;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.validation.annotation.Validated;
|
||||
//import org.springframework.web.bind.annotation.RequestBody;
|
||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||
//import org.springframework.web.bind.annotation.RestController;
|
||||
//
|
||||
//
|
||||
//@Api(value = "运维接口", tags = "运维接口相关")
|
||||
//@RestController
|
||||
//@Slf4j
|
||||
//public class YunWeiController extends BaseController {
|
||||
//
|
||||
// @Autowired
|
||||
// YwService ywService;
|
||||
//
|
||||
// @ApiOperation(value = "获取运维指令", notes = "获取运维指令接口", httpMethod = "POST")
|
||||
// @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
||||
// @RequestMapping("/postYwCmd")
|
||||
// @Log(title = "获取运维指令", type = "查询")
|
||||
// public ResponseReult<String> postYwCmd(@RequestBody @Validated YWCmdVo vo) {
|
||||
// ServiceBody<String> serviceBody = ywService.postYwCmd(vo);
|
||||
// if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
|
||||
// return ResponseReult.success(serviceBody.getData());
|
||||
//
|
||||
//
|
||||
// } else {
|
||||
// return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//// @ApiOperation(value = "前端查询指令列表", notes = "前端查询指令列表接口", httpMethod = "POST")
|
||||
//// @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
||||
//// @RequestMapping("/getYwCmdList")
|
||||
//// @Log(title = "获取运维指令", type = "查询")
|
||||
//// public ResponseReult<String> postYwCmd(@RequestBody @Validated YWCmdVo vo) {
|
||||
//// ServiceBody<String> serviceBody = ywService.postYwCmd(vo);
|
||||
//// if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
|
||||
//// return ResponseReult.success(serviceBody.getData());
|
||||
//// } else {
|
||||
//// return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
|
||||
//// }
|
||||
//// }
|
||||
//
|
||||
//
|
||||
//
|
||||
//}
|
@ -0,0 +1,25 @@
|
||||
package com.shxy.xymanager_common.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 查询运维命令返回
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "查询运维命令返回对象", description = "查询运维命令返回对象信息")
|
||||
public class MaintainCmdModel implements Serializable {
|
||||
@ApiModelProperty(value = "装置编号", example = "120")
|
||||
private Integer termId;
|
||||
@ApiModelProperty(value = "name", example = "120")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "cmd", example = "1")
|
||||
private String cmd;
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.shxy.xymanager_common.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "装置基本信息列表请求", description = "装置基本信息列表请求")
|
||||
public class BasicTermVo {
|
||||
@ApiModelProperty(value = "编号", example = "设备编号")
|
||||
private Integer termId;
|
||||
|
||||
@Min(value = 1, message = "分页位置最小从1开始")
|
||||
@ApiModelProperty(value = "分页位置从1开始", required = true, example = "1")
|
||||
private int pageindex;
|
||||
|
||||
@Min(value = 1, message = "分页大小最小为1")
|
||||
@ApiModelProperty(value = "分页大小", required = true, example = "1")
|
||||
private int pagesize;
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.shxy.xymanager_common.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "运维编号对象", description = "运维编号对象描述")
|
||||
public class YWCmdVo {
|
||||
|
||||
@ApiModelProperty(value = "装置编号", example = "123456")
|
||||
@NotNull(message = "装置编号")
|
||||
private Integer termId;
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
//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);
|
||||
// }
|
||||
//}
|
||||
//
|
@ -0,0 +1,22 @@
|
||||
//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