Commit 717352fe authored by chenzhao's avatar chenzhao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents 83d63f6a d6f52bfc
package com.yeejoin.amos.boot.module.jxiop.biz.controller; package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointTag;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointTag;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointTagMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointTagMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanHealthIndexServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanHealthIndexServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -16,6 +22,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper; ...@@ -16,6 +22,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.POST;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -35,6 +42,10 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -35,6 +42,10 @@ public class IdxBizFanHealthIndexController extends BaseController {
@Autowired @Autowired
IdxBizFanHealthIndexServiceImpl idxBizFanHealthIndexServiceImpl; IdxBizFanHealthIndexServiceImpl idxBizFanHealthIndexServiceImpl;
@Autowired
IdxBizFanPointTagMapper idxBizFanPointTagMapper;
@Autowired
IdxBizPvPointTagMapper idxBizPvPointTagMapper;
/** /**
* 新增 * 新增
* *
...@@ -209,4 +220,60 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -209,4 +220,60 @@ public class IdxBizFanHealthIndexController extends BaseController {
return ResponseHelper.buildResponse(idxBizFanHealthIndexServiceImpl.getqyt( type,address,statioName,equipmentName,arae,startTime,endTime)); return ResponseHelper.buildResponse(idxBizFanHealthIndexServiceImpl.getqyt( type,address,statioName,equipmentName,arae,startTime,endTime));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "工况字典详情", notes = "工况字典详情")
@GetMapping(value = "/getZDXQ")
public ResponseModel<Object> getZDXQ(
String type,
String id
) {
Object object=null;
if(type.equals("1")){
object= idxBizPvPointTagMapper.selectById(id);
}else{
object= idxBizFanPointTagMapper.selectById(id);
}
return ResponseHelper.buildResponse(object);
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "工况字典修改", notes = "工况字典修改")
@PostMapping (value = "/updateZDXQ")
public ResponseModel<Object> updateZDXQ(
String type,
String id,
String pointDirection,
String tagCode
) {
if(type.equals("1")){
IdxBizPvPointTag object= idxBizPvPointTagMapper.selectById(id);
LambdaUpdateWrapper<IdxBizPvPointTag> UpdateWrapper =new LambdaUpdateWrapper();
UpdateWrapper.eq(object.getArae()!=null,IdxBizPvPointTag::getArae,object.getArae());
UpdateWrapper.eq(object.getStation()!=null,IdxBizPvPointTag::getStation,object.getStation());
UpdateWrapper.eq(object.getDeviceType()!=null,IdxBizPvPointTag::getDeviceType,object.getDeviceType());
UpdateWrapper.eq(object.getManufacturer()!=null,IdxBizPvPointTag::getManufacturer,object.getManufacturer());
UpdateWrapper.eq(object.getPointName()!=null,IdxBizPvPointTag::getPointName,object.getPointName());
UpdateWrapper.set(pointDirection!=null,IdxBizPvPointTag::getPointDirection,pointDirection);
UpdateWrapper.set(tagCode!=null,IdxBizPvPointTag::getTagCode,tagCode);
idxBizPvPointTagMapper.update(null,UpdateWrapper);
}else{
IdxBizFanPointTag object= idxBizFanPointTagMapper.selectById(id);
LambdaUpdateWrapper<IdxBizFanPointTag> UpdateWrapper =new LambdaUpdateWrapper();
UpdateWrapper.eq(object.getArae()!=null,IdxBizFanPointTag::getArae,object.getArae());
UpdateWrapper.eq(object.getStation()!=null,IdxBizFanPointTag::getStation,object.getStation());
UpdateWrapper.eq(object.getNumber()!=null,IdxBizFanPointTag::getNumber,object.getNumber());
UpdateWrapper.eq(object.getPointName()!=null,IdxBizFanPointTag::getPointName,object.getPointName());
UpdateWrapper.set(pointDirection!=null,IdxBizFanPointTag::getPointDirection,pointDirection);
UpdateWrapper.set(tagCode!=null,IdxBizFanPointTag::getTagCode,tagCode);
idxBizFanPointTagMapper.update(null,UpdateWrapper);
}
return ResponseHelper.buildResponse(null);
}
} }
...@@ -95,5 +95,10 @@ public class IdxBizFanPointTag{ ...@@ -95,5 +95,10 @@ public class IdxBizFanPointTag{
*/ */
@TableField("GATEWAY_ID") @TableField("GATEWAY_ID")
private Integer gatewayId; private Integer gatewayId;
/**
* 变量方向
*/
@TableField("POINT_DIRECTION")
private Integer pointDirection;
} }
package com.yeejoin.amos.boot.module.jxiop.biz.entity; package com.yeejoin.amos.boot.module.jxiop.biz.entity;
import cn.com.vastbase.jdbc.NUMBER;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
...@@ -100,5 +101,12 @@ public class IdxBizPvPointTag{ ...@@ -100,5 +101,12 @@ public class IdxBizPvPointTag{
*/ */
@TableField("MANUFACTURER") @TableField("MANUFACTURER")
private String manufacturer; private String manufacturer;
/**
* 变量方向
*/
@TableField("POINT_DIRECTION")
private String pointDirection;
} }
...@@ -116,7 +116,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth ...@@ -116,7 +116,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
List<String> activePowers = new ArrayList<>(); List<String> activePowers = new ArrayList<>();
for (int i = 0; i < indicatorDataListActivePowers.size(); i++) { for (int i = 0; i < indicatorDataListActivePowers.size(); i++) {
activePowers.add(indicatorDataListActivePowers.get(i).getValue()); activePowers.add(indicatorDataListActivePowers.get(i).getValue());
axisData.add(DateUtil.format(indicatorDataListActivePowers.get(i).getCreatedTime(), "HH:mm")); axisData.add(DateUtil.format(indicatorDataListActivePowers.get(i).getCreatedTime(), "yyyy-MM-dd HH:mm:ss"));
} }
// List<Map<String, Object>> seriesData = new ArrayList<>(); // List<Map<String, Object>> seriesData = new ArrayList<>();
......
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