Merge remote-tracking branch 'origin/develop_master' into develop_master

This commit is contained in:
11528
2022-03-23 15:48:16 +08:00
8 changed files with 73 additions and 38 deletions
@@ -138,7 +138,7 @@ stand.edit.file.path = /data/slrs/file/
file.downloadUrl=https://srms.foton.com.cn/file/ file.downloadUrl=https://srms.foton.com.cn/file/
#上传文件白名单-以,分隔 #上传文件白名单-以,分隔
upload.file.white.lists = doc,docx,xls,xlsx,pdf,PDF,png,jpg,pptx,ppt upload.file.white.lists = doc,docx,xls,xlsx,pdf,PDF,png,jpg,pptx,ppt,pdg
# ============================================================================= # =============================================================================
# elasticsearch 配置 # elasticsearch 配置
@@ -17,9 +17,10 @@ public class importExcelDTO {
@Excel(name = "制修订类型",orderNum = "2", width = 20.0) @Excel(name = "制修订类型",orderNum = "2", width = 20.0)
private String reviseStatus; private String reviseStatus;
@Excel(name = "起草责任单位" , orderNum = "3", width = 20.0)
private String unitName; private String unitName;
@Excel(name = "起草责任单位" , orderNum = "3", width = 20.0)
private String unit; private String unit;
private String drafterName; private String drafterName;
@@ -73,9 +73,9 @@ public class IExportServiceImpl implements IExportService {
stringBuilder.append("第" + i + "行第7列工作组组长填写不符合格式要求请检查;"); stringBuilder.append("第" + i + "行第7列工作组组长填写不符合格式要求请检查;");
} }
} }
if (null!=importExcelDTO.getUnit() && !"".equals(importExcelDTO.getUnit())){ if (null!=importExcelDTO.getUnitName() && !"".equals(importExcelDTO.getUnitName())){
importExcelDTO.setUnitName(tsInstitutionMap.get(importExcelDTO.getUnit())); importExcelDTO.setUnit(tsInstitutionMap.get(importExcelDTO.getUnitName()));
if (null==tsInstitutionMap.get(importExcelDTO.getUnit())){ if (null==tsInstitutionMap.get(importExcelDTO.getUnitName())){
stringBuilder.append("第"+i+"行第4列起草责任单位填写不符合格式要求请检查;"); stringBuilder.append("第"+i+"行第4列起草责任单位填写不符合格式要求请检查;");
} }
} }
@@ -61,6 +61,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.sql.Clob; import java.sql.Clob;
import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -550,18 +551,30 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
map.put("standEnName",verifyObj(sarStandardsInfoEO.getStandEnName())); map.put("standEnName",verifyObj(sarStandardsInfoEO.getStandEnName()));
map.put("standNature",verifyObj(sarStandardsInfoEO.getStandNature())); map.put("standNature",verifyObj(sarStandardsInfoEO.getStandNature()));
map.put("standState",verifyObj(sarStandardsInfoEO.getStandStatus())); map.put("standState",verifyObj(sarStandardsInfoEO.getStandStatus()));
// if (sarStandardsInfoEO.getIssueTime() != null) { if (sarStandardsInfoEO.getIssueTime() != null) {
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// String issueStr = format.format(sarStandardsInfoEO.getIssueTime()); SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd");
// map.put("issueTime",issueStr); String issueStr = "";
// } try {
map.put("issueTime", verifyObj(sarStandardsInfoEO.getIssueTime())); issueStr = format2.format(format.parse(sarStandardsInfoEO.getIssueTime()));
map.put("putTime", verifyObj(sarStandardsInfoEO.getPutTime())); }catch (Exception e){
// if (sarStandardsInfoEO.getPutTime() != null) { }
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); map.put("issueTime",issueStr);
// String issueStr = format.format(sarStandardsInfoEO.getPutTime()); }else{
// map.put("putTime",issueStr); map.put("issueTime", "");
// } }
if (sarStandardsInfoEO.getPutTime() != null) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd");
String issueStr = "";
try {
issueStr = format2.format(format.parse(sarStandardsInfoEO.getPutTime()));
}catch (Exception e){
}
map.put("putTime",issueStr);
}else {
map.put("putTime", "");
}
map.put("replaceStandNum",sarStandardsInfoEO.getReplaceStandNum()); map.put("replaceStandNum",sarStandardsInfoEO.getReplaceStandNum());
map.put("replacedStandNum",sarStandardsInfoEO.getReplacedStandNum()); map.put("replacedStandNum",sarStandardsInfoEO.getReplacedStandNum());
return map; return map;
@@ -822,7 +835,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
convert.setFileSuffix(fileInfo.getFileSuffix()); convert.setFileSuffix(fileInfo.getFileSuffix());
convert.setStandFileClassify(field); convert.setStandFileClassify(field);
convert.setConvertType(SarTypeEnum.BUSINESS.getValue()); convert.setConvertType(SarTypeEnum.BUSINESS.getValue());
convertMq.sendMQ(convert); // convertMq.sendMQ(convert);
} }
} }
} }
@@ -151,12 +151,12 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
qw.isNull("PARENT_ID"); qw.isNull("PARENT_ID");
List<TsResource> children = iTsResourceService.list(qw); List<TsResource> children = iTsResourceService.list(qw);
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){ if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
List<String> getMenuIdList = tsUserService.getResourceUserId(userId); // List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
if (!getMenuIdList.isEmpty()) { // if (!getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList); // page.setMenuRoleList(getMenuIdList);
} else { // } else {
page.setMenuRoleList(null); // page.setMenuRoleList(null);
} // }
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId()); List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
if (ids != null && !ids.isEmpty()) { if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids); page.setMenuAllChildrenIdList(ids);
@@ -180,12 +180,12 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
qw.isNull("PARENT_ID"); qw.isNull("PARENT_ID");
List<TsResource> children = iTsResourceService.list(qw); List<TsResource> children = iTsResourceService.list(qw);
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){ if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
List<String> getMenuIdList = tsUserService.getResourceUserId(userId); // List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
if (!getMenuIdList.isEmpty()) { // if (!getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList); // page.setMenuRoleList(getMenuIdList);
} else { // } else {
page.setMenuRoleList(null); // page.setMenuRoleList(null);
} // }
List<String> ids = iTsResourceService.getChildMenuList(userId); List<String> ids = iTsResourceService.getChildMenuList(userId);
if (ids != null && !ids.isEmpty()) { if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids); page.setMenuAllChildrenIdList(ids);
@@ -429,12 +429,12 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
qw.isNull("PARENT_ID"); qw.isNull("PARENT_ID");
List<TsResource> children = iTsResourceService.list(qw); List<TsResource> children = iTsResourceService.list(qw);
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){ if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId()); // List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
if (getMenuIdList != null && !getMenuIdList.isEmpty()) { // if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList); // page.setMenuRoleList(getMenuIdList);
} else { // } else {
page.setMenuRoleList(null); // page.setMenuRoleList(null);
} // }
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId()); List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
if (ids != null && !ids.isEmpty()) { if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids); page.setMenuAllChildrenIdList(ids);
@@ -3,12 +3,16 @@ package com.adc.da.slrs.sarStandIdea.controller;
import com.adc.da.http.ResponseMessage; import com.adc.da.http.ResponseMessage;
import com.adc.da.http.Result; import com.adc.da.http.Result;
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
import com.adc.da.slrs.sarStandIdea.entity.SeByoDto; import com.adc.da.slrs.sarStandIdea.entity.SeByoDto;
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaAllService;
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaService; import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaService;
import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaServiceImpl; import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaServiceImpl;
import com.adc.da.sys.util.DateUtil; import com.adc.da.sys.util.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdea; import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdea;
@@ -36,6 +40,9 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
@Autowired @Autowired
private ISarPublicIdeaService sarPublicIdeaService; private ISarPublicIdeaService sarPublicIdeaService;
@Autowired
private ISarPublicIdeaAllService sarPublicIdeaAllService;
@ApiOperation(value = "分页查询") @ApiOperation(value = "分页查询")
@GetMapping("/SelectAllPage") @GetMapping("/SelectAllPage")
public ResponseMessage selectAllPage(@RequestParam(defaultValue="1")Integer page,@RequestParam(defaultValue="10")Integer size,String categorg, String cname, public ResponseMessage selectAllPage(@RequestParam(defaultValue="1")Integer page,@RequestParam(defaultValue="10")Integer size,String categorg, String cname,
@@ -87,4 +94,18 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
} }
@ApiOperation(value = "动态查询")
@GetMapping("/deletePublicIdea")
public ResponseMessage delete(@RequestParam("id") String id){
QueryWrapper<SarPublicIdea> wrapper=new QueryWrapper<>();
wrapper.eq("uniques",id);
SarPublicIdea sarPublicIdea=sarPublicIdeaService.getOne(wrapper);
sarPublicIdeaService.remove(wrapper);
QueryWrapper<SarPublicIdeaAll> wrapper1=new QueryWrapper<>();
wrapper1.eq("idea_id",sarPublicIdea.getId());
sarPublicIdeaAllService.remove(wrapper1);
return Result.success();
}
} }
@@ -233,7 +233,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
// sarAdvanceSearchVO.setField("STAND_SYSTEM"); // sarAdvanceSearchVO.setField("STAND_SYSTEM");
// } // }
// }); // });
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_standards_info"); String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_stand_attr_info");
if (StringUtils.isNotBlank(advanceStr)) { if (StringUtils.isNotBlank(advanceStr)) {
page.setAdvanceSearchStr(advanceStr); page.setAdvanceSearchStr(advanceStr);
} else { } else {
@@ -239,7 +239,7 @@ public class SarUpdLogServiceImpl extends ServiceImpl<SarUpdLogDao, SarUpdLog> i
// case "country": return "适用区域"; // case "country": return "适用区域";
// case "isRelateAccess": return "重要度"; // case "isRelateAccess": return "重要度";
case "issueTime": return "发布日期"; case "issueTime": return "发布日期";
case "putTime": return "标准实施日期"; case "putTime": return "企标实施日期";
// case "standYear": return "标准年份"; // case "standYear": return "标准年份";
// case "standNature": return "标准性质"; // case "standNature": return "标准性质";
case "standEnName": return "英文名称"; case "standEnName": return "英文名称";