Commit 1297bf15 authored by dahai's avatar dahai

修改查询分局名称

parent f2385af1
...@@ -165,9 +165,11 @@ public interface ReceiptMapper { ...@@ -165,9 +165,11 @@ public interface ReceiptMapper {
"WHERE ACCEPT_NO=#{groupNo}") "WHERE ACCEPT_NO=#{groupNo}")
public Map<String,Object> selectCountTimeT(@Param("groupNo") String groupNo); public Map<String,Object> selectCountTimeT(@Param("groupNo") String groupNo);
@Select("select police_name from (select DISTINCT substr(#{policeCode},5,2)||'0000' POLICE_CODE from POLICE_DIC where substr(#{policeCode},5,2)\n" + @Select("select police_name \n" +
"=substr(POLICE_DIC.POLICE_CODE,5,2) ) p1\n" + "from (select DISTINCT substr(#{policeCode},5,2)||'000' POLICE_CODE \n" +
"left join POLICE_DIC on p1.POLICE_CODE = substr(POLICE_DIC.POLICE_CODE,7,6)") " from POLICE_DIC where substr(#{policeCode},5,2) =substr(POLICE_DIC.POLICE_CODE,5,2) ) p1 \n" +
"left join POLICE_DIC on substr(p1.POLICE_CODE,0,2) = substr(POLICE_DIC.POLICE_CODE,5,2) \n" +
"order by POLICE_DIC.POLICE_CODE")
public List<Map<String,Object>> queryPoliceName(@Param("policeCode") String policeCode); public List<Map<String,Object>> queryPoliceName(@Param("policeCode") String policeCode);
@Select("select \n" + @Select("select \n" +
......
...@@ -206,8 +206,13 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -206,8 +206,13 @@ public class ReceiptServiceImpl implements ReceiptService {
@Override @Override
public List<Map<String, Object>> queryPoliceName(String policeCode) { public List<Map<String, Object>> queryPoliceName(String policeCode) {
List<Map<String, Object>> mapList = receiptMapper.queryPoliceName(policeCode);
List<Map<String,Object>> maps = new ArrayList<>();
if (mapList.size()>0){
maps.add(mapList.get(0));
}
return receiptMapper.queryPoliceName(policeCode); return maps;
} }
@Override @Override
......
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