5.14——教你把ssh抄成ssm

5.14——教你把ssh抄成ssm

  • 前言——整理细节
    • 教你如何调试
  • 项目
    • 完整页面效果
    • 注意
  • 总结
    • 心跳信息
    • 采集信息
    • 知识点

前言——整理细节

教你如何调试

第一步:找到对应的搜索按钮
5.14——教你把ssh抄成ssm_第1张图片
第二部:找到对应的jsp,找到对应的click方法——>前后台交互的action
5.14——教你把ssh抄成ssm_第2张图片
5.14——教你把ssh抄成ssm_第3张图片ctrl+h快捷键搜索action
5.14——教你把ssh抄成ssm_第4张图片
5.14——教你把ssh抄成ssm_第5张图片双击后找到对应的action

5.14——教你把ssh抄成ssm_第6张图片

项目

完整页面效果

心跳页面
5.14——教你把ssh抄成ssm_第7张图片
5.14——教你把ssh抄成ssm_第8张图片采集信息页面
5.14——教你把ssh抄成ssm_第9张图片5.14——教你把ssh抄成ssm_第10张图片5.14——教你把ssh抄成ssm_第11张图片详情页面
5.14——教你把ssh抄成ssm_第12张图片

注意

5.14——教你把ssh抄成ssm_第13张图片注意这里我吧前台的总页数传错了,导致它运算偏移量为-30

5.14——教你把ssh抄成ssm_第14张图片


<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

	
		
		
		
		
		
		
		
		
	
	
		
人脸抓拍心跳详情

<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>














	
单位名称:

5.14——教你把ssh抄成ssm_第15张图片DeviceEventController

package svs.controller;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.xml.transform.Source;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import svs.dto.DtmSvssystemLog;
import svs.service.CommonJsonService;
import svs.service.DeviceEventService;
import svs.service.DeviceService;

@Controller
public class DeviceEventController {
	@Resource
	private DeviceEventService objDeviceEventService;
	@Resource
	private CommonJsonService objCommonJsonService;
	/**
	 * 人脸抓拍系统事件信息  检索  初始化
	 * 
	 * @return
	 */
	@RequestMapping("dtmfacesnapshotEventSearchIndexCommon")
	public String dtmfacesnapshotEventSearchIndexCommon(HttpSession session,HttpServletRequest request,Model model) {

		//判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
			return "communitySessionError";
		}
		try {
			//用户区县权限
			String areaID = session.getAttribute("AreaID").toString();
			//用户类型2.单位5.管理7.内保
			String loginUserType = session.getAttribute("loginUserType").toString();
			int num= objDeviceEventService.dtmfacesnapshotEventFindSearchIndex(areaID,loginUserType,model);
			if(num>0){
				return "device/deviceFacesnapshotEventInfoSearchCommon";
			}
			return "communitySessionError";
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return "communitySessionError";
		}
	}
	
	/**
	 * 人员信息
	 * 
	 * @return
	 */
	@RequestMapping("dtmPersonInfoIndexlogic")
	public String dtmPersonInfoIndexlogic(HttpSession session,HttpServletRequest request,Model model) {
		//判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
			return "communitySessionError";
		}
		try {
			//证件类型
			String dfe03 = request.getParameter("dfe03");
			//证件号码
			String dfe04 = request.getParameter("dfe04");
			int num= objDeviceEventService.dtmPersonInfoIndexlogic(dfe03,dfe04,model);
			if(num>0){
				return "device/dtmPersonInfo";
			}
			return "communitySessionError";
		} catch (Exception e) {
			return "communitySessionError";
		}
	}
	

	/**
	 * 人脸抓拍系统事件信息  详情页  初始化
	 * 
	 * @return
	 */
	@RequestMapping("dtmfacesnapshotEventFindIndex")
	public String dtmfacesnapshotEventFindIndex(HttpSession session,HttpServletRequest request,Model model) {
		//判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
			return "communitySessionError";
		}
		try {
			//主键Id
			String ddeId = request.getParameter("ddeId");
			String dpi14=request.getParameter("dpi14");
			String dpi15=request.getParameter("dpi15");
			int num=objDeviceEventService.dtmfacesnapshotEventFindIndexLogic(ddeId,model);
			model.addAttribute("dpi14",dpi14);
			model.addAttribute("dpi15",dpi15);
			if(num>0){
				return "device/deviceFacesnapshotEventInfoCommon";
			}
			return "communitySessionError";
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return "communitySessionError";
		}
	}
	
	
	/**
	 * 人脸识别心跳查询
	 * 
	 * @param session
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("/dtmfacesnapshotHeartSearchIndexCommon")
	public String dtmfacesnapshotHeartSearchIndexCommon(HttpSession session, HttpServletRequest request, Model model) {
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
			return "communitySessionError";
		}
		try {
			// 用户区县权限
			String areaId = session.getAttribute("AreaID").toString();
			// 派出所
			String policeId = session.getAttribute("PoliceID").toString();

//			// 用户类型2.单位5.管理7.内保
			String loginUserType = session.getAttribute("loginUserType").toString();

			if (objDeviceEventService.searchdtmfacesnapshotHeartSearchIndexCommon(areaId, loginUserType, model) > 0) {
				return "device/deviceFacesnapshotHeartInfoSearchCommon";// 跳转jsp
			}

			return "communitySessionError";// jsp页面

		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return "communitySessionError";// jsp页面
		}
	}

	/**
	 * 人脸抓拍系统心跳信息  详情页  初始化
	 * @param session
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("dtmDevicefacesnapshotHeartFindIndex")
	public String dtmDevicefacesnapshotHeartFindIndex(HttpSession session, HttpServletRequest request, Model model) {
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
			return "communitySessionError";
		}
		try {
			
			DtmSvssystemLog objDtmSvssystemLog = objCommonJsonService.createNewDtmSvssystemLog(session,request);          
			//dtm_facesnapshot_heart 人脸抓拍系统心跳信息表 主键ID
			String aseId = request.getParameter("aseId"); 
			//model.addAttribute("aseId","");
			if(objDeviceEventService.searchdtmDevicefacesnapshotHeartFindIndex(objDtmSvssystemLog, aseId, model)>0) {
				return "device/deviceFacesnapshotHeartInfoCommon";
			}
			return "communitySessionError";// jsp页面
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return "communitySessionError";// jsp页面
		}
	}

}

DeviceEventJsonController

package svs.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import svs.dto.DtmFacesnapshotEvent;
import svs.dto.DtmSvssystemLog;
import svs.dto.userDto.UserDtmEventTongji;
import svs.dto.userDto.UserDtmFacesnapshotEvent;
import svs.service.CommonJsonService;
import svs.service.DeviceEventJsonService;
import svs.service.DeviceEventService;
import svs.service.DeviceJsonService;

@Controller
public class DeviceEventJsonController {
	@Resource
	private DeviceEventJsonService objDeviceJsonEventService;
	@Resource
	private CommonJsonService objCommonJsonService;
	
	
	
	/**
	 * 人脸抓拍系统事件信息  查询
	 * @return 
	 */
	@RequestMapping("/searchdtmDeviceFacesnapshotEventFindCommon")
	@ResponseBody
	public Map searchdtmDeviceFacesnapshotEventFindCommon(HttpSession session,HttpServletRequest request,Model model) {
		Map mpList = new HashMap();
		try {
			//判断Session是否失效
			if (!objCommonJsonService.SystemBool(session)) {
				mpList.put("jsonFlag", -2);
				mpList.put("jsonMsg", "Session失效,请重新登录!");
				return mpList;
			}
			String dnu08 = "";
			//当前行业ID
			if(session.getAttribute("dnu08")!=null && "".equals(session.getAttribute("dnu08")) == false) {
				dnu08=session.getAttribute("dnu08").toString();
			}
			//设备编码
			String dfe01 = request.getParameter("dfe01");
			//证件类型
			String dfe03 =request.getParameter("dfe03");
			//证件号码
			String dfe04 = request.getParameter("dfe04");
			//事件类型
			String dfe05 = request.getParameter("dfe05");
			//开始时间
			String dfe04Start = request.getParameter("dfe06Start");
	  		//结束时间
			String dfe04End = request.getParameter("dfe06End");
	  		//所属区县
			String areaId = request.getParameter("areaId");
	  		//所属派出所
			String policeId = request.getParameter("policeId");	
			// 每页显示条数
			int intPageCount=objCommonJsonService.PAGE_COUNT;
			//当前页
			int intCpage = Integer.valueOf(request.getParameter("Cpage"));
			// 总数据数量  
			String totalNum =  request.getParameter("totalNum");
			mpList.put("intCpage", intCpage);
			// 人脸抓拍系统事件信息表list
			List listUserDtmFacesnapshotEventFind = objDeviceJsonEventService.searchDtmFacesnapshotEventInfo(areaId,policeId,dfe01, dfe03, dfe04, dfe05,dfe04Start, dfe04End,intPageCount, intCpage,dnu08);
			mpList.put("listUserDtmFacesnapshotEventFind",listUserDtmFacesnapshotEventFind);
			// 总记录数
			int count=objDeviceJsonEventService.searchdtmDeviceFacesnapshotEventFindCount(areaId,policeId,dfe01, dfe03, dfe04, dfe05,dfe04Start, dfe04End, totalNum,dnu08);
			mpList.put("intAllCount",count);
			mpList.put("jsonFlag", 1);
			mpList.put("intPageNum", intPageCount);
			return mpList;
		} catch (Exception e) {
			// TODO: handle exception
			mpList.put("jsonFlag", -1); 
		}
		return null;
	}
	
	/**
	 * 人脸抓拍心跳信息 检索
	 * 
	 * @param session
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("/searchdtmDeviceFacesnapshotHeartFindCommon")
	@ResponseBody
	public Map searchdtmDeviceFacesnapshotHeartFindCommon(HttpSession session,
			HttpServletRequest request, Model model) {
		java.util.Map mpList = new HashMap();
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			mpList.put("jsonFlag", -2);
			mpList.put("jsonMsg", "Session失效,请重新登录!");
			return mpList;
		}
		try {
			// 创建应用系统日志对象,并且已经填写好了一些通用参数
			DtmSvssystemLog objDtmSvssystemLog = objCommonJsonService.createNewDtmSvssystemLog(session, request);
			// 行业id
			String dnu08 = session.getAttribute("dnu08").toString();

			// 区县 如果用户没有选择区县
			// 内保用户 区县权限 逗号隔开 区县唯一编码
			String areaId = String.valueOf(request.getParameter("AreaID"));
			if (areaId.equals("null") || areaId == null || areaId.equals("-1") || areaId.equals("")) {
				// 那么获取当前登陆用户的 区县权限
				areaId = session.getAttribute("AreaID").toString();
			}

			// 派出所 如果用户没有选择派出所
			// 内保用户 派出所权限 逗号隔开 区县唯一编码
			String policeId = session.getAttribute("PoliceID").toString();

			// 办公区县
			String dui32 = request.getParameter("dui32");
			// 所属派出所
			String dui36 = request.getParameter("dui36");
			// 单位名称
			String dui02 = request.getParameter("dui02");
			// 设备编码
			String ase01 = request.getParameter("ase01");
			// 心跳开始时间
			String dfh02Start = request.getParameter("dfh02Start");
			// 心跳结束时间
			String dfh02End = request.getParameter("dfh02End");
			// 心跳时间
			String dfh02Type = request.getParameter("dfh02Type");

			// 每页显示条数
			int intPageCount = objCommonJsonService.PAGE_COUNT;
			// 当前页
			int intCpage = Integer.valueOf(request.getParameter("Cpage"));
			// 总数据数量
			String totalNum = request.getParameter("totalNum");
			// 总记录数
			int intAllCount = objDeviceJsonEventService.searchdtmDeviceFacesnapshotHeartFindCount(areaId, policeId, dui32,
					dui36, dui02, ase01, dnu08, dfh02Start, dfh02End, dfh02Type, totalNum);
			mpList.put("listDtmFacesnapshotHeartFind",
					objDeviceJsonEventService.searchdtmDeviceFacesnapshotHeartFind(objDtmSvssystemLog, dnu08, areaId,
							policeId, dui32, dui36, dui02, ase01, dfh02Start, dfh02End, dfh02Type, null, intPageCount,
							intCpage));
			mpList.put("intAllCount", intAllCount);
			mpList.put("intPageNum", intPageCount);
			mpList.put("jsonFlag", 1);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			mpList.put("jsonFlag", -1);
			return mpList;
		}

		return mpList;

	}
}

5.14——教你把ssh抄成ssm_第16张图片

package svs.service;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;
import javax.xml.transform.Source;

import org.springframework.stereotype.Service;
import org.springframework.ui.Model;


import svs.dao.IInsertOperDao;
import svs.dao.ISearchDao;
import svs.dao.IUpDeOperDao;
import svs.dao.IUserSearchDao;
import svs.dto.DictionaryArea;
import svs.dto.DictionaryCardType;
import svs.dto.DictionaryCity;
import svs.dto.DictionaryCulturalLevel;
import svs.dto.DictionaryFacesnapshotEventtype;
import svs.dto.DictionaryInformationSource;
import svs.dto.DictionaryMarriageSituation;
import svs.dto.DictionaryNation;
import svs.dto.DictionaryNationpeople;
import svs.dto.DictionaryPersonType;
import svs.dto.DictionaryProvince;
import svs.dto.DictionaryRoad;
import svs.dto.DictionaryStreet;
import svs.dto.DictionarySystemType;
import svs.dto.DictionaryZuobiao;
import svs.dto.DtmFacesnapshotHeart;
import svs.dto.DtmSvssystemLog;
import svs.dto.userDto.UserDtmFacesnapshotEvent;
import svs.dto.userDto.UserDtmPersonInfo;

@Service("DeviceEventService")
public class DeviceEventService {
	@Resource
	private ISearchDao objSearchDao;
	@Resource
	private IInsertOperDao objInsertOperDao;
	@Resource
	private IUpDeOperDao objUpDeOperDao;
	@Resource
	private IUserSearchDao objIUserSearchDao;
	@Resource
	private CommonJsonService objCommonJsonService;
	@Resource
	private CommonService objCommonService;
	
	

	/**
	 * 人脸抓拍事件信息 检索 初始化
	 * @return
	 */
	public int dtmfacesnapshotEventFindSearchIndex(String areaID,String loginUserType,Model model) {
		try {  
			List listDictionaryFacesnapshotEventtype =  objCommonJsonService.searchDictionaryFacesnapshotEventtype("");
			model.addAttribute("listDictionaryFacesnapshotEventtype",listDictionaryFacesnapshotEventtype);
			//证件类型
			List listDictionaryCardType=objCommonJsonService.searchDictionaryCardType();
			model.addAttribute("listDictionaryCardTypeInfoSearch",listDictionaryCardType);
			// 办公 区县合集
			List listDictionaryAreaSearch =null;
			//用户类型2.单位5.管理7.内保
			if(loginUserType.equals("7")) {
				listDictionaryAreaSearch =objCommonJsonService.searchDictionaryAreaQx(areaID,"310100000000");	
				model.addAttribute("listDictionaryAreaSearch",listDictionaryAreaSearch);
			}else {
				model.addAttribute("listDictionaryAreaSearch",null);
			}
			model.addAttribute("loginUserType",loginUserType);	
			return 1;
		} catch (Exception e) { 
			// TODO: handle exception
			return -1;
		}
	}
	/**
	 * 人员查询 初始化
	 * @param dpiId
	 * @return
	 */
	public int dtmPersonInfoIndexlogic(String dfe03,String dfe04,Model model) {
		try {
			DtmSvssystemLog objDtmSvssystemLog=new DtmSvssystemLog();
			UserDtmPersonInfo objDtmPersonInfo=objCommonJsonService.searchUserDtmPersonInfo(objDtmSvssystemLog,dfe03,dfe04);	
			//人员信息	
			if (objDtmPersonInfo!=null) {
				model.addAttribute("objDtmPersonInfo",objDtmPersonInfo);
				// 获取区县合集(户籍)
				if(objDtmPersonInfo.getDpi29() == null)
				{
					model.addAttribute("listDictionaryArea",new ArrayList());
				}else{		
					List listDictionaryArea=objCommonJsonService.searchDictionaryArea(objDtmPersonInfo.getDpi29().toString());
					model.addAttribute("listDictionaryArea",listDictionaryArea);
					if(listDictionaryArea == null){
						model.addAttribute("listDictionaryArea",new ArrayList());
					}
				}				
				//省(户籍)
				List listDictionaryProvince=objCommonJsonService.searchDictionaryProvince();
				model.addAttribute("listDictionaryProvince",listDictionaryProvince);
				if(listDictionaryProvince == null){
					model.addAttribute("listDictionaryProvince",new ArrayList());
				}
				//城市(户籍)
				if(objDtmPersonInfo.getDpi28() == null){
					model.addAttribute("listDictionaryCity",new ArrayList());
				}else{
					List listDictionaryCity=objCommonJsonService.searchDictionaryCity(objDtmPersonInfo.getDpi28().toString());
					model.addAttribute("listDictionaryCity",listDictionaryCity);
					if(listDictionaryCity == null){
						model.addAttribute("listDictionaryCity",new ArrayList());
					}
				}
				if(objDtmPersonInfo.getDpi35() == null){
					model.addAttribute("listDictionaryAreaJz",new ArrayList());
				}else{
					// 获取区县合集(居住)
					List listDictionaryArea=objCommonJsonService.searchDictionaryArea(objDtmPersonInfo.getDpi35().toString());
					model.addAttribute("listDictionaryAreaJz",listDictionaryArea);
					if(listDictionaryArea == null){
						model.addAttribute("listDictionaryAreaJz",new ArrayList());
					}
				}
				
				//省(居住)
				listDictionaryProvince=objCommonJsonService.searchDictionaryProvince();
				model.addAttribute("listDictionaryProvinceJz",listDictionaryProvince);
				if(listDictionaryProvince == null){
					model.addAttribute("listDictionaryProvinceJz",new ArrayList());
				}
				if(objDtmPersonInfo.getDpi34() == null){
					model.addAttribute("listDictionaryProvinceJz",new ArrayList());
				}else{
					//城市(居住)
					List listDictionaryCity=objCommonJsonService.searchDictionaryCity(objDtmPersonInfo.getDpi34().toString());
					model.addAttribute("listDictionaryProvinceJz",listDictionaryCity);
					if(listDictionaryCity == null){
						model.addAttribute("listDictionaryProvinceJz",new ArrayList());
					}
				}
				
				//人员类型 
				List listDictionaryPersonType=objCommonJsonService.searchDictionaryPersonType();
				model.addAttribute("listDictionaryPersonType",listDictionaryPersonType);
				if(listDictionaryPersonType == null){
					model.addAttribute("listDictionaryPersonType",new ArrayList());
				}
				
				//婚姻状况
				List listDictionaryMarriageSituation=objCommonJsonService.searchDictionaryMarriageSituation();
				model.addAttribute("listDictionaryMarriageSituation",listDictionaryMarriageSituation);
				if(listDictionaryMarriageSituation == null){
					model.addAttribute("listDictionaryMarriageSituation",new ArrayList());
				}
				
				//民族
				List listDictionaryNationpeople=objCommonJsonService.searchDictionaryNationpeople();
				model.addAttribute("listDictionaryNationpeople",listDictionaryNationpeople);
				if(listDictionaryNationpeople == null){
					model.addAttribute("listDictionaryNationpeople",new ArrayList());
				}
				//国家编码
				List listDictionaryNation=objCommonJsonService.searchDictionaryNation();
				model.addAttribute("lsitDictionaryNation",listDictionaryNation);
				if(listDictionaryNation == null){
					model.addAttribute("lsitDictionaryNation",new ArrayList());
				}
				//信息来源
				List listDictionaryInformationSource=objCommonJsonService.searchDictionaryInformationSource();
				model.addAttribute("listDictionaryInformationSource",listDictionaryInformationSource);
				if(listDictionaryInformationSource == null){
					model.addAttribute("listDictionaryInformationSource",new ArrayList());
				}
				
				//户籍街道
				if(objDtmPersonInfo.getDpi30() == null){
					model.addAttribute("listDictionaryStreetDpi31",new ArrayList());
				}else{
					List listDictionaryStreetDpi31  = objCommonJsonService.searchDictionaryStreet(objDtmPersonInfo.getDpi30().toString());
					model.addAttribute("listDictionaryStreetDpi31",listDictionaryStreetDpi31);
					if(listDictionaryStreetDpi31 == null){
						model.addAttribute("listDictionaryStreetDpi31",new ArrayList());
					}
				}	
				//居住街道
				if(objDtmPersonInfo.getDpi36() == null){
					model.addAttribute("listDictionaryStreetDpi37",new ArrayList());
				}else{
					List listDictionaryStreetDpi37 = objCommonJsonService.searchDictionaryStreet(objDtmPersonInfo.getDpi36().toString());
					model.addAttribute("listDictionaryStreetDpi37",listDictionaryStreetDpi37);
					if(listDictionaryStreetDpi37 == null){
						model.addAttribute("listDictionaryStreetDpi37",new ArrayList());
					}
				}				
				
				
				//户籍道路
				DictionaryRoad hjDictionaryRoad=objCommonJsonService.searchDictionaryRoadInfo(objDtmPersonInfo.getDpi32().toString());
				model.addAttribute("hjDictionaryRoad",hjDictionaryRoad);
				//居住道路
				DictionaryRoad jzDictionaryRoad=objCommonJsonService.searchDictionaryRoadInfo(objDtmPersonInfo.getDpi38().toString());
				model.addAttribute("jzDictionaryRoad",jzDictionaryRoad);
				//文化程度
				List listDictionaryCulturalLevel=objCommonJsonService.searchDictionaryCulturalLevel();
				model.addAttribute("listDictionaryCulturalLevel",listDictionaryCulturalLevel);
				if(listDictionaryCulturalLevel == null){
					model.addAttribute("listDictionaryCulturalLevel",new ArrayList());
				}
				//证件类型
				List listDictionaryCardType=objCommonJsonService.searchDictionaryCardType();
				model.addAttribute("listDictionaryCardType",listDictionaryCardType);
				if(listDictionaryCardType == null){
					model.addAttribute("listDictionaryCardType",new ArrayList());
				}
			}
			return 1;
		} catch (Exception e) {
			return -1;
		}
	}
	
	

	/**
	 * 人脸抓拍事件信息 详情 初始化
	 * @return
	 */
	public int dtmfacesnapshotEventFindIndexLogic(String ddeId,Model model) {
		List listDtmFacesnapshotEvent;
		try {
			//根据ID,获取人脸事件表
			listDtmFacesnapshotEvent = objCommonJsonService.searchUserDtmFacesnapshotEvent(ddeId);
			
			if (listDtmFacesnapshotEvent!=null && listDtmFacesnapshotEvent.size()>0) {
				UserDtmFacesnapshotEvent objUserDtmFacesnapshotEvent=listDtmFacesnapshotEvent.get(0);
				//人脸事件表
				model.addAttribute("objUserDtmFacesnapshotEvent",objUserDtmFacesnapshotEvent);
				//证件类型
				List listDictionaryCardTypeInfoSearch = objCommonJsonService.searchDictionaryCardType();
				model.addAttribute("listDictionaryCardTypeInfoSearch",listDictionaryCardTypeInfoSearch);
				//坐标系
				List listDictionaryZuobiaoInfoSearch=objCommonJsonService.searchDictionaryZuobiao();
				model.addAttribute("listDictionaryZuobiaoInfoSearch",listDictionaryZuobiaoInfoSearch);
				//事件类型
				List listDictionaryFacesnapshotEventtype = objCommonJsonService.searchDictionaryFacesnapshotEventtype("");
				model.addAttribute("listDictionaryFacesnapshotEventtype",listDictionaryFacesnapshotEventtype);
				return 1;
			}
			return -1;
		} catch (Exception e) {
			// TODO Auto-generated catch block.
			return -1;
		}
	}
	
	/**
	 * 人脸抓拍系统心跳信息查询 初始化
	 * 
	 * @param areaID        用户区县权限
	 * @param loginUserType
	 * @return
	 */
	public int searchdtmfacesnapshotHeartSearchIndexCommon(String areaID, String loginUserType, Model model) {
		try {
			// 办公 区县合集 下拉框
			List listDictionaryAreaSearch = null;
			// 用户类型2.单位5.管理7.内保
			if (loginUserType.equals("7")) {
				// 区县集合表,用于区县集合初始化
				listDictionaryAreaSearch = objCommonJsonService.searchDictionaryAreaQx(areaID, "310100000000");
				model.addAttribute("listDictionaryAreadeviceFacesnapshotHeartInfoSearch", listDictionaryAreaSearch);
				// 派出所下拉框
//				model.addAttribute("strPoliceID", policeId);
			} else {
				model.addAttribute("listDictionaryAreadeviceFacesnapshotHeartInfoSearch", null);
			}

			return 1;

		} catch (Exception e) {
			e.printStackTrace();
			return -1;
		}
	}

	/**
	 * 人脸抓拍系统心跳信息 详情页 初始化
	 * 
	 * @param aseId 人脸抓拍系统心跳信息 主键Id
	 * @param model
	 * @return
	 */
	public int searchdtmDevicefacesnapshotHeartFindIndex(DtmSvssystemLog objDtmSvssystemLog, String aseId,
			Model model) {
		try {
			List searchdtmDevicefacesnapshotHeartFindIndex = objCommonService
					.searchdtmDevicefacesnapshotHeartFindIndex(objDtmSvssystemLog, aseId);
			model.addAttribute("objDtmFacesnapshotHeart", searchdtmDevicefacesnapshotHeartFindIndex.get(0));
            //所属系统
			List searchDictionarySystemType = objCommonJsonService.searchDictionarySystemType();
			model.addAttribute("listDictionarySystemType", searchDictionarySystemType);

			// // 所属坐标系
//			List listDictionaryZuobiao = objCommonJsonService.searchDictionaryZuobiao();
//			model.addAttribute("listDictionaryZuobiao", listDictionaryZuobiao);
//			// 信息来源
//			List listDictionaryInformationSource = objCommonJsonService
//					.searchDictionaryInformationSource();
//			model.addAttribute("listDictionaryInformationSource", listDictionaryInformationSource);
			return 1;

		} catch (Exception e) {
			e.printStackTrace();
			return -1;
		}
	}
}

