Commit b74abfcf by Suvalue

板块指数接口调整

parent bed28007
package com.bsoft.api.controller;
import com.bsoft.api.common.Result;
import com.bsoft.api.common.annotations.CurrentUser;
import com.bsoft.api.common.annotations.Token;
import com.bsoft.api.model.reqmodel.BlockValues;
import com.bsoft.api.model.reqmodel.BlockValuesNew;
......@@ -28,6 +29,7 @@ public class BlockValuesController {
/**
* 根据pageId查询板块数值
*
* @return
* @throws Exception
*/
......@@ -35,24 +37,25 @@ public class BlockValuesController {
// @PostMapping("blockValues")
@Token
@ApiOperation("根据Page查询板块数值")
public Object getBlockValuesByPageID(@RequestBody BlockValues blockValues) throws InterruptedException {
public Object getBlockValuesByPageID(@RequestBody BlockValues blockValues) throws InterruptedException {
List<BlockValue> list= blockValuesService.getBlockValuesByPageCode(blockValues.getPageCode(),
blockValues.getDisease(), blockValues.getDoctor(),blockValues.getDepartment(),blockValues.getTime());
List<BlockValue> list = blockValuesService.getBlockValuesByPageCode(blockValues.getPageCode(),
blockValues.getDisease(),blockValues.getDoctor(),blockValues.getDepartment(),blockValues.getTime());
return Result.success(list);
}
/**
* 根据pageId查询板块数值
*
* @return
* @throws Exception
*/
@PostMapping("blockValuesNew")
@Token
@ApiOperation("根据Page查询板块数值")
public Object getBlockValuesByPageIDNew(@RequestBody BlockValuesNew blockValues) throws InterruptedException {
public Object getBlockValuesByPageIDNew(@ApiIgnore @CurrentUser Long userId,@RequestBody BlockValuesNew blockValues) throws InterruptedException {
List<BlockValue> list= blockValuesService.getBlockValuesByPageCodeNew(blockValues.getPageCode(),blockValues.getDim());
List<BlockValue> list = blockValuesService.getBlockValuesByPageCodeNew(userId,blockValues.getPageCode(),blockValues.getDim());
return Result.success(list);
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import java.util.List;
import java.util.Map;
public interface BlockValuesService {
List<BlockValue> getBlockValuesByPageCode(Integer pageCode, Integer disease, Integer doctor, Integer department, Integer time) throws InterruptedException;
List<BlockValue> getBlockValuesByPageCode(Integer pageCode,Integer disease,Integer doctor,Integer department,Integer time) throws InterruptedException;
List<BlockValue> getBlockValuesByPageCodeNew(Integer pageCode, Map<String,String> dim) throws InterruptedException;
List<BlockValue> getBlockValuesByPageCodeNew(Long userId,Integer pageCode,Map<String,String> dim) throws InterruptedException;
}
......@@ -98,7 +98,7 @@ public class BlockValuesServiceImpl implements BlockValuesService {
}
@Override
public List<BlockValue> getBlockValuesByPageCodeNew(Integer pageCode,Map<String,String> dim) throws InterruptedException {
public List<BlockValue> getBlockValuesByPageCodeNew(Long userId,Integer pageCode,Map<String,String> dim) throws InterruptedException {
/**
* 1.根据pageCode查询所有对应的pageId
* 查询要求为pageCode为当前pageCode,相同pageId的所有数据有且仅有DIM_ID为
......@@ -122,6 +122,10 @@ public class BlockValuesServiceImpl implements BlockValuesService {
for(Iterator iterator = inFields.iterator();iterator.hasNext();){
Object obj = iterator.next();
Object value = dim.get(obj);
if(value instanceof String){
String valueNew = dim.get(obj);
dim.put(String.valueOf(obj),valueNew.trim());
}
remove(value,iterator);
}
......@@ -131,6 +135,9 @@ public class BlockValuesServiceImpl implements BlockValuesService {
throw new DBConfigurationError("页面维度配置表错误,请联系管理员");
}
//将用户信息配置进参数
dim.put("USER",String.valueOf(userId));
SerPage page = pageList.get(0);
//根据pageId查询所有板块
......
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