正在显示
1 个修改的文件
包含
48 行增加
和
6 行删除
| @@ -1629,8 +1629,21 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | @@ -1629,8 +1629,21 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | ||
| 1629 | continue | 1629 | continue |
| 1630 | } | 1630 | } |
| 1631 | 1631 | ||
| 1632 | - // 判断兑换活动的现金是否超过现金池未兑换现金 | ||
| 1633 | - if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash { | 1632 | + //// 判断兑换活动的现金是否超过现金池未兑换现金 |
| 1633 | + //if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash { | ||
| 1634 | + // row := []interface{}{ | ||
| 1635 | + // createExchangeCashPersonCommand.PersonName, | ||
| 1636 | + // createExchangeCashPersonCommand.PersonAccount, | ||
| 1637 | + // createExchangeCashPersonCommand.ExchangedSuMoney, | ||
| 1638 | + // "已超过现金池未兑换现金", | ||
| 1639 | + // } | ||
| 1640 | + // failureDataList = append(failureDataList, row) | ||
| 1641 | + // continue | ||
| 1642 | + //} | ||
| 1643 | + | ||
| 1644 | + // 判断是否超过平台未兑换现金 | ||
| 1645 | + if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney { | ||
| 1646 | + if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash { | ||
| 1634 | row := []interface{}{ | 1647 | row := []interface{}{ |
| 1635 | createExchangeCashPersonCommand.PersonName, | 1648 | createExchangeCashPersonCommand.PersonName, |
| 1636 | createExchangeCashPersonCommand.PersonAccount, | 1649 | createExchangeCashPersonCommand.PersonAccount, |
| @@ -1640,6 +1653,7 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | @@ -1640,6 +1653,7 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | ||
| 1640 | failureDataList = append(failureDataList, row) | 1653 | failureDataList = append(failureDataList, row) |
| 1641 | continue | 1654 | continue |
| 1642 | } | 1655 | } |
| 1656 | + } | ||
| 1643 | 1657 | ||
| 1644 | // 获取平台素币兑换情况 | 1658 | // 获取平台素币兑换情况 |
| 1645 | systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) | 1659 | systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) |
| @@ -1839,8 +1853,21 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | @@ -1839,8 +1853,21 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | ||
| 1839 | continue | 1853 | continue |
| 1840 | } | 1854 | } |
| 1841 | 1855 | ||
| 1842 | - // 判断兑换活动的现金是否超过现金池未兑换现金 | ||
| 1843 | - if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash { | 1856 | + //// 判断兑换活动的现金是否超过现金池未兑换现金 |
| 1857 | + //if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash { | ||
| 1858 | + // row := []interface{}{ | ||
| 1859 | + // createExchangeCashPersonCommand.PersonName, | ||
| 1860 | + // createExchangeCashPersonCommand.PersonAccount, | ||
| 1861 | + // createExchangeCashPersonCommand.ExchangedSuMoney, | ||
| 1862 | + // "已超过现金池未兑换现金", | ||
| 1863 | + // } | ||
| 1864 | + // failureDataList = append(failureDataList, row) | ||
| 1865 | + // continue | ||
| 1866 | + //} | ||
| 1867 | + | ||
| 1868 | + // 判断是否超过平台未兑换现金 | ||
| 1869 | + if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney { | ||
| 1870 | + if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash { | ||
| 1844 | row := []interface{}{ | 1871 | row := []interface{}{ |
| 1845 | createExchangeCashPersonCommand.PersonName, | 1872 | createExchangeCashPersonCommand.PersonName, |
| 1846 | createExchangeCashPersonCommand.PersonAccount, | 1873 | createExchangeCashPersonCommand.PersonAccount, |
| @@ -1850,6 +1877,7 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | @@ -1850,6 +1877,7 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | ||
| 1850 | failureDataList = append(failureDataList, row) | 1877 | failureDataList = append(failureDataList, row) |
| 1851 | continue | 1878 | continue |
| 1852 | } | 1879 | } |
| 1880 | + } | ||
| 1853 | 1881 | ||
| 1854 | // 获取平台素币兑换情况 | 1882 | // 获取平台素币兑换情况 |
| 1855 | systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) | 1883 | systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) |
| @@ -2038,8 +2066,9 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | @@ -2038,8 +2066,9 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | ||
| 2038 | continue | 2066 | continue |
| 2039 | } | 2067 | } |
| 2040 | 2068 | ||
| 2041 | - // 判断兑换活动的现金是否超过现金池未兑换现金 | ||
| 2042 | - if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash { | 2069 | + // 判断是否超过平台未兑换现金 |
| 2070 | + if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney { | ||
| 2071 | + if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash { | ||
| 2043 | row := []interface{}{ | 2072 | row := []interface{}{ |
| 2044 | createExchangeCashPersonCommand.PersonName, | 2073 | createExchangeCashPersonCommand.PersonName, |
| 2045 | createExchangeCashPersonCommand.PersonAccount, | 2074 | createExchangeCashPersonCommand.PersonAccount, |
| @@ -2049,6 +2078,19 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | @@ -2049,6 +2078,19 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc | ||
| 2049 | failureDataList = append(failureDataList, row) | 2078 | failureDataList = append(failureDataList, row) |
| 2050 | continue | 2079 | continue |
| 2051 | } | 2080 | } |
| 2081 | + } | ||
| 2082 | + | ||
| 2083 | + //// 判断兑换活动的现金是否超过现金池未兑换现金 | ||
| 2084 | + //if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash { | ||
| 2085 | + // row := []interface{}{ | ||
| 2086 | + // createExchangeCashPersonCommand.PersonName, | ||
| 2087 | + // createExchangeCashPersonCommand.PersonAccount, | ||
| 2088 | + // createExchangeCashPersonCommand.ExchangedSuMoney, | ||
| 2089 | + // "已超过现金池未兑换现金", | ||
| 2090 | + // } | ||
| 2091 | + // failureDataList = append(failureDataList, row) | ||
| 2092 | + // continue | ||
| 2093 | + //} | ||
| 2052 | 2094 | ||
| 2053 | // 获取平台素币兑换情况 | 2095 | // 获取平台素币兑换情况 |
| 2054 | systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) | 2096 | systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) |
-
请 注册 或 登录 后发表评论