Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bigdatainterservice
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曹鹏
bigdatainterservice
Commits
8b61878b
Commit
8b61878b
authored
May 16, 2019
by
吴善钰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员画像,网吧信息和同住人员信息接口
parent
c646d1bc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
159 additions
and
56 deletions
+159
-56
src/main/java/com/founder/interservice/mapper/xzxt/RyhxMapper.java
+7
-2
src/main/java/com/founder/interservice/ryhx/controller/RyhxController.java
+49
-26
src/main/java/com/founder/interservice/ryhx/model/TbStCqhotelData.java
+4
-0
src/main/java/com/founder/interservice/ryhx/service/RyhxService.java
+7
-2
src/main/java/com/founder/interservice/ryhx/service/impl/RyhxServiceImpl.java
+26
-8
src/main/resources/mybatis/mapper/xzxt/RyhxMapper.xml
+66
-18
No files found.
src/main/java/com/founder/interservice/mapper/xzxt/RyhxMapper.java
View file @
8b61878b
...
...
@@ -7,13 +7,18 @@ import org.apache.ibatis.annotations.Mapper;
import
org.springframework.stereotype.Repository
;
import
com.founder.interservice.ryhx.model.TbStCqhotelData
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
@Repository
public
interface
RyhxMapper
{
TbStCqhotel
queryHotelAddr
(
String
hotelno
)
throws
Exception
;
TbStCqhotelData
queryHotelDetail
(
String
hotelno
)
throws
Exception
;
List
<
TbStCqhotelData
>
queryHotelDetail
(
Map
map
)
throws
Exception
;
List
<
TbStCqwbdata
>
queryWbxxList
(
String
zjhm
)
throws
Exception
;
TbStCqwbdataVOS
queryWbxx
(
String
zjhm
)
throws
Exception
;
List
<
TbStCqhotelData
>
queryHotelRzxx
(
String
zjhm
)
;
}
src/main/java/com/founder/interservice/ryhx/controller/RyhxController.java
View file @
8b61878b
...
...
@@ -9,6 +9,7 @@ import com.founder.interservice.model.SysDictitem;
import
com.founder.interservice.ryhx.model.TbStAsjAssist
;
import
com.founder.interservice.ryhx.model.TbStCqhotel
;
import
com.founder.interservice.ryhx.model.TbStCqhotelData
;
import
com.founder.interservice.ryhx.model.TbStCqwbdata
;
import
com.founder.interservice.ryhx.service.RyhxService
;
import
com.founder.interservice.ryhx.vo.TbStCqwbdataVOS
;
import
com.founder.interservice.service.DataService
;
...
...
@@ -121,47 +122,69 @@ public class RyhxController {
modelAndView
.
addObject
(
"zjhm"
,
zjhm
);
return
modelAndView
;
}
/*旅店信息查询
查询表为TB_ST_CQHOTELDATA
网吧信息查询
查询表为TB_ST_CQWBDATA
* */
/**
* 旅店信息查询
* 查询表为TB_ST_CQHOTELDATA
* 网吧信息查询
* 查询表为TB_ST_CQWBDATA
*
* 同房间人,查询当天,同住一个房间的人
* 网吧信息,查所有上网记录
* @param zjhm 身份证号
* @return
*/
@RequestMapping
(
value
=
"/getLdjbxx"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
ModelAndView
getLdjbxx
(
String
zjhm
){
TbStCqhotelData
tbStCqhotelData
=
null
;
TbStCqhotel
tbStCqhotel
=
null
;
List
<
TbStCqhotel
>
listHotel
=
new
ArrayList
<>();
SysDictitem
sysDictitem
=
new
SysDictitem
();
TbStCqwbdataVOS
tbStCqwbdataVOS
=
null
;
List
<
TbStCqwbdata
>
tbStCqwbdataList
=
null
;
//本人上网信息
List
<
TbStCqhotelData
>
listHotelData
=
null
;
//本人住店信息
List
<
TbStCqhotelData
>
listOtherHotelData
=
null
;
//本人同住人信息
try
{
if
(
zjhm
!=
null
&&
!
""
.
equals
(
zjhm
)){
String
idcode
=
zjhm
;
//旅店信息
tbStCqhotelData
=
ryhxService
.
queryHotelxx
(
idcode
);
String
hotelno
=
tbStCqhotelData
.
getHotelno
();
//疑似落脚点
if
(
hotelno
!=
null
&&
!
""
.
equals
(
hotelno
)){
tbStCqhotel
=
ryhxService
.
queryHotelAddr
(
hotelno
);
//旅店住宿信息
listHotelData
=
ryhxService
.
queryHotelRzxx
(
zjhm
);
if
(
listHotelData
!=
null
&&
listHotelData
.
size
()
>
0
)
{
for
(
TbStCqhotelData
tbStCqhotelData:
listHotelData
)
{
String
hotelno
=
tbStCqhotelData
.
getHotelno
();
String
rzsj
=
tbStCqhotelData
.
getRzsj
();
String
roomno
=
tbStCqhotelData
.
getRoomno
();
//疑似落脚点(旅店信息)
if
(
null
!=
hotelno
&&
!
""
.
equals
(
hotelno
))
{
tbStCqhotel
=
ryhxService
.
queryHotelAddr
(
hotelno
);
listHotel
.
add
(
tbStCqhotel
);
}
//根据旅店信息,查询同住人员信息
if
(
null
!=
tbStCqhotel
)
{
listOtherHotelData
=
ryhxService
.
queryHotelxx
(
zjhm
,
hotelno
,
rzsj
,
roomno
);
}
}
}
//网吧信息
tbStCqwbdataVOS
=
ryhxService
.
queryWbxx
(
zjhm
);
if
(
tbStCqwbdataVOS
!=
null
)
{
String
wbxzqh
=
tbStCqwbdataVOS
.
getWbxzqh
();
sysDictitem
.
setCode
(
wbxzqh
);
sysDictitem
.
setGroupid
(
"CODE_UNIT"
);
if
(
wbxzqh
!=
null
&&
!
""
.
equals
(
wbxzqh
))
{
String
wbxzqhmc
=
sysDictService
.
getCodeName
(
sysDictitem
);
tbStCqwbdataVOS
.
setWbxzqhmc
(
wbxzqhmc
);
tbStCqwbdataList
=
ryhxService
.
queryWbxxList
(
zjhm
);
if
(
tbStCqwbdataList
!=
null
&&
tbStCqwbdataList
.
size
()
>
0
)
{
for
(
TbStCqwbdata
tbStCqwbdata
:
tbStCqwbdataList
)
{
String
wbxzqh
=
tbStCqwbdata
.
getWbxzqh
();
sysDictitem
.
setCode
(
wbxzqh
);
sysDictitem
.
setGroupid
(
"CODE_UNIT"
);
if
(
wbxzqh
!=
null
&&
!
""
.
equals
(
wbxzqh
))
{
String
wbxzqhmc
=
sysDictService
.
getCodeName
(
sysDictitem
);
tbStCqwbdata
.
setWbxzqhmc
(
wbxzqhmc
);
}
}
}
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
ModelAndView
modelAndView
=
new
ModelAndView
(
"ryhx/gjxx"
);
ModelAndView
modelAndView
=
new
ModelAndView
();
modelAndView
.
setViewName
(
"ryhx/gjxx"
);
modelAndView
.
addObject
(
"zjhm"
,
zjhm
);
modelAndView
.
addObject
(
"hotel"
,
tbStCqhotelData
);
modelAndView
.
addObject
(
"hotela"
,
tbStCqhotel
);
modelAndView
.
addObject
(
"wbxx"
,
tbStCqwbdataVOS
);
modelAndView
.
addObject
(
"listOtherHotelData"
,
listOtherHotelData
);
//同住人员住宿信息
modelAndView
.
addObject
(
"listHotel"
,
listHotel
);
//本人住宿的酒店信息
modelAndView
.
addObject
(
"listHotelData"
,
listHotelData
);
//本人住宿信息
modelAndView
.
addObject
(
"wbxxList"
,
tbStCqwbdataList
);
//本人网吧信息
return
modelAndView
;
}
...
...
src/main/java/com/founder/interservice/ryhx/model/TbStCqhotelData.java
View file @
8b61878b
...
...
@@ -38,4 +38,7 @@ public class TbStCqhotelData {
private
String
gxsj
;
//更新时间
private
String
rzsj
;
//入住时间
private
String
ldsj
;
//离店时间
}
\ No newline at end of file
src/main/java/com/founder/interservice/ryhx/service/RyhxService.java
View file @
8b61878b
...
...
@@ -6,6 +6,9 @@ import com.founder.interservice.ryhx.model.TbStCqwbdata;
import
com.founder.interservice.ryhx.vo.TbStCqwbdataVOS
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.List
;
import
java.util.Map
;
/**
* @ClassName: RyhxService
* @Auther: 朱琳瑛
...
...
@@ -17,9 +20,11 @@ public interface RyhxService {
TbStCqhotel
queryHotelAddr
(
String
hotelno
)
throws
Exception
;
TbStCqhotelData
queryHotelxx
(
String
idcode
)
throws
Exception
;
List
<
TbStCqhotelData
>
queryHotelxx
(
String
zjhm
,
String
hotelno
,
String
rzsj
,
String
roomno
)
throws
Exception
;
TbStCqwbdataVOS
queryWbxx
(
String
zjhm
)
throws
Exception
;
List
<
TbStCqwbdata
>
queryWbxxList
(
String
zjhm
)
throws
Exception
;
String
getAsjxxList
(
String
ryhxSaxxUrl
,
String
zjhm
);
List
<
TbStCqhotelData
>
queryHotelRzxx
(
String
zjhm
);
}
src/main/java/com/founder/interservice/ryhx/service/impl/RyhxServiceImpl.java
View file @
8b61878b
...
...
@@ -10,29 +10,41 @@ import com.founder.interservice.util.HttpUtil;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
public
class
RyhxServiceImpl
implements
RyhxService
{
@Autowired
private
RyhxMapper
ryhxMapper
;
/*根据
证
旅店编号查询旅店地址*/
/*根据旅店编号查询旅店地址*/
@Override
public
TbStCqhotel
queryHotelAddr
(
String
hotelno
)
throws
Exception
{
TbStCqhotel
tbStCqhotel
=
ryhxMapper
.
queryHotelAddr
(
hotelno
);
return
tbStCqhotel
;
}
/*根据旅店编号查找旅店
详细
信息*/
/*根据旅店编号查找旅店
所有同房间人员住宿
信息*/
@Override
public
TbStCqhotelData
queryHotelxx
(
String
idcode
)
throws
Exception
{
TbStCqhotelData
tbStCqhotelData
=
ryhxMapper
.
queryHotelDetail
(
idcode
);
return
tbStCqhotelData
;
public
List
<
TbStCqhotelData
>
queryHotelxx
(
String
zjhm
,
String
hotelno
,
String
rzsj
,
String
roomno
)
throws
Exception
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"zjhm"
,
zjhm
);
map
.
put
(
"hotelno"
,
hotelno
);
if
(
null
!=
rzsj
&&
!
""
.
equals
(
rzsj
)){
rzsj
=
rzsj
.
substring
(
0
,
10
);
}
map
.
put
(
"rzsj"
,
rzsj
);
map
.
put
(
"roomno"
,
roomno
);
List
<
TbStCqhotelData
>
tbStCqhotelDataList
=
ryhxMapper
.
queryHotelDetail
(
map
);
return
tbStCqhotelDataList
;
}
/*根据证件号码查询网吧表网吧信息*/
@Override
public
TbStCqwbdataVOS
queryWbxx
(
String
zjhm
)
throws
Exception
{
TbStCqwbdataVOS
tbStCqwbdataVOS
=
ryhxMapper
.
queryWbxx
(
zjhm
);
return
tbStCqwbdata
VOS
;
public
List
<
TbStCqwbdata
>
queryWbxxList
(
String
zjhm
)
throws
Exception
{
List
<
TbStCqwbdata
>
tbStCqwbdataList
=
ryhxMapper
.
queryWbxxList
(
zjhm
);
return
tbStCqwbdata
List
;
}
@Override
...
...
@@ -47,4 +59,10 @@ public class RyhxServiceImpl implements RyhxService {
}
return
jsonStr
;
}
@Override
public
List
<
TbStCqhotelData
>
queryHotelRzxx
(
String
zjhm
)
{
List
<
TbStCqhotelData
>
tbStCqhotelDataRzxxList
=
ryhxMapper
.
queryHotelRzxx
(
zjhm
);
return
tbStCqhotelDataRzxxList
;
}
}
src/main/resources/mybatis/mapper/xzxt/RyhxMapper.xml
View file @
8b61878b
...
...
@@ -3,34 +3,34 @@
<mapper
namespace=
"com.founder.interservice.mapper.xzxt.RyhxMapper"
>
<sql
id =
"getHoteldetail_where"
>
<if
test=
"xxzjbh != null and xxzjbh != ''"
>
and xxzjbh = #{xxzjbh}
and xxzjbh = #{xxzjbh
, jdbcType=VARCHAR
}
</if>
<if
test=
"xm != null and xm != ''"
>
and xm = #{xm}
and xm = #{xm
, jdbcType=VARCHAR
}
</if>
<if
test=
"py != null and py != ''"
>
and py = #{py}
and py = #{py
, jdbcType=VARCHAR
}
</if>
<if
test=
"idcode != null and idcode != ''"
>
and idcode = #{idcode}
and idcode = #{idcode
, jdbcType=VARCHAR
}
</if>
<if
test=
"csrq != null and csrq != ''"
>
and csrq = #{csrq}
</if>
<if
test=
"xb != null and xb != ''"
>
and xb = #{xb}
and xb = #{xb
, jdbcType=VARCHAR
}
</if>
<if
test=
"mz != null and mz != ''"
>
and mz = #{mz}
and mz = #{mz
, jdbcType=VARCHAR
}
</if>
<if
test=
"address != null and address != ''"
>
and address = #{address}
and address = #{address
, jdbcType=VARCHAR
}
</if>
<if
test=
"hotelno != null and hotelno != ''"
>
and hotelno = #{hotelno}
and hotelno = #{hotelno
, jdbcType=VARCHAR
}
</if>
<if
test=
"roomno != null and roomno != ''"
>
and roomno = #{roomno}
and roomno = #{roomno
, jdbcType=VARCHAR
}
</if>
<if
test=
"createtime != null and createtime != ''"
>
and createtime = #{createtime}
...
...
@@ -60,23 +60,70 @@
gxsj as gxsj,
rksj as rksj
from TB_ST_CQHOTEL
where HNO = #{hotelno}
where HNO = #{hotelno
, jdbcType=VARCHAR
}
</select>
<select
id=
"queryHotelDetail"
parameterType=
"String"
resultType=
"com.founder.interservice.ryhx.model.TbStCqhotelData"
>
select
<!-- 查询某旅店所有同住人员住店信息 -->
<select
id=
"queryHotelDetail"
parameterType=
"java.util.Map"
resultType=
"com.founder.interservice.ryhx.model.TbStCqhotelData"
>
select xxzjbh as xxzjbh,
xm as xm,
py as py,
idcode as idcode,
to_char(csrq,'yyyy-MM-dd hh24:mi:ss') as csrq,
xb as xb,
mz as mz,
address as address,
hotelno as hotelno,
roomno as roomno,
to_char(createtime,'yyyy-MM-dd hh24:mi:ss') as createtime,
to_char(rksj,'yyyy-MM-dd hh24:mi:ss') as rksj,
to_char(gxsj,'yyyy-MM-dd hh24:mi:ss') as gxsj,
to_char(rzsj,'yyyy-MM-dd hh24:mi:ss') as rzsj,
to_char(ldsj,'yyyy-MM-dd hh24:mi:ss') as ldsj
from TB_ST_CQHOTELDATA
where 1=1
<if
test=
"zjhm != null and zjhm != ''"
>
and IDCODE
<![CDATA[!=]]>
#{zjhm, jdbcType=VARCHAR}
</if>
<if
test=
"hotelno != null and hotelno != ''"
>
and HOTELNO = #{hotelno, jdbcType=VARCHAR}
</if>
<if
test=
"roomno != null and roomno != ''"
>
and ROOMNO = #{roomno, jdbcType=VARCHAR}
</if>
<if
test=
"rzsj!=null and rzsj!=''"
>
and RZSJ
<![CDATA[>=]]>
(to_date(#{rzsj, jdbcType=VARCHAR},'yyyy-MM-dd') - numtodsinterval(10,'hour'))
and RZSJ
<![CDATA[<=]]>
(to_date(#{rzsj, jdbcType=VARCHAR},'yyyy-MM-dd') + numtodsinterval(14,'hour'))
</if>
</select>
<!-- 查询本人所有旅店入住信息-->
<select
id=
"queryHotelRzxx"
parameterType=
"java.util.Map"
resultType=
"com.founder.interservice.ryhx.model.TbStCqhotelData"
>
select xxzjbh as xxzjbh,
xm as xm,
py as py,
idcode as idcode,
to_char(csrq,'yyyy-MM-dd hh24:mi:ss') as csrq,
xb as xb,
mz as mz,
address as address,
hotelno as hotelno,
createtime as createtime,
rksj as rksj,
gxsj as gxsj
roomno as roomno,
to_char(createtime,'yyyy-MM-dd hh24:mi:ss') as createtime,
to_char(rksj,'yyyy-MM-dd hh24:mi:ss') as rksj,
to_char(gxsj,'yyyy-MM-dd hh24:mi:ss') as gxsj,
to_char(rzsj,'yyyy-MM-dd hh24:mi:ss') as rzsj,
to_char(ldsj,'yyyy-MM-dd hh24:mi:ss') as ldsj
from TB_ST_CQHOTELDATA
where IDCODE = #{
idcode
}
where IDCODE = #{
zjhm, jdbcType=VARCHAR
}
</select>
<select
id=
"queryWbxx"
parameterType=
"String"
resultType=
"com.founder.interservice.ryhx.vo.TbStCqwbdataVOS"
>
<select
id=
"queryWbxxList"
parameterType=
"String"
resultType=
"com.founder.interservice.ryhx.model.TbStCqwbdata"
>
select
wbmc as wbmc,
wbxzqh as wbxzqh,
wbdz as wbdz
from TB_ST_CQWBDATA
where ZJHM = #{zjhm}
where ZJHM = #{zjhm
, jdbcType=VARCHAR
}
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment