71506be33669d5f646812a5026e8ed674f1b1192.svn-base
57.4 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
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
/**
* Copyright © 2015-2018 ODM All rights reserved.
*/
package com.thinkgem.jeesite.modules.reg.web.bus;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
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.HttpServletResponse;
import org.activiti.tracelog.ActivitiLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.exceptions.ServerException;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import com.bitservice.adi.WSEndpointServiceLocator;
import com.bitservice.adi.WSService;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.utils.DateUtils;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBaseC;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBaseH;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBaseZdjbxx;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBaseZrz;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBaseZsglb;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusBdcqzsdjxx;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusFz;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusGd;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusJsydsyq;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusQlr;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusSf;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusSlsq;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusSz;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusYgdj;
import com.thinkgem.jeesite.modules.reg.service.base.RegBaseCService;
import com.thinkgem.jeesite.modules.reg.service.base.RegBaseHService;
import com.thinkgem.jeesite.modules.reg.service.base.RegBaseZdjbxxService;
import com.thinkgem.jeesite.modules.reg.service.base.RegBaseZrzService;
import com.thinkgem.jeesite.modules.reg.service.base.RegBaseZsglbService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusBdcqzsdjxxService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusFzService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusGdService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusJsydsyqService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusQlrService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusSfService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusSlsqService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusSzService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusYgdjService;
import com.thinkgem.jeesite.modules.sumdata.entity.datatable.SRegBusBdcqzsdjxx;
import com.thinkgem.jeesite.modules.sumdata.service.datatable.SRegBusBdcqzsdjxxService;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.sys.utils.DictUtils;
import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
/**
* 发证信息维护Controller
* @author xuyg
* @version 2015-10-09
*/
@Controller
@RequestMapping(value = "${adminPath}/reg/bus/regBusFz")
public class RegBusFzController extends BaseController {
@Autowired
private RegBusFzService regBusFzService;
@Autowired
private RegBusSzService regBusSzService;
@Autowired
private RegBusQlrService regBusQlrService;
@Autowired
private RegBaseZsglbService regBaseZsglbService;
@Autowired
private RegBusBdcqzsdjxxService regBusBdcqzsdjxxService;
@Autowired
private RegBusSfService regBusSfService;
@Autowired
private RegBusGdService regBusGdService;
@Autowired
private RegBaseZdjbxxService regBaseZdjbxxService;
@Autowired
private RegBaseHService regBaseHService;
@Autowired
private RegBusSlsqService regBusSlsqService;
@Autowired
private RegBusBdcqzsdjxxService RegBusBdcqzsdjxxService;
@Autowired
private RegBusJsydsyqService regBusJsydsyqService;
@Autowired
private RegBaseZrzService regBaseZrzService;
@Autowired
private RegBaseCService regBaseCService;
@Autowired
private RegBusYgdjService regBusYgdjService;
@ModelAttribute
public RegBusFz get(@RequestParam(required=false) String id) {
RegBusFz entity = null;
if (StringUtils.isNotBlank(id)){
entity = regBusFzService.get(id);
}
if (entity == null){
entity = new RegBusFz();
}
return entity;
}
@RequiresPermissions("reg:bus:regBusFz:view")
@RequestMapping(value = {"list", ""})
public String list(RegBusFz regBusFz, HttpServletRequest request, HttpServletResponse response, Model model) {
//按照业务号查询受理表单相关的发证信息
if(StringUtils.isNotBlank(request.getParameter("ywh"))){
regBusFz.setYwh(request.getParameter("ywh"));
model.addAttribute("ywh", request.getParameter("ywh"));
}
if(StringUtils.isNotBlank(regBusFz.getYwh())){
regBusFz.setYwh(regBusFz.getYwh());
}
//归档以后只能查看不能修改删除
if(StringUtils.isNotBlank(request.getParameter("LISTVIEWS"))){
model.addAttribute("LISTVIEWS", "1");
}
Page<RegBusFz> page = regBusFzService.findPage(new Page<RegBusFz>(request, response), regBusFz);
//判断当前是否已有收费记录
if(page.getList().size()>0){
model.addAttribute("ised", "1");
}
model.addAttribute("page", page);
return "modules/reg/bus/regBusFzList";
}
@RequiresPermissions("reg:bus:regBusFz:view")
@RequestMapping(value = "fzlist")
public String fzlist(RegBusFz regBusFz, HttpServletRequest request, HttpServletResponse response, Model model) {
model.addAttribute("ised", "1");
Page<RegBusFz> page = regBusFzService.findPage(new Page<RegBusFz>(request, response), regBusFz);
model.addAttribute("page", page);
return "modules/reg/bus/regBusFzshowList";
}
/**
* 电子档案发证信息查看from
* @param regBusFz
* @param model
* @param request
* @return
*/
@RequiresPermissions("reg:bus:regBusFz:view")
@RequestMapping(value = "fzform")
public String fzform(RegBusFz regBusFz, Model model, HttpServletRequest request) {
String ids = request.getParameter("id");
regBusFz = regBusFzService.get(ids);
model.addAttribute("regBusFz",regBusFz);
return "modules/reg/bus/regBusFzshowForm";
}
@RequiresPermissions("reg:bus:regBusFz:view")
@RequestMapping(value = "form")
public String form(RegBusFz regBusFz, Model model, HttpServletRequest request) {
String ywh = request.getParameter("ywh");
User user = UserUtils.getUser();
model.addAttribute("SLRMC", user.getName());
model.addAttribute("regBusFz", regBusFz);
//传递业务号和要素代码
if(StringUtils.isNotBlank(ywh)){
model.addAttribute("YWH", ywh);
model.addAttribute("YSDM",request.getParameter("YSDM"));
RegBusSz regBusSz = new RegBusSz();
regBusSz.setYwh(ywh);
List<RegBusSz> regBusSzList = regBusSzService.findList(regBusSz);
String szzh = "";
String fzmc = "";
Integer fzsl = 0;
if(regBusSzList.size() > 0){
regBusSz = regBusSzList.get(0);
String year = DateUtils.formatDate(new Date(),"yyyyMMdd");
year = year.substring(0, 4).toString();
RegBaseZsglb regBaseZsglb = new RegBaseZsglb();
regBaseZsglb.setYwh(regBusSz.getYwh());
regBaseZsglb.setIsbf("1");
List<RegBaseZsglb> findList = regBaseZsglbService.findListQc(regBaseZsglb);
if(findList.size() > 0){
for (int i = 0; i < findList.size(); i++) {
regBaseZsglb = findList.get(i);
if(findList.size() == 1){
szzh = year+"-"+regBaseZsglb.getSzzh();
}else {
szzh = year+"-"+regBaseZsglb.getSzzh() +";" + szzh;
}
}
}
fzsl = Integer.valueOf(regBusSz.getSzsl());
fzmc = regBusSz.getSzmc();
}
model.addAttribute("FZSL",fzsl);//发证数量
model.addAttribute("HFZH",szzh);//核发证号
model.addAttribute("FZMC",DictUtils.getDictLabel(fzmc, "reg_bus_szmc",""));
//权利人信息
RegBusQlr regBusQlr = new RegBusQlr();
regBusQlr.setYwh(ywh);
List<RegBusQlr> qlrList = new ArrayList<RegBusQlr>();
qlrList = regBusQlrService.findList_1(regBusQlr);
if(qlrList.size() > 0){
regBusQlr = qlrList.get(qlrList.size()-1);
model.addAttribute("QLRMC",regBusQlr.getQlrmc());//权利人名称
model.addAttribute("ZJH",regBusQlr.getZjh());//证件号
model.addAttribute("ZJZL",regBusQlr.getZjzl());//证件种类
model.addAttribute("DH",regBusQlr.getDh());//电话
model.addAttribute("DZ",regBusQlr.getDz());//地址
model.addAttribute("YB",regBusQlr.getYb());//邮编
if(qlrList.size() > 1){
String qlrmc = "";
for (int i = 0; i < qlrList.size()-1; i++) {
if(i < qlrList.size()-1){
if(StringUtils.isNotBlank(qlrmc)){
qlrmc += ";" + qlrList.get(i).getQlrmc();
}else{
qlrmc += qlrList.get(i).getQlrmc();
}
}
}
model.addAttribute("QLRMC",regBusQlr.getQlrmc()+";"+qlrmc);//第一权利人加上以后权利人,第一权利人排第一
}
}
}
//查看标示
if(StringUtils.isNotBlank(request.getParameter("VIEWS"))){
model.addAttribute("VIEWS", request.getParameter("VIEWS"));
}
return "modules/reg/bus/regBusFzForm";
}
@RequiresPermissions("reg:bus:regBusFz:edit")
@RequestMapping(value = "save")
public String save(RegBusFz regBusFz, Model model, RedirectAttributes redirectAttributes, HttpServletRequest request) {
if (!beanValidator(model, regBusFz)){
return form(regBusFz, model, request);
}
RegBusFz regBusFz1 = new RegBusFz();
regBusFz1.setYwh(regBusFz.getYwh());
List<RegBusFz> regBusFzlist = regBusFzService.findList(regBusFz1);
if(regBusFzlist.size() > 0){
regBusFz1 = regBusFzlist.get(0);
}
regBusFz.setId(regBusFz1.getId());
regBusFzService.save(regBusFz);
addMessage(redirectAttributes, "保存发证信息成功");
return "redirect:"+Global.getAdminPath()+"/reg/bus/regBusFz/?repage&ywh="+regBusFz.getYwh();
}
@RequiresPermissions("reg:bus:regBusFz:edit")
@RequestMapping(value = "delete")
public String delete(RegBusFz regBusFz, RedirectAttributes redirectAttributes) {
regBusFzService.delete(regBusFz);
addMessage(redirectAttributes, "删除发证信息成功");
return "redirect:"+Global.getAdminPath()+"/reg/bus/regBusFz/?repage&ywh="+regBusFz.getYwh();
}
/**
* 判断当前环节提交是否维护信息
* @param request
* @return
* @throws ClientException
* @throws ServerException
*/
@RequiresPermissions("reg:bus:regBusFz:view")
@RequestMapping(value = "taskSubmit")
@ResponseBody
public ModelMap taskSubmit(String YWH, String audits) throws ServerException, ClientException {
ModelMap modelMap = new ModelMap();
//add point for trace the claim operation issue.
ActivitiLog.debug("Begin call taskSubmit action. YWH:"+YWH);
//modified on 2018-05-09 by winner pan
// String ywh = request.getParameter("YWH");
//String audits = request.getParameter("audits");
modelMap.put("success", 1);
if(audits.equals("reg_audit5")){//缮证到收费
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setYwh(YWH);
List<RegBusBdcqzsdjxx> findList = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(findList.size() > 0){
for (int i = 0; i < findList.size(); i++) {
regBusBdcqzsdjxx = findList.get(i);
if(StringUtils.isBlank(regBusBdcqzsdjxx.getBdcqzh())){
modelMap.put("success", 0);
modelMap.put("msg", "繕证信息未维护,请先维护繕证信息!");
break;
//判断印刷序列号是否维护
}else if(StringUtils.isBlank(regBusBdcqzsdjxx.getYsxlh())){
modelMap.put("success", 0);
modelMap.put("msg", "证书编号没有维护,请先维护证书编号!");
break;
//判断缮证信息是否打印
}else if(!"1".equals(regBusBdcqzsdjxx.getIsprint())){
modelMap.put("success", 2);
modelMap.put("msg", "存在未打印证书信息,是否继续?");
break;
}
}
}
}else if(audits.equals("reg_audit56")){//收费提交
RegBusSf regBusSf = new RegBusSf();
regBusSf.setYwh(YWH);
List<RegBusSf> findList = regBusSfService.findList(regBusSf);
if(findList.size() == 0){
modelMap.put("success", 0);
modelMap.put("msg", "收费信息未维护,请先维护收费信息!");
}
}else if(audits.equals("reg_audit6")){//发证提交
RegBusSz regBusSz = new RegBusSz();
regBusSz.setYwh(YWH);
List<RegBusSz> findListsz = regBusSzService.findList(regBusSz);
if(findListsz.size() > 0){
RegBusFz regBusFz = new RegBusFz();
regBusFz.setYwh(YWH);
List<RegBusFz> findList = regBusFzService.findList(regBusFz);
if(findList.size() == 0){
modelMap.put("success", 0);
modelMap.put("msg", "发证信息未维护,请先维护发证信息!");
}
}
}else if(audits.equals("reg_end")){//归档提交
RegBusGd regBusGd = new RegBusGd();
regBusGd.setYwh(YWH);
List<RegBusGd> findList = regBusGdService.findList(regBusGd);
if(findList.size() == 0){
modelMap.put("success", 0);
modelMap.put("msg", "归档信息未维护,请先维护归档信息!");
}
}
//add point for trace the claim operation issue.
ActivitiLog.debug("End call taskSubmit action. YWH:"+YWH);
return modelMap;
}
//---------------------------------------
@RequestMapping(value = "getadtfhtName")
public String getadtfhtName( HttpServletRequest request, RedirectAttributes redirectAttributes,Model model){
String ss="";
RegBaseZdjbxx regBaseZdjbxx=new RegBaseZdjbxx();
RegBaseH regBaseH=new RegBaseH();
RegBusSlsq regBusSlsq=new RegBusSlsq();
RegBusBdcqzsdjxx regBusBdcqzsdjxx=new RegBusBdcqzsdjxx();
List<RegBaseH> totleHList =new ArrayList<RegBaseH>();
List<String> totleZDTpathList =new ArrayList<String>();
List<String> totleHpathList =new ArrayList<String>();
List<String> totleZDTnameList =new ArrayList<String>();
List<String> totleHnameList =new ArrayList<String>();
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxList=new ArrayList<RegBusBdcqzsdjxx>();
JSONArray jsonZdt = new JSONArray();
JSONArray jsonH = new JSONArray();
JSONObject jo = new JSONObject();
if(StringUtils.isNotBlank(request.getParameter("id"))){
regBusSlsq=regBusSlsqService.get(request.getParameter("id"));
regBusBdcqzsdjxx.setYwh(regBusSlsq.getYwh());
regBusBdcqzsdjxx.setIslogout("0");
regBusBdcqzsdjxxList=RegBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxList.size()>0){
//--------------------------------------zdjbxx
regBaseZdjbxx.setZddm(regBusBdcqzsdjxxList.get(0).getBdcdyh().substring(0, 19));
regBaseZdjbxx.setIslogout("0");
List<RegBaseZdjbxx> ZDList = regBaseZdjbxxService.findList(regBaseZdjbxx);
if(ZDList.size()<1){
model.addAttribute("zdtList", "false");
}
else{
for(int zdt=0;zdt<ZDList.size();zdt++){
String temppath=ZDList.get(zdt).getZdt();
String[] as = temppath.split("\\|");
for (int i = 0; i < as.length; i++) {
if(as[i].length()>3){
String str=as[i].replace(" ", "");
String strstr=str.substring(str.length()-3, str.length());
if(str.substring(str.length()-3, str.length()).equals("jpg")){
System.out.println(as[i]);
String[] asChild = as[i].split("/");
totleZDTpathList.add(as[i]);
totleZDTnameList.add(asChild[10]);
//-------------------------
jo = new JSONObject();
jo.put("path", as[i]);
jo.put("name", asChild[10]);
jo.put("id",ZDList.get(zdt).getId());
jo.put("zddm", ZDList.get(zdt).getZddm());
jsonZdt.add(jo);
//----------------------------
}
}
}
}
model.addAttribute("zdtList",ZDList);
model.addAttribute("jsonZdt",jsonZdt);
model.addAttribute("totleZDTpathList",totleZDTpathList);
model.addAttribute("totleZDTnameList",totleZDTnameList);
}
//----------------------------------------------h
for(int i=0;i<regBusBdcqzsdjxxList.size();i++){
regBaseH.setBdcdyh(regBusBdcqzsdjxxList.get(i).getBdcdyh());
regBaseH.setIslogout("0");
List<RegBaseH> HList = regBaseHService.findList(regBaseH);
if(HList.size()>0){
totleHList.addAll(HList);
}
}
if(totleHList.size()>0){
for(int h=0;h<totleHList.size();h++){
String temppath=totleHList.get(h).getFcfht();
String[] as = temppath.split("\\|");
for (int i = 0; i < as.length; i++) {
if(as[i].length()>3){
String str=as[i].replace(" ", "");
String strstr=str.substring(str.length()-3, str.length());
if(str.substring(str.length()-3, str.length()).equals("jpg")){
System.out.println(as[i]);
String[] asChild = as[i].split("/");
totleHpathList.add(as[i]);
totleHnameList.add(asChild[10]);
//-------------------------
jo = new JSONObject();
jo.put("path",as[i]);
jo.put("name",asChild[10]);
jo.put("id",totleHList.get(h).getId());
jo.put("bdcdyh", totleHList.get(h).getBdcdyh());
jsonH.add(jo);
//----------------------------
}
}
}
}
model.addAttribute("hList", totleHList);
model.addAttribute("jsonH", jsonH);
model.addAttribute("totleHpathList", totleHpathList);
model.addAttribute("totleHnameList", totleHnameList);
}
else{
model.addAttribute("hList", "false");
}
//---------------------------------------
model.addAttribute("slsq", regBusSlsq);
}
}
else{
model.addAttribute("zdtList", "false");
model.addAttribute("hList", "false");
model.addAttribute("slsq", "false");
}
return "modules/reg/bus/regbusgetZDTFWFHTList";
}
/* public ModelMap getadtfhtName( HttpServletRequest request, RedirectAttributes redirectAttributes,Model model){
String ss="";
ModelMap modelMap=new ModelMap();
RegBaseZdjbxx regBaseZdjbxx=new RegBaseZdjbxx();
RegBaseH regBaseH=new RegBaseH();
RegBusSlsq regBusSlsq=new RegBusSlsq();
RegBusBdcqzsdjxx regBusBdcqzsdjxx=new RegBusBdcqzsdjxx();
List<RegBaseH> totleHList =new ArrayList<RegBaseH>();
List<String> totleZDTpathList =new ArrayList<String>();
List<String> totleHpathList =new ArrayList<String>();
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxList=new ArrayList<RegBusBdcqzsdjxx>();
if(StringUtils.isNotBlank(request.getParameter("id"))){
regBusSlsq=regBusSlsqService.get(request.getParameter("id"));
regBusBdcqzsdjxx.setYwh(regBusSlsq.getYwh());
regBusBdcqzsdjxx.setIslogout("0");
regBusBdcqzsdjxxList=RegBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxList.size()>0){
//--------------------------------------zdjbxx
regBaseZdjbxx.setZddm(regBusBdcqzsdjxxList.get(0).getBdcdyh().substring(0, 19));
regBaseZdjbxx.setIslogout("0");
List<RegBaseZdjbxx> ZDList = regBaseZdjbxxService.findList(regBaseZdjbxx);
if(ZDList.size()<1){
modelMap.put("zdtList", "false");
}
else{
for(int zdt=0;zdt<ZDList.size();zdt++){
String temppath=ZDList.get(zdt).getZdt();
String[] as = temppath.split("\\|");
for (int i = 0; i < as.length; i++) {
if(as[i].length()>3){
String str=as[i].replace(" ", "");
String strstr=str.substring(str.length()-3, str.length());
if(str.substring(str.length()-3, str.length()).equals("jpg")){
System.out.println(as[i]);
totleZDTpathList.add(as[i]);
}
}
}
}
modelMap.put("zdtList",ZDList);
modelMap.put("totleZDTpathList",totleZDTpathList);
}
//----------------------------------------------h
for(int i=0;i<regBusBdcqzsdjxxList.size();i++){
regBaseH.setBdcdyh(regBusBdcqzsdjxxList.get(i).getBdcdyh());
regBaseH.setIslogout("0");
List<RegBaseH> HList = regBaseHService.findList(regBaseH);
if(HList.size()>0){
totleHList.addAll(HList);
}
}
if(totleHList.size()>1){
for(int h=0;h<totleHList.size();h++){
String temppath=totleHList.get(h).getFcfht();
String[] as = temppath.split("\\|");
for (int i = 0; i < as.length; i++) {
if(as[i].length()>3){
String str=as[i].replace(" ", "");
String strstr=str.substring(str.length()-3, str.length());
if(str.substring(str.length()-3, str.length()).equals("jpg")){
System.out.println(as[i]);
totleHpathList.add(as[i]);
}
}
}
}
modelMap.put("hList", totleHList);
modelMap.put("totleHpathList", totleHpathList);
}
else{
modelMap.put("hList", "false");
}
//---------------------------------------
modelMap.put("slsq", regBusSlsq);
}
}
else{
modelMap.put("zdtList", "false");
modelMap.put("hList", "false");
modelMap.put("slsq", "false");
}
return modelMap;
}*/
//------------------------------------------
@RequestMapping(value = "getZDTFHT")
public String getZDTFHT( HttpServletRequest request, RedirectAttributes redirectAttributes,Model model){
String ss="";
RegBaseZdjbxx regBaseZdjbxx=new RegBaseZdjbxx();
RegBaseH regBaseH=new RegBaseH();
RegBusSlsq regBusSlsq=new RegBusSlsq();
RegBusBdcqzsdjxx regBusBdcqzsdjxx=new RegBusBdcqzsdjxx();
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxList=new ArrayList<RegBusBdcqzsdjxx>();
JSONArray jsonZdt = new JSONArray();
JSONArray jsonH = new JSONArray();
JSONObject jo = new JSONObject();
String zdtList=request.getParameter("zdtList");//宗地基本信息list
String hList=request.getParameter("hList");//h信息list
String totleZDTpathList=request.getParameter("totleZDTpathList");//宗地list中的所有图
String totleHpathList=request.getParameter("totleHpathList");//hList中所有的图
String slsq=request.getParameter("slsq");
String picList=request.getParameter("picList");
List<String> totleZDTpathListChild =new ArrayList<String>();
List<String> totleHpathListChild =new ArrayList<String>();
if(StringUtils.isNotBlank(picList)){
JSONArray jsonArray = JSONArray.fromObject(picList); // 首先把字符串转成 JSONArray 对象
for(int i=0;i<jsonArray.size();i++){
JSONObject jsonObj = JSONObject.fromObject(jsonArray.get(i));
String path=(jsonObj.get("path").toString()).replace("\\/", "/");
if(jsonObj.get("leixing").equals("zdt")){
jo = new JSONObject();
System.out.println(jsonArray.get(i).toString());
jo.put("name",jsonObj.get("name").toString());
jo.put("path",path);
jo.put("leixing",jsonObj.get("leixing").toString());
jsonZdt.add(jo);
}
if(jsonObj.get("leixing").equals("h")){
jo = new JSONObject();
System.out.println(jsonArray.get(i).toString());
jo.put("name",jsonObj.get("name").toString());
jo.put("path",path);
jo.put("leixing",jsonObj.get("leixing").toString());
jsonH.add(jo);
}
}
}
/*if(StringUtils.isNotBlank(zdtList)){
JSONArray jsonArray = JSONArray.fromObject(totleZDTpathList); // 首先把字符串转成 JSONArray 对象
for(int i=0;i<jsonArray.size();i++){
jo = new JSONObject();
jo.put("path",jsonArray.get(i).toString());
jsonZdt.add(jo);
}
model.addAttribute("zdt", jsonZdt);
}
if(StringUtils.isNotBlank(hList)){
JSONArray jsonArray = JSONArray.fromObject(totleHpathList);
for(int i=0;i<jsonArray.size();i++){
jo = new JSONObject();
jo.put("path",jsonArray.get(i).toString());
jsonH.add(jo);
}
model.addAttribute("ht", jsonH);
}*/
/* if(StringUtils.isNotBlank(request.getParameter("id"))){
regBusSlsq=regBusSlsqService.get(request.getParameter("id"));
regBusBdcqzsdjxx.setYwh(regBusSlsq.getYwh());
regBusBdcqzsdjxx.setIslogout("0");
regBusBdcqzsdjxxList=RegBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxList.size()>0){
//--------------------------------------zdjbxx
regBaseZdjbxx.setZddm(regBusBdcqzsdjxxList.get(0).getBdcdyh().substring(0, 19));
regBaseZdjbxx.setIslogout("0");
List<RegBaseZdjbxx> ZDList = regBaseZdjbxxService.findList(regBaseZdjbxx);
if(ZDList.size()>1){
}
else{
jo = new JSONObject();
jo.put("zddm", ZDList.get(0).getZddm());
jo.put("zdmj", ZDList.get(0).getZdmj());
jo.put("zdt", "/ODM/userfiles/8457fed7de104dab9007c478581b067f/files/reg/base/regBaseChxx/2016/10/19/计生局家属院-Model.jpg");
json.put(jo);
}
//----------------------------------------------h
for(int i=0;i<regBusBdcqzsdjxxList.size();i++){
jo = new JSONObject();
regBaseH.setBdcdyh(regBusBdcqzsdjxxList.get(i).getBdcdyh());
regBaseH.setIslogout("0");
List<RegBaseH> HList = regBaseHService.findList(regBaseH);
if(HList.size()>0){
for(int j=0;j<HList.size();j++){
jo = new JSONObject();
jo.put("bdcdyh", HList.get(j).getBdcdyh());
jo.put("fcfht", "/ODM/userfiles/8457fed7de104dab9007c478581b067f/files/reg/base/regBaseChxx/2016/10/19/计生局家属院-Model.jpg");
json.put(jo);
}
}
}
//---------------------------------------
}
model.addAttribute("zdtht", json);
String url = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();//当前访问路径
model.addAttribute("Url", url);
model.addAttribute("id", request.getParameter("id"));
}*/
model.addAttribute("zdt", jsonZdt);
model.addAttribute("ht", jsonH);
String url = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();//当前访问路径
model.addAttribute("Url", url);
return "modules/reg/bus/regbusDyZDTFHT";
}
@RequestMapping(value = "openPic")
public String openPic(HttpServletRequest request, RedirectAttributes redirectAttributes,Model model){
if(StringUtils.isNoneBlank(request.getParameter("path"))){
System.out.println(request.getParameter("path"));
String path=request.getParameter("path").replace("\\/", "/");
System.out.println(path);
model.addAttribute("path", request.getParameter("path").replace("\\/", "/"));
String url = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();//当前访问路径
model.addAttribute("Url", url);
}
return "modules/reg/bus/regbusOpenPic";
}
///////////////////////////////发证环节住建接口数据查询传输//////////////////////////////////////////////////
/**
* 预告登记向必特返回发证数据
* @param tempEntity
* @throws Exception
*/
public String BTYGDJServiceResult(RegBusBdcqzsdjxx tempEntity) throws Exception {
logger.info("进入必特验证=================");
String ygdjdataString="";
RegBaseH regBaseH = regBaseHService.getdy(tempEntity.getBdcdyh());
if(regBaseH != null){
if(StringUtils.isNotBlank(regBaseH.getBtfwbm())){//比特接收过来的房屋数据
String ygdjzl = "";
if(tempEntity.getDjlx().equals("803") || tempEntity.getDjlx().equals("803")){
ygdjzl = "1";
}else if(tempEntity.getDjlx().equals("804")){
ygdjzl = "3";
}
//查询幢信息
RegBaseZrz zrz = new RegBaseZrz();
zrz.setBdcdyh(tempEntity.getBdcdyh().substring(0, 24)+"0000");
List<RegBaseZrz> zrzlist = regBaseZrzService.findList(zrz);
if(zrzlist.size() > 0){
zrz = zrzlist.get(0);
}
RegBusBdcqzsdjxx hdjxx = new RegBusBdcqzsdjxx();
hdjxx.setBdcdyh(tempEntity.getBdcdyh());
hdjxx.setYwh(tempEntity.getYwh());
List<RegBusBdcqzsdjxx> hdjxxlist = regBusBdcqzsdjxxService.findList(hdjxx);
if(hdjxxlist != null && hdjxxlist.size()>0){
hdjxx = hdjxxlist.get(0);
}
RegBusYgdj ygdj = new RegBusYgdj();
ygdj.setBdcdyh(tempEntity.getBdcdyh());
ygdj.setYwh(tempEntity.getYwh());
List<RegBusYgdj> ygdjlist = regBusYgdjService.findList(ygdj);
if(ygdjlist != null && ygdjlist.size()>0){
ygdj = ygdjlist.get(0);
}
RegBusQlr regBusQlr = new RegBusQlr();
List<RegBusQlr> findByYwh = regBusQlrService.findByYwh(tempEntity.getYwh());
if(findByYwh.size() > 0){
ygdjdataString = ygdjdataString+"<qlrList>";
for(int i=0;i<findByYwh.size();i++){
regBusQlr = findByYwh.get(i);
ygdjdataString = ygdjdataString+
"<qlr><qlrxh>"+regBusQlr.getSxh()+"</qlrxh>"+
"<qlrmc>"+regBusQlr.getQlrmc()+"</qlrmc>"+
"<zjh>"+regBusQlr.getZjh()+"</zjh>"+
"<zjzl>"+DictUtils.getDictLabel(regBusQlr.getZjzl(),"reg_bus_zjlx", "")+"</zjzl>"+
"<qlrlx>"+regBusQlr.getQlrlx()+"</qlrlx>"+
"<qlbl>"+regBusQlr.getQlbl()+"</qlbl>"+
"<gyfs>"+regBusQlr.getGyfs()+"</gyfs>"+
"<ywh>"+regBusQlr.getYwh()+"</ywh></qlr>";
}
ygdjdataString = ygdjdataString+"</qlrList>";
}
ygdjdataString = ygdjdataString+"<ygdjList><ygdj><zbm>"+zrz.getBtzrzbm()+"</zbm>"+
"<zh>"+zrz.getZrzh()+"</zh>"+"<zbdcdyh>"+zrz.getBdcdyh()+"</zbdcdyh>"+
"<fwbm>"+regBaseH.getBtfwbm()+"</fwbm>"+"<hbdcdyh>"+regBaseH.getBdcdyh()+"</hbdcdyh>"+
"<ywh>"+regBaseH.getBtfwbm()+"</ywh>"+"<ygdjzl>"+DictUtils.getDictLabel(ygdjzl,"reg_bus_ygdjzl", "")+"</ygdjzl>"+
"<djlx>"+700+"</djlx>"+"<bdcdjzmh>"+hdjxx.getBdcqzh()+"</bdcdjzmh>"+
"<qszt>"+1+"</qszt>"+"<djsj>"+hdjxx.getDbsj()+"</djsj>"+"<djjg>"+ygdj.getDjjg()+"</djjg><djyy></djyy><fj></fj><tdsyqr></tdsyqr><dytdmj></dytdmj><fttdmj></fttdmj><dbr></dbr></ygdj></ygdjList>";
}
}
return ygdjdataString.toString();
}
/**
* 首次登记向必特返回发证数据变化部分数据
* @param tempEntity
* @throws Exception
*/
public String BTSCDJServiceResult(RegBusBdcqzsdjxx tempEntity) throws Exception {
logger.info("进入必特首次登记验证=================");
int bz = 0;
String scdjdataString = "";
RegBaseH regBaseH = regBaseHService.getdy(tempEntity.getBdcdyh());
if(regBaseH != null){
if(StringUtils.isNotBlank(regBaseH.getBtfwbm())){
//查询单独户信息和登记信息
RegBaseH regbaseh = new RegBaseH();
regbaseh.setBdcdyh(tempEntity.getBdcdyh());
regbaseh.setIslogout("0");
List<RegBaseH> hlist = regBaseHService.findList(regBaseH);
if(hlist.size()>0){
regbaseh = hlist.get(0);
}
RegBusBdcqzsdjxx hdjxx = new RegBusBdcqzsdjxx();
hdjxx.setBdcdyh(tempEntity.getBdcdyh());
hdjxx.setYwh(tempEntity.getYwh());
List<RegBusBdcqzsdjxx> hdjxxlist = regBusBdcqzsdjxxService.findList(hdjxx);
if(hdjxxlist != null && hdjxxlist.size()>0){
hdjxx = hdjxxlist.get(0);
}
//开始拼接登记业务报文
scdjdataString = scdjdataString+
"<h><fwbm>"+regBaseH.getBtfwbm()+"</fwbm>"+
"<hbdcdyh>"+regBaseH.getBdcdyh()+"</hbdcdyh>"+
"<qllx>"+DictUtils.getDictLabel(hdjxx.getQllx(),"reg_bus_qllx", "")+"</qllx>"+
"<djlx>"+DictUtils.getDictLabel("100","reg_bus_djlx", "")+"</djlx>"+
"<bdcqzh>"+hdjxx.getBdcqzh()+"</bdcqzh>"+
"<qszt>"+1+"</qszt></h>";
}
}
return scdjdataString.toString();
}
/**
* 首次登记向必特返回发证数据公用数据
* @param tempEntity
* @throws Exception
*/
public String BTSCDJShareServiceResult(RegBusBdcqzsdjxx tempEntity) throws Exception {
logger.info("进入必特首次登记验证=================");
int bz = 0;
String scdjSharedataString = "";
RegBaseH regBaseH = regBaseHService.getdy(tempEntity.getBdcdyh());
if(regBaseH != null){
if(StringUtils.isNotBlank(regBaseH.getBtfwbm())){
//查询首次登记的权利人和该幢楼的土地信息,权属信息,只查一次
//修改宗地面积
RegBaseZdjbxx zdjbxx = new RegBaseZdjbxx();
zdjbxx.setZddm(tempEntity.getZddm());
zdjbxx.setIslogout("0");
List<RegBaseZdjbxx> zdlist = regBaseZdjbxxService.findList(zdjbxx);
if(zdlist != null && zdlist.size()>0){
zdjbxx = zdlist.get(0);
}
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setBdcdyh(zdjbxx.getBdcdyh());
regBusBdcqzsdjxx.setIslogout("0");//未注销
regBusBdcqzsdjxx.setDbsj("NOTNULL");//已登簿
if(zdjbxx.getQllx().equals("3") || zdjbxx.getQllx().equals("7") || zdjbxx.getQllx().equals("5")){
regBusBdcqzsdjxx.setRights("3");
}else if(zdjbxx.getQllx().equals("1")){
regBusBdcqzsdjxx.setRights("1");
}
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxlist != null && regBusBdcqzsdjxxlist.size()>0){
regBusBdcqzsdjxx = regBusBdcqzsdjxxlist.get(0);
}
RegBusJsydsyq regBusJsydsyq = new RegBusJsydsyq();
regBusJsydsyq.setYwh(regBusBdcqzsdjxx.getYwh());
List<RegBusJsydsyq> listregBusJsydsyq = regBusJsydsyqService.findList(regBusJsydsyq);
if(listregBusJsydsyq != null && listregBusJsydsyq.size()>0){
regBusJsydsyq = listregBusJsydsyq.get(0);
}
//开始拼接权利人土地业务报文
scdjSharedataString = scdjSharedataString+
"<zdxx>"+
"<tdzh>"+regBusBdcqzsdjxx.getBdcqzh()+"</tdzh>"+
"<tdsyqssj>"+regBusJsydsyq.getSyqqssj()+"</tdsyqssj>"+
"<tdsyjssj>"+regBusJsydsyq.getSyqjssj()+"</tdsyjssj>"+
"<zdmj>"+zdjbxx.getZdmj()+"</zdmj>"+
"<zl>"+zdjbxx.getZl()+"</zl>"+
"<qlxz>"+DictUtils.getDictLabel(zdjbxx.getQlxz(),"reg_bus_qlxz", "")+"</qlxz>"+
"<tdyt>"+DictUtils.getDictLabel(zdjbxx.getYt(),"reg_bus_tdyt", "")+"</tdyt>"+
"</zdxx>";
//查询幢信息
RegBaseZrz zrz = new RegBaseZrz();
zrz.setBdcdyh(tempEntity.getBdcdyh().substring(0, 24)+"0000");
List<RegBaseZrz> zrzlist = regBaseZrzService.findList(zrz);
if(zrzlist.size() > 0){
zrz = zrzlist.get(0);
}
RegBusQlr regBusQlr = new RegBusQlr();
List<RegBusQlr> findByYwhlist = regBusQlrService.findByYwh(tempEntity.getYwh());
if(findByYwhlist.size() > 0){
scdjSharedataString = scdjSharedataString+"<qlrList>";
for(int i=0;i<findByYwhlist.size();i++){
regBusQlr = findByYwhlist.get(i);
scdjSharedataString = scdjSharedataString+
"<qlr><qlrsxh>"+regBusQlr.getSxh()+"</qlrsxh>"+
"<qlrmc>"+regBusQlr.getQlrmc()+"</qlrmc>"+
"<qlrzjh>"+regBusQlr.getZjh()+"</qlrzjh>"+
"<qlrzjzl>"+DictUtils.getDictLabel(regBusQlr.getZjzl(),"reg_bus_zjlx", "")+"</qlrzjzl>"+
"<qlrlx>"+DictUtils.getDictLabel(regBusQlr.getQlrlx(),"reg_bus_qlrlx", "")+"</qlrlx>"+
"<qlrbl>"+regBusQlr.getQlbl()+"</qlrbl>"+
"<gyfs>"+regBusQlr.getGyfs()+"</gyfs>"+
"<gyqk>"+DictUtils.getDictLabel(regBusQlr.getGyfs(),"reg_bus_gyfs", "")+"</gyqk>"+
"<ywh>"+regBusQlr.getYwh()+"</ywh></qlr>";
}
scdjSharedataString = scdjSharedataString+"</qlrList>";
}
scdjSharedataString = scdjSharedataString+
"<zrz><zrzbm>"+zrz.getBtzrzbm()+"</zrzbm>"+
"<zbdcdyh>"+zrz.getBdcdyh()+"</zbdcdyh></zrz>";
}
}
return scdjSharedataString.toString();
}
/**
* 转移登记向必特返回发证数据
* @param tempEntity
* @throws Exception
*/
public String BTZYDJServiceResult(RegBusBdcqzsdjxx tempEntity) throws Exception {
logger.info("进入必特验证=================");
String zydjdataString="";
//查询权利人数据
RegBusQlr qlr = new RegBusQlr();
qlr.setYwh(tempEntity.getYwh());
List<RegBusQlr> qlrlist = regBusQlrService.findList_1(qlr);
if(qlrlist.size() > 0){
zydjdataString = zydjdataString+"<qlrList>";
for(int i=0;i<qlrlist.size();i++){
qlr = qlrlist.get(i);
zydjdataString = zydjdataString+
"<qlr><qlrsxh>"+qlr.getSxh()+"</qlrsxh>"+
"<qlrmc>"+qlr.getQlrmc()+"</qlrmc>"+
"<qlrzjh>"+qlr.getZjh()+"</qlrzjh>"+
"<qlrzjzl>"+DictUtils.getDictLabel(qlr.getZjzl(),"reg_bus_zjlx", "")+"</qlrzjzl>"+
"<qlrlx>"+DictUtils.getDictLabel(qlr.getQlrlx(),"reg_bus_qlrlx", "")+"</qlrlx>"+
"<qlrbl>"+qlr.getQlbl()+"</qlrbl>"+
"<gyfs>"+qlr.getGyfs()+"</gyfs>"+
"<gyqk>"+DictUtils.getDictLabel(qlr.getGyfs(),"reg_bus_gyfs", "")+"</gyqk>"+
"<ywh>"+qlr.getYwh()+"</ywh></qlr>";
}
zydjdataString = zydjdataString+"</qlrList>";
}
//查询单独户信息和登记信息
RegBaseH regbaseh = new RegBaseH();
regbaseh.setBdcdyh(tempEntity.getBdcdyh());
regbaseh.setIslogout("0");
List<RegBaseH> hlist = regBaseHService.findList(regbaseh);
if(hlist.size()>0){
regbaseh = hlist.get(0);
}
//查询幢信息
RegBaseZrz zrz = new RegBaseZrz();
zrz.setBdcdyh(tempEntity.getBdcdyh().substring(0, 24)+"0000");
List<RegBaseZrz> zrzlist = regBaseZrzService.findList(zrz);
if(zrzlist.size() > 0){
zrz = zrzlist.get(0);
}
RegBusBdcqzsdjxx zydjxx = new RegBusBdcqzsdjxx();
zydjxx.setBdcdyh(tempEntity.getBdcdyh());
zydjxx.setYwh(tempEntity.getYwh());
List<RegBusBdcqzsdjxx> zydjxxlist = regBusBdcqzsdjxxService.findList(zydjxx);
if(zydjxxlist != null && zydjxxlist.size()>0){
zydjxx = zydjxxlist.get(0);
}
zydjdataString = zydjdataString+
"<zrz><zrzbm>"+zrz.getBtzrzbm()+"</zrzbm>"+
"<zh>"+zrz.getZrzh()+"</zh>"+
"<zbdcdyh>"+zrz.getBdcdyh()+"</zbdcdyh></zrz>"+
"<hList><h><fwbm>"+regbaseh.getBtfwbm()+"</fwbm>"+
"<hbdcdyh>"+zydjxx.getBdcdyh()+"</hbdcdyh>"+
"<ywh>"+zydjxx.getYwh()+"</ywh>"+
"<djlx>"+DictUtils.getDictLabel("200","reg_bus_djlx", "")+"</djlx>"+
"<qllx>"+DictUtils.getDictLabel(zydjxx.getQllx(),"reg_bus_qllx", "")+"</qllx>"+
"<bdcqzh>"+tempEntity.getBdcqzh()+"</bdcqzh>"+
"<qszt>"+1+"</qszt></h></hList>";
return zydjdataString.toString();
}
/**
* 首次登记向必特返回发证数据变化部分数据
* @param tempEntity
* @throws Exception
*/
public String BTZJFSCDJServiceResult(RegBusBdcqzsdjxx tempEntity) throws Exception {
logger.info("进入必特首次登记验证=================");
int bz = 0;
String zjfscdjdataString = "";
//查询幢,层,户信息
RegBaseZrz zrz = new RegBaseZrz();
zrz.setBdcdyh(tempEntity.getBdcdyh().substring(0, 24)+"0000");
List<RegBaseZrz> zrzlist = regBaseZrzService.findList(zrz);
if(zrzlist.size() > 0){
zrz = zrzlist.get(0);
}
//查询房屋登记信息
String djxxSharedataString = "";
RegBusBdcqzsdjxx fwdjxx = new RegBusBdcqzsdjxx();
fwdjxx.setBdcdyh(tempEntity.getBdcdyh());
fwdjxx.setIslogout("0");//未注销
fwdjxx.setDbsj("NOTNULL");//已登簿
List<RegBusBdcqzsdjxx> fwregBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findList(fwdjxx);
if(fwregBusBdcqzsdjxxlist != null && fwregBusBdcqzsdjxxlist.size()>0){
zjfscdjdataString = zjfscdjdataString+"<scdjList>";
for(int y=0;y<fwregBusBdcqzsdjxxlist.size();y++){
fwdjxx = fwregBusBdcqzsdjxxlist.get(y);
djxxSharedataString = djxxSharedataString+
"<scdj><zrzh>"+zrz.getZrzh()+"</zrzh>"+"<zbdcdyh>"+zrz.getBdcdyh()+"</zbdcdyh>"+"<hbdcdyh>"+tempEntity.getBdcdyh()+"</hbdcdyh>"+
"<ywh>"+tempEntity.getYwh()+"</ywh>"+"<qllx>"+DictUtils.getDictLabel(tempEntity.getQllx(), "reg_bus_qllx","")+"</qllx>"+"<djlx>"+DictUtils.getDictLabel("100", "reg_bus_djlx","")+"</djlx>"+
"<bdcqzh>"+tempEntity.getBdcqzh()+"</bdcqzh>"+"<qszt>"+1+"</qszt>"+"<qxmc>"+DictUtils.getDictLabel(Global.getAreaCode(), "reg_bus_xq","")+"</qxmc>"+"<djjg></djjg><djyy></djyy>"+
"<fj></fj><tdsyqr></tdsyqr><dytdmj></dytdmj><fttdmj></fttdmj><dbr></dbr><djsj></djsj></scdj>";
}
zjfscdjdataString = zjfscdjdataString+djxxSharedataString+"</scdjList>";
}
return zjfscdjdataString.toString();
}
/**
* 存量首次转移登记向必特返回发证数据变化部分数据
* @param tempEntity
* @throws Exception
*/
public String BTCLFSCZYDJServiceResult(RegBusBdcqzsdjxx tempEntity) throws Exception {
logger.info("进入必特存量房首次转移登记验证=================");
//dataString 传入多套房子的拼接报文
int bz = 0;
String scdjSharedataString = "";
RegBaseH regBaseH = regBaseHService.getdy(tempEntity.getBdcdyh());
if(regBaseH != null){
//查询首次登记的权利人和该幢楼的土地信息,权属信息,只查一次
//修改宗地面积
RegBaseZdjbxx zdjbxx = new RegBaseZdjbxx();
zdjbxx.setZddm(tempEntity.getZddm());
zdjbxx.setIslogout("0");
List<RegBaseZdjbxx> zdlist = regBaseZdjbxxService.findList(zdjbxx);
if(zdlist != null && zdlist.size()>0){
zdjbxx = zdlist.get(0);
}
//查询土地信息
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setBdcdyh(zdjbxx.getBdcdyh());
regBusBdcqzsdjxx.setIslogout("0");//未注销
regBusBdcqzsdjxx.setDbsj("NOTNULL");//已登簿
if(zdjbxx.getQllx().equals("3") || zdjbxx.getQllx().equals("7") || zdjbxx.getQllx().equals("5")){
regBusBdcqzsdjxx.setRights("3");
}else if(zdjbxx.getQllx().equals("1")){
regBusBdcqzsdjxx.setRights("1");
}
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxlist != null && regBusBdcqzsdjxxlist.size()>0){
regBusBdcqzsdjxx = regBusBdcqzsdjxxlist.get(0);
}
//查询幢,层,户信息
RegBaseZrz zrz = new RegBaseZrz();
zrz.setBdcdyh(tempEntity.getBdcdyh().substring(0, 24)+"0000");
List<RegBaseZrz> zrzlist = regBaseZrzService.findList(zrz);
if(zrzlist.size() > 0){
zrz = zrzlist.get(0);
String zzl = zdjbxx.getZl().replace(" ", "")+zrz.getXmmc() + zrz.getGzwmc();
scdjSharedataString = scdjSharedataString+ "<zList><z>"+
"<zh>"+zrz.getZrzh()+"</zh>"+"<zzdmj>"+zrz.getZzdmj()+"</zzdmj>"+"<zydmj>"+zrz.getZydmj()+"</zydmj>"+
"<zl>"+zzl+"</zl>"+"<bdcdyh>"+zrz.getBdcdyh()+"</bdcdyh>"+"<tdzh>"+regBusBdcqzsdjxx.getBdcqzh()+"</tdzh>"+
"<xmmc>"+zrz.getXmmc()+"</xmmc>"+"<zcs>"+zrz.getZcs()+"</zcs>"+"<ghyt>"+DictUtils.getDictLabel(zrz.getGhyt(),"reg_bus_fwyt", "")+"</ghyt>"+
"<fwjg>"+DictUtils.getDictLabel(zrz.getFwjg(),"reg_bus_fwjg", "")+"</fwjg>"+"<scjzmj>"+zrz.getScjzmj()+"</scjzmj>"+"<dscs>"+zrz.getDscs()+"</dscs>"+
"<dxcs>"+zrz.getDxcs()+"</dxcs>"+"<zts>"+zrz.getZts()+"</zts>"+"<jgrq>"+DateUtils.formatDate(zrz.getJgrq(), "yyyy-MM-dd 00:00:00")+"</jgrq>"+
"<jzwgd>"+zrz.getJzwgd()+"</jzwgd>"+"<dxsd>"+zrz.getDxsd()+"</dxsd>"+"<jzwjbyt>"+zrz.getJzwjbyt()+"</jzwjbyt>"+"<bz></bz>";
}
RegBaseC c = regBaseCService.get(regBaseH.getCid());
if(c != null){
scdjSharedataString = scdjSharedataString+"<cList><c>"+
"<ch>"+c.getCh()+"</ch>"+
"<zrzh>"+c.getZrzh()+"</zrzh>"+
"<sjc></sjc><mxc></mxc><cjzmj></cjzmj><ctnjzmj></ctnjzmj><cytmj></cytmj><cgyjzmj></cgyjzmj><cftjzmj></cftjzmj><cbqmj></cbqmj><cg></cg><sptymj></sptymj>";
scdjSharedataString = scdjSharedataString+"<hList><h>"+
"<bdcdyh>"+regBaseH.getBdcdyh()+"</bdcdyh>"+
"<hh>"+regBaseH.getHh()+"</hh>"+"<ch>"+regBaseH.getCh()+"</ch>"+
"<zl>"+regBaseH.getZl()+"</zl>"+"<zrzh>"+regBaseH.getZrzh()+"</zrzh>"+
"<sjc>"+regBaseH.getSjc()+"</sjc>"+"<qsc>"+regBaseH.getBeginc()+"</qsc>"+
"<zzc>"+regBaseH.getEndc()+"</zzc>"+"<mjdw>"+regBaseH.getMjdw()+"</mjdw>"+
"<shbw>"+regBaseH.getShbw()+"</shbw>"+"<fwyt1>"+DictUtils.getDictLabel(regBaseH.getFwyt1(),"reg_bus_fwyt", "")+"</fwyt1>"+
"<hxjg>"+DictUtils.getDictLabel(regBaseH.getHxjg(),"reg_bus_hxjg", "")+"</hxjg>"+"<hx>"+DictUtils.getDictLabel(regBaseH.getHx(),"reg_bus_hx", "")+"</hx>"+
"<fwxz>"+DictUtils.getDictLabel(regBaseH.getFwxz(),"reg_bus_fwxz", "")+"</fwxz>"+"<scjzmj>"+regBaseH.getScjzmj()+"</scjzmj>"+
"<sctnjzmj>"+regBaseH.getSctnjzmj()+"</sctnjzmj>"+"<scftjzmj>"+regBaseH.getScftjzmj()+"</scftjzmj>"+
"<scdxbfjzmj>"+regBaseH.getScdxbfjzmj()+"</scdxbfjzmj>"+"<scqtjzmj>"+regBaseH.getScqtjzmj()+"</scqtjzmj>"+
"<sjcs></sjcs><fwyt2></fwyt2><fwyt3></fwyt3><ycftxs></ycftxs><scftxs></scftxs><gytdmj></gytdmj><fttdmj></fttdmj><fwlx></fwlx><dytdmj></dytdmj><dy>无</dy>";
String qlrSharedataString = "";
RegBusQlr regBusQlr = new RegBusQlr();
List<RegBusQlr> findByYwhlist = regBusQlrService.findByYwh(tempEntity.getYwh());
if(findByYwhlist.size() > 0){
qlrSharedataString = qlrSharedataString+"<qlrList>";
for(int i=0;i<findByYwhlist.size();i++){
regBusQlr = findByYwhlist.get(i);
qlrSharedataString = qlrSharedataString+
"<qlr><qlrxh>"+regBusQlr.getSxh()+"</qlrxh>"+
"<qlrmc>"+regBusQlr.getQlrmc()+"</qlrmc>"+
"<zjh>"+regBusQlr.getZjh()+"</zjh>"+
"<zjzl>"+DictUtils.getDictLabel(regBusQlr.getZjzl(),"reg_bus_zllx", "")+"</zjzl>"+
"<qlrlx>"+DictUtils.getDictLabel(regBusQlr.getQlrlx(), "reg_bus_qlrlx","")+"</qlrlx>"+
"<qlbl>"+regBusQlr.getQlbl()+"</qlbl>"+
"<gyfs>"+regBusQlr.getGyfs()+"</gyfs>"+
"<gyqk>"+DictUtils.getDictLabel(regBusQlr.getGyfs(),"reg_bus_gyfs", "")+"</gyqk>"+
"<ywh>"+regBusQlr.getYwh()+"</ywh><hjszss></hjszss><dz></dz><qllx></qllx><gjdq></gjdq><bz></bz></qlr>";
}
qlrSharedataString = qlrSharedataString+"</qlrList>";
}
scdjSharedataString = scdjSharedataString+qlrSharedataString+
"<sczydj><zrzh>"+zrz.getZrzh()+"</zrzh>"+"<zbdcdyh>"+zrz.getBdcdyh()+"</zbdcdyh>"+"<hbdcdyh>"+tempEntity.getBdcdyh()+"</hbdcdyh>"+
"<ywh>"+tempEntity.getYwh()+"</ywh>"+"<qllx>"+DictUtils.getDictLabel(tempEntity.getQllx(),"reg_bus_qllx", "")+"</qllx>"+"<djlx>"+DictUtils.getDictLabel("100","reg_bus_djdl", "")+"</djlx>"+
"<bdcqzh>"+tempEntity.getBdcqzh()+"</bdcqzh>"+"<qszt>"+1+"</qszt>"+"<qxmc>"+DictUtils.getDictLabel(Global.getAreaCode(), "reg_bus_xq","")+"</qxmc>"+"<djjg></djjg><djyy></djyy>"+
"<fj></fj><tdsyqr></tdsyqr><dytdmj></dytdmj><fttdmj></fttdmj><dbr></dbr><djsj></djsj></sczydj><xzzt><sfdy>"+DictUtils.getDictLabel(regBaseH.getIsdiya(),"reg_bus_isdiya", "")+"</sfdy><sfcf>"+
DictUtils.getDictLabel(regBaseH.getIschafeng(),"reg_bus_ischafeng", "")+"</sfcf><sfyy>"+DictUtils.getDictLabel(regBaseH.getIsyiyi(),"reg_bus_isyiyi", "")+"</sfyy></xzzt>";
}
scdjSharedataString = scdjSharedataString+"</h></hList></c></cList></z></zList>";
System.out.println(scdjSharedataString.toString());
}
return scdjSharedataString.toString();
}
/**
* 增量房首次转移登记向必特返回发证数据公用数据
* @param tempEntity
* @throws Exception
*/
public String BTZJFSCDJShareServiceResult(RegBusBdcqzsdjxx tempEntity) throws Exception {
logger.info("进入必特首次登记验证=================");
//dataString 传入多套房子的拼接报文
int bz = 0;
String scdjSharedataString = "";
RegBaseH regBaseH = regBaseHService.getdy(tempEntity.getBdcdyh());
if(regBaseH != null){
//查询首次登记的权利人和该幢楼的土地信息,权属信息,只查一次
//修改宗地面积
RegBaseZdjbxx zdjbxx = new RegBaseZdjbxx();
zdjbxx.setZddm(tempEntity.getZddm());
zdjbxx.setIslogout("0");
List<RegBaseZdjbxx> zdlist = regBaseZdjbxxService.findList(zdjbxx);
if(zdlist != null && zdlist.size()>0){
zdjbxx = zdlist.get(0);
}
//查询土地信息
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setBdcdyh(zdjbxx.getBdcdyh());
regBusBdcqzsdjxx.setIslogout("0");//未注销
regBusBdcqzsdjxx.setDbsj("NOTNULL");//已登簿
if(zdjbxx.getQllx().equals("3") || zdjbxx.getQllx().equals("7") || zdjbxx.getQllx().equals("5")){
regBusBdcqzsdjxx.setRights("3");
}else if(zdjbxx.getQllx().equals("1")){
regBusBdcqzsdjxx.setRights("1");
}
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxlist != null && regBusBdcqzsdjxxlist.size()>0){
regBusBdcqzsdjxx = regBusBdcqzsdjxxlist.get(0);
}
//查询幢,层,户信息
String zrzsharedataString = "";
RegBaseZrz zrz = new RegBaseZrz();
zrz.setBdcdyh(tempEntity.getBdcdyh().substring(0, 24)+"0000");
List<RegBaseZrz> zrzlist = regBaseZrzService.findList(zrz);
if(zrzlist.size() > 0){
zrz = zrzlist.get(0);
String zzl = zdjbxx.getZl().replace(" ", "")+zrz.getXmmc() + zrz.getGzwmc();
zrzsharedataString = zrzsharedataString+ "<zList><z>"+
"<zh>"+zrz.getZrzh()+"</zh>"+"<zzdmj>"+zrz.getZzdmj()+"</zzdmj>"+"<zydmj>"+zrz.getZydmj()+"</zydmj>"+
"<zl>"+zzl+"</zl>"+"<bdcdyh>"+zrz.getBdcdyh()+"</bdcdyh>"+"<tdzh>"+regBusBdcqzsdjxx.getBdcqzh()+"</tdzh>"+
"<xmmc>"+zrz.getXmmc()+"</xmmc>"+"<zcs>"+zrz.getZcs()+"</zcs>"+"<ghyt>"+DictUtils.getDictLabel(zrz.getGhyt(),"reg_bus_fwyt", "")+"</ghyt>"+
"<fwjg>"+DictUtils.getDictLabel(zrz.getFwjg(),"reg_bus_fwjg", "")+"</fwjg>"+"<scjzmj>"+zrz.getScjzmj()+"</scjzmj>"+"<dscs>"+zrz.getDscs()+"</dscs>"+
"<dxcs>"+zrz.getDxcs()+"</dxcs>"+"<zts>"+zrz.getZts()+"</zts>"+"<jgrq>"+DateUtils.formatDate(zrz.getJgrq(), "yyyy-MM-dd 00:00:00")+"</jgrq>"+
"<jzwgd>"+zrz.getJzwgd()+"</jzwgd>"+"<dxsd>"+zrz.getDxsd()+"</dxsd>"+"<jzwjbyt>"+zrz.getJzwjbyt()+"</jzwjbyt>"+"<bz></bz>";
}
String qlrSharedataString = "";
RegBusQlr regBusQlr = new RegBusQlr();
List<RegBusQlr> findByYwhlist = regBusQlrService.findByYwh(tempEntity.getYwh());
if(findByYwhlist.size() > 0){
qlrSharedataString = qlrSharedataString+"<qlrList>";
for(int i=0;i<findByYwhlist.size();i++){
regBusQlr = findByYwhlist.get(i);
qlrSharedataString = qlrSharedataString+
"<qlr><qlrxh>"+regBusQlr.getSxh()+"</qlrxh>"+
"<qlrmc>"+regBusQlr.getQlrmc()+"</qlrmc>"+
"<zjh>"+regBusQlr.getZjh()+"</zjh>"+
"<zjzl>"+DictUtils.getDictLabel(regBusQlr.getZjzl(),"reg_bus_zllx", "")+"</zjzl>"+
"<qlrlx>"+DictUtils.getDictLabel(regBusQlr.getQlrlx(), "reg_bus_qlrlx","")+"</qlrlx>"+
"<qlbl>"+regBusQlr.getQlbl()+"</qlbl>"+
"<gyfs>"+regBusQlr.getGyfs()+"</gyfs>"+
"<gyqk>"+DictUtils.getDictLabel(regBusQlr.getGyfs(),"reg_bus_gyfs", "")+"</gyqk>"+
"<ywh>"+regBusQlr.getYwh()+"</ywh><hjszss></hjszss><dz></dz><qllx></qllx><gjdq></gjdq><bz></bz></qlr>";
}
qlrSharedataString = qlrSharedataString+"</qlrList>";
}
RegBaseC c = new RegBaseC();
c.setZid(zrz.getId());
List<RegBaseC> clist = regBaseCService.findList(c);
if(clist.size() > 0){
scdjSharedataString = scdjSharedataString+"<cList>";
for(int i=0;i<clist.size();i++){
c = clist.get(i);
scdjSharedataString = scdjSharedataString+
"<c><ch>"+c.getCh()+"</ch>"+
"<zrzh>"+c.getZrzh()+"</zrzh>"+
"<sjc></sjc><mxc></mxc><cjzmj></cjzmj><ctnjzmj></ctnjzmj><cytmj></cytmj><cgyjzmj></cgyjzmj><cftjzmj></cftjzmj><cbqmj></cbqmj><cg></cg><sptymj></sptymj>";
RegBaseH h = new RegBaseH();
h.setCid(c.getId());
List<RegBaseH> hlist = regBaseHService.findList(h);
if(hlist.size() > 0){
scdjSharedataString = scdjSharedataString+"<hList>";
for(int t=0;t<hlist.size();t++){
h = hlist.get(t);
scdjSharedataString = scdjSharedataString+
"<h><bdcdyh>"+h.getBdcdyh()+"</bdcdyh>"+
"<hh>"+h.getHh()+"</hh>"+"<ch>"+h.getCh()+"</ch>"+
"<zl>"+h.getZl()+"</zl>"+"<zrzh>"+h.getZrzh()+"</zrzh>"+
"<sjc>"+h.getSjc()+"</sjc>"+"<qsc>"+h.getBeginc()+"</qsc>"+
"<zzc>"+h.getEndc()+"</zzc>"+"<mjdw>"+h.getMjdw()+"</mjdw>"+
"<shbw>"+h.getShbw()+"</shbw>"+"<fwyt1>"+DictUtils.getDictLabel(h.getFwyt1(),"reg_bus_fwyt", "")+"</fwyt1>"+
"<hxjg>"+DictUtils.getDictLabel(h.getHxjg(),"reg_bus_hxjg", "")+"</hxjg>"+"<hx>"+DictUtils.getDictLabel(h.getHx(),"reg_bus_hx", "")+"</hx>"+
"<fwxz>"+DictUtils.getDictLabel(h.getFwxz(),"reg_bus_fwxz", "")+"</fwxz>"+"<scjzmj>"+h.getScjzmj()+"</scjzmj>"+
"<sctnjzmj>"+h.getSctnjzmj()+"</sctnjzmj>"+"<scftjzmj>"+h.getScftjzmj()+"</scftjzmj>"+
"<scdxbfjzmj>"+h.getScdxbfjzmj()+"</scdxbfjzmj>"+"<scqtjzmj>"+h.getScqtjzmj()+"</scqtjzmj>"+
"<sjcs></sjcs><fwyt2></fwyt2><fwyt3></fwyt3><ycftxs></ycftxs><scftxs></scftxs><gytdmj></gytdmj><fttdmj></fttdmj><fwlx></fwlx><dytdmj></dytdmj><dy>无</dy>";
//查询房屋登记信息
RegBusBdcqzsdjxx fwdjxx = new RegBusBdcqzsdjxx();
fwdjxx.setBdcdyh(h.getBdcdyh());
fwdjxx.setIslogout("0");//未注销
fwdjxx.setRights("1");
fwdjxx.setDbsj("NOTNULL");//已登簿
List<RegBusBdcqzsdjxx> fwregBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findList(fwdjxx);
if(fwregBusBdcqzsdjxxlist != null && fwregBusBdcqzsdjxxlist.size()>0){
scdjSharedataString = scdjSharedataString+qlrSharedataString+"<scdjList>";
for(int y=0;y<fwregBusBdcqzsdjxxlist.size();y++){
fwdjxx = fwregBusBdcqzsdjxxlist.get(y);
scdjSharedataString = scdjSharedataString+
"<scdj><zrzh>"+zrz.getZrzh()+"</zrzh>"+"<zbdcdyh>"+zrz.getBdcdyh()+"</zbdcdyh>"+"<hbdcdyh>"+tempEntity.getBdcdyh()+"</hbdcdyh>"+
"<ywh>"+tempEntity.getYwh()+"</ywh>"+"<qllx>"+DictUtils.getDictLabel(tempEntity.getQllx(),"reg_bus_qllx", "")+"</qllx>"+"<djlx>"+DictUtils.getDictLabel("100","reg_bus_djdl", "")+"</djlx>"+
"<bdcqzh>"+tempEntity.getBdcqzh()+"</bdcqzh>"+"<qszt>"+1+"</qszt>"+"<xqmc>"+DictUtils.getDictLabel(Global.getAreaCode(), "reg_bus_xq","")+"</xqmc>"+"<djjg></djjg><djyy></djyy>"+
"<fj></fj><tdsyqr></tdsyqr><dytdmj></dytdmj><fttdmj></fttdmj><dbr></dbr><djsj></djsj></scdj>";
}
scdjSharedataString = scdjSharedataString+"</scdjList></h>";
}
}
scdjSharedataString = scdjSharedataString+"</hList>";
}
scdjSharedataString = scdjSharedataString+"</c>";
}
scdjSharedataString = scdjSharedataString+"</cList>";
}
scdjSharedataString = zrzsharedataString+scdjSharedataString+"</z></zList>";
System.out.println(scdjSharedataString.toString());
}
return scdjSharedataString.toString();
}
/**
* WSService向必特发送数据 预告登记
*/
public void SendWSService(String dataString,String djlx,String qlxz,String clzl) throws Exception {
try{
WSService ws = new WSEndpointServiceLocator().getWSEndpointPort();
if("1".equals(clzl)){
if("803".equals(djlx)){
logger.info("预告登记发送的数据*******"+dataString.toString());
String retxml = ws.bizCompleteInfo(dataString);
logger.info("必特返回================="+retxml);
}
if("207".equals(djlx) && !qlxz.contains("自建房")){
logger.info("首次登记发送的数据*******"+dataString.toString());
String retxml = ws.scdjCompleteInfo(dataString);
logger.info("必特返回================="+retxml);
}
if("207".equals(djlx) && qlxz.contains("自建房")){
logger.info("自建房首次登记发送的数据*******"+dataString.toString());
String retxml = ws.zjfInfo(dataString);
logger.info("必特返回================="+retxml);
}
if("302".equals(djlx)){
logger.info("转移登记发送的数据*******"+dataString.toString());
String retxml = ws.zydjCompleteInfo(dataString);
logger.info("必特返回================="+retxml);
}
}
if("2".equals(clzl)){
logger.info("存量数据首次转移登记发送的数据*******"+dataString.toString());
String retxml = ws.clfInfo(dataString);
logger.info("必特返回================="+retxml);
}
}catch(Exception e){
e.printStackTrace();
}
}
/**
* 必特报文拼接
*/
public void SendBTMessageHeadTail(String dataStringinfo,String djlx,String qlxz,String clzl) throws Exception {
String senddataString=null;
String dataStringHead=null;
String dataStringTail=null;
try{
String userid = UserUtils.getUser().getId();
//市局必特数据返回,开始拼接必特报文头
UUID uuid = UUID.randomUUID();
String scid = uuid.toString();
SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");//设置日期格式
String date = df.format(new Date());
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
long timestamp = cal.getTimeInMillis();
String request_time = String.valueOf(timestamp/1000);
//报文头
dataStringHead = "<data>"+
"<head>"+
"<trans_seq_no>"+scid+"</trans_seq_no>"+
"<request_time>"+request_time+"</request_time>"+
"<system_id>"+userid+"</system_id>"+
"<request_date>"+date+"</request_date>"+
"</head>"+
"<body>";
//报文尾
dataStringTail = "</body>"+
"</data>";
senddataString = (dataStringHead.toString()+dataStringinfo.toString()+dataStringTail.toString()).toString();
logger.debug(senddataString.toString());
System.out.println(senddataString);
//发送报文
SendWSService(senddataString.toString(),djlx,qlxz,clzl);
}catch(Exception e){
e.printStackTrace();
}
}
}