Commit 43ce681e authored by 侯彦文's avatar 侯彦文

Merge remote-tracking branch 'origin/master'

parents 2ed66a91 207e44eb
......@@ -23,7 +23,7 @@ public class Constants {
/**
* app 内部名称
*/
public static final String APPLICATION_INNER_NAME="dcs-plan";
public static final String APPLICATION_INNER_NAME="inet-plan-contract";
/**
* minio桶名称
......
......@@ -205,8 +205,17 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
}
public ExtIEDPlanVO getIEDPlanByFileNumber(String fileNumber) {
SearchItems iedPlanSearch = new SearchItems();
SearchItem fileNumberFilter = new SearchItem("fileNumber", SearchItem.Operator.EQ, fileNumber, (Object)null);
SearchItem projectIdFilter = new SearchItem("dxContextId", SearchItem.Operator.EQ, projectId, (Object)null);
iedPlanSearch.addItem(fileNumberFilter);
iedPlanSearch.addItem(projectIdFilter);
SearchQueryCondition searchQuery = SearchQueryCondition.builder().searchItems(iedPlanSearch).build();
//根据文件编号查询IED计划
DxPageImpl<ExtIEDPlanVO> IEDPlanPage = extIEDPlanService.findRecursion(SearchUtil.buildQuery("fileNumber", SearchItem.Operator.EQ, fileNumber));
// DxPageImpl<ExtIEDPlanVO> IEDPlanPage = extIEDPlanService.findRecursion(SearchUtil.buildQuery("fileNumber", SearchItem.Operator.EQ, fileNumber));
DxPageImpl<ExtIEDPlanVO> IEDPlanPage = extIEDPlanService.findRecursion(searchQuery);
if (!CollectionUtils.isEmpty(IEDPlanPage.getContent())) {
ExtIEDPlanVO extIEDPlanVOForDB = DxPageUtils.getFirst(IEDPlanPage);
return extIEDPlanVOForDB;
......
......@@ -12,6 +12,8 @@ import com.yonde.dcs.plan.core.service.ExtPuchasePlanAttributeService;
import com.yonde.dcs.plan.core.util.CommonUtils;
import com.yonde.dcs.plan.entity.po.ExtPuchasePlanAttribute;
import com.yonde.dex.basedata.data.search.SearchItem;
import com.yonde.dex.basedata.data.search.SearchItems;
import com.yonde.dex.basedata.data.search.SearchQueryCondition;
import com.yonde.dex.basedata.entity.data.DxPageImpl;
import com.yonde.dex.basedata.entity.data.OperatorType;
import com.yonde.dex.basedata.exception.DxBusinessException;
......@@ -183,8 +185,17 @@ public class PurchasePlanExcelReadListenner extends AnalysisEventListener<ExtPuc
* @return
*/
public ExtPuchasePlanAttributeVO getPurchasePlanByPlanCode(String planCode){
SearchItems purchasePlanSearch = new SearchItems();
SearchItem planCodeFilter = new SearchItem("planCode", SearchItem.Operator.EQ, planCode, (Object)null);
SearchItem projectIdFilter = new SearchItem("dxContextId", SearchItem.Operator.EQ, projectId, (Object)null);
purchasePlanSearch.addItem(planCodeFilter);
purchasePlanSearch.addItem(projectIdFilter);
SearchQueryCondition searchQuery = SearchQueryCondition.builder().searchItems(purchasePlanSearch).build();
//根据计划编码获取数据库中采购计划数据
DxPageImpl<ExtPuchasePlanAttributeVO> dxPuchasePlanPage = extPuchasePlanAttributeService.findRecursion(SearchUtil.buildQuery("planCode", SearchItem.Operator.EQ, planCode));
//DxPageImpl<ExtPuchasePlanAttributeVO> dxPuchasePlanPage = extPuchasePlanAttributeService.findRecursion(SearchUtil.buildQuery("planCode", SearchItem.Operator.EQ, planCode));
DxPageImpl<ExtPuchasePlanAttributeVO> dxPuchasePlanPage = extPuchasePlanAttributeService.findRecursion(searchQuery);
if (!CollectionUtils.isEmpty(dxPuchasePlanPage.getContent())) {
ExtPuchasePlanAttributeVO extPurPlanForDB = DxPageUtils.getFirst(dxPuchasePlanPage);
return extPurPlanForDB;
......
......@@ -109,17 +109,11 @@ public class ExtExpenditureContractServiceImpl<V extends ExtExpenditureContractV
try {
if (obj instanceof ExtExpenditureContractVO) {
ExtExpenditureContractVO expenditureContractVO = (ExtExpenditureContractVO) obj;
/*Class<?> clazz = Class.forName("com.yonde.dcs.plan.core.factory.ExpenditureContractUtils");
Method settingDataMethod = clazz.getMethod("settingData", ExtExpenditureContractVO.class, DxWfProcessInfoVO.class);
settingDataMethod.invoke(SpringUtil.getBean(classType), expenditureContractVO, wfProcessInfoVO);*/
expenditureContractUtils.settingDocData(expenditureContractVO, wfProcessInfoVO);
outFilePath = outFilePath + expenditureContractVO.getSubTypeName() + "\\" + expenditureContractVO.getNumber() + "\\";
sPath = sPath + expenditureContractVO.getSubTypeName() + "\\" + expenditureContractVO.getNumber();
} else if (obj instanceof ExtInComeContractVO) {
ExtInComeContractVO extInComeContractVO = (ExtInComeContractVO) obj;
/*Class<?> clazz = Class.forName("com.yonde.dcs.plan.core.factory.InComeContractUtils");
Method settingDataMethod = clazz.getMethod("settingData", ExtInComeContractVO.class, DxWfProcessInfoVO.class);
settingDataMethod.invoke(SpringUtil.getBean(classType), extInComeContractVO, wfProcessInfoVO);*/
inComeContractUtils.settingDocData(extInComeContractVO, wfProcessInfoVO);
outFilePath = outFilePath + extInComeContractVO.getSubTypeName() + "\\" + extInComeContractVO.getNumber() + "\\";
sPath = sPath + extInComeContractVO.getSubTypeName() + "\\" + extInComeContractVO.getNumber();
......@@ -145,7 +139,7 @@ public class ExtExpenditureContractServiceImpl<V extends ExtExpenditureContractV
//删除生成后的临时文件
FileUtils.deleteDirectory(sPath);
} catch (Exception e) {
log.error("签名----通过不同的合同类型生成不同word错误:{}" + e.getMessage());
log.error("签名----通过不同的合同类型生成不同word错误:", e);
}
}
......@@ -180,9 +174,9 @@ public class ExtExpenditureContractServiceImpl<V extends ExtExpenditureContractV
RepoFileVO field = fileManagerService.uploadFile(multipartFile, getBucketId());
if (field == null) {
log.error("文件上传失败!");
} else {
log.info("文件上传成功:" + field);
return;
}
log.info("文件上传成功:" + field);
//根据docId查询文件对象
RepoFileVO fileVO = fileManagerFeignService.findFileInfoById(field.getId());
//上传到DOC_PDF_FILE为了浏览(Constants.PDF_FILE)
......@@ -221,7 +215,8 @@ public class ExtExpenditureContractServiceImpl<V extends ExtExpenditureContractV
SearchQueryCondition query = SearchQueryCondition.builder()
.openProp(SearchQueryCondition.builder().name("creator").build())
.openProp(SearchQueryCondition.builder().name("modifier").build())
.openProp(SearchQueryCondition.builder().name("objFileLinks").openProp(SearchQueryCondition.builder().name("target").build()).build())
.openProp(SearchQueryCondition.builder().name("objFileLinks")
.openProp(SearchQueryCondition.builder().name("target").build()).build())
.searchItems(SearchItems.builder().item(new SearchItem("id", SearchItem.Operator.EQ,
id, null)).item(new SearchItem("latest", SearchItem.Operator.EQ,
true, null)).operator(SearchItems.BooleanOperator.AND).build()).build();
......
......@@ -207,11 +207,12 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
DxDocumentVO dxDocumentVOForDB = extDxDocumentServiceFeign.saveRecursion(dxDocumentVO);
//保存文档与IED计划的关系
ExtIEDPlanDocLinkVO extIEDPlanDocLinkVO = new ExtIEDPlanDocLinkVO();
extIEDPlanDocLinkVO.setTargetId(dxDocumentVOForDB.getVersionId());
extIEDPlanDocLinkVO.setTargetId(dxDocumentVOForDB.getId());
extIEDPlanDocLinkVO.setSourceId(extIEDPlanVO.getId());
extIEDPlanDocLinkVO.setOperator(OperatorType.ADD);
extIEDPlanDocLinkService.saveRecursion(extIEDPlanDocLinkVO);
return ApiResult.SUCCESS;
}
......
......@@ -150,7 +150,7 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme
log.info("changeStatus.条数:{}", content.size());
for (ExtSupplierManageVO extSupplierManageVO : content) {
Long id = extSupplierManageVO.getId();
this.changeStatus(id, "Expired", true);
this.changeStatus(id, Constants.CONTEXT_DISABLE, true);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment