Merge remote-tracking branch 'origin/dev_20230216' into dev_20230216
This commit is contained in:
+8
@@ -5,6 +5,7 @@ import com.adc.da.common.BussEnum;
|
||||
import com.adc.da.common.SarConformStateEnum;
|
||||
import com.adc.da.common.SarStateColorEnum;
|
||||
import com.adc.da.common.SarTypeEnum;
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.login.util.UserUtils;
|
||||
import com.adc.da.slrs.SarCompResAssess.entity.SarCompResAssess;
|
||||
@@ -387,6 +388,13 @@ public class ActSarItemsBussEOService {
|
||||
sarBussionessStand.setSarStandAttrEOStr(resData);
|
||||
// 根据标准号判断数据是否已存在
|
||||
//2021年4月9日 此处检查当前是否存在standId
|
||||
QueryWrapper<SarBussionessStand>queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(sarBussionessStand.getStandCode() != null,"STAND_CODE",sarBussionessStand.getStandCode())
|
||||
.eq(sarBussionessStand.getStandName() != null,"STAND_NAME",sarBussionessStand.getStandName());
|
||||
Integer count = iSarBussionessStandService.count(queryWrapper);
|
||||
if (count > 0){
|
||||
throw new AdcDaBaseException("当前企标标准号和企标名称已存在");
|
||||
}
|
||||
String standCode = "";
|
||||
if(StringUtils.isNotBlank(sarBussionessStand.getStandCode()) && !"null".equals(sarBussionessStand.getStandCode())){
|
||||
standCode = sarBussionessStand.getStandCode();
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.adc.da.common.PropertyTypeEnum;
|
||||
import com.adc.da.common.SarConformStateEnum;
|
||||
import com.adc.da.common.SarStateColorEnum;
|
||||
import com.adc.da.common.SarTypeEnum;
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.login.util.UserUtils;
|
||||
import com.adc.da.person.entity.PersonMsgEO;
|
||||
import com.adc.da.slrs.SarCompResAssess.entity.SarCompResAssess;
|
||||
@@ -34,6 +36,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -189,6 +192,14 @@ public class ActSarItemsEOService {
|
||||
// attInfoMap = saveFileMsg(attInfoMap,sarStandardsInfoEO.getFileIds(),sarStandardsInfoEO.getTextStatus());
|
||||
String resData = JSON.toJSONString(attInfoMap, SerializerFeature.WriteMapNullValue);
|
||||
sarStandardsInfoEO.setSarStandAttrEOStr(resData);
|
||||
|
||||
QueryWrapper<SarStandardsInfo> wrapper=new QueryWrapper<>();
|
||||
wrapper.eq(null!=sarStandardsInfoEO.getStandName(),"STAND_NAME",sarStandardsInfoEO.getStandName())
|
||||
.eq(null!=sarStandardsInfoEO.getStandNumber(),"STAND_NUMBER",sarStandardsInfoEO.getStandNumber());
|
||||
Integer s=sarStandardsInfoEOService.count(wrapper);
|
||||
if (s>0){
|
||||
throw new AdcDaBaseException("当前标准编号和中文名称已存在");
|
||||
}
|
||||
// 根据标准号判断数据是否已存在
|
||||
//2021年4月9日 此处检查当前是否存在standId
|
||||
String standnumber = "";
|
||||
|
||||
+181
-3
@@ -3,10 +3,12 @@ package com.adc.da.slrs.sarBussionessStand.controller;
|
||||
|
||||
import com.adc.da.Log.BusinessType;
|
||||
import com.adc.da.Log.EpcLog;
|
||||
import com.adc.da.common.FileUnZip;
|
||||
import com.adc.da.common.ReadExcel;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarLawsInfo.service.ISarLawsInfoService;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarAdvanceSearchVO;
|
||||
@@ -23,25 +25,33 @@ import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.IOUtils;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.adc.da.utils.util.BussStandExportUtil;
|
||||
import com.adc.da.utils.util.FieldConvertUtil;
|
||||
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -74,6 +84,12 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
@Autowired
|
||||
private IDicTypeEOService dicTypeEOService;
|
||||
|
||||
@Value("${file.path}")
|
||||
private String filePath;
|
||||
|
||||
@Autowired
|
||||
ISarLawsInfoService sarLawsInfoEOService;
|
||||
|
||||
/**
|
||||
* 根据计划库制定状态查询企标编号
|
||||
*
|
||||
@@ -143,6 +159,14 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||
// @RequiresPermissions("lawss:sarBussionessStand:updateSarBussionessStand")
|
||||
public ResponseMessage<SarBussionessStand> updateSarBussionessStand(@RequestBody SarBussionessStand sarBussionessStandEO) throws Exception {
|
||||
//校验编号和名称是否存在
|
||||
QueryWrapper<SarBussionessStand> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(null!=sarBussionessStandEO.getStandNumber(),"STAND_NUMBER",sarBussionessStandEO.getStandNumber())
|
||||
.eq(null!=sarBussionessStandEO.getStandName(),"STAND_NAME",sarBussionessStandEO.getStandName());
|
||||
List<SarBussionessStand> list = sarBussionessStandEOService.list(queryWrapper);
|
||||
if ((list.size() ==1 && !list.get(0).getId().equals(sarBussionessStandEO.getId())) || list.size() >1){
|
||||
return Result.error("当前企标标准号和企标名称已存在");
|
||||
}
|
||||
sarBussionessStandEO.setModifyTime(new Date());
|
||||
sarBussionessStandEOService.updateSarBussionessStand(sarBussionessStandEO);
|
||||
return Result.success("","修改成功",sarBussionessStandEO);
|
||||
@@ -381,6 +405,160 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "|SarBussionessStand|导入")
|
||||
@PostMapping("/importSarBussionessStand")
|
||||
public ResponseMessage<SarBussionessStand> importSarBussionessStandFile(@RequestParam(value = "file",required = false) MultipartFile file)throws Exception {
|
||||
//截取后缀名
|
||||
int pos = file.getOriginalFilename().lastIndexOf(".");
|
||||
String str = file.getOriginalFilename().substring(pos + 1).toLowerCase();
|
||||
String filenameorg = file.getOriginalFilename().substring(0, pos);
|
||||
//判断上传文件必须是zip
|
||||
if (!str.equals("zip")) {
|
||||
return Result.error("fail", "请上传zip文件");
|
||||
}
|
||||
String path = filePath + "/modal/" + filenameorg;
|
||||
File saveDirectory = new File(path);
|
||||
if (!saveDirectory.isDirectory()) {
|
||||
saveDirectory.mkdir();
|
||||
}
|
||||
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(path + "/" + file.getOriginalFilename()));
|
||||
try {
|
||||
//解压缩
|
||||
String zipEntryName = FileUnZip.unZipFiles(path + "/" + file.getOriginalFilename(), path);
|
||||
// 数据相关处理,
|
||||
// 1.获取其中的Excel,
|
||||
List<File> excelfilelist = FileUnZip.readImpExcelFile(zipEntryName);
|
||||
System.gc();
|
||||
if (excelfilelist.size() < 1) {
|
||||
int i = 0;
|
||||
for (File file1 : excelfilelist) {
|
||||
if (file1.getName().indexOf("导入模板") > -1) {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (i == 0) {
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error("fail", "压缩包内没有上传导入模板Excel");
|
||||
}
|
||||
} else if (excelfilelist.size() > 1) {
|
||||
int i = 0;
|
||||
for (File file1 : excelfilelist) {
|
||||
if (file1.getName().indexOf("导入模板") > -1) {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (i > 1) {
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error("fail", "压缩包内有多个导入模板Excel");
|
||||
}
|
||||
}
|
||||
File excelfile = excelfilelist.get(0);
|
||||
for (File file1 : excelfilelist) {
|
||||
if (file1.getName().indexOf("导入模板") > -1) {
|
||||
excelfile = file1;
|
||||
}
|
||||
}
|
||||
// 导入参数设置,默认即可
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
workbook = WorkbookFactory.create(excelfile);
|
||||
List<Map<String, String>> dataList = new ArrayList<>();
|
||||
if (workbook != null) {
|
||||
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
if (sheet != null) {
|
||||
StringBuilder headerSb = new StringBuilder();
|
||||
int rowNos = sheet.getLastRowNum();// 得到excel的总记录条数
|
||||
for (int i = 0; i <= rowNos; i++) {// 遍历行
|
||||
Row row = sheet.getRow(i);
|
||||
Row headerRow = sheet.getRow(0);
|
||||
boolean isBlank = sarLawsInfoEOService.isRowEmpty(row);
|
||||
if (row != null && !isBlank) {
|
||||
int columNos = headerRow.getLastCellNum();// 表头总共的列数
|
||||
Map<String, String> rowList = new LinkedHashMap<>();
|
||||
for (int j = 0; j < columNos; j++) {
|
||||
Cell cell = row.getCell(j);
|
||||
Cell headerCell = headerRow.getCell(j);
|
||||
if (cell != null) {
|
||||
if (i == 0) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
headerSb.append(cell.getStringCellValue() + ",");
|
||||
} else {
|
||||
if (CellType.NUMERIC == cell.getCellType() && HSSFDateUtil.isCellDateFormatted(cell)) {
|
||||
Date d = cell.getDateCellValue();
|
||||
rowList.put(headerCell.getStringCellValue(), df.format(d));
|
||||
} else {
|
||||
cell.setCellType(CellType.STRING);
|
||||
rowList.put(headerCell.getStringCellValue(), cell.getStringCellValue());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (i != 0) {
|
||||
rowList.put(headerCell.getStringCellValue(), "");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i != 0) {
|
||||
dataList.add(rowList);
|
||||
}
|
||||
}
|
||||
}
|
||||
String fields = FieldConvertUtil.exportBaseFieldNamesBuss + "," + FieldConvertUtil.exportBaseFieldNamesBussCode + ",";
|
||||
String excelHeader = headerSb.toString();
|
||||
if (!fields.equals(excelHeader)) {
|
||||
workbook.close();
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error("fail", "读取失败,请严格按照模板文件导入数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
//导入
|
||||
if(dataList!=null &&!dataList.isEmpty()){
|
||||
try {
|
||||
String unzipfilepath = zipEntryName;
|
||||
ResponseMessage<SarBussionessStand> message = sarBussionessStandEOService.importSarBussionessStand(dataList,unzipfilepath);
|
||||
workbook.close();
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return message;
|
||||
} catch (Exception e) {
|
||||
workbook.close();
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error("fail", e.getMessage());
|
||||
}
|
||||
}else{
|
||||
if (workbook != null) {
|
||||
workbook.close();
|
||||
}
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error("fail", "没有可导入的数据,请检查!");
|
||||
}
|
||||
} catch (NoSuchElementException e){
|
||||
if (workbook != null) {
|
||||
workbook.close();
|
||||
}
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error("fail", "没有可导入的数据,请检查!");
|
||||
} catch (Exception e) {
|
||||
if (workbook != null) {
|
||||
workbook.close();
|
||||
}
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error("fail", "读取失败,请严格按照模板文件导入数据");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error("fail", "读取失败,请严格按照模板文件导入数据");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -118,5 +118,6 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
int insertSelective(SarBussionessStand sarBussionessStandEO);
|
||||
|
||||
|
||||
void importSarBussionessStand(SarBussionessStand sarBussionessStands);
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -7,8 +7,10 @@ import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -54,5 +56,7 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
||||
|
||||
void checkFileByEncrypt();
|
||||
|
||||
ResponseMessage<SarBussionessStand> importSarBussionessStand(List<Map<String, String>> dataList, String filepath)throws Exception;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+38
@@ -64,6 +64,17 @@ import net.sf.json.JSONObject;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.json.JSONTokener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -71,9 +82,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.sql.Clob;
|
||||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -173,6 +186,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
private EncryptFileUtils encryptFileUtils;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public SarBussionessStand getStandInfoByReviseStatus(String reviseStatus,String standSort,String taskId){
|
||||
SarBussionessStand bussionessStand = new SarBussionessStand();
|
||||
@@ -1939,5 +1953,29 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
logger.info("================================文件检查完毕==================================================");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入
|
||||
* @param dataList
|
||||
* @param filepath
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResponseMessage<SarBussionessStand> importSarBussionessStand(List<Map<String, String>> dataList, String filepath)throws Exception {
|
||||
try {
|
||||
//将导入数据循环新增至相应表
|
||||
List<SarBussionessStand> list = new ArrayList<>();
|
||||
int countSuccess = 0;
|
||||
for (SarBussionessStand sarBussionessStand : list) {
|
||||
sarBussionessStandEODao.importSarBussionessStand(sarBussionessStand);
|
||||
countSuccess++;
|
||||
}
|
||||
String msg = "成功导入" + countSuccess + "条";
|
||||
return Result.success("0", msg, null);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
return Result.error("导入失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+18
-1
@@ -298,6 +298,14 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
} else if (StringUtils.isBlank(sarStandardsInfoEO.getMenuId()) && "FOREIGN".equals(sarStandardsInfoEO.getStandType())) {
|
||||
sarStandardsInfoEO.setMenuId("22179d54d4e640098e29");
|
||||
}
|
||||
//校验编号和名称是否存在
|
||||
QueryWrapper<SarStandardsInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(null!=sarStandardsInfoEO.getStandNumber(),"STAND_NUMBER",sarStandardsInfoEO.getStandNumber())
|
||||
.eq(null!=sarStandardsInfoEO.getStandName(),"STAND_NAME",sarStandardsInfoEO.getStandName());
|
||||
Integer s1 = sarStandardsInfoEOService.count(queryWrapper);
|
||||
if (s1>0){
|
||||
return Result.error("当前标准编号和中文名称已存在");
|
||||
}
|
||||
sarStandardsInfoEOService.createSarStandardsInfo(sarStandardsInfoEO);
|
||||
return Result.success("0", "添加成功", sarStandardsInfoEO);
|
||||
}
|
||||
@@ -307,6 +315,14 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||
// @RequiresPermissions("lawss:sarStandardsInfo:updateSarStandardsInfo")
|
||||
public ResponseMessage<SarStandardsInfo> updateSarStandardsInfo(@RequestBody SarStandardsInfo sarStandardsInfoEO) throws Exception {
|
||||
//校验编号和名称是否存在
|
||||
QueryWrapper<SarStandardsInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(null!=sarStandardsInfoEO.getStandNumber(),"STAND_NUMBER",sarStandardsInfoEO.getStandNumber())
|
||||
.eq(null!=sarStandardsInfoEO.getStandName(),"STAND_NAME",sarStandardsInfoEO.getStandName());
|
||||
List<SarStandardsInfo> list = sarStandardsInfoEOService.list(queryWrapper);
|
||||
if ((list.size() ==1 && !list.get(0).getId().equals(sarStandardsInfoEO.getId())) || list.size() >1){
|
||||
return Result.error("当前标准编号和中文名称已存在");
|
||||
}
|
||||
int result = sarStandardsInfoEOService.updateSarStandardsInfo(sarStandardsInfoEO);
|
||||
if (result > 0) {
|
||||
return Result.success("", "修改成功", sarStandardsInfoEO);
|
||||
@@ -886,7 +902,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
.eq(null!=page.getStandYear(),"STAND_YEAR",page.getStandYear()).eq("VALID_FLAG", 0);
|
||||
Integer s=sarStandardsInfoEOService.count(wrapper);
|
||||
if (s>0){
|
||||
return Result.error();
|
||||
return Result.error("当前标准编号已存在");
|
||||
}else {
|
||||
return Result.success();
|
||||
}
|
||||
@@ -940,4 +956,5 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+10
@@ -18,6 +18,7 @@ import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||
import com.adc.da.slrs.sarStandFile.service.ISarStandFileService;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.adc.da.slrs.sarStandWarning.service.Impl.WarningDateServiceImpl;
|
||||
import com.adc.da.slrs.sarStandardsInfo.controller.SarStandardsInfoController;
|
||||
import com.adc.da.slrs.sarUser.entity.TsUser;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
@@ -259,6 +260,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Autowired
|
||||
private EncryptFileUtils encryptFileUtils;
|
||||
|
||||
|
||||
// /**
|
||||
// * 反向操作标准
|
||||
// */
|
||||
@@ -2373,6 +2375,14 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
List<SarStandardsInfo> list = (List<SarStandardsInfo>) map.get("resultList");
|
||||
int countSuccess = 0;
|
||||
for (SarStandardsInfo sarStandardsInfoEO : list) {
|
||||
//校验编号和名称是否存在
|
||||
QueryWrapper<SarStandardsInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(null!=sarStandardsInfoEO.getStandNumber(),"STAND_NUMBER",sarStandardsInfoEO.getStandNumber())
|
||||
.eq(null!=sarStandardsInfoEO.getStandName(),"STAND_NAME",sarStandardsInfoEO.getStandName());
|
||||
Integer s1 = count(queryWrapper);
|
||||
if (s1>0){
|
||||
return Result.error("当前标准编号和中文名称已存在");
|
||||
}
|
||||
sarStandardsInfoEO.setStandType(standType);
|
||||
sarStandardsInfoEO.setMenuId(menuId);
|
||||
createSarStandardsInfo(sarStandardsInfoEO);
|
||||
|
||||
@@ -56,6 +56,8 @@ public class FieldConvertUtil {
|
||||
|
||||
public static String exportBaseFieldNamesBuss = "企标编号,中文名称,英文名称,文本状态,发布日期,企标实施日期,企标制修订状态";
|
||||
|
||||
public static String exportBaseFieldNamesBussCode = "起草部门,废止日期,代替企标编号,复审日期,起草人,被代替企标编号,采用标准,文件上传人员,采标程度,引用标准,适用车型,能源类型,适用产品线,上传时间,体系类别,备案日期,关联模块-乘用车VPPS编码,关联模块--乘用车vpps中文名称,关联模块--卡车VPPS编码,关联模块--卡车vpps中文名称";
|
||||
|
||||
public static String exportAttrFieldNamesBuss = "SVPPS,规范性引用文件,废止日期,复审日期,密级,授权,相关部门," +
|
||||
"需会签部门,起草部门,主要起草人,起草分标委,企标文本,过程文本";
|
||||
|
||||
|
||||
+49
@@ -1176,4 +1176,53 @@
|
||||
select usid from SAR_BUSSIONESS_PERSON where QBID=#{qbid}
|
||||
</select>
|
||||
|
||||
<insert id="importSarBussionessStand" parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand">
|
||||
insert into SAR_BUSSIONESS_STAND
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="standStatus != null" >stand_status,</if>
|
||||
<if test="replacedStandNum != null" >replaced_stand_num,</if>
|
||||
<if test="replaceStandNum != null" >replace_stand_num,</if>
|
||||
<if test="putTime != null" >put_time,</if>
|
||||
<if test="issueTime != null" >issue_time,</if>
|
||||
<if test="standEnName != null" >stand_en_name,</if>
|
||||
<if test="standName != null" >stand_name,</if>
|
||||
<if test="standCode != null" >stand_code,</if>
|
||||
<if test="id != null" >id,</if>
|
||||
<!--数据库新增字段-->
|
||||
<if test="applyCountry != null" >apply_country,</if>
|
||||
<if test="standNature != null" >stand_Nature,</if>
|
||||
<if test="standSort != null" >stand_sort,</if>
|
||||
<if test="standYear != null" >stand_year,</if>
|
||||
<if test="standNumber != null" >stand_number,</if>
|
||||
<if test="reviseStatus != null" >REVISE_STATUS,</if>
|
||||
<if test="revisionStatus != null" >REVISION_STATUS,</if>
|
||||
<if test="standSn != null" >STAND_SN,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="standStatus != null" >#{standStatus, jdbcType=VARCHAR},</if>
|
||||
<if test="replacedStandNum != null" >#{replacedStandNum, jdbcType=VARCHAR},</if>
|
||||
<if test="replaceStandNum != null" >#{replaceStandNum, jdbcType=VARCHAR},</if>
|
||||
<if test="putTime != null" >#{putTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="issueTime != null" >#{issueTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="standEnName != null" >#{standEnName, jdbcType=VARCHAR},</if>
|
||||
<if test="standName != null" >#{standName, jdbcType=VARCHAR},</if>
|
||||
<if test="standCode != null" >#{standCode, jdbcType=VARCHAR},</if>
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<!--数据库新增字段-->
|
||||
<if test="applyCountry != null" >#{applyCountry, jdbcType=VARCHAR},</if>
|
||||
<if test="standNature != null" >#{standNature, jdbcType=VARCHAR},</if>
|
||||
<if test="standSort != null" >#{standSort, jdbcType=VARCHAR},</if>
|
||||
<if test="standYear != null" >#{standYear, jdbcType=VARCHAR},</if>
|
||||
<if test="standNumber != null" >#{standNumber, jdbcType=VARCHAR},</if>
|
||||
<if test="reviseStatus != null" >#{reviseStatus, jdbcType=VARCHAR},</if>
|
||||
<if test="revisionStatus != null" >#{revisionStatus, jdbcType=VARCHAR},</if>
|
||||
<if test="standSn != null" >#{standSn, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user