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