5f08be6e26294b5f93bd4269dd53b30273e5e621.svn-base 33.7 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069
package com.thinkgem.jeesite.modules.reg.web.httprest.httpRestController;

import java.io.File;
import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.io.FileUtils;
import org.codehaus.jackson.JsonParser.Feature;
import org.codehaus.jackson.map.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.bitservice.adi.WSEndpointServiceLocator;
import com.bitservice.adi.WSService;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.mapper.JsonMapper;
import com.thinkgem.jeesite.common.service.ServiceException;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.act.web.ActTaskController;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusSlsq;
import com.thinkgem.jeesite.modules.reg.service.base.RegBaseHService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusRightsService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusSlsqService;
import com.thinkgem.jeesite.modules.reg.service.qjxt.InterfacelogService;
import com.thinkgem.jeesite.modules.reg.utils.Base64;
import com.thinkgem.jeesite.modules.reg.utils.Singleton;
import com.thinkgem.jeesite.modules.reg.web.bus.registlog.JrrzService;
import com.thinkgem.jeesite.modules.reg.web.bus.registlog.JrrzServiceService;
import com.thinkgem.jeesite.modules.reg.web.httprest.httpRestService.HttpRestToService;
import com.thinkgem.jeesite.modules.reg.web.httprest.httpRestService.HttpSwService;
import com.thinkgem.jeesite.modules.reg.web.httprest.httpRestService.HttpactivityService;
import com.thinkgem.jeesite.modules.reg.web.httprest.utils.DatatypeUtil;

/**
 * 一窗受理接口类
 * 
 * @author LENOVO 2018-11-10
 */
@Controller
@RequestMapping(value = "/rest/v1.0")
public class HttpRestReturn extends BaseController {

	protected Logger logger = LoggerFactory.getLogger(getClass());
 
	@Autowired
	private HttpRestToService httpresttoservice;
	
	@Autowired
	private HttpactivityService httpactivityService;
	
	@Autowired
	private InterfacelogService interfacelogService;
	 

	@Autowired
	private HttpRestPush restPush;

	@Autowired
	private HttpSwService httpSwService;

