Authored by qinchao

fix: erp 对接物流,增加mobile属性

@@ -325,7 +325,13 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -325,7 +325,13 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
325 bo.setExpressCompanyId(req.getExpressCompanyId()); 325 bo.setExpressCompanyId(req.getExpressCompanyId());
326 bo.setWayBillCode(req.getWaybillCode()); 326 bo.setWayBillCode(req.getWaybillCode());
327 bo.setDepotNum(req.getDepotNo()); 327 bo.setDepotNum(req.getDepotNo());
328 - LOGGER.info("callAppraise orderCode is {}, startTime is {}", orderCode, DateUtil.getCurrentTimeSecond()); 328 + bo.setMobile(req.getMobile());
  329 +
  330 + if(StringUtils.isBlank(bo.getMobile())){
  331 + throw new ServiceException(400,"错误:物流收货人手机号不能为空!");
  332 + }
  333 +
  334 + LOGGER.info("callAppraise orderCode is {}, AppraiseExpressInfoBo is {}, startTime is {}", orderCode, bo ,DateUtil.getCurrentTimeSecond());
329 335
330 JSONObject jsonObject = serviceCaller.asyncCall(args, bo, JSONObject.class).get(5, TimeUnit.SECONDS); 336 JSONObject jsonObject = serviceCaller.asyncCall(args, bo, JSONObject.class).get(5, TimeUnit.SECONDS);
331 LOGGER.info("callAppraise orderCode is {}, endTime is {}", orderCode, DateUtil.getCurrentTimeSecond()); 337 LOGGER.info("callAppraise orderCode is {}, endTime is {}", orderCode, DateUtil.getCurrentTimeSecond());
@@ -656,6 +656,7 @@ function addRejectPage(id) { @@ -656,6 +656,7 @@ function addRejectPage(id) {
656 function deliverGoods(id){ 656 function deliverGoods(id){
657 var expressCompanyId = $("#expressCompany").myCombobox("getValue"); 657 var expressCompanyId = $("#expressCompany").myCombobox("getValue");
658 var waybillCode = $("#waybillCode").textbox("getValue"); 658 var waybillCode = $("#waybillCode").textbox("getValue");
  659 + var mobile = $("#receiveInfo_mobile").val();
659 if(expressCompanyId==''){ 660 if(expressCompanyId==''){
660 alert("请选择快递公司!"); 661 alert("请选择快递公司!");
661 return; 662 return;
@@ -664,11 +665,16 @@ function deliverGoods(id){ @@ -664,11 +665,16 @@ function deliverGoods(id){
664 alert("请填写快递单号!"); 665 alert("请填写快递单号!");
665 return; 666 return;
666 } 667 }
  668 + if(!mobile){
  669 + alert("收货人手机号为空!");
  670 + return;
  671 + }
667 $.post(contextPath + "/buyerOrder/updateOrderStatus", { 672 $.post(contextPath + "/buyerOrder/updateOrderStatus", {
668 id : id, 673 id : id,
669 status : 4, 674 status : 4,
670 expressCompanyId : expressCompanyId, 675 expressCompanyId : expressCompanyId,
671 waybillCode : waybillCode, 676 waybillCode : waybillCode,
  677 + mobile:mobile,
672 depotNo: $("#depotNo").combobox("getValue") 678 depotNo: $("#depotNo").combobox("getValue")
673 }, function(data) { 679 }, function(data) {
674 if (data.code == 200) { 680 if (data.code == 200) {
@@ -691,6 +697,7 @@ function deliverGoods(id){ @@ -691,6 +697,7 @@ function deliverGoods(id){
691 function reBackGoods(id){ 697 function reBackGoods(id){
692 var expressCompanyId = $("#expressCompany").myCombobox("getValue"); 698 var expressCompanyId = $("#expressCompany").myCombobox("getValue");
693 var waybillCode = $("#waybillCode").textbox("getValue"); 699 var waybillCode = $("#waybillCode").textbox("getValue");
  700 + var mobile = $("#sendBackInfo_mobile").val();
694 if(expressCompanyId==''){ 701 if(expressCompanyId==''){
695 alert("请选择快递公司!"); 702 alert("请选择快递公司!");
696 return; 703 return;
@@ -699,11 +706,16 @@ function reBackGoods(id){ @@ -699,11 +706,16 @@ function reBackGoods(id){
699 alert("请填写快递单号!"); 706 alert("请填写快递单号!");
700 return; 707 return;
701 } 708 }
  709 + if(!mobile){
  710 + alert("收货人手机号为空!");
  711 + return;
  712 + }
702 $.post(contextPath + "/buyerOrder/returnBackOrder", { 713 $.post(contextPath + "/buyerOrder/returnBackOrder", {
703 id : id, 714 id : id,
704 status : 17, 715 status : 17,
705 expressCompanyId : expressCompanyId, 716 expressCompanyId : expressCompanyId,
706 waybillCode : waybillCode, 717 waybillCode : waybillCode,
  718 + mobile:mobile,
707 depotNo: $("#depotNo").combobox("getValue") 719 depotNo: $("#depotNo").combobox("getValue")
708 }, function(data) { 720 }, function(data) {
709 if (data.code == 200) { 721 if (data.code == 200) {
@@ -724,6 +736,7 @@ function reBackGoods(id){ @@ -724,6 +736,7 @@ function reBackGoods(id){
724 function sendBackGoods(id){ 736 function sendBackGoods(id){
725 var expressCompanyId = $("#expressCompany").myCombobox("getValue"); 737 var expressCompanyId = $("#expressCompany").myCombobox("getValue");
726 var waybillCode = $("#waybillCode").textbox("getValue"); 738 var waybillCode = $("#waybillCode").textbox("getValue");
  739 + var mobile = $("#sendBackInfo_mobile").val();
727 if(expressCompanyId==''){ 740 if(expressCompanyId==''){
728 alert("请选择快递公司!"); 741 alert("请选择快递公司!");
729 return; 742 return;
@@ -732,11 +745,16 @@ function sendBackGoods(id){ @@ -732,11 +745,16 @@ function sendBackGoods(id){
732 alert("请填写快递单号!"); 745 alert("请填写快递单号!");
733 return; 746 return;
734 } 747 }
  748 + if(!mobile){
  749 + alert("收货人手机号为空!");
  750 + return;
  751 + }
735 $.post(contextPath + "/buyerOrder/updateOrderStatus", { 752 $.post(contextPath + "/buyerOrder/updateOrderStatus", {
736 id : id, 753 id : id,
737 status : 13, 754 status : 13,
738 expressCompanyId : expressCompanyId, 755 expressCompanyId : expressCompanyId,
739 waybillCode : waybillCode, 756 waybillCode : waybillCode,
  757 + mobile:mobile,
740 depotNo: $("#depotNo").combobox("getValue") 758 depotNo: $("#depotNo").combobox("getValue")
741 }, function(data) { 759 }, function(data) {
742 if (data.code == 200) { 760 if (data.code == 200) {
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 <tr> 12 <tr>
13 <td>买家地址:</td> 13 <td>买家地址:</td>
14 <td colspan="2" > 14 <td colspan="2" >
  15 + <input type="hidden" id="receiveInfo_mobile"/>
15 <span id="receiveInfo"></span> 16 <span id="receiveInfo"></span>
16 </td> 17 </td>
17 </tr> 18 </tr>
@@ -57,6 +58,8 @@ @@ -57,6 +58,8 @@
57 var name = result.data.receiveName; 58 var name = result.data.receiveName;
58 var mobile = result.data.receiveMobile; 59 var mobile = result.data.receiveMobile;
59 var address = result.data.receiveAddress; 60 var address = result.data.receiveAddress;
  61 +
  62 + $("#receiveInfo_mobile").val(mobile);
60 $("#receiveInfo").html("姓名:" + name + "<br>" + "手机号:" + mobile + "<br>" + "地址:" + address + "&nbsp;<button id='addressCopy'>复制</button>"); 63 $("#receiveInfo").html("姓名:" + name + "<br>" + "手机号:" + mobile + "<br>" + "地址:" + address + "&nbsp;<button id='addressCopy'>复制</button>");
61 64
62 new ClipboardJS('#addressCopy', { 65 new ClipboardJS('#addressCopy', {
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 <tr> 12 <tr>
13 <td>商品寄回地址:</td> 13 <td>商品寄回地址:</td>
14 <td colspan="2" > 14 <td colspan="2" >
  15 + <input type="hidden" id="sendBackInfo_mobile">
15 <span id="sendBackInfo"></span> 16 <span id="sendBackInfo"></span>
16 </td> 17 </td>
17 </tr> 18 </tr>
@@ -57,6 +58,8 @@ @@ -57,6 +58,8 @@
57 var name = result.data.receiveName; 58 var name = result.data.receiveName;
58 var mobile = result.data.receiveMobile; 59 var mobile = result.data.receiveMobile;
59 var address = result.data.receiveAddress; 60 var address = result.data.receiveAddress;
  61 +
  62 + $("#sendBackInfo_mobile").val(mobile);
60 $("#sendBackInfo").html("姓名:" + name + "<br>" + "手机号:" + mobile + "<br>" + "地址:" + address + "&nbsp;<button id='rejectAddressCopy'>复制</button>"); 63 $("#sendBackInfo").html("姓名:" + name + "<br>" + "手机号:" + mobile + "<br>" + "地址:" + address + "&nbsp;<button id='rejectAddressCopy'>复制</button>");
61 64
62 new ClipboardJS('#rejectAddressCopy', { 65 new ClipboardJS('#rejectAddressCopy', {