提交代码

dev-discount
胡锐 3 years ago
parent 3339f4d680
commit 1dd21a1d9a
  1. 4
      hai-bweb/src/main/java/com/bweb/controller/HighOilCardController.java
  2. 7
      hai-service/src/main/java/com/hai/service/impl/HighCompanyAccountServiceImpl.java
  3. 2
      hai-service/src/main/java/com/hai/service/impl/HighOilCardServiceImpl.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);

@ -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);

@ -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);
}

Loading…
Cancel
Save