作者 Kevin

修复不同主单下相同分单号的回执错乱的bug;

修改sli和fhl报文的代理人字段;
正在显示 26 个修改的文件 包含 501 行增加341 行删除
1 package com.agent.controller.agent; 1 package com.agent.controller.agent;
2 2
  3 +import java.text.ParseException;
  4 +import java.text.SimpleDateFormat;
  5 +import java.util.ArrayList;
  6 +import java.util.Date;
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +
  10 +import javax.annotation.Resource;
  11 +import javax.servlet.http.HttpServletRequest;
  12 +import javax.servlet.http.HttpServletResponse;
  13 +
  14 +import org.apache.commons.collections.CollectionUtils;
  15 +import org.apache.commons.lang.StringUtils;
  16 +import org.slf4j.Logger;
  17 +import org.slf4j.LoggerFactory;
  18 +import org.springframework.stereotype.Controller;
  19 +import org.springframework.ui.Model;
  20 +import org.springframework.web.bind.annotation.RequestMapping;
  21 +import org.springframework.web.bind.annotation.RequestMethod;
  22 +import org.springframework.web.bind.annotation.ResponseBody;
  23 +
3 import com.agent.controller.BasicController; 24 import com.agent.controller.BasicController;
4 import com.agent.entity.Constant; 25 import com.agent.entity.Constant;
5 -import com.agent.entity.agent.*; 26 +import com.agent.entity.agent.BasicAgentEntity;
  27 +import com.agent.entity.agent.DeliveryInfoEntity;
  28 +import com.agent.entity.agent.ManifestEntity;
  29 +import com.agent.entity.agent.PackageSizeEntity;
  30 +import com.agent.entity.agent.PackageTypeEntity;
  31 +import com.agent.entity.agent.PubDgEntity;
  32 +import com.agent.entity.agent.SupervisionEntity;
6 import com.agent.entity.system.UserEntity; 33 import com.agent.entity.system.UserEntity;
7 -import com.agent.imf.agent.redis.RedisSaveMessage;  
8 -import com.agent.service.agent.*; 34 +import com.agent.service.agent.BasicAgentService;
  35 +import com.agent.service.agent.DeliveryDicService;
  36 +import com.agent.service.agent.DeliveryInfoService;
  37 +import com.agent.service.agent.ManifestService;
  38 +import com.agent.service.agent.PackageSizeService;
  39 +import com.agent.service.agent.PackageTypeService;
  40 +import com.agent.service.agent.PubDgService;
  41 +import com.agent.service.agent.SupervisionService;
9 import com.agent.util.HttpJsonMsg; 42 import com.agent.util.HttpJsonMsg;
10 import com.agent.vo.ResponseModel; 43 import com.agent.vo.ResponseModel;
11 import com.agent.vo.agent.DeliveryVo; 44 import com.agent.vo.agent.DeliveryVo;
  45 +import com.agent.xml.XmlBuildTask;
