| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.zc.entity.Zc; |
| | | import org.springblade.modules.zc.service.IZcService; |
| | | import org.springblade.modules.zc.vo.ZcVO; |
| | |
| | | private IUserService iUserService; |
| | | |
| | | private final IDeptService deptFeignApi; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | user.setHold("2"); |
| | | user.setDispatch("1"); |
| | | user.setStatus(1); |
| | | user.setExaminationType("0"); |
| | | user.setIsDeleted(0); |
| | | iUserService.save(user); |
| | | |
| | | //内网数据同步 |
| | | String rtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); |
| | | String s = "insert into blade_user(id,tenant_id,account,password,real_name,role_id,dept_id,create_time,status,is_deleted,cardid,hold,dispatch) " + |
| | | String s = "insert into blade_user(id,tenant_id,account,password,real_name,role_id,dept_id,create_time,status,is_deleted,cardid,hold,examination_type,dispatch) " + |
| | | "values(" + "'" + user.getId() + "'" + |
| | | "," + "'" + user.getTenantId() + "'" + |
| | | "," + "'" + user.getAccount() + "'" + |
| | |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getCardid() + "'" + |
| | | "," + "'" + user.getHold() + "'" + |
| | | "," + "'" + user.getExaminationType() + "'" + |
| | | "," + "'" + user.getDispatch() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | } |
| | | return R.status(zcService.updateById(zc)); |
| | |
| | | @PostMapping("/inster") |
| | | @ApiOperation(value = "新增", notes = "传入zc") |
| | | public R inster(@Valid @RequestBody Zc zc) { |
| | | //获取用户名,判断该用户名是否已注册,或已有用户 |
| | | //查询注册表中是否有相同的注册信息 |
| | | Zc zc1 = zcService.getAuditSuccessInfo(zc.getUsername()); |
| | | if (null!=zc1){ |
| | | throw new com.aliyun.oss.ServiceException(StringUtil.format("当前用户名 [{}] 已被注册!", zc.getUsername())); |
| | | } |
| | | //查询用户表中未删除,未离职的用户信息 |
| | | User user = iUserService.getUserInfo(zc.getUsername()); |
| | | if (null!=user){ |
| | | throw new com.aliyun.oss.ServiceException(StringUtil.format("当前用户名 [{}] 已被注册!", zc.getUsername())); |
| | | } |
| | | //当前时间 |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String times = df.format(new Date()); |