nidapeng
2024-03-14 7ad3d376d3ccb029bb8077725aa70747b0ebb2ad
server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
@@ -88,6 +88,7 @@
        company.setStatus(Constants.ZERO);
        company.setType(Constants.ZERO);
        company.setSignStatus(Constants.ZERO);
        company.setType(Constants.ZERO);
        company.setSignIdStatus(Constants.ZERO);
        companyMapper.insert(company);
        company.setEditDate(company.getCreateDate());
@@ -98,6 +99,36 @@
        dealFileData(company);
        //处理关联方案
        dealSolutionsData(company);
        return company;
    }
    @Override
    @Transactional
    public Company createShop(Company company) {
        isValidCreateParam(company);
        if(companyMapper.selectCount(new QueryWrapper<Company>().lambda()
                .eq(Company::getCode,company.getCode())
               .or().eq(Company::getPhone,company.getPhone())
               .or().eq(Company::getEmail,company.getEmail())
               .or().eq(Company::getUsername,company.getUsername())
                .or().eq(Company::getName,company.getName()))>0){
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,该企业【名称】【统一信用代码】【邮箱】或者【手机号】已存在,请确认后重新提交!");
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        company.setCreator(user.getId());
        company.setCreateDate(new Date());
        company.setType(Constants.ONE);
        company.setIsdeleted(Constants.ZERO);
        company.setStatus(Constants.ZERO);
        company.setType(Constants.ZERO);
        company.setSignStatus(Constants.ZERO);
        company.setSignIdStatus(Constants.ZERO);
        companyMapper.insert(company);
        company.setEditDate(company.getCreateDate());
        company.setEditor(user.getId());
        //处理登陆账号信息
        dealSystemUserData(company);
        //处理附件信息
        dealFileData(company);
        return company;
    }
    @Override
@@ -153,7 +184,7 @@
            response.setContentType("application/octet-stream");
            response.setHeader("eva-opera-type", "download");
            response.setHeader("eva-download-filename", encodeFileName);
            Constants. packFilesToZip(fileList,response.getOutputStream());
            Constants.packFilesToZip(fileList,response.getOutputStream());
        } catch (IOException e) {
            throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
        }
@@ -339,7 +370,7 @@
        if(company.getSignImg()!=null && StringUtils.isNotBlank(company.getSignImg().getFileurl())){
            multifileList.add(initMultiFileByCompay(company,company.getSignImg(),Constants.MultiFile.COM_SING_IMG.getKey()));
        }else {
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请上传电子签章!");
         //   throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请上传电子签章!");
        }
        if(company.getIdcardImgList()!=null && company.getIdcardImgList()!=null&& company.getIdcardImgList().size()>0){
            for(Multifile f : company.getIdcardImgList()){