...
|
...
|
@@ -2012,7 +2012,7 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc |
|
|
createExchangeCashPersonCommand.PersonName,
|
|
|
createExchangeCashPersonCommand.PersonAccount,
|
|
|
createExchangeCashPersonCommand.ExchangedSuMoney,
|
|
|
"当前兑换素币超过本人持有的素币值",
|
|
|
"内部业务错误" + err.Error(),
|
|
|
}
|
|
|
failureDataList = append(failureDataList, row)
|
|
|
continue
|
...
|
...
|
@@ -2243,7 +2243,6 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC |
|
|
getEmployee := map[string]interface{}{
|
|
|
"uid": createExchangeCashPersonCommand.Uid,
|
|
|
"companyId": activityFound.CompanyId,
|
|
|
"status": 1,
|
|
|
}
|
|
|
|
|
|
// 判断当前员工是否有效
|
...
|
...
|
@@ -2351,11 +2350,16 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC |
|
|
cashPoolFoundExchangedCash := cashPoolsFound[0].ExchangedCash
|
|
|
|
|
|
// 判断是否超过平台未兑换现金
|
|
|
if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
|
|
|
if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
|
|
|
//if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
|
|
|
// if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
|
|
|
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "已超过投入现金池的未兑换现金")
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
// 判断是否超过平台未兑换现金
|
|
|
if createExchangeCashPersonCommand.ExchangedSuMoney * activityFound.Rate > cashPoolFoundUnExchangeCash {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "已超过投入现金池的未兑换现金")
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 获取平台素币兑换情况
|
|
|
systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId)
|
...
|
...
|
|