提交 87fa1fb1 作者: 刘伟刚

d代码修改更新28

上级 e90a5fa6
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
<component name="JavacSettings"> <component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE"> <option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="zzsn-cloud-gateway" options="-parameters" /> <module name="zzsn-cloud-gateway" options="-parameters" />
<module name="zzsn-cloud-system" options="-parameters" /> <module name="zzsn-cloud-kgj" options="-parameters" />
<module name="zzsn-cloud-system" options="" />
<module name="zzsn-cloud-system-api" options="-parameters" /> <module name="zzsn-cloud-system-api" options="-parameters" />
<module name="zzsn-cloud-system-biz" options="-parameters" /> <module name="zzsn-cloud-system-biz" options="-parameters" />
<module name="zzsn-common" options="" /> <module name="zzsn-common" options="" />
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -227,7 +227,8 @@ ...@@ -227,7 +227,8 @@
<dependency> <dependency>
<groupId>org.jeecgframework</groupId> <groupId>org.jeecgframework</groupId>
<artifactId>autopoi-web</artifactId> <artifactId>autopoi-web</artifactId>
<version>1.1.1</version> <!--<version>1.1.1</version>-->
<version>1.2.5</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>commons-codec</groupId> <groupId>commons-codec</groupId>
...@@ -435,4 +436,4 @@ ...@@ -435,4 +436,4 @@
</resource> </resource>
</resources> </resources>
</build> </build>
</project> </project>
\ No newline at end of file
package com.zzsn.common.poi;
import java.util.List;
public class BaseTableData {
private String tableNameCn;
private String tableName;
private List<Metadata> metaList;
private String orderBy;
private String order;
public BaseTableData(){
}
public BaseTableData(String tableNameCn, String tableName, List<Metadata> metaList){
this.tableNameCn = tableNameCn;
this.tableName = tableName;
this.metaList = metaList;
}
public BaseTableData(String tableNameCn, String tableName, List<Metadata> metaList, String orderBy, String order){
this(tableNameCn, tableName, metaList);
this.orderBy = orderBy;
this.order = order;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public List<Metadata> getMetaList() {
return metaList;
}
public void setMetaList(List<Metadata> metaList) {
this.metaList = metaList;
}
public String getOrderBy() {
return orderBy;
}
public void setOrderBy(String orderBy) {
this.orderBy = orderBy;
}
public String getOrder() {
return order;
}
public void setOrder(String order) {
this.order = order;
}
public String getTableNameCn() {
return tableNameCn;
}
public void setTableNameCn(String tableNameCn) {
this.tableNameCn = tableNameCn;
}
}
package com.zzsn.common.poi;
import java.text.DecimalFormat;
public class Constants {
/**
* The name of the ResourceBundle used in this application
*/
public static final String BUNDLE_KEY = "ApplicationResources";
public static String REPORT_FORM_FIELD_ATTRIBUTE_NAME = "WR_FORMFIELDS";
public static String REPORT_HAS_POST_PARAM_ATTRIBUTE_NAME = "WR_POSTPARAMS";
public static String REPORT_ECSIDE_LIST_ATTRIBUTE_NAME = "ECSIDE_LIST";
public static String REPORT_FUSIONCHART_XML_DATA = "fusionxml";
public static final String LOGIN_USER_SESSION_NAME = "user";
public static final String FSP = System.getProperty("file.separator");
public static final String DATE_PATTERN = "yyyy-MM-dd HH:mm:ss";
public static final String DATE_DAY_PATTERN = "yyyy-MM-dd";
public static final String USER_HOME = System.getProperty("user.home");
public static final String APPLICATION_DATA_DIR = USER_HOME+FSP+"mrasdata"+FSP;
//固化后取数结果文件存放文件夹
public static final String EXTRA_MKTSUPPORT_DATA = APPLICATION_DATA_DIR+"mktsupport"+FSP;
public static final String TEMP_FILES_DIR = System.getProperty("user.home")+Constants.FSP+"temp"+Constants.FSP;
public static final DecimalFormat NOZERO_FORMAT = new DecimalFormat("0");
public static final DecimalFormat ZERO_FORMAT = new DecimalFormat("0.00");
public static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.##");
public static final DecimalFormat PERCENT_FORMAT = new DecimalFormat("0.00%");
//取数结果文件存放文件夹
public static final String DATA_EXPORT = USER_HOME + FSP + "mras" + FSP;
/*
* excel 文件后缀标识
*/
public static final String EXCEL_FILE_SUFFIX = "D0CF11E0";
/*
* zip文件后缀标识
*/
public static final String ZIP_FILE_SUFFIX = "504B0304";
}
package com.zzsn.common.poi;
import com.zzsn.modules.kgj.entity.BaseDataImage;
import org.apache.commons.io.FileUtils;
import org.springframework.stereotype.Service;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Service
public class DownloadService {
// 临时文件夹路径
private static final String TEMPDIRECTORY = Constants.USER_HOME+Constants.FSP+"brap"+Constants.FSP
+ "download" + Constants.FSP;
/**
* 下载数据
* @return
* @throws
* @throws
*/
public static String downloadArticleWordUtils( Map<String,String> mapEntity,Map<String, String> parameter,
List<BaseDataImage> baseDataImages) throws Exception {
String fileName = parameter.get("fileName");
// 创建临时目录
// System.out.println("tempDirectory = " + TEMPDIRECTORY);
File directory = new File(TEMPDIRECTORY);
FileUtils.forceMkdir(directory);
String fileAbsolutePath = TEMPDIRECTORY + fileName;
// DownloadFileUtil.exportArticleWordByPoi(mapEntity, fileAbsolutePath);
DownloadFileUtil.exportArticleWordByPoiNew(mapEntity, fileAbsolutePath,baseDataImages);
return fileAbsolutePath;
}
}
...@@ -47,4 +47,8 @@ public class Contant { ...@@ -47,4 +47,8 @@ public class Contant {
//后台地图数据 redis缓存key是否失效: //后台地图数据 redis缓存key是否失效:
public static final String BACK_MAP_DATA_KEY_FLAG="BACK_MAP:FLAG"; public static final String BACK_MAP_DATA_KEY_FLAG="BACK_MAP:FLAG";
//大屏首页词云数据 redis缓存key:
public static final String WORD_CLOUD_KEY="WORD_CLOUD_SYS";
//大屏首页词云数据 redis缓存key是否失效:
public static final String WORD_CLOUD_KEY_FLAG="WORD_CLOUD_SYS:FLAG";
} }
package com.zzsn.modules.kgj.controller; package com.zzsn.modules.kgj.controller;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
...@@ -297,7 +299,7 @@ public class BaseDataController { ...@@ -297,7 +299,7 @@ public class BaseDataController {
* 获取大屏地图上所有公司的文章数、疑似数、确认数及经纬度 * 获取大屏地图上所有公司的文章数、疑似数、确认数及经纬度
* @param tid 分类id * @param tid 分类id
* @return 根据来源统计疑似信息(包含确认信息) * @return 根据来源统计疑似信息(包含确认信息)
*/ */
@ApiOperation(value = "获取大屏地图上所有公司的文章数、疑似数、确认数及经纬度") @ApiOperation(value = "获取大屏地图上所有公司的文章数、疑似数、确认数及经纬度")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "tid",value = "科工局组织常量",dataType = "Long"), @ApiImplicitParam(name = "tid",value = "科工局组织常量",dataType = "Long"),
...@@ -320,7 +322,6 @@ public class BaseDataController { ...@@ -320,7 +322,6 @@ public class BaseDataController {
//1个小时的状态是否失效 //1个小时的状态是否失效
String flag = redisTemplate.opsForValue().get(Contant.BIG_SCREEN_MAP_DATA_KEY_FLAG+s); String flag = redisTemplate.opsForValue().get(Contant.BIG_SCREEN_MAP_DATA_KEY_FLAG+s);
List<BaseDataVO> baseDataVOS = JSON.parseArray(string, BaseDataVO.class); List<BaseDataVO> baseDataVOS = JSON.parseArray(string, BaseDataVO.class);
if(StringUtils.isBlank(flag)){ if(StringUtils.isBlank(flag)){
List<Long> finalTypeList = typeList; List<Long> finalTypeList = typeList;
new Thread(() -> { new Thread(() -> {
...@@ -465,6 +466,7 @@ public class BaseDataController { ...@@ -465,6 +466,7 @@ public class BaseDataController {
@ApiImplicitParam(name = "siteTypeId",value = "网站分类",dataType = "Long"), @ApiImplicitParam(name = "siteTypeId",value = "网站分类",dataType = "Long"),
@ApiImplicitParam(name = "pTypeId",value = "父级分类ID(1-十大军工,2-论坛,3-高校)",dataType = "Long") @ApiImplicitParam(name = "pTypeId",value = "父级分类ID(1-十大军工,2-论坛,3-高校)",dataType = "Long")
}) })
@GetMapping("/wordCloud/more") @GetMapping("/wordCloud/more")
public ResultModel wordCloudMore(@RequestParam("searchKey") String searchKey,@RequestParam("typeId") String typeId, public ResultModel wordCloudMore(@RequestParam("searchKey") String searchKey,@RequestParam("typeId") String typeId,
@RequestParam("siteTypeId") Long siteTypeId, Long pTypeId){ @RequestParam("siteTypeId") Long siteTypeId, Long pTypeId){
...@@ -473,7 +475,42 @@ public class BaseDataController { ...@@ -473,7 +475,42 @@ public class BaseDataController {
if(siteTypeId!=null){ if(siteTypeId!=null){
typeList.add(siteTypeId); typeList.add(siteTypeId);
}else{ }else{
typeList = getSiteTypeIdsByPTypeId(pTypeId); typeList = getSiteTypeIdsByPTypeId(pTypeId );
}
String s = typeList.toString();
String string = redisTemplate.opsForValue().get(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY+s);
//1个小时的状态是否失效
String flag = redisTemplate.opsForValue().get(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY_FLAG+s);
List<WordCloud> WordClouds = JSON.parseArray(string, WordCloud.class);
if(StringUtils.isBlank(flag)){
List<Long> finalTypeList = typeList;
new Thread(() -> {
List<WordCloud> resultList = baseDataService.wordCloudMore(searchKey,typeId, finalTypeList);
redisTemplate.opsForValue().set(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY+s,JSON.toJSONString(resultList));
//有效时间1个小时
redisTemplate.opsForValue().set(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY_FLAG+s,"true",1,TimeUnit.HOURS);
}).start();
}
if (WordClouds!=null){
return ResultModel.OK(WordClouds);
}else{
List<WordCloud> list = baseDataService.wordCloudMore(searchKey,typeId,typeList);
return ResultModel.OK(list);
}
}
@GetMapping("/wordCloud/search")
public ResultModel wordCloudSearch(@RequestParam("searchKey") String searchKey,@RequestParam("typeId") String typeId,
@RequestParam("siteTypeId") Long siteTypeId, Long pTypeId){
// List<Long> typeList = getUserSiteType();
List<Long> typeList=new ArrayList<>();
if(siteTypeId!=null){
typeList.add(siteTypeId);
}else{
typeList = getSiteTypeIdsByPTypeId(pTypeId );
} }
String s = typeList.toString(); String s = typeList.toString();
......
...@@ -56,7 +56,7 @@ import com.zzsn.common.aspect.annotation.AutoLog; ...@@ -56,7 +56,7 @@ import com.zzsn.common.aspect.annotation.AutoLog;
public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSysSecretService> { public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSysSecretService> {
@Autowired @Autowired
private ICesSysSecretService cesSysSecretService; private ICesSysSecretService cesSysSecretService;
/** /**
* 分页列表查询 * 分页列表查询
* *
...@@ -91,7 +91,7 @@ public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSy ...@@ -91,7 +91,7 @@ public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSy
IPage<CesSysSecretVo> pageList = cesSysSecretService.selectByPage1(page,cesSysSecret); IPage<CesSysSecretVo> pageList = cesSysSecretService.selectByPage1(page,cesSysSecret);
return Result.ok(pageList); return Result.ok(pageList);
} }
/** /**
* 添加 * 添加
* *
...@@ -102,13 +102,38 @@ public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSy ...@@ -102,13 +102,38 @@ public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSy
@ApiOperation(value="密点表-添加", notes="密点表-通过参数传入json格式sysUser对象,在数据库中生成一条新的数据") @ApiOperation(value="密点表-添加", notes="密点表-通过参数传入json格式sysUser对象,在数据库中生成一条新的数据")
@PostMapping(value = "") @PostMapping(value = "")
public Result<?> add(@RequestBody CesSysSecret cesSysSecret) { public Result<?> add(@RequestBody CesSysSecret cesSysSecret) {
if(cesSysSecretService.isExist(cesSysSecret)){ try {
return Result.error("数据已经存在!"); String content = cesSysSecret.getContent();
if(content.contains(",")) {
Integer type = cesSysSecret.getType();
Long secretLevel = cesSysSecret.getSecretLevel();
String typeId = cesSysSecret.getTypeId();
String[] s = content.split(",");
for (int i = 0; i < s.length; i++) {
if (StringUtils.isNotEmpty(s[i])) {
CesSysSecret sysSecret = new CesSysSecret();
sysSecret.setContent(s[i]);
sysSecret.setType(type);
sysSecret.setSecretLevel(secretLevel);
sysSecret.setTypeId(typeId);
if (cesSysSecretService.isExist(sysSecret)) {
return Result.error("数据已经存在!");
}
cesSysSecretService.save(sysSecret);
}
}
}else{
if (cesSysSecretService.isExist(cesSysSecret)) {
return Result.error("数据已经存在!");
}
cesSysSecretService.save(cesSysSecret);
}
}catch (Exception e){
} }
cesSysSecretService.save(cesSysSecret);
return Result.ok("添加成功!"); return Result.ok("添加成功!");
} }
/** /**
* 编辑 * 编辑
* *
...@@ -125,7 +150,7 @@ public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSy ...@@ -125,7 +150,7 @@ public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSy
cesSysSecretService.updateById(cesSysSecret); cesSysSecretService.updateById(cesSysSecret);
return Result.ok("编辑成功!"); return Result.ok("编辑成功!");
} }
/** /**
* 通过id删除 * 通过id删除
* *
...@@ -140,7 +165,7 @@ public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSy ...@@ -140,7 +165,7 @@ public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSy
cesSysSecretService.removeById(id); cesSysSecretService.removeById(id);
return Result.ok("删除成功!"); return Result.ok("删除成功!");
} }
/** /**
* 批量删除 * 批量删除
* *
...@@ -157,7 +182,7 @@ public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSy ...@@ -157,7 +182,7 @@ public class CesSysSecretController extends JeecgController<CesSysSecret, ICesSy
this.cesSysSecretService.removeByIds(Arrays.asList(ids.split(","))); this.cesSysSecretService.removeByIds(Arrays.asList(ids.split(",")));
return Result.ok("批量删除成功!"); return Result.ok("批量删除成功!");
} }
/** /**
* 通过id查询 * 通过id查询
* *
......
...@@ -37,4 +37,9 @@ public interface BaseDataImageMapper extends BaseMapper<BaseDataImage> { ...@@ -37,4 +37,9 @@ public interface BaseDataImageMapper extends BaseMapper<BaseDataImage> {
* 通过ID批量查询 * 通过ID批量查询
*/ */
List<BaseDataImage> selectByIds(@Param("list") List<String> ids); List<BaseDataImage> selectByIds(@Param("list") List<String> ids);
/**
* 通过ID批量查询
*/
List<BaseDataImage> selectByBIds(String bid);
} }
...@@ -104,6 +104,7 @@ public interface BaseDataMapper extends BaseMapper<Basedata> { ...@@ -104,6 +104,7 @@ public interface BaseDataMapper extends BaseMapper<Basedata> {
List<Basedata> selectIds(); List<Basedata> selectIds();
List<BaseDataVO> getAllCorpDataList(@Param("tid")Long tid,@Param("delflag2")Long delflag2, @Param("delflag3") Long delflag3, @Param("list") List<Long> typeList); List<BaseDataVO> getAllCorpDataList(@Param("tid")Long tid,@Param("delflag2")Long delflag2, @Param("delflag3") Long delflag3, @Param("list") List<Long> typeList);
List<BaseDataVO> getSuspectDataBytypeid(@Param("tid") Long tid, @Param("delflag") Long type,@Param("list") List<Long> typeList); List<BaseDataVO> getSuspectDataBytypeid(@Param("tid") Long tid, @Param("delflag") Long type,@Param("list") List<Long> typeList);
List<BaseDataVO> getAllContentDataList(@Param("tid")Long tid,@Param("delflag2")Long delflag2, List<BaseDataVO> getAllContentDataList(@Param("tid")Long tid,@Param("delflag2")Long delflag2,
......
...@@ -113,6 +113,13 @@ public interface CisAnsBasedataMapper extends BaseMapper<CisAnsBasedata> { ...@@ -113,6 +113,13 @@ public interface CisAnsBasedataMapper extends BaseMapper<CisAnsBasedata> {
Integer offset, Integer offset1); Integer offset, Integer offset1);
Integer selectByIdsAndTypIdCount(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList Integer selectByIdsAndTypIdCount(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList
,Integer offse , Integer offset1); ,Integer offse , Integer offset1);
//密点词搜索
List<CisAnsBasedata> selectByKeyWords(String searchKey, String beginTime,String endTime,@Param("webList") List<Long> webList, Integer offset , Integer offset1);
Integer selectByKeyWordsCount(String searchKey,String beginTime,String endTime,@Param("webList") List<Long> webList, Integer offset , Integer offset1);
@DS("master") @DS("master")
List<CisAnsBasedata> selectByOlnyIds(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList,@Param("siteId") Long siteId); List<CisAnsBasedata> selectByOlnyIds(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList,@Param("siteId") Long siteId);
......
...@@ -25,6 +25,13 @@ ...@@ -25,6 +25,13 @@
#{item} #{item}
</foreach> </foreach>
</select> </select>
<select id="selectByBIds" resultMap="baseDataMap">
select * from CIS_ANS_BASEDATA_IMAGE
where 1=1 and
bid = #{bid}
</select>
<insert id="insertList" parameterType="java.util.List" useGeneratedKeys="false"> <insert id="insertList" parameterType="java.util.List" useGeneratedKeys="false">
insert into CIS_ANS_BASEDATA_IMAGE ( insert into CIS_ANS_BASEDATA_IMAGE (
ID, DATAIMAGE,BID ID, DATAIMAGE,BID
...@@ -36,4 +43,4 @@ ...@@ -36,4 +43,4 @@
from dual) from dual)
</foreach> </foreach>
</insert> </insert>
</mapper> </mapper>
\ No newline at end of file
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
</select> </select>
<select id="getDataCount" resultType="Long"> <select id="getDataCount" resultType="Long">
select count(1) from ( select count(1) from (
select B.id, B.PUBLISH_DATE from CIS_ANS_BASEDATA B select B.id, B.PUBLISH_DATE from (select * from cis_ans_basedata where publish_date > TO_CHAR((select sysdate - interval '1' year as starttime from dual) , 'YYYY-MM-DD')) B
inner join ( inner join (
select t.* from CIS_ANS_BASEDATA_TYPE T select t.* from CIS_ANS_BASEDATA_TYPE T
where 1=1 where 1=1
...@@ -613,7 +613,7 @@ ...@@ -613,7 +613,7 @@
<select id="getSuspectDataBytypeid" resultType="com.zzsn.modules.kgj.entity.BaseDataVO"> <select id="getSuspectDataBytypeid" resultType="com.zzsn.modules.kgj.entity.BaseDataVO">
select c.TYPEID as siteTypeId,c.CHNAME as siteTypeName ,count(1) as count from ( select c.TYPEID as siteTypeId,c.CHNAME as siteTypeName ,count(1) as count from (
select B.ID select B.ID
from CIS_ANS_BASEDATA B from (select * from cis_ans_basedata where publish_date > TO_CHAR((select sysdate - interval '1' year as starttime from dual) , 'YYYY-MM-DD')) B
inner join CIS_ANS_BASEDATA_TYPE T on t.bid=b.id inner join CIS_ANS_BASEDATA_TYPE T on t.bid=b.id
where 1=1 where 1=1
<if test="tid!=null "> <if test="tid!=null ">
...@@ -862,7 +862,7 @@ ...@@ -862,7 +862,7 @@
</select> </select>
<select id="getKeyWordCloud" resultType="java.util.Map"> <select id="getKeyWordCloud" resultType="java.util.Map">
select replace(replace(B.KEYWORDS, CHR(13), ';'), CHR(10), ';') as "reliability" from CIS_ANS_BASEDATA B select replace(replace(B.reliability, CHR(13), ';'), CHR(10), ';') as "reliability" from CIS_ANS_BASEDATA B
inner join (select t.* from CIS_ANS_BASEDATA_TYPE T inner join (select t.* from CIS_ANS_BASEDATA_TYPE T
where 1 = 1 where 1 = 1
) N on N.bid=B.id ) N on N.bid=B.id
...@@ -905,7 +905,7 @@ ...@@ -905,7 +905,7 @@
inner join cis_col_site_type c on c.id = b.typeid inner join cis_col_site_type c on c.id = b.typeid
left join ( left join (
select t1.id,t3.web_id select t1.id,t3.web_id
from cis_ans_basedata t1 from (select * from cis_ans_basedata where publish_date > TO_CHAR((select sysdate - interval '1' year as starttime from dual) , 'YYYY-MM-DD')) t1
inner join cis_ans_basedata_type t2 on t1.id = t2.bid inner join cis_ans_basedata_type t2 on t1.id = t2.bid
inner join cis_basedata_web_mid t3 on t1.id = t3.bid inner join cis_basedata_web_mid t3 on t1.id = t3.bid
where 1=1 where 1=1
...@@ -915,7 +915,7 @@ ...@@ -915,7 +915,7 @@
) d on a.id = d.web_id ) d on a.id = d.web_id
left join ( left join (
select t3.web_id,max(t3.secret_level) as secretLevel select t3.web_id,max(t3.secret_level) as secretLevel
from cis_ans_basedata t1 from (select * from cis_ans_basedata where publish_date > TO_CHAR((select sysdate - interval '1' year as starttime from dual) , 'YYYY-MM-DD')) t1
inner join cis_ans_basedata_type t2 on t1.id = t2.bid inner join cis_ans_basedata_type t2 on t1.id = t2.bid
inner join cis_basedata_web_mid t3 on t1.id = t3.bid inner join cis_basedata_web_mid t3 on t1.id = t3.bid
where 1=1 where 1=1
...@@ -938,7 +938,7 @@ ...@@ -938,7 +938,7 @@
select c.id, count(1) as tcount select c.id, count(1) as tcount
from ( from (
select B.ID select B.ID
from CIS_ANS_BASEDATA B from (select * from cis_ans_basedata where publish_date > TO_CHAR((select sysdate - interval '1' year as starttime from dual) , 'YYYY-MM-DD')) B
inner join CIS_ANS_BASEDATA_TYPE T on t.bid=b.id inner join CIS_ANS_BASEDATA_TYPE T on t.bid=b.id
where 1=1 where 1=1
<if test="tid!=null "> <if test="tid!=null ">
...@@ -968,7 +968,7 @@ ...@@ -968,7 +968,7 @@
select c.id, count(1) as tcount select c.id, count(1) as tcount
from ( from (
select B.ID select B.ID
from CIS_ANS_BASEDATA B from (select * from cis_ans_basedata where publish_date > TO_CHAR((select sysdate - interval '1' year as starttime from dual) , 'YYYY-MM-DD')) B
inner join CIS_ANS_BASEDATA_TYPE T on t.bid=b.id inner join CIS_ANS_BASEDATA_TYPE T on t.bid=b.id
where 1=1 where 1=1
<if test="tid!=null "> <if test="tid!=null ">
......
...@@ -247,11 +247,16 @@ ...@@ -247,11 +247,16 @@
AND #{publishDate_end} > t.publish_date AND #{publishDate_end} > t.publish_date
</if> </if>
<if test='delflag != null'> <if test='delflag != null'>
<if test='delflag =="2" or delflag =="3" '> <if test='delflag =="2" '>
and t.delflag = #{delflag} <!-- and t.delflag in ('2') -->
and m.secret_level <![CDATA[ > ]]> '30'
</if>
<if test='delflag =="3" '>
and t.delflag ='3'
</if> </if>
<if test='delflag =="1"'> <if test='delflag =="1"'>
and t.delflag not in ('0','2','3') <!--and t.delflag not in ('2','3') -->
and m.secret_level <![CDATA[<=]]> '30'
</if> </if>
</if> </if>
<if test='min != null and min!="0"'> <if test='min != null and min!="0"'>
...@@ -450,11 +455,16 @@ ...@@ -450,11 +455,16 @@
AND t.publish_date > #{publishDate_begin} AND t.publish_date > #{publishDate_begin}
</if> </if>
<if test='delflag != null'> <if test='delflag != null'>
<if test='delflag =="2" or delflag =="3" '> <if test='delflag =="2" '>
and t.delflag = #{delflag} <!-- and t.delflag in ('2') -->
and m.secret_level <![CDATA[ > ]]> '30'
</if>
<if test='delflag =="3" '>
and t.delflag ='3'
</if> </if>
<if test='delflag =="1"'> <if test='delflag =="1"'>
and t.delflag NOT IN ('0','2','3') <!--and t.delflag not in ('2','3') -->
and m.secret_level <![CDATA[<=]]> '30'
</if> </if>
</if> </if>
<if test="publishDate_end!=null and publishDate_end!=''"> <if test="publishDate_end!=null and publishDate_end!=''">
...@@ -589,41 +599,43 @@ ...@@ -589,41 +599,43 @@
</if> </if>
WHERE b.isdelete = 1 WHERE b.isdelete = 1
AND b.locale not in ('2','3','4') AND b.locale not in ('2','3','4')
AND t.tid = 16865 AND b.id>20092000000000 AND t.org_id=3942 AND t.tid = 16865 AND b.id>20090100000001 AND t.org_id=3942
<if test="title!=null and title!=''"> <if test="title!=null and title!=''">
AND b.title like #{title} AND b.title like #{title}
</if> </if>
<if test='delflag != null'> <if test='delflag != null'>
<if test='delflag =="2" '> <if test='delflag =="2" '>
and t.delflag in ('2','3') <!-- and t.delflag in ('2') -->
and m.secret_level <![CDATA[ > ]]> '30'
</if> </if>
<if test='delflag =="3" '> <if test='delflag =="3" '>
and t.delflag ='3' and t.delflag ='3'
</if> </if>
<if test='delflag =="1"'> <if test='delflag =="1"'>
and t.delflag not in ('0','2','3') <!--and t.delflag not in ('2','3') -->
and m.secret_level <![CDATA[<=]]> '30'
</if> </if>
</if> </if>
<if test="publishDate_begin!=null and publishDate_begin!=''"> <if test="publishDate_begin!=null and publishDate_begin!=''">
AND t.publish_date > #{publishDate_begin} AND t.publish_date > #{publishDate_begin}
</if> </if>
<if test="publishDate_end!=null and publishDate_end!=''"> <if test="publishDate_end!=null and publishDate_end!=''">
AND #{publishDate_end} > t.publish_date AND #{publishDate_end} > t.publish_date
</if> </if>
<if test="list!=null and list.size>0"> <if test="list!=null and list.size>0">
and s.TYPEID in and s.TYPEID in
<foreach collection="list" open="(" close=")" separator="," item="item"> <foreach collection="list" open="(" close=")" separator="," item="item">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="siteId != null and siteId != ''"> <if test="siteId != null and siteId != ''">
and m.WEB_ID = #{siteId} and m.WEB_ID = #{siteId}
</if> </if>
order by t.publish_date desc ,t.id desc) TMP_PAGE order by t.publish_date desc ,t.id desc) TMP_PAGE
WHERE ROWNUM <![CDATA[<=]]> #{offset1}) WHERE ROWNUM <![CDATA[<=]]> #{offset1})
WHERE ROW_ID <![CDATA[>]]> #{offset} WHERE ROW_ID <![CDATA[>]]> #{offset}
</select> </select>
<select id="getCisAnsBasedataCountByserect" parameterType="Map" resultType="java.lang.Integer"> <select id="getCisAnsBasedataCountByserect" parameterType="Map" resultType="java.lang.Integer">
...@@ -639,7 +651,7 @@ ...@@ -639,7 +651,7 @@
</if> </if>
WHERE b.isdelete = 1 WHERE b.isdelete = 1
AND b.locale not in ('2','3','4') AND b.locale not in ('2','3','4')
AND t.tid = 16865 AND b.id>20092000000000 AND t.org_id=3942 AND t.tid = 16865 AND b.id>20090100000001 AND t.org_id=3942
<if test="publishDate_begin!=null and publishDate_begin!=''"> <if test="publishDate_begin!=null and publishDate_begin!=''">
AND t.publish_date > #{publishDate_begin} AND t.publish_date > #{publishDate_begin}
...@@ -647,17 +659,19 @@ ...@@ -647,17 +659,19 @@
<if test="publishDate_end!=null and publishDate_end!=''"> <if test="publishDate_end!=null and publishDate_end!=''">
AND #{publishDate_end} > t.publish_date AND #{publishDate_end} > t.publish_date
</if> </if>
<if test='delflag != null'> <if test='delflag != null'>
<if test='delflag =="2" '> <if test='delflag =="2" '>
and t.delflag in ('2','3') <!-- and t.delflag in ('2') -->
</if> and m.secret_level <![CDATA[ > ]]> '30'
<if test='delflag =="3" '> </if>
and t.delflag ='3' <if test='delflag =="3" '>
</if> and t.delflag ='3'
<if test='delflag =="1"'> </if>
and t.delflag not in ('0','2','3') <if test='delflag =="1"'>
</if> <!--and t.delflag not in ('2','3') -->
</if> and m.secret_level <![CDATA[<=]]> '30'
</if>
</if>
<if test="list!=null and list.size>0"> <if test="list!=null and list.size>0">
and s.TYPEID in and s.TYPEID in
<foreach collection="list" open="(" close=")" separator="," item="item"> <foreach collection="list" open="(" close=")" separator="," item="item">
...@@ -744,4 +758,74 @@ ...@@ -744,4 +758,74 @@
</select> </select>
<select id="selectByKeyWords" parameterType="java.util.List" resultType="com.zzsn.modules.kgj.entity.CisAnsBasedata">
SELECT *
FROM (
SELECT TMP_PAGE.*, ROWNUM ROW_ID
FROM (
SELECT b.id,
b.publish_date,
b.title,
b.content,
b.KEYWORDS,
b.origin,
b.sourceaddress,
b.author,
b.summary,
b.CONTENT_NO_TAG,
b.reliability,
b.locale
FROM cis_ans_basedata b
left join CIS_BASEDATA_WEB_MID m on b.ID=m.BID
left join CIS_COL_SITE_TYPE_MID s on s.SITEID=m.WEB_ID
<trim prefix="where" prefixOverrides="and">
<if test="searchKey!=null and searchKey !='' ">
b.RELIABILITY like #{searchKey}
</if>
<if test="beginTime!=null and beginTime!=''">
AND b.publish_date > #{beginTime}
</if>
<if test="endTime!=null and endTime!=''">
AND #{endTime} > b.publish_date
</if>
<if test="webList!=null and webList.size>0">
and s.TYPEID in
<foreach collection="webList" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</if>
</trim>
order by b.publish_date desc) TMP_PAGE
WHERE ROWNUM <![CDATA[<=]]> #{offset1})
WHERE ROW_ID <![CDATA[>]]> #{offset}
</select>
<select id="selectByKeyWordsCount" parameterType="java.util.List" resultType="java.lang.Integer">
SELECT count(1)
FROM cis_ans_basedata b
left join CIS_BASEDATA_WEB_MID m on b.ID=m.BID
left join CIS_COL_SITE_TYPE_MID s on s.SITEID=m.WEB_ID
<trim prefix="where" prefixOverrides="and">
<if test="searchKey!=null and searchKey !='' ">
b.RELIABILITY like #{searchKey}
</if>
<if test="beginTime!=null and beginTime!=''">
AND b.publish_date > #{beginTime}
</if>
<if test="endTime!=null and endTime!=''">
AND #{endTime} > b.publish_date
</if>
<if test="webList!=null and webList.size>0">
and s.TYPEID in
<foreach collection="webList" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</if>
</trim>
</select>
</mapper> </mapper>
...@@ -24,6 +24,7 @@ import com.zzsn.modules.system.service.ISysRolePermissionService; ...@@ -24,6 +24,7 @@ import com.zzsn.modules.system.service.ISysRolePermissionService;
import com.zzsn.modules.system.service.ISysRoleService; import com.zzsn.modules.system.service.ISysRoleService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams; import org.jeecgframework.poi.excel.entity.ImportParams;
...@@ -65,13 +66,13 @@ import lombok.extern.slf4j.Slf4j; ...@@ -65,13 +66,13 @@ import lombok.extern.slf4j.Slf4j;
public class SysRoleController { public class SysRoleController {
@Autowired @Autowired
private ISysRoleService sysRoleService; private ISysRoleService sysRoleService;
@Autowired @Autowired
private ISysPermissionDataRuleService sysPermissionDataRuleService; private ISysPermissionDataRuleService sysPermissionDataRuleService;
@Autowired @Autowired
private ISysRolePermissionService sysRolePermissionService; private ISysRolePermissionService sysRolePermissionService;
@Autowired @Autowired
private ISysPermissionService sysPermissionService; private ISysPermissionService sysPermissionService;
...@@ -90,6 +91,10 @@ public class SysRoleController { ...@@ -90,6 +91,10 @@ public class SysRoleController {
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
String roleName = role.getRoleName();
if(StringUtils.isNotEmpty(roleName)){
role.setRoleName("*"+roleName+"*");
}
Result<IPage<SysRole>> result = new Result<IPage<SysRole>>(); Result<IPage<SysRole>> result = new Result<IPage<SysRole>>();
QueryWrapper<SysRole> queryWrapper = QueryGenerator.initQueryWrapper(role, req.getParameterMap()); QueryWrapper<SysRole> queryWrapper = QueryGenerator.initQueryWrapper(role, req.getParameterMap());
Page<SysRole> page = new Page<SysRole>(pageNo, pageSize); Page<SysRole> page = new Page<SysRole>(pageNo, pageSize);
...@@ -98,7 +103,7 @@ public class SysRoleController { ...@@ -98,7 +103,7 @@ public class SysRoleController {
result.setResult(pageList); result.setResult(pageList);
return result; return result;
} }
/** /**
* 添加 * 添加
* @param role * @param role
...@@ -120,7 +125,7 @@ public class SysRoleController { ...@@ -120,7 +125,7 @@ public class SysRoleController {
} }
return result; return result;
} }
/** /**
* 编辑 * 编辑
* @param role * @param role
...@@ -143,10 +148,10 @@ public class SysRoleController { ...@@ -143,10 +148,10 @@ public class SysRoleController {
result.success("修改成功!"); result.success("修改成功!");
} }
} }
return result; return result;
} }
/** /**
* 通过id删除 * 通过id删除
* @param id * @param id
...@@ -160,7 +165,7 @@ public class SysRoleController { ...@@ -160,7 +165,7 @@ public class SysRoleController {
sysRoleService.deleteRole(id); sysRoleService.deleteRole(id);
return Result.ok("删除角色成功"); return Result.ok("删除角色成功");
} }
/** /**
* 批量删除 * 批量删除
* @param ids * @param ids
...@@ -180,7 +185,7 @@ public class SysRoleController { ...@@ -180,7 +185,7 @@ public class SysRoleController {
} }
return result; return result;
} }
/** /**
* 通过id查询 * 通过id查询
* @param id * @param id
...@@ -200,7 +205,7 @@ public class SysRoleController { ...@@ -200,7 +205,7 @@ public class SysRoleController {
} }
return result; return result;
} }
@RequestMapping(value = "/queryall", method = RequestMethod.GET) @RequestMapping(value = "/queryall", method = RequestMethod.GET)
public Result<List<SysRole>> queryall() { public Result<List<SysRole>> queryall() {
Result<List<SysRole>> result = new Result<>(); Result<List<SysRole>> result = new Result<>();
...@@ -213,7 +218,7 @@ public class SysRoleController { ...@@ -213,7 +218,7 @@ public class SysRoleController {
} }
return result; return result;
} }
/** /**
* 校验角色编码唯一 * 校验角色编码唯一
*/ */
...@@ -303,7 +308,7 @@ public class SysRoleController { ...@@ -303,7 +308,7 @@ public class SysRoleController {
} }
return Result.error("文件导入失败!"); return Result.error("文件导入失败!");
} }
/** /**
* 查询数据规则数据 * 查询数据规则数据
*/ */
...@@ -332,7 +337,7 @@ public class SysRoleController { ...@@ -332,7 +337,7 @@ public class SysRoleController {
//TODO 以后按钮权限的查询也走这个请求 无非在map中多加两个key //TODO 以后按钮权限的查询也走这个请求 无非在map中多加两个key
} }
} }
/** /**
* 保存数据规则至角色菜单关联表 * 保存数据规则至角色菜单关联表
*/ */
...@@ -359,8 +364,8 @@ public class SysRoleController { ...@@ -359,8 +364,8 @@ public class SysRoleController {
} }
return Result.ok("保存成功!"); return Result.ok("保存成功!");
} }
/** /**
* 用户角色授权功能,查询菜单权限树 * 用户角色授权功能,查询菜单权限树
* @param request * @param request
...@@ -452,7 +457,7 @@ public class SysRoleController { ...@@ -452,7 +457,7 @@ public class SysRoleController {
tree.sortChildren(); tree.sortChildren();
} }
} }
private void getTreeModelList(List<TreeModel> treeList,List<SysPermission> metaList,TreeModel temp) { private void getTreeModelList(List<TreeModel> treeList,List<SysPermission> metaList,TreeModel temp) {
for (SysPermission permission : metaList) { for (SysPermission permission : metaList) {
String tempPid = permission.getParentId(); String tempPid = permission.getParentId();
...@@ -468,9 +473,9 @@ public class SysRoleController { ...@@ -468,9 +473,9 @@ public class SysRoleController {
getTreeModelList(treeList, metaList, tree); getTreeModelList(treeList, metaList, tree);
} }
} }
} }
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论