package svs.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;


import svs.dao.IInsertOperDao;
import svs.dao.ISearchDao;
import svs.dao.IUpDeOperDao;
import svs.dao.IUserSearchDao;

import svs.dto.DtmFacesnapshotHeart;
import svs.dto.DtmSvssystemLog;
import svs.dto.userDto.UserDtmFacesnapshotEvent;
import svs.dto.userDto.UserDtmFacesnapshotHeart;
import svs.dto.userDto.UserDtmHeartTongji;


@Service("DeviceEventJsonService")
public class DeviceEventJsonService {
	@Resource
	private SqlConstant sqlConstant;
	@Resource
	private ISearchDao objSearchDao;
	@Resource
	private IInsertOperDao objInsertOperDao;
	@Resource
	private IUpDeOperDao objUpDeOperDao;
	@Resource
	private IUserSearchDao objIUserSearchDao;
	@Resource
	private CommonJsonService objCommonJsonService;

	

	/**
	 * 人脸抓拍系统事件信息表list
	 * @param areaId  所属区县
	 * @param policeId
	 * @param dfe01
	 * @param dfe03
	 * @param dfe04
	 * @param dfe05
	 * @param dfe04Start
	 * @param dfe04End
	 * @param intPageCount
	 * @param intCpage
	 * @param dnu08
	 * @return
	 */
	public List searchDtmFacesnapshotEventInfo(String areaId,String policeId,String dfe01,String dfe03,String dfe04,String dfe05,String dfe04Start,String dfe04End,int intPageCount,int intCpage,String dnu08) {
		try {
			StringBuffer strSql = new StringBuffer(SqlConstant.sqlUserDtmFacesnapshotEventSearch);
			strSql.append("and dictionary_facesnapshot_eventtype.dfe03=true and dct04=1  ");
			//行业id
			if (dnu08 != null && "".equals(dnu08) == false) {
				strSql.append("and dut02 in ("+dnu08+")");
			}
			//所属区县
			if (areaId != null && "".equals(areaId) == false  && "null".equals(areaId) == false   && "-1".equals(areaId) == false ) {
				strSql.append(" and dui32 = "+areaId+" ");
			}
			//所属派出所
			if (policeId !=null && "null".equals(policeId) == false && "".equals(policeId)== false  && "-1".equals(policeId) == false ) {
				strSql.append(" and dui36 ="+policeId+" ");
			}
			//设备编号
			if (dfe01 != null && "".equals(dfe01) == false) {
				strSql.append(" and dde01 like '%" + dfe01 + "%'  ");
			}
			//证件类型
			if (dfe03 != null && "".equals(dfe03) == false && "-1".equals(dfe03) == false) {
				strSql.append(" and dtm_facesnapshot_event.dfe02 = '" + dfe03 + "'  ");
			}
			//证件号码
			if (dfe04 != null && "".equals(dfe04) == false) {
				strSql.append(" and dtm_facesnapshot_event.dfe03 like '%" + dfe04 + "%'  ");
			}
			//事件类型
			if (dfe05 != null && "".equals(dfe05) == false && "-1".equals(dfe05) == false ) {
				strSql.append(" and dde20 = " + dfe05 + "  ");
			//用户没有选中事件类型默认查询医院,药房 可用事件类型
			}else {
				strSql.append(" and dde20 in (" + objCommonJsonService.facesnapshotEvevttype + ")  ");
			}
			//开始时间
			if (dfe04Start != null && "".equals(dfe04Start) == false) {
				strSql.append(" and dde04 >= '"+dfe04Start+"'  ");
			}
			//结束时间
			if (dfe04End != null && "".equals(dfe04End) == false) {
				strSql.append(" and dde04 <= '"+dfe04End+"'  ");
			}
			strSql.append(" order by dde04 desc limit ").append(intPageCount).append(" offset ").append((intCpage - 1) * intPageCount);
			return objIUserSearchDao.selectUserDtmFacesnapshotEventSearch(strSql.toString());
		} catch (Exception e) {
			// TODO: handle exception
			return null;
		}
	}
	
	/**
	 * @param totalNum 总数据数量
	 */																
	public int searchdtmDeviceFacesnapshotEventFindCount(String areaId, String policeId,String dfe01,String dfe03,String dfe04,String dfe05,String dfe04Start,String dfe04End,String totalNum,String dnu08) {
		try {
			int intTotalNum = Integer.valueOf(totalNum);
			if (intTotalNum > 0) {
				return intTotalNum;
			} else {
				StringBuffer strSql = new StringBuffer("select count(1) from dtm_facesnapshot_event left join dictionary_card_type on dtm_facesnapshot_event.dfe02=dct03 left join dictionary_facesnapshot_eventtype on dde20=dictionary_facesnapshot_eventtype.dfe_id left join dtm_usecompany_info on dui_id=dde21 left join dtm_usecompany_trade on dut04=dde21  where 1=1  ");
				strSql.append("and dictionary_facesnapshot_eventtype.dfe03=true and dct04=1  ");
				//行业id
				if (dnu08 != null && "".equals(dnu08) == false) {
					strSql.append("and dut02 in ("+dnu08+")");
				}
				//所属区县
				if (areaId != null && "".equals(areaId) == false  && "null".equals(areaId) == false   && "-1".equals(areaId) == false ) {
					strSql.append(" and dui32 = '"+areaId+"' ");
				}
				//所属派出所
				if (policeId !=null && "null".equals(policeId) == false && "".equals(policeId)== false  && "-1".equals(policeId) == false ) {
					strSql.append(" and dui36 ='"+policeId+"' ");
				}
				//设备编号
				if (dfe01 != null && "".equals(dfe01) == false) {
					strSql.append(" and dde01 like '%" + dfe01 + "%'  ");
				}
				//证件类型
				if (dfe03 != null && "".equals(dfe03) == false && "-1".equals(dfe03) == false) {
					strSql.append(" and dtm_facesnapshot_event.dfe02 = '" + dfe03 + "'  ");
				}
				//证件号码
				if (dfe04 != null && "".equals(dfe04) == false) {
					strSql.append(" and dtm_facesnapshot_event.dfe03 like '%" + dfe04 + "%'  ");
				}
				//事件类型
				if (dfe05 != null && "".equals(dfe05) == false && "-1".equals(dfe05) == false ) {
					strSql.append(" and dde20 ='" + dfe05 + "'  ");
				//用户没有选中事件类型默认查询医院,药房 可用事件类型
				}else {
					strSql.append(" and dde20 in (" + objCommonJsonService.facesnapshotEvevttype + ")  ");
				}
				//开始时间
				if (dfe04Start != null && "".equals(dfe04Start) == false) {
					strSql.append(" and  dde04 >= '"+dfe04Start+"'  ");
				}
				//结束时间
				if (dfe04End != null && "".equals(dfe04End) == false) {
					strSql.append(" and dde04 <= '"+dfe04End+"'  ");
				}
				return objSearchDao.selectCountList(strSql.toString());
			}
		} catch (Exception e) {
			e.printStackTrace();
			// TODO: handle exception
			return -1;
		}
	}
	
	
	/**
	 * 人脸抓拍心跳信息表 查询 List
	 * 
	 * @param objDtmSvssystemLog
	 * @param areaId             区县
	 * @param policeId           派出所
	 * @param dui32              区县
	 * @param dui36              派出所
	 * @param dui02              单位名称
	 * @param dfh01              设备编码
	 * @param dfh02Start         开始时间
	 * @param dfh02End           结束时间
	 * @param dfh02Type          心跳时间1.有2.没有
	 * @param intPageNum
	 * @param intCpage
	 * @return
	 */
	public List searchdtmDeviceFacesnapshotHeartFind(DtmSvssystemLog objDtmSvssystemLog,
			String dnu08, String areaId, String policeId, String dui32, String dui36, String dui02, String ase01,
			String dfh02Start, String dfh02End, String dfh02Type, String deviceHeartSql, int intPageNum, int intCpage) {
		try {

			StringBuffer strSql = new StringBuffer(
					sqlConstant.sqlUserDtmFacesnapshotHeartSearch + " And ase14=1 and ase19 in (1,2) ");
			// 行业ID
			if (dnu08 != null && "".equals(dnu08) == false) {
				strSql.append(" AND dut02 in (" + dnu08 + ")  ");
			}

			// 区县
			if (dui32 != null && "".equals(dui32) == false && "-1".equals(dui32) == false) {
				strSql.append(" AND dui32  in (" + dui32 + ")  ");
			} else {
				strSql.append(" AND dui32  in (" + areaId + ")  ");
			}
			// 派出所
			if (dui36 != null && "".equals(dui36) == false && "-1".equals(dui36) == false) {
				strSql.append(" AND dui36 in (" + dui36 + ")  ");
			} else {
				strSql.append(" AND dui36 in (" + policeId + ")  ");
			}
			// 单位名称
			if (dui02 != null && "".equals(dui02) == false) {
				strSql.append(" AND dui02 LIKE '%" + dui02 + "%' ");
			}
			// 设备编码
			if (ase01 != null && "".equals(ase01) == false) {
				strSql.append(" and ase01 like '%" + ase01 + "%'  ");
			}

			// 是否有心跳时间1.有2.没有
			if (dfh02Type.equals("1")) {
				// 开始时间
				if (dfh02Start != null && "".equals(dfh02Start) == false) {
					strSql.append(" and  ase30 >= '" + dfh02Start + "'  ");
				}
				// 结束时间
				if (dfh02End != null && "".equals(dfh02End) == false) {
					strSql.append(" and ase30 <= '" + dfh02End + "'  ");
				}
				strSql.append(" AND ase30 IS not NULL  ");
			} else {
				strSql.append(" AND ase30 IS null ");
			}
			strSql.append(" order by ase_id desc limit ").append(intPageNum).append(" offset ")
					.append((intCpage - 1) * intPageNum);

			// 记录应用系统日志-OpType 操作行为类型0.登录1.查询 2.新增3.修改4.删除5.退出
			objDtmSvssystemLog.setDsl16(1);
			// 记录应用系统日志-OperateCondition 操作类型为1-查询 3-修改
			// 4-删除类型时,记录用户进行操作时的数据筛选条件,填写数据操作SQL语句where子句内容
			objDtmSvssystemLog
					.setDsl17(strSql.substring(strSql.indexOf("where") + 5).replace("'", "''").replace("1=1", ""));
			// 记录应用系统日志-FuncModuleName 操作人所操作的应用内的具体功能模块名称
			objDtmSvssystemLog.setDsl25("人脸抓拍-心跳查询");
			// 记录应用系统日志-Query Sql 当操作执行为SQL语句时,填写SQL语句
			objDtmSvssystemLog.setDsl28(strSql.toString().replace("'", "''").replace("1=1", ""));

			// 记录应用系统日志-OperateResult 操作人的操作结果0.失败1.成功
			objDtmSvssystemLog.setDsl18(1);

			// 最终调用日志入库
			objCommonJsonService.feverSvsSystemLog(objDtmSvssystemLog);

			return objIUserSearchDao.selectUserDtmFacesnapshotHeartSearch(strSql.toString());
		} catch (Exception e) {
			// TODO: handle exception
			return null;
		}

	}

	/**
	 * 人脸抓拍心跳信息表 查询 List 的count
	 * 
	 * @param dui02      单位名称
	 * @param dfh01      设备编码
	 * @param dfh02Start 开始时间
	 * @param dfh02End   结束时间
	 * @param dfh02Type  心跳时间1.有2.没有
	 * @param totalNum
	 * @return
	 */

	public int searchdtmDeviceFacesnapshotHeartFindCount(String areaId, String policeId, String dui32, String dui36,
			String dui02, String ase01, String dnu08, String dfh02Start, String dfh02End, String dfh02Type,
			 String totalNum) {
		try {
			int intTotalNum = Integer.valueOf(totalNum);
			if (intTotalNum > 0) {
				return intTotalNum;
			} else {
				StringBuffer strSql = new StringBuffer(
						"select COUNT(DISTINCT ase_id) from dtm_facesnapshot_heart LEFT JOIN dtm_usecompany_info ON dtm_facesnapshot_heart.ase20 = dtm_usecompany_info.dui_id LEFT JOIN dtm_usecompany_trade ON dtm_facesnapshot_heart.ase20 = dtm_usecompany_trade.dut04  WHERE 1=1 ");

				// 行业ID
				if (dnu08 != null && "".equals(dnu08) == false) {
					strSql.append(" AND dut02 in (" + dnu08 + ")  ");
				}

				// 区县
				if (dui32 != null && "".equals(dui32) == false && "-1".equals(dui32) == false) {
					strSql.append(" AND dui32  in (" + dui32 + ")  ");
				} else {
					strSql.append(" AND dui32  in (" + areaId + ")  ");
				}
				// 派出所
				if (dui36 != null && "".equals(dui36) == false && "-1".equals(dui36) == false) {
					strSql.append(" AND dui36 in (" + dui36 + ")  ");
				} else {
					strSql.append(" AND dui36 in (" + policeId + ")  ");
				}
				// 单位名称
				if (dui02 != null && "".equals(dui02) == false) {
					strSql.append(" AND dui02 LIKE '%" + dui02 + "%' ");
				}
				// 设备编码
				if (ase01 != null && "".equals(ase01) == false) {
					strSql.append(" and ase01 like '%" + ase01 + "%'  ");
				}

				// 是否有心跳时间1.有2.没有
				if (dfh02Type.equals("1")) {
					// 开始时间
					if (dfh02Start != null && "".equals(dfh02Start) == false) {
						strSql.append(" and  ase30 >= '" + dfh02Start + "'  ");
					}
					// 结束时间
					if (dfh02End != null && "".equals(dfh02End) == false) {
						strSql.append(" and ase30 <= '" + dfh02End + "'  ");
					}
					strSql.append(" AND ase30 IS not NULL  ");
				} else {
					strSql.append(" AND ase30 IS null ");
				}
				return objSearchDao.selectCountList(strSql.toString());
			}

		} catch (Exception e) {
			// TODO: handle exception
			return -1;
		}
	}
}

package svs.controller;

import java.math.BigDecimal;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.edb.util.PGobject;

import svs.dto.DictionaryCity;
import svs.dto.DictionaryRoad;
import svs.dto.DtmSvssystemLog;
import svs.dto.DtmUsecompanyInfo;
import svs.dto.userDto.UserDtmUsecompanyInfo;
import svs.dto.userDto.UserDtmUsecompanyInfoByDevice;
import svs.dto.userDto.UserDtmUsecompanyInfoSearch;
import svs.service.CommonJsonService;
import svs.service.DtmUsecompanyInfoJsonService;

@Controller
public class DtmUsecompanyInfoJsonController {
	@Autowired
	private DtmUsecompanyInfoJsonService objDtmUsecompanyInfoJsonService;
	@Autowired
	private CommonJsonService objCommonJsonService;
	private int jsonFlag;
	// 每页数量
	private int intPageNum;

	// 当前页
	private int intCpage;

	// 总记录数
	private int intAllCount;

