|
@@ -426,7 +426,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public int sendGoods(FsStoreOrder fsStoreOrder) {
|
|
|
|
|
|
+ public int sendGoods(FsStoreOrder fsStoreOrder,String opeName) {
|
|
FsStoreOrder order = fsStoreOrderMapper.selectFsStoreOrderByOrderId(fsStoreOrder.getOrderId());
|
|
FsStoreOrder order = fsStoreOrderMapper.selectFsStoreOrderByOrderId(fsStoreOrder.getOrderId());
|
|
if (order == null) throw new CustomException("订单不存在");
|
|
if (order == null) throw new CustomException("订单不存在");
|
|
if (order.getStatus() != 2) throw new CustomException("非法更改");
|
|
if (order.getStatus() != 2) throw new CustomException("非法更改");
|
|
@@ -445,12 +445,11 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
companyService.subtractCompanyMoney(order);
|
|
companyService.subtractCompanyMoney(order);
|
|
}
|
|
}
|
|
FsStoreOrderLogs Logs = new FsStoreOrderLogs();
|
|
FsStoreOrderLogs Logs = new FsStoreOrderLogs();
|
|
- Logs.setChangeMessage("订单发货");
|
|
|
|
|
|
+ Logs.setChangeMessage(opeName+" 订单发货");
|
|
Logs.setOrderId(fsStoreOrder.getOrderId());
|
|
Logs.setOrderId(fsStoreOrder.getOrderId());
|
|
Logs.setChangeTime(new DateTime());
|
|
Logs.setChangeTime(new DateTime());
|
|
Logs.setChangeType("delivery_goods");
|
|
Logs.setChangeType("delivery_goods");
|
|
fsStoreOrderLogsMapper.insertFsStoreOrderLogs(Logs);
|
|
fsStoreOrderLogsMapper.insertFsStoreOrderLogs(Logs);
|
|
-
|
|
|
|
String lastFourNumber = "";
|
|
String lastFourNumber = "";
|
|
if (order.getDeliveryCode().equals(ShipperCodeEnum.SF.getValue())) {
|
|
if (order.getDeliveryCode().equals(ShipperCodeEnum.SF.getValue())) {
|
|
lastFourNumber = order.getUserPhone();
|
|
lastFourNumber = order.getUserPhone();
|
|
@@ -463,8 +462,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public int getGoods(Long orderId) {
|
|
|
|
-
|
|
|
|
|
|
+ public int getGoods(Long orderId,String opeName) {
|
|
FsStoreOrder order = fsStoreOrderMapper.selectFsStoreOrderByOrderId(orderId);
|
|
FsStoreOrder order = fsStoreOrderMapper.selectFsStoreOrderByOrderId(orderId);
|
|
if (order == null) throw new CustomException("订单不存在");
|
|
if (order == null) throw new CustomException("订单不存在");
|
|
if (order.getStatus() != FsStoreOrderStatusEnum.STATUS_3.getValue()) throw new CustomException("非法更改");
|
|
if (order.getStatus() != FsStoreOrderStatusEnum.STATUS_3.getValue()) throw new CustomException("非法更改");
|
|
@@ -482,7 +480,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
fsUserWatchService.addUserWatch(order);
|
|
fsUserWatchService.addUserWatch(order);
|
|
int i = fsStoreOrderMapper.updateFsStoreOrder(o1);
|
|
int i = fsStoreOrderMapper.updateFsStoreOrder(o1);
|
|
fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.FINISH_ORDER.getValue(),
|
|
fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.FINISH_ORDER.getValue(),
|
|
- FsStoreOrderLogEnum.FINISH_ORDER.getDesc());
|
|
|
|
|
|
+ opeName + " " +FsStoreOrderLogEnum.FINISH_ORDER.getDesc());
|
|
return i;
|
|
return i;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1921,7 +1919,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
this.updateFsStoreOrder(map);
|
|
this.updateFsStoreOrder(map);
|
|
//如果是正常签收,更新订单状态
|
|
//如果是正常签收,更新订单状态
|
|
if (dto.getState().equals("3") && (dto.getStateEx().equals("301") || dto.getStateEx().equals("302") || dto.getStateEx().equals("304") || dto.getStateEx().equals("311"))) {
|
|
if (dto.getState().equals("3") && (dto.getStateEx().equals("301") || dto.getStateEx().equals("302") || dto.getStateEx().equals("304") || dto.getStateEx().equals("311"))) {
|
|
- this.getGoods(order.getOrderId());
|
|
|
|
|
|
+ this.getGoods(order.getOrderId(),"物流签收");
|
|
//app订单签收通知
|
|
//app订单签收通知
|
|
try {
|
|
try {
|
|
uniPush2Service.pushOne(
|
|
uniPush2Service.pushOne(
|
|
@@ -2050,7 +2048,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
Map<String, Object> config = (Map<String, Object>) JSON.parse(sysConfig.getConfigValue());
|
|
Map<String, Object> config = (Map<String, Object>) JSON.parse(sysConfig.getConfigValue());
|
|
Object isUpdateOrder = config.get("isUpdateOrder");
|
|
Object isUpdateOrder = config.get("isUpdateOrder");
|
|
if (isUpdateOrder == null || "1".equals(isUpdateOrder.toString())) {
|
|
if (isUpdateOrder == null || "1".equals(isUpdateOrder.toString())) {
|
|
- this.getGoods(order.getOrderId());
|
|
|
|
|
|
+ this.getGoods(order.getOrderId(),"物流签收");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return R.ok();
|
|
return R.ok();
|
|
@@ -3445,7 +3443,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
Map<String, Object> config = (Map<String, Object>) JSON.parse(sysConfig.getConfigValue());
|
|
Map<String, Object> config = (Map<String, Object>) JSON.parse(sysConfig.getConfigValue());
|
|
Object isUpdateOrder = config.get("isUpdateOrder");
|
|
Object isUpdateOrder = config.get("isUpdateOrder");
|
|
if (isUpdateOrder == null || "1".equals(isUpdateOrder.toString())) {
|
|
if (isUpdateOrder == null || "1".equals(isUpdateOrder.toString())) {
|
|
- this.getGoods(order.getOrderId());
|
|
|
|
|
|
+ this.getGoods(order.getOrderId(),"物流签收");
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -3541,6 +3539,10 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
if (fsStoreOrders != null && !fsStoreOrders.isEmpty()) {
|
|
if (fsStoreOrders != null && !fsStoreOrders.isEmpty()) {
|
|
fsStoreOrders.forEach(order -> {
|
|
fsStoreOrders.forEach(order -> {
|
|
FsStoreOrderSalesParam afterSalesParam = new FsStoreOrderSalesParam();
|
|
FsStoreOrderSalesParam afterSalesParam = new FsStoreOrderSalesParam();
|
|
|
|
+ //修改订单状态 方便后续重新发货
|
|
|
|
+ order.setStatus(FsStoreOrderStatusEnum.STATUS_2.getValue());
|
|
|
|
+ order.setExtendOrderId("");
|
|
|
|
+ fsStoreOrderMapper.updateFsStoreOrder(order);
|
|
afterSalesParam.setOrderId(order.getOrderId());
|
|
afterSalesParam.setOrderId(order.getOrderId());
|
|
afterSalesParam.setReasons("代服管家取消订单");
|
|
afterSalesParam.setReasons("代服管家取消订单");
|
|
afterSalesParam.setOperator("代服管家");
|
|
afterSalesParam.setOperator("代服管家");
|
|
@@ -3550,6 +3552,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
df.setStatus(2);
|
|
df.setStatus(2);
|
|
df.setUpdateTime(new Date());
|
|
df.setUpdateTime(new Date());
|
|
fsStoreOrderDfMapper.updateFsStoreOrderDf(df);
|
|
fsStoreOrderDfMapper.updateFsStoreOrderDf(df);
|
|
|
|
+ fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.REFUND_ORDER_DF.getValue(),
|
|
|
|
+ FsStoreOrderLogEnum.REFUND_ORDER_DF.getDesc());
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|