Merge branch 'master' of http://192.168.1.13:3000/root/pqs
# Conflicts: # pqs-device/pms-device/pms-device-api/src/main/java/com/njcn/device/pms/pojo/dto/PmsSimpleDTO.java # pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/ledgerManger/SubstationExpendController.java # pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/MonitorMapper.xml # pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/SubstationExpendServiceImpl.java # pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/param/CommunicateParam.java # pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/param/DeviceInfoParam.java # pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/vo/CommunicateVO.java # pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/LineMapper.xml # pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/ISubstationExpendService.java # pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/impl/SubstationExpendServiceImpl.java # pqs-event/event-api/src/main/java/com/njcn/event/pojo/param/WaveTypeParam.java
This commit is contained in:
@@ -74,8 +74,8 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEquipmentByndid")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEquipmentByndid")
|
||||
@ApiOperation("通过ndid查询出厂设备")
|
||||
@ApiImplicitParam(name = "ndid", value = "网关识别码", required = true)
|
||||
public HttpResult<CsEquipmentDeliveryVO> queryEquipmentByndid(@RequestParam("ndid")String ndid){
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.algorithm.pojo.param.CsEdDataAddParm;
|
||||
import com.njcn.algorithm.pojo.param.CsEdDataAuditParm;
|
||||
import com.njcn.algorithm.pojo.param.CsEdDataQueryParm;
|
||||
import com.njcn.algorithm.pojo.po.CsDictPO;
|
||||
import com.njcn.algorithm.pojo.po.CsEdDataPO;
|
||||
import com.njcn.algorithm.pojo.vo.CsEdDataVO;
|
||||
import com.njcn.algorithm.service.CsEdDataService;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
@@ -18,10 +20,10 @@ 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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
@@ -72,4 +74,14 @@ public class CsEdDataController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/findByDevTypeId")
|
||||
@ApiOperation("根据装置型号获取装置类型")
|
||||
@ApiImplicitParam(name = "devType", value = "装置型号", required = true)
|
||||
public HttpResult<CsEdDataVO> findByDevTypeId(@Validated @RequestParam("devType") String devType){
|
||||
String methodDescribe = getMethodDescribe("findByDevTypeId");
|
||||
CsEdDataVO vo = csEdDataService.findByDevTypeId(devType);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.njcn.algorithm.pojo.po.CsEdDataPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.algorithm.pojo.vo.CsEdDataVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
@@ -42,5 +44,11 @@ public interface CsEdDataService extends IService<CsEdDataPO> {
|
||||
* @Date: 2023/4/7
|
||||
*/
|
||||
IPage<CsEdDataVO> queryEdDataPage(CsEdDataQueryParm csEdDataQueryParm);
|
||||
|
||||
/**
|
||||
* @Description: 根据装置型号获取装置类型
|
||||
* @author: xuyang
|
||||
*/
|
||||
CsEdDataVO findByDevTypeId(String devType);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.algorithm.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -16,7 +17,10 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -66,5 +70,20 @@ public class CsEdDataServiceImpl extends ServiceImpl<CsEdDataMapper, CsEdDataPO>
|
||||
returnpage = this.getBaseMapper ().getPage(returnpage,csEdDataQueryParm);
|
||||
return returnpage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CsEdDataVO findByDevTypeId(String devType) {
|
||||
CsEdDataPO csEdDataPo = new CsEdDataPO();
|
||||
LambdaQueryWrapper<CsEdDataPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(CsEdDataPO::getDevType,devType);
|
||||
lambdaQueryWrapper.eq(CsEdDataPO::getStatus,1);
|
||||
List<CsEdDataPO> list = this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
csEdDataPo = list.get(0);
|
||||
}
|
||||
CsEdDataVO csEdDataVo = new CsEdDataVO();
|
||||
BeanUtils.copyProperties(csEdDataPo,csEdDataVo);
|
||||
return csEdDataVo;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
||||
public CsEquipmentDeliveryPO queryEquipmentPOByndid(String ndid) {
|
||||
QueryWrapper<CsEquipmentDeliveryPO> wrapper = new QueryWrapper();
|
||||
wrapper.eq ("ndid", ndid);
|
||||
wrapper.eq("status",2);
|
||||
wrapper.eq("status",1);
|
||||
CsEquipmentDeliveryPO csEquipmentDeliveryPO = this.baseMapper.selectOne (wrapper);
|
||||
return csEquipmentDeliveryPO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user