Commit 1eb00caa by Suvalue

pg参数类型修改

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