Commit b2df1ac7 authored by chenzhao's avatar chenzhao

分析 相关行 匹配工况变量

parent 0ec81aba
package com.yeejoin.amos.boot.module.jxiop.biz.controller; package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointVarCorrelationDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointVarCorrelationDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointVarCorrelation;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanPointVarCorrelationServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanPointVarCorrelationServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -15,6 +19,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel; ...@@ -15,6 +19,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* *
...@@ -112,4 +117,32 @@ public class IdxBizFanPointVarCorrelationController extends BaseController { ...@@ -112,4 +117,32 @@ public class IdxBizFanPointVarCorrelationController extends BaseController {
public ResponseModel<List<IdxBizFanPointVarCorrelationDto>> selectForList() { public ResponseModel<List<IdxBizFanPointVarCorrelationDto>> selectForList() {
return ResponseHelper.buildResponse(idxBizFanPointVarCorrelationServiceImpl.queryForIdxBizFanPointVarCorrelationList()); return ResponseHelper.buildResponse(idxBizFanPointVarCorrelationServiceImpl.queryForIdxBizFanPointVarCorrelationList());
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "查询当前点位所选择的工况变量", notes = "查询当前点位所选择的工况变量")
@GetMapping(value = "/getCurrentChoosePoint")
public ResponseModel<Map<String,Object>> getCurrentChoosePoint(String gatewayId,String analysePointId) {
return ResponseHelper.buildResponse(idxBizFanPointVarCorrelationServiceImpl.getCurrentChoosePoint(gatewayId,analysePointId));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "查询当前点位所选择的工况变量", notes = "查询当前点位所选择的工况变量")
@PostMapping(value = "/updatePointChoose")
public ResponseModel updatePointChoose(@RequestBody IdxBizFanPointVarCorrelationDto dto) {
idxBizFanPointVarCorrelationServiceImpl.updatePointChoose(dto.getAnalysisGatewayId(),dto.getAnalysisPointId(),dto.getProcessPointIds());
return CommonResponseUtil.success();
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "查询当前点位的工况变量", notes = "查询当前点位的工况变量")
@GetMapping(value = "/getPointProcess")
public ResponseModel<Map<String,Object>> getPointProcess(String gatewayId, String analysePointId) {
return ResponseHelper.buildResponse(idxBizFanPointVarCorrelationServiceImpl.getPointProcess(gatewayId,analysePointId));
}
} }
...@@ -2,7 +2,11 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller; ...@@ -2,7 +2,11 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
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.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointVarCorrelationDto;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointVarCorrelationDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointVarCorrelationDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointVarCorrelation;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointVarCorrelation;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvPointVarCorrelationServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvPointVarCorrelationServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -15,6 +19,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel; ...@@ -15,6 +19,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* *
...@@ -112,4 +117,32 @@ public class IdxBizPvPointVarCorrelationController extends BaseController { ...@@ -112,4 +117,32 @@ public class IdxBizPvPointVarCorrelationController extends BaseController {
public ResponseModel<List<IdxBizPvPointVarCorrelationDto>> selectForList() { public ResponseModel<List<IdxBizPvPointVarCorrelationDto>> selectForList() {
return ResponseHelper.buildResponse(idxBizPvPointVarCorrelationServiceImpl.queryForIdxBizPvPointVarCorrelationList()); return ResponseHelper.buildResponse(idxBizPvPointVarCorrelationServiceImpl.queryForIdxBizPvPointVarCorrelationList());
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "查询当前点位所选择的工况变量", notes = "查询当前点位所选择的工况变量")
@GetMapping(value = "/getCurrentChoosePoint")
public ResponseModel<Map<String,Object>> getCurrentChoosePoint(String gatewayId, String analysePointId) {
return ResponseHelper.buildResponse(idxBizPvPointVarCorrelationServiceImpl.getCurrentChoosePoint(gatewayId,analysePointId));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "查询当前点位所选择的工况变量", notes = "查询当前点位所选择的工况变量")
@PostMapping(value = "/updatePointChoose")
public ResponseModel updatePointChoose(@RequestBody IdxBizFanPointVarCorrelationDto dto) {
idxBizPvPointVarCorrelationServiceImpl.updatePointChoose(dto.getAnalysisGatewayId(),dto.getAnalysisPointId(),dto.getProcessPointIds());
return CommonResponseUtil.success();
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "查询当前点位的工况变量", notes = "查询当前点位的工况变量")
@GetMapping(value = "/getPointProcess")
public ResponseModel<Map<String,Object>> getPointProcess(String gatewayId, String analysePointId) {
return ResponseHelper.buildResponse(idxBizPvPointVarCorrelationServiceImpl.getPointProcess(gatewayId,analysePointId));
}
} }
...@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -86,4 +87,6 @@ public class IdxBizFanPointVarCorrelationDto { ...@@ -86,4 +87,6 @@ public class IdxBizFanPointVarCorrelationDto {
@TableField("EQUIPMENT_NAME") @TableField("EQUIPMENT_NAME")
private String equipmentName; private String equipmentName;
@TableField(exist = false)
private List<String> processPointIds;
} }
...@@ -149,4 +149,9 @@ public class IdxBizFanPointVarCorrelation{ ...@@ -149,4 +149,9 @@ public class IdxBizFanPointVarCorrelation{
*/ */
@TableField("PROCESS_POINT_NAME") @TableField("PROCESS_POINT_NAME")
private String processPointName; private String processPointName;
/**
* 匹配工况变量
*/
@TableField("MATCH_PROCESS_PONIT")
private String matchProcessPoint;
} }
...@@ -151,4 +151,7 @@ public class IdxBizPvPointVarCorrelation{ ...@@ -151,4 +151,7 @@ public class IdxBizPvPointVarCorrelation{
*/ */
@TableField("PROCESS_POINT_NAME") @TableField("PROCESS_POINT_NAME")
private String processPointName; private String processPointName;
@TableField("MATCH_PROCESS_POINT")
private String matchProcessPoint;
} }
...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2; ...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointVarCorrelation; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointVarCorrelation;
import java.util.List;
/** /**
* Mapper 接口 * Mapper 接口
* *
...@@ -10,5 +12,6 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointVarCorrelatio ...@@ -10,5 +12,6 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointVarCorrelatio
* @date 2023-08-15 * @date 2023-08-15
*/ */
public interface IdxBizFanPointVarCorrelationMapper extends BaseMapper<IdxBizFanPointVarCorrelation> { public interface IdxBizFanPointVarCorrelationMapper extends BaseMapper<IdxBizFanPointVarCorrelation> {
void updatePointChoose(String gatewayId, Long analysePointId, List<String> processPointIds);
} }
...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2; ...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointVarCorrelation; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointVarCorrelation;
import java.util.List;
/** /**
* Mapper 接口 * Mapper 接口
* *
...@@ -11,4 +13,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointVarCorrelation ...@@ -11,4 +13,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointVarCorrelation
*/ */
public interface IdxBizPvPointVarCorrelationMapper extends BaseMapper<IdxBizPvPointVarCorrelation> { public interface IdxBizPvPointVarCorrelationMapper extends BaseMapper<IdxBizPvPointVarCorrelation> {
void updatePointChoose(String gatewayId, Long analysePointId, List<String> processPointIds);
} }
...@@ -768,7 +768,7 @@ public class CommonServiceImpl { ...@@ -768,7 +768,7 @@ public class CommonServiceImpl {
IdxBizFanPointProcessVariableClassification.getGatewayId()) IdxBizFanPointProcessVariableClassification.getGatewayId())
.eq("ANALYSIS_POINT_ID", .eq("ANALYSIS_POINT_ID",
IdxBizFanPointProcessVariableClassification.getSequenceNbr()) IdxBizFanPointProcessVariableClassification.getSequenceNbr())
.eq("MATCH","匹配")); .eq("MATCH_PROCESS_POINT","匹配"));
if (CollectionUtil.isEmpty(gongkuangList) || gongkuangList.size() !=3 ){ if (CollectionUtil.isEmpty(gongkuangList) || gongkuangList.size() !=3 ){
gongkuangList = idxBizFanPointVarCorrelationMapper gongkuangList = idxBizFanPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizFanPointVarCorrelation>() .selectList(new QueryWrapper<IdxBizFanPointVarCorrelation>()
...@@ -821,7 +821,7 @@ public class CommonServiceImpl { ...@@ -821,7 +821,7 @@ public class CommonServiceImpl {
idxBizPvPointProcessVariableClassification.getGatewayId()) idxBizPvPointProcessVariableClassification.getGatewayId())
.eq("ANALYSIS_POINT_ID", .eq("ANALYSIS_POINT_ID",
idxBizPvPointProcessVariableClassification.getSequenceNbr()) idxBizPvPointProcessVariableClassification.getSequenceNbr())
.eq("MATCH","匹配")); .eq("MATCH_PROCESS_POINT","匹配"));
if (CollectionUtil.isEmpty(gongkuangList) || gongkuangList.size() != 3){ if (CollectionUtil.isEmpty(gongkuangList) || gongkuangList.size() != 3){
gongkuangList = idxBizPvPointVarCorrelationMapper gongkuangList = idxBizPvPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizPvPointVarCorrelation>() .selectList(new QueryWrapper<IdxBizPvPointVarCorrelation>()
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapBuilder;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointVarCorrelationDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointVarCorrelationDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointVarCorrelation; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointVarCorrelation;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointVarCorrelationMapper; import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointVarCorrelationMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizFanPointVarCorrelationService; import com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizFanPointVarCorrelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
* 服务实现类 * 服务实现类
...@@ -18,6 +25,9 @@ import java.util.List; ...@@ -18,6 +25,9 @@ import java.util.List;
*/ */
@Service @Service
public class IdxBizFanPointVarCorrelationServiceImpl extends BaseService<IdxBizFanPointVarCorrelationDto, IdxBizFanPointVarCorrelation, IdxBizFanPointVarCorrelationMapper> implements IIdxBizFanPointVarCorrelationService { public class IdxBizFanPointVarCorrelationServiceImpl extends BaseService<IdxBizFanPointVarCorrelationDto, IdxBizFanPointVarCorrelation, IdxBizFanPointVarCorrelationMapper> implements IIdxBizFanPointVarCorrelationService {
@Autowired
private IdxBizFanPointVarCorrelationMapper idxBizFanPointVarCorrelationMapper;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -31,4 +41,47 @@ public class IdxBizFanPointVarCorrelationServiceImpl extends BaseService<IdxBizF ...@@ -31,4 +41,47 @@ public class IdxBizFanPointVarCorrelationServiceImpl extends BaseService<IdxBizF
public List<IdxBizFanPointVarCorrelationDto> queryForIdxBizFanPointVarCorrelationList() { public List<IdxBizFanPointVarCorrelationDto> queryForIdxBizFanPointVarCorrelationList() {
return this.queryForList("" , false); return this.queryForList("" , false);
} }
public Map<String,Object> getCurrentChoosePoint(String gatewayId, String analysePointId) {
List<IdxBizFanPointVarCorrelation> gongkuangList;
gongkuangList = idxBizFanPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizFanPointVarCorrelation>()
.eq("ANALYSIS_GATEWAY_ID",
gatewayId)
.eq("ANALYSIS_POINT_ID",
analysePointId)
.eq("MATCH_PROCESS_PONIT","匹配"));
if (CollectionUtil.isEmpty(gongkuangList) || gongkuangList.size() !=3 ){
gongkuangList = idxBizFanPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizFanPointVarCorrelation>()
.eq("ANALYSIS_GATEWAY_ID",
gatewayId)
.eq("ANALYSIS_POINT_ID",
analysePointId)
.orderByDesc("CORRELATION_COEFFICIENT").last("limit 0,3"));
}
List<Long> collect = gongkuangList.stream().map(IdxBizFanPointVarCorrelation::getProcessPointId).collect(Collectors.toList());
return MapBuilder.<String,Object>create().put("processPointIds",collect).build();
}
public void updatePointChoose(String gatewayId, Long analysePointId, List<String> processPointIds) {
this.getBaseMapper().updatePointChoose(gatewayId,analysePointId,null);
this.getBaseMapper().updatePointChoose(gatewayId,analysePointId,processPointIds);
}
public Map<String,Object> getPointProcess(String gatewayId, String analysePointId) {
List<IdxBizFanPointVarCorrelation> gongkuangList = idxBizFanPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizFanPointVarCorrelation>()
.eq("ANALYSIS_GATEWAY_ID",
gatewayId)
.eq("ANALYSIS_POINT_ID",
analysePointId));
return MapBuilder.<String,Object>create().put("processPointIds",gongkuangList).build();
}
} }
\ No newline at end of file
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapBuilder;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointVarCorrelationDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointVarCorrelationDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointVarCorrelation; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointVarCorrelation;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointVarCorrelationMapper; import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointVarCorrelationMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizPvPointVarCorrelationService; import com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizPvPointVarCorrelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
* 服务实现类 * 服务实现类
...@@ -18,6 +26,8 @@ import java.util.List; ...@@ -18,6 +26,8 @@ import java.util.List;
*/ */
@Service @Service
public class IdxBizPvPointVarCorrelationServiceImpl extends BaseService<IdxBizPvPointVarCorrelationDto,IdxBizPvPointVarCorrelation,IdxBizPvPointVarCorrelationMapper> implements IIdxBizPvPointVarCorrelationService { public class IdxBizPvPointVarCorrelationServiceImpl extends BaseService<IdxBizPvPointVarCorrelationDto,IdxBizPvPointVarCorrelation,IdxBizPvPointVarCorrelationMapper> implements IIdxBizPvPointVarCorrelationService {
@Autowired
private IdxBizPvPointVarCorrelationMapper idxBizPvPointVarCorrelationMapper;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -31,4 +41,49 @@ public class IdxBizPvPointVarCorrelationServiceImpl extends BaseService<IdxBizPv ...@@ -31,4 +41,49 @@ public class IdxBizPvPointVarCorrelationServiceImpl extends BaseService<IdxBizPv
public List<IdxBizPvPointVarCorrelationDto> queryForIdxBizPvPointVarCorrelationList() { public List<IdxBizPvPointVarCorrelationDto> queryForIdxBizPvPointVarCorrelationList() {
return this.queryForList("" , false); return this.queryForList("" , false);
} }
public Map<String,Object> getCurrentChoosePoint(String gatewayId, String analysePointId) {
List<IdxBizPvPointVarCorrelation> gongkuangList;
gongkuangList = idxBizPvPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizPvPointVarCorrelation>()
.eq("ANALYSIS_GATEWAY_ID",
gatewayId)
.eq("ANALYSIS_POINT_ID",
analysePointId)
.eq("MATCH_PROCESS_POINT","匹配"));
if (CollectionUtil.isEmpty(gongkuangList) || gongkuangList.size() !=3 ){
gongkuangList = idxBizPvPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizPvPointVarCorrelation>()
.eq("ANALYSIS_GATEWAY_ID",
gatewayId)
.eq("ANALYSIS_POINT_ID",
analysePointId)
.orderByDesc("CORRELATION_COEFFICIENT").last("limit 0,3"));
}
List<String> collect = gongkuangList.stream().map(IdxBizPvPointVarCorrelation::getProcessPointId).collect(Collectors.toList());
return MapBuilder.<String,Object>create().put("processPointIds",collect).build();
}
public void updatePointChoose(String gatewayId, Long analysePointId, List<String> processPointIds) {
this.getBaseMapper().updatePointChoose(gatewayId,analysePointId,null);
this.getBaseMapper().updatePointChoose(gatewayId,analysePointId,processPointIds);
}
public Map<String,Object> getPointProcess(String gatewayId, String analysePointId) {
List<IdxBizPvPointVarCorrelation> gongkuangList = idxBizPvPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizPvPointVarCorrelation>()
.eq("ANALYSIS_GATEWAY_ID",
gatewayId)
.eq("ANALYSIS_POINT_ID",
analysePointId));
return MapBuilder.<String,Object>create().put("processPointIds",gongkuangList).build();
}
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointVarCorrelationMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointVarCorrelationMapper">
<update id="updatePointChoose">
update idx_biz_fan_point_var_correlation
<set>
<if test="processPointIds == null || processPointIds.size() == 0">
MATCH_PROCESS_PONIT = null
</if>
<if test="processPointIds != null and processPointIds.size() > 0">
MATCH_PROCESS_PONIT = '匹配'
</if>
</set>
WHERE ANALYSIS_GATEWAY_ID = #{gatewayId}
and ANALYSIS_POINT_ID = #{analysePointId}
<if test="processPointIds != null and processPointIds.size() > 0">
and PROCESS_POINT_ID in
<foreach collection="processPointIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</update>
</mapper> </mapper>
...@@ -2,4 +2,23 @@ ...@@ -2,4 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointVarCorrelationMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointVarCorrelationMapper">
<update id="updatePointChoose">
update idx_biz_pv_point_var_correlation
<set>
<if test="processPointIds == null || processPointIds.size() == 0">
MATCH_PROCESS_PONIT = null
</if>
<if test="processPointIds != null and processPointIds.size() > 0">
MATCH_PROCESS_PONIT = '匹配'
</if>
</set>
WHERE ANALYSIS_GATEWAY_ID = #{gatewayId}
and ANALYSIS_POINT_ID = #{analysePointId}
<if test="processPointIds != null and processPointIds.size() > 0">
and PROCESS_POINT_ID in
<foreach collection="processPointIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</update>
</mapper> </mapper>
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