ff4316060e795767a334b994935aaf0e0b48029b.svn-base
44.6 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
/**
* Copyright © 2015-2018 ODM All rights reserved.
*/
package com.thinkgem.jeesite.modules.reg.web.bus;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBaseH;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusBdcqzsdjxx;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusCfdj;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusDyaq;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusFdcq2;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusQlr;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusQlrRelationYwh;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusSlsq;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusYydj;
import com.thinkgem.jeesite.modules.reg.service.base.RegBaseHService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusBdcqzsdjxxService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusFdcq2Service;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusQlrService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusQlrrelationYwhService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusSlsqService;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusYydjService;
import com.thinkgem.jeesite.modules.reg.utils.RegUtils;
import com.thinkgem.jeesite.modules.sys.entity.Dict;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.sys.utils.DictUtils;
import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
/**
* 异议登记信息业务表单Controller
* @author xuyg
* @version 2015-10-28
*/
@Controller
@RequestMapping(value = "${adminPath}/reg/bus/regBusYydj")
public class RegBusYydjController extends BaseController {
@Autowired
private RegBusYydjService regBusYydjService;
@Autowired
private RegBusSlsqService regBusSlsqService;
@Autowired
private RegBusBdcqzsdjxxService regBusBdcqzsdjxxService;
@Autowired
private RegBaseHService regBaseHService;
@Autowired
private RegBusQlrService regBusQlrService;
@Autowired
private RegBusQlrrelationYwhService regBusQlrrelationYwhService;
@Autowired
private RegBusFdcq2Service regBusFdcq2Service;
@ModelAttribute
public RegBusYydj get(@RequestParam(required=false) String id) {
RegBusYydj entity = null;
if (StringUtils.isNotBlank(id)){
entity = regBusYydjService.get(id);
}
if (entity == null){
entity = new RegBusYydj();
}
return entity;
}
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value = {"list", ""})
public String list(RegBusYydj regBusYydj, HttpServletRequest request, HttpServletResponse response, Model model) {
String isLogout = request.getParameter("isLogout");
String ywh = request.getParameter("ywh");
if(StringUtils.isNotEmpty(isLogout) && isLogout.equals("1")){
if (StringUtils.isNotBlank(ywh)) {
RegBusYydj temp = regBusYydjService.getByZxywh(ywh);
if(temp != null && StringUtils.isNotEmpty(temp.getYwh())){
regBusYydj.setYwh(temp.getYwh());//注销后 加载数据 根据注销业务号
}
}
}else{
if (StringUtils.isNotBlank(ywh)) {
regBusYydj.setYwh(ywh);
}
}
// 传递要素代码
if (StringUtils.isNotBlank(request.getParameter("ywh"))) {
model.addAttribute("YWH", request.getParameter("ywh"));
model.addAttribute("YSDM", request.getParameter("YSDM"));
}
// 初审以后的环节只能查看不能修改删除
if (StringUtils.isNotBlank(request.getParameter("LISTVIEWS"))) {
model.addAttribute("LISTVIEWS", "1");
}
//WinOpen标示
if(StringUtils.isNotBlank(request.getParameter("WO"))){
model.addAttribute("WO", "1");
model.addAttribute("LISTVIEWS", "1");
}
//页面操作类型【新增还是更新】
if(StringUtils.isNotBlank(request.getParameter("optype"))){
model.addAttribute("optype", "update");
}
Page<RegBusYydj> page = regBusYydjService.findPage(new Page<RegBusYydj>(request, response), regBusYydj);
model.addAttribute("page", page);
return "modules/reg/bus/regBusYydjList";
}
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value = "fwyylist")
public String fwyylist(RegBusYydj regBusYydj, HttpServletRequest request, HttpServletResponse response, Model model) {
String isLogout = request.getParameter("isLogout");
String ywh = request.getParameter("ywh");
if(StringUtils.isNotEmpty(isLogout) && isLogout.equals("1")){
if (StringUtils.isNotBlank(ywh)) {
RegBusYydj temp = regBusYydjService.getByZxywh(ywh);
if(temp != null && StringUtils.isNotEmpty(temp.getYwh())){
regBusYydj.setYwh(temp.getYwh());//注销后 加载数据 根据注销业务号
}
}
}else{
if (StringUtils.isNotBlank(ywh)) {
regBusYydj.setYwh(ywh);
}
}
// 传递要素代码
if (StringUtils.isNotBlank(request.getParameter("ywh"))) {
model.addAttribute("YWH", request.getParameter("ywh"));
model.addAttribute("YSDM", request.getParameter("YSDM"));
}
// 初审以后的环节只能查看不能修改删除
if (StringUtils.isNotBlank(request.getParameter("LISTVIEWS"))) {
model.addAttribute("LISTVIEWS", "1");
}
//WinOpen标示
if(StringUtils.isNotBlank(request.getParameter("WO"))){
model.addAttribute("WO", "1");
model.addAttribute("LISTVIEWS", "1");
}
//WinOpen标示
if(StringUtils.isNotBlank(request.getParameter("WWO"))){
model.addAttribute("WWO", "1");
model.addAttribute("LISTVIEWS", "1");
}
//页面操作类型【新增还是更新】
if(StringUtils.isNotBlank(request.getParameter("optype"))){
model.addAttribute("optype", "update");
}
if(StringUtils.isNotBlank(request.getParameter("cw"))){
if(request.getParameter("cw").equals("2")){
model.addAttribute("cw", "所选择异议的房屋权利人信息不一致,不能查封,请重新确认选择!");
}
}
Page<RegBusYydj> page = regBusYydjService.findPage(new Page<RegBusYydj>(request, response), regBusYydj);
model.addAttribute("page", page);
return "modules/reg/bus/regBusfwyydjList";
}
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value = "fwyyzxlist")
public String fwyyzxlist(RegBusYydj regBusYydj, HttpServletRequest request, HttpServletResponse response, Model model) {
String isLogout = request.getParameter("isLogout");
String zxyyywh = request.getParameter("zxyyywh");
if(StringUtils.isNotEmpty(isLogout) && isLogout.equals("1")){
if (StringUtils.isNotBlank(zxyyywh)) {
RegBusYydj temp = regBusYydjService.getByZxywh(zxyyywh);
if(temp != null && StringUtils.isNotEmpty(temp.getYwh())){
regBusYydj.setZxyyywh(temp.getYwh());//注销后 加载数据 根据注销业务号
}
}
}else{
if (StringUtils.isNotBlank(zxyyywh)) {
regBusYydj.setZxyyywh(zxyyywh);
}
}
// 传递要素代码
if (StringUtils.isNotBlank(request.getParameter("zxyyywh"))) {
model.addAttribute("ZXYYYWH", request.getParameter("zxyyywh"));
model.addAttribute("YSDM", request.getParameter("YSDM"));
}
// 初审以后的环节只能查看不能修改删除
if (StringUtils.isNotBlank(request.getParameter("LISTVIEWS"))) {
model.addAttribute("LISTVIEWS", "1");
}
//WinOpen标示
if(StringUtils.isNotBlank(request.getParameter("WO"))){
model.addAttribute("WO", "1");
model.addAttribute("LISTVIEWS", "1");
}
//WinOpen标示
if(StringUtils.isNotBlank(request.getParameter("WWO"))){
model.addAttribute("WWO", "1");
model.addAttribute("LISTVIEWS", "1");
}
//页面操作类型【新增还是更新】
if(StringUtils.isNotBlank(request.getParameter("optype"))){
model.addAttribute("optype", "update");
}
if(StringUtils.isNotBlank(request.getParameter("cw"))){
if(request.getParameter("cw").equals("2")){
model.addAttribute("cw", "所选择异议的房屋权利人信息不一致,不能查封,请重新确认选择!");
}
}
Page<RegBusYydj> page = regBusYydjService.findPage(new Page<RegBusYydj>(request, response), regBusYydj);
model.addAttribute("page", page);
return "modules/reg/bus/regBusfwyyzxdjList";
}
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value = "form")
public String form(RegBusYydj regBusYydj, Model model, HttpServletRequest request) {
User user = UserUtils.getUser();
String bdcqzsdjxxID = request.getParameter("BdcqzsdjxxID");
String isLogout = request.getParameter("isLogout");
String ywh = request.getParameter("ywh");
String ysdm = request.getParameter("YSDM");
//两种情况 是 首次登记 还是注销登记
if(StringUtils.isNotEmpty(bdcqzsdjxxID)){
RegBusBdcqzsdjxx regBusBdcqzsdjxx = regBusBdcqzsdjxxService.get(bdcqzsdjxxID);
if(isLogout.equals("0")){
regBusYydj.setYwh(ywh);
List<RegBusYydj> listDyaq = regBusYydjService.findList(regBusYydj);
if(listDyaq !=null && listDyaq.size()>0){
regBusYydj = listDyaq.get(0);
}else{
regBusYydj.setBdcdyh(regBusBdcqzsdjxx.getBdcdyh());//不动产单元号
regBusYydj.setBdcdyh(regBusBdcqzsdjxx.getBdcqzh());
}
}else if(isLogout.equals("1")){ //做注销抵押时候,应该已经登记过抵押了
regBusYydj.setYwh(regBusBdcqzsdjxx.getYwh());//应该是首次登记时候的业务号 也就是上次抵押时候的业务号
List<RegBusYydj> listYydj = regBusYydjService.findList(regBusYydj);
if(listYydj !=null && listYydj.size()>0){
regBusYydj = listYydj.get(0);
}
regBusYydj.setZxyydbr(user.getLoginName());
regBusYydj.setZxyyywh(ywh);//注销抵押业务号
regBusYydj.setZxyydjsj(new Date());//注销时间
}
}
// 传递要素代码
if (StringUtils.isNotBlank(ywh)) {
model.addAttribute("YWH",ywh);
model.addAttribute("YSDM",ysdm );
}
// 查看标示
String view = request.getParameter("VIEWS");
if (StringUtils.isNotBlank(view)) {
model.addAttribute("VIEWS", view);
}
model.addAttribute("regBusYydj", regBusYydj);
return "modules/reg/bus/regBusYydjForm";
}
/**
* 房屋异议选择房屋后的判断
* @param request
* @return
*/
@RequiresPermissions("reg:bus:regBusBdcqzsdjxx:view")
@RequestMapping(value = "yyinfoquery")
@ResponseBody
public ModelMap yyinfoquery(HttpServletRequest request) {
ModelMap modelMap = new ModelMap();
modelMap.put("success", 0);
String ywh = request.getParameter("YWH");//当前业务号
String ids = request.getParameter("selectedIDs");
RegBusYydj yydj = new RegBusYydj();
//首先获取通过楼盘已选择的房屋信息列表
//选择的 房屋信息
String[] idList = ids.split(";");
RegBaseH regBaseH = new RegBaseH();
for(String fwid : idList){
regBaseH = regBaseHService.get(fwid);
//判断其是否已经有在在做的异议登记业务并且是未发证的
RegBusBdcqzsdjxx regBusBdcqzsdjxxnew = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxxnew.setBdcdyh(regBaseH.getBdcdyh());
regBusBdcqzsdjxxnew.setIslogout("0");//未注销
regBusBdcqzsdjxxnew.setFzsj("NOTNULL");
regBusBdcqzsdjxxnew.setDjlx("703");
regBusBdcqzsdjxxnew.setRights("1");
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxlistnew = regBusBdcqzsdjxxService.findzyList(regBusBdcqzsdjxxnew);
if(regBusBdcqzsdjxxlistnew.size() > 0){
if(ywh.equals(regBusBdcqzsdjxxlistnew.get(0).getYwh())){
modelMap.put("success", 0);
}else{
modelMap.put("success", 2);
break;
}
}
//权利人信息判断其是否具有所有权
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setBdcdyh(regBaseH.getBdcdyh());
regBusBdcqzsdjxx.setIslogout("0");//未注销
regBusBdcqzsdjxx.setDbsj("NOTNULL");//已登簿
regBusBdcqzsdjxx.setRights("1");
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findzyList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxlist.size() <= 0){
modelMap.put("success", 1);
break;
}
}
return modelMap;
}
/**
* 房屋选择楼盘异议form页面
* @param regBusYydj
* @param model
* @param request
* @return
*/
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value = "Fwyyform")
public String Fwyyform(RegBusYydj regBusYydj, Model model, HttpServletRequest request) {
User user = UserUtils.getUser();
String isLogout = request.getParameter("isLogout");
String ywh = request.getParameter("YWH");
String ysdm = request.getParameter("YSDM");
String djlx = request.getParameter("djlx");
String wo = request.getParameter("WO");
String selectedIDs = request.getParameter("selectedIDs");
String zh = request.getParameter("zh");
String zid = request.getParameter("ZID");
String optype = request.getParameter("optype");
String bj = request.getParameter("bj");
Page<RegBaseH> fwpage = new Page<RegBaseH>();
if(StringUtils.isNotEmpty(selectedIDs)){
model.addAttribute("IDS", selectedIDs);
String bdcdyh = "";
String[] idList = selectedIDs.split(";");
List<RegBaseH> fwlist = new ArrayList<RegBaseH>();
RegBaseH regBaseH = new RegBaseH();
for(String fwid : idList){
regBaseH = regBaseHService.get(fwid);
bdcdyh = regBaseH.getBdcdyh();
model.addAttribute("BDCDYH", bdcdyh);
//把选择后的房屋信息填入list中
fwlist.add(regBaseH);
}
fwpage.setList(fwlist);
model.addAttribute("fwpage", fwpage);//返回选择后的房屋列表
//权利人信息
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setBdcdyh(regBaseH.getBdcdyh());
regBusBdcqzsdjxx.setIslogout("0");//未注销
regBusBdcqzsdjxx.setDbsj("NOTNULL");//已登簿
regBusBdcqzsdjxx.setRights("1");
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findzyList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxlist.size() > 0){
RegBusQlr regBusQlr = new RegBusQlr();
regBusQlr.setYwh(regBusBdcqzsdjxxlist.get(0).getYwh());
List<RegBusQlr> regBusQlrlist = regBusQlrService.findListSxh(regBusQlr);
if(regBusQlrlist.size() > 0){
//权利人信息列表
Page<RegBusQlr> qlrpage = new Page<RegBusQlr>();
List<RegBusQlr> qlrlist = new ArrayList<RegBusQlr>();
for(int i=0;i<regBusQlrlist.size() ;i++){
regBusQlr = regBusQlrlist.get(i);
regBusQlr.setBdcdyh(regBaseH.getBdcdyh());
qlrlist.add(regBusQlr);
qlrpage.setList(qlrlist);
}
model.addAttribute("qlrpage", qlrpage);
regBusYydj.setBdcqzh(regBusBdcqzsdjxxlist.get(0).getBdcqzh());
}
}
}
regBusYydj.setQxdm(Global.getAreaCode());
model.addAttribute("regBusYydj", regBusYydj);
if(StringUtils.isNotBlank(djlx)){
model.addAttribute("DJLX", djlx);
}
if(StringUtils.isNotBlank(selectedIDs)){
model.addAttribute("selectedIDs", selectedIDs);
}
if(StringUtils.isNotBlank(zh)){
model.addAttribute("zh", zh);
}
if(StringUtils.isNotBlank(zid)){
model.addAttribute("zid", zid);
}
// 传递要素代码
if (StringUtils.isNotBlank(wo)) {
if(bj != null){
model.addAttribute("WO","2");
}else{
model.addAttribute("WO","1");
}
}
if (StringUtils.isNotBlank(optype)) {
model.addAttribute("optype","2");
}
// 传递要素代码
if (StringUtils.isNotBlank(ywh)) {
model.addAttribute("YWH",ywh);
model.addAttribute("YSDM",ysdm );
}
// 查看标示
String view = request.getParameter("VIEWS");
if (StringUtils.isNotBlank(view)) {
model.addAttribute("VIEWS", view);
}
regBusYydj.setQszt("0");
model.addAttribute("regBusYydj", regBusYydj);
return "modules/reg/bus/regBusFwyydjForm";
}
/**
* 房屋异议注销from页面
* @param regBusYydj
* @param model
* @param request
* @return
*/
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value = "Fwyyzxform")
public String Fwyyzxform(RegBusYydj regBusYydj, Model model, HttpServletRequest request) {
User user = UserUtils.getUser();
String YWH = request.getParameter("YWH");
String ysdm = request.getParameter("YSDM");
String djlx = request.getParameter("djlx");
String wo = request.getParameter("WO");
//获取选择的异议权属信息
String jid = request.getParameter("jid");
regBusYydj = regBusYydjService.get(jid);
//房屋信息
Page<RegBaseH> fwpage = new Page<RegBaseH>();
List<RegBaseH> fwlist = new ArrayList<RegBaseH>();
RegBaseH regBaseH = new RegBaseH();
regBaseH.setBdcdyh(regBusYydj.getBdcdyh());
List<RegBaseH> hlist = regBaseHService.findList(regBaseH);
if(hlist.size() > 0){
regBaseH = hlist.get(0);
model.addAttribute("BDCDYH", regBaseH.getBdcdyh());
//把选择后的房屋信息填入list中
fwlist.add(regBaseH);
fwpage.setList(fwlist);
model.addAttribute("fwpage", fwpage);//返回选择后的房屋列表
//权利人信息
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setYwh(regBusYydj.getYwh());
regBusBdcqzsdjxx.setBdcdyh(regBaseH.getBdcdyh());
regBusBdcqzsdjxx.setDjlx("703");
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxlist.size() > 0){
regBusBdcqzsdjxx = regBusBdcqzsdjxxlist.get(0);
RegBusBdcqzsdjxx regBusBdcqzsdjxxold =regBusBdcqzsdjxxService.get(regBusBdcqzsdjxx.getOldid());
RegBusQlr regBusQlr = new RegBusQlr();
regBusQlr.setYwh(regBusBdcqzsdjxxold.getYwh());
List<RegBusQlr> regBusQlrlist = regBusQlrService.findListSxh(regBusQlr);
if(regBusQlrlist.size() > 0){
//权利人信息列表
Page<RegBusQlr> qlrpage = new Page<RegBusQlr>();
List<RegBusQlr> qlrlist = new ArrayList<RegBusQlr>();
for(int i=0;i<regBusQlrlist.size() ;i++){
regBusQlr = regBusQlrlist.get(i);
regBusQlr.setBdcdyh(regBaseH.getBdcdyh());
qlrlist.add(regBusQlr);
qlrpage.setList(qlrlist);
}
model.addAttribute("qlrpage", qlrpage);
}
}
}
regBusYydj.setQxdm(Global.getAreaCode());
regBusYydj.setZxyyywh(YWH);
model.addAttribute("regBusYydj", regBusYydj);
if(StringUtils.isNotBlank(djlx)){
model.addAttribute("DJLX", djlx);
}
// 传递要素代码
if (StringUtils.isNotBlank(YWH)) {
model.addAttribute("YWH",YWH);
model.addAttribute("YSDM",ysdm );
}
// 查看标示
String view = request.getParameter("VIEWS");
if (StringUtils.isNotBlank(view)) {
model.addAttribute("VIEWS", view);
}
model.addAttribute("regBusYydj", regBusYydj);
return "modules/reg/bus/regBusFwyyzxdjForm";
}
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value = "Fwyyeditform")
public String Fwyyeditform(RegBusYydj regBusYydj, Model model, HttpServletRequest request) {
User user = UserUtils.getUser();
String ywh = request.getParameter("YWH");
String ysdm = request.getParameter("YSDM");
String djlx = request.getParameter("djlx");
String wo = request.getParameter("WO");
String selectedIDs = request.getParameter("selectedIDs");
String zh = request.getParameter("zh");
String zid = request.getParameter("ZID");
String optype = request.getParameter("optype");
String bj = request.getParameter("bj");
Page<RegBaseH> fwpage = new Page<RegBaseH>();
List<RegBaseH> fwlist = new ArrayList<RegBaseH>();
RegBaseH regBaseH = new RegBaseH();
regBaseH.setBdcdyh(regBusYydj.getBdcdyh());
List<RegBaseH> hlist = regBaseHService.findList(regBaseH);
if(hlist.size() > 0){
regBaseH = hlist.get(0);
model.addAttribute("BDCDYH", regBaseH.getBdcdyh());
//把选择后的房屋信息填入list中
fwlist.add(regBaseH);
fwpage.setList(fwlist);
model.addAttribute("fwpage", fwpage);//返回选择后的房屋列表
//权利人信息
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setYwh(regBusYydj.getYwh());
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxlist.size() > 0){
regBusBdcqzsdjxx = regBusBdcqzsdjxxlist.get(0);
//权利人信息
//权利人信息列表
Page<RegBusQlr> qlrpage = new Page<RegBusQlr>();
List<RegBusQlr> qlrlist = new ArrayList<RegBusQlr>();
RegBusBdcqzsdjxx regBusBdcqzsdjxxold = regBusBdcqzsdjxxService.get(regBusBdcqzsdjxx.getOldid());
RegBusQlr regBusQlr = new RegBusQlr();
regBusQlr.setYwh(regBusBdcqzsdjxxold.getYwh());
List<RegBusQlr> regBusQlrlist = regBusQlrService.findListSxh(regBusQlr);
if(regBusQlrlist.size() > 0){
for(int i=0;i<regBusQlrlist.size();i++){
regBusQlr = regBusQlrlist.get(i);
regBusQlr.setBdcdyh(regBaseH.getBdcdyh());
qlrlist.add(regBusQlr);
qlrpage.setList(qlrlist);
}
model.addAttribute("qlrpage", qlrpage);
}
}
}
regBusYydj.setQxdm(Global.getAreaCode());
model.addAttribute("regBusYydj", regBusYydj);
if(StringUtils.isNotBlank(djlx)){
model.addAttribute("DJLX", djlx);
}
if(StringUtils.isNotBlank(selectedIDs)){
model.addAttribute("selectedIDs", selectedIDs);
}
if(StringUtils.isNotBlank(zh)){
model.addAttribute("zh", zh);
}
if(StringUtils.isNotBlank(zid)){
model.addAttribute("zid", zid);
}
// 传递要素代码
if (StringUtils.isNotBlank(wo)) {
if(bj != null){
model.addAttribute("WO","2");
}else{
model.addAttribute("WO","1");
}
}
if (StringUtils.isNotBlank(optype)) {
model.addAttribute("optype","2");
}
// 传递要素代码
if (StringUtils.isNotBlank(ywh)) {
model.addAttribute("YWH",ywh);
model.addAttribute("YSDM",ysdm );
}
// 查看标示
String view = request.getParameter("VIEWS");
if (StringUtils.isNotBlank(view)) {
model.addAttribute("VIEWS", view);
}
model.addAttribute("regBusYydj", regBusYydj);
return "modules/reg/bus/regBusFwyydjeditForm";
}
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value = "Fwyyzxeditform")
public String Fwyyzxeditform(RegBusYydj regBusYydj, Model model, HttpServletRequest request) {
User user = UserUtils.getUser();
String ywh = request.getParameter("YWH");
String ysdm = request.getParameter("YSDM");
String djlx = request.getParameter("djlx");
String wo = request.getParameter("WO");
String selectedIDs = request.getParameter("selectedIDs");
String zh = request.getParameter("zh");
String zid = request.getParameter("ZID");
String optype = request.getParameter("optype");
String bj = request.getParameter("bj");
Page<RegBaseH> fwpage = new Page<RegBaseH>();
List<RegBaseH> fwlist = new ArrayList<RegBaseH>();
RegBaseH regBaseH = new RegBaseH();
regBaseH.setBdcdyh(regBusYydj.getBdcdyh());
List<RegBaseH> hlist = regBaseHService.findList(regBaseH);
if(hlist.size() > 0){
regBaseH = hlist.get(0);
model.addAttribute("BDCDYH", regBaseH.getBdcdyh());
//把选择后的房屋信息填入list中
fwlist.add(regBaseH);
fwpage.setList(fwlist);
model.addAttribute("fwpage", fwpage);//返回选择后的房屋列表
//权利人信息
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setYwh(regBusYydj.getYwh());
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxlist.size() > 0){
regBusBdcqzsdjxx = regBusBdcqzsdjxxlist.get(0);
//权利人信息
RegBusBdcqzsdjxx regBusBdcqzsdjxxold = regBusBdcqzsdjxxService.get(regBusBdcqzsdjxx.getOldid());
RegBusQlr regBusQlr = new RegBusQlr();
regBusQlr.setYwh(regBusBdcqzsdjxxold.getYwh());
List<RegBusQlr> regBusQlrlist = regBusQlrService.findListSxh(regBusQlr);
if(regBusQlrlist.size() > 0){
//权利人信息列表
Page<RegBusQlr> qlrpage = new Page<RegBusQlr>();
List<RegBusQlr> qlrlist = new ArrayList<RegBusQlr>();
for(int i=0;i<regBusQlrlist.size() ;i++){
regBusQlr = regBusQlrlist.get(i);
regBusQlr.setBdcdyh(regBaseH.getBdcdyh());
qlrlist.add(regBusQlr);
qlrpage.setList(qlrlist);
}
model.addAttribute("qlrpage", qlrpage);
}
}
}
regBusYydj.setQxdm(Global.getAreaCode());
model.addAttribute("regBusYydj", regBusYydj);
if(StringUtils.isNotBlank(djlx)){
model.addAttribute("DJLX", djlx);
}
if(StringUtils.isNotBlank(selectedIDs)){
model.addAttribute("selectedIDs", selectedIDs);
}
if(StringUtils.isNotBlank(zh)){
model.addAttribute("zh", zh);
}
if(StringUtils.isNotBlank(zid)){
model.addAttribute("zid", zid);
}
// 传递要素代码
if (StringUtils.isNotBlank(wo)) {
if(bj != null){
model.addAttribute("WO","2");
}else{
model.addAttribute("WO","1");
}
}
if (StringUtils.isNotBlank(optype)) {
model.addAttribute("optype","2");
}
// 传递要素代码
if (StringUtils.isNotBlank(ywh)) {
model.addAttribute("YWH",ywh);
model.addAttribute("YSDM",ysdm );
}
// 查看标示
String view = request.getParameter("VIEWS");
if (StringUtils.isNotBlank(view)) {
model.addAttribute("VIEWS", view);
}
model.addAttribute("regBusYydj", regBusYydj);
return "modules/reg/bus/regBusFwyyzxdjeditForm";
}
/**
* 房屋异议注销修改保存
* @param regBusYydj
* @param model
* @param redirectAttributes
* @param request
* @return
*/
@RequiresPermissions("reg:bus:regBusYydj:edit")
@RequestMapping(value = "fwyyzxeditsave")
public String fwyyzxeditsave(RegBusYydj regBusYydj, Model model, RedirectAttributes redirectAttributes, HttpServletRequest request) {
if (!beanValidator(model, regBusYydj)){
return form(regBusYydj, model, request);
}
RegBusYydj yy = new RegBusYydj();
yy.setYwh(regBusYydj.getYwh());
List<RegBusYydj> findList_1 = regBusYydjService.findList(yy);
if(findList_1.size()>0){
for(int i=0;i<findList_1.size();i++){
yy = findList_1.get(i);
yy.setZxyyyy(regBusYydj.getZxyyyy());
yy.setFj(regBusYydj.getFj());
regBusYydjService.save(yy);
}
}
RegBusBdcqzsdjxx regBusBdcqzsdjxxNew = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxxNew.setYwh(regBusYydj.getZxyyywh());
List<RegBusBdcqzsdjxx> fwlist =regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxxNew);
if(fwlist.size() > 0 ){
for(int t=0;t<fwlist.size();t++){
regBusBdcqzsdjxxNew = fwlist.get(t);
regBusBdcqzsdjxxNew.setFj(regBusYydj.getFj());
regBusBdcqzsdjxxService.save(regBusBdcqzsdjxxNew);
}
}
addMessage(redirectAttributes, "保存异议登记信息成功");
return "redirect:"+ Global.getAdminPath() + "/reg/bus/regBusYydj/fwyyzxlist?WWO=1&zxyyywh=" + regBusYydj.getZxyyywh();
}
/**
* 房屋异议修改保存
* @param regBusYydj
* @param model
* @param redirectAttributes
* @param request
* @return
*/
@RequiresPermissions("reg:bus:regBusYydj:edit")
@RequestMapping(value = "save")
public String save(RegBusYydj regBusYydj, Model model, RedirectAttributes redirectAttributes, HttpServletRequest request) {
if (!beanValidator(model, regBusYydj)){
return form(regBusYydj, model, request);
}
RegBusYydj yy = new RegBusYydj();
yy.setYwh(regBusYydj.getYwh());
List<RegBusYydj> findList_1 = regBusYydjService.findList(yy);
if(findList_1.size()>0){
for(int i=0;i<findList_1.size();i++){
yy = findList_1.get(i);
yy.setYysx(regBusYydj.getYysx());
yy.setFj(regBusYydj.getYysx()+regBusYydj.getFj());
regBusYydjService.save(yy);
}
}
RegBusBdcqzsdjxx regBusBdcqzsdjxxC = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxxC.setYwh(regBusYydj.getYwh());
List<RegBusBdcqzsdjxx> regedList = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxxC);
if(regedList.size() > 0){
regBusBdcqzsdjxxC = regedList.get(0);
regBusBdcqzsdjxxC.setFj(regBusYydj.getYysx()+regBusYydj.getFj());
regBusBdcqzsdjxxService.save(regBusBdcqzsdjxxC);
}
addMessage(redirectAttributes, "保存异议登记信息成功");
return "redirect:"+ Global.getAdminPath() + "/reg/bus/regBusYydj/fwyylist?WWO=1&ywh=" + regBusYydj.getYwh();
}
/**
* 房屋异议保存
* @param regBusYydj
* @param model
* @param redirectAttributes
* @param request
* @return
*/
@RequiresPermissions("reg:bus:regBusYydj:edit")
@RequestMapping(value = "Fwyysave")
public String Fwyysave(RegBusYydj regBusYydj, Model model, RedirectAttributes redirectAttributes, HttpServletRequest request) {
if (!beanValidator(model, regBusYydj)){
return form(regBusYydj, model, request);
}
String ywh = request.getParameter("YWH");
String djlx = request.getParameter("DJLX");
String ids = request.getParameter("selectedIDs");
String zid = request.getParameter("zid");
String op = request.getParameter("op");
String optype = request.getParameter("optype");
String qllx = RegUtils.getqllx("703");
//首先获取通过楼盘已选择的房屋信息列表
//选择的 房屋信息
String[] idList = ids.split(";");
//查询当前ywh是不是在已登记信息表里已经有数据了,如果有了就删除掉
if(StringUtils.isNoneBlank(request.getParameter("YWH"))){
if(StringUtils.isNotBlank(request.getParameter("YWH"))){
RegBusBdcqzsdjxx regBusBdcqzsdjxxC = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxxC.setYwh(ywh);
List<RegBusBdcqzsdjxx> regedList = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxxC);
if(regedList.size() > 0){
for(int i=0; i<regedList.size(); i++){
regBusBdcqzsdjxxService.delete(regedList.get(i));
}
}
}
RegBusYydj yydj = new RegBusYydj();
yydj.setYwh(request.getParameter("YWH"));
regBusYydjService.deleteyyywh(yydj);
}
String cw="";
//按证号查询
RegBaseH regBaseH_1 = regBaseHService.get(idList[0]);//房屋基本信息
RegBusBdcqzsdjxx regBusBdcqzsdjxxold_1 = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxxold_1.setBdcdyh(regBaseH_1.getBdcdyh());
regBusBdcqzsdjxxold_1.setIslogout("703");
regBusBdcqzsdjxxold_1.setRights("1");
//通过业务号和不动产单元获取已经办理的最后一条有效业务数据
List<RegBusBdcqzsdjxx> bdclist_1 = regBusBdcqzsdjxxService.findcfList(regBusBdcqzsdjxxold_1);
RegBusBdcqzsdjxx regBusBdcqzsdjxxold = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxxold.setIslogout("703");
regBusBdcqzsdjxxold.setBdcqzh(bdclist_1.get(0).getBdcqzh());
//通过业务号和不动产单元获取已经办理的最后一条有效业务数据
List<RegBusBdcqzsdjxx> bdclist = regBusBdcqzsdjxxService.findcfList(regBusBdcqzsdjxxold);
int size = bdclist.size();
//再次循环进行新数据的插入
for(int j=0;j<size;j++){
regBusBdcqzsdjxxold = bdclist.get(j);
if(regBusBdcqzsdjxxold != null){
//保存异议登记信息
RegBusYydj yydj = new RegBusYydj();
yydj = regBusYydj;
yydj.setZxyydjsj(null);
yydj.setDbr(null);
yydj.setDjjg(null);
yydj.setDjsj(null);
yydj.setId("");
yydj.setQszt("0");
yydj.setBdcdyh(regBusBdcqzsdjxxold.getBdcdyh());
//防止重复类似发证的提交,需要判断每个业务号只能有一条记录,判断当前业务号已经有记录时就做update
RegBusYydj yy = new RegBusYydj();
yy.setYwh(ywh);
yy.setBdcdyh(regBusBdcqzsdjxxold.getBdcdyh());
List<RegBusYydj> findList_1 = regBusYydjService.findList(yy);
if(findList_1.size()>0){
yy.setId(findList_1.get(0).getId());
}
regBusYydjService.save(yydj);
addMessage(redirectAttributes, "保存异议登记信息成功");
//查出此不动产单元号下的所有有效数据
RegBusBdcqzsdjxx regBusBdcqzsdjxxall = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxxall.setBdcdyh(regBusBdcqzsdjxxold.getBdcdyh());
regBusBdcqzsdjxxall.setIslogout("703");
//通过业务号和不动产单元获取正在办理的所有业务数据
List<RegBusBdcqzsdjxx> bdclistall = regBusBdcqzsdjxxService.findcfList(regBusBdcqzsdjxxall);
int tall = bdclistall.size();
for(int k=0;k<tall;k++){
regBusBdcqzsdjxxall = bdclistall.get(k);
String oldid = regBusBdcqzsdjxxall.getId();
//新增一条数据
RegBusBdcqzsdjxx regBusBdcqzsdjxxnew = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxxnew =regBusBdcqzsdjxxall;
if("1".equals(regBusBdcqzsdjxxall.getRights())){
RegBusQlr qlryy = new RegBusQlr();
qlryy.setYwh(ywh);
List<RegBusQlr> qlrlistyy = regBusQlrService.findList_1(qlryy);
if(qlrlistyy.size() <= 0){
//获取共有方式
RegBusQlr qlr = new RegBusQlr();
qlr.setYwh(regBusBdcqzsdjxxall.getYwh());
List<RegBusQlr> qlrlist = regBusQlrService.findList_1(qlr);
if(qlrlist.size() > 0){
for(int y=0;y<qlrlist.size();y++){
qlr = qlrlist.get(y);
RegBusQlr qlr_1 = new RegBusQlr();
qlr_1 = qlr;
qlr_1.setYwh(ywh);
qlr_1.setId("");
//去重
RegBusQlr qlrnew = new RegBusQlr();
qlrnew.setYwh(ywh);
qlrnew.setPcode(qlr.getPcode());
List<RegBusQlr> qlrlistnew = regBusQlrService.findList_1(qlr);
if(qlrlistnew.size() > 0 ){
qlr_1.setId(qlrlistnew.get(0).getId());
}
qlr_1.setQszt("0");
qlr_1.setQllx(qllx);
regBusQlrService.save(qlr_1);
}
}
regBusBdcqzsdjxxnew.setBdcqzbh(null);
regBusBdcqzsdjxxnew.setBdcqzh(null);
regBusBdcqzsdjxxnew.setYsxlh(null);
}
}
//获取共有方式
RegBusQlr qlr = new RegBusQlr();
qlr.setYwh(regBusBdcqzsdjxxall.getYwh());
List<RegBusQlr> qlrlist = regBusQlrService.findList_1(qlr);
if(qlrlist.size() > 0){
qlr = qlrlist.get(0);
regBusBdcqzsdjxxnew.setGyqk(DictUtils.getDictLabel(qlr.getGyfs(), "reg_bus_gyfs", ""));
}
regBusBdcqzsdjxxnew.setId("");
regBusBdcqzsdjxxnew.setDbsj(null);
regBusBdcqzsdjxxnew.setFzsj(null);
regBusBdcqzsdjxxnew.setOldid(oldid);
regBusBdcqzsdjxxnew.setDjlx("703");
regBusBdcqzsdjxxnew.setQllx(qllx);
regBusBdcqzsdjxxnew.setIslogout("0");
regBusBdcqzsdjxxnew.setFj(regBusYydj.getYysx()+regBusYydj.getFj());
regBusBdcqzsdjxxnew.setYwh(ywh);
regBusBdcqzsdjxxnew.setStatus(null);
regBusBdcqzsdjxxnew.setIsfdsj(Integer.valueOf("0"));
//防止重复类似发证的提交,需要判断每个业务号只能有一条记录,判断当前业务号已经有记录时就做update
RegBusBdcqzsdjxx regBusBdcqzsdjxxtmp = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxxtmp.setYwh(ywh);
regBusBdcqzsdjxxtmp.setBdcdyh(regBusBdcqzsdjxxall.getBdcdyh());
regBusBdcqzsdjxxtmp.setRights(regBusBdcqzsdjxxall.getRights());
regBusBdcqzsdjxxtmp.setDjlx(regBusBdcqzsdjxxall.getDjlx());
List<RegBusBdcqzsdjxx> findList = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxxtmp);
if(findList.size()>0){
regBusBdcqzsdjxxnew.setId(findList.get(0).getId());
}
regBusBdcqzsdjxxService.save(regBusBdcqzsdjxxnew);
}
}else{
addMessage(redirectAttributes, "此房屋不存在所有权,不能进行异议");
cw = "2";
}
}
return "redirect:"+Global.getAdminPath()+"/reg/bus/regBusYydj/fwyylist?WO=1&ywh="+ywh+"&cw="+cw;
}
/**
* 房屋异议保存
* @param regBusYydj
* @param model
* @param redirectAttributes
* @param request
* @return
*/
@RequiresPermissions("reg:bus:regBusYydj:edit")
@RequestMapping(value = "Fwyyzxsave")
public String Fwyyzxsave(RegBusYydj regBusYydj, Model model, RedirectAttributes redirectAttributes, HttpServletRequest request) {
if (!beanValidator(model, regBusYydj)){
return form(regBusYydj, model, request);
}
String qllx = RegUtils.getqllx("704");
if(StringUtils.isNotBlank(regBusYydj.getZxyyywh())){
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setYwh(regBusYydj.getZxyyywh());
regBusBdcqzsdjxxService.deletezyyg(regBusBdcqzsdjxx);
regBusQlrService.deleteywh(regBusYydj.getZxyyywh());
RegBusFdcq2 fdcq = new RegBusFdcq2();
fdcq.setYwh(regBusYydj.getZxyyywh());
regBusFdcq2Service.deletefdcq2(fdcq);
//保存异议登记信息
RegBusYydj yydj_1 = new RegBusYydj();
yydj_1.setYwh(regBusYydj.getYwh());
List<RegBusYydj> findList_1 = regBusYydjService.findList(yydj_1);
if(findList_1.size()>0){
yydj_1 = findList_1.get(0);
yydj_1.setZxyydjsj(null);
yydj_1.setZxyyywh(null);
yydj_1.setZxyyyy(null);
yydj_1.setZxyydbr(null);
regBusYydjService.save(yydj_1);
}
}
//根据异议登记权属的业务号找出异议登记类型的登记信息
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setYwh(regBusYydj.getYwh());
regBusBdcqzsdjxx.setDjlx("703");
List<RegBusBdcqzsdjxx> regBusBdcqzsdjxxlist = regBusBdcqzsdjxxService.findList(regBusBdcqzsdjxx);
if(regBusBdcqzsdjxxlist.size() > 0){
int sizeall = regBusBdcqzsdjxxlist.size();
for(int t=0;t<sizeall;t++){
regBusBdcqzsdjxx = regBusBdcqzsdjxxlist.get(t);
//保存异议登记信息
RegBusYydj yydj = new RegBusYydj();
yydj.setYwh(regBusYydj.getYwh());
yydj.setBdcdyh(regBusBdcqzsdjxx.getBdcdyh());
List<RegBusYydj> findList = regBusYydjService.findList(yydj);
if(findList.size()>0){
yydj = findList.get(0);
yydj.setZxyydjsj(regBusYydj.getZxyydjsj());
yydj.setZxyyywh(regBusYydj.getZxyyywh());
yydj.setZxyyyy(regBusYydj.getZxyyyy());
yydj.setZxyydbr(regBusYydj.getZxyydbr());
yydj.setFj(regBusYydj.getFj());
regBusYydjService.save(yydj);
addMessage(redirectAttributes, "保存异议注销登记信息成功");
}
//所有异议登记类型的数据
RegBusBdcqzsdjxx regBusBdcqzsdjxxold = regBusBdcqzsdjxxService.get(regBusBdcqzsdjxx.getOldid());
if("1".equals(regBusBdcqzsdjxxold.getRights())){
//获取共有方式
RegBusQlr qlr = new RegBusQlr();
qlr.setYwh(regBusBdcqzsdjxxold.getYwh());
List<RegBusQlr> qlrlist = regBusQlrService.findList_1(qlr);
if(qlrlist.size() > 0){
for(int y=0;y<qlrlist.size();y++){
qlr = qlrlist.get(y);
RegBusQlr qlr_1 = new RegBusQlr();
qlr_1 = qlr;
qlr_1.setYwh(regBusYydj.getZxyyywh());
qlr_1.setId("");
//去重
RegBusQlr qlrnew = new RegBusQlr();
qlrnew.setYwh(regBusYydj.getZxyyywh());
qlrnew.setPcode(qlr.getPcode());
List<RegBusQlr> qlrlistnew = regBusQlrService.findList_1(qlr);
if(qlrlistnew.size() > 0 ){
qlr_1.setId(qlrlistnew.get(0).getId());
}
qlr_1.setQszt("0");
qlr_1.setQllx(qllx);
regBusQlrService.save(qlr_1);
}
}
}
//新增一条数据
RegBusBdcqzsdjxx regBusBdcqzsdjxxnew = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxxnew = regBusBdcqzsdjxx;
regBusBdcqzsdjxxnew.setOldid(regBusBdcqzsdjxx.getId());
//获取共有方式
RegBusQlr qlr = new RegBusQlr();
qlr.setYwh(regBusBdcqzsdjxx.getYwh());
List<RegBusQlr> qlrlist = regBusQlrService.findList_1(qlr);
if(qlrlist.size() > 0){
qlr = qlrlist.get(0);
regBusBdcqzsdjxxnew.setGyqk(DictUtils.getDictLabel(qlr.getGyfs(), "reg_bus_gyfs", ""));
}
regBusBdcqzsdjxxnew.setDbsj(null);
regBusBdcqzsdjxxnew.setIslogout("0");
regBusBdcqzsdjxxnew.setId("");
regBusBdcqzsdjxxnew.setFzsj(null);
regBusBdcqzsdjxxnew.setStatus(null);
regBusBdcqzsdjxxnew.setIsfdsj(Integer.valueOf("0"));
regBusBdcqzsdjxxnew.setDjlx("704");
regBusBdcqzsdjxxnew.setQllx(qllx);
regBusBdcqzsdjxxnew.setFj(regBusYydj.getFj());
regBusBdcqzsdjxxnew.setYwh(regBusYydj.getZxyyywh());
regBusBdcqzsdjxxService.save(regBusBdcqzsdjxxnew);
}
}
return "redirect:"+Global.getAdminPath()+"/reg/bus/regBusYydj/fwyyzxlist?WO=1&zxyyywh="+regBusYydj.getZxyyywh();
}
/**
* 房屋异议登记删除
* @param regBusYydj
* @param redirectAttributes
* @return
*/
@RequiresPermissions("reg:bus:regBusYydj:edit")
@RequestMapping(value = "delete")
public String delete(RegBusYydj regBusYydj, RedirectAttributes redirectAttributes) {
if(StringUtils.isNotBlank(regBusYydj.getYwh())){
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setYwh(regBusYydj.getYwh());
regBusBdcqzsdjxxService.deletezyyg(regBusBdcqzsdjxx);
RegBusYydj regBusYydj_1 = new RegBusYydj();
regBusYydj_1.setYwh(regBusYydj.getYwh());
regBusYydjService.deleteyyywh(regBusYydj_1);
regBusQlrService.deleteywh(regBusYydj.getYwh());
addMessage(redirectAttributes, "删除异议登记信息成功");
}
return "redirect:"+Global.getAdminPath()+"/reg/bus/regBusYydj/fwyylist?WWO=1&ywh=" + regBusYydj.getYwh();
}
/**
* 房屋异议注销登记删除
* @param regBusYydj
* @param redirectAttributes
* @return
*/
@RequiresPermissions("reg:bus:regBusYydj:edit")
@RequestMapping(value = "fwyyzxdelete")
public String fwyyzxdelete(RegBusYydj regBusYydj, RedirectAttributes redirectAttributes) {
if(StringUtils.isNotBlank(regBusYydj.getZxyyywh())){
RegBusBdcqzsdjxx regBusBdcqzsdjxx = new RegBusBdcqzsdjxx();
regBusBdcqzsdjxx.setYwh(regBusYydj.getZxyyywh());
regBusBdcqzsdjxxService.deletezyyg(regBusBdcqzsdjxx);
regBusQlrService.deleteywh(regBusYydj.getZxyyywh());
regBusYydj.setZxyydjsj(null);
regBusYydj.setZxyyywh(null);
regBusYydj.setZxyyyy(null);
regBusYydj.setZxyydbr(null);
regBusYydj.setFj(null);
regBusYydj.setId(regBusYydj.getId());
regBusYydjService.save(regBusYydj);
}
addMessage(redirectAttributes, "删除异议登记信息成功");
return "redirect:"+Global.getAdminPath()+"/reg/bus/regBusYydj/fwyyzxlist?WWO=1&zxyyywh=" + regBusYydj.getZxyyywh();
}
/**
* @Title: fwyyzxregedselect
* @Description: 房屋异议登记注销权属信息选择
* @param @param regBusBdcqzsdjxx
* @param @param request
* @param @param response
* @param @param model
* @param @return 设定文件
* @return String 返回类型
* @throws
*/
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value = "fwyyzxregedselect")
public String fwyyzxregedselect(RegBusYydj regBusYydj, HttpServletRequest request, HttpServletResponse response, Model model) {
String djlx = request.getParameter("djlx");
String ywh = request.getParameter("YWH");
String views="";
if(StringUtils.isNotBlank(ywh)){
model.addAttribute("YWH", ywh);
}
//房屋的 过滤掉土地的, 土地的过滤掉房屋的
Page<RegBusYydj> page=null;
regBusYydj.setDelFlag("0");
regBusYydj.setZxyyywh("ISNULL");
if(StringUtils.isNotBlank(request.getParameter("WO"))){
model.addAttribute("WO", "1");
}
if(StringUtils.isNotBlank(djlx)){
model.addAttribute("DJLX", djlx);
}
String ywhStr = request.getParameter("curywh");
model.addAttribute("YWH", ywhStr);
page = regBusYydjService.findPage(new Page<RegBusYydj>(request, response), regBusYydj);
model.addAttribute("page", page);
//此列表比较特殊点,需要选择一条信息后可以弹出这个大证对应的小证选择界面【就是楼盘信息表-带有状态控制的】
if(djlx.equals("704")){
views = "modules/reg/bus/dialog/fwyyzxBdcqzsdjxxWithSubInfoDialog";
}
return views;
}
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value = "getInfo")
@ResponseBody
public ModelMap getInfo(HttpServletRequest request) {
String id = request.getParameter("id");
RegBusYydj entity = null;
ModelMap modelMap = new ModelMap();
if (StringUtils.isNotBlank(id)){
entity = regBusYydjService.get(id);
RegBusBdcqzsdjxx djxx = new RegBusBdcqzsdjxx();
djxx.setBdcdyh(entity.getBdcdyh());
djxx.setDjlx("703");
List<RegBusBdcqzsdjxx> djxxlist = regBusBdcqzsdjxxService.findList(djxx);
if(djxxlist.size() > 0 ){
djxx = djxxlist.get(0);
if(StringUtils.isBlank(djxx.getFzsj())){
modelMap.put("success", "1");
modelMap.put("msg", "单元号为"+djxx.getBdcdyh()+"的数据未办结,不能进行注销登记!");
}
}
}
modelMap.put("data", entity);
return modelMap;
}
@RequiresPermissions("reg:bus:regBusYydj:view")
@RequestMapping(value="queryYyData")
public String queryYyData(RegBusYydj regBusYydj, HttpServletRequest request,HttpServletResponse response, Model model) {
Page<RegBusYydj> page=new Page<RegBusYydj>();
List<RegBusYydj> regBusYydjList=new ArrayList<RegBusYydj>();
RegBusSlsq regBusSlsq=new RegBusSlsq();
if(StringUtils.isNotBlank(regBusYydj.getSqr())){ //通知人姓名
regBusSlsq.setTzrxm(regBusYydj.getSqr());
regBusSlsq.setDjdl("600");
List<RegBusSlsq> findListSlsq= regBusSlsqService.findList(regBusSlsq);
for(int i=0;i<findListSlsq.size();i++){
RegBusYydj regBusYydj1=new RegBusYydj();
regBusYydj1.setYwh(findListSlsq.get(i).getYwh());
List<RegBusYydj> regBusYydjList1=regBusYydjService.findList(regBusYydj1);
regBusYydjList.addAll(regBusYydjList1);
}
/*regBusYydj.setPage(page);
page.setList(regBusYydjList);*/
model.addAttribute("regBusYydjList", regBusYydjList);
}
return "modules/reg/bus/dialog/queryYyList";
}
}