diff --git a/src/main/java/com/zcloud/controller/safetyInvestment/SafetyInvestmentUseController.java b/src/main/java/com/zcloud/controller/safetyInvestment/SafetyInvestmentUseController.java index 722c6d6..191111a 100644 --- a/src/main/java/com/zcloud/controller/safetyInvestment/SafetyInvestmentUseController.java +++ b/src/main/java/com/zcloud/controller/safetyInvestment/SafetyInvestmentUseController.java @@ -1,21 +1,24 @@ package com.zcloud.controller.safetyInvestment; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.mchange.lang.DoubleUtils; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import com.zcloud.logs.LogAnno; import com.zcloud.service.safetyInvestment.SafetyInvestmentUseService; -import com.zcloud.util.DateUtil; -import com.zcloud.util.Jurisdiction; -import com.zcloud.util.ObjectExcelView; -import com.zcloud.util.Tools; +import com.zcloud.util.*; +import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.StringUtils; +import org.apache.shiro.util.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; +import java.nio.charset.StandardCharsets; import java.util.*; import java.util.stream.Collectors; @@ -133,7 +136,6 @@ public class SafetyInvestmentUseController extends BaseController { pd = this.getPageData(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID List varList = safetyinvestmentuseService.listAll(pd); //列出SafetyInvestmentUse列表 - // 计算预提额合计 Double drawingsTotal = varList.stream(). filter(data -> StringUtils.equals(data.getString("USE_TYPE"), "1")) @@ -145,14 +147,12 @@ public class SafetyInvestmentUseController extends BaseController { .collect(Collectors.groupingBy(data -> data.getString("TYPE"))).forEach((key, value) -> { PageData pageData = new PageData(); double total = value.stream().mapToDouble(data -> Double.valueOf(data.getString("AMOUNT"))).sum(); - pageData.put("type", key); - pageData.put("total", total); + pageData.put("TYPE", key); + pageData.put("TOTAL", String.valueOf(total)); allOutlayTotalList.add(pageData); }); map.put("varList", varList); - map.put("drawingsTotal", drawingsTotal); - map.put("allOutlayTotalList", allOutlayTotalList); map.put("result", errInfo); return map; } diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index faa01a2..55ad328 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -3400,5 +3400,42 @@ public class UsersController extends BaseController { return map; } + @RequestMapping("/getUserNoCorpinfoListAll") + @ResponseBody + @LogAnno(menuType = "综合管理", menuServer = "特种设备", instructionsOperate = "设备管理", instructionsType = "用户列表") + public Object getUserNoCorpinfoListAll(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + + /*检索条件*/ + String NAME = pd.getString("NAME"); //关键词检索条件 姓名 + if (Tools.notEmpty(NAME)) pd.put("NAME", NAME.trim()); + String ID_CARD = pd.getString("ID_CARD"); //关键词检索条件 身份证号 + if (Tools.notEmpty(ID_CARD)) pd.put("ID_CARD", ID_CARD.trim()); + String PHONE = pd.getString("PHONE"); //关键词检索条件 手机号 + if (Tools.notEmpty(PHONE)) pd.put("PHONE", PHONE); + page.setPd(pd); + + List resultList = new ArrayList<>(); + List userList = usersService.getUserNoCorpinfoListAll(page); // 所有无企业信息的所有用户 + Map> dataList = userList.stream().collect(Collectors.groupingBy(data -> data.getString("USER_ID"))); + dataList.forEach((key,value) -> { + resultList.add(value.get(0)); + }); + + List collect = resultList.stream().filter(data -> StringUtils.equals(data.getString("APPLY_TYPE"), "4")).collect(Collectors.toList()); + + System.out.println("collect = " + collect); + /*List dimissionList = userCorpService.getDimissionUser(); + System.out.println("dimissionList = " + dimissionList);*/ + map.put("userList", collect); + map.put("page", page); + map.put("pd", pd); + + map.put("result", errInfo); + return map; + } } diff --git a/src/main/java/com/zcloud/mapper/datasource/system/UserCorpMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/UserCorpMapper.java index 539e453..0883020 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/UserCorpMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/UserCorpMapper.java @@ -78,5 +78,9 @@ public interface UserCorpMapper { void setPractitionerCorpInvalid(PageData pd); List findByUserId(PageData data); + + List getDimissionUser(); + + void modifyUserStatus(String userId); } diff --git a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java index c1a4e41..ee474e7 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java @@ -301,4 +301,7 @@ public interface UsersMapper { List listUserByIds(String[] personIds); List getAllUser(PageData pd); + + List getUserNoCorpinfoListAll(Page page); + } diff --git a/src/main/java/com/zcloud/service/system/UserCorpService.java b/src/main/java/com/zcloud/service/system/UserCorpService.java index 3ade484..246f36a 100644 --- a/src/main/java/com/zcloud/service/system/UserCorpService.java +++ b/src/main/java/com/zcloud/service/system/UserCorpService.java @@ -86,5 +86,9 @@ public interface UserCorpService { Object setPractitionerConfirmByUser(PageData pd) throws Exception; List findByUserId(PageData data); + + List getDimissionUser(); + + void modifyUserStatus(String userId); } diff --git a/src/main/java/com/zcloud/service/system/UsersService.java b/src/main/java/com/zcloud/service/system/UsersService.java index bbd79ec..740b4f5 100644 --- a/src/main/java/com/zcloud/service/system/UsersService.java +++ b/src/main/java/com/zcloud/service/system/UsersService.java @@ -375,4 +375,7 @@ public interface UsersService { List listUserByIds(String[] personIds); List getAllUser(PageData pd); + + List getUserNoCorpinfoListAll(Page page); + } diff --git a/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java index 4a67c65..c95f23e 100644 --- a/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java @@ -261,5 +261,15 @@ public class UserCorpServiceImpl implements UserCorpService { public List findByUserId(PageData data) { return userCorpMapper.findByUserId(data); } + + @Override + public List getDimissionUser() { + return userCorpMapper.getDimissionUser(); + } + + @Override + public void modifyUserStatus(String userId) { + userCorpMapper.modifyUserStatus(userId); + } } diff --git a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java index 03a6c63..3405c5e 100644 --- a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java @@ -1131,212 +1131,425 @@ public class UsersServiceImpl implements UsersService { @Override public ReturnMap setPractitionerAdd(PageData pd, MultipartFile[] files) throws Exception { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - - if (pd.get("USERAVATARURL") != null && !pd.getString("USERAVATARURL").equals("")) { - String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL")); - try { - FaceUtil.compareFace(pd.getString("USERAVATARURL"), pd.getString("USERAVATARURL")); - } catch (Exception e) { - throw new Exception("人脸图像不符合要求,请重新上传"); + if(StringUtils.isEmpty(pd.getString("choice"))) { + if (pd.get("USERAVATARURL") != null && !pd.getString("USERAVATARURL").equals("")) { + String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL")); + try { + FaceUtil.compareFace(pd.getString("USERAVATARURL"), pd.getString("USERAVATARURL")); + } catch (Exception e) { + throw new Exception("人脸图像不符合要求,请重新上传"); + } } - } /*if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) { return ReturnMap.error("身份证号校验不通过,请核对信息"); }*/ - PageData corp = new PageData(); - corp.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); - corp = corpInfoService.findById(corp); - String ROLE_ID = "223f076bf20e46039e95acc091b0b47d"; - if ("518eb2d1c9c1470ba552249d017d29b7".equals(corp.getString("VIPLEVEL"))) { // 双重预防基础版 - ROLE_ID = "c4903c96dfe74451b41bb6daa6e47f11"; - } - else if ("7ba30577e5a54eca90bcbf63f249a3bc".equals(corp.getString("VIPLEVEL"))) { // 双重预防标准版 - ROLE_ID = "223f076bf20e46039e95acc091b0b47d"; - } - else if ("1b47de318d5847a8aabe9bcbb6f82510".equals(corp.getString("VIPLEVEL"))) { // 双重预防升级版 - ROLE_ID = "409688eeb2ad4c728c2155b2982fb3d4"; - } - PageData role = new PageData(); - role.put("ROLE_ID", ROLE_ID); - role = roleService.findById(role); - pd.put("USER_ID", Warden.get32UUID()); - pd.put("ROLE_ID", role.getString("ROLE_ID")); // 个人账号 - pd.put("RIGHTS", role.getString("RIGHTS")); - pd.put("USERNAME", pd.getString("USER_ID_CARD")); - if ("input".equals(pd.getString("LEARNERCATEGORYSTATUS"))) { - pd.put("DICTTYPE", "APPLICABLE_PERSONNEL"); - PageData lc = dictionariesCorpService.saveSelf(pd); - pd.put("LEARNERCATEGORY", lc.getString("DICTIONARIES_ID")); - } + PageData corp = new PageData(); + corp.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); + corp = corpInfoService.findById(corp); + String ROLE_ID = "223f076bf20e46039e95acc091b0b47d"; + if ("518eb2d1c9c1470ba552249d017d29b7".equals(corp.getString("VIPLEVEL"))) { // 双重预防基础版 + ROLE_ID = "c4903c96dfe74451b41bb6daa6e47f11"; + } + else if ("7ba30577e5a54eca90bcbf63f249a3bc".equals(corp.getString("VIPLEVEL"))) { // 双重预防标准版 + ROLE_ID = "223f076bf20e46039e95acc091b0b47d"; + } + else if ("1b47de318d5847a8aabe9bcbb6f82510".equals(corp.getString("VIPLEVEL"))) { // 双重预防升级版 + ROLE_ID = "409688eeb2ad4c728c2155b2982fb3d4"; + } + PageData role = new PageData(); + role.put("ROLE_ID", ROLE_ID); + role = roleService.findById(role); + pd.put("USER_ID", Warden.get32UUID()); + pd.put("ROLE_ID", role.getString("ROLE_ID")); // 个人账号 + pd.put("RIGHTS", role.getString("RIGHTS")); + pd.put("USERNAME", pd.getString("USER_ID_CARD")); + if ("input".equals(pd.getString("LEARNERCATEGORYSTATUS"))) { + pd.put("DICTTYPE", "APPLICABLE_PERSONNEL"); + PageData lc = dictionariesCorpService.saveSelf(pd); + pd.put("LEARNERCATEGORY", lc.getString("DICTIONARIES_ID")); + } - pd.put("LAST_LOGIN", ""); - pd.put("IP", ""); - pd.put("STATUS", "0"); - pd.put("ISMAIN", "0"); - pd.put("SKIN", "pcoded-navbar navbar-image-3, navbar pcoded-header navbar-expand-lg navbar-light header-dark"); - pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), "Aa@123456").toString()); + pd.put("LAST_LOGIN", ""); + pd.put("IP", ""); + pd.put("STATUS", "0"); + pd.put("ISMAIN", "0"); + pd.put("SKIN", "pcoded-navbar navbar-image-3, navbar pcoded-header navbar-expand-lg navbar-light header-dark"); + pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), "Aa@123456").toString()); - if (usersMapper.findByUsername(pd) == null) { + if (usersMapper.findByUsername(pd) == null) { - // 申请入职企业 - PageData applyCorp = new PageData(); - Warden.initData(applyCorp, "app", pd); - applyCorp.put("USER_CORP_ID", Warden.get32UUID()); - applyCorp.put("USER_ID", pd.getString("USER_ID")); - applyCorp.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); // 入职企业 - applyCorp.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID")); // 部门 - applyCorp.put("POST_ID", pd.getString("POST_ID")); // 岗位 - applyCorp.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE")); // 倒班类型-1级 - applyCorp.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO")); // 倒班类型-2级 - applyCorp.put("DURATION", pd.getString("DURATION")); // - applyCorp.put("WORKSTATUS", pd.getString("WORKSTATUS")); // - applyCorp.put("WORKPERIOD", pd.getString("WORKPERIOD")); // + // 申请入职企业 + PageData applyCorp = new PageData(); + Warden.initData(applyCorp, "app", pd); + applyCorp.put("USER_CORP_ID", Warden.get32UUID()); + applyCorp.put("USER_ID", pd.getString("USER_ID")); + applyCorp.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); // 入职企业 + applyCorp.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID")); // 部门 + applyCorp.put("POST_ID", pd.getString("POST_ID")); // 岗位 + applyCorp.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE")); // 倒班类型-1级 + applyCorp.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO")); // 倒班类型-2级 + applyCorp.put("DURATION", pd.getString("DURATION")); // + applyCorp.put("WORKSTATUS", pd.getString("WORKSTATUS")); // + applyCorp.put("WORKPERIOD", pd.getString("WORKPERIOD")); // - applyCorp.put("ENTRY_DATE", pd.getString("ENTRY_DATE")); // 入职时间 - applyCorp.put("APPLY_STATUS", "0"); // 0.申请中 - applyCorp.put("APPLY_TYPE", "2"); // 2.企业添加入职申请 - applyCorp.put("APPLY_CONTENT", ""); // - if ("select".equals(pd.getString("letDutiesType"))) { - pd.put("DUTIES", pd.getString("DUTIES")); - } else { - PageData dicPd = new PageData(); - dicPd.put("PARENT_ID", "09e36ac01e9540f8bc84eab1c1a78754"); - dicPd.put("BIANMA", "zhiwu"); - dicPd.put("NAME", pd.getString("DUTIESValue")); - dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd); - if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) { - pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID")); - }else{ + applyCorp.put("ENTRY_DATE", pd.getString("ENTRY_DATE")); // 入职时间 + applyCorp.put("APPLY_STATUS", "0"); // 0.申请中 + applyCorp.put("APPLY_TYPE", "2"); // 2.企业添加入职申请 + applyCorp.put("APPLY_CONTENT", ""); // + if ("select".equals(pd.getString("letDutiesType"))) { pd.put("DUTIES", pd.getString("DUTIES")); + } else { + PageData dicPd = new PageData(); + dicPd.put("PARENT_ID", "09e36ac01e9540f8bc84eab1c1a78754"); + dicPd.put("BIANMA", "zhiwu"); + dicPd.put("NAME", pd.getString("DUTIESValue")); + dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd); + if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) { + pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID")); + }else{ + pd.put("DUTIES", pd.getString("DUTIES")); + } } - } - applyCorp.put("DUTIES", pd.getString("DUTIES")); // 职务 - if ("select".equals(pd.getString("letTitleType"))) { - pd.put("TITLE", pd.getString("TITLE")); - } else { - PageData dicPd = new PageData(); - dicPd.put("PARENT_ID", "945a6b10e59946078b500f0fbafa8679"); - dicPd.put("BIANMA", "zhicheng"); - dicPd.put("NAME", pd.getString("letTitleValue")); - dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd); - if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) { - pd.put("TITLE", dicPd.getString("DICTIONARIES_ID")); - }else{ + applyCorp.put("DUTIES", pd.getString("DUTIES")); // 职务 + if ("select".equals(pd.getString("letTitleType"))) { pd.put("TITLE", pd.getString("TITLE")); + } else { + PageData dicPd = new PageData(); + dicPd.put("PARENT_ID", "945a6b10e59946078b500f0fbafa8679"); + dicPd.put("BIANMA", "zhicheng"); + dicPd.put("NAME", pd.getString("letTitleValue")); + dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd); + if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) { + pd.put("TITLE", dicPd.getString("DICTIONARIES_ID")); + }else{ + pd.put("TITLE", pd.getString("TITLE")); + } } - } - applyCorp.put("TITLE", pd.getString("TITLE")); // 职称 - userCorpService.save(applyCorp); + applyCorp.put("TITLE", pd.getString("TITLE")); // 职称 + userCorpService.save(applyCorp); - List filePaths = new ArrayList<>(); - PageData idCard = new PageData(); - Warden.initData(idCard, "app", pd); - PageData driverLicense = new PageData(); - Warden.initData(driverLicense, "app", pd); - PageData qualificationCertificate = new PageData(); - Warden.initData(qualificationCertificate, "app", pd); - for (int i = 0; i < files.length; i++) { - //保存签名文件 - String ffile = "practitioner"+ "/" +DateUtil.getYear()+ "/" +DateUtil.getMonth()+ "/" +DateUtil.getOnlyDay(); - String fileName = UuidUtil.get32UUID() + files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".")); - smb.sshSftp(files[i], fileName, Const.FILEPATHFILE + ffile); - switch (i) { - case 0: - idCard.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName); - break; - case 1: - idCard.put("ID_PHOTO_BACK", Const.FILEPATHFILE + ffile + "/" + fileName); - break; - case 2: - driverLicense.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName); - break; - case 3: - qualificationCertificate.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName); - break; + List filePaths = new ArrayList<>(); + PageData idCard = new PageData(); + Warden.initData(idCard, "app", pd); + PageData driverLicense = new PageData(); + Warden.initData(driverLicense, "app", pd); + PageData qualificationCertificate = new PageData(); + Warden.initData(qualificationCertificate, "app", pd); + for (int i = 0; i < files.length; i++) { + //保存签名文件 + String ffile = "practitioner"+ "/" +DateUtil.getYear()+ "/" +DateUtil.getMonth()+ "/" +DateUtil.getOnlyDay(); + String fileName = UuidUtil.get32UUID() + files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(files[i], fileName, Const.FILEPATHFILE + ffile); + switch (i) { + case 0: + idCard.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName); + break; + case 1: + idCard.put("ID_PHOTO_BACK", Const.FILEPATHFILE + ffile + "/" + fileName); + break; + case 2: + driverLicense.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName); + break; + case 3: + qualificationCertificate.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName); + break; + } } - } - idCard.put("USER_CERTIFICATE_ID", Warden.get32UUID()); - idCard.put("USER_ID", pd.getString("USER_ID")); - idCard.put("CERTIFICATE_CATEGORY", "1"); // 身份证 - idCard.put("ID_NO", pd.getString("USER_ID_CARD")); + idCard.put("USER_CERTIFICATE_ID", Warden.get32UUID()); + idCard.put("USER_ID", pd.getString("USER_ID")); + idCard.put("CERTIFICATE_CATEGORY", "1"); // 身份证 + idCard.put("ID_NO", pd.getString("USER_ID_CARD")); // idCard.put("ID_NATIONALITY", pd.getString("DRIVING_NATIONALITY")); // idCard.put("ID_ISSUE_DATE", pd.getString("DRIVER_LICENSE_ISSUE_DATE")); - idCard.put("ID_VALIDITY_START", pd.getString("ID_CARD_VALIDITY_START")); - idCard.put("ID_VALIDITY_END", pd.getString("ID_CARD_VALIDITY_END")); - idCard.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS")); - idCard.put("ID_ORGAN", pd.getString("ID_CARD_ORGAN")); - userCertificateService.save(idCard); + idCard.put("ID_VALIDITY_START", pd.getString("ID_CARD_VALIDITY_START")); + idCard.put("ID_VALIDITY_END", pd.getString("ID_CARD_VALIDITY_END")); + idCard.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS")); + idCard.put("ID_ORGAN", pd.getString("ID_CARD_ORGAN")); + userCertificateService.save(idCard); - // 驾驶证 - driverLicense.put("USER_CERTIFICATE_ID", Warden.get32UUID()); - driverLicense.put("USER_ID", pd.getString("USER_ID")); - driverLicense.put("CERTIFICATE_CATEGORY", "2"); - driverLicense.put("ID_NO", pd.getString("DRIVER_LICENSE_NO")); - driverLicense.put("ID_NATIONALITY", pd.getString("DRIVING_NATIONALITY")); - driverLicense.put("ID_ISSUE_DATE", pd.getString("DRIVER_LICENSE_ISSUE_DATE")); - driverLicense.put("ID_VALIDITY_START", pd.getString("DRIVER_LICENSE_VALIDITY_START")); - driverLicense.put("ID_VALIDITY_END", pd.getString("DRIVER_LICENSE_VALIDITY_END")); - driverLicense.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS")); - driverLicense.put("ID_ORGAN", pd.getString("DRIVER_LICENSE_ORGAN")); - userCertificateService.save(driverLicense); - String[] DRIVING_MODEL = pd.getString("DRIVING_MODEL").split(","); - for (int i = 0; i < DRIVING_MODEL.length; i++) { - PageData driverLicenseCategory = new PageData(); - driverLicenseCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID()); - driverLicenseCategory.put("USER_CERTIFICATE_ID", driverLicense.getString("USER_CERTIFICATE_ID")); - driverLicenseCategory.put("USER_ID", pd.getString("USER_ID")); - driverLicenseCategory.put("ALLOW_QUALIFICATION", DRIVING_MODEL[i]); - userCertificateAppendixService.save(driverLicenseCategory); - } + // 驾驶证 + driverLicense.put("USER_CERTIFICATE_ID", Warden.get32UUID()); + driverLicense.put("USER_ID", pd.getString("USER_ID")); + driverLicense.put("CERTIFICATE_CATEGORY", "2"); + driverLicense.put("ID_NO", pd.getString("DRIVER_LICENSE_NO")); + driverLicense.put("ID_NATIONALITY", pd.getString("DRIVING_NATIONALITY")); + driverLicense.put("ID_ISSUE_DATE", pd.getString("DRIVER_LICENSE_ISSUE_DATE")); + driverLicense.put("ID_VALIDITY_START", pd.getString("DRIVER_LICENSE_VALIDITY_START")); + driverLicense.put("ID_VALIDITY_END", pd.getString("DRIVER_LICENSE_VALIDITY_END")); + driverLicense.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS")); + driverLicense.put("ID_ORGAN", pd.getString("DRIVER_LICENSE_ORGAN")); + userCertificateService.save(driverLicense); + String[] DRIVING_MODEL = pd.getString("DRIVING_MODEL").split(","); + for (int i = 0; i < DRIVING_MODEL.length; i++) { + PageData driverLicenseCategory = new PageData(); + driverLicenseCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID()); + driverLicenseCategory.put("USER_CERTIFICATE_ID", driverLicense.getString("USER_CERTIFICATE_ID")); + driverLicenseCategory.put("USER_ID", pd.getString("USER_ID")); + driverLicenseCategory.put("ALLOW_QUALIFICATION", DRIVING_MODEL[i]); + userCertificateAppendixService.save(driverLicenseCategory); + } - // 道路运输从业资格证 - qualificationCertificate.put("USER_CERTIFICATE_ID", Warden.get32UUID()); - qualificationCertificate.put("USER_ID", pd.getString("USER_ID")); - qualificationCertificate.put("CERTIFICATE_CATEGORY", "3"); - qualificationCertificate.put("ID_NO", pd.getString("QUALIFICATION_CERTIFICATE_NO")); - qualificationCertificate.put("ID_NATIONALITY", pd.getString("QUALIFICATION_CERTIFICATE_NATIONALITY")); - qualificationCertificate.put("ID_ISSUE_DATE", pd.getString("QUALIFICATION_CERTIFICATE_ISSUE_DATE")); - qualificationCertificate.put("ID_VALIDITY_START", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_START")); - qualificationCertificate.put("ID_VALIDITY_END", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_END")); - qualificationCertificate.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS")); - qualificationCertificate.put("ID_ORGAN", pd.getString("QUALIFICATION_CERTIFICATE_ORGAN")); - userCertificateService.save(qualificationCertificate); - String[] QUALIFICATION_CERTIFICATE_CATEGORY = pd.getString("QUALIFICATION_CERTIFICATE_CATEGORY").split(","); - for (int i = 0; i < QUALIFICATION_CERTIFICATE_CATEGORY.length; i++) { - PageData qualificationCertificateCategory = new PageData(); - qualificationCertificateCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID()); - qualificationCertificateCategory.put("USER_CERTIFICATE_ID", qualificationCertificate.getString("USER_CERTIFICATE_ID")); - qualificationCertificateCategory.put("USER_ID", pd.getString("USER_ID")); - qualificationCertificateCategory.put("ALLOW_QUALIFICATION", QUALIFICATION_CERTIFICATE_CATEGORY[i]); - userCertificateAppendixService.save(qualificationCertificateCategory); - } + // 道路运输从业资格证 + qualificationCertificate.put("USER_CERTIFICATE_ID", Warden.get32UUID()); + qualificationCertificate.put("USER_ID", pd.getString("USER_ID")); + qualificationCertificate.put("CERTIFICATE_CATEGORY", "3"); + qualificationCertificate.put("ID_NO", pd.getString("QUALIFICATION_CERTIFICATE_NO")); + qualificationCertificate.put("ID_NATIONALITY", pd.getString("QUALIFICATION_CERTIFICATE_NATIONALITY")); + qualificationCertificate.put("ID_ISSUE_DATE", pd.getString("QUALIFICATION_CERTIFICATE_ISSUE_DATE")); + qualificationCertificate.put("ID_VALIDITY_START", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_START")); + qualificationCertificate.put("ID_VALIDITY_END", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_END")); + qualificationCertificate.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS")); + qualificationCertificate.put("ID_ORGAN", pd.getString("QUALIFICATION_CERTIFICATE_ORGAN")); + userCertificateService.save(qualificationCertificate); + String[] QUALIFICATION_CERTIFICATE_CATEGORY = pd.getString("QUALIFICATION_CERTIFICATE_CATEGORY").split(","); + for (int i = 0; i < QUALIFICATION_CERTIFICATE_CATEGORY.length; i++) { + PageData qualificationCertificateCategory = new PageData(); + qualificationCertificateCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID()); + qualificationCertificateCategory.put("USER_CERTIFICATE_ID", qualificationCertificate.getString("USER_CERTIFICATE_ID")); + qualificationCertificateCategory.put("USER_ID", pd.getString("USER_ID")); + qualificationCertificateCategory.put("ALLOW_QUALIFICATION", QUALIFICATION_CERTIFICATE_CATEGORY[i]); + userCertificateAppendixService.save(qualificationCertificateCategory); + } // pd.put("TYPE_OF_WORK", pd.getString("POST_ID")); - pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916"); // sys_userinfo 证件类型:身份证 - pd.put("AUTHENTICATION", "0"); // sys_userinfo 学员是否认证 0否 1是 + pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916"); // sys_userinfo 证件类型:身份证 + pd.put("AUTHENTICATION", "0"); // sys_userinfo 学员是否认证 0否 1是 - pd.put("DUTIES", ""); // 职务 - pd.put("TITLE", ""); // 职称 - pd.put("ENTRY_DATE", ""); // 入职时间 - userInfoService.save(pd); - pd.put("CORPINFO_ID", ""); // 入职企业 - pd.put("DEPARTMENT_ID", ""); // 部门 - pd.put("POST_ID", ""); // 岗位 - pd.put("SHIFTDUTYONE", ""); // 倒班类型-1级 - pd.put("SHIFTDUTYTWO", ""); // 倒班类型-2级 - pd.put("DURATION", ""); // - pd.put("WORKSTATUS", ""); // - pd.put("WORKPERIOD", ""); // - usersMapper.saveUser(pd); - String[] PERSONNEL_TYPES = pd.getString("PERSONNEL_TYPE").split(","); - for (String str : PERSONNEL_TYPES) { - PageData pdd = new PageData(); - pdd.put("ID", Warden.get32UUID()); - pdd.put("USER_ID", pd.getString("USER_ID")); - pdd.put("PERSONNEL_TYPE", str); - userInfoService.addUserInfoPersonnelType(pdd); + pd.put("DUTIES", ""); // 职务 + pd.put("TITLE", ""); // 职称 + pd.put("ENTRY_DATE", ""); // 入职时间 + userInfoService.save(pd); + pd.put("CORPINFO_ID", ""); // 入职企业 + pd.put("DEPARTMENT_ID", ""); // 部门 + pd.put("POST_ID", ""); // 岗位 + pd.put("SHIFTDUTYONE", ""); // 倒班类型-1级 + pd.put("SHIFTDUTYTWO", ""); // 倒班类型-2级 + pd.put("DURATION", ""); // + pd.put("WORKSTATUS", ""); // + pd.put("WORKPERIOD", ""); // + usersMapper.saveUser(pd); + String[] PERSONNEL_TYPES = pd.getString("PERSONNEL_TYPE").split(","); + for (String str : PERSONNEL_TYPES) { + PageData pdd = new PageData(); + pdd.put("ID", Warden.get32UUID()); + pdd.put("USER_ID", pd.getString("USER_ID")); + pdd.put("PERSONNEL_TYPE", str); + userInfoService.addUserInfoPersonnelType(pdd); + } + return ReturnMap.ok(); + } + }else{ + String userId = pd.getString("USER_ID"); + /*userCorpService.modifyUserStatus(userId); + pd.put("USER_ID",userId); + usersMapper.editUser(pd); + return ReturnMap.ok();*/ + if (pd.get("USERAVATARURL") != null && !pd.getString("USERAVATARURL").equals("")) { + String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL")); + try { + FaceUtil.compareFace(pd.getString("USERAVATARURL"), pd.getString("USERAVATARURL")); + } catch (Exception e) { + throw new Exception("人脸图像不符合要求,请重新上传"); + } + } + /*if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) { + return ReturnMap.error("身份证号校验不通过,请核对信息"); + }*/ + PageData corp = new PageData(); + corp.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); + corp = corpInfoService.findById(corp); + String ROLE_ID = "223f076bf20e46039e95acc091b0b47d"; + if ("518eb2d1c9c1470ba552249d017d29b7".equals(corp.getString("VIPLEVEL"))) { // 双重预防基础版 + ROLE_ID = "c4903c96dfe74451b41bb6daa6e47f11"; + } + else if ("7ba30577e5a54eca90bcbf63f249a3bc".equals(corp.getString("VIPLEVEL"))) { // 双重预防标准版 + ROLE_ID = "223f076bf20e46039e95acc091b0b47d"; + } + else if ("1b47de318d5847a8aabe9bcbb6f82510".equals(corp.getString("VIPLEVEL"))) { // 双重预防升级版 + ROLE_ID = "409688eeb2ad4c728c2155b2982fb3d4"; + } + PageData role = new PageData(); + role.put("ROLE_ID", ROLE_ID); + role = roleService.findById(role); + pd.put("USER_ID", userId); + pd.put("ROLE_ID", role.getString("ROLE_ID")); // 个人账号 + pd.put("RIGHTS", role.getString("RIGHTS")); + pd.put("USERNAME", pd.getString("USER_ID_CARD")); + if ("input".equals(pd.getString("LEARNERCATEGORYSTATUS"))) { + pd.put("DICTTYPE", "APPLICABLE_PERSONNEL"); + PageData lc = dictionariesCorpService.saveSelf(pd); + pd.put("LEARNERCATEGORY", lc.getString("DICTIONARIES_ID")); + } + + pd.put("LAST_LOGIN", ""); + pd.put("IP", ""); + pd.put("STATUS", "0"); + pd.put("ISMAIN", "0"); + pd.put("SKIN", "pcoded-navbar navbar-image-3, navbar pcoded-header navbar-expand-lg navbar-light header-dark"); + pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), "Aa@123456").toString()); + + if (usersMapper.findByUsername(pd) == null) { + + // 申请入职企业 + PageData applyCorp = new PageData(); + Warden.initData(applyCorp, "app", pd); + applyCorp.put("USER_CORP_ID", Warden.get32UUID()); + applyCorp.put("USER_ID", pd.getString("USER_ID")); + applyCorp.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); // 入职企业 + applyCorp.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID")); // 部门 + applyCorp.put("POST_ID", pd.getString("POST_ID")); // 岗位 + applyCorp.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE")); // 倒班类型-1级 + applyCorp.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO")); // 倒班类型-2级 + applyCorp.put("DURATION", pd.getString("DURATION")); // + applyCorp.put("WORKSTATUS", pd.getString("WORKSTATUS")); // + applyCorp.put("WORKPERIOD", pd.getString("WORKPERIOD")); // + + applyCorp.put("ENTRY_DATE", pd.getString("ENTRY_DATE")); // 入职时间 + applyCorp.put("APPLY_STATUS", "0"); // 0.申请中 + applyCorp.put("APPLY_TYPE", "2"); // 2.企业添加入职申请 + applyCorp.put("APPLY_CONTENT", ""); // + if ("select".equals(pd.getString("letDutiesType"))) { + pd.put("DUTIES", pd.getString("DUTIES")); + } else { + PageData dicPd = new PageData(); + dicPd.put("PARENT_ID", "09e36ac01e9540f8bc84eab1c1a78754"); + dicPd.put("BIANMA", "zhiwu"); + dicPd.put("NAME", pd.getString("DUTIESValue")); + dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd); + if (!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) { + pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID")); + } else { + pd.put("DUTIES", pd.getString("DUTIES")); + } + } + applyCorp.put("DUTIES", pd.getString("DUTIES")); // 职务 + if ("select".equals(pd.getString("letTitleType"))) { + pd.put("TITLE", pd.getString("TITLE")); + } else { + PageData dicPd = new PageData(); + dicPd.put("PARENT_ID", "945a6b10e59946078b500f0fbafa8679"); + dicPd.put("BIANMA", "zhicheng"); + dicPd.put("NAME", pd.getString("letTitleValue")); + dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd); + if (!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) { + pd.put("TITLE", dicPd.getString("DICTIONARIES_ID")); + } else { + pd.put("TITLE", pd.getString("TITLE")); + } + } + applyCorp.put("TITLE", pd.getString("TITLE")); // 职称 + userCorpService.save(applyCorp); + + + List filePaths = new ArrayList<>(); + PageData idCard = new PageData(); + Warden.initData(idCard, "app", pd); + PageData driverLicense = new PageData(); + Warden.initData(driverLicense, "app", pd); + PageData qualificationCertificate = new PageData(); + Warden.initData(qualificationCertificate, "app", pd); + /*for (int i = 0; i < files.length; i++) { + //保存签名文件 + String ffile = "practitioner" + "/" + DateUtil.getYear() + "/" + DateUtil.getMonth() + "/" + DateUtil.getOnlyDay(); + String fileName = UuidUtil.get32UUID() + files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(files[i], fileName, Const.FILEPATHFILE + ffile); + switch (i) { + case 0: + idCard.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName); + break; + case 1: + idCard.put("ID_PHOTO_BACK", Const.FILEPATHFILE + ffile + "/" + fileName); + break; + case 2: + driverLicense.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName); + break; + case 3: + qualificationCertificate.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName); + break; + } + } + idCard.put("USER_CERTIFICATE_ID", Warden.get32UUID()); + idCard.put("USER_ID", pd.getString("USER_ID")); + idCard.put("CERTIFICATE_CATEGORY", "1"); // 身份证 + idCard.put("ID_NO", pd.getString("USER_ID_CARD")); +// idCard.put("ID_NATIONALITY", pd.getString("DRIVING_NATIONALITY")); +// idCard.put("ID_ISSUE_DATE", pd.getString("DRIVER_LICENSE_ISSUE_DATE")); + idCard.put("ID_VALIDITY_START", pd.getString("ID_CARD_VALIDITY_START")); + idCard.put("ID_VALIDITY_END", pd.getString("ID_CARD_VALIDITY_END")); + idCard.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS")); + idCard.put("ID_ORGAN", pd.getString("ID_CARD_ORGAN")); + userCertificateService.save(idCard);*/ + + // 驾驶证 + driverLicense.put("USER_CERTIFICATE_ID", Warden.get32UUID()); + driverLicense.put("USER_ID", pd.getString("USER_ID")); + driverLicense.put("CERTIFICATE_CATEGORY", "2"); + driverLicense.put("ID_NO", pd.getString("DRIVER_LICENSE_NO")); + driverLicense.put("ID_NATIONALITY", pd.getString("DRIVING_NATIONALITY")); + driverLicense.put("ID_ISSUE_DATE", pd.getString("DRIVER_LICENSE_ISSUE_DATE")); + driverLicense.put("ID_VALIDITY_START", pd.getString("DRIVER_LICENSE_VALIDITY_START")); + driverLicense.put("ID_VALIDITY_END", pd.getString("DRIVER_LICENSE_VALIDITY_END")); + driverLicense.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS")); + driverLicense.put("ID_ORGAN", pd.getString("DRIVER_LICENSE_ORGAN")); + userCertificateService.save(driverLicense); + String[] DRIVING_MODEL = pd.getString("DRIVING_MODEL").split(","); + for (int i = 0; i < DRIVING_MODEL.length; i++) { + PageData driverLicenseCategory = new PageData(); + driverLicenseCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID()); + driverLicenseCategory.put("USER_CERTIFICATE_ID", driverLicense.getString("USER_CERTIFICATE_ID")); + driverLicenseCategory.put("USER_ID", pd.getString("USER_ID")); + driverLicenseCategory.put("ALLOW_QUALIFICATION", DRIVING_MODEL[i]); + userCertificateAppendixService.save(driverLicenseCategory); + } + + // 道路运输从业资格证 + qualificationCertificate.put("USER_CERTIFICATE_ID", Warden.get32UUID()); + qualificationCertificate.put("USER_ID", pd.getString("USER_ID")); + qualificationCertificate.put("CERTIFICATE_CATEGORY", "3"); + qualificationCertificate.put("ID_NO", pd.getString("QUALIFICATION_CERTIFICATE_NO")); + qualificationCertificate.put("ID_NATIONALITY", pd.getString("QUALIFICATION_CERTIFICATE_NATIONALITY")); + qualificationCertificate.put("ID_ISSUE_DATE", pd.getString("QUALIFICATION_CERTIFICATE_ISSUE_DATE")); + qualificationCertificate.put("ID_VALIDITY_START", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_START")); + qualificationCertificate.put("ID_VALIDITY_END", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_END")); + qualificationCertificate.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS")); + qualificationCertificate.put("ID_ORGAN", pd.getString("QUALIFICATION_CERTIFICATE_ORGAN")); + userCertificateService.save(qualificationCertificate); + String[] QUALIFICATION_CERTIFICATE_CATEGORY = pd.getString("QUALIFICATION_CERTIFICATE_CATEGORY").split(","); + for (int i = 0; i < QUALIFICATION_CERTIFICATE_CATEGORY.length; i++) { + PageData qualificationCertificateCategory = new PageData(); + qualificationCertificateCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID()); + qualificationCertificateCategory.put("USER_CERTIFICATE_ID", qualificationCertificate.getString("USER_CERTIFICATE_ID")); + qualificationCertificateCategory.put("USER_ID", pd.getString("USER_ID")); + qualificationCertificateCategory.put("ALLOW_QUALIFICATION", QUALIFICATION_CERTIFICATE_CATEGORY[i]); + userCertificateAppendixService.save(qualificationCertificateCategory); + } +// pd.put("TYPE_OF_WORK", pd.getString("POST_ID")); + pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916"); // sys_userinfo 证件类型:身份证 + pd.put("AUTHENTICATION", "0"); // sys_userinfo 学员是否认证 0否 1是 + + pd.put("DUTIES", ""); // 职务 + pd.put("TITLE", ""); // 职称 + pd.put("ENTRY_DATE", ""); // 入职时间 + /*userInfoService.save(pd);*/ + pd.put("CORPINFO_ID", ""); // 入职企业 + pd.put("DEPARTMENT_ID", ""); // 部门 + pd.put("POST_ID", ""); // 岗位 + pd.put("SHIFTDUTYONE", ""); // 倒班类型-1级 + pd.put("SHIFTDUTYTWO", ""); // 倒班类型-2级 + pd.put("DURATION", ""); // + pd.put("WORKSTATUS", ""); // + pd.put("WORKPERIOD", ""); // + usersMapper.editUser(pd); + String[] PERSONNEL_TYPES = pd.getString("PERSONNEL_TYPE").split(","); + for (String str : PERSONNEL_TYPES) { + PageData pdd = new PageData(); + pdd.put("ID", Warden.get32UUID()); + pdd.put("USER_ID", pd.getString("USER_ID")); + pdd.put("PERSONNEL_TYPE", str); + userInfoService.addUserInfoPersonnelType(pdd); + } + return ReturnMap.ok(); } - return ReturnMap.ok(); } return ReturnMap.error("保存失败"); } @@ -1370,4 +1583,10 @@ public class UsersServiceImpl implements UsersService { public List getAllUser(PageData pd) { return usersMapper.getAllUser(pd); } + + @Override + public List getUserNoCorpinfoListAll(Page page) { + return usersMapper.getUserNoCorpinfoListAll(page); + } + } diff --git a/src/main/resources/mybatis/datasource/system/UserCorpMapper.xml b/src/main/resources/mybatis/datasource/system/UserCorpMapper.xml index 84e864b..c7c7068 100644 --- a/src/main/resources/mybatis/datasource/system/UserCorpMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UserCorpMapper.xml @@ -269,7 +269,8 @@ USER_ID = #{USER_ID} and ISDELETE = '0' - SELECT , ucr.REVIEW_RESULT, @@ -281,4 +282,23 @@ WHERE f.USER_ID = #{USER_ID} AND f.CORPINFO_ID = #{CORPINFO_ID} ORDER BY f.CREATTIME DESC + + + + + update + + set + APPLY_TYPE = '1', + ISDELETE = '0' + where + USER_ID = #{USER_ID} + diff --git a/src/main/resources/mybatis/datasource/system/UsersMapper.xml b/src/main/resources/mybatis/datasource/system/UsersMapper.xml index 9775f9f..e8cfd54 100644 --- a/src/main/resources/mybatis/datasource/system/UsersMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UsersMapper.xml @@ -2006,4 +2006,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by d.LEVEL asc ,d.DEP_ORDER,d.DEPARTMENT_ID asc, u.SORT asc,u.USER_ID + +