附件上传

2024年8月16日 11:42:20
This commit is contained in:
xiang2lin 2024-08-16 11:43:34 +08:00
parent 47cd2a538d
commit c7c53a65a3
3 changed files with 5 additions and 22 deletions

View File

@ -1,9 +0,0 @@
package com.hzya.frame.grpU8.nxproof.attachment;
/**
* @Description
* @Author xiangerlin
* @Date 2024/8/16 11:07
**/
public class Test {
}

View File

@ -15,7 +15,9 @@ import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.grpU8.nxproof.attachment.dao.IAttachmentFileDao;
import com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity;
import com.hzya.frame.grpU8.nxproof.attachment.service.IAttachmentFileService;
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
import com.hzya.frame.grpU8.nxproof.oerannex.service.IOerAnnexService;
import com.hzya.frame.grpU8.nxproof.oerdjml.dto.FileInfoDTO;
import org.apache.commons.collections.CollectionUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -73,7 +75,6 @@ public class AttachmentFileServiceImpl extends BaseService<AttachmentFileEntity,
@Override
public List<AttachmentFileEntity> queryFile(AttachmentFileEntity entity) throws Exception {
entity.setAcc_name(Constant.CONFIGMAP.get("file_acc_name"));
List<AttachmentFileEntity> list = attachmentFileDao.query(entity);
return list;
}
@ -91,7 +92,7 @@ public class AttachmentFileServiceImpl extends BaseService<AttachmentFileEntity,
if (StrUtil.isNotEmpty(billCode)){
JSONObject params = new JSONObject();
params.put("billNo",billCode);
String res = HttpRequest.post(Constant.CONFIGMAP.get("grp_file_download_url")+"/grp/af/findFilesBB").body(params.toString()).execute().body();
String res = HttpRequest.post("/grp/af/findFilesBB").body(params.toString()).execute().body();
logger.info("根据单号:{},查询到到附件列表为:{}",billCode,res);
if (StrUtil.isNotEmpty(res)){
JSONObject resJson = JSONObject.parseObject(res);
@ -137,7 +138,7 @@ public class AttachmentFileServiceImpl extends BaseService<AttachmentFileEntity,
if (CollectionUtils.isNotEmpty(fileInfoList)){
//保存前先删一下历史附件
OerAnnexEntity delete = new OerAnnexEntity();
delete.setGsdm(Constant.CONFIGMAP.get("gsdm"));
//delete.setGsdm(Constant.CONFIGMAP.get("gsdm"));
delete.setKjnd(kjnd);
delete.setMlid(mlid);
//oerAnnexService.deleteAnnex(delete);
@ -171,7 +172,7 @@ public class AttachmentFileServiceImpl extends BaseService<AttachmentFileEntity,
}
private List<FileInfoDTO> fileDownload(List<JSONObject> fileList){
String dir = Constant.CONFIGMAP.get("file_dest_temp");
String dir = "1";
List<FileInfoDTO> files = new ArrayList<>();
//1下载附件
for (JSONObject fileObj : fileList) {

View File

@ -1,9 +0,0 @@
package com.hzya.frame.grpU8.nxproof.oerannex;
/**
* @Description
* @Author xiangerlin
* @Date 2024/8/16 10:40
**/
public class Test {
}