	/**
	 * 营业执照检索
	 * 
	 * @param dui01   社会统一信用代码
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("/dtmCompanyInfoYYZZCheck")
	@ResponseBody
	public Map dtmCompanyInfoYYZZCheck(HttpSession session, HttpServletRequest request, String dui01) {
		Map mpList = new HashMap();
//		//判断Session是否失效
//		if (!objCommonJsonService.SystemBool(session)) {
//			mpList.put("jsonFlag", -2);
//			mpList.put("jsonMsg", "Session失效,请重新登录!");
//			return mpList;
//		}
		try {
			// 单位信息
			UserDtmUsecompanyInfoSearch objUserDtmUsecompanyInfoCheck = objDtmUsecompanyInfoJsonService
					.searchDtmUsecompanyInfo(dui01);
			String strDtmUsecompanyTradeDtmUsecompanyInfoAdd = "";
			if (objUserDtmUsecompanyInfoCheck != null) {
				strDtmUsecompanyTradeDtmUsecompanyInfoAdd = objDtmUsecompanyInfoJsonService
						.dtmUsecompanyTradeInitial(objUserDtmUsecompanyInfoCheck.getDuiId().toString());
				// 注册路名
				DictionaryRoad objDictionaryRoad28 = null;
				if (objUserDtmUsecompanyInfoCheck.getDui28() != null
						&& objUserDtmUsecompanyInfoCheck.getDui28() != "") {
					// 注册路名
					objDictionaryRoad28 = objCommonJsonService
							.searchDictionaryRoadInfo(objUserDtmUsecompanyInfoCheck.getDui28());
				}
				mpList.put("objDtmUsecompanyInfoCheckDui28", objDictionaryRoad28);
				// 办公路名
				DictionaryRoad objDictionaryRoadDui34 = null;
				if (objUserDtmUsecompanyInfoCheck.getDui34() != null
						&& objUserDtmUsecompanyInfoCheck.getDui34() != "") {
					// 办公路名
					objDictionaryRoadDui34 = objCommonJsonService
							.searchDictionaryRoadInfo(objUserDtmUsecompanyInfoCheck.getDui34());
				}
				mpList.put("objDtmUsecompanyInfoCheckDui34", objDictionaryRoadDui34);
			}

			mpList.put("objUserDtmUsecompanyInfoCheck", objUserDtmUsecompanyInfoCheck);
			mpList.put("strDtmUsecompanyTradeDtmUsecompanyInfoAdd", strDtmUsecompanyTradeDtmUsecompanyInfoAdd);
			mpList.put("jsonFlag", 1);
			mpList.put("strMsg", "成功");
			return mpList;
		} catch (Exception e) {
			e.printStackTrace();
			mpList.put("jsonFlag", -1);
			return mpList;
		}
	}

	/**
	 * 单位添加
	 * 
	 * @param dui01   社会统一信用代码
	 * @param request
	 * @return
	 * @throws ParseException
	 * @throws SQLException
	 */
	@RequestMapping("/dtmUsecompanyInfoAddJsonAction")
	@ResponseBody
	public Map dtmUsecompanyInfoAddJsonAction(HttpSession session, HttpServletRequest request) {

		Map mpList = new HashMap();
//		//判断Session是否失效
//		if (!objCommonJsonService.SystemBool(session)) {
//			mpList.put("jsonFlag", -2);
//			mpList.put("jsonMsg", "Session失效,请重新登录!");
//			return mpList;
//		}
		try {
			// 创建应用系统日志对象,并且已经填写好了一些通用参数
			DtmSvssystemLog objDtmSvssystemLog = objCommonJsonService.createNewDtmSvssystemLog(session, request);

			// 使用单位信息
			DtmUsecompanyInfo objDtmUsecompanyInfo = new DtmUsecompanyInfo();
			 统一社会信用代码
			String dui01 = request.getParameter("dui01");
			objDtmUsecompanyInfo.setDui01(dui01);
			// 单位名称
			String dui02 = request.getParameter("dui02");
			objDtmUsecompanyInfo.setDui02(dui02);
			// 成立日期
			String dui03 = request.getParameter("dui03");
			SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			Date utilDate = format.parse(dui03);
			objDtmUsecompanyInfo.setDui03(utilDate);
			// 注册资金
			BigDecimal dui04 = new BigDecimal(request.getParameter("dui04"));
			objDtmUsecompanyInfo.setDui04(dui04);
			// 单位规模信息表主键ID
			Integer dui05 = Integer.parseInt(request.getParameter("dui05"));
			objDtmUsecompanyInfo.setDui05(dui05);
			// 经济类型信息表主键ID
			Integer dui06 = Integer.parseInt(request.getParameter("dui06"));
			objDtmUsecompanyInfo.setDui06(dui06);
			// 单位电话
			String dui07 = request.getParameter("dui07");
			objDtmUsecompanyInfo.setDui07(dui07);
			// 单位传真
			String dui08 = request.getParameter("dui08");
			objDtmUsecompanyInfo.setDui08(dui08);
			// 经度
			BigDecimal dui09 = new BigDecimal(request.getParameter("dui09"));
			objDtmUsecompanyInfo.setDui09(dui09);
			// 纬度
			BigDecimal dui10 = new BigDecimal(request.getParameter("dui10"));
			objDtmUsecompanyInfo.setDui10(dui10);
			// 高度
			BigDecimal dui11 = new BigDecimal(request.getParameter("dui11"));
			objDtmUsecompanyInfo.setDui11(dui11);
			// GSI位置信息
			String dui12 = request.getParameter("dui12");
			PGobject jsonObject = new PGobject();
			jsonObject.setType("json");
			jsonObject.setValue(dui12);
			objDtmUsecompanyInfo.setDui12(jsonObject);
			// 所属坐标系代码
			Integer dui13 = Integer.parseInt(request.getParameter("dui13"));
			objDtmUsecompanyInfo.setDui13(dui13);
			// 法人代表
			String dui14 = request.getParameter("dui14");
			objDtmUsecompanyInfo.setDui14(dui14);
			// 证件类别信息表主键ID
			Integer dui15 = Integer.parseInt(request.getParameter("dui15"));
			objDtmUsecompanyInfo.setDui15(dui15);
			// 证件号码
			String dui16 = request.getParameter("dui16");
			objDtmUsecompanyInfo.setDui16(dui16);
			// 联系固话
			String dui17 = request.getParameter("dui17");
			objDtmUsecompanyInfo.setDui17(dui17);
			// 联系手机
			String dui18 = request.getParameter("dui18");
			objDtmUsecompanyInfo.setDui18(dui18);
			// 公司负责人
			String dui19 = request.getParameter("dui19");
			objDtmUsecompanyInfo.setDui19(dui19);
			// 证件类别信息表主键ID
			Integer dui20 = Integer.parseInt(request.getParameter("dui20"));
			objDtmUsecompanyInfo.setDui20(dui20);
			// 证件号码
			String dui21 = request.getParameter("dui21");
			objDtmUsecompanyInfo.setDui21(dui21);
			// 联系固话
			String dui22 = request.getParameter("dui22");
			objDtmUsecompanyInfo.setDui22(dui22);
			// 联系手机
			String dui23 = request.getParameter("dui23");
			objDtmUsecompanyInfo.setDui23(dui23);
			// 注册省信息表唯一编码
			Long dui24 = Long.valueOf(request.getParameter("dui24"));
			objDtmUsecompanyInfo.setDui24(dui24);
			// 注册市信息表唯一编码
			Long dui25 = Long.valueOf(request.getParameter("dui25"));
			objDtmUsecompanyInfo.setDui25(dui25);
			// 注册区信息表唯一编码
			Long dui26 = Long.valueOf(request.getParameter("dui26"));
			objDtmUsecompanyInfo.setDui26(dui26);
			// 注册街道信息表唯一编码
			Long dui27 = Long.valueOf(request.getParameter("dui27"));
			objDtmUsecompanyInfo.setDui27(dui27);
			// 注册道路信息表唯一编码
			String dui28 = request.getParameter("dui28");
			objDtmUsecompanyInfo.setDui28(dui28);
			// 注册地址
			String dui29 = request.getParameter("dui29");
			objDtmUsecompanyInfo.setDui29(dui29);
			// 办公省信息表唯一编码
			Long dui30 = Long.valueOf(request.getParameter("dui30"));
			objDtmUsecompanyInfo.setDui30(dui30);
			// 办公市信息表唯一编码
			Long dui31 = Long.valueOf(request.getParameter("dui31"));
			objDtmUsecompanyInfo.setDui31(dui31);
			// 办公区信息表唯一编码
			Long dui32 = Long.valueOf(request.getParameter("dui32"));
			objDtmUsecompanyInfo.setDui32(dui32);
			// 办公街道信息表唯一编码
			Long dui33 = Long.valueOf(request.getParameter("dui33"));
			objDtmUsecompanyInfo.setDui33(dui33);
			// 办公道路信息表唯一编码
			String dui34 = request.getParameter("dui34");
			objDtmUsecompanyInfo.setDui34(dui34);
			// 办公地址
			String dui35 = request.getParameter("dui35");
			objDtmUsecompanyInfo.setDui35(dui35);
			// 派出所信息表唯一编码
			String dui36 = request.getParameter("dui36");
			objDtmUsecompanyInfo.setDui36(dui36);
			// 帐号
			String dui37 = request.getParameter("dui37");
			objDtmUsecompanyInfo.setDui37(dui37);
			// 密码
			String dui38 = request.getParameter("dui38");
			objDtmUsecompanyInfo.setDui38(dui38);
			// UUID
			// String dui41 = UUID.randomUUID().toString();
			objDtmUsecompanyInfo.setDui41(UUID.randomUUID());

			// 楼层
			Integer dui46 = Integer.parseInt(request.getParameter("dui46"));
			objDtmUsecompanyInfo.setDui46(dui46);
			// 行业
			String strDtId = request.getParameter("strDtId");
			// 获取ip
			String ipAddress = request.getRemoteAddr();
			String userid = "";
			if (session.getAttribute("userid") != null
					&& session.getAttribute("userid").toString().equals("") == false) {
				userid = session.getAttribute("userid").toString();
			}
			Date date = new Date();
			DateFormat matter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			// 当前时间
			String strDate = matter.format(date);
			jsonFlag = objDtmUsecompanyInfoJsonService.dtmUsecompanyInfoAddLogic(objDtmSvssystemLog,
					objDtmUsecompanyInfo, strDtId);
			if (jsonFlag > 0) {
				// 日志
				objCommonJsonService.SystemLog(userid, "使用单位添加成功!统一社会信用代码:" + dui01 + ",单位名称:" + dui02 + ",成立日期:"
						+ dui03 + ",注册资金:" + dui04 + ",单位规模信息表主键ID:" + dui05 + ",经济类型信息表主键ID:" + dui06 + ",单位电话:"
						+ dui07 + ",单位传真:" + dui08 + ",经度:" + dui09 + ",纬度:" + dui10 + ",高度:" + dui11 + ",GSI位置信息:"
						+ dui12 + ",所属坐标系代码:" + dui13 + ",法人代表:" + dui14 + ",证件类别信息表主键ID:" + dui15 + ",证件号码:" + dui16
						+ ",联系固话:" + dui17 + ",联系手机:" + dui18 + ",公司负责人:" + dui19 + ",证件类别信息表主键ID:" + dui20 + ",证件号码:"
						+ dui21 + ",联系固话:" + dui22 + ",联系手机:" + dui23 + ",注册省信息表唯一编码:" + dui24 + ",注册市信息表唯一编码:" + dui25
						+ ",注册区信息表唯一编码:" + dui26 + ",注册街道信息表唯一编码:" + dui27 + ",注册道路信息表唯一编码:" + dui28 + ",注册地址:" + dui29
						+ ",办公省信息表唯一编码:" + dui30 + ",办公市信息表唯一编码:" + dui31 + ",办公区信息表唯一编码:" + dui32 + ",办公街道信息表唯一编码:"
						+ dui33 + ",办公道路信息表唯一编码:" + dui34 + ",办公地址:" + dui35 + ",派出所信息表唯一编码:" + dui36 + ",帐号:" + dui37
						+ ",密码:" + dui38 + ",添加时间:" + strDate + ",楼层:" + dui46 + ",单位行业id:" + strDtId, dui02, "9001",
						ipAddress);
			} else if (jsonFlag == -7) {
				objCommonJsonService.SystemLog(userid, "使用单位添加失败!单位帐号重复。统一社会信用代码:" + dui01 + ",单位名称:" + dui02 + ",成立日期:"
						+ dui03 + ",注册资金:" + dui04 + ",单位规模信息表主键ID:" + dui05 + ",经济类型信息表主键ID:" + dui06 + ",单位电话:"
						+ dui07 + ",单位传真:" + dui08 + ",经度:" + dui09 + ",纬度:" + dui10 + ",高度:" + dui11 + ",GSI位置信息:"
						+ dui12 + ",所属坐标系代码:" + dui13 + ",法人代表:" + dui14 + ",证件类别信息表主键ID:" + dui15 + ",证件号码:" + dui16
						+ ",联系固话:" + dui17 + ",联系手机:" + dui18 + ",公司负责人:" + dui19 + ",证件类别信息表主键ID:" + dui20 + ",证件号码:"
						+ dui21 + ",联系固话:" + dui22 + ",联系手机:" + dui23 + ",注册省信息表唯一编码:" + dui24 + ",注册市信息表唯一编码:" + dui25
						+ ",注册区信息表唯一编码:" + dui26 + ",注册街道信息表唯一编码:" + dui27 + ",注册道路信息表唯一编码:" + dui28 + ",注册地址:" + dui29
						+ ",办公省信息表唯一编码:" + dui30 + ",办公市信息表唯一编码:" + dui31 + ",办公区信息表唯一编码:" + dui32 + ",办公街道信息表唯一编码:"
						+ dui33 + ",办公道路信息表唯一编码:" + dui34 + ",办公地址:" + dui35 + ",派出所信息表唯一编码:" + dui36 + ",帐号:" + dui37
						+ ",密码:" + dui38 + ",添加时间:" + strDate + ",楼层:" + dui46 + ",单位行业id:" + strDtId, "-1", "9001",
						ipAddress);
			} else {
				objCommonJsonService.SystemLog(userid, "使用单位添加失败!统一社会信用代码:" + dui01 + ",单位名称:" + dui02 + ",成立日期:"
						+ dui03 + ",注册资金:" + dui04 + ",单位规模信息表主键ID:" + dui05 + ",经济类型信息表主键ID:" + dui06 + ",单位电话:"
						+ dui07 + ",单位传真:" + dui08 + ",经度:" + dui09 + ",纬度:" + dui10 + ",高度:" + dui11 + ",GSI位置信息:"
						+ dui12 + ",所属坐标系代码:" + dui13 + ",法人代表:" + dui14 + ",证件类别信息表主键ID:" + dui15 + ",证件号码:" + dui16
						+ ",联系固话:" + dui17 + ",联系手机:" + dui18 + ",公司负责人:" + dui19 + ",证件类别信息表主键ID:" + dui20 + ",证件号码:"
						+ dui21 + ",联系固话:" + dui22 + ",联系手机:" + dui23 + ",注册省信息表唯一编码:" + dui24 + ",注册市信息表唯一编码:" + dui25
						+ ",注册区信息表唯一编码:" + dui26 + ",注册街道信息表唯一编码:" + dui27 + ",注册道路信息表唯一编码:" + dui28 + ",注册地址:" + dui29
						+ ",办公省信息表唯一编码:" + dui30 + ",办公市信息表唯一编码:" + dui31 + ",办公区信息表唯一编码:" + dui32 + ",办公街道信息表唯一编码:"
						+ dui33 + ",办公道路信息表唯一编码:" + dui34 + ",办公地址:" + dui35 + ",派出所信息表唯一编码:" + dui36 + ",帐号:" + dui37
						+ ",密码:" + dui38 + ",添加时间:" + strDate + ",楼层:" + dui46 + ",单位行业id:" + strDtId, "-1", "9001",
						ipAddress);
			}

			mpList.put("jsonFlag", jsonFlag);
			mpList.put("strMsg", "成功");
			return mpList;
		} catch (Exception e) {
			e.printStackTrace();
			mpList.put("jsonFlag", -1);
			return mpList;
		}
	}

