增加企业查询
This commit is contained in:
parent
fdb45c6586
commit
76d048ce64
|
|
@ -2,6 +2,8 @@ package org.jeecg.modules.appmana.controller;
|
|||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
@ -59,6 +61,8 @@ public class BigScreenControllerP2 {
|
|||
private ISurvVehicleInfoService survVehicleInfoService;
|
||||
@Autowired
|
||||
private ISurvGpsRecordService survGpsRecordService;
|
||||
@Autowired
|
||||
private ISurvEnterpriseInfoService survEnterpriseInfoService;
|
||||
|
||||
@ApiOperationSupport(order = 1)
|
||||
@ApiOperation(value = "01. 查询设备下各检测项的历史数据", notes = "")
|
||||
|
|
@ -190,4 +194,31 @@ public class BigScreenControllerP2 {
|
|||
IPage<SurvGpsRecord> records = survGpsRecordService.pages(gpsRecordDTO);
|
||||
return Result.OK(records);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 异步查询公司list
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getEntList")
|
||||
public Result<List<SurvEnterpriseInfo>> getEntList(@RequestParam(name = "entName", required = false) String entName) {
|
||||
commonService.getTenantId(null);
|
||||
Result<List<SurvEnterpriseInfo>> result = new Result<>();
|
||||
try {
|
||||
LambdaQueryWrapper<SurvEnterpriseInfo> wraps = Wrappers.<SurvEnterpriseInfo>lambdaQuery();
|
||||
wraps = Wrappers.<SurvEnterpriseInfo>lambdaQuery().like(StringUtils.isNotBlank(entName),SurvEnterpriseInfo::getEntName, entName)
|
||||
.eq(SurvEnterpriseInfo::getIsEnable,1)
|
||||
.eq(SurvEnterpriseInfo::getIsShow,1)
|
||||
.orderByAsc(SurvEnterpriseInfo::getSortNo)
|
||||
.orderByDesc(SurvEnterpriseInfo::getCreateTime)
|
||||
;
|
||||
|
||||
List<SurvEnterpriseInfo> list = survEnterpriseInfoService.list(wraps);
|
||||
result.setResult(list);
|
||||
result.setSuccess(true);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package org.jeecg.system.applet.controller;
|
|||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -41,12 +43,6 @@ import java.util.Map;
|
|||
@RequestMapping("/applet/wxclient")
|
||||
@Api(tags="小程序功能接口")
|
||||
public class WxAppletController {
|
||||
|
||||
|
||||
@Autowired
|
||||
ISurvTransdataAirService transdataAirService;
|
||||
@Autowired
|
||||
ISurvTransdataSoilService transdataSoilService;
|
||||
@Autowired
|
||||
ISurvTransdataOrientwaterService orientwaterService;
|
||||
@Autowired
|
||||
|
|
@ -82,6 +78,9 @@ public class WxAppletController {
|
|||
@Autowired
|
||||
private ISurvHisdataVocsService vocsService;
|
||||
|
||||
@Autowired
|
||||
private ISurvEnterpriseInfoService enterpriseInfoService;
|
||||
|
||||
// @PostMapping("/getNewestData")
|
||||
// @ApiOperation("获取首页最新数据")
|
||||
// public R getNewestData(){
|
||||
|
|
@ -775,4 +774,33 @@ public class WxAppletController {
|
|||
return R.ok(jsonArray);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 异步查询公司list
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getEntList")
|
||||
public R getEntList(@RequestParam(name = "entName", required = false) String entName,@RequestParam(value = "authId",required = false)String authId) {
|
||||
String tenantId = TenantUtil.getCurTenant(authId);
|
||||
Result<List<SurvEnterpriseInfo>> result = new Result<>();
|
||||
try {
|
||||
LambdaQueryWrapper<SurvEnterpriseInfo> wraps = new LambdaQueryWrapper<>();
|
||||
wraps.like(StringUtils.isNotBlank(entName),SurvEnterpriseInfo::getEntName, entName)
|
||||
.eq(SurvEnterpriseInfo::getIsEnable,1)
|
||||
.eq(SurvEnterpriseInfo::getIsShow,1)
|
||||
.eq(SurvEnterpriseInfo::getTenantId,tenantId)
|
||||
.orderByAsc(SurvEnterpriseInfo::getSortNo)
|
||||
.orderByDesc(SurvEnterpriseInfo::getCreateTime)
|
||||
;
|
||||
|
||||
|
||||
List<SurvEnterpriseInfo> list = enterpriseInfoService.list(wraps);
|
||||
result.setResult(list);
|
||||
result.setSuccess(true);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package org.jeecg.common.entity;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
|
@ -76,6 +77,7 @@ public class SurvEnterpriseInfo implements Serializable {
|
|||
/**逻辑删除*/
|
||||
@Excel(name = "逻辑删除", width = 15)
|
||||
@ApiModelProperty(value = "逻辑删除")
|
||||
@TableLogic
|
||||
private java.lang.Integer isDel;
|
||||
/**更新时间*/
|
||||
@Excel(name = "更新时间", width = 15, format = "yyyy-MM-dd")
|
||||
|
|
@ -83,4 +85,28 @@ public class SurvEnterpriseInfo implements Serializable {
|
|||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updatedTime;
|
||||
|
||||
|
||||
|
||||
/** 纬度 */
|
||||
@ApiModelProperty(name = "纬度",notes = "")
|
||||
private String entLat ;
|
||||
/** 经度 */
|
||||
@ApiModelProperty(name = "经度",notes = "")
|
||||
private String entLong ;
|
||||
/** 地图图标 */
|
||||
@ApiModelProperty(name = "地图图标",notes = "")
|
||||
private String entMapIcon ;
|
||||
/** 短名称 */
|
||||
@ApiModelProperty(name = "短名称",notes = "")
|
||||
private String entShortName ;
|
||||
/** 是否显示 */
|
||||
@ApiModelProperty(name = "是否显示",notes = "")
|
||||
private Integer isShow ;
|
||||
/** 排序值 */
|
||||
@ApiModelProperty(name = "排序值",notes = "")
|
||||
private Integer sortNo ;
|
||||
/** 是否启用 */
|
||||
@ApiModelProperty(name = "是否启用",notes = "")
|
||||
private Integer isEnable ;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue