| | |
| | | user.setTenantId("000000"); |
| | | //用户新增 |
| | | boolean status = userService.save(user); |
| | | //获取从业记录 |
| | | List<Experience> experiences = (List<Experience>) userMap.get("userPractitionersInfo"); |
| | | if (experiences.size()>0){ |
| | | int count = 0; |
| | | for (int i = 0; i < experiences.size(); i++) { |
| | | Experience e = JSON.parseObject(JSON.toJSONString(experiences.get(i)), Experience.class); |
| | | e.setSecurityid(user.getId().toString()); |
| | | experienceService.save(e); |
| | | count++; |
| | | } |
| | | if (count < 1) { |
| | | return R.status(false); |
| | | } |
| | | |
| | | String birthday; |
| | | String rtime; |
| | | if (user.getBirthday()==null){ |
| | | birthday =null; |
| | | } |
| | | else { |
| | | birthday = new SimpleDateFormat("yyyy-MM-dd").format(user.getBirthday()); |
| | | } |
| | | |
| | | if ( user.getRtime()==null){ |
| | | rtime =null; |
| | | } |
| | | else { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd").format(user.getRtime()); |
| | | } |
| | | |
| | | |
| | | |
| | | String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,birthday,sex,role_id,dept_id,cardid,nativePlace,nation,education," + |
| | | "politicaloutlook,healstats,height,address,registered,rtime,securitynumber,hold,jurisdiction) " + |
| | | "values(" + "'" + user.getId() + "'" + "," + "'" + 000000 + "'" + "," + "'" + user.getAccount() + "'" + "," + |
| | | "'" + user.getPassword() + "'" + "," +"'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," + |
| | | "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + birthday + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" + |
| | | "," + "'" + user.getDeptId() + "'" + "," + "'" + user.getCardid() + "'" + "," + "'" + user.getNativeplace() + "'" + "," + "'" |
| | | + user.getNation() + "'" + "," + "'" + user.getEducation() + "'" + "," + "'" + user.getPoliticaloutlook() + "'" + "," + "'" + user.getHealstats() + "'" |
| | | + "," +"'" + user.getHeight() + "'" + "," + "'" + user.getAddress() + "'" +"," + "'" + user.getRegistered() + "'"+ "," + |
| | | "'" + rtime + "'"+ "," + "'" + user.getSecuritynumber() + "'"+"," + "'" + user.getHold() + "'"+"," + "'" + user.getJurisdiction() + "'"+")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | |
| | | //获取从业记录 |
| | | // List<Experience> experiences = (List<Experience>) userMap.get("userPractitionersInfo"); |
| | | // if (experiences.size()>0){ |
| | | // int count = 0; |
| | | // for (int i = 0; i < experiences.size(); i++) { |
| | | // Experience e = JSON.parseObject(JSON.toJSONString(experiences.get(i)), Experience.class); |
| | | // e.setSecurityid(user.getId().toString()); |
| | | // experienceService.save(e); |
| | | // count++; |
| | | // } |
| | | // if (count < 1) { |
| | | // return R.status(false); |
| | | // } |
| | | // } |
| | | //判断是否持证是否为空 |
| | | return R.status(status); |
| | | } |