feat: There is no way the Laws
This commit is contained in:
@@ -11,6 +11,7 @@ public enum SarTypeEnum {
|
||||
FOREIGN_STAND("FOREIGN_STAND","国外标准法规"),FOREIGN_LAWS("FOREIGN_LAWS","国外政策"),
|
||||
STAND("STAND","国内外标准法规"),
|
||||
LAWS("LAWS","国内外政策"),
|
||||
LAWS_STAND("LAWS_STAND","国内外政策"),
|
||||
BUSINESS("BUSINESS","企业标准"),
|
||||
BUSS("BUSS","企业标准"),
|
||||
SPLIT("SPLIT","标准拆分"),
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.adc.da.mq;
|
||||
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.springframework.amqp.core.AmqpTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -32,15 +33,15 @@ public class CreateStandMQService {
|
||||
this.rabbitTemplate.convertAndSend("stand-exchange_SQ_GSAR_RELEASE", "stand-key_SQ_GSAR_RELEASE", standMap);
|
||||
}
|
||||
|
||||
public void sendLawsMQ(SarLawsInfo sarLawsInfoEO, String addOrUpdate) throws Exception{
|
||||
JSONObject json = JSONObject.fromObject(sarLawsInfoEO);
|
||||
public void sendLawsMQ(SarLawsStandInfo sarLawsStandInfo, String addOrUpdate) throws Exception{
|
||||
JSONObject json = JSONObject.fromObject(sarLawsStandInfo);
|
||||
String sarLawsInfoStr = json.toString();
|
||||
Map<String,Object> lawsMap = new HashMap<String,Object>();
|
||||
lawsMap.put("sarLaws", sarLawsInfoStr);
|
||||
lawsMap.put("addOrUpdate", addOrUpdate);
|
||||
|
||||
//发送消息队列
|
||||
this.rabbitTemplate.convertAndSend("laws-exchange_SQ_GSAR", "laws-key_SQ_GSAR", lawsMap);
|
||||
this.rabbitTemplate.convertAndSend("laws-exchange_SQ_GSAR_RELEASE", "laws-key_SQ_GSAR_RELEASE", lawsMap);
|
||||
}
|
||||
|
||||
public void sendBussStandMQ(Object sarBussionessStandEO, String addOrUpdate) throws Exception{
|
||||
|
||||
@@ -0,0 +1,271 @@
|
||||
//package com.adc.da.mq;
|
||||
//
|
||||
//import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
||||
//import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
//import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
//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;
|
||||
//import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
//import org.springframework.amqp.rabbit.annotation.QueueBinding;
|
||||
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
//import org.springframework.amqp.support.AmqpHeaders;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.messaging.Message;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
//import java.text.ParseException;
|
||||
//import java.text.SimpleDateFormat;
|
||||
//import java.util.*;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
//@Component
|
||||
//public class SendLawsMQService {
|
||||
//
|
||||
// @Autowired
|
||||
// private ISarStandardsInfoService sarStandardsInfoService;
|
||||
//
|
||||
// @Autowired
|
||||
// private SysInfoEOService sysInfoEOService;
|
||||
//
|
||||
// @Autowired
|
||||
// private DicTypeEODao dicTypeEODao;
|
||||
//
|
||||
// @Autowired
|
||||
// private IOtSvppsService otSvppsEOService;
|
||||
//
|
||||
// private static final Logger logger = LoggerFactory.getLogger(SendLawsMQService.class);
|
||||
//
|
||||
//
|
||||
// @RabbitListener(bindings = @QueueBinding(
|
||||
// value = @Queue(value = "createLawsMQ_SQ_GSAR_RELEASE", durable = "true"),
|
||||
// exchange = @Exchange(value = "laws-exchange_SQ_GSAR_RELEASE", ignoreDeclarationExceptions = "true"),
|
||||
// key = "laws-key_SQ_GSAR_RELEASE"))
|
||||
// public void createMQ(Map<String,Object> bussMap, Message message, Channel channel) throws Exception{
|
||||
// try{
|
||||
// try{
|
||||
// Thread.sleep(5000);
|
||||
// insertOrUpdateBussInfo(bussMap);
|
||||
// }catch(InterruptedException e){
|
||||
// logger.error(e.toString());
|
||||
// Thread.currentThread().interrupt();
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// logger.error("搜索中心国内外政策消息队列进入转换前失败!");
|
||||
// logger.error(e.getMessage(),e);
|
||||
// } finally {
|
||||
// Long tag = (Long) message.getHeaders().get(AmqpHeaders.DELIVERY_TAG);
|
||||
// channel.basicAck(tag,false);
|
||||
// logger.debug("消息确认成功!!!!!!!!!");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public void insertOrUpdateBussInfo(Map<String,Object> bussMap) throws Exception {
|
||||
// String addOrUpdate = bussMap.get("addOrUpdate").toString();
|
||||
// String sarBuss = bussMap.get("sarBuss").toString();
|
||||
// JSONObject jsonobject = JSONObject.fromObject(sarBuss);
|
||||
// SarLawsStandInfo infoEO = (SarLawsStandInfo) JSONObject.toBean(jsonobject,SarLawsStandInfo.class);
|
||||
// String FZRQFSRQ = null;
|
||||
// if ("updateFromAct".equals(addOrUpdate)){
|
||||
// addOrUpdate = "update";
|
||||
// FZRQFSRQ = "1";
|
||||
// }
|
||||
//
|
||||
// String sarStandAttrEOStr = infoEO.getSarStandAttrEOStr();
|
||||
// Map<String,Object> attrInfoMap = JSONObject.fromObject(sarStandAttrEOStr);
|
||||
// Map<String,Object> infoMap = infoEO.getAttrInfoCaseMap();
|
||||
//
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// //修改索引信息表
|
||||
// // 往索引表中插入数据
|
||||
// String baseSearchContent = "";
|
||||
// String getCodeName = "";
|
||||
// Map<String,Object> saveMap = new HashMap<>();
|
||||
//
|
||||
// //发布日期 高级查询
|
||||
// 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);
|
||||
// }
|
||||
//
|
||||
// //实施日期 高级查询 // -----
|
||||
// saveMap.put("putTime",dateFormatToStr(infoEO.getPutTime()));
|
||||
// Date put_time_data = null;
|
||||
// if (StringUtils.isNotBlank(infoEO.getPutTime())) {
|
||||
// try {
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
// put_time_data = format.parse(dateFormatToStr(infoEO.getPutTime())+" 00:00:00");
|
||||
// } catch (ParseException ignored) {
|
||||
// }
|
||||
// }
|
||||
// if (put_time_data != null) {
|
||||
// saveMap.put("put_time_data",put_time_data.getTime());
|
||||
// }else{
|
||||
// saveMap.put("put_time_data",-1000000000000000000L);
|
||||
// }
|
||||
//
|
||||
// saveMap.put("id",infoEO.getId());
|
||||
// saveMap.put("standSort",infoEO.getStandSort());
|
||||
// saveMap.put("stand_sort",infoEO.getStandSort());
|
||||
// if(StringUtils.isNotEmpty(infoEO.getStandSort())){
|
||||
// String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort());
|
||||
// saveMap.put("standSortShow",codeName);
|
||||
// getCodeName = codeName;
|
||||
// }
|
||||
// saveMap.put("standYear",infoEO.getStandYear());
|
||||
// saveMap.put("stand_year",infoEO.getStandYear());
|
||||
// saveMap.put("standNumber",infoEO.getStandCode());
|
||||
// saveMap.put("stand_code",infoEO.getStandCode());
|
||||
// saveMap = dealNumberMsg(saveMap,infoEO,getCodeName);
|
||||
// saveMap.put("nameshow",infoEO.getStandName());
|
||||
// saveMap.put("stand_name",infoEO.getStandName());
|
||||
// saveMap.put("standEnName",infoEO.getStandEnName());
|
||||
// saveMap.put("stand_en_name",infoEO.getStandEnName());
|
||||
// saveMap.put("replaceStandNum",infoEO.getReplaceStandNum());
|
||||
// saveMap.put("replace_stand_num",infoEO.getReplaceStandNum());
|
||||
// saveMap.put("replacedStandNum",infoEO.getReplacedStandNum());
|
||||
// saveMap.put("replaced_stand_num",infoEO.getReplacedStandNum());
|
||||
// saveMap.put("statecode",infoEO.getStandStatus());
|
||||
// saveMap.put("stand_status",infoEO.getStandStatus());
|
||||
// if (StringUtils.isNotEmpty(infoEO.getStandStatus())) {
|
||||
// String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandStatus());
|
||||
// saveMap.put("standstateshow",codeName);
|
||||
// }
|
||||
// String textStatusBussName = "";
|
||||
// if(infoEO.getTextStatusBuss() != null && StringUtils.isNotBlank(infoEO.getTextStatusBuss())){
|
||||
// List<String> valArr = Arrays.asList(infoEO.getTextStatusBuss().split(","));
|
||||
// textStatusBussName = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
// }
|
||||
// saveMap.put("textStatusBuss",infoEO.getTextStatusBuss());
|
||||
// saveMap.put("textStatusBussName",textStatusBussName);
|
||||
// //新加字段
|
||||
// saveMap.put("country",infoEO.getApplyCountry());
|
||||
// if(StringUtils.isNotEmpty(infoEO.getApplyCountry())){
|
||||
// String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getApplyCountry());
|
||||
// saveMap.put("countryShow",codeName);
|
||||
// }
|
||||
// // 自定义属性字段
|
||||
// if (attrInfoMap != null && !attrInfoMap.isEmpty()) {
|
||||
// attrInfoMap = sysInfoEOService.changeSelectInfo(attrInfoMap, "stand",baseSearchContent);
|
||||
// saveMap.putAll(attrInfoMap);
|
||||
// }
|
||||
//
|
||||
// saveMap.put("type","bussstand");
|
||||
// saveMap.put("validFlag","0");
|
||||
// saveMap.put("content",infoEO.getFileIds());
|
||||
//
|
||||
// String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||
// List<String> fieldInfoList = Arrays.asList(fieldInfo .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||
//
|
||||
// // 动态存储属性字段
|
||||
// for (String field : fieldInfoList) {
|
||||
// saveMap.put(field,attrInfoMap.getOrDefault(field,""));
|
||||
// String fieldValue = "";
|
||||
// String fieldFilter = field.toLowerCase();
|
||||
// if(infoMap.get(fieldFilter) != null && StringUtils.isNotBlank(infoMap.get(fieldFilter).toString())){
|
||||
// Object json= new JSONTokener(infoMap.get(fieldFilter).toString()).nextValue();
|
||||
// if(!json.toString().equals("null")){
|
||||
// fieldValue = infoMap.get(fieldFilter).toString();
|
||||
// }
|
||||
// }
|
||||
// saveMap.put(field+"Name",fieldValue);
|
||||
// }
|
||||
//
|
||||
// //当建立代替时,产生的没有文件的问题
|
||||
// if (StringUtils.isBlank(String.valueOf(saveMap.get("content")))) {
|
||||
// String context = filterStringIsNotBlank(String.valueOf(saveMap.get("FBGBUSS")),true)
|
||||
// + filterStringIsNotBlank(String.valueOf(saveMap.get("BZSMBUSS")),true)
|
||||
// + filterStringIsNotBlank(String.valueOf(saveMap.get("LSBBBUSS")),true)
|
||||
// + filterStringIsNotBlank(String.valueOf(saveMap.get("QTWJBUSS")),true)
|
||||
// + filterStringIsNotBlank(String.valueOf(saveMap.get("GLWJBUSS")),true);
|
||||
// context = context.replace(",,", ",");
|
||||
// saveMap.put("content", context);
|
||||
// }
|
||||
// if("add".equals(addOrUpdate)){
|
||||
// sarStandardsInfoService.insertIntoIndexForMap(saveMap);
|
||||
// } else {
|
||||
// sarStandardsInfoService.updateIntoIndexForMap(saveMap);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// 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 "";
|
||||
// }
|
||||
// String dateToStr = "";
|
||||
// try {
|
||||
// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// dateToStr = dateFormat.format(dateFormat.parse(dateStr.trim().substring(0,10)));
|
||||
// }catch (Exception e){
|
||||
// e.getMessage();
|
||||
// }
|
||||
// return dateToStr;
|
||||
// }
|
||||
//
|
||||
// public Map<String,Object> dealNumberMsg (Map<String,Object> saveMap,SarBussionessStand infoEO,String getCodeName) {
|
||||
// /*if(StringUtils.isNotEmpty(infoEO.getStandYear())){
|
||||
// String num = getCodeName + " " + infoEO.getStandCode() + "-" + infoEO.getStandYear();
|
||||
// saveMap.put("numbershow",num);
|
||||
// int index = infoEO.getStandCode().indexOf(".");
|
||||
// int index1 = infoEO.getStandCode().indexOf(":");
|
||||
// String numberExpNull = "";
|
||||
// if(index > -1){
|
||||
// numberExpNull = getCodeName + infoEO.getStandCode() + "-" + num.replaceAll(" ","")
|
||||
// + "-" + getCodeName + infoEO.getStandCode().substring(0,index) + "-" + infoEO.getStandCode().substring(0,index);
|
||||
// }else if(index1 > -1){
|
||||
// numberExpNull = getCodeName + infoEO.getStandCode() + "-" + num.replaceAll(" ","")
|
||||
// + "-" + getCodeName + infoEO.getStandCode().substring(0,index1) + "-" + infoEO.getStandCode().substring(0,index1);
|
||||
// }else{
|
||||
// numberExpNull = getCodeName + infoEO.getStandCode() + "-" + num.replaceAll(" ","");
|
||||
// }
|
||||
// } else {
|
||||
// String number = getCodeName + " " + infoEO.getStandCode();
|
||||
// saveMap.put("numbershow",number);
|
||||
// String numberExpNull = "";
|
||||
// int index = infoEO.getStandCode().indexOf(".");
|
||||
// if(index > -1){
|
||||
// numberExpNull = getCodeName + infoEO.getStandCode() + "-" + number.replaceAll(" ","")
|
||||
// + "-" + getCodeName + infoEO.getStandCode().substring(0,index) + "-" + infoEO.getStandCode().substring(0,index);
|
||||
// }else{
|
||||
// numberExpNull = getCodeName + infoEO.getStandCode() + "-" + number.replaceAll(" ","");
|
||||
// }
|
||||
// saveMap.put("numberExpNull",numberExpNull);
|
||||
// }*/
|
||||
// String number = infoEO.getStandCode();
|
||||
// saveMap.put("numbershow",number);
|
||||
// String numberExpNull = "";
|
||||
// int index = infoEO.getStandCode().indexOf(".");
|
||||
// if(index > -1){
|
||||
// numberExpNull = infoEO.getStandCode() + "-" + number.replaceAll(" ","")
|
||||
// + "-" + infoEO.getStandCode().substring(0,index) + "-" + infoEO.getStandCode().substring(0,index);
|
||||
// }else{
|
||||
// numberExpNull = infoEO.getStandCode() + "-" + number.replaceAll(" ","");
|
||||
// }
|
||||
// saveMap.put("numberExpNull",numberExpNull);
|
||||
// return saveMap;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@@ -4,6 +4,7 @@ import com.adc.da.slrs.sarLawsAttrInfo.entity.SarLawsAttrInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -15,6 +16,7 @@ import java.util.Map;
|
||||
* @author super_liu
|
||||
* @since 2021-06-04
|
||||
*/
|
||||
@Repository
|
||||
public interface SarLawsAttrInfoDao extends BaseMapper<SarLawsAttrInfo> {
|
||||
|
||||
void deleteLawsAttr(@Param("fieldInfo") String fieldInfo);
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarLawsFile.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarLawsFile.entity.SarLawsFile;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarLawsFile|")
|
||||
@RequestMapping("/sarLawsFile/sar-laws-file")
|
||||
public class SarLawsFileController extends BaseController<SarLawsFile> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.adc.da.slrs.sarLawsFile.dao;
|
||||
|
||||
import com.adc.da.slrs.sarLawsFile.entity.SarLawsFile;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Repository
|
||||
public interface SarLawsFileDao extends BaseMapper<SarLawsFile> {
|
||||
|
||||
List<SarLawsFile> selectFileByStandId(String lawsId);
|
||||
|
||||
List<SarLawsFile> selectFileByStandIdAndId(SarLawsFile laws);
|
||||
|
||||
List<SarLawsFile> selectFileByAttId(String attId);
|
||||
|
||||
List<SarLawsFile> selectFileMsgByAttId(String attId);
|
||||
|
||||
List<SarLawsFile> selectFileByResId(SarLawsFile sarBussStandFileEO);
|
||||
|
||||
int deleteByStandId(String standId);
|
||||
|
||||
int insertForeach(List<SarLawsFile> list); //批量新增
|
||||
|
||||
int insertSelective(SarLawsFile sarBussStandFile);
|
||||
|
||||
int updateByPrimaryKeySelective(SarLawsFile sarBussStandFile);
|
||||
|
||||
int deleteByPrimaryKey(String value);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.adc.da.slrs.sarLawsFile.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarLawsFile对象", description="")
|
||||
public class SarLawsFile extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableField("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "政策ID")
|
||||
@TableField("LAWS_ID")
|
||||
private String lawsId;
|
||||
|
||||
@ApiModelProperty(value = "政策文件分类")
|
||||
@TableField("LAWS_FILE_CLASSIFY")
|
||||
private String lawsFileClassify;
|
||||
|
||||
@ApiModelProperty(value = "文件主键")
|
||||
@TableField("ATT_ID")
|
||||
private String attId;
|
||||
|
||||
@ApiModelProperty(value = "文件名称")
|
||||
@TableField("FILE_NAME")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty(value = "文件后缀")
|
||||
@TableField("FILE_SUFFIX")
|
||||
private String fileSuffix;
|
||||
|
||||
@ApiModelProperty(value = "使用模式(SOURCE_FILE原文件,WEB_FILE转换后文件)")
|
||||
@TableField("USE_MODEL")
|
||||
private String useModel;
|
||||
|
||||
@ApiModelProperty(value = "加密密码")
|
||||
@TableField("PASSWORD")
|
||||
private String password;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "转换原文件id")
|
||||
@TableField("ORI_ATT_ID")
|
||||
private String oriAttId;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> idList = new ArrayList<>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private String useModule;
|
||||
@TableField(exist = false)
|
||||
private String resId;
|
||||
@TableField(exist = false)
|
||||
private Integer pageCount;
|
||||
@TableField(exist = false)
|
||||
private String fileOldName;
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarLawsFile.service;
|
||||
|
||||
import com.adc.da.slrs.sarLawsFile.entity.SarLawsFile;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
public interface ISarLawsFileService extends IService<SarLawsFile> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarLawsFile.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarLawsFile.entity.SarLawsFile;
|
||||
import com.adc.da.slrs.sarLawsFile.dao.SarLawsFileDao;
|
||||
import com.adc.da.slrs.sarLawsFile.service.ISarLawsFileService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Service
|
||||
public class SarLawsFileServiceImpl extends ServiceImpl<SarLawsFileDao, SarLawsFile> implements ISarLawsFileService {
|
||||
|
||||
}
|
||||
@@ -2,9 +2,12 @@ package com.adc.da.slrs.sarLawsInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
|
||||
import com.adc.da.slrs.sarLawsInfo.page.SarLawsInfoEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -15,6 +18,7 @@ import java.util.List;
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@Repository
|
||||
public interface SarLawsInfoDao extends BaseMapper<SarLawsInfo> {
|
||||
|
||||
Integer selectLawsColumn(@Param("columnName") String columnName);
|
||||
@@ -22,4 +26,85 @@ public interface SarLawsInfoDao extends BaseMapper<SarLawsInfo> {
|
||||
List<SarLawsInfo> queryByPage(SarLawsInfoEOPage page);
|
||||
|
||||
Integer queryByCount(SarLawsInfoEOPage page);
|
||||
|
||||
/**
|
||||
* @return com.adc.da.lawss.entity.SarLawsInfo
|
||||
* @Author yangxuenan
|
||||
* @Description 通过id查询详细信息
|
||||
* Date 2018/9/21 16:42
|
||||
* @Param [id]
|
||||
**/
|
||||
SarLawsInfo selectInfoById(String id);
|
||||
|
||||
/**
|
||||
* @return java.util.List<com.adc.da.lawss.entity.SarLawsInfo>
|
||||
* @Author yangxuenan
|
||||
* @Description 分页查询配置法规
|
||||
* Date 2018/9/30 17:02
|
||||
* @Param [page]
|
||||
**/
|
||||
List<SarLawsInfo> queryConfigLawsByPage(SarLawsInfoEOPage page);
|
||||
|
||||
int queryConfigLawsByCount(SarLawsInfoEOPage page);
|
||||
|
||||
|
||||
//liwenxuan:标准法规更新数量及清单:国内法规
|
||||
Integer selectCounterLawsCountINLAND(Date visitTime);
|
||||
|
||||
//liwenxuan:标准法规更新数量及清单:国内法规All
|
||||
Integer selectCounterLawsCountINLANDAll();
|
||||
|
||||
//liwenxuan:标准法规更新数量及清单:国外法规
|
||||
Integer selectCounterLawsCountFOREIGN(Date visitTime);
|
||||
|
||||
//liwenxuan:标准法规更新数量及清单:国外法规All
|
||||
Integer selectCounterLawsCountFOREIGNAll();
|
||||
|
||||
/**
|
||||
* 功能描述: 通过文件号查询详细信息
|
||||
*
|
||||
* @param: [Number]
|
||||
* @return: com.adc.da.lawss.entity.SarLawsInfo
|
||||
* @auther: SYT
|
||||
* @date: 2018/10/11 20:34
|
||||
*/
|
||||
List<SarLawsInfo> selectInfoByNumber(@Param("number") String number, @Param("resName") String resName, @Param("type") String type);
|
||||
|
||||
|
||||
/**
|
||||
* 搜索中心查询相关推荐
|
||||
*
|
||||
* @param:
|
||||
* @auther: gaoyan
|
||||
* @date: 2018/11/10 9:22
|
||||
*/
|
||||
List<RecommendVO> selectRecommendLaws(SarLawsInfoEOPage pagenew);
|
||||
|
||||
List<RecommendVO> selectCloseLaws(SarLawsInfoEOPage pagenew);
|
||||
|
||||
/**
|
||||
* 功能描述: 查询所有小于当前时间的即将实施的条目
|
||||
*
|
||||
* @param: [lawsEO]
|
||||
* @return: java.util.List<com.adc.da.lawss.entity.SarLawsInfo>
|
||||
* @auther: SYT
|
||||
* @date: 2018/11/16 15:24
|
||||
*/
|
||||
List<SarLawsInfo> queryByPutTimeList(SarLawsInfo lawsEO);
|
||||
|
||||
int updateSarStandReplaced(SarLawsInfo lawsInfoEO);
|
||||
|
||||
int updateRelacedNumByNumber(SarLawsInfoEOPage lawsInfoEO);
|
||||
|
||||
List<SarLawsInfo> selectLawsInfoByIdAndRole(SarLawsInfoEOPage lawsEOPage);
|
||||
|
||||
int queryByCountForES(SarLawsInfoEOPage lawsEOPage);
|
||||
|
||||
List<SarLawsInfo> queryByPageForES(SarLawsInfoEOPage lawsEOPage);
|
||||
|
||||
int updateByPrimaryKeyForSynchron(SarLawsInfo SarLawsInfo);
|
||||
|
||||
int deleteByPrimaryKeyFlag(String id);
|
||||
|
||||
SarLawsInfo selectByPrimaryKeyAndTime(SarLawsInfo lawsEO);
|
||||
}
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarLawsItemVal.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarLawsItemVal.entity.SarLawsItemVal;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarLawsItemVal|")
|
||||
@RequestMapping("/sarLawsItemVal/sar-laws-item-val")
|
||||
public class SarLawsItemValController extends BaseController<SarLawsItemVal> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarLawsItemVal.dao;
|
||||
|
||||
import com.adc.da.slrs.sarLawsItemVal.entity.SarLawsItemVal;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
public interface SarLawsItemValDao extends BaseMapper<SarLawsItemVal> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.adc.da.slrs.sarLawsItemVal.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarLawsItemVal对象", description="")
|
||||
public class SarLawsItemVal extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "法规条目ID")
|
||||
@TableField("LAWS_ITEM_ID")
|
||||
private String lawsItemId;
|
||||
|
||||
@ApiModelProperty(value = "参数类型")
|
||||
@TableField("PROPERTY_TYPE")
|
||||
private String propertyType;
|
||||
|
||||
@ApiModelProperty(value = "参数内容")
|
||||
@TableField("PROPERTY_VAL")
|
||||
private String propertyVal;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private BigDecimal validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
private LocalDateTime creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarLawsItemVal.service;
|
||||
|
||||
import com.adc.da.slrs.sarLawsItemVal.entity.SarLawsItemVal;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
public interface ISarLawsItemValService extends IService<SarLawsItemVal> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarLawsItemVal.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarLawsItemVal.entity.SarLawsItemVal;
|
||||
import com.adc.da.slrs.sarLawsItemVal.dao.SarLawsItemValDao;
|
||||
import com.adc.da.slrs.sarLawsItemVal.service.ISarLawsItemValService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Service
|
||||
public class SarLawsItemValServiceImpl extends ServiceImpl<SarLawsItemValDao, SarLawsItemVal> implements ISarLawsItemValService {
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.adc.da.slrs.sarLawsMenu.controller;
|
||||
|
||||
|
||||
import com.adc.da.slrs.sarBussStandMenu.service.ISarBussStandMenuService;
|
||||
import com.adc.da.slrs.sarLawsMenu.service.ISarLawsMenuService;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.sys.util.UUIDUtils;
|
||||
import com.adc.da.util.http.ResponseMessage;
|
||||
import com.adc.da.util.http.Result;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarLawsMenu.entity.SarLawsMenu;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarLawsMenu|")
|
||||
@RequestMapping("/sarLawsMenu/sar-laws-menu")
|
||||
public class SarLawsMenuController extends BaseController<SarLawsMenu> {
|
||||
|
||||
@Autowired
|
||||
private ISarLawsMenuService lawsMenuService;
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService sarMenuEOService;
|
||||
|
||||
@ApiOperation(value = "|SarBussStandMenuEO|修改")
|
||||
@PutMapping("/removeStandInfo")
|
||||
// @RequiresPermissions("lawss:sarStandMenu:update")
|
||||
public ResponseMessage removeStandInfo(@RequestBody SarLawsMenu standardsInfoEO) throws Exception {
|
||||
String[] idList = standardsInfoEO.getIdlist();
|
||||
int count = 0;
|
||||
if(idList != null){
|
||||
for(String id : idList){
|
||||
SarLawsMenu menuEO = new SarLawsMenu();
|
||||
menuEO.setLawsId(id);
|
||||
menuEO.setMenuId(standardsInfoEO.getMenuId());
|
||||
//删除所选目录下关联
|
||||
String oldMenuId = standardsInfoEO.getOldMenuId();
|
||||
if (StringUtils.isEmpty(oldMenuId)) {
|
||||
oldMenuId = standardsInfoEO.getMenuId();
|
||||
}
|
||||
menuEO.setOldMenuId(oldMenuId);
|
||||
count += lawsMenuService.deleteByMenuId(menuEO);
|
||||
//查询是否还有与其他节点的关联,若没有则增加与根节点的关联
|
||||
List<SarLawsMenu> getList = lawsMenuService.selectAllMenuByStandId(menuEO);
|
||||
if (getList == null || getList.isEmpty()) {
|
||||
// 查询根节点
|
||||
TsResource sarMenuEO = new TsResource();
|
||||
sarMenuEO.setSorDivide("BUSINESS_STAND");
|
||||
List<TsResource> getRootMenu = sarMenuEOService.queryMenuByDis(sarMenuEO);
|
||||
menuEO.setMenuId(getRootMenu.get(0).getId());
|
||||
menuEO.setId(UUIDUtils.randomUUID20());
|
||||
menuEO.setValidFlag(0);
|
||||
lawsMenuService.save(menuEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count>0){
|
||||
return Result.success("0","移除成功!",true);
|
||||
} else {
|
||||
return Result.error("移除失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.adc.da.slrs.sarLawsMenu.dao;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandMenu.entity.NewmenuOldmenuVO;
|
||||
import com.adc.da.slrs.sarLawsMenu.entity.SarLawsMenu;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Repository
|
||||
public interface SarLawsMenuDao extends BaseMapper<SarLawsMenu> {
|
||||
List<SarLawsMenu> selectByLawsInfo(SarLawsMenu sarLawsMenuEO);
|
||||
|
||||
int updateMenuidByMenuid(NewmenuOldmenuVO var1);
|
||||
|
||||
List<SarLawsMenu> selectByLawsId(String lawsId);
|
||||
|
||||
void deleteByLawsId(String lawsId);
|
||||
|
||||
List<SarLawsMenu> selectMenuByMenuParentId(SarLawsMenu sarLawsMenuEO);
|
||||
|
||||
int updateByLawsIdAndMenuId(SarLawsMenu sarLawsMenuEO);
|
||||
|
||||
int deleteByLawsIdAndMenuId(SarLawsMenu sarLawsMenuEO);
|
||||
|
||||
List<SarLawsMenu> selectAllMenuByStandId(SarLawsMenu sarStandMenuEO);
|
||||
|
||||
int deleteByMenuId(SarLawsMenu sarLawsMenuEO);
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.adc.da.slrs.sarLawsMenu.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarLawsMenu对象", description="")
|
||||
public class SarLawsMenu extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "法规ID")
|
||||
@TableField("LAWS_ID")
|
||||
private String lawsId;
|
||||
|
||||
@ApiModelProperty(value = "目录ID")
|
||||
@TableField("MENU_ID")
|
||||
private String menuId;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String oldMenuId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String[] idlist;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> menuIds;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.adc.da.slrs.sarLawsMenu.entity;
|
||||
|
||||
import com.adc.da.sys.common.BasePage;
|
||||
|
||||
|
||||
/**
|
||||
* <b>功能:</b>SAR_LAWS_MENU SarLawsMenuEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class SarLawsMenuEOPage extends BasePage {
|
||||
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String menuId;
|
||||
private String menuIdOperator = "=";
|
||||
private String lawsId;
|
||||
private String lawsIdOperator = "=";
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
|
||||
public String getValidFlag() {
|
||||
return this.validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getValidFlagOperator() {
|
||||
return this.validFlagOperator;
|
||||
}
|
||||
|
||||
public void setValidFlagOperator(String validFlagOperator) {
|
||||
this.validFlagOperator = validFlagOperator;
|
||||
}
|
||||
|
||||
public String getMenuId() {
|
||||
return this.menuId;
|
||||
}
|
||||
|
||||
public void setMenuId(String menuId) {
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public String getMenuIdOperator() {
|
||||
return this.menuIdOperator;
|
||||
}
|
||||
|
||||
public void setMenuIdOperator(String menuIdOperator) {
|
||||
this.menuIdOperator = menuIdOperator;
|
||||
}
|
||||
|
||||
public String getLawsId() {
|
||||
return this.lawsId;
|
||||
}
|
||||
|
||||
public void setLawsId(String lawsId) {
|
||||
this.lawsId = lawsId;
|
||||
}
|
||||
|
||||
public String getLawsIdOperator() {
|
||||
return this.lawsIdOperator;
|
||||
}
|
||||
|
||||
public void setLawsIdOperator(String lawsIdOperator) {
|
||||
this.lawsIdOperator = lawsIdOperator;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIdOperator() {
|
||||
return this.idOperator;
|
||||
}
|
||||
|
||||
public void setIdOperator(String idOperator) {
|
||||
this.idOperator = idOperator;
|
||||
}
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.adc.da.slrs.sarLawsMenu.service;
|
||||
|
||||
import com.adc.da.slrs.sarLawsMenu.entity.SarLawsMenu;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
public interface ISarLawsMenuService extends IService<SarLawsMenu> {
|
||||
|
||||
List<SarLawsMenu> selectAllMenuByStandId(SarLawsMenu sarStandMenuEO);
|
||||
|
||||
int deleteByMenuId (SarLawsMenu sarStandMenuEO);
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.adc.da.slrs.sarLawsMenu.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarLawsMenu.entity.SarLawsMenu;
|
||||
import com.adc.da.slrs.sarLawsMenu.dao.SarLawsMenuDao;
|
||||
import com.adc.da.slrs.sarLawsMenu.service.ISarLawsMenuService;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Service
|
||||
public class SarLawsMenuServiceImpl extends ServiceImpl<SarLawsMenuDao, SarLawsMenu> implements ISarLawsMenuService {
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService sarMenuEOService;
|
||||
|
||||
public int deleteByMenuId (SarLawsMenu sarStandMenuEO){
|
||||
List<String> menuIds = sarMenuEOService.getChildMenuList(sarStandMenuEO.getOldMenuId());
|
||||
sarStandMenuEO.setMenuIds(menuIds);
|
||||
return this.baseMapper.deleteByMenuId(sarStandMenuEO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarLawsMenu> selectAllMenuByStandId(SarLawsMenu sarStandMenuEO){
|
||||
return this.baseMapper.selectAllMenuByStandId(sarStandMenuEO);
|
||||
}
|
||||
}
|
||||
+207
@@ -0,0 +1,207 @@
|
||||
package com.adc.da.slrs.sarLawsStandInfo.controller;
|
||||
|
||||
|
||||
import com.adc.da.common.ReadExcel;
|
||||
import com.adc.da.excel.poi.excel.ExcelExportUtil;
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.service.ISarLawsStandInfoService;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarAdvanceSearchVO;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.StandardsInfoExcelVO;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.adc.da.utils.util.LawsStandExportUtil;
|
||||
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||
import com.adc.da.utils.util.StandExportUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-25
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarLawsStandInfo|")
|
||||
@RequestMapping("/${restPath}/lawss/sarLawsInfo")
|
||||
public class SarLawsStandInfoController extends BaseController<SarLawsStandInfo> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SarLawsStandInfoController.class);
|
||||
|
||||
@Autowired
|
||||
private ISarLawsStandInfoService sarLawsInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private IPersonCollectEOService personCollectEOService;
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService iTsResourceService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ITsUserService tsUserService;
|
||||
|
||||
@Autowired
|
||||
private IDicTypeEOService dicTypeEOService;
|
||||
|
||||
@ApiOperation(value = "|SarLawsInfoEO|分页查询")
|
||||
@GetMapping("/page")
|
||||
/*@RequiresPermissions("lawss:sarLawsInfo:page")*/
|
||||
public ResponseMessage<PageInfo<SarLawsStandInfo>> page(SarLawsStandInfoPage page) throws Exception {
|
||||
if (null != page.getNowOrderBy()) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderByA("a.issueTime");//发布日期
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderByA("SAR_LAWS_ATTR_INFO.XCXSSRQLAWS");//新车型实施日期
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderByA("SAR_LAWS_ATTR_INFO.ZCXSSRQLAWS");//在产车实施日期
|
||||
break;
|
||||
case 4:
|
||||
page.setOrderByA("a.LAWS_TEXT_STATE");//文本状态
|
||||
break;
|
||||
case 5:
|
||||
page.setOrderByA("paixu");
|
||||
break;
|
||||
case 6:
|
||||
page.setOrderByA("SAR_LAWS_ATTR_INFO.SSRQ");
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
break;
|
||||
}
|
||||
if (null != page.getNowOrder()) {
|
||||
switch (page.getNowOrder()) {
|
||||
case 1:
|
||||
page.setOrder1("desc");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (com.adc.da.util.utils.StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
String advanceStr = SarAdvanceSearchUtil.createSql(searchList,"SAR_LAWS_ATTR_INFO");
|
||||
if (StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
page.setAdvanceSearchStr(null);
|
||||
}
|
||||
}
|
||||
|
||||
List<SarLawsStandInfo> rows = sarLawsInfoEOService.getSarStandardsInfoPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarLawsStandInfo|详情")
|
||||
@GetMapping("/getStandInfoById")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:get")
|
||||
public ResponseMessage<SarLawsStandInfo> find(String id) throws Exception {
|
||||
SarLawsStandInfo result = sarLawsInfoEOService.selectStandardsInfoByKey(id);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarLawsStandInfo|详情")
|
||||
@GetMapping("/getStandInfoUpdateById")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:get")
|
||||
public ResponseMessage<SarLawsStandInfo> getStandInfoUpdateById(String id) throws Exception {
|
||||
SarLawsStandInfo result = sarLawsInfoEOService.selectStandardsInfoUpdateByKey(id);
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(id);
|
||||
result.setCollectId(collectId);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarLawsStandInfo|导出excel")
|
||||
@GetMapping(value = "/exportStandardsInfoExcel")
|
||||
public void exportStandardsInfoExcel(String exportContent, String exportType, String exportName,String userId, HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(StringUtils.isEmpty(exportName)||exportName.equals("null")){
|
||||
exportName="政策库";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx",request));
|
||||
response.setContentType("application/force-download");
|
||||
// 导出所有数据
|
||||
List<SarLawsStandInfo> data = sarLawsInfoEOService.getExportData(exportType,exportContent,userId);
|
||||
workbook = LawsStandExportUtil.exportDatas(data);
|
||||
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarLawsStandInfo|确认配置标准")
|
||||
@PostMapping("/saveStandardsMenu")
|
||||
//@RequiresPermissions("lawss:sarBussionessStand:saveStandardsMenu")
|
||||
public ResponseMessage saveStandardsMenu(@RequestBody SarLawsStandInfoPage standardsInfoEO){
|
||||
if ("wdsc".equals(standardsInfoEO.getMenuId()) || "gxhbq".equals(standardsInfoEO.getMenuId())) {
|
||||
return Result.error("所选节点不支持配置标准");
|
||||
} else {
|
||||
SarLawsStandInfoPage standlist = sarLawsInfoEOService.updateStandardsMenu(standardsInfoEO);
|
||||
return Result.success(standardsInfoEO);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarLawsStandInfo|企业标准修改")
|
||||
@PostMapping(value = "/updateSarLawsStandInfo")
|
||||
public ResponseMessage<SarLawsStandInfo> updateSarLawsStandInfo(@RequestBody SarLawsStandInfo sarLawsStandInfo) throws Exception {
|
||||
sarLawsStandInfo.setModifyTime(new Date());
|
||||
sarLawsInfoEOService.updateSarLawsStandInfo(sarLawsStandInfo);
|
||||
return Result.success("","修改成功",sarLawsStandInfo);
|
||||
}
|
||||
|
||||
// @ApiOperation(value = "|SarBussionessStandEO|删除")
|
||||
// @PostMapping("deleteSarBussionessStand")
|
||||
// public ResponseMessage delete(String ids) throws Exception {
|
||||
// SarLawsStandInfoPage sarLawsStandInfoPage = new SarLawsStandInfoPage();
|
||||
// sarLawsStandInfoPage.setIdlist(ids.split(","));
|
||||
// ResponseMessage<SarLawsStandInfo> result = sarLawsInfoEOService.deleteSarLawsStandInfo(sarLawsStandInfoPage);
|
||||
// logger.info("delete from SAR_BUSSIONESS_STAND where id = {}", ids);
|
||||
// return result;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.adc.da.slrs.sarLawsStandInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-25
|
||||
*/
|
||||
@Repository
|
||||
public interface SarLawsStandInfoDao extends BaseMapper<SarLawsStandInfo> {
|
||||
|
||||
List<SarLawsStandInfo> getSarStandardsInfoPage(SarLawsStandInfoPage page);
|
||||
|
||||
int getSarStandardsInfoCount(SarLawsStandInfoPage page);
|
||||
|
||||
List<SarLawsStandInfo> selectStandardsInfoByKey(String id);
|
||||
|
||||
List<SarLawsStandInfo> getSarStandardsExportInfo(SarLawsStandInfoPage page);
|
||||
|
||||
|
||||
}
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
package com.adc.da.slrs.sarLawsStandInfo.entity;
|
||||
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandAttrDetailsEO;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import oracle.sql.DATE;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarLawsStandInfo对象", description="")
|
||||
public class SarLawsStandInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "政策分类 共四级,逐级选择-配置管理中维护")
|
||||
@TableField("LAWS_TYPE")
|
||||
private String lawsType;
|
||||
|
||||
@ApiModelProperty(value = "政策编号")
|
||||
@TableField("LAWS_NUMBER")
|
||||
private String lawsNumber;
|
||||
|
||||
@ApiModelProperty(value = "中文名称")
|
||||
@TableField("LAWS_NAME")
|
||||
private String lawsName;
|
||||
|
||||
@ApiModelProperty(value = "英文名称")
|
||||
@TableField("LAWS_EN_NAME")
|
||||
private String lawsEnName;
|
||||
|
||||
@ApiModelProperty(value = "政策文号")
|
||||
@TableField("LAWS_NO")
|
||||
private String lawsNo;
|
||||
|
||||
@ApiModelProperty(value = "发文日期")
|
||||
@TableField("ISSUE_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String issueTime;
|
||||
|
||||
@ApiModelProperty(value = "发文单位")
|
||||
@TableField("ISSUE_COMPANY")
|
||||
private String issueCompany;
|
||||
|
||||
@ApiModelProperty(value = "征集意见周期-起始时间")
|
||||
@TableField("COMMENT_CYCLE_START")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String commentCycleStart;
|
||||
|
||||
@ApiModelProperty(value = "征集意见周期-结束时间")
|
||||
@TableField("COMMENT_CYCLE_END")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String commentCycleEnd;
|
||||
|
||||
@ApiModelProperty(value = "文件状态-配置管理中维护")
|
||||
@TableField("LAWS_TEXT_STATE")
|
||||
private String lawsTextState;
|
||||
|
||||
@ApiModelProperty(value = "适用区域-配置管理中维护")
|
||||
@TableField("LAWS_SYQY")
|
||||
private String lawsSyqy;
|
||||
|
||||
@ApiModelProperty(value = "适用车型-配置管理中维护")
|
||||
@TableField("LAWS_SYCX")
|
||||
private String lawsSycx;
|
||||
|
||||
@ApiModelProperty(value = "是/否(选择否,只有政策、政策中文名称是必填项目)")
|
||||
@TableField("IS_RELATE_ACCESS")
|
||||
private String isRelateAccess;
|
||||
|
||||
@ApiModelProperty(value = "年度-可在配置管理中维护,根据发布日期自动带入可手动修改")
|
||||
@TableField("LAWS_YEAR")
|
||||
private String lawsYear;
|
||||
|
||||
@ApiModelProperty(value = "福田转发通知文号")
|
||||
@TableField("LAWS_NOTISYNC_NUM")
|
||||
private String lawsNotisyncNum;
|
||||
|
||||
@ApiModelProperty(value = "信息简报 xxx期次xxx板块")
|
||||
@TableField("LAWS_BULLETIN")
|
||||
private String lawsBulletin;
|
||||
|
||||
@ApiModelProperty(value = "标签-可在配置管理中维护")
|
||||
@TableField("LAWS_LABEL")
|
||||
private String lawsLabel;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@TableField("LAWS_REMARK")
|
||||
private String lawsRemark;
|
||||
|
||||
@ApiModelProperty(value = "国家地区")
|
||||
@TableField("COUNTRY")
|
||||
private String country;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "参数1")
|
||||
@TableField("PARAM1")
|
||||
private Long param1;
|
||||
|
||||
@ApiModelProperty(value = "参数2")
|
||||
@TableField("PARAM2")
|
||||
private String param2;
|
||||
|
||||
// 非表字段
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String firstPutTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String putTimeShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String issueTimeShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String issueTimeStr;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String putTimeStr;
|
||||
|
||||
//目录ID 非标准信息表中的字段
|
||||
@TableField(exist = false)
|
||||
private String menuId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String menuParentId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standStatusShow; // 标准状态下拉框 --单选
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standNatrueShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standSortShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String applyCountryShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> standFileList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> opinionFilesList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> relevanceFileList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private String collectId;
|
||||
|
||||
//文件的类型
|
||||
@TableField(exist = false)
|
||||
private String standFileClassify;
|
||||
|
||||
//文件的下载id
|
||||
@TableField(exist = false)
|
||||
private String attId;
|
||||
|
||||
//记录是否修改了替代文件号
|
||||
@TableField(exist = false)
|
||||
private int upReplaceNumFlag;
|
||||
//记录是否修改了文件号
|
||||
@TableField(exist = false)
|
||||
private int upNumFlag;
|
||||
// 数据库新加的字段
|
||||
|
||||
@TableField(exist = false)
|
||||
private String remark;//备注
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoMap = new LinkedHashMap<>(); //属性表字段与值
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoCaseMap = new LinkedHashMap<>(); //属性表字段与值小写前端带入渲染
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sarStandAttrEOStr; //新增修改时属性表信息
|
||||
|
||||
@TableField(exist = false)
|
||||
private String fileIds; //全部文件ID
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<SarStandAttrDetailsEO> attrInfoList = new ArrayList<>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standTextStatusShow; // 标准文本状态显示名称
|
||||
// 以下为非表中字段
|
||||
@TableField(exist = false)
|
||||
private String countryShow; //国家地区显示名称
|
||||
@TableField(exist = false)
|
||||
private String standStateShow; // 标准状态显示名称
|
||||
@TableField(exist = false)
|
||||
private String standNatureShow; // 标准性质显示名称
|
||||
@TableField(exist = false)
|
||||
private List<DicTypeEO> dicTypeList = new ArrayList(); // 记录标准涉及到的所有数据字典数据
|
||||
|
||||
}
|
||||
+261
@@ -0,0 +1,261 @@
|
||||
package com.adc.da.slrs.sarLawsStandInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import oracle.sql.DATE;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarLawsStandInfo对象", description="")
|
||||
public class SarLawsStandInfoPage extends BasePage {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "政策分类 共四级,逐级选择-配置管理中维护")
|
||||
@TableField("LAWS_TYPE")
|
||||
private String lawsType;
|
||||
|
||||
@ApiModelProperty(value = "政策编号")
|
||||
@TableField("LAWS_NUMBER")
|
||||
private String lawsNumber;
|
||||
|
||||
@ApiModelProperty(value = "中文名称")
|
||||
@TableField("LAWS_NAME")
|
||||
private String lawsName;
|
||||
|
||||
@ApiModelProperty(value = "英文名称")
|
||||
@TableField("LAWS_EN_NAME")
|
||||
private String lawsEnName;
|
||||
|
||||
@ApiModelProperty(value = "政策文号")
|
||||
@TableField("LAWS_NO")
|
||||
private String lawsNo;
|
||||
|
||||
@ApiModelProperty(value = "发文日期")
|
||||
@TableField("ISSUE_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String issueTime;
|
||||
|
||||
@ApiModelProperty(value = "发文单位")
|
||||
@TableField("ISSUE_COMPANY")
|
||||
private String issueCompany;
|
||||
|
||||
@ApiModelProperty(value = "征集意见周期-起始时间")
|
||||
@TableField("COMMENT_CYCLE_START")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String commentCycleStart;
|
||||
|
||||
@ApiModelProperty(value = "征集意见周期-结束时间")
|
||||
@TableField("COMMENT_CYCLE_END")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String commentCycleEnd;
|
||||
|
||||
@ApiModelProperty(value = "文件状态-配置管理中维护")
|
||||
@TableField("LAWS_TEXT_STATE")
|
||||
private String lawsTextState;
|
||||
|
||||
@ApiModelProperty(value = "适用区域-配置管理中维护")
|
||||
@TableField("LAWS_SYQY")
|
||||
private String lawsSyqy;
|
||||
|
||||
@ApiModelProperty(value = "适用车型-配置管理中维护")
|
||||
@TableField("LAWS_SYCX")
|
||||
private String lawsSycx;
|
||||
|
||||
@ApiModelProperty(value = "是/否(选择否,只有政策、政策中文名称是必填项目)")
|
||||
@TableField("IS_RELATE_ACCESS")
|
||||
private String isRelateAccess;
|
||||
|
||||
@ApiModelProperty(value = "年度-可在配置管理中维护,根据发布日期自动带入可手动修改")
|
||||
@TableField("LAWS_YEAR")
|
||||
private String lawsYear;
|
||||
|
||||
@ApiModelProperty(value = "福田转发通知文号")
|
||||
@TableField("LAWS_NOTISYNC_NUM")
|
||||
private String lawsNotisyncNum;
|
||||
|
||||
@ApiModelProperty(value = "信息简报 xxx期次xxx板块")
|
||||
@TableField("LAWS_BULLETIN")
|
||||
private String lawsBulletin;
|
||||
|
||||
@ApiModelProperty(value = "标签-可在配置管理中维护")
|
||||
@TableField("LAWS_LABEL")
|
||||
private String lawsLabel;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@TableField("LAWS_REMARK")
|
||||
private String lawsRemark;
|
||||
|
||||
@ApiModelProperty(value = "国家地区")
|
||||
@TableField("COUNTRY")
|
||||
private String country;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private DATE modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "参数1")
|
||||
@TableField("PARAM1")
|
||||
private Long param1;
|
||||
|
||||
@ApiModelProperty(value = "参数2")
|
||||
@TableField("PARAM2")
|
||||
private String param2;
|
||||
|
||||
private String[] commentCycleDate;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
private String modifyTimeOperator = "=";
|
||||
private String creationTime1;
|
||||
private String creationTime2;
|
||||
private String creationTimeOperator = "=";
|
||||
private String validFlagOperator = "=";
|
||||
private String putUser;
|
||||
private String putUserOperator = "=";
|
||||
private String citationUser;
|
||||
private String citationUserOperator = "=";
|
||||
private String responsibleUnit;
|
||||
private String responsibleUnitOperator = "=";
|
||||
private String standFile;
|
||||
private String standFileOperator = "=";
|
||||
private String tags;
|
||||
private String tagsOperator = "=";
|
||||
private String standStatus;
|
||||
private String standStatusOperator = "=";
|
||||
private String replacedStandNum;
|
||||
private String replacedStandNumOperator = "=";
|
||||
private String replaceStandNum;
|
||||
private String replaceStandNumOperator = "=";
|
||||
private String quoteStand;
|
||||
private String quoteStandOperator = "=";
|
||||
private String firstPutTime;
|
||||
private String firstPutTime1;
|
||||
private String firstPutTime2;
|
||||
private String firstPutTimeOperator = "=";
|
||||
private String putYear;
|
||||
private String putYear1;
|
||||
private String putYear2;
|
||||
private String putYearOperator = "=";
|
||||
private String putTime;
|
||||
private String putTime1;
|
||||
private String putTime2;
|
||||
private String putTimeOperator = "=";
|
||||
private String issueTime1;
|
||||
private String issueTime2;
|
||||
private String issueTimeOperator = "=";
|
||||
private String energyKind;
|
||||
private String energyKindOperator = "=";
|
||||
private String applyArctic;
|
||||
private String applyArcticOperator = "=";
|
||||
private String standEnName;
|
||||
private String standEnNameOperator = "=";
|
||||
private String standName;
|
||||
private String standNameOperator = "=";
|
||||
private String standCode;
|
||||
private String standCodeOperator = "=";
|
||||
private String classifyCode;
|
||||
private String classifyCodeOperator = "=";
|
||||
private String standSubclass;
|
||||
private String standSubclassOperator = "=";
|
||||
private String standGenera;
|
||||
private String standGeneraOperator = "=";
|
||||
private String idOperator = "=";
|
||||
private String menuId;
|
||||
private List<String> menuIdList;
|
||||
private String[] idlist;
|
||||
//为了在sql中区分修改操作
|
||||
private String updateFlag;
|
||||
// 数据库新增字段
|
||||
private String applyCountry;
|
||||
private String standYear;
|
||||
private String applyCountryOperator = "=";
|
||||
private String standNature;
|
||||
private String standNatureOperator = "=";
|
||||
private String synopsis;
|
||||
private String synopsisOperator = "=";
|
||||
private String standSort;
|
||||
private String standSortOperator = "=";
|
||||
private String opinionFile;
|
||||
private String opinionFileOperator = "=";
|
||||
private String relevanceFile;
|
||||
private String relevanceFileOperator = "=";
|
||||
private String remark;
|
||||
private String remarkOperator = "=";
|
||||
|
||||
private List<String> roleIds;
|
||||
private String rootMenuId;
|
||||
private String orgName;
|
||||
private List<String> menuRoleList;
|
||||
private String[] replacedStandNumList;
|
||||
private String numberName;
|
||||
|
||||
// 树结构增加搜索条件
|
||||
private String collectMenuId;
|
||||
private String advanceSearchVOStr;
|
||||
private String advanceSearchStr;
|
||||
private List<String> menuAllChildrenIdList;
|
||||
private String userId;
|
||||
|
||||
private String zqcrId;
|
||||
|
||||
//页面排序
|
||||
private String paixu;
|
||||
private String shunxu;
|
||||
private String sql;
|
||||
|
||||
// 树结构增加搜索条件
|
||||
@TableField(exist = false)
|
||||
private String labelMenuId;
|
||||
@TableField(exist = false)
|
||||
private String ids;
|
||||
@TableField(exist = false)
|
||||
private String proType;
|
||||
@TableField(exist = false)
|
||||
private Integer nowOrder;
|
||||
@TableField(exist = false)
|
||||
private Integer nowOrderBy;
|
||||
@TableField(exist = false)
|
||||
private String orderByA = "a.issue_time";
|
||||
@TableField(exist = false)
|
||||
private String orderBy1 = "SAR_LAWS_STAND_INFO.issue_time";
|
||||
@TableField(exist = false)
|
||||
private String order1 = "desc";
|
||||
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.adc.da.slrs.sarLawsStandInfo.service;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-25
|
||||
*/
|
||||
public interface ISarLawsStandInfoService extends IService<SarLawsStandInfo> {
|
||||
|
||||
// ResponseMessage<SarLawsStandInfo> deleteSarLawsStandInfo(SarLawsStandInfoPage page) throws Exception;
|
||||
|
||||
SarLawsStandInfo updateSarLawsStandInfo(SarLawsStandInfo sarLawsStandInfo) throws Exception;
|
||||
|
||||
SarLawsStandInfoPage updateStandardsMenu(SarLawsStandInfoPage standardsInfoEO);
|
||||
|
||||
List<SarLawsStandInfo> getExportData(String exportType, String exportContent,String userId) throws Exception;
|
||||
|
||||
List<SarLawsStandInfo> getSarStandardsInfoPage(SarLawsStandInfoPage page) throws Exception;
|
||||
|
||||
SarLawsStandInfo selectStandardsInfoByKey(String id) throws Exception;
|
||||
|
||||
SarLawsStandInfo selectStandardsInfoUpdateByKey(String id) throws Exception;
|
||||
|
||||
}
|
||||
+763
@@ -0,0 +1,763 @@
|
||||
package com.adc.da.slrs.sarLawsStandInfo.service.impl;
|
||||
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.common.SarTypeEnum;
|
||||
import com.adc.da.common.SelectionTypeEnum;
|
||||
import com.adc.da.common.UseModuleEnum;
|
||||
import com.adc.da.login.util.UserUtils;
|
||||
import com.adc.da.mq.CreateMQService;
|
||||
import com.adc.da.mq.CreateStandMQService;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.person.page.PersonCollectEOPage;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.search.service.StandLawsSearchService;
|
||||
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
||||
import com.adc.da.slrs.sarBussStandItems.dao.SarBussStandItemsDao;
|
||||
import com.adc.da.slrs.sarBussStandMenu.dao.SarBussStandMenuDao;
|
||||
import com.adc.da.slrs.sarBussStandVal.dao.SarBussStandValDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarLawsAttrInfo.dao.SarLawsAttrInfoDao;
|
||||
import com.adc.da.slrs.sarLawsAttrInfo.entity.SarLawsAttrInfo;
|
||||
import com.adc.da.slrs.sarLawsFile.dao.SarLawsFileDao;
|
||||
import com.adc.da.slrs.sarLawsFile.entity.SarLawsFile;
|
||||
import com.adc.da.slrs.sarLawsInfo.dao.SarLawsInfoDao;
|
||||
import com.adc.da.slrs.sarLawsMenu.dao.SarLawsMenuDao;
|
||||
import com.adc.da.slrs.sarLawsMenu.entity.SarLawsMenu;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.dao.SarLawsStandInfoDao;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.service.ISarLawsStandInfoService;
|
||||
import com.adc.da.slrs.sarLawsVal.dao.SarLawsValDao;
|
||||
import com.adc.da.slrs.sarLawsVal.entity.SarLawsVal;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarAdvanceSearchVO;
|
||||
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.sys.constant.ValueStateEnum;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.utils.util.FieldConvertUtil;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.json.JSONTokener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Clob;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-25
|
||||
*/
|
||||
@Service
|
||||
public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao, SarLawsStandInfo> implements ISarLawsStandInfoService {
|
||||
|
||||
|
||||
@Value("${elas.flag}")
|
||||
private boolean elasflag; //ES是否启用
|
||||
|
||||
@Value("${file.path}")
|
||||
private String filePath;//文件存储路径
|
||||
|
||||
@Autowired
|
||||
private IPersonCollectEOService personCollectEOService;
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService iTsResourceService;
|
||||
|
||||
@Autowired
|
||||
private ITsUserService tsUserService;
|
||||
|
||||
@Autowired
|
||||
private SarBussionessStandDao sarLawsStandInfoDao;
|
||||
|
||||
@Autowired
|
||||
private IAttFileEOService attFileEOService;
|
||||
|
||||
@Autowired
|
||||
private DicTypeEODao dicTypeEODao;
|
||||
|
||||
@Autowired
|
||||
private SysInfoEOService sysInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private SarLawsMenuDao sarLawsMenuDao;
|
||||
|
||||
@Autowired
|
||||
private OtConvertMqDao otConvertEODao;
|
||||
|
||||
@Autowired
|
||||
private CreateMQService convertMq;
|
||||
|
||||
@Autowired
|
||||
private SarLawsValDao sarBussStandValEODao;
|
||||
|
||||
@Autowired
|
||||
private SarLawsFileDao sarBussStandFileEODao;
|
||||
|
||||
@Autowired
|
||||
private CreateStandMQService createStandMQService;
|
||||
|
||||
@Autowired
|
||||
private ISarUpdLogService sarUpdLogEOService;
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService sarMenuEOService;
|
||||
|
||||
@Autowired
|
||||
private PersonCollectEODao personCollectEODao;
|
||||
|
||||
@Autowired
|
||||
private SarLawsAttrInfoDao sarLawsAttrInfoDao;
|
||||
|
||||
@Autowired
|
||||
private SarBussStandItemsDao sarBussStandItemsEODao;
|
||||
|
||||
@Autowired
|
||||
private StandLawsSearchService standLawsSearchService;
|
||||
|
||||
@Override
|
||||
public List<SarLawsStandInfo> getSarStandardsInfoPage(SarLawsStandInfoPage page) throws Exception {
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
String userId = UserUtils.getUserId();
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(userId)){
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
qw.eq("ID",page.getMenuId());
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
|
||||
if (!getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(userId);
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
Integer rowCount = this.baseMapper.getSarStandardsInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarLawsStandInfo> rows = this.baseMapper.getSarStandardsInfoPage(page);
|
||||
attrInfoCollect(rows);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 处理属性表数据
|
||||
* @Param: [sarlist]
|
||||
* @Return: void
|
||||
*/
|
||||
public void attrInfo (List<SarLawsStandInfo> sarlist) throws Exception {
|
||||
for(SarLawsStandInfo row : sarlist){
|
||||
attrInfoDetails(row);
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoCollect (List<SarLawsStandInfo> sarlist) throws Exception {
|
||||
List<String> collectResIds = sarlist.stream().map(SarLawsStandInfo::getId).collect(Collectors.toList());
|
||||
Map<String,String> collectMap = personCollectEOService.queryCollectByUserAndIds(collectResIds);
|
||||
for (SarLawsStandInfo row : sarlist) {
|
||||
if(collectMap != null && collectMap.get(row.getId()) != null){
|
||||
row.setCollectId(collectMap.get(row.getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SarLawsStandInfo selectStandardsInfoByKey(String id) throws Exception{
|
||||
List<SarLawsStandInfo> sarLawsStandInfoList = this.baseMapper.selectStandardsInfoByKey(id);
|
||||
SarLawsStandInfo sarLawsStandInfo = new SarLawsStandInfo();
|
||||
if(!sarLawsStandInfoList.isEmpty()) {
|
||||
List<SarLawsStandInfo> newStandList = new ArrayList<>();
|
||||
newStandList.add(sarLawsStandInfoList.get(0));
|
||||
attrInfoShowDetails(newStandList);
|
||||
sarLawsStandInfo = newStandList.get(0);
|
||||
}
|
||||
return sarLawsStandInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SarLawsStandInfo selectStandardsInfoUpdateByKey(String id) throws Exception{
|
||||
List<SarLawsStandInfo> sarLawsStandInfoList = this.baseMapper.selectStandardsInfoByKey(id);
|
||||
SarLawsStandInfo sarLawsStandInfo = new SarLawsStandInfo();
|
||||
if(!sarLawsStandInfoList.isEmpty()) {
|
||||
List<SarLawsStandInfo> newStandList = new ArrayList<>();
|
||||
newStandList.add(sarLawsStandInfoList.get(0));
|
||||
attrInfo(newStandList);
|
||||
sarLawsStandInfo = newStandList.get(0);
|
||||
}
|
||||
return sarLawsStandInfo;
|
||||
}
|
||||
|
||||
public void attrInfoDetails (SarLawsStandInfo row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarLawsAttrInfoDao.selectLawsFieldAndData(fieldInfo,row.getId());
|
||||
if (InitStandAttrUtil.clobFieldListBuss != null && !InitStandAttrUtil.clobFieldListBuss.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldListBuss) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField,fieldValue);
|
||||
}
|
||||
}
|
||||
// 组织机构和人员
|
||||
Map<String,Object> newMap = new HashMap<>();
|
||||
if(getAttrMap != null){
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
Object value1 = entry.getValue();
|
||||
if (value1 != null && value1.toString().equals("\"null\"")){
|
||||
entry.setValue("");
|
||||
}
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getOrgNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getUserNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
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<>();
|
||||
|
||||
for (Map.Entry<String, Object> entry : orgMap.entrySet()) {
|
||||
String newKey = entry.getKey().toLowerCase();
|
||||
resultMap.put(newKey, orgMap.get(entry.getKey()));
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldListLaws != null && !InitStandAttrUtil.fileFieldListLaws.isEmpty() && InitStandAttrUtil.fileFieldListLaws.contains(entry.getKey())) {
|
||||
String value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
if(!fileObj.isEmpty()){
|
||||
resultMap.put(newKey + "Name", fileObj.get(0).getOldFileName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
public void attrInfoShowDetails(List<SarLawsStandInfo> sarlist) throws Exception {
|
||||
for (SarLawsStandInfo row : sarlist) {
|
||||
attrInfoDetails(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.fileFieldListLaws != null && InitStandAttrUtil.fileFieldListLaws.size() > 0 && InitStandAttrUtil.fileFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarLawsStandInfo> getExportData(String exportType, String exportContent,String userId) throws Exception {
|
||||
SarLawsStandInfoPage page = new SarLawsStandInfoPage();
|
||||
if ("apart".equals(exportType)) {
|
||||
page.setIdlist(exportContent.split(","));
|
||||
} else {
|
||||
JSONObject jsonObject = JSONObject.fromObject(exportContent);
|
||||
page = (SarLawsStandInfoPage)JSONObject.toBean(jsonObject, SarLawsStandInfoPage.class);
|
||||
page.setPage(1);
|
||||
page.setPageSize(10000);
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
qw.eq("ID",page.getMenuId());
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = com.alibaba.fastjson.JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
String advanceStr = SarAdvanceSearchUtil.createSql(searchList,"SAR_LAWS_ATTR_INFO");
|
||||
if (com.adc.da.util.utils.StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
page.setAdvanceSearchStr(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setOrderBy("SAR_BUSSIONESS_STAND.issue_time is null,SAR_BUSSIONESS_STAND.issue_time desc,SAR_BUSSIONESS_STAND.id");
|
||||
if(userId != null){
|
||||
page.setUserId(userId);
|
||||
}else {
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
List<SarLawsStandInfo> rows = this.baseMapper.getSarStandardsExportInfo(page);
|
||||
attrInfoShow(rows);
|
||||
return rows;
|
||||
}
|
||||
|
||||
public void attrInfoShow (List<SarLawsStandInfo> sarlist) throws Exception {
|
||||
for(SarLawsStandInfo row : sarlist){
|
||||
attrInfoDetails(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
Map<String, Object> getNewMap = new LinkedHashMap<>();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
String svppsTip = "";
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldListLaws != null && InitStandAttrUtil.fileFieldListLaws.size() > 0 && InitStandAttrUtil.fileFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapLaws.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
if("ZYQCR".equals(name)||"QTQCR".equals(name)){
|
||||
if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
}else{
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
getAttrMap.put("SVPPSTips",svppsTip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SarLawsStandInfoPage updateStandardsMenu(SarLawsStandInfoPage standardsInfoEO) {
|
||||
SarLawsMenu sarStandMenuEO = new SarLawsMenu();
|
||||
String nowMenuId = standardsInfoEO.getMenuId();
|
||||
sarStandMenuEO.setMenuId(nowMenuId);
|
||||
for (int i = 0; i < standardsInfoEO.getIdlist().length; i++) {
|
||||
sarStandMenuEO.setLawsId(standardsInfoEO.getIdlist()[i]);
|
||||
sarStandMenuEO.setId(null);
|
||||
sarStandMenuEO.setValidFlag(0);
|
||||
// 根据当前目录查询所在父节点
|
||||
String secondLevelId = "";
|
||||
List<String> getMenuPIds = iTsResourceService.getParentMenuId(nowMenuId);
|
||||
if (getMenuPIds != null && getMenuPIds.size() > 1) {
|
||||
int idSize = getMenuPIds.size();
|
||||
secondLevelId = getMenuPIds.get(idSize-1);
|
||||
} else {
|
||||
secondLevelId = nowMenuId;
|
||||
}
|
||||
//查询标准是否已在 当前父节点中
|
||||
SarLawsMenu standMenuEOQuery = new SarLawsMenu();
|
||||
standMenuEOQuery.setMenuId(secondLevelId);
|
||||
standMenuEOQuery.setLawsId(standardsInfoEO.getIdlist()[i]);
|
||||
List<String> menuIds = iTsResourceService.getChildMenuList(secondLevelId);
|
||||
standMenuEOQuery.setMenuIds(menuIds);
|
||||
List<SarLawsMenu> getInfo = sarLawsMenuDao.selectMenuByMenuParentId(standMenuEOQuery);
|
||||
//删除节点与根节点的关联
|
||||
SarLawsMenu sarStandMenuDel = new SarLawsMenu();
|
||||
sarStandMenuDel.setLawsId(standardsInfoEO.getIdlist()[i]);
|
||||
sarStandMenuDel.setMenuId(standardsInfoEO.getRootMenuId());
|
||||
sarLawsMenuDao.deleteByLawsIdAndMenuId(sarStandMenuDel);
|
||||
if (getInfo == null || getInfo.isEmpty()) {
|
||||
sarStandMenuEO.setId(UUIDUtils.randomUUID20());
|
||||
sarLawsMenuDao.insert(sarStandMenuEO);
|
||||
} else {
|
||||
sarStandMenuEO.setOldMenuId(secondLevelId);
|
||||
List<String> menuOldIds = iTsResourceService.getChildMenuList(secondLevelId);
|
||||
sarStandMenuEO.setMenuIds(menuOldIds);
|
||||
sarLawsMenuDao.updateByLawsIdAndMenuId(sarStandMenuEO);
|
||||
}
|
||||
}
|
||||
return standardsInfoEO;
|
||||
}
|
||||
|
||||
public SarLawsStandInfo updateSarLawsStandInfo(SarLawsStandInfo sarLawsStandInfo) throws Exception {
|
||||
String standId = sarLawsStandInfo.getId();
|
||||
SarLawsStandInfo beforeStandEO = this.baseMapper.selectById(standId);
|
||||
if(beforeStandEO!=null){
|
||||
attrInfoDetails(beforeStandEO);
|
||||
}
|
||||
//规范性引用文件,如有数据,删除以前关联
|
||||
int resultCount = this.baseMapper.updateById(sarLawsStandInfo);
|
||||
if (resultCount >= 1) {
|
||||
// 修改属性表数据
|
||||
sarLawsAttrInfoDao.deleteLawsAttrByStandId(standId);
|
||||
|
||||
//
|
||||
sarBussStandValEODao.deleteDataByStandId(standId);
|
||||
|
||||
//删除文件详情表数据
|
||||
sarBussStandFileEODao.deleteByStandId(standId);
|
||||
SarLawsFile sarBussStandFileEO = new SarLawsFile();
|
||||
sarBussStandFileEO.setLawsId(standId);
|
||||
sarBussStandFileEO.setIdList(null);
|
||||
List<SarLawsFile> listFile = sarBussStandFileEODao.selectFileByStandIdAndId(sarBussStandFileEO);
|
||||
if (listFile != null) {
|
||||
if (!listFile.isEmpty()) {
|
||||
for (int f = 0; f < listFile.size(); f++) {
|
||||
//删除转换表ot_convert数据
|
||||
otConvertEODao.deleteByAttId(listFile.get(f).getAttId());
|
||||
}
|
||||
}
|
||||
}
|
||||
createStandAttrInfo(sarLawsStandInfo);
|
||||
// 根据代替标准号 ,修改代替标准号标准中的,被代替标准号
|
||||
// updateReplaceConnect(sarLawsStandInfo);
|
||||
//修改收藏分享编号名称
|
||||
updateCollectAndShare(sarLawsStandInfo);
|
||||
// 记录修改日志
|
||||
saveUpdateLog(sarLawsStandInfo,beforeStandEO);
|
||||
if (elasflag) {
|
||||
attrInfoShowSearchDetails(sarLawsStandInfo,"upd");
|
||||
createStandMQService.sendLawsMQ(sarLawsStandInfo, "update");
|
||||
}
|
||||
}
|
||||
return sarLawsStandInfo;
|
||||
}
|
||||
|
||||
public void attrInfoShowSearchDetails(SarLawsStandInfo row,String type) throws Exception {
|
||||
if (row != null) {
|
||||
attrInfoSearchDetails(row,type);
|
||||
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 = "";
|
||||
List<String> valArr = new ArrayList<>();
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
if(StringUtils.isNotBlank(entry.getValue().toString())){
|
||||
Object json= new JSONTokener(entry.getValue().toString()).nextValue();
|
||||
if(json instanceof org.json.JSONArray){
|
||||
valArr = com.alibaba.fastjson.JSONObject.parseArray(entry.getValue().toString(),String.class);
|
||||
}else {
|
||||
value = entry.getValue().toString();
|
||||
valArr = Arrays.asList(value.split(","));
|
||||
}
|
||||
if(!valArr.isEmpty()){
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoSearchDetails(SarLawsStandInfo row,String type) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = new TreeMap<>();
|
||||
if(type.equals("add")){
|
||||
String sarStandAttrEOStr = row.getSarStandAttrEOStr();
|
||||
getAttrMap = JSONObject.fromObject(sarStandAttrEOStr);
|
||||
}else {
|
||||
getAttrMap = sarLawsAttrInfoDao.selectLawsFieldAndData(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);
|
||||
}
|
||||
}
|
||||
|
||||
public void saveUpdateLog(SarLawsStandInfo sarStandardsInfoEO,SarLawsStandInfo beforeSarStandardsInfo) throws Exception{
|
||||
Map<String,Object> newMap = new HashMap<>();
|
||||
Map<String,Object> oldMap = beforeSarStandardsInfo.getAttrInfoMap();
|
||||
String attrStr = sarStandardsInfoEO.getSarStandAttrEOStr();
|
||||
if (StringUtils.isNotBlank(attrStr)) {
|
||||
newMap = JSONObject.fromObject(attrStr);
|
||||
}
|
||||
newMap = changeMap(sarStandardsInfoEO,newMap);
|
||||
oldMap = changeMap(beforeSarStandardsInfo,oldMap);
|
||||
String sortName = sysInfoEOService.getDicNamesByCodes(sarStandardsInfoEO.getLawsType());
|
||||
String number = sortName + " " + sarStandardsInfoEO.getLawsNumber();
|
||||
String content = number + " 《" + sarStandardsInfoEO.getLawsName()+" " + sarStandardsInfoEO.getLawsEnName() + "》";
|
||||
sarUpdLogEOService.createUpdateLog(SarTypeEnum.BUSINESS.getValue(),sarStandardsInfoEO.getId(),oldMap,newMap,content);
|
||||
}
|
||||
|
||||
public Map<String,Object> changeMap (SarLawsStandInfo sarStandardsInfoEO,Map<String,Object> map) {
|
||||
// map.put("country",verifyObj(sarStandardsInfoEO.getApplyCountry()));
|
||||
map.put("lawsType",verifyObj(sarStandardsInfoEO.getLawsType()));
|
||||
map.put("lawsNumber",verifyObj(sarStandardsInfoEO.getLawsNumber()));
|
||||
map.put("lawsName",verifyObj(sarStandardsInfoEO.getLawsName()));
|
||||
map.put("lawsEnName",verifyObj(sarStandardsInfoEO.getLawsEnName()));
|
||||
map.put("lawsNo",verifyObj(sarStandardsInfoEO.getLawsNo()));
|
||||
return map;
|
||||
}
|
||||
|
||||
private Object verifyObj(Object str){
|
||||
return str == null ? "" : str;
|
||||
}
|
||||
|
||||
public void updateCollectAndShare(SarLawsStandInfo sarLawsStandInfo) throws Exception {
|
||||
//修改收藏表中
|
||||
String number = sarLawsStandInfo.getLawsNumber()+ ")";
|
||||
PersonCollectEOPage personCollectEOPage = new PersonCollectEOPage();
|
||||
personCollectEOPage.setValidFlag("0");
|
||||
personCollectEOPage.setCollectResId(sarLawsStandInfo.getId());
|
||||
List<TsPersonCollect> listCollect = personCollectEOService.queryByList(personCollectEOPage);
|
||||
if (listCollect != null && listCollect.size() > 0) {
|
||||
for (TsPersonCollect getCollect : listCollect) {
|
||||
TsPersonCollect collectEO = new TsPersonCollect();
|
||||
collectEO.setId(getCollect.getId());
|
||||
collectEO.setCollectTitle(sarLawsStandInfo.getLawsName() + " " + "( 编号:" + number);
|
||||
personCollectEOService.updateByPrimaryKeySelective(collectEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 新增属性表数据
|
||||
* @Date: 2020/9/8 9:53
|
||||
* @Param: [sarStandardsInfoEO]
|
||||
* @Return: void
|
||||
*/
|
||||
public void createStandAttrInfo (SarLawsStandInfo sarBussionessStandEO) throws Exception {
|
||||
String sarStandAttrEOStr = sarBussionessStandEO.getSarStandAttrEOStr();
|
||||
String mustFields = FieldConvertUtil.mustFields;
|
||||
String mustValues = FieldConvertUtil.mustValues(sarBussionessStandEO.getId());
|
||||
// 将字符串转为map进行解析
|
||||
Map<String,String> sarStandAttrMap = JSONObject.fromObject(sarStandAttrEOStr);
|
||||
StringBuilder fieldsBuilder = new StringBuilder();
|
||||
StringBuilder valuesBuilder = new StringBuilder();
|
||||
Map<String,String> selectionMap = new HashMap<>();
|
||||
Map<String,String> fileMap = new HashMap<>();
|
||||
Map<String,String> multiTimeMap = new HashMap<>();
|
||||
String fileIds = "";
|
||||
for (Map.Entry<String,String> entry : sarStandAttrMap.entrySet()) {
|
||||
String attrKey = entry.getKey();
|
||||
String attrValue = entry.getValue();
|
||||
if (InitStandAttrUtil.queryFieldListLaws != null && !InitStandAttrUtil.queryFieldListLaws.isEmpty()) {
|
||||
if (InitStandAttrUtil.queryFieldListLaws.contains(attrKey)) {
|
||||
fieldsBuilder.append("," + attrKey);
|
||||
// 多选项,文件类型需要单独处理 向子表添加数据
|
||||
if (InitStandAttrUtil.selectionFieldListLaws.contains(attrKey)) {
|
||||
selectionMap.put(attrKey,attrValue);
|
||||
} else if (InitStandAttrUtil.fileFieldListLaws.contains(attrKey)) {
|
||||
fileMap.put(attrKey,attrValue);
|
||||
fileIds += attrValue + ",";
|
||||
} else if (InitStandAttrUtil.multiTimeFieldList.contains(attrKey)) {
|
||||
multiTimeMap.put(attrKey,attrValue);
|
||||
}
|
||||
// 不同类型存储数据需单独处理值
|
||||
if (InitStandAttrUtil.numFieldListLaws.contains(attrKey)) {
|
||||
if (StringUtils.isBlank(attrValue)) {
|
||||
attrValue = "null";
|
||||
}
|
||||
} else if (InitStandAttrUtil.timeFieldListLaws.contains(attrKey)) {
|
||||
attrValue = FieldConvertUtil.changeTimeValue(attrValue);
|
||||
} else {
|
||||
attrValue = "'" + attrValue + "'";
|
||||
}
|
||||
valuesBuilder.append("," + attrValue);
|
||||
sarBussionessStandEO.setFileIds(fileIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
String insertField = mustFields + fieldsBuilder.toString();
|
||||
String insertValue = mustValues + valuesBuilder.toString();
|
||||
int insertRes = sarLawsAttrInfoDao.insertLawsAttr(insertField,insertValue);
|
||||
if (insertRes > 0) {
|
||||
// 多选项处理
|
||||
createStandVal(sarBussionessStandEO.getId(),selectionMap);
|
||||
// 文件处理
|
||||
createStandFile(sarBussionessStandEO.getId(),fileMap);
|
||||
// 多时间处理
|
||||
// createStandPutTime(sarBussionessStandEO.getId(),multiTimeMap);
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 多选项处理
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/9/8 14:37
|
||||
* @Param: [sarStandardsInfoEO, selectionMap]
|
||||
* @Return: void
|
||||
*/
|
||||
public void createStandVal (String standId,Map<String,String> selectionMap) {
|
||||
if (selectionMap != null && selectionMap.size() > 0) {
|
||||
List<SarLawsVal> standValList = new ArrayList<>();
|
||||
for (Map.Entry<String,String> entry : selectionMap.entrySet()) {
|
||||
String value = entry.getValue();
|
||||
String field = entry.getKey();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
String[] valArr = value.trim().split(",");
|
||||
for (String val : valArr) {
|
||||
SarLawsVal sarStandValEO = new SarLawsVal();
|
||||
sarStandValEO.setValidFlag(ValueStateEnum.VALUE_TRUE.getValue());
|
||||
sarStandValEO.setCreationTime(new Date());
|
||||
sarStandValEO.setModifyTime(new Date());
|
||||
sarStandValEO.setLawsId(standId);
|
||||
sarStandValEO.setId(com.adc.da.sys.util.UUIDUtils.randomUUID20());
|
||||
sarStandValEO.setPropertyType(field);
|
||||
sarStandValEO.setPropertyVal(val);
|
||||
standValList.add(sarStandValEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (standValList != null && !standValList.isEmpty()) {
|
||||
sarBussStandValEODao.insertForeach(standValList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 文件处理
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/9/8 15:01
|
||||
* @Param: [standId, fileMap]
|
||||
* @Return: void
|
||||
*/
|
||||
public void createStandFile (String standId,Map<String,String> fileMap) throws Exception {
|
||||
if (fileMap != null && fileMap.size() > 0) {
|
||||
List<SarLawsFile> standFileList = new ArrayList<>();
|
||||
for (Map.Entry<String,String> entry : fileMap.entrySet()) {
|
||||
String value = entry.getValue();
|
||||
String field = entry.getKey();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileList = attFileEOService.getMultiFileInfos(value);
|
||||
if (fileList != null && !fileList.isEmpty()) {
|
||||
createStandFileAppend(standId,field,fileList,standFileList);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (standFileList != null && !standFileList.isEmpty()) {
|
||||
sarBussStandFileEODao.insertForeach(standFileList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void createStandFileAppend (String standId,String field,List<AttFileEO> fileList,List<SarLawsFile> standFileList) throws Exception {
|
||||
for (AttFileEO fileInfo : fileList) {
|
||||
SarLawsFile sarStandFileEO = new SarLawsFile();
|
||||
sarStandFileEO.setCreationUser(LoginUserUtil.getUserId());
|
||||
sarStandFileEO.setCreationTime(new Date());
|
||||
sarStandFileEO.setModifyTime(new Date());
|
||||
sarStandFileEO.setValidFlag(0);
|
||||
sarStandFileEO.setLawsId(standId); //标准ID
|
||||
sarStandFileEO.setUseModel(UseModuleEnum.SOURCE_FILE.getValue()); //文件使用模式
|
||||
sarStandFileEO.setId(com.adc.da.sys.util.UUIDUtils.randomUUID20());
|
||||
sarStandFileEO.setAttId(fileInfo.getId()); //文件ID
|
||||
sarStandFileEO.setLawsFileClassify(field); //文件分类
|
||||
sarStandFileEO.setFileName(fileInfo.getOldFileName());
|
||||
sarStandFileEO.setFileSuffix(fileInfo.getFileSuffix());
|
||||
sarStandFileEO.setOriAttId(fileInfo.getId());
|
||||
standFileList.add(sarStandFileEO);
|
||||
//文档转换
|
||||
if ("pdf".equals(fileInfo.getFileSuffix()) || "PDF".equals(fileInfo.getFileSuffix())) {
|
||||
SarLawsFile newFileEO = new SarLawsFile();
|
||||
newFileEO.setCreationUser(LoginUserUtil.getUserId());
|
||||
newFileEO.setCreationTime(new Date());
|
||||
newFileEO.setModifyTime(new Date());
|
||||
newFileEO.setValidFlag(0);
|
||||
newFileEO.setLawsId(standId); //标准ID
|
||||
newFileEO.setId(com.adc.da.sys.util.UUIDUtils.randomUUID20());
|
||||
newFileEO.setAttId(fileInfo.getId()); //文件ID
|
||||
newFileEO.setLawsFileClassify(field); //文件分类
|
||||
newFileEO.setFileName(fileInfo.getOldFileName());
|
||||
newFileEO.setFileSuffix(fileInfo.getFileSuffix());
|
||||
newFileEO.setUseModel(UseModuleEnum.WEB_FILE.getValue()); //文件使用模式 //文件名称@@@@@@@需要修改
|
||||
newFileEO.setOriAttId(fileInfo.getId());
|
||||
standFileList.add(newFileEO);
|
||||
} else {
|
||||
String filePath = fileInfo.getFilePath() + fileInfo.getFileName();
|
||||
OtConvertMq convert = new OtConvertMq();
|
||||
convert.setLawsId(standId);
|
||||
convert.setAttId(fileInfo.getId());
|
||||
convert.setFilePath(filePath);
|
||||
convert.setAddOrUp("0");
|
||||
convert.setFileSuffix(fileInfo.getFileSuffix());
|
||||
convert.setStandFileClassify(field);
|
||||
convert.setConvertType(SarTypeEnum.BUSINESS.getValue());
|
||||
convertMq.sendMQ(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarLawsVal.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarLawsVal.entity.SarLawsVal;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarLawsVal|")
|
||||
@RequestMapping("/sarLawsVal/sar-laws-val")
|
||||
public class SarLawsValController extends BaseController<SarLawsVal> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.adc.da.slrs.sarLawsVal.dao;
|
||||
|
||||
import com.adc.da.slrs.sarLawsVal.entity.SarLawsVal;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Repository
|
||||
public interface SarLawsValDao extends BaseMapper<SarLawsVal> {
|
||||
|
||||
//通过标准id删除表中数据
|
||||
int deleteDataByStandId(String standId);
|
||||
|
||||
int insertForeach(List<SarLawsVal> list); //批量新增
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.adc.da.slrs.sarLawsVal.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarLawsVal对象", description="")
|
||||
public class SarLawsVal extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "法规ID")
|
||||
@TableField("LAWS_ID")
|
||||
private String lawsId;
|
||||
|
||||
@ApiModelProperty(value = "参数类型")
|
||||
@TableField("PROPERTY_TYPE")
|
||||
private String propertyType;
|
||||
|
||||
@ApiModelProperty(value = "参数内容")
|
||||
@TableField("PROPERTY_VAL")
|
||||
private String propertyVal;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarLawsVal.service;
|
||||
|
||||
import com.adc.da.slrs.sarLawsVal.entity.SarLawsVal;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
public interface ISarLawsValService extends IService<SarLawsVal> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarLawsVal.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarLawsVal.entity.SarLawsVal;
|
||||
import com.adc.da.slrs.sarLawsVal.dao.SarLawsValDao;
|
||||
import com.adc.da.slrs.sarLawsVal.service.ISarLawsValService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-28
|
||||
*/
|
||||
@Service
|
||||
public class SarLawsValServiceImpl extends ServiceImpl<SarLawsValDao, SarLawsVal> implements ISarLawsValService {
|
||||
|
||||
}
|
||||
+2
@@ -77,6 +77,8 @@ public class SarStandAttrDetailsController extends BaseController<SarStandAttrDe
|
||||
|
||||
|
||||
// 政策属性字段
|
||||
List<SarStandAttrDetails> getLawsStandList = InitStandAttrUtil.lawsStandAttrFieldList;
|
||||
resultMap.put(SarTypeEnum.LAWS_STAND.getValue(),getLawsStandList);
|
||||
List<SarStandAttrDetails> getInlandLawsList = InitStandAttrUtil.lawsInlandAttrFieldList;
|
||||
resultMap.put(SarTypeEnum.INLAND_LAWS.getValue(),getInlandLawsList);
|
||||
List<SarStandAttrDetails> getForeignLawsList = InitStandAttrUtil.lawsForeignAttrFieldList;
|
||||
|
||||
+1
@@ -66,6 +66,7 @@ public class SarStandAttrDetailsServiceImpl extends ServiceImpl<SarStandAttrDeta
|
||||
standTypeList.add(SarTypeEnum.INLAND_STAND.getValue());
|
||||
standTypeList.add(SarTypeEnum.FOREIGN_STAND.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.LAWS.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.LAWS_STAND.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.INLAND_LAWS.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.FOREIGN_LAWS.getValue());
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ public class FieldConvertUtil {
|
||||
"EOP实施日期(文本),责任部门,相关部门,SVPPS,FO,项目评估角色,法规维护人,代替标准编号," +
|
||||
"对应其他标准,文字描述,等效标准,引用标准,被引用标准,覆盖关系";
|
||||
|
||||
public static String exportBaseFieldNamesLaws = "政策编号,中文名称,英文名称," +
|
||||
"政策状态,适用区域,重要度,代替政策编号,发布日期";
|
||||
public static String exportBaseFieldNamesLaws = "政策分类,政策编号,中文名称,英文名称,政策文号,发文日期,发文单位,征集意见周期-起始时间,征集意见周期-结束时间,文本状态," +
|
||||
"适用区域,适用车型,是否纳入认证清单,年度,福田转发通知文号,信息简报,标签,备注";
|
||||
|
||||
public static String exportAttrFieldNamesLaws = "适用车辆类型,要求类型," +
|
||||
"个性化标签,政策文本,过程稿件,新车型实施日期(文本),在产车实施日期(文本),EOP实施日期(文本),SVPPS," +
|
||||
|
||||
@@ -41,9 +41,7 @@ public class InitStandAttrUtil implements ApplicationRunner {
|
||||
standTypeList.add(SarTypeEnum.STAND.getValue());
|
||||
standTypeList.add(SarTypeEnum.INLAND_STAND.getValue());
|
||||
standTypeList.add(SarTypeEnum.FOREIGN_STAND.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.LAWS.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.INLAND_LAWS.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.FOREIGN_LAWS.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.LAWS_STAND.getValue());
|
||||
standStateList.add("DRAFT");
|
||||
standStateList.add("ADVICE");
|
||||
standStateList.add("RADYSUBMIT");
|
||||
@@ -82,6 +80,7 @@ public class InitStandAttrUtil implements ApplicationRunner {
|
||||
public static List<String> numFieldListLaws = new ArrayList<>(); // 属性表数字类型字段
|
||||
public static List<SarStandAttrDetails> lawsInlandAttrFieldList = new ArrayList<>(); // 属性表数字类型字段
|
||||
public static List<SarStandAttrDetails> lawsForeignAttrFieldList = new ArrayList<>(); // 全部政策字段属性
|
||||
public static List<SarStandAttrDetails> lawsStandAttrFieldList = new ArrayList<>(); // 全部政策字段属性
|
||||
public static Map<String,String> selectFieldMapLaws = new HashMap<>(); // 下拉属性字段及选项值
|
||||
|
||||
// 企标属性字段信息
|
||||
@@ -141,12 +140,16 @@ public class InitStandAttrUtil implements ApplicationRunner {
|
||||
numFieldList.add(detailsEO.getAttrField());
|
||||
}
|
||||
} else if (lawsTypeList.contains(sarType)) {
|
||||
if (!SarTypeEnum.FOREIGN_LAWS.getValue().equals(sarType)) {
|
||||
lawsInlandAttrFieldList.add(detailsEO);
|
||||
}
|
||||
if (!SarTypeEnum.INLAND_LAWS.getValue().equals(sarType)) {
|
||||
if (SarTypeEnum.FOREIGN_LAWS.getValue().equals(sarType)) {
|
||||
lawsForeignAttrFieldList.add(detailsEO);
|
||||
}
|
||||
if (SarTypeEnum.LAWS_STAND.getValue().equals(sarType)) {
|
||||
lawsStandAttrFieldList.add(detailsEO);
|
||||
}
|
||||
|
||||
if (SarTypeEnum.INLAND_LAWS.getValue().equals(sarType)) {
|
||||
lawsInlandAttrFieldList.add(detailsEO);
|
||||
}
|
||||
fieldInfoBuilderLaws.append(detailsEO.getAttrField() + ",");
|
||||
fieldInfoNameBuilderLaws.append(detailsEO.getAttrName() + ",");
|
||||
queryFieldListLaws.add(detailsEO.getAttrField());
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.adc.da.utils.util;
|
||||
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 标准导出工具
|
||||
* date: 2020/9/16 14:09
|
||||
*/
|
||||
public class LawsStandExportUtil {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(LawsStandExportUtil.class);
|
||||
|
||||
|
||||
public static Workbook exportDatas (List<SarLawsStandInfo> datas) {
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
try {
|
||||
StringBuilder attrBud = new StringBuilder();
|
||||
List<SarStandAttrDetails> detailsEOList = InitStandAttrUtil.lawsStandAttrFieldList;
|
||||
Map<String,String> attrInfoMap = new HashMap<>();
|
||||
for (SarStandAttrDetails detailsEO : detailsEOList) {
|
||||
if (!InitStandAttrUtil.fileFieldListLaws.contains(detailsEO.getAttrField())) {
|
||||
attrBud.append(detailsEO.getAttrName() + ",");
|
||||
attrInfoMap.put(detailsEO.getAttrName(),detailsEO.getAttrField());
|
||||
}
|
||||
}
|
||||
String header = FieldConvertUtil.exportBaseFieldNamesLaws + "," + attrBud.toString();
|
||||
//创建工作表对象
|
||||
Sheet sheet = workbook.createSheet();
|
||||
// 创建头部
|
||||
createHeader(workbook,sheet,header);
|
||||
// 创建数据
|
||||
createDatas(workbook,sheet,datas,header,attrInfoMap);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
return workbook;
|
||||
}
|
||||
|
||||
public static void createHeader(Workbook workbook,Sheet sheet,String header){
|
||||
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
Row rowHeader = sheet.createRow(0);//开始创建标题行
|
||||
if (StringUtils.isNotBlank(header)) {
|
||||
String[] headerArr = header.split(",");
|
||||
for (int i=0;i < headerArr.length; i++) {
|
||||
rowHeader.createCell(i).setCellValue(headerArr[i]);
|
||||
// rowHeader.createCell(i).setCellStyle(cellStyle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void createDatas(Workbook workbook,Sheet sheet,List<SarLawsStandInfo> datas,
|
||||
String header,Map<String,String> attrInfoMap) throws Exception{
|
||||
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
if (datas != null && !datas.isEmpty()) {
|
||||
for (int i=0;i < datas.size(); i++) {
|
||||
SarLawsStandInfo sarStandardsInfoEO = datas.get(i);
|
||||
Row row = sheet.createRow(i+1);
|
||||
String[] headerArr = header.split(",");
|
||||
int sheetNum = 0;
|
||||
for (String headerName : headerArr) {
|
||||
String value = getValueByName(headerName,sarStandardsInfoEO,attrInfoMap);
|
||||
if (StringUtils.isBlank(value) || "null".equals(value)) {
|
||||
value = "";
|
||||
}
|
||||
row.createCell(sheetNum).setCellValue(value);
|
||||
sheetNum++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 根据表头返回相应值
|
||||
public static String getValueByName (String name,SarLawsStandInfo sarStandardsInfoEO,Map<String,String> attrInfoMap) throws Exception{
|
||||
String value = "";
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Map<String,Object> attrValueMap = sarStandardsInfoEO.getAttrInfoMap();
|
||||
switch (name) {
|
||||
case "政策分类":
|
||||
value = sarStandardsInfoEO.getLawsType();
|
||||
break;
|
||||
case "政策编号":
|
||||
value = sarStandardsInfoEO.getLawsNumber();
|
||||
break;
|
||||
case "中文名称":
|
||||
value = sarStandardsInfoEO.getLawsName();
|
||||
break;
|
||||
case "英文名称":
|
||||
value = sarStandardsInfoEO.getLawsEnName();
|
||||
break;
|
||||
case "政策文号":
|
||||
value = sarStandardsInfoEO.getLawsNo();
|
||||
break;
|
||||
case "发文日期":
|
||||
String issueTime="";
|
||||
if (Date.class.equals(sarStandardsInfoEO.getIssueTime())) {
|
||||
issueTime = sdf.format(sarStandardsInfoEO.getIssueTime());
|
||||
|
||||
}else {
|
||||
issueTime=sarStandardsInfoEO.getIssueTime();
|
||||
}
|
||||
value = issueTime;
|
||||
break;
|
||||
case "发文单位":
|
||||
value = sarStandardsInfoEO.getIssueCompany();
|
||||
break;
|
||||
case "征集意见周期-起始时间":
|
||||
String commentCycleStart="";
|
||||
if (Date.class.equals(sarStandardsInfoEO.getCommentCycleStart().getClass())){
|
||||
commentCycleStart = sdf.format(sarStandardsInfoEO.getCommentCycleStart());
|
||||
}else {
|
||||
commentCycleStart=sarStandardsInfoEO.getCommentCycleStart();
|
||||
}
|
||||
value = commentCycleStart;
|
||||
break;
|
||||
case "征集意见周期-结束时间":
|
||||
String commentCycleEnd="";
|
||||
if (Date.class.equals(sarStandardsInfoEO.getCommentCycleEnd().getClass())){
|
||||
commentCycleEnd = sdf.format(sarStandardsInfoEO.getCommentCycleEnd());
|
||||
}else {
|
||||
commentCycleEnd=sarStandardsInfoEO.getCommentCycleEnd();
|
||||
}
|
||||
value = commentCycleEnd;
|
||||
break;
|
||||
case "文本状态":
|
||||
value = sarStandardsInfoEO.getStandStatusShow();
|
||||
break;
|
||||
case "适用区域":
|
||||
value = sarStandardsInfoEO.getLawsSyqy();
|
||||
break;
|
||||
case "适用车型":
|
||||
value = sarStandardsInfoEO.getLawsSycx();
|
||||
break;
|
||||
case "是否纳入认证清单":
|
||||
value = sarStandardsInfoEO.getIsRelateAccess() != null ? (sarStandardsInfoEO.getIsRelateAccess().equals("1")?"是":"否"): "";
|
||||
break;
|
||||
case "年度":
|
||||
value = sarStandardsInfoEO.getLawsYear();
|
||||
break;
|
||||
case "福田转发通知文号":
|
||||
value = sarStandardsInfoEO.getLawsNotisyncNum();
|
||||
break;
|
||||
case "信息简报":
|
||||
value = sarStandardsInfoEO.getLawsBulletin();
|
||||
break;
|
||||
case "标签":
|
||||
value = sarStandardsInfoEO.getLawsLabel();
|
||||
break;
|
||||
case "备注":
|
||||
value = sarStandardsInfoEO.getLawsRemark();
|
||||
break;
|
||||
default:
|
||||
String field = attrInfoMap.get(name);
|
||||
if (attrValueMap != null) {
|
||||
value = String.valueOf(attrValueMap.get(field));
|
||||
}
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user