bug修复
This commit is contained in:
parent
1958510077
commit
803dca253d
@ -55,6 +55,7 @@ public class SafetyHatWSClient {
|
||||
this.send("{\"act\":\"ma_get_active_devices\"}");
|
||||
}
|
||||
} else if (Objects.equals(cmd, "ma_get_active_devices")) {
|
||||
log.info("SafetyHatWSClient获取实时数据");
|
||||
//插入实时数据
|
||||
Boolean status = jo.getBoolean("status");
|
||||
if (status != null && status) {
|
||||
@ -93,6 +94,7 @@ public class SafetyHatWSClient {
|
||||
}
|
||||
}
|
||||
} else if (Objects.equals(cmd, "server_push_sos")) {
|
||||
log.info("SafetyHatWSClient接受报警数据");
|
||||
//接受报警数据
|
||||
JSONObject joData = jo.getJSONObject("data");
|
||||
if (joData != null) {
|
||||
|
||||
@ -1,19 +1,33 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.OperationLog;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IOperationLogService;
|
||||
import com.zhgd.xmgl.modules.party.entity.PartyPromotionalVideo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@ -42,6 +56,7 @@ public class OperationLogController {
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间,格式2021-08-15", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间,格式2021-08-15", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "sn", value = "项目SN或企业sn", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "operModul", value = "功能模块", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
|
||||
})
|
||||
@ -124,14 +139,42 @@ public class OperationLogController {
|
||||
public Result<OperationLog> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Result<OperationLog> result = new Result<OperationLog>();
|
||||
OperationLog operationLog = operationLogService.getById(id);
|
||||
if(operationLog==null) {
|
||||
result.error500("未找到对应实体");
|
||||
}else {
|
||||
result.setResult(operationLog);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
if (operationLog == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(operationLog);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "导出excel操作日志表信息", notes = "导出excel操作日志表信息", httpMethod = "POST")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
|
||||
//// Step.1 组装查询条件
|
||||
//QueryWrapper<PartyPromotionalVideo> queryWrapper = null;
|
||||
//try {
|
||||
// String paramsStr = request.getParameter("paramsStr");
|
||||
// if (oConvertUtils.isNotEmpty(paramsStr)) {
|
||||
// String deString = URLDecoder.decode(paramsStr, "UTF-8");
|
||||
// PartyPromotionalVideo partyPromotionalVideo = JSON.parseObject(deString, PartyPromotionalVideo.class);
|
||||
// queryWrapper = QueryGenerator.initQueryWrapper(partyPromotionalVideo, request.getParameterMap());
|
||||
// }
|
||||
//} catch (UnsupportedEncodingException e) {
|
||||
// e.printStackTrace();
|
||||
//}
|
||||
//
|
||||
////Step.2 AutoPoi 导出Excel
|
||||
//ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//List<PartyPromotionalVideo> pageList = s.list(queryWrapper);
|
||||
////导出文件名称
|
||||
//mv.addObject(NormalExcelConstants.FILE_NAME, "宣传视频列表");
|
||||
//mv.addObject(NormalExcelConstants.CLASS, PartyPromotionalVideo.class);
|
||||
//mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("宣传视频列表数据", "导出人:Jeecg", "导出信息"));
|
||||
//mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
//return mv;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -28,16 +28,19 @@
|
||||
<if test="param.companyType == '5'.toString()">
|
||||
(b.sn=#{param.sn} OR py.company_sn=#{param.sn})
|
||||
</if>
|
||||
<if test="param.userName!=null and param.userName!=''">
|
||||
<if test="param.userName != null and param.userName != ''">
|
||||
and b.real_name like CONCAT(CONCAT('%',#{param.userName}),'%')
|
||||
</if>
|
||||
<if test="param.operName!=null and param.operName!=''">
|
||||
<if test="param.operName != null and param.operName != ''">
|
||||
and a.oper_type like CONCAT(CONCAT('%',#{param.operName}),'%')
|
||||
</if>
|
||||
<if test="param.startTime!=null and param.startTime!=''">
|
||||
<if test="param.operModul != null and param.operModul != ''">
|
||||
and a.oper_modul like CONCAT(CONCAT('%',#{param.operModul}),'%')
|
||||
</if>
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
AND a.oper_create_time >=CONCAT(DATE_FORMAT(#{param.startTime},'%Y-%m-%d'),' 00:00:00')
|
||||
</if>
|
||||
<if test="param.endTime!=null and param.endTime!=''">
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
AND a.oper_create_time <=CONCAT(DATE_FORMAT(#{param.endTime},'%Y-%m-%d'),' 23:59:59')
|
||||
</if>
|
||||
</where>
|
||||
|
||||
@ -190,8 +190,11 @@ public class MechanicalEquipmentPositionDataServiceImpl extends ServiceImpl<Mech
|
||||
Map machineInfo = MapUtils.getMap(paramMap, "machine_info");
|
||||
Map locationInfo = MapUtils.getMap(paramMap, "location_info");
|
||||
Map stateInfo = MapUtils.getMap(paramMap, "state_info");
|
||||
Object deviceInfo = MapUtils.getObject(paramMap, "device_info");
|
||||
JSONArray diJa = JSON.parseArray(JSON.toJSONString(deviceInfo));
|
||||
String sn = diJa.getJSONObject(0).getString("sn");
|
||||
MechanicalEquipmentPositionData data = new MechanicalEquipmentPositionData();
|
||||
data.setDevSn(MapUtils.getString(machineInfo, "machine_uuid"));
|
||||
data.setDevSn(sn);
|
||||
Double latitude = MapUtils.getDouble(locationInfo, "latitude");
|
||||
Double longitude = MapUtils.getDouble(locationInfo, "longitude");
|
||||
double[] pointArr = CoordinateTransformUtil.transformWGS84ToGCJ02(longitude, latitude);
|
||||
|
||||
@ -48,6 +48,7 @@ public class SafetyHatTask {
|
||||
List<Project> projectList = projectService.list(Wrappers.<Project>lambdaQuery().ne(Project::getHelmetUser, "").ne(Project::getHelmetPassword, ""));
|
||||
if (CollUtil.isNotEmpty(projectList)) {
|
||||
for (Project project : projectList) {
|
||||
log.info("安全帽user:{}", project.getHelmetUser());
|
||||
SafetyHatWSClient client = SafetyHatWSClient.clientMap.get(project.getHelmetUser());
|
||||
try {
|
||||
if (client == null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user