Merge remote-tracking branch 'origin/dev_20230216' into dev_20230216
This commit is contained in:
+9
-3
@@ -419,9 +419,9 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
|
||||
@ApiOperation(value = "导入功能")
|
||||
@PostMapping("/importSarBussionessStandFile")
|
||||
public ResponseMessage<String> importSarBussionessStandFile(@RequestParam(value = "file",required = false)MultipartFile file,String menuId) throws Exception{
|
||||
public ResponseMessage<String> importSarBussionessStandFile(@RequestParam(value = "file",required = false)MultipartFile file,String menuId,String userId) throws Exception{
|
||||
|
||||
return sarBussionessStandEOService.importSarBussionessStandFile(file,menuId);
|
||||
return sarBussionessStandEOService.importSarBussionessStandFile(file,menuId,userId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarBussionessStand|判断原文译文")
|
||||
@@ -467,7 +467,8 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
HSSFCellStyle cellStyle =workbook.createCellStyle();
|
||||
cellStyle.setWrapText(true);
|
||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
Row rowHeader = sheetItems.createRow(0);//开始创建标题行
|
||||
Row rowHeader = sheetItems.createRow(1);//开始创建标题行
|
||||
Row row2 = sheetItems.createRow(0);//开始创建填写说明
|
||||
String exportFieldName = FieldConvertUtil.exportFieldName;
|
||||
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(exportFieldName)) {
|
||||
@@ -476,6 +477,11 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
rowHeader.createCell(i).setCellValue(headerArr[i]);
|
||||
}
|
||||
}
|
||||
Cell cellA2 = row2.createCell(0);
|
||||
cellA2.setCellValue(FieldConvertUtil.exportName);
|
||||
sheetItems.setColumnWidth(0, 60 * 256);
|
||||
row2.setHeight((short) (120 * 50));
|
||||
|
||||
String repFileName = fileName2.replaceAll("/","_");
|
||||
excelOS = new FileOutputStream(fileNowPath + "/" + repFileName);
|
||||
response.setHeader("Content-Disposition",
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
||||
|
||||
ResponseMessage emptyFileAnewStorage(String type);
|
||||
|
||||
ResponseMessage<String> importSarBussionessStandFile(MultipartFile file,String menuId)throws Exception;
|
||||
ResponseMessage<String> importSarBussionessStandFile(MultipartFile file,String menuId,String userId)throws Exception;
|
||||
|
||||
ResponseMessage repetitionFile();
|
||||
|
||||
|
||||
+277
-92
@@ -2038,14 +2038,14 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public ResponseMessage<String> importSarBussionessStandFile(MultipartFile file,String menuId)throws Exception {
|
||||
public ResponseMessage<String> importSarBussionessStandFile(MultipartFile file,String menuId,String userId)throws Exception {
|
||||
|
||||
List<TsResource> tsResources = tsResourceService.getByMenuId(menuId);
|
||||
if (ObjectUtils.isEmpty(tsResources)) {
|
||||
return Result.error("请选择需要导入的目录");
|
||||
}
|
||||
//给出头部信息
|
||||
String[] headerExcel = {"企标类别,标准年份,企标编号,中文名称,英文名称,文本状态,发布日期,企标实施日期,企标制修订状态,起草部门,代替企标编号,复审日期,起草人,被代替企标编号,采用标准,文件上传人员,采标程度,引用标准,适用车型,能源类型,适用产品线,体系类别,备案日期,关联模块-乘用车VPPS编码,关联模块--卡车VPPS编码,发布稿附件,编制说明附件,历史版本附件,其他文件附件,修改单附件,关联文件附件,"};
|
||||
String[] headerExcel = {"*企标类别,企标编号,*标准年份,*企标名称,企标英文名称,*文本状态,发布日期,企标实施日期,起草部门,起草人,适用车型,能源类型,适用产品线,体系类别,关联模块-乘用车VPPS编码,关联模块--卡车VPPS编码,代替企标编号,采用标准,采标程度,引用标准,发布稿附件,编制说明附件,历史版本附件,其他文件附件,修改单附件,关联文件附件,"};
|
||||
|
||||
//获取文件全称
|
||||
String fileNameStr = file.getOriginalFilename();
|
||||
@@ -2095,24 +2095,35 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
if (sheet != null) {
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Row row = sheet.getRow(1);
|
||||
for (int i = 0; i <= 25; i++) {
|
||||
sb.append(row.getCell(i).getStringCellValue()).append(",");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//获取总条数
|
||||
int rowNum = sheet.getLastRowNum();
|
||||
int rowNum = sheet.getPhysicalNumberOfRows();
|
||||
//循环遍历
|
||||
for (int i = 0; i <= rowNum; i++) {
|
||||
Row row = sheet.getRow(i);
|
||||
Row headerRow = sheet.getRow(0);
|
||||
for (int i = 1; i <= rowNum; i++) {
|
||||
row = sheet.getRow(i);
|
||||
Row headerRow = sheet.getRow(1);
|
||||
boolean isBlank = sarLawsInfoEOService.isRowEmpty(row);
|
||||
if (row != null && !isBlank) {
|
||||
int columNos = headerRow.getLastCellNum();// 表头总共的列数
|
||||
int columNos = row.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);
|
||||
sb.append(cell.getStringCellValue() + ",");
|
||||
if (i == 1) {
|
||||
// cell.setCellType(CellType.STRING);
|
||||
// sb.append(cell.getStringCellValue() + ",");
|
||||
} else {
|
||||
if (CellType.NUMERIC == cell.getCellType() && HSSFDateUtil.isCellDateFormatted(cell)) {
|
||||
Date d = cell.getDateCellValue();
|
||||
@@ -2123,7 +2134,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (i != 0) {
|
||||
if (i != 0 && i != 1) {
|
||||
rowList.put(headerCell.getStringCellValue(), "");
|
||||
}
|
||||
}
|
||||
@@ -2137,19 +2148,139 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
return Result.error("fail", "读取失败,请严格按照模板文件导入数据");
|
||||
}
|
||||
SarBussStandAttrInfoExecl sarBussStandAttrInfo = new SarBussStandAttrInfoExecl();
|
||||
if (i != 0) {
|
||||
if (i != 0 && i != 1 && !rowList.equals("") && rowList != null ) {
|
||||
|
||||
String standSort = rowList.get("企标类别");
|
||||
String standSort = rowList.get("*企标类别");
|
||||
if (StringUtils.isNotBlank(standSort)) {
|
||||
if (standSort.length() > 100) {
|
||||
return Result.error("企标类别输入过长");
|
||||
}
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
switch (standSort){
|
||||
case "BZJ":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "FT":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q-HD":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q-IOUM":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/ASB":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/BFC":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/BQB":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/CBFC":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FD":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FL":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT A":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT B":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT E":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT F":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT G":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT M":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT P":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT Q":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT R":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT S":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT T":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT V":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT X":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT Y":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/FT Z":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/MGB":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/QCBFC":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/QCFLC":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/SGZGS":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/SH":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q/SY":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "QB/NE":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "QC/T":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "QJ/SH":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "Q房/AYJ":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "TFT":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "津Q/NK":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
case "鲁Q/LX":
|
||||
sarBussStandAttrInfo.setStandSort(standSort);
|
||||
break;
|
||||
default:
|
||||
return Result.error("请输入正确的企标类别");
|
||||
}
|
||||
} else {
|
||||
return Result.error("企标类别不能为空");
|
||||
}
|
||||
|
||||
String standYear = rowList.get("标准年份");
|
||||
String standNumber = rowList.get("企标编号");
|
||||
sarBussStandAttrInfo.setStandNumber(standNumber);
|
||||
|
||||
String standYear = rowList.get("*标准年份");
|
||||
if (StringUtils.isNotBlank(standYear)) {
|
||||
if (standYear.length() > 100) {
|
||||
return Result.error("标准年份输入过长");
|
||||
@@ -2159,28 +2290,24 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
return Result.error("标准年份不能为空");
|
||||
}
|
||||
|
||||
String standNumber = rowList.get("企标编号");
|
||||
sarBussStandAttrInfo.setStandNumber(standNumber);
|
||||
|
||||
String standName = rowList.get("中文名称");
|
||||
String standName = rowList.get("*企标名称");
|
||||
if (StringUtils.isNotBlank(standName)) {
|
||||
if (standName.length() > 100) {
|
||||
return Result.error("输入的标准名称过长");
|
||||
return Result.error("输入的企标名称过长");
|
||||
}
|
||||
sarBussStandAttrInfo.setStandName(standName);
|
||||
} else {
|
||||
return Result.error("中文名称不能为空");
|
||||
return Result.error("企标名称不能为空");
|
||||
}
|
||||
|
||||
String standEnName = rowList.get("英文名称");
|
||||
String standEnName = rowList.get("企标英文名称");
|
||||
sarBussStandAttrInfo.setStandEnName(standEnName);
|
||||
|
||||
String textStatusBuss = rowList.get("文本状态");
|
||||
String textStatusBuss = rowList.get("*文本状态");
|
||||
if (StringUtils.isNotBlank(textStatusBuss)) {
|
||||
if (textStatusBuss.length() > 200) {
|
||||
return Result.error("输入的文本状态过长");
|
||||
}
|
||||
|
||||
switch (textStatusBuss) {
|
||||
case "发布":
|
||||
sarBussStandAttrInfo.setTextStatusBuss("6jnqba2mby");
|
||||
@@ -2207,30 +2334,32 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
sarBussStandAttrInfo.setTextStatusBuss("1w7cegukbs");
|
||||
break;
|
||||
default:
|
||||
return Result.error("请提供准确的文本状态");
|
||||
return Result.error("请提供正确的文本状态");
|
||||
}
|
||||
} else {
|
||||
return Result.error("文本状态不能为空");
|
||||
}
|
||||
|
||||
String issueTimeStr =rowList.get("发布日期");
|
||||
if (issueTimeStr.contains("-")) {
|
||||
sarBussStandAttrInfo.setIssueTime(issueTimeStr);
|
||||
}else {
|
||||
return Result.error("发布日期格式必须为年-月-日");
|
||||
if (StringUtils.isNotBlank(issueTimeStr)){
|
||||
if (issueTimeStr.contains("-")) {
|
||||
sarBussStandAttrInfo.setIssueTime(issueTimeStr);
|
||||
}else {
|
||||
return Result.error("发布日期格式必须为年-月-日");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String putTimeStr = rowList.get("企标实施日期");
|
||||
if (putTimeStr.contains("-")) {
|
||||
sarBussStandAttrInfo.setPutTime(putTimeStr);
|
||||
}else {
|
||||
return Result.error("企标实施日期格式必须为年-月-日");
|
||||
if (StringUtils.isNotBlank(putTimeStr)){
|
||||
if (putTimeStr.contains("-")) {
|
||||
sarBussStandAttrInfo.setPutTime(putTimeStr);
|
||||
}else {
|
||||
return Result.error("企标实施日期格式必须为年-月-日");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String revisionStatus = rowList.get("企标制修订状态");
|
||||
sarBussStandAttrInfo.setRevisionStatus(revisionStatus);
|
||||
|
||||
String qcdw = rowList.get("起草部门");
|
||||
if (StringUtils.isNotBlank(qcdw)) {
|
||||
if (qcdw.length() > 100) {
|
||||
@@ -2239,18 +2368,6 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
sarBussStandAttrInfo.setQcdw(qcdw);
|
||||
}
|
||||
|
||||
|
||||
String dtqbbhbuss = rowList.get("代替企标编号");
|
||||
sarBussStandAttrInfo.setDtqbbhbuss(dtqbbhbuss);
|
||||
|
||||
String fsrqbuss = rowList.get("复审日期");
|
||||
if (fsrqbuss.contains("-")) {
|
||||
sarBussStandAttrInfo.setFsrqbuss(fsrqbuss);
|
||||
}else {
|
||||
return Result.error("复审日期格式必须为年-月-日");
|
||||
}
|
||||
|
||||
|
||||
String qcrbuss = rowList.get("起草人");
|
||||
if (StringUtils.isNotBlank(qcrbuss)) {
|
||||
if (qcrbuss.length() > 100) {
|
||||
@@ -2259,15 +2376,109 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
sarBussStandAttrInfo.setQcrbuss(qcrbuss);
|
||||
}
|
||||
|
||||
String bdtqbbhbuss = rowList.get("被代替企标编号");
|
||||
sarBussStandAttrInfo.setBdtqbbhbuss(bdtqbbhbuss);
|
||||
String sycxclass = rowList.get("适用车型");
|
||||
if (StringUtils.isNotBlank(sycxclass) && !sycxclass.equals("")){
|
||||
String[] strings = sycxclass.split(",");
|
||||
String sycx = "";
|
||||
String sycxs = "";
|
||||
if (ObjectUtils.isNotEmpty(strings)) {
|
||||
for (int j = 0; j < strings.length; j++) {
|
||||
sycx = strings[j];
|
||||
if (sycx.equals("N1") || sycx.equals("N2") || sycx.equals("N3") || sycx.equals("M1") || sycx.equals("M2") || sycx.equals("M3")) {
|
||||
if (StringUtils.isNotBlank(sycxs)){
|
||||
sycxs += "," + sycx;
|
||||
}else {
|
||||
sycxs = sycx;
|
||||
}
|
||||
} else {
|
||||
return Result.error("请输入正确的适用车型");
|
||||
}
|
||||
}
|
||||
sarBussStandAttrInfo.setSycxclass(sycxs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String nylxclass = rowList.get("能源类型");
|
||||
if (StringUtils.isNotBlank(nylxclass) && ! nylxclass.equals("")){
|
||||
String[] stringNylxc = nylxclass.split(",");
|
||||
String nylx = "";
|
||||
String nylxs = "";
|
||||
if (ObjectUtils.isNotEmpty(stringNylxc)){
|
||||
for (int j = 0; j < stringNylxc.length; j++) {
|
||||
nylx = stringNylxc[j];
|
||||
if (nylx.equals("汽油") || nylx.equals("柴油") || nylx.equals("纯电动") || nylx.equals("混合动力") || nylx.equals("燃料电池") || nylx.equals("替代燃料")){
|
||||
if (StringUtils.isNotBlank(nylxs)){
|
||||
nylxs += "," + nylx;
|
||||
}else {
|
||||
nylxs = nylx;
|
||||
}
|
||||
}else {
|
||||
return Result.error("请输入正确的能源类型");
|
||||
}
|
||||
}
|
||||
sarBussStandAttrInfo.setNylxclass(nylxs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String sycpxclass = rowList.get("适用产品线");
|
||||
if (StringUtils.isNotBlank(sycpxclass) && !sycpxclass.equals("")){
|
||||
String[] stringSycpx = sycpxclass.split(",");
|
||||
String sycpx = "";
|
||||
String sycpxs = "";
|
||||
if (ObjectUtils.isNotEmpty(stringSycpx)){
|
||||
for (int j = 0; j < stringSycpx.length; j++) {
|
||||
sycpx = stringSycpx[j];
|
||||
if (sycpx.equals("VAN") || sycpx.equals("微卡") || sycpx.equals("轻卡") || sycpx.equals("皮卡") || sycpx.equals("中卡") || sycpx.equals("重卡") || sycpx.equals("客车")){
|
||||
if (StringUtils.isNotBlank(sycpxs)){
|
||||
sycpxs += "," + sycpx;
|
||||
}else {
|
||||
sycpxs = sycpx;
|
||||
}
|
||||
}else {
|
||||
return Result.error("请输入正确的适用产品线");
|
||||
}
|
||||
}
|
||||
sarBussStandAttrInfo.setSycpxclass(sycpxs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
String txlbbuss = rowList.get("体系类别");
|
||||
sarBussStandAttrInfo.setTxlbbuss(txlbbuss);
|
||||
|
||||
//关联模块-乘用车VPPS编码 23
|
||||
String cycvppsbmbuss = rowList.get("关联模块-乘用车VPPS编码");
|
||||
sarBussStandAttrInfo.setCycvppsbmbuss(cycvppsbmbuss);
|
||||
|
||||
// 关联模块-乘用车VPPS名称 24
|
||||
String cycvppscnbuss = sarVppsTreeDao.getCycvppscnbuss(sarBussStandAttrInfo.getCycvppsbmbuss());
|
||||
sarBussStandAttrInfo.setCycvppscnbuss(cycvppscnbuss);
|
||||
|
||||
//// //关联模块--卡车VPPS编码 25
|
||||
String kcvppsbmbuss = rowList.get("关联模块--卡车VPPS编码");
|
||||
sarBussStandAttrInfo.setKcvppsbmbuss(kcvppsbmbuss);
|
||||
|
||||
//关联模块--卡车VPPS名称 26
|
||||
String kcvppscnbuss = sarVppsTreeDao.getKcvppscnbuss(sarBussStandAttrInfo.getKcvppsbmbuss());
|
||||
sarBussStandAttrInfo.setKcvppscnbuss(kcvppscnbuss);
|
||||
|
||||
|
||||
String dtqbbhbuss = rowList.get("代替企标编号");
|
||||
sarBussStandAttrInfo.setDtqbbhbuss(dtqbbhbuss);
|
||||
|
||||
//// //采用标准 13
|
||||
String cybz = rowList.get("采用标准");
|
||||
sarBussStandAttrInfo.setCybz(cybz);
|
||||
if (StringUtils.isNotBlank(cybz) && !cybz.equals("")){
|
||||
if (cybz.equals("IDT等同采用") || cybz.equals("NEQ非等效采用") || cybz.equals("MOD修改采用")){
|
||||
sarBussStandAttrInfo.setCybz(cybz);
|
||||
}else {
|
||||
return Result.error("请提供正确的采用标准");
|
||||
}
|
||||
}
|
||||
|
||||
String wjscrybuss = rowList.get("文件上传人员");
|
||||
sarBussStandAttrInfo.setWjscrybuss(wjscrybuss);
|
||||
|
||||
//// //采标程度 15
|
||||
String cycd = rowList.get("采标程度");
|
||||
@@ -2277,49 +2488,12 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
String yybz = rowList.get("引用标准");
|
||||
sarBussStandAttrInfo.setYybz(yybz);
|
||||
|
||||
String sycxclass = rowList.get("适用车型");
|
||||
sarBussStandAttrInfo.setSycxclass(sycxclass);
|
||||
|
||||
String nylxclass = rowList.get("能源类型");
|
||||
sarBussStandAttrInfo.setNylxclass(nylxclass);
|
||||
|
||||
String sycpxclass = rowList.get("适用产品线");
|
||||
sarBussStandAttrInfo.setSycpxclass(sycpxclass);
|
||||
|
||||
//上传时间
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date date = new Date();
|
||||
String format = sdf.format(date);
|
||||
String format = simpleDateFormat.format(date);
|
||||
sarBussStandAttrInfo.setXcsjbuss(format);
|
||||
|
||||
|
||||
String txlbbuss = rowList.get("体系类别");
|
||||
sarBussStandAttrInfo.setTxlbbuss(txlbbuss);
|
||||
|
||||
//// //备案日期 22
|
||||
String barq = rowList.get("备案日期");
|
||||
if (barq.contains("-")){
|
||||
sarBussStandAttrInfo.setBarq(barq);
|
||||
}else {
|
||||
return Result.error("备案日期格式必须为年-月-日");
|
||||
}
|
||||
|
||||
|
||||
//// //关联模块-乘用车VPPS编码 23
|
||||
String cycvppsbmbuss = rowList.get("关联模块-乘用车VPPS编码");
|
||||
sarBussStandAttrInfo.setCycvppsbmbuss(cycvppsbmbuss);
|
||||
|
||||
// 关联模块-乘用车VPPS名称 24
|
||||
String cycvppscnbuss = sarVppsTreeDao.getCycvppscnbuss(sarBussStandAttrInfo.getCycvppsbmbuss());
|
||||
sarBussStandAttrInfo.setCycvppscnbuss(cycvppscnbuss);
|
||||
|
||||
//// //关联模块--卡车VPPS编码 25
|
||||
String kcvppsbmbuss = rowList.get("关联模块--卡车VPPS编码");
|
||||
sarBussStandAttrInfo.setKcvppsbmbuss(kcvppsbmbuss);
|
||||
|
||||
//关联模块--卡车VPPS名称 26
|
||||
String kcvppscnbuss = sarVppsTreeDao.getKcvppscnbuss(sarBussStandAttrInfo.getKcvppsbmbuss());
|
||||
sarBussStandAttrInfo.setKcvppscnbuss(kcvppscnbuss);
|
||||
|
||||
String fbgbuss = rowList.get("发布稿附件");
|
||||
if (fbgbuss != null && !fbgbuss.equals("")) {
|
||||
String[] split = fbgbuss.split(",");
|
||||
@@ -2488,6 +2662,17 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
}
|
||||
|
||||
//文件上传人员
|
||||
if ((sarBussStandAttrInfo.getFbgbuss() != null && !sarBussStandAttrInfo.getFbgbuss().equals(""))
|
||||
|| (sarBussStandAttrInfo.getBzsmbuss() != null && !sarBussStandAttrInfo.getBzsmbuss().equals(""))
|
||||
|| (sarBussStandAttrInfo.getLsbbbuss() != null && !sarBussStandAttrInfo.getLsbbbuss().equals(""))
|
||||
|| (sarBussStandAttrInfo.getQtwjbuss() != null && !sarBussStandAttrInfo.getQtwjbuss().equals(""))
|
||||
|| (sarBussStandAttrInfo.getXgd() != null && !sarBussStandAttrInfo.getXgd().equals(""))
|
||||
|| (sarBussStandAttrInfo.getGlwjbuss() != null && !sarBussStandAttrInfo.getGlwjbuss().equals(""))){
|
||||
String userName = tsUserService.userIdByName(userId);
|
||||
sarBussStandAttrInfo.setWjscrybuss(userName);
|
||||
}
|
||||
|
||||
sarBussStandAttrInfo.setMenuId(menuId);
|
||||
|
||||
List<SarBussStandAttrInfoExecl> list = new ArrayList<>();
|
||||
|
||||
@@ -72,4 +72,7 @@ public interface TsUserDao extends BaseMapper<TsUser> {
|
||||
Integer selectUserByRole(@Param("role") RoleUserDTO roleSelectDTO);
|
||||
|
||||
List<TsUser> selectUserByRoleByPage(@Param("role") RoleUserDTO roleSelectDTO);
|
||||
|
||||
@Select("select UNAME from ts_user where USID = #{userId}")
|
||||
String selectByName(String userId);
|
||||
}
|
||||
|
||||
@@ -90,4 +90,6 @@ public interface ITsUserService extends IService<TsUser> {
|
||||
List<UpDTO> selectNameById(List<String> strings,String type);
|
||||
|
||||
IPage<TsUser> getAllUsers(TsUser tsUser);
|
||||
|
||||
String userIdByName(String userId);
|
||||
}
|
||||
|
||||
@@ -522,5 +522,11 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
|
||||
return tsUserPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String userIdByName(String userId) {
|
||||
String userName = tsUserDao.selectByName(userId);
|
||||
return userName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -68,7 +68,15 @@ public class FieldConvertUtil {
|
||||
"在产车实施日期(项目),EOP实施日期(项目),实施说明,认证交付物,认证对象,监管类型,适用车辆类型,责任部门,相关部门,FO,项目评估角色," +
|
||||
"文本说明,标签,要求类型,清单类型,入库模块";
|
||||
|
||||
public static String exportFieldName = "企标类别,标准年份,企标编号,中文名称,英文名称,文本状态,发布日期,企标实施日期,企标制修订状态,起草部门,代替企标编号,复审日期,起草人,被代替企标编号,采用标准,文件上传人员,采标程度,引用标准,适用车型,能源类型,适用产品线,体系类别,备案日期,关联模块-乘用车VPPS编码,关联模块--卡车VPPS编码,发布稿附件,编制说明附件,历史版本附件,其他文件附件,修改单附件,关联文件附件";
|
||||
public static String exportName = "填写说明\n" +
|
||||
"1.导入数据从第三行开始,第一行为填写说明,第二行为表头,第三行是正式数据\n" +
|
||||
"2.所有带*号的字段必须填写\n" +
|
||||
"3.状态,类别字段是单选属性,必须和系统中的对应字段选项相匹配\n" +
|
||||
"4.适用车型,能源类型,适用产品线字段是多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n" +
|
||||
"5.发布日期,企标实施日期,复审日期字段为日期,必须精确到日\n" +
|
||||
"6.编号,企标名称,企标英文名称字段为文本,填写文本内容";
|
||||
|
||||
public static String exportFieldName = "*企标类别,企标编号,*标准年份,*企标名称,企标英文名称,*文本状态,发布日期,企标实施日期,起草部门,起草人,适用车型,能源类型,适用产品线,体系类别,关联模块-乘用车VPPS编码,关联模块--卡车VPPS编码,代替企标编号,采用标准,采标程度,引用标准,发布稿附件,编制说明附件,历史版本附件,其他文件附件,修改单附件,关联文件附件,";
|
||||
|
||||
/***
|
||||
* @Description: Clob类型 转String
|
||||
|
||||
Reference in New Issue
Block a user