Commit f3117657 authored by wangqiang's avatar wangqiang

Merge remote-tracking branch 'origin/master'

parents 9fc1509d b89a3c7e
...@@ -69,7 +69,7 @@ public final class SignConstants { ...@@ -69,7 +69,7 @@ public final class SignConstants {
/** /**
* 定义流程判断节点常量 * 定义流程判断节点常量
*/ */
public final static List WfResultList = Arrays.asList("通过", "提交签审", "提交审阅", "提交", "提交提资审阅", "不需要总体室会签", "外协采购单位(过工程部)", "设计协同单位及其他"); public final static List WfResultList = Arrays.asList("通过", "同意", "提交签审", "提交审阅", "提交", "提交提资审阅", "不需要总体室会签", "外协采购单位(过工程部)", "设计协同单位及其他");
/** /**
* 定义总体室签审节点名称 * 定义总体室签审节点名称
*/ */
......
package com.yonde.dcs.plan.common.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author weihongda
* @Date 2024/10/10 21:44
* @Description: 供应商导出VO
*/
@Data
public class ExtSupplierVO implements Serializable {
/**
* 供方编号
*/
@ExcelProperty("供方编号")
private String supplierNumber;
/**
* 供方名称
*/
@ExcelProperty("供方名称")
private String name;
/**
* 统一社会信用引用代码
*/
@ExcelProperty("统一社会信用引用代码")
private String unifiedSocietyCode;
/**
* 供方类别
*/
@ExcelProperty("供方类别")
private String supplierType;
/**
* 供方地址
*/
@ExcelProperty("供方地址")
private String supplierAddress;
/**
* 注册时间
*/
@ExcelProperty("注册时间")
private LocalDateTime registrationTime;
/**
* 注册资金
*/
@ExcelProperty("注册资金")
private String registrationFund;
/**
* 名录有效期
*/
@ExcelProperty("名录有效期")
private LocalDateTime directoryValidity;
/**
* 资质内容
*/
@ExcelProperty("资质内容(承制资格证书)")
private String qscQualificationsContent;
/**
* 证书编号
*/
@ExcelProperty("证书编号")
private String qscCertificateNumber;
/**
* 证书有效期
*/
@ExcelProperty("证书有效期")
private LocalDateTime qscCertificateTime;
/**
* 资质内容
*/
@ExcelProperty("资质内容(质量体系证书)")
private String cqmQualificationsContent;
/**
* 证书编号
*/
@ExcelProperty("证书编号")
private String cqmCertificateNumber;
/**
* 证书有效期
*/
@ExcelProperty("证书有效期")
private LocalDateTime cqmCertificateTime;
/**
* 资质内容
*/
@ExcelProperty("资质内容(科研许可证)")
private String spQualificationsContent;
/**
* 证书编号
*/
@ExcelProperty("证书编号")
private String spCertificateNumber;
/**
* 证书有效期
*/
@ExcelProperty("证书有效期")
private LocalDateTime spCertificateTime;
/**
* 资质内容
*/
@ExcelProperty("资质内容(保密资质证书)")
private String cqcQualificationsContent;
/**
* 证书编号
*/
@ExcelProperty("证书编号")
private String cqcCertificateNumber;
/**
* 证书有效期
*/
@ExcelProperty("证书有效期")
private LocalDateTime cqcCertificateTime;
}
...@@ -2,6 +2,7 @@ package com.yonde.dcs.plan.core.controller; ...@@ -2,6 +2,7 @@ package com.yonde.dcs.plan.core.controller;
import com.yonde.dcs.plan.common.utils.EasyExcelUtils; import com.yonde.dcs.plan.common.utils.EasyExcelUtils;
import com.yonde.dcs.plan.common.vo.ExtSupplierManageVO; import com.yonde.dcs.plan.common.vo.ExtSupplierManageVO;
import com.yonde.dcs.plan.common.vo.ExtSupplierVO;
import com.yonde.dcs.plan.common.vo.SupplierEarlyWarningVO; import com.yonde.dcs.plan.common.vo.SupplierEarlyWarningVO;
import com.yonde.dcs.plan.core.controller.shadow.ExtSupplierManageControllerShadow; import com.yonde.dcs.plan.core.controller.shadow.ExtSupplierManageControllerShadow;
import com.yonde.dcs.plan.core.service.ExtSupplierManageService; import com.yonde.dcs.plan.core.service.ExtSupplierManageService;
...@@ -47,7 +48,7 @@ public class ExtSupplierManageController<V extends ExtSupplierManageVO, S extend ...@@ -47,7 +48,7 @@ public class ExtSupplierManageController<V extends ExtSupplierManageVO, S extend
@ApiOperation("导出供方预警列表") @ApiOperation("导出供方预警列表")
@PostMapping(value = "/exportEarlyWarningData") @PostMapping(value = "/exportEarlyWarningData")
public void exportEarlyWarningData(@RequestParam(value = "fileName", defaultValue = "预警信息列表") String fileName, HttpServletResponse response, public void exportEarlyWarningData(@RequestParam(value = "fileName", defaultValue = "供应商预警信息列表") String fileName, HttpServletResponse response,
@RequestParam(value = "warningDay", defaultValue = "30") int warningDay, @RequestParam(value = "warningDay", defaultValue = "30") int warningDay,
@RequestBody SearchQueryCondition searchQueryCondition) { @RequestBody SearchQueryCondition searchQueryCondition) {
try { try {
...@@ -70,6 +71,19 @@ public class ExtSupplierManageController<V extends ExtSupplierManageVO, S extend ...@@ -70,6 +71,19 @@ public class ExtSupplierManageController<V extends ExtSupplierManageVO, S extend
public ApiResult contextDisable(@RequestParam("id") Long id) { public ApiResult contextDisable(@RequestParam("id") Long id) {
return ApiResult.ok(extSupplierManageService.contextDisable(id), "操作完成"); return ApiResult.ok(extSupplierManageService.contextDisable(id), "操作完成");
} }
@ApiOperation("导出供应商列表")
@PostMapping(value = "/exportSupplierData")
public void exportSupplierData(HttpServletResponse response,
@RequestParam(value = "fileName", defaultValue = "供应商信息列表") String fileName,
@RequestBody SearchQueryCondition searchQueryCondition) {
try {
List<ExtSupplierVO> list = extSupplierManageService.exportSupplierData(searchQueryCondition);
EasyExcelUtils.exportData(fileName, response, list, ExtSupplierVO.class);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
} }
...@@ -75,13 +75,16 @@ public class ExpenditureContractUtils { ...@@ -75,13 +75,16 @@ public class ExpenditureContractUtils {
//写入签名数据 //写入签名数据
jsonObject.put("bz_photo", extExpenditureContractService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED)); jsonObject.put("bz_photo", extExpenditureContractService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED));
jsonObject.put("bz_date", extExpenditureContractService.getEndDate(activities, SignConstants.SIGN_KEY_PREPARED)); jsonObject.put("bz_date", extExpenditureContractService.getEndDate(activities, SignConstants.SIGN_KEY_PREPARED));
jsonObject.put("bz_comments", extExpenditureContractService.getComments(activities, SignConstants.SIGN_KEY_PREPARED));
jsonObject.put("sh_photo", extExpenditureContractService.getSignImage(activities, SignConstants.SIGN_KEY_SH)); jsonObject.put("sh_photo", extExpenditureContractService.getSignImage(activities, SignConstants.SIGN_KEY_SH));
jsonObject.put("sh_date", extExpenditureContractService.getEndDate(activities, SignConstants.SIGN_KEY_SH)); jsonObject.put("sh_date", extExpenditureContractService.getEndDate(activities, SignConstants.SIGN_KEY_SH));
//总体室审核 //总体室审核
jsonObject.put("zts_photo", extExpenditureContractService.getSignImage(activities, SignConstants.SIGN_KEY_ZTSSH)); jsonObject.put("zts_photo", extExpenditureContractService.getSignImage(activities, SignConstants.SIGN_KEY_ZTSSH));
jsonObject.put("zts_date", extExpenditureContractService.getEndDate(activities, SignConstants.SIGN_KEY_ZTSSH)); jsonObject.put("zts_date", extExpenditureContractService.getEndDate(activities, SignConstants.SIGN_KEY_ZTSSH));
jsonObject.put("zts_comments", extExpenditureContractService.getComments(activities, SignConstants.SIGN_KEY_PREPARED));
jsonObject.put("pz_photo", extExpenditureContractService.getSignImage(activities, SignConstants.SIGN_KEY_APPROVED)); jsonObject.put("pz_photo", extExpenditureContractService.getSignImage(activities, SignConstants.SIGN_KEY_APPROVED));
jsonObject.put("pz_date", extExpenditureContractService.getEndDate(activities, SignConstants.SIGN_KEY_APPROVED)); jsonObject.put("pz_date", extExpenditureContractService.getEndDate(activities, SignConstants.SIGN_KEY_APPROVED));
jsonObject.put("pz_comments", extExpenditureContractService.getComments(activities, SignConstants.SIGN_KEY_PREPARED));
} }
//模板名称 //模板名称
importWordService.getWordAllTable(jsonObject, path + file + ".docx", outFilePath + "outFile.docx"); importWordService.getWordAllTable(jsonObject, path + file + ".docx", outFilePath + "outFile.docx");
......
...@@ -45,4 +45,6 @@ public interface ExtExpenditureContractService<V extends ExtExpenditureContractV ...@@ -45,4 +45,6 @@ public interface ExtExpenditureContractService<V extends ExtExpenditureContractV
String getEndDate(List<DxWfProcessTaskVO> dxWfProcessTaskVO, String activityName); String getEndDate(List<DxWfProcessTaskVO> dxWfProcessTaskVO, String activityName);
ExtExpenditureContractVO termination(Long id); ExtExpenditureContractVO termination(Long id);
String getComments(List<DxWfProcessTaskVO> activities, String activityName);
} }
package com.yonde.dcs.plan.core.service; package com.yonde.dcs.plan.core.service;
import com.yonde.dcs.plan.common.vo.ExtSupplierManageVO; import com.yonde.dcs.plan.common.vo.ExtSupplierManageVO;
import com.yonde.dcs.plan.common.vo.ExtSupplierVO;
import com.yonde.dcs.plan.common.vo.SupplierEarlyWarningVO; import com.yonde.dcs.plan.common.vo.SupplierEarlyWarningVO;
import com.yonde.dcs.plan.core.service.shadow.ExtSupplierManageServiceShadow; import com.yonde.dcs.plan.core.service.shadow.ExtSupplierManageServiceShadow;
import com.yonde.dex.basedata.data.search.SearchQueryCondition; import com.yonde.dex.basedata.data.search.SearchQueryCondition;
...@@ -53,4 +54,11 @@ public interface ExtSupplierManageService<V extends ExtSupplierManageVO> extends ...@@ -53,4 +54,11 @@ public interface ExtSupplierManageService<V extends ExtSupplierManageVO> extends
* @return * @return
*/ */
ExtSupplierManageVO contextDisable(Long id); ExtSupplierManageVO contextDisable(Long id);
/**
* 导出供应商数据
* @param searchQueryCondition
* @return
*/
List<ExtSupplierVO> exportSupplierData(SearchQueryCondition searchQueryCondition);
} }
...@@ -268,6 +268,19 @@ public class ExtExpenditureContractServiceImpl<V extends ExtExpenditureContractV ...@@ -268,6 +268,19 @@ public class ExtExpenditureContractServiceImpl<V extends ExtExpenditureContractV
return this.changeStatus(extExpenditureContractVO.getId(), Constants.TERMINATION, true); return this.changeStatus(extExpenditureContractVO.getId(), Constants.TERMINATION, true);
} }
@Override
public String getComments(List<DxWfProcessTaskVO> activities, String activityName) {
for (DxWfProcessTaskVO wf : activities) {
if (wf.getName().equals(activityName)) {
List<String> comments = wf.getComments();
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(comments)) {
return comments.get(0);
}
}
}
return " ";
}
/** /**
* 获取用户名称及用户id(4.1新) * 获取用户名称及用户id(4.1新)
*/ */
......
...@@ -2,10 +2,7 @@ package com.yonde.dcs.plan.core.service.impl; ...@@ -2,10 +2,7 @@ package com.yonde.dcs.plan.core.service.impl;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.yonde.dcs.plan.common.constants.Constants; import com.yonde.dcs.plan.common.constants.Constants;
import com.yonde.dcs.plan.common.vo.ExtQualificationsVO; import com.yonde.dcs.plan.common.vo.*;
import com.yonde.dcs.plan.common.vo.ExtSupplierManageLinkVO;
import com.yonde.dcs.plan.common.vo.ExtSupplierManageVO;
import com.yonde.dcs.plan.common.vo.SupplierEarlyWarningVO;
import com.yonde.dcs.plan.core.repository.ExtSupplierManageRepository; import com.yonde.dcs.plan.core.repository.ExtSupplierManageRepository;
import com.yonde.dcs.plan.core.service.ExtSupplierManageLinkService; import com.yonde.dcs.plan.core.service.ExtSupplierManageLinkService;
import com.yonde.dcs.plan.core.service.ExtSupplierManageService; import com.yonde.dcs.plan.core.service.ExtSupplierManageService;
...@@ -19,6 +16,7 @@ import com.yonde.dex.dict.feign.DictDataFeignService; ...@@ -19,6 +16,7 @@ import com.yonde.dex.dict.feign.DictDataFeignService;
import com.yonde.dex.dict.service.vo.DictDataVO; import com.yonde.dex.dict.service.vo.DictDataVO;
import com.yonde.dex.wfc.feign.api.WfcProcessFeign; import com.yonde.dex.wfc.feign.api.WfcProcessFeign;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -165,6 +163,58 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme ...@@ -165,6 +163,58 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme
} }
return this.changeStatus(extSupplierManageVO.getId(), Constants.CONTEXT_DISABLE, true); return this.changeStatus(extSupplierManageVO.getId(), Constants.CONTEXT_DISABLE, true);
} }
@Override
public List<ExtSupplierVO> exportSupplierData(SearchQueryCondition searchQueryCondition) {
List<ExtSupplierVO> list = Lists.newArrayList();
Map<String, DictDataVO> supplierTypeMap = this.getDictDataVO(Constants.SUPPLIER_TYPE);
Map<String, DictDataVO> qualificationsContentMap = this.getDictDataVO(Constants.QUALIFICATIONS_CONTENT);
DxPageImpl<V> recursion = this.findRecursion(searchQueryCondition);
List<ExtSupplierManageVO> content = (List<ExtSupplierManageVO>) recursion.getContent();
if (CollectionUtils.isEmpty(content)) {
return list;
}
for (ExtSupplierManageVO extSupplierManageVO : content) {
ExtSupplierVO extSupplierVO = new ExtSupplierVO();
BeanUtils.copyProperties(extSupplierManageVO, extSupplierVO);
DictDataVO supplierType = supplierTypeMap.get(extSupplierManageVO.getSupplierType());
extSupplierVO.setSupplierType(supplierType.getDictValue());
for (ExtSupplierManageLinkVO extSupplierManageLink : extSupplierManageVO.getExtSupplierManageLinks()) {
ExtQualificationsVO target = extSupplierManageLink.getTarget();
String qualificationsContent = target.getQualificationsContent();
String certificateNumber = target.getCertificateNumber();
LocalDateTime certificateTime = target.getCertificateTime();
DictDataVO qualifications = qualificationsContentMap.get(qualificationsContent);
String dictValue = qualifications.getDictValue();
switch (qualificationsContent) {
case "qsc":
extSupplierVO.setQscQualificationsContent(dictValue);
extSupplierVO.setQscCertificateNumber(certificateNumber);
extSupplierVO.setQscCertificateTime(certificateTime);
break;
case "sp":
extSupplierVO.setSpQualificationsContent(dictValue);
extSupplierVO.setSpCertificateNumber(certificateNumber);
extSupplierVO.setSpCertificateTime(certificateTime);
break;
case "cqc":
extSupplierVO.setCqcQualificationsContent(dictValue);
extSupplierVO.setCqcCertificateNumber(certificateNumber);
extSupplierVO.setCqcCertificateTime(certificateTime);
break;
case "cqm":
extSupplierVO.setCqmQualificationsContent(dictValue);
extSupplierVO.setCqmCertificateNumber(certificateNumber);
extSupplierVO.setCqmCertificateTime(certificateTime);
break;
default:
break;
}
}
list.add(extSupplierVO);
}
return list;
}
} }
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