|
|
@@ -19,7 +19,7 @@ import com.github.microservice.types.payment.ChargeableType;
|
|
|
import com.github.microservice.types.payment.PaymentDeviceType;
|
|
|
import com.github.microservice.types.payment.PaymentType;
|
|
|
import com.zhongshu.card.client.model.base.SuperSearch;
|
|
|
-import com.zhongshu.card.client.model.org.OrganizationSimpleModel;
|
|
|
+import com.zhongshu.card.client.model.org.OrganizationMiniModel;
|
|
|
import com.zhongshu.card.client.model.org.UserJoinBusOrgModel;
|
|
|
import com.zhongshu.card.client.model.payment.*;
|
|
|
import com.zhongshu.card.client.model.payment.statistic.BusinessMainStatisticModel;
|
|
|
@@ -50,6 +50,7 @@ import com.zhongshu.card.server.core.service.base.SuperService;
|
|
|
import com.zhongshu.card.server.core.service.devices.DeviceInfoServiceImpl;
|
|
|
import com.zhongshu.card.server.core.service.devices.permiss.DevicePermissVerifyService;
|
|
|
import com.zhongshu.card.server.core.service.org.OrganizationServiceImpl;
|
|
|
+import com.zhongshu.card.server.core.service.orgManager.OrganizationManagerServiceImpl;
|
|
|
import com.zhongshu.card.server.core.service.paySetting.ProjectPaySettingServiceImpl;
|
|
|
import com.zhongshu.card.server.core.service.school.AreaServiceImpl;
|
|
|
import com.zhongshu.card.server.core.util.*;
|
|
|
@@ -116,6 +117,9 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
@Autowired
|
|
|
private DeviceInfoServiceImpl deviceInfoService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private OrganizationManagerServiceImpl organizationManagerService;
|
|
|
+
|
|
|
/**
|
|
|
* 创建流水
|
|
|
*
|
|
|
@@ -284,8 +288,10 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
entity.setVerifyError(String.format("设备未绑定机构"));
|
|
|
return;
|
|
|
}
|
|
|
+ Organization organization = deviceInfoService.getDeviceReceiveOrganization(deviceInfo);
|
|
|
// 设备所属的商户/机构
|
|
|
- entity.setShopOid(deviceInfo.getBeLongOid());
|
|
|
+ entity.setShopOid(organization.getOid());
|
|
|
+ entity.setOid(organization.getOid());
|
|
|
// 设备区域
|
|
|
entity.setArea(areaService.toSimpleModel(deviceInfo.getArea()));
|
|
|
// 填充项目信息
|
|
|
@@ -838,6 +844,12 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
return ResultContent.buildSuccess(model);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 支付订单的详情(简要)转换
|
|
|
+ *
|
|
|
+ * @param entity
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public ExpenseFlowPayShowModel toPayShowModel(ExpenseFlow entity) {
|
|
|
ExpenseFlowPayShowModel model = new ExpenseFlowPayShowModel();
|
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|
|
|
@@ -849,10 +861,8 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
}
|
|
|
|
|
|
// 收款机构信息
|
|
|
- ResultContent<OrganizationSimpleModel> orgContent = organizationService.getDetail(entity.getShopOid());
|
|
|
- if (orgContent.isSuccess()) {
|
|
|
- model.setShopInfo(orgContent.getContent());
|
|
|
- }
|
|
|
+ OrganizationMiniModel organizationMiniModel = organizationManagerService.toMiniModel(organizationService.getOrgByOid(entity.getShopOid()));
|
|
|
+ model.setShopInfo(organizationMiniModel);
|
|
|
|
|
|
// 判断是否可以支付
|
|
|
OrderPayModel payModel = isCanPay(entity);
|