|
@@ -227,17 +227,17 @@ public class DeliveryAction implements IMINAction{
|
|
|
.getSystemProperties().get(user.getChannel() +"_TO_MACHINE_PASSWORD_KEY").getKey();
|
|
|
//数据加密
|
|
|
String desDe = Base64.encode(DesUtils.getInstance().encrypt(Base64.encode(str).getBytes(),passwardKey.getBytes(),null));
|
|
|
-
|
|
|
- new Thread() {
|
|
|
- public void run() {
|
|
|
- HttpPostUtil.sendPostFormachine(sendUrl, desDe);
|
|
|
- }
|
|
|
- }.start();
|
|
|
-
|
|
|
+
|
|
|
+// new Thread() {
|
|
|
+// public void run() {
|
|
|
+// HttpPostUtil.sendPostFormachine(sendUrl, desDe);
|
|
|
+// }
|
|
|
+// }.start();
|
|
|
+
|
|
|
// //获取转义后响应信息
|
|
|
// JSONObject detail = JSONObject.fromObject(results);
|
|
|
// String code = String.valueOf(detail.get("code"));
|
|
|
-//
|
|
|
+//
|
|
|
// if(!"0".equals(code)){
|
|
|
// Log.info("售货机退货失败:".concat(code));
|
|
|
// //改变提货状态为3卡货(提货失败)....
|
|
@@ -248,11 +248,11 @@ public class DeliveryAction implements IMINAction{
|
|
|
// .updateByPrimaryKeySelective(delInf);
|
|
|
// throw new BusinessCodeException("JINM0011");//操作失败!
|
|
|
// }
|
|
|
-//
|
|
|
+//
|
|
|
// //获取处理状态
|
|
|
// String state = String.valueOf(detail.get("returnData"));
|
|
|
// JSONObject stateNew = JSONObject.fromObject(state);
|
|
|
-// if(stateNew != null
|
|
|
+// if(stateNew != null
|
|
|
// && !"200".equals(String.valueOf(stateNew.get("code")))){
|
|
|
// Log.info("售货机退货卡货:".concat(CommonUtil.objToString(stateNew.get("msg"))));
|
|
|
// //改变提货状态为3卡货....
|
|
@@ -264,7 +264,47 @@ public class DeliveryAction implements IMINAction{
|
|
|
// String msg = String.valueOf(stateNew.get("msg"));
|
|
|
// throw new MINBusinessException(msg);//操作失败!
|
|
|
// }
|
|
|
-
|
|
|
+
|
|
|
+ String results = HttpPostUtil.sendPostFormachine(sendUrl, desDe);
|
|
|
+ // //获取转义后响应信息
|
|
|
+ JSONObject detail = JSONObject.fromObject(results);
|
|
|
+ String code = String.valueOf(detail.get("code"));
|
|
|
+
|
|
|
+ if(!"0".equals(code)){
|
|
|
+ Log.info("售货机退货失败:".concat(code));
|
|
|
+ //改变提货状态为3卡货(提货失败)....
|
|
|
+ delInf.setStatus("3");
|
|
|
+ //处理提货状态
|
|
|
+ Service.lookup(IMINDataBaseService.class)
|
|
|
+ .getMybatisMapper(VmDeliveryInfMapper.class)
|
|
|
+ .updateByPrimaryKeySelective(delInf);
|
|
|
+ throw new BusinessCodeException("JINM0011");//操作失败!
|
|
|
+ }
|
|
|
+
|
|
|
+ //获取处理状态
|
|
|
+ String state = String.valueOf(detail.get("returnData"));
|
|
|
+ JSONObject stateNew = JSONObject.fromObject(state);
|
|
|
+ if(stateNew != null
|
|
|
+ && !"200".equals(String.valueOf(stateNew.get("code")))){
|
|
|
+ Log.info("售货机退货卡货:".concat(CommonUtil.objToString(stateNew.get("msg"))));
|
|
|
+ //改变提货状态为3卡货....
|
|
|
+ delInf.setStatus("3");
|
|
|
+ //处理提货状态
|
|
|
+ Service.lookup(IMINDataBaseService.class)
|
|
|
+ .getMybatisMapper(VmDeliveryInfMapper.class)
|
|
|
+ .updateByPrimaryKeySelective(delInf);
|
|
|
+ String msg = String.valueOf(stateNew.get("msg"));
|
|
|
+ throw new MINBusinessException(msg);//操作失败!
|
|
|
+ }else if("200".equals(String.valueOf(stateNew.get("code")))){
|
|
|
+ //改变提货状态为2成功....
|
|
|
+ delInf.setStatus("2");
|
|
|
+ //处理提货状态
|
|
|
+ Service.lookup(IMINDataBaseService.class)
|
|
|
+ .getMybatisMapper(VmDeliveryInfMapper.class)
|
|
|
+ .updateByPrimaryKeySelective(delInf);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return res;
|
|
|
}
|
|
|
|
|
@@ -277,7 +317,7 @@ public class DeliveryAction implements IMINAction{
|
|
|
* @param failReason
|
|
|
* @throws MINBusinessException
|
|
|
*/
|
|
|
- @MINAction(value = BACK_DELIVERY_FOR_MACHINE)
|
|
|
+ @MINAction(value = BACK_DELIVERY_FOR_MACHINE,session = false)
|
|
|
public void backDeliveryForMachine(HttpServletResponse response,
|
|
|
String deliveryNo,
|
|
|
String outNums,
|