正在显示
18 个修改的文件
包含
1389 行增加
和
91 行删除
@@ -1012,6 +1012,7 @@ public class ManifestController extends BasicController { | @@ -1012,6 +1012,7 @@ public class ManifestController extends BasicController { | ||
1012 | manifest.setCarrier(carrier); | 1012 | manifest.setCarrier(carrier); |
1013 | manifest.setFlightno(flightno); | 1013 | manifest.setFlightno(flightno); |
1014 | 1014 | ||
1015 | + manifest.setResponse_text("已暂存预配舱单"); | ||
1015 | // consigneeService.saveFromManifest(manifest, Tools.getUserId()); | 1016 | // consigneeService.saveFromManifest(manifest, Tools.getUserId()); |
1016 | // consignorService.saveFromManifest(manifest, Tools.getUserId()); | 1017 | // consignorService.saveFromManifest(manifest, Tools.getUserId()); |
1017 | 1018 |
@@ -15,6 +15,7 @@ import com.agent.vo.agent.SDVo; | @@ -15,6 +15,7 @@ import com.agent.vo.agent.SDVo; | ||
15 | import com.agent.vo.agent.SecurityDeclarationVo; | 15 | import com.agent.vo.agent.SecurityDeclarationVo; |
16 | import com.agent.xml.XmlBuildTask; | 16 | import com.agent.xml.XmlBuildTask; |
17 | import com.framework.core.Servlets; | 17 | import com.framework.core.Servlets; |
18 | +import com.framework.mail.MailSenderService; | ||
18 | import com.framework.util.MessageKit; | 19 | import com.framework.util.MessageKit; |
19 | import com.framework.util.MessageType; | 20 | import com.framework.util.MessageType; |
20 | import com.framework.util.StringUtils; | 21 | import com.framework.util.StringUtils; |
@@ -29,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping; | @@ -29,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping; | ||
29 | import org.springframework.web.bind.annotation.ResponseBody; | 30 | import org.springframework.web.bind.annotation.ResponseBody; |
30 | import tools.Tools; | 31 | import tools.Tools; |
31 | 32 | ||
33 | +import javax.print.attribute.standard.ReferenceUriSchemesSupported; | ||
32 | import javax.servlet.http.HttpServletRequest; | 34 | import javax.servlet.http.HttpServletRequest; |
33 | import javax.servlet.http.HttpServletResponse; | 35 | import javax.servlet.http.HttpServletResponse; |
34 | import javax.servlet.http.HttpSession; | 36 | import javax.servlet.http.HttpSession; |
@@ -37,6 +39,7 @@ import java.net.URL; | @@ -37,6 +39,7 @@ import java.net.URL; | ||
37 | import java.text.ParseException; | 39 | import java.text.ParseException; |
38 | import java.text.SimpleDateFormat; | 40 | import java.text.SimpleDateFormat; |
39 | import java.util.ArrayList; | 41 | import java.util.ArrayList; |
42 | +import java.util.Date; | ||
40 | import java.util.List; | 43 | import java.util.List; |
41 | import java.util.Map; | 44 | import java.util.Map; |
42 | 45 | ||
@@ -129,6 +132,14 @@ public class SecurityDeclarationController { | @@ -129,6 +132,14 @@ public class SecurityDeclarationController { | ||
129 | } | 132 | } |
130 | 133 | ||
131 | /** | 134 | /** |
135 | + * 跳转国际安检申报添加 | ||
136 | + */ | ||
137 | + @RequestMapping(value = "/inlandSaveView") | ||
138 | + public String inlandSaveView(){ | ||
139 | + return "declaration/inlandsave"; | ||
140 | + } | ||
141 | + | ||
142 | + /** | ||
132 | * 保存并发送报文 | 143 | * 保存并发送报文 |
133 | * @param request | 144 | * @param request |
134 | * @param waybill | 145 | * @param waybill |
@@ -153,10 +164,15 @@ public class SecurityDeclarationController { | @@ -153,10 +164,15 @@ public class SecurityDeclarationController { | ||
153 | //货物品名 | 164 | //货物品名 |
154 | String cargoName = request.getParameter("sd_cargo_name"); | 165 | String cargoName = request.getParameter("sd_cargo_name"); |
155 | //运输条件鉴定书 | 166 | //运输条件鉴定书 |
156 | - String transportCertificate = request.getParameter("sd_transport_certificate"); | 167 | + String transportCertificate = ""; |
168 | + if ( request.getParameter("sd_transport_certificate") != null){ | ||
169 | + transportCertificate = request.getParameter("sd_transport_certificate"); | ||
170 | + } | ||
157 | //航空公司同意运输证明 | 171 | //航空公司同意运输证明 |
158 | - String transportationProve = request.getParameter("sd_transportation_prove"); | ||
159 | - | 172 | + String transportationProve = ""; |
173 | + if (request.getParameter("sd_transportation_prove") != null){ | ||
174 | + transportationProve = request.getParameter("sd_transportation_prove"); | ||
175 | + } | ||
160 | //货物性质是否多选 | 176 | //货物性质是否多选 |
161 | List<String> list = new ArrayList(); | 177 | List<String> list = new ArrayList(); |
162 | if (!StringUtils.isBlank(one)){ | 178 | if (!StringUtils.isBlank(one)){ |
@@ -250,6 +266,223 @@ public class SecurityDeclarationController { | @@ -250,6 +266,223 @@ public class SecurityDeclarationController { | ||
250 | 266 | ||
251 | 267 | ||
252 | /** | 268 | /** |
269 | + * 保存并发送报文 | ||
270 | + * @param request | ||
271 | + * @return | ||
272 | + */ | ||
273 | + @RequestMapping(value = "/inlandsave") | ||
274 | + @ResponseBody | ||
275 | + public ResponseModel inlandsave(HttpServletRequest request) throws ParseException { | ||
276 | + ResponseModel model = new ResponseModel(); | ||
277 | + /** | ||
278 | + * 预配 | ||
279 | + */ | ||
280 | + //订单号 | ||
281 | + String waybill = ""; | ||
282 | + | ||
283 | + String waybill1 = request.getParameter("waybill"); | ||
284 | + | ||
285 | + if (waybill1.contains("-")){ | ||
286 | + waybill = waybill1; | ||
287 | + }else { | ||
288 | + String substring = waybill1.substring(0, waybill1.length() - 8); | ||
289 | + String substring1 = waybill1.substring(3); | ||
290 | + waybill = substring+"-"+substring1; | ||
291 | + } | ||
292 | + | ||
293 | + //承运人公司 | ||
294 | + String carrier = request.getParameter("carrier"); | ||
295 | + //航班号 | ||
296 | + String flightno = request.getParameter("flightno"); | ||
297 | + //航班日期 | ||
298 | + String flightdates = request.getParameter("flightdate"); | ||
299 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); | ||
300 | + Date flightdate = simpleDateFormat.parse(flightdates); | ||
301 | + | ||
302 | + //公斤 | ||
303 | + String totalweight = request.getParameter("totalweight"); | ||
304 | + //件数 | ||
305 | + String totalpiece = request.getParameter("totalpiece"); | ||
306 | + //目的地 | ||
307 | + String destinationstation = request.getParameter("destinationstation"); | ||
308 | + /** | ||
309 | + * 安检申报 | ||
310 | + */ | ||
311 | + //货物性质(类型) | ||
312 | + String one = request.getParameter("one"); | ||
313 | + String two = request.getParameter("two"); | ||
314 | + String three = request.getParameter("three"); | ||
315 | + String four = request.getParameter("four"); | ||
316 | + //航空货物托运人名称 | ||
317 | + String cargoShipperName = request.getParameter("sd_cargo_shipper_name"); | ||
318 | + //航空货运销售代理人名称 | ||
319 | + String cargoAgentName = request.getParameter("sd_cargo_agent_name"); | ||
320 | + //航协编号 | ||
321 | + String iataNumber = request.getParameter("sd_iata_number"); | ||
322 | + //货物品名 | ||
323 | + String cargoName = request.getParameter("sd_cargo_name"); | ||
324 | + //运输条件鉴定书 | ||
325 | + String transportCertificate = ""; | ||
326 | + if ( request.getParameter("sd_transport_certificate") != null){ | ||
327 | + transportCertificate = request.getParameter("sd_transport_certificate"); | ||
328 | + } | ||
329 | + //航空公司同意运输证明 | ||
330 | + String transportationProve = ""; | ||
331 | + if (request.getParameter("sd_transportation_prove") != null){ | ||
332 | + transportationProve = request.getParameter("sd_transportation_prove"); | ||
333 | + } | ||
334 | + | ||
335 | + | ||
336 | + //货物性质是否多选 | ||
337 | + List<String> list = new ArrayList(); | ||
338 | + if (!StringUtils.isBlank(one)){ | ||
339 | + list.add(one); | ||
340 | + } | ||
341 | + if (!StringUtils.isBlank(two)){ | ||
342 | + list.add(two); | ||
343 | + } | ||
344 | + if (!StringUtils.isBlank(three)){ | ||
345 | + list.add(three); | ||
346 | + } | ||
347 | + if (!StringUtils.isBlank(four)){ | ||
348 | + list.add(four); | ||
349 | + } | ||
350 | + | ||
351 | + | ||
352 | + //查询是否存在 | ||
353 | + if (securityDeclarationService.findWaybill(waybill) == 0 && manifestService.findWbm(waybill) == null){ | ||
354 | + //货物性质(类型)添加 | ||
355 | + for (String type: list){ | ||
356 | + SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity(); | ||
357 | + sdCargoTypeEntity.setSd_waybill(waybill); | ||
358 | + sdCargoTypeEntity.setSd_cargo_type(type); | ||
359 | + sdCargoTypeService.save(sdCargoTypeEntity); | ||
360 | + } | ||
361 | + | ||
362 | + //货物品名 | ||
363 | + String cName = cargoName.replaceAll(",", ","); | ||
364 | + String[] split = cName.split(","); | ||
365 | + for (int i=0; i<split.length; i++){ | ||
366 | + if (!StringUtils.isBlank(split[i]) || !"".equals(split[i])){ | ||
367 | + SDCargoNameEntity sdCargoNameEntity = new SDCargoNameEntity(); | ||
368 | + sdCargoNameEntity.setSd_waybill(waybill); | ||
369 | + sdCargoNameEntity.setSd_cargo_name(split[i]); | ||
370 | + sdCargoNameService.save(sdCargoNameEntity); | ||
371 | + } | ||
372 | + } | ||
373 | + | ||
374 | + UserEntity ue = (UserEntity)SecurityUtils.getSubject().getSession().getAttribute("user"); | ||
375 | + | ||
376 | + ManifestEntity manifestEntity = new ManifestEntity(); | ||
377 | + | ||
378 | + //添加安检申报 | ||
379 | + SecurityDeclarationEntity sd = new SecurityDeclarationEntity(); | ||
380 | + sd.setSd_waybill(waybill); | ||
381 | + sd.setSd_cargo_agent_name(cargoAgentName); | ||
382 | + sd.setSd_cargo_shipper_name(cargoShipperName); | ||
383 | + sd.setSd_iata_number(iataNumber); | ||
384 | + sd.setSd_transport_certificate(transportCertificate); | ||
385 | + sd.setSd_transportation_prove(transportationProve); | ||
386 | + sd.setSd_static("1"); | ||
387 | + if (ue != null){ | ||
388 | + if (ue.getId() != null ){ | ||
389 | + sd.setUSER_ID(ue.getId()); | ||
390 | + manifestEntity.setUSER_ID(ue.getId()); | ||
391 | + } | ||
392 | + } | ||
393 | + securityDeclarationService.save(sd); | ||
394 | + | ||
395 | + // 生成报文并且发送 | ||
396 | + String ndlrPath = MessageKit.getMessagePath(MessageType.NDLR); | ||
397 | + | ||
398 | + //存放数据Vo | ||
399 | + SDVo sdVo = new SDVo(); | ||
400 | + sdVo.setSd_waybill(waybill); | ||
401 | + sdVo.setSd_cargo_agent_name(cargoAgentName); | ||
402 | + sdVo.setSd_cargo_shipper_name(cargoShipperName); | ||
403 | + sdVo.setSd_iata_number(iataNumber); | ||
404 | + sdVo.setSd_transport_certificate(transportCertificate); | ||
405 | + sdVo.setSd_transportation_prove(transportationProve); | ||
406 | + //品名 | ||
407 | + sdVo.setSd_cargo_name(cargoName); | ||
408 | + //货物类型 | ||
409 | + String cargoType = ""; | ||
410 | + for (String s: list){ | ||
411 | + cargoType+=s+","; | ||
412 | + } | ||
413 | + sdVo.setSd_cargo_type(cargoType); | ||
414 | + | ||
415 | + //添加预配信息 | ||
416 | + manifestEntity.setWaybillnomaster(waybill); | ||
417 | + manifestEntity.setFlightdate(flightdate); | ||
418 | + manifestEntity.setFlightno(flightno); | ||
419 | + manifestEntity.setCarrier(carrier); | ||
420 | + manifestEntity.setTotalpiece(totalpiece); | ||
421 | + manifestEntity.setTotalweight(totalweight); | ||
422 | + manifestEntity.setDestinationstation(destinationstation); | ||
423 | + manifestService.save(manifestEntity); | ||
424 | + | ||
425 | + //生成报文 | ||
426 | + sdVo.setFlightno(flightno); | ||
427 | + sdVo.setFlightdate(flightdate); | ||
428 | + sdVo.setCarrier(carrier); | ||
429 | + sdVo.setTotalpiece(totalpiece); | ||
430 | + sdVo.setTotalweight(totalweight); | ||
431 | + sdVo.setDestinationstation(destinationstation); | ||
432 | + new XmlBuildTask(securityDeclarationService.sendNDLRXml(sdVo), ndlrPath).perform(); | ||
433 | + | ||
434 | + model.setStatus(200); | ||
435 | + }else { | ||
436 | + model.setStatus(203); | ||
437 | + } | ||
438 | + | ||
439 | + return model; | ||
440 | + } | ||
441 | + | ||
442 | + | ||
443 | + /** | ||
444 | + * 查看信息 | ||
445 | + */ | ||
446 | + @RequestMapping(value = "/findone") | ||
447 | + public String findOne(Model model, Long id){ | ||
448 | + | ||
449 | + String cargoName = ""; | ||
450 | + String cargoType = ""; | ||
451 | + SecurityDeclarationEntity sd = securityDeclarationService.findOne(id); | ||
452 | + model.addAttribute("sd", sd); | ||
453 | + | ||
454 | + //查询预配 | ||
455 | + ManifestEntity wbm = manifestService.findWbm(sd.getSd_waybill()); | ||
456 | + | ||
457 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); | ||
458 | + | ||
459 | + String format = simpleDateFormat.format(new Date()); | ||
460 | + | ||
461 | + model.addAttribute("date", format); | ||
462 | + | ||
463 | + model.addAttribute("wbm", wbm); | ||
464 | + | ||
465 | + List<SDCargoTypeEntity> sdCargoTypeEntities = sdCargoTypeService.waybillAll(sd.getSd_waybill()); | ||
466 | + for (SDCargoTypeEntity type: sdCargoTypeEntities){ | ||
467 | + cargoType+=type.getSd_cargo_type(); | ||
468 | + } | ||
469 | + //货物性质(类型) | ||
470 | + | ||
471 | + model.addAttribute("type", cargoType); | ||
472 | + model.addAttribute("types", sdCargoTypeEntities); | ||
473 | + | ||
474 | + List<SDCargoNameEntity> sdCargoNameEntities = sdCargoNameService.waybillAll(sd.getSd_waybill()); | ||
475 | + for (SDCargoNameEntity sdCargoNameEntity: sdCargoNameEntities){ | ||
476 | + cargoName+=sdCargoNameEntity.getSd_cargo_name()+","; | ||
477 | + } | ||
478 | + String name = cargoName.substring(0, cargoName.length() - 1); | ||
479 | + model.addAttribute("name", name); | ||
480 | + | ||
481 | + return "declaration/findOne"; | ||
482 | + } | ||
483 | + | ||
484 | + | ||
485 | + /** | ||
253 | * 调转编辑页面 | 486 | * 调转编辑页面 |
254 | */ | 487 | */ |
255 | @RequestMapping(value = "/edit") | 488 | @RequestMapping(value = "/edit") |
@@ -263,6 +496,12 @@ public class SecurityDeclarationController { | @@ -263,6 +496,12 @@ public class SecurityDeclarationController { | ||
263 | //查询预配 | 496 | //查询预配 |
264 | ManifestEntity wbm = manifestService.findWbm(sd.getSd_waybill()); | 497 | ManifestEntity wbm = manifestService.findWbm(sd.getSd_waybill()); |
265 | 498 | ||
499 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); | ||
500 | + | ||
501 | + String format = simpleDateFormat.format(wbm.getFlightdate()); | ||
502 | + | ||
503 | + model.addAttribute("date", format); | ||
504 | + | ||
266 | model.addAttribute("wbm", wbm); | 505 | model.addAttribute("wbm", wbm); |
267 | 506 | ||
268 | List<SDCargoTypeEntity> sdCargoTypeEntities = sdCargoTypeService.waybillAll(sd.getSd_waybill()); | 507 | List<SDCargoTypeEntity> sdCargoTypeEntities = sdCargoTypeService.waybillAll(sd.getSd_waybill()); |
@@ -286,20 +525,75 @@ public class SecurityDeclarationController { | @@ -286,20 +525,75 @@ public class SecurityDeclarationController { | ||
286 | 525 | ||
287 | /** | 526 | /** |
288 | * 安检申报修改 | 527 | * 安检申报修改 |
289 | - * @param sd | ||
290 | * @param request | 528 | * @param request |
291 | - * @param waybill | ||
292 | * @return | 529 | * @return |
293 | */ | 530 | */ |
294 | @RequestMapping("/update") | 531 | @RequestMapping("/update") |
295 | @ResponseBody | 532 | @ResponseBody |
296 | - public ResponseModel update(SecurityDeclarationEntity sd, HttpServletRequest request, String waybill){ | 533 | + public ResponseModel update(HttpServletRequest request) throws ParseException { |
297 | ResponseModel model = new ResponseModel(); | 534 | ResponseModel model = new ResponseModel(); |
298 | 535 | ||
536 | + /** | ||
537 | + * 预配 | ||
538 | + */ | ||
539 | + //订单号 | ||
540 | + String waybill = ""; | ||
541 | + | ||
542 | + String waybill1 = request.getParameter("waybill"); | ||
543 | + | ||
544 | + if (waybill1.contains("-")){ | ||
545 | + waybill = waybill1; | ||
546 | + }else { | ||
547 | + String substring = waybill1.substring(0, waybill1.length() - 8); | ||
548 | + String substring1 = waybill1.substring(3); | ||
549 | + waybill = substring+"-"+substring1; | ||
550 | + } | ||
551 | + | ||
552 | + String id = request.getParameter("id"); | ||
553 | + | ||
554 | + | ||
555 | + //承运人公司 | ||
556 | + String carrier = request.getParameter("carrier"); | ||
557 | + //航班号 | ||
558 | + String flightno = request.getParameter("flightno"); | ||
559 | + //航班日期 | ||
560 | + String flightdates = request.getParameter("flightdate"); | ||
561 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); | ||
562 | + Date flightdate = simpleDateFormat.parse(flightdates); | ||
563 | + | ||
564 | + //公斤 | ||
565 | + String totalweight = request.getParameter("totalweight"); | ||
566 | + //件数 | ||
567 | + String totalpiece = request.getParameter("totalpiece"); | ||
568 | + //目的地 | ||
569 | + String destinationstation = request.getParameter("destinationstation"); | ||
570 | + /** | ||
571 | + * 安检申报 | ||
572 | + */ | ||
573 | + //货物性质(类型) | ||
299 | String one = request.getParameter("one"); | 574 | String one = request.getParameter("one"); |
300 | String two = request.getParameter("two"); | 575 | String two = request.getParameter("two"); |
301 | String three = request.getParameter("three"); | 576 | String three = request.getParameter("three"); |
302 | String four = request.getParameter("four"); | 577 | String four = request.getParameter("four"); |
578 | + //航空货物托运人名称 | ||
579 | + String cargoShipperName = request.getParameter("sd_cargo_shipper_name"); | ||
580 | + //航空货运销售代理人名称 | ||
581 | + String cargoAgentName = request.getParameter("sd_cargo_agent_name"); | ||
582 | + //航协编号 | ||
583 | + String iataNumber = request.getParameter("sd_iata_number"); | ||
584 | + //货物品名 | ||
585 | + String cargoName = request.getParameter("sd_cargo_name"); | ||
586 | + //运输条件鉴定书 | ||
587 | + String transportCertificate = ""; | ||
588 | + if ( request.getParameter("sd_transport_certificate") != null){ | ||
589 | + transportCertificate = request.getParameter("sd_transport_certificate"); | ||
590 | + } | ||
591 | + //航空公司同意运输证明 | ||
592 | + String transportationProve = ""; | ||
593 | + if (request.getParameter("sd_transportation_prove") != null){ | ||
594 | + transportationProve = request.getParameter("sd_transportation_prove"); | ||
595 | + } | ||
596 | + | ||
303 | 597 | ||
304 | List<String> list = new ArrayList(); | 598 | List<String> list = new ArrayList(); |
305 | if (!StringUtils.isBlank(one)){ | 599 | if (!StringUtils.isBlank(one)){ |
@@ -339,22 +633,40 @@ public class SecurityDeclarationController { | @@ -339,22 +633,40 @@ public class SecurityDeclarationController { | ||
339 | } | 633 | } |
340 | } | 634 | } |
341 | } | 635 | } |
342 | - if (securityDeclarationService.update(sd, waybill)>0){ | 636 | + |
637 | + | ||
638 | + //修改安检申报 | ||
639 | + UserEntity ue = (UserEntity)SecurityUtils.getSubject().getSession().getAttribute("user"); | ||
640 | + SecurityDeclarationEntity sd = new SecurityDeclarationEntity(); | ||
641 | + sd.setId(Long.valueOf(id)); | ||
642 | + sd.setSd_waybill(waybill); | ||
643 | + sd.setSd_cargo_agent_name(cargoAgentName); | ||
644 | + sd.setSd_cargo_shipper_name(cargoShipperName); | ||
645 | + sd.setSd_iata_number(iataNumber); | ||
646 | + sd.setSd_transport_certificate(transportCertificate); | ||
647 | + sd.setSd_transportation_prove(transportationProve); | ||
648 | + sd.setSd_static("1"); | ||
649 | + sd.setUSER_ID(ue.getId()); | ||
650 | + | ||
651 | + if (securityDeclarationService.update(sd)>0){ | ||
343 | model.setStatus(200); | 652 | model.setStatus(200); |
344 | } | 653 | } |
345 | 654 | ||
346 | // 生成报文并且发送 | 655 | // 生成报文并且发送 |
347 | String ndlrPath = MessageKit.getMessagePath(MessageType.NDLR); | 656 | String ndlrPath = MessageKit.getMessagePath(MessageType.NDLR); |
348 | - String dlcPath = MessageKit.getMessagePath(MessageType.DLCF); | ||
349 | - String sliPath = MessageKit.getMessagePath(MessageType.SLI); | 657 | + |
350 | //存放数据Vo | 658 | //存放数据Vo |
351 | SDVo sdVo = new SDVo(); | 659 | SDVo sdVo = new SDVo(); |
352 | sdVo.setSd_waybill(waybill); | 660 | sdVo.setSd_waybill(waybill); |
353 | sdVo.setSd_cargo_agent_name(sd.getSd_cargo_agent_name()); | 661 | sdVo.setSd_cargo_agent_name(sd.getSd_cargo_agent_name()); |
354 | sdVo.setSd_cargo_shipper_name(sd.getSd_cargo_shipper_name()); | 662 | sdVo.setSd_cargo_shipper_name(sd.getSd_cargo_shipper_name()); |
355 | sdVo.setSd_iata_number(sd.getSd_iata_number()); | 663 | sdVo.setSd_iata_number(sd.getSd_iata_number()); |
356 | - sdVo.setSd_transport_certificate(sd.getSd_transport_certificate()); | ||
357 | - sdVo.setSd_transportation_prove(sd.getSd_transportation_prove()); | 664 | + if (sd.getSd_transport_certificate() != null){ |
665 | + sdVo.setSd_transport_certificate(sd.getSd_transport_certificate()); | ||
666 | + } | ||
667 | + if (sd.getSd_transportation_prove() != null){ | ||
668 | + sdVo.setSd_transportation_prove(sd.getSd_transportation_prove()); | ||
669 | + } | ||
358 | //品名 | 670 | //品名 |
359 | sdVo.setSd_cargo_name(request.getParameter("sd_cargo_name").replaceAll(",", ",")); | 671 | sdVo.setSd_cargo_name(request.getParameter("sd_cargo_name").replaceAll(",", ",")); |
360 | //货物类型 | 672 | //货物类型 |
@@ -364,13 +676,30 @@ public class SecurityDeclarationController { | @@ -364,13 +676,30 @@ public class SecurityDeclarationController { | ||
364 | } | 676 | } |
365 | sdVo.setSd_cargo_type(cargoType); | 677 | sdVo.setSd_cargo_type(cargoType); |
366 | 678 | ||
679 | +// ManifestEntity wbm = manifestService.findWbm(waybill); | ||
680 | + ManifestEntity manifestEntity = new ManifestEntity(); | ||
681 | + //修改预配信息 | ||
682 | +// manifestEntity.setId(wbm.getId()); | ||
683 | + manifestEntity.setWaybillnomaster(waybill); | ||
684 | + manifestEntity.setFlightdate(flightdate); | ||
685 | + manifestEntity.setFlightno(flightno); | ||
686 | + manifestEntity.setCarrier(carrier); | ||
687 | + manifestEntity.setTotalpiece(totalpiece); | ||
688 | + manifestEntity.setTotalweight(totalweight); | ||
689 | + manifestEntity.setDestinationstation(destinationstation); | ||
690 | +// if (manifestService.deleteOne(waybill)>0){ | ||
691 | +// manifestService.save(manifestEntity); | ||
692 | +// } | ||
693 | + manifestService.update(manifestEntity); | ||
694 | + | ||
367 | //预配信息 | 695 | //预配信息 |
368 | - ManifestEntity wbm = manifestService.findWbm(waybill); | ||
369 | - sdVo.setFlightno(wbm.getFlightno()); | ||
370 | - sdVo.setFlightdate(wbm.getFlightdate()); | ||
371 | - sdVo.setCarrier(wbm.getCarrier()); | ||
372 | - sdVo.setTotalpiece(wbm.getTotalpiece()); | ||
373 | - sdVo.setTotalweight(wbm.getTotalweight()); | 696 | + sdVo.setFlightno(flightno); |
697 | + sdVo.setFlightdate(flightdate); | ||
698 | + sdVo.setCarrier(carrier); | ||
699 | + sdVo.setTotalpiece(totalpiece); | ||
700 | + sdVo.setTotalweight(totalweight); | ||
701 | + sdVo.setTotalweight(totalweight); | ||
702 | + sdVo.setDestinationstation(destinationstation); | ||
374 | 703 | ||
375 | new XmlBuildTask(securityDeclarationService.sendNDLRXml(sdVo), ndlrPath).perform(); | 704 | new XmlBuildTask(securityDeclarationService.sendNDLRXml(sdVo), ndlrPath).perform(); |
376 | 705 | ||
@@ -388,6 +717,12 @@ public class SecurityDeclarationController { | @@ -388,6 +717,12 @@ public class SecurityDeclarationController { | ||
388 | 717 | ||
389 | //安检申报数据 | 718 | //安检申报数据 |
390 | SecurityDeclarationEntity sd = securityDeclarationService.findOne(id); | 719 | SecurityDeclarationEntity sd = securityDeclarationService.findOne(id); |
720 | + if (sd.getSd_transport_certificate() == null){ | ||
721 | + sd.setSd_transport_certificate("无"); | ||
722 | + } | ||
723 | + if(sd.getSd_transportation_prove() == null){ | ||
724 | + sd.setSd_transportation_prove("无"); | ||
725 | + } | ||
391 | model.addAttribute("sd", sd); | 726 | model.addAttribute("sd", sd); |
392 | 727 | ||
393 | //航空公司运输证明 | 728 | //航空公司运输证明 |
@@ -403,13 +738,12 @@ public class SecurityDeclarationController { | @@ -403,13 +738,12 @@ public class SecurityDeclarationController { | ||
403 | //生成条形码 | 738 | //生成条形码 |
404 | BarCodeUtil.generateFile(replace, s); | 739 | BarCodeUtil.generateFile(replace, s); |
405 | 740 | ||
406 | - | ||
407 | model.addAttribute("path", replace); | 741 | model.addAttribute("path", replace); |
408 | 742 | ||
409 | //查询预配 | 743 | //查询预配 |
410 | ManifestEntity wbm = manifestService.findWbm(sd.getSd_waybill()); | 744 | ManifestEntity wbm = manifestService.findWbm(sd.getSd_waybill()); |
411 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); | 745 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
412 | - String format = simpleDateFormat.format(wbm.getFlightdate()); | 746 | + String format = simpleDateFormat.format(new Date()); |
413 | model.addAttribute("date", format); | 747 | model.addAttribute("date", format); |
414 | //主单数据 | 748 | //主单数据 |
415 | model.addAttribute("wbm", wbm); | 749 | model.addAttribute("wbm", wbm); |
@@ -80,9 +80,16 @@ public class HzInfoController { | @@ -80,9 +80,16 @@ public class HzInfoController { | ||
80 | hzvo.setForShort(hz.getFor_short()); | 80 | hzvo.setForShort(hz.getFor_short()); |
81 | hzvo.setFullName(hz.getFull_name()); | 81 | hzvo.setFullName(hz.getFull_name()); |
82 | hzvo.setContacts(hz.getContacts()); | 82 | hzvo.setContacts(hz.getContacts()); |
83 | - if ("1".equals(hz.getThe_shipper_type())){ | 83 | +// if ("1".equals(hz.getThe_shipper_type())){ |
84 | +// hzvo.setTheShipperType("发货人"); | ||
85 | +// }else if ("2".equals(hz.getThe_shipper_type())){ | ||
86 | +// hzvo.setTheShipperType("订舱代理"); | ||
87 | +// }else { | ||
88 | +// hzvo.setTheShipperType("操作代理"); | ||
89 | +// } | ||
90 | + if ("111" == hz.getThe_shipper_type()){ | ||
84 | hzvo.setTheShipperType("发货人"); | 91 | hzvo.setTheShipperType("发货人"); |
85 | - }else if ("2".equals(hz.getThe_shipper_type())){ | 92 | + }else if ("222" == hz.getThe_shipper_type()){ |
86 | hzvo.setTheShipperType("订舱代理"); | 93 | hzvo.setTheShipperType("订舱代理"); |
87 | }else { | 94 | }else { |
88 | hzvo.setTheShipperType("操作代理"); | 95 | hzvo.setTheShipperType("操作代理"); |
@@ -136,14 +143,14 @@ public class HzInfoController { | @@ -136,14 +143,14 @@ public class HzInfoController { | ||
136 | 143 | ||
137 | for (String type: list){ | 144 | for (String type: list){ |
138 | switch (type) { | 145 | switch (type) { |
139 | - case "1": | ||
140 | - if (hzInfoService.forShortShipperType(forshort, "1") == 0) { | 146 | + case "111": |
147 | + if (hzInfoService.forShortShipperType(forshort, "111") == 0) { | ||
141 | 148 | ||
142 | HZSHIPPERINFORMATIONEntity hzshipperinformationEntity = new HZSHIPPERINFORMATIONEntity(); | 149 | HZSHIPPERINFORMATIONEntity hzshipperinformationEntity = new HZSHIPPERINFORMATIONEntity(); |
143 | 150 | ||
144 | hzshipperinformationEntity.setFor_short(forshort); | 151 | hzshipperinformationEntity.setFor_short(forshort); |
145 | hzshipperinformationEntity.setFull_name(fullname); | 152 | hzshipperinformationEntity.setFull_name(fullname); |
146 | - hzshipperinformationEntity.setThe_shipper_type("1"); | 153 | + hzshipperinformationEntity.setThe_shipper_type("111"); |
147 | hzshipperinformationEntity.setContacts(contacts); | 154 | hzshipperinformationEntity.setContacts(contacts); |
148 | hzshipperinformationEntity.setPhone(phone); | 155 | hzshipperinformationEntity.setPhone(phone); |
149 | hzshipperinformationEntity.setDelete_flag("1"); | 156 | hzshipperinformationEntity.setDelete_flag("1"); |
@@ -154,12 +161,12 @@ public class HzInfoController { | @@ -154,12 +161,12 @@ public class HzInfoController { | ||
154 | model.setStatus(201); | 161 | model.setStatus(201); |
155 | break; | 162 | break; |
156 | } | 163 | } |
157 | - case "2": | ||
158 | - if (hzInfoService.forShortShipperType(forshort, "2") == 0) { | 164 | + case "222": |
165 | + if (hzInfoService.forShortShipperType(forshort, "222") == 0) { | ||
159 | HZSHIPPERINFORMATIONEntity hzshipperinformationEntity = new HZSHIPPERINFORMATIONEntity(); | 166 | HZSHIPPERINFORMATIONEntity hzshipperinformationEntity = new HZSHIPPERINFORMATIONEntity(); |
160 | hzshipperinformationEntity.setFor_short(forshort); | 167 | hzshipperinformationEntity.setFor_short(forshort); |
161 | hzshipperinformationEntity.setFull_name(fullname); | 168 | hzshipperinformationEntity.setFull_name(fullname); |
162 | - hzshipperinformationEntity.setThe_shipper_type("2"); | 169 | + hzshipperinformationEntity.setThe_shipper_type("222"); |
163 | hzshipperinformationEntity.setContacts(contacts); | 170 | hzshipperinformationEntity.setContacts(contacts); |
164 | hzshipperinformationEntity.setPhone(phone); | 171 | hzshipperinformationEntity.setPhone(phone); |
165 | hzshipperinformationEntity.setDelete_flag("1"); | 172 | hzshipperinformationEntity.setDelete_flag("1"); |
@@ -170,12 +177,12 @@ public class HzInfoController { | @@ -170,12 +177,12 @@ public class HzInfoController { | ||
170 | model.setStatus(201); | 177 | model.setStatus(201); |
171 | break; | 178 | break; |
172 | } | 179 | } |
173 | - case "3": | ||
174 | - if (hzInfoService.forShortShipperType(forshort, "3") == 0) { | 180 | + case "333": |
181 | + if (hzInfoService.forShortShipperType(forshort, "333") == 0) { | ||
175 | HZSHIPPERINFORMATIONEntity hzshipperinformationEntity = new HZSHIPPERINFORMATIONEntity(); | 182 | HZSHIPPERINFORMATIONEntity hzshipperinformationEntity = new HZSHIPPERINFORMATIONEntity(); |
176 | hzshipperinformationEntity.setFor_short(forshort); | 183 | hzshipperinformationEntity.setFor_short(forshort); |
177 | hzshipperinformationEntity.setFull_name(fullname); | 184 | hzshipperinformationEntity.setFull_name(fullname); |
178 | - hzshipperinformationEntity.setThe_shipper_type("3"); | 185 | + hzshipperinformationEntity.setThe_shipper_type("333"); |
179 | hzshipperinformationEntity.setContacts(contacts); | 186 | hzshipperinformationEntity.setContacts(contacts); |
180 | hzshipperinformationEntity.setPhone(phone); | 187 | hzshipperinformationEntity.setPhone(phone); |
181 | hzshipperinformationEntity.setDelete_flag("1"); | 188 | hzshipperinformationEntity.setDelete_flag("1"); |
@@ -2,8 +2,10 @@ package com.agent.repository.agent; | @@ -2,8 +2,10 @@ package com.agent.repository.agent; | ||
2 | 2 | ||
3 | import com.agent.entity.agent.ManifestEntity; | 3 | import com.agent.entity.agent.ManifestEntity; |
4 | 4 | ||
5 | +import java.util.Date; | ||
5 | import java.util.List; | 6 | import java.util.List; |
6 | 7 | ||
8 | +import org.omg.CORBA.PUBLIC_MEMBER; | ||
7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | 9 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; |
8 | import org.springframework.data.jpa.repository.Modifying; | 10 | import org.springframework.data.jpa.repository.Modifying; |
9 | import org.springframework.data.jpa.repository.Query; | 11 | import org.springframework.data.jpa.repository.Query; |
@@ -27,24 +29,35 @@ public interface ManifestRepository extends PagingAndSortingRepository<ManifestE | @@ -27,24 +29,35 @@ public interface ManifestRepository extends PagingAndSortingRepository<ManifestE | ||
27 | 29 | ||
28 | @Transactional | 30 | @Transactional |
29 | @Modifying | 31 | @Modifying |
32 | + @Query(value = "DELETE FROM MANIFEST WHERE WAYBILLNOMASTER = ?1", nativeQuery = true) | ||
33 | + int deleteOne(String waybill); | ||
34 | + | ||
35 | + @Transactional | ||
36 | + @Modifying | ||
30 | @Query(value = "UPDATE MANIFEST SET USER_ID =?1 where ID = ?2", nativeQuery = true) | 37 | @Query(value = "UPDATE MANIFEST SET USER_ID =?1 where ID = ?2", nativeQuery = true) |
31 | void userUpdate(Long userId, Long ids); | 38 | void userUpdate(Long userId, Long ids); |
32 | 39 | ||
33 | @Query(value = "SELECT * FROM MANIFEST ORDER BY ID DESC", nativeQuery = true) | 40 | @Query(value = "SELECT * FROM MANIFEST ORDER BY ID DESC", nativeQuery = true) |
34 | - public List<ManifestEntity> findAll(); | 41 | + List<ManifestEntity> findAll(); |
35 | 42 | ||
36 | @Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER = ?1 and USER_ID=?2 ORDER BY ID DESC", nativeQuery = true) | 43 | @Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER = ?1 and USER_ID=?2 ORDER BY ID DESC", nativeQuery = true) |
37 | - public List<ManifestEntity> findByMawbNo(String mawbNo, Long user_id); | 44 | + List<ManifestEntity> findByMawbNo(String mawbNo, Long user_id); |
38 | 45 | ||
39 | @Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER = ?1 ORDER BY ID DESC", nativeQuery = true) | 46 | @Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER = ?1 ORDER BY ID DESC", nativeQuery = true) |
40 | - public List<ManifestEntity> findByMawbNo(String mawbNo); | 47 | + List<ManifestEntity> findByMawbNo(String mawbNo); |
41 | 48 | ||
42 | @Query(value = "SELECT * FROM MANIFEST", nativeQuery = true) | 49 | @Query(value = "SELECT * FROM MANIFEST", nativeQuery = true) |
43 | - public List<ManifestEntity> queryAll(); | 50 | + List<ManifestEntity> queryAll(); |
44 | 51 | ||
45 | @Query(value = "SELECT * FROM MANIFEST WHERE USER_ID=?1", nativeQuery = true) | 52 | @Query(value = "SELECT * FROM MANIFEST WHERE USER_ID=?1", nativeQuery = true) |
46 | - public List<ManifestEntity> queryByUserId(Long user_id); | 53 | + List<ManifestEntity> queryByUserId(Long user_id); |
47 | 54 | ||
48 | @Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER=?1", nativeQuery = true) | 55 | @Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER=?1", nativeQuery = true) |
49 | - public ManifestEntity findWbm(String wbm); | 56 | + ManifestEntity findWbm(String wbm); |
57 | + | ||
58 | + @Transactional | ||
59 | + @Modifying | ||
60 | + @Query(value = "UPDATE MANIFEST SET WAYBILLNOMASTER=?1, FLIGHTNO=?2, FLIGHTDATE=?3, CARRIER=?4, TOTALPIECE=?5, TOTALWEIGHT=?6, DESTINATIONSTATION=?7 WHERE WAYBILLNOMASTER=?1", nativeQuery = true) | ||
61 | + int update(String waybill, String flightno, Date flightdate, String carrier, | ||
62 | + String totalpiece, String totalweight, String destinationstation); | ||
50 | } | 63 | } |
@@ -33,13 +33,13 @@ public interface HzInfoRepository extends PagingAndSortingRepository<HZSHIPPERIN | @@ -33,13 +33,13 @@ public interface HzInfoRepository extends PagingAndSortingRepository<HZSHIPPERIN | ||
33 | @Query(value = "insert into HZ_SHIPPER_INFORMATION(FOR_SHORT, FULL_NAME, THE_SHIPPER_TYPE, CONTACTS, PHONE, DELETE_FLAG) values(?1, ?2, ?3, ?4, ?5, ?6)", nativeQuery = true) | 33 | @Query(value = "insert into HZ_SHIPPER_INFORMATION(FOR_SHORT, FULL_NAME, THE_SHIPPER_TYPE, CONTACTS, PHONE, DELETE_FLAG) values(?1, ?2, ?3, ?4, ?5, ?6)", nativeQuery = true) |
34 | int saves(String forShort, String fullName, String theShipperType, String contacts, String phone, String deleteFlag); | 34 | int saves(String forShort, String fullName, String theShipperType, String contacts, String phone, String deleteFlag); |
35 | 35 | ||
36 | - @Query(value = "select * from HZ_SHIPPER_INFORMATION where the_shipper_type=1 and delete_flag = 1", nativeQuery = true) | 36 | + @Query(value = "select * from HZ_SHIPPER_INFORMATION where the_shipper_type=111 and delete_flag = 1", nativeQuery = true) |
37 | List<HZSHIPPERINFORMATIONEntity> findShipeer(); | 37 | List<HZSHIPPERINFORMATIONEntity> findShipeer(); |
38 | 38 | ||
39 | - @Query(value = "select * from HZ_SHIPPER_INFORMATION where the_shipper_type=2 and delete_flag = 1", nativeQuery = true) | 39 | + @Query(value = "select * from HZ_SHIPPER_INFORMATION where the_shipper_type=222 and delete_flag = 1", nativeQuery = true) |
40 | List<HZSHIPPERINFORMATIONEntity> findBooking(); | 40 | List<HZSHIPPERINFORMATIONEntity> findBooking(); |
41 | 41 | ||
42 | - @Query(value = "select * from HZ_SHIPPER_INFORMATION where the_shipper_type=3 and delete_flag = 1", nativeQuery = true) | 42 | + @Query(value = "select * from HZ_SHIPPER_INFORMATION where the_shipper_type=333 and delete_flag = 1", nativeQuery = true) |
43 | List<HZSHIPPERINFORMATIONEntity> findOperaion(); | 43 | List<HZSHIPPERINFORMATIONEntity> findOperaion(); |
44 | 44 | ||
45 | @Query(value = "select * from HZ_SHIPPER_INFORMATION where id=?1 and delete_flag = 1", nativeQuery = true) | 45 | @Query(value = "select * from HZ_SHIPPER_INFORMATION where id=?1 and delete_flag = 1", nativeQuery = true) |
@@ -16,12 +16,15 @@ public interface SecurityDeclarationRepository extends PagingAndSortingRepositor | @@ -16,12 +16,15 @@ public interface SecurityDeclarationRepository extends PagingAndSortingRepositor | ||
16 | 16 | ||
17 | @Transactional | 17 | @Transactional |
18 | @Modifying | 18 | @Modifying |
19 | - @Query(value = "update SECURITY_DECLARATION set SD_WAYBILL=?2, SD_CARGO_SHIPPER_NAME=?4, SD_CARGO_AGENT_NAME=?3, SD_IATA_NUMBER=?5, SD_TRANSPORT_CERTIFICATE=?6, SD_TRANSPORTATION_PROVE=?7 where id=?1", nativeQuery = true) | 19 | + @Query(value = "update SECURITY_DECLARATION set SD_WAYBILL=?2, SD_CARGO_SHIPPER_NAME=?4, SD_CARGO_AGENT_NAME=?3, SD_IATA_NUMBER=?5, SD_TRANSPORT_CERTIFICATE=?6, SD_TRANSPORTATION_PROVE=?7, USER_ID=?8 where id=?1", nativeQuery = true) |
20 | int update(Long id, String waybill, | 20 | int update(Long id, String waybill, |
21 | String cargoAgent, String cargoShipper, | 21 | String cargoAgent, String cargoShipper, |
22 | - String iata, String tranposrt, String prove); | 22 | + String iata, String tranposrt, String prove, Long userId); |
23 | 23 | ||
24 | @Query(value = "select count(*) from SECURITY_DECLARATION where SD_WAYBILL = ?1", nativeQuery = true) | 24 | @Query(value = "select count(*) from SECURITY_DECLARATION where SD_WAYBILL = ?1", nativeQuery = true) |
25 | int findWaybill(String waybill); | 25 | int findWaybill(String waybill); |
26 | 26 | ||
27 | + @Query(value = "select * from SECURITY_DECLARATION where SD_WAYBILL = ?1", nativeQuery = true) | ||
28 | + SecurityDeclarationEntity waybill(String waybill); | ||
29 | + | ||
27 | } | 30 | } |
@@ -9,6 +9,7 @@ import javax.annotation.Resource; | @@ -9,6 +9,7 @@ import javax.annotation.Resource; | ||
9 | 9 | ||
10 | import com.agent.entity.agent.*; | 10 | import com.agent.entity.agent.*; |
11 | import com.agent.repository.system.HzWaybillRepository; | 11 | import com.agent.repository.system.HzWaybillRepository; |
12 | +import com.agent.repository.system.SecurityDeclarationRepository; | ||
12 | import org.springframework.data.domain.Page; | 13 | import org.springframework.data.domain.Page; |
13 | import org.springframework.data.domain.PageRequest; | 14 | import org.springframework.data.domain.PageRequest; |
14 | import org.springframework.data.jpa.domain.Specification; | 15 | import org.springframework.data.jpa.domain.Specification; |
@@ -124,6 +125,9 @@ public class ManifestService extends BasicService<ManifestEntity> { | @@ -124,6 +125,9 @@ public class ManifestService extends BasicService<ManifestEntity> { | ||
124 | @Resource | 125 | @Resource |
125 | private HzWaybillRepository hzWaybillRepository; | 126 | private HzWaybillRepository hzWaybillRepository; |
126 | 127 | ||
128 | + @Resource | ||
129 | + private SecurityDeclarationRepository securityDeclarationRepository; | ||
130 | + | ||
127 | /** | 131 | /** |
128 | * 分页查询 | 132 | * 分页查询 |
129 | * | 133 | * |
@@ -212,6 +216,11 @@ public class ManifestService extends BasicService<ManifestEntity> { | @@ -212,6 +216,11 @@ public class ManifestService extends BasicService<ManifestEntity> { | ||
212 | ManifestEntity manifestEntity = new ManifestEntity(); | 216 | ManifestEntity manifestEntity = new ManifestEntity(); |
213 | manifestEntity.setId(Long.valueOf(id)); | 217 | manifestEntity.setId(Long.valueOf(id)); |
214 | manifestRepository.delete(manifestEntity); | 218 | manifestRepository.delete(manifestEntity); |
219 | + //查看是否有安检申报 存在删除 | ||
220 | + SecurityDeclarationEntity waybill1 = securityDeclarationRepository.waybill(waybillnomaster); | ||
221 | + if (waybill1 != null){ | ||
222 | + securityDeclarationRepository.delete(waybill1.getId()); | ||
223 | + } | ||
215 | } | 224 | } |
216 | }catch (Exception e){ | 225 | }catch (Exception e){ |
217 | e.printStackTrace(); | 226 | e.printStackTrace(); |
@@ -1066,4 +1075,18 @@ public class ManifestService extends BasicService<ManifestEntity> { | @@ -1066,4 +1075,18 @@ public class ManifestService extends BasicService<ManifestEntity> { | ||
1066 | return manifestRepository.findWbm(wbm); | 1075 | return manifestRepository.findWbm(wbm); |
1067 | } | 1076 | } |
1068 | 1077 | ||
1078 | + //修改预配 | ||
1079 | +// @Transactional | ||
1080 | + public int update(ManifestEntity manifestEntity){ | ||
1081 | + | ||
1082 | + return manifestRepository.update(manifestEntity.getWaybillnomaster(), | ||
1083 | + manifestEntity.getFlightno(), manifestEntity.getFlightdate(), manifestEntity.getCarrier(), | ||
1084 | + manifestEntity.getTotalpiece(), manifestEntity.getTotalweight(), manifestEntity.getDestinationstation()); | ||
1085 | + } | ||
1086 | + | ||
1087 | + //删除预配 | ||
1088 | + @Transactional | ||
1089 | + public int deleteOne(String waybill){ | ||
1090 | + return manifestRepository.deleteOne(waybill); | ||
1091 | + } | ||
1069 | } | 1092 | } |
@@ -56,12 +56,12 @@ public class SecurityDeclarationService extends BasicService<SecurityDeclaration | @@ -56,12 +56,12 @@ public class SecurityDeclarationService extends BasicService<SecurityDeclaration | ||
56 | return securityDeclarationRepository.findOne(id); | 56 | return securityDeclarationRepository.findOne(id); |
57 | } | 57 | } |
58 | 58 | ||
59 | - public int update(SecurityDeclarationEntity sd, String waybill){ | 59 | + public int update(SecurityDeclarationEntity sd){ |
60 | 60 | ||
61 | - return securityDeclarationRepository.update(sd.getId(), waybill, | 61 | + return securityDeclarationRepository.update(sd.getId(), sd.getSd_waybill(), |
62 | sd.getSd_cargo_agent_name(), sd.getSd_cargo_shipper_name(), | 62 | sd.getSd_cargo_agent_name(), sd.getSd_cargo_shipper_name(), |
63 | sd.getSd_iata_number(), sd.getSd_transport_certificate(), | 63 | sd.getSd_iata_number(), sd.getSd_transport_certificate(), |
64 | - sd.getSd_transportation_prove()); | 64 | + sd.getSd_transportation_prove(), sd.getUSER_ID()); |
65 | } | 65 | } |
66 | 66 | ||
67 | 67 |
1 | +package com.agent.vo.agent; | ||
2 | + | ||
3 | +import java.util.Date; | ||
4 | + | ||
5 | +/** | ||
6 | + * @Auther: shenhl | ||
7 | + * @Date: 2019/7/5 15:05 | ||
8 | + */ | ||
9 | +public class InlandVo { | ||
10 | + | ||
11 | + private static final long serialVersionUID = 1L; | ||
12 | + | ||
13 | + private Long id; | ||
14 | + //承运人公司 | ||
15 | + private String carrier; | ||
16 | + //航空货物性质 1普通货物 2特种货物 3危险品 4航空快件 | ||
17 | + private String inlandtype; | ||
18 | + //航班日期 | ||
19 | + private Date flightdate; | ||
20 | + //航空货物托运人名称 | ||
21 | + private String inlandname; | ||
22 | + //航班号 | ||
23 | + private String flightno; | ||
24 | + //航空货物销售代理人名称 | ||
25 | + private String agentname; | ||
26 | + //航协资质编号 | ||
27 | + private String iatanumber; | ||
28 | + //货物品名 | ||
29 | + private String cargoname; | ||
30 | + //公斤 | ||
31 | + private String weight; | ||
32 | + //件 | ||
33 | + private String piece; | ||
34 | + //目的地 | ||
35 | + private String destination; | ||
36 | + //运输条件鉴定书 | ||
37 | + private String transportcertificate; | ||
38 | + //航空公司同意运输证明 | ||
39 | + private String transportationprove; | ||
40 | + //用户id | ||
41 | + private Long userid; | ||
42 | + | ||
43 | + private String status; | ||
44 | + | ||
45 | + private String waybill; | ||
46 | + | ||
47 | + public String getWaybill() { | ||
48 | + return waybill; | ||
49 | + } | ||
50 | + | ||
51 | + public void setWaybill(String waybill) { | ||
52 | + this.waybill = waybill; | ||
53 | + } | ||
54 | + public Long getId() { | ||
55 | + return id; | ||
56 | + } | ||
57 | + | ||
58 | + public void setId(Long id) { | ||
59 | + this.id = id; | ||
60 | + } | ||
61 | + | ||
62 | + public String getStatus() { | ||
63 | + return status; | ||
64 | + } | ||
65 | + | ||
66 | + public void setStatus(String status) { | ||
67 | + this.status = status; | ||
68 | + } | ||
69 | + | ||
70 | + public String getCarrier() { | ||
71 | + return carrier; | ||
72 | + } | ||
73 | + | ||
74 | + public void setCarrier(String carrier) { | ||
75 | + this.carrier = carrier; | ||
76 | + } | ||
77 | + | ||
78 | + public String getInlandtype() { | ||
79 | + return inlandtype; | ||
80 | + } | ||
81 | + | ||
82 | + public void setInlandtype(String inlandtype) { | ||
83 | + this.inlandtype = inlandtype; | ||
84 | + } | ||
85 | + | ||
86 | + public Date getFlightdate() { | ||
87 | + return flightdate; | ||
88 | + } | ||
89 | + | ||
90 | + public void setFlightdate(Date flightdate) { | ||
91 | + this.flightdate = flightdate; | ||
92 | + } | ||
93 | + | ||
94 | + public String getInlandname() { | ||
95 | + return inlandname; | ||
96 | + } | ||
97 | + | ||
98 | + public void setInlandname(String inlandname) { | ||
99 | + this.inlandname = inlandname; | ||
100 | + } | ||
101 | + | ||
102 | + public String getFlightno() { | ||
103 | + return flightno; | ||
104 | + } | ||
105 | + | ||
106 | + public void setFlightno(String flightno) { | ||
107 | + this.flightno = flightno; | ||
108 | + } | ||
109 | + | ||
110 | + public String getAgentname() { | ||
111 | + return agentname; | ||
112 | + } | ||
113 | + | ||
114 | + public void setAgentname(String agentname) { | ||
115 | + this.agentname = agentname; | ||
116 | + } | ||
117 | + | ||
118 | + public String getIatanumber() { | ||
119 | + return iatanumber; | ||
120 | + } | ||
121 | + | ||
122 | + public void setIatanumber(String iatanumber) { | ||
123 | + this.iatanumber = iatanumber; | ||
124 | + } | ||
125 | + | ||
126 | + public String getCargoname() { | ||
127 | + return cargoname; | ||
128 | + } | ||
129 | + | ||
130 | + public void setCargoname(String cargoname) { | ||
131 | + this.cargoname = cargoname; | ||
132 | + } | ||
133 | + | ||
134 | + public String getWeight() { | ||
135 | + return weight; | ||
136 | + } | ||
137 | + | ||
138 | + public void setWeight(String weight) { | ||
139 | + this.weight = weight; | ||
140 | + } | ||
141 | + | ||
142 | + public String getPiece() { | ||
143 | + return piece; | ||
144 | + } | ||
145 | + | ||
146 | + public void setPiece(String piece) { | ||
147 | + this.piece = piece; | ||
148 | + } | ||
149 | + | ||
150 | + public String getDestination() { | ||
151 | + return destination; | ||
152 | + } | ||
153 | + | ||
154 | + public void setDestination(String destination) { | ||
155 | + this.destination = destination; | ||
156 | + } | ||
157 | + | ||
158 | + public String getTransportcertificate() { | ||
159 | + return transportcertificate; | ||
160 | + } | ||
161 | + | ||
162 | + public void setTransportcertificate(String transportcertificate) { | ||
163 | + this.transportcertificate = transportcertificate; | ||
164 | + } | ||
165 | + | ||
166 | + public String getTransportationprove() { | ||
167 | + return transportationprove; | ||
168 | + } | ||
169 | + | ||
170 | + public void setTransportationprove(String transportationprove) { | ||
171 | + this.transportationprove = transportationprove; | ||
172 | + } | ||
173 | + | ||
174 | + public Long getUserid() { | ||
175 | + return userid; | ||
176 | + } | ||
177 | + | ||
178 | + public void setUserid(Long userid) { | ||
179 | + this.userid = userid; | ||
180 | + } | ||
181 | +} |
@@ -69,9 +69,9 @@ | @@ -69,9 +69,9 @@ | ||
69 | <table class="search_form_table"> | 69 | <table class="search_form_table"> |
70 | <select name="search_LIKE_tstype" id="tstype" style="width:166px;height:35px;line-height:35px;"> | 70 | <select name="search_LIKE_tstype" id="tstype" style="width:166px;height:35px;line-height:35px;"> |
71 | <option value="">请选择</option> | 71 | <option value="">请选择</option> |
72 | - <option value="1">发货人</option> | ||
73 | - <option value="2">订舱代理</option> | ||
74 | - <option value="3">操作代理</option> | 72 | + <option value="A">发货人</option> |
73 | + <option value="B">订舱代理</option> | ||
74 | + <option value="C">操作代理</option> | ||
75 | </select> | 75 | </select> |
76 | 76 | ||
77 | 货主名称: <input class="easyui-textbox" type="text" name="search_LIKE_fullname" style="width:166px;height:35px;line-height:35px;"> | 77 | 货主名称: <input class="easyui-textbox" type="text" name="search_LIKE_fullname" style="width:166px;height:35px;line-height:35px;"> |
@@ -110,13 +110,13 @@ | @@ -110,13 +110,13 @@ | ||
110 | 110 | ||
111 | function tstype(value, row, index) { | 111 | function tstype(value, row, index) { |
112 | console.log(row); | 112 | console.log(row); |
113 | - if ("1" == row.tstype){ | 113 | + if ("111" == row.tstype){ |
114 | return "发货人" | 114 | return "发货人" |
115 | } | 115 | } |
116 | - if ("2" == row.tstype){ | 116 | + if ("222" == row.tstype){ |
117 | return"订舱代理" | 117 | return"订舱代理" |
118 | } | 118 | } |
119 | - if("3"== row.tstype){ | 119 | + if("333"== row.tstype){ |
120 | return "操作代理" | 120 | return "操作代理" |
121 | } | 121 | } |
122 | } | 122 | } |
@@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
52 | <span class="required_span">*</span> | 52 | <span class="required_span">*</span> |
53 | </td> | 53 | </td> |
54 | <td class="kv-content"> | 54 | <td class="kv-content"> |
55 | - <input required id="waybill" minlength="12" name="waybill" value="${sd.sd_waybill}" disabled> | 55 | + <input required id="waybill" minlength="12" name="waybill" value="${sd.sd_waybill}" > |
56 | </td> | 56 | </td> |
57 | 57 | ||
58 | <td class="kv-label">航空货物性质 | 58 | <td class="kv-label">航空货物性质 |
@@ -79,14 +79,14 @@ | @@ -79,14 +79,14 @@ | ||
79 | <span class="required_span">*</span> | 79 | <span class="required_span">*</span> |
80 | </td> | 80 | </td> |
81 | <td class="kv-content"> | 81 | <td class="kv-content"> |
82 | - <input disabled value="${wbm.carrier}" disabled> | 82 | + <input required name="carrier" id="carrier" type="text" value="${wbm.carrier}" > |
83 | </td> | 83 | </td> |
84 | 84 | ||
85 | <td class="kv-label">航班号 | 85 | <td class="kv-label">航班号 |
86 | <span class="required_span">*</span> | 86 | <span class="required_span">*</span> |
87 | </td> | 87 | </td> |
88 | <td class="kv-content"> | 88 | <td class="kv-content"> |
89 | - <input disabled value="${wbm.carrier}${wbm.flightno}" disabled> | 89 | + <input required name="flightno" value="${wbm.flightno}"> |
90 | </td> | 90 | </td> |
91 | 91 | ||
92 | </tr> | 92 | </tr> |
@@ -95,7 +95,7 @@ | @@ -95,7 +95,7 @@ | ||
95 | <span class="required_span">*</span> | 95 | <span class="required_span">*</span> |
96 | </td> | 96 | </td> |
97 | <td class="kv-content"> | 97 | <td class="kv-content"> |
98 | - <input disabled value="${wbm.flightdate}" disabled> | 98 | + <input required name="flightdate" id="flightdate" type="date" value="${date}"> |
99 | </td> | 99 | </td> |
100 | 100 | ||
101 | <td class="kv-label">航空货物托运人名称 | 101 | <td class="kv-label">航空货物托运人名称 |
@@ -133,7 +133,7 @@ | @@ -133,7 +133,7 @@ | ||
133 | <span class="required_span">*</span> | 133 | <span class="required_span">*</span> |
134 | </td> | 134 | </td> |
135 | <td class="kv-content"> | 135 | <td class="kv-content"> |
136 | - <input disabled type="text" value="${wbm.totalweight}"> | 136 | + <input required name="totalweight" id="totalweight" type="text" value="${wbm.totalweight}"> |
137 | </td> | 137 | </td> |
138 | </tr> | 138 | </tr> |
139 | 139 | ||
@@ -142,42 +142,31 @@ | @@ -142,42 +142,31 @@ | ||
142 | <span class="required_span">*</span> | 142 | <span class="required_span">*</span> |
143 | </td> | 143 | </td> |
144 | <td class="kv-content"> | 144 | <td class="kv-content"> |
145 | - <input disabled type="text" value="${wbm.totalpiece}"> | 145 | + <input required name="totalpiece" id="totalpiece" type="text" value="${wbm.totalpiece}"> |
146 | </td> | 146 | </td> |
147 | <td class="kv-label">目的地 | 147 | <td class="kv-label">目的地 |
148 | <span class="required_span">*</span> | 148 | <span class="required_span">*</span> |
149 | </td> | 149 | </td> |
150 | <td class="kv-content"> | 150 | <td class="kv-content"> |
151 | - <input disabled type="text" value="${wbm.destinationstation}"> | 151 | + <input required name="destinationstation" id="destinationstation" type="text" value="${wbm.destinationstation}"> |
152 | </td> | 152 | </td> |
153 | </tr> | 153 | </tr> |
154 | 154 | ||
155 | <tr> | 155 | <tr> |
156 | <td class="kv-label">运输条件鉴定书 | 156 | <td class="kv-label">运输条件鉴定书 |
157 | - <span class="required_span">*</span> | ||
158 | </td> | 157 | </td> |
159 | <td class="kv-content"> | 158 | <td class="kv-content"> |
160 | - <input required id="sd_transport_certificate" name="sd_transport_certificate" type="text" value="${sd.sd_transport_certificate}"> | 159 | + <input id="sd_transport_certificate" name="sd_transport_certificate" type="text" value="${sd.sd_transport_certificate}"> |
161 | </td> | 160 | </td> |
162 | 161 | ||
163 | <td class="kv-label">航空公司同意运输证明 | 162 | <td class="kv-label">航空公司同意运输证明 |
164 | - <span class="required_span">*</span> | ||
165 | </td> | 163 | </td> |
166 | <td class="kv-content"> | 164 | <td class="kv-content"> |
167 | - <input required id="sd_transportation_prove" name="sd_transportation_prove" type="text" value="${sd.sd_transportation_prove}" placeholder="运输证明分别用逗号隔开"> | 165 | + <input id="sd_transportation_prove" name="sd_transportation_prove" type="text" value="${sd.sd_transportation_prove}" placeholder="运输证明分别用逗号隔开"> |
168 | </td> | 166 | </td> |
169 | </tr> | 167 | </tr> |
170 | 168 | ||
171 | <tr> | 169 | <tr> |
172 | - <%--<td colspan="2">--%> | ||
173 | - <%--<div class="opt-buttons" style="padding-top: 20px;" id="divsubmit">--%> | ||
174 | - <%--<button type="submit" class="easyui-linkbutton l-btn l-btn-small l-btn-selected "--%> | ||
175 | - <%--data-options="selected:true">--%> | ||
176 | - <%--<span class="l-btn-left"><span class="l-btn-text"><spring:message--%> | ||
177 | - <%--code="opt.temsave" /></span></span>--%> | ||
178 | - <%--</button>--%> | ||
179 | - <%--</div>--%> | ||
180 | - <%--</td>--%> | ||
181 | <td colspan="2" align="right"> | 170 | <td colspan="2" align="right"> |
182 | <div class="opt-buttons" style="padding-top: 20px;text-align: right;" id="divsubmit"> | 171 | <div class="opt-buttons" style="padding-top: 20px;text-align: right;" id="divsubmit"> |
183 | <a onclick="savesend()" class="easyui-linkbutton l-btn l-btn-small l-btn-selected " | 172 | <a onclick="savesend()" class="easyui-linkbutton l-btn l-btn-small l-btn-selected " |
@@ -185,10 +174,6 @@ | @@ -185,10 +174,6 @@ | ||
185 | <span class="l-btn-left"><span class="l-btn-text"><spring:message | 174 | <span class="l-btn-left"><span class="l-btn-text"><spring:message |
186 | code="opt.saveandsend" /></span></span> | 175 | code="opt.saveandsend" /></span></span> |
187 | </a> | 176 | </a> |
188 | - <%-- <a onclick="sendDelivery()" class="easyui-linkbutton l-btn l-btn-small l-btn-selected " data-options="selected:true"> | ||
189 | - <span class="l-btn-left"><span class="l-btn-text"><spring:message code="manifest.delivery"/></span></span> | ||
190 | - </a> --%> | ||
191 | - <%--<a onclick="windowprint()" href="javascript:void(0)">打印</a>--%> | ||
192 | </div> | 177 | </div> |
193 | </td> | 178 | </td> |
194 | </tr> | 179 | </tr> |
@@ -296,9 +281,13 @@ | @@ -296,9 +281,13 @@ | ||
296 | if (data.status == 200) { | 281 | if (data.status == 200) { |
297 | $("#xmlContent").val(data.data); | 282 | $("#xmlContent").val(data.data); |
298 | $("#DialogShunt").window('open'); | 283 | $("#DialogShunt").window('open'); |
284 | + <%--var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引--%> | ||
285 | + <%--parent.layer.close(index);--%> | ||
286 | + <%--window.location.href = "<%=basePath%>declaration/list";--%> | ||
287 | + window.parent.location.reload(); | ||
299 | var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 | 288 | var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 |
300 | parent.layer.close(index); | 289 | parent.layer.close(index); |
301 | - window.location.href = "<%=basePath%>declaration/list"; | 290 | + |
302 | } else { | 291 | } else { |
303 | layer.open({content:data.msg}); | 292 | layer.open({content:data.msg}); |
304 | } | 293 | } |
1 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
2 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | ||
3 | +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> | ||
4 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
5 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | ||
6 | +<% | ||
7 | + String path = request.getContextPath(); | ||
8 | + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() | ||
9 | + + path + "/"; | ||
10 | +%> | ||
11 | + | ||
12 | +<!DOCTYPE html> | ||
13 | +<html lang="en"> | ||
14 | +<head> | ||
15 | +<meta charset="utf-8"> | ||
16 | +<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
17 | +<link href="<%=basePath%>resource/css/base.css?version=${version}" rel="stylesheet"> | ||
18 | +<link href="<%=basePath%>resource/css/basic_info.css" rel="stylesheet"> | ||
19 | +<link rel="stylesheet" type="text/css" href="<%=basePath%>resource/easyui/uimaker/icon.css?version=${version}"> | ||
20 | +<link rel="stylesheet" href="<%=basePath%>resource/easyui/uimaker/easyui.css?version=${version}"> | ||
21 | +<link rel="stylesheet" href="<%=basePath%>resource/css/form.css?version=${version}"> | ||
22 | +<script type="text/javascript" src="<%=basePath%>resource/easyui/jquery.min.js?version=${version}"></script> | ||
23 | +<script type="text/javascript" src="<%=basePath%>resource/validate/jquery.validate.js?version=${version}"></script> | ||
24 | +<script type="text/javascript" src="<%=basePath%>resource/validate/validate-extends.js?version=${version}"></script> | ||
25 | + | ||
26 | +<link rel="stylesheet" href="<%=basePath%>resource/layui/css/layui.css?version=${version}" media="all"> | ||
27 | +<script type="text/javascript" src="<%=basePath%>resource/layer-v3.0.3/layer/layer.js?version=${version}"></script> | ||
28 | +<script type="text/javascript" src="<%=basePath%>resource/layui/layui.js?version=${version}"></script> | ||
29 | + | ||
30 | +<style type="text/css"> | ||
31 | +.required_span { | ||
32 | + color: red; | ||
33 | + margin-left: 10px; | ||
34 | + font-size: 20px; | ||
35 | +} | ||
36 | +</style> | ||
37 | + | ||
38 | +<!-- validate 验证中英文 --> | ||
39 | +<script type="text/javascript" | ||
40 | + src="<%=basePath %>resource/validate/jquery.validate-${pageContext.response.locale}.js"></script> | ||
41 | + | ||
42 | +</head> | ||
43 | +<body> | ||
44 | + <div class="container"> | ||
45 | + <div class="content"> | ||
46 | + <form class="from-control" id="form"> | ||
47 | + <input type="hidden" id="id" name="id" value="${sd.id}"> | ||
48 | + <table class="kv-table" id="tableId"> | ||
49 | + <tbody> | ||
50 | + <tr> | ||
51 | + <td class="kv-label">主单号 | ||
52 | + <span class="required_span">*</span> | ||
53 | + </td> | ||
54 | + <td class="kv-content"> | ||
55 | + <input required id="waybill" minlength="12" name="waybill" value="${sd.sd_waybill}" > | ||
56 | + </td> | ||
57 | + | ||
58 | + <td class="kv-label">航空货物性质 | ||
59 | + <span class="required_span">*</span> | ||
60 | + </td> | ||
61 | + | ||
62 | + <td class="kv-content"> | ||
63 | + <label> | ||
64 | + <input id="one" name="one" type="checkbox" ${fn:contains(type, 1)?"checked":""} value="1" >普通货物 | ||
65 | + </label> | ||
66 | + <label> | ||
67 | + <input id="two" name="two" type="checkbox" ${fn:contains(type, 2)?"checked":""} value="2">特种货物 | ||
68 | + </label> | ||
69 | + <label> | ||
70 | + <input id="three" name="three" type="checkbox" ${fn:contains(type, 3)?"checked":""} value="3">危险品 | ||
71 | + </label> | ||
72 | + <label> | ||
73 | + <input id="four" name="four" type="checkbox" ${fn:contains(type, 4)?"checked":""} value="4">航空快件 | ||
74 | + </label> | ||
75 | + </td> | ||
76 | + </tr> | ||
77 | + <tr> | ||
78 | + <td class="kv-label">承运航空公司 | ||
79 | + <span class="required_span">*</span> | ||
80 | + </td> | ||
81 | + <td class="kv-content"> | ||
82 | + <input required name="carrier" id="carrier" type="text" value="${wbm.carrier}" > | ||
83 | + </td> | ||
84 | + | ||
85 | + <td class="kv-label">航班号 | ||
86 | + <span class="required_span">*</span> | ||
87 | + </td> | ||
88 | + <td class="kv-content"> | ||
89 | + <input required name="flightno" value="${wbm.carrier}${wbm.flightno}"> | ||
90 | + </td> | ||
91 | + | ||
92 | + </tr> | ||
93 | + <tr> | ||
94 | + <td class="kv-label">航班日期 | ||
95 | + <span class="required_span">*</span> | ||
96 | + </td> | ||
97 | + <td class="kv-content"> | ||
98 | + <input required name="flightdate" id="flightdate" value="${date}"> | ||
99 | + </td> | ||
100 | + | ||
101 | + <td class="kv-label">航空货物托运人名称 | ||
102 | + <span class="required_span">*</span> | ||
103 | + </td> | ||
104 | + <td class="kv-content"> | ||
105 | + <input required id="sd_cargo_shipper_name" name="sd_cargo_shipper_name" type="text" value="${sd.sd_cargo_shipper_name}"> | ||
106 | + </td> | ||
107 | + </tr> | ||
108 | + <tr> | ||
109 | + <td class="kv-label">航空货运销售代理人名称 | ||
110 | + <span class="required_span">*</span> | ||
111 | + </td> | ||
112 | + <td class="kv-content"> | ||
113 | + <input required id="sd_cargo_agent_name" name="sd_cargo_agent_name" type="text" value="${sd.sd_cargo_agent_name}"> | ||
114 | + </td> | ||
115 | + | ||
116 | + <td class="kv-label">航协编号 | ||
117 | + <span class="required_span">*</span> | ||
118 | + </td> | ||
119 | + <td class="kv-content"> | ||
120 | + <input required id="sd_iata_number" name="sd_iata_number" type="text" value="${sd.sd_iata_number}"> | ||
121 | + </td> | ||
122 | + </tr> | ||
123 | + | ||
124 | + <tr> | ||
125 | + <td class="kv-label">货物品名 | ||
126 | + <span class="required_span">*</span> | ||
127 | + </td> | ||
128 | + <td class="kv-content"> | ||
129 | + <input required id="sd_cargo_name" name="sd_cargo_name" type="text" value="${name}" placeholder="品名分别用逗号隔开"> | ||
130 | + </td> | ||
131 | + | ||
132 | + <td class="kv-label">公斤 | ||
133 | + <span class="required_span">*</span> | ||
134 | + </td> | ||
135 | + <td class="kv-content"> | ||
136 | + <input required name="totalweight" id="totalweight" type="text" value="${wbm.totalweight}"> | ||
137 | + </td> | ||
138 | + </tr> | ||
139 | + | ||
140 | + <tr> | ||
141 | + <td class="kv-label">件数 | ||
142 | + <span class="required_span">*</span> | ||
143 | + </td> | ||
144 | + <td class="kv-content"> | ||
145 | + <input required name="totalpiece" id="totalpiece" type="text" value="${wbm.totalpiece}"> | ||
146 | + </td> | ||
147 | + <td class="kv-label">目的地 | ||
148 | + <span class="required_span">*</span> | ||
149 | + </td> | ||
150 | + <td class="kv-content"> | ||
151 | + <input required name="destinationstation" id="destinationstation" type="text" value="${wbm.destinationstation}"> | ||
152 | + </td> | ||
153 | + </tr> | ||
154 | + | ||
155 | + <tr> | ||
156 | + <td class="kv-label">运输条件鉴定书 | ||
157 | + </td> | ||
158 | + <td class="kv-content"> | ||
159 | + <input id="sd_transport_certificate" name="sd_transport_certificate" type="text" value="${sd.sd_transport_certificate}"> | ||
160 | + </td> | ||
161 | + | ||
162 | + <td class="kv-label">航空公司同意运输证明 | ||
163 | + </td> | ||
164 | + <td class="kv-content"> | ||
165 | + <input id="sd_transportation_prove" name="sd_transportation_prove" type="text" value="${sd.sd_transportation_prove}" placeholder="运输证明分别用逗号隔开"> | ||
166 | + </td> | ||
167 | + </tr> | ||
168 | + | ||
169 | + <%--<tr>--%> | ||
170 | + <%--<td colspan="2" align="right">--%> | ||
171 | + <%--<div class="opt-buttons" style="padding-top: 20px;text-align: right;" id="divsubmit">--%> | ||
172 | + <%--<a onclick="savesend()" class="easyui-linkbutton l-btn l-btn-small l-btn-selected "--%> | ||
173 | + <%--data-options="selected:true">--%> | ||
174 | + <%--<span class="l-btn-left"><span class="l-btn-text"><spring:message--%> | ||
175 | + <%--code="opt.saveandsend" /></span></span>--%> | ||
176 | + <%--</a>--%> | ||
177 | + <%--</div>--%> | ||
178 | + <%--</td>--%> | ||
179 | + <%--</tr>--%> | ||
180 | + </tbody> | ||
181 | + </table> | ||
182 | + </form> | ||
183 | + </div> | ||
184 | + </div> | ||
185 | + | ||
186 | + <div id="DialogShunt" class="easyui-dialog" title="报文" style="width: 800px; height: 800px;" | ||
187 | + data-options="iconCls:'pag-list',modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,closed:true"> | ||
188 | + <div style="margin-left: 5px; margin-right: 5px; margin-top: 5px;"> | ||
189 | + <div class="data-tips-info"> | ||
190 | + <div class="data-tips-tip icon-tip"></div> | ||
191 | + </div> | ||
192 | + <div class="modal-body" style="padding-top: 3px; padding-left: 20px; padding-right: 3px;"> | ||
193 | + <textarea id="xmlContent" style="width: 100%; height: 400px;"></textarea> | ||
194 | + </div> | ||
195 | + <div style="text-align: center; padding-top: 30px;"></div> | ||
196 | + </div> | ||
197 | + </div> | ||
198 | + | ||
199 | + <!-- 外部js --> | ||
200 | + <script type="text/javascript" src="<%=basePath%>resource/My97DatePicker/WdatePicker.js?version=${version}"></script> | ||
201 | + <script src="<%=basePath%>resource/easyui/jquery.easyui.min.js?version=${version}"></script> | ||
202 | + <script src="<%=basePath%>/resource/js/tools.js?version=${version}"></script> | ||
203 | + <!--弹出层引入的JS--> | ||
204 | + <script type="text/javascript"> | ||
205 | + | ||
206 | + var layerIndex; | ||
207 | + var layer; | ||
208 | + layui.use('layer', function(){ | ||
209 | + layer = layui.layer; | ||
210 | + }); | ||
211 | + | ||
212 | + var selectFals = false; | ||
213 | + function submit(){ | ||
214 | + layerIndex = parent.layer.load(1, { | ||
215 | + shade: [0.6,'#000000'] //0.1透明度 | ||
216 | + }); | ||
217 | + var chboxValue=[]; | ||
218 | + var checkBox = $("input[name=one],input[name=two],input[name=three],input[name=four]"); | ||
219 | + for (var i=0; i<checkBox.length; i++){ | ||
220 | + if (checkBox[i].checked){ | ||
221 | + selectFals = true; | ||
222 | + } | ||
223 | + } | ||
224 | + | ||
225 | + | ||
226 | + if (selectFals == true){ | ||
227 | + var data = $("#form").serialize(); | ||
228 | + $.post("<%=basePath%>declaration/save",data,function (data) { | ||
229 | + parent.layer.close(layerIndex); | ||
230 | + if (data.status == 200) { | ||
231 | + var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 | ||
232 | + parent.layer.close(index); | ||
233 | + window.location.href = "<%=basePath%>declaration/list"; | ||
234 | + } else { | ||
235 | + layer.open({content:""+data.msg}); | ||
236 | + } | ||
237 | + }); | ||
238 | + }else { | ||
239 | + alert("货主类型至少选择一项"); | ||
240 | + return false; | ||
241 | + } | ||
242 | + | ||
243 | + } | ||
244 | + | ||
245 | + | ||
246 | + function viewXml(){ | ||
247 | + if($("#ids").val()==''){ | ||
248 | + layer.open({content:"<spring:message code='manifest.send.message.failed'/>"}); | ||
249 | + }else{ | ||
250 | + $("#mask").show(); | ||
251 | + showMask(); | ||
252 | + $("#mask").append("<spring:message code='manifest.send'/>"); | ||
253 | + $.post("<%=basePath%>manifest/xml",{id:$("#ids").val()},function(data){ | ||
254 | + // layer.open({content:data.data}); | ||
255 | + layer.open({content:"<spring:message code='manifest.send.message.successfully'/>"}); | ||
256 | + hideMask(); | ||
257 | + }) | ||
258 | + } | ||
259 | + } | ||
260 | + | ||
261 | + //发送报文并且保存 | ||
262 | + function savesend(){ | ||
263 | + var isValid = $("#form").valid(); | ||
264 | + if(isValid){ | ||
265 | + layerIndex = parent.layer.load(1, { | ||
266 | + shade: [0.6,'#000000'] //0.1透明度 | ||
267 | + }); | ||
268 | + var chboxValue=[]; | ||
269 | + var checkBox = $("input[name=one],input[name=two],input[name=three],input[name=four]"); | ||
270 | + for (var i=0; i<checkBox.length; i++){ | ||
271 | + if (checkBox[i].checked){ | ||
272 | + selectFals = true; | ||
273 | + } | ||
274 | + } | ||
275 | + var waybill = $("#waybill").val(); | ||
276 | + if (selectFals == true){ | ||
277 | + | ||
278 | + var data = $("#form").serialize(); | ||
279 | + $.post("<%=basePath%>declaration/update?waybill="+waybill,data,function (data) { | ||
280 | + parent.layer.close(layerIndex); | ||
281 | + if (data.status == 200) { | ||
282 | + $("#xmlContent").val(data.data); | ||
283 | + $("#DialogShunt").window('open'); | ||
284 | + <%--var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引--%> | ||
285 | + <%--parent.layer.close(index);--%> | ||
286 | + <%--window.location.href = "<%=basePath%>declaration/list";--%> | ||
287 | + window.parent.location.reload(); | ||
288 | + var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 | ||
289 | + parent.layer.close(index); | ||
290 | + | ||
291 | + } else { | ||
292 | + layer.open({content:data.msg}); | ||
293 | + } | ||
294 | + }) | ||
295 | + }else { | ||
296 | + alert("货物性质至少选择一项"); | ||
297 | + return false; | ||
298 | + } | ||
299 | + } | ||
300 | + } | ||
301 | + //发送交运报文 | ||
302 | + function sendDelivery(){ | ||
303 | + var id3 = $("#waybillnomaster").val($("#waybill").val()); | ||
304 | + var data = $("#form").serialize(); | ||
305 | + $.post("<%=basePath%>manifest/sendDelivery",data,function (data) { | ||
306 | + if (data.status == 200) { | ||
307 | +// layer.confirm("<spring:message code="opt.savesuccess"/>", {btn: ['<spring:message code="opt.confirm"/>', '<spring:message code="opt.cancel"/>']}, function () { | ||
308 | +<%-- window.location.href = "<%=basePath %>manifest/list" ; --%> | ||
309 | + $("#xmlContent").val(data.data); | ||
310 | + $("#DialogShunt").window('open'); | ||
311 | + window.location.href = "<%=basePath%>manifest/list"; | ||
312 | +// }) | ||
313 | + } else { | ||
314 | + layer.open({content: data.msg}); | ||
315 | + } | ||
316 | + }) | ||
317 | + } | ||
318 | + | ||
319 | + // function windowprint() { | ||
320 | + // var f = document.getElementById("tableId"); | ||
321 | + // f.style.display = ""; | ||
322 | + // window.print(); | ||
323 | + // f.style.display = "none"; | ||
324 | + // } | ||
325 | + | ||
326 | + </script> | ||
327 | +</body> | ||
328 | +</html> |
1 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
2 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | ||
3 | +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> | ||
4 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
5 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | ||
6 | +<% | ||
7 | + String path = request.getContextPath(); | ||
8 | + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() | ||
9 | + + path + "/"; | ||
10 | +%> | ||
11 | + | ||
12 | +<!DOCTYPE html> | ||
13 | +<html lang="en"> | ||
14 | +<head> | ||
15 | + <meta charset="utf-8"> | ||
16 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
17 | + <link href="<%=basePath%>resource/css/base.css?version=${version}" rel="stylesheet"> | ||
18 | + <link href="<%=basePath%>resource/css/basic_info.css" rel="stylesheet"> | ||
19 | + <link rel="stylesheet" type="text/css" href="<%=basePath%>resource/easyui/uimaker/icon.css?version=${version}"> | ||
20 | + <link rel="stylesheet" href="<%=basePath%>resource/easyui/uimaker/easyui.css?version=${version}"> | ||
21 | + <link rel="stylesheet" href="<%=basePath%>resource/css/form.css?version=${version}"> | ||
22 | + <script type="text/javascript" src="<%=basePath%>resource/easyui/jquery.min.js?version=${version}"></script> | ||
23 | + <script type="text/javascript" src="<%=basePath%>resource/validate/jquery.validate.js?version=${version}"></script> | ||
24 | + <script type="text/javascript" src="<%=basePath%>resource/validate/validate-extends.js?version=${version}"></script> | ||
25 | + | ||
26 | + <link rel="stylesheet" href="<%=basePath%>resource/layui/css/layui.css?version=${version}" media="all"> | ||
27 | + <script type="text/javascript" src="<%=basePath%>resource/layer-v3.0.3/layer/layer.js?version=${version}"></script> | ||
28 | + <script type="text/javascript" src="<%=basePath%>resource/layui/layui.js?version=${version}"></script> | ||
29 | + | ||
30 | + <style type="text/css"> | ||
31 | + .required_span { | ||
32 | + color: red; | ||
33 | + margin-left: 10px; | ||
34 | + font-size: 20px; | ||
35 | + } | ||
36 | + </style> | ||
37 | + | ||
38 | + <!-- validate 验证中英文 --> | ||
39 | + <script type="text/javascript" | ||
40 | + src="<%=basePath %>resource/validate/jquery.validate-${pageContext.response.locale}.js"></script> | ||
41 | + | ||
42 | +</head> | ||
43 | +<body> | ||
44 | +<div class="container"> | ||
45 | + <div class="content"> | ||
46 | + <form class="from-control" id="form"> | ||
47 | + <%--<input type="hidden" id="id" name="id" value="${sd.id}">--%> | ||
48 | + <table class="kv-table" id="tableId"> | ||
49 | + <tbody> | ||
50 | + <tr> | ||
51 | + <td class="kv-label">主单号 | ||
52 | + <span class="required_span">*</span> | ||
53 | + </td> | ||
54 | + <td class="kv-content"> | ||
55 | + <input required id="waybill" minlength="12" name="waybill" type="text" onblur="input_change(this)"> | ||
56 | + </td> | ||
57 | + | ||
58 | + <script> | ||
59 | + function input_change(obj){ | ||
60 | + var val = $(obj).val(); | ||
61 | + if(val){ | ||
62 | + checkNo(val); | ||
63 | + } | ||
64 | + //用户输入订单号满足格式 | ||
65 | + } | ||
66 | + </script> | ||
67 | + | ||
68 | + <td class="kv-label">航空货物性质 | ||
69 | + <span class="required_span">*</span> | ||
70 | + </td> | ||
71 | + | ||
72 | + <td class="kv-content"> | ||
73 | + <label> | ||
74 | + <input id="one" name="one" type="checkbox" value="1" >普通货物 | ||
75 | + </label> | ||
76 | + <label> | ||
77 | + <input id="two" name="two" type="checkbox" value="2">特种货物 | ||
78 | + </label> | ||
79 | + <label> | ||
80 | + <input id="three" name="three" type="checkbox" value="3">危险品 | ||
81 | + </label> | ||
82 | + <label> | ||
83 | + <input id="four" name="four" type="checkbox" value="4">航空快件 | ||
84 | + </label> | ||
85 | + </td> | ||
86 | + </tr> | ||
87 | + <tr> | ||
88 | + <td class="kv-label">承运航空公司 | ||
89 | + <span class="required_span">*</span> | ||
90 | + </td> | ||
91 | + <td class="kv-content"> | ||
92 | + <input required name="carrier" id="carrier" type="text" placeholder="如:CV"> | ||
93 | + </td> | ||
94 | + | ||
95 | + <td class="kv-label">航班号 | ||
96 | + <span class="required_span">*</span> | ||
97 | + </td> | ||
98 | + <td class="kv-content"> | ||
99 | + <input required type="text" name="flightno" id="flightno" placeholder="如:0000"> | ||
100 | + </td> | ||
101 | + | ||
102 | + </tr> | ||
103 | + <tr> | ||
104 | + <td class="kv-label">航班日期 | ||
105 | + <span class="required_span">*</span> | ||
106 | + </td> | ||
107 | + <td class="kv-content"> | ||
108 | + <input required name="flightdate" id="flightdate" type="date"> | ||
109 | + </td> | ||
110 | + | ||
111 | + <td class="kv-label">航空货物托运人名称 | ||
112 | + <span class="required_span">*</span> | ||
113 | + </td> | ||
114 | + <td class="kv-content"> | ||
115 | + <input required id="sd_cargo_shipper_name" name="sd_cargo_shipper_name" type="text"> | ||
116 | + </td> | ||
117 | + </tr> | ||
118 | + <tr> | ||
119 | + <td class="kv-label">航空货运销售代理人名称 | ||
120 | + <span class="required_span">*</span> | ||
121 | + </td> | ||
122 | + <td class="kv-content"> | ||
123 | + <input required id="sd_cargo_agent_name" name="sd_cargo_agent_name" type="text"> | ||
124 | + </td> | ||
125 | + | ||
126 | + <td class="kv-label">航协编号 | ||
127 | + <span class="required_span">*</span> | ||
128 | + </td> | ||
129 | + <td class="kv-content"> | ||
130 | + <input required id="sd_iata_number" name="sd_iata_number" type="text"> | ||
131 | + </td> | ||
132 | + </tr> | ||
133 | + | ||
134 | + <tr> | ||
135 | + <td class="kv-label">货物品名 | ||
136 | + <span class="required_span">*</span> | ||
137 | + </td> | ||
138 | + <td class="kv-content"> | ||
139 | + <input required id="sd_cargo_name" name="sd_cargo_name" type="text" placeholder="品名分别用逗号隔开"> | ||
140 | + </td> | ||
141 | + | ||
142 | + <td class="kv-label">公斤 | ||
143 | + <span class="required_span">*</span> | ||
144 | + </td> | ||
145 | + <td class="kv-content"> | ||
146 | + <input required type="text" name="totalweight" id="totalweight"> | ||
147 | + </td> | ||
148 | + </tr> | ||
149 | + | ||
150 | + <tr> | ||
151 | + <td class="kv-label">件数 | ||
152 | + <span class="required_span">*</span> | ||
153 | + </td> | ||
154 | + <td class="kv-content"> | ||
155 | + <input required type="text" name="totalpiece" id="totalpiece"> | ||
156 | + </td> | ||
157 | + <td class="kv-label">目的地 | ||
158 | + <span class="required_span">*</span> | ||
159 | + </td> | ||
160 | + <td class="kv-content"> | ||
161 | + <input required type="text" name="destinationstation" id="destinationstation"> | ||
162 | + </td> | ||
163 | + </tr> | ||
164 | + | ||
165 | + <tr> | ||
166 | + <td class="kv-label">运输条件鉴定书 | ||
167 | + </td> | ||
168 | + <td class="kv-content"> | ||
169 | + <input id="sd_transport_certificate" name="sd_transport_certificate" type="text"> | ||
170 | + </td> | ||
171 | + | ||
172 | + <td class="kv-label">航空公司同意运输证明 | ||
173 | + </td> | ||
174 | + <td class="kv-content"> | ||
175 | + <input id="sd_transportation_prove" name="sd_transportation_prove" type="text" placeholder="运输证明分别用逗号隔开"> | ||
176 | + </td> | ||
177 | + </tr> | ||
178 | + | ||
179 | + <tr> | ||
180 | + <td colspan="2" align="right"> | ||
181 | + <div class="opt-buttons" style="padding-top: 20px;text-align: right;" id="divsubmit"> | ||
182 | + <a onclick="savesend()" class="easyui-linkbutton l-btn l-btn-small l-btn-selected " | ||
183 | + data-options="selected:true"> | ||
184 | + <span class="l-btn-left"><span class="l-btn-text"><spring:message | ||
185 | + code="opt.saveandsend" /></span></span> | ||
186 | + </a> | ||
187 | + </div> | ||
188 | + </td> | ||
189 | + </tr> | ||
190 | + </tbody> | ||
191 | + </table> | ||
192 | + </form> | ||
193 | + </div> | ||
194 | +</div> | ||
195 | + | ||
196 | +<div id="DialogShunt" class="easyui-dialog" title="报文" style="width: 800px; height: 800px;" | ||
197 | + data-options="iconCls:'pag-list',modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,closed:true"> | ||
198 | + <div style="margin-left: 5px; margin-right: 5px; margin-top: 5px;"> | ||
199 | + <div class="data-tips-info"> | ||
200 | + <div class="data-tips-tip icon-tip"></div> | ||
201 | + </div> | ||
202 | + <div class="modal-body" style="padding-top: 3px; padding-left: 20px; padding-right: 3px;"> | ||
203 | + <textarea id="xmlContent" style="width: 100%; height: 400px;"></textarea> | ||
204 | + </div> | ||
205 | + <div style="text-align: center; padding-top: 30px;"></div> | ||
206 | + </div> | ||
207 | +</div> | ||
208 | + | ||
209 | +<!-- 外部js --> | ||
210 | +<script type="text/javascript" src="<%=basePath%>resource/My97DatePicker/WdatePicker.js?version=${version}"></script> | ||
211 | +<script src="<%=basePath%>resource/easyui/jquery.easyui.min.js?version=${version}"></script> | ||
212 | +<script src="<%=basePath%>/resource/js/tools.js?version=${version}"></script> | ||
213 | +<!--弹出层引入的JS--> | ||
214 | +<script type="text/javascript"> | ||
215 | + | ||
216 | + var layerIndex; | ||
217 | + var layer; | ||
218 | + layui.use('layer', function(){ | ||
219 | + layer = layui.layer; | ||
220 | + }); | ||
221 | + | ||
222 | + var selectFals = false; | ||
223 | + function submit(){ | ||
224 | + layerIndex = parent.layer.load(1, { | ||
225 | + shade: [0.6,'#000000'] //0.1透明度 | ||
226 | + }); | ||
227 | + var chboxValue=[]; | ||
228 | + var checkBox = $("input[name=one],input[name=two],input[name=three],input[name=four]"); | ||
229 | + for (var i=0; i<checkBox.length; i++){ | ||
230 | + if (checkBox[i].checked){ | ||
231 | + selectFals = true; | ||
232 | + } | ||
233 | + } | ||
234 | + | ||
235 | + | ||
236 | + if (selectFals == true){ | ||
237 | + var data = $("#form").serialize(); | ||
238 | + $.post("<%=basePath%>declaration/save",data,function (data) { | ||
239 | + parent.layer.close(layerIndex); | ||
240 | + if (data.status == 200) { | ||
241 | + var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 | ||
242 | + parent.layer.close(index); | ||
243 | + window.location.href = "<%=basePath%>declaration/list"; | ||
244 | + } else { | ||
245 | + layer.open({content:""+data.msg}); | ||
246 | + } | ||
247 | + }); | ||
248 | + }else { | ||
249 | + alert("货主类型至少选择一项"); | ||
250 | + return false; | ||
251 | + } | ||
252 | + | ||
253 | + } | ||
254 | + | ||
255 | + | ||
256 | + function viewXml(){ | ||
257 | + if($("#ids").val()==''){ | ||
258 | + layer.open({content:"<spring:message code='manifest.send.message.failed'/>"}); | ||
259 | + }else{ | ||
260 | + $("#mask").show(); | ||
261 | + showMask(); | ||
262 | + $("#mask").append("<spring:message code='manifest.send'/>"); | ||
263 | + $.post("<%=basePath%>manifest/xml",{id:$("#ids").val()},function(data){ | ||
264 | + // layer.open({content:data.data}); | ||
265 | + layer.open({content:"<spring:message code='manifest.send.message.successfully'/>"}); | ||
266 | + hideMask(); | ||
267 | + }) | ||
268 | + } | ||
269 | + } | ||
270 | + | ||
271 | + //发送报文并且保存 | ||
272 | + function savesend(){ | ||
273 | + var isValid = $("#form").valid(); | ||
274 | + if(isValid){ | ||
275 | + layerIndex = parent.layer.load(1, { | ||
276 | + shade: [0.6,'#000000'] //0.1透明度 | ||
277 | + }); | ||
278 | + var chboxValue=[]; | ||
279 | + var checkBox = $("input[name=one],input[name=two],input[name=three],input[name=four]"); | ||
280 | + for (var i=0; i<checkBox.length; i++){ | ||
281 | + if (checkBox[i].checked){ | ||
282 | + selectFals = true; | ||
283 | + } | ||
284 | + } | ||
285 | + var waybill = $("#waybill").val(); | ||
286 | + if (selectFals == true){ | ||
287 | + | ||
288 | + var data = $("#form").serialize(); | ||
289 | + $.post("<%=basePath%>declaration/inlandsave?waybill="+waybill,data,function (data) { | ||
290 | + parent.layer.close(layerIndex); | ||
291 | + if (data.status == 200) { | ||
292 | + $("#xmlContent").val(data.data); | ||
293 | + $("#DialogShunt").window('open'); | ||
294 | + window.parent.location.reload(); | ||
295 | + var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 | ||
296 | + parent.layer.close(index); | ||
297 | + } | ||
298 | + else if (data.status == 203){ | ||
299 | + alert("安检申报不可以重复添加"); | ||
300 | + } else { | ||
301 | + layer.open({content:data.msg}); | ||
302 | + } | ||
303 | + }) | ||
304 | + }else { | ||
305 | + alert("货物性质至少选择一项"); | ||
306 | + return false; | ||
307 | + } | ||
308 | + } | ||
309 | + } | ||
310 | + | ||
311 | + //主单号校验 | ||
312 | + function checkNo(content){ | ||
313 | + if (content) { | ||
314 | + var reg = /^(\d{3})(-)(\d{8})$/; | ||
315 | + var flag = content.match(reg); | ||
316 | + if(flag==null){ | ||
317 | + layui.use('layer', function(){ | ||
318 | + var layer = layui.layer; | ||
319 | + parent.layer.alert('主单号格式错误,请检查运单号位数及格式,例如:172-30937185', {icon: 0}); | ||
320 | + $("#waybill").focus(); | ||
321 | + }); | ||
322 | + return; | ||
323 | + } | ||
324 | + | ||
325 | + content = content.replace(/ /g,''); | ||
326 | + $("#waybill").val(content); | ||
327 | + | ||
328 | + if(content.length>4){ | ||
329 | + var forth = content.substring(3,4); | ||
330 | + if(forth!='-'){ | ||
331 | + var start = content.substring(0,3); | ||
332 | + var end = content.substring(3,content.length); | ||
333 | + content = start+"-"+end; | ||
334 | + $("#waybill").val(content); | ||
335 | + } | ||
336 | + } | ||
337 | + | ||
338 | + if(content.length>12){ | ||
339 | + content = content.substring(0,12); | ||
340 | + $("#waybill").val(content); | ||
341 | + } | ||
342 | + | ||
343 | + if(content.length<12){ | ||
344 | + layui.use('layer', function(){ | ||
345 | + var layer = layui.layer; | ||
346 | + parent.layer.alert('主单号不能少于12位~!', {icon: 0}); | ||
347 | + $("#waybill").focus(); | ||
348 | + }); | ||
349 | + return; | ||
350 | + } | ||
351 | + | ||
352 | + var array = content.split("-"); | ||
353 | + if(array!=null&&array.length==2){ | ||
354 | + var end = array[1]; | ||
355 | + if(end&&end.length==8){ | ||
356 | + var number = parseInt(end); | ||
357 | + var start = number/10; | ||
358 | + var remainder = parseInt(start)%7; | ||
359 | + var last = number%10; | ||
360 | + if(remainder!=last){ | ||
361 | + layui.use('layer', function(){ | ||
362 | + var layer = layui.layer; | ||
363 | + parent.layer.alert('主单号不符合模七校验,请修改~!', {icon: 6}); | ||
364 | + $("#waybill").focus(); | ||
365 | + }); | ||
366 | + }else{ | ||
367 | + //模七校验通过,校验是否有重复 | ||
368 | + checkRepeatNo(content); | ||
369 | + } | ||
370 | + } | ||
371 | + } | ||
372 | + } | ||
373 | + } | ||
374 | + | ||
375 | +</script> | ||
376 | +</body> | ||
377 | +</html> |
@@ -42,8 +42,8 @@ | @@ -42,8 +42,8 @@ | ||
42 | <th field="sd_cargo_shipper_name">航空货运托运人名称</th> | 42 | <th field="sd_cargo_shipper_name">航空货运托运人名称</th> |
43 | <th field="sd_cargo_agent_name">航空货运销售代理人名称</th> | 43 | <th field="sd_cargo_agent_name">航空货运销售代理人名称</th> |
44 | <th field="sd_iata_number">航协编号</th> | 44 | <th field="sd_iata_number">航协编号</th> |
45 | - <th field="sd_transport_certificate">运输条件鉴定书</th> | ||
46 | - <th field="sd_transportation_prove">航空公司同意运输证明</th> | 45 | + <th field="sd_transport_certificate" formatter="certificate">运输条件鉴定书</th> |
46 | + <th field="sd_transportation_prove" formatter="prove">航空公司同意运输证明</th> | ||
47 | <th field="sd_static"formatter="sdStatic" width="80">状态</th> | 47 | <th field="sd_static"formatter="sdStatic" width="80">状态</th> |
48 | <th field=".." formatter="operatorFormat" width="60">操作</th> | 48 | <th field=".." formatter="operatorFormat" width="60">操作</th> |
49 | </tr> | 49 | </tr> |
@@ -54,6 +54,7 @@ | @@ -54,6 +54,7 @@ | ||
54 | <table class="search_form_table"> | 54 | <table class="search_form_table"> |
55 | <spring:message code="manifest.bill.number"/>:<input id="manifnum" type="text" name="search_LIKE_sd_waybill" style="width:166px;height:35px;line-height:35px;"> | 55 | <spring:message code="manifest.bill.number"/>:<input id="manifnum" type="text" name="search_LIKE_sd_waybill" style="width:166px;height:35px;line-height:35px;"> |
56 | <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search" data-options="selected:true"><spring:message code="opt.search" /></a> | 56 | <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search" data-options="selected:true"><spring:message code="opt.search" /></a> |
57 | + <a href="javascript:doSaves()" class="easyui-linkbutton" style="background:#18A197;color:#FFF;border: 1px solid #18A197;" iconCls="icon-add">添加</a> | ||
57 | <%--<a href="javascript:printAll()" class="easyui-linkbutton" style="background:red;color:#FFF;border: 1px solid red">批量打印</a>--%> | 58 | <%--<a href="javascript:printAll()" class="easyui-linkbutton" style="background:red;color:#FFF;border: 1px solid red">批量打印</a>--%> |
58 | </table> | 59 | </table> |
59 | </form> | 60 | </form> |
@@ -76,6 +77,25 @@ | @@ -76,6 +77,25 @@ | ||
76 | return html; | 77 | return html; |
77 | } | 78 | } |
78 | 79 | ||
80 | + //判断是否为空 | ||
81 | + function certificate(val, row, index) { | ||
82 | + if (row.sd_transport_certificate == null){ | ||
83 | + return "无"; | ||
84 | + }else { | ||
85 | + return row.sd_transport_certificate; | ||
86 | + } | ||
87 | + } | ||
88 | + | ||
89 | + function prove(val, row, index) { | ||
90 | + if (row.sd_transportation_prove == null){ | ||
91 | + return "无"; | ||
92 | + }else { | ||
93 | + return row.sd_transportation_prove; | ||
94 | + } | ||
95 | + } | ||
96 | + | ||
97 | + | ||
98 | + | ||
79 | function sdStatic(value, row, index) { | 99 | function sdStatic(value, row, index) { |
80 | var res = ''; | 100 | var res = ''; |
81 | res = '<span style="color:red;">'+value+'</span>'; | 101 | res = '<span style="color:red;">'+value+'</span>'; |
@@ -83,7 +103,9 @@ | @@ -83,7 +103,9 @@ | ||
83 | } | 103 | } |
84 | 104 | ||
85 | function operatorFormat(val, row, index) { | 105 | function operatorFormat(val, row, index) { |
86 | - var html = "<a href='javascript:void(0)' onclick='print("+row.id+")' style='text-decoration:none;color:blue;'>打印</a>"; | 106 | + var html = "<a href='javascript:void(0)' onclick='print("+row.id+")' style='text-decoration:none;color:blue;'>打印</a>" + |
107 | + " <a href='javascript:void(0)' onclick='findOne("+row.id+")' style='text-decoration:none;color:blue;'>查看</a>"; | ||
108 | + | ||
87 | return html; | 109 | return html; |
88 | } | 110 | } |
89 | 111 | ||
@@ -211,7 +233,27 @@ | @@ -211,7 +233,27 @@ | ||
211 | }); | 233 | }); |
212 | } | 234 | } |
213 | 235 | ||
236 | + function findOne(id) { | ||
237 | + layer.open({ | ||
238 | + type : 2, | ||
239 | + title : '修改', | ||
240 | + maxmin : true, | ||
241 | + shadeClose : false, // 点击遮罩关闭层 | ||
242 | + area : [ '80%', '65%' ], | ||
243 | + content : '<%=basePath %>declaration/findone?id='+id | ||
244 | + }); | ||
245 | + } | ||
214 | 246 | ||
247 | + function doSaves() { | ||
248 | + layer.open({ | ||
249 | + type : 2, | ||
250 | + title : '添加', | ||
251 | + maxmin : true, | ||
252 | + shadeClose : false, // 点击遮罩关闭层 | ||
253 | + area : [ '80%', '65%' ], | ||
254 | + content : '<%=basePath %>declaration/inlandSaveView' | ||
255 | + }); | ||
256 | + } | ||
215 | function doSearch(){ | 257 | function doSearch(){ |
216 | $('#dg').datagrid("options").queryParams=$("#searchForm").serializeJson(); | 258 | $('#dg').datagrid("options").queryParams=$("#searchForm").serializeJson(); |
217 | $('#dg').datagrid("reload"); | 259 | $('#dg').datagrid("reload"); |
@@ -111,17 +111,17 @@ | @@ -111,17 +111,17 @@ | ||
111 | 111 | ||
112 | <tr> | 112 | <tr> |
113 | <td class="kv-label">运输条件鉴定书 | 113 | <td class="kv-label">运输条件鉴定书 |
114 | - <span class="required_span">*</span> | 114 | + <%--<span class="required_span">*</span>--%> |
115 | </td> | 115 | </td> |
116 | <td class="kv-content"> | 116 | <td class="kv-content"> |
117 | - <input required id="sd_transport_certificate" name="sd_transport_certificate" type="text"> | 117 | + <input id="sd_transport_certificate" name="sd_transport_certificate" type="text"> |
118 | </td> | 118 | </td> |
119 | 119 | ||
120 | <td class="kv-label">航空公司同意运输证明 | 120 | <td class="kv-label">航空公司同意运输证明 |
121 | - <span class="required_span">*</span> | 121 | + <%--<span class="required_span">*</span>--%> |
122 | </td> | 122 | </td> |
123 | <td class="kv-content"> | 123 | <td class="kv-content"> |
124 | - <input required id="sd_transportation_prove" name="sd_transportation_prove" type="text" placeholder="运输证明分别用逗号隔开"> | 124 | + <input id="sd_transportation_prove" name="sd_transportation_prove" type="text" placeholder="运输证明分别用逗号隔开"> |
125 | </td> | 125 | </td> |
126 | </tr> | 126 | </tr> |
127 | 127 |
@@ -99,7 +99,7 @@ | @@ -99,7 +99,7 @@ | ||
99 | </td> | 99 | </td> |
100 | <td class="kv-content"> | 100 | <td class="kv-content"> |
101 | <select required id="for_short_shipper" name="for_short_shipper"> | 101 | <select required id="for_short_shipper" name="for_short_shipper"> |
102 | - <option value="" selected>-----请选择-----</option> | 102 | + <option value="" selected>无</option> |
103 | <c:forEach items="${shipper}" var="shipper"> | 103 | <c:forEach items="${shipper}" var="shipper"> |
104 | <option value="${shipper.id}" <c:forEach items="${hzId}" var = "hzId"> ${shipper.id eq hzId.hzinfor_id?"selected":""} </c:forEach>>${shipper.for_short} ${shipper.full_name}</option> | 104 | <option value="${shipper.id}" <c:forEach items="${hzId}" var = "hzId"> ${shipper.id eq hzId.hzinfor_id?"selected":""} </c:forEach>>${shipper.for_short} ${shipper.full_name}</option> |
105 | </c:forEach> | 105 | </c:forEach> |
@@ -110,7 +110,7 @@ | @@ -110,7 +110,7 @@ | ||
110 | </td> | 110 | </td> |
111 | <td class="kv-content"> | 111 | <td class="kv-content"> |
112 | <select id="for_short_booking" name="for_short_booking"> | 112 | <select id="for_short_booking" name="for_short_booking"> |
113 | - <option value="" selected>-----请选择-----</option> | 113 | + <option value="" selected>无</option> |
114 | <c:forEach items="${booking}" var="booking"> | 114 | <c:forEach items="${booking}" var="booking"> |
115 | <option value="${booking.id}" <c:forEach items="${hzId}" var = "hzId"> ${booking.id eq hzId.hzinfor_id?"selected":""} </c:forEach>>${booking.for_short} ${booking.full_name}</option> | 115 | <option value="${booking.id}" <c:forEach items="${hzId}" var = "hzId"> ${booking.id eq hzId.hzinfor_id?"selected":""} </c:forEach>>${booking.for_short} ${booking.full_name}</option> |
116 | </c:forEach> | 116 | </c:forEach> |
@@ -121,7 +121,7 @@ | @@ -121,7 +121,7 @@ | ||
121 | </td> | 121 | </td> |
122 | <td class="kv-content"> | 122 | <td class="kv-content"> |
123 | <select id="for_short_operation" name="for_short_operation"> | 123 | <select id="for_short_operation" name="for_short_operation"> |
124 | - <option value="" selected>-----请选择-----</option> | 124 | + <option value="" selected>无</option> |
125 | <c:forEach items="${operation}" var="operation"> | 125 | <c:forEach items="${operation}" var="operation"> |
126 | <option value="${operation.id}" <c:forEach items="${hzId}" var = "hzId"> ${operation.id eq hzId.hzinfor_id?"selected":""} </c:forEach> >${operation.for_short} ${operation.full_name}</option> | 126 | <option value="${operation.id}" <c:forEach items="${hzId}" var = "hzId"> ${operation.id eq hzId.hzinfor_id?"selected":""} </c:forEach> >${operation.for_short} ${operation.full_name}</option> |
127 | </c:forEach> | 127 | </c:forEach> |
@@ -46,13 +46,13 @@ | @@ -46,13 +46,13 @@ | ||
46 | <td class="kv-content"> | 46 | <td class="kv-content"> |
47 | <div class="date"> | 47 | <div class="date"> |
48 | <label> | 48 | <label> |
49 | - <input id="one" name="one" type="checkbox" value="1" checked>发货人 | 49 | + <input id="one" name="one" type="checkbox" value="111" checked>发货人 |
50 | </label> | 50 | </label> |
51 | <label> | 51 | <label> |
52 | - <input id="two" name="two" type="checkbox" value="2">订舱代理 | 52 | + <input id="two" name="two" type="checkbox" value="222">订舱代理 |
53 | </label> | 53 | </label> |
54 | <label> | 54 | <label> |
55 | - <input id="three" name="three" type="checkbox" value="3">操作代理 | 55 | + <input id="three" name="three" type="checkbox" value="333">操作代理 |
56 | </label> | 56 | </label> |
57 | </div> | 57 | </div> |
58 | </td> | 58 | </td> |
@@ -48,13 +48,13 @@ | @@ -48,13 +48,13 @@ | ||
48 | <td class="kv-content"> | 48 | <td class="kv-content"> |
49 | <div class="date"> | 49 | <div class="date"> |
50 | <label> | 50 | <label> |
51 | - <input id="one" name="the_shipper_type" type="checkbox" ${1 eq entity.the_shipper_type?"checked":""} value="1">发货人 | 51 | + <input id="one" name="the_shipper_type" type="checkbox" ${111 eq entity.the_shipper_type?"checked":""} value="111">发货人 |
52 | </label> | 52 | </label> |
53 | <label> | 53 | <label> |
54 | - <input id="two" name="the_shipper_type" type="checkbox" ${2 eq entity.the_shipper_type?"checked":""} value="2">订舱代理 | 54 | + <input id="two" name="the_shipper_type" type="checkbox" ${222 eq entity.the_shipper_type?"checked":""} value="222">订舱代理 |
55 | </label> | 55 | </label> |
56 | <label> | 56 | <label> |
57 | - <input id="three" name="the_shipper_type" type="checkbox" ${3 eq entity.the_shipper_type?"checked":""} value="3">操作代理 | 57 | + <input id="three" name="the_shipper_type" type="checkbox" ${333 eq entity.the_shipper_type?"checked":""} value="333">操作代理 |
58 | </label> | 58 | </label> |
59 | </div> | 59 | </div> |
60 | </td> | 60 | </td> |
-
请 注册 或 登录 后发表评论