作者 申海龙

安检申报添加 修改提示信息

@@ -354,7 +354,8 @@ public class SecurityDeclarationController { @@ -354,7 +354,8 @@ public class SecurityDeclarationController {
354 354
355 355
356 //查询是否存在 356 //查询是否存在
357 - if (securityDeclarationService.findWaybill(waybill) == 0 && manifestService.findWbm(waybill) == null){ 357 + if (securityDeclarationService.findWaybill(waybill) == 0){
  358 + if (manifestService.findWbm(waybill) == null){
358 //货物性质(类型)添加 359 //货物性质(类型)添加
359 for (String type: list){ 360 for (String type: list){
360 SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity(); 361 SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
@@ -437,6 +438,10 @@ public class SecurityDeclarationController { @@ -437,6 +438,10 @@ public class SecurityDeclarationController {
437 438
438 model.setStatus(200); 439 model.setStatus(200);
439 }else { 440 }else {
  441 + model.setStatus(204);
  442 + }
  443 +
  444 + }else {
440 model.setStatus(203); 445 model.setStatus(203);
441 } 446 }
442 447
@@ -744,7 +749,7 @@ public class SecurityDeclarationController { @@ -744,7 +749,7 @@ public class SecurityDeclarationController {
744 String path = resource.getPath(); 749 String path = resource.getPath();
745 String s = path +"../../resource/img/bar_code/"+replace+".png"; 750 String s = path +"../../resource/img/bar_code/"+replace+".png";
746 //生成条形码 751 //生成条形码
747 -// BarCodeUtil.generateFile(replace, s); 752 + BarCodeUtil.generateFile(replace, s);
748 753
749 model.addAttribute("path", replace); 754 model.addAttribute("path", replace);
750 755
@@ -297,6 +297,8 @@ @@ -297,6 +297,8 @@
297 } 297 }
298 else if (data.status == 203){ 298 else if (data.status == 203){
299 alert("安检申报不可以重复添加"); 299 alert("安检申报不可以重复添加");
  300 + }else if(data.status == 204){
  301 + alert("请前往预配界面添加安检申报");
300 } else { 302 } else {
301 layer.open({content:data.msg}); 303 layer.open({content:data.msg});
302 } 304 }
@@ -217,6 +217,7 @@ @@ -217,6 +217,7 @@
217 function prebackout(id){ 217 function prebackout(id){
218 if(typeof(id) == "undefined") 218 if(typeof(id) == "undefined")
219 return; 219 return;
  220 +
220 layer.confirm("确定要撤销吗?", function(flag){ 221 layer.confirm("确定要撤销吗?", function(flag){
221 layer.close(flag); 222 layer.close(flag);
222 $.ajax({ 223 $.ajax({