作者 陈志颖

fix:导入

@@ -1884,9 +1884,22 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -1884,9 +1884,22 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
1884 continue 1884 continue
1885 } 1885 }
1886 1886
  1887 + //// 判断是否超过平台未兑换现金
  1888 + //if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
  1889 + // if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
  1890 + // row := []interface{}{
  1891 + // createExchangeCashPersonCommand.PersonName,
  1892 + // createExchangeCashPersonCommand.PersonAccount,
  1893 + // createExchangeCashPersonCommand.ExchangedSuMoney,
  1894 + // "已超过现金池未兑换现金",
  1895 + // }
  1896 + // failureDataList = append(failureDataList, row)
  1897 + // continue
  1898 + // }
  1899 + //}
  1900 +
1887 // 判断是否超过平台未兑换现金 1901 // 判断是否超过平台未兑换现金
1888 - if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {  
1889 - if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash { 1902 + if createExchangeCashPersonCommand.ExchangedSuMoney * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
1890 row := []interface{}{ 1903 row := []interface{}{
1891 createExchangeCashPersonCommand.PersonName, 1904 createExchangeCashPersonCommand.PersonName,
1892 createExchangeCashPersonCommand.PersonAccount, 1905 createExchangeCashPersonCommand.PersonAccount,
@@ -1896,7 +1909,6 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -1896,7 +1909,6 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
1896 failureDataList = append(failureDataList, row) 1909 failureDataList = append(failureDataList, row)
1897 continue 1910 continue
1898 } 1911 }
1899 - }  
1900 1912
1901 // 获取平台素币兑换情况 1913 // 获取平台素币兑换情况
1902 systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) 1914 systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId)
@@ -2085,9 +2097,22 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -2085,9 +2097,22 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
2085 continue 2097 continue
2086 } 2098 }
2087 2099
  2100 + //// 判断是否超过平台未兑换现金
  2101 + //if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
  2102 + // if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
  2103 + // row := []interface{}{
  2104 + // createExchangeCashPersonCommand.PersonName,
  2105 + // createExchangeCashPersonCommand.PersonAccount,
  2106 + // createExchangeCashPersonCommand.ExchangedSuMoney,
  2107 + // "已超过现金池未兑换现金",
  2108 + // }
  2109 + // failureDataList = append(failureDataList, row)
  2110 + // continue
  2111 + // }
  2112 + //}
  2113 +
2088 // 判断是否超过平台未兑换现金 2114 // 判断是否超过平台未兑换现金
2089 - if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {  
2090 - if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash { 2115 + if createExchangeCashPersonCommand.ExchangedSuMoney * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
2091 row := []interface{}{ 2116 row := []interface{}{
2092 createExchangeCashPersonCommand.PersonName, 2117 createExchangeCashPersonCommand.PersonName,
2093 createExchangeCashPersonCommand.PersonAccount, 2118 createExchangeCashPersonCommand.PersonAccount,
@@ -2096,7 +2121,7 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -2096,7 +2121,7 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
2096 } 2121 }
2097 failureDataList = append(failureDataList, row) 2122 failureDataList = append(failureDataList, row)
2098 continue 2123 continue
2099 - } 2124 + //return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "已超过投入现金池的未兑换现金")
2100 } 2125 }
2101 2126
2102 // 获取平台素币兑换情况 2127 // 获取平台素币兑换情况