作者 shenhailong

预配界面添加 提前运抵 字段

@@ -521,6 +521,7 @@ public class ManifestController extends BasicController { @@ -521,6 +521,7 @@ public class ManifestController extends BasicController {
521 for (ManifestEntity mani : manis.getRows()){ 521 for (ManifestEntity mani : manis.getRows()){
522 ManifestVo manifestVo = new ManifestVo(); 522 ManifestVo manifestVo = new ManifestVo();
523 manifestVo.setId(mani.getId()); 523 manifestVo.setId(mani.getId());
  524 + manifestVo.setArrived_ahead(mani.getArrived_ahead());
524 manifestVo.setUnlodingcode(mani.getUnlodingcode()); 525 manifestVo.setUnlodingcode(mani.getUnlodingcode());
525 manifestVo.setCnecusid(mani.getCnecusid()); 526 manifestVo.setCnecusid(mani.getCnecusid());
526 manifestVo.setShpcusid(mani.getShpcusid()); 527 manifestVo.setShpcusid(mani.getShpcusid());
@@ -708,7 +709,9 @@ public class ManifestController extends BasicController { @@ -708,7 +709,9 @@ public class ManifestController extends BasicController {
708 // 海关状态 709 // 海关状态
709 List<String> customsStatus = getcustomsStatus(); 710 List<String> customsStatus = getcustomsStatus();
710 model.addAttribute("customsStatus", customsStatus); 711 model.addAttribute("customsStatus", customsStatus);
711 - 712 + // 提前报关
  713 +// List<String> arrivedAhead = getArrivedAhead();
  714 +// model.addAttribute("arrivedAhead", arrivedAhead);
712 // 危险品代码 715 // 危险品代码
713 List<PubDgEntity> dgList = dgService.findAll(); 716 List<PubDgEntity> dgList = dgService.findAll();
714 model.addAttribute("dgList", dgList); 717 model.addAttribute("dgList", dgList);
@@ -719,9 +722,9 @@ public class ManifestController extends BasicController { @@ -719,9 +722,9 @@ public class ManifestController extends BasicController {
719 request.setAttribute("version", System.currentTimeMillis()); 722 request.setAttribute("version", System.currentTimeMillis());
720 // model.addAttribute("customsStatus",flag); 723 // model.addAttribute("customsStatus",flag);
721 724
722 - String waybill_no = manifest != null ? manifest.getWaybillnomaster() : "";  
723 - WaybillReceiptEntity receipt = receiptService.findMain(waybill_no);  
724 - request.setAttribute("receipt", receipt); 725 +// String waybill_no = manifest != null ? manifest.getWaybillnomaster() : "";
  726 +// WaybillReceiptEntity receipt = receiptService.findMain(waybill_no);
  727 +// request.setAttribute("receipt", receipt);
725 728
726 729
727 //货主与运单绑定关系 730 //货主与运单绑定关系
@@ -855,8 +858,8 @@ public class ManifestController extends BasicController { @@ -855,8 +858,8 @@ public class ManifestController extends BasicController {
855 if (pre != null && pre.getWaybillnosecondary() != null) { 858 if (pre != null && pre.getWaybillnosecondary() != null) {
856 sub_waybill_no = pre.getWaybillnosecondary(); 859 sub_waybill_no = pre.getWaybillnosecondary();
857 } 860 }
858 - WaybillReceiptEntity receipt = receiptService.findSub(waybill_no, sub_waybill_no);  
859 - request.setAttribute("receipt", receipt); 861 +// WaybillReceiptEntity receipt = receiptService.findSub(waybill_no, sub_waybill_no);
  862 +// request.setAttribute("receipt", receipt);
860 863
861 return "manifest/sub_edit"; 864 return "manifest/sub_edit";
862 } 865 }
@@ -935,6 +938,14 @@ public class ManifestController extends BasicController { @@ -935,6 +938,14 @@ public class ManifestController extends BasicController {
935 return list; 938 return list;
936 } 939 }
937 940
  941 +// // 提前报关
  942 +// private List<String> getArrivedAhead(){
  943 +// List<String> list = new ArrayList<>();
  944 +// list.add("0");
  945 +// list.add("1");
  946 +// return list;
  947 +// }
  948 +
938 // 支付方式 949 // 支付方式
939 private List<String> getPayTypes() { 950 private List<String> getPayTypes() {
940 List<String> list = new ArrayList<>(); 951 List<String> list = new ArrayList<>();
@@ -2716,7 +2727,7 @@ public class ManifestController extends BasicController { @@ -2716,7 +2727,7 @@ public class ManifestController extends BasicController {
2716 model.setMsg(wbm+"请先添加主单号"); 2727 model.setMsg(wbm+"请先添加主单号");
2717 return model; 2728 return model;
2718 }else { 2729 }else {
2719 - if (preparesecondaryServer.findWaybill(arr.get(2))==0) { 2730 + if (preparesecondaryServer.findWaybill(wbm,arr.get(2))==0) {
2720 PreparesecondaryEntity seconday = new PreparesecondaryEntity(); 2731 PreparesecondaryEntity seconday = new PreparesecondaryEntity();
2721 seconday.setPreparemasterid(wbm1.getId()); 2732 seconday.setPreparemasterid(wbm1.getId());
2722 // 主单号 2733 // 主单号
@@ -2739,8 +2750,8 @@ public class ManifestController extends BasicController { @@ -2739,8 +2750,8 @@ public class ManifestController extends BasicController {
2739 // 卸货地代码 2750 // 卸货地代码
2740 seconday.setDestinationstation(arr.get(7)); 2751 seconday.setDestinationstation(arr.get(7));
2741 // 货物装载运输时间 2752 // 货物装载运输时间
2742 - SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyyMMddHHmmss");  
2743 - seconday.setStowagedate(simpleDateFormat1.parse(arr.get(8))); 2753 +// SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyyMMddHHmmss");
  2754 + seconday.setStowagedate(new Date());
2744 // 海关关区代码 2755 // 海关关区代码
2745 seconday.setCustomscode(arr.get(9)); 2756 seconday.setCustomscode(arr.get(9));
2746 // 货物件数 2757 // 货物件数
1 package com.agent.controller.system; 1 package com.agent.controller.system;
2 2
3 -import java.util.ArrayList;  
4 -import java.util.Date;  
5 -import java.util.List;  
6 -import java.util.Map; 3 +import java.util.*;
7 4
8 import javax.annotation.Resource; 5 import javax.annotation.Resource;
9 import javax.servlet.http.HttpServletRequest; 6 import javax.servlet.http.HttpServletRequest;
10 7
  8 +import com.agent.entity.system.*;
11 import org.apache.commons.collections.CollectionUtils; 9 import org.apache.commons.collections.CollectionUtils;
12 import org.apache.commons.lang.StringUtils; 10 import org.apache.commons.lang.StringUtils;
13 import org.slf4j.Logger; 11 import org.slf4j.Logger;
@@ -20,8 +18,6 @@ import org.springframework.web.bind.annotation.ResponseBody; @@ -20,8 +18,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
20 18
21 import com.agent.controller.BasicController; 19 import com.agent.controller.BasicController;
22 import com.agent.entity.agent.BasicAgentEntity; 20 import com.agent.entity.agent.BasicAgentEntity;
23 -import com.agent.entity.system.RoleEntity;  
24 -import com.agent.entity.system.UserEntity;  
25 import com.agent.service.agent.BasicAgentService; 21 import com.agent.service.agent.BasicAgentService;
26 import com.agent.service.system.RoleService; 22 import com.agent.service.system.RoleService;
27 import com.agent.service.system.UserService; 23 import com.agent.service.system.UserService;
@@ -250,5 +246,62 @@ public class UserController extends BasicController { @@ -250,5 +246,62 @@ public class UserController extends BasicController {
250 return model; 246 return model;
251 } 247 }
252 248
  249 +// /**
  250 +// * 资源同步
  251 +// */
  252 +// @RequestMapping(value = "/userSynchronization")
  253 +// @ResponseBody
  254 +// public ResultMessage userSynchronization(@RequestBody UAM uam) throws Exception {
  255 +// if ("user".equals(uam.getResType())){
  256 +// List<UserData> data = uam.getData();
  257 +// // 判断该用户是否存在
  258 +// int i = 0;
  259 +// for (UserData userData: data){
  260 +// if (userService.countLonginName(userData.getLOGIN_NAME()) > 0){
  261 +// log.info("通过账号为条件更新");
  262 +// i = userService.updateSyncUserLoginName(userData);
  263 +// }else {
  264 +// if (kakoUserMapperl.findLonginName("", userDate.getUSER_ID()) != null){
  265 +// KakoUser kakoUser = new KakoUser();
  266 +// kakoUser.setLoginName(userDate.getLOGIN_NAME());
  267 +// kakoUser.setPassword(userDate.getPWD());
  268 +// kakoUser.setUserSyncId(userDate.getUSER_ID());
  269 +// kakoUser.setMobile(userDate.getMOBILE());
  270 +// kakoUser.setEmail(userDate.getEMAIL());
  271 +// kakoUser.setDelFlag("0");
  272 +// kakoUser.setName(userDate.getUSER_NAME());
  273 +// kakoUser.setCompanyId("1");
  274 +// kakoUser.setOfficeId("5e95a0f081c64fce9f85d59e18cfdc5f");
  275 +// kakoUser.setUpdateBy("tyrz");
  276 +// kakoUser.setLoginFlag("1");
  277 +// kakoUser.setUpdateDate(new Date());
  278 +// log.info("账号不存在用过统一认证id更新");
  279 +// i = kakoUserMapperl.updateSyncUserId(kakoUser);
  280 +// }else {
  281 +// KakoUser kakoUser = new KakoUser();
  282 +// kakoUser.setId(UUID.randomUUID().toString());
  283 +// kakoUser.setLoginName(userDate.getLOGIN_NAME());
  284 +// kakoUser.setPassword(userDate.getPWD());
  285 +// kakoUser.setUserSyncId(userDate.getUSER_ID());
  286 +// kakoUser.setMobile(userDate.getMOBILE());
  287 +// kakoUser.setEmail(userDate.getEMAIL());
  288 +// kakoUser.setName(userDate.getUSER_NAME());
  289 +// kakoUser.setCompanyId("1");
  290 +// kakoUser.setOfficeId("5e95a0f081c64fce9f85d59e18cfdc5f");
  291 +// kakoUser.setLoginFlag("1");
  292 +// kakoUser.setCreateBy("tyrz");
  293 +// kakoUser.setUpdateBy("tyrz");
  294 +// kakoUser.setCreateDate(new Date());
  295 +// kakoUser.setUpdateDate(new Date());
  296 +// log.info("账号统一认证id都不在 新增");
  297 +// i = kakoUserMapperl.insertSelective(kakoUser);
  298 +// }
  299 +// }
  300 +// }
  301 +//
  302 +// return i > 0 ? new ResultMessage("200","资源同步成功"):new ResultMessage("202", "资源同步失败");
  303 +// }
  304 +// return new ResultMessage("201","不是用户信息");
  305 +// }
253 306
254 } 307 }
@@ -289,7 +289,20 @@ public class ManifestEntity extends BasicEntity implements Serializable { @@ -289,7 +289,20 @@ public class ManifestEntity extends BasicEntity implements Serializable {
289 private Long save_time; 289 private Long save_time;
290 private Long USER_ID; // 报文所属的用户id 290 private Long USER_ID; // 报文所属的用户id
291 291
292 -// // 验证密码 调用使用 292 + /**
  293 + * 是否提前运抵状态
  294 + */
  295 + private String arrived_ahead;
  296 +
  297 + public String getArrived_ahead() {
  298 + return arrived_ahead;
  299 + }
  300 +
  301 + public void setArrived_ahead(String arrived_ahead) {
  302 + this.arrived_ahead = arrived_ahead;
  303 + }
  304 +
  305 + // // 验证密码 调用使用
293 // private String password; 306 // private String password;
294 // 307 //
295 // public String getPassword() { 308 // public String getPassword() {
@@ -999,7 +1012,7 @@ public class ManifestEntity extends BasicEntity implements Serializable { @@ -999,7 +1012,7 @@ public class ManifestEntity extends BasicEntity implements Serializable {
999 + ", de_volume=" + de_volume + ", de_type=" + de_type + ", de_trstation=" + de_trstation 1012 + ", de_volume=" + de_volume + ", de_type=" + de_type + ", de_trstation=" + de_trstation
1000 + ", de_packing=" + de_packing + ", de_remarks=" + de_remarks + ", de_ids=" + de_ids 1013 + ", de_packing=" + de_packing + ", de_remarks=" + de_remarks + ", de_ids=" + de_ids
1001 + ", response_code=" + response_code + ", response_text=" + response_text + ", save_time=" + save_time 1014 + ", response_code=" + response_code + ", response_text=" + response_text + ", save_time=" + save_time
1002 - + ", USER_ID=" + USER_ID + "]"; 1015 + + ", USER_ID=" + USER_ID+ ", arrived_ahead=" + arrived_ahead + "]";
1003 } 1016 }
1004 1017
1005 public static void main(String[] args) { 1018 public static void main(String[] args) {
@@ -47,8 +47,8 @@ JpaSpecificationExecutor<PreparesecondaryEntity>{ @@ -47,8 +47,8 @@ JpaSpecificationExecutor<PreparesecondaryEntity>{
47 @Query(value = "DELETE FROM PREPARESECONDARY WHERE PREPAREMASTERID = ?1", nativeQuery = true) 47 @Query(value = "DELETE FROM PREPARESECONDARY WHERE PREPAREMASTERID = ?1", nativeQuery = true)
48 void deleteSub(Long id); 48 void deleteSub(Long id);
49 49
50 - @Query(value = "SELECT count(*) FROM PREPARESECONDARY WHERE WAYBILLNOSECONDARY = ?1", nativeQuery = true)  
51 - int findWaybill(String wbm); 50 + @Query(value = "SELECT count(*) FROM PREPARESECONDARY WHERE WAYBILLNOMASTER=?1 AND WAYBILLNOSECONDARY = ?2", nativeQuery = true)
  51 + int findWaybill(String awba, String awbh);
52 52
53 @Query(value = "select count(id) from PREPARESECONDARY where WAYBILLNOMASTER = ?1 and WAYBILLNOSECONDARY=?2", nativeQuery = true) 53 @Query(value = "select count(id) from PREPARESECONDARY where WAYBILLNOMASTER = ?1 and WAYBILLNOSECONDARY=?2", nativeQuery = true)
54 int findAwbAwbH(String awb, String awbh); 54 int findAwbAwbH(String awb, String awbh);
@@ -148,15 +148,15 @@ public class ManifestService extends BasicService<ManifestEntity> { @@ -148,15 +148,15 @@ public class ManifestService extends BasicService<ManifestEntity> {
148 Specification<ManifestEntity> spec = buildSpecification(pageForm); 148 Specification<ManifestEntity> spec = buildSpecification(pageForm);
149 149
150 Page<ManifestEntity> page = manifestRepository.findAll(spec, pageRequest); 150 Page<ManifestEntity> page = manifestRepository.findAll(spec, pageRequest);
151 - if (page != null && page.getContent() != null) {  
152 - List<ManifestEntity> list = page.getContent();  
153 - for (int i = 0; i < list.size(); i++) {  
154 - ManifestEntity bean = list.get(i);  
155 - WaybillReceiptEntity re = receiptService.findMain(bean.getWaybillnomaster());  
156 - bean.setResponse_code(re != null ? re.getResponse_code() : "");  
157 - bean.setResponse_text(re != null ? re.getResponse_text() : "");  
158 - }  
159 - } 151 +// if (page != null && page.getContent() != null) {
  152 +// List<ManifestEntity> list = page.getContent();
  153 +// for (int i = 0; i < list.size(); i++) {
  154 +// ManifestEntity bean = list.get(i);
  155 +// WaybillReceiptEntity re = receiptService.findMain(bean.getWaybillnomaster());
  156 +// bean.setResponse_code(re != null ? re.getResponse_code() : "");
  157 +// bean.setResponse_text(re != null ? re.getResponse_text() : "");
  158 +// }
  159 +// }
160 return page; 160 return page;
161 } 161 }
162 162
@@ -341,6 +341,8 @@ public class ManifestService extends BasicService<ManifestEntity> { @@ -341,6 +341,8 @@ public class ManifestService extends BasicService<ManifestEntity> {
341 // 预配舱单 341 // 预配舱单
342 ManifestDeclarationXml dec = new ManifestDeclarationXml(); 342 ManifestDeclarationXml dec = new ManifestDeclarationXml();
343 // 预配舱单主表信息 343 // 预配舱单主表信息
  344 + //提前运抵
  345 + dec.setArrivedAhead(manifest.getArrived_ahead());
344 // 承运人 346 // 承运人
345 ManifestCarrierXml carr = new ManifestCarrierXml(); 347 ManifestCarrierXml carr = new ManifestCarrierXml();
346 carr.setId(manifest.getCarrier()); 348 carr.setId(manifest.getCarrier());
@@ -41,14 +41,14 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity @@ -41,14 +41,14 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity
41 41
42 public List<PreparesecondaryEntity> findByMawbId(Long id) { 42 public List<PreparesecondaryEntity> findByMawbId(Long id) {
43 List<PreparesecondaryEntity> list = preparesecondaryRepository.findByMawbId(id); 43 List<PreparesecondaryEntity> list = preparesecondaryRepository.findByMawbId(id);
44 - if(list!=null) {  
45 - for (int i = 0; i < list.size(); i++) {  
46 - PreparesecondaryEntity bean = list.get(i);  
47 - WaybillReceiptEntity re = receiptService.findSub(bean.getWaybillnomaster(), bean.getWaybillnosecondary());  
48 - bean.setResponse_code(re!=null?re.getResponse_code():"");  
49 - bean.setResponse_text(re!=null?re.getResponse_text():"");  
50 - }  
51 - } 44 +// if(list!=null) {
  45 +// for (int i = 0; i < list.size(); i++) {
  46 +// PreparesecondaryEntity bean = list.get(i);
  47 +// WaybillReceiptEntity re = receiptService.findSub(bean.getWaybillnomaster(), bean.getWaybillnosecondary());
  48 +// bean.setResponse_code(re!=null?re.getResponse_code():"");
  49 +// bean.setResponse_text(re!=null?re.getResponse_text():"");
  50 +// }
  51 +// }
52 52
53 return list; 53 return list;
54 } 54 }
@@ -117,8 +117,8 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity @@ -117,8 +117,8 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity
117 return preparesecondaryRepository.queryByUserId(user_id); 117 return preparesecondaryRepository.queryByUserId(user_id);
118 } 118 }
119 119
120 - public int findWaybill(String wbm){  
121 - int waybill = preparesecondaryRepository.findWaybill(wbm); 120 + public int findWaybill(String awba, String awbh){
  121 + int waybill = preparesecondaryRepository.findWaybill(awba, awbh);
122 122
123 return waybill; 123 return waybill;
124 } 124 }
1 package com.agent.vo.agent; 1 package com.agent.vo.agent;
2 2
  3 +import javax.persistence.Column;
3 import java.util.Date; 4 import java.util.Date;
4 5
5 /** 6 /**
@@ -283,6 +284,19 @@ public class ManifestVo { @@ -283,6 +284,19 @@ public class ManifestVo {
283 //UserEntity 用户账号 284 //UserEntity 用户账号
284 private String loginaccount; 285 private String loginaccount;
285 286
  287 + /**
  288 + * 是否提前运抵状态
  289 + */
  290 + private String arrived_ahead;
  291 +
  292 + public String getArrived_ahead() {
  293 + return arrived_ahead;
  294 + }
  295 +
  296 + public void setArrived_ahead(String arrived_ahead) {
  297 + this.arrived_ahead = arrived_ahead;
  298 + }
  299 +
286 public String getUnlodingcode() { 300 public String getUnlodingcode() {
287 return unlodingcode; 301 return unlodingcode;
288 } 302 }
@@ -17,6 +17,9 @@ public class ManifestDeclarationXml { @@ -17,6 +17,9 @@ public class ManifestDeclarationXml {
17 @XmlElement(name = "Carrier",required = false) 17 @XmlElement(name = "Carrier",required = false)
18 private ManifestCarrierXml carrier; 18 private ManifestCarrierXml carrier;
19 19
  20 + @XmlElement(name = "ArrivedAhead",required = false)
  21 + private String arrivedAhead;
  22 +
20 @XmlElement(name = "ORG",required = false) 23 @XmlElement(name = "ORG",required = false)
21 private ManifestOrgXml org; 24 private ManifestOrgXml org;
22 25
@@ -81,4 +84,11 @@ public class ManifestDeclarationXml { @@ -81,4 +84,11 @@ public class ManifestDeclarationXml {
81 this.consignment = consignment; 84 this.consignment = consignment;
82 } 85 }
83 86
  87 + public String getArrivedAhead() {
  88 + return arrivedAhead;
  89 + }
  90 +
  91 + public void setArrivedAhead(String arrivedAhead) {
  92 + this.arrivedAhead = arrivedAhead;
  93 + }
84 } 94 }
@@ -144,10 +144,18 @@ @@ -144,10 +144,18 @@
144 144
145 <td class="kv-label"><spring:message code="manifest.flight.date" /><span 145 <td class="kv-label"><spring:message code="manifest.flight.date" /><span
146 class="required_span">*</span></td> 146 class="required_span">*</span></td>
147 - <td class="kv-content"><input type="text" class="date bill Wdate" 147 + <td class="kv-content"><input type="text" class="date bill Wdate"
148 id="flightdate" name="flightdate" required autocomplete="off" 148 id="flightdate" name="flightdate" required autocomplete="off"
149 value="<fmt:formatDate pattern='yyyy-MM-dd' value='${manifest.flightdate }'></fmt:formatDate>"> 149 value="<fmt:formatDate pattern='yyyy-MM-dd' value='${manifest.flightdate }'></fmt:formatDate>">
150 </td> 150 </td>
  151 + <td class="kv-label">提前运抵<span
  152 + class="required_span">*</span></td>
  153 + <td class="kv-content">
  154 + <select id="arrived_ahead" name="arrived_ahead">
  155 + <option value="0" <c:if test = "${manifest.arrived_ahead == '0' }">selected="selected"</c:if>>正常运抵</option>
  156 + <option value="1" <c:if test = "${manifest.arrived_ahead == '1' }">selected="selected"</c:if>>提前运抵</option>
  157 + </select>
  158 + </td>
151 </tr> 159 </tr>
152 <tr> 160 <tr>
153 <td class="kv-label"><spring:message code="manifest.starting.point" /><span 161 <td class="kv-label"><spring:message code="manifest.starting.point" /><span