	/**
	 * 单位编辑查询
	 * 
	 * @param dui01   社会统一信用代码
	 * @param request
	 * @param model
	 * @return
	 * @throws ParseException
	 * @throws SQLException
	 */
	@RequestMapping("/dtmUsecompanyInfoEditSearch")
	@ResponseBody
	public Map dtmUsecompanyInfoEditSearch(HttpSession session, HttpServletRequest request) {
		Map mpList = new HashMap();
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			mpList.put("jsonFlag", -2);
			mpList.put("jsonMsg", "Session失效,请重新登录!");
			return mpList;
		}
		try {
			// 创建应用系统日志对象,并且已经填写好了一些通用参数
			DtmSvssystemLog objDtmSvssystemLog = objCommonJsonService.createNewDtmSvssystemLog(session, request);
			// 统一社会信用代码
			String dui01 = request.getParameter("dui01");
			// 单位名称
			String dui02 = request.getParameter("dui02");
			// 办公区县
			String dui32 = request.getParameter("dui32");
			// 所属派出所
			String dui36 = request.getParameter("dui36");
			// 当前页
			intCpage = Integer.valueOf(request.getParameter("Cpage"));
			// 总数据量
			String totalNum = request.getParameter("totalNum");
			
			// 内保用户 区县权限 逗号隔开 区县唯一编码
			String strAreaID = session.getAttribute("AreaID").toString();
			// 内保用户 派出所权限 逗号隔开 区县唯一编码
			String strPoliceID = session.getAttribute("PoliceID").toString();
			// 单位信息
			List listUserDtmUsecompanyInfo = objDtmUsecompanyInfoJsonService
					.dtmUsecompanyInfoEditSearch(objDtmSvssystemLog, dui01, dui02, dui32, dui36, strAreaID, strPoliceID,
							objCommonJsonService.PAGE_COUNT, intCpage);
			// 道路信息
			intAllCount = objDtmUsecompanyInfoJsonService.dtmUsecompanyInfoEditSearchCount(dui01, dui02, dui32, dui36,
					strAreaID, strPoliceID, totalNum);
			// 每页数据量
			intPageNum = objCommonJsonService.PAGE_COUNT;
			mpList.put("listUserDtmUsecompanyInfoEditSearch", listUserDtmUsecompanyInfo);
			mpList.put("intAllCount", intAllCount);
			mpList.put("intPageNum", intPageNum);
			mpList.put("jsonFlag", 1);
			mpList.put("strMsg", "成功");
			return mpList;
		} catch (Exception e) {
			e.printStackTrace();
			mpList.put("jsonFlag", -1);
			return mpList;
		}
	}

	/**
	 * 单位编辑
	 * 
	 * @param dui01   社会统一信用代码
	 * @param request
	 * @param model
	 * @return
	 * @throws ParseException
	 * @throws SQLException
	 */
	@RequestMapping("/dtmUsecompanyInfoEdit")
	@ResponseBody
	public Map dtmUsecompanyInfoEdit(HttpSession session, HttpServletRequest request) {
		Map mpList = new HashMap();
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			mpList.put("jsonFlag", -2);
			mpList.put("jsonMsg", "Session失效,请重新登录!");
			return mpList;
		}
		try {
			// 创建应用系统日志对象,并且已经填写好了一些通用参数
			DtmSvssystemLog objDtmSvssystemLog = objCommonJsonService.createNewDtmSvssystemLog(session, request);

			// 使用单位信息
			DtmUsecompanyInfo objDtmUsecompanyInfo = new DtmUsecompanyInfo();
			// 使用单位id
			Integer duiId = Integer.parseInt(request.getParameter("duiId"));
			objDtmUsecompanyInfo.setDuiId(duiId);
			// 统一社会信用代码
			String dui01 = request.getParameter("dui01");
			objDtmUsecompanyInfo.setDui01(dui01);
			// 单位名称
			String dui02 = request.getParameter("dui02");
			objDtmUsecompanyInfo.setDui02(dui02);
			// 成立日期
			String dui03 = request.getParameter("dui03");
			SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			Date utilDate = format.parse(dui03);
			objDtmUsecompanyInfo.setDui03(utilDate);
			// 注册资金
			BigDecimal dui04 = new BigDecimal(request.getParameter("dui04"));
			objDtmUsecompanyInfo.setDui04(dui04);
			// 单位规模信息表主键ID
			Integer dui05 = Integer.parseInt(request.getParameter("dui05"));
			objDtmUsecompanyInfo.setDui05(dui05);
			// 经济类型信息表主键ID
			Integer dui06 = Integer.parseInt(request.getParameter("dui06"));
			objDtmUsecompanyInfo.setDui06(dui06);
			// 单位电话
			String dui07 = request.getParameter("dui07");
			objDtmUsecompanyInfo.setDui07(dui07);
			// 单位传真
			String dui08 = request.getParameter("dui08");
			objDtmUsecompanyInfo.setDui08(dui08);
			// 经度
			BigDecimal dui09 = new BigDecimal(request.getParameter("dui09"));
			objDtmUsecompanyInfo.setDui09(dui09);
			// 纬度
			BigDecimal dui10 = new BigDecimal(request.getParameter("dui10"));
			objDtmUsecompanyInfo.setDui10(dui10);
			// 高度
			BigDecimal dui11 = new BigDecimal(request.getParameter("dui11"));
			objDtmUsecompanyInfo.setDui11(dui11);
			// GSI位置信息
			String dui12 = request.getParameter("dui12");
			PGobject jsonObject = new PGobject();
			jsonObject.setType("json");
			jsonObject.setValue(dui12);
			objDtmUsecompanyInfo.setDui12(dui12);
			// 所属坐标系代码
			Integer dui13 = Integer.parseInt(request.getParameter("dui13"));
			objDtmUsecompanyInfo.setDui13(dui13);
			// 法人代表
			String dui14 = request.getParameter("dui14");
			objDtmUsecompanyInfo.setDui14(dui14);
			// 证件类别信息表主键ID
			Integer dui15 = Integer.parseInt(request.getParameter("dui15"));
			objDtmUsecompanyInfo.setDui15(dui15);
			// 证件号码
			String dui16 = request.getParameter("dui16");
			objDtmUsecompanyInfo.setDui16(dui16);
			// 联系固话
			String dui17 = request.getParameter("dui17");
			objDtmUsecompanyInfo.setDui17(dui17);
			// 联系手机
			String dui18 = request.getParameter("dui18");
			objDtmUsecompanyInfo.setDui18(dui18);
			// 公司负责人
			String dui19 = request.getParameter("dui19");
			objDtmUsecompanyInfo.setDui19(dui19);
			// 证件类别信息表主键ID
			Integer dui20 = Integer.parseInt(request.getParameter("dui20"));
			objDtmUsecompanyInfo.setDui20(dui20);
			// 证件号码
			String dui21 = request.getParameter("dui21");
			objDtmUsecompanyInfo.setDui21(dui21);
			// 联系固话
			String dui22 = request.getParameter("dui22");
			objDtmUsecompanyInfo.setDui22(dui22);
			// 联系手机
			String dui23 = request.getParameter("dui23");
			objDtmUsecompanyInfo.setDui23(dui23);
			// 注册省信息表唯一编码
			Long dui24 = Long.parseLong(request.getParameter("dui24"));
			objDtmUsecompanyInfo.setDui24(dui24);
			// 注册市信息表唯一编码
			Long dui25 = Long.parseLong(request.getParameter("dui25"));
			objDtmUsecompanyInfo.setDui25(dui25);
			// 注册区信息表唯一编码
			Long dui26 = Long.parseLong(request.getParameter("dui26"));
			objDtmUsecompanyInfo.setDui26(dui26);
			// 注册街道信息表唯一编码
			Long dui27 = Long.parseLong(request.getParameter("dui27"));
			objDtmUsecompanyInfo.setDui27(dui27);
			// 注册道路信息表唯一编码
			String dui28 = request.getParameter("dui28");
			objDtmUsecompanyInfo.setDui28(dui28);
			// 注册地址
			String dui29 = request.getParameter("dui29");
			objDtmUsecompanyInfo.setDui29(dui29);
			// 办公省信息表唯一编码
			Long dui30 = Long.parseLong(request.getParameter("dui30"));
			objDtmUsecompanyInfo.setDui30(dui30);
			// 办公市信息表唯一编码
			Long dui31 = Long.parseLong(request.getParameter("dui31"));
			objDtmUsecompanyInfo.setDui31(dui31);
			// 办公区信息表唯一编码
			Long dui32 = Long.parseLong(request.getParameter("dui32"));
			objDtmUsecompanyInfo.setDui32(dui32);
			// 办公街道信息表唯一编码
			Long dui33 = Long.parseLong(request.getParameter("dui33"));
			objDtmUsecompanyInfo.setDui33(dui33);
			// 办公道路信息表唯一编码
			String dui34 = request.getParameter("dui34");
			objDtmUsecompanyInfo.setDui34(dui34);
			// 办公地址
			String dui35 = request.getParameter("dui35");
			objDtmUsecompanyInfo.setDui35(dui35);
			// 派出所信息表唯一编码
			String dui36 = request.getParameter("dui36");
			objDtmUsecompanyInfo.setDui36(dui36);
			// 帐号
			String dui37 = request.getParameter("dui37");
			objDtmUsecompanyInfo.setDui37(dui37);
			// 密码
			String dui38 = request.getParameter("dui38");
			objDtmUsecompanyInfo.setDui38(dui38);

			// 楼层
			Integer dui46 = Integer.parseInt(request.getParameter("dui46"));
			objDtmUsecompanyInfo.setDui46(dui46);
			// 单位行业id str
			String strDtId = request.getParameter("strDtId");
			jsonFlag = objDtmUsecompanyInfoJsonService.dtmUsecompanyInfoEditLogic(objDtmSvssystemLog,
					objDtmUsecompanyInfo, strDtId);

			// 获取ip
			String ipAddress = request.getRemoteAddr();
			String userid = session.getAttribute("userid").toString();
			Date date = new Date();
			DateFormat matter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			// 当前时间
			String strDate = matter.format(date);
			if (jsonFlag > 0) {
				// 日志
				objCommonJsonService.SystemLog(userid,
						"使用单位编辑成功!单位id:" + duiId + "统一社会信用代码:" + dui01 + ",单位名称:" + dui02 + ",成立日期:" + dui03 + ",注册资金:"
								+ dui04 + ",单位规模信息表主键ID:" + dui05 + ",经济类型信息表主键ID:" + dui06 + ",单位电话:" + dui07
								+ ",单位传真:" + dui08 + ",经度:" + dui09 + ",纬度:" + dui10 + ",高度:" + dui11 + ",GSI位置信息:"
								+ dui12 + ",所属坐标系代码:" + dui13 + ",法人代表:" + dui14 + ",证件类别信息表主键ID:" + dui15 + ",证件号码:"
								+ dui16 + ",联系固话:" + dui17 + ",联系手机:" + dui18 + ",公司负责人:" + dui19 + ",证件类别信息表主键ID:"
								+ dui20 + ",证件号码:" + dui21 + ",联系固话:" + dui22 + ",联系手机:" + dui23 + ",注册省信息表唯一编码:"
								+ dui24 + ",注册市信息表唯一编码:" + dui25 + ",注册区信息表唯一编码:" + dui26 + ",注册街道信息表唯一编码:" + dui27
								+ ",注册道路信息表唯一编码:" + dui28 + ",注册地址:" + dui29 + ",办公省信息表唯一编码:" + dui30 + ",办公市信息表唯一编码:"
								+ dui31 + ",办公区信息表唯一编码:" + dui32 + ",办公街道信息表唯一编码:" + dui33 + ",办公道路信息表唯一编码:" + dui34
								+ ",办公地址:" + dui35 + ",派出所信息表唯一编码:" + dui36 + ",帐号:" + dui37 + ",密码:" + dui38 + ",添加时间:"
								+ strDate + ",楼层:" + dui46 + ",单位行业id:" + strDtId,
						dui02, "9002", ipAddress);
			} else if (jsonFlag == 5) {
				objCommonJsonService.SystemLog(userid,
						"使用单位编辑失败!统一社会信用代码重复。单位id:" + duiId + "统一社会信用代码:" + dui01 + ",单位名称:" + dui02 + ",成立日期:" + dui03
								+ ",注册资金:" + dui04 + ",单位规模信息表主键ID:" + dui05 + ",经济类型信息表主键ID:" + dui06 + ",单位电话:"
								+ dui07 + ",单位传真:" + dui08 + ",经度:" + dui09 + ",纬度:" + dui10 + ",高度:" + dui11
								+ ",GSI位置信息:" + dui12 + ",所属坐标系代码:" + dui13 + ",法人代表:" + dui14 + ",证件类别信息表主键ID:" + dui15
								+ ",证件号码:" + dui16 + ",联系固话:" + dui17 + ",联系手机:" + dui18 + ",公司负责人:" + dui19
								+ ",证件类别信息表主键ID:" + dui20 + ",证件号码:" + dui21 + ",联系固话:" + dui22 + ",联系手机:" + dui23
								+ ",注册省信息表唯一编码:" + dui24 + ",注册市信息表唯一编码:" + dui25 + ",注册区信息表唯一编码:" + dui26
								+ ",注册街道信息表唯一编码:" + dui27 + ",注册道路信息表唯一编码:" + dui28 + ",注册地址:" + dui29 + ",办公省信息表唯一编码:"
								+ dui30 + ",办公市信息表唯一编码:" + dui31 + ",办公区信息表唯一编码:" + dui32 + ",办公街道信息表唯一编码:" + dui33
								+ ",办公道路信息表唯一编码:" + dui34 + ",办公地址:" + dui35 + ",派出所信息表唯一编码:" + dui36 + ",帐号:" + dui37
								+ ",密码:" + dui38 + ",添加时间:" + strDate + ",楼层:" + dui46 + ",单位行业id:" + strDtId,
						"-1", "9002", ipAddress);
			} else if (jsonFlag == -7) {
				objCommonJsonService.SystemLog(userid,
						"使用单位编辑失败!单位帐号重复。单位id:" + duiId + "统一社会信用代码:" + dui01 + ",单位名称:" + dui02 + ",成立日期:" + dui03
								+ ",注册资金:" + dui04 + ",单位规模信息表主键ID:" + dui05 + ",经济类型信息表主键ID:" + dui06 + ",单位电话:"
								+ dui07 + ",单位传真:" + dui08 + ",经度:" + dui09 + ",纬度:" + dui10 + ",高度:" + dui11
								+ ",GSI位置信息:" + dui12 + ",所属坐标系代码:" + dui13 + ",法人代表:" + dui14 + ",证件类别信息表主键ID:" + dui15
								+ ",证件号码:" + dui16 + ",联系固话:" + dui17 + ",联系手机:" + dui18 + ",公司负责人:" + dui19
								+ ",证件类别信息表主键ID:" + dui20 + ",证件号码:" + dui21 + ",联系固话:" + dui22 + ",联系手机:" + dui23
								+ ",注册省信息表唯一编码:" + dui24 + ",注册市信息表唯一编码:" + dui25 + ",注册区信息表唯一编码:" + dui26
								+ ",注册街道信息表唯一编码:" + dui27 + ",注册道路信息表唯一编码:" + dui28 + ",注册地址:" + dui29 + ",办公省信息表唯一编码:"
								+ dui30 + ",办公市信息表唯一编码:" + dui31 + ",办公区信息表唯一编码:" + dui32 + ",办公街道信息表唯一编码:" + dui33
								+ ",办公道路信息表唯一编码:" + dui34 + ",办公地址:" + dui35 + ",派出所信息表唯一编码:" + dui36 + ",帐号:" + dui37
								+ ",密码:" + dui38 + ",添加时间:" + strDate + ",楼层:" + dui46 + ",单位行业id:" + strDtId,
						"-1", "9002", ipAddress);
			} else {
				objCommonJsonService.SystemLog(userid,
						"使用单位编辑失败!单位id:" + duiId + "统一社会信用代码:" + dui01 + ",单位名称:" + dui02 + ",成立日期:" + dui03 + ",注册资金:"
								+ dui04 + ",单位规模信息表主键ID:" + dui05 + ",经济类型信息表主键ID:" + dui06 + ",单位电话:" + dui07
								+ ",单位传真:" + dui08 + ",经度:" + dui09 + ",纬度:" + dui10 + ",高度:" + dui11 + ",GSI位置信息:"
								+ dui12 + ",所属坐标系代码:" + dui13 + ",法人代表:" + dui14 + ",证件类别信息表主键ID:" + dui15 + ",证件号码:"
								+ dui16 + ",联系固话:" + dui17 + ",联系手机:" + dui18 + ",公司负责人:" + dui19 + ",证件类别信息表主键ID:"
								+ dui20 + ",证件号码:" + dui21 + ",联系固话:" + dui22 + ",联系手机:" + dui23 + ",注册省信息表唯一编码:"
								+ dui24 + ",注册市信息表唯一编码:" + dui25 + ",注册区信息表唯一编码:" + dui26 + ",注册街道信息表唯一编码:" + dui27
								+ ",注册道路信息表唯一编码:" + dui28 + ",注册地址:" + dui29 + ",办公省信息表唯一编码:" + dui30 + ",办公市信息表唯一编码:"
								+ dui31 + ",办公区信息表唯一编码:" + dui32 + ",办公街道信息表唯一编码:" + dui33 + ",办公道路信息表唯一编码:" + dui34
								+ ",办公地址:" + dui35 + ",派出所信息表唯一编码:" + dui36 + ",帐号:" + dui37 + ",密码:" + dui38 + ",添加时间:"
								+ strDate + ",楼层:" + dui46 + ",单位行业id:" + strDtId,
						"-1", "9002", ipAddress);
			}

			mpList.put("jsonFlag", jsonFlag);
			mpList.put("strMsg", "成功");
			return mpList;
		} catch (Exception e) {
			e.printStackTrace();
			mpList.put("jsonFlag", -1);
			return mpList;
		}
	}

	/**
	 * 单位查询
	 * 
	 * @param dui01   社会统一信用代码
	 * @param request
	 * @return
	 */
	@RequestMapping("/dtmUsecompanyInfoSearch")
	@ResponseBody
	public Map dtmUsecompanyInfoSearch(HttpSession session, HttpServletRequest request) {
		Map mpList = new HashMap();
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			mpList.put("jsonFlag", -2);
			mpList.put("jsonMsg", "Session失效,请重新登录!");
			return mpList;
		}
		try {
			// 创建应用系统日志对象,并且已经填写好了一些通用参数
			DtmSvssystemLog objDtmSvssystemLog = objCommonJsonService.createNewDtmSvssystemLog(session, request);
			// 统一社会信用代码
			String dui01 = request.getParameter("dui01");
			// 单位名称
			String dui02 = request.getParameter("dui02");
			// 办公区县
			String dui32 = request.getParameter("dui32");
			// 所属派出所
			String dui36 = request.getParameter("dui36");
			// 当前页
			intCpage = Integer.valueOf(request.getParameter("Cpage"));
			// 总数据量
			String totalNum = request.getParameter("totalNum");
			// 内保用户 区县权限 逗号隔开 区县唯一编码
			String strAreaID = session.getAttribute("AreaID").toString();
			// 内保用户 派出所权限 逗号隔开 区县唯一编码
			String strPoliceID = session.getAttribute("PoliceID").toString();
			// 道路信息
			List listUserDtmUsecompanyInfo = objDtmUsecompanyInfoJsonService
					.dtmUsecompanyInfoSearch(objDtmSvssystemLog, dui01, dui02, dui32, dui36, strAreaID, strPoliceID,
							objCommonJsonService.PAGE_COUNT, intCpage);
			// 道路信息
			intAllCount = objDtmUsecompanyInfoJsonService.dtmUsecompanyInfoSearchCount(dui01, dui02, dui32, dui36,
					strAreaID, strPoliceID, totalNum);
			// 每页数据量
			intPageNum = objCommonJsonService.PAGE_COUNT;
			mpList.put("listUserDtmUsecompanyInfoSearch", listUserDtmUsecompanyInfo);
			mpList.put("intAllCount", intAllCount);
			mpList.put("intPageNum", intPageNum);
			mpList.put("jsonFlag", 1);
			mpList.put("strMsg", "成功");
			return mpList;
		} catch (Exception e) {
			e.printStackTrace();
			mpList.put("jsonFlag", -1);
			return mpList;
		}
	}

	/**
	 * 单位信息
	 * 
	 * @param dui01   社会统一信用代码
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("/dtmUsecompanyInfoRegisterSearch")
	@ResponseBody
	public Map dtmUsecompanyInfoRegisterSearch(HttpSession session, HttpServletRequest request,
			String dui01) {
		Map mpList = new HashMap();
		try {
			// 单位信息表是否存在信息
			mpList.put("jsonFlag", objDtmUsecompanyInfoJsonService.dtmUsecompanyInfoRegisterSearchService());
			mpList.put("strMsg", "成功");
			return mpList;
		} catch (Exception e) {
			e.printStackTrace();
			mpList.put("jsonFlag", -1);
			return mpList;
		}
	}

	/**
	 * 设备编码查询单位信息
	 * 
	 * @param session
	 * @param request
	 * @return
	 */
	@RequestMapping("/dtmUsecompanyInfoByDeviceCoding")
	@ResponseBody
	public Map dtmUsecompanyInfoByDeviceCoding(HttpSession session, HttpServletRequest request) {
		Map mpList = new HashMap();
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			mpList.put("jsonFlag", -2);
			mpList.put("jsonMsg", "Session失效,请重新登录!");
			return mpList;
		}
		try {
            //单位id
			String ase20 = request.getParameter("ase20");
			// 行业id
			String dnu08 = session.getAttribute("dnu08").toString();
			// 单位名称
			String dui02 = request.getParameter("dui02");
			// 设备编码
			String dud01 = request.getParameter("dud01");
			// 单位信息表list

			List listUserDtmUsecompanyInfoByDeviceCoding = objDtmUsecompanyInfoJsonService
					.selectUserDtmUsecompanyInfoByDevice(dnu08, dui02, dud01, ase20);

			mpList.put("listUserDtmUsecompanyInfoByDeviceCoding", listUserDtmUsecompanyInfoByDeviceCoding);
			mpList.put("jsonFlag", 1);
			mpList.put("strMsg", "成功");

			return mpList;

		} catch (Exception e) {
			e.printStackTrace();
			mpList.put("jsonFlag", -1);
			return mpList;
		}
	}

	/**
	 * 设备编码 单位详情
	 * 
	 * @param session
	 * @param request
	 * @return
	 */
	@RequestMapping("/dtmUsecompanyInfoByDuiId")
	@ResponseBody
	public Map dtmUsecompanyInfoByDuiId(HttpSession session, HttpServletRequest request, Model model) {
		Map mpList = new HashMap();
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			mpList.put("jsonFlag", -2);
			mpList.put("jsonMsg", "Session失效,请重新登录!");
			return mpList;
		}
		try {

			// 单位id
			String duiId = request.getParameter("duiId");
			// 单个单位信息
			UserDtmUsecompanyInfoSearch objUserDtmUsecompanyInfoSearch = objCommonJsonService
					.searchUserDtmUsecompanyInfo(duiId);

			if (objUserDtmUsecompanyInfoSearch != null) {
				mpList.put("objUserDtmUsecompanyInfoSearch", objUserDtmUsecompanyInfoSearch);
				
				
				// 办公路名
				DictionaryRoad objDictionaryRoadByDui34 = objCommonJsonService
						.searchDictionaryRoadInfo(objUserDtmUsecompanyInfoSearch.getDui34());
//				model.addAttribute("objDictionaryRoadByDui34", objDictionaryRoadByDui34);
				mpList.put("objDictionaryRoadByDui34", objDictionaryRoadByDui34);
				// 注册路名
				DictionaryRoad objDictionaryRoadByDui28 = objCommonJsonService
						.searchDictionaryRoadInfo(objUserDtmUsecompanyInfoSearch.getDui28());
//				model.addAttribute("objDictionaryRoadByDui28", objDictionaryRoadByDui28);
				mpList.put("objDictionaryRoadByDui28", objDictionaryRoadByDui28);
				
				// 单位行业
				String strDtId = objDtmUsecompanyInfoJsonService
						.dtmUsecompanyTradeInitial(objUserDtmUsecompanyInfoSearch.getDuiId().toString());

				session.setAttribute("dtId", strDtId);

				mpList.put("strDtmUsecompanyTradeDtmUsecompanyInfoAdd", strDtId);
				mpList.put("jsonFlag", 1);
				mpList.put("strMsg", "成功");

			}

			return mpList;

		} catch (Exception e) {
			e.printStackTrace();

			return mpList;
		}
	}

}

package svs.controller;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import svs.dto.DictionaryArea;
import svs.dto.DictionaryCardType;
import svs.dto.DictionaryCity;
import svs.dto.DictionaryCompanyScale;
import svs.dto.DictionaryEconomicType;
import svs.dto.DictionaryPoliceStation;
import svs.dto.DictionaryProvince;
import svs.dto.DictionaryRoad;
import svs.dto.DictionaryStreet;
import svs.dto.DictionaryTrade;
import svs.dto.DictionaryZuobiao;
import svs.dto.DtmSvssystemLog;
import svs.dto.DtmUsecompanyCommunity;
import svs.dto.DtmUsecompanyInfo;
import svs.dto.DtmUsecompanyTrade;
import svs.dto.userDto.UserDtmUsecompanyInfoSearch;
import svs.service.CommonJsonService;
import svs.service.DtmUsecompanyInfoService;

@Controller
public class DtmUsecompanyInfoController extends CommonController {
	@Resource
	private DtmUsecompanyInfoService objDtmUsecompanyInfoService;
	@Resource
	private CommonJsonService objCommonJsonService;

