feat: 迁移国内标准法规部分6 详情 下载 标准查询

This commit is contained in:
super_liu
2021-06-05 01:07:57 +08:00
parent 7ae47063b4
commit b8dc259f15
45 changed files with 3323 additions and 25 deletions
@@ -0,0 +1,23 @@
package com.adc.da.slrs.sarLawsAttrInfo.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.adc.da.slrs.sarLawsAttrInfo.entity.SarLawsAttrInfo;
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-06-04
*/
@RestController
@Api(description = "|SarLawsAttrInfo|")
@RequestMapping("/sarLawsAttrInfo/sar-laws-attr-info")
public class SarLawsAttrInfoController extends BaseController<SarLawsAttrInfo> {
}
@@ -0,0 +1,21 @@
package com.adc.da.slrs.sarLawsAttrInfo.dao;
import com.adc.da.slrs.sarLawsAttrInfo.entity.SarLawsAttrInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
/**
* <p>
* Mapper 接口
* </p>
*
* @author super_liu
* @since 2021-06-04
*/
public interface SarLawsAttrInfoDao extends BaseMapper<SarLawsAttrInfo> {
Map<String, Object> selectLawsFieldAndData(@Param("fieldInfo") String fieldInfo, @Param("standId") String standId);
}
@@ -0,0 +1,110 @@
package com.adc.da.slrs.sarLawsAttrInfo.entity;
import com.adc.da.base.entity.BaseEntity;
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-06-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="SarLawsAttrInfo对象", description="")
public class SarLawsAttrInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId("ID")
private String id;
@ApiModelProperty(value = "标准基础表主键")
@TableField("LAWS_ID")
private String lawsId;
@TableField("CREATION_USER")
private String creationUser;
@ApiModelProperty(value = "是否有效")
@TableField("VALID_FLAG")
private String validFlag;
@ApiModelProperty(value = "创建时间")
@TableField("CREATION_TIME")
private LocalDateTime creationTime;
@ApiModelProperty(value = "修改时间")
@TableField("MODIFY_TIME")
private LocalDateTime modifyTime;
@TableField("SYCLLX")
private String sycllx;
@TableField("SVPPS")
private String svpps;
@TableField("XCXSSRQ")
private String xcxssrq;
@TableField("ZCCSSRQ")
private String zccssrq;
@TableField("EOPSSRQ")
private String eopssrq;
@TableField("XGBM")
private String xgbm;
@TableField("ZRBM")
private String zrbm;
@TableField("FO")
private String fo;
@TableField("ZRLX")
private String zrlx;
@TableField("YQLX")
private String yqlx;
@TableField("GXHBQ")
private String gxhbq;
@TableField("ZCGCS")
private String zcgcs;
@TableField("GKGLBM")
private String gkglbm;
@TableField("FBJG")
private String fbjg;
@TableField("WSSFCY")
private String wssfcy;
@TableField("ZCWB")
private String zcwb;
@TableField("GCGJ")
private String gcgj;
@TableField("GLWJ")
private String glwj;
@TableField("XGLC")
private String xglc;
}
@@ -0,0 +1,16 @@
package com.adc.da.slrs.sarLawsAttrInfo.service;
import com.adc.da.slrs.sarLawsAttrInfo.entity.SarLawsAttrInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author super_liu
* @since 2021-06-04
*/
public interface ISarLawsAttrInfoService extends IService<SarLawsAttrInfo> {
}
@@ -0,0 +1,20 @@
package com.adc.da.slrs.sarLawsAttrInfo.service.impl;
import com.adc.da.slrs.sarLawsAttrInfo.entity.SarLawsAttrInfo;
import com.adc.da.slrs.sarLawsAttrInfo.dao.SarLawsAttrInfoDao;
import com.adc.da.slrs.sarLawsAttrInfo.service.ISarLawsAttrInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author super_liu
* @since 2021-06-04
*/
@Service
public class SarLawsAttrInfoServiceImpl extends ServiceImpl<SarLawsAttrInfoDao, SarLawsAttrInfo> implements ISarLawsAttrInfoService {
}
@@ -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;
}
@@ -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);
}
@@ -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) {
@@ -0,0 +1,23 @@
package com.adc.da.slrs.sarLawsItems.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.adc.da.slrs.sarLawsItems.entity.SarLawsItems;
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-06-02
*/
@RestController
@Api(description = "|SarLawsItems|")
@RequestMapping("/sarLawsItems/sar-laws-items")
public class SarLawsItemsController extends BaseController<SarLawsItems> {
}
@@ -0,0 +1,28 @@
package com.adc.da.slrs.sarLawsItems.dao;
import com.adc.da.slrs.sarLawsInfo.page.SarLawsItemsEOPage;
import com.adc.da.slrs.sarLawsItems.entity.SarLawsItems;
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* <p>
* Mapper 接口
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
public interface SarLawsItemsDao extends BaseMapper<SarLawsItems> {
Set<String> selectClaimTypesByStandId(@Param("standId") String standId, @Param("fileType") String fileType, @Param("idList") String[] idList);
Set<String> selectSvppsByStandId(@Param("standId") String standId, @Param("fileType") String fileType, @Param("idList") String[] idList);
List<SarLawsItems> queryByList(SarLawsItemsEOPage page);
}
@@ -0,0 +1,159 @@
package com.adc.da.slrs.sarLawsItems.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 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 io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="SarLawsItems对象", description="")
public class SarLawsItems 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("ITEMS_NUM")
private String itemsNum;
@ApiModelProperty(value = "条目内容")
@TableField("ITEMS_NAME")
private String itemsName;
@ApiModelProperty(value = "涉及零部件")
@TableField("PARTS")
private String parts;
@ApiModelProperty(value = "特殊生效时间")
@TableField("TACK_TIME")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date tackTime;
@ApiModelProperty(value = "适用车型")
@TableField("APPLY_ARCTIC")
private String applyArctic;
@ApiModelProperty(value = "能源类型")
@TableField("ENERGY_KIND")
private String energyKind;
@ApiModelProperty(value = "责任部门")
@TableField("RESPONSIBLE_UNIT")
private String responsibleUnit;
@ApiModelProperty(value = "备注")
@TableField("REMARKS")
private String remarks;
@ApiModelProperty(value = "是否有效")
@TableField("VALID_FLAG")
private Integer validFlag;
@TableField("CREATION_USER")
private String creationUser;
@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 = "实施要点")
@TableField("MAINPOINTS_IMPEMENTATION")
private String mainpointsImpementation;
@ApiModelProperty(value = "条款要求")
@TableField("TERMS_CONDITIONS")
private String termsConditions;
@ApiModelProperty(value = "FO")
@TableField("FO")
private String fo;
@ApiModelProperty(value = "责任工程师")
@TableField("DUTY_ENGINEER")
private String dutyEngineer;
@ApiModelProperty(value = "SVPPS")
@TableField("SVPPS")
private String svpps;
@ApiModelProperty(value = "要求类型")
@TableField("CLAIM_TYPE")
private String claimType;
@ApiModelProperty(value = "企标覆盖关系")
@TableField("BUS_STAND_COVER")
private String busStandCover;
@ApiModelProperty(value = "文件类型")
@TableField("FILE_TYPE")
private String fileType;
@TableField(exist = false)
private String applyArcticShow;
@TableField(exist = false)
private String energyKindShow;
@TableField(exist = false)
private String responsibleUnitShow;
@TableField(exist = false)
private String mainPointImplementation; //实施要点
//新加字段带show
@TableField(exist = false)
private String foShow;//FO
@TableField(exist = false)
private String dutyEngineerShow;//责任工程师
@TableField(exist = false)
private String svppsShow;//SVPPS
@TableField(exist = false)
private String claimTypeShow;//要求类型
@TableField(exist = false)
private String busStandCoverShow;//企标覆盖关系
@TableField(exist = false)
private String fileTypeShow;//文件类型
@TableField(exist = false)
private String jspg;//评估状态
@TableField(exist = false)
private List<String> idList;
@TableField(exist = false)
private String itemState;//条款状态
@TableField(exist = false)
private String isInvolveAccess;
@TableField(exist = false)
private String wczrsh;
}
@@ -0,0 +1,21 @@
package com.adc.da.slrs.sarLawsItems.service;
import com.adc.da.slrs.sarLawsInfo.page.SarLawsItemsEOPage;
import com.adc.da.slrs.sarLawsItems.entity.SarLawsItems;
import com.adc.da.slrs.sarStandardsInfo.entity.ActSarItemsEO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 服务类
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
public interface ISarLawsItemsService extends IService<SarLawsItems> {
List<ActSarItemsEO> queryItemsByList(SarLawsItemsEOPage page, String resType);
}
@@ -0,0 +1,58 @@
package com.adc.da.slrs.sarLawsItems.service.impl;
import com.adc.da.slrs.sarLawsInfo.page.SarLawsItemsEOPage;
import com.adc.da.slrs.sarLawsItems.entity.SarLawsItems;
import com.adc.da.slrs.sarLawsItems.dao.SarLawsItemsDao;
import com.adc.da.slrs.sarLawsItems.service.ISarLawsItemsService;
import com.adc.da.slrs.sarStandardsInfo.entity.ActSarItemsEO;
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 服务实现类
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
@Service
public class SarLawsItemsServiceImpl extends ServiceImpl<SarLawsItemsDao, SarLawsItems> implements ISarLawsItemsService {
@Autowired
private SarLawsItemsDao dao;
@Autowired
private SysInfoEOService sysInfoEOService;
public List<ActSarItemsEO> queryItemsByList(SarLawsItemsEOPage page, String resType){
List<SarLawsItems> itemsEOList = dao.queryByList(page);
List<ActSarItemsEO> actitemsEOList = new ArrayList<>();
if (itemsEOList != null && !itemsEOList.isEmpty()) {
for (SarLawsItems itemsEO : itemsEOList) {
ActSarItemsEO actSarItemsEO = new ActSarItemsEO();
actSarItemsEO.setResId(itemsEO.getId());
actSarItemsEO.setResNum(itemsEO.getItemsNum());
actSarItemsEO.setResType(resType);
actSarItemsEO.setResName(itemsEO.getItemsName());
actSarItemsEO.setDeptName(itemsEO.getResponsibleUnit());
actSarItemsEO.setOrgName(itemsEO.getResponsibleUnitShow());
actSarItemsEO.setFoId(itemsEO.getFo());
String foShow = sysInfoEOService.getRoleNamesByIds(itemsEO.getFo());
actSarItemsEO.setFoName(foShow);
actSarItemsEO.setTermsConditions(itemsEO.getTermsConditions());
actSarItemsEO.setResState(itemsEO.getItemState());
actSarItemsEO.setRoleId(itemsEO.getDutyEngineer());
String dutyShow = sysInfoEOService.getRoleNamesByIds(itemsEO.getDutyEngineer());
actSarItemsEO.setRoleName(dutyShow);
actitemsEOList.add(actSarItemsEO);
}
}
return actitemsEOList;
}
}
@@ -0,0 +1,23 @@
package com.adc.da.slrs.sarProductStand.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.adc.da.slrs.sarProductStand.entity.SarProductStand;
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-06-02
*/
@RestController
@Api(description = "|SarProductStand|")
@RequestMapping("/sarProductStand/sar-product-stand")
public class SarProductStandController extends BaseController<SarProductStand> {
}
@@ -0,0 +1,23 @@
package com.adc.da.slrs.sarProductStand.dao;
import com.adc.da.slrs.sarProductStand.entity.SarProductStand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* <p>
* 产品标准关联表 Mapper 接口
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
public interface SarProductStandDao extends BaseMapper<SarProductStand> {
Map<String,Object> queryStandSarState(String standId);
List<Map<String,Object>> queryStandSarStateNew(@Param("standId") String standId, @Param("productId") String productId);
}
@@ -0,0 +1,135 @@
package com.adc.da.slrs.sarProductStand.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 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-06-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="SarProductStand对象", description="产品标准关联表")
public class SarProductStand extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键ID")
@TableId("ID")
private String id;
@ApiModelProperty(value = "产品ID")
@TableField("PRODUCT_ID")
private String productId;
@ApiModelProperty(value = "标准分类")
@TableField("STAND_TYPE")
private String standType;
@ApiModelProperty(value = "标准ID")
@TableField("STAND_ID")
private String standId;
@TableField("CREATION_USER")
private String creationUser;
@ApiModelProperty(value = "是否有效")
@TableField("VALID_FLAG")
private Integer validFlag;
@ApiModelProperty(value = "创建时间")
@TableField("CREATION_TIME")
private Date creationTime;
@TableField("MODIFY_TIME")
private Date modifyTime;
@ApiModelProperty(value = "标准/法规符合性状态(0不涉及1待确认2符合3不符合4部分符合8未评估)")
@TableField("SAR_STATE")
private Integer sarState;
@ApiModelProperty(value = "清单类型(first研发合规,second认证合规)")
@TableField("ACCESS_TYPE")
private String accessType;
@ApiModelProperty(value = "关联公告车型号")
@TableField("CAR_MODEL")
private String carModel;
@ApiModelProperty(value = "关联清单id")
@TableField("RELATE_ACCESS_ID")
private String relateAccessId;
@ApiModelProperty(value = "是否纳入开发")
@TableField("IS_DEVELOP")
private String isDevelop;
@ApiModelProperty(value = "流程状态")
@TableField("ACT_STATE")
private String actState;
@ApiModelProperty(value = "分级颜色")
@TableField("COLOR")
private String color;
@ApiModelProperty(value = "不符合内容")
@TableField("NON_CONFOMITY")
private String nonConfomity;
@ApiModelProperty(value = "我司现状")
@TableField("CURRENT")
private String current;
@ApiModelProperty(value = "更改方案")
@TableField("CHANGE_SCHEME")
private String changeScheme;
@ApiModelProperty(value = "预估更改周期")
@TableField("ESTIMATED_CHANGE_CYCLE")
private String estimatedChangeCycle;
@ApiModelProperty(value = "预估成本")
@TableField("ESTIMATED_COST")
private String estimatedCost;
@ApiModelProperty(value = "风险点")
@TableField("RISK_POINT")
private String riskPoint;
@ApiModelProperty(value = "验证方案")
@TableField("VERIFICATION_SCHEME")
private String verificationScheme;
@ApiModelProperty(value = "符合理由")
@TableField("JUSTIFIED")
private String justified;
@ApiModelProperty(value = "评估人员")
@TableField("COMP_PERSON")
private String compPerson;
@ApiModelProperty(value = "评估时间")
@TableField("COMP_TIME")
private Date compTime;
@ApiModelProperty(value = "流程编号")
@TableField("PRC_NUM")
private String prcNum;
}
@@ -0,0 +1,16 @@
package com.adc.da.slrs.sarProductStand.service;
import com.adc.da.slrs.sarProductStand.entity.SarProductStand;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 产品标准关联表 服务类
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
public interface ISarProductStandService extends IService<SarProductStand> {
}
@@ -0,0 +1,20 @@
package com.adc.da.slrs.sarProductStand.service.impl;
import com.adc.da.slrs.sarProductStand.entity.SarProductStand;
import com.adc.da.slrs.sarProductStand.dao.SarProductStandDao;
import com.adc.da.slrs.sarProductStand.service.ISarProductStandService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 产品标准关联表 服务实现类
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
@Service
public class SarProductStandServiceImpl extends ServiceImpl<SarProductStandDao, SarProductStand> implements ISarProductStandService {
}
@@ -0,0 +1,23 @@
package com.adc.da.slrs.sarSarAccess.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.adc.da.slrs.sarSarAccess.entity.SarSarAccess;
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-06-02
*/
@RestController
@Api(description = "|SarSarAccess|")
@RequestMapping("/sarSarAccess/sar-sar-access")
public class SarSarAccessController extends BaseController<SarSarAccess> {
}
@@ -0,0 +1,20 @@
package com.adc.da.slrs.sarSarAccess.dao;
import com.adc.da.slrs.sarSarAccess.entity.SarSarAccess;
import com.adc.da.slrs.sarSarAccess.page.SarSarAccessEOPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/**
* <p>
* 标准法规准入清单信息表 Mapper 接口
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
public interface SarSarAccessDao extends BaseMapper<SarSarAccess> {
List<SarSarAccess> selectAccessByRes(SarSarAccessEOPage page);
}
@@ -0,0 +1,110 @@
package com.adc.da.slrs.sarSarAccess.entity;
import com.adc.da.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
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;
import org.springframework.data.annotation.Transient;
/**
* <p>
* 标准法规准入清单信息表
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="SarSarAccess对象", description="标准法规准入清单信息表")
public class SarSarAccess extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId("ID")
private String id;
@ApiModelProperty(value = "国家地区")
@TableField("COUNTRY")
private String country;
@ApiModelProperty(value = "准入信息")
@TableField("ACCESS_CONTENT")
private String accessContent;
@ApiModelProperty(value = "是否有效")
@TableField("VALID_FLAG")
private Integer validFlag;
@TableField("CREATION_USER")
private String creationUser;
@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;
@TableField("APPLY_ARCTIC")
private String applyArctic;
@TableField("ENERGY_KIND")
private String energyKind;
@ApiModelProperty(value = "标准法规清单类型")
@TableField("TYPE")
private String type;
@ApiModelProperty(value = "文本说明")
@TableField("REMARK")
private String remark;
@ApiModelProperty(value = "附件")
@TableField("RELATE_FILE")
private String relateFile;
@ApiModelProperty(value = "状态(1未发布,2已发布)")
@TableField("STATE")
private String state;
@ApiModelProperty(value = "版本号")
@TableField("VERSION")
private Integer version;
@Transient
private String uname;
@Transient
private String countryShow;
/**
* 技术要求清单
*/
@Transient
private String inforlist;
/**
* 行政要求清单
*/
@Transient
private String adminInfoList;
@Transient
private String energyKindShow;
@Transient
private String applyArcticShow;
}
@@ -0,0 +1,51 @@
package com.adc.da.slrs.sarSarAccess.page;
import com.adc.da.base.page.BasePage;
import lombok.Data;
/**
* <b>功能:</b>SAR_SAR_ACCESS SarSarAccessEOPage<br>
* <b>作者:</b>code generator<br>
* <b>日期:</b> 2018-09-03 <br>
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
*/
@Data
public class SarSarAccessEOPage extends BasePage {
private String modifyTime;
private String modifyTime1;
private String modifyTime2;
private String modifyTimeOperator = "LIKE";
private String creationTime;
private String creationTime1;
private String creationTime2;
private String creationTimeOperator = "LIKE";
private String creationUser;
private String creationUserOperator = "LIKE";
private String validFlag;
private String validFlagOperator = "LIKE";
private String accessContent;
private String accessContentOperator = "LIKE";
private String country;
private String countryOperator = "LIKE";
private String id;
private String idOperator = "LIKE";
private String applyArctic;
private String energyKind;
private String type;
private String resId;
private String sarType;
private String state;
//高级检索
private String advanceSearchVOStr;
private String advanceSearchStr;
private String keywords;
private String accessSarType;
private String shunxu;
private String sql;
}
@@ -0,0 +1,19 @@
package com.adc.da.slrs.sarSarAccess.service;
import com.adc.da.slrs.sarSarAccess.entity.SarSarAccess;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 标准法规准入清单信息表 服务类
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
public interface ISarSarAccessService extends IService<SarSarAccess> {
String getCountryByRes(String resId, String sarType) throws Exception;
}
@@ -0,0 +1,87 @@
package com.adc.da.slrs.sarSarAccess.service.impl;
import com.adc.da.slrs.sarSarAccess.entity.SarSarAccess;
import com.adc.da.slrs.sarSarAccess.dao.SarSarAccessDao;
import com.adc.da.slrs.sarSarAccess.page.SarSarAccessEOPage;
import com.adc.da.slrs.sarSarAccess.service.ISarSarAccessService;
import com.adc.da.sys.entity.DicTypeEO;
import com.adc.da.sys.page.DicTypeEOPage;
import com.adc.da.sys.service.IDicTypeEOService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* <p>
* 标准法规准入清单信息表 服务实现类
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
@Service
public class SarSarAccessServiceImpl extends ServiceImpl<SarSarAccessDao, SarSarAccess> implements ISarSarAccessService {
@Autowired
private IDicTypeEOService dicTypeEOService;
@Autowired
private SarSarAccessDao dao;
public SarSarAccessDao getDao() {
return dao;
}
public String getCountryByRes(String resId,String sarType) throws Exception{
String countryNames = "";
Set<String> countrySet = new HashSet<>();
SarSarAccessEOPage page = new SarSarAccessEOPage();
page.setResId(resId);
page.setSarType(sarType);
List<SarSarAccess> getAccessList = selectAccessByRes(page);
if (getAccessList != null && !getAccessList.isEmpty()) {
for (SarSarAccess sarSarAccessEO : getAccessList) {
if (org.apache.commons.lang.StringUtils.isNotBlank(sarSarAccessEO.getCountryShow())) {
List<String> countryArr = Arrays.asList(sarSarAccessEO.getCountryShow().split(","));
countrySet.addAll(countryArr);
}
}
}
if (countrySet != null && !countrySet.isEmpty()) {
for (String set : countrySet) {
countryNames += set + ",";
}
countryNames = countryNames.substring(0,countryNames.length()-1);
}
return countryNames;
}
public List<SarSarAccess> selectAccessByRes(SarSarAccessEOPage page) throws Exception{
List<SarSarAccess> getList = dao.selectAccessByRes(page);
if (getList != null && !getList.isEmpty()) {
for (SarSarAccess sarSarAccessEO : getList) {
if(org.apache.commons.lang.StringUtils.isNotEmpty(sarSarAccessEO.getCountry())){
String countryShow = "";
String[] countryCodes = sarSarAccessEO.getCountry().split(",");
for(int index =0; index<countryCodes.length;index++){
DicTypeEOPage dicTypeEOPage = new DicTypeEOPage();
dicTypeEOPage.setDicId("RFRFRFSCXVB");//国家地区
dicTypeEOPage.setDicTypeCode(countryCodes[index]);
List<DicTypeEO> dicList = dicTypeEOService.queryByList(dicTypeEOPage);
if (dicList!= null && !dicList.isEmpty()) {
countryShow += dicList.get(0).getDicTypeName()+",";
}
}
sarSarAccessEO.setCountryShow(countryShow);
}
}
}
return getList;
}
}
@@ -0,0 +1,23 @@
package com.adc.da.slrs.sarSarAccessInfo.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.adc.da.slrs.sarSarAccessInfo.entity.SarSarAccessInfo;
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-06-02
*/
@RestController
@Api(description = "|SarSarAccessInfo|")
@RequestMapping("/sarSarAccessInfo/sar-sar-access-info")
public class SarSarAccessInfoController extends BaseController<SarSarAccessInfo> {
}
@@ -0,0 +1,20 @@
package com.adc.da.slrs.sarSarAccessInfo.dao;
import com.adc.da.slrs.sarSarAccessInfo.entity.SarSarAccessInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
/**
* <p>
* 标准法规准入清单详情表 Mapper 接口
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
public interface SarSarAccessInfoDao extends BaseMapper<SarSarAccessInfo> {
Map selectProTimeInfoByStandIdAndAccId(@Param("standId")String standId, @Param("accId")String accId);
}
@@ -0,0 +1,122 @@
package com.adc.da.slrs.sarSarAccessInfo.entity;
import com.adc.da.base.entity.BaseEntity;
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-06-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="SarSarAccessInfo对象", description="标准法规准入清单详情表")
public class SarSarAccessInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId("ID")
private String id;
@ApiModelProperty(value = "准入信息ID")
@TableField("ACCESS_ID")
private String accessId;
@ApiModelProperty(value = "标准法规类型")
@TableField("SAR_TYPE")
private String sarType;
@ApiModelProperty(value = "资源ID")
@TableField("RES_ID")
private String resId;
@ApiModelProperty(value = "排序序号")
@TableField("DISPLAY_SEQ")
private Integer displaySeq;
@ApiModelProperty(value = "是否有效")
@TableField("VALID_FLAG")
private Boolean validFlag;
@ApiModelProperty(value = "创建时间")
@TableField("CREATION_TIME")
private LocalDateTime creationTime;
@ApiModelProperty(value = "修改时间")
@TableField("MODIFY_TIME")
private LocalDateTime modifyTime;
@ApiModelProperty(value = "清单标准类型(SKILL技术要求,ADMIN行政要求)")
@TableField("ACCESS_SAR_TYPE")
private String accessSarType;
@ApiModelProperty(value = "实施说明")
@TableField("PERFORM_INFO")
private String performInfo;
@ApiModelProperty(value = "要求性质")
@TableField("ASK_NATURE")
private String askNature;
@ApiModelProperty(value = "准入类型")
@TableField("ACCESS_TYPE")
private String accessType;
@ApiModelProperty(value = "认证交付物")
@TableField("AUTH_DELIVE")
private String authDelive;
@ApiModelProperty(value = "认证对象")
@TableField("AUTH_OBJ_ID")
private String authObjId;
@ApiModelProperty(value = "认证责任部门")
@TableField("AUTH_DEPART_ID")
private String authDepartId;
@ApiModelProperty(value = "新车型实施日期")
@TableField("NEW_PUT_TIME")
private String newPutTime;
@ApiModelProperty(value = "在产车实施日期")
@TableField("PROD_PUT_TIME")
private String prodPutTime;
@ApiModelProperty(value = "EOP车型实施日期")
@TableField("EOP_PUT_TIME")
private String eopPutTime;
@ApiModelProperty(value = "新车型实施日期-文本")
@TableField("NEW_PUT_TEXT_TIME")
private String newPutTextTime;
@ApiModelProperty(value = "在产车实施日期-文本")
@TableField("PROD_PUT_TEXT_TIME")
private String prodPutTextTime;
@ApiModelProperty(value = "EOP车型实施日期-文本")
@TableField("EOP_PUT_TEXT_TIME")
private String eopPutTextTime;
@ApiModelProperty(value = "标准\\政策编号")
@TableField("STAND_CODE")
private String standCode;
@ApiModelProperty(value = "合规性分级颜色")
@TableField("COLOR")
private String color;
}
@@ -0,0 +1,16 @@
package com.adc.da.slrs.sarSarAccessInfo.service;
import com.adc.da.slrs.sarSarAccessInfo.entity.SarSarAccessInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 标准法规准入清单详情表 服务类
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
public interface ISarSarAccessInfoService extends IService<SarSarAccessInfo> {
}
@@ -0,0 +1,20 @@
package com.adc.da.slrs.sarSarAccessInfo.service.impl;
import com.adc.da.slrs.sarSarAccessInfo.entity.SarSarAccessInfo;
import com.adc.da.slrs.sarSarAccessInfo.dao.SarSarAccessInfoDao;
import com.adc.da.slrs.sarSarAccessInfo.service.ISarSarAccessInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 标准法规准入清单详情表 服务实现类
* </p>
*
* @author super_liu
* @since 2021-06-02
*/
@Service
public class SarSarAccessInfoServiceImpl extends ServiceImpl<SarSarAccessInfoDao, SarSarAccessInfo> implements ISarSarAccessInfoService {
}
@@ -3,7 +3,11 @@ package com.adc.da.slrs.sarStandItems.entity;
import com.adc.da.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
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;
@@ -48,7 +52,8 @@ public class SarStandItems extends BaseEntity {
@ApiModelProperty(value = "特殊生效时间")
@TableField("TACK_TIME")
private LocalDateTime tackTime;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
private Date tackTime;
@ApiModelProperty(value = "适用车型")
@TableField("APPLY_ARCTIC")
@@ -68,18 +73,20 @@ public class SarStandItems extends BaseEntity {
@ApiModelProperty(value = "是否有效")
@TableField("VALID_FLAG")
private Boolean validFlag;
private Integer validFlag;
@TableField("CREATION_USER")
private String creationUser;
@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("TERMS_CONDITIONS")
@@ -113,5 +120,38 @@ public class SarStandItems extends BaseEntity {
@TableField("FILE_TYPE")
private String fileType;
@TableField(exist = false)
private String emergyKindShow;
@TableField(exist = false)
private String applyArcticShow;
@TableField(exist = false)
private String responsibleUnitShow;
@TableField(exist = false)
private String mainPointImplementation; //实施要点
//新加字段
@TableField(exist = false)
private String foUser;//FO
//新加字段带show
@TableField(exist = false)
private String foShow;//FO
@TableField(exist = false)
private String dutyEngineerShow;//责任工程师
@TableField(exist = false)
private String svppsShow;//SVPPS
@TableField(exist = false)
private String claimTypeShow;//要求类型
@TableField(exist = false)
private String busStandCoverShow;//企标覆盖关系
@TableField(exist = false)
private String fileTypeShow;//文件类型
@TableField(exist = false)
private String itemState;//条款状态
@TableField(exist = false)
private List<String> idList;
@TableField(exist = false)
private String oldId;
@TableField(exist = false)
private String jspg;
}
@@ -1,8 +1,13 @@
package com.adc.da.slrs.sarStandItems.service;
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
import com.adc.da.slrs.sarStandardsInfo.entity.ActSarItemsEO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 服务类
@@ -13,4 +18,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface ISarStandItemsService extends IService<SarStandItems> {
List<ActSarItemsEO> queryItemsByList(SarStandItemsEOPage page, String resType);
}
@@ -2,10 +2,17 @@ package com.adc.da.slrs.sarStandItems.service.impl;
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
import com.adc.da.slrs.sarStandItems.service.ISarStandItemsService;
import com.adc.da.slrs.sarStandardsInfo.entity.ActSarItemsEO;
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 服务实现类
@@ -17,4 +24,36 @@ import org.springframework.stereotype.Service;
@Service
public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarStandItems> implements ISarStandItemsService {
@Autowired
private SarStandItemsDao dao;
@Autowired
private SysInfoEOService sysInfoEOService;
public List<ActSarItemsEO> queryItemsByList(SarStandItemsEOPage page, String resType){
List<SarStandItems> itemsEOList = dao.queryItemsByList(page);
List<ActSarItemsEO> actitemsEOList = new ArrayList<>();
if (itemsEOList != null && !itemsEOList.isEmpty()) {
for (SarStandItems itemsEO : itemsEOList) {
ActSarItemsEO actSarItemsEO = new ActSarItemsEO();
actSarItemsEO.setResId(itemsEO.getId());
actSarItemsEO.setResNum(itemsEO.getItemsNum());
actSarItemsEO.setResType(resType);
actSarItemsEO.setResName(itemsEO.getItemsName());
actSarItemsEO.setDeptName(itemsEO.getResponsibleUnit());
actSarItemsEO.setOrgName(itemsEO.getResponsibleUnitShow());
actSarItemsEO.setFoId(itemsEO.getFo());
String foShow = sysInfoEOService.getRoleNamesByIds(itemsEO.getFo());
actSarItemsEO.setFoName(foShow);
actSarItemsEO.setTermsConditions(itemsEO.getTermsConditions());
actSarItemsEO.setResState(itemsEO.getItemState());
actSarItemsEO.setRoleId(itemsEO.getDutyEngineer());
String dutyShow = sysInfoEOService.getRoleNamesByIds(itemsEO.getDutyEngineer());
actSarItemsEO.setRoleName(dutyShow);
actitemsEOList.add(actSarItemsEO);
}
}
return actitemsEOList;
}
}
@@ -407,4 +407,136 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
}
}
@ApiOperation(value = "|SarStandardsInfoEO|详情")
@GetMapping("/getStandInfoById")
//@RequiresPermissions("lawss:sarStandardsInfo:get")
public ResponseMessage<SarStandardsInfo> find(String id) throws Exception {
SarStandardsInfo result = sarStandardsInfoEOService.selectStandardsInfoByKey(id);
return Result.success(result);
}
@ApiOperation(value = "|SarStandardsInfoEO|确认配置标准")
@PostMapping("/saveStandardsMenu")
//@RequiresPermissions("lawss:sarStandardsInfo:saveStandardsMenu")
public ResponseMessage saveStandardsMenu(@RequestBody SarStandardsInfoEOPage standardsInfoEO) throws Exception {
if ("wdsc".equals(standardsInfoEO.getMenuId()) || "gxhbq".equals(standardsInfoEO.getMenuId())) {
return Result.error("所选节点不支持配置标准");
} else {
boolean flag = false;
try {
flag = sarStandardsInfoEOService.updateStandardsMenu(standardsInfoEO);
}catch (NullPointerException e){
flag = sarStandardsInfoEOService.updateStandInfo(standardsInfoEO);
}
if (flag){
return Result.success("200","配置成功",true);
}
return Result.error("-1","配置失败");
}
}
@ApiOperation(value = "|SarStandardsInfoEO|详情页面查询相近标准")
@GetMapping("/selectCloseStand")
//@RequiresPermissions("lawss:sarStandardsInfo:list")
public ResponseMessage<List<RecommendVO>> selectCloseStand(SarStandardsInfoEOPage page) throws Exception {
SarStandardsInfoEOPage pagenew = new SarStandardsInfoEOPage();
// 展示与本标准相近的标准信息,标准类别、标准号、标准年份、标准名称)
if (StringUtils.isNotEmpty(page.getId())) {
SarStandardsInfo sarStandardsInfoEO = sarStandardsInfoEOService.getById(page.getId());
if (StringUtils.isNotEmpty(sarStandardsInfoEO.getStandSort())) {
pagenew.setStandSort(sarStandardsInfoEO.getStandSort());
}
if (StringUtils.isNotEmpty(sarStandardsInfoEO.getStandNumber())) {
pagenew.setStandNumber(sarStandardsInfoEO.getStandNumber());
}
if (StringUtils.isNotEmpty(sarStandardsInfoEO.getStandYear())) {
pagenew.setStandYear(sarStandardsInfoEO.getStandYear());
}
if (StringUtils.isNotEmpty(sarStandardsInfoEO.getStandName())) {
pagenew.setStandName(sarStandardsInfoEO.getStandName());
}
pagenew.setId(page.getId());
}
List<RecommendVO> resultlist = sarStandardsInfoEOService.selectRecommendStand(pagenew);
return Result.success(resultlist);
}
@ApiOperation(value = "|SysCorpEO|模板下载")
@GetMapping(value = "/exportTemplate")
public void exportTemplate(String exportName, String standType,HttpServletResponse response, HttpServletRequest request) throws Exception {
OutputStream os = null;
OutputStream excelOS = null;
HSSFWorkbook workbook = new HSSFWorkbook();
String fileOriName = "标准导入模板";
if (StringUtils.isNotEmpty(exportName)) {
fileOriName = exportName;
}
try{
//创建临时文件夹
String fileNowPath = filePath + "/tempZip/" + UUIDUtils.randomUUID20() + "/" + fileOriName;
File nowFile = new File(fileNowPath);
if (nowFile.exists()){
nowFile.delete();
}
nowFile.mkdirs();
String fileName = "导入模板.xls";
HSSFSheet sheetItems = workbook.createSheet("模板");
sheetItems.setDefaultColumnWidth(16);
HSSFCellStyle cellStyle =workbook.createCellStyle();
cellStyle.setWrapText(true);
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
Row rowHeader = sheetItems.createRow(0);//开始创建标题行
String exportFieldName = FieldConvertUtil.exportBaseFieldNames + "," + FieldConvertUtil.exportAttrFieldNamesInland;
if ("FOREIGN".equals(standType)) {
exportFieldName = FieldConvertUtil.exportBaseFieldNamesForeign + "," + FieldConvertUtil.exportAttrFieldNamesForeign;
}
if (StringUtils.isNotBlank(exportFieldName)) {
String[] headerArr = exportFieldName.split(",");
for (int i=0;i < headerArr.length; i++) {
rowHeader.createCell(i).setCellValue(headerArr[i]);
// rowHeader.createCell(i).setCellStyle(cellStyle);
}
}
String repFileName = fileName.replaceAll("/","_");
excelOS = new FileOutputStream(fileNowPath + "/" + repFileName);
response.setHeader("Content-Disposition",
"attachment; filename=\""+ ReadExcel.encodeFileName(fileOriName+".zip", request) +"\"");
response.setContentType("application/force-download");
response.flushBuffer();
os = response.getOutputStream();
workbook.write(excelOS);
excelOS.flush();
excelOS.close();
ZipUtil.zip(fileNowPath,fileNowPath+".zip");
FileInputStream fis = new FileInputStream(fileNowPath+".zip");
int len = 0;
while ((len = fis.read()) != -1) {
os.write(len);
}
os.flush();
os.close(); // 后开先关
fis.close(); // 先开后关
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw new AdcDaBaseException("下载文件失败,请重试");
} finally {
IOUtils.closeQuietly(os);
IOUtils.closeQuietly(excelOS);
}
}
@ApiOperation(value = "|SarStandardsInfoEO|查询标准极其条款")
@GetMapping("/getSarStandAndItems")
//@RequiresPermissions("lawss:sarStandardsInfo:getSarStandardsInfoPage")
public ResponseMessage<List<ActSarItemsEO>> getSarStandAndItems(SarStandardsInfoEOPage page) throws Exception {
if (StringUtils.isNotBlank(page.getIds())) {
List<ActSarItemsEO> standList = sarStandardsInfoEOService.getStandAndItemsForAct(page);
return Result.success(standList);
} else {
return Result.error("传入id不能为空");
}
}
}
@@ -0,0 +1,398 @@
package com.adc.da.slrs.sarStandardsInfo.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* @Author yangxuenan
* @Description 工作流使用
* Date 2018/10/23 14:29
* @Param
* @return
**/
public class ActSarItemsEO {
private String resId;// 标准法规ID
private String resFlag; //类型
private String resNum; //标准,文件号
private String resName; //标准,文件名称
private String resType; //标准类型
private String deptName; //部门id
private String orgName; // 责任部门名称
private String parentId; //仅条目有
private String userId; //评估人ID
private List<ActSarItemsEO> itemsList; //条目信息
private String accessId; //导入时查询
private String applyArctic;
private String[] applyArcticList;
private String energyKind;
private String[] energyKindList;
private String mainPointImplementation;
private String termsConditions;
private String parts;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date tackTime;
private String applyArcticShow;
private String energyKindShow;
private String remarks;
private String resState; //标准状态
private String fileState; //文本状态
private String type; //符合性状态
private String prcNum;
private String foId;
private String foName;
private String form;
private String roleId;
private String roleName;
//流程分页用
private Integer startIndex;
private Integer endIndex;
private Integer pageSize;
private Integer nowPage;
private Map<String, Object> attrInfoMap = new LinkedHashMap<>(); //属性表字段与值
private String sarState;
private String newPutText;
private String prodPutText;
private String authObj;
private String authDelive;
private String performInfo;
public String getResId() {
return resId;
}
public void setResId(String resId) {
this.resId = resId;
}
public String getResFlag() {
return resFlag;
}
public void setResFlag(String resFlag) {
this.resFlag = resFlag;
}
public String getResNum() {
return resNum;
}
public void setResNum(String resNum) {
this.resNum = resNum;
}
public String getResName() {
return resName;
}
public void setResName(String resName) {
this.resName = resName;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getOrgName() {
return orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public List<ActSarItemsEO> getItemsList() {
return itemsList;
}
public void setItemsList(List<ActSarItemsEO> itemsList) {
this.itemsList = itemsList;
}
public String getAccessId() {
return accessId;
}
public void setAccessId(String accessId) {
this.accessId = accessId;
}
public String getApplyArctic() {
return applyArctic;
}
public void setApplyArctic(String applyArctic) {
this.applyArctic = applyArctic;
}
public String getEnergyKind() {
return energyKind;
}
public void setEnergyKind(String energyKind) {
this.energyKind = energyKind;
}
public String[] getApplyArcticList() {
return applyArcticList;
}
public void setApplyArcticList(String[] applyArcticList) {
this.applyArcticList = applyArcticList;
}
public String[] getEnergyKindList() {
return energyKindList;
}
public void setEnergyKindList(String[] energyKindList) {
this.energyKindList = energyKindList;
}
public String getMainPointImplementation() {
return mainPointImplementation;
}
public void setMainPointImplementation(String mainPointImplementation) {
this.mainPointImplementation = mainPointImplementation;
}
public String getTermsConditions() {
return termsConditions;
}
public void setTermsConditions(String termsConditions) {
this.termsConditions = termsConditions;
}
public String getParts() {
return parts;
}
public void setParts(String parts) {
this.parts = parts;
}
public Date getTackTime() {
return tackTime;
}
public void setTackTime(Date tackTime) {
this.tackTime = tackTime;
}
public String getApplyArcticShow() {
return applyArcticShow;
}
public void setApplyArcticShow(String applyArcticShow) {
this.applyArcticShow = applyArcticShow;
}
public String getEnergyKindShow() {
return energyKindShow;
}
public void setEnergyKindShow(String energyKindShow) {
this.energyKindShow = energyKindShow;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public Integer getStartIndex() {
return startIndex;
}
public void setStartIndex(Integer startIndex) {
this.startIndex = startIndex;
}
public Integer getEndIndex() {
return endIndex;
}
public void setEndIndex(Integer endIndex) {
this.endIndex = endIndex;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Integer getNowPage() {
return nowPage;
}
public void setNowPage(Integer nowPage) {
this.nowPage = nowPage;
}
public String getResState() {
return resState;
}
public void setResState(String resState) {
this.resState = resState;
}
public String getFileState() {
return fileState;
}
public void setFileState(String fileState) {
this.fileState = fileState;
}
public String getResType() {
return resType;
}
public void setResType(String resType) {
this.resType = resType;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getPrcNum() {
return prcNum;
}
public void setPrcNum(String prcNum) {
this.prcNum = prcNum;
}
public String getFoId() {
return foId;
}
public void setFoId(String foId) {
this.foId = foId;
}
public String getForm() {
return form;
}
public void setForm(String form) {
this.form = form;
}
public Map<String, Object> getAttrInfoMap() {
return attrInfoMap;
}
public void setAttrInfoMap(Map<String, Object> attrInfoMap) {
this.attrInfoMap = attrInfoMap;
}
public String getFoName() {
return foName;
}
public void setFoName(String foName) {
this.foName = foName;
}
public String getRoleId() {
return roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getSarState() {
return sarState;
}
public void setSarState(String sarState) {
this.sarState = sarState;
}
public String getNewPutText() {
return newPutText;
}
public void setNewPutText(String newPutText) {
this.newPutText = newPutText;
}
public String getProdPutText() {
return prodPutText;
}
public void setProdPutText(String prodPutText) {
this.prodPutText = prodPutText;
}
public String getAuthObj() {
return authObj;
}
public void setAuthObj(String authObj) {
this.authObj = authObj;
}
public String getAuthDelive() {
return authDelive;
}
public void setAuthDelive(String authDelive) {
this.authDelive = authDelive;
}
public String getPerformInfo() {
return performInfo;
}
public void setPerformInfo(String performInfo) {
this.performInfo = performInfo;
}
}
@@ -0,0 +1,29 @@
package com.adc.da.slrs.sarStandardsInfo.entity;
/**
* @Description:
* @Author: yangxuenan
* date: 2021/3/10 14:54
*/
public class StandProVO {
private String id;
private String standState;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getStandState() {
return standState;
}
public void setStandState(String standState) {
this.standState = standState;
}
}
@@ -1,9 +1,6 @@
package com.adc.da.slrs.sarStandardsInfo.service;
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
import com.adc.da.slrs.sarStandardsInfo.entity.StandardsInfoExcelVO;
import com.adc.da.slrs.sarStandardsInfo.entity.*;
import com.adc.da.http.ResponseMessage;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -25,20 +22,22 @@ public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
void createSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
int updateSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
//
int deleteSarStandards(String ids);
//
List<SarStandardsInfo> getExportDatas (StandardsInfoExcelVO standardsInfoExcelVO) throws Exception;
//
ResponseMessage<SarStandardsInfo> importSarStandardsInfoData(List<Map<String,String>> dataList, String standType, String menuId, String filepath);
//
List<SarStandardsInfo> selectStandardsByStandnumber(String replaceStandNum, String standType);
//
// SarStandardsInfo selectStandardsInfoByKey(String id) throws Exception;
//
// boolean updateStandardsMenu(SarStandardsInfoEOPage standardsInfoEO);
//
// boolean updateStandInfo(SarStandardsInfoEOPage standardsInfoEO);
//
// List<RecommendVO> selectRecommendStand(SarStandardsInfoEOPage pagenew);
SarStandardsInfo selectStandardsInfoByKey(String id) throws Exception;
boolean updateStandardsMenu(SarStandardsInfoEOPage standardsInfoEO);
boolean updateStandInfo(SarStandardsInfoEOPage standardsInfoEO);
List<RecommendVO> selectRecommendStand(SarStandardsInfoEOPage pagenew);
List<ActSarItemsEO> getStandAndItemsForAct (SarStandardsInfoEOPage page) throws Exception;
}
@@ -10,6 +10,14 @@ import com.adc.da.person.dao.PersonCollectEODao;
import com.adc.da.person.dao.PersonShareEODao;
import com.adc.da.person.entity.PersonMsgEO;
import com.adc.da.person.service.IPersonCollectEOService;
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
import com.adc.da.slrs.sarLawsInfo.page.SarLawsInfoEOPage;
import com.adc.da.slrs.sarLawsInfo.page.SarLawsItemsEOPage;
import com.adc.da.slrs.sarLawsInfo.service.ISarLawsInfoService;
import com.adc.da.slrs.sarLawsItems.service.ISarLawsItemsService;
import com.adc.da.slrs.sarProductStand.dao.SarProductStandDao;
import com.adc.da.slrs.sarSarAccess.service.ISarSarAccessService;
import com.adc.da.slrs.sarSarAccessInfo.dao.SarSarAccessInfoDao;
import com.adc.da.slrs.sarStandAttrDetails.dao.SarStandAttrDetailsDao;
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
@@ -17,6 +25,8 @@ import com.adc.da.slrs.sarStandFile.dao.SarStandFileDao;
import com.adc.da.slrs.sarStandFile.entity.SarStandFile;
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
import com.adc.da.slrs.sarStandItems.service.ISarStandItemsService;
import com.adc.da.slrs.sarStandMenu.dao.SarStandMenuDao;
import com.adc.da.slrs.sarStandMenu.entity.SarStandMenu;
import com.adc.da.slrs.sarStandPutTime.dao.SarStandPutTimeDao;
@@ -56,6 +66,7 @@ import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* <p>
@@ -80,9 +91,27 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
@Autowired
private ISarMenuService sarMenuEOService;
@Autowired
private SarSarAccessInfoDao sarSarAccessInfoEODao;
@Autowired
private SarProductStandDao sarProductStandEODao;
@Autowired
private ISarLawsItemsService sarLawsItemsEOService;
@Autowired
private ISarStandItemsService sarStandItemsEOService;
@Autowired
private IPersonCollectEOService personCollectEOService;
@Autowired
private ISarSarAccessService sarSarAccessEOService;
@Autowired
private ISarLawsInfoService sarLawsInfoEOService;
@Autowired
private ISarUpdLogService sarUpdLogEOService;
@@ -1729,4 +1758,235 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
return dao.selectStandardsByStandnumber(sarStandardsInfoEO);
}
public SarStandardsInfo selectStandardsInfoByKey(String id) throws Exception {
//查询出详情信息
List<SarStandardsInfo> resultlist = dao.selectStandardsInfoByKey(id);
SarStandardsInfo sarStandardsInfoEO = new SarStandardsInfo();
if (resultlist.size() > 0) {
List<SarStandardsInfo> sarStandardsInfoEOList = new ArrayList<>();
sarStandardsInfoEOList.add(resultlist.get(0));
attrInfoShow(sarStandardsInfoEOList);
sarStandardsInfoEO = sarStandardsInfoEOList.get(0);
}
// 查询纳入清单的国家地区
if (sarStandardsInfoEO != null) {
String accessCountry = sarSarAccessEOService.getCountryByRes(sarStandardsInfoEO.getId(),sarStandardsInfoEO.getStandType()+"_STAND");
sarStandardsInfoEO.setAccessCountry(accessCountry);
}
return sarStandardsInfoEO;
}
public boolean updateStandardsMenu(SarStandardsInfoEOPage standardsInfoEO) {
SarStandMenu sarStandMenuEO = new SarStandMenu();
String nowMenuId = standardsInfoEO.getMenuId();
sarStandMenuEO.setMenuId(nowMenuId);
for (int i = 0; i < standardsInfoEO.getIdlist().length; i++) {
sarStandMenuEO.setStandId(standardsInfoEO.getIdlist()[i]);
sarStandMenuEO.setId(null);
sarStandMenuEO.setValidFlag(0);
// 根据当前目录查询所在父节点
String secondLevelId = "";
List<String> getMenuPIds = sarMenuEOService.getParentMenuId(nowMenuId);
if (getMenuPIds != null && getMenuPIds.size() > 1) {
int idSize = getMenuPIds.size();
secondLevelId = getMenuPIds.get(idSize-1);
} else {
secondLevelId = nowMenuId;
}
//查询标准是否已在 当前父节点中
SarStandMenu standMenuEOQuery = new SarStandMenu();
standMenuEOQuery.setMenuId(secondLevelId);
List<String> menuIds = sarMenuEOService.getChildMenuList(secondLevelId);
standMenuEOQuery.setMenuIds(menuIds);
standMenuEOQuery.setStandId(standardsInfoEO.getIdlist()[i]);
List<SarStandMenu> getInfo = sarStandMenuEODao.selectMenuByMenuParentId(standMenuEOQuery);
//删除节点与根节点的关联
SarStandMenu sarStandMenuDel = new SarStandMenu();
sarStandMenuDel.setStandId(standardsInfoEO.getIdlist()[i]);
sarStandMenuDel.setMenuId(standardsInfoEO.getRootMenuId());
sarStandMenuEODao.deleteByStandIdAndMenuId(sarStandMenuDel);
//重新配置到相应节点
if (getInfo == null || getInfo.isEmpty()) {
sarStandMenuEO.setId(UUIDUtils.randomUUID20());
int size = sarStandMenuEODao.insert(sarStandMenuEO);
// if (size>0){
// return true;
// }
} else {
sarStandMenuEO.setOldMenuId(secondLevelId);
List<String> menuOldIds = sarMenuEOService.getChildMenuList(secondLevelId);
sarStandMenuEO.setMenuIds(menuOldIds);
int size = sarStandMenuEODao.updateByStandIdAndMenuId(sarStandMenuEO);
// if (size>0) {
// return true;
// }
}
}
return true;
}
public boolean updateStandInfo(SarStandardsInfoEOPage standardsInfoEO){
String item = sarStandAttrInfoEODao.selectFieldValByStandId("GXHBQ",standardsInfoEO.getIdlist()[0]);
List<String> list = new ArrayList<>();
if (StringUtils.isNotBlank(item)){
list = new ArrayList<>(Arrays.asList(item.split(",")));
}
list.add(standardsInfoEO.getMenuId());
list = list.stream().distinct().collect(Collectors.toList());
int size = sarStandAttrInfoEODao.updateStandInfo(standardsInfoEO.getIdlist()[0],"GXHBQ", org.apache.commons.lang.StringUtils.join(list,","));
return size>0? true:false;
}
public List<RecommendVO> selectRecommendStand(SarStandardsInfoEOPage pagenew) {
return dao.selectRecommendStand(pagenew);
}
public List<ActSarItemsEO> getStandAndItemsForAct (SarStandardsInfoEOPage page) throws Exception{
String queryList = page.getIds();
List<StandProVO> getQueryList = com.alibaba.fastjson.JSONObject.parseArray(queryList,StandProVO.class);
List<ActSarItemsEO> standList = new ArrayList<>();
if (getQueryList != null && !getQueryList.isEmpty()) {
for (StandProVO standProVO : getQueryList) {
String[] idArr = standProVO.getId().split(",");
getStandDetailsForAct(page,idArr,standProVO.getStandState(),standList);
}
}
return standList;
}
public void getStandDetailsForAct (SarStandardsInfoEOPage page,String[] idArr,String standState,List<ActSarItemsEO> standList) throws Exception{
page.setPageSize(100);
page.setIdlist(idArr);
List<SarStandardsInfo> rows = getSarStandForAct(page);
SarLawsInfoEOPage lawsInfoEOPage = new SarLawsInfoEOPage();
lawsInfoEOPage.setPageSize(100);
lawsInfoEOPage.setIdlist(idArr);
List<SarLawsInfo> lawsRows = sarLawsInfoEOService.getSarLawsForAct(lawsInfoEOPage);
if (rows != null && !rows.isEmpty()) {
for (SarStandardsInfo sarStandardsInfoEO : rows) {
ActSarItemsEO actSarItemsEO = new ActSarItemsEO();
actSarItemsEO.setResId(sarStandardsInfoEO.getId());
actSarItemsEO.setAttrInfoMap(sarStandardsInfoEO.getAttrInfoMap());
if (StringUtils.isNotBlank(sarStandardsInfoEO.getStandYear())) {
actSarItemsEO.setResNum(sarStandardsInfoEO.getStandSort() + " " +sarStandardsInfoEO.getStandNumber() + "-" + sarStandardsInfoEO.getStandYear());
} else {
actSarItemsEO.setResNum(sarStandardsInfoEO.getStandSort() + " " + sarStandardsInfoEO.getStandNumber());
}
actSarItemsEO.setResName(sarStandardsInfoEO.getStandName());
String resType = sarStandardsInfoEO.getStandType()+"_STAND";
actSarItemsEO.setResType(resType);
SarStandItemsEOPage standItemsEOPage = new SarStandItemsEOPage();
standItemsEOPage.setStandId(sarStandardsInfoEO.getId());
standItemsEOPage.setValidFlag("0");
standItemsEOPage.setProductId(page.getProductId());
standItemsEOPage.setProType(page.getProType());
standItemsEOPage.setFileType(standState);
standItemsEOPage.setOrderBy("SAR_STAND_ITEMS.modify_time desc");
List<ActSarItemsEO> getItems = sarStandItemsEOService.queryItemsByList(standItemsEOPage,resType);
Map<String,Object> map = sarProductStandEODao.queryStandSarState(sarStandardsInfoEO.getId());
if(Integer.valueOf(map.get("SAR_ID").toString())>0){
actSarItemsEO.setSarState("1");
if(getItems!=null && getItems.size()>0){
for(ActSarItemsEO actSarItemsEO1:getItems){
actSarItemsEO1.setSarState("1");
}
}
}else{
actSarItemsEO.setSarState("0");
if(getItems!=null && getItems.size()>0){
for(ActSarItemsEO actSarItemsEO1:getItems){
actSarItemsEO1.setSarState("0");
}
}
}
actSarItemsEO.setItemsList(getItems);
if(StringUtils.isNotEmpty(page.getProductId())){
List<Map<String,Object>> sarProductStandEOS = sarProductStandEODao.queryStandSarStateNew(sarStandardsInfoEO.getId(), page.getProductId());
if(sarProductStandEOS.size()>0){
if(sarProductStandEOS.get(0).get("RELATE_ACCESS_ID")!=null){
Map map1 = sarSarAccessInfoEODao.selectProTimeInfoByStandIdAndAccId(sarStandardsInfoEO.getId(), sarProductStandEOS.get(0).get("RELATE_ACCESS_ID").toString());
if(map1!=null){
actSarItemsEO.setNewPutText(map1.get("NEW_PUT_TEXT_TIME")!=null?map1.get("NEW_PUT_TEXT_TIME").toString().substring(0,10):"");
actSarItemsEO.setProdPutText(map1.get("PROD_PUT_TEXT_TIME")!=null?map1.get("PROD_PUT_TEXT_TIME").toString().substring(0,10):"");
actSarItemsEO.setAuthObj(map1.get("AUTH_OBJ_ID")!=null?map1.get("AUTH_OBJ_ID").toString():"");
actSarItemsEO.setAuthDelive(map1.get("AUTH_DELIVE")!=null?map1.get("AUTH_DELIVE").toString():"");
actSarItemsEO.setPerformInfo(map1.get("PERFORM_INFO")!=null?map1.get("PERFORM_INFO").toString():"");
}
}
}
}
standList.add(actSarItemsEO);
}
}
if (lawsRows != null && !lawsRows.isEmpty()) {
for (SarLawsInfo sarStandardsInfoEO : lawsRows) {
ActSarItemsEO actSarItemsEO = new ActSarItemsEO();
actSarItemsEO.setResId(sarStandardsInfoEO.getId());
actSarItemsEO.setAttrInfoMap(sarStandardsInfoEO.getAttrInfoMap());
actSarItemsEO.setResNum(sarStandardsInfoEO.getLawsNumber());
actSarItemsEO.setResName(sarStandardsInfoEO.getLawsName());
String resType = sarStandardsInfoEO.getLawsType()+"_LAWS";
actSarItemsEO.setResType(resType);
SarLawsItemsEOPage lawsItemsEOPage = new SarLawsItemsEOPage();
lawsItemsEOPage.setLawsId(sarStandardsInfoEO.getId());
lawsItemsEOPage.setValidFlag("0");
lawsItemsEOPage.setProductId(page.getProductId());
lawsItemsEOPage.setProType(page.getProType());
lawsItemsEOPage.setFileType(standState);
lawsItemsEOPage.setOrderBy("SAR_LAWS_ITEMS.modify_time desc");
List<ActSarItemsEO> getItems = sarLawsItemsEOService.queryItemsByList(lawsItemsEOPage,resType);
actSarItemsEO.setItemsList(getItems);
Map<String,Object> map = sarProductStandEODao.queryStandSarState(sarStandardsInfoEO.getId());
if(Integer.valueOf(map.get("SAR_ID").toString())>0){
actSarItemsEO.setSarState("1");
if(getItems!=null && getItems.size()>0){
for(ActSarItemsEO actSarItemsEO1:getItems){
actSarItemsEO1.setSarState("1");
}
}
}else{
actSarItemsEO.setSarState("0");
if(getItems!=null && getItems.size()>0){
for(ActSarItemsEO actSarItemsEO1:getItems){
actSarItemsEO1.setSarState("0");
}
}
}
if(StringUtils.isNotEmpty(page.getProductId())){
List<Map<String,Object>> sarProductStandEOS = sarProductStandEODao.queryStandSarStateNew(sarStandardsInfoEO.getId(), page.getProductId());
if(sarProductStandEOS.size()>0){
if(sarProductStandEOS.get(0).get("RELATE_ACCESS_ID")!=null){
Map map1 = sarSarAccessInfoEODao.selectProTimeInfoByStandIdAndAccId(sarStandardsInfoEO.getId(), sarProductStandEOS.get(0).get("RELATE_ACCESS_ID").toString());
if(map1!=null){
actSarItemsEO.setNewPutText(map1.get("NEW_PUT_TEXT_TIME")!=null?map1.get("NEW_PUT_TEXT_TIME").toString().substring(0,10):"");
actSarItemsEO.setProdPutText(map1.get("PROD_PUT_TEXT_TIME")!=null?map1.get("PROD_PUT_TEXT_TIME").toString().substring(0,10):"");
actSarItemsEO.setAuthObj(map1.get("AUTH_OBJ_ID")!=null?map1.get("AUTH_OBJ_ID").toString():"");
actSarItemsEO.setAuthDelive(map1.get("AUTH_DELIVE")!=null?map1.get("AUTH_DELIVE").toString():"");
actSarItemsEO.setPerformInfo(map1.get("PERFORM_INFO")!=null?map1.get("PERFORM_INFO").toString():"");
}
}
}
}
standList.add(actSarItemsEO);
}
}
}
public List<SarStandardsInfo> getSarStandForAct(SarStandardsInfoEOPage page) throws Exception {
//查询当前登录人角色拥有权限的菜单
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType()+"_STAND",null);
// if(getMenuIdList != null && !getMenuIdList.isEmpty()){
// page.setMenuRoleList(getMenuIdList);
// } else {
// page.setMenuRoleList(null);
// }
Integer rowCount = dao.getSarStandardsInfoCount(page);
page.getPager().setRowCount(rowCount);
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page);
attrInfo(sarlist);
return sarlist;
}
}
@@ -594,6 +594,8 @@
</if>
</select>
<select id="selectSvppsByStandId" parameterType="java.lang.String" resultType="java.lang.String">
select svpps from SAR_STAND_ITEMS
where valid_flag=0 and svpps != ''
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarLawsAttrInfo.dao.SarLawsAttrInfoDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarLawsAttrInfo.entity.SarLawsAttrInfo" >
<id column="id" property="id" />
<result column="laws_id" property="lawsId" />
<result column="creation_user" property="creationUser" />
<result column="valid_flag" property="validFlag" />
<result column="creation_time" property="creationTime" />
<result column="modify_time" property="modifyTime" />
</resultMap>
<!-- SAR_LAWS_ATTR_INFO table all fields -->
<sql id="Base_Column_List" >
id, laws_id, creation_user, valid_flag, creation_time, modify_time
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1
<trim suffixOverrides="," >
<if test="id != null" >
and id ${idOperator} #{id}
</if>
<if test="lawsId != null" >
and laws_id ${lawsIdOperator} #{lawsId}
</if>
<if test="creationUser != null" >
and creation_user ${creationUserOperator} #{creationUser}
</if>
<if test="validFlag != null" >
and valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="creationTime != null" >
and creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null" >
and creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null" >
and creation_time &lt;= #{creationTime2}
</if>
<if test="modifyTime != null" >
and modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null" >
and modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null" >
and modify_time &lt;= #{modifyTime2}
</if>
</trim>
</sql>
<!-- 查询字段及对应数据-->
<select id="selectLawsFieldAndData" resultType="Map">
SELECT ${fieldInfo}
FROM SAR_LAWS_ATTR_INFO
WHERE valid_flag=0 and laws_id = #{standId}
</select>
</mapper>
@@ -2,4 +2,286 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarLawsInfo.dao.SarLawsInfoDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo">
<id column="id" property="id"/>
<result column="modify_time" property="modifyTime"/>
<result column="creation_time" property="creationTime"/>
<result column="valid_flag" property="validFlag"/>
<result column="creation_user" property="creationUser"/>
<result column="replace_laws_num" property="replaceLawsNum"/>
<result column="replaced_laws_num" property="replacedLawsNum"/>
<result column="put_time" property="putTime"/>
<result column="issue_time" property="issueTime"/>
<result column="laws_state" property="lawsState"/>
<result column="laws_name" property="lawsName"/>
<result column="laws_number" property="lawsNumber"/>
<result column="laws_property" property="lawsProperty"/>
<result column="country" property="country"/>
<result column="laws_type" property="lawsType"/>
<result column="propertyName" property="propertyName"/>
<result column="stateName" property="stateName"/>
<result column="countryName" property="countryName"/>
<result column="laws_en_name" property="lawsEnName"/>
<result column="synopsis" property="synopsis"/>
<result column="cite_stand" property="citeStand"/>
<result column="cited_stand" property="citedStand"/>
<result column="is_relate_access" property="isRelateAccess" />
</resultMap>
<resultMap id="BaseResultMapExcel" type="com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo">
<result column="replace_laws_num" property="replaceLawsNum"/>
<result column="replaced_laws_num" property="replacedLawsNum"/>
<result column="put_time" property="putTime"/>
<result column="issue_time" property="issueTime"/>
<result column="laws_name" property="lawsName"/>
<result column="laws_number" property="lawsNumber"/>
<result column="propertyName" property="propertyName"/>
<result column="stateName" property="stateName"/>
<result column="countryName" property="countryName"/>
<result column="synopsis" property="synopsis"/>
<result column="laws_en_name" property="lawsEnName"/>
<result column="is_relate_access" property="isRelateAccess" />
</resultMap>
<!-- SAR_LAWS_INFO table all fields -->
<sql id="Base_Column_List">
concat(synopsis, '') as synopsis,laws_en_name,modify_time, creation_time, valid_flag, creation_user,replace_laws_num,replaced_laws_num,
put_time, issue_time, laws_state, laws_name, laws_number, laws_property, country, laws_type, id,cite_stand,cited_stand,is_relate_access
</sql>
<sql id="Group_Column_List_Query">
SAR_LAWS_INFO.laws_en_name,concat(synopsis, '') as synopsis,SAR_LAWS_INFO.modify_time,
SAR_LAWS_INFO.creation_time, SAR_LAWS_INFO.valid_flag, SAR_LAWS_INFO.creation_user,
SAR_LAWS_INFO.replaced_laws_num, SAR_LAWS_INFO.put_time, SAR_LAWS_INFO.issue_time, SAR_LAWS_INFO.laws_state,
SAR_LAWS_INFO.laws_name, SAR_LAWS_INFO.laws_number, SAR_LAWS_INFO.laws_property,SAR_LAWS_INFO.replace_laws_num,
SAR_LAWS_INFO.country, SAR_LAWS_INFO.laws_type, SAR_LAWS_INFO.id,SAR_LAWS_INFO.cite_stand,SAR_LAWS_INFO.cited_stand,SAR_LAWS_INFO.is_relate_access
</sql>
<sql id="Group_Column_List">
SAR_LAWS_INFO.laws_en_name,concat(synopsis, ''),SAR_LAWS_INFO.modify_time,
SAR_LAWS_INFO.creation_time, SAR_LAWS_INFO.valid_flag, SAR_LAWS_INFO.creation_user,SAR_LAWS_INFO.replace_laws_num,
SAR_LAWS_INFO.replaced_laws_num, SAR_LAWS_INFO.put_time, SAR_LAWS_INFO.issue_time, SAR_LAWS_INFO.laws_state,
SAR_LAWS_INFO.laws_name, SAR_LAWS_INFO.laws_number, SAR_LAWS_INFO.laws_property,
SAR_LAWS_INFO.country, SAR_LAWS_INFO.laws_type, SAR_LAWS_INFO.id,SAR_LAWS_INFO.cite_stand,SAR_LAWS_INFO.cited_stand,SAR_LAWS_INFO.is_relate_access
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1
<trim suffixOverrides=",">
<if test="synopsis != null">
and synopsis like concat(concat('%',#{synopsis}),'%')
</if>
<if test="lawsEnName != null">
and laws_en_name like concat(concat('%',#{lawsEnName}),'%')
</if>
<if test="modifyTime != null">
and modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null">
and modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null">
and modify_time &lt;= #{modifyTime2}
</if>
<if test="creationTime != null">
and creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null">
and creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null">
and creation_time &lt;= #{creationTime2}
</if>
<if test="validFlag != null">
and valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="creationUser != null">
and creation_user ${creationUserOperator} #{creationUser}
</if>
<!--需求变动 特此修改(byl-->
<if test="replaceLawsNum != null">
and replace_laws_num ${replaceLawsNumOperator} concat(concat('%',#{replaceLawsNum}),'%')
</if>
<if test="replacedLawsNum != null">
and replaced_laws_num ${replaceLawsNumOperator} concat(concat('%',#{replacedLawsNum}),'%')
</if>
<if test="putTime != null">
and put_time ${putTimeOperator} #{putTime}
</if>
<if test="putTime1 != null">
and put_time &gt;= #{putTime1}
</if>
<if test="putTime2 != null">
and put_time &lt;= #{putTime2}
</if>
<if test="lawsState != null">
and laws_state ${lawsStateOperator} #{lawsState}
</if>
<if test="lawsName != null">
and laws_name ${lawsNameOperator} concat(concat('%',#{lawsName}),'%')
</if>
<if test="lawsNumber != null">
<if test="lawsNumberOperator == '='.toString()">
and laws_number ${lawsNumberOperator} #{lawsNumber}
</if>
<if test="lawsNumberOperator == 'like'.toString()">
and laws_number ${lawsNumberOperator} concat(concat('%',#{lawsNumber}),'%')
</if>
</if>
<if test="lawsProperty != null">
and laws_property ${lawsPropertyOperator} #{lawsProperty}
</if>
<if test="country != null">
and country ${countryOperator} #{country}
</if>
<if test="lawsType != null">
and laws_type ${lawsTypeOperator} #{lawsType}
</if>
<if test="id != null">
and SAR_LAWS_INFO.id ${idOperator} #{id}
</if>
<if test="numberName != null">
and (laws_number ${lawsNumberOperator} concat(concat('%',#{numberName}),'%')
or laws_name ${lawsNameOperator} concat(concat('%',#{numberName}),'%'))
</if>
<if test="isRelateAccess != null" >
and is_relate_access = #{isRelateAccess}
</if>
</trim>
</sql>
<sql id="Second_Where_Clause">
where 1=1
<trim suffixOverrides=",">
<if test="isRelateAccess != null" >
and is_relate_access = #{isRelateAccess}
</if>
<if test="modifyTime != null">
and modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null">
and modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null">
and modify_time &lt;= #{modifyTime2}
</if>
<if test="creationTime != null">
and creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null">
and creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null">
and creation_time &lt;= #{creationTime2}
</if>
<if test="validFlag != null">
and valid_flag = #{validFlag}
</if>
<if test="creationUser != null">
and creation_user = #{creationUser}
</if>
<if test="replaceLawsNum != null">
and replace_laws_num = #{replaceLawsNum}
</if>
<if test="putTime != null">
and put_time ${putTimeOperator} #{putTime}
</if>
<if test="lawsState != null">
and laws_state = #{lawsState}
</if>
<if test="lawsName != null">
and laws_name = #{lawsName}
</if>
<if test="lawsNumber != null">
and laws_number = #{lawsNumber}
</if>
<if test="lawsProperty != null">
and laws_property = #{lawsProperty}
</if>
<if test="country != null">
and country = #{country}
</if>
<if test="lawsType != null">
and laws_type = #{lawsType}
</if>
<if test="id != null">
and id = #{id}
</if>
</trim>
</sql>
<sql id="Laws_Where_Clause">
left join SAR_LAWS_MENU on SAR_LAWS_INFO.id = SAR_LAWS_MENU.LAWS_ID
left join SAR_MENU on SAR_LAWS_MENU.MENU_ID = SAR_MENU.id
left join SAR_LAWS_ATTR_INFO on (SAR_LAWS_ATTR_INFO.LAWS_ID = SAR_LAWS_INFO.id and SAR_LAWS_ATTR_INFO.valid_flag=0)
left join TS_DICTYPE dic1 on (SAR_LAWS_INFO.laws_property = dic1.dic_type_code AND dic1.VALID_FLAG = 0)
left join TS_DICTYPE dic2 on (SAR_LAWS_INFO.laws_state = dic2.dic_type_code AND dic2.VALID_FLAG = 0)
<include refid="Base_Where_Clause"/>
and SAR_LAWS_INFO.valid_flag = 0
<if test="menuId != null and menuId != ''">
and SAR_MENU.id in
<foreach collection="menuIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
<if test="menuRoleList != null">
and (SAR_LAWS_MENU.MENU_ID in
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
or (SAR_LAWS_INFO.ID not in (select SAR_LAWS_MENU.LAWS_ID from SAR_LAWS_MENU where SAR_LAWS_INFO.ID = SAR_LAWS_MENU.LAWS_ID and SAR_LAWS_MENU.VALID_FLAG = 0))
)
</if>
<if test="menuRoleList == null and idlist == null">
and SAR_LAWS_INFO.ID not in (select SAR_LAWS_MENU.LAWS_ID from SAR_LAWS_MENU where SAR_LAWS_INFO.ID = SAR_LAWS_MENU.LAWS_ID and SAR_LAWS_MENU.VALID_FLAG = 0)
</if>
<if test="collectMenuId != null">
and SAR_LAWS_INFO.id in (
select COLLECT_RES_ID from TS_PERSON_COLLECT where TS_PERSON_COLLECT.VALID_FLAG=0
and collect_type='FOREIGN_LAWS'
and TS_PERSON_COLLECT.user_id=#{userId}
)
</if>
<if test='labelMenuId != null and labelMenuId == "gxhbq"'>
and SAR_LAWS_ATTR_INFO.GXHBQ is not null
</if>
<if test='labelMenuId != null and labelMenuId != "gxhbq"'>
and SAR_LAWS_ATTR_INFO.GXHBQ like concat(concat('%',#{labelMenuId}),'%')
</if>
<if test="advanceSearchStr != null">
and (${advanceSearchStr})
</if>
<if test="idlist != null">
and SAR_LAWS_INFO.id in
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</sql>
<!-- 查询SAR_LAWS_INFO列表 -->
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select<include refid="Base_Column_List"/>
,propertyName,stateName
from
(select tmp_tb.* from
(select <include refid="Group_Column_List_Query"/>,dic1.dic_type_name as propertyName,dic2.dic_type_name as stateName
from SAR_LAWS_INFO
<include refid="Laws_Where_Clause"/>
GROUP BY <include refid="Group_Column_List"/>,dic1.dic_type_name,dic2.dic_type_name,SAR_LAWS_ATTR_INFO.XCXSSRQ
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
</select>
<!-- SAR_LAWS_INFO 列表总数-->
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
select count(1) from (select SAR_LAWS_INFO.ID from SAR_LAWS_INFO
<include refid="Laws_Where_Clause"/>
GROUP BY SAR_LAWS_INFO.ID) a
</select>
</mapper>
@@ -0,0 +1,267 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarLawsItems.dao.SarLawsItemsDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarLawsItems.entity.SarLawsItems">
<id column="id" property="id"/>
<result column="modify_time" property="modifyTime"/>
<result column="creation_time" property="creationTime"/>
<result column="creation_user" property="creationUser"/>
<result column="valid_flag" property="validFlag"/>
<result column="remarks" property="remarks"/>
<result column="responsible_unit" property="responsibleUnit"/>
<result column="energy_kind" property="energyKind"/>
<result column="apply_arctic" property="applyArctic"/>
<result column="tack_time" property="tackTime"/>
<result column="parts" property="parts"/>
<result column="items_name" property="itemsName"/>
<result column="items_num" property="itemsNum"/>
<result column="laws_id" property="lawsId"/>
<result column="applyArcticShow" property="applyArcticShow"/>
<result column="energyKindShow" property="energyKindShow"/>
<result column="responsibleUnitShow" property="responsibleUnitShow"/>
<result column="MAINPOINTS_IMPEMENTATION" property="mainPointImplementation"/>
<result column="TERMS_CONDITIONS" property="termsConditions"/>
<result column="fo" property="fo" />
<result column="duty_engineer" property="dutyEngineer" />
<result column="svpps" property="svpps" />
<result column="claim_type" property="claimType" />
<result column="bus_stand_cover" property="busStandCover" />
<result column="file_type" property="fileType" />
<result column="claimTypeShow" property="claimTypeShow" />
<result column="dutyEngineerShow" property="dutyEngineerShow" />
<result column="responsibleUnitShow" property="responsibleUnitShow" />
<result column="foShow" property="foShow"/>
</resultMap>
<!-- SAR_LAWS_ITEMS table all fields -->
<sql id="Base_Column_List">
SAR_LAWS_ITEMS.modify_time, SAR_LAWS_ITEMS.creation_time, SAR_LAWS_ITEMS.creation_user, SAR_LAWS_ITEMS.valid_flag, SAR_LAWS_ITEMS.remarks, responsible_unit, energy_kind, apply_arctic, tack_time, parts, items_name, items_num, SAR_LAWS_ITEMS.laws_id,SAR_LAWS_ITEMS.id,SAR_LAWS_ITEMS.MAINPOINTS_IMPEMENTATION,SAR_LAWS_ITEMS.TERMS_CONDITIONS,
tsFo.UNAME as foShow,SAR_LAWS_ITEMS.duty_engineer,SAR_LAWS_ITEMS.svpps,SAR_LAWS_ITEMS.fo,
SAR_LAWS_ITEMS.claim_type,SAR_LAWS_ITEMS.bus_stand_cover,SAR_LAWS_ITEMS.file_type,dicClaimType.DIC_TYPE_NAME as claimTypeShow,tsdutyEngineer.UNAME as dutyEngineerShow
</sql>
<sql id="Base_Query_Column_List">
SAR_LAWS_ITEMS.modify_time, SAR_LAWS_ITEMS.creation_time, SAR_LAWS_ITEMS.creation_user, SAR_LAWS_ITEMS.valid_flag,
SAR_LAWS_ITEMS.remarks, responsible_unit, energy_kind, apply_arctic, tack_time, parts, items_name, items_num,
SAR_LAWS_ITEMS.laws_id,SAR_LAWS_ITEMS.id,SAR_LAWS_ITEMS.MAINPOINTS_IMPEMENTATION,SAR_LAWS_ITEMS.TERMS_CONDITIONS,
SAR_LAWS_ITEMS.duty_engineer,SAR_LAWS_ITEMS.svpps,SAR_LAWS_ITEMS.claim_type,SAR_LAWS_ITEMS.bus_stand_cover,
SAR_LAWS_ITEMS.file_type
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_LAWS_ITEMS.claim_type and dicClaimType.dic_id is
not null and dicClaimType.valid_flag = 0)
left join TS_USER tsdutyEngineer on (tsdutyEngineer.USID = SAR_LAWS_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0
and tsdutyEngineer.DISABLE_FLAG=0)
left join TS_USER tsFo on (tsFo.USID = SAR_LAWS_ITEMS.fo and tsFo.valid_flag=0
and tsFo.DISABLE_FLAG=0)
where 1=1
<trim suffixOverrides=",">
<if test="fileType != null" >
and SAR_LAWS_ITEMS.file_type = #{fileType}
</if>
<if test="modifyTime != null">
and modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null">
and modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null">
and modify_time &lt;= #{modifyTime2}
</if>
<if test="creationTime != null">
and creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null">
and creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null">
and creation_time &lt;= #{creationTime2}
</if>
<if test="creationUser != null">
and creation_user ${creationUserOperator} #{creationUser}
</if>
<if test="validFlag != null">
and SAR_LAWS_ITEMS.valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="remarks != null">
and SAR_LAWS_ITEMS.remarks ${remarksOperator} #{remarks}
</if>
<if test="responsibleUnit != null">
and SAR_LAWS_ITEMS.responsible_unit = #{responsibleUnit}
</if>
<if test="energyKind != null">
and energy_kind ${energyKindOperator} #{energyKind}
</if>
<if test="applyArctic != null">
and apply_arctic ${applyArcticOperator} #{applyArctic}
</if>
<if test="tackTime != null">
and tack_time ${tackTimeOperator} #{tackTime}
</if>
<if test="tackTime1 != null">
and tack_time &gt;= #{tackTime1}
</if>
<if test="tackTime2 != null">
and tack_time &lt;= #{tackTime2}
</if>
<if test="parts != null">
and SAR_LAWS_ITEMS.parts like concat(concat('%', #{parts}),'%')
</if>
<if test="nameOrRequest != null" >
and (SAR_LAWS_ITEMS.items_name like concat(concat('%', #{nameOrRequest}),'%') or SAR_LAWS_ITEMS.TERMS_CONDITIONS like concat(concat('%', #{nameOrRequest}),'%'))
</if>
<if test="itemsName != null">
and items_name ${itemsNameOperator} #{itemsName}
</if>
<if test="itemsNum != null">
and items_num ${itemsNumOperator} #{itemsNum}
</if>
<if test="lawsId != null">
and laws_id ${lawsIdOperator} #{lawsId}
</if>
<if test="id != null">
and SAR_LAWS_ITEMS.id ${idOperator} #{id}
</if>
<if test="idlist != null">
and SAR_LAWS_ITEMS.id in
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="lawsId != null">
and SAR_LAWS_ITEMS.LAWS_ID = #{lawsId}
</if>
</trim>
</sql>
<sql id="Second_Where_Clause">
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_LAWS_ITEMS.claim_type and dicClaimType.dic_id is
not null and dicClaimType.valid_flag = 0)
left join TS_USER tsdutyEngineer on (tsdutyEngineer.USID = SAR_LAWS_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0
and tsdutyEngineer.DISABLE_FLAG=0)
where 1=1
<trim suffixOverrides=",">
<if test="fileType != null" >
and SAR_LAWS_ITEMS.file_type = #{fileType}
</if>
<if test="modifyTime != null">
and modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null">
and modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null">
and modify_time &lt;= #{modifyTime2}
</if>
<if test="creationTime != null">
and creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null">
and creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null">
and creation_time &lt;= #{creationTime2}
</if>
<if test="creationUser != null">
and creation_user ${creationUserOperator} #{creationUser}
</if>
<if test="validFlag != null">
and SAR_LAWS_ITEMS.valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="remarks != null">
and remarks ${remarksOperator} #{remarks}
</if>
<if test="responsibleUnit != null">
and responsible_unit = #{responsibleUnit}
</if>
<if test="energyKind != null">
and energy_kind ${energyKindOperator} #{energyKind}
</if>
<if test="applyArctic != null">
and apply_arctic ${applyArcticOperator} #{applyArctic}
</if>
<if test="tackTime != null">
and tack_time ${tackTimeOperator} #{tackTime}
</if>
<if test="tackTime1 != null">
and tack_time &gt;= #{tackTime1}
</if>
<if test="tackTime2 != null">
and tack_time &lt;= #{tackTime2}
</if>
<if test="parts != null">
and parts ${partsOperator} #{parts}
</if>
<if test="itemsName != null">
and items_name ${itemsNameOperator} #{itemsName}
</if>
<if test="itemsNum != null">
and items_num ${itemsNumOperator} #{itemsNum}
</if>
<if test="lawsId != null">
and laws_id ${lawsIdOperator} #{lawsId}
</if>
<if test="id != null">
and id ${idOperator} #{id}
</if>
<if test='proType != null and proType == "process"' >
and (SAR_LAWS_ITEMS.claim_type='L7N7EEDAPR' or SAR_LAWS_ITEMS.claim_type='RENVECPFGT')
</if>
</trim>
</sql>
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select SAR_LAWS_ITEMS.*,
(
SELECT
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_LAWS_ITEM_VAL.PROPERTY_TYPE separator ',')
FROM
SAR_LAWS_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.DIC_TYPE_CODE = SAR_LAWS_ITEM_VAL.PROPERTY_VAL and
TS_DICTYPE.DIC_ID is not null)
WHERE
SAR_LAWS_ITEM_VAL.LAWS_ITEM_ID = SAR_LAWS_ITEMS.ID
AND SAR_LAWS_ITEM_VAL.PROPERTY_TYPE = 'APPLY_ARCTIC'
AND TS_DICTYPE.VALID_FLAG=0
) AS applyArcticShow,
(
SELECT
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_LAWS_ITEM_VAL.PROPERTY_TYPE separator ',')
FROM
SAR_LAWS_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.DIC_TYPE_CODE = SAR_LAWS_ITEM_VAL.PROPERTY_VAL and
TS_DICTYPE.DIC_ID is not null)
WHERE
SAR_LAWS_ITEM_VAL.LAWS_ITEM_ID = SAR_LAWS_ITEMS.ID
AND SAR_LAWS_ITEM_VAL.PROPERTY_TYPE = 'ENERGY_KIND'
AND TS_DICTYPE.VALID_FLAG=0
) AS energyKindShow,
TS_ORG.ORG_NAME as responsibleUnitShow
from SAR_LAWS_ITEMS left join TS_ORG on SAR_LAWS_ITEMS.RESPONSIBLE_UNIT = TS_ORG.ID
<include refid="Second_Where_Clause"/>
<if test="updateFlag != null and updateFlag != ''">
and SAR_LAWS_ITEMS.id != #{updateFlag}
</if>
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
</select>
<select id="selectSvppsByStandId" parameterType="java.lang.String" resultType="java.lang.String">
select svpps from SAR_LAWS_ITEMS
where valid_flag=0 and svpps != ''
<if test="standId != null">
and laws_id=#{standId}
</if>
<if test="idList != null">
and id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="fileType != null">
and file_type = #{fileType}
</if>
</select>
</mapper>
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarProductStand.dao.SarProductStandDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarProductStand.entity.SarProductStand" >
<id column="id" property="id" />
<result column="modify_time" property="modifyTime" />
<result column="creation_time" property="creationTime" />
<result column="valid_flag" property="validFlag" />
<result column="creation_user" property="creationUser" />
<result column="stand_id" property="standId" />
<result column="stand_type" property="standType" />
<result column="product_id" property="productId" />
<result column="productCode" property="productCode" />
<result column="productName" property="productName" />
<result column="sar_state" property="sarState" />
<result column="sar_item_state" property="sarItemState" />
<result column="access_type" property="accessType" />
<result column="standCode" property="standCode" />
<result column="standName" property="standName" />
<result column="car_model" property="carModel" />
<result column="relate_access_id" property="relateAccessId" />
<result column="is_develop" property="isDevelop" />
<result column="act_state" property="actState" />
<result column="color" property="color" />
<result column="non_confomity" property="nonConfomity" />
<result column="current" property="current" />
<result column="change_scheme" property="changeScheme" />
<result column="estimated_change_cycle" property="estimatedChangeCycle" />
<result column="estimated_cost" property="estimatedCost" />
<result column="risk_point" property="riskPoint" />
<result column="verification_scheme" property="verificationScheme" />
<result column="justified" property="justified" />
<result column="comp_person" property="compPerson" />
<result column="comp_time" property="compTime" />
<result column="sarNumber" property="sarNumber" />
<result column="sarItemNumber" property="sarItemNumber" />
<result column="prc_num" property="prcNum" />
</resultMap>
<!-- SAR_PRODUCT_STAND table all fields -->
<sql id="Base_Column_List" >
access_type,modify_time, creation_time, valid_flag, creation_user, stand_id, stand_type, product_id, id,
sar_state,car_model,relate_access_id,is_develop,act_state,color,
non_confomity, current, change_scheme, estimated_change_cycle, estimated_cost, risk_point, verification_scheme,
justified, comp_person, comp_time,prc_num
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1
<trim suffixOverrides="," >
<if test="productCode != null" >
and SAR_PRODUCT_INFO.PRODECT_CODE like concat(concat('%',#{productCode}),'%')
</if>
<if test="productName != null" >
and SAR_PRODUCT_INFO.PRODUCT_NAME like concat(concat('%',#{productName}),'%')
</if>
<if test="modifyTime != null" >
and SAR_PRODUCT_STAND.modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null" >
and SAR_PRODUCT_STAND.modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null" >
and SAR_PRODUCT_STAND.modify_time &lt;= #{modifyTime2}
</if>
<if test="creationTime != null" >
and SAR_PRODUCT_STAND.creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null" >
and SAR_PRODUCT_STAND.creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null" >
and SAR_PRODUCT_STAND.creation_time &lt;= #{creationTime2}
</if>
<if test="validFlag != null" >
and SAR_PRODUCT_STAND.valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="creationUser != null" >
and SAR_PRODUCT_STAND.creation_user ${creationUserOperator} #{creationUser}
</if>
<if test="standId != null" >
and SAR_PRODUCT_STAND.stand_id ${standIdOperator} #{standId}
</if>
<if test="standType != null" >
and SAR_PRODUCT_STAND.stand_type ${standTypeOperator} #{standType}
</if>
<if test="productId != null" >
and SAR_PRODUCT_STAND.product_id ${productIdOperator} #{productId}
</if>
<if test="id != null" >
and SAR_PRODUCT_STAND.id ${idOperator} #{id}
</if>
<if test="sarState != null" >
and SAR_PRODUCT_STAND.sar_state = #{sarState}
</if>
<if test="carModel != null" >
and SAR_PRODUCT_STAND.car_model = #{carModel}
</if>
<if test="accessType != null" >
and SAR_PRODUCT_STAND.access_type = #{accessType}
</if>
<if test="standidlist != null" >
and SAR_PRODUCT_STAND.PRODUCT_ID in
<foreach collection="standidlist" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="productIdList != null" >
and SAR_PRODUCT_STAND.Id in
<foreach collection="productIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="queryStandList != null" >
and SAR_PRODUCT_STAND.stand_Id in
<foreach collection="queryStandList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</trim>
</sql>
<select id="queryStandSarState" resultType="java.util.Map"
parameterType="java.lang.String">
SELECT count(1) AS SAR_ID FROM SAR_PRODUCT_SAR_STATE WHERE SAR_ID=#{value } ;
</select>
<select id="queryStandSarStateNew" resultType="java.util.Map"
parameterType="java.lang.String">
SELECT * FROM SAR_PRODUCT_STAND WHERE product_id=#{productId } and stand_id=#{standId} ;
</select>
</mapper>
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarSarAccess.dao.SarSarAccessDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarSarAccess.entity.SarSarAccess">
<id column="id" property="id"/>
<result column="modify_time" property="modifyTime"/>
<result column="creation_time" property="creationTime"/>
<result column="creation_user" property="creationUser"/>
<result column="valid_flag" property="validFlag"/>
<result column="access_content" property="accessContent"/>
<result column="country" property="country"/>
<result column="apply_arctic" property="applyArctic"/>
<result column="energy_kind" property="energyKind"/>
<result column="type" property="type"/>
<result column="remark" property="remark"/>
<result column="relate_file" property="relateFile"/>
<result column="state" property="state"/>
<result column="version" property="version"/>
</resultMap>
<!-- SAR_SAR_ACCESS table all fields -->
<sql id="Base_Column_List">
modify_time, creation_time, creation_user,
valid_flag, access_content, country, id,apply_arctic,energy_kind,type,remark,relate_file,version,state
</sql>
<sql id="BasePage_Column_List">
SAR_SAR_ACCESS.modify_time, SAR_SAR_ACCESS.creation_time, SAR_SAR_ACCESS.creation_user,
SAR_SAR_ACCESS.valid_flag, SAR_SAR_ACCESS.access_content, SAR_SAR_ACCESS.country, SAR_SAR_ACCESS.id,TS_USER.uname,
dicountry.DIC_TYPE_NAME as countryShow,SAR_SAR_ACCESS.apply_arctic,SAR_SAR_ACCESS.energy_kind,
SAR_SAR_ACCESS.type,SAR_SAR_ACCESS.remark,SAR_SAR_ACCESS.relate_file,SAR_SAR_ACCESS.version,SAR_SAR_ACCESS.state
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1
<trim suffixOverrides=",">
<if test="applyArctic != null">
and apply_arctic = #{applyArctic}
</if>
<if test="energyKind != null">
and energy_kind = #{energyKind}
</if>
<if test="type != null">
and type = #{type}
</if>
<if test="modifyTime != null">
and modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null">
and modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null">
and modify_time &lt;= #{modifyTime2}
</if>
<if test="creationTime != null">
and creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null">
and creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null">
and creation_time &lt;= #{creationTime2}
</if>
<if test="creationUser != null">
and creation_user ${creationUserOperator} #{creationUser}
</if>
<if test="validFlag != null">
and SAR_SAR_ACCESS.valid_flag = #{validFlag}
</if>
<if test="accessContent != null">
and access_content ${accessContentOperator} concat(concat('%',#{accessContent}),'%')
</if>
<if test="country != null">
and country ${countryOperator} concat(concat('%',#{country}),'%')
</if>
<if test="id != null">
and id ${idOperator} #{id}
</if>
<if test="advanceSearchStr != null">
and (${advanceSearchStr})
</if>
</trim>
</sql>
<!-- 查询条件 -->
<sql id="PageBase_Where_Clause">
left join TS_USER on SAR_SAR_ACCESS.creation_user = TS_USER.usid
left join TS_DICTYPE dicountry on (dicountry.dic_type_code = SAR_SAR_ACCESS.country and dicountry.dic_id is not
null and dicountry.valid_flag = 0)
<if test="accessSarType != null">
LEFT JOIN SAR_SAR_ACCESS_INFO ON SAR_SAR_ACCESS.ID = SAR_SAR_ACCESS_INFO.ACCESS_ID
</if>
where 1=1
<trim suffixOverrides=",">
<if test="state != null">
and SAR_SAR_ACCESS.state = #{state}
</if>
<if test="applyArctic != null">
and SAR_SAR_ACCESS.apply_arctic = #{applyArctic}
</if>
<if test="energyKind != null">
and SAR_SAR_ACCESS.energy_kind = #{energyKind}
</if>
<if test="type != null">
and SAR_SAR_ACCESS.type = #{type}
</if>
<if test="validFlag != null">
and SAR_SAR_ACCESS.valid_flag = #{validFlag}
</if>
<if test="accessContent != null">
and access_content like concat(concat('%',#{accessContent}),'%')
</if>
<if test="country != null">
and country like concat('%',#{country},'%')
</if>
<if test="id != null">
and id ${idOperator} #{id}
</if>
<if test="keywords != null">
and access_content like concat('%',#{keywords},'%')
</if>
<if test="accessSarType != null">
and SAR_SAR_ACCESS_INFO.ACCESS_SAR_TYPE = #{accessSarType}
</if>
<if test="advanceSearchStr != null">
and (${advanceSearchStr})
</if>
</trim>
</sql>
<select id="selectAccessByRes" resultMap="BaseResultMap"
parameterType="com.adc.da.slrs.sarSarAccess.page.SarSarAccessEOPage">
select SAR_SAR_ACCESS.* from
SAR_SAR_ACCESS_INFO
left join SAR_SAR_ACCESS on SAR_SAR_ACCESS_INFO.access_id = SAR_SAR_ACCESS.id
where SAR_SAR_ACCESS.valid_flag=0 and SAR_SAR_ACCESS_INFO.valid_flag=0
and SAR_SAR_ACCESS_INFO.RES_ID=#{resId,jdbcType=VARCHAR} and SAR_TYPE=#{sarType,jdbcType=VARCHAR}
</select>
</mapper>
@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarSarAccessInfo.dao.SarSarAccessInfoDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarSarAccessInfo.entity.SarSarAccessInfo">
<id column="id" property="id"/>
<result column="modify_time" property="modifyTime"/>
<result column="creation_time" property="creationTime"/>
<result column="valid_flag" property="validFlag"/>
<result column="display_seq" property="displaySeq"/>
<result column="res_id" property="resId"/>
<result column="sar_type" property="sarType"/>
<result column="access_id" property="accessId"/>
<result column="standState" property="standState"/>
<result column="access_sar_type" property="accessSarType"/>
<result column="PERFORM_INFO" property="performInfo" />
<result column="ASK_NATURE" property="askNature" />
<result column="ACCESS_TYPE" property="accessType" />
<result column="AUTH_DELIVE" property="authDelive" />
<result column="AUTH_OBJ_ID" property="authObjId" />
<result column="AUTH_DEPART_ID" property="authDepartId" />
<result column="NEW_PUT_TIME" property="newPutTime" />
<result column="PROD_PUT_TIME" property="prodPutTime" />
<result column="EOP_PUT_TIME" property="eopPutTime" />
<result column="NEW_PUT_TEXT_TIME" property="newPutTextTime" />
<result column="PROD_PUT_TEXT_TIME" property="prodPutTextTime" />
<result column="EOP_PUT_TEXT_TIME" property="eopPutTextTime" />
<result column="country" property="country" />
<result column="GXHBQ" property="gxhbq" />
<result column="SYNOPSIS" property="synopsis" />
<result column="APPLY_ARCTIC" property="applyArctic" />
<result column="YQLX" property="yqlx" />
<result column="xgbm" property="XGBM" />
</resultMap>
<!-- SAR_SAR_ACCESS_INFO table all fields -->
<sql id="Base_Column_List">
modify_time, creation_time, valid_flag, display_seq, res_id, sar_type, access_id, id,access_sar_type,PERFORM_INFO,
ASK_NATURE,ACCESS_TYPE,AUTH_DELIVE,AUTH_OBJ_ID,AUTH_DEPART_ID,NEW_PUT_TIME,PROD_PUT_TIME,EOP_PUT_TIME,NEW_PUT_TEXT_TIME,PROD_PUT_TEXT_TIME,EOP_PUT_TEXT_TIME
</sql>
<sql id="Product_Column_List">
SAR_SAR_ACCESS_INFO.res_id, SAR_SAR_ACCESS_INFO.sar_type, SAR_SAR_ACCESS_INFO.access_sar_type,SAR_SAR_ACCESS_INFO.PERFORM_INFO,
SAR_SAR_ACCESS_INFO.ASK_NATURE,SAR_SAR_ACCESS_INFO.ACCESS_TYPE,SAR_SAR_ACCESS_INFO.AUTH_DELIVE,
SAR_SAR_ACCESS_INFO.AUTH_OBJ_ID,SAR_SAR_ACCESS_INFO.AUTH_DEPART_ID,SAR_SAR_ACCESS_INFO.NEW_PUT_TIME,
SAR_SAR_ACCESS_INFO.PROD_PUT_TIME,SAR_SAR_ACCESS_INFO.EOP_PUT_TIME,SAR_SAR_ACCESS_INFO.NEW_PUT_TEXT_TIME,
SAR_SAR_ACCESS_INFO.PROD_PUT_TEXT_TIME,SAR_SAR_ACCESS_INFO.EOP_PUT_TEXT_TIME
</sql>
<sql id="Group_Column_List">
res_id, sar_type, access_sar_type,PERFORM_INFO,
ASK_NATURE,ACCESS_TYPE,AUTH_DELIVE,
AUTH_OBJ_ID,AUTH_DEPART_ID,NEW_PUT_TIME,
PROD_PUT_TIME,EOP_PUT_TIME,NEW_PUT_TEXT_TIME,
PROD_PUT_TEXT_TIME,EOP_PUT_TEXT_TIME
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1
<trim suffixOverrides=",">
<if test="accessType !=null">
and ACCESS_TYPE =#{accessType}
</if>
<if test="askNature !=null">
and ASK_NATURE = #{askNature}
</if>
<if test="accessSarType != null">
and access_sar_type = #{accessSarType}
</if>
<if test="modifyTime != null">
and modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null">
and modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null">
and modify_time &lt;= #{modifyTime2}
</if>
<if test="creationTime != null">
and creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null">
and creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null">
and creation_time &lt;= #{creationTime2}
</if>
<if test="validFlag != null">
and valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="displaySeq != null">
and display_seq ${displaySeqOperator} #{displaySeq}
</if>
<if test="resId != null">
and res_id ${resIdOperator} #{resId}
</if>
<if test="sarType != null">
and sar_type ${sarTypeOperator} #{sarType}
</if>
<if test="accessId != null">
and access_id ${accessIdOperator} #{accessId}
</if>
<if test="id != null">
and id ${idOperator} #{id}
</if>
</trim>
</sql>
<select id="selectProTimeInfoByStandIdAndAccId" resultType="java.util.Map"
parameterType="java.lang.String">
SELECT
SAR_SAR_ACCESS_INFO.*
FROM SAR_SAR_ACCESS_INFO
left join SAR_SAR_ACCESS on SAR_SAR_ACCESS_INFO.ACCESS_ID=SAR_SAR_ACCESS.ID
WHERE
SAR_SAR_ACCESS_INFO.res_id = #{standId} and SAR_SAR_ACCESS_INFO.valid_flag = 0
and SAR_SAR_ACCESS.valid_flag = 0 and SAR_SAR_ACCESS_INFO.access_id = #{accId}
</select>
</mapper>