Commit 8b61878b by 吴善钰

人员画像,网吧信息和同住人员信息接口

parent c646d1bc
...@@ -7,13 +7,18 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -7,13 +7,18 @@ import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.founder.interservice.ryhx.model.TbStCqhotelData; import com.founder.interservice.ryhx.model.TbStCqhotelData;
import java.util.List;
import java.util.Map;
@Mapper @Mapper
@Repository @Repository
public interface RyhxMapper { public interface RyhxMapper {
TbStCqhotel queryHotelAddr(String hotelno) throws Exception; 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);
} }
...@@ -9,6 +9,7 @@ import com.founder.interservice.model.SysDictitem; ...@@ -9,6 +9,7 @@ import com.founder.interservice.model.SysDictitem;
import com.founder.interservice.ryhx.model.TbStAsjAssist; import com.founder.interservice.ryhx.model.TbStAsjAssist;
import com.founder.interservice.ryhx.model.TbStCqhotel; import com.founder.interservice.ryhx.model.TbStCqhotel;
import com.founder.interservice.ryhx.model.TbStCqhotelData; 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.service.RyhxService;
import com.founder.interservice.ryhx.vo.TbStCqwbdataVOS; import com.founder.interservice.ryhx.vo.TbStCqwbdataVOS;
import com.founder.interservice.service.DataService; import com.founder.interservice.service.DataService;
...@@ -121,47 +122,69 @@ public class RyhxController { ...@@ -121,47 +122,69 @@ public class RyhxController {
modelAndView.addObject("zjhm",zjhm); modelAndView.addObject("zjhm",zjhm);
return modelAndView; return modelAndView;
} }
/*旅店信息查询 /**
查询表为TB_ST_CQHOTELDATA * 旅店信息查询
网吧信息查询 * 查询表为TB_ST_CQHOTELDATA
查询表为TB_ST_CQWBDATA * 网吧信息查询
* */ * 查询表为TB_ST_CQWBDATA
*
* 同房间人,查询当天,同住一个房间的人
* 网吧信息,查所有上网记录
* @param zjhm 身份证号
* @return
*/
@RequestMapping(value = "/getLdjbxx",method = {RequestMethod.GET,RequestMethod.POST}) @RequestMapping(value = "/getLdjbxx",method = {RequestMethod.GET,RequestMethod.POST})
public ModelAndView getLdjbxx(String zjhm){ public ModelAndView getLdjbxx(String zjhm){
TbStCqhotelData tbStCqhotelData = null;
TbStCqhotel tbStCqhotel = null; TbStCqhotel tbStCqhotel = null;
List<TbStCqhotel> listHotel = new ArrayList<>();
SysDictitem sysDictitem = new SysDictitem(); SysDictitem sysDictitem = new SysDictitem();
TbStCqwbdataVOS tbStCqwbdataVOS = null; List<TbStCqwbdata> tbStCqwbdataList = null;//本人上网信息
List<TbStCqhotelData> listHotelData = null;//本人住店信息
List<TbStCqhotelData> listOtherHotelData = null;//本人同住人信息
try{ try{
if(zjhm != null && !"".equals(zjhm)){ if(zjhm != null && !"".equals(zjhm)){
String idcode = zjhm; //旅店住宿信息
//旅店信息 listHotelData = ryhxService.queryHotelRzxx(zjhm);
tbStCqhotelData = ryhxService.queryHotelxx(idcode); if (listHotelData != null && listHotelData.size() > 0) {
for (TbStCqhotelData tbStCqhotelData: listHotelData) {
String hotelno = tbStCqhotelData.getHotelno(); String hotelno = tbStCqhotelData.getHotelno();
//疑似落脚点 String rzsj = tbStCqhotelData.getRzsj();
if(hotelno != null && !"".equals(hotelno)){ String roomno = tbStCqhotelData.getRoomno();
//疑似落脚点(旅店信息)
if(null != hotelno && !"".equals(hotelno)) {
tbStCqhotel = ryhxService.queryHotelAddr(hotelno); tbStCqhotel = ryhxService.queryHotelAddr(hotelno);
listHotel.add(tbStCqhotel);
}
//根据旅店信息,查询同住人员信息
if (null != tbStCqhotel) {
listOtherHotelData = ryhxService.queryHotelxx(zjhm,hotelno,rzsj,roomno);
}
}
} }
//网吧信息 //网吧信息
tbStCqwbdataVOS = ryhxService.queryWbxx(zjhm); tbStCqwbdataList = ryhxService.queryWbxxList(zjhm);
if(tbStCqwbdataVOS != null) { if(tbStCqwbdataList != null && tbStCqwbdataList.size() > 0) {
String wbxzqh = tbStCqwbdataVOS.getWbxzqh(); for (TbStCqwbdata tbStCqwbdata : tbStCqwbdataList) {
String wbxzqh = tbStCqwbdata.getWbxzqh();
sysDictitem.setCode(wbxzqh); sysDictitem.setCode(wbxzqh);
sysDictitem.setGroupid("CODE_UNIT"); sysDictitem.setGroupid("CODE_UNIT");
if (wbxzqh != null && !"".equals(wbxzqh)) { if (wbxzqh != null && !"".equals(wbxzqh)) {
String wbxzqhmc = sysDictService.getCodeName(sysDictitem); String wbxzqhmc = sysDictService.getCodeName(sysDictitem);
tbStCqwbdataVOS.setWbxzqhmc(wbxzqhmc); tbStCqwbdata.setWbxzqhmc(wbxzqhmc);
}
} }
} }
} }
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
ModelAndView modelAndView = new ModelAndView("ryhx/gjxx"); ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("ryhx/gjxx");
modelAndView.addObject("zjhm",zjhm); modelAndView.addObject("zjhm",zjhm);
modelAndView.addObject("hotel",tbStCqhotelData); modelAndView.addObject("listOtherHotelData",listOtherHotelData);//同住人员住宿信息
modelAndView.addObject("hotela",tbStCqhotel); modelAndView.addObject("listHotel",listHotel);//本人住宿的酒店信息
modelAndView.addObject("wbxx",tbStCqwbdataVOS); modelAndView.addObject("listHotelData",listHotelData);//本人住宿信息
modelAndView.addObject("wbxxList",tbStCqwbdataList);//本人网吧信息
return modelAndView; return modelAndView;
} }
......
...@@ -38,4 +38,7 @@ public class TbStCqhotelData { ...@@ -38,4 +38,7 @@ public class TbStCqhotelData {
private String gxsj;//更新时间 private String gxsj;//更新时间
private String rzsj;//入住时间
private String ldsj;//离店时间
} }
\ No newline at end of file
...@@ -6,6 +6,9 @@ import com.founder.interservice.ryhx.model.TbStCqwbdata; ...@@ -6,6 +6,9 @@ import com.founder.interservice.ryhx.model.TbStCqwbdata;
import com.founder.interservice.ryhx.vo.TbStCqwbdataVOS; import com.founder.interservice.ryhx.vo.TbStCqwbdataVOS;
import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
import java.util.List;
import java.util.Map;
/** /**
* @ClassName: RyhxService * @ClassName: RyhxService
* @Auther: 朱琳瑛 * @Auther: 朱琳瑛
...@@ -17,9 +20,11 @@ public interface RyhxService { ...@@ -17,9 +20,11 @@ public interface RyhxService {
TbStCqhotel queryHotelAddr(String hotelno) throws Exception; 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); String getAsjxxList(String ryhxSaxxUrl, String zjhm);
List<TbStCqhotelData> queryHotelRzxx(String zjhm);
} }
...@@ -10,29 +10,41 @@ import com.founder.interservice.util.HttpUtil; ...@@ -10,29 +10,41 @@ import com.founder.interservice.util.HttpUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service @Service
public class RyhxServiceImpl implements RyhxService { public class RyhxServiceImpl implements RyhxService {
@Autowired @Autowired
private RyhxMapper ryhxMapper; private RyhxMapper ryhxMapper;
/*根据旅店编号查询旅店地址*/ /*根据旅店编号查询旅店地址*/
@Override @Override
public TbStCqhotel queryHotelAddr(String hotelno)throws Exception { public TbStCqhotel queryHotelAddr(String hotelno)throws Exception {
TbStCqhotel tbStCqhotel = ryhxMapper.queryHotelAddr(hotelno); TbStCqhotel tbStCqhotel = ryhxMapper.queryHotelAddr(hotelno);
return tbStCqhotel; return tbStCqhotel;
} }
/*根据旅店编号查找旅店详细信息*/ /*根据旅店编号查找旅店所有同房间人员住宿信息*/
@Override @Override
public TbStCqhotelData queryHotelxx(String idcode) throws Exception{ public List<TbStCqhotelData> queryHotelxx(String zjhm, String hotelno, String rzsj, String roomno) throws Exception{
TbStCqhotelData tbStCqhotelData = ryhxMapper.queryHotelDetail(idcode); Map<String, String> map = new HashMap<>();
return tbStCqhotelData; 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 @Override
public TbStCqwbdataVOS queryWbxx(String zjhm) throws Exception{ public List<TbStCqwbdata> queryWbxxList(String zjhm) throws Exception{
TbStCqwbdataVOS tbStCqwbdataVOS = ryhxMapper.queryWbxx(zjhm); List<TbStCqwbdata> tbStCqwbdataList = ryhxMapper.queryWbxxList(zjhm);
return tbStCqwbdataVOS; return tbStCqwbdataList;
} }
@Override @Override
...@@ -47,4 +59,10 @@ public class RyhxServiceImpl implements RyhxService { ...@@ -47,4 +59,10 @@ public class RyhxServiceImpl implements RyhxService {
} }
return jsonStr; return jsonStr;
} }
@Override
public List<TbStCqhotelData> queryHotelRzxx(String zjhm) {
List<TbStCqhotelData> tbStCqhotelDataRzxxList = ryhxMapper.queryHotelRzxx(zjhm);
return tbStCqhotelDataRzxxList;
}
} }
...@@ -3,34 +3,34 @@ ...@@ -3,34 +3,34 @@
<mapper namespace="com.founder.interservice.mapper.xzxt.RyhxMapper"> <mapper namespace="com.founder.interservice.mapper.xzxt.RyhxMapper">
<sql id = "getHoteldetail_where"> <sql id = "getHoteldetail_where">
<if test="xxzjbh != null and xxzjbh != ''"> <if test="xxzjbh != null and xxzjbh != ''">
and xxzjbh = #{xxzjbh} and xxzjbh = #{xxzjbh, jdbcType=VARCHAR}
</if> </if>
<if test="xm != null and xm != ''"> <if test="xm != null and xm != ''">
and xm = #{xm} and xm = #{xm, jdbcType=VARCHAR}
</if> </if>
<if test="py != null and py != ''"> <if test="py != null and py != ''">
and py = #{py} and py = #{py, jdbcType=VARCHAR}
</if> </if>
<if test="idcode != null and idcode != ''"> <if test="idcode != null and idcode != ''">
and idcode = #{idcode} and idcode = #{idcode, jdbcType=VARCHAR}
</if> </if>
<if test="csrq != null and csrq != ''"> <if test="csrq != null and csrq != ''">
and csrq = #{csrq} and csrq = #{csrq}
</if> </if>
<if test="xb != null and xb != ''"> <if test="xb != null and xb != ''">
and xb = #{xb} and xb = #{xb, jdbcType=VARCHAR}
</if> </if>
<if test="mz != null and mz != ''"> <if test="mz != null and mz != ''">
and mz = #{mz} and mz = #{mz, jdbcType=VARCHAR}
</if> </if>
<if test="address != null and address != ''"> <if test="address != null and address != ''">
and address = #{address} and address = #{address, jdbcType=VARCHAR}
</if> </if>
<if test="hotelno != null and hotelno != ''"> <if test="hotelno != null and hotelno != ''">
and hotelno = #{hotelno} and hotelno = #{hotelno, jdbcType=VARCHAR}
</if> </if>
<if test="roomno != null and roomno != ''"> <if test="roomno != null and roomno != ''">
and roomno = #{roomno} and roomno = #{roomno, jdbcType=VARCHAR}
</if> </if>
<if test="createtime != null and createtime != ''"> <if test="createtime != null and createtime != ''">
and createtime = #{createtime} and createtime = #{createtime}
...@@ -60,23 +60,70 @@ ...@@ -60,23 +60,70 @@
gxsj as gxsj, gxsj as gxsj,
rksj as rksj rksj as rksj
from TB_ST_CQHOTEL from TB_ST_CQHOTEL
where HNO = #{hotelno} where HNO = #{hotelno, jdbcType=VARCHAR}
</select> </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, hotelno as hotelno,
createtime as createtime, roomno as roomno,
rksj as rksj, to_char(createtime,'yyyy-MM-dd hh24:mi:ss') as createtime,
gxsj as gxsj 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 from TB_ST_CQHOTELDATA
where IDCODE = #{idcode} where IDCODE = #{zjhm, jdbcType=VARCHAR}
</select> </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 select
wbmc as wbmc, wbmc as wbmc,
wbxzqh as wbxzqh, wbxzqh as wbxzqh,
wbdz as wbdz wbdz as wbdz
from TB_ST_CQWBDATA from TB_ST_CQWBDATA
where ZJHM = #{zjhm} where ZJHM = #{zjhm, jdbcType=VARCHAR}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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