From 15e588eb6a7549ecd2aaffb45e67f11e68354eb6 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期一, 05 二月 2024 18:22:19 +0800 Subject: [PATCH] 111 --- server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java index 09fe4cb..148ab94 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java +++ b/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() @@ -622,7 +626,7 @@ .eq(Company::getSignStatus,Constants.ONE)); if(companyList!=null && companyList.size()>0){ for(Company company :companyList){ - //鏌ヨ浼佷笟绛剧害鐘舵�� 瀹℃壒鐘舵��,0姝e湪鐢宠1閫氳繃2椹冲洖 + //鏌ヨ浼佷笟绛剧害鐘舵�� 瀹℃牳鐘舵��,0姝e湪鐢宠1閫氳繃2椹冲洖 int status = signService.organizationAuditStatus(company.getEmail()); if(status == 1){ Company update = new Company(); @@ -656,7 +660,7 @@ .eq(Company::getSignIdStatus,Constants.ZERO)); if(companyList!=null && companyList.size()>0){ for(Company company :companyList){ - //鏌ヨ浼佷笟绛剧害鐘舵�� 瀹℃壒鐘舵��,0姝e湪鐢宠1閫氳繃2椹冲洖 + //鏌ヨ浼佷笟绛剧害鐘舵�� 瀹℃牳鐘舵��,0姝e湪鐢宠1閫氳繃2椹冲洖 Multifile f = multifileMapper.selectOne(new QueryWrapper<Multifile>().lambda() .eq(Multifile::getIsdeleted,Constants.ZERO) .eq(Multifile::getObjType,Constants.MultiFile.COM_SING_IMG.getKey()) -- Gitblit v1.9.3