Merge remote-tracking branch 'origin/develop_master' into develop_master
This commit is contained in:
+6
@@ -66,6 +66,12 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
||||
return Result.success(iEsRevisePlanService.modPlan(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑企标计划-企标技术更新计划状态")
|
||||
@PostMapping("modPlanByState")
|
||||
public ResponseMessage<Object> modPlanByState(EsRevisePlan esRevisePlan){
|
||||
return Result.success(iEsRevisePlanService.modPlanByState(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑企标计划")
|
||||
@PostMapping("/modPlanByWk")
|
||||
public ResponseMessage<Object> modPlanByWk(@RequestBody EsRevisePlan esRevisePlan){
|
||||
|
||||
+1
@@ -19,6 +19,7 @@ public interface IEsRevisePlanService extends IService<EsRevisePlan> {
|
||||
EsRevisePlan getOnePlan(String id);//查询详情
|
||||
|
||||
String modPlan(EsRevisePlan esRevisePlan);//编辑
|
||||
String modPlanByState(EsRevisePlan esRevisePlan);//编辑
|
||||
String addPlan(EsRevisePlan esRevisePlan);//插入
|
||||
int delPlan(String id);//删除
|
||||
int delPlans(String ids);//批量删除
|
||||
|
||||
+6
@@ -75,6 +75,12 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modPlanByState(EsRevisePlan esRevisePlan) {
|
||||
esRevisePlanDao.updateById(esRevisePlan);
|
||||
return "操作成功";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String addPlan(EsRevisePlan esRevisePlan) {
|
||||
esRevisePlan.setId(UUIDUtils.randomUUID(32));
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.adc.da.slrs.regulationsTDM.controller;
|
||||
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.StandResult;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.StandData;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.StandMessageCodeEnum;
|
||||
import com.adc.da.slrs.regulationsTDM.service.IStandDataTDMService;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--TDM查询标准")
|
||||
@RequestMapping("/api/regulationsTDM")
|
||||
public class StandDataTDMController extends BaseController<StandData> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(StandDataTDMController.class);
|
||||
|
||||
@Autowired
|
||||
private IStandDataTDMService iStandDataTDMService;
|
||||
/**
|
||||
* 标准查询列表接口
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "|regulationsTDM|标准查询列表接口")
|
||||
@PostMapping("/standData")
|
||||
public String searchStandData(@RequestBody SearchStandContext searchStandContext){
|
||||
if(searchStandContext.getPage() == 0
|
||||
|| StringUtils.isEmpty(searchStandContext.getType())){
|
||||
return StandResult.toJson(Result.error(StandMessageCodeEnum.ERROR_PARAM.getCode(),
|
||||
"page/type 为必填项 且page不可为0"));
|
||||
}
|
||||
List<StandData> rows = iStandDataTDMService.searchStandData(searchStandContext);
|
||||
return StandResult.toJson(Result.success(getPageInfo(searchStandContext.getPager(), rows)));
|
||||
}
|
||||
|
||||
private String verifyObj(String str){
|
||||
return (str == null || str.equals("")) ? "" : str;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.adc.da.slrs.regulationsTDM.dao;
|
||||
|
||||
import com.adc.da.slrs.regulationsTDM.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.StandData;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
*/
|
||||
@Repository
|
||||
public interface StandDataTDMDao extends BaseMapper<StandData> {
|
||||
|
||||
List<StandData> searchStandData(SearchStandContext searchStandContext);
|
||||
List<StandData> searchBussData(SearchStandContext searchStandContext);
|
||||
|
||||
List<StandData> searchStandDataThree(SearchStandContext searchStandContext);
|
||||
|
||||
}
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.adc.da.slrs.regulationsTDM.entity;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 12:05
|
||||
*/
|
||||
@Data
|
||||
public class SearchStandContext extends BasePage {
|
||||
|
||||
// 标准查询条件
|
||||
@ApiModelProperty(value = "页数")
|
||||
private Integer page;
|
||||
|
||||
@ApiModelProperty(value = "区分类别(GB:国内外标准 QB:企业标准)")
|
||||
private String type;
|
||||
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.adc.da.slrs.regulationsTDM.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 12:05
|
||||
*/
|
||||
@Data
|
||||
public class SearchStandResult<T> {
|
||||
|
||||
@ApiModelProperty(value = "返回状态 200 正常,-1 系统错误, -10 参数错误")
|
||||
@JSONField(ordinal=1)
|
||||
private String respCode;
|
||||
|
||||
@ApiModelProperty(value = "true:成功 false:失败")
|
||||
@JSONField(ordinal=2)
|
||||
private Boolean ok;
|
||||
|
||||
@ApiModelProperty(value = "正常返回空字符串,系统错误时返回系统异常信息及对应描述")
|
||||
@JSONField(ordinal=3)
|
||||
private String message;
|
||||
|
||||
private T data;
|
||||
|
||||
|
||||
public SearchStandResult(String respCode, String message, boolean ok, T data) {
|
||||
this.respCode = respCode;
|
||||
this.message = message;
|
||||
this.ok = ok;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public SearchStandResult(String respCode, String message, boolean ok) {
|
||||
this.respCode = respCode;
|
||||
this.message = message;
|
||||
this.ok = ok;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.adc.da.slrs.regulationsTDM.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 12:05
|
||||
*/
|
||||
@Data
|
||||
public class StandData {
|
||||
|
||||
@ApiModelProperty(value = "标准ID")
|
||||
@JSONField(ordinal=1)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准类型")
|
||||
@JSONField(ordinal=2)
|
||||
private String standType;
|
||||
|
||||
@ApiModelProperty(value = "标准分类")
|
||||
@JSONField(ordinal=3)
|
||||
private String standSort;
|
||||
|
||||
@ApiModelProperty(value = "标准号")
|
||||
@JSONField(ordinal=4)
|
||||
private String standNumber;
|
||||
|
||||
@ApiModelProperty(value = "年代号")
|
||||
@JSONField(ordinal=5)
|
||||
private String standYear;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@JSONField(ordinal=6)
|
||||
private String standName;
|
||||
|
||||
@ApiModelProperty(value = "标准英文名称")
|
||||
@JSONField(ordinal=7)
|
||||
private String standEnName;
|
||||
|
||||
@ApiModelProperty(value = "标准分类+空格+标准号+空格+标准名称")
|
||||
@JSONField(ordinal=8)
|
||||
private String documentName;
|
||||
|
||||
@ApiModelProperty(value = "当前标准跳转到本系统内的链接地址")
|
||||
@JSONField(ordinal=9)
|
||||
private String documentUrl;
|
||||
|
||||
@ApiModelProperty(value = "代替标准号")
|
||||
@JSONField(ordinal=10)
|
||||
private String dtbzh;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.regulationsTDM.entity;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 14:58
|
||||
*/
|
||||
public enum StandMessageCodeEnum {
|
||||
SUCCESS("200"),
|
||||
ERROR_SYS("-1"),
|
||||
ERROR_PARAM("-10"),
|
||||
SOURCE("SRMS");
|
||||
|
||||
private String code;
|
||||
|
||||
private StandMessageCodeEnum(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.adc.da.slrs.regulationsTDM.entity;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 14:56
|
||||
*/
|
||||
public class StandResult {
|
||||
|
||||
public static <T>SearchStandResult<T> success(String code,String message,T t) {
|
||||
return new SearchStandResult(code, message, true, t);
|
||||
}
|
||||
|
||||
public static <T>SearchStandResult<T> error(String code,String message) {
|
||||
return new SearchStandResult(code, message, true);
|
||||
}
|
||||
|
||||
public static String toJson(ResponseMessage searchStandResult){
|
||||
GsonBuilder gsonBuilder = getGsonBuilder();
|
||||
Gson json = gsonBuilder.create();
|
||||
return json.toJson(searchStandResult);
|
||||
}
|
||||
|
||||
private static GsonBuilder getGsonBuilder() {
|
||||
return new GsonBuilder().disableHtmlEscaping().serializeNulls().enableComplexMapKeySerialization().serializeSpecialFloatingPointValues().setLenient();
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.adc.da.slrs.regulationsTDM.service;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.StandData;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
*/
|
||||
public interface IStandDataTDMService extends IService<StandData> {
|
||||
|
||||
List<StandData> searchStandData(SearchStandContext searchStandContext);
|
||||
}
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.adc.da.slrs.regulationsTDM.service.impl;
|
||||
|
||||
import com.adc.da.slrs.regulationsTDM.entity.*;
|
||||
import com.adc.da.slrs.regulationsTDM.dao.StandDataTDMDao;
|
||||
import com.adc.da.slrs.regulationsTDM.service.IStandDataTDMService;
|
||||
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @date: 2022年04月25日 14:56
|
||||
*/
|
||||
@Service
|
||||
public class StandDataTDMServiceImpl extends ServiceImpl<StandDataTDMDao, StandData> implements IStandDataTDMService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(StandDataTDMServiceImpl.class);
|
||||
|
||||
private String webUrl = "https://srms.foton.com.cn/#/loginStandDetails";
|
||||
|
||||
@Autowired
|
||||
private SarStandardsInfoDao sarStandardInfoDao;
|
||||
|
||||
@Autowired
|
||||
private SarBussionessStandDao sarBussionessStandDao;
|
||||
|
||||
@Override
|
||||
public List<StandData> searchStandData(SearchStandContext searchStandContext){
|
||||
List<StandData> standDataQuery = new ArrayList<>();
|
||||
searchStandContext.setPageSize(100);
|
||||
QueryWrapper queryCount = new QueryWrapper();
|
||||
queryCount.eq("VALID_FLAG","0");
|
||||
if("GB".equals(searchStandContext.getType().toUpperCase())){
|
||||
int count = sarStandardInfoDao.selectCount(queryCount);
|
||||
searchStandContext.getPager().setRowCount(count);
|
||||
standDataQuery = this.baseMapper.searchStandData(searchStandContext);
|
||||
}else if("QB".equals(searchStandContext.getType().toUpperCase())){
|
||||
int count = sarBussionessStandDao.selectCount(queryCount);
|
||||
searchStandContext.getPager().setRowCount(count);
|
||||
standDataQuery = this.baseMapper.searchBussData(searchStandContext);
|
||||
}
|
||||
if(!standDataQuery.isEmpty()){
|
||||
// 重组数据集合 只需documentName 及 documentUrl
|
||||
standDataQuery.stream().peek(standData -> {
|
||||
standData.setDocumentName(verifyObj(standData.getStandSort(),standData.getStandNumber(),standData.getStandName()));
|
||||
standData.setDocumentUrl(webUrl+"?dataId="+standData.getId()+"&datatype="+standData.getStandType());
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
return standDataQuery;
|
||||
}
|
||||
|
||||
private String verifyObj(String str1,String str2,String str3){
|
||||
String res1 = (str1 == null || str1.equals("")) ? "" : (str1+" ");
|
||||
String res2 = (str2 == null || str2.equals("")) ? "" : (str2+" ");
|
||||
String res3 = (str3 == null || str3.equals("")) ? "" : str3;
|
||||
return res1 + res2 + res3;
|
||||
}
|
||||
private String encode(String str){
|
||||
String encodeStr = new BASE64Encoder().encodeBuffer(str.getBytes()).replaceAll("[\r\n]", "");
|
||||
return encodeStr;
|
||||
}
|
||||
|
||||
private String errFilter(String str){
|
||||
if (str.contains("Cause")){
|
||||
str = str.split("Cause")[0].replaceAll("\\r\\n###","");
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
+13
@@ -4,9 +4,12 @@ import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -23,6 +26,16 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
|
||||
String updateStateScheduledSql = "SELECT A.*,B.BDTQBBHBUSS FROM sar_bussioness_stand A LEFT JOIN sar_buss_stand_attr_info B ON B.STAND_ID = A.ID ${ew.customSqlSegment}";
|
||||
|
||||
/**
|
||||
* 自动更新文本状态通用查询
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
@Select(updateStateScheduledSql)
|
||||
List<SarBussionessStand> getStateScheduledList(@Param("ew") QueryWrapper queryWrapper);
|
||||
|
||||
List<SarBussionessStand> queryByBussStateSync(SarBussionessStand sarBussionessStand);
|
||||
|
||||
SarBussionessStand getStandInfoByReviseStatus(String reviseStatus);
|
||||
|
||||
+6
@@ -86,6 +86,12 @@ public class SarBussionessStandState extends BaseEntity {
|
||||
@TableField("PARAM2")
|
||||
private String param2;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String putTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String FSRQBUSS;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String QCDW;
|
||||
|
||||
|
||||
+1
-1
@@ -216,7 +216,7 @@ public class SarLawsDetailedListController extends BaseController<SarLawsDetaile
|
||||
@PostMapping("/importData")
|
||||
public ResponseMessage importData( @RequestParam(value = "file", required = false) MultipartFile file){
|
||||
StringBuilder stringBuilder=new StringBuilder();
|
||||
List<ExportEmptyModel> res=sarLawsDetailedListService.importData(file,stringBuilder);
|
||||
List<ExportEmptyModelDto> res=sarLawsDetailedListService.importData(file,stringBuilder);
|
||||
if (stringBuilder.toString().length()>0){
|
||||
return Result.error("-1","",stringBuilder.toString());
|
||||
}else {
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.adc.da.slrs.sarLawsDetailedList.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: qk
|
||||
* @Date: 2022/5/10 0010 14:56
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ExportEmptyModelDto {
|
||||
@Excel(name = "标准编号(必填)",orderNum = "0" ,width = 20.0)
|
||||
private String standNumber;
|
||||
|
||||
@Excel(name = "适用认证(必填,可多选)",orderNum = "1" ,width = 40.0)
|
||||
private String syrz;
|
||||
|
||||
@Excel(name = "标准实施日期",orderNum = "2" ,width = 20.0)
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private String ssrq;
|
||||
|
||||
@Excel(name = "新车型实施日期",orderNum = "3" ,width = 20.0)
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private String xcxssrqgj;
|
||||
|
||||
@Excel(name = "在产车实施日期",orderNum = "4" ,width = 20.0)
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private String zccssrqgj;
|
||||
|
||||
private String id;
|
||||
|
||||
private String compareFlag;
|
||||
|
||||
private String syrzCode;
|
||||
//国内海外为1 企标为2 政策为3
|
||||
private String standName;
|
||||
private String standEnName;
|
||||
private String sycx;
|
||||
private String nylx;
|
||||
private String zrbm;
|
||||
private String sycpx;
|
||||
}
|
||||
+1
-1
@@ -32,7 +32,7 @@ public interface ISarLawsDetailedListService extends IService<SarLawsDetailedLis
|
||||
void standardToLaws(String countryArea,TimeDto timeDto);
|
||||
|
||||
|
||||
List<ExportEmptyModel> importData(MultipartFile file , StringBuilder stringBuilder);
|
||||
List<ExportEmptyModelDto> importData(MultipartFile file , StringBuilder stringBuilder);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+57
-19
@@ -49,6 +49,8 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -649,11 +651,26 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
|
||||
List<TimeDto> timeDto = new ArrayList<>();
|
||||
if (detailedUpDto.getInforlist().contains(",")) {
|
||||
String[] id = detailedUpDto.getInforlist().split(",");
|
||||
String[] putTime = detailedUpDto.getInforlist1().split(";");
|
||||
String[] zcc = detailedUpDto.getInforlist2().split(";");
|
||||
String[] xcx = detailedUpDto.getInforlist3().split(";");
|
||||
String[] syrz = detailedUpDto.getInforlist4().split(";");
|
||||
String[] id = new String[]{};
|
||||
String[] putTime = new String[]{};
|
||||
String[] zcc = new String[]{};
|
||||
String[] xcx = new String[]{};
|
||||
String[] syrz = new String[]{};
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist())){
|
||||
id = detailedUpDto.getInforlist().split(",");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist1())){
|
||||
putTime = detailedUpDto.getInforlist1().split(";");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist2())){
|
||||
zcc = detailedUpDto.getInforlist2().split(";");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist3())){
|
||||
xcx = detailedUpDto.getInforlist3().split(";");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist4())){
|
||||
syrz=detailedUpDto.getInforlist4().split(";");
|
||||
}
|
||||
for (int a = 0; a < id.length; a++) {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(id[a]);
|
||||
@@ -825,8 +842,8 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
|
||||
|
||||
@Override
|
||||
public List<ExportEmptyModel> importData(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<ExportEmptyModel> res = ExcelImportUtilByWk.readExcelpublic(ExportEmptyModel.class, file, stringBuilder);
|
||||
public List<ExportEmptyModelDto> importData(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<ExportEmptyModelDto> res = ExcelImportUtilByWk.readExcelpublic(ExportEmptyModelDto.class, file, stringBuilder);
|
||||
//数据字典数据组装
|
||||
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCode();
|
||||
Map<String, String> dict = new HashMap<>();
|
||||
@@ -840,7 +857,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
//先校验是否存在一堆空数据
|
||||
if (null != res && "".equals(stringBuilder.toString())) {
|
||||
int i = 1;
|
||||
for (ExportEmptyModel e : res) {
|
||||
for (ExportEmptyModelDto e : res) {
|
||||
if (null == e.getStandNumber() || e.getStandNumber().isEmpty()) {
|
||||
stringBuilder.append("第" + i + "行标准编号不能为空;");
|
||||
}
|
||||
@@ -852,6 +869,27 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
//数据校验 先做重复交验+再做是否存在校验
|
||||
if (null != res && "".equals(stringBuilder.toString())) {
|
||||
for (ExportEmptyModelDto re:res) {
|
||||
if(!(re.getSsrq().contains(",")||re.getSsrq().contains(","))) {
|
||||
Date date = org.apache.poi.ss.usermodel.DateUtil
|
||||
.getJavaDate(Double.valueOf(re.getSsrq()));
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
re.setSsrq(format.format(date));
|
||||
}
|
||||
if(!(re.getXcxssrqgj().contains(",")||re.getXcxssrqgj().contains(","))) {
|
||||
Date date = org.apache.poi.ss.usermodel.DateUtil
|
||||
.getJavaDate(Double.valueOf(re.getXcxssrqgj()));
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
re.setXcxssrqgj(format.format(date));
|
||||
}
|
||||
if(!(re.getZccssrqgj().contains(",")||re.getZccssrqgj().contains(","))) {
|
||||
Date date = org.apache.poi.ss.usermodel.DateUtil
|
||||
.getJavaDate(Double.valueOf(re.getZccssrqgj()));
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
re.setZccssrqgj(format.format(date));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < res.size(); i++) {
|
||||
for (int j = 0; j < res.size(); j++) {
|
||||
String a = res.get(i).getStandNumber().replaceAll(" ", "").replaceAll(" ", "");
|
||||
@@ -865,7 +903,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
//如果没有重复 那么错误提示标识应该为空 现在开始验证标准是否存在
|
||||
if ("".equals(stringBuilder.toString())) {
|
||||
int i = 1;
|
||||
for (ExportEmptyModel exportEmptyModel : res) {
|
||||
for (ExportEmptyModelDto exportEmptyModel : res) {
|
||||
SearchStandContext searchStandContext = new SearchStandContext();
|
||||
searchStandContext.setStandCode(exportEmptyModel.getStandNumber());
|
||||
List<StandData> standData = standDateDao.searchStandDataThree(searchStandContext);
|
||||
@@ -920,15 +958,15 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
}
|
||||
|
||||
public List<ExportEmptyModel> dealWithData(List<ExportEmptyModel> res) {
|
||||
List<ExportEmptyModel> result = new ArrayList<>();
|
||||
public List<ExportEmptyModelDto> dealWithData(List<ExportEmptyModelDto> res) {
|
||||
List<ExportEmptyModelDto> result = new ArrayList<>();
|
||||
//判定是不是存在于国内海外标准中
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
Map<String, ExportEmptyModel> map = new HashMap<>();
|
||||
res.forEach(exportEmptyModel -> {
|
||||
if (null != exportEmptyModel.getId() && !exportEmptyModel.getId().isEmpty()) {
|
||||
stringBuilder.append(exportEmptyModel.getId() + ",");
|
||||
map.put(exportEmptyModel.getId(), exportEmptyModel);
|
||||
Map<String, ExportEmptyModelDto> map = new HashMap<>();
|
||||
res.forEach(ExportEmptyModel -> {
|
||||
if (null != ExportEmptyModel.getId() && !ExportEmptyModel.getId().isEmpty()) {
|
||||
stringBuilder.append(ExportEmptyModel.getId() + ",");
|
||||
map.put(ExportEmptyModel.getId(), ExportEmptyModel);
|
||||
}
|
||||
});
|
||||
String[] ids = stringBuilder.toString().substring(0, stringBuilder.toString().length() - 1).split(",");
|
||||
@@ -948,7 +986,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
if (null != infos && infos.size() > 0) {
|
||||
infos.forEach(sarStandardsInfo -> {
|
||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||
ExportEmptyModelDto model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getStandName());
|
||||
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
||||
@@ -975,7 +1013,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
if (null != sarBussionessStands && sarBussionessStands.size() > 0) {
|
||||
sarBussionessStands.forEach(sarStandardsInfo -> {
|
||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||
ExportEmptyModelDto model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getStandName());
|
||||
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
||||
@@ -1001,7 +1039,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
if (null != sarLawsStandInfos && sarLawsStandInfos.size() > 0) {
|
||||
sarLawsStandInfos.forEach(sarStandardsInfo -> {
|
||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||
ExportEmptyModelDto model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getLawsName());
|
||||
model.setStandEnName(sarStandardsInfo.getLawsEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws").toString():"");
|
||||
|
||||
+16
@@ -736,6 +736,22 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
saveUpdateLog(sarLawsStandInfo,beforeStandEO);
|
||||
if (elasflag) {
|
||||
attrInfoShowSearchDetails(sarLawsStandInfo,"upd");
|
||||
FindSarItemsPageReqDTO pageInfo = new FindSarItemsPageReqDTO();
|
||||
pageInfo.setStandId(sarLawsStandInfo.getId());
|
||||
pageInfo.setFileType("FBGBJBD");
|
||||
|
||||
/**
|
||||
* SarItemVO换为sarItemVOS
|
||||
* List<SarItemVO> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
|
||||
* .collect(Collectors.toMap(SarItemVO::getItemsNum, SarItemVO::getItemsName));
|
||||
*/
|
||||
|
||||
List<SarLawsItems> sarItemVOS = sarLawsItemsDao.querySarItemAndInterpretation(pageInfo);
|
||||
if(!sarItemVOS.isEmpty()){
|
||||
Map<String,String> collectMap = sarItemVOS.stream().filter((e) -> e.getItemsNum() != null && e.getItemsName() != null)
|
||||
.collect(Collectors.toMap(SarLawsItems::getItemsNum, SarLawsItems::getTermsConditions));
|
||||
sarLawsStandInfo.setMapItems(collectMap);
|
||||
}
|
||||
createStandMQService.sendLawsMQ(sarLawsStandInfo, "update");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.adc.da.slrs.sarQaInfo.entity;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
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 lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准法规问答信息表
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-05-06
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarQaInfo对象", description="标准法规问答信息表")
|
||||
public class SarQaInfoPage extends BasePage {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "资源类型-标准、法规、企标")
|
||||
@TableField("RES_TYPE")
|
||||
private String resType;
|
||||
|
||||
@ApiModelProperty(value = "资源ID")
|
||||
@TableField("RES_ID")
|
||||
private String resId;
|
||||
|
||||
@TableField("QUE_USER")
|
||||
private String queUser;
|
||||
|
||||
@TableField("ANSWER_USER")
|
||||
private String answerUser;
|
||||
|
||||
@TableField("RE_ANSWER_USER")
|
||||
private String reAnswerUser;
|
||||
|
||||
@ApiModelProperty(value = "提问时间")
|
||||
@TableField("QUE_TIME")
|
||||
private LocalDateTime queTime;
|
||||
|
||||
@ApiModelProperty(value = "是否解答")
|
||||
@TableField("ANSWER_FLAG")
|
||||
private BigDecimal answerFlag;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private BigDecimal validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATED_TIME")
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
@TableField("CREATED_USER")
|
||||
private String createdUser;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
@TableField("MODIFY_USER")
|
||||
private String modifyUser;
|
||||
|
||||
|
||||
}
|
||||
+9
-7
@@ -220,13 +220,15 @@ public class SarStandardComplianceAssessResultController {
|
||||
for (SarStandardComplianceProductAssess s:sarStandardCompliance) {
|
||||
if (null!=s.getStandardItem()) {
|
||||
String[] as=(s.getStandardItem()+".").split("\\.");
|
||||
if (orderKey.contains(Integer.valueOf(as[0].trim().toString()))) {
|
||||
stringMap.get(Integer.valueOf(as[0].trim().toString())).add(s);
|
||||
} else {
|
||||
orderKey.add(Integer.valueOf(as[0].trim().toString()));
|
||||
List<SarStandardComplianceProductAssess> assesses2 = new ArrayList<>();
|
||||
assesses2.add(s);
|
||||
stringMap.put(Integer.valueOf(as[0].trim().toString()), assesses2);
|
||||
if(StringUtils.isNumeric(as[0].trim())){
|
||||
if (orderKey.contains(Integer.valueOf(as[0].trim().toString()))) {
|
||||
stringMap.get(Integer.valueOf(as[0].trim().toString())).add(s);
|
||||
} else {
|
||||
orderKey.add(Integer.valueOf(as[0].trim().toString()));
|
||||
List<SarStandardComplianceProductAssess> assesses2 = new ArrayList<>();
|
||||
assesses2.add(s);
|
||||
stringMap.put(Integer.valueOf(as[0].trim().toString()), assesses2);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if (null!=stringMap.get(0)) {
|
||||
|
||||
+1
-1
@@ -829,7 +829,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
return "1";
|
||||
}
|
||||
|
||||
|
||||
//处理 代替被代替数据 关系
|
||||
@ApiOperation(value = "国内海外数据处理接口")
|
||||
@GetMapping("/replaceBdtbzhforDtbzh")
|
||||
public String replaceBdtbzhforDtbzh(SarStandardsInfo sarStandardsInfo) {
|
||||
|
||||
+15
@@ -1,10 +1,13 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -21,6 +24,16 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
String updateStateScheduledSql = "SELECT A.*,B.SSRQ,B.BDTBZH FROM sar_standards_info A LEFT JOIN sar_stand_attr_info B ON B.STAND_ID = A.ID ${ew.customSqlSegment}";
|
||||
|
||||
/**
|
||||
* 自动更新文本状态通用查询
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
@Select(updateStateScheduledSql)
|
||||
List<SarStandardsInfo> getStateScheduledList(@Param("ew") QueryWrapper queryWrapper);
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(@Param("page") SarStandardsInfoEOPage page,@Param("mark")String mark);
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoByNum(@Param("page") SarStandardsInfoEOPage page,@Param("mark")String mark);
|
||||
@@ -84,4 +97,6 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
List<String> selectIdFormDTBZH(String DTBZHCode);
|
||||
|
||||
List<DSarStandardDTO> dealWithDS(@Param("type") String standType, @Param("status")List<String> strings);
|
||||
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class DSarStandardDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String SSRQ;
|
||||
|
||||
// 新添加字段
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
@TableField("TEXT_STATUS")
|
||||
private String textStatus;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+2
@@ -224,6 +224,8 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
private String ZCCSSRQ;
|
||||
@TableField(exist = false)
|
||||
private String XCXSSRQ;
|
||||
@TableField(exist = false)
|
||||
private String BDTBZH;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String putTime2;
|
||||
|
||||
Reference in New Issue
Block a user