|
@@ -158,6 +158,9 @@ public class SecurityDeclarationController { |
|
@@ -158,6 +158,9 @@ public class SecurityDeclarationController { |
158
|
String two = request.getParameter("two");
|
158
|
String two = request.getParameter("two");
|
159
|
String three = request.getParameter("three");
|
159
|
String three = request.getParameter("three");
|
160
|
String four = request.getParameter("four");
|
160
|
String four = request.getParameter("four");
|
|
|
161
|
+
|
|
|
162
|
+ String type = cargoType(one, two, three, four);
|
|
|
163
|
+
|
161
|
//航空货物托运人名称
|
164
|
//航空货物托运人名称
|
162
|
String cargoShipperName = request.getParameter("sd_cargo_shipper_name");
|
165
|
String cargoShipperName = request.getParameter("sd_cargo_shipper_name");
|
163
|
//航空货运销售代理人名称
|
166
|
//航空货运销售代理人名称
|
|
@@ -176,35 +179,21 @@ public class SecurityDeclarationController { |
|
@@ -176,35 +179,21 @@ public class SecurityDeclarationController { |
176
|
if (request.getParameter("sd_transportation_prove") != null){
|
179
|
if (request.getParameter("sd_transportation_prove") != null){
|
177
|
transportationProve = request.getParameter("sd_transportation_prove");
|
180
|
transportationProve = request.getParameter("sd_transportation_prove");
|
178
|
}
|
181
|
}
|
179
|
- //货物性质是否多选
|
|
|
180
|
- List<String> list = new ArrayList();
|
|
|
181
|
- if (!StringUtils.isBlank(one)){
|
|
|
182
|
- list.add(one);
|
|
|
183
|
- }
|
|
|
184
|
- if (!StringUtils.isBlank(two)){
|
|
|
185
|
- list.add(two);
|
|
|
186
|
- }
|
|
|
187
|
- if (!StringUtils.isBlank(three)){
|
|
|
188
|
- list.add(three);
|
|
|
189
|
- }
|
|
|
190
|
- if (!StringUtils.isBlank(four)){
|
|
|
191
|
- list.add(four);
|
|
|
192
|
- }
|
182
|
+
|
|
|
183
|
+
|
193
|
//查询是否存在
|
184
|
//查询是否存在
|
194
|
if (securityDeclarationService.findWaybill(waybill) == 0){
|
185
|
if (securityDeclarationService.findWaybill(waybill) == 0){
|
195
|
//货物性质(类型)添加
|
186
|
//货物性质(类型)添加
|
196
|
- for (String type: list){
|
|
|
197
|
- SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
198
|
- sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
199
|
- sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
200
|
- sdCargoTypeService.save(sdCargoTypeEntity);
|
|
|
201
|
- }
|
187
|
+ SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
188
|
+ sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
189
|
+ sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
190
|
+ sdCargoTypeService.save(sdCargoTypeEntity);
|
202
|
|
191
|
|
203
|
if(!StringUtils.isBlank(cargoName)){
|
192
|
if(!StringUtils.isBlank(cargoName)){
|
204
|
//货物品名
|
193
|
//货物品名
|
205
|
String cName = cargoName.replaceAll(",", ",");
|
194
|
String cName = cargoName.replaceAll(",", ",");
|
206
|
String[] split = cName.split(",");
|
195
|
String[] split = cName.split(",");
|
207
|
- for (int i=0; i<split.length; i++){
|
196
|
+ for (int i = 0; i < split.length; i++){
|
208
|
if (!StringUtils.isBlank(split[i]) || !"".equals(split[i])){
|
197
|
if (!StringUtils.isBlank(split[i]) || !"".equals(split[i])){
|
209
|
SDCargoNameEntity sdCargoNameEntity = new SDCargoNameEntity();
|
198
|
SDCargoNameEntity sdCargoNameEntity = new SDCargoNameEntity();
|
210
|
sdCargoNameEntity.setSd_waybill(waybill);
|
199
|
sdCargoNameEntity.setSd_waybill(waybill);
|
|
@@ -249,11 +238,7 @@ public class SecurityDeclarationController { |
|
@@ -249,11 +238,7 @@ public class SecurityDeclarationController { |
249
|
//品名
|
238
|
//品名
|
250
|
sdVo.setSd_cargo_name(cargoName);
|
239
|
sdVo.setSd_cargo_name(cargoName);
|
251
|
//货物类型
|
240
|
//货物类型
|
252
|
- String cargoType = "";
|
|
|
253
|
- for (String s: list){
|
|
|
254
|
- cargoType+=s+",";
|
|
|
255
|
- }
|
|
|
256
|
- sdVo.setSd_cargo_type(cargoType);
|
241
|
+ sdVo.setSd_cargo_type(type);
|
257
|
|
242
|
|
258
|
//预配信息
|
243
|
//预配信息
|
259
|
ManifestEntity wbm = manifestService.findWbm(waybill);
|
244
|
ManifestEntity wbm = manifestService.findWbm(waybill);
|
|
@@ -322,6 +307,9 @@ public class SecurityDeclarationController { |
|
@@ -322,6 +307,9 @@ public class SecurityDeclarationController { |
322
|
String two = request.getParameter("two");
|
307
|
String two = request.getParameter("two");
|
323
|
String three = request.getParameter("three");
|
308
|
String three = request.getParameter("three");
|
324
|
String four = request.getParameter("four");
|
309
|
String four = request.getParameter("four");
|
|
|
310
|
+
|
|
|
311
|
+ String type = cargoType(one, two, three, four);
|
|
|
312
|
+
|
325
|
//航空货物托运人名称
|
313
|
//航空货物托运人名称
|
326
|
String cargoShipperName = request.getParameter("sd_cargo_shipper_name");
|
314
|
String cargoShipperName = request.getParameter("sd_cargo_shipper_name");
|
327
|
//航空货运销售代理人名称
|
315
|
//航空货运销售代理人名称
|
|
@@ -346,32 +334,15 @@ public class SecurityDeclarationController { |
|
@@ -346,32 +334,15 @@ public class SecurityDeclarationController { |
346
|
}
|
334
|
}
|
347
|
|
335
|
|
348
|
|
336
|
|
349
|
- //货物性质是否多选
|
|
|
350
|
- List<String> list = new ArrayList();
|
|
|
351
|
- if (!StringUtils.isBlank(one)){
|
|
|
352
|
- list.add(one);
|
|
|
353
|
- }
|
|
|
354
|
- if (!StringUtils.isBlank(two)){
|
|
|
355
|
- list.add(two);
|
|
|
356
|
- }
|
|
|
357
|
- if (!StringUtils.isBlank(three)){
|
|
|
358
|
- list.add(three);
|
|
|
359
|
- }
|
|
|
360
|
- if (!StringUtils.isBlank(four)){
|
|
|
361
|
- list.add(four);
|
|
|
362
|
- }
|
|
|
363
|
-
|
|
|
364
|
|
337
|
|
365
|
//查询是否存在
|
338
|
//查询是否存在
|
366
|
if (securityDeclarationService.findWaybill(waybill) == 0){
|
339
|
if (securityDeclarationService.findWaybill(waybill) == 0){
|
367
|
if (manifestService.findWbm(waybill) == null){
|
340
|
if (manifestService.findWbm(waybill) == null){
|
368
|
//货物性质(类型)添加
|
341
|
//货物性质(类型)添加
|
369
|
- for (String type: list){
|
|
|
370
|
- SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
371
|
- sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
372
|
- sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
373
|
- sdCargoTypeService.save(sdCargoTypeEntity);
|
|
|
374
|
- }
|
342
|
+ SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
343
|
+ sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
344
|
+ sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
345
|
+ sdCargoTypeService.save(sdCargoTypeEntity);
|
375
|
|
346
|
|
376
|
//货物品名
|
347
|
//货物品名
|
377
|
String cName = cargoName.replaceAll(",", ",");
|
348
|
String cName = cargoName.replaceAll(",", ",");
|
|
@@ -423,11 +394,8 @@ public class SecurityDeclarationController { |
|
@@ -423,11 +394,8 @@ public class SecurityDeclarationController { |
423
|
//品名
|
394
|
//品名
|
424
|
sdVo.setSd_cargo_name(cargoName);
|
395
|
sdVo.setSd_cargo_name(cargoName);
|
425
|
//货物类型
|
396
|
//货物类型
|
426
|
- String cargoType = "";
|
|
|
427
|
- for (String s: list){
|
|
|
428
|
- cargoType+=s+",";
|
|
|
429
|
- }
|
|
|
430
|
- sdVo.setSd_cargo_type(cargoType);
|
397
|
+
|
|
|
398
|
+ sdVo.setSd_cargo_type(type);
|
431
|
|
399
|
|
432
|
//添加预配信息
|
400
|
//添加预配信息
|
433
|
manifestEntity.setWaybillnomaster(waybill);
|
401
|
manifestEntity.setWaybillnomaster(waybill);
|
|
@@ -596,6 +564,9 @@ public class SecurityDeclarationController { |
|
@@ -596,6 +564,9 @@ public class SecurityDeclarationController { |
596
|
String two = request.getParameter("two");
|
564
|
String two = request.getParameter("two");
|
597
|
String three = request.getParameter("three");
|
565
|
String three = request.getParameter("three");
|
598
|
String four = request.getParameter("four");
|
566
|
String four = request.getParameter("four");
|
|
|
567
|
+
|
|
|
568
|
+ String type = cargoType(one, two, three, four);
|
|
|
569
|
+
|
599
|
//航空货物托运人名称
|
570
|
//航空货物托运人名称
|
600
|
String cargoShipperName = request.getParameter("sd_cargo_shipper_name");
|
571
|
String cargoShipperName = request.getParameter("sd_cargo_shipper_name");
|
601
|
//航空货运销售代理人名称
|
572
|
//航空货运销售代理人名称
|
|
@@ -620,29 +591,15 @@ public class SecurityDeclarationController { |
|
@@ -620,29 +591,15 @@ public class SecurityDeclarationController { |
620
|
}
|
591
|
}
|
621
|
|
592
|
|
622
|
|
593
|
|
623
|
- List<String> list = new ArrayList();
|
|
|
624
|
- if (!StringUtils.isBlank(one)){
|
|
|
625
|
- list.add(one);
|
|
|
626
|
- }
|
|
|
627
|
- if (!StringUtils.isBlank(two)){
|
|
|
628
|
- list.add(two);
|
|
|
629
|
- }
|
|
|
630
|
- if (!StringUtils.isBlank(three)){
|
|
|
631
|
- list.add(three);
|
|
|
632
|
- }
|
|
|
633
|
- if (!StringUtils.isBlank(four)){
|
|
|
634
|
- list.add(four);
|
|
|
635
|
- }
|
594
|
+
|
636
|
|
595
|
|
637
|
//先删除货物性质(类型
|
596
|
//先删除货物性质(类型
|
638
|
if (sdCargoTypeService.deleteAlls(waybill)>0){
|
597
|
if (sdCargoTypeService.deleteAlls(waybill)>0){
|
639
|
//货物性质(类型)添加
|
598
|
//货物性质(类型)添加
|
640
|
- for (String type: list){
|
|
|
641
|
- SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
642
|
- sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
643
|
- sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
644
|
- sdCargoTypeService.save(sdCargoTypeEntity);
|
|
|
645
|
- }
|
599
|
+ SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
600
|
+ sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
601
|
+ sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
602
|
+ sdCargoTypeService.save(sdCargoTypeEntity);
|
646
|
}
|
603
|
}
|
647
|
|
604
|
|
648
|
if (sdCargoNameService.deleteAlls(waybill)>0){
|
605
|
if (sdCargoNameService.deleteAlls(waybill)>0){
|
|
@@ -697,16 +654,10 @@ public class SecurityDeclarationController { |
|
@@ -697,16 +654,10 @@ public class SecurityDeclarationController { |
697
|
//品名
|
654
|
//品名
|
698
|
sdVo.setSd_cargo_name(request.getParameter("sd_cargo_name").replaceAll(",", ","));
|
655
|
sdVo.setSd_cargo_name(request.getParameter("sd_cargo_name").replaceAll(",", ","));
|
699
|
//货物类型
|
656
|
//货物类型
|
700
|
- String cargoType = "";
|
|
|
701
|
- for (String s: list){
|
|
|
702
|
- cargoType+=s+",";
|
|
|
703
|
- }
|
|
|
704
|
- sdVo.setSd_cargo_type(cargoType);
|
657
|
+ sdVo.setSd_cargo_type(type);
|
705
|
|
658
|
|
706
|
-// ManifestEntity wbm = manifestService.findWbm(waybill);
|
|
|
707
|
ManifestEntity manifestEntity = new ManifestEntity();
|
659
|
ManifestEntity manifestEntity = new ManifestEntity();
|
708
|
//修改预配信息
|
660
|
//修改预配信息
|
709
|
-// manifestEntity.setId(wbm.getId());
|
|
|
710
|
manifestEntity.setWaybillnomaster(waybill);
|
661
|
manifestEntity.setWaybillnomaster(waybill);
|
711
|
manifestEntity.setFlightdate(flightdate);
|
662
|
manifestEntity.setFlightdate(flightdate);
|
712
|
manifestEntity.setFlightno(flightno);
|
663
|
manifestEntity.setFlightno(flightno);
|
|
@@ -714,9 +665,6 @@ public class SecurityDeclarationController { |
|
@@ -714,9 +665,6 @@ public class SecurityDeclarationController { |
714
|
manifestEntity.setTotalpiece(totalpiece);
|
665
|
manifestEntity.setTotalpiece(totalpiece);
|
715
|
manifestEntity.setTotalweight(totalweight);
|
666
|
manifestEntity.setTotalweight(totalweight);
|
716
|
manifestEntity.setDestinationstation(destinationstation);
|
667
|
manifestEntity.setDestinationstation(destinationstation);
|
717
|
-// if (manifestService.deleteOne(waybill)>0){
|
|
|
718
|
-// manifestService.save(manifestEntity);
|
|
|
719
|
-// }
|
|
|
720
|
manifestService.update(manifestEntity);
|
668
|
manifestService.update(manifestEntity);
|
721
|
|
669
|
|
722
|
//预配信息
|
670
|
//预配信息
|
|
@@ -804,4 +752,26 @@ public class SecurityDeclarationController { |
|
@@ -804,4 +752,26 @@ public class SecurityDeclarationController { |
804
|
|
752
|
|
805
|
return "declaration/print";
|
753
|
return "declaration/print";
|
806
|
}
|
754
|
}
|
|
|
755
|
+
|
|
|
756
|
+
|
|
|
757
|
+ public String cargoType(String one, String two, String three, String four){
|
|
|
758
|
+
|
|
|
759
|
+ String type = "";
|
|
|
760
|
+ //货物性质
|
|
|
761
|
+ if (!StringUtils.isBlank(one)){
|
|
|
762
|
+ type = one;
|
|
|
763
|
+ }
|
|
|
764
|
+ if (!StringUtils.isBlank(two)){
|
|
|
765
|
+ type = two;
|
|
|
766
|
+ }
|
|
|
767
|
+ if (!StringUtils.isBlank(three)){
|
|
|
768
|
+ type = three;
|
|
|
769
|
+ }
|
|
|
770
|
+ if (!StringUtils.isBlank(four)){
|
|
|
771
|
+ type = four;
|
|
|
772
|
+ }
|
|
|
773
|
+
|
|
|
774
|
+ return type;
|
|
|
775
|
+ }
|
|
|
776
|
+
|
807
|
} |
777
|
} |