	/**
	 * 单位添加 初始化
	 * 
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("dtmUsecompanyInfoAddIndexAction")
	public String dtmUsecompanyInfoAddIndexAction(HttpSession session, HttpServletRequest request, Model model) {
		// 判断Session是否失效
//		if (!objCommonJsonService.SystemBool(session)) {
//			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
//			return "communitySessionError";
//		}
		try {
			// 省份
			List listDictionaryProvince = objCommonJsonService.searchDictionaryProvince();
			model.addAttribute("listDictionaryProvinceUsecompanyInfoAdd", listDictionaryProvince);
			// 市区
			List listDictionaryCity = objCommonJsonService.searchDictionaryCity("310000000000");
			model.addAttribute("listDictionaryCityUsecompanyInfoAdd", listDictionaryCity);
			// 经济类型
			List listDictionaryEconomicType = objCommonJsonService
					.searchDictionaryEconomicType();
			model.addAttribute("listDictionaryEconomicTypeUsecompanyInfoAdd", listDictionaryEconomicType);
			// 单位规模
			List listDictionaryCompanyScale = objCommonJsonService
					.searchDictionaryCompanyScale();
			model.addAttribute("listDictionaryCompanyScaleUsecompanyInfoAdd", listDictionaryCompanyScale);
			// 用户类型2.单位5.管理7.内保
			String strUserType = "";
			if (session.getAttribute("loginUserType") != null
					&& session.getAttribute("loginUserType").toString().equals("") == false) {
				strUserType = session.getAttribute("loginUserType").toString();
			}
			// 行业
			String strTrade = "";
			if (session.getAttribute("dnu08") != null && session.getAttribute("dnu08").toString().equals("") == false) {
				strTrade = session.getAttribute("dnu08").toString();
			}
			// 用户类型2.单位5.管理7.内保
			if (strUserType.equals("2")) {
				strTrade = CommonJsonService.usecompanyTrade;
			}
			// 内保用户 区县权限 逗号隔开 区县唯一编码
			String strAreaID = "";
			if (session.getAttribute("AreaID") != null
					&& session.getAttribute("AreaID").toString().equals("") == false) {
				strAreaID = session.getAttribute("AreaID").toString();
			}
			model.addAttribute("strAreaID", strAreaID);

			// 内保用户 派出所权限 逗号隔开 区县唯一编码
			String strPoliceID = "";
			if (session.getAttribute("PoliceID") != null
					&& session.getAttribute("PoliceID").toString().equals("") == false) {
				strPoliceID = session.getAttribute("PoliceID").toString();
			}
			model.addAttribute("strPoliceID", strPoliceID);

			// 行业
			List listDictionaryTrade = objCommonJsonService.searchDictionaryTrade(strTrade);
			model.addAttribute("listDictionaryTradeUsecompanyInfoAdd", listDictionaryTrade);

			// 证件类型
			List listDictionaryCardType = objCommonJsonService.searchDictionaryCardType();
			model.addAttribute("listDictionaryCardTypeUsecompanyInfoAdd", listDictionaryCardType);
			// 坐标系
			List listDictionaryZuobiao = objCommonJsonService.searchDictionaryZuobiao();
			model.addAttribute("listDictionaryZuobiaoUsecompanyInfoAdd", listDictionaryZuobiao);

			return "company/dtmUsecompanyInfoAdd";// jsp页面
		} catch (Exception e) {
			e.printStackTrace();
			return "communitySessionError";
		}
	}

	/**
	 * 单位编辑 查询 初始化
	 * 
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("dtmUsecompanyInfoEditSearchIndex")
	public String dtmUsecompanyInfoEditSearchIndex(HttpSession session, HttpServletRequest request, Model model) {
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
			return "communitySessionError";
		}
		try {
			// 内保用户 区县权限 逗号隔开 区县唯一编码
			String strAreaID = session.getAttribute("AreaID").toString();
			// 内保用户 派出所权限 逗号隔开 区县唯一编码
			String strPoliceID = session.getAttribute("PoliceID").toString();
			model.addAttribute("strPoliceID", strPoliceID);
			// 区县
			List listDictionaryArea = objDtmUsecompanyInfoService.searchDictionaryArea(strAreaID);
			model.addAttribute("listDictionaryAreaUsecompanyInfoEditSearch", listDictionaryArea);

			return "company/dtmUsecompanyInfoEditSearch";// jsp页面
		} catch (Exception e) {
			e.printStackTrace();
			return "communitySessionError";
		}

	}

	/**
	 * 单位编辑 初始化
	 * 
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("dtmUsecompanyInfoEditIndex")
	public String dtmUsecompanyInfoEditIndex(HttpSession session, HttpServletRequest request, Model model,
			String duiId) {
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
			return "communitySessionError";
		}
		try {
			// 创建应用系统日志对象,并且已经填写好了一些通用参数
			DtmSvssystemLog objDtmSvssystemLog = objCommonJsonService.createNewDtmSvssystemLog(session, request);
			// 用户类型2.单位5.管理7.内保
			String strUserType = session.getAttribute("loginUserType").toString();
			model.addAttribute("strUserType", strUserType);
			// 内保用户 区县权限 逗号隔开 区县唯一编码
			String strAreaID = session.getAttribute("AreaID").toString();
			model.addAttribute("strAreaID", strAreaID);
			// 内保用户 派出所权限 逗号隔开 派出所唯一编码
			String strPoliceID = session.getAttribute("PoliceID").toString();
			model.addAttribute("strPoliceID", strPoliceID);

			// 行业
			String strTrade = "";
			if (session.getAttribute("dnu08") != null && session.getAttribute("dnu08").toString().equals("") == false) {
				strTrade = session.getAttribute("dnu08").toString();
			}

			// 用户类型2.单位5.管理7.内保
			if (strUserType.equals("2")) {
				strTrade = CommonJsonService.usecompanyTrade;
			}

			// 单位区域
			List listDtmUsecompanyCommunity = objCommonJsonService
					.searchDtmUsecompanyCommunity(duiId);
			if (listDtmUsecompanyCommunity != null && listDtmUsecompanyCommunity.size() > 0) {
				model.addAttribute("dcId", listDtmUsecompanyCommunity.get(0).getDuc07());
			} else {
				model.addAttribute("dcId", "");
			}

			// 单位信息
			UserDtmUsecompanyInfoSearch objUserDtmUsecompanyInfoSearch = objDtmUsecompanyInfoService
					.dtmUsecompanyInfoEditIndexService(objDtmSvssystemLog, duiId);
			if (objUserDtmUsecompanyInfoSearch != null) {
				model.addAttribute("objDtmUsecompanyInfoEdit", objUserDtmUsecompanyInfoSearch);
				// 注册路名
				DictionaryRoad objDictionaryRoad28 = null;
				if (objUserDtmUsecompanyInfoSearch.getDui28() != null
						&& objUserDtmUsecompanyInfoSearch.getDui28() != "") {
					// 注册路名
					objDictionaryRoad28 = objCommonJsonService
							.searchDictionaryRoadInfo(objUserDtmUsecompanyInfoSearch.getDui28());
				}
				model.addAttribute("objDtmUsecompanyInfoEditDui28", objDictionaryRoad28);
				// 注册街道
				List listDictionaryStreetDui27 = new ArrayList();
				if (objUserDtmUsecompanyInfoSearch.getDui26() != null) {
					listDictionaryStreetDui27 = objCommonJsonService
							.searchDictionaryStreet(objUserDtmUsecompanyInfoSearch.getDui26().toString());
				}
				model.addAttribute("listDtmUsecompanyInfoEditStreetZC", listDictionaryStreetDui27);
				// 办公路名
				DictionaryRoad objDictionaryRoadDui34 = null;
				if (objUserDtmUsecompanyInfoSearch.getDui34() != null
						&& objUserDtmUsecompanyInfoSearch.getDui34() != "") {
					// 办公路名
					objDictionaryRoadDui34 = objCommonJsonService
							.searchDictionaryRoadInfo(objUserDtmUsecompanyInfoSearch.getDui34());
				}
				model.addAttribute("objDtmUsecompanyInfoEditDui34", objDictionaryRoadDui34);
				// 办公街道
				List listDictionaryStreetDui33 = new ArrayList();
				if (objUserDtmUsecompanyInfoSearch.getDui32() != null) {
					listDictionaryStreetDui33 = objCommonJsonService
							.searchDictionaryStreet(objUserDtmUsecompanyInfoSearch.getDui32().toString());
				}
				model.addAttribute("listDtmUsecompanyInfoEditStreetBG", listDictionaryStreetDui33);
				// 派出所
				List listDictionaryPoliceStationDui36 = new ArrayList();
				if (objUserDtmUsecompanyInfoSearch.getDui32() != null
						&& objUserDtmUsecompanyInfoSearch.getDui36() != null) {
					// 内保用户
					if (strUserType.equals("7")) {
						listDictionaryPoliceStationDui36 = objCommonJsonService.searchDictionaryPoliceStationQx(
								strPoliceID, objUserDtmUsecompanyInfoSearch.getDui32().toString());
					} else {
						listDictionaryPoliceStationDui36 = objCommonJsonService
								.searchDictionaryPoliceStation(objUserDtmUsecompanyInfoSearch.getDui32().toString());
					}

				}
				model.addAttribute("listDtmUsecompanyInfoEditPoliceStation", listDictionaryPoliceStationDui36);
				// 使用单位行业Id
				String strTradeDut02 = objDtmUsecompanyInfoService.dtmUsecompanyInfoUsecompanyTradeSearch(duiId);
				model.addAttribute("strDtmUsecompanyInfoEditTradeDut02", strTradeDut02);

			} else {
				model.addAttribute("objDtmUsecompanyInfoEdit", null);
			}

			// 注册区县
			List listDictionaryAreaZC = new ArrayList();
			if (objUserDtmUsecompanyInfoSearch.getDui25() != null) {
				listDictionaryAreaZC = objCommonJsonService
						.searchDictionaryArea(objUserDtmUsecompanyInfoSearch.getDui25().toString());
			}
			model.addAttribute("listDtmUsecompanyInfoEditAreaZC", listDictionaryAreaZC);

			// 办公区县
			List listDictionaryAreaBG = new ArrayList();
			if (objUserDtmUsecompanyInfoSearch.getDui31() != null) {
				// 内保用户
				if (strUserType.equals("7")) {
					listDictionaryAreaBG = objCommonJsonService.searchDictionaryAreaQx(strAreaID,
							objUserDtmUsecompanyInfoSearch.getDui31().toString());
				} else {
					listDictionaryAreaBG = objCommonJsonService
							.searchDictionaryArea(objUserDtmUsecompanyInfoSearch.getDui31().toString());
				}
			}
			model.addAttribute("listDtmUsecompanyInfoEditAreaBG", listDictionaryAreaBG);

			// 省
			List listDictionaryProvince = objCommonJsonService.searchDictionaryProvince();
			model.addAttribute("listDtmUsecompanyInfoEditProvince", listDictionaryProvince);

			// 注册市
			List listDictionaryCityZC = new ArrayList();
			if (objUserDtmUsecompanyInfoSearch.getDui24() != null) {
				listDictionaryCityZC = objCommonJsonService
						.searchDictionaryCity(objUserDtmUsecompanyInfoSearch.getDui24().toString());
			}
			model.addAttribute("listDtmUsecompanyInfoEditCityZC", listDictionaryCityZC);

			// 办公市
			List listDictionaryCityBG = new ArrayList();
			if (objUserDtmUsecompanyInfoSearch.getDui30() != null) {
				listDictionaryCityBG = objCommonJsonService
						.searchDictionaryCity(objUserDtmUsecompanyInfoSearch.getDui30().toString());
			}
			model.addAttribute("listDtmUsecompanyInfoEditCityBG", listDictionaryCityBG);

			// 经济类型
			List listDictionaryEconomicType = objCommonJsonService
					.searchDictionaryEconomicType();
			model.addAttribute("listDictionaryEconomicTypeUsecompanyInfoEdit", listDictionaryEconomicType);
			// 单位规模
			List listDictionaryCompanyScale = objCommonJsonService
					.searchDictionaryCompanyScale();
			model.addAttribute("listDictionaryCompanyScaleUsecompanyInfoEdit", listDictionaryCompanyScale);

			// 行业
			List listDictionaryTrade = null;
			// 用户类型2.单位5.管理7.内保
			listDictionaryTrade = objCommonJsonService.searchDictionaryTrade(strTrade);

			model.addAttribute("listDictionaryTradeUsecompanyInfoEdit", listDictionaryTrade);
			// 证件类型
			List listDictionaryCardType = objCommonJsonService.searchDictionaryCardType();
			model.addAttribute("listDictionaryCardTypeUsecompanyInfoEdit", listDictionaryCardType);
			// 坐标系
			List listDictionaryZuobiao = objCommonJsonService.searchDictionaryZuobiao();
			model.addAttribute("listDictionaryZuobiaoUsecompanyInfoEdit", listDictionaryZuobiao);

			return "company/dtmUsecompanyInfoEdit";// jsp页面
		} catch (Exception e) {
			e.printStackTrace();
			return "communitySessionError";
		}
	}

	/**
	 * 单位 查询 初始化
	 * 
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("dtmUsecompanyInfoSearchIndex")
	public String dtmUsecompanyInfoSearchIndex(HttpSession session, HttpServletRequest request, Model model) {
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
			return "communitySessionError";
		}
		try {
			// 内保用户 区县权限 逗号隔开 区县唯一编码
			String strAreaID = session.getAttribute("AreaID").toString();
			// 内保用户 派出所权限 逗号隔开 区县唯一编码
			String strPoliceID = session.getAttribute("PoliceID").toString();
			model.addAttribute("strPoliceID", strPoliceID);
			// 区县
			List listDictionaryArea = objDtmUsecompanyInfoService.searchDictionaryArea(strAreaID);
			model.addAttribute("listDictionaryAreaUsecompanyInfoSearch", listDictionaryArea);

			return "company/dtmUsecompanyInfoSearch";// jsp页面
		} catch (Exception e) {
			e.printStackTrace();
			return "communitySessionError";
		}

	}

	/**
	 * 单位查询 单位信息 初始化
	 * 
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("dtmUsecompanyInfoIndex")
	public String dtmUsecompanyInfoIndex(HttpSession session, HttpServletRequest request, Model model, String duiId) {
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
			return "communitySessionError";
		}
		try {
			// 创建应用系统日志对象,并且已经填写好了一些通用参数
			DtmSvssystemLog objDtmSvssystemLog = objCommonJsonService.createNewDtmSvssystemLog(session, request);
			// 用户类型2.单位5.管理7.内保
			String strUserType = session.getAttribute("loginUserType").toString();
			model.addAttribute("strUserType", strUserType);
			// 内保用户 区县权限 逗号隔开 区县唯一编码
			String strAreaID = session.getAttribute("AreaID").toString();
			model.addAttribute("strAreaID", strAreaID);
			// 内保用户 派出所权限 逗号隔开 派出所唯一编码
			String strPoliceID = session.getAttribute("PoliceID").toString();
			model.addAttribute("strPoliceID", strPoliceID);

			// 行业
			String strTrade = session.getAttribute("dnu08").toString();
			// 单位区域
			List listDtmUsecompanyCommunity = objCommonJsonService
					.searchDtmUsecompanyCommunity(duiId);
			if (listDtmUsecompanyCommunity != null && listDtmUsecompanyCommunity.size() > 0) {
				model.addAttribute("dcId", listDtmUsecompanyCommunity.get(0).getDuc07());
			} else {
				model.addAttribute("dcId", "");
			}

			// 单位信息
			UserDtmUsecompanyInfoSearch objUserDtmUsecompanyInfoSearch = objDtmUsecompanyInfoService
					.dtmUsecompanyInfoIndexService(objDtmSvssystemLog, duiId);
			if (objUserDtmUsecompanyInfoSearch != null) {
				model.addAttribute("objDtmUsecompanyInfo", objUserDtmUsecompanyInfoSearch);
				// 注册路名
				DictionaryRoad objDictionaryRoad28 = null;
				if (objUserDtmUsecompanyInfoSearch.getDui28() != null
						&& objUserDtmUsecompanyInfoSearch.getDui28() != "") {
					// 注册路名
					objDictionaryRoad28 = objCommonJsonService
							.searchDictionaryRoadInfo(objUserDtmUsecompanyInfoSearch.getDui28());
				}
				model.addAttribute("objDtmUsecompanyInfoDui28", objDictionaryRoad28);
				// 注册街道
				List listDictionaryStreetDui27 = new ArrayList();
				if (objUserDtmUsecompanyInfoSearch.getDui26() != null) {
					listDictionaryStreetDui27 = objCommonJsonService
							.searchDictionaryStreet(objUserDtmUsecompanyInfoSearch.getDui26().toString());
				}
				model.addAttribute("listDtmUsecompanyInfoStreetZC", listDictionaryStreetDui27);
				// 办公路名
				DictionaryRoad objDictionaryRoadDui34 = null;
				if (objUserDtmUsecompanyInfoSearch.getDui34() != null
						&& objUserDtmUsecompanyInfoSearch.getDui34() != "") {
					// 办公路名
					objDictionaryRoadDui34 = objCommonJsonService
							.searchDictionaryRoadInfo(objUserDtmUsecompanyInfoSearch.getDui34());
				}
				model.addAttribute("objDtmUsecompanyInfoDui34", objDictionaryRoadDui34);
				// 办公街道
				List listDictionaryStreetDui33 = new ArrayList();
				if (objUserDtmUsecompanyInfoSearch.getDui32() != null) {
					listDictionaryStreetDui33 = objCommonJsonService
							.searchDictionaryStreet(objUserDtmUsecompanyInfoSearch.getDui32().toString());
				}
				model.addAttribute("listDtmUsecompanyInfoStreetBG", listDictionaryStreetDui33);
				// 派出所
				List listDictionaryPoliceStationDui36 = new ArrayList();
				if (objUserDtmUsecompanyInfoSearch.getDui32() != null
						&& objUserDtmUsecompanyInfoSearch.getDui36() != null) {
					// 内保用户
					if (strUserType.equals("7")) {
						listDictionaryPoliceStationDui36 = objCommonJsonService.searchDictionaryPoliceStationQx(
								strPoliceID, objUserDtmUsecompanyInfoSearch.getDui32().toString());
					} else {
						listDictionaryPoliceStationDui36 = objCommonJsonService
								.searchDictionaryPoliceStation(objUserDtmUsecompanyInfoSearch.getDui32().toString());
					}

				}
				model.addAttribute("listDtmUsecompanyInfoPoliceStation", listDictionaryPoliceStationDui36);
				// 使用单位行业Id
				String strTradeDut02 = objDtmUsecompanyInfoService.dtmUsecompanyInfoUsecompanyTradeSearch(duiId);
				model.addAttribute("strDtmUsecompanyInfoTradeDut02", strTradeDut02);

			} else {
				model.addAttribute("objDtmUsecompanyInfo", null);
			}

			// 注册区县
			List listDictionaryAreaZC = new ArrayList();
			if (objUserDtmUsecompanyInfoSearch.getDui25() != null) {
				listDictionaryAreaZC = objCommonJsonService
						.searchDictionaryArea(objUserDtmUsecompanyInfoSearch.getDui25().toString());
			}
			model.addAttribute("listDtmUsecompanyInfoAreaZC", listDictionaryAreaZC);

			// 办公区县
			List listDictionaryAreaBG = new ArrayList();
			if (objUserDtmUsecompanyInfoSearch.getDui31() != null) {
				// 内保用户
				if (strUserType.equals("7")) {
					listDictionaryAreaBG = objCommonJsonService.searchDictionaryAreaQx(strAreaID,
							objUserDtmUsecompanyInfoSearch.getDui31().toString());
				} else {
					listDictionaryAreaBG = objCommonJsonService
							.searchDictionaryArea(objUserDtmUsecompanyInfoSearch.getDui31().toString());
				}
			}
			model.addAttribute("listDtmUsecompanyInfoAreaBG", listDictionaryAreaBG);

			// 省
			List listDictionaryProvince = objCommonJsonService.searchDictionaryProvince();
			model.addAttribute("listDtmUsecompanyInfoProvince", listDictionaryProvince);

			// 注册市
			List listDictionaryCityZC = new ArrayList();
			if (objUserDtmUsecompanyInfoSearch.getDui24() != null) {
				listDictionaryCityZC = objCommonJsonService
						.searchDictionaryCity(objUserDtmUsecompanyInfoSearch.getDui24().toString());
			}
			model.addAttribute("listDtmUsecompanyInfoCityZC", listDictionaryCityZC);

			// 办公市
			List listDictionaryCityBG = new ArrayList();
			if (objUserDtmUsecompanyInfoSearch.getDui30() != null) {
				listDictionaryCityBG = objCommonJsonService
						.searchDictionaryCity(objUserDtmUsecompanyInfoSearch.getDui30().toString());
			}
			model.addAttribute("listDtmUsecompanyInfoCityBG", listDictionaryCityBG);

			// 经济类型
			List listDictionaryEconomicType = objCommonJsonService
					.searchDictionaryEconomicType();
			model.addAttribute("listDictionaryEconomicTypeUsecompanyInfo", listDictionaryEconomicType);
			// 单位规模
			List listDictionaryCompanyScale = objCommonJsonService
					.searchDictionaryCompanyScale();
			model.addAttribute("listDictionaryCompanyScaleUsecompanyInfo", listDictionaryCompanyScale);

			// 行业
			List listDictionaryTrade = null;
			// 用户类型2.单位5.管理7.内保
			if (strUserType.equals("2")) {
				listDictionaryTrade = objCommonJsonService.searchDictionaryTrade(CommonJsonService.usecompanyTrade);
			} else {
				listDictionaryTrade = objCommonJsonService.searchDictionaryTrade(strTrade);
			}

			model.addAttribute("listDictionaryTradeUsecompanyInfo", listDictionaryTrade);
			// 证件类型
			List listDictionaryCardType = objCommonJsonService.searchDictionaryCardType();
			model.addAttribute("listDictionaryCardTypeUsecompanyInfo", listDictionaryCardType);
			// 坐标系
			List listDictionaryZuobiao = objCommonJsonService.searchDictionaryZuobiao();
			model.addAttribute("listDictionaryZuobiaoUsecompanyInfo", listDictionaryZuobiao);

			return "company/dtmUsecompanyInfo";// jsp页面
		} catch (Exception e) {
			e.printStackTrace();
			return "communitySessionError";
		}
	}

	/**
	 * 设备编码 单位信息 初始化
	 * 
	 * @return
	 */
	@RequestMapping("dtmUsecompanyInfoByDeviceCodingAction")
	public String dtmUsecompanyInfoByDeviceCodingAction(HttpSession session, HttpServletRequest request, Model model,
			String ase20) {
		// 判断Session是否失效
		if (!objCommonJsonService.SystemBool(session)) {
			request.setAttribute("strErrorMsg", "Session失效,请重新登录!");
			return "communitySessionError";
		}
		try {

			// 行业ID
			String strDnu08 = session.getAttribute("dnu08").toString();

			// 根据单位id查到行业id
			String strTradeDtId = objDtmUsecompanyInfoService.dtmUsecompanyInfoUsecompanyTradeSearch(ase20);
			model.addAttribute("strDtmUsecompanyInfoByDeviceTradeDtId", strTradeDtId);
			// 单位id
			request.setAttribute("ase20", ase20);

			if (objDtmUsecompanyInfoService.dtmUsecompanyInfoDeviceIndex(strDnu08, model).equals("1")) {
				return "device/dtmUsecompanyInfoByDeviceCoding";// 跳转jsp
			}
			return "communitySessionError";// jsp页面

		} catch (Exception e) {
			e.printStackTrace();
			return "communitySessionError";// jsp页面
		}
	}

}

其他

package svs.service;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import svs.dao.IInsertOperDao;
import svs.dto.DictionaryZuobiao;
import svs.dto.DtmFacesnapshotHeart;
import svs.dto.DtmSvssystemLog;
import svs.dao.ISearchDao;
import svs.dao.IUpDeOperDao;
import svs.dao.IUserSearchDao;
import svs.dto.userDto.UserDtmFacesnapshotHeart;

@Service("objCommonService")
public class CommonService {
	@Resource
	private ISearchDao objSearchDao;

	@Resource
	private IInsertOperDao objInsertOperDao;
	@Resource
	private IUserSearchDao objIUserSearchDao;

	@Resource
	private IUpDeOperDao objUpDeOperDao;

