Commit 185eccd6 authored by tianyiming's avatar tianyiming

小程序》根据监管码查询设备详情

parent 57d9b5cc
...@@ -29,6 +29,9 @@ public class CategoryOtherInfo{ ...@@ -29,6 +29,9 @@ public class CategoryOtherInfo{
@TableField("SEQUENCE_NBR") @TableField("SEQUENCE_NBR")
private String sequenceNbr; private String sequenceNbr;
@ApiModelProperty(value = "RECORD")
@TableField("RECORD")
private String record;
@ApiModelProperty(value = "保险机构") @ApiModelProperty(value = "保险机构")
@TableField("INSURANCE_ORG") @TableField("INSURANCE_ORG")
......
package com.yeejoin.amos.boot.module.tzs.biz.controller; package com.yeejoin.amos.boot.module.tzs.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.tzs.api.entity.TzsCitInfo;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsAppService; import com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsAppService;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -12,7 +8,6 @@ import org.springframework.web.bind.annotation.GetMapping; ...@@ -12,7 +8,6 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -35,4 +30,15 @@ public class TzsAppController { ...@@ -35,4 +30,15 @@ public class TzsAppController {
public ResponseModel<Object> getEquipmentInfo(String record) { public ResponseModel<Object> getEquipmentInfo(String record) {
return ResponseHelper.buildResponse(appService.getEquipmentInfo(record)); return ResponseHelper.buildResponse(appService.getEquipmentInfo(record));
} }
/**
* 根据监管码查询设备详情
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getEquipInfoBySuperviseCode")
@ApiOperation(httpMethod = "GET", value = "根据监管码查询设备详情", notes = "根据监管码查询设备详情")
public ResponseModel<Object> getEquipInfoBySuperviseCode(String supervisoryCode) {
return ResponseHelper.buildResponse(appService.getEquipInfoBySuperviseCode(supervisoryCode));
}
} }
...@@ -4,18 +4,13 @@ import com.alibaba.fastjson.JSON; ...@@ -4,18 +4,13 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.MybatisConfiguration; import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper;
import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil; import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil;
import com.yeejoin.amos.boot.module.tzs.api.dto.*; import com.yeejoin.amos.boot.module.tzs.api.dto.*;
import com.yeejoin.amos.boot.module.tzs.api.entity.*; import com.yeejoin.amos.boot.module.tzs.api.entity.*;
import com.yeejoin.amos.boot.module.tzs.api.mapper.CategoryOtherInfoMapper;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.systemctl.Systemctl; import com.yeejoin.amos.feign.systemctl.Systemctl;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -25,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -25,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
...@@ -33,8 +29,6 @@ import java.io.ByteArrayInputStream; ...@@ -33,8 +29,6 @@ import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.net.DatagramSocketImpl;
import java.util.*; import java.util.*;
@Service @Service
...@@ -96,6 +90,9 @@ public class TzsAppService { ...@@ -96,6 +90,9 @@ public class TzsAppService {
@Autowired @Autowired
EquipmentCategoryServiceImpl equipmentCategoryServiceImpl; EquipmentCategoryServiceImpl equipmentCategoryServiceImpl;
@Autowired
CategoryOtherInfoMapper categoryOtherInfoMapper;
@Value("${minio.url.path}") @Value("${minio.url.path}")
String minioPath; String minioPath;
...@@ -302,4 +299,9 @@ public class TzsAppService { ...@@ -302,4 +299,9 @@ public class TzsAppService {
} }
return jsonObject; return jsonObject;
} }
public Object getEquipInfoBySuperviseCode(String supervisoryCode) {
CategoryOtherInfo categoryOtherInfo = categoryOtherInfoMapper.selectOne(new QueryWrapper<CategoryOtherInfo>().eq("SUPERVISORY_CODE", supervisoryCode));
return ObjectUtils.isEmpty(categoryOtherInfo) ? null : getEquipmentInfo(categoryOtherInfo.getRecord());
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment