| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.common.constant.FtpConstant; |
| | | import org.springblade.common.enums.DictEnum; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | |
| | | Jurisdiction one = jurisdictionService.getOne(Condition.getQueryWrapper(jurisdiction)); |
| | | user.setJurisdiction(one.getId().toString()); |
| | | } |
| | | user.setRoleId("1412226235153731586"); |
| | | userService.submit(user); |
| | | // String birthday = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getBirthday()); |
| | | String rtime = null; |
| | | if (null!=user.getRtime()) { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").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," + |
| | | String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,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() + "'" + "," + |
| | |
| | | String rtime; |
| | | if (user.getBirthday()==null){ |
| | | birthday =null; |
| | | } |
| | | else { |
| | | } else { |
| | | birthday = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getBirthday()); |
| | | } |
| | | |
| | | if ( user.getRtime()==null){ |
| | | rtime =null; |
| | | } |
| | | else { |
| | | } else { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getRtime()); |
| | | } |
| | | |
| | | String s1 = |
| | | "update blade_user set account = " + "'" + user.getAccount()+ "'" |
| | | + ",password = " + "'" + user.getPassword()+"'" |
| | | + ",name = " + "'" + user.getName()+"'" |
| | | + ",real_name = " + "'" + user.getRealName()+"'" |
| | | + ",avatar = " + "'" + user.getAvatar()+"'" |
| | | + ",email = " + "'" + user.getEmail()+"'" |
| | | + ",phone = " + "'" + user.getPhone()+"'" |
| | | + ",birthday = " + "'" + birthday+"'" |
| | | + ",sex = " + "'" + user.getSex()+"'" |
| | | + ",role_id = " + "'" + user.getRoleId()+"'" |
| | | + ",dept_id = " + "'" + user.getDeptId()+"'" |
| | |
| | | + ",securitynumber = " + "'" +user.getSecuritynumber()+"'" |
| | | + ",hold = " + "'" +user.getHold()+"'" |
| | | + ",jurisdiction = " + "'" +user.getJurisdiction()+"'" |
| | | + ",reason_for_leav = " + "'" + user.getReasonForLeav() + "'" |
| | | + " " +"where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.success("修改成功"); |
| | |
| | | List<Map<Object, Object>> list = userService.selectInr(deptid); |
| | | return R.data(list); |
| | | } |
| | | |
| | | @GetMapping("/zc") |
| | | public R zc(String username,String password) { |
| | | User user = new User(); |
| | |
| | | String rtime; |
| | | if (user.getBirthday()==null){ |
| | | birthday =null; |
| | | } |
| | | else { |
| | | } else { |
| | | birthday = new SimpleDateFormat("yyyy-MM-dd").format(user.getBirthday()); |
| | | } |
| | | |
| | | if ( user.getRtime()==null){ |
| | | rtime =null; |
| | | } |
| | | else { |
| | | } else { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd").format(user.getRtime()); |
| | | } |
| | | String urla = ""; |
| | | String[] split = user.getAvatar().split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | | String s = split[i].substring(26, split[i].length()); |
| | | urla += FtpConstant.ip + s + ","; |
| | | } |
| | | String substring = urla.substring(0, urla.length() - 1); |
| | | user.setAvatar(substring); |
| | | |
| | | String urlf = ""; |
| | | String[] splits = user.getFingerprint().split(","); |
| | | for (int i = 0; i < splits.length; i++) { |
| | | String s = splits[i].substring(26, splits[i].length()); |
| | | urlf += FtpConstant.ip + s + ","; |
| | | } |
| | | String substrings = urla.substring(0, urlf.length() - 1); |
| | | user.setFingerprint(substrings); |
| | | |
| | | |
| | | 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,dispatch) " + |
| | | "values(" + "'" + user.getId() + "'" + "," + "'" + 000000 + "'" + "," + "'" + user.getAccount() + "'" + "," + |
| | | String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,sex,role_id,dept_id,cardid,nativePlace,nation,fingerprint,education," + |
| | | "politicaloutlook,healstats,height,address,registered,rtime,securitynumber,hold,jurisdiction,status,is_deleted,dispatch) " + |
| | | "values(" + "'" + user.getId() + "'" + "," + "'" + user.getTenantId() + "'" + "," + "'" + user.getAccount() + "'" + "," + |
| | | "'" + user.getPassword() + "'" + "," +"'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," + |
| | | "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + birthday + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" + |
| | | "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" + |
| | | "," + "'" + user.getDeptId() + "'" + |
| | | "," + "'" + user.getCardid() + "'" + |
| | | "," + "'" + user.getNativeplace() + "'" + |
| | | "," + "'" + user.getNation() + "'" + |
| | | "," + "'" + user.getFingerprint() + "'" + |
| | | "," + "'" + user.getEducation() + "'" + |
| | | "," + "'" + user.getPoliticaloutlook() + "'" + |
| | | "," + "'" + user.getHealstats() + "'" |
| | |
| | | "'" + rtime + "'"+ "," + "'" + user.getSecuritynumber() + "'"+ |
| | | "," + "'" + user.getHold() + "'"+ |
| | | "," + "'" + user.getJurisdiction() + "'"+ |
| | | "," + "'" + user.getStatus() + "'" + |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getDispatch() + "'"+")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | |
| | |
| | | |
| | | /** |
| | | * 保安员信息 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | |
| | | |
| | | |
| | | /** |
| | | * |
| | | * @param type 1:保安 2:公安 |
| | | * @param deptid |
| | | * @param jurisdiction |
| | |
| | | List<Map<String, Object>> list = userService.seleL(type,deptid, jurisdiction,userId); |
| | | return R.data(list); |
| | | } |
| | | |
| | | |
| | | |
| | | } |