添加程序软件信息接口
This commit is contained in:
@@ -0,0 +1,61 @@
|
|||||||
|
package com.njcn.csdevice.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 系统软件表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @since 2023-05-17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cs_soft_info")
|
||||||
|
public class CsSoftInfoPO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读写操作属性:“r”
|
||||||
|
*/
|
||||||
|
private String opAttr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作系统名称,裸机系统填Null
|
||||||
|
*/
|
||||||
|
private String osName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作系统版本,裸机系统填Null
|
||||||
|
*/
|
||||||
|
private String osVersion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用程序版本号
|
||||||
|
*/
|
||||||
|
private String appVersion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用程序发布日期
|
||||||
|
*/
|
||||||
|
private LocalDateTime appDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用程序校验码
|
||||||
|
*/
|
||||||
|
private String appCheck;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否支持远程升级程序
|
||||||
|
*/
|
||||||
|
private String softUpdate;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.njcn.csdevice.controller.equipment;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.access.pojo.po.CsSoftInfoPO;
|
||||||
|
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.mapper.CsSoftInfoMapper;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
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.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 系统软件表 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @since 2023-08-09
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/csSoftInfo")
|
||||||
|
@Api(tags = "装置程序信息")
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Validated
|
||||||
|
public class CsSoftInfoController extends BaseController {
|
||||||
|
|
||||||
|
private final CsSoftInfoMapper csSoftInfoMapper;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/findSoftInfo")
|
||||||
|
@ApiOperation("获取程序软件信息")
|
||||||
|
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||||
|
public HttpResult<CsSoftInfoPO> findSoftInfo(@RequestParam String id){
|
||||||
|
String methodDescribe = getMethodDescribe("findSoftInfo");
|
||||||
|
CsSoftInfoPO po = csSoftInfoMapper.selectById(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.csdevice.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.access.pojo.po.CsSoftInfoPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 系统软件表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @since 2023-08-09
|
||||||
|
*/
|
||||||
|
public interface CsSoftInfoMapper extends BaseMapper<CsSoftInfoPO> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.csdevice.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.access.pojo.po.CsSoftInfoPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 系统软件表 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @since 2023-08-09
|
||||||
|
*/
|
||||||
|
public interface ICsSoftInfoService extends IService<CsSoftInfoPO> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -18,12 +18,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.access.api.AskDeviceDataFeignClient;
|
import com.njcn.access.api.AskDeviceDataFeignClient;
|
||||||
import com.njcn.access.api.CsSoftInfoFeignClient;
|
|
||||||
import com.njcn.access.pojo.po.CsSoftInfoPO;
|
import com.njcn.access.pojo.po.CsSoftInfoPO;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.csdevice.constant.DataParam;
|
import com.njcn.csdevice.constant.DataParam;
|
||||||
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
|
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
|
||||||
import com.njcn.csdevice.mapper.CsEquipmentDeliveryMapper;
|
import com.njcn.csdevice.mapper.CsEquipmentDeliveryMapper;
|
||||||
|
import com.njcn.csdevice.mapper.CsSoftInfoMapper;
|
||||||
import com.njcn.csdevice.pojo.param.*;
|
import com.njcn.csdevice.pojo.param.*;
|
||||||
import com.njcn.csdevice.pojo.po.*;
|
import com.njcn.csdevice.pojo.po.*;
|
||||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||||
@@ -89,7 +89,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
|||||||
private final CsEquipmentProcessPOService csEquipmentProcessPOService;
|
private final CsEquipmentProcessPOService csEquipmentProcessPOService;
|
||||||
private final AskDeviceDataFeignClient askDeviceDataFeignClient;
|
private final AskDeviceDataFeignClient askDeviceDataFeignClient;
|
||||||
private final RedisUtil redisUtil;
|
private final RedisUtil redisUtil;
|
||||||
private final CsSoftInfoFeignClient csSoftInfoFeignClient;
|
private final CsSoftInfoMapper csSoftInfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = {Exception.class})
|
@Transactional(rollbackFor = {Exception.class})
|
||||||
@@ -277,7 +277,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
|||||||
//获取装置版本信息
|
//获取装置版本信息
|
||||||
String softInfoId = csEquipmentDeliveryPo.getSoftinfoId();
|
String softInfoId = csEquipmentDeliveryPo.getSoftinfoId();
|
||||||
if (StringUtils.isNotBlank(softInfoId) && ObjectUtil.isNotNull(softInfoId)) {
|
if (StringUtils.isNotBlank(softInfoId) && ObjectUtil.isNotNull(softInfoId)) {
|
||||||
CsSoftInfoPO po = csSoftInfoFeignClient.findSoftInfo(softInfoId).getData();
|
CsSoftInfoPO po = csSoftInfoMapper.selectById(softInfoId);
|
||||||
deviceManagerVo.setAppVersion(po.getAppVersion());
|
deviceManagerVo.setAppVersion(po.getAppVersion());
|
||||||
deviceManagerVo.setAppDate(po.getAppDate());
|
deviceManagerVo.setAppDate(po.getAppDate());
|
||||||
deviceManagerVo.setAppCheck(po.getAppCheck());
|
deviceManagerVo.setAppCheck(po.getAppCheck());
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.njcn.csdevice.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.access.pojo.po.CsSoftInfoPO;
|
||||||
|
import com.njcn.csdevice.mapper.CsSoftInfoMapper;
|
||||||
|
import com.njcn.csdevice.service.ICsSoftInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 系统软件表 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @since 2023-08-09
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CsSoftInfoServiceImpl extends ServiceImpl<CsSoftInfoMapper, CsSoftInfoPO> implements ICsSoftInfoService {
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user