jiangping
2024-01-30 a9ca0823ab8f33ca85abebcf6ec4a8da235adb49
server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
@@ -145,7 +145,7 @@
            if(fileList == null || fileList.size() == 0){
                throw  new BusinessException(ResponseStatus.DATA_EMPTY);
            }
            String fileName =  model.getName() +"理赔资料下_"+System.currentTimeMillis()+".zip" ;
            String fileName =  model.getName() +"_企业证件_"+System.currentTimeMillis()+".zip" ;
            String encodeFileName = URLEncoder.encode(fileName);
            response.setHeader("Content-Disposition","attachment;filename=" + encodeFileName);
            response.setContentType("application/octet-stream");
@@ -318,13 +318,16 @@
            company.setSignId("");
        }
        if(company.getIdcardImgList()!=null && company.getIdcardImgList()!=null){
            boolean isNew = false;
            for(Multifile f : company.getIdcardImgList()){
                if(f.getId() !=null){
                    continue;
                }
                isNew = true;
                multifileList.add(initMultiFileByCompay(company,f,Constants.MultiFile.COM_IDCARD_IMG.getKey()));
            }
            objList.add(Constants.MultiFile.COM_IDCARD_IMG.getKey());
            if(isNew)
              objList.add(Constants.MultiFile.COM_IDCARD_IMG.getKey());
        }
        if(objList.size()>0){
            multifileMapper.update(null,new UpdateWrapper<Multifile>().lambda()
@@ -426,9 +429,8 @@
    }
    private void isValidUpdateParam(Company company) {
        if( StringUtils.isBlank(company.getName())
                ||StringUtils.isBlank(company.getUsername())
//                ||StringUtils.isBlank(company.getUsername())
                ||StringUtils.isBlank(company.getCode())
                ||StringUtils.isBlank(company.getCaptche())
                ||StringUtils.isBlank(company.getLegalName())
                ||StringUtils.isBlank(company.getEmail()) ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
@@ -465,7 +467,6 @@
        dealFileDataForUpdate(company);
        Company update = new Company();
        update.setIsdeleted(company.getId());
        update.setName(company.getName());
        update.setCode(company.getCode());
        update.setEditDate(new Date());
@@ -476,6 +477,8 @@
        update.setTaxCode(company.getTaxCode());
        update.setTaxBank(company.getTaxBank());
        update.setEmail(company.getEmail());
        update.setId(model.getId());
        update.setLegalName(company.getLegalName());
        update.setInvoiceAddr(company.getInvoiceAddr());
        update.setSignIdStatus(company.getSignIdStatus());
        update.setInvoiceEmail(company.getInvoiceEmail());
@@ -486,7 +489,7 @@
            //如果邮箱发生改变
            update.setSignStatus(Constants.ZERO);
        }
        companyMapper.updateById(company);
        companyMapper.updateById(update);
        company.setCreator(update.getEditor());
        company.setCreateDate(update.getEditDate());
        if(StringUtils.isNotBlank(company.getUsername())){
@@ -564,6 +567,7 @@
     *   public boolean organizationCreate (String fullname,String creditCode,String legalName,String email,File  businessimg,String notifyUrl){
     */
    @Override
    @Async
    public   void startSignAuth(Integer id){
        Company company = companyMapper.selectById(id);
        Multifile f = multifileMapper.selectOne(new QueryWrapper<Multifile>().lambda()