12 import com.agent.xml.common.XmlUtil; 46 import com.agent.xml.common.XmlUtil;
13 import com.agent.xml.deliveryInfo.ApplicableFreightRateServiceChargeXml; 47 import com.agent.xml.deliveryInfo.ApplicableFreightRateServiceChargeXml;
14 import com.agent.xml.deliveryInfo.ArrivalEventXml; 48 import com.agent.xml.deliveryInfo.ArrivalEventXml;
@@ -47,33 +81,13 @@ import com.framework.core.Servlets; @@ -47,33 +81,13 @@ import com.framework.core.Servlets;
47 import com.framework.shiro.SessionUtil; 81 import com.framework.shiro.SessionUtil;
48 import com.plugin.easyui.DataGrid; 82 import com.plugin.easyui.DataGrid;
49 import com.plugin.easyui.EasyPage; 83 import com.plugin.easyui.EasyPage;
50 -import org.apache.commons.collections.CollectionUtils;  
51 -import org.apache.commons.lang.StringUtils;  
52 -import org.slf4j.Logger;  
53 -import org.slf4j.LoggerFactory;  
54 -import org.springframework.stereotype.Controller;  
55 -import org.springframework.ui.Model;  
56 -import org.springframework.web.bind.annotation.RequestMapping;  
57 -import org.springframework.web.bind.annotation.RequestMethod;  
58 -import org.springframework.web.bind.annotation.ResponseBody;  
59 -  
60 -import javax.annotation.Resource;  
61 -import javax.servlet.http.HttpServletRequest;  
62 -import javax.servlet.http.HttpServletResponse;  
63 -  
64 -import java.text.ParseException;  
65 -import java.text.SimpleDateFormat;  
66 -import java.util.ArrayList;  
67 -import java.util.Date;  
68 -import java.util.List;  
69 -import java.util.Map;  
70 84
71 /** 85 /**
72 * Created by cohesion on 2017/3/29. 86 * Created by cohesion on 2017/3/29.
73 */ 87 */
74 @Controller 88 @Controller
75 @RequestMapping(value = "/delivery") 89 @RequestMapping(value = "/delivery")
76 -public class DeliveryInfoController extends BasicController{ 90 +public class DeliveryInfoController extends BasicController {
77 91
78 private static final Logger logger = LoggerFactory.getLogger(DeliveryInfoController.class); 92 private static final Logger logger = LoggerFactory.getLogger(DeliveryInfoController.class);
79 93
@@ -104,36 +118,38 @@ public class DeliveryInfoController extends BasicController{ @@ -104,36 +118,38 @@ public class DeliveryInfoController extends BasicController{
104 @Resource 118 @Resource
105 private ManifestService manifestService; 119 private ManifestService manifestService;
106 120
107 -  
108 @Resource 121 @Resource
109 private DeliveryDicService deliverydicservice; 122 private DeliveryDicService deliverydicservice;
110 123
111 /** 124 /**
112 * 交运信息页面 125 * 交运信息页面
  126 + *
113 * @return 127 * @return
114 */ 128 */
115 @RequestMapping(value = "/list") 129 @RequestMapping(value = "/list")
116 - public String getList(){ 130 + public String getList() {
117 return "delivery/list"; 131 return "delivery/list";
118 } 132 }
119 133
120 /** 134 /**
121 * 交运信息分页数据 135 * 交运信息分页数据
  136 + *
122 * @return 137 * @return
123 */ 138 */
124 - @RequestMapping(value="/grid.json") 139 + @RequestMapping(value = "/grid.json")
125 @ResponseBody 140 @ResponseBody
126 - public DataGrid<DeliveryVo> grid(HttpServletRequest request,EasyPage<DeliveryInfoEntity> pageForm) throws ParseException { 141 + public DataGrid<DeliveryVo> grid(HttpServletRequest request, EasyPage<DeliveryInfoEntity> pageForm)
  142 + throws ParseException {
127 Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_"); 143 Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
128 searchParams.put("EQ_isdelete", 0); 144 searchParams.put("EQ_isdelete", 0);
129 - String deliveryDate =searchParams.get("GTE_deliveryDate").toString(); 145 + String deliveryDate = searchParams.get("GTE_deliveryDate").toString();
130 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); 146 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
131 - if(StringUtils.isNotEmpty(deliveryDate)){  
132 - searchParams.put("GTE_deliveryDate",dateFormat.parse(deliveryDate)); 147 + if (StringUtils.isNotEmpty(deliveryDate)) {
  148 + searchParams.put("GTE_deliveryDate", dateFormat.parse(deliveryDate));
133 } 149 }
134 - String deliveryDate1 =searchParams.get("LTE_deliveryDate").toString();  
135 - if(StringUtils.isNotEmpty(deliveryDate1)){  
136 - searchParams.put("LTE_deliveryDate",dateFormat.parse(deliveryDate1)); 150 + String deliveryDate1 = searchParams.get("LTE_deliveryDate").toString();
  151 + if (StringUtils.isNotEmpty(deliveryDate1)) {
  152 + searchParams.put("LTE_deliveryDate", dateFormat.parse(deliveryDate1));
137 } 153 }
138 pageForm.setSearchParams(searchParams); 154 pageForm.setSearchParams(searchParams);
139 pageForm.parseData(deliveryInfoService.getPage(pageForm)); 155 pageForm.parseData(deliveryInfoService.getPage(pageForm));
@@ -142,39 +158,40 @@ public class DeliveryInfoController extends BasicController{ @@ -142,39 +158,40 @@ public class DeliveryInfoController extends BasicController{
142 158
143 /** 159 /**
144 * 编辑 160 * 编辑
  161 + *
145 * @param id 162 * @param id
146 * @param model 163 * @param model
147 * @return 164 * @return
148 */ 165 */
149 - @RequestMapping(value = "/edit" , method = {RequestMethod.GET }) 166 + @RequestMapping(value = "/edit", method = { RequestMethod.GET })
150 public String edit(Long id, Model model) { 167 public String edit(Long id, Model model) {
151 DeliveryInfoEntity deliveryInfo = null; 168 DeliveryInfoEntity deliveryInfo = null;
152 - if(id!=null){ 169 + if (id != null) {
153 deliveryInfo = deliveryInfoService.findOne(id); 170 deliveryInfo = deliveryInfoService.findOne(id);
154 } 171 }
155 172
156 model.addAttribute("delivery", deliveryInfo); 173 model.addAttribute("delivery", deliveryInfo);
157 UserEntity user = SessionUtil.getUser(); 174 UserEntity user = SessionUtil.getUser();
158 - if(user!=null && user.getAgent()!=null){ 175 + if (user != null && user.getAgent() != null) {
159 BasicAgentEntity agent = agentService.findOne(user.getAgent()); 176 BasicAgentEntity agent = agentService.findOne(user.getAgent());
160 - model.addAttribute("userAgent",agent); 177 + model.addAttribute("userAgent", agent);
161 } 178 }
162 179
163 - //品名代码  
164 -// List<DeliveryDicEntity> good = deliverydicservice.findGood();  
165 -// model.addAttribute("good",good); 180 + // 品名代码
  181 + // List<DeliveryDicEntity> good = deliverydicservice.findGood();
  182 + // model.addAttribute("good",good);
166 183
167 - //监管代码 184 + // 监管代码
168 List<SupervisionEntity> supervisionList = supervisionService.findAll(); 185 List<SupervisionEntity> supervisionList = supervisionService.findAll();
169 - model.addAttribute("supervisionList",supervisionList); 186 + model.addAttribute("supervisionList", supervisionList);
170 187
171 - //危险品代码 188 + // 危险品代码
172 List<PubDgEntity> dgList = dgService.findAll(); 189 List<PubDgEntity> dgList = dgService.findAll();
173 - model.addAttribute("dgList",dgList); 190 + model.addAttribute("dgList", dgList);
174 191
175 - //包装种类 192 + // 包装种类
176 List<PackageTypeEntity> typeList = packageTypeService.findAll(); 193 List<PackageTypeEntity> typeList = packageTypeService.findAll();
177 - model.addAttribute("typeList",typeList); 194 + model.addAttribute("typeList", typeList);
178 return "delivery/edit"; 195 return "delivery/edit";
179 } 196 }
180 197
@@ -184,26 +201,26 @@ public class DeliveryInfoController extends BasicController{ @@ -184,26 +201,26 @@ public class DeliveryInfoController extends BasicController{
184 * @param hostId 201 * @param hostId
185 * @return 202 * @return
186 */ 203 */
187 - @RequestMapping(value = "/size/get" , method = {RequestMethod.POST }) 204 + @RequestMapping(value = "/size/get", method = { RequestMethod.POST })
188 @ResponseBody 205 @ResponseBody
189 public String getSize(Long hostId) { 206 public String getSize(Long hostId) {
190 - return JSON.toJSONString(sizeService.getList(Constant.packageSizeDelivery, hostId),filter); 207 + return JSON.toJSONString(sizeService.getList(Constant.packageSizeDelivery, hostId), filter);
191 } 208 }
192 209
193 -  
194 /** 210 /**
195 * 保存 211 * 保存
  212 + *
196 * @param deliveryJson 213 * @param deliveryJson
197 * @return 214 * @return
198 */ 215 */
199 - @RequestMapping(value = "/save" , method = {RequestMethod.POST }) 216 + @RequestMapping(value = "/save", method = { RequestMethod.POST })
200 @ResponseBody 217 @ResponseBody
201 - public ResponseModel save(String deliveryJson,String sizeJson) { 218 + public ResponseModel save(String deliveryJson, String sizeJson) {
202 ResponseModel model = new ResponseModel(); 219 ResponseModel model = new ResponseModel();
203 try { 220 try {
204 - DeliveryInfoEntity delivery = JSONObject.parseObject(deliveryJson,DeliveryInfoEntity.class);  
205 - List<PackageSizeEntity> sizeList = JSONArray.parseArray(sizeJson,PackageSizeEntity.class);  
206 - DeliveryInfoEntity deliveryInfo = deliveryInfoService.save(delivery,sizeList); 221 + DeliveryInfoEntity delivery = JSONObject.parseObject(deliveryJson, DeliveryInfoEntity.class);
  222 + List<PackageSizeEntity> sizeList = JSONArray.parseArray(sizeJson, PackageSizeEntity.class);
  223 + DeliveryInfoEntity deliveryInfo = deliveryInfoService.save(delivery, sizeList);
207 model.setData(deliveryInfo.getId()); 224 model.setData(deliveryInfo.getId());
208 model.setStatus(200); 225 model.setStatus(200);
209 } catch (Exception e) { 226 } catch (Exception e) {
@@ -215,26 +232,29 @@ public class DeliveryInfoController extends BasicController{ @@ -215,26 +232,29 @@ public class DeliveryInfoController extends BasicController{
215 232
216 /** 233 /**
217 * 保存并且发送 234 * 保存并且发送
  235 + *
218 * @param deliveryJson 236 * @param deliveryJson
219 * @return 237 * @return
220 */ 238 */
221 - @RequestMapping(value = "/sendXml" , method = {RequestMethod.POST }) 239 + @RequestMapping(value = "/sendXml", method = { RequestMethod.POST })
222 @ResponseBody 240 @ResponseBody
223 - public ResponseModel sendXml(String deliveryJson,String sizeJson,HttpServletRequest request) { 241 + public ResponseModel sendXml(String deliveryJson, String sizeJson, HttpServletRequest request) {
224 ResponseModel model = new ResponseModel(); 242 ResponseModel model = new ResponseModel();
225 try { 243 try {
226 - DeliveryInfoEntity delivery = JSONObject.parseObject(deliveryJson,DeliveryInfoEntity.class); 244 + DeliveryInfoEntity delivery = JSONObject.parseObject(deliveryJson, DeliveryInfoEntity.class);
227 delivery.setIsdelete(1); 245 delivery.setIsdelete(1);
228 - List<PackageSizeEntity> sizeList = JSONArray.parseArray(sizeJson,PackageSizeEntity.class);  
229 - DeliveryInfoEntity deliveryInfo = deliveryInfoService.save(delivery,sizeList); 246 + List<PackageSizeEntity> sizeList = JSONArray.parseArray(sizeJson, PackageSizeEntity.class);
  247 + DeliveryInfoEntity deliveryInfo = deliveryInfoService.save(delivery, sizeList);
230 248
231 - //生成报文并且发送 249 + // 生成报文并且发送
232 String rootPath = request.getSession().getServletContext().getRealPath("/"); 250 String rootPath = request.getSession().getServletContext().getRealPath("/");
233 - String path = rootPath+"/excel/manifest"+new Date().getTime()+".xml";  
234 - String xml = XmlUtil.convertToXml2(deliveryInfoService.deliveryXml(delivery), path);  
235 - //发送redis储存数据  
236 - System.out.println(xml);  
237 - new RedisSaveMessage().saveMessage(xml); 251 + String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml";
  252 + new XmlBuildTask(deliveryInfoService.deliveryXml(delivery), path).perform();
  253 +
  254 + // String xml = XmlUtil.convertToXml2(deliveryInfoService.deliveryXml(delivery),
  255 + // path);
  256 + // new XmlSendTask().saveMessage(xml);
  257 +
238 model.setData(deliveryInfo.getId()); 258 model.setData(deliveryInfo.getId());
239 model.setStatus(200); 259 model.setStatus(200);
240 } catch (Exception e) { 260 } catch (Exception e) {
@@ -244,33 +264,31 @@ public class DeliveryInfoController extends BasicController{ @@ -244,33 +264,31 @@ public class DeliveryInfoController extends BasicController{
244 return model; 264 return model;
245 } 265 }
246 266
247 -  
248 /** 267 /**
249 * 查询主单号是否存在 268 * 查询主单号是否存在
250 * 269 *
251 * @param mawbNo 270 * @param mawbNo
252 * @return 271 * @return
253 */ 272 */
254 - @RequestMapping(value = "/queryMawbNo",method = {RequestMethod.POST}) 273 + @RequestMapping(value = "/queryMawbNo", method = { RequestMethod.POST })
255 @ResponseBody 274 @ResponseBody
256 - public ResponseModel queryMawbId(Long id,String mawbNo){ 275 + public ResponseModel queryMawbId(Long id, String mawbNo) {
257 ResponseModel model = new ResponseModel(); 276 ResponseModel model = new ResponseModel();
258 List<DeliveryInfoEntity> list = null; 277 List<DeliveryInfoEntity> list = null;
259 - if(StringUtils.isNotEmpty(mawbNo)){ 278 + if (StringUtils.isNotEmpty(mawbNo)) {
260 list = deliveryInfoService.findByMawbNo(mawbNo); 279 list = deliveryInfoService.findByMawbNo(mawbNo);
261 } 280 }
262 boolean exist = false; 281 boolean exist = false;
263 - if(CollectionUtils.isNotEmpty(list)){  
264 - if(list.size()>1){ 282 + if (CollectionUtils.isNotEmpty(list)) {
  283 + if (list.size() > 1) {
265 exist = true; 284 exist = true;
266 - }else if(!list.get(0).getId().equals(id)) { 285 + } else if (!list.get(0).getId().equals(id)) {
267 exist = true; 286 exist = true;
268 } 287 }
269 } 288 }
270 - if(exist){ 289 + if (exist) {
271 model.setStatus(500); 290 model.setStatus(500);
272 - }  
273 - else { 291 + } else {
274 model.setStatus(200); 292 model.setStatus(200);
275 } 293 }
276 return model; 294 return model;
@@ -278,10 +296,11 @@ public class DeliveryInfoController extends BasicController{ @@ -278,10 +296,11 @@ public class DeliveryInfoController extends BasicController{
278 296
279 /** 297 /**
280 * 删除 298 * 删除
  299 + *
281 * @param ids 300 * @param ids
282 * @return 301 * @return
283 */ 302 */
284 - @RequestMapping(value = "/delete" , method = {RequestMethod.POST }) 303 + @RequestMapping(value = "/delete", method = { RequestMethod.POST })
285 @ResponseBody 304 @ResponseBody
286 public ResponseModel delete(String ids) { 305 public ResponseModel delete(String ids) {
287 ResponseModel model = new ResponseModel(); 306 ResponseModel model = new ResponseModel();
@@ -297,11 +316,11 @@ public class DeliveryInfoController extends BasicController{ @@ -297,11 +316,11 @@ public class DeliveryInfoController extends BasicController{
297 return model; 316 return model;
298 } 317 }
299 318
300 - private DataGrid<DeliveryVo> transferData(EasyPage<DeliveryInfoEntity> pageForm){ 319 + private DataGrid<DeliveryVo> transferData(EasyPage<DeliveryInfoEntity> pageForm) {
301 DataGrid<DeliveryInfoEntity> list = pageForm.getData(); 320 DataGrid<DeliveryInfoEntity> list = pageForm.getData();
302 List<DeliveryVo> rows = new ArrayList<>(); 321 List<DeliveryVo> rows = new ArrayList<>();
303 - if(CollectionUtils.isNotEmpty(list.getRows())){  
304 - for(DeliveryInfoEntity entity:list.getRows()){ 322 + if (CollectionUtils.isNotEmpty(list.getRows())) {
  323 + for (DeliveryInfoEntity entity : list.getRows()) {
305 DeliveryVo vo = new DeliveryVo(); 324 DeliveryVo vo = new DeliveryVo();
306 vo.setId(entity.getId()); 325 vo.setId(entity.getId());
307 vo.setSupplier(entity.getSupplier()); 326 vo.setSupplier(entity.getSupplier());
@@ -311,13 +330,13 @@ public class DeliveryInfoController extends BasicController{ @@ -311,13 +330,13 @@ public class DeliveryInfoController extends BasicController{
311 vo.setCbm(entity.getCbm()); 330 vo.setCbm(entity.getCbm());
312 vo.setWeight(entity.getWeight()); 331 vo.setWeight(entity.getWeight());
313 vo.setScheduledFlight(entity.getScheduledFlight()); 332 vo.setScheduledFlight(entity.getScheduledFlight());
314 - if(entity.getAgent()!=null){ 333 + if (entity.getAgent() != null) {
315 BasicAgentEntity agent = agentService.findOne(entity.getAgent()); 334 BasicAgentEntity agent = agentService.findOne(entity.getAgent());
316 - if(agent!=null){ 335 + if (agent != null) {
317 vo.setAgent(agent.getNameCn()); 336 vo.setAgent(agent.getNameCn());
318 } 337 }
319 } 338 }
320 - if(entity.getSendDate()!=null){ 339 + if (entity.getSendDate() != null) {
321 vo.setSendDate(Constant.dateFormat.format(entity.getSendDate())); 340 vo.setSendDate(Constant.dateFormat.format(entity.getSendDate()));
322 } 341 }
323 rows.add(vo); 342 rows.add(vo);
@@ -329,25 +348,25 @@ public class DeliveryInfoController extends BasicController{ @@ -329,25 +348,25 @@ public class DeliveryInfoController extends BasicController{
329 return vos; 348 return vos;
330 } 349 }
331 350
332 - //发送报文  
333 - @RequestMapping(value = "/xml",method = RequestMethod.POST) 351 + // 发送报文
  352 + @RequestMapping(value = "/xml", method = RequestMethod.POST)
334 @ResponseBody 353 @ResponseBody
335 - public ResponseModel createXml(Long id,HttpServletRequest request,HttpServletResponse response) throws Exception { 354 + public ResponseModel createXml(Long id, HttpServletRequest request, HttpServletResponse response) throws Exception {
336 ResponseModel model = new ResponseModel(); 355 ResponseModel model = new ResponseModel();
337 String rootPath = request.getSession().getServletContext().getRealPath("/"); 356 String rootPath = request.getSession().getServletContext().getRealPath("/");
338 - String path = rootPath+"/excel/delivery"+new Date().getTime()+".xml"; 357 + String path = rootPath + "/excel/delivery" + new Date().getTime() + ".xml";
339 String xml = ""; 358 String xml = "";
340 - if(id!=null){  
341 - xml = beanToXml(path,id); 359 + if (id != null) {
  360 + xml = beanToXml(path, id);
342 } 361 }
343 model.setData(xml); 362 model.setData(xml);
344 return model; 363 return model;
345 } 364 }
346 365
347 private String beanToXml(String path, Long id) { 366 private String beanToXml(String path, Long id) {
348 - //获取表中信息 367 + // 获取表中信息
349 DeliveryInfoEntity deliveryInfo = deliveryInfoService.findOne(id); 368 DeliveryInfoEntity deliveryInfo = deliveryInfoService.findOne(id);
350 - //创建xml 369 + // 创建xml
351 DeliveryInfoMasterConsignmentXml mas = new DeliveryInfoMasterConsignmentXml(); 370 DeliveryInfoMasterConsignmentXml mas = new DeliveryInfoMasterConsignmentXml();
352 mas.setId(deliveryInfo.getMawbNo()); 371 mas.setId(deliveryInfo.getMawbNo());
353 mas.setNilcarriagevalueindicator("true"); 372 mas.setNilcarriagevalueindicator("true");
@@ -363,15 +382,16 @@ public class DeliveryInfoController extends BasicController{ @@ -363,15 +382,16 @@ public class DeliveryInfoController extends BasicController{
363 mas.setTotaldisbursementprepaidindicator("true"); 382 mas.setTotaldisbursementprepaidindicator("true");
364 mas.setIncludedtaregrossweightmeasure(deliveryInfo.getWeight()); 383 mas.setIncludedtaregrossweightmeasure(deliveryInfo.getWeight());
365 mas.setNetweightmeasure(deliveryInfo.getRecheckWeight()); 384 mas.setNetweightmeasure(deliveryInfo.getRecheckWeight());
366 - mas.setGrossvolumemeasure(deliveryInfo.getCbm());; 385 + mas.setGrossvolumemeasure(deliveryInfo.getCbm());
  386 + ;
367 mas.setTotalpiecequantity(deliveryInfo.getRecheckPieces()); 387 mas.setTotalpiecequantity(deliveryInfo.getRecheckPieces());
368 388
369 - //发货人 389 + // 发货人
370 DeliveryInfoConsignorPartyXML deli = new DeliveryInfoConsignorPartyXML(); 390 DeliveryInfoConsignorPartyXML deli = new DeliveryInfoConsignorPartyXML();
371 deli.setName(deliveryInfo.getC_name()); 391 deli.setName(deliveryInfo.getC_name());
372 deli.setLegalid(deliveryInfo.getC_legalid()); 392 deli.setLegalid(deliveryInfo.getC_legalid());
373 deli.setAccountid(deliveryInfo.getC_accountid()); 393 deli.setAccountid(deliveryInfo.getC_accountid());
374 - //发货人地址 394 + // 发货人地址
375 PostalStructuredAddressXml pos = new PostalStructuredAddressXml(); 395 PostalStructuredAddressXml pos = new PostalStructuredAddressXml();
376 pos.setPostcodeCode(deliveryInfo.getC_postcodecode()); 396 pos.setPostcodeCode(deliveryInfo.getC_postcodecode());
377 pos.setStreetName(deliveryInfo.getC_streetname()); 397 pos.setStreetName(deliveryInfo.getC_streetname());
@@ -383,7 +403,7 @@ public class DeliveryInfoController extends BasicController{ @@ -383,7 +403,7 @@ public class DeliveryInfoController extends BasicController{
383 pos.setCityID(deliveryInfo.getC_partycityid()); 403 pos.setCityID(deliveryInfo.getC_partycityid());
384 pos.setCountrySubDivisionID(deliveryInfo.getC_countrysubdivisionid()); 404 pos.setCountrySubDivisionID(deliveryInfo.getC_countrysubdivisionid());
385 deli.setPostalstructuredaddress(pos); 405 deli.setPostalstructuredaddress(pos);
386 - //发货人电话 406 + // 发货人电话
387 DefinedTradeContactXml def = new DefinedTradeContactXml(); 407 DefinedTradeContactXml def = new DefinedTradeContactXml();
388 def.setPersonname(deliveryInfo.getC_personname()); 408 def.setPersonname(deliveryInfo.getC_personname());
389 def.setDepartmentname(deliveryInfo.getC_departmentname()); 409 def.setDepartmentname(deliveryInfo.getC_departmentname());
@@ -407,12 +427,12 @@ public class DeliveryInfoController extends BasicController{ @@ -407,12 +427,12 @@ public class DeliveryInfoController extends BasicController{
407 deli.setDefinedtradecontact(def); 427 deli.setDefinedtradecontact(def);
408 mas.setConsignorparty(deli); 428 mas.setConsignorparty(deli);
409 429
410 - //收货人 430 + // 收货人
411 DeliveryInfoConsigneePartyXml del = new DeliveryInfoConsigneePartyXml(); 431 DeliveryInfoConsigneePartyXml del = new DeliveryInfoConsigneePartyXml();
412 del.setName(deliveryInfo.getS_name()); 432 del.setName(deliveryInfo.getS_name());
413 del.setLegalid(deliveryInfo.getS_legalid()); 433 del.setLegalid(deliveryInfo.getS_legalid());
414 del.setAccountid(deliveryInfo.getS_accountid()); 434 del.setAccountid(deliveryInfo.getS_accountid());
415 - //地址 435 + // 地址
416 PostalStructuredAddressXml poss = new PostalStructuredAddressXml(); 436 PostalStructuredAddressXml poss = new PostalStructuredAddressXml();
417 poss.setPostcodeCode(deliveryInfo.getS_postcodecode()); 437 poss.setPostcodeCode(deliveryInfo.getS_postcodecode());
418 poss.setStreetName(deliveryInfo.getS_streetname()); 438 poss.setStreetName(deliveryInfo.getS_streetname());
@@ -425,7 +445,7 @@ public class DeliveryInfoController extends BasicController{ @@ -425,7 +445,7 @@ public class DeliveryInfoController extends BasicController{
425 poss.setCountrySubDivisionID(deliveryInfo.getS_countrysubdivisionid()); 445 poss.setCountrySubDivisionID(deliveryInfo.getS_countrysubdivisionid());
426 del.setPostalstructuredaddress(poss); 446 del.setPostalstructuredaddress(poss);
427 447
428 - //电话 448 + // 电话
429 DefinedTradeContactXml deff = new DefinedTradeContactXml(); 449 DefinedTradeContactXml deff = new DefinedTradeContactXml();
430 deff.setPersonname(deliveryInfo.getS_personname()); 450 deff.setPersonname(deliveryInfo.getS_personname());
431 deff.setDepartmentname(deliveryInfo.getC_departmentname()); 451 deff.setDepartmentname(deliveryInfo.getC_departmentname());
@@ -449,12 +469,12 @@ public class DeliveryInfoController extends BasicController{ @@ -449,12 +469,12 @@ public class DeliveryInfoController extends BasicController{
449 del.setDefinedtradecontact(deff); 469 del.setDefinedtradecontact(deff);
450 mas.setConsigneeparty(del); 470 mas.setConsigneeparty(del);
451 471
452 - //填开代理人 472 + // 填开代理人
453 DeliveryInfoFreightForwarderPartyXml defr = new DeliveryInfoFreightForwarderPartyXml(); 473 DeliveryInfoFreightForwarderPartyXml defr = new DeliveryInfoFreightForwarderPartyXml();
454 defr.setName(deliveryInfo.getF_name()); 474 defr.setName(deliveryInfo.getF_name());
455 defr.setLegalid(deliveryInfo.getF_legalid()); 475 defr.setLegalid(deliveryInfo.getF_legalid());
456 defr.setAccountid(deliveryInfo.getF_accountid()); 476 defr.setAccountid(deliveryInfo.getF_accountid());
457 - //地址 477 + // 地址
458 PostalStructuredAddressXml stru = new PostalStructuredAddressXml(); 478 PostalStructuredAddressXml stru = new PostalStructuredAddressXml();
459 stru.setPostcodeCode(deliveryInfo.getF_postcodecode()); 479 stru.setPostcodeCode(deliveryInfo.getF_postcodecode());
460 stru.setStreetName(deliveryInfo.getF_streetname()); 480 stru.setStreetName(deliveryInfo.getF_streetname());
@@ -467,7 +487,7 @@ public class DeliveryInfoController extends BasicController{ @@ -467,7 +487,7 @@ public class DeliveryInfoController extends BasicController{
467 stru.setCountrySubDivisionID(deliveryInfo.getF_countrysubdivisionid()); 487 stru.setCountrySubDivisionID(deliveryInfo.getF_countrysubdivisionid());
468 defr.setPostalstructuredaddress(stru); 488 defr.setPostalstructuredaddress(stru);
469 489
470 - //电话 490 + // 电话
471 DefinedTradeContactXml detf = new DefinedTradeContactXml(); 491 DefinedTradeContactXml detf = new DefinedTradeContactXml();
472 detf.setPersonname(deliveryInfo.getF_personname()); 492 detf.setPersonname(deliveryInfo.getF_personname());
473 detf.setDepartmentname(deliveryInfo.getF_departmentname()); 493 detf.setDepartmentname(deliveryInfo.getF_departmentname());
@@ -491,12 +511,12 @@ public class DeliveryInfoController extends BasicController{ @@ -491,12 +511,12 @@ public class DeliveryInfoController extends BasicController{
491 defr.setDefinedtradecontact(detf); 511 defr.setDefinedtradecontact(detf);
492 mas.setFreightforwarderparty(defr); 512 mas.setFreightforwarderparty(defr);
493 513
494 - //其他代理人 514 + // 其他代理人
495 DeliveryInfoAssociatedPartyXml deliin = new DeliveryInfoAssociatedPartyXml(); 515 DeliveryInfoAssociatedPartyXml deliin = new DeliveryInfoAssociatedPartyXml();
496 deliin.setName(deliveryInfo.getA_name()); 516 deliin.setName(deliveryInfo.getA_name());
497 deliin.setLegalid(deliveryInfo.getA_legalid()); 517 deliin.setLegalid(deliveryInfo.getA_legalid());
498 deliin.setAccountid(deliveryInfo.getA_accountid()); 518 deliin.setAccountid(deliveryInfo.getA_accountid());
499 - //地址 519 + // 地址
500 PostalStructuredAddressXml struip = new PostalStructuredAddressXml(); 520 PostalStructuredAddressXml struip = new PostalStructuredAddressXml();
501 struip.setPostcodeCode(deliveryInfo.getP_postcodecode()); 521 struip.setPostcodeCode(deliveryInfo.getP_postcodecode());
502 struip.setStreetName(deliveryInfo.getP_streetname()); 522 struip.setStreetName(deliveryInfo.getP_streetname());
@@ -509,7 +529,7 @@ public class DeliveryInfoController extends BasicController{ @@ -509,7 +529,7 @@ public class DeliveryInfoController extends BasicController{
509 struip.setCountrySubDivisionID(deliveryInfo.getP_countrysubdivisionid()); 529 struip.setCountrySubDivisionID(deliveryInfo.getP_countrysubdivisionid());
510 deliin.setPostalstructuredaddress(stru); 530 deliin.setPostalstructuredaddress(stru);
511 531
512 - //电话 532 + // 电话
513 DefinedTradeContactXml detfip = new DefinedTradeContactXml(); 533 DefinedTradeContactXml detfip = new DefinedTradeContactXml();
514 detfip.setPersonname(deliveryInfo.getP_personname()); 534 detfip.setPersonname(deliveryInfo.getP_personname());
515 detfip.setDepartmentname(deliveryInfo.getP_departmentname()); 535 detfip.setDepartmentname(deliveryInfo.getP_departmentname());
@@ -533,19 +553,19 @@ public class DeliveryInfoController extends BasicController{ @@ -533,19 +553,19 @@ public class DeliveryInfoController extends BasicController{
533 deliin.setDefinedtradecontact(detfip); 553 deliin.setDefinedtradecontact(detfip);
534 mas.setAssociatedparty(deliin); 554 mas.setAssociatedparty(deliin);
535 555
536 - //实发站 556 + // 实发站
537 OriginLocationXml ori = new OriginLocationXml(); 557 OriginLocationXml ori = new OriginLocationXml();
538 ori.setId(deliveryInfo.getOriginlocationid()); 558 ori.setId(deliveryInfo.getOriginlocationid());
539 ori.setName(deliveryInfo.getOriginlocationname()); 559 ori.setName(deliveryInfo.getOriginlocationname());
540 mas.setOriginlocation(ori); 560 mas.setOriginlocation(ori);
541 561
542 - //目的站 562 + // 目的站
543 FinalDestinationLocationXml fina = new FinalDestinationLocationXml(); 563 FinalDestinationLocationXml fina = new FinalDestinationLocationXml();
544 fina.setId(deliveryInfo.getFinaldestinationlocationid()); 564 fina.setId(deliveryInfo.getFinaldestinationlocationid());
545 fina.setName(deliveryInfo.getFinaldestinationlocationname()); 565 fina.setName(deliveryInfo.getFinaldestinationlocationname());
546 mas.setFinaldestinationlocation(fina); 566 mas.setFinaldestinationlocation(fina);
547 567
548 - //订仓信息 568 + // 订仓信息
549 SpecifiedLogisticsTransportMovementXml spec = new SpecifiedLogisticsTransportMovementXml(); 569 SpecifiedLogisticsTransportMovementXml spec = new SpecifiedLogisticsTransportMovementXml();
550 spec.setStagecode(deliveryInfo.getStagecode()); 570 spec.setStagecode(deliveryInfo.getStagecode());
551 spec.setModecode(deliveryInfo.getModecode()); 571 spec.setModecode(deliveryInfo.getModecode());
@@ -556,7 +576,6 @@ public class DeliveryInfoController extends BasicController{ @@ -556,7 +576,6 @@ public class DeliveryInfoController extends BasicController{
556 used.setName(deliveryInfo.getM_name()); 576 used.setName(deliveryInfo.getM_name());
557 spec.setUsedlogisticstransportmeans(used); 577 spec.setUsedlogisticstransportmeans(used);
558 578
559 -  
560 ArrivalEventXml arrivalevent = new ArrivalEventXml(); 579 ArrivalEventXml arrivalevent = new ArrivalEventXml();
561 arrivalevent.setScheduledoccurrencedatetime(deliveryInfo.getSc_datetime().toString()); 580 arrivalevent.setScheduledoccurrencedatetime(deliveryInfo.getSc_datetime().toString());
562 581
@@ -581,13 +600,13 @@ public class DeliveryInfoController extends BasicController{ @@ -581,13 +600,13 @@ public class DeliveryInfoController extends BasicController{
581 spec.setSequencenumeric("1"); 600 spec.setSequencenumeric("1");
582 mas.setSpecifiedlogisticstransportmovement(spec); 601 mas.setSpecifiedlogisticstransportmovement(spec);
583 602
584 - //处理说明 603 + // 处理说明
585 HandlingInstructionsXml hand = new HandlingInstructionsXml(); 604 HandlingInstructionsXml hand = new HandlingInstructionsXml();
586 hand.setDescription(deliveryInfo.getSeq2_description()); 605 hand.setDescription(deliveryInfo.getSeq2_description());
587 hand.setDescriptioncode(deliveryInfo.getSeq2_descriptioncode()); 606 hand.setDescriptioncode(deliveryInfo.getSeq2_descriptioncode());
588 mas.setHandlinginstructions(hand); 607 mas.setHandlinginstructions(hand);
589 608
590 - //相关文件 609 + // 相关文件
591 AssociatedReferenceDocumentXml ass = new AssociatedReferenceDocumentXml(); 610 AssociatedReferenceDocumentXml ass = new AssociatedReferenceDocumentXml();
592 ass.setId(deliveryInfo.getAss_id()); 611 ass.setId(deliveryInfo.getAss_id());
593 ass.setIssuedatetime(deliveryInfo.getAss_issuedatetime().toString()); 612 ass.setIssuedatetime(deliveryInfo.getAss_issuedatetime().toString());
@@ -595,7 +614,7 @@ public class DeliveryInfoController extends BasicController{ @@ -595,7 +614,7 @@ public class DeliveryInfoController extends BasicController{
595 ass.setName(deliveryInfo.getAss_name()); 614 ass.setName(deliveryInfo.getAss_name());
596 mas.setAssociatedreferencedocument(ass); 615 mas.setAssociatedreferencedocument(ass);
597 616
598 - //海关相关代码 617 + // 海关相关代码
599 IncludedCustomsNoteXml inc = new IncludedCustomsNoteXml(); 618 IncludedCustomsNoteXml inc = new IncludedCustomsNoteXml();
600 inc.setContentcode(deliveryInfo.getAss_contentcode()); 619 inc.setContentcode(deliveryInfo.getAss_contentcode());
601 inc.setContent(deliveryInfo.getAss_content()); 620 inc.setContent(deliveryInfo.getAss_content());
@@ -603,7 +622,7 @@ public class DeliveryInfoController extends BasicController{ @@ -603,7 +622,7 @@ public class DeliveryInfoController extends BasicController{
603 inc.setCountryid(deliveryInfo.getAss_countryid()); 622 inc.setCountryid(deliveryInfo.getAss_countryid());
604 mas.setIncludedcustomsnote(inc); 623 mas.setIncludedcustomsnote(inc);
605 624
606 - //货物信息 625 + // 货物信息
607 IncludedMasterConsignmentItemXml clide = new IncludedMasterConsignmentItemXml(); 626 IncludedMasterConsignmentItemXml clide = new IncludedMasterConsignmentItemXml();
608 clide.setSequencenumeric(deliveryInfo.getInc_sequencenumeric()); 627 clide.setSequencenumeric(deliveryInfo.getInc_sequencenumeric());
609 clide.setTypecode(deliveryInfo.getAss_typecode()); 628 clide.setTypecode(deliveryInfo.getAss_typecode());
@@ -631,7 +650,6 @@ public class DeliveryInfoController extends BasicController{ @@ -631,7 +650,6 @@ public class DeliveryInfoController extends BasicController{
631 650
632 clide.setTransportlogisticspackage(tr); 651 clide.setTransportlogisticspackage(tr);
633 652
634 -  
635 ApplicableFreightRateServiceChargeXml app = new ApplicableFreightRateServiceChargeXml(); 653 ApplicableFreightRateServiceChargeXml app = new ApplicableFreightRateServiceChargeXml();
636 app.setAppliedamount(deliveryInfo.getInc_appliedamount()); 654 app.setAppliedamount(deliveryInfo.getInc_appliedamount());
637 app.setAppliedrate(deliveryInfo.getInc_appliedrate()); 655 app.setAppliedrate(deliveryInfo.getInc_appliedrate());
@@ -642,7 +660,7 @@ public class DeliveryInfoController extends BasicController{ @@ -642,7 +660,7 @@ public class DeliveryInfoController extends BasicController{
642 660
643 mas.setIncludedmasterconsignmentitem(clide); 661 mas.setIncludedmasterconsignmentitem(clide);
644 662
645 - //状态 663 + // 状态
646 ReportedStatusXml reop = new ReportedStatusXml(); 664 ReportedStatusXml reop = new ReportedStatusXml();
647 reop.setReasonCode(deliveryInfo.getInc_reasoncode()); 665 reop.setReasonCode(deliveryInfo.getInc_reasoncode());
648 reop.setOperationCode(deliveryInfo.getInc_operationcode()); 666 reop.setOperationCode(deliveryInfo.getInc_operationcode());
@@ -662,9 +680,9 @@ public class DeliveryInfoController extends BasicController{ @@ -662,9 +680,9 @@ public class DeliveryInfoController extends BasicController{
662 680
663 String xml = XmlUtil.convertToXml2(mas, path); 681 String xml = XmlUtil.convertToXml2(mas, path);
664 682
665 -// System.out.println(xml);  
666 -// IMFServletManifst mis = new IMFServletManifst();  
667 -// mis.init(xml.toString()); 683 + // System.out.println(xml);
  684 + // IMFServletManifst mis = new IMFServletManifst();
  685 + // mis.init(xml.toString());
668 686
669 return xml; 687 return xml;
670 } 688 }
@@ -676,7 +694,7 @@ public class DeliveryInfoController extends BasicController{ @@ -676,7 +694,7 @@ public class DeliveryInfoController extends BasicController{
676 * @return 694 * @return
677 * @return 695 * @return
678 */ 696 */
679 - @RequestMapping(value = "/infor" ) 697 + @RequestMapping(value = "/infor")
680 @ResponseBody 698 @ResponseBody
681 public List<ManifestEntity> infor(String way) { 699 public List<ManifestEntity> infor(String way) {
682 List<ManifestEntity> li = manifestService.findByMawbNo(way); 700 List<ManifestEntity> li = manifestService.findByMawbNo(way);
@@ -161,7 +161,7 @@ public class HandleBillController extends BasicController{ @@ -161,7 +161,7 @@ public class HandleBillController extends BasicController{
161 // System.out.println("-------"); 161 // System.out.println("-------");
162 //发送redis储存数据 162 //发送redis储存数据
163 // System.out.println(xml); 163 // System.out.println(xml);
164 -// new RedisSaveMessage().saveMessage(xml); 164 +// new XmlSendTask().saveMessage(xml);
165 model.setStatus(200); 165 model.setStatus(200);
166 } catch (Exception e) { 166 } catch (Exception e) {
167 model.setStatus(500); 167 model.setStatus(500);
@@ -38,7 +38,6 @@ import com.agent.entity.agent.TBasCarrierEntity; @@ -38,7 +38,6 @@ import com.agent.entity.agent.TBasCarrierEntity;
38 import com.agent.entity.agent.WaybillReceiptEntity; 38 import com.agent.entity.agent.WaybillReceiptEntity;
39 import com.agent.entity.agent.WaybillReceiptType; 39 import com.agent.entity.agent.WaybillReceiptType;
40 import com.agent.entity.system.UserEntity; 40 import com.agent.entity.system.UserEntity;
41 -import com.agent.imf.agent.redis.RedisSaveMessage;  
42 import com.agent.service.agent.BasicAgentService; 41 import com.agent.service.agent.BasicAgentService;
43 import com.agent.service.agent.ConsigneeService; 42 import com.agent.service.agent.ConsigneeService;
44 import com.agent.service.agent.ConsignorService; 43 import com.agent.service.agent.ConsignorService;
@@ -55,6 +54,7 @@ import com.agent.service.system.RoleService; @@ -55,6 +54,7 @@ import com.agent.service.system.RoleService;
55 import com.agent.util.HttpJsonMsg; 54 import com.agent.util.HttpJsonMsg;
56 import com.agent.vo.ResponseModel; 55 import com.agent.vo.ResponseModel;
57 import com.agent.vo.agent.CommodityVo; 56 import com.agent.vo.agent.CommodityVo;
  57 +import com.agent.xml.XmlBuildTask;
58 import com.agent.xml.common.XmlHead; 58 import com.agent.xml.common.XmlHead;
59 import com.agent.xml.common.XmlUtil; 59 import com.agent.xml.common.XmlUtil;
60 import com.agent.xml.fhlsli.FSXmlKit; 60 import com.agent.xml.fhlsli.FSXmlKit;
@@ -139,6 +139,44 @@ public class ManifestController extends BasicController { @@ -139,6 +139,44 @@ public class ManifestController extends BasicController {
139 @Resource 139 @Resource
140 private WaybillReceiptService receiptService; 140 private WaybillReceiptService receiptService;
141 141
  142 + private BasicAgentEntity getAgent() {
  143 + UserEntity user = Tools.getUserEntity();
  144 + long agent_id = user.getAgent();
  145 + System.err.println("agent_id-->"+agent_id);
  146 +
  147 + BasicAgentEntity agent = agentService.findOne(agent_id);
  148 + if (agent == null) {
  149 + agent = new BasicAgentEntity();
  150 + }
  151 + if (StringUtils.isBlank(agent.getThreeCode())) {
  152 + agent.setThreeCode("");
  153 + }
  154 +
  155 + if (StringUtils.isBlank(agent.getNameCn())) {
  156 + agent.setNameCn("");
  157 + }
  158 +
  159 + return agent;
  160 + }
  161 +
  162 + /**
  163 + * 测试用,查看当前账号对应的代理人信息
  164 + * @param reuqest
  165 + * @param response
  166 + * @return
  167 + */
  168 + @RequestMapping(value = "/getAgent", method = { RequestMethod.GET })
  169 + @ResponseBody
  170 + public ResponseModel getAgentInfo(HttpServletRequest reuqest, HttpServletResponse response) {
  171 + ResponseModel model = new ResponseModel();
  172 + response.setHeader("Access-Control-Allow-Origin", "*");
  173 +
  174 + BasicAgentEntity agent = getAgent();
  175 + model.setData(agent);
  176 +
  177 + return model;
  178 + }
  179 +
142 /** 180 /**
143 * 列表页面 181 * 列表页面
144 * 182 *
@@ -273,13 +311,18 @@ public class ManifestController extends BasicController { @@ -273,13 +311,18 @@ public class ManifestController extends BasicController {
273 // 生成报文并且发送 311 // 生成报文并且发送
274 String rootPath = request.getSession().getServletContext().getRealPath("/"); 312 String rootPath = request.getSession().getServletContext().getRealPath("/");
275 String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml"; 313 String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml";
276 - System.out.println(path); // path  
277 - String ndlrxml = XmlUtil.convertToXml2(manifestService.sendNDLRXml(manifest), path);  
278 - String dlcfxml = XmlUtil.convertToXml2(manifestService.sendDLCFXml(manifest), path);  
279 - System.out.println(ndlrxml);  
280 - System.err.println(dlcfxml);  
281 - new RedisSaveMessage().saveMessage(ndlrxml);  
282 - new RedisSaveMessage().saveMessage(dlcfxml); 314 +
  315 + // String ndlrxml = XmlUtil.convertToXml2(manifestService.sendNDLRXml(manifest),
  316 + // path);
  317 + // String dlcfxml = XmlUtil.convertToXml2(manifestService.sendDLCFXml(manifest),
  318 + // path);
  319 + //
  320 + // new XmlSendTask(ndlrxml).send();
  321 + // new XmlSendTask(dlcfxml).send();
  322 +
  323 + new XmlBuildTask(manifestService.sendNDLRXml(manifest), path).perform();
  324 + new XmlBuildTask(manifestService.sendDLCFXml(manifest), path).perform();
  325 +
283 model.setStatus(200); 326 model.setStatus(200);
284 model.setMsg(HttpJsonMsg.SUCCESS); 327 model.setMsg(HttpJsonMsg.SUCCESS);
285 } 328 }
@@ -407,12 +450,19 @@ public class ManifestController extends BasicController { @@ -407,12 +450,19 @@ public class ManifestController extends BasicController {
407 // 生成报文并且发送 450 // 生成报文并且发送
408 String rootPath = request.getSession().getServletContext().getRealPath("/"); 451 String rootPath = request.getSession().getServletContext().getRealPath("/");
409 String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml"; 452 String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml";
410 - String ndlrxml = XmlUtil.convertToXml2(manifestService.presenddlcfNdlrXml(Preparesecondary), path);  
411 - String dlcfxml = XmlUtil.convertToXml2(manifestService.presenddlcfdlcfXml(Preparesecondary), path);  
412 - // 发送redis储存数据  
413 - // System.out.println(ndlrxml);  
414 - new RedisSaveMessage().saveMessage(ndlrxml);  
415 - new RedisSaveMessage().saveMessage(dlcfxml); 453 +
  454 + // String ndlrxml =
  455 + // XmlUtil.convertToXml2(manifestService.presenddlcfNdlrXml(Preparesecondary),
  456 + // path);
  457 + // String dlcfxml =
  458 + // XmlUtil.convertToXml2(manifestService.presenddlcfNdlrXml(Preparesecondary),
  459 + // path);
  460 + // new XmlSendTask(ndlrxml).send();
  461 + // new XmlSendTask(dlcfxml).send();
  462 +
  463 + new XmlBuildTask(manifestService.presenddlcfNdlrXml(Preparesecondary), path).perform();
  464 + new XmlBuildTask(manifestService.presenddlcfNdlrXml(Preparesecondary), path).perform();
  465 +
416 model.setData(Preparesecondary); 466 model.setData(Preparesecondary);
417 model.setStatus(200); 467 model.setStatus(200);
418 model.setMsg(HttpJsonMsg.SUCCESS); 468 model.setMsg(HttpJsonMsg.SUCCESS);
@@ -554,7 +604,7 @@ public class ManifestController extends BasicController { @@ -554,7 +604,7 @@ public class ManifestController extends BasicController {
554 // model.addAttribute("customsStatus",flag); 604 // model.addAttribute("customsStatus",flag);
555 605
556 String waybill_no = manifest != null ? manifest.getWaybillnomaster() : ""; 606 String waybill_no = manifest != null ? manifest.getWaybillnomaster() : "";
557 - WaybillReceiptEntity receipt = receiptService.findByWaybillNo(waybill_no); 607 + WaybillReceiptEntity receipt = receiptService.findMain(waybill_no);
558 request.setAttribute("receipt", receipt); 608 request.setAttribute("receipt", receipt);
559 609
560 return "manifest/edit"; 610 return "manifest/edit";
@@ -678,7 +728,7 @@ public class ManifestController extends BasicController { @@ -678,7 +728,7 @@ public class ManifestController extends BasicController {
678 if (pre != null && pre.getWaybillnosecondary() != null) { 728 if (pre != null && pre.getWaybillnosecondary() != null) {
679 sub_waybill_no = pre.getWaybillnosecondary(); 729 sub_waybill_no = pre.getWaybillnosecondary();
680 } 730 }
681 - WaybillReceiptEntity receipt = receiptService.findByWaybillNoAndSub(waybill_no, sub_waybill_no); 731 + WaybillReceiptEntity receipt = receiptService.findSub(waybill_no, sub_waybill_no);
682 request.setAttribute("receipt", receipt); 732 request.setAttribute("receipt", receipt);
683 733
684 return "manifest/sub_edit"; 734 return "manifest/sub_edit";
@@ -820,8 +870,8 @@ public class ManifestController extends BasicController { @@ -820,8 +870,8 @@ public class ManifestController extends BasicController {
820 manifest.setCarrier(carrier); 870 manifest.setCarrier(carrier);
821 manifest.setFlightno(flightno); 871 manifest.setFlightno(flightno);
822 872
823 -// consigneeService.saveFromManifest(manifest, Tools.getUserId());  
824 -// consignorService.saveFromManifest(manifest, Tools.getUserId()); 873 + // consigneeService.saveFromManifest(manifest, Tools.getUserId());
  874 + // consignorService.saveFromManifest(manifest, Tools.getUserId());
825 875
826 ResponseModel model = new ResponseModel(); 876 ResponseModel model = new ResponseModel();
827 try { 877 try {
@@ -870,11 +920,11 @@ public class ManifestController extends BasicController { @@ -870,11 +920,11 @@ public class ManifestController extends BasicController {
870 // System.out.println("===================deletexml==================="); 920 // System.out.println("===================deletexml===================");
871 // System.out.println(deletexml); 921 // System.out.println(deletexml);
872 922
873 - // new RedisSaveMessage().saveMessage(ndlxml); 923 + // new XmlSendTask().saveMessage(ndlxml);
874 // model.setStatus(200); 924 // model.setStatus(200);
875 925
876 WaybillReceiptType type = WaybillReceiptType.DELETE; 926 WaybillReceiptType type = WaybillReceiptType.DELETE;
877 - manifest.setResponse_text("主单——" + type.getName()); 927 + manifest.setResponse_text(type.getName());
878 manifest.setResponse_code(String.valueOf(type.getValue())); 928 manifest.setResponse_code(String.valueOf(type.getValue()));
879 manifestService.save(manifest); 929 manifestService.save(manifest);
880 receiptService.saveFromManifest(manifest, type); 930 receiptService.saveFromManifest(manifest, type);
@@ -922,8 +972,8 @@ public class ManifestController extends BasicController { @@ -922,8 +972,8 @@ public class ManifestController extends BasicController {
922 manifest.setCarrier(carrier); 972 manifest.setCarrier(carrier);
923 manifest.setFlightno(flightno); 973 manifest.setFlightno(flightno);
924 974
925 -// consigneeService.saveFromManifest(manifest, Tools.getUserId());  
926 -// consignorService.saveFromManifest(manifest, Tools.getUserId()); 975 + // consigneeService.saveFromManifest(manifest, Tools.getUserId());
  976 + // consignorService.saveFromManifest(manifest, Tools.getUserId());
927 977
928 ResponseModel model = new ResponseModel(); 978 ResponseModel model = new ResponseModel();
929 try { 979 try {
@@ -944,7 +994,7 @@ public class ManifestController extends BasicController { @@ -944,7 +994,7 @@ public class ManifestController extends BasicController {
944 // 保存 994 // 保存
945 manifest.setIsdelete(1); 995 manifest.setIsdelete(1);
946 manifest.setResponse_code(String.valueOf(type.getValue())); 996 manifest.setResponse_code(String.valueOf(type.getValue()));
947 - manifest.setResponse_text("主单——" + type.getName()); 997 + manifest.setResponse_text(type.getName());
948 manifest.setSave_time(System.currentTimeMillis()); 998 manifest.setSave_time(System.currentTimeMillis());
949 manifestService.save(manifest); 999 manifestService.save(manifest);
950 receiptService.saveFromManifest(manifest, type); 1000 receiptService.saveFromManifest(manifest, type);
@@ -954,29 +1004,32 @@ public class ManifestController extends BasicController { @@ -954,29 +1004,32 @@ public class ManifestController extends BasicController {
954 String dlcPath = MessageKit.getMessagePath(MessageType.DLCF); 1004 String dlcPath = MessageKit.getMessagePath(MessageType.DLCF);
955 String sliPath = MessageKit.getMessagePath(MessageType.SLI); 1005 String sliPath = MessageKit.getMessagePath(MessageType.SLI);
956 1006
957 - String ndlrxml = XmlUtil.convertToXml2(manifestService.sendNDLRXml(manifest), ndlrPath);  
958 - String dlcfxml = XmlUtil.convertToXml2(manifestService.sendDLCFXml(manifest), dlcPath);  
959 - String slifxml = XmlUtil.convertToXml2(FSXmlKit.sliXml(manifest), sliPath);  
960 -  
961 - // RemoteFileKit.putFile(ndlrPath);  
962 - // RemoteFileKit.putFile(dlcPath);  
963 - // RemoteFileKit.putFile(sliPath); 1007 + new XmlBuildTask(manifestService.sendNDLRXml(manifest), ndlrPath).perform();
  1008 + new XmlBuildTask(manifestService.sendDLCFXml(manifest), dlcPath).perform();
  1009 + new XmlBuildTask(FSXmlKit.sliXml(manifest, getAgent()), sliPath).perform();
964 1010
965 - System.err.println("===================ndlrxml===================");  
966 - System.err.println(ndlrxml);  
967 - System.err.println(); 1011 + // String ndlrxml = XmlUtil.convertToXml2(manifestService.sendNDLRXml(manifest),
  1012 + // ndlrPath);
  1013 + // String dlcfxml = XmlUtil.convertToXml2(manifestService.sendDLCFXml(manifest),
  1014 + // dlcPath);
  1015 + // String slifxml = XmlUtil.convertToXml2(FSXmlKit.sliXml(manifest, getAgent()),
  1016 + // sliPath);
968 1017
969 - System.err.println("===================dlcfxml===================");  
970 - System.err.println(dlcfxml);  
971 - System.err.println();  
972 -  
973 - System.err.println("===================slifxml===================");  
974 - System.err.println(slifxml);  
975 - System.err.println(); 1018 + // System.err.println("===================ndlrxml===================");
  1019 + // System.err.println(ndlrxml);
  1020 + // System.err.println();
  1021 + //
  1022 + // System.err.println("===================dlcfxml===================");
  1023 + // System.err.println(dlcfxml);
  1024 + // System.err.println();
  1025 + //
  1026 + // System.err.println("===================slifxml===================");
  1027 + // System.err.println(slifxml);
  1028 + // System.err.println();
976 1029
977 - new RedisSaveMessage().saveMessage(ndlrxml);  
978 - new RedisSaveMessage().saveMessage(dlcfxml);  
979 - new RedisSaveMessage().saveMessage(slifxml); 1030 + // new XmlSendTask(ndlrxml).send();
  1031 + // new XmlSendTask(dlcfxml).send();
  1032 + // new XmlSendTask(slifxml).send();
980 1033
981 model.setData(manifest); 1034 model.setData(manifest);
982 model.setStatus(200); 1035 model.setStatus(200);
@@ -1015,9 +1068,12 @@ public class ManifestController extends BasicController { @@ -1015,9 +1068,12 @@ public class ManifestController extends BasicController {
1015 // 生成报文并且发送 1068 // 生成报文并且发送
1016 String rootPath = request.getSession().getServletContext().getRealPath("/"); 1069 String rootPath = request.getSession().getServletContext().getRealPath("/");
1017 String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml"; 1070 String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml";
1018 - String dlcfxml = XmlUtil.convertToXml2(manifestService.sendDeliveryXml(manifest), path);  
1019 - // System.out.println(dlcfxml);  
1020 - new RedisSaveMessage().saveMessage(dlcfxml); 1071 + new XmlBuildTask(manifestService.sendDeliveryXml(manifest), path).perform();
  1072 +
  1073 + // String dlcfxml =
  1074 + // XmlUtil.convertToXml2(manifestService.sendDeliveryXml(manifest), path);
  1075 + // new XmlSendTask(dlcfxml).send();
  1076 +
1021 model.setStatus(200); 1077 model.setStatus(200);
1022 model.setMsg(HttpJsonMsg.SUCCESS); 1078 model.setMsg(HttpJsonMsg.SUCCESS);
1023 } 1079 }
@@ -1071,8 +1127,10 @@ public class ManifestController extends BasicController { @@ -1071,8 +1127,10 @@ public class ManifestController extends BasicController {
1071 preparesecondary.setCarrier(carrier); 1127 preparesecondary.setCarrier(carrier);
1072 preparesecondary.setFlightno(flightno); 1128 preparesecondary.setFlightno(flightno);
1073 1129
1074 -// consigneeService.saveFromPreparesecondary(preparesecondary, Tools.getUserId());  
1075 -// consignorService.saveFromPreparesecondary(preparesecondary, Tools.getUserId()); 1130 + // consigneeService.saveFromPreparesecondary(preparesecondary,
  1131 + // Tools.getUserId());
  1132 + // consignorService.saveFromPreparesecondary(preparesecondary,
  1133 + // Tools.getUserId());
1076 1134
1077 ResponseModel model = new ResponseModel(); 1135 ResponseModel model = new ResponseModel();
1078 try { 1136 try {
@@ -1118,10 +1176,10 @@ public class ManifestController extends BasicController { @@ -1118,10 +1176,10 @@ public class ManifestController extends BasicController {
1118 // path); 1176 // path);
1119 1177
1120 // System.out.println(ndlrxml); 1178 // System.out.println(ndlrxml);
1121 - // new RedisSaveMessage().saveMessage(ndlrxml); 1179 + // new XmlSendTask().saveMessage(ndlrxml);
1122 1180
1123 WaybillReceiptType type = WaybillReceiptType.DELETE; 1181 WaybillReceiptType type = WaybillReceiptType.DELETE;
1124 - preparesecondary.setResponse_text("分单——" + type.getName()); 1182 + preparesecondary.setResponse_text(type.getName());
1125 preparesecondary.setResponse_code(String.valueOf(type.getValue())); 1183 preparesecondary.setResponse_code(String.valueOf(type.getValue()));
1126 preparesecondaryServer.save(preparesecondary); 1184 preparesecondaryServer.save(preparesecondary);
1127 1185
@@ -1153,8 +1211,10 @@ public class ManifestController extends BasicController { @@ -1153,8 +1211,10 @@ public class ManifestController extends BasicController {
1153 preparesecondary.setCarrier(carrier); 1211 preparesecondary.setCarrier(carrier);
1154 preparesecondary.setFlightno(flightno); 1212 preparesecondary.setFlightno(flightno);
1155 1213
1156 -// consigneeService.saveFromPreparesecondary(preparesecondary, Tools.getUserId());  
1157 -// consignorService.saveFromPreparesecondary(preparesecondary, Tools.getUserId()); 1214 + // consigneeService.saveFromPreparesecondary(preparesecondary,
  1215 + // Tools.getUserId());
  1216 + // consignorService.saveFromPreparesecondary(preparesecondary,
  1217 + // Tools.getUserId());
1158 1218
1159 ResponseModel model = new ResponseModel(); 1219 ResponseModel model = new ResponseModel();
1160 try { 1220 try {
@@ -1174,7 +1234,7 @@ public class ManifestController extends BasicController { @@ -1174,7 +1234,7 @@ public class ManifestController extends BasicController {
1174 preparesecondary.setStowagedate(preparesecondary.getStowagedate(stowagedate)); 1234 preparesecondary.setStowagedate(preparesecondary.getStowagedate(stowagedate));
1175 preparesecondary.setIsdelete(1); 1235 preparesecondary.setIsdelete(1);
1176 preparesecondary.setResponse_code(String.valueOf(type.getValue())); 1236 preparesecondary.setResponse_code(String.valueOf(type.getValue()));
1177 - preparesecondary.setResponse_text("分单——" + type.getName()); 1237 + preparesecondary.setResponse_text(type.getName());
1178 preparesecondaryServer.save(preparesecondary); 1238 preparesecondaryServer.save(preparesecondary);
1179 receiptService.saveFromPreparesecondary(preparesecondary, type); 1239 receiptService.saveFromPreparesecondary(preparesecondary, type);
1180 1240
@@ -1183,30 +1243,39 @@ public class ManifestController extends BasicController { @@ -1183,30 +1243,39 @@ public class ManifestController extends BasicController {
1183 String dlcPath = MessageKit.getMessagePath(MessageType.DLCF); 1243 String dlcPath = MessageKit.getMessagePath(MessageType.DLCF);
1184 String fhlPath = MessageKit.getMessagePath(MessageType.FHL); 1244 String fhlPath = MessageKit.getMessagePath(MessageType.FHL);
1185 1245
1186 - String ndlrxml = XmlUtil.convertToXml2(manifestService.presenddlcfNdlrXml(preparesecondary), ndlrPath);  
1187 - String dlcfxml = XmlUtil.convertToXml2(manifestService.presenddlcfdlcfXml(preparesecondary), dlcPath);  
1188 - String fhlfxml = XmlUtil.convertToXml2(FSXmlKit.fhlXml(preparesecondary), fhlPath); 1246 + new XmlBuildTask(manifestService.presenddlcfNdlrXml(preparesecondary), ndlrPath).perform();
  1247 + new XmlBuildTask(manifestService.presenddlcfdlcfXml(preparesecondary), dlcPath).perform();
  1248 + new XmlBuildTask(FSXmlKit.fhlXml(preparesecondary, getAgent()), fhlPath).perform();
  1249 +
  1250 + // String ndlrxml =
  1251 + // XmlUtil.convertToXml2(manifestService.presenddlcfNdlrXml(preparesecondary),
  1252 + // ndlrPath);
  1253 + // String dlcfxml =
  1254 + // XmlUtil.convertToXml2(manifestService.presenddlcfdlcfXml(preparesecondary),
  1255 + // dlcPath);
  1256 + // String fhlfxml = XmlUtil.convertToXml2(FSXmlKit.fhlXml(preparesecondary,
  1257 + // getAgent()), fhlPath);
1189 1258
1190 // RemoteFileKit.putFile(ndlrPath); 1259 // RemoteFileKit.putFile(ndlrPath);
1191 // RemoteFileKit.putFile(dlcPath); 1260 // RemoteFileKit.putFile(dlcPath);
1192 // RemoteFileKit.putFile(fhlPath); 1261 // RemoteFileKit.putFile(fhlPath);
1193 1262
1194 // 发送redis储存数据 1263 // 发送redis储存数据
1195 - new RedisSaveMessage().saveMessage(ndlrxml);  
1196 - new RedisSaveMessage().saveMessage(dlcfxml);  
1197 - new RedisSaveMessage().saveMessage(fhlfxml);  
1198 -  
1199 - System.out.println("===================ndlrxml===================");  
1200 - System.out.println(ndlrxml);  
1201 - System.out.println();  
1202 -  
1203 - System.out.println("===================dlcfxml===================");  
1204 - System.err.println(dlcfxml);  
1205 - System.out.println(); 1264 + // new XmlSendTask(ndlrxml).send();
  1265 + // new XmlSendTask(dlcfxml).send();
  1266 + // new XmlSendTask(fhlfxml).send();
1206 1267
1207 - System.out.println("===================fhlfxml===================");  
1208 - System.err.println(fhlfxml);  
1209 - System.out.println(); 1268 + // System.out.println("===================ndlrxml===================");
  1269 + // System.out.println(ndlrxml);
  1270 + // System.out.println();
  1271 + //
  1272 + // System.out.println("===================dlcfxml===================");
  1273 + // System.err.println(dlcfxml);
  1274 + // System.out.println();
  1275 + //
  1276 + // System.out.println("===================fhlfxml===================");
  1277 + // System.err.println(fhlfxml);
  1278 + // System.out.println();
1210 1279
1211 model.setData(preparesecondary); 1280 model.setData(preparesecondary);
1212 model.setStatus(200); 1281 model.setStatus(200);
@@ -1242,10 +1311,12 @@ public class ManifestController extends BasicController { @@ -1242,10 +1311,12 @@ public class ManifestController extends BasicController {
1242 // 生成报文并且发送 1311 // 生成报文并且发送
1243 String rootPath = request.getSession().getServletContext().getRealPath("/"); 1312 String rootPath = request.getSession().getServletContext().getRealPath("/");
1244 String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml"; 1313 String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml";
1245 - String dlcfxml = XmlUtil.convertToXml2(manifestService.sendPreXml(Preparesecondary), path);  
1246 - // 发送redis储存数据  
1247 - // System.out.println(dlcfxml);  
1248 - new RedisSaveMessage().saveMessage(dlcfxml); 1314 + // String dlcfxml =
  1315 + // XmlUtil.convertToXml2(manifestService.sendPreXml(Preparesecondary), path);
  1316 + // new XmlSendTask(dlcfxml).send();
  1317 +
  1318 + new XmlBuildTask(manifestService.sendPreXml(Preparesecondary), path).perform();
  1319 +
1249 model.setData(Preparesecondary); 1320 model.setData(Preparesecondary);
1250 model.setStatus(200); 1321 model.setStatus(200);
1251 model.setMsg(HttpJsonMsg.SUCCESS); 1322 model.setMsg(HttpJsonMsg.SUCCESS);
@@ -140,14 +140,14 @@ public class ReceiptController { @@ -140,14 +140,14 @@ public class ReceiptController {
140 * @return 140 * @return
141 */ 141 */
142 @RequestMapping(value = "/seeReceipt") 142 @RequestMapping(value = "/seeReceipt")
143 - public String seeReceipt(HttpServletRequest request, String no, boolean isMain) { 143 + public String seeReceipt(HttpServletRequest request, String waybill_no, String sub_waybill_no) {
144 List<WaybillReceiptEntity> dataList = null; 144 List<WaybillReceiptEntity> dataList = null;
145 - if (isMain) { 145 + if (StringUtils.isNotBlank(waybill_no) && StringUtils.isBlank(sub_waybill_no)) {
146 // 查询主单回执 146 // 查询主单回执
147 - dataList = receiptService.findMainList(no);  
148 - } else { 147 + dataList = receiptService.findMainList(waybill_no);
  148 + } else if (StringUtils.isNotBlank(waybill_no) && StringUtils.isNotBlank(sub_waybill_no)) {
149 // 查询分单回执 149 // 查询分单回执
150 - dataList = receiptService.findSubList(no); 150 + dataList = receiptService.findSubList(waybill_no, sub_waybill_no);
151 } 151 }
152 152
153 request.setAttribute("dataList", dataList); 153 request.setAttribute("dataList", dataList);
@@ -12,6 +12,7 @@ public class Constant { @@ -12,6 +12,7 @@ public class Constant {
12 12
13 // 日期格式化 13 // 日期格式化
14 public final static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); 14 public final static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
  15 + public final static SimpleDateFormat dateFormat_ = new SimpleDateFormat("yyyyMMdd");
15 16
16 // 日期格式化 17 // 日期格式化
17 public final static SimpleDateFormat dateFormatYYYYMM = new SimpleDateFormat("yyyyMM"); 18 public final static SimpleDateFormat dateFormatYYYYMM = new SimpleDateFormat("yyyyMM");
@@ -154,4 +154,5 @@ public class BasicAgentEntity extends IdEntity { @@ -154,4 +154,5 @@ public class BasicAgentEntity extends IdEntity {
154 public void setIdCode(String idCode) { 154 public void setIdCode(String idCode) {
155 this.idCode = idCode; 155 this.idCode = idCode;
156 } 156 }
  157 +
157 } 158 }
@@ -375,7 +375,7 @@ public class ManifestEntity extends BasicEntity implements Serializable { @@ -375,7 +375,7 @@ public class ManifestEntity extends BasicEntity implements Serializable {
375 375
376 @Column(name = "DE_NUMBER") 376 @Column(name = "DE_NUMBER")
377 public String getDe_number() { 377 public String getDe_number() {
378 - return de_number; 378 + return getTotalpiece();
379 } 379 }
380 380
381 public void setDe_number(String de_number) { 381 public void setDe_number(String de_number) {
@@ -384,7 +384,7 @@ public class ManifestEntity extends BasicEntity implements Serializable { @@ -384,7 +384,7 @@ public class ManifestEntity extends BasicEntity implements Serializable {
384 384
385 @Column(name = "DE_WEIGHT") 385 @Column(name = "DE_WEIGHT")
386 public String getDe_weight() { 386 public String getDe_weight() {
387 - return de_weight; 387 + return getTotalweight();
388 } 388 }
389 389
390 public void setDe_weight(String de_weight) { 390 public void setDe_weight(String de_weight) {
@@ -393,7 +393,7 @@ public class ManifestEntity extends BasicEntity implements Serializable { @@ -393,7 +393,7 @@ public class ManifestEntity extends BasicEntity implements Serializable {
393 393
394 @Column(name = "DE_CHWEIGHT") 394 @Column(name = "DE_CHWEIGHT")
395 public String getDe_chweight() { 395 public String getDe_chweight() {
396 - return de_chweight; 396 + return getTotalweight();
397 } 397 }
398 398
399 public void setDe_chweight(String de_chweight) { 399 public void setDe_chweight(String de_chweight) {
@@ -537,7 +537,7 @@ public class ManifestEntity extends BasicEntity implements Serializable { @@ -537,7 +537,7 @@ public class ManifestEntity extends BasicEntity implements Serializable {
537 537
538 @Column(name = "PREPARETOTALPIECE") 538 @Column(name = "PREPARETOTALPIECE")
539 public String getPreparetotalpiece() { 539 public String getPreparetotalpiece() {
540 - return StringUtils.isBlank(preparetotalpiece)?getTotalpiece():preparetotalpiece; 540 + return getTotalpiece();
541 } 541 }
542 542
543 public void setPreparetotalpiece(String preparetotalpiece) { 543 public void setPreparetotalpiece(String preparetotalpiece) {
@@ -546,7 +546,7 @@ public class ManifestEntity extends BasicEntity implements Serializable { @@ -546,7 +546,7 @@ public class ManifestEntity extends BasicEntity implements Serializable {
546 546
547 @Column(name = "PREPARETOTALWEIGHT") 547 @Column(name = "PREPARETOTALWEIGHT")
548 public String getPreparetotalweight() { 548 public String getPreparetotalweight() {
549 - return StringUtils.isBlank(preparetotalweight)?getTotalweight():preparetotalweight; 549 + return getTotalweight();
550 } 550 }
551 551
552 public void setPreparetotalweight(String preparetotalweight) { 552 public void setPreparetotalweight(String preparetotalweight) {
@@ -385,7 +385,7 @@ public class PreparesecondaryEntity extends BasicEntity { @@ -385,7 +385,7 @@ public class PreparesecondaryEntity extends BasicEntity {
385 385
386 @Column(name = "DE_NUMBER") 386 @Column(name = "DE_NUMBER")
387 public String getDe_number() { 387 public String getDe_number() {
388 - return de_number; 388 + return getTotalpiece();
389 } 389 }
390 390
391 public void setDe_number(String de_number) { 391 public void setDe_number(String de_number) {
@@ -394,7 +394,7 @@ public class PreparesecondaryEntity extends BasicEntity { @@ -394,7 +394,7 @@ public class PreparesecondaryEntity extends BasicEntity {
394 394
395 @Column(name = "DE_WEIGHT") 395 @Column(name = "DE_WEIGHT")
396 public String getDe_weight() { 396 public String getDe_weight() {
397 - return de_weight; 397 + return getTotalweight();
398 } 398 }
399 399
400 public void setDe_weight(String de_weight) { 400 public void setDe_weight(String de_weight) {
@@ -403,7 +403,7 @@ public class PreparesecondaryEntity extends BasicEntity { @@ -403,7 +403,7 @@ public class PreparesecondaryEntity extends BasicEntity {
403 403
404 @Column(name = "DE_CHWEIGHT") 404 @Column(name = "DE_CHWEIGHT")
405 public String getDe_chweight() { 405 public String getDe_chweight() {
406 - return de_chweight; 406 + return getTotalweight();
407 } 407 }
408 408
409 public void setDe_chweight(String de_chweight) { 409 public void setDe_chweight(String de_chweight) {
@@ -538,7 +538,7 @@ public class PreparesecondaryEntity extends BasicEntity { @@ -538,7 +538,7 @@ public class PreparesecondaryEntity extends BasicEntity {
538 538
539 @Column(name = "PREPAREPIECE") 539 @Column(name = "PREPAREPIECE")
540 public String getPreparepiece() { 540 public String getPreparepiece() {
541 - return StringUtils.isBlank(preparepiece)?getTotalpiece():preparepiece; 541 + return getTotalpiece();
542 } 542 }
543 543
544 public void setPreparepiece(String preparepiece) { 544 public void setPreparepiece(String preparepiece) {
@@ -547,7 +547,7 @@ public class PreparesecondaryEntity extends BasicEntity { @@ -547,7 +547,7 @@ public class PreparesecondaryEntity extends BasicEntity {
547 547
548 @Column(name = "PREPAREWEIGHT") 548 @Column(name = "PREPAREWEIGHT")
549 public String getPrepareweight() { 549 public String getPrepareweight() {
550 - return StringUtils.isBlank(prepareweight)?getTotalweight():prepareweight; 550 + return getTotalweight();
551 } 551 }
552 552
553 public void setPrepareweight(String prepareweight) { 553 public void setPrepareweight(String prepareweight) {
@@ -148,7 +148,7 @@ public class UserEntity extends BasicEntity { @@ -148,7 +148,7 @@ public class UserEntity extends BasicEntity {
148 148
149 @Column(name = "AGENT_ID") 149 @Column(name = "AGENT_ID")
150 public Long getAgent() { 150 public Long getAgent() {
151 - return agent; 151 + return agent == null ? 0l : agent;
152 } 152 }
153 153
154 public void setAgent(Long agent) { 154 public void setAgent(Long agent) {
1 -package com.agent.imf.agent.redis;  
2 -  
3 -import org.apache.commons.lang3.StringUtils;  
4 -  
5 -import redis.clients.jedis.Jedis;  
6 -  
7 -//缓存数据  
8 -public class RedisSaveMessage {  
9 -  
10 - // 创建 缓存服务器的地址ip  
11 - Jedis jedis = new Jedis("10.50.3.71", 6379);  
12 -  
13 - // Jedis jedis = new Jedis("192.168.0.253", 6379);  
14 - public class JEDIS {  
15 -  
16 - }  
17 -  
18 - // 存信息  
19 - public long saveMessage(String str) {  
20 - if (StringUtils.isEmpty(str)) {  
21 - return -1;  
22 - }  
23 - return jedis.lpush("task-queue", str);  
24 - }  
25 -  
26 -}  
27 -// 北环  
28 -//  
@@ -19,10 +19,10 @@ public interface ConsigneeRepository @@ -19,10 +19,10 @@ public interface ConsigneeRepository
19 @Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE ID = ?1 ORDER BY ID DESC", nativeQuery = true) 19 @Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE ID = ?1 ORDER BY ID DESC", nativeQuery = true)
20 public List<ConsigneeEntity> findById(String id); 20 public List<ConsigneeEntity> findById(String id);
21 21
22 - @Query(value = "SELECT * FROM(SELECT rownum rn,c.* from PUB_CONSIGNEE c where c.creator=?1 and c.name LIKE %?2%) cr where cr.rn between ?3 and ?4", nativeQuery = true) 22 + @Query(value = "SELECT * FROM(SELECT rownum rn,c.* from PUB_CONSIGNEE c where c.creator=?1 and c.name LIKE %?2% order by c.id desc) cr where cr.rn between ?3 and ?4", nativeQuery = true)
23 public List<ConsigneeEntity> search(long user_id,String key,int start,int end); 23 public List<ConsigneeEntity> search(long user_id,String key,int start,int end);
24 24
25 - @Query(value = "SELECT * FROM(SELECT rownum rn,c.* from PUB_CONSIGNEE c where c.creator=?1) cr where cr.rn between ?2 and ?3", nativeQuery = true) 25 + @Query(value = "SELECT * FROM(SELECT rownum rn,c.* from PUB_CONSIGNEE c where c.creator=?1 order by c.id desc) cr where cr.rn between ?2 and ?3", nativeQuery = true)
26 public List<ConsigneeEntity> list(long user_id,int start,int end); 26 public List<ConsigneeEntity> list(long user_id,int start,int end);
27 27
28 @Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE CREATOR = ?1 ORDER BY ID DESC", nativeQuery = true) 28 @Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE CREATOR = ?1 ORDER BY ID DESC", nativeQuery = true)
@@ -19,10 +19,10 @@ public interface ConsignorRepository @@ -19,10 +19,10 @@ public interface ConsignorRepository
19 @Query(value = "SELECT * FROM CONSIGNOR WHERE ID = ?1 ORDER BY ID DESC", nativeQuery = true) 19 @Query(value = "SELECT * FROM CONSIGNOR WHERE ID = ?1 ORDER BY ID DESC", nativeQuery = true)
20 public List<ConsignorEntity> findById(String id); 20 public List<ConsignorEntity> findById(String id);
21 21
22 - @Query(value = "SELECT * FROM(SELECT rownum rn,c.* from CONSIGNOR c where c.creator=?1 and c.co_company LIKE %?2%) cr where cr.rn between ?3 and ?4", nativeQuery = true) 22 + @Query(value = "SELECT * FROM(SELECT rownum rn,c.* from CONSIGNOR c where c.creator=?1 and c.co_company LIKE %?2% order by c.id desc) cr where cr.rn between ?3 and ?4", nativeQuery = true)
23 public List<ConsignorEntity> search(long user_id,String key,int start,int end); 23 public List<ConsignorEntity> search(long user_id,String key,int start,int end);
24 24
25 - @Query(value = "SELECT * FROM(SELECT rownum rn,c.* from CONSIGNOR c where c.creator=?1) cr where cr.rn between ?2 and ?3", nativeQuery = true) 25 + @Query(value = "SELECT * FROM(SELECT rownum rn,c.* from CONSIGNOR c where c.creator=?1 order by c.id desc) cr where cr.rn between ?2 and ?3", nativeQuery = true)
26 public List<ConsignorEntity> list(long user_id,int start,int end); 26 public List<ConsignorEntity> list(long user_id,int start,int end);
27 27
28 @Query(value = "SELECT * FROM CONSIGNOR WHERE CREATOR = ?1 ORDER BY ID DESC", nativeQuery = true) 28 @Query(value = "SELECT * FROM CONSIGNOR WHERE CREATOR = ?1 ORDER BY ID DESC", nativeQuery = true)
@@ -16,8 +16,8 @@ public interface WaybillReceiptRepository @@ -16,8 +16,8 @@ public interface WaybillReceiptRepository
16 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE WAYBILL_NO = ?1 AND SUB_WAYBILL_NO = ?2 ORDER BY ID DESC", nativeQuery = true) 16 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE WAYBILL_NO = ?1 AND SUB_WAYBILL_NO = ?2 ORDER BY ID DESC", nativeQuery = true)
17 public List<WaybillReceiptEntity> findByWaybillNoAndSub(String waybill_no, String sub_waybill_no); 17 public List<WaybillReceiptEntity> findByWaybillNoAndSub(String waybill_no, String sub_waybill_no);
18 18
19 - @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE SUB_WAYBILL_NO = ?1 ORDER BY ID DESC", nativeQuery = true)  
20 - public List<WaybillReceiptEntity> findSubList(String sub_waybill_no); 19 + @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE WAYBILL_NO = ?1 AND SUB_WAYBILL_NO = ?2 ORDER BY ID DESC", nativeQuery = true)
  20 + public List<WaybillReceiptEntity> findSubList(String waybill_no,String sub_waybill_no);
21 21
22 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE WAYBILL_NO = ?1 AND SUB_WAYBILL_NO IS NULL ORDER BY ID DESC", nativeQuery = true) 22 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE WAYBILL_NO = ?1 AND SUB_WAYBILL_NO IS NULL ORDER BY ID DESC", nativeQuery = true)
23 public List<WaybillReceiptEntity> findMainList(String waybill_no); 23 public List<WaybillReceiptEntity> findMainList(String waybill_no);
@@ -14,7 +14,6 @@ import org.springframework.transaction.annotation.Transactional; @@ -14,7 +14,6 @@ import org.springframework.transaction.annotation.Transactional;
14 import javax.annotation.Resource; 14 import javax.annotation.Resource;
15 import java.util.List; 15 import java.util.List;
16 16
17 -  
18 @Service 17 @Service
19 public class BasicAgentService extends BasicService<BasicAgentEntity> { 18 public class BasicAgentService extends BasicService<BasicAgentEntity> {
20 19
@@ -24,7 +23,8 @@ public class BasicAgentService extends BasicService<BasicAgentEntity> { @@ -24,7 +23,8 @@ public class BasicAgentService extends BasicService<BasicAgentEntity> {
24 /** 23 /**
25 * 分页查询 24 * 分页查询
26 * 25 *
27 - * @param pageForm 分页对象 26 + * @param pageForm
  27 + * 分页对象
28 * @return 包含分页信息和数据的分页对象 28 * @return 包含分页信息和数据的分页对象
29 */ 29 */
30 public Page<BasicAgentEntity> getPage(EasyPage<BasicAgentEntity> pageForm) { 30 public Page<BasicAgentEntity> getPage(EasyPage<BasicAgentEntity> pageForm) {
@@ -34,11 +34,11 @@ public class BasicAgentService extends BasicService<BasicAgentEntity> { @@ -34,11 +34,11 @@ public class BasicAgentService extends BasicService<BasicAgentEntity> {
34 return page; 34 return page;
35 } 35 }
36 36
37 - public List<BasicAgentEntity> findAll(){ 37 + public List<BasicAgentEntity> findAll() {
38 return agentRepository.findAll(); 38 return agentRepository.findAll();
39 } 39 }
40 40
41 - public BasicAgentEntity findOne(Long id){ 41 + public BasicAgentEntity findOne(Long id) {
42 return agentRepository.findOne(id); 42 return agentRepository.findOne(id);
43 } 43 }
44 44
@@ -50,26 +50,25 @@ public class BasicAgentService extends BasicService<BasicAgentEntity> { @@ -50,26 +50,25 @@ public class BasicAgentService extends BasicService<BasicAgentEntity> {
50 */ 50 */
51 @Transactional 51 @Transactional
52 public BasicAgentEntity save(BasicAgentEntity agent) { 52 public BasicAgentEntity save(BasicAgentEntity agent) {
53 - //System.out.println("contacts:"+agent.getContact()+" NAME_CN:"+agent.getNameCn()+" CODE:"+agent.getCountryCode());  
54 - return agentRepository.save(agent);//agent.getCityCode(), agent.getContact(), agent.getCountryCode(), agent.getNameCn()); 53 + return agentRepository.save(agent);
55 } 54 }
56 55
57 @Transactional 56 @Transactional
58 - public int save2(BasicAgentEntity agent){  
59 - //如果已经存在则直接返回  
60 - List<BasicAgentEntity> a = agentRepository.findWhere(agent.getContact(), agent.getCountryCode(), agent.getNameCn(), agent.getAddress());  
61 - if(a != null && a.size() == 1)  
62 - { 57 + public int save2(BasicAgentEntity agent) {
  58 + // 如果已经存在则直接返回
  59 + List<BasicAgentEntity> a = agentRepository.findWhere(agent.getContact(), agent.getCountryCode(),
  60 + agent.getNameCn(), agent.getAddress());
  61 + if (a != null && a.size() == 1) {
63 return a.get(0).getId().intValue(); 62 return a.get(0).getId().intValue();
64 } 63 }
65 64
66 - int is = agentRepository.save2(agent.getCityCode(), agent.getContact(), agent.getCountryCode(), agent.getNameCn(), agent.getAddress());  
67 - if(is == 1)  
68 - {  
69 - //插入成功!  
70 - a = agentRepository.findWhere(agent.getContact(), agent.getCountryCode(), agent.getNameCn(), agent.getAddress());  
71 - if(a != null && a.size() > 0)  
72 - { 65 + int is = agentRepository.save2(agent.getCityCode(), agent.getContact(), agent.getCountryCode(),
  66 + agent.getNameCn(), agent.getAddress());
  67 + if (is == 1) {
  68 + // 插入成功!
  69 + a = agentRepository.findWhere(agent.getContact(), agent.getCountryCode(), agent.getNameCn(),
  70 + agent.getAddress());
  71 + if (a != null && a.size() > 0) {
73 return a.get(0).getId().intValue(); 72 return a.get(0).getId().intValue();
74 } 73 }
75 System.out.println("null"); 74 System.out.println("null");
@@ -81,7 +80,8 @@ public class BasicAgentService extends BasicService<BasicAgentEntity> { @@ -81,7 +80,8 @@ public class BasicAgentService extends BasicService<BasicAgentEntity> {
81 /** 80 /**
82 * 批量删除 81 * 批量删除
83 * 82 *
84 - * @param ids 1,2,3 83 + * @param ids
  84 + * 1,2,3
85 */ 85 */
86 @Transactional 86 @Transactional
87 public void deleteAll(String ids) { 87 public void deleteAll(String ids) {
@@ -25,6 +25,7 @@ import com.agent.repository.agent.PreparesecondaryRepository; @@ -25,6 +25,7 @@ import com.agent.repository.agent.PreparesecondaryRepository;
25 import com.agent.service.BasicService; 25 import com.agent.service.BasicService;
26 import com.agent.xml.bill.ApplicableLogisticsAllowanceChargeXml; 26 import com.agent.xml.bill.ApplicableLogisticsAllowanceChargeXml;
27 import com.agent.xml.bill.ApplicableTradeCurrencyExchangeXml; 27 import com.agent.xml.bill.ApplicableTradeCurrencyExchangeXml;
  28 +import com.agent.xml.common.ContentXml;
28 import com.agent.xml.common.IDXml; 29 import com.agent.xml.common.IDXml;
29 import com.agent.xml.common.NameXml; 30 import com.agent.xml.common.NameXml;
30 import com.agent.xml.common.XmlHead; 31 import com.agent.xml.common.XmlHead;
@@ -133,13 +134,13 @@ public class ManifestService extends BasicService<ManifestEntity> { @@ -133,13 +134,13 @@ public class ManifestService extends BasicService<ManifestEntity> {
133 Specification<ManifestEntity> spec = buildSpecification(pageForm); 134 Specification<ManifestEntity> spec = buildSpecification(pageForm);
134 135
135 Page<ManifestEntity> page = manifestRepository.findAll(spec, pageRequest); 136 Page<ManifestEntity> page = manifestRepository.findAll(spec, pageRequest);
136 - if(page!=null&&page.getContent()!=null) { 137 + if (page != null && page.getContent() != null) {
137 List<ManifestEntity> list = page.getContent(); 138 List<ManifestEntity> list = page.getContent();
138 for (int i = 0; i < list.size(); i++) { 139 for (int i = 0; i < list.size(); i++) {
139 ManifestEntity bean = list.get(i); 140 ManifestEntity bean = list.get(i);
140 - WaybillReceiptEntity re = receiptService.findByWaybillNo(bean.getWaybillnomaster());  
141 - bean.setResponse_code(re!=null?re.getResponse_code():"");  
142 - bean.setResponse_text(re!=null?re.getResponse_text():""); 141 + WaybillReceiptEntity re = receiptService.findMain(bean.getWaybillnomaster());
  142 + bean.setResponse_code(re != null ? re.getResponse_code() : "");
  143 + bean.setResponse_text(re != null ? re.getResponse_text() : "");
143 } 144 }
144 } 145 }
145 return page; 146 return page;
@@ -877,6 +878,7 @@ public class ManifestService extends BasicService<ManifestEntity> { @@ -877,6 +878,7 @@ public class ManifestService extends BasicService<ManifestEntity> {
877 drp.setName("70678920X"); 878 drp.setName("70678920X");
878 declare.setRepresentativePerson(drp); 879 declare.setRepresentativePerson(drp);
879 880
  881 + if (WaybillReceiptType.DELETE != type) {
880 // 运输工具离境海关代码 882 // 运输工具离境海关代码
881 IDXml decox = new IDXml(); 883 IDXml decox = new IDXml();
882 decox.setId("CGO"); 884 decox.setId("CGO");
@@ -887,12 +889,14 @@ public class ManifestService extends BasicService<ManifestEntity> { @@ -887,12 +889,14 @@ public class ManifestService extends BasicService<ManifestEntity> {
887 IDXml carr = new IDXml(); 889 IDXml carr = new IDXml();
888 carr.setId(isManifest ? me.getCarrier() : pe.getCarrier()); 890 carr.setId(isManifest ? me.getCarrier() : pe.getCarrier());
889 declare.setCarrier(carr); 891 declare.setCarrier(carr);
  892 + }
890 893
891 // 航班号-航班日期 894 // 航班号-航班日期
892 DeclareBorderTransportMeansXml mt = new DeclareBorderTransportMeansXml(); 895 DeclareBorderTransportMeansXml mt = new DeclareBorderTransportMeansXml();
893 - mt.setJourneyID(isManifest ? me.getFlightno()  
894 - : pe.getFlightno() + "/"  
895 - + Constant.dateFormat.format(isManifest ? me.getFlightdate() : pe.getFlightdate())); 896 + String carrier = isManifest ? me.getCarrier() : pe.getCarrier();
  897 + String flightno = isManifest ? me.getFlightno() : pe.getFlightno();
  898 + String dateStr = Constant.dateFormat_.format(isManifest ? me.getFlightdate() : pe.getFlightdate());
  899 + mt.setJourneyID(carrier + flightno + "/" + dateStr);
896 // 运输方式代码 900 // 运输方式代码
897 mt.setTypeCode("4"); 901 mt.setTypeCode("4");
898 declare.setBorderTransportMeans(mt); 902 declare.setBorderTransportMeans(mt);
@@ -902,7 +906,7 @@ public class ManifestService extends BasicService<ManifestEntity> { @@ -902,7 +906,7 @@ public class ManifestService extends BasicService<ManifestEntity> {
902 // 运单号 906 // 运单号
903 DeclareTransportContractDocumentXml mac = new DeclareTransportContractDocumentXml(); 907 DeclareTransportContractDocumentXml mac = new DeclareTransportContractDocumentXml();
904 mac.setId(isManifest ? me.getWaybillnomaster() : pe.getWaybillnomaster()); 908 mac.setId(isManifest ? me.getWaybillnomaster() : pe.getWaybillnomaster());
905 - mac.setChangeReasonCode(changeReasonCode == null ? "9999" : changeReasonCode); 909 + mac.setChangeReasonCode(changeReasonCode == null ? "999" : changeReasonCode);
906 mac.setConditionCode("10");// 暂时固定 910 mac.setConditionCode("10");// 暂时固定
907 consignment.setTransportContractDocument(mac); 911 consignment.setTransportContractDocument(mac);
908 912
@@ -913,6 +917,7 @@ public class ManifestService extends BasicService<ManifestEntity> { @@ -913,6 +917,7 @@ public class ManifestService extends BasicService<ManifestEntity> {
913 consignment.setAssociatedTransportDocument(matx); 917 consignment.setAssociatedTransportDocument(matx);
914 } 918 }
915 919
  920 + if (WaybillReceiptType.DELETE != type) {
916 // 装载日期 921 // 装载日期
917 DeclareLoadingLocationXml ml = new DeclareLoadingLocationXml(); 922 DeclareLoadingLocationXml ml = new DeclareLoadingLocationXml();
918 ml.setId("CGO/4604"); 923 ml.setId("CGO/4604");
@@ -997,9 +1002,16 @@ public class ManifestService extends BasicService<ManifestEntity> { @@ -997,9 +1002,16 @@ public class ManifestService extends BasicService<ManifestEntity> {
997 1002
998 DeclareConsignmentItemXml consignmentitem = new DeclareConsignmentItemXml(); 1003 DeclareConsignmentItemXml consignmentitem = new DeclareConsignmentItemXml();
999 consignment.setConsignmentItem(consignmentitem); 1004 consignment.setConsignmentItem(consignmentitem);
  1005 + }
1000 1006
1001 declare.setConsignment(consignment); 1007 declare.setConsignment(consignment);
1002 1008
  1009 + if (WaybillReceiptType.DELETE == type) {
  1010 + ContentXml additionalInformation = new ContentXml();
  1011 + additionalInformation.setContent("");
  1012 + declare.setAdditionalInformation(additionalInformation);
  1013 + }
  1014 +
1003 body.setDeclaration(declare); 1015 body.setDeclaration(declare);
1004 return body; 1016 return body;
1005 } 1017 }
@@ -35,7 +35,7 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity @@ -35,7 +35,7 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity
35 if(list!=null) { 35 if(list!=null) {
36 for (int i = 0; i < list.size(); i++) { 36 for (int i = 0; i < list.size(); i++) {
37 PreparesecondaryEntity bean = list.get(i); 37 PreparesecondaryEntity bean = list.get(i);
38 - WaybillReceiptEntity re = receiptService.findByWaybillNoAndSub(bean.getWaybillnomaster(), bean.getWaybillnosecondary()); 38 + WaybillReceiptEntity re = receiptService.findSub(bean.getWaybillnomaster(), bean.getWaybillnosecondary());
39 bean.setResponse_code(re!=null?re.getResponse_code():""); 39 bean.setResponse_code(re!=null?re.getResponse_code():"");
40 bean.setResponse_text(re!=null?re.getResponse_text():""); 40 bean.setResponse_text(re!=null?re.getResponse_text():"");
41 } 41 }
@@ -50,7 +50,15 @@ public class WaybillReceiptService extends BasicService<WaybillReceiptEntity> { @@ -50,7 +50,15 @@ public class WaybillReceiptService extends BasicService<WaybillReceiptEntity> {
50 } 50 }
51 } 51 }
52 52
53 - public WaybillReceiptEntity findByWaybillNoAndSub(String waybill_no, String sub_waybill_no) { 53 + public WaybillReceiptEntity findMain(String waybill_no) {
  54 + List<WaybillReceiptEntity> consigns = service.findMainList(waybill_no);
  55 + if (CollectionUtils.isNotEmpty(consigns)) {
  56 + return consigns.get(0);
  57 + }
  58 + return null;
  59 + }
  60 +
  61 + public WaybillReceiptEntity findSub(String waybill_no, String sub_waybill_no) {
54 List<WaybillReceiptEntity> consigns = service.findByWaybillNoAndSub(waybill_no, sub_waybill_no); 62 List<WaybillReceiptEntity> consigns = service.findByWaybillNoAndSub(waybill_no, sub_waybill_no);
55 if (CollectionUtils.isNotEmpty(consigns)) { 63 if (CollectionUtils.isNotEmpty(consigns)) {
56 return consigns.get(0); 64 return consigns.get(0);
@@ -63,19 +71,11 @@ public class WaybillReceiptService extends BasicService<WaybillReceiptEntity> { @@ -63,19 +71,11 @@ public class WaybillReceiptService extends BasicService<WaybillReceiptEntity> {
63 return list; 71 return list;
64 } 72 }
65 73
66 - public List<WaybillReceiptEntity> findSubList(String sub_waybill_no) {  
67 - List<WaybillReceiptEntity> list = service.findSubList(sub_waybill_no); 74 + public List<WaybillReceiptEntity> findSubList(String waybill_no, String sub_waybill_no) {
  75 + List<WaybillReceiptEntity> list = service.findSubList(waybill_no,sub_waybill_no);
68 return list; 76 return list;
69 } 77 }
70 78
71 - public WaybillReceiptEntity findByWaybillNo(String waybill_no) {  
72 - List<WaybillReceiptEntity> consigns = service.findMainList(waybill_no);  
73 - if (CollectionUtils.isNotEmpty(consigns)) {  
74 - return consigns.get(0);  
75 - }  
76 - return null;  
77 - }  
78 -  
79 public void save(WaybillReceiptEntity c) { 79 public void save(WaybillReceiptEntity c) {
80 if (c != null) { 80 if (c != null) {
81 if (c.getCreateDate() == null) { 81 if (c.getCreateDate() == null) {
@@ -115,7 +115,7 @@ public class WaybillReceiptService extends BasicService<WaybillReceiptEntity> { @@ -115,7 +115,7 @@ public class WaybillReceiptService extends BasicService<WaybillReceiptEntity> {
115 wre.setFlightno(manifest.getFlightno()); 115 wre.setFlightno(manifest.getFlightno());
116 wre.setMessage_type("MT2201"); 116 wre.setMessage_type("MT2201");
117 wre.setResponse_code(String.valueOf(type.getValue())); 117 wre.setResponse_code(String.valueOf(type.getValue()));
118 - wre.setResponse_text("主单——" + type.getName()); 118 + wre.setResponse_text(type.getName());
119 wre.setSendtime(Constant.dateTimeFormatnumber.format(new Date())); 119 wre.setSendtime(Constant.dateTimeFormatnumber.format(new Date()));
120 wre.setWaybill_no(manifest.getWaybillnomaster()); 120 wre.setWaybill_no(manifest.getWaybillnomaster());
121 wre.setCreator(Tools.getUserEntity()); 121 wre.setCreator(Tools.getUserEntity());
@@ -153,7 +153,7 @@ public class WaybillReceiptService extends BasicService<WaybillReceiptEntity> { @@ -153,7 +153,7 @@ public class WaybillReceiptService extends BasicService<WaybillReceiptEntity> {
153 wre.setFlightno(prepare.getFlightno()); 153 wre.setFlightno(prepare.getFlightno());
154 wre.setMessage_type("MT2201"); 154 wre.setMessage_type("MT2201");
155 wre.setResponse_code(String.valueOf(type.getValue())); 155 wre.setResponse_code(String.valueOf(type.getValue()));
156 - wre.setResponse_text("分单——" + type.getName()); 156 + wre.setResponse_text(type.getName());
157 wre.setSendtime(Constant.dateTimeFormatnumber.format(new Date())); 157 wre.setSendtime(Constant.dateTimeFormatnumber.format(new Date()));
158 wre.setWaybill_no(prepare.getWaybillnomaster()); 158 wre.setWaybill_no(prepare.getWaybillnomaster());
159 wre.setSub_waybill_no(prepare.getWaybillnosecondary()); 159 wre.setSub_waybill_no(prepare.getWaybillnosecondary());
  1 +package com.agent.xml;
  2 +
  3 +import com.agent.xml.common.XmlUtil;
  4 +
  5 +/**
  6 + * Depiction: 报文缓存并发送任务
  7 + * <p>
  8 + * Modify:
  9 + * <p>
  10 + * Author: William Lynn
  11 + * <p>
  12 + * Create Date:2018年7月16日 下午12:00:13
  13 + *
  14 + */
  15 +public class XmlBuildTask extends Thread {
  16 + private Object obj;
  17 + private String path;
  18 +
  19 + public XmlBuildTask(Object obj, String path) {
  20 + this.obj = obj;
  21 + this.path = path;
  22 + }
  23 +
  24 + @Override
  25 + public void run() {
  26 + String xml = XmlUtil.convertToXml2(obj, path);
  27 + System.err.println();
  28 + System.err.println("===================xml===================");
  29 + System.err.println(xml);
  30 +
  31 + new XmlSendTask(xml).send();
  32 + }
  33 +
  34 + public void perform() {
  35 + this.start();
  36 + }
  37 +}
  1 +package com.agent.xml;
  2 +
  3 +import org.apache.commons.lang3.StringUtils;
  4 +
  5 +import redis.clients.jedis.Jedis;
  6 +
  7 +/**
  8 + *
  9 + * Depiction: 发送报文
  10 + * <p>
  11 + * Modify:
  12 + * <p>
  13 + * Author: William Lynn
  14 + * <p>
  15 + * Create Date:2018年7月16日 下午12:13:37
  16 + *
  17 + */
  18 +class XmlSendTask extends Thread {
  19 + // 创建 缓存服务器的地址ip
  20 + private Jedis jedis = new Jedis("10.50.3.71", 6379);
  21 +
  22 + private String xml;
  23 +
  24 + public XmlSendTask(String xml) {
  25 + this.xml = xml;
  26 + }
  27 +
  28 + @Override
  29 + public void run() {
  30 + long flag = -1;
  31 + if (!StringUtils.isEmpty(xml)) {
  32 + flag = jedis.lpush("task-queue", xml);
  33 + }
  34 +
  35 + System.err.println("redis result -->" + flag);
  36 + }
  37 +
  38 + public void send() {
  39 + this.start();
  40 + }
  41 +
  42 +}
@@ -4,15 +4,12 @@ import java.text.SimpleDateFormat; @@ -4,15 +4,12 @@ import java.text.SimpleDateFormat;
4 import java.util.Date; 4 import java.util.Date;
5 import java.util.Locale; 5 import java.util.Locale;
6 6
7 -import javax.annotation.Resource;  
8 -  
9 import org.apache.commons.lang.StringUtils; 7 import org.apache.commons.lang.StringUtils;
10 8
11 import com.agent.entity.Constant; 9 import com.agent.entity.Constant;
12 import com.agent.entity.agent.BasicAgentEntity; 10 import com.agent.entity.agent.BasicAgentEntity;
13 import com.agent.entity.agent.ManifestEntity; 11 import com.agent.entity.agent.ManifestEntity;
14 import com.agent.entity.agent.PreparesecondaryEntity; 12 import com.agent.entity.agent.PreparesecondaryEntity;
15 -import com.agent.service.agent.BasicAgentService;  
16 import com.agent.xml.fhlsli.common.ApplicableFreightRateServiceCharge; 13 import com.agent.xml.fhlsli.common.ApplicableFreightRateServiceCharge;
17 import com.agent.xml.fhlsli.common.ArrivalEvent; 14 import com.agent.xml.fhlsli.common.ArrivalEvent;
18 import com.agent.xml.fhlsli.common.AssociatedParty; 15 import com.agent.xml.fhlsli.common.AssociatedParty;
@@ -53,8 +50,6 @@ import com.agent.xml.fhlsli.sli.IncludedMasterConsignmentItem; @@ -53,8 +50,6 @@ import com.agent.xml.fhlsli.sli.IncludedMasterConsignmentItem;
53 import com.agent.xml.fhlsli.sli.ReportedStatus; 50 import com.agent.xml.fhlsli.sli.ReportedStatus;
54 import com.agent.xml.fhlsli.sli.SliMasterConsignment; 51 import com.agent.xml.fhlsli.sli.SliMasterConsignment;
55 52
56 -import tools.Tools;  
57 -  
58 /** 53 /**
59 * Depiction:给天信达用 54 * Depiction:给天信达用
60 * <p> 55 * <p>
@@ -67,25 +62,6 @@ import tools.Tools; @@ -67,25 +62,6 @@ import tools.Tools;
67 */ 62 */
68 public class FSXmlKit { 63 public class FSXmlKit {
69 64
70 - @Resource  
71 - private static BasicAgentService agentService;  
72 -  
73 - private static BasicAgentEntity getAgent() {  
74 - BasicAgentEntity agent = agentService.findOne(Tools.getUserId());  
75 - if(agent==null) {  
76 - agent = new BasicAgentEntity();  
77 - }  
78 - if(StringUtils.isBlank(agent.getThreeCode())){  
79 - agent.setThreeCode("");  
80 - }  
81 -  
82 - if(StringUtils.isBlank(agent.getNameCn())){  
83 - agent.setNameCn("");  
84 - }  
85 -  
86 - return agent;  
87 - }  
88 -  
89 private static String getDateWithZone() { 65 private static String getDateWithZone() {
90 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.CHINA); 66 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.CHINA);
91 return sdf.format(new Date()); 67 return sdf.format(new Date());
@@ -96,7 +72,7 @@ public class FSXmlKit { @@ -96,7 +72,7 @@ public class FSXmlKit {
96 * 72 *
97 * @param me 73 * @param me
98 */ 74 */
99 - public static SliCcs sliXml(ManifestEntity me) { 75 + public static SliCcs sliXml(ManifestEntity me,BasicAgentEntity agent) {
100 SliCcs msg = new SliCcs(); 76 SliCcs msg = new SliCcs();
101 77
102 Meta meta = new Meta(); 78 Meta meta = new Meta();
@@ -153,8 +129,8 @@ public class FSXmlKit { @@ -153,8 +129,8 @@ public class FSXmlKit {
153 sliMasterConsignment.setConsigneeParty(consigneeParty); 129 sliMasterConsignment.setConsigneeParty(consigneeParty);
154 130
155 FreightForwarderParty freightForwarderParty = new FreightForwarderParty(); 131 FreightForwarderParty freightForwarderParty = new FreightForwarderParty();
156 -// freightForwarderParty.setPrimaryID(getAgent().getThreeCode());//代理人代码  
157 -// freightForwarderParty.setName(getAgent().getNameEn());//代理人名称 132 + freightForwarderParty.setPrimaryID(agent.getThreeCode());//代理人代码
  133 + freightForwarderParty.setName(agent.getThreeCode());//代理人名称
158 PostalStructuredAddress agentdAddress = new PostalStructuredAddress(); 134 PostalStructuredAddress agentdAddress = new PostalStructuredAddress();
159 agentdAddress.setCityName(""); 135 agentdAddress.setCityName("");
160 agentdAddress.setCountryID(""); 136 agentdAddress.setCountryID("");
@@ -163,8 +139,11 @@ public class FSXmlKit { @@ -163,8 +139,11 @@ public class FSXmlKit {
163 139
164 AssociatedParty associatedParty = new AssociatedParty(); 140 AssociatedParty associatedParty = new AssociatedParty();
165 141
166 - associatedParty.setPrimaryID(getAgent().getThreeCode());//代理人代码  
167 - associatedParty.setName(getAgent().getNameEn());//代理人名称 142 + associatedParty.setPrimaryID(agent.getThreeCode());//代理人代码
  143 + associatedParty.setName(agent.getThreeCode());//代理人名称
  144 + associatedParty.setAccountID("INFOSKY:NULL");
  145 + associatedParty.setRoleCode("AGT");
  146 + associatedParty.setRole("Agent");
168 associatedParty.setPostalStructuredAddress(agentdAddress); 147 associatedParty.setPostalStructuredAddress(agentdAddress);
169 sliMasterConsignment.setAssociatedParty(associatedParty); 148 sliMasterConsignment.setAssociatedParty(associatedParty);
170 149
@@ -277,7 +256,7 @@ public class FSXmlKit { @@ -277,7 +256,7 @@ public class FSXmlKit {
277 * 256 *
278 * @param pe 257 * @param pe
279 */ 258 */
280 - public static FhlCcs fhlXml(PreparesecondaryEntity pe) { 259 + public static FhlCcs fhlXml(PreparesecondaryEntity pe,BasicAgentEntity agent) {
281 FhlCcs msg = new FhlCcs(); 260 FhlCcs msg = new FhlCcs();
282 261
283 Meta meta = new Meta(); 262 Meta meta = new Meta();
@@ -374,8 +353,8 @@ public class FSXmlKit { @@ -374,8 +353,8 @@ public class FSXmlKit {
374 includedHouseConsignment.setConsigneeParty(consigneeParty); 353 includedHouseConsignment.setConsigneeParty(consigneeParty);
375 354
376 FreightForwarderParty freightForwarderParty = new FreightForwarderParty(); 355 FreightForwarderParty freightForwarderParty = new FreightForwarderParty();
377 -// freightForwarderParty.setPrimaryID(getAgent().getThreeCode());//代理人代码  
378 -// freightForwarderParty.setName(getAgent().getNameEn());//代理人名称 356 + freightForwarderParty.setPrimaryID(agent.getThreeCode());//代理人代码
  357 + freightForwarderParty.setName(agent.getThreeCode());//代理人名称
379 358
380 PostalStructuredAddress agentdAddress = new PostalStructuredAddress(); 359 PostalStructuredAddress agentdAddress = new PostalStructuredAddress();
381 agentdAddress.setCityName(""); 360 agentdAddress.setCityName("");
@@ -384,8 +363,11 @@ public class FSXmlKit { @@ -384,8 +363,11 @@ public class FSXmlKit {
384 includedHouseConsignment.setFreightForwarderParty(freightForwarderParty); 363 includedHouseConsignment.setFreightForwarderParty(freightForwarderParty);
385 364
386 AssociatedParty associatedParty = new AssociatedParty(); 365 AssociatedParty associatedParty = new AssociatedParty();
387 - associatedParty.setPrimaryID(getAgent().getThreeCode());//代理人代码  
388 - associatedParty.setName(getAgent().getNameEn());//代理人名称 366 + associatedParty.setPrimaryID(agent.getThreeCode());//代理人代码
  367 + associatedParty.setName(agent.getThreeCode());//代理人名称
  368 + associatedParty.setAccountID("INFOSKY:NULL");
  369 + associatedParty.setRoleCode("AGT");
  370 + associatedParty.setRole("Agent");
389 associatedParty.setPostalStructuredAddress(agentdAddress); 371 associatedParty.setPostalStructuredAddress(agentdAddress);
390 includedHouseConsignment.setAssociatedParty(associatedParty); 372 includedHouseConsignment.setAssociatedParty(associatedParty);
391 373
@@ -27,6 +27,8 @@ public class AssociatedParty { @@ -27,6 +27,8 @@ public class AssociatedParty {
27 @XmlElement(name = "LegalID",required = false) 27 @XmlElement(name = "LegalID",required = false)
28 private String LegalID; 28 private String LegalID;
29 @XmlElement(name = "RoleCode",required = false) 29 @XmlElement(name = "RoleCode",required = false)
  30 + private String AccountID;
  31 + @XmlElement(name = "AccountID",required = false)
30 private String RoleCode; 32 private String RoleCode;
31 @XmlElement(name = "Role",required = false) 33 @XmlElement(name = "Role",required = false)
32 private String Role; 34 private String Role;
@@ -61,6 +63,15 @@ public class AssociatedParty { @@ -61,6 +63,15 @@ public class AssociatedParty {
61 return LegalID; 63 return LegalID;
62 } 64 }
63 65
  66 +
  67 + public String getAccountID() {
  68 + return AccountID;
  69 + }
  70 +
  71 + public void setAccountID(String accountID) {
  72 + AccountID = accountID;
  73 + }
  74 +
64 public void setRoleCode(String RoleCode) { 75 public void setRoleCode(String RoleCode) {
65 this.RoleCode = RoleCode; 76 this.RoleCode = RoleCode;
66 } 77 }
@@ -3,28 +3,25 @@ package com.framework.util; @@ -3,28 +3,25 @@ package com.framework.util;
3 import java.security.MessageDigest; 3 import java.security.MessageDigest;
4 4
5 /** 5 /**
6 - * MD5加密工具类  
7 - * <功能详细描述> 6 + * MD5加密工具类 <功能详细描述>
8 * 7 *
9 * @author chenlujun 8 * @author chenlujun
10 * @version [版本号, 2014年10月1日] 9 * @version [版本号, 2014年10月1日]
11 * @see [相关类/方法] 10 * @see [相关类/方法]
12 * @since [产品/模块版本] 11 * @since [产品/模块版本]
13 */ 12 */
14 -public abstract class MD5Tools  
15 -{ 13 +public abstract class MD5Tools {
16 public final static String MD5(String pwd) { 14 public final static String MD5(String pwd) {
17 - //用于加密的字符  
18 - char md5String[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',  
19 - 'A', 'B', 'C', 'D', 'E', 'F' }; 15 + // 用于加密的字符
  16 + char md5String[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
20 try { 17 try {
21 - //使用平台的默认字符集将此 String 编码为 byte序列,并将结果存储到一个新的 byte数组中 18 + // 使用平台的默认字符集将此 String 编码为 byte序列,并将结果存储到一个新的 byte数组中
22 byte[] btInput = pwd.getBytes(); 19 byte[] btInput = pwd.getBytes();
23 20
24 - //信息摘要是安全的单向哈希函数,它接收任意大小的数据,并输出固定长度的哈希值。 21 + // 信息摘要是安全的单向哈希函数,它接收任意大小的数据,并输出固定长度的哈希值。
25 MessageDigest mdInst = MessageDigest.getInstance("MD5"); 22 MessageDigest mdInst = MessageDigest.getInstance("MD5");
26 23
27 - //MessageDigest对象通过使用 update方法处理数据, 使用指定的byte数组更新摘要 24 + // MessageDigest对象通过使用 update方法处理数据, 使用指定的byte数组更新摘要
28 mdInst.update(btInput); 25 mdInst.update(btInput);
29 26
30 // 摘要更新之后,通过调用digest()执行哈希计算,获得密文 27 // 摘要更新之后,通过调用digest()执行哈希计算,获得密文
@@ -35,12 +32,12 @@ public abstract class MD5Tools @@ -35,12 +32,12 @@ public abstract class MD5Tools
35 char str[] = new char[j * 2]; 32 char str[] = new char[j * 2];
36 int k = 0; 33 int k = 0;
37 for (int i = 0; i < j; i++) { // i = 0 34 for (int i = 0; i < j; i++) { // i = 0
38 - byte byte0 = md[i]; //95 35 + byte byte0 = md[i]; // 95
39 str[k++] = md5String[byte0 >>> 4 & 0xf]; // 5 36 str[k++] = md5String[byte0 >>> 4 & 0xf]; // 5
40 str[k++] = md5String[byte0 & 0xf]; // F 37 str[k++] = md5String[byte0 & 0xf]; // F
41 } 38 }
42 39
43 - //返回经过加密后的字符串 40 + // 返回经过加密后的字符串
44 return new String(str); 41 return new String(str);
45 42
46 } catch (Exception e) { 43 } catch (Exception e) {
@@ -48,7 +45,6 @@ public abstract class MD5Tools @@ -48,7 +45,6 @@ public abstract class MD5Tools
48 } 45 }
49 } 46 }
50 47
51 -  
52 public static void main(String[] args) { 48 public static void main(String[] args) {
53 System.out.println(MD5Tools.MD5("admin")); 49 System.out.println(MD5Tools.MD5("admin"));
54 } 50 }
@@ -128,4 +128,12 @@ public class InfoData { @@ -128,4 +128,12 @@ public class InfoData {
128 this.postcode = postcode; 128 this.postcode = postcode;
129 } 129 }
130 130
  131 + @Override
  132 + public String toString() {
  133 + return "InfoData [contact=" + contact + ", mobile=" + mobile + ", address=" + address + ", tel=" + tel
  134 + + ", company=" + company + ", company_logo=" + company_logo + ", company_info=" + company_info + ", qq="
  135 + + qq + ", bank=" + bank + ", bankno=" + bankno + ", rate=" + rate + ", regposition=" + regposition
  136 + + ", nature=" + nature + ", postcode=" + postcode + "]";
  137 + }
  138 +
131 } 139 }
@@ -19,6 +19,9 @@ public class LoginData { @@ -19,6 +19,9 @@ public class LoginData {
19 this.info = info; 19 this.info = info;
20 } 20 }
21 public InfoData getInfodata() { 21 public InfoData getInfodata() {
  22 + if(infodata==null) {
  23 + infodata = new InfoData();
  24 + }
22 return infodata; 25 return infodata;
23 } 26 }
24 public void setInfodata(InfoData infodata) { 27 public void setInfodata(InfoData infodata) {
@@ -204,7 +204,7 @@ @@ -204,7 +204,7 @@
204 //分单撤销按钮 204 //分单撤销按钮
205 function preoperatorFormat(val, row, index){ 205 function preoperatorFormat(val, row, index){
206 var html = "<a href='javascript:void(0)' onclick='prebackout("+row.id+")' style='text-decoration:none;color:blue;'><spring:message code='opt.backout' /></a>"; 206 var html = "<a href='javascript:void(0)' onclick='prebackout("+row.id+")' style='text-decoration:none;color:blue;'><spring:message code='opt.backout' /></a>";
207 - html+="<a href='javascript:void(0)' onclick='openSubReceipt(\""+row.waybillnosecondary+"\")' style='text-decoration:none;color:blue;margin-left:20px;'><spring:message code='opt.open.receipt'/></a>"; 207 + html+="<a href='javascript:void(0)' onclick='openSubReceipt(\""+row.waybillnomaster+"\",\""+row.waybillnosecondary+"\")' style='text-decoration:none;color:blue;margin-left:20px;'><spring:message code='opt.open.receipt'/></a>";
208 return html; 208 return html;
209 } 209 }
210 210
@@ -255,26 +255,29 @@ @@ -255,26 +255,29 @@
255 } 255 }
256 256
257 //查看分单回执 257 //查看分单回执
258 - function openSubReceipt(subno){ 258 + function openSubReceipt(waybill_no,subno){
  259 + if(typeof(waybill_no) == "undefined")
  260 + return;
259 if(typeof(subno) == "undefined") 261 if(typeof(subno) == "undefined")
260 return; 262 return;
261 - console.log("分单号-->"+subno);  
262 - seeReceipt(subno,false); 263 + seeReceipt(waybill_no,subno,false);
263 } 264 }
264 265
265 //查看主单回执 266 //查看主单回执
266 - function openReceipt(no){  
267 - if(typeof(no) == "undefined") 267 + function openReceipt(waybill_no){
  268 + if(typeof(waybill_no) == "undefined")
268 return; 269 return;
269 - console.log("主单号-->"+no);  
270 - seeReceipt(no,true); 270 + seeReceipt(waybill_no,"",true);
271 } 271 }
272 272
273 - function seeReceipt(no,isMain){ 273 + function seeReceipt(waybill_no,sub_waybill_no,isMain){
274 layui.use('layer', function(){ 274 layui.use('layer', function(){
275 var layer = layui.layer; 275 var layer = layui.layer;
276 var api="<%=basePath%>receipt/seeReceipt"; 276 var api="<%=basePath%>receipt/seeReceipt";
277 - var params = "no="+no+"&isMain="+isMain; 277 + var params = "waybill_no="+waybill_no;
  278 + if(!isMain){
  279 + params+="&sub_waybill_no="+sub_waybill_no;
  280 + }
278 var viewUrl = api+"?"+params; 281 var viewUrl = api+"?"+params;
279 282
280 parent.layer.open({ 283 parent.layer.open({
@@ -135,5 +135,8 @@ @@ -135,5 +135,8 @@
135 <location>/WEB-INF/views/login.jsp</location> 135 <location>/WEB-INF/views/login.jsp</location>
136 </error-page> 136 </error-page>
137 137
  138 + <session-config>
  139 + <session-timeout>120</session-timeout>
  140 + </session-config>
138 141
139 </web-app> 142 </web-app>