package platform.modules.build.service; import com.aliyuncs.exceptions.ClientException; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import platform.common.Constant; import platform.common.base.service.BaseService; import platform.common.base.service.DictionaryItemService; import platform.common.util.*; import platform.modules.api.dto.CompanyInfoDto; import platform.modules.api.service.SkyImageApiService; import platform.modules.build.DTO.CompanyDto; import platform.modules.build.DTO.CompanyFeeDto; import platform.modules.build.dao.CompanyDao; import platform.modules.build.entity.BuildInfo; import platform.modules.build.entity.Company; import platform.modules.build.entity.CompanyContact; import platform.modules.carrier.dto.CompanyContacts; import platform.modules.carrier.dto.CustomSearchCondition; import platform.modules.carrier.dto.SearchCondition; import platform.modules.company.entity.CompanyBuildingStreet; import platform.modules.company.entity.ProjectApplication; import platform.modules.company.entity.ProjectApplicationCompanyInfo; import platform.modules.company.entity.StockLand; import platform.modules.company.service.CompanyBuildingStreetService; import platform.modules.company.service.CompanyContactsService; import platform.modules.company.service.ProjectApplicationCompanyInfoService; import platform.modules.government.dto.StreetCompanys; import platform.modules.government.entity.BuildType; import platform.modules.government.entity.Street; import platform.modules.government.entity.User; import platform.modules.government.service.BuildTypeService; import platform.modules.government.service.StreetService; import platform.modules.government.service.UserService; import platform.modules.sys.entity.Approval; import platform.modules.sys.entity.Department; import platform.modules.sys.service.ApprovalService; import platform.modules.sys.service.DepartmentService; import platform.modules.sys.service.WaitToDoService; import platform.modules.sys.web.ResponseMessage; import tk.mybatis.mapper.entity.Example; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Objects; /** * 企业信息Service * * @author lhf * @version 2017-10-26 */ @Service @Transactional(readOnly = true) public class CompanyService extends BaseService { private static Logger logger = LoggerFactory.getLogger(CompanyService.class); @Autowired private CompanyDao companyDao; @Autowired private CompanyContactService companyContactService; @Autowired private BuildTypeService buildTypeService; @Autowired private DepartmentService departmentService; @Autowired private UserService userService; @Autowired private ApprovalService approvalService; @Autowired CompanyContactsService companyContactsService; @Autowired private DictionaryItemService dictionaryItemService; @Autowired private BuildInfoService buildInfoService; @Autowired private StreetService streeService; @Autowired private CompanyBuildingStreetService buildingStreetService; @Autowired private WaitToDoService waitToDoService; @Autowired private ProjectApplicationCompanyInfoService applicationCompanyInfoService; @Autowired private SkyImageApiService skyImageApiService; public PageInfo findPage(Integer pageNum, Integer pageSize, String param, CompanyDto companyDto) throws Exception { /*Example example = new Example(Company.class); Example.Criteria criteria = example.createCriteria(); Example.Criteria criteria2 = example.createCriteria(); if (StringUtils.isNotBlank(param)) { criteria.andLike("company_name", "%" + WebUtil.covertData(param) + "%"); //.orLike("phone", "%" + WebUtil.covertData(param) + "%") //.orLike("contact", "%" + WebUtil.covertData(param) + "%"); } criteria2.andEqualTo("del_flag", 0); criteria2.andEqualTo("build_id", ShiroUtils.getUserEntity().getBuild_id()); if (null != companyDto.getIs_start()) { criteria2.andEqualTo("is_start", companyDto.getIs_start()); } // 倒序 example.and(criteria2); example.orderBy("create_time").desc();*/ PageHelper.startPage(pageNum, pageSize); Integer build_id = ShiroUtils.getUserEntity().getBuild_id(); Integer street_id = ShiroUtils.getUserEntity().getStreet_id(); List contents = null; if (StringUtils.isNotBlank(param)) { String trim = param.trim(); contents = companyDao.selectCompanyByCondition(street_id, build_id, trim); } else { contents = companyDao.selectCompanyByCondition(street_id, build_id, param); } for (Company company : contents) { if (null != company.getType_id()) { BuildType buildType = buildTypeService.findById(company.getType_id()); if (null != buildType) { company.setType_name(buildType.getType()); } } company.setCompanyContacts(companyContactService.findByCompanyId(company.getId())); } return new PageInfo(contents); } @Transactional(readOnly = false) public Boolean saveCompany(Company company) throws Exception { company.setBuild_id(ShiroUtils.getUserEntity().getBuild_id()); company.setStreet_id(ShiroUtils.getUserEntity().getStreet_id()); company.setIs_register(1); company.setIs_start(true); if (this.insertAndGetId(company) == 1) { for (CompanyContact companyContact : company.getCompanyContacts()) { companyContact.setCompany_id(company.getId()); company.setIs_start(true); companyContactService.saveSelective(companyContact); } return true; } return false; } @Transactional(readOnly = false) public Boolean updateCompany(Company company) throws Exception { if (this.updateSelective(company) == 1) { User user = new User(); user.setBuild_id(company.getBuild_id()); user.setStreet_id(company.getStreet_id()); Street street = streeService.findById(company.getStreet_id()); if (street != null) { user.setStreet_name(street.getName()); } if (company.getBuild_id() == null) { user.setBuild_id(null); user.setBuild_name(""); } else { BuildInfo build = buildInfoService.findById(company.getBuild_id()); if (build != null) { user.setBuild_name(build.getName()); } } userService.updateByCompanyId(company.getId().toString(), user); companyContactService.deleteByCompanyId(company.getId()); for (CompanyContact companyContact : company.getCompanyContacts()) { if (null != companyContact.getPhone() || null != companyContact.getContact()) { companyContact.setCompany_id(company.getId()); companyContactService.saveSelective(companyContact); } } //更新厂房所在属地 if (null != company.getBuildingStreets() && company.getBuildingStreets().size() > 0) { buildingStreetService.deleteByCompanyId(company.getId()); for (CompanyBuildingStreet buildingStreet : company.getBuildingStreets()) { if (null != buildingStreet.getStreet_id()) { buildingStreet.setCompany_id(company.getId()); buildingStreetService.saveSelective(buildingStreet); } } } return true; } return false; } public Company findByCompanyName(String companyName) throws Exception { return companyDao.findByCompanyName(companyName); } public PageInfo findPageByName(Integer pageNum, Integer pageSize, String name, List ids) { PageHelper.startPage(pageNum, pageSize); List result = companyDao.findListByCompanyName(name, ids); return new PageInfo(result); } public List findListByCompanyIds(List ids) { List result = companyDao.findListByCompanyIds(ids); return result; } public List findCompanyList() { Example example = new Example(Company.class); Example.Criteria criteria = example.createCriteria(); criteria.andEqualTo("build_id", ShiroUtils.getUserEntity().getBuild_id()); criteria.andEqualTo("del_flag", 0); criteria.andEqualTo("is_start", 1); if (null != ShiroUtils.getUserType() && ShiroUtils.getUserType().equals(Constant.UserType.COMPANY)) { criteria.andEqualTo("id", ShiroUtils.getCompanyId()); } example.orderBy("sort").desc(); List list = companyDao.selectByExample(example); return list; } public List findCompanies() { Example example = new Example(Company.class); Example.Criteria criteria = example.createCriteria(); criteria.andEqualTo("del_flag", 0); criteria.andEqualTo("is_start", 1); List list = companyDao.selectByExample(example); return list; } public Integer findCuntCompanyByBuildId(Integer buildId, String dateFrom, String dateTo) { return companyDao.findCuntCompanyByBuildId(buildId, dateFrom, dateTo); } public PageInfo findCompanyList(Integer pageNum, Integer pageSize, CompanyDto companyDto) { Example example = new Example(Company.class); Example.Criteria criteria = example.createCriteria(); criteria.andEqualTo("del_flag", 0); criteria.andEqualTo("is_start", 1); User currUser = ShiroUtils.getUserEntity(); if (currUser.getUser_type().equals(Constant.UserType.STREET)) { criteria.andEqualTo("street_id", ShiroUtils.getUserEntity().getStreet_id()); } else if (currUser.getUser_type().equals(Constant.UserType.BUILD)) { criteria.andEqualTo("build_id", ShiroUtils.getUserEntity().getBuild_id()); } if (StringUtils.isNotBlank(companyDto.getCompany_name())) { criteria.andLike("company_name", "%" + WebUtil.covertData(companyDto.getCompany_name()) + "%"); } if (null != companyDto.getType()) { criteria.andEqualTo("type", companyDto.getType()); } if (null != companyDto.getIs_product()) { criteria.andEqualTo("is_product", companyDto.getIs_product()); } if (StringUtils.isNotBlank(companyDto.getStreet_ids())) { criteria.andIn("street_id", companyDto.getStreetIdList()); } if (StringUtils.isNotBlank(companyDto.getBuild_ids())) { criteria.andIn("build_id", companyDto.getBuildIdList()); } example.orderBy("sort").desc(); PageHelper.startPage(pageNum, pageSize); List list = companyDao.selectByExample(example); return new PageInfo(list); } /** * 企业费用查询 * * @param pageNum * @param pageSize * @return * @throws Exception */ public PageInfo findCompanyFeePage(Integer pageNum, Integer pageSize, String status, String fee_type) throws Exception { PageHelper.startPage(pageNum, pageSize); List companyFees = companyDao.findCompanyFee(new CompanyFeeDto(ShiroUtils.getUserEntity().getCompany_id(), fee_type, status)); return new PageInfo(companyFees); } public List findLatestCompnayFee(CompanyFeeDto companyFeeDto) { List companyFees = companyDao.findCompanyFee(companyFeeDto); return companyFees; } public Integer findAllCuntCompanyByBuildId(Integer buildId) { return companyDao.findAllCuntCompanyByBuildId(buildId); } public Integer getCompanyCountByStreetName(String name) { return companyDao.getCompanyCountByStreetName(name); } public Integer countByType(Integer typeId) { return companyDao.countByType(typeId); } public Integer countAllCompany() { platform.modules.government.dto.SearchCondition condition = new platform.modules.government.dto.SearchCondition(); return companyDao.countAllCompany(condition); } public Integer countAllCompanyByUserType() { platform.modules.government.dto.SearchCondition condition = new platform.modules.government.dto.SearchCondition(); if (null != ShiroUtils.getUserType() && ShiroUtils.getUserType().equals(Constant.UserType.STREET)) { condition.setUser_type(Constant.UserType.STREET); condition.setStreet_id(ShiroUtils.getStreetId()); } return companyDao.countAllCompany(condition); } //根据id获取企业信息 public Company getCompanyInfo(Integer company_id) { Company companyInfo = null; if (null != company_id) { companyInfo = this.findById(company_id); } if (companyInfo != null) { List list = companyContactService.findByCompanyId(company_id); companyInfo.setCompanyContacts(list); if (null != list && list.size() > 0) { companyInfo.setContact(list.get(0).getContact()); companyInfo.setContact_phone((list.get(0).getPhone())); } if (null != companyInfo.getStreet_id()) { try { companyInfo.setStreet_name(streeService.getStreetName(companyInfo.getStreet_id())); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } companyInfo.setBuildingStreets(buildingStreetService.findByCompanyId(company_id)); //是否经营 if (companyInfo.getOperated() != null) { if (companyInfo.getOperated()) { companyInfo.setOperatedStr("是"); } else { companyInfo.setOperatedStr("否"); } } } return companyInfo == null ? new Company() : companyInfo; } //根据id获取企业信息 public Company getCompanyInfo(StockLand stockLand) { Integer company_id = stockLand.getCompany_id(); Company company = null; if (null != company_id) { company = this.findById(company_id); } if (company != null) { ProjectApplicationCompanyInfo companyInfo = applicationCompanyInfoService.findByApplyIdAndType(stockLand.getId(), Constant.DictionaryType.STOCKLAND); if (companyInfo != null) { company.setContact(companyInfo.getContact()); company.setContact_phone(companyInfo.getContact_phone()); } if (null != company.getStreet_id()) { try { company.setStreet_name(streeService.getStreetName(company.getStreet_id())); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } company.setBuildingStreets(buildingStreetService.findByCompanyId(company_id)); //是否经营 if (company.getOperated() != null) { if (company.getOperated()) { company.setOperatedStr("是"); } else { company.setOperatedStr("否"); } } } return company == null ? new Company() : company; } /** * 查询企业名称是否存在 */ public boolean isCompanyNameExist(String company_name) { boolean flag = companyDao.isCompanyNameExist(company_name) > 0 ? true : false; return flag; } /** * 查询企业统一社会信用代码是否存在 */ public boolean isCompanyUsccExist(String uscc) { boolean flag = companyDao.isCompanyUsccExist(uscc) > 0 ? true : false; return flag; } /** * 查询企业组织机构代码是否存在 */ public boolean isCompanyOrganizationCodeExist(String organization_code, String company_id) { boolean flag = companyDao.isCompanyOrganizationCodeExist(organization_code, company_id) > 0 ? true : false; return flag; } /** * 根据企业名称和组织机构代码查询唯一企业 */ public boolean isCompanyExist(String company_name, String organization_code) { boolean flag = companyDao.isCompanyExist(company_name, organization_code) > 0 ? true : false; return flag; } public ResponseMessage approval(Integer type, Integer id, String approval_comment) throws Exception { Example userexample = new Example(User.class); Example.Criteria usercriteria = userexample.createCriteria(); usercriteria.andEqualTo("del_flag", "0"); usercriteria.andEqualTo("user_type", Constant.UserType.COMPANY); usercriteria.andEqualTo("company_id", id); userexample.orderBy("create_time").asc(); List users = userService.selectByExample(userexample); List companyContacts = companyContactService.findByCompanyId(id); if (type == 1) {//通过 //查询最近的一条审核记录 Approval approval = approvalService.getLatestApproval(id, Constant.DictionaryType.COMPANY_REGISTER); if (approval.getOper_type().equals(Constant.OperType.APPROVED) || approval.getOper_type().equals(Constant.OperType.REJECT)) { return ResponseMessage.error("该单据已审核!"); } String nextChecker = approval.getNextchecker() == null ? "" : approval.getNextchecker(); Company company = this.findById(id); User user = userService.findById(company.getCreate_by()); user.setIs_register(1); user.setIs_start(true); userService.updateSelective(user); //userService.updateIsRegist(user.getId() + "", 1 + ""); company.setIs_register(1); company.setIs_start(true); //} this.updateSelective(company); nextChecker = nextChecker.replace(ShiroUtils.getUserEntity().getId() + ",", ""); Approval approval1 = new Approval(); String department = ""; if (null != userService.findById(ShiroUtils.getUserId()).getDepartment_id()) { Department dept = departmentService.findById(userService.findById(ShiroUtils.getUserId()).getDepartment_id()); if (null != dept) { department = dept.getName(); } } approval1.setDepartment(department); approval1.setApply_id(id); approval1.setType(Constant.DictionaryType.COMPANY_REGISTER); approval1.setApproval_comment(approval_comment); approval1.setBefore_approvalstatus("0"); approval1.setAfter_approvalstatus("1"); approval1.setDeal_time(DateUtil.getTimeString(new Date())); approval1.setChecker(ShiroUtils.getUserId()); approval1.setNextchecker(nextChecker); approval1.setOper_type(Constant.OperType.APPROVED); //保存审核记录 approvalService.insertAndGetId(approval1); if (CommonUtils.isNotNull(users) && users.size() > 0 ) { sendSMSToRegisteredCompanyUser(users.get(0), true, approval1); } } else {//退回 //查询最近的一条审核记录 Approval approval = approvalService.getLatestApproval(id, Constant.DictionaryType.COMPANY_REGISTER); if (approval.getOper_type().equals(Constant.OperType.APPROVED) || approval.getOper_type().equals(Constant.OperType.REJECT)) { return ResponseMessage.error("该单据已审核!"); } Approval approval1 = new Approval(); String department = ""; if (null != userService.findById(ShiroUtils.getUserId()).getDepartment_id()) { Department dept = departmentService.findById(userService.findById(ShiroUtils.getUserId()).getDepartment_id()); if (null != dept) { department = dept.getName(); } } approval1.setDepartment(department); approval1.setApply_id(id); approval1.setType(Constant.DictionaryType.COMPANY_REGISTER); approval1.setApproval_comment(approval_comment); approval1.setBefore_approvalstatus("0"); approval1.setAfter_approvalstatus("0"); approval1.setDeal_time(DateUtil.getTimeString(new Date())); approval1.setChecker(ShiroUtils.getUserId()); approval1.setOper_type(Constant.OperType.REJECT); //保存审核记录 approvalService.insertAndGetId(approval1); //退回,把company删掉,否则不能再注册相同名称的企业 Company company = this.findById(id); company.setDel_flag(true); this.updateSelective(company); User user = userService.findById(company.getCreate_by()); user.setIs_register(2); user.setDel_flag(true); userService.updateSelective(user); if (CommonUtils.isNotNull(user) && users.size() > 0) { sendSMSToRegisteredCompanyUser(users.get(0), false, approval1); } //同步信息给天启 // SyncUserDto dto = new SyncUserDto(); // dto.setAction(Constant.METHOD_STATUS.INSERT); // dto.setOldUserName(""); // dto.setUserName(user.getUser_name()); // dto.setUserLoginName(user.getNick_name()); // dto.setPassword(user.getPassword().trim()); // dto.setCompanyName(user.getCompany_name()); // if (null != user.getStreet_id()) { // Street street = streeService.findById(user.getStreet_id()); // dto.setStreetName(street.getName()); // } // dto.setToken(skyImageApiService.accessToken()); // skyImageApiService.syncUserInfo(dto); } //完成待办 waitToDoService.completeAllTODO(id, Constant.DictionaryType.COMPANY_REGISTER); return ResponseMessage.success("审核成功!"); } //发送短信给企业用户,账号注册成功/失败 // 发送短信 错误修改 wangjiang 2020-1-8 private void sendSMSToRegisteredCompanyUser(User user, Boolean isPassed, Approval approval) { String templateParam; String phone = user.getPhone(); logger.info("send msg to register company user which phone is : {}", phone); if (isPassed) { //发送短信给企业用户,账号注册成功 //您的企业${company_name}账号注册,审核通过啦! 账号名为${nick_name}。感谢您的支持。 // String phone = user.getPhone(); String nick_name = user.getNick_name(); String company_name = user.getCompany_name(); templateParam = "{\"nick_name\":\"" + nick_name + "\",\"company_name\":\"" + company_name + "\"}"; // AlibabaSMSUtil.sendSMS(phone, Constant.SMS_TemplateCode.COMPANY_USER_REGISTER_PASSED, Constant.SINGNAMW, templateParam); } else { //发送短信给企业用户,账号注册失败 //您的企业${company_name}账号注册(账号名为${nick_name}),审核失败。${comment}感谢您的支持。 // String phone = user.getPhone(); String nick_name = user.getNick_name(); String company_name = user.getCompany_name(); String comment = approval.getApproval_comment(); if (null != comment && comment.length() > 20) { comment = comment.substring(0, 20); } templateParam = "{\"nick_name\":\"" + nick_name + "\",\"comment\":\"" + comment + "\",\"company_name\":\"" + company_name + "\"}"; } try { AlibabaSMSUtil.sendSMS(phone, Constant.SMS_TemplateCode.COMPANY_USER_REGISTER_REJECT, Constant.SINGNAMW, templateParam); } catch (ClientException e) { logger.error("发送阿里巴巴sms错误(ClientException):{}", e.getMessage()); e.printStackTrace(); throw new RuntimeException("发送阿里巴巴sms错误(ClientException):" + e.getMessage()); } catch (InterruptedException e) { logger.error("发送阿里巴巴sms错误(InterruptedException):{}", e.getMessage()); e.printStackTrace(); throw new RuntimeException("发送阿里巴巴sms错误(InterruptedException):" + e.getMessage()); } } public List findCompanyByCondition(Integer currentStreet_id, Integer currentUserId, String keyword, Company searchCondition) { return companyDao.findCompanyByCondition(currentStreet_id, currentUserId, Constant.DictionaryType.COMPANY_REGISTER, keyword, searchCondition); } public List findListByContidion(Integer userId, Integer currentStreet_id, String keyword, Company searchCondition) { return companyDao.findListByContidion(userId, currentStreet_id, Constant.DictionaryType.COMPANY_REGISTER, keyword, searchCondition); } public String getCompanyName(Integer id) { Company company = this.findById(id); if (null != company) { return company.getCompany_name(); } return ""; } //获取企业信息,基本信息、联系人 public Company findCompanyInfo(Integer companyId) { if (null != companyId) { Company company = this.findById(companyId); if (null != company.getStreet_id()) { try { company.setStreet_name(streeService.getStreetName(company.getStreet_id())); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } if (null != company) { company.setCompanyContacts(companyContactService.findByCompanyId(companyId)); company.setBuildingStreets(buildingStreetService.findByCompanyId(companyId)); return company; } } return new Company(); } public List findCompanysByBuildIds(List buildIds, String type_id) { Example example = new Example(Company.class); Example.Criteria criteria = example.createCriteria(); Example.Criteria criteria2 = example.createCriteria(); criteria.andEqualTo("del_flag", "0"); if (!Objects.equals("", type_id) && !Objects.equals(null, type_id)) { criteria.andEqualTo("type_id", type_id); } for (String id : buildIds) { criteria2.orEqualTo("build_id", id); } example.and(criteria2); //倒序 example.orderBy("create_time").desc(); List companyInfo = this.selectByExample(example); return companyInfo; } /** * selectCompanyById(由企业id获取企业信息) * * @param id * @return Company */ public Company selectCompanyById(int id) { return companyDao.selectCompanyById(id); } @SuppressWarnings({"unused", "unused"}) public Company findConpanyInfoById(int id) { Company company = this.findById(id); Integer type = company.getType(); //企业性质 if (null != type) { company.setType_name(dictionaryItemService.findByItemId(type).getName()); } else { company.setType_name(""); } //注册资本 Integer currency_unit = company.getCurrency_unit(); if (null != currency_unit) { company.setCurrency_unit_name(dictionaryItemService.findByItemId(currency_unit).getName()); } else { company.setCurrency_unit_name(""); } //街道 Integer street_id = company.getStreet_id(); if (null != street_id) { company.setStreet_name(streeService.selectById(street_id).getName()); } else { company.setStreet_name(""); } //园区 Integer build_id = company.getBuild_id(); if (null != build_id) { company.setBuild_name(buildInfoService.selectById(build_id).getName()); } else { company.setBuild_name(""); } return company; } //存量用地街道查询企业,包含厂房在本街道的企业 public PageInfo findStockLandCompany(Integer pageNum, Integer pageSize, String keyword, CompanyDto companyDto) { PageHelper.startPage(pageNum, pageSize); Integer street_id = ShiroUtils.getUserEntity().getStreet_id(); List companys = null; companys = companyDao.selectStockLandCompany(street_id, keyword); for (Company company : companys) { if (null != company.getType_id()) { BuildType buildType = buildTypeService.findById(company.getType_id()); if (null != buildType) { company.setType_name(buildType.getType()); } } company.setCompanyContacts(companyContactService.findByCompanyId(company.getId())); } return new PageInfo(companys); } public List getStreetCompanys() { return companyDao.getStreetCompanys(); } @Transactional(readOnly = true) public List getTotalCompanys() { Example example = new Example(Company.class); Example.Criteria criteria = example.createCriteria(); criteria.andEqualTo("del_flag", 0); criteria.andEqualTo("is_register", 1); criteria.andEqualTo("is_start", 1); criteria.andIsNotNull("street_id"); return this.selectByExample(example); } public List getCompanyByCondition(SearchCondition condition) { return companyDao.getCompanyByCondition(condition); } public PageInfo getCompanyPageByCondition(Integer pageNum, Integer pageSize, CustomSearchCondition condition) { PageHelper.startPage(pageNum, pageSize); SearchCondition searchCondition = new SearchCondition(); searchCondition.setCompanyName(condition.getName()); List list = companyDao.getCompanyByCondition(searchCondition); return new PageInfo<>(list); } public List getCompanyListByCondition(CustomSearchCondition condition) { SearchCondition searchCondition = new SearchCondition(); searchCondition.setCompanyName(condition.getName()); List list = companyDao.getCompanyByCondition(searchCondition); return list; } public Company findByParkIdAndCompanyName(String company_name, Integer id) { return companyDao.findByParkIdAndCompanyName(company_name, id); } /** * 获取公司信息 * * @param userId * @return */ public CompanyInfoDto findByUserId(Integer userId) { return companyDao.findByUserId(userId); } /** * 获取公司联系人 * * @param letter * @return */ public List findCompanyListByName(String letter, String companyName) { return companyContactService.findCompanyContactList(letter, companyName, ShiroUtils.getStreetId(), ShiroUtils.getBuildId()); } private List companyContacts(String letter, String searchName) { List companies = companyContactService.findContactList(searchName); List companyList = new ArrayList<>(); List contactList = new ArrayList<>(); CompanyContacts ccs = new CompanyContacts(); for (LetterEnum anEnum : LetterEnum.values()) { ccs.setLetter(anEnum.toString()); for (CompanyContact contact : companies) { if (contact.getLetter().equals(anEnum.toString())){ } } } return null; } /** * 根据社会统一信用代码查找企业 * * @param uscc */ public List findListByUscc(String uscc) { return companyDao.findListByUscc(uscc); } }