Commit 842eb165 by 宋珺琪

修改数据分析相关表名(湖南)

parent d9f1ad4c
......@@ -21,7 +21,7 @@ import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ksh_tb_st_rygx")
@TableName("ksh_st_rygx")
@ApiModel(value = "SkTbStRygx对象", description = "")
public class HnTbStRygx implements Serializable {
......
......@@ -26,7 +26,7 @@ import java.util.List;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ksh_tb_st_rygx_rw")
@TableName("ksh_st_rygx_rw")
@ApiModel(value="SkTbStRygxRw对象", description="")
public class HnTbStRygxRw implements Serializable {
......
......@@ -538,9 +538,9 @@ public class HnTbStRygxController {
String taskId = excelInfo.getParentId();
String createName = excelInfo.getCreateName();
String postfix = excelInfo.getExcelPostfix();
//删除 ksh_tb_st_rygx_rw表的Excel信息
//删除 ksh_st_rygx_rw表的Excel信息
hnKshRwService.remove(new QueryWrapper<HnTbStRygxRw>().eq("EXCEL_ID", excelId));
//删除ksh_tb_st_rygx的数据
//删除ksh_st_rygx的数据
hnKshService.remove(new QueryWrapper<HnTbStRygx>().eq("EXCEL_ID", excelId));
//删除redis上该任务编号的数据
deleteByPrexInRedis(createName + ":" + taskId + "*");
......@@ -565,12 +565,12 @@ public class HnTbStRygxController {
if (rwList.isEmpty()) {
return Result.error().message("不存在该任务");
}
//删除 ksh_tb_st_rygx_rw表的Excel信息
//删除 ksh_st_rygx_rw表的Excel信息
//1.删除任务
hnKshRwService.remove(new QueryWrapper<HnTbStRygxRw>().eq("RWID", taskId));
//2.删除该任务下的Excel
hnKshRwService.remove(new QueryWrapper<HnTbStRygxRw>().eq("PARENT_ID", taskId));
//3.删除ksh_tb_st_rygx的数据
//3.删除ksh_st_rygx的数据
hnKshService.remove(new QueryWrapper<HnTbStRygx>().eq("RWID", taskId));
//删除服务器上的文件
String createName = rwList.get(0).getCreateName();
......@@ -606,9 +606,9 @@ public class HnTbStRygxController {
String fileName = IdUtil.simpleUUID();
//将Excel保存到服务器上
saveInResources(file, taskId, username, fileName);
//将Excel的基本信息保存到 ksh_tb_st_rygx_rw表中
//将Excel的基本信息保存到 ksh_st_rygx_rw表中
List data = readAndSaveExcel(file, username, taskId, fileName);
//将Excel的数据保存保存ksh_tb_st_rygx表中
//将Excel的数据保存保存ksh_st_rygx表中
saveDataInDB(data, taskId, fileName);
}
//重置Redis上的数据
......
......@@ -4,10 +4,10 @@
<!-- select xmlagg(xmlparse(content name or ',' wellformed) order by name).getclobval() as name, sfzh-->
<select id="getSfzhList" resultType="com.founder.commonutils.model.newPublicEntity.hnkshEntity.HnTbStRygx">
select concat(group_concat(name order by name),',')name,sfzh
from ksh_tb_st_rygx
from ksh_st_rygx
where rwid = #{taskId}
and sfzh in (select sfzh
from ksh_tb_st_rygx
from ksh_st_rygx
where rwid = #{taskId}
group by sfzh
having count(*) >= #{teamNum})
......@@ -16,7 +16,7 @@
<select id="getXmAndSfzhBySfzh" resultType="java.util.Map">
select xm as "xm", sfzh as "sfzh"
from ksh_tb_st_rygx
from ksh_st_rygx
where sfzh = #{sfzh}
and rwid = #{taskId}
group by xm, sfzh
......@@ -40,7 +40,7 @@
case when tzs != '0' then '同住宿,' else ''end ,
case when zttary != '0' then '在逃同案人员' when zttcx != '0' then '在逃同撤销' else ''end
))) as value
from ksh_tb_st_rygx where rwid = #{taskId} and sfzh = #{sfzh} and name in
from ksh_st_rygx where rwid = #{taskId} and sfzh = #{sfzh} and name in
<foreach collection="nameList" open="(" close=")" separator="," item="item">
#{item}
</foreach>
......@@ -48,25 +48,25 @@
<!-- <select id="getAllSfzhList" resultType="java.lang.String">
SELECT DISTINCT sfzh
from ksh_tb_st_rygx
where sfzh in (select sfzh from ksh_tb_st_rygx GROUP BY sfzh having count(*) > 1)
from ksh_st_rygx
where sfzh in (select sfzh from ksh_st_rygx GROUP BY sfzh having count(*) > 1)
</select>-->
<select id="getAllSfzhList" resultType="com.founder.commonutils.model.newPublicEntity.hnkshEntity.HnTbStRygx">
select name,
xmlagg(xmlparse(content sfzh || ',' wellformed) order by sfzh).getclobval() sfzh
from ksh_tb_st_rygx
from ksh_st_rygx
group by name
</select>
<select id="getGroupNameByRwid" resultType="com.founder.commonutils.model.newPublicEntity.hnkshEntity.HnTbStRygx">
select name,description from ksh_tb_st_rygx where rwid = #{taskId} group by name
select name,description from ksh_st_rygx where rwid = #{taskId} group by name
</select>
<select id="getBimgIsNullByTaskId" resultType="java.lang.String">
select sfzh from ksh_tb_st_rygx where rwid = #{taskId} and bimg is null group by sfzh
select sfzh from ksh_st_rygx where rwid = #{taskId} and bimg is null group by sfzh
</select>
<select id="getImgIsNullByTaskId" resultType="java.lang.String">
select name from ksh_tb_st_rygx where rwid = #{taskId} and img is null group by name
select name from ksh_st_rygx where rwid = #{taskId} and img is null group by name
</select>
</mapper>
......@@ -9,7 +9,7 @@
EXCEL_ID,
EXCEL_CREATE_TIME,
DATA_COUNT
FROM ksh_tb_st_rygx_rw
FROM ksh_st_rygx_rw
WHERE 1=1
<if test="rwid != null and rwid != ''">
and PARENT_ID = #{rwid , jdbcType=VARCHAR}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment