|
@@ -49,6 +49,7 @@ import com.fs.hisStore.domain.FsStoreOrderScrm;
|
|
|
import com.fs.hisStore.domain.FsStorePaymentScrm;
|
|
|
import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
|
|
|
import com.fs.hisStore.mapper.FsStorePaymentScrmMapper;
|
|
|
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
|
|
|
import com.fs.hisapi.domain.ApiResponse;
|
|
|
import com.fs.hisapi.param.CreateOrderParam;
|
|
|
import com.fs.hisapi.param.RecipeDetailParam;
|
|
@@ -1910,7 +1911,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
//写入日志
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ IFsStoreOrderScrmService orderService;
|
|
|
@Override
|
|
|
public ExpressResultDTO updateDeliveryItem(ExpressNotifyDTO notifyDTO) {
|
|
|
String data = URLDecoder.decode(notifyDTO.getRequestData(), Charset.forName("UTF-8"));
|
|
@@ -1994,6 +1996,27 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ List<FsStoreOrderScrm> orders2 = orderService.selectFsStoreOrderListByDeliveryId(dto.getLogisticCode());
|
|
|
+ if (orders != null) {
|
|
|
+ for (FsStoreOrderScrm order : orders2) {
|
|
|
+ logger.info("订单信息:" + JSONUtil.toJsonStr(order));
|
|
|
+ logger.info("运单号:" + dto.getLogisticCode());
|
|
|
+ if (order != null && order.getDeliveryStatus() != 3) {
|
|
|
+ FsStoreOrderScrm map = new FsStoreOrderScrm();
|
|
|
+ map.setDeliveryStatus(Integer.parseInt(dto.getState()));
|
|
|
+ map.setId(order.getId());
|
|
|
+ map.setDeliveryType(dto.getStateEx());
|
|
|
+ orderService.updateFsStoreOrder(map);
|
|
|
+ //如果是正常签收,更新订单状态
|
|
|
+ if (dto.getState().equals("3") && (dto.getStateEx().equals("301") || dto.getStateEx().equals("302") || dto.getStateEx().equals("304") || dto.getStateEx().equals("311"))) {
|
|
|
+ orderService.finishOrder(order.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
return ExpressResultDTO.success(sysConfig.getKdnId().trim());
|
|
|
}
|