|
@@ -141,8 +141,10 @@ public class DeliveryAction implements IMINAction{
|
|
|
//获取售货机推送地址
|
|
|
String url = Service.lookup(IPropertiesService.class)
|
|
|
.getSystemProperties().get(user.getChannel() + "_GET_MACHINE_ADDRESS").getKey();
|
|
|
+ url = "http://127.0.0.1:9999/machine";
|
|
|
String retUrl = Service.lookup(IPropertiesService.class)
|
|
|
.getSystemProperties().get(user.getChannel() + "_RETURN_MACHINE_ADDRESS").getKey();
|
|
|
+ retUrl = "http://127.0.0.1:9998/services";
|
|
|
//组装推送接口
|
|
|
String sendUrl = url.concat("/VendingMachineAction/pushGoods").concat("?MINView=JSON");
|
|
|
String returnUrl = retUrl.concat("/DeliveryAction/backDeliveryForMachine");
|
|
@@ -279,6 +281,13 @@ public class DeliveryAction implements IMINAction{
|
|
|
throw new BusinessCodeException("JINM0011");//操作失败!
|
|
|
}
|
|
|
|
|
|
+ //改变提货状态为2成功....
|
|
|
+ delInf.setStatus("5");
|
|
|
+ //处理提货状态
|
|
|
+ Service.lookup(IMINDataBaseService.class)
|
|
|
+ .getMybatisMapper(VmDeliveryInfMapper.class)
|
|
|
+ .updateByPrimaryKeySelective(delInf);
|
|
|
+
|
|
|
//获取处理状态
|
|
|
String state = String.valueOf(detail.get("returnData"));
|
|
|
JSONObject stateNew = JSONObject.fromObject(state);
|
|
@@ -294,48 +303,7 @@ public class DeliveryAction implements IMINAction{
|
|
|
String msg = String.valueOf(stateNew.get("msg"));
|
|
|
throw new MINBusinessException(msg);//操作失败!
|
|
|
}else if("200".equals(String.valueOf(stateNew.get("code")))){
|
|
|
- //改变提货状态为2成功....
|
|
|
- delInf.setStatus("5");
|
|
|
- //处理提货状态
|
|
|
- Service.lookup(IMINDataBaseService.class)
|
|
|
- .getMybatisMapper(VmDeliveryInfMapper.class)
|
|
|
- .updateByPrimaryKeySelective(delInf);
|
|
|
-
|
|
|
-
|
|
|
- //修改货道商品数量
|
|
|
- String proEquRelId = delInf.getProEquRelId();
|
|
|
- VmProEquRel vmProEquRel = Service.lookup(IMINDataBaseService.class)
|
|
|
- .getMybatisMapper(VmProEquRelMapper.class)
|
|
|
- .selectByPrimaryKey(proEquRelId);
|
|
|
- String nums = vmProEquRel.getProductNums();
|
|
|
- nums = CommonUtil.add(nums,delInf.getDeliveryNums());
|
|
|
- vmProEquRel.setProductNums(nums);
|
|
|
- Service.lookup(IMINDataBaseService.class)
|
|
|
- .getMybatisMapper(VmProEquRelMapper.class)
|
|
|
- .updateByPrimaryKeySelective(vmProEquRel);
|
|
|
-
|
|
|
- VmOrderDetails vmOrderDetails = new VmOrderDetails();
|
|
|
- vmOrderDetails.setDetailsId(delInf.getOrdDetId());
|
|
|
- vmOrderDetails.setIsDelivery("03");
|
|
|
- Service.lookup(IMINDataBaseService.class)
|
|
|
- .getMybatisMapper(VmOrderDetailsMapper.class)
|
|
|
- .updateByPrimaryKeySelective(vmOrderDetails);
|
|
|
|
|
|
- //查询订单是否都提货
|
|
|
- VmOrderDetailsExample vmOrderDetailsExample = new VmOrderDetailsExample();
|
|
|
- vmOrderDetailsExample.createCriteria().andOrderIdEqualTo(orderNo).andDeliveryIdIsNotNull().andIsDeliveryEqualTo("00");
|
|
|
- List<VmOrderDetails> vmOrderDetailsList = Service.lookup(IMINDataBaseService.class)
|
|
|
- .getMybatisMapper(VmOrderDetailsMapper.class)
|
|
|
- .selectByExample(vmOrderDetailsExample);
|
|
|
- if(vmOrderDetailsList.size() == 0){
|
|
|
- VmOrderInf vmOrderInf = new VmOrderInf();
|
|
|
- vmOrderInf.setId(orderNo);
|
|
|
- vmOrderInf.setPickupStt("03");
|
|
|
- Service.lookup(IMINDataBaseService.class)
|
|
|
- .getMybatisMapper(VmOrderInfMapper.class)
|
|
|
- .updateByPrimaryKeySelective(vmOrderInf);
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
}
|
|
|
return res;
|