EsmUserInternalCheckController.java 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. //package com.ydtech.modules.esm.controller;
  2. //
  3. //
  4. //import com.ydtech.core.page.HttpResult;
  5. //import com.ydtech.core.page.PageRequest;
  6. //import com.ydtech.modules.admin.model.SysUser;
  7. //import com.ydtech.modules.admin.model.SysUserRole;
  8. //import com.ydtech.modules.admin.service.SysMsgLogService;
  9. //import com.ydtech.modules.admin.service.SysUserRoleService;
  10. //import com.ydtech.modules.admin.service.SysUserService;
  11. //import com.ydtech.modules.base.controller.BaseController;
  12. //import com.ydtech.modules.esm.model.EsmUserInternal;
  13. //import com.ydtech.modules.esm.model.vo.UserRegistVO;
  14. //import com.ydtech.modules.esm.service.EsmUserInternalService;
  15. //import com.ydtech.modules.esm.service.SysUserCheckService;
  16. //import com.ydtech.security.utils.PasswordUtils;
  17. //import com.ydtech.utils.StringUtils;
  18. //import com.ydtech.utils.idgen.IdGenerate;
  19. //import io.swagger.annotations.ApiOperation;
  20. //import org.springframework.beans.factory.annotation.Autowired;
  21. //import org.springframework.data.redis.core.StringRedisTemplate;
  22. //import org.springframework.web.bind.annotation.*;
  23. //
  24. //import javax.servlet.http.HttpServletRequest;
  25. //import java.util.Date;
  26. //
  27. //import static com.ydtech.constants.RedisConstant.PHONE_VERIFICATION_CODE_KEY;
  28. //
  29. ///**
  30. // * ---------------------------
  31. // * 人员管理 (EsmUserController)
  32. // * ---------------------------
  33. // * 作者:qfl
  34. // * ---------------------------
  35. // */
  36. //@RestController
  37. //@RequestMapping("esmUserInternalcheck")
  38. //public class EsmUserInternalCheckController extends BaseController {
  39. //
  40. //
  41. // @Autowired
  42. // private SysUserCheckService sysUserCheckService;
  43. //
  44. // @Autowired
  45. // private SysUserService sysUserService;
  46. //
  47. //// @Autowired
  48. //// private EsmUserInternalCheckService esmUserInternalCheckService;
  49. //
  50. // @Autowired
  51. // private EsmUserInternalService esmUserInternalService;
  52. //
  53. //// @Autowired
  54. //// private EsmUserAgentCheckService esmUserAgentCheckService;
  55. //
  56. // @Autowired
  57. // private SysMsgLogService sysMsgLogService;
  58. //
  59. // @Autowired
  60. // private SysUserRoleService sysUserRoleService;
  61. //
  62. // @Autowired
  63. // private StringRedisTemplate stringRedisTemplate;
  64. //
  65. //// /**
  66. //// * 保存人员信息, 返回人员编码
  67. //// *
  68. //// * @param record
  69. //// * @return
  70. //// */
  71. ////// @PreAuthorize("hasAuthority('sys:user:edit')")
  72. //// @PostMapping(value = "/saveUser")
  73. //// public HttpResult save(@RequestBody VoEsmUserInternalCheck record) {
  74. //// int noCount = 3;//顺序号是几位的
  75. ////
  76. //// Integer result = 0;
  77. //// String resultStr = "";
  78. //// String msg = "保存成功";
  79. //// SysUserCheck sysUserCheck = record.getSysUser();
  80. //// EsmUserInternalCheck esmUserInternalCheck = record.getEsmUserInternal();
  81. ////
  82. //// String nextPK = "001";
  83. //// if (sysUserCheck != null) {
  84. //// if (StringUtils.isNullOrEmpty(sysUserCheck.getId())) {//新增
  85. //// //手机号和身份证号都不可以重复
  86. //// if (!StringUtils.isNullOrEmpty(sysUserCheck.getMobile())) {
  87. //// SysUser sysUser = sysUserService.findByPhone(sysUserCheck.getMobile());
  88. //// if (sysUser != null) {
  89. //// return HttpResult.error("手机号已存在");
  90. //// }
  91. //// }
  92. //// /* if(!StringUtils.isNullOrEmpty(esmUserInternalCheck.getIdentity())){
  93. //// List<EsmUserInternalCheck> users = esmUserInternalCheckService.selectList(" where identity=?",new Object[]{esmUserInternalCheck.getIdentity()});
  94. //// if(users != null && users.size()>0){
  95. //// return HttpResult.error("身份证号已存在");
  96. //// }
  97. //// }*/
  98. ////
  99. //// //生成临时表主键 checkid
  100. //// String checkid = String.valueOf(new Date().getTime());
  101. //// sysUserCheck.setCheckid(checkid);
  102. //// //根据机构号获取userid最大值,不需要加人员类型判断 从sys_user获取
  103. //// String maxId = esmUserInternalService.findMaxId(sysUserCheck.getDeptId());
  104. //// if (StringUtils.isNullOrEmpty(maxId)) {
  105. //// nextPK = sysUserCheck.getDeptId() + "001";
  106. //// } else {
  107. //// nextPK = IdGenerate.nextCode(maxId, noCount);
  108. //// }
  109. //// sysUserCheck.setId(nextPK);
  110. //// //密码加密
  111. //// String salt = PasswordUtils.getSalt();
  112. //// String password = PasswordUtils.encode(sysUserCheck.getPassword(), salt);
  113. //// sysUserCheck.setPassword(password);
  114. //// sysUserCheck.setSalt(salt);
  115. //// sysUserCheck.setStatus(0); //初始化为0 审核后为1 有效
  116. ////
  117. //// sysUserCheck.setCreateBy(getUserName());
  118. //// sysUserCheck.setCreateTime(new Date());
  119. //// sysUserCheck.setLastUpdateBy(getUserName());
  120. //// sysUserCheck.setLastUpdateTime(new Date());
  121. //// result = sysUserCheckService.insertSelective(sysUserCheck);
  122. ////
  123. //// // 插入正式表
  124. //// SysUser sysUser = new SysUser();
  125. //// BeanUtils.copyProperties(sysUserCheck, sysUser);
  126. //// result = sysUserService.save(sysUser)==true?1:0;
  127. ////
  128. //// //角色配置
  129. //// SysUserRole userRole = new SysUserRole();
  130. //// userRole.setUserId(nextPK);
  131. //// userRole.setRoleId(2L);
  132. //// sysUserRoleService.save(userRole);
  133. ////
  134. //// if (esmUserInternalCheck != null) {
  135. //// esmUserInternalCheck.setCheckid(checkid);
  136. //// esmUserInternalCheck.setId(nextPK);
  137. //// esmUserInternalCheck.setStatus("0"); //0 申请审核 1 审核通过 2 审核不通过 3 退回修改
  138. //// result = esmUserInternalCheckService.insertSelective(esmUserInternalCheck);
  139. //// }
  140. //// EsmUserAgentCheck esmUserAgentCheck = record.getEsmUserAgent();
  141. //// if (esmUserAgentCheck != null) {
  142. //// esmUserAgentCheck.setCheckid(checkid);
  143. //// esmUserAgentCheck.setId(nextPK);
  144. //// result = esmUserAgentCheckService.insertSelective(esmUserAgentCheck);
  145. //// }
  146. //// } else if (StringUtils.isNullOrEmpty(sysUserCheck.getCheckid())) { //修改正式信息后提交
  147. //// if (!StringUtils.isNullOrEmpty(sysUserCheck.getMobile())) {
  148. ////// List<SysUser> users = sysUserService.selectList(" where id != ? and mobile=?", new Object[]{sysUserCheck.getId(), sysUserCheck.getMobile()});
  149. //// LambdaQueryWrapper<SysUser> lqw = new LambdaQueryWrapper<>();
  150. //// lqw.ne(SysUser::getId,sysUserCheck.getId());
  151. //// lqw.eq(SysUser::getMobile,sysUserCheck.getMobile());
  152. //// List<SysUser> users = sysUserService.list(lqw);
  153. //// if (users != null && users.size() > 0) {
  154. //// return HttpResult.error("手机号已存在");
  155. //// }
  156. //// }
  157. //// if (!StringUtils.isNullOrEmpty(esmUserInternalCheck.getIdentity())) {
  158. //// List<EsmUserInternalCheck> users = esmUserInternalCheckService.selectList(" where id != ? and identity=?", new Object[]{sysUserCheck.getId(), esmUserInternalCheck.getIdentity()});
  159. //// if (users != null && users.size() > 0) {
  160. //// return HttpResult.error("身份证号已存在");
  161. //// }
  162. //// }
  163. //// //生成临时表主键 checkid
  164. //// String checkid = String.valueOf(new Date().getTime());
  165. //// sysUserCheck.setCheckid(checkid);
  166. ////
  167. //// sysUserCheck.setStatus(0); //初始化为0 审核后为1 有效
  168. ////
  169. //// sysUserCheck.setCreateBy(getUserName());
  170. //// sysUserCheck.setCreateTime(new Date());
  171. //// sysUserCheck.setLastUpdateBy(getUserName());
  172. //// sysUserCheck.setLastUpdateTime(new Date());
  173. //// result = sysUserCheckService.insertSelective(sysUserCheck);
  174. ////
  175. //// if (esmUserInternalCheck != null) {
  176. //// esmUserInternalCheck.setCheckid(checkid);
  177. //// esmUserInternalCheck.setStatus("0"); //0 申请审核 1 审核通过 2 审核不通过 3 退回修改
  178. //// result = esmUserInternalCheckService.insertSelective(esmUserInternalCheck);
  179. //// }
  180. //// EsmUserAgentCheck esmUserAgentCheck = record.getEsmUserAgent();
  181. //// if (esmUserAgentCheck != null) {
  182. //// esmUserAgentCheck.setCheckid(checkid);
  183. //// result = esmUserAgentCheckService.insertSelective(esmUserAgentCheck);
  184. //// }
  185. //// } else {// 退回修改后重新提交
  186. //// if (!StringUtils.isNullOrEmpty(sysUserCheck.getMobile())) {
  187. //// LambdaQueryWrapper<SysUser> lqw = new LambdaQueryWrapper<>();
  188. //// lqw.ne(SysUser::getId,sysUserCheck.getId());
  189. //// lqw.eq(SysUser::getMobile,sysUserCheck.getMobile());
  190. //// List<SysUser> users = sysUserService.list(lqw);
  191. ////// List<SysUser> users = sysUserService.selectList(" where id != ? and mobile=?", new Object[]{sysUserCheck.getId(), sysUserCheck.getMobile()});
  192. //// if (users != null && users.size() > 0) {
  193. //// return HttpResult.error("手机号已存在");
  194. //// }
  195. //// }
  196. //// if (!StringUtils.isNullOrEmpty(esmUserInternalCheck.getIdentity())) {
  197. //// List<EsmUserInternalCheck> users = esmUserInternalCheckService.selectList(" where id != ? and identity=?", new Object[]{sysUserCheck.getId(), esmUserInternalCheck.getIdentity()});
  198. //// if (users != null && users.size() > 0) {
  199. //// return HttpResult.error("身份证号已存在");
  200. //// }
  201. //// }
  202. //// sysUserCheck.setStatus(0); //初始化为0 审核后为1 有效
  203. //// sysUserCheck.setLastUpdateBy(getUserName());
  204. //// sysUserCheck.setLastUpdateTime(new Date());
  205. //// result = sysUserCheckService.updateSelective(sysUserCheck);
  206. ////
  207. ////
  208. //// if (esmUserInternalCheck != null) {
  209. //// esmUserInternalCheck.setStatus("0"); //0 申请审核 1 审核通过 2 审核不通过 3 退回修改
  210. //// result = esmUserInternalCheckService.updateSelective(esmUserInternalCheck);
  211. //// }
  212. //// EsmUserAgentCheck esmUserAgentCheck = record.getEsmUserAgent();
  213. //// if (esmUserAgentCheck != null) {
  214. //// result = esmUserAgentCheckService.updateSelective(esmUserAgentCheck);
  215. //// }
  216. //// }
  217. ////
  218. //// }
  219. //// //返回人员编号给前端 20200506
  220. //// if (result == 1) {
  221. //// resultStr = sysUserCheck.getId();
  222. //// }
  223. ////
  224. //// return HttpResult.ok(msg, resultStr);
  225. //// }
  226. //
  227. // @ApiOperation("人员审核 传入人员编码和审核状态: 0 申请审核 1 审核通过 2 审核不通过 3 退回修改")
  228. // @GetMapping(value = "/check")
  229. // public HttpResult check(@RequestParam String checkid, @RequestParam String status, String remark) {
  230. // //得到操作用户
  231. // String userName = getUserName();
  232. //
  233. // String res = "更新成功";
  234. // boolean boo = sysUserService.check(checkid, Integer.parseInt(status), remark);
  235. //
  236. // if (!boo) {
  237. // res = "更新失败";
  238. // }
  239. //
  240. // return HttpResult.ok(res);
  241. // }
  242. //
  243. // /**
  244. // * 基础分页查询
  245. // *
  246. // * @param pageRequest
  247. // * @return
  248. // */
  249. // @PostMapping(value = "/findPage")
  250. // public HttpResult findPage(@RequestBody PageRequest pageRequest) {
  251. //
  252. // return HttpResult.ok(sysUserService.gainUserPage(pageRequest));
  253. // }
  254. //
  255. //// /**
  256. //// * 根据主键查询
  257. //// *
  258. //// * @param checkid
  259. //// * @return
  260. //// */
  261. //// @ApiOperation("根据主键查询需要审核的人员信息")
  262. //// @GetMapping(value = "/findById")
  263. //// public HttpResult findById(@RequestParam String checkid) {
  264. //// SysUserCheck sysUser = sysUserCheckService.selectByPk(checkid);
  265. //// if (sysUser != null) {
  266. //// sysUser.setPassword("");
  267. //// sysUser.setSalt("");
  268. //// }
  269. //// EsmUserInternalCheck esmUserInternal = esmUserInternalCheckService.selectByPk(checkid);
  270. //// EsmUserAgentCheck esmUserAgent = esmUserAgentCheckService.selectByPk(checkid);
  271. ////
  272. //// VoEsmUserInternalCheck voEsmUserInternal = new VoEsmUserInternalCheck();
  273. //// voEsmUserInternal.setSysUser(sysUser);
  274. //// voEsmUserInternal.setEsmUserInternal(esmUserInternal);
  275. //// voEsmUserInternal.setEsmUserAgent(esmUserAgent);
  276. ////
  277. //// return HttpResult.ok(voEsmUserInternal);
  278. //// }
  279. ////
  280. //
  281. // /**
  282. // * 个代注册
  283. // *
  284. // * @param record
  285. // * @return
  286. // */
  287. // @PostMapping(value = "/userRegist")
  288. // public HttpResult userRegist(HttpServletRequest request, @RequestBody UserRegistVO record) {
  289. // int noCount = 3;//顺序号是几位的
  290. // Integer result = 0;
  291. // String resultStr = "";
  292. //
  293. // String phoneMsg = record.getPhoneMsg();
  294. // if (StringUtils.isNullOrEmpty(phoneMsg)) {
  295. // return HttpResult.error("短信验证码不能为空");
  296. // }
  297. // // 从session中获取之前保存的短信验证码跟前台传来的验证码进行匹配
  298. //// Object msg = request.getSession().getAttribute("PHONE_SESSION_KEY");
  299. // //从数据库获取最新验证码
  300. // String msg = stringRedisTemplate.opsForValue().get(PHONE_VERIFICATION_CODE_KEY + record.getPhone());
  301. //
  302. // if (msg == null || msg.length() == 0) {
  303. // return HttpResult.error("短信验证码发送失败");
  304. // }
  305. //
  306. // if (!phoneMsg.equals(msg)) {
  307. // return HttpResult.error("短信验证码不正确");
  308. // }
  309. // String recommenderid = record.getRecommenderid();
  310. // if (StringUtils.isNullOrEmpty(recommenderid)) {
  311. // return HttpResult.error("推荐人ID不能为空");
  312. // }
  313. // SysUser recommender = sysUserService.getById(recommenderid);
  314. // if (recommender == null) {
  315. // return HttpResult.error("推荐人信息不存在");
  316. // }
  317. //
  318. // SysUser sysUser = sysUserService.findByPhone(record.getPhone());
  319. // if (sysUser != null) {
  320. // return HttpResult.error("手机号已存在");
  321. // }
  322. //// SysUserCheck sysUserCheck = new SysUserCheck();
  323. //// EsmUserInternalCheck esmUserInternalCheck = new EsmUserInternalCheck();
  324. // EsmUserInternal esmUserInternal = new EsmUserInternal();
  325. // String nextPK = "001";
  326. // //生成临时表主键 checkid
  327. //// String checkid = String.valueOf(new Date().getTime());
  328. //// sysUserCheck.setCheckid(checkid);
  329. // //根据机构号获取userid最大值,不需要加人员类型判断 从sys_user获取
  330. // String maxId = sysUserService.findMaxId(recommender.getDeptId());
  331. // if (StringUtils.isNullOrEmpty(maxId)) {
  332. // nextPK = recommender.getDeptId() + "001";
  333. // } else {
  334. // nextPK = IdGenerate.nextCode(maxId, noCount);
  335. // }
  336. //// sysUserCheck.setId(nextPK);
  337. // if (record.getName() != null && !record.getName().equals("")) {
  338. //// sysUserCheck.setName(record.getName());
  339. //
  340. // esmUserInternal.setAddressnow(record.getAddressnow());
  341. // esmUserInternal.setIdentity(record.getIdentity());
  342. // esmUserInternal.setId(nextPK);
  343. //// esmUserInternalCheck.setAddressnow(record.getAddressnow());
  344. //// esmUserInternalCheck.setIdentity(record.getIdentity());
  345. // } else {
  346. // sysUser.setName("游客");
  347. // }
  348. // sysUser.setUsertype("2"); //个代
  349. // sysUser.setMobile(record.getPhone());
  350. // sysUser.setDeptId(recommender.getDeptId());
  351. // //密码加密
  352. // String salt = PasswordUtils.getSalt();
  353. // String password = PasswordUtils.encode(record.getPassword(), salt);
  354. // sysUser.setPassword(password);
  355. // sysUser.setSalt(salt);
  356. // sysUser.setStatus(2); //1:正常 0:离司 2:新注册 审核后为1
  357. //
  358. // sysUser.setCreateBy(nextPK);
  359. // sysUser.setCreateTime(new Date());
  360. // sysUser.setLastUpdateBy(nextPK);
  361. // sysUser.setLastUpdateTime(new Date());
  362. //
  363. // result = sysUserService.save(sysUser) == true ? 1 : 0;
  364. //
  365. // //角色配置
  366. // SysUserRole userRole = new SysUserRole();
  367. // userRole.setUserId(nextPK);
  368. // userRole.setRoleId(2L);
  369. // sysUserRoleService.save(userRole);
  370. //
  371. //
  372. // //返回人员编号给前端 20200506
  373. // if (result == 1) {
  374. // resultStr = sysUser.getId();
  375. // }
  376. //
  377. // return HttpResult.ok("保存成功", resultStr);
  378. // }
  379. //// /**
  380. //// * 个代注册
  381. //// *
  382. //// * @param record
  383. //// * @return
  384. //// */
  385. //// @PostMapping(value = "/userRegist")
  386. //// public HttpResult userRegist(HttpServletRequest request, @RequestBody UserRegistVO record) {
  387. //// int noCount = 3;//顺序号是几位的
  388. //// Integer result = 0;
  389. //// String resultStr = "";
  390. ////
  391. //// String phoneMsg = record.getPhoneMsg();
  392. //// if (StringUtils.isNullOrEmpty(phoneMsg)) {
  393. //// return HttpResult.error("短信验证码不能为空");
  394. //// }
  395. //// // 从session中获取之前保存的短信验证码跟前台传来的验证码进行匹配
  396. ////// Object msg = request.getSession().getAttribute("PHONE_SESSION_KEY");
  397. //// //从数据库获取最新验证码
  398. //// String msg = stringRedisTemplate.opsForValue().get(PHONE_VERIFICATION_CODE_KEY + record.getPhone());
  399. ////
  400. //// if (msg == null || msg.length() == 0) {
  401. //// return HttpResult.error("短信验证码发送失败");
  402. //// }
  403. ////
  404. //// if (!phoneMsg.equals(msg)) {
  405. //// return HttpResult.error("短信验证码不正确");
  406. //// }
  407. //// String recommenderid = record.getRecommenderid();
  408. //// if (StringUtils.isNullOrEmpty(recommenderid)) {
  409. //// return HttpResult.error("推荐人ID不能为空");
  410. //// }
  411. //// SysUser recommender = sysUserService.getById(recommenderid);
  412. //// if (recommender == null) {
  413. //// return HttpResult.error("推荐人信息不存在");
  414. //// }
  415. ////
  416. //// SysUser sysUser = sysUserService.findByPhone(record.getPhone());
  417. //// if (sysUser != null) {
  418. //// return HttpResult.error("手机号已存在");
  419. //// }
  420. //// SysUserCheck sysUserCheck = new SysUserCheck();
  421. //// EsmUserInternalCheck esmUserInternalCheck = new EsmUserInternalCheck();
  422. //// EsmUserInternal esmUserInternal = new EsmUserInternal();
  423. //// String nextPK = "001";
  424. //// //生成临时表主键 checkid
  425. //// String checkid = String.valueOf(new Date().getTime());
  426. //// sysUserCheck.setCheckid(checkid);
  427. //// //根据机构号获取userid最大值,不需要加人员类型判断 从sys_user获取
  428. //// String maxId = esmUserInternalService.findMaxId(recommender.getDeptId());
  429. //// if (StringUtils.isNullOrEmpty(maxId)) {
  430. //// nextPK = recommender.getDeptId() + "001";
  431. //// } else {
  432. //// nextPK = IdGenerate.nextCode(maxId, noCount);
  433. //// }
  434. //// sysUserCheck.setId(nextPK);
  435. //// if (record.getName() != null && !record.getName().equals("")) {
  436. //// sysUserCheck.setName(record.getName());
  437. ////
  438. //// esmUserInternal.setAddressnow(record.getAddressnow());
  439. //// esmUserInternal.setIdentity(record.getIdentity());
  440. //// esmUserInternal.setId(sysUserCheck.getId());
  441. //// esmUserInternalCheck.setAddressnow(record.getAddressnow());
  442. //// esmUserInternalCheck.setIdentity(record.getIdentity());
  443. //// } else {
  444. //// sysUserCheck.setName("游客");
  445. //// }
  446. //// sysUserCheck.setUsertype("B"); //个代
  447. //// sysUserCheck.setMobile(record.getPhone());
  448. //// sysUserCheck.setDeptId(recommender.getDeptId());
  449. //// //密码加密
  450. //// String salt = PasswordUtils.getSalt();
  451. //// String password = PasswordUtils.encode(record.getPassword(), salt);
  452. //// sysUserCheck.setPassword(password);
  453. //// sysUserCheck.setSalt(salt);
  454. //// sysUserCheck.setStatus(2); //1:正常 0:离司 2:新注册 审核后为1
  455. ////
  456. //// sysUserCheck.setCreateBy(nextPK);
  457. //// sysUserCheck.setCreateTime(new Date());
  458. //// sysUserCheck.setLastUpdateBy(nextPK);
  459. //// sysUserCheck.setLastUpdateTime(new Date());
  460. //// result = sysUserCheckService.insertSelective(sysUserCheck);
  461. ////
  462. //// // 插入正式表
  463. //// sysUser = new SysUser();
  464. //// BeanUtils.copyProperties(sysUserCheck, sysUser);
  465. //// result = sysUserService.save(sysUser)==true?1:0;
  466. ////
  467. //// //角色配置
  468. //// SysUserRole userRole = new SysUserRole();
  469. //// userRole.setUserId(nextPK);
  470. //// userRole.setRoleId(2L);
  471. //// sysUserRoleService.save(userRole);
  472. ////
  473. //// esmUserInternalCheck.setCheckid(checkid);
  474. //// esmUserInternalCheck.setId(nextPK);
  475. //// esmUserInternalCheck.setIsteamleader("0");
  476. //// esmUserInternalCheck.setStatus("0"); //0 申请审核 1 审核通过 2 审核不通过 3 退回修改
  477. //// result = esmUserInternalCheckService.insertSelective(esmUserInternalCheck);
  478. ////
  479. //// EsmUserAgentCheck esmUserAgentCheck = new EsmUserAgentCheck();
  480. //// esmUserAgentCheck.setCheckid(checkid);
  481. //// esmUserAgentCheck.setId(nextPK);
  482. //// esmUserAgentCheck.setRecommenderid(recommenderid);
  483. //// esmUserAgentCheck.setRecommendername(record.getRecommendername());
  484. //// result = esmUserAgentCheckService.insertSelective(esmUserAgentCheck);
  485. //// if (record.getName() != null && !record.getName().equals("")) {
  486. //// esmUserInternal.setId(sysUserCheck.getId());
  487. //// esmUserInternalService.updateSelective(esmUserInternal);
  488. ////
  489. //// }
  490. //// //返回人员编号给前端 20200506
  491. //// if (result == 1) {
  492. //// resultStr = sysUserCheck.getId();
  493. //// }
  494. ////
  495. //// return HttpResult.ok("保存成功", resultStr);
  496. //// }
  497. ////
  498. //// @PostMapping(value = "/updateName")
  499. //// public HttpResult updateName(HttpServletRequest request, @RequestBody EsmUserCheck record) {
  500. //// //得到操作用户
  501. //// String res = "更新成功";
  502. //// SysUser sysUser = sysUserService.getById(record.getId());
  503. //// EsmUserInternal esmUserInternal = new EsmUserInternal();
  504. //// esmUserInternal.setAddressnow(record.getAddressnow());
  505. //// esmUserInternal.setIdentity(record.getIdentity());
  506. //// esmUserInternal.setId(record.getId());
  507. ////
  508. //// sysUser.setName(record.getNamespecial());
  509. //// sysUser.setId(record.getId());
  510. //// sysUserService.updateById(sysUser);
  511. //// Integer integer = esmUserInternalService.updateSelective(esmUserInternal);
  512. //// if (integer != 1) {
  513. //// res = "更新失败";
  514. //// }
  515. ////
  516. //// return HttpResult.ok("200", res);
  517. //// }
  518. //}