1.报表bug修改
This commit is contained in:
@@ -14,11 +14,13 @@ import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
@@ -38,6 +40,10 @@ public interface CsLineFeignClient {
|
||||
@PostMapping("/findByNdid")
|
||||
HttpResult<List<CsLinePO>> findByNdid(@RequestParam("id") String id);
|
||||
|
||||
|
||||
@GetMapping("/getCustomDetailByLineId")
|
||||
HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam("id") String id);
|
||||
|
||||
@PostMapping("/getPositionById")
|
||||
HttpResult<String> getPositionById(@RequestParam("id") String id);
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
@@ -54,6 +55,12 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam("id") String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据id查询监测点",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> getPositionById(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","通过id查询监测点位置",cause.toString());
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
@@ -104,6 +105,17 @@ public class CslineController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineList, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getCustomDetailByLineId")
|
||||
@ApiOperation("根据id查询监测点")
|
||||
public HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam String id){
|
||||
String methodDescribe = getMethodDescribe("getCustomDetailByLineId");
|
||||
Map<String,String> map = csLinePOService.getCustomDetailByLineId(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, map, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateLine")
|
||||
@ApiOperation("修改监测点信息")
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -17,4 +18,7 @@ import java.util.List;
|
||||
public interface CsLinePOMapper extends BaseMapper<CsLinePO> {
|
||||
|
||||
List<CsLinePO> findByNdid(@Param("id") String id);
|
||||
|
||||
|
||||
Map<String,String> getCustomDetailByLineId(@Param("lineId")String lineId);
|
||||
}
|
||||
@@ -33,4 +33,22 @@
|
||||
where
|
||||
t0.ndid = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getCustomDetailByLineId" resultType="map">
|
||||
SELECT
|
||||
line.id AS lineId,
|
||||
line.name as lineName,
|
||||
concat(round(line.pt_ratio,0),concat(':',round(line.pt2_ratio,0))) as pt,
|
||||
concat(round(line.ct_ratio,0),concat(':',round(line.ct2_ratio,0))) as ct,
|
||||
line.dev_capacity as Dev_Capacity,
|
||||
line.short_circuit_capacity as Short_Capacity,
|
||||
line.basic_capacity as Standard_Capacity,
|
||||
line.protocol_capacity as Deal_Capacity,
|
||||
line.vol_grade AS voltageLevel
|
||||
FROM
|
||||
cs_line line
|
||||
WHERE
|
||||
line.id = #{lineId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -10,6 +10,7 @@ import com.njcn.web.pojo.param.BaseParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -39,6 +40,9 @@ public interface CsLinePOService extends IService<CsLinePO>{
|
||||
*/
|
||||
List<CsLinePO> findByNdid(String id);
|
||||
|
||||
|
||||
Map<String,String> getCustomDetailByLineId(String lineId);
|
||||
|
||||
/**
|
||||
* 更新监测点信息
|
||||
* @param csLineParam
|
||||
|
||||
@@ -105,6 +105,10 @@ public class CsLinePOServiceImpl extends ServiceImpl<CsLinePOMapper, CsLinePO> i
|
||||
return this.baseMapper.findByNdid(id);
|
||||
}
|
||||
|
||||
public Map<String,String> getCustomDetailByLineId(String lineId){
|
||||
return this.baseMapper.getCustomDetailByLineId(lineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateLine(CsLineParam csLineParam) {
|
||||
LambdaUpdateWrapper<CsLinePO> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.csharmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Getter;
|
||||
@@ -7,6 +8,8 @@ import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import static com.baomidou.mybatisplus.annotation.IdType.ASSIGN_ID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
@@ -25,6 +28,7 @@ public class PqSensitiveUser extends BaseEntity implements Serializable{
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id",type = ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user