作者 陈志颖

fix:导入素币操作

@@ -1502,7 +1502,6 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -1502,7 +1502,6 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
1502 } 1502 }
1503 } 1503 }
1504 1504
1505 -  
1506 if len(peopleFound) > 0 { // 当前导入员工在素币兑换清单中,判断追加素币兑换或撤回素币兑换 1505 if len(peopleFound) > 0 { // 当前导入员工在素币兑换清单中,判断追加素币兑换或撤回素币兑换
1507 // 获取当前员工已兑换素币 1506 // 获取当前员工已兑换素币
1508 personFoundExchangedSuMoney := peopleFound[0].ExchangedSuMoney 1507 personFoundExchangedSuMoney := peopleFound[0].ExchangedSuMoney
@@ -1629,18 +1628,6 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -1629,18 +1628,6 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
1629 continue 1628 continue
1630 } 1629 }
1631 1630
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 // 判断是否超过平台未兑换现金 1631 // 判断是否超过平台未兑换现金
1645 if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney { 1632 if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
1646 if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash { 1633 if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
@@ -1825,9 +1812,9 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -1825,9 +1812,9 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
1825 operationSuMoneyCommand := &command.OperationSuMoneyCommand{ 1812 operationSuMoneyCommand := &command.OperationSuMoneyCommand{
1826 Uid: employeeFound.EmployeeInfo.Uid, 1813 Uid: employeeFound.EmployeeInfo.Uid,
1827 Operator: createExchangeCashPersonCommand.Operator, 1814 Operator: createExchangeCashPersonCommand.Operator,
1828 - SuMoney: createExchangeCashPersonCommand.ExchangedSuMoney, 1815 + SuMoney: suMoneyIncrement,
1829 OperationType: 4, 1816 OperationType: 4,
1830 - OperationDescription: "参与" + activityFound.ExchangeActivityName, 1817 + OperationDescription: activityFound.ExchangeActivityName + "调整",
1831 } 1818 }
1832 1819
1833 // 操作素币,生成素币流水 1820 // 操作素币,生成素币流水
@@ -1853,18 +1840,6 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -1853,18 +1840,6 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
1853 continue 1840 continue
1854 } 1841 }
1855 1842
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 // 判断是否超过平台未兑换现金 1843 // 判断是否超过平台未兑换现金
1869 if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney { 1844 if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
1870 if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash { 1845 if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
@@ -2080,18 +2055,6 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -2080,18 +2055,6 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
2080 } 2055 }
2081 } 2056 }
2082 2057
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 - //}  
2094 -  
2095 // 获取平台素币兑换情况 2058 // 获取平台素币兑换情况
2096 systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) 2059 systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId)
2097 if err != nil { 2060 if err != nil {