Commit 1eb00caa by Suvalue

pg参数类型修改

parent aa6144e7
......@@ -6,5 +6,5 @@ import java.util.Map;
public interface BlockValuesMapper {
List<Map<String,Object>> selectByWhere(String tableName,String whereSql);
List<Map<String,Object>> selectByWhereNew(Map<String,String> map);
List<Map<String,Object>> selectByWhereNew(Map<String,Object> map);
}
......@@ -22,7 +22,7 @@ public interface SerProjValueMapper {
List<SerProjValueResp> selectValue(@Param("projType") Integer projType,
@Param("typeState") Integer typeState,
@Param("exponentId") Integer exponentId,
@Param("dept") String dept, @Param("date") Integer date,
@Param("dept") String dept, @Param("date") String date,
@Param("budgetType") Integer budgetType, @Param("hosCode") String hosCode);
int deleteByDeptWithDate(@Param("dept") String dept, @Param("date") BigDecimal date,
......@@ -33,5 +33,5 @@ public interface SerProjValueMapper {
void updateValue(@Param("date") BigDecimal date, @Param("hosCode") String hosCode);
List<Summary> selectSummary(@Param("date") Integer date, @Param("hosCode") String hosCode);
List<Summary> selectSummary(@Param("date") String date, @Param("hosCode") String hosCode);
}
\ No newline at end of file
......@@ -12,5 +12,5 @@ public class BlockValuesNew {
@NotNull(message = "pageCode 参数必传")
private Integer pageCode;
@ApiModelProperty("维度查询值")
private Map<String,String> dim;
private Map<String, Object> dim;
}
......@@ -15,5 +15,5 @@ public interface AsynBlockValuesService {
void getBlockValues(List<BlockValue> list, Long blockId, String tableName,
String whereClause, CountDownLatch latch);
void getBlockValuesNew(List<BlockValue> list, Long blockId,Map<String,String> dim, CountDownLatch latch);
void getBlockValuesNew(List<BlockValue> list, Long blockId,Map<String,Object> dim, CountDownLatch latch);
}
......@@ -8,5 +8,5 @@ import java.util.Map;
public interface BlockValuesService {
List<BlockValue> getBlockValuesByPageCode(Integer pageCode,Integer disease,Integer doctor,Integer department,Integer time) throws InterruptedException;
List<BlockValue> getBlockValuesByPageCodeNew(Long userId,Integer pageCode,Map<String,String> dim) throws InterruptedException;
List<BlockValue> getBlockValuesByPageCodeNew(Long userId,Integer pageCode,Map<String,Object> dim) throws InterruptedException;
}
......@@ -21,20 +21,20 @@ public class AsynBlockValuesServiceImpl implements AsynBlockValuesService {
@Async
@Override
public void getBlockValues(List<BlockValue> list,Long blockId,String tableName,
String whereClause,CountDownLatch latch) {
try{
public void getBlockValues(List<BlockValue> list, Long blockId, String tableName,
String whereClause, CountDownLatch latch) {
try {
System.out.println("开始" + tableName);
List<Map<String,Object>> dataList = blockValuesMapper.selectByWhere(tableName,whereClause);
BlockValue blockValue = new BlockValue(blockId,dataList);
synchronized(obj){
List<Map<String, Object>> dataList = blockValuesMapper.selectByWhere(tableName, whereClause);
BlockValue blockValue = new BlockValue(blockId, dataList);
synchronized (obj) {
list.add(blockValue);
}
System.out.println("结束" + tableName);
}catch(Exception e){
log.error(e.getMessage(),e);
}finally{
} catch (Exception e) {
log.error(e.getMessage(), e);
} finally {
latch.countDown();
}
......@@ -43,17 +43,17 @@ public class AsynBlockValuesServiceImpl implements AsynBlockValuesService {
@Async
@Override
public void getBlockValuesNew(List<BlockValue> list,Long blockId,Map<String,String> whereClause,CountDownLatch latch) {
try{
List<Map<String,Object>> dataList = blockValuesMapper.selectByWhereNew(whereClause);
public void getBlockValuesNew(List<BlockValue> list, Long blockId, Map<String, Object> whereClause, CountDownLatch latch) {
try {
List<Map<String, Object>> dataList = blockValuesMapper.selectByWhereNew(whereClause);
log.info("开始查询" + whereClause.get("tableName") + ",数据条数:" + dataList.size() + ",查询条件:" + whereClause);
BlockValue blockValue = new BlockValue(blockId,dataList);
synchronized(obj){
BlockValue blockValue = new BlockValue(blockId, dataList);
synchronized (obj) {
list.add(blockValue);
}
}catch(Exception e){
log.error(e.getMessage(),e);
}finally{
} catch (Exception e) {
log.error(e.getMessage(), e);
} finally {
latch.countDown();
}
......
......@@ -88,7 +88,7 @@ public class BlockValuesServiceImpl implements BlockValuesService {
}
@Override
public List<BlockValue> getBlockValuesByPageCodeNew(Long userId, Integer pageCode, Map<String, String> dim) throws InterruptedException {
public List<BlockValue> getBlockValuesByPageCodeNew(Long userId, Integer pageCode, Map<String, Object> dim) throws InterruptedException {
/**
* 1.根据pageCode查询所有对应的pageId
* 查询要求为pageCode为当前pageCode,相同pageId的所有数据有且仅有DIM_ID为
......@@ -112,9 +112,9 @@ 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());
if (value instanceof Object) {
Object valueNew = dim.get(obj);
dim.put(String.valueOf(obj), valueNew);
}
remove(value, iterator);
}
......@@ -126,7 +126,7 @@ public class BlockValuesServiceImpl implements BlockValuesService {
}
//将用户信息配置进参数
dim.put("USER", String.valueOf(userId));
dim.put("USER", userId);
SerPage page = pageList.get(0);
......@@ -139,7 +139,7 @@ public class BlockValuesServiceImpl implements BlockValuesService {
Long blockId = data.getBlockId();
// String tableName = "VAL_BLOCK_VALUES_" + pageCode + "_" + page.getId() + "_" + blockId;
String tableName = data.getTableName();
Map<String, String> map = new HashMap<String, String>() {
Map<String, Object> map = new HashMap<String, Object>() {
{
put("tableName", tableName);
put("whereSql", data.getWhereClause());
......
......@@ -58,7 +58,7 @@ public class SerProjValueServiceImpl implements SerProjValueService {
if (projectInfo != null && projectInfo.size() > 0) {
for (ProjectInfo projInfo : projectInfo) {
values = serProjValueMapper.selectValue(projectType, (Integer) enumInfo.get("value"),
projInfo.getExponentId(), deptCode, date, BudgetType.NOT.getValue(), orgCode);
projInfo.getExponentId(), deptCode, date.toString(), BudgetType.NOT.getValue(), orgCode);
if (values != null && values.size() > 0) {
for (SerProjValueResp value : values) {
valueSz = projValueSzMapper.selectByProj(value.getProjId(), date, deptCode, orgCode);
......@@ -140,7 +140,7 @@ public class SerProjValueServiceImpl implements SerProjValueService {
// }
// }
// }
List<Summary> result = serProjValueMapper.selectSummary(date, orgCode);
List<Summary> result = serProjValueMapper.selectSummary(date.toString(), orgCode);
return result;
}
......
......@@ -94,7 +94,7 @@
FROM sys_user_sbj_rs uor,
sys_subject o
where uor.ORG_ID = o.ID
and uor.USER_ID = #{userId,jdbcType=DECIMAL}
and uor.USER_ID = #{userId}
and uor.STATE = 1
and o.STATE = 1
and o.PARENT_ID = 0
......
......@@ -205,7 +205,7 @@
</if>
left join val_proj_value_sz sz on sz.PROJ_ID = m.PROJ_ID
AND sz.DEPT_CODE = v.DEPT_CODE
AND sz.DATE = #{date,jdbcType=DECIMAL}
AND sz.DATE = cast(#{date,jdbcType=DECIMAL} as integer)
AND sz.HOS_CODE = v.HOS_CODE
WHERE 1 = 1 and p.STATE = 1
<if test="projType!=null">
......@@ -230,7 +230,7 @@
and p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
AND p.IS_BUDGET &amp; 1
> 0
AND v.DATE = cast(substr(#{date,jdbcType=VARCHAR}, 0, 5) as integer) , 4)
AND v.DATE = cast(substr(#{date,jdbcType=VARCHAR}, 0, 5) as integer)
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
AND v.HOS_CODE = #{orgCode,jdbcType=VARCHAR}
</delete>
......@@ -271,7 +271,7 @@
left join val_proj_value_sz sz
on sz.PROJ_ID = p.ID
AND sz.DEPT_CODE = v.DEPT_CODE
AND sz.DATE = #{date,jdbcType=DECIMAL}
AND sz.DATE = cast(#{date,jdbcType=DECIMAL} as integer)
AND sz.HOS_CODE = v.HOS_CODE
WHERE 1 = 1
and p.STATE = 1
......
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