From 1dd21a1d9a5955cbea4b1375f733f6462b2fa586 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 18 Apr 2022 10:23:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bweb/controller/HighOilCardController.java | 4 ++++ .../hai/service/impl/HighCompanyAccountServiceImpl.java | 7 +++++++ .../java/com/hai/service/impl/HighOilCardServiceImpl.java | 2 ++ 3 files changed, 13 insertions(+) diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighOilCardController.java b/hai-bweb/src/main/java/com/bweb/controller/HighOilCardController.java index 8fd855ac..32c17ba4 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighOilCardController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighOilCardController.java @@ -197,6 +197,8 @@ public class HighOilCardController { if (userModel.getSecUser().getAdminFlag() != 1) { param.put("orgId", userModel.getBsOrganization().getId()); + } else { + param.put("orgId", orgId); } param.put("cardNo", cardNo); param.put("contactName", contactName); @@ -241,6 +243,8 @@ public class HighOilCardController { if (userModel.getSecUser().getAdminFlag() != 1) { param.put("orgId", userModel.getBsOrganization().getId()); + } else { + param.put("orgId", orgId); } param.put("cardNo", cardNo); param.put("contactName", contactName); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCompanyAccountServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCompanyAccountServiceImpl.java index 671831e9..d1e64af1 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighCompanyAccountServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighCompanyAccountServiceImpl.java @@ -137,6 +137,11 @@ public class HighCompanyAccountServiceImpl implements HighCompanyAccountService if (sessionModel.getBsCompany() == null || !(sessionModel.getBsCompany().getId().equals(organization.getCompanyId()))) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足"); } + // 查询公司信息 + BsCompany company = companyService.getCompanyById(organization.getCompanyId()); + if (company == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知公司信息"); + } // 是否开通了账户 HighCompanyAccount companyAccount = getAccountByOrgId(organization.getId()); if (companyAccount == null) { @@ -158,7 +163,9 @@ public class HighCompanyAccountServiceImpl implements HighCompanyAccountService record.setAfterAmount(companyAccount.getAmounts()); record.setCompanyAmountId(companyAccount.getId()); record.setCompanyId(organization.getCompanyId()); + record.setCompanyName(organization.getName()); record.setOrgId(organization.getId()); + record.setOrgName(organization.getName()); record.setAmount(amount); record.setBeforeAmount(beforeAmount); record.setAfterAmount(afterAmount); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOilCardServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOilCardServiceImpl.java index f32d3557..d375e4cc 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOilCardServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOilCardServiceImpl.java @@ -9,6 +9,7 @@ import com.hai.common.utils.BankNumberUtil; import com.hai.dao.HighOilCardMapper; import com.hai.entity.*; import com.hai.enum_type.OilCardBindStatusEnum; +import com.hai.enum_type.OilCardRecordSourceTypeEnum; import com.hai.enum_type.OilCardRecordTypeEnum; import com.hai.enum_type.OilCardStatusEnum; import com.hai.model.UserInfoModel; @@ -94,6 +95,7 @@ public class HighOilCardServiceImpl implements HighOilCardService { record.setAmount(price); record.setBeforeAmount(beforeAmount); record.setAfterAmount(afterAmount); + record.setSourceType(OilCardRecordSourceTypeEnum.type1.getType()); record.setSourceContent("充值油卡金额:" + record.getAmount()); oilCardRecordService.insertRecord(record); }