|
@@ -1412,7 +1412,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
if (storePayment != null) {
|
|
if (storePayment != null) {
|
|
if (storePayment.getStatus().equals(0)) {
|
|
if (storePayment.getStatus().equals(0)) {
|
|
log.info(payCode + "待支付");
|
|
log.info(payCode + "待支付");
|
|
- FsStorePaymentScrm paymentMap = new FsStorePaymentScrm();
|
|
|
|
|
|
+ FsStorePayment paymentMap = new FsStorePayment();
|
|
paymentMap.setPaymentId(storePayment.getPaymentId());
|
|
paymentMap.setPaymentId(storePayment.getPaymentId());
|
|
paymentMap.setStatus(1);
|
|
paymentMap.setStatus(1);
|
|
paymentMap.setPayTime(new Date());
|
|
paymentMap.setPayTime(new Date());
|
|
@@ -1429,7 +1429,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
paymentMap.setBankSerialNo(orderResult.getBankOrderId());
|
|
paymentMap.setBankSerialNo(orderResult.getBankOrderId());
|
|
paymentMap.setBankTransactionId(orderResult.getBankTrxId());
|
|
paymentMap.setBankTransactionId(orderResult.getBankTrxId());
|
|
}
|
|
}
|
|
- fsStorePaymentScrmMapper.updateFsStorePayment(paymentMap);
|
|
|
|
|
|
+ fsStorePaymentMapper.updateFsStorePayment(paymentMap);
|
|
log.info(payCode + "已支付");
|
|
log.info(payCode + "已支付");
|
|
order = fsStoreOrderScrmMapper.selectFsStoreOrderById(Long.parseLong(storePayment.getBusinessOrderId()));
|
|
order = fsStoreOrderScrmMapper.selectFsStoreOrderById(Long.parseLong(storePayment.getBusinessOrderId()));
|
|
}
|
|
}
|
|
@@ -1440,19 +1440,12 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
} else if (type.equals(2)) {
|
|
} else if (type.equals(2)) {
|
|
order = fsStoreOrderScrmMapper.selectFsStoreOrderByOrderCode(orderCode);
|
|
order = fsStoreOrderScrmMapper.selectFsStoreOrderByOrderCode(orderCode);
|
|
}
|
|
}
|
|
-// if (order != null && !order.getStatus().equals(FsStoreOrderStatusEnum.STATUS_1.getValue())) {
|
|
|
|
-// log.info(payCode + "订单号不为待支付回退");
|
|
|
|
-// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
-// return R.error();
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
- //orderScrm迁移的表待支付状态码为:0
|
|
|
|
- if (order != null && !order.getStatus().equals(0)) {//判断订单状态是否待支付
|
|
|
|
|
|
+ if (order != null && !order.getStatus().equals(FsStoreOrderStatusEnum.STATUS_1.getValue())) {
|
|
log.info(payCode + "订单号不为待支付回退");
|
|
log.info(payCode + "订单号不为待支付回退");
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
return R.error();
|
|
return R.error();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ FsStoreOrder order1=new FsStoreOrder();
|
|
if (order != null && !order.getPaid().equals(0)) {
|
|
if (order != null && !order.getPaid().equals(0)) {
|
|
log.info(payCode + "订单号支付不为待支付回退");
|
|
log.info(payCode + "订单号支付不为待支付回退");
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
@@ -1463,8 +1456,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
FsStoreOrderScrm storeOrder = new FsStoreOrderScrm();
|
|
FsStoreOrderScrm storeOrder = new FsStoreOrderScrm();
|
|
storeOrder.setId(order.getId());
|
|
storeOrder.setId(order.getId());
|
|
storeOrder.setPaid(1);
|
|
storeOrder.setPaid(1);
|
|
-// storeOrder.setStatus(2);
|
|
|
|
- storeOrder.setStatus(1);//代发货
|
|
|
|
|
|
+ storeOrder.setStatus(2);
|
|
storeOrder.setPrescribePrice(order.getTotalPrice());
|
|
storeOrder.setPrescribePrice(order.getTotalPrice());
|
|
SysConfig sysConfig = sysConfigMapper.selectConfigByConfigKey("his.store");
|
|
SysConfig sysConfig = sysConfigMapper.selectConfigByConfigKey("his.store");
|
|
Map<String, Object> config = (Map<String, Object>) JSON.parse(sysConfig.getConfigValue());
|
|
Map<String, Object> config = (Map<String, Object>) JSON.parse(sysConfig.getConfigValue());
|
|
@@ -1477,7 +1469,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
} else {
|
|
} else {
|
|
storeOrder.setFollowDoctorId(iFsDoctorService.selectFollowDoctorDoctorByPackage());
|
|
storeOrder.setFollowDoctorId(iFsDoctorService.selectFollowDoctorDoctorByPackage());
|
|
}
|
|
}
|
|
- if (order.getCycle() != null && order.getCycle() >= followRate) {
|
|
|
|
|
|
+ if (order.getCycle() >= followRate) {
|
|
Calendar calendar = Calendar.getInstance();
|
|
Calendar calendar = Calendar.getInstance();
|
|
calendar.setTime(new Date());
|
|
calendar.setTime(new Date());
|
|
calendar.add(Calendar.DAY_OF_MONTH, followRate);
|
|
calendar.add(Calendar.DAY_OF_MONTH, followRate);
|