	/**
	 * 记录日志
	 */
	public Boolean feverSvsSystemLog(DtmSvssystemLog objDtmSvssystemLog) {
		try {
			int intResult = 0;
			// 应用系统的ID号
			if (objDtmSvssystemLog.getDsl01() == null) {
				objDtmSvssystemLog.setDsl01("''");
			}
			// 应用系统的中文名称
			if (objDtmSvssystemLog.getDsl02() == null) {
				objDtmSvssystemLog.setDsl02("''");
			}
			// 日志的ID号
			if (objDtmSvssystemLog.getDsl03() == null) {
				objDtmSvssystemLog.setDsl03("''");
			}
			// 操作人在应用中的ID号
			if (objDtmSvssystemLog.getDsl04() == null) {
				objDtmSvssystemLog.setDsl04("''");
			}
			// 操作人居民身份证号
			if (objDtmSvssystemLog.getDsl05() == null) {
				objDtmSvssystemLog.setDsl05("''");
			}
			// 0.管理员 1.普通用户
			if (objDtmSvssystemLog.getDsl06() == null) {
				objDtmSvssystemLog.setDsl06(-1);
			}
			// 操作人的真实姓名
			if (objDtmSvssystemLog.getDsl07() == null) {
				objDtmSvssystemLog.setDsl07("''");
			}
			// 操作人的所在单位名称
			if (objDtmSvssystemLog.getDsl08() == null) {
				objDtmSvssystemLog.setDsl08("''");
			}
			// 操作人所属单位的公安机关机构代码
			if (objDtmSvssystemLog.getDsl09() == null) {
				objDtmSvssystemLog.setDsl09("''");
			}
			// 操作人操作时的系统时间
			if (objDtmSvssystemLog.getDsl10() == null) {
				objDtmSvssystemLog.setDsl10("''");
			}

			// 记录应用系统日志-OpTime 操作人操作时的系统时间 dsl11
			SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmssSSSS");
			String ResTime = df.format(new Date());
			objDtmSvssystemLog.setDsl11(ResTime);

			// 0.非移动终端 1.移动终端
			if (objDtmSvssystemLog.getDsl12() == null) {
				objDtmSvssystemLog.setDsl12("''");
			}
			// 用户操作时所使用的信息处理终端的标识
			if (objDtmSvssystemLog.getDsl13() == null) {
				objDtmSvssystemLog.setDsl13("''");
			}
			// 移动终端APP接入的,记录其终端手机号码
			if (objDtmSvssystemLog.getDsl14() == null) {
				objDtmSvssystemLog.setDsl14("''");
			}
			// 通过移动终端APP接入的,记录其终端MAC地址
			if (objDtmSvssystemLog.getDsl15() == null) {
				objDtmSvssystemLog.setDsl15("''");
			}
			// 操作行为类型0.登录1.查询2.新增3.修改4.删除5.退出
			if (objDtmSvssystemLog.getDsl16() == null) {
				objDtmSvssystemLog.setDsl16(-1);
			}
			// 操作类型为1-查询 3-修改 4-删除类型时,记录用户进行操作时的数据筛选条件,填写数据操作SQL语句where子句内容
			if (objDtmSvssystemLog.getDsl17() == null) {
				objDtmSvssystemLog.setDsl17("''");
			}
			// 操作人的操作结果0.失败1.成功
			if (objDtmSvssystemLog.getDsl18() == null) {
				objDtmSvssystemLog.setDsl18(-1);
			}
			// 当操作结果失败时,可记录操作失败的原因代码
			if (objDtmSvssystemLog.getDsl19() == null) {
				objDtmSvssystemLog.setDsl19("''");
			}
			// 客户端的IP地址
			if (objDtmSvssystemLog.getDsl20() == null) {
				objDtmSvssystemLog.setDsl20("''");
			}
			// 客户端访问时的源端口
			if (objDtmSvssystemLog.getDsl21() == null) {
				objDtmSvssystemLog.setDsl21("''");
			}
			// 操作目标的URL
			if (objDtmSvssystemLog.getDsl22() == null) {
				objDtmSvssystemLog.setDsl22("''");
			}
			// 当请求为HTTP GET时填写URL后面的queryString内容,为post时,填写body内容
			if (objDtmSvssystemLog.getDsl23() == null) {
				objDtmSvssystemLog.setDsl23("''");
			}
			// 用于标识应用系统产生的一次会话
			if (objDtmSvssystemLog.getDsl24() == null) {
				objDtmSvssystemLog.setDsl24("''");
			}
			// 操作人所操作的应用内的具体功能模块名称
			if (objDtmSvssystemLog.getDsl25() == null) {
				objDtmSvssystemLog.setDsl25("''");
			}
			// 操作目标的IP地址
			if (objDtmSvssystemLog.getDsl26() == null) {
				objDtmSvssystemLog.setDsl26("''");
			}
			// 操作目标提供访问或服务的端口
			if (objDtmSvssystemLog.getDsl27() == null) {
				objDtmSvssystemLog.setDsl27("''");
			}
			// 当操作执行为SQL语句时,填写SQL语句
			if (objDtmSvssystemLog.getDsl28() == null) {
				objDtmSvssystemLog.setDsl28("''");
			}
			// 记录操作用户类型
			if (objDtmSvssystemLog.getDsl29() == null) {
				objDtmSvssystemLog.setDsl29(0);
			}
			intResult = objInsertOperDao.insertDtmSvssystemLog(objDtmSvssystemLog);
			if (intResult > 0) {
				return true;
			} else {
				return false;
			}
		} catch (Exception e) {
			return false;
		}
	}

	/**
	 * 人脸抓拍 心跳信息详情
	 * 
	 * @param objDtmSvssystemLog
	 * @param ase_id
	 * @return
	 */
	public List searchdtmDevicefacesnapshotHeartFindIndex(DtmSvssystemLog objDtmSvssystemLog,
			String ase_id) {
		try {
			String strSql = SqlConstant.sqlDtmFacesnapshotHeart + " and ase_id='" + ase_id + "'";

			// 记录应用系统日志-OpType 操作行为类型0.登录1.查询 2.新增3.修改4.删除5.退出
			objDtmSvssystemLog.setDsl16(1);
			// 记录应用系统日志-OperateCondition 操作类型为1-查询 3-修改
			// 4-删除类型时,记录用户进行操作时的数据筛选条件,填写数据操作SQL语句where子句内容
			objDtmSvssystemLog.setDsl17(strSql.substring(strSql.indexOf("where") + 5).replace("'", "''"));
			// 记录应用系统日志-FuncModuleName 操作人所操作的应用内的具体功能模块名称
			objDtmSvssystemLog.setDsl25("人脸抓拍心跳详情");
			// 记录应用系统日志-Query Sql 当操作执行为SQL语句时,填写SQL语句
			objDtmSvssystemLog.setDsl28(strSql.toString().replace("'", "''"));

			// 记录应用系统日志-OperateResult 操作人的操作结果0.失败1.成功
			objDtmSvssystemLog.setDsl18(1);
			feverSvsSystemLog(objDtmSvssystemLog);

			return objSearchDao.selectDtmFacesnapshotHeart(strSql);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();

			return null;
		}

	}
	
	

	
	
}
package svs.service;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Service;

import com.aliyun.oss.OSSClient;
import com.aliyun.oss.model.ObjectMetadata;

import svs.dao.IInsertOperDao;
import svs.dao.ISearchDao;
import svs.dao.IUpDeOperDao;
import svs.dao.IUserSearchDao;
import svs.dto.DictionaryArea;
import svs.dto.DictionaryCardType;
import svs.dto.DictionaryCity;
import svs.dto.DictionaryCompanyScale;
import svs.dto.DictionaryCulturalLevel;
import svs.dto.DictionaryEconomicType;
import svs.dto.DictionaryEntranceType;
import svs.dto.DictionaryEquipmentType;
import svs.dto.DictionaryFacesnapshotEventtype;
import svs.dto.DictionaryInformationLevel;
import svs.dto.DictionaryInformationSource;
import svs.dto.DictionaryMarriageSituation;
import svs.dto.DictionaryNation;
import svs.dto.DictionaryNationpeople;
import svs.dto.DictionaryPersonFeature;
import svs.dto.DictionaryPersonType;
import svs.dto.DictionaryPoliceStation;
import svs.dto.DictionaryPowerType;
import svs.dto.DictionaryProvince;
import svs.dto.DictionaryRoad;
import svs.dto.DictionaryStreet;
import svs.dto.DictionarySystemType;
import svs.dto.DictionaryTrade;
import svs.dto.DictionaryZuobiao;
import svs.dto.DtmCommunity;
import svs.dto.DtmLog;
import svs.dto.DtmNeibaoUser;
import svs.dto.DtmNeibaouserAuthoritymenu;
import svs.dto.DtmSvssystemLog;
import svs.dto.DtmSystemMenu;
import svs.dto.DtmUsecompanyCommunity;
import svs.dto.DtmUsecompanyTrade;
import svs.dto.userDto.UserDtmFacesnapshotEvent;
import svs.dto.userDto.UserCommonDto;
import svs.dto.userDto.UserDtmNeibaouserPolice;
import svs.dto.userDto.UserDtmPersonInfo;
import svs.dto.userDto.UserDtmUsecompanyInfoSearch;

@Service("objCommonJsonService")
public class CommonJsonService {
	@Resource
	private ISearchDao objSearchDao;
	
	@Resource
	private IUserSearchDao objUserSearchDao;
	
	@Resource
	private IInsertOperDao objInsertOperDao;
	
	@Resource
	private IUpDeOperDao objUpDeOperDao;
	
	@Resource
	private IUserSearchDao objIUserSearchDao;
	
	@Resource
	private CommonJsonService objCommonJsonService;
	
	//内保 系统权限
	public static String neiBaoSystemAuthority = "7001";
	public static final int PAGE_COUNT = 15;
	//单位用户行业权限
	public static String usecompanyTrade = "15,28";
	
	//图片上传 
	public static String saveCommonPath ="/var/www/SvsSystem/";
	//OSS存储路径
	public static String serverCommonPath ="svstwo/";

	//人脸抓拍 医院,药房 可用事件类型
	public static String facesnapshotEvevttype = "100,909,910,911,912,913,914,915,916,917,918,919,920";


	//域名
	private final static String OSS_END_POINT = "oss-cn-shanghai.aliyuncs.com";
	//账号
	private final static String OSS_ACCESS_KEY_ID = "LTAI4FvfKda3uVn5YrWFTxdR";
	//密匙
	private final static String OSS_ACCESS_KEY_SECRET = "nYUDglJXqsE9Gw4QORhqy3Igdy6Nx6";
	//存储空间
	private final static String OSS_BUCKET_NAME = "aljtest";
	//URL有效期
    private final static Date OSS_URL_EXPIRATION = new Date(new Date().getTime() + 3600l * 1000 * 24 * 365 * 10);
	  