	/**
	 * 4.1.1 根据不动产单元号或者产权证号验证是否能办理登记 业务办理前信息验证
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/yzbdcxx", method = RequestMethod.POST)
	public void yzbdcxx(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			resmap = httpresttoservice.yzbdcxx(jsonstr);
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("msg", "业务错误:" + s.getMessage());
			resmap.put("head", head);
			resmap.put("data", data);
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("msg", "代码未知错误");
			resmap.put("head", head);
			resmap.put("data", data);
			exception = e;
			e.printStackTrace();
		}
		// 返回结果
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		renderString(response, resmap);
	}

	/**
	 * 4.1.2 跟据不动产单元号或者产权证号获取登记信息 根据不动产单元或产权证号获取登记信息
	 * 
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/djxx", method = RequestMethod.POST)
	public void djxx(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			resmap = httpresttoservice.djxx(jsonstr);
			head.put("regionCode", "0000");
			head.put("msg", "成功");
			resmap.put("head", head);
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("msg", "业务错误:" + s.getMessage());
			resmap.put("head", head);
			resmap.put("data", data);
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("msg", "代码未知错误");
			resmap.put("head", head);
			resmap.put("data", data);
			exception = e;
			e.printStackTrace();
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		renderString(response, resmap);
	}

	/**
	 * 4.1.3根据一窗采集信息推送到不动产审核节点 一窗采集信息推送到不动产审核节点
	 * 
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/shxx", method = RequestMethod.POST)
	public void shxx(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			data = httpresttoservice.shxx(jsonstr);
			head.put("regionCode", "0000");
			head.put("orgid", "");
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("msg", "业务错误:" + s.getMessage());
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("msg", "代码未知错误");
			exception = e;
			e.printStackTrace();
		} finally {
			resmap.put("head", head);
			resmap.put("data", data);
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		renderString(response, resmap);
	}

	/**
	 * 4.1.4 登记缮证登薄后将该不动产单元状态推送给一窗 使用定时调度方式执行
	 * 
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	@RequestMapping(value = "/send/dbxx", method = RequestMethod.POST)
	public void sendDbxx(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Singleton instance = Singleton.getInstance();
		if(!instance.getRr()) {
			return;
		}
		Exception exception = null;
		try {
			instance.setRr(false);
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			restPush.pushDbxx();
			head.put("regionCode", "0000");
			head.put("orgid", "");
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("msg", "业务错误:" + s.getMessage());
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("msg", "代码未知错误");
			exception = e;
			e.printStackTrace();
		} finally {
			instance.setRr(true);
			resmap.put("head", head);
			resmap.put("data", data);
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		renderString(response, resmap);
		
	}

	/**
	 * 2.1.14 不动产办结信息接收接口 使用定时调度方式执行
	 * 
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	@RequestMapping(value = "/send/ywbjxx", method = RequestMethod.POST)
	public void sendYwbjxx(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Singleton instance = Singleton.getInstance();
		if(!instance.getBj()) {
			return;
		}
		Exception exception = null;
		try {
			instance.setBj(false);
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			restPush.pushYwbjxx();
			head.put("regionCode", "0000");
			head.put("orgid", "");
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("msg", "业务错误:" + s.getMessage());
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("msg", "代码未知错误");
			exception = e;
			e.printStackTrace();
		} finally {
			instance.setBj(true);
			resmap.put("head", head);
			resmap.put("data", data);
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		renderString(response, resmap);
	}

	/**
	 * 2.1.13 修改房屋状态 使用定时调度方式执行
	 * 
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	@RequestMapping(value = "/send/fwzt", method = RequestMethod.POST)
	public void sendFwzt(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Singleton instance = Singleton.getInstance();
		if(!instance.getZt()) {
			return;
		}
		Exception exception = null;
		try {
			instance.setZt(false);
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			restPush.pushFwzt();
			head.put("regionCode", "0000");
			head.put("orgid", "");
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("msg", "业务错误:" + s.getMessage());
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("msg", "代码未知错误");
			exception = e;
			e.printStackTrace();
		} finally {
			instance.setZt(true);
			resmap.put("head", head);
			resmap.put("data", data);
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		renderString(response, resmap);
	}

	/**
	 * 4.1.6 登记系统退件请求 使用定时调度方式执行
	 * 
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	@RequestMapping(value = "/send/sjth", method = RequestMethod.POST)
	public void sendSjth(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";

		Exception exception = null;
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			restPush.sendSjth();
			head.put("regionCode", "0000");
			head.put("orgid", "");
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("msg", "业务错误:" + s.getMessage());
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("msg", "代码未知错误");
			exception = e;
			e.printStackTrace();
		} finally {
			resmap.put("head", head);
			resmap.put("data", data);
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		renderString(response, resmap);
	}

	/**
	 * 4.1.7 一窗受理系统删除请求接口
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/deleteYcslxx", method = RequestMethod.POST)
	public void deleteYcslxx(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		try {
			// 删除业务信息表
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			data = httpresttoservice.deleteYcslxx(jsonstr);
			head.put("regionCode", "0000");
			head.put("orgid", "");
			resmap.put("head", head);
			resmap.put("data", data);
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("orgid", "");
			data.put("proid", "");
			data.put("msg", s.getMessage());
			resmap.put("head", head);
			resmap.put("data", data);
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("orgid", "");
			data.put("proid", "");
			data.put("msg", "false");
			resmap.put("head", head);
			resmap.put("data", data);
			exception = e;
			e.printStackTrace();
		}
		// 返回结果
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		renderString(response, resmap);
	}

	/**
	 * 4.3.3 存量房信息接口
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/clfcx", method = RequestMethod.POST)
	public void getClfcxInfo(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String xml_str = "";
		Exception exception = null;
		try {
			xml_str = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", xml_str);

			Map root = DatatypeUtil.readXml(xml_str);
			head = DatatypeUtil.getHead(root);
			List<Map> rows = DatatypeUtil.getRows(root);
			data = httpSwService.getClfcxInfo(rows);

		} catch (ServiceException s) {
			head.put("RetCode", "1000");
			head.put("RetMsg", s.getMessage());
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("RetCode", "2000");
			head.put("RetMsg", "系统错误");
			exception = e;
			e.printStackTrace();
		}
		// 返回结果
		interfacelogService.saveUsByProperty(url, "一窗受理", xml_str, JsonMapper.toJsonString(resmap), exception);
		renderString(response, head, data);
	}

	/**
	 * 4.3.4 套次接口
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/tccx", method = RequestMethod.POST)
	public void getTcInfo(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String xml_str = "";
		Exception exception = null;
		try {
			xml_str = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", xml_str);

			Map root = DatatypeUtil.readXml(xml_str);
			head = DatatypeUtil.getHead(root);
			List<Map> rows = DatatypeUtil.getRows(root);
			data = httpSwService.getTcInfo(rows);

		} catch (ServiceException s) {
			head.put("RetCode", "1000");
			head.put("RetMsg", s.getMessage());
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("RetCode", "2000");
			head.put("RetMsg", "系统错误");
			exception = e;
			e.printStackTrace();
		}
		// 返回结果
		interfacelogService.saveUsByProperty(url, "一窗受理", xml_str, JsonMapper.toJsonString(resmap), exception);
		renderString(response, head, data);
	}

	/**
	 * 4.3.5 增量房信息接口
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/zlfcx", method = RequestMethod.POST)
	public void getZlfcxInfo(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String xml_str = "";
		Exception exception = null;
		try {
			xml_str = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", xml_str);

			Map root = DatatypeUtil.readXml(xml_str);
			head = DatatypeUtil.getHead(root);
			List<Map> rows = DatatypeUtil.getRows(root);
			data = httpSwService.getZlfcxInfo(rows);

		} catch (ServiceException s) {
			head.put("RetCode", "1000");
			head.put("RetMsg", s.getMessage());
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("RetCode", "2000");
			head.put("RetMsg", "系统错误");
			exception = e;
			e.printStackTrace();
		}
		// 返回结果
		interfacelogService.saveUsByProperty(url, "一窗受理", xml_str, JsonMapper.toJsonString(resmap), exception);
		renderString(response, head, data);
	}

	/**
	 * 4.5.1 Token获取接口 使用定时调度方式执行
	 * 
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	@RequestMapping(value = "/fresh/token", method = RequestMethod.POST)
	public void freshToken(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";

		Exception exception = null;
		try {
			String xtid = request.getParameter("xtid");
			restPush.freshToken(xtid);
			head.put("regionCode", "0000");
			head.put("orgid", "");
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("msg", "业务错误:" + s.getMessage());
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("msg", "代码未知错误");
			exception = e;
			e.printStackTrace();
		} finally {
			resmap.put("head", head);
			resmap.put("data", data);
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		renderString(response, resmap);
	}

	/**
	 * 4.5.2 获取业务办理状态接口 使用定时调度方式执行
	 * 
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	@RequestMapping(value = "/send/ywzt", method = RequestMethod.POST)
	public void sendYwzt(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";

		Exception exception = null;
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			restPush.sendYwzt();
			head.put("regionCode", "0000");
			head.put("orgid", "");
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("msg", "业务错误:" + s.getMessage());
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("msg", "代码未知错误");
			exception = e;
			e.printStackTrace();
		} finally {
			resmap.put("head", head);
			resmap.put("data", data);
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		renderString(response, resmap);
	}

	/**
	 * 成员方信息查询
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/jtcyfwxx", method = RequestMethod.POST)
	public void jtcyfwxx(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map head = Maps.newHashMap();
		Map data = Maps.newHashMap();
		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			data = httpresttoservice.jtcyfwxx(jsonstr);
			head.put("regionCode", "0000");
			head.put("msg", "成功");
			resmap.put("head", head);
			resmap.put("data", data);
		} catch (ServiceException s) {
			head.put("regionCode", "1000");
			head.put("msg", "业务错误:" + s.getMessage());
			resmap.put("head", head);
			resmap.put("data", data);
			exception = s;
			s.printStackTrace();
		} catch (Exception e) {
			head.put("regionCode", "2000");
			head.put("msg", "代码未知错误");
			resmap.put("head", head);
			resmap.put("data", data);
			exception = e;
			e.printStackTrace();
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		// 返回结果
		renderString(response, resmap);
	}

	/**
	 * 3.1 权利人下登记房产信息查询
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/fcxx", method = RequestMethod.POST)
	public void fcxx(HttpServletRequest request, HttpServletResponse response) throws Exception {
		
		Map resmap = Maps.newHashMap();
		Map meta = Maps.newHashMap(); 

		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		List res_data = Lists.newArrayList();
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			res_data =httpresttoservice.getfcxx(jsonstr);
			resmap.put("code", "1");
			resmap.put("msg", "处理成功");
		} catch (ServiceException s) {
			s.printStackTrace();
			resmap.put("code", "0");
			resmap.put("msg", "业务错误:" + s.getMessage());
			 
		} catch (Exception e) {
			e.printStackTrace();
			resmap.put("code", "10000");
			resmap.put("msg", "系统错误:" + e.getMessage());
			 
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		// 返回结果

		meta.put("msg", "响应成功");
		meta.put("success", "true");
		meta.put("status", "1");

		resmap.put("data", res_data);
		resmap.put("status", "1");
		resmap.put("meta", meta);
		renderString(response, resmap); 
	}

	/**
	 * 3.2 根据不动产单元号查询发证日期
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/fzsj", method = RequestMethod.POST)
	public void fzsj(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map meta = Maps.newHashMap(); 

		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		List res_data = Lists.newArrayList();
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			res_data =httpresttoservice.getfzsj(jsonstr);
			resmap.put("code", "1");
			resmap.put("msg", "处理成功");
		} catch (ServiceException s) {
			s.printStackTrace();
			resmap.put("code", "0");
			resmap.put("msg", "业务错误:" + s.getMessage());
			 
		} catch (Exception e) {
			e.printStackTrace();
			resmap.put("code", "10000");
			resmap.put("msg", "系统错误:" + e.getMessage());
			 
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		// 返回结果

		meta.put("msg", "响应成功");
		meta.put("success", "true");
		meta.put("status", "1");

		resmap.put("data", res_data);
		resmap.put("status", "1");
		resmap.put("meta", meta);
		renderString(response, resmap);
	}

	/**
	 * 3.3 接收手动维护的挂接关系
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/hookFybh", method = RequestMethod.POST)
	public void hookFybh(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map meta = Maps.newHashMap();
		Map data = Maps.newHashMap();

		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			httpresttoservice.hookFybh(jsonstr);

			resmap.put("code", "1");
			resmap.put("msg", "挂接成功");
		} catch (ServiceException s) {
			s.printStackTrace();
			resmap.put("code", "0");
			resmap.put("msg", "业务错误:" + s.getMessage());
		} catch (Exception e) {
			e.printStackTrace();
			resmap.put("code", "10000");
			resmap.put("msg", "系统错误:" + e.getMessage());
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		// 返回结果

		meta.put("msg", "响应成功");
		meta.put("success", "true");
		meta.put("status", "1");
		
		
		
		data.put("status", "1");
		resmap.put("meta", meta);
		resmap.put("data", data);
		resmap.putAll(data);
		renderString(response, resmap);
	}

	/**
	 * 3.4	接收手动维护的删除挂接关系
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/removeFybh", method = RequestMethod.POST)
	public void removeFybh(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map meta = Maps.newHashMap();
		Map data = Maps.newHashMap();

		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			httpresttoservice.removeFybh(jsonstr);

			data.put("code", "1");
			data.put("msg", "挂接解除成功");
		} catch (ServiceException s) {
			s.printStackTrace();
			data.put("code", "0");
			data.put("msg", "业务错误:" + s.getMessage());
		} catch (Exception e) {
			e.printStackTrace();
			data.put("code", "10000");
			data.put("msg", "系统错误:" + e.getMessage());
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		// 返回结果

		meta.put("msg", "响应成功");
		meta.put("success", "true");
		meta.put("status", "1");

		data.put("status", "1");
		resmap.put("meta", meta);
		resmap.put("data", data);
		resmap.putAll(data);
		renderString(response, resmap);
	}


	/**
	 * 3.5	根据产权证号查询上次取得房屋成本
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/getJyjgByCqzh", method = RequestMethod.POST)
	public void getJyjgByCqzh(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map meta = Maps.newHashMap();
		Map data = Maps.newHashMap();

		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			data = httpresttoservice.getJyjgByCqzh(jsonstr);

			data.put("code", "1");
			data.put("msg", "查询成功");
		} catch (ServiceException s) {
			s.printStackTrace();
			data.put("code", "0");
			data.put("msg", "业务错误:" + s.getMessage());
		} catch (Exception e) {
			e.printStackTrace();
			data.put("code", "10000");
			data.put("msg", "系统错误:" + e.getMessage());
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		// 返回结果

		meta.put("msg", "响应成功");
		meta.put("success", "true");
		meta.put("status", "1");

		data.put("status", "1");
		resmap.put("meta", meta);
		resmap.put("data", data);
		resmap.putAll(data);
		renderString(response, resmap);
	}
	
	/**
	 * 3.6	获取房屋期现关系
	 * 
	 * @param request
	 * @param response
	 * @param handler
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/ycsl/getQxgx", method = RequestMethod.POST)
	public void getQxgx(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map meta = Maps.newHashMap();
		Map data = Maps.newHashMap();

		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			logger.info("传入参数{}", jsonstr);
			httpresttoservice.getQxgx(jsonstr);

			data.put("code", "1");
			data.put("msg", "成功");
		} catch (ServiceException s) {
			s.printStackTrace();
			data.put("code", "0");
			data.put("msg", "业务错误:" + s.getMessage());
		} catch (Exception e) {
			e.printStackTrace();
			data.put("code", "10000");
			data.put("msg", "系统错误:" + e.getMessage());
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		// 返回结果

		meta.put("msg", "响应成功");
		meta.put("success", "true");
		meta.put("status", "1");

		data.put("status", "1");
		resmap.put("meta", meta);
		resmap.put("data", data);
		resmap.putAll(data);
		renderString(response, resmap);
	}
	
	
	/**
	 *测试接口
	 */
	@RequestMapping(value = "/ycsl/ceshi", method = RequestMethod.POST)
	public void ceshi(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map resmap = Maps.newHashMap();
		Map meta = Maps.newHashMap();
		Map data = Maps.newHashMap();

		String url = "http://" + request.getServerName() // 服务器地址
				+ ":" + request.getServerPort() // 端口号
				+ request.getContextPath() // 项目名称
				+ request.getServletPath(); // 请求页面或其他地址
		String jsonstr = "";
		Exception exception = null;
		try {
			
			Map map2 = Maps.newHashMap();
			map2.put("proid", "202103130001");
			Map deals = httpactivityService.postRequest(map2,"downDealFiles");

			data.put("code", "1");
			data.put("msg", "成功");
		} catch (ServiceException s) {
			s.printStackTrace();
			data.put("code", "0");
			data.put("msg", "业务错误:" + s.getMessage());
		} catch (Exception e) {
			e.printStackTrace();
			data.put("code", "10000");
			data.put("msg", "系统错误:" + e.getMessage());
		}
		interfacelogService.saveUsByProperty(url, "一窗受理", jsonstr, JsonMapper.toJsonString(resmap), exception);
		// 返回结果

		meta.put("msg", "响应成功");
		meta.put("success", "true");
		meta.put("status", "1");

		data.put("status", "1");
		resmap.put("meta", meta);
		resmap.put("data", data);
		resmap.putAll(data);
		renderString(response, resmap);
	}
}