feat: 迁移国内标准法规部分6 详情 下载 标准查询
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
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.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
@@ -13,4 +16,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface SarLawsInfoDao extends BaseMapper<SarLawsInfo> {
|
||||
|
||||
List<SarLawsInfo> queryByPage(SarLawsInfoEOPage page);
|
||||
|
||||
Integer queryByCount(SarLawsInfoEOPage page);
|
||||
}
|
||||
|
||||
@@ -2,9 +2,18 @@ package com.adc.da.slrs.sarLawsInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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;
|
||||
@@ -61,7 +70,8 @@ public class SarLawsInfo extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
@TableField("PUT_TIME")
|
||||
private LocalDateTime putTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date putTime;
|
||||
|
||||
@ApiModelProperty(value = "代替文件号")
|
||||
@TableField("REPLACE_LAWS_NUM")
|
||||
@@ -80,15 +90,17 @@ public class SarLawsInfo extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private BigDecimal validFlag;
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
private LocalDateTime creationTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "内容摘要")
|
||||
@TableField("SYNOPSIS")
|
||||
@@ -106,5 +118,43 @@ public class SarLawsInfo extends BaseEntity {
|
||||
@TableField("IS_RELATE_ACCESS")
|
||||
private String isRelateAccess;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String menuId;
|
||||
@TableField(exist = false)
|
||||
private String stateName;
|
||||
@TableField(exist = false)
|
||||
private String countryName;
|
||||
@TableField(exist = false)
|
||||
private String propertyName;
|
||||
//记录收藏id
|
||||
@TableField(exist = false)
|
||||
private String collectId;
|
||||
//记录是否修改了替代文件号
|
||||
@TableField(exist = false)
|
||||
private int upReplaceNumFlag;
|
||||
//记录是否修改了文件号
|
||||
@TableField(exist = false)
|
||||
private int upNumFlag;
|
||||
//新增字段
|
||||
@TableField(exist = false)
|
||||
private String sychronId;
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoMap; //属性表字段与值
|
||||
@TableField(exist = false)
|
||||
private List<DicTypeEO> dicTypeList;
|
||||
@TableField(exist = false)
|
||||
private String sarLawsAttrEOStr; //新增修改时属性表信息
|
||||
@TableField(exist = false)
|
||||
private String fileIds; //全部文件ID
|
||||
@TableField(exist = false)
|
||||
private List<SarStandAttrDetails> attrInfoList = new ArrayList<>();
|
||||
@TableField(exist = false)
|
||||
private String accessCountry;//纳入清单的国家
|
||||
@TableField(exist = false)
|
||||
private String prcNum;//流程编号
|
||||
@TableField(exist = false)
|
||||
private String textStatus;//文本状态
|
||||
@TableField(exist = false)
|
||||
private String allPutTime;
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -1,10 +1,12 @@
|
||||
package com.adc.da.slrs.sarLawsInfo.service;
|
||||
|
||||
import com.adc.da.person.entity.PersonMsgEO;
|
||||
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
|
||||
import com.adc.da.slrs.sarLawsInfo.page.SarLawsInfoEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
@@ -15,5 +17,7 @@ import org.apache.poi.ss.usermodel.Row;
|
||||
*/
|
||||
public interface ISarLawsInfoService extends IService<SarLawsInfo> {
|
||||
|
||||
List<SarLawsInfo> getSarLawsForAct(SarLawsInfoEOPage page) throws Exception;
|
||||
|
||||
boolean isRowEmpty(Row row);
|
||||
}
|
||||
|
||||
+113
@@ -2,11 +2,19 @@ package com.adc.da.slrs.sarLawsInfo.service.impl;
|
||||
|
||||
import com.adc.da.common.SelectionTypeEnum;
|
||||
import com.adc.da.person.entity.PersonMsgEO;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.person.service.IPersonMsgEOService;
|
||||
import com.adc.da.slrs.sarLawsAttrInfo.dao.SarLawsAttrInfoDao;
|
||||
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
|
||||
import com.adc.da.slrs.sarLawsInfo.dao.SarLawsInfoDao;
|
||||
import com.adc.da.slrs.sarLawsInfo.page.SarLawsInfoEOPage;
|
||||
import com.adc.da.slrs.sarLawsInfo.service.ISarLawsInfoService;
|
||||
import com.adc.da.slrs.sarLawsItems.dao.SarLawsItemsDao;
|
||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.utils.util.ConcatStringUtil;
|
||||
import com.adc.da.utils.util.DateUtil;
|
||||
import com.adc.da.utils.util.FieldConvertUtil;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
@@ -35,6 +43,111 @@ public class SarLawsInfoServiceImpl extends ServiceImpl<SarLawsInfoDao, SarLawsI
|
||||
@Autowired
|
||||
private IPersonMsgEOService personMsgEOService;
|
||||
|
||||
@Autowired
|
||||
private IPersonCollectEOService personCollectEOService;
|
||||
|
||||
@Autowired
|
||||
private SysInfoEOService sysInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private SarLawsAttrInfoDao sarLawsAttrInfoEODao;
|
||||
|
||||
@Autowired
|
||||
private SarLawsItemsDao sarLawsItemsEODao;
|
||||
|
||||
public List<SarLawsInfo> getSarLawsForAct(SarLawsInfoEOPage page) throws Exception {
|
||||
Integer rowCount = dao.queryByCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarLawsInfo> sarlist = dao.queryByPage(page);
|
||||
attrInfo(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
public void attrInfo (List<SarLawsInfo> sarlist) throws Exception {
|
||||
for(SarLawsInfo row : sarlist){
|
||||
attrInfoDetails(row);
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetails (SarLawsInfo row) throws Exception {
|
||||
List<String> clobFieldList = InitStandAttrUtil.clobFieldListLaws;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldLaws;
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarLawsAttrInfoEODao.selectLawsFieldAndData(fieldInfo,row.getId());
|
||||
// Map<String, Object> getAttrMap = new HashMap<>();
|
||||
if (clobFieldList != null && !clobFieldList.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : clobFieldList) {
|
||||
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();
|
||||
if ("EOPSSRQ".equals(name)){
|
||||
if (entry.getValue() != null && entry.getValue().toString().length()>10){
|
||||
String time = DateUtil.formatStrUTCToDateStr(entry.getValue().toString());
|
||||
entry.setValue(time);
|
||||
}
|
||||
}
|
||||
if ("SVPPS".equals(name)) {
|
||||
Set<String> set = new HashSet();
|
||||
// 查询条款svpps
|
||||
Set<String> itemSvpps = sarLawsItemsEODao.selectSvppsByStandId(row.getId(),null,null);
|
||||
if (itemSvpps != null && !itemSvpps.isEmpty()) {
|
||||
set.addAll(itemSvpps);
|
||||
}
|
||||
Object value = entry.getValue();
|
||||
if (value != null && StringUtils.isNotBlank(value.toString())) {
|
||||
set.addAll(Arrays.asList(value.toString().split(",")));
|
||||
}
|
||||
String allVal = ConcatStringUtil.concatSet(set);
|
||||
if (StringUtils.isNotBlank(allVal)) {
|
||||
entry.setValue(allVal);
|
||||
value = sysInfoEOService.getSvppsNamesByIds(allVal);
|
||||
}
|
||||
newMap.put(name + "Name",value);
|
||||
} else if ("YQLX".equals(name)) {
|
||||
//要求类型来源于条款
|
||||
Set<String> itemClaimType = sarLawsItemsEODao.selectClaimTypesByStandId(row.getId(),null,null);
|
||||
if (itemClaimType != null && itemClaimType.size() > 1) {
|
||||
entry.setValue("RENVECPFGT");
|
||||
} else if (itemClaimType != null && itemClaimType.size() == 1) {
|
||||
entry.setValue(itemClaimType.toArray()[0]);
|
||||
}
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapLaws.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);
|
||||
} else {
|
||||
getAttrMap = new HashMap<>();
|
||||
for (String field : fieldInfo.split(",")) {
|
||||
getAttrMap.put(field,"");
|
||||
}
|
||||
}
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
//判断row是否为空 空返回true
|
||||
public boolean isRowEmpty(Row row) {
|
||||
if (null == row) {
|
||||
|
||||
Reference in New Issue
Block a user