    /**
	 * 根据单位主键ID,获取行业主键ID,以“,”间隔
	 * @param strDuiId  单位ID
	 * @return
	 */
	public String searchTradeString(String strDuiId) {
		
		try {
			String strSql="select array_to_string(array(select dut02 from dtm_usecompany_trade where dut04=dui_id), ',') AS commonvalue from dtm_usecompany_info where 1=1 and dui_id='"+strDuiId+"'";
			List listUserCommonDto = objUserSearchDao.selectUserCommonDto(strSql);
			if(listUserCommonDto!=null && listUserCommonDto.size()>0) {
				return listUserCommonDto.get(0).getCommonvalue();
			}
			return null;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 * 省份信息
	 * @return
	 */
	public List searchDictionaryProvince() {
		
		try {
			String strSql=SqlConstant.sqlDictionaryProvince + " order by dp03";
			List listDictionaryProvince = objSearchDao.selectDictionaryProvince(strSql);
			return listDictionaryProvince;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 * 市区信息
	 * @return
	 */
	public List searchDictionaryCity(String dc02) {
		try {
			String strSql=SqlConstant.sqlDictionaryCity + " and dc02 ='"+dc02+"' order by dc03";
			List listDictionaryCity = objSearchDao.selectDictionaryCity(strSql);
			return listDictionaryCity;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 * 区县信息
	 * @return
	 */
	public List searchDictionaryArea(String da06) {
		try {
			String strSql=SqlConstant.sqlDictionaryArea + " and da06 in ("+da06+") order by da03";
			List listDictionaryArea = objSearchDao.selectDictionaryArea(strSql);
			return listDictionaryArea;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 * 区县信息
	 * @return
	 */
	public List searchDictionaryAreaQx(String da02,String da06) {
		try {
			String strSql=SqlConstant.sqlDictionaryArea ;
			if(da02 != null && da02.equals("") == false) {
				strSql = strSql + " and da02 in("+da02+") ";
			}
			if(da06 != null && da06.equals("") == false) {
				strSql = strSql + "  and da06 in ("+da06+") ";
			}
			strSql = strSql + "  order by da03";
			List listDictionaryCity = objSearchDao.selectDictionaryArea(strSql);
			return listDictionaryCity;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 *街道信息
	 * @return
	 */
	public List searchDictionaryStreet(String ds01) {
		try {
			String strSql=SqlConstant.sqlDictionaryStreet + " and ds01 ='"+ds01+"' order by ds04";
			List listDictionaryStreet = objSearchDao.selectDictionaryStreet(strSql);
			return listDictionaryStreet;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	
	/**
	 *派出所信息
	 * @return
	 */
	public List searchDictionaryPoliceStation(String dps05) {
		try {
			String strSql=SqlConstant.sqlDictionaryPoliceStation + " and dps05 in ("+dps05+") and dps13=1 and dps17=1 order by dps02";
			List listDictionaryPoliceStation = objSearchDao.selectDictionaryPoliceStation(strSql);
			return listDictionaryPoliceStation;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	} 

	
	
	/**
	 *派出所信息
	 * @return
	 */
	public List searchDictionaryPoliceStationQx(String dps01 ,String dps05) {
		try {
			String strSql=SqlConstant.sqlDictionaryPoliceStation + " and dps13=1 and dps17=1 ";
			if(dps01 != null && dps01.equals("") == false) {
				strSql = strSql + " and dps01 in("+dps01+") ";
			}
			if(dps05 != null && dps05.equals("") == false) {
				strSql = strSql + "  and dps05 ='"+dps05+"' ";
			}
			strSql = strSql + " order by dps02";
			List listDictionaryPoliceStation = objSearchDao.selectDictionaryPoliceStation(strSql);
			return listDictionaryPoliceStation;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 * 通用 人员 编辑 查询 页面 初始化
	 * @param dpiId 人员id
	 * @return
	 */
	public UserDtmPersonInfo searchUserDtmPersonInfo(DtmSvssystemLog objDtmSvssystemLog,String dfe03,String dfe04) {
		try {
			
			String strSql = SqlConstant.sqlUserDtmPersonInfo + " and dpi01='"+dfe03+"' and dpi02='"+dfe04+"' ";
			// 获取人员信息
			List listDtmPersonInfo = objUserSearchDao.selectUserDtmPersonInfo(strSql);
			if (listDtmPersonInfo != null && listDtmPersonInfo.size() > 0) {
				
				//记录应用系统日志-OpType 操作行为类型0.登录1.查询	2.新增3.修改4.删除5.退出
				objDtmSvssystemLog.setDsl16(1);
				//记录应用系统日志-OperateCondition 操作类型为1-查询 3-修改 4-删除类型时,记录用户进行操作时的数据筛选条件,填写数据操作SQL语句where子句内容
				objDtmSvssystemLog.setDsl17(strSql.substring(strSql.indexOf("where")+5).replace("'", "''"));
				//记录应用系统日志-FuncModuleName 操作人所操作的应用内的具体功能模块名称
				objDtmSvssystemLog.setDsl25("人员查询详情");
				//记录应用系统日志-Query Sql 当操作执行为SQL语句时,填写SQL语句
				objDtmSvssystemLog.setDsl28(strSql.toString().replace("'", "''"));
				
				//记录应用系统日志-OperateResult 操作人的操作结果0.失败1.成功			
		        objDtmSvssystemLog.setDsl18(1);
		        objCommonJsonService.feverSvsSystemLog(objDtmSvssystemLog);
				return listDtmPersonInfo.get(0);
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	
	/**
	 *单位性质信息
	 * @return
	 */
	public List searchDictionaryEconomicType() {
		try {
			String strSql=SqlConstant.sqlDictionaryEconomicType + " order by det02";
			List listDictionaryEconomicType = objSearchDao.selectDictionaryEconomicType(strSql);
			return listDictionaryEconomicType;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 *单位规模信息
	 * @return
	 */
	public List searchDictionaryCompanyScale() {
		try {
			String strSql=SqlConstant.sqlDictionaryCompanyScale + " order by dcs02";
			List listDictionaryCompanyScale = objSearchDao.selectDictionaryCompanyScale(strSql);
			return listDictionaryCompanyScale;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 *行业信息
	 *@param dtId	行业id
	 * @return
	 */
	public List searchDictionaryTrade(String dtId) {
		try {
			String strSql=SqlConstant.sqlDictionaryTrade ;
			if(dtId != null && dtId.equals("") == false) {
				strSql = strSql + " and dt_id in("+dtId+") " ;
			}
			strSql = strSql + " order by dt02" ;
			List listDictionaryTrade = objSearchDao.selectDictionaryTrade(strSql);
			return listDictionaryTrade;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 *单位行业关系信息
	 *@param dtId	单位id
	 * @return
	 */
	public List searchDtmUsecompanyTrade(String dut04) {
		try {
			String strSql=SqlConstant.sqlDtmUsecompanyTrade + " and dut04 in("+dut04+")" ;
			List listDtmUsecompanyTrade = objSearchDao.selectDtmUsecompanyTrade(strSql);
			return listDtmUsecompanyTrade;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	/**
	 *证件类型信息
	 * @return
	 */
	public List searchDictionaryCardType() {
		try {
			String strSql=SqlConstant.sqlDictionaryCardType +" and dct04=1 order by dct02";
			List listDictionaryCardType = objSearchDao.selectDictionaryCardType(strSql);
			return listDictionaryCardType;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 *坐标系信息
	 * @return
	 */
	public List searchDictionaryZuobiao() {
		try {
			String strSql=SqlConstant.sqlDictionaryZuobiao +"  order by dz02";
			List listDictionaryZuobiao = objSearchDao.selectDictionaryZuobiao(strSql);
			return listDictionaryZuobiao;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
	
	/**
	 * 道路信息查询
	 * 
	 * @param dr01  道路唯一编码
	 * @param intPageNum 页数
	 * @param intCpage 当前页
	 * @return
	 */
	public DictionaryRoad searchDictionaryRoadInfo(String dr01) {
		try {
			
			String strSql =SqlConstant.sqlDictionaryRoad +" and dr01='" + dr01 + "'  ";
			List listDictionaryRoad = objSearchDao.selectDictionaryRoad(strSql);
			if(listDictionaryRoad != null && listDictionaryRoad.size() > 0) {
				return listDictionaryRoad.get(0);
			}else {
				return null;
			}
			
		} catch (Exception e) {
			// TODO: handle exception
			return null;
		}
	}
	
	/**
	 * 单位区域关系表  
	 * 
	 * @return
	 */
	public List searchDtmUsecompanyCommunity(String duc10) {
		try {
			//单位是否绑定区域
			String strSql = SqlConstant.sqlDtmUsecompanyCommunity + " and duc06=1 and duc10="+duc10 ;
			List listDtmUsecompanyCommunity = objSearchDao.selectDtmUsecompanyCommunity(strSql);
			if(listDtmUsecompanyCommunity != null && listDtmUsecompanyCommunity.size() > 0) {
				return listDtmUsecompanyCommunity;
			}else {
				return null;
			}
		} catch (Exception e) {
			return null;
		}
	}
	
	
	/**
	 * 道路查询List	
	 * 
	 * @param dr03  道路名称
	 * @param intPageNum 页数
	 * @param intCpage 当前页
	 * @return
	 */
	public List searchDictionaryRoad(String dr03, int intPageNum, int intCpage) {
		try {
			
			String strSql =SqlConstant.sqlDictionaryRoad;
			if (dr03 != null && "".equals(dr03) == false) {
				strSql = strSql + " and dr03 like '%" + dr03 + "%'  ";
			}
			strSql = strSql +" order by dr02 desc limit "+intPageNum+" offset "+(intCpage - 1) * intPageNum;
			return objSearchDao.selectDictionaryRoad(strSql);
		} catch (Exception e) {
			// TODO: handle exception
			return null;
		}
	}
	
	/**
	 * 道路查询List数量
	 * 
	 * @param dr03 道路名称
	 * @param totalNum
	 * @return
	 */
	public int searchDictionaryRoadCount(String dr03, String totalNum) {
		try {
			int intTotalNum = Integer.valueOf(totalNum);
			if (intTotalNum > 0) {
				return intTotalNum;
			} else {
				String strSql = " select count(1) from dictionary_road where 1=1 ";
				if (dr03 != null && "".equals(dr03) == false) {
					strSql = strSql +" and dr03 like '%" + dr03 + "%'  ";
				}
				return objSearchDao.selectCountList(strSql);
			}

		} catch (Exception e) {
			// TODO: handle exception
			return -1;
		}
	}
	
	/**
	 * 查询出入口类型
	 * @return
	 */
	public List searchDictionaryEntranceType() {
		try {
			String strSql = SqlConstant.sqlDictionaryEntranceType + " order by det02";
			// 获取实有装备分类信息
			List listDictionaryEntranceType = objSearchDao.selectDictionaryEntranceType(strSql);
			if (listDictionaryEntranceType != null && listDictionaryEntranceType.size() > 0) {
				return listDictionaryEntranceType;
			}
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	/**
	 * 查询实有装备分类信息
	 * @return
	 */
	public List searchDtmDictionaryEquipmentType() {
		try {
			String strSql = SqlConstant.sqlDictionaryEquipmentType + " order by det02";
			// 获取实有装备分类信息
			List listDictionaryEquipmentType = objSearchDao.selectDictionaryEquipmentType(strSql);
			if (listDictionaryEquipmentType != null && listDictionaryEquipmentType.size() > 0) {
				return listDictionaryEquipmentType;
			}
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	/**
	 * 信息等级
	 * @return
	 */
	public List searchDictionaryInformationLevel() {
		try {
			String strSql = SqlConstant.sqlDictionaryInformationLevel + " order by dil02";
			// 获取信息等级
			List listDictionaryInformationLevel = objSearchDao.selectDictionaryInformationLevel(strSql);
			if (listDictionaryInformationLevel != null && listDictionaryInformationLevel.size() > 0) {
				return listDictionaryInformationLevel;
			}
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	
	
	/**
	 * 查实有力量分类信息
	 * @return
	 */
	public List searchDictionaryPowerType() {
		try {
			String strSql = SqlConstant.sqlDictionaryPowerType + " order by dpt02";
			// 获取实有力量分类
			List listDictionaryPowerType = objSearchDao.selectDictionaryPowerType(strSql);
			if (listDictionaryPowerType != null && listDictionaryPowerType.size() > 0) {
				return listDictionaryPowerType;
			}
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	/**
	 * 查实系统类型分类信息
	 * @return
	 */
	public List searchDictionarySystemType() {
		try {
			String strSql = SqlConstant.sqlDictionarySystemType + " order by dst03";
			// 获取系统类型分类
			List listDictionarySystemType = objSearchDao.selectDictionarySystemType(strSql);
			if (listDictionarySystemType != null && listDictionarySystemType.size() > 0) {
				return listDictionarySystemType;
			}
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	
	
	/**
	 * 系统日志
	 * 
	 * @param strDl02 操作人员ID
	 * @param strDl03 操作备注
	 * @param strDl04 操作人员姓名
	 * @param strDl05 系统类型
	 * @param strDl10 操作IP
	 * @return
	 */
	public boolean SystemLog(String strDl02,String strDl03,String strDl04,String strDl05,String strDl10){
		try {
			int intResult = 0;
			DtmLog objDtmLog = new DtmLog();
			objDtmLog.setDl02(Integer.valueOf(strDl02));
			objDtmLog.setDl03(strDl03);
			objDtmLog.setDl04(strDl04);
			objDtmLog.setDl05(Integer.valueOf(strDl05));
			objDtmLog.setDl10(strDl10);
			intResult = objInsertOperDao.insertDtmLog(objDtmLog);
			if(intResult >0){
				return true;
			}else{
				return false;
			}
		} catch (Exception e) {
			// TODO: handle exception
			return false;
		}
	}

	/**
	 * 记录日志
	 */
	public Boolean feverSvsSystemLog(DtmSvssystemLog objDtmSvssystemLog) {
		try {
			int intResult = 0;
			//应用系统的ID号
			if(objDtmSvssystemLog.getDsl01() == null) {
				objDtmSvssystemLog.setDsl01("''");
			}
			//应用系统的中文名称
			if(objDtmSvssystemLog.getDsl02() == null) {
				objDtmSvssystemLog.setDsl02("''");
			}
			//日志的ID号
			if(objDtmSvssystemLog.getDsl03() == null) {
				objDtmSvssystemLog.setDsl03("''");
			}
			//操作人在应用中的ID号
			if(objDtmSvssystemLog.getDsl04() == null) {
				objDtmSvssystemLog.setDsl04("''");
			}
			//操作人居民身份证号
			if(objDtmSvssystemLog.getDsl05() == null) {
				objDtmSvssystemLog.setDsl05("''"); 
			}
			//0.管理员 1.普通用户
			if(objDtmSvssystemLog.getDsl06() == null) {
				objDtmSvssystemLog.setDsl06(-1); 
			}
			//操作人的真实姓名
			if(objDtmSvssystemLog.getDsl07() == null) {
				objDtmSvssystemLog.setDsl07("''"); 
			}
			//操作人的所在单位名称
			if(objDtmSvssystemLog.getDsl08() == null) {
				objDtmSvssystemLog.setDsl08("''"); 
			}
			//操作人所属单位的公安机关机构代码
			if(objDtmSvssystemLog.getDsl09() == null) {
				objDtmSvssystemLog.setDsl09("''"); 
			}
			//操作人操作时的系统时间
			if(objDtmSvssystemLog.getDsl10() == null) {
				objDtmSvssystemLog.setDsl10("''"); 
			}
			
			//记录应用系统日志-OpTime 操作人操作时的系统时间 dsl11
			SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmssSSSS");
	        String ResTime = df.format(new Date());
	        objDtmSvssystemLog.setDsl11(ResTime); 
			
			//0.非移动终端 1.移动终端
			if(objDtmSvssystemLog.getDsl12() == null) {
				objDtmSvssystemLog.setDsl12("''"); 
			}
			//用户操作时所使用的信息处理终端的标识
			if(objDtmSvssystemLog.getDsl13() == null) {
				objDtmSvssystemLog.setDsl13("''"); 
			}
			//移动终端APP接入的,记录其终端手机号码
			if(objDtmSvssystemLog.getDsl14() == null) {
				objDtmSvssystemLog.setDsl14("''");  
			}
			//通过移动终端APP接入的,记录其终端MAC地址
			if(objDtmSvssystemLog.getDsl15() == null) {
				objDtmSvssystemLog.setDsl15("''");  
			}
			//操作行为类型0.登录1.查询2.新增3.修改4.删除5.退出
			if(objDtmSvssystemLog.getDsl16() == null) {
				objDtmSvssystemLog.setDsl16(-1);  
			}
			//操作类型为1-查询 3-修改 4-删除类型时,记录用户进行操作时的数据筛选条件,填写数据操作SQL语句where子句内容
			if(objDtmSvssystemLog.getDsl17() == null) {
				objDtmSvssystemLog.setDsl17("''"); 
			}
			//操作人的操作结果0.失败1.成功
			if(objDtmSvssystemLog.getDsl18() == null) {
				objDtmSvssystemLog.setDsl18(-1);  
			}
			//当操作结果失败时,可记录操作失败的原因代码
			if(objDtmSvssystemLog.getDsl19() == null) {
				objDtmSvssystemLog.setDsl19("''"); 
			}
			//客户端的IP地址
			if(objDtmSvssystemLog.getDsl20() == null) {
				objDtmSvssystemLog.setDsl20("''"); 
			}
			//客户端访问时的源端口
			if(objDtmSvssystemLog.getDsl21() == null) {
				objDtmSvssystemLog.setDsl21("''");
			}
			//操作目标的URL
			if(objDtmSvssystemLog.getDsl22() == null) {
				objDtmSvssystemLog.setDsl22("''");
			}
			//当请求为HTTP GET时填写URL后面的queryString内容,为post时,填写body内容
			if(objDtmSvssystemLog.getDsl23() == null) {
				objDtmSvssystemLog.setDsl23("''");
			}
			//用于标识应用系统产生的一次会话
			if(objDtmSvssystemLog.getDsl24() == null) {
				objDtmSvssystemLog.setDsl24("''");
			}
			//操作人所操作的应用内的具体功能模块名称
			if(objDtmSvssystemLog.getDsl25() == null) {
				objDtmSvssystemLog.setDsl25("''");
			}
			//操作目标的IP地址
			if(objDtmSvssystemLog.getDsl26() == null) {
				objDtmSvssystemLog.setDsl26("''");
			}
			//操作目标提供访问或服务的端口
			if(objDtmSvssystemLog.getDsl27() == null) {
				objDtmSvssystemLog.setDsl27("''");
			}
			//当操作执行为SQL语句时,填写SQL语句
			if(objDtmSvssystemLog.getDsl28() == null) {
				objDtmSvssystemLog.setDsl28("''");
			}
			//记录操作用户类型 
			if(objDtmSvssystemLog.getDsl29() == null) {
				objDtmSvssystemLog.setDsl29(0);
			}		
			intResult = objInsertOperDao.insertDtmSvssystemLog(objDtmSvssystemLog);
			if(intResult >0){
				return true;
			}else{
				return false;
			}
		} catch (Exception e) {
			return false;
		}
	}
	
	public DtmSvssystemLog createNewDtmSvssystemLog(HttpSession session,HttpServletRequest request) {
		
		//创建应用系统日志对象
		DtmSvssystemLog objDtmSvssystemLog = new DtmSvssystemLog();
		
		try
		{
			//记录应用系统日志-OpTime 操作人操作时的系统时间
			SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmssSSSS");
	        String OpTime = df.format(new Date());
	        objDtmSvssystemLog.setDsl10(OpTime);
	        
	        //获取登录码
			String loginUserType = session.getAttribute("loginUserType").toString();
			//记录应用系统日志-操作用户类型2.单位用户5.管理用户7.内保用户			
			objDtmSvssystemLog.setDsl29(Integer.parseInt(loginUserType));
			//如果是内保用户登录
			if(loginUserType.equals("7")) {
				//记录应用系统日志-OperatorIdentity0.管理员1.普通用户
				objDtmSvssystemLog.setDsl06(1);
			}else if(loginUserType.equals("5")){	
				//如果是管理用户登录
				//记录应用系统日志-OperatorIdentity0.管理员1.普通用户
				objDtmSvssystemLog.setDsl06(0);
			}else if(loginUserType.equals("2")){
				//如果是单位用户登录
				//记录应用系统日志-OperatorIdentity0.管理员1.普通用户
				objDtmSvssystemLog.setDsl06(1);
			}	
			//记录应用系统日志-应用系统的中文名称
			objDtmSvssystemLog.setDsl02(session.getAttribute("svsSystemMenuIndexName").toString());
			
			//记录应用系统日志-日志的ID号
			//用时间戳当日志号
			Date dt = new Date();
			String nowtime = dt.getTime() + "";
			objDtmSvssystemLog.setDsl03(nowtime);
			
			//记录应用系统日志-Operator ID 操作人在应用中的ID号
			String userid = session.getAttribute("userid").toString();
			objDtmSvssystemLog.setDsl04(userid);
			
			//如果是单位用户登录
			if(loginUserType.equals("2")) {
			
				//记录应用系统日志-Operator Account 操作人居民身份证号
				if(session.getAttribute("cardNumber") == null)
				{					
					objDtmSvssystemLog.setDsl05("");
				}else{
					String cardNumber = session.getAttribute("cardNumber").toString();
					objDtmSvssystemLog.setDsl05(cardNumber);
				}
				//记录应用系统日志-Operator Name 操作人的真实姓名
				if(session.getAttribute("username") == null )
				{					
					objDtmSvssystemLog.setDsl07("");
				}else{
					String username = session.getAttribute("username").toString();
					objDtmSvssystemLog.setDsl07(username);
				}
				//记录应用系统日志-OrganizationName 操作人的所在单位名称
				if(session.getAttribute("myname") == null)
				{
					objDtmSvssystemLog.setDsl08("");
				}else{
					String myname = session.getAttribute("myname").toString();
					objDtmSvssystemLog.setDsl08(myname);
				}
				
				//记录应用系统日志-OrganizationID 操作人所属单位的公安机关机构代码
				if(session.getAttribute("companyCode") == null)
				{
					objDtmSvssystemLog.setDsl09("");
				}else{
					String companyCode = session.getAttribute("companyCode").toString();
					objDtmSvssystemLog.setDsl09(companyCode);
				}
				
			}else{
				//如果是其他用户登录
				//记录应用系统日志-Operator Account 操作人居民身份证号
				if(session.getAttribute("cardNumber") == null){					
					objDtmSvssystemLog.setDsl05("");
				}else{
					String cardNumber = session.getAttribute("cardNumber").toString();
					objDtmSvssystemLog.setDsl05(cardNumber);
				}
				
				//记录应用系统日志-Operator Name 操作人的真实姓名
				if(session.getAttribute("uname") == null ){					
					objDtmSvssystemLog.setDsl07("");
				}else{
					String uname = session.getAttribute("uname").toString();
					objDtmSvssystemLog.setDsl07(uname);
				}
				
				//记录应用系统日志-OrganizationName 操作人的所在单位名称
				if(session.getAttribute("companyName4A") == null){
					objDtmSvssystemLog.setDsl08("");
				}else{
					String companyName4A = session.getAttribute("companyName4A").toString();
					objDtmSvssystemLog.setDsl08(companyName4A);
				}
				
				//记录应用系统日志-OrganizationID 操作人所属单位的公安机关机构代码
				if(session.getAttribute("jiGouDaiMa4A") == null){
					objDtmSvssystemLog.setDsl09("");
				}else{
					String jiGouDaiMa4A = session.getAttribute("jiGouDaiMa4A").toString();
					objDtmSvssystemLog.setDsl09(jiGouDaiMa4A);
				}				
			}
			
			//记录应用系统日志-Terminal Type0.非移动终端1.移动终端
			objDtmSvssystemLog.setDsl12("0");
			//记录应用系统日志-Terminal ID 用户操作时所使用的信息处理终端的标识
			//获取ip
			String ipAddress = request.getRemoteAddr();
			objDtmSvssystemLog.setDsl13(ipAddress);
			//记录应用系统日志-ClientIP 客户端的IP地址				
			objDtmSvssystemLog.setDsl20(ipAddress);
			//记录应用系统日志-Client Port 客户端访问时的源端口	
			objDtmSvssystemLog.setDsl21(String.valueOf(request.getServerPort()));
			//记录应用系统日志-URL 操作目标的URL
			objDtmSvssystemLog.setDsl22(request.getRequestURI().replace("/", "//"));
			//记录应用系统日志-Session ID 用于标识应用系统产生的一次会话
			objDtmSvssystemLog.setDsl24(request.getSession().getId());
			//记录应用系统日志-Object IP 操作目标的IP地址
			objDtmSvssystemLog.setDsl26(request.getLocalAddr());
			//记录应用系统日志-Object Port 操作目标提供访问或服务的端口
			objDtmSvssystemLog.setDsl27(String.valueOf(request.getServerPort()));
			
			return objDtmSvssystemLog;
			
		}catch(Exception e){
			return objDtmSvssystemLog;
		}
	}

	public boolean SystemBool(HttpSession session) {
		try {
			int userid = Integer.valueOf(String.valueOf(session.getAttribute("userid")));

			if (userid > 0) {
				return true;
			} else {
				return false;
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return false;
		}
	}
	
	
	/**
	 * 内保管理: 用户添加   菜单权限复选框 初始化
	 */
	public List selectDtmSystemMenu() {
		try {
			//查询到行业用户的菜单
			String strSql = SqlConstant.sqlDtmSystemMenu + " and dsm02='"+this.neiBaoSystemAuthority+"' order by dsm03 ";
			// 获取行业合集
			List listDtmSystemMenu = objSearchDao.selectDtmSystemMenu(strSql);
			if (listDtmSystemMenu != null && listDtmSystemMenu.size() > 0) {
				return listDtmSystemMenu;
			}	
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	/**
	* 内保编辑操作页面 初始化 (详细信息页面)
	* @param dtuId 行业用户信息表主键id
	*/
	public DtmNeibaoUser selectDtmNeibaoUserById(int dnuId) {
		try {
			//行业用户信息表  
			String strSql = SqlConstant.sqlDtmNeibaoUser + " and dnu_id='"+dnuId+"'";
			List listDtmNeibaoUser = objSearchDao.selectDtmNeibaoUser(strSql);
			if (listDtmNeibaoUser!=null && listDtmNeibaoUser.size()>0) {
				return listDtmNeibaoUser.get(0);
			}
			return null;
		} catch (Exception e) {
			// TODO: handle exception
			return null;
		}
	}
	
	/**
	 * 行业编辑初始化-菜单复选框 选中
	 * @param dtt01 行业用户信息表 主键id
	 */
	public List selectDtmNeibaouserAuthoritymenu(int dnuId) {
		try {			
			//根据用户id 拿到 菜单编号             sqlUserDtmNeibaouserAuthoritymenu
			String strSql = SqlConstant.sqlDtmNeibaouserAuthoritymenu + " and dna03='"+dnuId+"'";
			List lisDtmNeiBaouserAuthoritymenu = objSearchDao.selectDtmNeibaouserAuthoritymenu(strSql);
			if(lisDtmNeiBaouserAuthoritymenu != null && lisDtmNeiBaouserAuthoritymenu.size() > 0){
				return lisDtmNeiBaouserAuthoritymenu;
			}else{
				return null;
			}
		} catch (Exception e) {
			// TODO: handle exception
			return null;
		}
	}
	
	/**
	 * 查找派出所:普通
	 * 
	 * @return
	 */
	public List selectDictionaryPoliceStationByDnuId(int dnuId) {
		try {

			String strSql = SqlConstant.sqlDictionaryPoliceStation + " and dps13=1 and dps17=1 and dps01 in ( select dnp01 from dtm_neibaouser_police where dnp03 = "+ dnuId +" ) order by dps02";
			// 获取派出所合集
			List listDictionaryPoliceStation = objSearchDao.selectDictionaryPoliceStation(strSql);
			if (listDictionaryPoliceStation != null && listDictionaryPoliceStation.size() > 0) {
				return listDictionaryPoliceStation;
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}	
	
	/**
	 * 内保 用户区县派出所权限 获取	 
	* */
	public UserDtmNeibaouserPolice selectUserDtmNeibaouserPolice(Integer dnuId) {
		try 
		{
			String strSql = SqlConstant.sqlUserDtmNeiBaouserPolice+ " and dnp03= '"+dnuId+"' group by c.dnp03";
			
			// 获取 内保用户派出所权限表 
			List listUserDtmNeiBaoUserPolice = objUserSearchDao.selectUserDtmNeibaouserPolice(strSql);
			if (listUserDtmNeiBaoUserPolice != null && listUserDtmNeiBaoUserPolice.size() > 0) {
				return listUserDtmNeiBaoUserPolice.get(0);
			}
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	/**
	 * 内保用户添加 区县派出所 复选联动
	 * 
	 * @param da02 区县信息表唯一编码
	 * @return
	 */
	public List selectAreaPolice(String da02) {
		try {

			String strSql = SqlConstant.sqlDictionaryPoliceStation + " and dps05 in ("+da02+") and dps13=1 and dps17=1 order by dps02";
			// 获取派出所合集
			List listDictionaryPoliceStation = objSearchDao.selectDictionaryPoliceStation(strSql);
			if (listDictionaryPoliceStation != null && listDictionaryPoliceStation.size() > 0) {
				return listDictionaryPoliceStation;
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}	

	/**
	 * 人脸事件信息表
	 * @param ddeId 主键id
	 * @return
	 */
	public List searchUserDtmFacesnapshotEvent(String ddeId){
		try {
			String strSql = SqlConstant.sqlDtmFacesnapshotEvent ;
			if (ddeId!=null) {
				strSql=strSql+" and dde_id ='"+ddeId+"' ";
			}
			List listUserDtmFacesnapshotEvent = objIUserSearchDao.selectUserDtmFacesnapshotEventSearch(strSql);
			 if(listUserDtmFacesnapshotEvent != null && listUserDtmFacesnapshotEvent.size() > 0) {
		        	return listUserDtmFacesnapshotEvent;
		        }else {
		        	return null;
		        }
		} catch (Exception e) {
			// TODO: handle exception
			return null;
		}
	}
	
	/**
	 * 人脸抓拍系统事件类型信息表
	 * @param dfe01 事件类型名称
	 * @return
	 */
	List searchDictionaryFacesnapshotEventtype(String dfeId){
		try {
			String strSql = SqlConstant.sqlDictionaryFacesnapshotEventtype;
			if (dfeId!=null && dfeId.equals("")==false) {
				strSql=strSql+" and dfe_id='"+dfeId+"' ";
			}
			List listDictionaryFacesnapshotEventtype = objSearchDao.selectDictionaryFacesnapshotEventtype(strSql);
			 if(listDictionaryFacesnapshotEventtype != null && listDictionaryFacesnapshotEventtype.size() > 0) {
		        	return listDictionaryFacesnapshotEventtype;
		        }else {
		        	return null;
		        }
		} catch (Exception e) {
			// TODO: handle exception
			return null;
		}
	}
	
	
	
	/**
	 * 单位 信息  初始化
	 * 
	 * @param duiId 单位id
	 * @return
	 */
	public UserDtmUsecompanyInfoSearch searchUserDtmUsecompanyInfo(String duiId) {
		try {
			String strSql = SqlConstant.sqlDtmUsecompanyInfo + " and  dui_id = '"+duiId+"'";
			
	        List listUserDtmUsecompanyInfoSearch = objIUserSearchDao.selectUserDtmUsecompanyInfoSearch(strSql);
	        if(listUserDtmUsecompanyInfoSearch != null && listUserDtmUsecompanyInfoSearch.size() > 0) {
	        	return listUserDtmUsecompanyInfoSearch.get(0);
	        }else {
	        	return null;
	        }
		} catch (Exception e) {
			// TODO: handle exception
			return null;
		}
	}
	
	/**
	 * 区域信息   
	 * 
	 * @param dcId  区域主键id
	 * @return
	 */
	public DtmCommunity searchDtmCommunity(String dcId) {
		try {			
			String strSql=SqlConstant.sqlDtmCommunity +" and dc_id='"+dcId+"'";
			List listDtmCommunity=objSearchDao.selectDtmCommunity(strSql);
			if(listDtmCommunity!=null && listDtmCommunity.size()>0){
				return listDtmCommunity.get(0);
			}
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	/**
	 * 人员特征信息 初始化
	 * @return
	 */
	public List searchDictionaryPersonFeatureById(String featureId) {
		try {

			String strSql =SqlConstant.sqlDictionaryPersonFeature ;
			if(featureId != null && featureId.equals("") == false) {
				strSql = strSql + " and dpf_id in ("+featureId+")";
			}
			// 人员特征信息合集
			List listDictionaryPersonFeature = objSearchDao.selectDictionaryPersonFeature(strSql);
			if (listDictionaryPersonFeature != null && listDictionaryPersonFeature.size() > 0) {
				return listDictionaryPersonFeature;
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	/**
	 * 人员特征信息 初始化
	 * @return
	 */
	public List searchDictionaryPersonFeature() {
		try {

			String strSql =SqlConstant.sqlDictionaryPersonFeature + " order by dpf02";
			
			// 人员特征信息合集
			List listDictionaryPersonFeature = objSearchDao.selectDictionaryPersonFeature(strSql);
			if (listDictionaryPersonFeature != null && listDictionaryPersonFeature.size() > 0) {
				return listDictionaryPersonFeature;
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	/**
	 * 通用 人员 编辑 查询 页面 初始化
	 * @param dpiId 人员id
	 * @return
	 */
	public UserDtmPersonInfo searchUserDtmPersonInfo(DtmSvssystemLog objDtmSvssystemLog,String dpiId) {
		try {

			String strSql = SqlConstant.sqlUserDtmPersonInfo + " and dpi_id='"+ dpiId + "'";
			// 获取人员信息
			List listDtmPersonInfo = objUserSearchDao.selectUserDtmPersonInfo(strSql);
			if (listDtmPersonInfo != null && listDtmPersonInfo.size() > 0) {
				
				//记录应用系统日志-OpType 操作行为类型0.登录1.查询	2.新增3.修改4.删除5.退出
				objDtmSvssystemLog.setDsl16(1);
				//记录应用系统日志-OperateCondition 操作类型为1-查询 3-修改 4-删除类型时,记录用户进行操作时的数据筛选条件,填写数据操作SQL语句where子句内容
				objDtmSvssystemLog.setDsl17(strSql.substring(strSql.indexOf("where")+5).replace("'", "''"));
				//记录应用系统日志-FuncModuleName 操作人所操作的应用内的具体功能模块名称
				objDtmSvssystemLog.setDsl25("人员查询详情");
				//记录应用系统日志-Query Sql 当操作执行为SQL语句时,填写SQL语句
				objDtmSvssystemLog.setDsl28(strSql.toString().replace("'", "''"));
				
				//记录应用系统日志-OperateResult 操作人的操作结果0.失败1.成功			
		        objDtmSvssystemLog.setDsl18(1);
		        objCommonJsonService.feverSvsSystemLog(objDtmSvssystemLog);
				return listDtmPersonInfo.get(0);
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	/**
	 * 人员类别信息表 初始化
	 * @return
	 */
	public List searchDictionaryPersonType() {
		try {
			String strSql =SqlConstant.sqlDictionaryPersonType +" order by dpt02";
			// 人员类别信息表
			List listDictionaryPersonType = objSearchDao.selectDictionaryPersonType(strSql);
			if (listDictionaryPersonType != null && listDictionaryPersonType.size() > 0) {
				return listDictionaryPersonType;
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	/**
	 * 婚姻状况表 初始化
	 * @return
	 */
	public List searchDictionaryMarriageSituation() {
		try {
			String strSql =SqlConstant.sqlDictionaryMarriageSituation + " order by dms02";
			// 婚姻状况表
			List listDictionaryMarriageSituation = objSearchDao.selectDictionaryMarriageSituation(strSql);
			if (listDictionaryMarriageSituation != null && listDictionaryMarriageSituation.size() > 0) {
				return listDictionaryMarriageSituation;
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}

	/**
	 * 民族表 初始化
	 * @return
	 */
	public List searchDictionaryNationpeople() {
		try {
			String strSql =SqlConstant.sqlDictionaryNationpeople;
			// 民族表
			List listDictionaryNationpeople = objSearchDao.selectDictionaryNationpeople(strSql);
			if (listDictionaryNationpeople != null && listDictionaryNationpeople.size() > 0) {
				return listDictionaryNationpeople;
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}

	/**
	 * 国家编码表 初始化
	 * @return
	 */
	public List searchDictionaryNation() {
		try {
			String strSql =SqlConstant.sqlDictionaryNation +" order by dn02";
			// 国家编码表
			List listDictionaryNation = objSearchDao.selectDictionaryNation(strSql);
			if (listDictionaryNation != null && listDictionaryNation.size() > 0) {
				return listDictionaryNation;
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}

	/**
	 * 信息来源表 初始化
	 * @return
	 */
	public List searchDictionaryInformationSource() {
		try {
			String strSql =SqlConstant.sqlDictionaryInformationSource + " order by dis03";
			// 信息来源表
			List listDictionaryInformationSource = objSearchDao.selectDictionaryInformationSource(strSql);
			if (listDictionaryInformationSource != null && listDictionaryInformationSource.size() > 0) {
				return listDictionaryInformationSource;
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	/**
	 * 文化程度表 初始化
	 * @return
	 */
	public List searchDictionaryCulturalLevel() {
		try {
			String strSql =SqlConstant.sqlDictionaryCulturalLevel + " order by dcl02";
			// 文化程度表
			List listDictionaryCulturalLevel = objSearchDao.selectDictionaryCulturalLevel(strSql);
			if (listDictionaryCulturalLevel != null && listDictionaryCulturalLevel.size() > 0) {
				return listDictionaryCulturalLevel;
			}
			
			return null;
		} catch (Exception e) {
			return null;
		}
	}
	
	
	/**
	 * 图片从临时文件夹转移到正式文件夹
	 * @param imgTemp 图片保存临时路径
	 * @param strImgUrl 图片保存正式路径
	 * @return 
	 */
	public Boolean copyImg(String imgTemp,String strImgUrl) {
		try {		
			//图片保存临时路径
			File oldFile = new File(imgTemp);
			//new一个新文件夹 
			File path = new File(strImgUrl); 
			//判断文件夹是否存在 
			if(!path.exists()) {
				path.mkdirs(); 
			}			
			//将证件照片转移到正式文件夹里 
			File fnew = new File(strImgUrl + oldFile.getName()); 
			oldFile.renameTo(fnew);	
			
			return true;
			
		} catch (Exception e) {
			// TODO: handle exception
			return false;
		}		
	}
	
	/**
	 * oss图片上传
	 * @param strServiceUrl 服务器上传路径
	 * @param strLocalUrl 本地保存路径
	 * */
	public List ossImg(String strServiceUrl,String strLocalUrl) {

		OSSClient ossClient = new OSSClient(OSS_END_POINT, OSS_ACCESS_KEY_ID, OSS_ACCESS_KEY_SECRET);
		try {
			// 表示上传文件到OSS时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。(服务器文件路径)
			String myFileName = strServiceUrl;
			// 创建OSSClient实例
			ObjectMetadata objectMetadata = new ObjectMetadata();
		    objectMetadata.setContentType("image/jpg");
			// 上传文件流(本地文件路径)
			InputStream inputStream = new FileInputStream(strLocalUrl);
			ossClient.putObject(OSS_BUCKET_NAME, myFileName, inputStream,objectMetadata);
			// 关闭client
			ossClient.shutdown();
			
			String imgUrl = ossClient.generatePresignedUrl(OSS_BUCKET_NAME,myFileName,OSS_URL_EXPIRATION).toString();
			System.out.println("访问地址"+imgUrl);

			List listImg= new ArrayList();
			if(imgUrl.equals("")==false) {
				listImg= new ArrayList();
				listImg.add("");
				listImg.add(imgUrl);
				//listImg.add(imgUrl.substring(0, imgUrl.indexOf("/var")));
				//listImg.add(imgUrl.substring(imgUrl.indexOf("/var"), imgUrl.length()-1));
			}
			return listImg;
		} catch (Exception e) {
			// 关闭client
			ossClient.shutdown();
			// TODO: handle exception
			e.printStackTrace();
			return null;
		}
	}

}

package svs.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import svs.dto.*;


public interface ISearchDao {
	//数量
	public int selectCountList(@Param(value="value") String strSql) throws Exception;

	//使用单位行业关系表
	public List selectDtmUsecompanyTrade(@Param(value="value") String strSql) throws Exception;
	
	//使用单位信息表
	public List selectDtmUsecompanyInfo(@Param(value="value") String strSql) throws Exception;
	
	//使用单位设备关系表
	public List selectDtmUsecompanyDevice(@Param(value="value") String strSql) throws Exception;
	
	//使用单位用户系统权限菜单关系表
	public List selectDtmUsecompanyAuthoritymenu(@Param(value="value") String strSql) throws Exception;
	
	//系统菜单信息表
	public List selectDtmSystemMenu(@Param(value="value") String strSql) throws Exception;
	
	//系统权限信息表
	public List selectDtmSystemAuthority(@Param(value="value") String strSql) throws Exception;
	
	//系统日志表
	public List selectDtmSvssystemLog(@Param(value="value") String strSql) throws Exception;
	
	//内保用户-行业关系表
	public List selectDtmNeibaouserTrade(@Param(value="value") String strSql) throws Exception;
	
	//内保用户派出所关系表
	public List selectDtmNeibaouserPolice(@Param(value="value") String strSql) throws Exception;
	
	//内保用户信息表
	public List selectDtmNeibaoUser(@Param(value="value") String strSql) throws Exception;
	
	//内保用户系统权限菜单关系表
	public List selectDtmNeibaouserAuthoritymenu(@Param(value="value") String strSql) throws Exception;
	
	//日志表
	public List selectDtmLog(@Param(value="value") String strSql) throws Exception;
	
	//房屋信息表
	public List selectDtmHouse(@Param(value="value") String strSql) throws Exception;
	
	//楼栋信息表
	public List selectDtmFloor(@Param(value="value") String strSql) throws Exception;
	
	//区域实有力量信息表
	public List selectDtmCommunityPower(@Param(value="value") String strSql) throws Exception;
	
	//区域停车库(场)信息表
	public List selectDtmCommunityParking(@Param(value="value") String strSql) throws Exception;
	
	//区域信息表
	public List selectDtmCommunity(@Param(value="value") String strSql) throws Exception;
	
	//区域实有装备信息表
	public List selectDtmCommunityEquipment(@Param(value="value") String strSql) throws Exception;
	
	//区域出入口信息表
	public List selectDtmCommunityEntrance(@Param(value="value") String strSql) throws Exception;
	
	//坐标系信息表
	public List selectDictionaryZuobiao(@Param(value="value") String strSql) throws Exception;
	
	//行业信息表
	public List selectDictionaryTrade(@Param(value="value") String strSql) throws Exception;
	
	//街道信息表
	public List selectDictionaryStreet(@Param(value="value") String strSql) throws Exception;
	
	//道路信息表
	public List selectDictionaryRoad(@Param(value="value") String strSql) throws Exception;
	
	//省信息表
	public List selectDictionaryProvince(@Param(value="value") String strSql) throws Exception;
	
	//实有力量分类信息表
	public List selectDictionaryPowerType(@Param(value="value") String strSql) throws Exception;
	
	//派出所信息表
	public List selectDictionaryPoliceStation(@Param(value="value") String strSql) throws Exception;
	
	//日志类型
	public List selectDictionaryLogType(@Param(value="value") String strSql) throws Exception;
	
	//信息等级表
	public List selectDictionaryInformationLevel(@Param(value="value") String strSql) throws Exception;
	
	//房屋用途信息表
	public List selectDictionaryHouseUse(@Param(value="value") String strSql) throws Exception;
	
	//房屋类别信息表
	public List selectDictionaryHouseType(@Param(value="value") String strSql) throws Exception;
	
	//实有装备类型信息表
	public List selectDictionaryEquipmentType(@Param(value="value") String strSql) throws Exception;
	
	//出入口类型
	public List selectDictionaryEntranceType(@Param(value="value") String strSql) throws Exception;
	
	//单位性质信息表
	public List selectDictionaryEconomicType(@Param(value="value") String strSql) throws Exception;
	
	//单位规模信息表
	public List selectDictionaryCompanyScale(@Param(value="value") String strSql) throws Exception;  
	
	//市信息表
	public List selectDictionaryCity(@Param(value="value") String strSql) throws Exception;
	
	//证件类别信息表
	public List selectDictionaryCardType(@Param(value="value") String strSql) throws Exception;
	
	//区县信息表
	public List selectDictionaryArea(@Param(value="value") String strSql) throws Exception;  
	
	//单位区域关系表
	public List selectDtmUsecompanyCommunity(@Param(value="value") String strSql) throws Exception;  
	
	//小区用户系统权限菜单关系表
	public List selectDtmCommunityAuthoritymenu(@Param(value="value") String strSql) throws Exception;  
	
	//心跳统计
	public List selectDtmHeartTongji(@Param(value="value") String strSql) throws Exception;  
	
	//事件统计 -->
	public List selectDtmEventTongji(@Param(value="value") String strSql) throws Exception;  

	//人员标签 -->
	public List selectDtmPersonLabel(@Param(value="value") String strSql) throws Exception;  

	//人员特征信息表 -->
	public List selectDictionaryPersonFeature(@Param(value="value") String strSql) throws Exception;  
  
	//人屋关系信息表 -->
	public List selectDictionaryPersonHouse(@Param(value="value") String strSql) throws Exception;  
 
	//人员类别信息表 -->
	public List selectDictionaryPersonType(@Param(value="value") String strSql) throws Exception;  
	   
	//人员信息表
	public List selectDtmPersonInfo(@Param(value="value") String strSql) throws Exception;  
	   
	//人员房屋关系表
	public List selectDtmPersonCommunity(@Param(value="value") String strSql) throws Exception;  
	
	//文化程度信息表
	public List selectDictionaryCulturalLevel(@Param(value="value") String strSql) throws Exception;  
	
	//信息来源表
	public List selectDictionaryInformationSource(@Param(value="value") String strSql) throws Exception;  
	  
	//婚姻状况信息表表
	public List selectDictionaryMarriageSituation(@Param(value="value") String strSql) throws Exception;  
		 
	//国家信息表
	public List selectDictionaryNation(@Param(value="value") String strSql) throws Exception;  
		 
	//民族信息表
	public List selectDictionaryNationpeople(@Param(value="value") String strSql) throws Exception;  
		  
	//系统输入信息表(设备信息)
	public List selectAgentSystemEnter(@Param(value="value") String strSql) throws Exception;  
		
	//系统输入组件表(前端信息)
	public List selectAgentSystemEnterPart(@Param(value="value") String strSql) throws Exception;  
	
	//系统类型分类表
	public List selectDictionarySystemType(@Param(value="value") String strSql) throws Exception;  
		
	//人脸事件表
	public List selectDtmFacesnapshotEvent(@Param(value="value") String strSql) throws Exception;  
	
	//人脸心跳表
	public List selectDtmFacesnapshotHeart(@Param(value="value") String strSql) throws Exception;  
	
	//人脸抓拍系统事件类型信息表
	public List selectDictionaryFacesnapshotEventtype(@Param(value="value") String strSql) throws Exception;  
	
	
}


package svs.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import svs.dto.userDto.*;

public interface IUserSearchDao {

	//派出所权限
	public List selectUserDtmNeibaouserPolice(@Param(value="value") String strSql) throws Exception;
	
	//菜单权限
	public List selectUserDtmSystemMenu(@Param(value="value") String strSql) throws Exception;
	
	//内保用户权限
	public List selectUserDtmNeiBaoUser(@Param(value="value") String strSql) throws Exception;
	
	//单位信息
	public List selectUserDtmUsecompanyInfo(@Param(value="value") String strSql) throws Exception;
		
	//派出所
	public List selectUserDictionaryPoliceStation(@Param(value="value") String strSql) throws Exception;
		
	//用户列表
	public List selectUserDtmNeiBaoUserSearch(@Param(value="value") String strSql) throws Exception;
	
	//单位信息
	public List selectUserDtmUsecompanyInfoSearch(@Param(value="value") String strSql) throws Exception;
	
	//小区信息
	public List selectUserDtmCommunity(@Param(value="value") String strSql) throws Exception;
	//实有装备信息
	public List selectUserDtmCommunityEquipment(@Param(value="value") String strSql) throws Exception;
		
	//实有力量信息
	public List selectUserDtmCommunityPower(@Param(value="value") String strSql) throws Exception;
			
	//人员信息列表
	public List selectUserDtmPersonInfoSearch(@Param(value="value") String strSql) throws Exception;
	
	//人员信息
	public List selectUserDtmPersonInfo(@Param(value="value") String strSql) throws Exception;
	
	//人员标签信息
	public List selectUserDtmPersonLabelSearch(@Param(value="value") String strSql) throws Exception;
		
	//区域出入口信息表
	public List selectUserDtmCommunityEntrance(@Param(value="value") String strSql) throws Exception;
		
	//系统输入信息表(设备信息)
	public List selectUserAgentSystemEnterSearch(@Param(value="value") String strSql) throws Exception;	

	//事件统计
	public List selectUserDtmEventTongjiSearch(@Param(value="value") String strSql) throws Exception;	

	//用户心跳信息表
	public List selectUserDtmHeartTongjiSearch(@Param(value="value") String strSql) throws Exception;	
	
	//人脸心跳信息表
	public List selectUserDtmFacesnapshotHeartSearch(@Param(value="value") String strSql) throws Exception;	
		
	//人脸事件信息表
	public List selectUserDtmFacesnapshotEventSearch(@Param(value="value") String strSql) throws Exception;	
	
	//通用信息表
	public List selectUserCommonDto(@Param(value="value") String strSql) throws Exception;	
	
	//单位列表
	public List selectUserDtmUsecompanyInfoByDevice(@Param(value="value") String strSql) throws Exception;	
			
	
}

package svs.dao;

import org.apache.ibatis.annotations.Param;

public interface IUpDeOperDao {
	
	public int updateBySql(@Param(value="value") String sql) throws Exception;
	
	public int deleteBySql(@Param(value="value") String sql) throws Exception;
	
	public int insertBySql(@Param(value="value") String sql) throws Exception;
	
}

package svs.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import svs.dto.userDto.*;

public interface IUserSearchDao {

	//派出所权限
	public List selectUserDtmNeibaouserPolice(@Param(value="value") String strSql) throws Exception;
	
	//菜单权限
	public List selectUserDtmSystemMenu(@Param(value="value") String strSql) throws Exception;
	
	//内保用户权限
	public List selectUserDtmNeiBaoUser(@Param(value="value") String strSql) throws Exception;
	
	//单位信息
	public List selectUserDtmUsecompanyInfo(@Param(value="value") String strSql) throws Exception;
		
	//派出所
	public List selectUserDictionaryPoliceStation(@Param(value="value") String strSql) throws Exception;
		
	//用户列表
	public List selectUserDtmNeiBaoUserSearch(@Param(value="value") String strSql) throws Exception;
	
	//单位信息
	public List selectUserDtmUsecompanyInfoSearch(@Param(value="value") String strSql) throws Exception;
	
	//小区信息
	public List selectUserDtmCommunity(@Param(value="value") String strSql) throws Exception;
	//实有装备信息
	public List selectUserDtmCommunityEquipment(@Param(value="value") String strSql) throws Exception;
		
	//实有力量信息
	public List selectUserDtmCommunityPower(@Param(value="value") String strSql) throws Exception;
			
	//人员信息列表
	public List selectUserDtmPersonInfoSearch(@Param(value="value") String strSql) throws Exception;
	
	//人员信息
	public List selectUserDtmPersonInfo(@Param(value="value") String strSql) throws Exception;
	
	//人员标签信息
	public List selectUserDtmPersonLabelSearch(@Param(value="value") String strSql) throws Exception;
		
	//区域出入口信息表
	public List selectUserDtmCommunityEntrance(@Param(value="value") String strSql) throws Exception;
		
	//系统输入信息表(设备信息)
	public List selectUserAgentSystemEnterSearch(@Param(value="value") String strSql) throws Exception;	

	//事件统计
	public List selectUserDtmEventTongjiSearch(@Param(value="value") String strSql) throws Exception;	

	//用户心跳信息表
	public List selectUserDtmHeartTongjiSearch(@Param(value="value") String strSql) throws Exception;	
	
	//人脸心跳信息表
	public List selectUserDtmFacesnapshotHeartSearch(@Param(value="value") String strSql) throws Exception;	
		
	//人脸事件信息表
	public List selectUserDtmFacesnapshotEventSearch(@Param(value="value") String strSql) throws Exception;	
	
	//通用信息表
	public List selectUserCommonDto(@Param(value="value") String strSql) throws Exception;	
	
	//单位列表
	public List selectUserDtmUsecompanyInfoByDevice(@Param(value="value") String strSql) throws Exception;	
			
	
}

总结

心跳信息

采集信息

---------前台------------
1.图片信息
1.1 清空问题(在进行重新搜索后要清空)
2.设备单位信息
2.1——>单位行业的checkbox的勾选
2.2——> 重新搜索后单位的信息的div要清空
3.人脸抓拍 采集详情
采集图片和人员图片文字对齐

---------前台数据----------------
1.设备编码显示单位信息

var str = ‘’+data.listUserDtmFacesnapshotEventFind[i].dde01 +’’;
1.1 dde21传值为null/undefined
5.14——教你把ssh抄成ssm_第17张图片---------后台-------------------------
dtmfacesnapshotEventFindIndex 相关参数注解

dpi14->? null

知识点

下拉框加载并且选中对应的值
第一种


5.14——教你把ssh抄成ssm_第18张图片5.14——教你把ssh抄成ssm_第19张图片搞定
5.14——教你把ssh抄成ssm_第20张图片

你可能感兴趣的:(笔记,ssh,ssm,把ssh改成ssm)