作者 陈志颖

fix:修复新增兑换素币清单员工判断

... ... @@ -992,7 +992,7 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC
// 判断当前员工是否已经在素币兑换清单中
count, _, err := exchangeCashPersonListRepository.Find(map[string]interface{}{
"uid": employeeFound.EmployeeInfo.Uid,
"activityId": activityFound.ActivityId,
"exchangeCashActivityId": activityFound.ActivityId,
})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
... ...
... ... @@ -398,6 +398,7 @@ func (controller *SuMoneyController) ImportExchangeList () {
operator, _ := controller.GetInt64("operator")
file, h, _ := controller.GetFile("file") //获取上传的文件
ext := path.Ext(h.Filename)
// 文件后缀名校验
AllowExtMap := map[string]bool{
".xlsx":true,
}
... ... @@ -410,7 +411,7 @@ func (controller *SuMoneyController) ImportExchangeList () {
fmt.Println(err)
return
}
// TODO 增加非空校验,导入失败原因返回
// 记录非空校验
var response utils.JsonResponse
dataList := make([]interface{}, 0)
rows, _ := xlsx.GetRows("Sheet1")
... ...