add:政策资料查询添加字段
This commit is contained in:
+24
@@ -35,24 +35,48 @@ public class SarLawsInformation extends BasePage implements Serializable {
|
||||
@TableField(value = "FIRST_TYPE")
|
||||
private String firstType;
|
||||
|
||||
/**
|
||||
* 一级资料类别名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String firstTypeName;
|
||||
|
||||
/**
|
||||
* 二级资料类别
|
||||
*/
|
||||
@TableField(value = "SECOND_TYPE")
|
||||
private String secondType;
|
||||
|
||||
/**
|
||||
* 二级资料类别名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String secondTypeName;
|
||||
|
||||
/**
|
||||
* 三级资料类别
|
||||
*/
|
||||
@TableField(value = "THIRD_TYPE")
|
||||
private String thirdType;
|
||||
|
||||
/**
|
||||
* 三级资料类别名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String thirdTypeName;
|
||||
|
||||
/**
|
||||
* 四级资料类别
|
||||
*/
|
||||
@TableField(value = "FOURTH_TYPE")
|
||||
private String fourthType;
|
||||
|
||||
/**
|
||||
* 四级资料类别名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String fourthTypeName;
|
||||
|
||||
/**
|
||||
* 资料名称
|
||||
*/
|
||||
|
||||
+17
@@ -4,6 +4,7 @@ import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.slrs.sarLawsInformationCenterTree.entity.SarLawsInformationCenterTree;
|
||||
import com.adc.da.slrs.sarLawsInformationCenterTree.service.SarLawsInformationCenterTreeService;
|
||||
import com.adc.da.slrs.tsDictionaryType.service.ITsDicTypeService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -31,10 +32,25 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
|
||||
private SarLawsInformationCenterTreeService treeService;
|
||||
@Resource
|
||||
private IAttFileEOService attFileEOService;
|
||||
@Resource
|
||||
private ITsDicTypeService dicTypeService;
|
||||
|
||||
@Override
|
||||
public SarLawsInformation getLawsInformationInfo(String id) {
|
||||
SarLawsInformation sarLawsInformation = this.baseMapper.selectById(id);
|
||||
// 根据类别Id查询类别名称
|
||||
if (StringUtils.isNotBlank(sarLawsInformation.getFirstType())) {
|
||||
sarLawsInformation.setFirstTypeName(dicTypeService.getDicTypeNameByDicCode(sarLawsInformation.getFirstType()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(sarLawsInformation.getSecondType())) {
|
||||
sarLawsInformation.setSecondTypeName(dicTypeService.getDicTypeNameByDicCode(sarLawsInformation.getSecondType()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(sarLawsInformation.getThirdType())) {
|
||||
sarLawsInformation.setThirdTypeName(dicTypeService.getDicTypeNameByDicCode(sarLawsInformation.getThirdType()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(sarLawsInformation.getFourthType())) {
|
||||
sarLawsInformation.setFourthTypeName(dicTypeService.getDicTypeNameByDicCode(sarLawsInformation.getFourthType()));
|
||||
}
|
||||
// 查询资料文件信息
|
||||
if (StringUtils.isNotBlank(sarLawsInformation.getInformationFile())) {
|
||||
String[] split = sarLawsInformation.getInformationFile().split(",");
|
||||
@@ -72,6 +88,7 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
|
||||
public Integer addLawsInformation(SarLawsInformation sarLawsInformation) {
|
||||
sarLawsInformation.setCreateTime(new Date());
|
||||
sarLawsInformation.setModifyTime(new Date());
|
||||
sarLawsInformation.setUploadTime(new Date());
|
||||
sarLawsInformation.setValidFlag(0);
|
||||
// 若体系类别不存在,则默认属于根节点
|
||||
if (StringUtils.isBlank(sarLawsInformation.getTreeNodeId())) {
|
||||
|
||||
@@ -16,4 +16,6 @@ import java.util.List;
|
||||
*/
|
||||
public interface TsDicTypeDao extends BaseMapper<TsDicType> {
|
||||
public List<TsSearchMenu> getSearchMenu();
|
||||
|
||||
String selectDicTypeNameByDicCode(String typeCode);
|
||||
}
|
||||
|
||||
+7
@@ -18,4 +18,11 @@ public interface ITsDicTypeService extends IService<TsDicType> {
|
||||
|
||||
public List<TsSearchMenu> getSearchMenu();
|
||||
|
||||
/**
|
||||
* 根据数据字典编码查询字典值
|
||||
* @param typeCode 字典编码
|
||||
* @return 字典值
|
||||
*/
|
||||
public String getDicTypeNameByDicCode(String typeCode);
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -25,4 +25,9 @@ public class TsDicTypeServiceImpl extends ServiceImpl<TsDicTypeDao, TsDicType> i
|
||||
public List<TsSearchMenu> getSearchMenu() {
|
||||
return getBaseMapper().getSearchMenu();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDicTypeNameByDicCode(String typeCode) {
|
||||
return this.baseMapper.selectDicTypeNameByDicCode(typeCode);
|
||||
}
|
||||
}
|
||||
|
||||
+14
-2
@@ -7,9 +7,13 @@
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarLawsInformation.entity.SarLawsInformation">
|
||||
<id property="id" column="ID" jdbcType="VARCHAR"/>
|
||||
<result property="firstType" column="FIRST_TYPE" jdbcType="VARCHAR"/>
|
||||
<result property="firstTypeName" column="firstTypeName" jdbcType="VARCHAR"/>
|
||||
<result property="secondType" column="SECOND_TYPE" jdbcType="VARCHAR"/>
|
||||
<result property="secondTypeName" column="secondTypeName" jdbcType="VARCHAR"/>
|
||||
<result property="thirdType" column="THIRD_TYPE" jdbcType="VARCHAR"/>
|
||||
<result property="thirdTypeName" column="thirdTypeName" jdbcType="VARCHAR"/>
|
||||
<result property="fourthType" column="FOURTH_TYPE" jdbcType="VARCHAR"/>
|
||||
<result property="fourthTypeName" column="fourthTypeName" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="NAME" jdbcType="VARCHAR"/>
|
||||
<result property="department" column="DEPARTMENT" jdbcType="VARCHAR"/>
|
||||
<result property="author" column="AUTHOR" jdbcType="VARCHAR"/>
|
||||
@@ -25,8 +29,16 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
ID,FIRST_TYPE,SECOND_TYPE,
|
||||
THIRD_TYPE,FOURTH_TYPE,`NAME`,
|
||||
ID,
|
||||
FIRST_TYPE,
|
||||
(select DIC_TYPE_NAME from ts_dictype where DIC_ID = (SELECT ID FROM `ts_dictionary` where DICTIONARY_CODE = "firstMaterialType") and DIC_TYPE_CODE = FIRST_TYPE) firstTypeName,
|
||||
SECOND_TYPE,
|
||||
(select DIC_TYPE_NAME from ts_dictype where DIC_ID = (SELECT ID FROM `ts_dictionary` where DICTIONARY_CODE = "secondMaterialType") and DIC_TYPE_CODE = SECOND_TYPE) secondTypeName,
|
||||
THIRD_TYPE,
|
||||
(select DIC_TYPE_NAME from ts_dictype where DIC_ID = (SELECT ID FROM `ts_dictionary` where DICTIONARY_CODE = "thirdMaterialType") and DIC_TYPE_CODE = THIRD_TYPE) thirdTypeName,
|
||||
FOURTH_TYPE,
|
||||
(select DIC_TYPE_NAME from ts_dictype where DIC_ID = (SELECT ID FROM `ts_dictionary` where DICTIONARY_CODE = "fourthMaterialType") and DIC_TYPE_CODE = FOURTH_TYPE) fourthTypeName,
|
||||
`NAME`,
|
||||
DEPARTMENT,AUTHOR,UPLOAD_TIME,
|
||||
`DESCRIPTION`,INFORMATION_FILE,VIEWABLE_BY,
|
||||
DOWNLOADABLE_BY,VALID_FLAG,CREATE_TIME,
|
||||
|
||||
@@ -28,4 +28,7 @@
|
||||
t_d_t.DIC_TYPE_NAME is not null and
|
||||
t_d.DICTIONARY_NAME is not null
|
||||
</select>
|
||||
<select id="selectDicTypeNameByDicCode" resultType="java.lang.String">
|
||||
select DIC_TYPE_NAME from ts_dictype where DIC_TYPE_CODE = #{typeCode}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user