Merge remote-tracking branch 'origin/master'
# Conflicts: # jero-web/src/views/projectManagement/components/listOfRegulations.vue
This commit is contained in:
+23
-5
@@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import com.jero.common.api.CommonAPI;
|
import com.jero.common.api.CommonAPI;
|
||||||
import com.jero.common.system.vo.DictModel;
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.common.util.oConvertUtils;
|
import com.jero.common.util.oConvertUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecgframework.dict.service.AutoPoiDictServiceI;
|
import org.jeecgframework.dict.service.AutoPoiDictServiceI;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -31,7 +32,8 @@ public class AutoPoiDictConfig implements AutoPoiDictServiceI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过字典查询easypoi,所需字典文本
|
* 通过字典查询easypoi,所需字典文本
|
||||||
*
|
*
|
||||||
|
* 特殊说明:英文文本对应dicCode格式:dicCode_en,且dicTable为空
|
||||||
* @Author:scott
|
* @Author:scott
|
||||||
* @since:2019-04-09
|
* @since:2019-04-09
|
||||||
* @return
|
* @return
|
||||||
@@ -42,7 +44,11 @@ public class AutoPoiDictConfig implements AutoPoiDictServiceI {
|
|||||||
List<DictModel> dictList = null;
|
List<DictModel> dictList = null;
|
||||||
// step.1 如果没有字典表则使用系统字典表
|
// step.1 如果没有字典表则使用系统字典表
|
||||||
if (oConvertUtils.isEmpty(dicTable)) {
|
if (oConvertUtils.isEmpty(dicTable)) {
|
||||||
dictList = commonAPI.queryDictItemsByCode(dicCode);
|
if("en".equals(dicCode.substring(dicCode.lastIndexOf("_")+1))) {
|
||||||
|
dictList = commonAPI.queryDictItemsByCode(dicCode.substring(0, dicCode.lastIndexOf("_")));
|
||||||
|
} else {
|
||||||
|
dictList = commonAPI.queryDictItemsByCode(dicCode);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
dicText = oConvertUtils.getString(dicText, dicCode);
|
dicText = oConvertUtils.getString(dicText, dicCode);
|
||||||
@@ -51,9 +57,21 @@ public class AutoPoiDictConfig implements AutoPoiDictServiceI {
|
|||||||
log.error(e.getMessage(),e);
|
log.error(e.getMessage(),e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (DictModel t : dictList) {
|
if("en".equals(dicCode.substring(dicCode.lastIndexOf("_")+1))) { // 显示英文文本
|
||||||
if(t!=null){
|
for (DictModel t : dictList) {
|
||||||
dictReplaces.add(t.getText() + "_" + t.getValue());
|
if (t != null) {
|
||||||
|
if(StringUtils.isBlank(t.getTextEn())){ // 字典值对应英文文本为空,则显示中文
|
||||||
|
dictReplaces.add(t.getText() + "_" + t.getValue());
|
||||||
|
} else {
|
||||||
|
dictReplaces.add(t.getTextEn() + "_" + t.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else { // 显示中文文本
|
||||||
|
for (DictModel t : dictList) {
|
||||||
|
if (t != null) {
|
||||||
|
dictReplaces.add(t.getText() + "_" + t.getValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dictReplaces != null && dictReplaces.size() != 0) {
|
if (dictReplaces != null && dictReplaces.size() != 0) {
|
||||||
|
|||||||
+2
@@ -63,6 +63,8 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
.orderByDesc(ParamsInfoEO::getCreateTime);
|
.orderByDesc(ParamsInfoEO::getCreateTime);
|
||||||
Page<ParamsInfoEO> page = new Page<ParamsInfoEO>(pageNo, pageSize);
|
Page<ParamsInfoEO> page = new Page<ParamsInfoEO>(pageNo, pageSize);
|
||||||
IPage<ParamsInfoEO> pageList = paramsInfoEOService.page(page, queryWrapper);
|
IPage<ParamsInfoEO> pageList = paramsInfoEOService.page(page, queryWrapper);
|
||||||
|
// List<ParamsInfoEO> rows = pageList.getRecords();
|
||||||
|
// paramsInfoEOService.getTreeDictItemText(rows, cut);
|
||||||
return Result.OK(cut, pageList);
|
return Result.OK(cut, pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -77,8 +77,8 @@ public class ParamsInfoEO implements Serializable {
|
|||||||
private String paramsName;
|
private String paramsName;
|
||||||
|
|
||||||
/**技术领域*/
|
/**技术领域*/
|
||||||
@Excel(name = "*技术领域", width = 15, dicCode = "technology_territory")
|
@Excel(name = "*技术领域", width = 15)
|
||||||
@Dict(dicCode = "technology_territory")
|
// @Dict(dicCode = "technology_territory")
|
||||||
@ApiModelProperty(value = "技术领域")
|
@ApiModelProperty(value = "技术领域")
|
||||||
private String technologyTerritory;
|
private String technologyTerritory;
|
||||||
|
|
||||||
|
|||||||
+3
@@ -1,6 +1,7 @@
|
|||||||
package com.jero.modules.cert.template.mapper;
|
package com.jero.modules.cert.template.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.jero.modules.cert.template.vo.ParamsInfoEnExport;
|
||||||
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
||||||
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -16,4 +17,6 @@ import java.util.List;
|
|||||||
public interface ParamsInfoEOMapper extends BaseMapper<ParamsInfoEO> {
|
public interface ParamsInfoEOMapper extends BaseMapper<ParamsInfoEO> {
|
||||||
|
|
||||||
List<ParamsInfoEO> selectListWithCert(@Param("paramsInfoVO") ParamsInfoVO paramsInfoVO);
|
List<ParamsInfoEO> selectListWithCert(@Param("paramsInfoVO") ParamsInfoVO paramsInfoVO);
|
||||||
|
|
||||||
|
List<ParamsInfoEnExport> selectListWithCertForEnExport(@Param("paramsInfoVO") ParamsInfoVO paramsInfoVO);
|
||||||
}
|
}
|
||||||
|
|||||||
+41
@@ -54,6 +54,37 @@
|
|||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="ParamsInfoEOResultMapWithCertForEnExport" type="com.jero.modules.cert.template.vo.ParamsInfoEnExport">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
<result column="nio_number" property="nioNumber" />
|
||||||
|
<result column="is_must" property="isMust" />
|
||||||
|
<result column="params_name" property="paramsName" />
|
||||||
|
<result column="technology_territory" property="technologyTerritory" />
|
||||||
|
<result column="params_batch" property="paramsBatch" />
|
||||||
|
<result column="duty_territory" property="dutyTerritory" />
|
||||||
|
<result column="description" property="description" />
|
||||||
|
<result column="cert_category" property="certCategory" />
|
||||||
|
<result column="control_type" property="controlType" />
|
||||||
|
<result column="control_values" property="controlValues" />
|
||||||
|
<result column="control_verify" property="controlVerify" />
|
||||||
|
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||||
|
<result column="params_template_id" property="paramsTemplateId" />
|
||||||
|
<collection property="certCategoryParamsInfoEnExportList" javaType="java.util.List" ofType="com.jero.modules.cert.template.vo.CertCategoryParamsInfoEnExport">
|
||||||
|
<id column="ccpi_id" property="id" />
|
||||||
|
<result column="ccpi_params_number" property="paramsNumber" />
|
||||||
|
<result column="ccpi_params_name" property="paramsName" />
|
||||||
|
<result column="ccpi_description" property="description" />
|
||||||
|
<result column="ccpi_nio_number" property="nioNumber" />
|
||||||
|
<result column="ccpi_cert_category" property="certCategory" />
|
||||||
|
<result column="ccpi_params_template_id" property="paramsTemplateId" />
|
||||||
|
</collection>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
<sql id="BaseColumnList">
|
<sql id="BaseColumnList">
|
||||||
pi.id as id,
|
pi.id as id,
|
||||||
pi.create_by as create_by,
|
pi.create_by as create_by,
|
||||||
@@ -112,4 +143,14 @@
|
|||||||
<include refid="BaseQuerySql"/>
|
<include refid="BaseQuerySql"/>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectListWithCertForEnExport" resultMap="ParamsInfoEOResultMapWithCertForEnExport" parameterType="com.jero.modules.cert.template.vo.ParamsInfoVO">
|
||||||
|
select tmp_tb.* from(
|
||||||
|
select
|
||||||
|
<include refid="BaseColumnList"/>
|
||||||
|
from params_info pi
|
||||||
|
left join cert_category_params_info ccpi on pi.nio_number = ccpi.nio_number
|
||||||
|
) tmp_tb
|
||||||
|
<include refid="BaseQuerySql"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
+3
-1
@@ -1,8 +1,8 @@
|
|||||||
package com.jero.modules.cert.template.service;
|
package com.jero.modules.cert.template.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
|
||||||
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||||
|
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@@ -81,4 +81,6 @@ public interface IParamsInfoEOService extends IService<ParamsInfoEO> {
|
|||||||
* @param request
|
* @param request
|
||||||
*/
|
*/
|
||||||
void exportParamsInfo(String cut, ParamsInfoVO paramsInfoVO, String exportExcelName, HttpServletResponse response, HttpServletRequest request);
|
void exportParamsInfo(String cut, ParamsInfoVO paramsInfoVO, String exportExcelName, HttpServletResponse response, HttpServletRequest request);
|
||||||
|
|
||||||
|
void getTreeDictItemText(List<ParamsInfoEO> paramsInfoEOList, String cut);
|
||||||
}
|
}
|
||||||
|
|||||||
+233
-86
@@ -20,8 +20,10 @@ import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
|||||||
import com.jero.modules.oss.entity.OSSFile;
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
import com.jero.modules.split.common.ReadExcel;
|
import com.jero.modules.split.common.ReadExcel;
|
||||||
|
import com.jero.modules.system.entity.SysCategory;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
import com.jero.modules.system.service.ISysDictItemService;
|
import com.jero.modules.system.service.ISysDictItemService;
|
||||||
|
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||||
@@ -59,6 +61,9 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysDictItemService sysDictItemService;
|
private ISysDictItemService sysDictItemService;
|
||||||
|
@Autowired
|
||||||
|
private SysCategoryServiceImpl sysCategoryService;
|
||||||
|
|
||||||
|
|
||||||
@Value(value = "${jero.path.upload}")
|
@Value(value = "${jero.path.upload}")
|
||||||
private String uploadpath;
|
private String uploadpath;
|
||||||
@@ -323,92 +328,21 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
nowFile.mkdirs();
|
nowFile.mkdirs();
|
||||||
|
|
||||||
String fileName = exportName + ".xlsx";
|
String fileName = exportName + ".xlsx";
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
// 查询导出数据
|
||||||
|
List<ParamsInfoEO> paramsInfoEOList = baseMapper.selectListWithCert(paramsInfoVO); // 中文数据导出
|
||||||
|
getTreeDictItemText(paramsInfoEOList, cut);
|
||||||
|
List<Map<String, Object>> sheetsList = new ArrayList<>();
|
||||||
|
sheetsList = getCnExportSheetsList(paramsInfoEOList, fileNowPath);
|
||||||
|
workbook = ExcelExportUtil.exportExcel(sheetsList, ExcelType.XSSF);
|
||||||
|
|
||||||
// 查询导出数据
|
} else if (CutEnum.EN.getValue().equals(cut)) {
|
||||||
List<ParamsInfoEO> paramsInfoEOList = baseMapper.selectListWithCert(paramsInfoVO);
|
// 查询导出数据
|
||||||
if (CollectionUtil.isEmpty(paramsInfoEOList)) {
|
List<ParamsInfoEnExport> paramsInfoEnExportList = baseMapper.selectListWithCertForEnExport(paramsInfoVO); // 英文数据导出
|
||||||
throw new JeroBootException("没有可导出的数据");
|
getTreeDictItemTextForEnExport(paramsInfoEnExportList);
|
||||||
}
|
List<Map<String, Object>> sheetsList = new ArrayList<>();
|
||||||
|
sheetsList = getEnExportSheetsList(paramsInfoEnExportList, fileNowPath);
|
||||||
List<OSSFile> fileTemplateList = new ArrayList<>();
|
workbook = ExcelExportUtil.exportExcel(sheetsList, ExcelType.XSSF);
|
||||||
for (ParamsInfoEO paramsInfoEO : paramsInfoEOList) {
|
|
||||||
String fileTemplateConnectId = paramsInfoEO.getFileTemplateConnectId();
|
|
||||||
if (StringUtils.isNotBlank(fileTemplateConnectId)) {
|
|
||||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(fileTemplateConnectId);
|
|
||||||
List<String> fileNameList = ossFileList.stream().map(OSSFile::getFileName).collect(Collectors.toList());
|
|
||||||
paramsInfoEO.setFileTemplateName(StringUtils.join(fileNameList, ","));
|
|
||||||
|
|
||||||
fileTemplateList.addAll(ossFileList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询导出参数项中认证类别最大级
|
|
||||||
List<String> nioNumber = paramsInfoEOList.stream().map(ParamsInfoEO::getNioNumber).collect(Collectors.toList());
|
|
||||||
List<CertCategoryParamsInfoEO> certCategoryParamsInfoEOList = certCategoryParamsInfoEOService.selectListByNioNumber(StringUtils.join(nioNumber, ","));
|
|
||||||
List<String> certCategoryNameList = new ArrayList<>();
|
|
||||||
Map<String, String> certCategoryMap = new HashMap<>();
|
|
||||||
if (CollectionUtil.isNotEmpty(certCategoryParamsInfoEOList)) {
|
|
||||||
List<String> certCategoryList = certCategoryParamsInfoEOList.stream().map(CertCategoryParamsInfoEO::getCertCategory).distinct().collect(Collectors.toList());
|
|
||||||
List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByDictCode("cert_category");
|
|
||||||
List<String> finalCertCategoryList = certCategoryList;
|
|
||||||
certCategoryNameList = sysDictItemList.stream().filter(e-> finalCertCategoryList.contains(e.getItemValue())).map(SysDictItem::getItemText).collect(Collectors.toList());
|
|
||||||
certCategoryMap = sysDictItemList.stream().filter(e-> finalCertCategoryList.contains(e.getItemValue())).collect(Collectors.toMap(c->c.getItemText(),c->c.getItemValue()));
|
|
||||||
}
|
|
||||||
//导出数据
|
|
||||||
List<Map<String, Object>> sheetsList = new ArrayList<>();
|
|
||||||
|
|
||||||
// 创建参数对象(用来设定excel得sheet得内容等信息)
|
|
||||||
ExportParams bussExportParams = new ExportParams();
|
|
||||||
// 设置sheet得名称
|
|
||||||
bussExportParams.setSheetName("企业参数表");
|
|
||||||
bussExportParams.setType(ExcelType.XSSF); // 解决HSSFRichTextString cannot cast XSSFRichTextString问题
|
|
||||||
bussExportParams.setStyle(CommonExcelExportStyler.class);
|
|
||||||
// 创建sheet1使用得map
|
|
||||||
Map<String, Object> bussExportMap = new HashMap<>();
|
|
||||||
// title的参数为ExportParams类型,目前仅仅在ExportParams中设置了sheetName
|
|
||||||
bussExportMap.put("title", bussExportParams);
|
|
||||||
// 模版导出对应得实体类型
|
|
||||||
bussExportMap.put("entity", ParamsInfoEO.class);
|
|
||||||
// sheet中要填充得数据
|
|
||||||
bussExportMap.put("data", paramsInfoEOList);
|
|
||||||
sheetsList.add(bussExportMap);
|
|
||||||
|
|
||||||
// 导出认证类别参数项
|
|
||||||
if (CollectionUtil.isNotEmpty(certCategoryNameList)) {
|
|
||||||
// 所有数据
|
|
||||||
List<CertCategoryParamsInfoEO> certCategoryParamsInfoListExport = new ArrayList<>();
|
|
||||||
for (ParamsInfoEO paramsInfoEO : paramsInfoEOList) {
|
|
||||||
List<CertCategoryParamsInfoEO> categoryParamsInfoEOList = paramsInfoEO.getCertCategoryParamsInfoEOList();
|
|
||||||
certCategoryParamsInfoListExport.addAll(categoryParamsInfoEOList);
|
|
||||||
}
|
|
||||||
if (CollectionUtil.isNotEmpty(certCategoryParamsInfoListExport)) {
|
|
||||||
for (String certCategoryName : certCategoryNameList) {
|
|
||||||
// 当前认证类别数据
|
|
||||||
Map<String, String> finalCertCategoryMap = certCategoryMap;
|
|
||||||
List<CertCategoryParamsInfoEO> certCategoryParamsInfoExport = certCategoryParamsInfoListExport.stream()
|
|
||||||
.filter(e -> finalCertCategoryMap.get(certCategoryName).equals(e.getCertCategory()))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
if (CollectionUtil.isNotEmpty(certCategoryParamsInfoExport)) {
|
|
||||||
ExportParams certExportParams = new ExportParams();
|
|
||||||
certExportParams.setSheetName(certCategoryName);
|
|
||||||
certExportParams.setType(ExcelType.XSSF); // 解决HSSFRichTextString cannot cast XSSFRichTextString问题
|
|
||||||
certExportParams.setStyle(CommonExcelExportStyler.class);
|
|
||||||
Map<String, Object> certExportMap = new HashMap<>();
|
|
||||||
certExportMap.put("title", certExportParams);
|
|
||||||
certExportMap.put("entity", CertCategoryParamsInfoEO.class);
|
|
||||||
certExportMap.put("data", certCategoryParamsInfoExport);
|
|
||||||
sheetsList.add(certExportMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
workbook = ExcelExportUtil.exportExcel(sheetsList, ExcelType.XSSF);
|
|
||||||
|
|
||||||
//下载附件模板对应文件
|
|
||||||
if (fileTemplateList != null && !fileTemplateList.isEmpty()) {
|
|
||||||
fileTemplateList = fileTemplateList.stream().distinct().collect(Collectors.toList());
|
|
||||||
downLoadFileList(fileTemplateList,fileNowPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -440,6 +374,180 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<Map<String, Object>> getCnExportSheetsList(List<ParamsInfoEO> paramsInfoEOList, String fileNowPath) throws IOException {
|
||||||
|
|
||||||
|
if (CollectionUtil.isEmpty(paramsInfoEOList)) {
|
||||||
|
throw new JeroBootException("没有可导出的数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<OSSFile> fileTemplateList = new ArrayList<>();
|
||||||
|
for (ParamsInfoEO paramsInfoEO : paramsInfoEOList) {
|
||||||
|
String fileTemplateConnectId = paramsInfoEO.getFileTemplateConnectId();
|
||||||
|
if (StringUtils.isNotBlank(fileTemplateConnectId)) {
|
||||||
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(fileTemplateConnectId);
|
||||||
|
List<String> fileNameList = ossFileList.stream().map(OSSFile::getFileName).collect(Collectors.toList());
|
||||||
|
paramsInfoEO.setFileTemplateName(StringUtils.join(fileNameList, ","));
|
||||||
|
|
||||||
|
fileTemplateList.addAll(ossFileList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询导出参数项中认证类别最大级
|
||||||
|
List<String> nioNumber = paramsInfoEOList.stream().map(ParamsInfoEO::getNioNumber).collect(Collectors.toList());
|
||||||
|
List<CertCategoryParamsInfoEO> certCategoryParamsInfoEOList = certCategoryParamsInfoEOService.selectListByNioNumber(StringUtils.join(nioNumber, ","));
|
||||||
|
List<String> certCategoryNameList = new ArrayList<>();
|
||||||
|
Map<String, String> certCategoryMap = new HashMap<>();
|
||||||
|
if (CollectionUtil.isNotEmpty(certCategoryParamsInfoEOList)) {
|
||||||
|
List<String> certCategoryList = certCategoryParamsInfoEOList.stream().map(CertCategoryParamsInfoEO::getCertCategory).distinct().collect(Collectors.toList());
|
||||||
|
List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByDictCode("cert_category");
|
||||||
|
List<String> finalCertCategoryList = certCategoryList;
|
||||||
|
certCategoryNameList = sysDictItemList.stream().filter(e-> finalCertCategoryList.contains(e.getItemValue())).map(SysDictItem::getItemText).collect(Collectors.toList());
|
||||||
|
certCategoryMap = sysDictItemList.stream().filter(e-> finalCertCategoryList.contains(e.getItemValue())).collect(Collectors.toMap(c->c.getItemText(),c->c.getItemValue()));
|
||||||
|
}
|
||||||
|
//导出数据
|
||||||
|
List<Map<String, Object>> sheetsList = new ArrayList<>();
|
||||||
|
|
||||||
|
// 创建参数对象(用来设定excel得sheet得内容等信息)
|
||||||
|
ExportParams bussExportParams = new ExportParams();
|
||||||
|
// 设置sheet得名称
|
||||||
|
bussExportParams.setSheetName("企业参数表");
|
||||||
|
bussExportParams.setType(ExcelType.XSSF); // 解决HSSFRichTextString cannot cast XSSFRichTextString问题
|
||||||
|
bussExportParams.setStyle(CommonExcelExportStyler.class);
|
||||||
|
// 创建sheet1使用得map
|
||||||
|
Map<String, Object> bussExportMap = new HashMap<>();
|
||||||
|
// title的参数为ExportParams类型,目前仅仅在ExportParams中设置了sheetName
|
||||||
|
bussExportMap.put("title", bussExportParams);
|
||||||
|
// 模版导出对应得实体类型
|
||||||
|
bussExportMap.put("entity", ParamsInfoEO.class);
|
||||||
|
// sheet中要填充得数据
|
||||||
|
bussExportMap.put("data", paramsInfoEOList);
|
||||||
|
sheetsList.add(bussExportMap);
|
||||||
|
|
||||||
|
// 导出认证类别参数项
|
||||||
|
if (CollectionUtil.isNotEmpty(certCategoryNameList)) {
|
||||||
|
// 所有数据
|
||||||
|
List<CertCategoryParamsInfoEO> certCategoryParamsInfoListExport = new ArrayList<>();
|
||||||
|
for (ParamsInfoEO paramsInfoEO : paramsInfoEOList) {
|
||||||
|
List<CertCategoryParamsInfoEO> categoryParamsInfoEOList = paramsInfoEO.getCertCategoryParamsInfoEOList();
|
||||||
|
certCategoryParamsInfoListExport.addAll(categoryParamsInfoEOList);
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isNotEmpty(certCategoryParamsInfoListExport)) {
|
||||||
|
for (String certCategoryName : certCategoryNameList) {
|
||||||
|
// 当前认证类别数据
|
||||||
|
Map<String, String> finalCertCategoryMap = certCategoryMap;
|
||||||
|
List<CertCategoryParamsInfoEO> certCategoryParamsInfoExport = certCategoryParamsInfoListExport.stream()
|
||||||
|
.filter(e -> finalCertCategoryMap.get(certCategoryName).equals(e.getCertCategory()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (CollectionUtil.isNotEmpty(certCategoryParamsInfoExport)) {
|
||||||
|
ExportParams certExportParams = new ExportParams();
|
||||||
|
certExportParams.setSheetName(certCategoryName);
|
||||||
|
certExportParams.setType(ExcelType.XSSF); // 解决HSSFRichTextString cannot cast XSSFRichTextString问题
|
||||||
|
certExportParams.setStyle(CommonExcelExportStyler.class);
|
||||||
|
Map<String, Object> certExportMap = new HashMap<>();
|
||||||
|
certExportMap.put("title", certExportParams);
|
||||||
|
certExportMap.put("entity", CertCategoryParamsInfoEO.class);
|
||||||
|
certExportMap.put("data", certCategoryParamsInfoExport);
|
||||||
|
sheetsList.add(certExportMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//下载附件模板对应文件
|
||||||
|
if (fileTemplateList != null && !fileTemplateList.isEmpty()) {
|
||||||
|
fileTemplateList = fileTemplateList.stream().distinct().collect(Collectors.toList());
|
||||||
|
downLoadFileList(fileTemplateList,fileNowPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sheetsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Map<String, Object>> getEnExportSheetsList(List<ParamsInfoEnExport> paramsInfoEnExportList, String fileNowPath) throws IOException {
|
||||||
|
|
||||||
|
if (CollectionUtil.isEmpty(paramsInfoEnExportList)) {
|
||||||
|
throw new JeroBootException("没有可导出的数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<OSSFile> fileTemplateList = new ArrayList<>();
|
||||||
|
for (ParamsInfoEnExport paramsInfoEnExport : paramsInfoEnExportList) {
|
||||||
|
String fileTemplateConnectId = paramsInfoEnExport.getFileTemplateConnectId();
|
||||||
|
if (StringUtils.isNotBlank(fileTemplateConnectId)) {
|
||||||
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(fileTemplateConnectId);
|
||||||
|
List<String> fileNameList = ossFileList.stream().map(OSSFile::getFileName).collect(Collectors.toList());
|
||||||
|
paramsInfoEnExport.setFileTemplateName(StringUtils.join(fileNameList, ","));
|
||||||
|
|
||||||
|
fileTemplateList.addAll(ossFileList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询导出参数项中认证类别最大级
|
||||||
|
List<String> nioNumber = paramsInfoEnExportList.stream().map(ParamsInfoEnExport::getNioNumber).collect(Collectors.toList());
|
||||||
|
List<CertCategoryParamsInfoEO> certCategoryParamsInfoEOList = certCategoryParamsInfoEOService.selectListByNioNumber(StringUtils.join(nioNumber, ","));
|
||||||
|
List<String> certCategoryNameList = new ArrayList<>();
|
||||||
|
Map<String, String> certCategoryMap = new HashMap<>();
|
||||||
|
if (CollectionUtil.isNotEmpty(certCategoryParamsInfoEOList)) {
|
||||||
|
List<String> certCategoryList = certCategoryParamsInfoEOList.stream().map(CertCategoryParamsInfoEO::getCertCategory).distinct().collect(Collectors.toList());
|
||||||
|
List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByDictCode("cert_category");
|
||||||
|
List<String> finalCertCategoryList = certCategoryList;
|
||||||
|
certCategoryNameList = sysDictItemList.stream().filter(e-> finalCertCategoryList.contains(e.getItemValue())).map(SysDictItem::getItemText).collect(Collectors.toList());
|
||||||
|
certCategoryMap = sysDictItemList.stream().filter(e-> finalCertCategoryList.contains(e.getItemValue())).collect(Collectors.toMap(c->c.getItemText(),c->c.getItemValue()));
|
||||||
|
}
|
||||||
|
//导出数据
|
||||||
|
List<Map<String, Object>> sheetsList = new ArrayList<>();
|
||||||
|
|
||||||
|
// 创建参数对象(用来设定excel得sheet得内容等信息)
|
||||||
|
ExportParams bussExportParams = new ExportParams();
|
||||||
|
// 设置sheet得名称
|
||||||
|
bussExportParams.setSheetName("企业参数表");
|
||||||
|
bussExportParams.setType(ExcelType.XSSF); // 解决HSSFRichTextString cannot cast XSSFRichTextString问题
|
||||||
|
bussExportParams.setStyle(CommonExcelExportStyler.class);
|
||||||
|
// 创建sheet1使用得map
|
||||||
|
Map<String, Object> bussExportMap = new HashMap<>();
|
||||||
|
// title的参数为ExportParams类型,目前仅仅在ExportParams中设置了sheetName
|
||||||
|
bussExportMap.put("title", bussExportParams);
|
||||||
|
// 模版导出对应得实体类型
|
||||||
|
bussExportMap.put("entity", ParamsInfoEnExport.class);
|
||||||
|
// sheet中要填充得数据
|
||||||
|
bussExportMap.put("data", paramsInfoEnExportList);
|
||||||
|
sheetsList.add(bussExportMap);
|
||||||
|
|
||||||
|
// 导出认证类别参数项
|
||||||
|
if (CollectionUtil.isNotEmpty(certCategoryNameList)) {
|
||||||
|
// 所有数据
|
||||||
|
List<CertCategoryParamsInfoEnExport> certCategoryParamsInfoListExport = new ArrayList<>();
|
||||||
|
for (ParamsInfoEnExport paramsInfoEnExport : paramsInfoEnExportList) {
|
||||||
|
List<CertCategoryParamsInfoEnExport> certCategoryParamsInfoEnExports = paramsInfoEnExport.getCertCategoryParamsInfoEnExportList();
|
||||||
|
certCategoryParamsInfoListExport.addAll(certCategoryParamsInfoEnExports);
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isNotEmpty(certCategoryParamsInfoListExport)) {
|
||||||
|
for (String certCategoryName : certCategoryNameList) {
|
||||||
|
// 当前认证类别数据
|
||||||
|
Map<String, String> finalCertCategoryMap = certCategoryMap;
|
||||||
|
List<CertCategoryParamsInfoEnExport> certCategoryParamsInfoExport = certCategoryParamsInfoListExport.stream()
|
||||||
|
.filter(e -> finalCertCategoryMap.get(certCategoryName).equals(e.getCertCategory()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (CollectionUtil.isNotEmpty(certCategoryParamsInfoExport)) {
|
||||||
|
ExportParams certExportParams = new ExportParams();
|
||||||
|
certExportParams.setSheetName(certCategoryName);
|
||||||
|
certExportParams.setType(ExcelType.XSSF); // 解决HSSFRichTextString cannot cast XSSFRichTextString问题
|
||||||
|
certExportParams.setStyle(CommonExcelExportStyler.class);
|
||||||
|
Map<String, Object> certExportMap = new HashMap<>();
|
||||||
|
certExportMap.put("title", certExportParams);
|
||||||
|
certExportMap.put("entity", CertCategoryParamsInfoEnExport.class);
|
||||||
|
certExportMap.put("data", certCategoryParamsInfoExport);
|
||||||
|
sheetsList.add(certExportMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//下载附件模板对应文件
|
||||||
|
if (fileTemplateList != null && !fileTemplateList.isEmpty()) {
|
||||||
|
fileTemplateList = fileTemplateList.stream().distinct().collect(Collectors.toList());
|
||||||
|
downLoadFileList(fileTemplateList,fileNowPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sheetsList;
|
||||||
|
}
|
||||||
|
|
||||||
private void downLoadFileList(List<OSSFile> fileTemplateList,String fileNowPath) throws IOException {
|
private void downLoadFileList(List<OSSFile> fileTemplateList,String fileNowPath) throws IOException {
|
||||||
for(OSSFile fileExportDto : fileTemplateList){
|
for(OSSFile fileExportDto : fileTemplateList){
|
||||||
String oldPath = fileExportDto.getUrl();
|
String oldPath = fileExportDto.getUrl();
|
||||||
@@ -449,7 +557,6 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
copyFile(oldPath, newPath);
|
copyFile(oldPath, newPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copyFile(String srcPath, String destPath) throws IOException {
|
private void copyFile(String srcPath, String destPath) throws IOException {
|
||||||
@@ -474,4 +581,44 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
bis.close(); // 先开后关
|
bis.close(); // 先开后关
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 树形字典处理中文
|
||||||
|
*
|
||||||
|
* @param paramsInfoEOList 列表数据
|
||||||
|
* @param cut 需切换的语言类别
|
||||||
|
*/
|
||||||
|
public void getTreeDictItemText(List<ParamsInfoEO> paramsInfoEOList, String cut) {
|
||||||
|
//树形数据字典
|
||||||
|
List<SysCategory> categoryList = sysCategoryService.list();
|
||||||
|
|
||||||
|
for (ParamsInfoEO paramsInfoEO : paramsInfoEOList){
|
||||||
|
String value = paramsInfoEO.getTechnologyTerritory();
|
||||||
|
if (StringUtils.isNotBlank(value)) {
|
||||||
|
List<String> idList = Arrays.asList(value.split(","));
|
||||||
|
List<SysCategory> sysCategoryList = categoryList.stream().filter(e -> idList.contains(e.getId())).collect(Collectors.toList());
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
List<String> nameList = sysCategoryList.stream().map(SysCategory::getName).collect(Collectors.toList());
|
||||||
|
paramsInfoEO.setTechnologyTerritory(StringUtils.join(nameList, ","));
|
||||||
|
} else {
|
||||||
|
List<String> nameEnList = sysCategoryList.stream().map(SysCategory::getEnName).collect(Collectors.toList());
|
||||||
|
paramsInfoEO.setTechnologyTerritory(StringUtils.join(nameEnList, ","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getTreeDictItemTextForEnExport(List<ParamsInfoEnExport> paramsInfoEnExportList) {
|
||||||
|
//树形数据字典
|
||||||
|
List<SysCategory> categoryList = sysCategoryService.list();
|
||||||
|
|
||||||
|
for (ParamsInfoEnExport paramsInfoEnExport : paramsInfoEnExportList){
|
||||||
|
String value = paramsInfoEnExport.getTechnologyTerritory();
|
||||||
|
if (StringUtils.isNotBlank(value)) {
|
||||||
|
List<String> idList = Arrays.asList(value.split(","));
|
||||||
|
List<SysCategory> sysCategoryList = categoryList.stream().filter(e -> idList.contains(e.getId())).collect(Collectors.toList());
|
||||||
|
List<String> nameEnList = sysCategoryList.stream().map(SysCategory::getEnName).collect(Collectors.toList());
|
||||||
|
paramsInfoEnExport.setTechnologyTerritory(StringUtils.join(nameEnList, ","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-5
@@ -8,6 +8,8 @@ import lombok.Data;
|
|||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liyawei
|
* @Author: liyawei
|
||||||
* @Description:
|
* @Description:
|
||||||
@@ -59,19 +61,19 @@ public class ParamsInfoEnExport {
|
|||||||
private String paramsName;
|
private String paramsName;
|
||||||
|
|
||||||
/**技术领域*/
|
/**技术领域*/
|
||||||
@Excel(name = "*technology territory", width = 15, dicCode = "technology_territory")
|
@Excel(name = "*technology territory", width = 15)
|
||||||
@Dict(dicCode = "technology_territory")
|
// @Dict(dicCode = "technology_territory")
|
||||||
@ApiModelProperty(value = "技术领域")
|
@ApiModelProperty(value = "技术领域")
|
||||||
private String technologyTerritory;
|
private String technologyTerritory;
|
||||||
|
|
||||||
/**参数批次*/
|
/**参数批次*/
|
||||||
@Excel(name = "*params batch", width = 15, dicCode = "params_batch")
|
@Excel(name = "*params batch", width = 15, dicCode = "params_batch_en")
|
||||||
@Dict(dicCode = "params_batch")
|
@Dict(dicCode = "params_batch")
|
||||||
@ApiModelProperty(value = "参数批次")
|
@ApiModelProperty(value = "参数批次")
|
||||||
private String paramsBatch;
|
private String paramsBatch;
|
||||||
|
|
||||||
/**责任领域*/
|
/**责任领域*/
|
||||||
@Excel(name = "*duty territory", width = 15, dicCode = "duty_territory")
|
@Excel(name = "*duty territory", width = 15, dicCode = "duty_territory_en")
|
||||||
@Dict(dicCode = "duty_territory")
|
@Dict(dicCode = "duty_territory")
|
||||||
@ApiModelProperty(value = "责任领域")
|
@ApiModelProperty(value = "责任领域")
|
||||||
private String dutyTerritory;
|
private String dutyTerritory;
|
||||||
@@ -82,7 +84,7 @@ public class ParamsInfoEnExport {
|
|||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/**认证类别*/
|
/**认证类别*/
|
||||||
@Excel(name = "cert category", width = 15, dicCode = "cert_category")
|
@Excel(name = "cert category", width = 15, dicCode = "cert_category_en")
|
||||||
@Dict(dicCode = "cert_category")
|
@Dict(dicCode = "cert_category")
|
||||||
@ApiModelProperty(value = "认证类别")
|
@ApiModelProperty(value = "认证类别")
|
||||||
private String certCategory;
|
private String certCategory;
|
||||||
@@ -110,4 +112,12 @@ public class ParamsInfoEnExport {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String fileTemplateName; //附件模板文件名
|
private String fileTemplateName; //附件模板文件名
|
||||||
|
|
||||||
|
/**参数模板id*/
|
||||||
|
@ApiModelProperty(value = "参数模板id")
|
||||||
|
private String paramsTemplateId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<CertCategoryParamsInfoEnExport> certCategoryParamsInfoEnExportList; // 认证类别参数列表
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -51,6 +51,10 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
|
|||||||
|
|
||||||
public String queryDictKeyByText(@Param("code") String code,@Param("text") String key);
|
public String queryDictKeyByText(@Param("code") String code,@Param("text") String key);
|
||||||
|
|
||||||
|
/**根据code查询所有中文名*/
|
||||||
|
@Select("select s.item_text from sys_dict_item s where s.dict_id = (select id from sys_dict where dict_code = #{code})")
|
||||||
|
public List<String> queryDictNameByCode(@Param("code") String code);
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String queryTableDictTextByKey(@Param("table") String table,@Param("text") String text,@Param("code") String code,@Param("key") String key);
|
public String queryTableDictTextByKey(@Param("table") String table,@Param("text") String text,@Param("code") String code,@Param("key") String key);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<!-- 通过字典code获取字典数据 -->
|
<!-- 通过字典code获取字典数据 -->
|
||||||
<select id="queryDictItemsByCode" parameterType="String" resultType="com.jero.common.system.vo.DictModel">
|
<select id="queryDictItemsByCode" parameterType="String" resultType="com.jero.common.system.vo.DictModel">
|
||||||
select s.item_value as "value",s.item_text as "text" from sys_dict_item s
|
select s.item_value as "value",s.item_text as "text", s.en_name as "textEn" from sys_dict_item s
|
||||||
where dict_id = (select id from sys_dict where dict_code = #{code}) and del_flag = '0'
|
where dict_id = (select id from sys_dict where dict_code = #{code}) and del_flag = '0'
|
||||||
order by s.sort_order asc
|
order by s.sort_order asc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -161,6 +161,11 @@
|
|||||||
<artifactId>prime-jwt</artifactId>
|
<artifactId>prime-jwt</artifactId>
|
||||||
<version>1.3.1</version>
|
<version>1.3.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>1.2.62</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ public interface IDummyInventoryBaseEOService extends IService<DummyInventoryBas
|
|||||||
* 发布
|
* 发布
|
||||||
* @param dummyInventoryBaseEO
|
* @param dummyInventoryBaseEO
|
||||||
*/
|
*/
|
||||||
void issue(DummyInventoryBaseEO dummyInventoryBaseEO);
|
void issue(DummyInventoryBaseEO dummyInventoryBaseEO) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
|
|||||||
+50
-43
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.modules.dummy.service.impl;
|
package com.jero.modules.dummy.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -17,17 +18,17 @@ import com.jero.modules.dummy.service.IDummyContentChangeEOService;
|
|||||||
import com.jero.modules.dummy.service.IDummyInventoryBaseEOService;
|
import com.jero.modules.dummy.service.IDummyInventoryBaseEOService;
|
||||||
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
||||||
import com.jero.modules.dummy.service.IDummyReadEOService;
|
import com.jero.modules.dummy.service.IDummyReadEOService;
|
||||||
|
import com.jero.modules.dummy.util.ListDiff;
|
||||||
import com.jero.modules.system.entity.SysUser;
|
import com.jero.modules.system.entity.SysUser;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -137,7 +138,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
if (pageList.getRecords().size() != 0) {
|
if (pageList.getRecords().size() != 0) {
|
||||||
List<DummyInventoryBaseEO> records = pageList.getRecords();
|
List<DummyInventoryBaseEO> records = pageList.getRecords();
|
||||||
List<String> createByList = records.stream().map(DummyInventoryBaseEO::getCreateBy).collect(Collectors.toList());
|
List<String> createByList = records.stream().map(DummyInventoryBaseEO::getCreateBy).collect(Collectors.toList());
|
||||||
LambdaQueryWrapper<SysUser> lambdaQueryWrapper = new LambdaQueryWrapper();
|
LambdaQueryWrapper<SysUser> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.in(SysUser::getUsername, createByList);
|
lambdaQueryWrapper.in(SysUser::getUsername, createByList);
|
||||||
List<SysUser> userList = sysUserService.list(lambdaQueryWrapper);
|
List<SysUser> userList = sysUserService.list(lambdaQueryWrapper);
|
||||||
//订阅标识
|
//订阅标识
|
||||||
@@ -187,7 +188,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
* @param dummyInventoryBaseEO
|
* @param dummyInventoryBaseEO
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void issue(DummyInventoryBaseEO dummyInventoryBaseEO) {
|
public void issue(DummyInventoryBaseEO dummyInventoryBaseEO) throws Exception {
|
||||||
this.updateById(dummyInventoryBaseEO);
|
this.updateById(dummyInventoryBaseEO);
|
||||||
//发布与撤回均需要发消息(向订阅的人员发消息)
|
//发布与撤回均需要发消息(向订阅的人员发消息)
|
||||||
//首次发布不发消息
|
//首次发布不发消息
|
||||||
@@ -216,14 +217,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
//没有添加过需要进行第一次添加
|
//没有添加过需要进行第一次添加
|
||||||
List<DummyContentChangeEO> list = new ArrayList<>();
|
List<DummyContentChangeEO> list = new ArrayList<>();
|
||||||
if(dummyInventoryBaseEOList.size() != 0){
|
if(dummyInventoryBaseEOList.size() != 0){
|
||||||
String base = JSONArray.fromObject(dummyInventoryBaseEOList).toString();
|
String base = JSONArray.toJSONString(dummyInventoryBaseEOList);
|
||||||
DummyContentChangeEO dummyContentChangeEOBase = new DummyContentChangeEO();
|
DummyContentChangeEO dummyContentChangeEOBase = new DummyContentChangeEO();
|
||||||
dummyContentChangeEOBase.setConnectId(dummyInventoryBaseEO.getId());
|
dummyContentChangeEOBase.setConnectId(dummyInventoryBaseEO.getId());
|
||||||
dummyContentChangeEOBase.setContentJson(base);
|
dummyContentChangeEOBase.setContentJson(base);
|
||||||
list.add(dummyContentChangeEOBase);
|
list.add(dummyContentChangeEOBase);
|
||||||
}
|
}
|
||||||
if(dummyInventoryInfoEOList.size() != 0){
|
if(dummyInventoryInfoEOList.size() != 0){
|
||||||
String info = JSONArray.fromObject(dummyInventoryInfoEOList).toString();
|
String info = JSONArray.toJSONString(dummyInventoryInfoEOList);
|
||||||
DummyContentChangeEO dummyContentChangeEOInfo = new DummyContentChangeEO();
|
DummyContentChangeEO dummyContentChangeEOInfo = new DummyContentChangeEO();
|
||||||
dummyContentChangeEOInfo.setParentId(dummyInventoryBaseEO.getId());
|
dummyContentChangeEOInfo.setParentId(dummyInventoryBaseEO.getId());
|
||||||
dummyContentChangeEOInfo.setContentJson(info);
|
dummyContentChangeEOInfo.setContentJson(info);
|
||||||
@@ -242,39 +243,53 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
wrapperInfo.in(DummyContentChangeEO::getParentId,dummyInventoryBaseEO.getId());
|
wrapperInfo.in(DummyContentChangeEO::getParentId,dummyInventoryBaseEO.getId());
|
||||||
List<DummyContentChangeEO> dummyContentChangeEOInfoList = iDummyContentChangeEOService.list(wrapperInfo);
|
List<DummyContentChangeEO> dummyContentChangeEOInfoList = iDummyContentChangeEOService.list(wrapperInfo);
|
||||||
|
|
||||||
//3.截止到现在发布,期间修改的数据(基础)
|
//3.对比基础表数据
|
||||||
//数据为-->dummyInventoryBaseEOList
|
//3.1截止到现在发布,期间修改的数据(基础)
|
||||||
String dibName = dummyInventoryBaseEOList.get(0).getName();
|
//最新的数据为-->dummyInventoryBaseEOList
|
||||||
String dibUseExplain = dummyInventoryBaseEOList.get(0).getUseExplain();
|
|
||||||
|
//3.2基础表数据对比
|
||||||
|
String baseCJ=dummyContentChangeEOBaseList.get(0).getContentJson();
|
||||||
|
List<DummyInventoryBaseEO> baseCJlist = JSONArray.parseArray(baseCJ, DummyInventoryBaseEO.class);//json转list
|
||||||
|
|
||||||
|
//对比,获取值不同的字段
|
||||||
|
Map<String, List<Object>> diff = null;
|
||||||
|
for(int i=0;i<= baseCJlist.size();i++) {
|
||||||
|
baseCJlist.get(i);
|
||||||
|
dummyInventoryBaseEOList.get(i);
|
||||||
|
diff = ListDiff.compareObject(baseCJlist.get(i), dummyInventoryBaseEOList.get(i));
|
||||||
|
System.out.println(diff);//不同的字段原,现,{name=[虚拟清单33331122211, 虚拟清单3333444]}
|
||||||
|
}
|
||||||
|
|
||||||
|
//4.对比详情表数据
|
||||||
|
//4.1截止到现在发布,期间修改的数据(详情)
|
||||||
|
//现在的数据为-->dummyInventoryInfoEOList
|
||||||
|
//dummyInventoryInfoEOList
|
||||||
|
|
||||||
|
//4.2详情表数据(一条基础数据可能对应多个详情数据---一对多)
|
||||||
|
/* String baseCJ=dummyContentChangeEOBaseList.get(0).getContentJson();
|
||||||
|
List<DummyInventoryBaseEO> baseCJlist = JSONArray.parseArray(baseCJ, DummyInventoryBaseEO.class);//json转list
|
||||||
|
|
||||||
|
//对比,获取值不同的字段
|
||||||
|
Map<String, List<Object>> diff = null;
|
||||||
|
for(int i=0;i<= baseCJlist.size();i++) {
|
||||||
|
baseCJlist.get(i);
|
||||||
|
dummyInventoryBaseEOList.get(i);
|
||||||
|
diff = ListDiff.compareObject(baseCJlist.get(i), dummyInventoryBaseEOList.get(i));
|
||||||
|
System.out.println(diff);//不同的字段原,现,{name=[虚拟清单33331122211, 虚拟清单3333444]}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
for(DummyContentChangeEO dummyContentChangeEO : dummyContentChangeEOInfoList){
|
||||||
|
String infoCJ = dummyContentChangeEO.getContentJson();
|
||||||
|
List<DummyContentChangeEO> infoCJlist = JSONArray.parseArray(infoCJ, DummyContentChangeEO.class);//json转list
|
||||||
|
System.out.println(infoCJlist);
|
||||||
|
System.out.println(infoCJlist);
|
||||||
|
|
||||||
|
|
||||||
|
// JsonDiff.compareJson(infoCJjson,info,null);
|
||||||
|
|
||||||
//4.截止到现在发布,期间修改的数据(详情)
|
|
||||||
//数据为-->dummyInventoryInfoEOList
|
|
||||||
List<String> contentJson = Arrays.asList(dummyContentChangeEOInfoList.get(0).getContentJson().split("},\\{"));
|
|
||||||
for(String midCJ:contentJson){
|
|
||||||
List<String> dccContentJson = Arrays.asList( midCJ.split("\",\""));
|
|
||||||
System.out.println(dccContentJson);
|
|
||||||
}
|
|
||||||
|
|
||||||
//5.分别对比基础表数据和详情表数据
|
|
||||||
|
|
||||||
//5.1.基础表数据对比
|
|
||||||
List<String> dibContentJson = Arrays.asList(dummyContentChangeEOBaseList.get(0).getContentJson().split("\",\""));
|
|
||||||
|
|
||||||
//获取原虚拟清单名称
|
|
||||||
String cJName = dibContentJson.get(6);
|
|
||||||
String trueCJName = disposeContentJson(cJName);
|
|
||||||
//获取原虚拟清单使用说明
|
|
||||||
String cJUseExplain = dibContentJson.get(1);
|
|
||||||
String trueCJUseExplain = disposeContentJson(cJUseExplain);
|
|
||||||
//拼接本次发布时的修改信息
|
|
||||||
if(!trueCJName.equals(dibName)) {
|
|
||||||
String cJNameMessage = dummyInventoryBaseEO.getUpdateBy() + "把" + trueCJName + "改为了" + dibName;
|
|
||||||
}
|
|
||||||
if(!trueCJUseExplain.equals(dibUseExplain)) {
|
|
||||||
String cJUseExplainMessage = dummyInventoryBaseEO.getUpdateBy() + "把" + trueCJUseExplain + "改为" + dibUseExplain;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//5.2详情表数据(一条基础数据可能对应多个详情数据---一对多)
|
|
||||||
|
|
||||||
//6.数据对比完成后.删除之前保存的dummy_inventory_info中的数据,重新保存最新的数据
|
//6.数据对比完成后.删除之前保存的dummy_inventory_info中的数据,重新保存最新的数据
|
||||||
|
|
||||||
@@ -289,12 +304,4 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public String disposeContentJson(String cJName){
|
|
||||||
//获取cntentJson中原数据
|
|
||||||
|
|
||||||
String midCJName = cJName.substring(0, cJName.indexOf(":"));
|
|
||||||
String trueCJName = cJName.substring(midCJName.length()+1, cJName.length()).replace("\"","");
|
|
||||||
return trueCJName;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.jero.modules.dummy.util;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public class ListDiff <T> {
|
||||||
|
public static <T> Map<String, List<Object>> compareObject(T obj1, T Obj2)
|
||||||
|
throws Exception {
|
||||||
|
Map<String, List<Object>> result = new HashMap<String, List<Object>>();
|
||||||
|
|
||||||
|
Field[] fs = obj1.getClass().getDeclaredFields();
|
||||||
|
for (Field f : fs) {
|
||||||
|
f.setAccessible(true);
|
||||||
|
Object v1 = f.get(obj1);
|
||||||
|
Object v2 = f.get(Obj2);
|
||||||
|
if( ! equals(v1, v2) /*&& !f.getName().contains("update")*/
|
||||||
|
&& !f.getName().equals("updateTime") ){
|
||||||
|
List<Object> resultList=new ArrayList<>();
|
||||||
|
resultList.add(v1);
|
||||||
|
resultList.add(v2);
|
||||||
|
result.put(f.getName(), resultList);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean equals(Object obj1, Object obj2) {
|
||||||
|
if (obj1 == obj2) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj1 == null || obj2 == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return obj1.equals(obj2);
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
-4
@@ -46,23 +46,23 @@ public class ProjectRelatedPersonnel implements Serializable {
|
|||||||
/**法规工程师*/
|
/**法规工程师*/
|
||||||
private java.lang.String lawEngineer;
|
private java.lang.String lawEngineer;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@Excel(name = "法规工程师,lawEngineerName", width = 30,orderNum = "2")
|
@Excel(name = "法规工程师,lawEngineerName", width = 15,orderNum = "2")
|
||||||
private java.lang.String lawEngineerName;
|
private java.lang.String lawEngineerName;
|
||||||
|
|
||||||
/**工程接口人*/
|
/**工程接口人*/
|
||||||
private java.lang.String engineeringInterfacePerson;
|
private java.lang.String engineeringInterfacePerson;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@Excel(name = "工程接口人,engineeringInterfacePersonName", width = 30,orderNum = "3")
|
@Excel(name = "工程接口人,engineeringInterfacePersonName", width = 15,orderNum = "3")
|
||||||
private java.lang.String engineeringInterfacePersonName;
|
private java.lang.String engineeringInterfacePersonName;
|
||||||
|
|
||||||
/**认证工程师*/
|
/**认证工程师*/
|
||||||
private java.lang.String certificationEngineer;
|
private java.lang.String certificationEngineer;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@Excel(name = "认证工程师,certificationEngineerName", width = 30,orderNum = "4")
|
@Excel(name = "认证工程师,certificationEngineerName", width = 15,orderNum = "4")
|
||||||
private java.lang.String certificationEngineerName;
|
private java.lang.String certificationEngineerName;
|
||||||
|
|
||||||
/**备注*/
|
/**备注*/
|
||||||
@Excel(name = "备注,remark", width = 50,orderNum = "5")
|
@Excel(name = "备注,remark", width = 15,orderNum = "5")
|
||||||
private java.lang.String remark;
|
private java.lang.String remark;
|
||||||
|
|
||||||
/**创建人*/
|
/**创建人*/
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ package com.jero.modules.project.enums;
|
|||||||
*/
|
*/
|
||||||
public enum ExportTemplateEnum {
|
public enum ExportTemplateEnum {
|
||||||
|
|
||||||
DUTY_TERRITORY("责任领域"," duty_territory"),
|
DUTY_TERRITORY("责任领域","duty_territory"),
|
||||||
DUTY_TERRITORY_FIELD_of_PRODUCTION("生产领域","field_of_production"),
|
DUTY_TERRITORY_FIELD_of_PRODUCTION("生产领域","field_of_production"),
|
||||||
// LAW_ENGINEER("法规工程师","lawEngineerName"),
|
// LAW_ENGINEER("法规工程师","lawEngineerName"),
|
||||||
// ENGINEER_INTERFACE_PERSON("工程接口人","engineeringInterfacePersonName"),
|
// ENGINEER_INTERFACE_PERSON("工程接口人","engineeringInterfacePersonName"),
|
||||||
|
|||||||
+52
-67
@@ -9,11 +9,11 @@ import com.jero.common.exception.JeroBootException;
|
|||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.modules.enums.DictCodeEnum;
|
import com.jero.modules.enums.DictCodeEnum;
|
||||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||||
import com.jero.modules.project.enums.ExportTemplateEnum;
|
|
||||||
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
|
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
|
||||||
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
|
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
|
||||||
import com.jero.modules.project.util.ExcelLangUtils;
|
import com.jero.modules.project.util.ExcelLangUtils;
|
||||||
import com.jero.modules.system.entity.SysUser;
|
import com.jero.modules.system.entity.SysUser;
|
||||||
|
import com.jero.modules.system.mapper.SysDictItemMapper;
|
||||||
import com.jero.modules.system.mapper.SysDictMapper;
|
import com.jero.modules.system.mapper.SysDictMapper;
|
||||||
import com.jero.modules.system.mapper.SysUserMapper;
|
import com.jero.modules.system.mapper.SysUserMapper;
|
||||||
import com.jero.modules.system.service.ISysDictService;
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
@@ -60,6 +60,8 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysDictMapper sysDictMapper;
|
private SysDictMapper sysDictMapper;
|
||||||
|
@Autowired
|
||||||
|
private SysDictItemMapper sysDictItemMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
@@ -406,29 +408,40 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ModelAndView setExporTemplate(HttpServletRequest request, Class<ProjectRelatedPersonnel> clazz, String title,String cut){
|
public ModelAndView setExporTemplate(HttpServletRequest request, Class<ProjectRelatedPersonnel> clazz, String title,String cut){
|
||||||
List<ProjectRelatedPersonnel> records=new ArrayList<>();
|
List<ProjectRelatedPersonnel> records = new ArrayList<>();;
|
||||||
ProjectRelatedPersonnel projectRelatedPersonnel=new ProjectRelatedPersonnel();
|
|
||||||
// Step.1 组装查询条件
|
// Step.1 组装查询条件
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
ExportParams exportParams=null;
|
ExportParams exportParams=null;
|
||||||
// Step.2 AutoPoi 导出Excel
|
// Step.2 AutoPoi 导出Excel
|
||||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||||
try {
|
try {
|
||||||
|
String fillingExplanationCN="填写说明\n" +
|
||||||
|
"1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据\n" +
|
||||||
|
"2.所有带*号的字段必须填写\n" +
|
||||||
|
"3.填写人员时,必须使用人员账号进行填写。\n" +
|
||||||
|
"4.填写的人员账号必须与系统中账号保持一致";
|
||||||
//中英切换模板
|
//中英切换模板
|
||||||
if(CutEnum.CN.getValue().equals(cut)) {
|
/* if(CutEnum.CN.getValue().equals(cut)) {
|
||||||
projectRelatedPersonnel.setDutyTerritory(ExportTemplateEnum.DUTY_TERRITORY_FIELD_of_PRODUCTION.getName());
|
|
||||||
exportParams=new ExportParams(title , "导出人:" + sysUser.getUsername(), title);
|
exportParams=new ExportParams(title , fillingExplanationCN, title);
|
||||||
}else{
|
}else{
|
||||||
projectRelatedPersonnel.setDutyTerritory(ExportTemplateEnum.DUTY_TERRITORY_FIELD_of_PRODUCTION.getValue());
|
|
||||||
exportParams=new ExportParams(title , "Exporter:" + sysUser.getUsername(), title);
|
exportParams=new ExportParams(title , ExportTemplateEnum.FILLING_EXPLANATION_EN.getName(), title);
|
||||||
}
|
}*/
|
||||||
projectRelatedPersonnel.setLawEngineerName("ning.chen,xinhui.wei");
|
exportParams=new ExportParams();
|
||||||
projectRelatedPersonnel.setEngineeringInterfacePersonName("ning.chen,xinhui.wei");
|
exportParams.setSheetName(title);
|
||||||
projectRelatedPersonnel.setCertificationEngineerName("ning.chen,xinhui.wei");
|
//查标签内容里的责任领域数据
|
||||||
projectRelatedPersonnel.setRemark("xxxxx");
|
List<String> dictItemNameList = sysDictMapper.queryDictNameByCode(DictCodeEnum.DUTY_TERRITORY.getValue());
|
||||||
if(projectRelatedPersonnel != null) {
|
//新建相关人员表里的责任领域数据
|
||||||
records.add(projectRelatedPersonnel);
|
if (CollectionUtils.isNotEmpty(dictItemNameList)) {
|
||||||
|
for (String dictItemName : dictItemNameList) {
|
||||||
|
ProjectRelatedPersonnel projectRelatedPersonnel=new ProjectRelatedPersonnel();
|
||||||
|
projectRelatedPersonnel.setDutyTerritory(dictItemName);
|
||||||
|
records.add(projectRelatedPersonnel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下
|
mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下
|
||||||
mv.addObject(NormalExcelConstants.CLASS, clazz);//!!!!这里设置中英切换
|
mv.addObject(NormalExcelConstants.CLASS, clazz);//!!!!这里设置中英切换
|
||||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||||
@@ -492,6 +505,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 把导入的数据翻译成对应的id,并校验
|
* 把导入的数据翻译成对应的id,并校验
|
||||||
|
* 若除责任领域外的导入数据为空,设置为空白
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -540,7 +554,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
List<SysUser> lawEngineerUsers = new ArrayList<>();
|
List<SysUser> lawEngineerUsers = new ArrayList<>();
|
||||||
if (StringUtils.isNotEmpty(projectRelatedPersonnel.getLawEngineerName())){
|
if (StringUtils.isNotEmpty(projectRelatedPersonnel.getLawEngineerName())){
|
||||||
List<String> lawEngineerNameList = Arrays.asList(projectRelatedPersonnel.getLawEngineerName().split(","));
|
List<String> lawEngineerNameList = Arrays.asList(projectRelatedPersonnel.getLawEngineerName().split(","));
|
||||||
if (CollectionUtils.isNotEmpty(lawEngineerNameList)) {
|
if (CollectionUtils.isNotEmpty(lawEngineerNameList) && StringUtils.isNotBlank(lawEngineerNameList.get(0))) {
|
||||||
lawEngineerNameList = lawEngineerNameList.stream().distinct().collect(Collectors.toList());
|
lawEngineerNameList = lawEngineerNameList.stream().distinct().collect(Collectors.toList());
|
||||||
lawEngineerUsers=sysUserService.queryUserIdListByNameList(lawEngineerNameList);
|
lawEngineerUsers=sysUserService.queryUserIdListByNameList(lawEngineerNameList);
|
||||||
if(lawEngineerUsers.size()!=lawEngineerNameList.size()){
|
if(lawEngineerUsers.size()!=lawEngineerNameList.size()){
|
||||||
@@ -567,19 +581,14 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
projectRelatedPersonnel.setLawEngineer(midId.substring(0,midId.toString().length()-1));
|
projectRelatedPersonnel.setLawEngineer(midId.substring(0,midId.toString().length()-1));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//中英切换提示语
|
projectRelatedPersonnel.setLawEngineer("");
|
||||||
if(CutEnum.CN.getValue().equals(cut)) {
|
|
||||||
throw new JeroBootException("导入的法规工程师不能为空,请检查第" + row + "行");
|
|
||||||
}else{
|
|
||||||
throw new JeroBootException("The imported law engineer cannot be empty.Please check line " + row );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//工程接口人
|
//工程接口人
|
||||||
List<SysUser> engineeringInterfacePersonUsers = new ArrayList<>();
|
List<SysUser> engineeringInterfacePersonUsers = new ArrayList<>();
|
||||||
if (StringUtils.isNotEmpty(projectRelatedPersonnel.getEngineeringInterfacePersonName())){
|
if (StringUtils.isNotEmpty(projectRelatedPersonnel.getEngineeringInterfacePersonName())){
|
||||||
List<String> engineeringInterfacePersonNameList = Arrays.asList(projectRelatedPersonnel.getEngineeringInterfacePersonName().split(","));
|
List<String> engineeringInterfacePersonNameList = Arrays.asList(projectRelatedPersonnel.getEngineeringInterfacePersonName().split(","));
|
||||||
if (CollectionUtils.isNotEmpty(engineeringInterfacePersonNameList)) {
|
if (CollectionUtils.isNotEmpty(engineeringInterfacePersonNameList) && StringUtils.isNotBlank(engineeringInterfacePersonNameList.get(0))) {
|
||||||
engineeringInterfacePersonNameList = engineeringInterfacePersonNameList.stream().distinct().collect(Collectors.toList());
|
engineeringInterfacePersonNameList = engineeringInterfacePersonNameList.stream().distinct().collect(Collectors.toList());
|
||||||
engineeringInterfacePersonUsers=sysUserService.queryUserIdListByNameList(engineeringInterfacePersonNameList);
|
engineeringInterfacePersonUsers=sysUserService.queryUserIdListByNameList(engineeringInterfacePersonNameList);
|
||||||
if(engineeringInterfacePersonUsers.size()!=engineeringInterfacePersonNameList.size()){
|
if(engineeringInterfacePersonUsers.size()!=engineeringInterfacePersonNameList.size()){
|
||||||
@@ -606,19 +615,14 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
projectRelatedPersonnel.setEngineeringInterfacePerson(midId.substring(0,midId.toString().length()-1));
|
projectRelatedPersonnel.setEngineeringInterfacePerson(midId.substring(0,midId.toString().length()-1));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//中英切换提示语
|
projectRelatedPersonnel.setEngineeringInterfacePerson("");
|
||||||
if(CutEnum.CN.getValue().equals(cut)) {
|
|
||||||
throw new JeroBootException("导入的工程接口人不能为空,请检查第" + row + "行");
|
|
||||||
}else {
|
|
||||||
throw new JeroBootException("The imported engineering interface person cannot be empty.Please check line " + row );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//认证工程师
|
//认证工程师
|
||||||
List<SysUser> certificationEngineerUsers = new ArrayList<>();
|
List<SysUser> certificationEngineerUsers = new ArrayList<>();
|
||||||
if (StringUtils.isNotEmpty(projectRelatedPersonnel.getCertificationEngineerName())){
|
if (StringUtils.isNotEmpty(projectRelatedPersonnel.getCertificationEngineerName())){
|
||||||
List<String> certificationEngineerNameList = Arrays.asList(projectRelatedPersonnel.getCertificationEngineerName().split(","));
|
List<String> certificationEngineerNameList = Arrays.asList(projectRelatedPersonnel.getCertificationEngineerName().split(","));
|
||||||
if (CollectionUtils.isNotEmpty(certificationEngineerNameList)) {
|
if (CollectionUtils.isNotEmpty(certificationEngineerNameList) && StringUtils.isNotBlank(certificationEngineerNameList.get(0))) {
|
||||||
certificationEngineerNameList = certificationEngineerNameList.stream().distinct().collect(Collectors.toList());
|
certificationEngineerNameList = certificationEngineerNameList.stream().distinct().collect(Collectors.toList());
|
||||||
certificationEngineerUsers=sysUserService.queryUserIdListByNameList(certificationEngineerNameList);
|
certificationEngineerUsers=sysUserService.queryUserIdListByNameList(certificationEngineerNameList);
|
||||||
if(certificationEngineerUsers.size()!=certificationEngineerNameList.size()){
|
if(certificationEngineerUsers.size()!=certificationEngineerNameList.size()){
|
||||||
@@ -645,12 +649,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
projectRelatedPersonnel.setCertificationEngineer(midId.substring(0,midId.toString().length()-1));
|
projectRelatedPersonnel.setCertificationEngineer(midId.substring(0,midId.toString().length()-1));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//中英切换提示语
|
projectRelatedPersonnel.setCertificationEngineer("");
|
||||||
if(CutEnum.CN.getValue().equals(cut)) {
|
|
||||||
throw new JeroBootException("导入的认证工程师不能为空,请检查第" + row + "行");
|
|
||||||
}else {
|
|
||||||
throw new JeroBootException("The imported certification engineer cannot be empty.Please check line " + row );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
projectRelatedPersonnel.setProjectId(projectId);
|
projectRelatedPersonnel.setProjectId(projectId);
|
||||||
row++;
|
row++;
|
||||||
@@ -663,58 +662,44 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
private void updateDataById(ProjectRelatedPersonnel projectRelatedPersonnel) {
|
private void updateDataById(ProjectRelatedPersonnel projectRelatedPersonnel) {
|
||||||
List<ProjectRelatedPersonnel> records = projectRelatedPersonnelMapper.queryById(projectRelatedPersonnel.getId());
|
List<ProjectRelatedPersonnel> records = projectRelatedPersonnelMapper.queryById(projectRelatedPersonnel.getId());
|
||||||
for (ProjectRelatedPersonnel data : records) {
|
for (ProjectRelatedPersonnel data : records) {
|
||||||
if (StringUtils.isBlank(data.getLawEngineer())) {//数据库里法规工程师是空的
|
//法规工程师
|
||||||
projectRelatedPersonnel.setLawEngineer(projectRelatedPersonnel.getLawEngineer());
|
String lawString = projectRelatedPersonnel.getLawEngineer();
|
||||||
}else{//数据库里不空,原+新
|
//去重
|
||||||
StringBuilder law = new StringBuilder(data.getLawEngineer());
|
if(StringUtils.isNotBlank(lawString)) {
|
||||||
String lawString = law.append(",").append(projectRelatedPersonnel.getLawEngineer()).toString();
|
|
||||||
//去重
|
|
||||||
List<String> lawList = Arrays.asList(lawString.split(","));
|
List<String> lawList = Arrays.asList(lawString.split(","));
|
||||||
String lawDistinct = lawList.stream().distinct().collect(Collectors.joining(","));
|
String lawDistinct = lawList.stream().distinct().collect(Collectors.joining(","));
|
||||||
|
|
||||||
projectRelatedPersonnel.setLawEngineer(lawDistinct);
|
projectRelatedPersonnel.setLawEngineer(lawDistinct);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isBlank(data.getEngineeringInterfacePerson())) {//数据库里工程接口人是空的
|
//工程接口人
|
||||||
projectRelatedPersonnel.setEngineeringInterfacePerson(projectRelatedPersonnel.getEngineeringInterfacePerson());
|
String interfaceString = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||||
}else{//数据库里不空,原+新
|
//去重
|
||||||
StringBuilder interfacePerson = new StringBuilder(data.getEngineeringInterfacePerson());
|
if(StringUtils.isNotBlank(interfaceString)) {
|
||||||
String interfaceString = interfacePerson.append(",").append(projectRelatedPersonnel.getEngineeringInterfacePerson()).toString();
|
|
||||||
//去重
|
|
||||||
List<String> interfaceList = Arrays.asList(interfaceString.split(","));
|
List<String> interfaceList = Arrays.asList(interfaceString.split(","));
|
||||||
String interfaceDistinct = interfaceList.stream().distinct().collect(Collectors.joining(","));
|
String interfaceDistinct = interfaceList.stream().distinct().collect(Collectors.joining(","));
|
||||||
projectRelatedPersonnel.setEngineeringInterfacePerson(interfaceDistinct);
|
projectRelatedPersonnel.setEngineeringInterfacePerson(interfaceDistinct);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isBlank(data.getCertificationEngineer())) {//数据库里工程接口人是空的
|
// 工程接口人
|
||||||
projectRelatedPersonnel.setCertificationEngineer(projectRelatedPersonnel.getCertificationEngineer());
|
String certificationString = projectRelatedPersonnel.getCertificationEngineer();
|
||||||
}else{//数据库里不空,原+新
|
//去重
|
||||||
StringBuilder certification = new StringBuilder(data.getCertificationEngineer());
|
if(StringUtils.isNotBlank(certificationString)) {
|
||||||
String certificationString = certification.append(",").append(projectRelatedPersonnel.getCertificationEngineer()).toString();
|
|
||||||
//去重
|
|
||||||
List<String> certificationList = Arrays.asList(certificationString.split(","));
|
List<String> certificationList = Arrays.asList(certificationString.split(","));
|
||||||
String certificationDistinct= certificationList.stream().distinct().collect(Collectors.joining(","));
|
String certificationDistinct = certificationList.stream().distinct().collect(Collectors.joining(","));
|
||||||
projectRelatedPersonnel.setCertificationEngineer(certificationDistinct);
|
projectRelatedPersonnel.setCertificationEngineer(certificationDistinct);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isBlank(data.getRemark())) {//数据库里备注是空的
|
if (StringUtils.isBlank(data.getRemark())) {//数据库里备注是空的
|
||||||
projectRelatedPersonnel.setRemark(projectRelatedPersonnel.getRemark());
|
projectRelatedPersonnel.setRemark(projectRelatedPersonnel.getRemark());
|
||||||
} else {//数据库里备注不是空的
|
} else {
|
||||||
if (StringUtils.isNotBlank(projectRelatedPersonnel.getRemark())) {//导入的备注不是空的
|
projectRelatedPersonnel.setRemark("");
|
||||||
}
|
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(projectRelatedPersonnel.getRemark())) {//导入的备注不是是空的,原+新
|
|
||||||
StringBuilder remark = new StringBuilder(data.getRemark());
|
|
||||||
projectRelatedPersonnel.setRemark(remark.append(",").append(projectRelatedPersonnel.getRemark()).toString());
|
|
||||||
} else {
|
|
||||||
projectRelatedPersonnel.setRemark(data.getRemark());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
projectRelatedPersonnel.setUpdateTime(now);
|
projectRelatedPersonnel.setUpdateTime(now);
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
projectRelatedPersonnel.setUpdateBy(sysUser.getUsername());
|
projectRelatedPersonnel.setUpdateBy(sysUser.getUsername());
|
||||||
saveOrUpdate(projectRelatedPersonnel);
|
updateById(projectRelatedPersonnel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -546,6 +546,8 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
}
|
}
|
||||||
String value = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
|
String value = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
|
||||||
entry.setValue(value);
|
entry.setValue(value);
|
||||||
|
} else {
|
||||||
|
entry.setValue(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 标准选择
|
// 标准选择
|
||||||
|
|||||||
@@ -706,6 +706,12 @@ module.exports = {
|
|||||||
uploadTime: 'Upload time',
|
uploadTime: 'Upload time',
|
||||||
enclosure: 'enclosure',
|
enclosure: 'enclosure',
|
||||||
// 认证
|
// 认证
|
||||||
|
attachmentTemplate: 'attachment Template',
|
||||||
|
controlAlternatives: 'control Alternatives',
|
||||||
|
controlVerification: 'control Verification',
|
||||||
|
controlType: 'control Type',
|
||||||
|
certificationCategory: 'certification Category',
|
||||||
|
parameterBatch: 'parameter Batch',
|
||||||
releaseVersion: 'release Version',
|
releaseVersion: 'release Version',
|
||||||
parameterTemplate: 'parameter Template',
|
parameterTemplate: 'parameter Template',
|
||||||
contentDescription: 'content Description',
|
contentDescription: 'content Description',
|
||||||
@@ -720,4 +726,7 @@ module.exports = {
|
|||||||
taskDataConfirmation: 'Please select the data whose list confirmation status is accepted and task confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty',
|
taskDataConfirmation: 'Please select the data whose list confirmation status is accepted and task confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty',
|
||||||
selectIssuer:'Select issuer',
|
selectIssuer:'Select issuer',
|
||||||
sendBack:'send back',
|
sendBack:'send back',
|
||||||
|
taskConfirmationProcess:'Task confirmation process',
|
||||||
|
notFinished:'not finished',
|
||||||
|
Finished:'Finished',
|
||||||
}
|
}
|
||||||
@@ -712,6 +712,12 @@ module.exports = {
|
|||||||
uploadTime:'上传时间',
|
uploadTime:'上传时间',
|
||||||
enclosure:'附件',
|
enclosure:'附件',
|
||||||
// 认证
|
// 认证
|
||||||
|
attachmentTemplate: '附件模板',
|
||||||
|
controlAlternatives: '控件备选值',
|
||||||
|
controlVerification: '控件校验',
|
||||||
|
controlType: '控件类型',
|
||||||
|
certificationCategory: '认证类别',
|
||||||
|
parameterBatch: '参数批次',
|
||||||
releaseVersion: '发布版本',
|
releaseVersion: '发布版本',
|
||||||
parameterTemplate: '参数模板',
|
parameterTemplate: '参数模板',
|
||||||
contentDescription: '内容说明',
|
contentDescription: '内容说明',
|
||||||
@@ -725,4 +731,7 @@ module.exports = {
|
|||||||
operationNode:'操作节点',
|
operationNode:'操作节点',
|
||||||
selectIssuer:'选择下发人',
|
selectIssuer:'选择下发人',
|
||||||
sendBack:'退回',
|
sendBack:'退回',
|
||||||
|
taskConfirmationProcess:'任务确认流程',
|
||||||
|
notFinished:'未完成',
|
||||||
|
Finished:'已完成',
|
||||||
}
|
}
|
||||||
@@ -94,8 +94,15 @@
|
|||||||
})
|
})
|
||||||
this.content=item.join(',')
|
this.content=item.join(',')
|
||||||
})
|
})
|
||||||
|
let arrayLabel = []
|
||||||
console.log('value111',this.content)
|
this.dictOptions.forEach((item) => {
|
||||||
|
this.arrayValue.forEach((val) => {
|
||||||
|
if(item.value === val) {
|
||||||
|
arrayLabel.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.$emit('changelabel', arrayLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-model="formInline.paramsTemplateName"
|
v-model="formInline.nioNumber"
|
||||||
:placeholder="$t('PleaseEnter')+$t('NiONumber')"/>
|
:placeholder="$t('PleaseEnter')+$t('NiONumber')"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
<span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span>
|
<span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="state">
|
<a-form-model-item class="itemModel" prop="state">
|
||||||
<a-select :placeholder="$t('PleaseSelect')+$t('Required')">
|
<a-select :placeholder="$t('PleaseSelect')+$t('Required')" v-model="formInline.isMust">
|
||||||
<a-select-option v-for="(item, key) in isRequired" :key="key" :value="item.value">
|
<a-select-option v-for="(item, key) in isRequired" :key="key" :value="item.value">
|
||||||
<span style="display: inline-block;width: 100%" :title=" item.text || item.label ">
|
<span style="display: inline-block;width: 100%" :title=" item.label ">
|
||||||
{{ item.text || item.label }}
|
{{ item.label }}
|
||||||
</span>
|
</span>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-model="formInline.paramsTemplateName"
|
v-model="formInline.paramsName"
|
||||||
:placeholder="$t('PleaseEnter')+$t('ParameterName')"/>
|
:placeholder="$t('PleaseEnter')+$t('ParameterName')"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -76,6 +76,195 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('parameterBatch')">{{$t('parameterBatch')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
|
<j-dict-select-tag class="box-input" v-model="formInline.paramsBatch"
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('parameterBatch')"
|
||||||
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="'params_batch'"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="technologyTerritory">
|
||||||
|
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||||
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('ParameterDescription')">{{$t('ParameterDescription')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="formInline.description"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('ParameterDescription')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('ParameterName')">{{$t('certificationCategory')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
|
<j-multi-select-tag class="box-input" v-model="formInline.certCategory"
|
||||||
|
@change='Onchange'
|
||||||
|
v-on:changelabel='Onchangelabel'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
|
||||||
|
:type="'checkbox'"
|
||||||
|
:triggerChange="false" :dictCode="'cert_category'"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('controlType')">{{$t('controlType')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="controlType">
|
||||||
|
<a-select :placeholder="$t('PleaseSelect')+$t('controlType')" v-model="formInline.controlType">
|
||||||
|
<a-select-option v-for="(item, key) in controlType" :key="key" :value="item.value">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.label ">
|
||||||
|
{{ item.label }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text" :title="$t('controlVerification')">{{$t('controlVerification')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="technologyTerritory">
|
||||||
|
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model="formInline.controlVerify">
|
||||||
|
<a-select-option v-for="(item, key) in controlVerification" :key="key" :value="item.value">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.label ">
|
||||||
|
{{ item.label }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('controlAlternatives')">{{$t('controlAlternatives')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="formInline.controlValues"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('controlAlternatives')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('attachmentTemplate')">{{$t('attachmentTemplate')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
|
<a-button type="primary" class="button-text"
|
||||||
|
@click="clickButtonToUpload(item)">
|
||||||
|
<!-- {{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||-->
|
||||||
|
<!-- formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')-->
|
||||||
|
<!-- }}-->
|
||||||
|
{{ $t('clickUpload') }}
|
||||||
|
</a-button>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24" >
|
||||||
|
<a-tabs>
|
||||||
|
<a-tab-pane v-for='(item,index) in certCategoryParamsInfoEOList' :tab="item.textVal" :key="index + 1">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('standard')">{{$t('standard')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="item.textVal"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('standard')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text" :title="$t('ParameterName')">{{$t('ParameterName')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="technologyTerritory">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="item.paramsName"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('ParameterName')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('ParameterDescription')">{{$t('ParameterDescription')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="item.description"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('ParameterDescription')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-tab-pane>
|
||||||
|
</a-tabs>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
<div class="drawer-bootom-button">
|
<div class="drawer-bootom-button">
|
||||||
@@ -96,11 +285,35 @@ export default {
|
|||||||
props: ['url'],
|
props: ['url'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isRequired: [
|
isRequired: [ // 是否必填
|
||||||
{value:1, label: '是' },
|
{value:1, label: '是' },
|
||||||
{value:0, label: '否' }
|
{value:0, label: '否' }
|
||||||
],
|
],
|
||||||
CategoryTreeList: [],
|
controlType: [ // 控件类型
|
||||||
|
{value:1, label: '文本' },
|
||||||
|
{value:2, label: '下拉单选' },
|
||||||
|
{value:3, label: '下拉多选' },
|
||||||
|
{value:4, label: '附件' },
|
||||||
|
{value:5, label: '文本+下拉单选' },
|
||||||
|
{value:6, label: '文本+下拉多选' },
|
||||||
|
{value:7, label: '文本+附件' },
|
||||||
|
{value:8, label: '下拉单选+附件' },
|
||||||
|
{value:9, label: '下拉多选+附件' },
|
||||||
|
{value:10, label: '文本+下拉单选+附件' },
|
||||||
|
],
|
||||||
|
controlVerification: [ // 控件校验
|
||||||
|
{value:1, label: '无' },
|
||||||
|
{value:2, label: '中文' },
|
||||||
|
{value:3, label: '正整数' },
|
||||||
|
{value:4, label: '正浮点数' },
|
||||||
|
{value:5, label: '整数或小数' },
|
||||||
|
{value:6, label: '一位小数' },
|
||||||
|
{value:7, label: '两位小数' },
|
||||||
|
{value:8, label: '三位小数' },
|
||||||
|
{value:9, label: '四位小数' },
|
||||||
|
],
|
||||||
|
CategoryTreeList: [], // 技术领域
|
||||||
|
certCategoryParamsInfoEOList: [], // 认证类别得tab栏
|
||||||
formInline: {},
|
formInline: {},
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -126,7 +339,8 @@ export default {
|
|||||||
},
|
},
|
||||||
disabled: false,
|
disabled: false,
|
||||||
projectNameList: [],
|
projectNameList: [],
|
||||||
title: ''
|
title: '',
|
||||||
|
stateOne: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -134,6 +348,39 @@ export default {
|
|||||||
this.getSysCategoryTree()
|
this.getSysCategoryTree()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
clickButtonToUpload(item) {
|
||||||
|
// this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
// this.$refs.uploadFile.state = item.flag
|
||||||
|
// this.$refs.uploadFile.visible = true
|
||||||
|
// this.uploadName = item.db_field_name
|
||||||
|
// getAction('sys/common/getFileInfos', { id: this.formInline[item.db_field_name] }).then((res) => {
|
||||||
|
// if (res.success) {
|
||||||
|
// this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||||
|
// } else {
|
||||||
|
// this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
Onchangelabel(val) {
|
||||||
|
this.certCategoryParamsInfoEOList = []
|
||||||
|
console.log(val,'val。。。')
|
||||||
|
val.forEach((item) => {
|
||||||
|
let _tt = {
|
||||||
|
textVal: item.text, // tab
|
||||||
|
certCategory: '', // 所属认证类别
|
||||||
|
paramsNumber: '', // 编号
|
||||||
|
paramsName: '', // 参数名称
|
||||||
|
description: ''// 参数说明
|
||||||
|
}
|
||||||
|
this.certCategoryParamsInfoEOList.push(_tt)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
Onchange() {
|
||||||
|
|
||||||
|
},
|
||||||
|
callback() {
|
||||||
|
|
||||||
|
},
|
||||||
getSysCategoryTree() {
|
getSysCategoryTree() {
|
||||||
getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
|
getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|||||||
@@ -109,11 +109,11 @@ export default {
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
url: {
|
url: {
|
||||||
list: 'params/template/page',
|
list: 'params/paramsInfo/page',
|
||||||
add: 'params/template/add',
|
add: 'params/paramsInfo/add',
|
||||||
edit: 'params/template/edit',
|
edit: 'params/paramsInfo/edit',
|
||||||
deleteBatch: 'params/template/delete',
|
deleteBatch: 'params/paramsInfo/delete',
|
||||||
deleteAll: 'params/template/deleteBatch'
|
deleteAll: 'params/paramsInfo/deleteBatch'
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -124,12 +124,12 @@ export default {
|
|||||||
title: this.$t('NiONumber'),
|
title: this.$t('NiONumber'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '10%',
|
width: '10%',
|
||||||
dataIndex: 'region_dictText',
|
dataIndex: 'nioNumber',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('ParameterName'),
|
title: this.$t('ParameterName'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'paramsTemplateName'
|
dataIndex: 'paramsName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('ParameterDescription'),
|
title: this.$t('ParameterDescription'),
|
||||||
@@ -139,7 +139,7 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('areaOfResponsibility'),
|
title: this.$t('areaOfResponsibility'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'state_dictText'
|
dataIndex: 'dutyTerritory'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('createTime'),
|
title: this.$t('createTime'),
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
{{prcTypeName[text]}}
|
{{prcTypeName[text]}}
|
||||||
</span>
|
</span>
|
||||||
<span slot="isEnd" slot-scope="text,record">
|
<span slot="isEnd" slot-scope="text,record">
|
||||||
{{text && text == 0 ? '未完成':'已完成'}}
|
{{text && text == 0 ? $t('notFinished'):$t('Finished')}}
|
||||||
</span>
|
</span>
|
||||||
<span slot="operation" slot-scope="record">
|
<span slot="operation" slot-scope="record">
|
||||||
<a @click="classAdd(record)" style="margin-right:8px">{{$t('See')}}</a>
|
<a @click="classAdd(record)" style="margin-right:8px">{{$t('See')}}</a>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
prcTypeName: {
|
prcTypeName: {
|
||||||
1: '任务确认流程'
|
1: this.$t('taskConfirmationProcess')
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
{{prcTypeName[text]}}
|
{{prcTypeName[text]}}
|
||||||
</span>
|
</span>
|
||||||
<span slot="isEnd" slot-scope="text,record">
|
<span slot="isEnd" slot-scope="text,record">
|
||||||
{{text && text == 0 ? '未完成':'已完成'}}
|
{{text && text == 0 ? $t('notFinished'):$t('Finished')}}
|
||||||
</span>
|
</span>
|
||||||
<span slot="operation" slot-scope="record">
|
<span slot="operation" slot-scope="record">
|
||||||
<a @click="classAdd(record)" style="margin-right:8px">{{$t('See')}}</a>
|
<a @click="classAdd(record)" style="margin-right:8px">{{$t('See')}}</a>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
prcTypeName: {
|
prcTypeName: {
|
||||||
1: '任务确认流程'
|
1: this.$t('taskConfirmationProcess')
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
{{prcTypeName[text]}}
|
{{prcTypeName[text]}}
|
||||||
</span>
|
</span>
|
||||||
<span slot="isEnd" slot-scope="text,record">
|
<span slot="isEnd" slot-scope="text,record">
|
||||||
{{text && text == 0 ? '未完成':'已完成'}}
|
{{text && text == 0 ? $t('notFinished'):$t('Finished')}}
|
||||||
</span>
|
</span>
|
||||||
<span slot="operation" slot-scope="record">
|
<span slot="operation" slot-scope="record">
|
||||||
<a @click="classAdd(record)" style="margin-right:8px">{{$t('See')}}</a>
|
<a @click="classAdd(record)" style="margin-right:8px">{{$t('See')}}</a>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
prcTypeName: {
|
prcTypeName: {
|
||||||
1: '任务确认流程'
|
1: this.$t('taskConfirmationProcess')
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
prcTypeName: {
|
prcTypeName: {
|
||||||
1: '任务确认流程'
|
1: this.$t('taskConfirmationProcess')
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@
|
|||||||
<a-icon type="export" :rotate="-90"/>
|
<a-icon type="export" :rotate="-90"/>
|
||||||
{{$t('export')}}
|
{{$t('export')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text">
|
<div class="operator-text" v-if="this.$route.query.studioEngineer == this.userInfo().id">
|
||||||
<ImportFile :url="url" :projectId="$route.query.id" :isTrue="true" :accept="'.xls'"
|
<ImportFile :url="url" :projectId="$route.query.id" :isTrue="true" :accept="'.xls'"
|
||||||
@getList="getPersonnelList"/>
|
@getList="getPersonnelList"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user