| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.utils.DesensitizedUtil; |
| | | import org.springblade.common.vo.DeptVo; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | |
| | | if (userCount > 0) { |
| | | throw new org.springblade.core.log.exception.ServiceException(StringUtil.format("当前用户 [{}] 已存在!", zc.getUsername())); |
| | | } |
| | | //数据脱敏处理 |
| | | String name = DesensitizedUtil.desensitizedName(zc.getSname()); |
| | | String cardid = DesensitizedUtil.desensitizedIdNumber(zc.getCardid()); |
| | | String phone = DesensitizedUtil.desensitizedPhoneNumber(zc.getPhone()); |
| | | |
| | | //帐号默认姓+身份证后四位 |
| | | zc.setUsername(name.substring(0,1)+cardid.substring(cardid.length()-4)); |
| | | |
| | | //内网储存完整数据 |
| | | String s = "insert into act_zc(id,username,password,sname,sex,phone,zctime,parent_id,jurisdiction,cardid,address)" + |
| | | "values(" + "'" + zc.getId() + "'" + |
| | | "," + "'" + zc.getUsername() + "'" + |
| | | "," + "'" + zc.getPassword() + "'" + |
| | | "," + "'" + zc.getSname() + "'" + |
| | | "," + "'" + zc.getSex() + "'" + |
| | | "," + "'" + zc.getPhone() + "'" + |
| | | "," + "'" + zc.getZctime() + "'" + |
| | | "," + "'" + zc.getParentId() + "'" + |
| | | "," + "'" + zc.getJurisdiction() + "'" + |
| | | "," + "'" + zc.getCardid() + "'" + |
| | | "," + "'" + zc.getAddress() + "'" |
| | | + ")"; |
| | | zc.setSname(name); |
| | | zc.setCardid(cardid); |
| | | zc.setPhone(phone); |
| | | |
| | | zcService.inster(zc); |
| | | //同时新增到用户表 |
| | | User user = new User(); |
| | |
| | | user.setJobUnit(zc.getJobUnit()); |
| | | } |
| | | iUserService.saveOrUpdate(user); |
| | | String s = "insert into act_zc(id,username,password,sname,sex,phone,zctime,parent_id,jurisdiction,cardid,address)" + |
| | | "values(" + "'" + zc.getId() + "'" + |
| | | "," + "'" + zc.getUsername() + "'" + |
| | | "," + "'" + zc.getPassword() + "'" + |
| | | "," + "'" + zc.getSname() + "'" + |
| | | "," + "'" + zc.getSex() + "'" + |
| | | "," + "'" + zc.getPhone() + "'" + |
| | | "," + "'" + zc.getZctime() + "'" + |
| | | "," + "'" + zc.getParentId() + "'" + |
| | | "," + "'" + zc.getJurisdiction() + "'" + |
| | | "," + "'" + zc.getCardid() + "'" + |
| | | "," + "'" + zc.getAddress() + "'" |
| | | + ")"; |
| | | |
| | | // String s = "insert into act_zc(id,username,password,sname,sex,phone,zctime,deptid,parent_id,jurisdiction,cardid,address)" + |
| | | // "values(" + "'" + zc.getId() + "'" + |
| | | // "," + "'" + zc.getUsername() + "'" + |