组态功能和台账功能部分开发
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.njcn.csdevice.controller.Equipment;
|
||||
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 详细数据表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-05-31
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/csDataArray")
|
||||
@Api(tags = "终端指标集")
|
||||
@AllArgsConstructor
|
||||
public class CsDataArrayController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.csdevice.controller.Equipment;
|
||||
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 数据集表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-05-31
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/csDataSet")
|
||||
@Api(tags = "终端数据集")
|
||||
@AllArgsConstructor
|
||||
public class CsDataSetController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.njcn.csdevice.controller.Equipment;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.pojo.vo.LedgerTreeVO;
|
||||
import com.njcn.csdevice.service.IDeviceService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/5/29 19:43
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/device")
|
||||
@Api(tags = "终端台账")
|
||||
@AllArgsConstructor
|
||||
public class DeviceController extends BaseController {
|
||||
|
||||
private final IDeviceService deviceService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/ledgerTree")
|
||||
@ApiOperation("台账树")
|
||||
public HttpResult<LedgerTreeVO> getLedgerTree(){
|
||||
String methodDescribe = getMethodDescribe("getLedgerTree");
|
||||
LedgerTreeVO ledgerTree = deviceService.getLedgerTree();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, ledgerTree, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.njcn.csdevice.controller.ledger;
|
||||
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.pojo.param.CsLedgerParam;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.pojo.vo.CsLedgerVO;
|
||||
import com.njcn.csdevice.service.CsLinePOService;
|
||||
import com.njcn.csdevice.service.ICsLedgerService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 台账表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-05-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/csLedger")
|
||||
@Slf4j
|
||||
@Api(tags = "治理终端台账")
|
||||
@AllArgsConstructor
|
||||
public class CsLedgerController extends BaseController {
|
||||
|
||||
private final ICsLedgerService csLedgerService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/tree")
|
||||
@ApiOperation("治理终端台账树")
|
||||
public HttpResult<List<CsLedgerVO>> ledgerTree(){
|
||||
String methodDescribe = getMethodDescribe("ledgerTree");
|
||||
List<CsLedgerVO> list = csLedgerService.getLedgerTree();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增台账信息")
|
||||
@ApiImplicitParam(name = "csLedgerParam", value = "新增台账实体", required = true)
|
||||
public HttpResult<String> add(@RequestBody @Validated CsLedgerParam csLedgerParam){
|
||||
String methodDescribe = getMethodDescribe("add");
|
||||
csLedgerService.addLedgerTree(csLedgerParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除台账信息")
|
||||
@ApiImplicitParam(name = "id", value = "数据id", required = true)
|
||||
public HttpResult<String> delete(@RequestParam @Validated String id){
|
||||
String methodDescribe = getMethodDescribe("delete");
|
||||
csLedgerService.deleteLedgerTree(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("更新台账信息")
|
||||
@ApiImplicitParam(name = "csLedgerParam", value = "更新台账实体", required = true)
|
||||
public HttpResult<String> update(@RequestBody @Validated CsLedgerParam.Update csLedgerParam){
|
||||
String methodDescribe = getMethodDescribe("update");
|
||||
csLedgerService.updateLedgerTree(csLedgerParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/findDevByLineId")
|
||||
@ApiOperation("根据监测点Id查询装置")
|
||||
@ApiImplicitParam(name = "lineId", value = "监测点Id", required = true)
|
||||
public HttpResult<String> findDevByLineId(@RequestParam @Validated String lineId){
|
||||
String methodDescribe = getMethodDescribe("findDevByLineId");
|
||||
String deviceId = csLedgerService.findDevByLineId(lineId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deviceId, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -39,10 +39,9 @@ public class CsEngineeringUserController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getEngineeringByUser")
|
||||
@ApiOperation("根据用户获取工程")
|
||||
@ApiImplicitParam(name = "userIndex", value = "用户id", required = true)
|
||||
public HttpResult<List<CsEngineeringPO>> getEngineeringByUser(@RequestParam String userIndex){
|
||||
public HttpResult<List<CsEngineeringPO>> getEngineeringByUser(){
|
||||
String methodDescribe = getMethodDescribe("getEngineeringByUser");
|
||||
List<CsEngineeringPO> list = csEngineeringUserService.getEngineeringByUser(userIndex);
|
||||
List<CsEngineeringPO> list = csEngineeringUserService.getEngineeringByUser();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user