Merge remote-tracking branch 'origin/develop_master' into develop_1
This commit is contained in:
@@ -5,10 +5,12 @@ import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.rabbitmq.client.Channel;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.json.JSONTokener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.amqp.rabbit.annotation.Exchange;
|
||||
@@ -34,6 +36,9 @@ public class SendStandMQService {
|
||||
@Autowired
|
||||
private SysInfoEOService sysInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private DicTypeEODao dicTypeEODao;
|
||||
|
||||
|
||||
@Autowired
|
||||
private IOtSvppsService otSvppsEOService;
|
||||
@@ -72,6 +77,7 @@ public class SendStandMQService {
|
||||
SarStandardsInfo infoEO = (SarStandardsInfo) JSONObject.toBean(jsonobject,SarStandardsInfo.class);
|
||||
String sarStandAttrEOStr = infoEO.getSarStandAttrEOStr();
|
||||
Map<String,Object> attrInfoMap = JSONObject.fromObject(sarStandAttrEOStr);
|
||||
Map<String,Object> infoMap = infoEO.getAttrInfoMap();
|
||||
|
||||
// 往索引表中插入数据
|
||||
String getCodeName = "";
|
||||
@@ -101,6 +107,7 @@ public class SendStandMQService {
|
||||
saveMap.put("stand_year",infoEO.getStandYear());
|
||||
saveMap.put("nameshow",infoEO.getStandName());
|
||||
saveMap.put("stand_name",infoEO.getStandName());
|
||||
saveMap.put("standName",infoEO.getStandName());
|
||||
saveMap.put("standEnName",infoEO.getStandEnName());
|
||||
saveMap.put("stand_en_name",infoEO.getStandEnName());
|
||||
|
||||
@@ -109,9 +116,46 @@ public class SendStandMQService {
|
||||
saveMap.put("standstateshow",codeName);
|
||||
}
|
||||
saveMap.put("issueTime",dateFormatToStr(infoEO.getIssueTime()));
|
||||
|
||||
Date issue_time_data = null;
|
||||
if (StringUtils.isNotBlank(infoEO.getIssueTime())) {
|
||||
try {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
issue_time_data = format.parse(dateFormatToStr(infoEO.getIssueTime())+" 00:00:00");
|
||||
} catch (ParseException ignored) {
|
||||
}
|
||||
}
|
||||
if (issue_time_data != null) {
|
||||
saveMap.put("issue_time_data",issue_time_data.getTime());
|
||||
}else{
|
||||
saveMap.put("issue_time_data",-1000000000000000000L);
|
||||
}
|
||||
String standNatureName = "";
|
||||
if(infoEO.getStandNature() != null && StringUtils.isNotBlank(infoEO.getStandNature())){
|
||||
List<String> valArr = Arrays.asList(infoEO.getStandNature().split(","));
|
||||
standNatureName = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
saveMap.put("standNature",infoEO.getStandNature());
|
||||
saveMap.put("standNatureName",standNatureName);
|
||||
saveMap.put("synopsis",infoEO.getSynopsis());
|
||||
saveMap.put("standType",infoEO.getStandType());
|
||||
String textStatusName = "";
|
||||
if(infoEO.getTextStatus() != null && StringUtils.isNotBlank(infoEO.getTextStatus())){
|
||||
List<String> valArr = Arrays.asList(infoEO.getTextStatus().split(","));
|
||||
textStatusName = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
saveMap.put("textStatus",infoEO.getTextStatus());
|
||||
saveMap.put("textStatusName",textStatusName);
|
||||
String isRelateAccessName = "";
|
||||
if(infoEO.getIsRelateAccess() != null && StringUtils.isNotBlank(infoEO.getIsRelateAccess())){
|
||||
if(infoEO.getIsRelateAccess().equals("1")){
|
||||
isRelateAccessName = "是";
|
||||
}else {
|
||||
isRelateAccessName = "否";
|
||||
}
|
||||
}
|
||||
saveMap.put("isRelateAccess",infoEO.getIsRelateAccess());
|
||||
saveMap.put("isRelateAccessName",isRelateAccessName);
|
||||
saveMap.put("standSystem",infoEO.getStandSystem());
|
||||
|
||||
// 自定义属性字段
|
||||
if (attrInfoMap != null && !attrInfoMap.isEmpty()) {
|
||||
@@ -130,21 +174,29 @@ public class SendStandMQService {
|
||||
// 动态存储属性字段
|
||||
for (String field : fieldInfoList) {
|
||||
saveMap.put(field,attrInfoMap.getOrDefault(field,""));
|
||||
Object json= new JSONTokener(infoMap.get(field).toString()).nextValue();
|
||||
String fieldValue = "";
|
||||
if(!json.toString().equals("null")){
|
||||
fieldValue = infoMap.get(field).toString();
|
||||
}
|
||||
saveMap.put(field+"Name",fieldValue);
|
||||
}
|
||||
|
||||
|
||||
//当建立代替时,产生的没有文件的问题
|
||||
if (StringUtils.isBlank(String.valueOf(saveMap.get("content")))) {
|
||||
String context = String.valueOf(saveMap.get("FBGBJBD")) + ","
|
||||
+ String.valueOf(saveMap.get("XXZLXX")) + ","
|
||||
+ String.valueOf(saveMap.get("ZQYJG")) + ","
|
||||
+ String.valueOf(saveMap.get("BPG")) + ","
|
||||
+ String.valueOf(saveMap.get("CA")) + ","
|
||||
+ String.valueOf(saveMap.get("SSG")) + ","
|
||||
+ String.valueOf(saveMap.get("JDWJ")) + ","
|
||||
+ String.valueOf(saveMap.get("XGD")) + ","
|
||||
+ String.valueOf(saveMap.get("KWJ")) + ","
|
||||
+ String.valueOf(saveMap.get("ZBJBD"));
|
||||
List<String> list = new ArrayList<>();
|
||||
|
||||
String context = filterStringIsNotBlank(String.valueOf(saveMap.get("FBGBJBD")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("XXZLXX")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("ZQYJG")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("BPG")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("CA")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("SSG")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("JDWJ")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("XGD")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("KWJ")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("ZBJBD")),false);
|
||||
context = context.replace(",,", ",");
|
||||
saveMap.put("content", context);
|
||||
}
|
||||
@@ -155,6 +207,11 @@ public class SendStandMQService {
|
||||
}
|
||||
}
|
||||
|
||||
private String filterStringIsNotBlank(String str,boolean boo){
|
||||
String f = ",";
|
||||
return (str == null || str.equals("") || str.equals("null")) ? "" : (boo ? str+f : str);
|
||||
}
|
||||
|
||||
private String dateFormatToStr(String dateStr){
|
||||
if(dateStr == null || dateStr.equals("")){
|
||||
return "";
|
||||
|
||||
+2
-1
@@ -30,7 +30,8 @@ public interface SarLawsAttrDetailedListDao extends BaseMapper<SarLawsAttrDetail
|
||||
//用于导出
|
||||
List<LawsDto> selectLawsByIdE(@Param("param1") List<String> LawsIds);
|
||||
//根据标准id查出数据
|
||||
List<LawsDto> selectLawsByIdC(@Param("param1") List<String> LawsIds, @Param("standName") String standName,@Param("standType")String standType);
|
||||
List<LawsDto> selectLawsByIdC(@Param("start")Integer start,@Param("end")Integer end,@Param("param1") List<String> LawsIds, @Param("standName") String standName,@Param("standType")String standType,@Param("fileType")String fileType);
|
||||
List<LawsDto> selectLawsByIdCount(@Param("param1") List<String> LawsIds, @Param("standName") String standName,@Param("standType")String standType,@Param("fileType")String fileType);
|
||||
//查询时间
|
||||
List<StandRegionalTimeDto> selectTimes(String standId);
|
||||
List<String> selectLawsId2(String standId);
|
||||
|
||||
@@ -60,5 +60,8 @@ public class SarPublicIdea extends BaseEntity {
|
||||
@TableField("stand_id")
|
||||
private String standId;
|
||||
|
||||
@TableField("stand_type")
|
||||
private String standType;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+13
-5
@@ -5,9 +5,7 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.FindStandDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarItemsTime;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.*;
|
||||
import com.adc.da.slrs.sarStandItems.service.impl.SarStandItemsServiceImpl;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -15,7 +13,6 @@ import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
@@ -55,6 +52,17 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "分解单查询")
|
||||
@GetMapping("/querySarItemAndInterpretation")
|
||||
public ResponseMessage querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
||||
List<SarItemVO> sarItemVOS = ServiceImpl.querySarItemAndInterpretation(page);
|
||||
|
||||
return Result.success("200",sarItemVOS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "分解单查询(带时间)")
|
||||
@GetMapping("/findAllItemsTimes")
|
||||
public List<SarItemsTime> findAllItemsTimes(@RequestParam("type") String type,@RequestParam("ids") String ids){
|
||||
@@ -70,7 +78,7 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "标准查询")
|
||||
@ApiOperation(value = "标准批量保存")
|
||||
@PostMapping("/saveBatch")
|
||||
public String saveBatch(@RequestBody List<SarStandItems> findStandDto){
|
||||
findStandDto.forEach(sarStandItems -> sarStandItems.setId(UUIDUtils.randomUUID(32)));
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.adc.da.slrs.sarStandItems.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.StandsTimeDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.*;
|
||||
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@@ -24,6 +22,8 @@ import java.util.Set;
|
||||
@Mapper
|
||||
public interface SarStandItemsDao extends BaseMapper<SarStandItems> {
|
||||
|
||||
List<SarItemVO> querySarItemAndInterpretation(FindSarItemsPageReqDTO page);
|
||||
|
||||
List<SarStandItems> querySarStandItemsList(SarStandItemsEOPage page);
|
||||
|
||||
int querySarStandItemsListCount(SarStandItemsEOPage page);
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.adc.da.slrs.sarStandItems.entity;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
public class FindSarItemsPageReqDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Integer page = 1;
|
||||
private Integer pageSize = 20;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "标准id")
|
||||
private String standId;
|
||||
|
||||
@ApiModelProperty(value = "条款名称")
|
||||
private String itemsName;
|
||||
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
@DateTimeFormat(pattern = "yyy-MM-dd")
|
||||
private Date XCXSSRQ;
|
||||
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
@DateTimeFormat(pattern = "yyy-MM-dd")
|
||||
private Date ZCCSSRQ;
|
||||
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
private String fileType;
|
||||
}
|
||||
@@ -14,4 +14,5 @@ public class FindStandDto {
|
||||
private int size;
|
||||
private String standName;
|
||||
private String standType;
|
||||
private String fileType;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.adc.da.slrs.sarStandItems.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel(value="标准分解单显示对象", description="")
|
||||
public class SarItemVO extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "标准ID")
|
||||
private String standId;
|
||||
|
||||
@ApiModelProperty(value = "条款号")
|
||||
private String itemsNum;
|
||||
|
||||
@ApiModelProperty(value = "条款名称")
|
||||
private String itemsName;
|
||||
|
||||
@ApiModelProperty(value = "条款内容")
|
||||
private String itemsTitle;
|
||||
|
||||
@ApiModelProperty(value = "解读内容--条款要求")
|
||||
private String termsConditions;
|
||||
|
||||
@ApiModelProperty(value = "新车实施日期")
|
||||
@DateTimeFormat
|
||||
private Date XCXSSRQ;
|
||||
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
@DateTimeFormat
|
||||
private Date ZCCSSRQ;
|
||||
|
||||
@ApiModelProperty(value = "适用车型")
|
||||
private String applyArctic;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "责任部门")
|
||||
private String responsibleUnit;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "责任工程师")
|
||||
private String dutyEngineer;
|
||||
|
||||
@ApiModelProperty(value = "相对于上一版本变化点")
|
||||
private String comparedWithPrevious;
|
||||
|
||||
@ApiModelProperty(value = "合规性分析")
|
||||
private String complianceState;
|
||||
|
||||
@ApiModelProperty(value = "符合性要求-符合性状态")
|
||||
private String complianceRequire;
|
||||
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
private String fileType;
|
||||
}
|
||||
@@ -44,4 +44,8 @@ public class SarStandItemsDto {
|
||||
@ApiModelProperty(value = "覆盖关系")
|
||||
private String busStandCover;
|
||||
|
||||
private String xcxssrq;
|
||||
|
||||
private String zccssrq;
|
||||
|
||||
}
|
||||
|
||||
+13
-8
@@ -85,8 +85,8 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
.itemsName(sarStandItemsDto.getItemsName())
|
||||
.itemsNum(sarStandItemsDto.getItemsNum())
|
||||
.responsibleUnit(sarStandItemsDto.getResponsibleUnit())
|
||||
.XCXSSRQ(standsTimeDto.getXCXSSRQ())
|
||||
.ZCCSSRQ(standsTimeDto.getZCCSSRQ())
|
||||
.XCXSSRQ(sarStandItemsDto.getXcxssrq())
|
||||
.ZCCSSRQ(sarStandItemsDto.getZccssrq())
|
||||
.svpps(sarStandItemsDto.getSvpps())
|
||||
.applyArctic(sarStandItemsDto.getApplyArctic())
|
||||
.claimType(sarStandItemsDto.getClaimType())
|
||||
@@ -108,8 +108,8 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
.itemsName(sarStandItemsDto.getItemsName())
|
||||
.itemsNum(sarStandItemsDto.getItemsNum())
|
||||
.responsibleUnit(sarStandItemsDto.getResponsibleUnit())
|
||||
.XCXSSRQ(standsTimeDto.getXCXSSRQ())
|
||||
.ZCCSSRQ(standsTimeDto.getZCCSSRQ())
|
||||
.XCXSSRQ(sarStandItemsDto.getXcxssrq())
|
||||
.ZCCSSRQ(sarStandItemsDto.getZccssrq())
|
||||
.svpps(sarStandItemsDto.getSvpps())
|
||||
.applyArctic(sarStandItemsDto.getApplyArctic())
|
||||
.claimType(sarStandItemsDto.getClaimType())
|
||||
@@ -129,8 +129,8 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
.itemsName(sarStandItemsDto.getItemsName())
|
||||
.itemsNum(sarStandItemsDto.getItemsNum())
|
||||
.responsibleUnit(sarStandItemsDto.getResponsibleUnit())
|
||||
.XCXSSRQ(standsTimeDto1.getXCXSSRQ())
|
||||
.ZCCSSRQ(standsTimeDto1.getZCCSSRQ())
|
||||
.XCXSSRQ(sarStandItemsDto.getXcxssrq())
|
||||
.ZCCSSRQ(sarStandItemsDto.getZccssrq())
|
||||
.svpps(sarStandItemsDto.getSvpps())
|
||||
.applyArctic(sarStandItemsDto.getApplyArctic())
|
||||
.claimType(sarStandItemsDto.getClaimType())
|
||||
@@ -168,11 +168,11 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
if (standId==null || standId.size()==0){
|
||||
list = null;
|
||||
}else {
|
||||
list = sarLawsAttrDetailedListDao.selectLawsByIdC(standId,findStandDto.getStandName(), findStandDto.getStandType());
|
||||
list = sarLawsAttrDetailedListDao.selectLawsByIdC((findStandDto.getPage()-1)*findStandDto.getSize(),findStandDto.getPage()*findStandDto.getSize(),standId,findStandDto.getStandName(), findStandDto.getStandType(),findStandDto.getFileType());
|
||||
}
|
||||
IPage<LawsDto> page1=new Page<>();
|
||||
page1.setRecords(list);
|
||||
page1.setTotal(dao.selectToken());
|
||||
page1.setTotal(sarLawsAttrDetailedListDao.selectLawsByIdCount(standId,findStandDto.getStandName(),findStandDto.getStandType(),findStandDto.getFileType()).size());
|
||||
return page1;
|
||||
}
|
||||
|
||||
@@ -189,4 +189,9 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
|
||||
return dao.selectAllItemsByIds(type,ids);
|
||||
}
|
||||
|
||||
|
||||
public List<SarItemVO> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
||||
return dao.querySarItemAndInterpretation(page);
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarStandProjectLibrary.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.StandProjectRelationDto;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -19,4 +20,6 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
|
||||
List<SarStandProjectLibrary> queryProjectManagerPage(@Param("current") int current, @Param("pageSize") int pageSize);
|
||||
void deleteByIds(@Param("ids") List<StandProjectRelationDto> ids);
|
||||
void batchInsert(@Param("list") List<StandProjectRelationDto> list);
|
||||
List<SarStandProjectLibrary> selectPages(@Param("page")Integer page, @Param("size")Integer size,@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
|
||||
Integer selectCount(@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
|
||||
}
|
||||
|
||||
+2
@@ -27,6 +27,8 @@ public class StandAttrInfoDto {
|
||||
private String standSort;
|
||||
//标准年份
|
||||
private String standYear;
|
||||
//标准类型
|
||||
private String standType;
|
||||
//中文名称
|
||||
@ExcelProperty("中文名称")
|
||||
private String standName;
|
||||
|
||||
+14
-35
@@ -64,21 +64,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
wrapper.inSql("id", "select project_id from sar_stand_project_relation")
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectPlatfor()),"project_platfor",sar.getProjectPlatfor())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectNumber()),"project_number",sar.getProjectNumber())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectName()),"project_name",sar.getProjectName())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectGroup()),"project_group",sar.getProjectGroup())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectClassification()),"project_classification",sar.getProjectClassification())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectStatus()),"project_status",sar.getProjectStatus())
|
||||
.like(StringUtils.isNotEmpty(sar.getCurrentNode()),"current_node",sar.getCurrentNode())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectLevel()),"project_level",sar.getProjectLevel())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectManager()),"project_manager",sar.getProjectManager())
|
||||
.like(StringUtils.isNotEmpty(sar.getProductLine()),"product_line",sar.getProductLine())
|
||||
.ge(sar.getProjectStartDate()!=null,"project_start_date",sar.getProjectStartDate())
|
||||
.le(sar.getProjectEndDate()!=null,"project_end_date",sar.getProjectEndDate());
|
||||
return getSarStandProjectLibraryIPage(current, pageSize, wrapper);
|
||||
int flag=2;
|
||||
return getSarStandProjectLibraryIPage(current, pageSize, sar,flag);
|
||||
}
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryNotMaintenanceProject(int current, int pageSize,
|
||||
@@ -106,21 +93,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
wrapper.notInSql("id", "select project_id from sar_stand_project_relation")
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectPlatfor()),"project_platfor",sar.getProjectPlatfor())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectNumber()),"project_number",sar.getProjectNumber())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectName()),"project_name",sar.getProjectName())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectGroup()),"project_group",sar.getProjectGroup())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectClassification()),"project_classification",sar.getProjectClassification())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectStatus()),"project_status",sar.getProjectStatus())
|
||||
.like(StringUtils.isNotEmpty(sar.getCurrentNode()),"current_node",sar.getCurrentNode())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectLevel()),"project_level",sar.getProjectLevel())
|
||||
.like(StringUtils.isNotEmpty(sar.getProjectManager()),"project_manager",sar.getProjectManager())
|
||||
.like(StringUtils.isNotEmpty(sar.getProductLine()),"product_line",sar.getProductLine())
|
||||
.ge(sar.getProjectStartDate()!=null,"project_start_date",sar.getProjectStartDate())
|
||||
.le(sar.getProjectEndDate()!=null,"project_end_date",sar.getProjectEndDate());
|
||||
return getSarStandProjectLibraryIPage(current, pageSize, wrapper);
|
||||
int flag=1;
|
||||
return getSarStandProjectLibraryIPage(current, pageSize, sar,flag);
|
||||
}
|
||||
@Override
|
||||
public List<SarStandProjectLibrary> queryById(String id) {
|
||||
@@ -158,7 +132,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
@Override
|
||||
public IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId) {
|
||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME");
|
||||
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","STAND_TYPE");
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='"+ standId+"'");
|
||||
Page<SarStandardsInfo> page1 = new Page<>(current, pageSize);
|
||||
IPage<SarStandardsInfo> userIPage1 = SarStandardsInfoDao.selectPage(page1, wrapper1);
|
||||
@@ -181,6 +155,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
p.setStandSort(s.getStandSort());
|
||||
p.setStandYear(s.getStandYear());
|
||||
p.setStandName(s.getStandName());
|
||||
p.setStandType(s.getStandType());
|
||||
p.setStandEnName(s.getStandEnName());
|
||||
for (SarStandAttrInfo a:list2){
|
||||
if(s.getId().equals(a.getStandId())){
|
||||
@@ -282,11 +257,15 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
return list;
|
||||
}
|
||||
|
||||
private IPage<SarStandProjectLibrary> getSarStandProjectLibraryIPage(int current, int pageSize, QueryWrapper<SarStandProjectLibrary> wrapper) {
|
||||
private IPage<SarStandProjectLibrary> getSarStandProjectLibraryIPage(int current, int pageSize,SarStandProjectLibrary wrapper,int flag) {
|
||||
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
|
||||
IPage<SarStandProjectLibrary> userIPage = sarStandProjectLibraryDao.selectPage(page, wrapper);
|
||||
System.out.println("总条数"+userIPage.getTotal());
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
IPage<SarStandProjectLibrary> userIPage = new Page<>();
|
||||
List<SarStandProjectLibrary> sarStandProjectLibraries=sarStandProjectLibraryDao.selectPages(current,pageSize,wrapper,flag);
|
||||
Integer count = sarStandProjectLibraryDao.selectCount(wrapper,flag);
|
||||
userIPage.setCurrent(current);
|
||||
userIPage.setSize(pageSize);
|
||||
userIPage.setRecords(sarStandProjectLibraries);
|
||||
userIPage.setTotal(count);
|
||||
return userIPage;
|
||||
}
|
||||
}
|
||||
|
||||
+14
-12
@@ -24,8 +24,8 @@ import java.util.List;
|
||||
@Service
|
||||
public class SarInterpretationNationalStandardServiceImpl extends ServiceImpl<SarInterpretationNationalStandardDao, SarInterpretationNationalStandard> implements ISarInterpretationNationalStandardService {
|
||||
|
||||
@Autowired
|
||||
SarStandardComplianceProductAssessDao sarStandardComplianceProductAssessDao;
|
||||
// @Autowired
|
||||
// SarStandardComplianceProductAssessDao sarStandardComplianceProductAssessDao;
|
||||
|
||||
@Override
|
||||
public String saveBath(List<SarInterpretationNationalStandard> sarInterpretationNationalStandards) {
|
||||
@@ -34,16 +34,18 @@ public class SarInterpretationNationalStandardServiceImpl extends ServiceImpl<Sa
|
||||
sarInterpretationNationalStandards.forEach(sarInterpretationNationalStandard -> {
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.eq("stand_id",sarInterpretationNationalStandard.getStandId());
|
||||
List<SarStandardComplianceProductAssess> assessList = sarStandardComplianceProductAssessDao.selectList(queryWrapper);
|
||||
if (assessList.isEmpty()){
|
||||
SarStandardComplianceProductAssess sar=new SarStandardComplianceProductAssess();
|
||||
sar.setId(UUIDUtils.randomUUID(32));
|
||||
sar.setStandId(sarInterpretationNationalStandard.getStandId());
|
||||
sar.setStandName(sarInterpretationNationalStandard.getStandName());
|
||||
sar.setStandType(sarInterpretationNationalStandard.getStandType());
|
||||
sar.setInterpretationTime(sarInterpretationNationalStandard.getInterpretationTime());
|
||||
sarStandardComplianceProductAssessDao.insert(sar);
|
||||
}
|
||||
// List<SarStandardComplianceProductAssess> assessList = sarStandardComplianceProductAssessDao.selectList(queryWrapper);
|
||||
// if (assessList.isEmpty()){
|
||||
// SarStandardComplianceProductAssess sar=new SarStandardComplianceProductAssess();
|
||||
// sar.setId(UUIDUtils.randomUUID(32));
|
||||
// sar.setStandId(sarInterpretationNationalStandard.getStandId());
|
||||
// sar.setStandNumber(sarInterpretationNationalStandard.getStandNumber());
|
||||
// sar.setStandType(sarInterpretationNationalStandard.getStandType());
|
||||
// sar.setStandName(sarInterpretationNationalStandard.getStandName());
|
||||
// sar.setStandType(sarInterpretationNationalStandard.getStandType());
|
||||
// sar.setInterpretationTime(sarInterpretationNationalStandard.getInterpretationTime());
|
||||
// sarStandardComplianceProductAssessDao.insert(sar);
|
||||
// }
|
||||
});
|
||||
String res = flag ? "1":"0";
|
||||
return res;
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "是否纳入认证清单(0否 1是)")
|
||||
@ApiModelProperty(value = "是否纳入认证清单(2否 1是)")
|
||||
@TableField("IS_RELATE_ACCESS")
|
||||
private String isRelateAccess;
|
||||
|
||||
|
||||
+47
-3
@@ -382,6 +382,30 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoSearchDetails(SarStandardsInfo row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarStandAttrInfoEODao.selectStandFieldAndData(fieldInfo, row.getId());
|
||||
if (InitStandAttrUtil.clobFieldList != null && !InitStandAttrUtil.clobFieldList.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldList) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField, fieldValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private Map<String, Object> transformUpperCase(Map<String, Object> orgMap) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
@@ -428,6 +452,25 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShowSearchDetails(SarStandardsInfo row) throws Exception {
|
||||
if (row != null) {
|
||||
attrInfoSearchDetails(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShow(List<SarStandardsInfo> sarlist) throws Exception {
|
||||
for (SarStandardsInfo row : sarlist) {
|
||||
attrInfoDetails(row);
|
||||
@@ -1099,7 +1142,8 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
// replaseStandState(sarStandardsInfoEO);
|
||||
// 记录修改日志
|
||||
saveUpdateLog(sarStandardsInfoEO, beforeSarStandardsInfo);
|
||||
if(elasflag) {
|
||||
if(elasflag) { //what?
|
||||
attrInfoShowSearchDetails(sarStandardsInfoEO);
|
||||
createStandMQService.sendStandMQ(sarStandardsInfoEO,"update");
|
||||
List<String> bhs = new ArrayList<>(Arrays.asList(String.valueOf(map.get("DTBJH")).split(",")));
|
||||
for (String bh :bhs) {
|
||||
@@ -2059,14 +2103,14 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
Set<String> keys = attrInfoMap.keySet();
|
||||
for (String key:keys) {
|
||||
String value = String.valueOf(attrInfoMap.get(key));
|
||||
if (com.adc.da.util.utils.StringUtils.isNotBlank(value) && !"null".equals(value) && !"SVPPS".equals(key)){
|
||||
if (StringUtils.isNotBlank(value) && !"null".equals(value) && !"SVPPS".equals(key)){
|
||||
value = value.replace(" , ",",");
|
||||
value = value.replace(","," , ");
|
||||
attrInfoMap.put(key,value);
|
||||
}
|
||||
}
|
||||
// 根据文件attid 读取文件内容
|
||||
if (org.apache.commons.lang.StringUtils.isNotEmpty(String.valueOf(attrInfoMap.get("content")))) {
|
||||
if (StringUtils.isNotEmpty(String.valueOf(attrInfoMap.get("content")))) {
|
||||
String[] attidlist = String.valueOf(attrInfoMap.get("content")).split(" , ");
|
||||
StringBuilder content = new StringBuilder("");
|
||||
for (int i = 0; i < attidlist.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user