| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.exception.ExcelDataConvertException; |
| | |
| | | import com.consum.base.core.utils.MapperUtil; |
| | | import com.consum.base.pojo.FinSysTenantUserSearchParam; |
| | | import com.consum.base.pojo.FinSysTenantUserUpdParam; |
| | | import com.consum.base.pojo.ImportUserParam; |
| | | import com.consum.base.pojo.response.DepartmentVO; |
| | | import com.consum.base.pojo.response.FinSysTenantUserVO; |
| | | import com.consum.base.pojo.response.FinSysTenantVO; |
| | |
| | | return ResponseValue.success(1); |
| | | } |
| | | |
| | | public static class ImportUserParam { |
| | | |
| | | @ExcelProperty("用户姓名") |
| | | private String userName; |
| | | @ExcelProperty("用户编号") |
| | | private String userCode; |
| | | @ExcelProperty("手机号") |
| | | private String userPhone; |
| | | @ExcelProperty("性别(1男,2女)") |
| | | private Integer sex; |
| | | @ExcelProperty("电子邮箱") |
| | | private String email; |
| | | @ExcelProperty("顺序号") |
| | | private Long seq; |
| | | @ExcelProperty("角色名称") |
| | | private String roleName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | public String getUserCode() { |
| | | return userCode; |
| | | } |
| | | |
| | | public void setUserCode(String userCode) { |
| | | this.userCode = userCode; |
| | | } |
| | | |
| | | public String getUserPhone() { |
| | | return userPhone; |
| | | } |
| | | |
| | | public void setUserPhone(String userPhone) { |
| | | this.userPhone = userPhone; |
| | | } |
| | | |
| | | public Integer getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(Integer sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public String getEmail() { |
| | | return email; |
| | | } |
| | | |
| | | public void setEmail(String email) { |
| | | this.email = email; |
| | | } |
| | | |
| | | public Long getSeq() { |
| | | return seq; |
| | | } |
| | | |
| | | public void setSeq(Long seq) { |
| | | this.seq = seq; |
| | | } |
| | | |
| | | public String getRoleName() { |
| | | return roleName; |
| | | } |
| | | |
| | | public void setRoleName(String roleName) { |
| | | this.roleName = roleName; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @Description 批量导入用户 |
| | | * @Author jlq |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ResponseValue update(@RequestBody FinSysTenantUser user) { |
| | | public ResponseValue update() { |
| | | FinSysTenantUser user = CommonUtil.getObjFromReqBody(FinSysTenantUser.class); |
| | | FinSysTenantUser formInventoryParam = new FinSysTenantUser(); |
| | | CommonUtil.copyProperties(user, formInventoryParam); |
| | | user = formInventoryParam; |
| | | |
| | | if (user == null) { |
| | | return ResponseValue.error("参数为空"); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/updateStatus") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ResponseValue updateStatus(@RequestBody FinSysTenantUser user) { |
| | | public ResponseValue updateStatus() { |
| | | FinSysTenantUser user = CommonUtil.getObjFromReqBody(FinSysTenantUser.class); |
| | | FinSysTenantUser formInventoryParam = new FinSysTenantUser(); |
| | | CommonUtil.copyProperties(user, formInventoryParam); |
| | | user = formInventoryParam; |
| | | if (user == null) { |
| | | return ResponseValue.error("参数为空"); |
| | | } |
| | |
| | | /** |
| | | * 更新角色权限 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | | @PostMapping("/updRole") |
| | | public ResponseValue updRole(@RequestBody FinSysTenantUser user) { |
| | | public ResponseValue updRole() { |
| | | FinSysTenantUser user = CommonUtil.getObjFromReqBody(FinSysTenantUser.class); |
| | | FinSysTenantUser finSysTenantParam = new FinSysTenantUser(); |
| | | CommonUtil.copyProperties(user, finSysTenantParam); |
| | | user = finSysTenantParam; |
| | | |
| | | if (user == null) { |
| | | return ResponseValue.error("参数为空"); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/addSupplier") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ResponseValue addSupplier(@RequestBody FinSysTenantUser user) { |
| | | public ResponseValue addSupplier() { |
| | | FinSysTenantUser user = CommonUtil.getObjFromReqBody(FinSysTenantUser.class); |
| | | FinSysTenantUser finSysTenantParam = new FinSysTenantUser(); |
| | | CommonUtil.copyProperties(user, finSysTenantParam); |
| | | user = finSysTenantParam; |
| | | if (user == null) { |
| | | return ResponseValue.error("参数为空"); |
| | | } |
| | |
| | | |
| | | @PostMapping("/updatePerson") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ResponseValue updatePerson(@RequestBody FinSysTenantUser user) { |
| | | public ResponseValue updatePerson() { |
| | | FinSysTenantUser user = CommonUtil.getObjFromReqBody(FinSysTenantUser.class); |
| | | FinSysTenantUser finSysTenantParam = new FinSysTenantUser(); |
| | | CommonUtil.copyProperties(user, finSysTenantParam); |
| | | user = finSysTenantParam; |
| | | if (user == null) { |
| | | return ResponseValue.error("参数为空"); |
| | | } |
| | |
| | | * @Description 修改密码 |
| | | */ |
| | | @PostMapping("/updatePassword") |
| | | public ResponseValue updatePassword(@RequestBody FinSysTenantUserUpdParam param) { |
| | | public ResponseValue updatePassword() { |
| | | FinSysTenantUserUpdParam param = CommonUtil.getObjFromReqBody(FinSysTenantUserUpdParam.class); |
| | | FinSysTenantUserUpdParam finSysTenantParam = new FinSysTenantUserUpdParam(); |
| | | CommonUtil.copyProperties(param, finSysTenantParam); |
| | | param = finSysTenantParam; |
| | | |
| | | String oldMixPd = param.getOldMixPd(); |
| | | String newMixPd = param.getNewMixPd(); |
| | | String btnMixPd = param.getBtnMixPd(); |