| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.hutool.core.util.ReflectUtil; |
| | | import java.io.IOException; |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | import java.util.Set; |
| | | |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | |
| | | import com.consum.base.pojo.response.FinSysTenantVO; |
| | | import com.consum.base.pojo.response.UserVO; |
| | | import com.consum.base.service.FinSysTenantDepartmentService; |
| | | import com.consum.base.service.FinSysTenantServiceImpl; |
| | | import com.consum.base.service.FinSysTenantService; |
| | | import com.consum.base.service.FinSysTenantUserServiceImpl; |
| | | import com.consum.model.po.FinSysTenant; |
| | | import com.consum.model.po.FinSysTenantDepartment; |
| | |
| | | import com.iplatform.model.po.S_role; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.*; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import com.walker.infrastructure.utils.PhoneNumberUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.web.ResponseValue; |
| | | |
| | | import cn.hutool.core.util.ReflectUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @Description 系统用户 |
| | |
| | | |
| | | private UserServiceImpl userService; |
| | | |
| | | private FinSysTenantServiceImpl finSysTenantService; |
| | | private FinSysTenantService finSysTenantService; |
| | | |
| | | private RoleServiceImpl roleService; |
| | | |
| | |
| | | } |
| | | |
| | | @Autowired |
| | | public FinSysTenantUserController(FinSysTenantServiceImpl finSysTenantService, |
| | | public FinSysTenantUserController(FinSysTenantService finSysTenantService, |
| | | FinSysTenantUserServiceImpl finSysTenantUserService, RoleServiceImpl roleService) { |
| | | this.finSysTenantUserService = finSysTenantUserService; |
| | | this.finSysTenantService = finSysTenantService; |
| | |
| | | } |
| | | tenantUser.setUserPhone(encPhone); |
| | | // 怎么获取左侧机构树数据 |
| | | // tenantUser.setSysDeptId(3L); // 对应平台机构id 默认为平台管理 |
| | | // tenantUser.setSysDeptId(3L); // 对应平台机构id 默认为平台管理 |
| | | this.finSysTenantUserService.insert(tenantUser); |
| | | |
| | | // 插入平台用户 |
| | |
| | | public ResponseValue importUser(@RequestParam String tenantId, @RequestParam String tenantCode, MultipartFile file) |
| | | throws IOException { |
| | | String originalFilename = file.getOriginalFilename(); |
| | | if (!"xls".equals(originalFilename.substring(originalFilename.lastIndexOf(".") + 1))) { |
| | | if (!originalFilename.endsWith("xls")) { |
| | | return ResponseValue.error("文件格式有误!"); |
| | | } |
| | | S_user_core currentUser = this.getCurrentUser(); |