...
|
...
|
@@ -1629,16 +1629,30 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc |
|
|
continue
|
|
|
}
|
|
|
|
|
|
// 判断兑换活动的现金是否超过现金池未兑换现金
|
|
|
if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash {
|
|
|
row := []interface{}{
|
|
|
createExchangeCashPersonCommand.PersonName,
|
|
|
createExchangeCashPersonCommand.PersonAccount,
|
|
|
createExchangeCashPersonCommand.ExchangedSuMoney,
|
|
|
"已超过现金池未兑换现金",
|
|
|
//// 判断兑换活动的现金是否超过现金池未兑换现金
|
|
|
//if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash {
|
|
|
// row := []interface{}{
|
|
|
// createExchangeCashPersonCommand.PersonName,
|
|
|
// createExchangeCashPersonCommand.PersonAccount,
|
|
|
// createExchangeCashPersonCommand.ExchangedSuMoney,
|
|
|
// "已超过现金池未兑换现金",
|
|
|
// }
|
|
|
// failureDataList = append(failureDataList, row)
|
|
|
// continue
|
|
|
//}
|
|
|
|
|
|
// 判断是否超过平台未兑换现金
|
|
|
if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
|
|
|
if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
|
|
|
row := []interface{}{
|
|
|
createExchangeCashPersonCommand.PersonName,
|
|
|
createExchangeCashPersonCommand.PersonAccount,
|
|
|
createExchangeCashPersonCommand.ExchangedSuMoney,
|
|
|
"已超过现金池未兑换现金",
|
|
|
}
|
|
|
failureDataList = append(failureDataList, row)
|
|
|
continue
|
|
|
}
|
|
|
failureDataList = append(failureDataList, row)
|
|
|
continue
|
|
|
}
|
|
|
|
|
|
// 获取平台素币兑换情况
|
...
|
...
|
@@ -1839,16 +1853,30 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc |
|
|
continue
|
|
|
}
|
|
|
|
|
|
// 判断兑换活动的现金是否超过现金池未兑换现金
|
|
|
if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash {
|
|
|
row := []interface{}{
|
|
|
createExchangeCashPersonCommand.PersonName,
|
|
|
createExchangeCashPersonCommand.PersonAccount,
|
|
|
createExchangeCashPersonCommand.ExchangedSuMoney,
|
|
|
"已超过现金池未兑换现金",
|
|
|
//// 判断兑换活动的现金是否超过现金池未兑换现金
|
|
|
//if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash {
|
|
|
// row := []interface{}{
|
|
|
// createExchangeCashPersonCommand.PersonName,
|
|
|
// createExchangeCashPersonCommand.PersonAccount,
|
|
|
// createExchangeCashPersonCommand.ExchangedSuMoney,
|
|
|
// "已超过现金池未兑换现金",
|
|
|
// }
|
|
|
// failureDataList = append(failureDataList, row)
|
|
|
// continue
|
|
|
//}
|
|
|
|
|
|
// 判断是否超过平台未兑换现金
|
|
|
if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
|
|
|
if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
|
|
|
row := []interface{}{
|
|
|
createExchangeCashPersonCommand.PersonName,
|
|
|
createExchangeCashPersonCommand.PersonAccount,
|
|
|
createExchangeCashPersonCommand.ExchangedSuMoney,
|
|
|
"已超过现金池未兑换现金",
|
|
|
}
|
|
|
failureDataList = append(failureDataList, row)
|
|
|
continue
|
|
|
}
|
|
|
failureDataList = append(failureDataList, row)
|
|
|
continue
|
|
|
}
|
|
|
|
|
|
// 获取平台素币兑换情况
|
...
|
...
|
@@ -2038,18 +2066,32 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc |
|
|
continue
|
|
|
}
|
|
|
|
|
|
// 判断兑换活动的现金是否超过现金池未兑换现金
|
|
|
if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash {
|
|
|
row := []interface{}{
|
|
|
createExchangeCashPersonCommand.PersonName,
|
|
|
createExchangeCashPersonCommand.PersonAccount,
|
|
|
createExchangeCashPersonCommand.ExchangedSuMoney,
|
|
|
"已超过现金池未兑换现金",
|
|
|
// 判断是否超过平台未兑换现金
|
|
|
if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
|
|
|
if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
|
|
|
row := []interface{}{
|
|
|
createExchangeCashPersonCommand.PersonName,
|
|
|
createExchangeCashPersonCommand.PersonAccount,
|
|
|
createExchangeCashPersonCommand.ExchangedSuMoney,
|
|
|
"已超过现金池未兑换现金",
|
|
|
}
|
|
|
failureDataList = append(failureDataList, row)
|
|
|
continue
|
|
|
}
|
|
|
failureDataList = append(failureDataList, row)
|
|
|
continue
|
|
|
}
|
|
|
|
|
|
//// 判断兑换活动的现金是否超过现金池未兑换现金
|
|
|
//if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash {
|
|
|
// row := []interface{}{
|
|
|
// createExchangeCashPersonCommand.PersonName,
|
|
|
// createExchangeCashPersonCommand.PersonAccount,
|
|
|
// createExchangeCashPersonCommand.ExchangedSuMoney,
|
|
|
// "已超过现金池未兑换现金",
|
|
|
// }
|
|
|
// failureDataList = append(failureDataList, row)
|
|
|
// continue
|
|
|
//}
|
|
|
|
|
|
// 获取平台素币兑换情况
|
|
|
systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId)
|
|
|
if err != nil {
|
...
|
...
|
|