统计字典调整
This commit is contained in:
parent
fa42303021
commit
1a2b3c19bf
@ -29,5 +29,5 @@ public class ComStatsParameter {
|
|||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
private String remark;
|
private String remark;
|
||||||
private Long paramWidth;
|
private Long paramWidth;
|
||||||
|
private String paramZct;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ public class StatsServiceImpl implements StatsService {
|
|||||||
if(list==null||list.size()==0)return new Result("-1","未找到该模板参数");
|
if(list==null||list.size()==0)return new Result("-1","未找到该模板参数");
|
||||||
List<ComStatsParameter> columnlist=list.stream().filter(ss->"1".equals(ss.getParamType())||"6".equals(ss.getParamType())).collect(Collectors.toList());
|
List<ComStatsParameter> columnlist=list.stream().filter(ss->"1".equals(ss.getParamType())||"6".equals(ss.getParamType())).collect(Collectors.toList());
|
||||||
List<ComStatsParameter> summarylist=list.stream().filter(ss->"3".equals(ss.getParamType())).collect(Collectors.toList());
|
List<ComStatsParameter> summarylist=list.stream().filter(ss->"3".equals(ss.getParamType())).collect(Collectors.toList());
|
||||||
List<ComStatsParameter> parameter=list.stream().filter(ss->"0".equals(ss.getParamType())).collect(Collectors.toList());
|
List<ComStatsParameter> parameter=list.stream().filter(ss->"0".equals(ss.getParamType())||"5".equals(ss.getParamType())).collect(Collectors.toList());
|
||||||
List<ComStatsParameter> subquery=list.stream().filter(ss->"4".equals(ss.getParamType())).collect(Collectors.toList());
|
List<ComStatsParameter> subquery=list.stream().filter(ss->"4".equals(ss.getParamType())).collect(Collectors.toList());
|
||||||
if(parameter!=null&¶meter.size()>0){
|
if(parameter!=null&¶meter.size()>0){
|
||||||
for(ComStatsParameter p:parameter){
|
for(ComStatsParameter p:parameter){
|
||||||
@ -102,18 +102,24 @@ public class StatsServiceImpl implements StatsService {
|
|||||||
String where="";
|
String where="";
|
||||||
for(ComStatsParameter parameter :parameterlist){
|
for(ComStatsParameter parameter :parameterlist){
|
||||||
String value=parameter.getParamDefvalue();
|
String value=parameter.getParamDefvalue();
|
||||||
if(value==null)continue;
|
String type=parameter.getParamType();
|
||||||
if("".equals(value.trim()))continue;
|
if(!"5".equals(type)){
|
||||||
|
if (value == null) continue;
|
||||||
|
if ("".equals(value.trim())) continue;
|
||||||
|
}
|
||||||
|
String sql=parameter.getParamSql();
|
||||||
|
if (sql == null) continue;
|
||||||
|
if ("".equals(sql.trim())) continue;
|
||||||
String precondition=parameter.getPrecondition();
|
String precondition=parameter.getPrecondition();
|
||||||
if(precondition!=null&&!"".equals(precondition)) {
|
if(precondition!=null&&!"".equals(precondition)) {
|
||||||
Result result = checkprecondition(precondition, parameterlist);
|
Result result = checkprecondition(precondition, parameterlist);
|
||||||
if (!"0".equals(result.getCode())) return result;
|
if (!"0".equals(result.getCode())) return result;
|
||||||
boolean flag = (boolean) result.getData();
|
boolean flag = (boolean) result.getData();
|
||||||
if (flag) {
|
if (flag) {
|
||||||
where = where + " " + parameter.getParamSql();
|
where = where + " " + sql;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
where = where + " " + parameter.getParamSql();
|
where = where + " " + sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String columns="";
|
String columns="";
|
||||||
|
|||||||
@ -22,10 +22,12 @@
|
|||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="paramWidth" column="param_width" />
|
<result property="paramWidth" column="param_width" />
|
||||||
|
<result property="paramZct" column="param_zct" />
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="selectComStatsParameterVo">
|
<sql id="selectComStatsParameterVo">
|
||||||
select param_id,param_type,param_code,param_name,param_optiontype,param_sql,param_hide,param_sort,stats_code,param_defvalue,param_sequence,
|
select param_id,param_type,param_code,param_name,param_optiontype,param_sql,param_hide,param_sort,stats_code,param_defvalue,param_sequence,
|
||||||
status,create_by,create_time,update_by,update_time,remark,precondition,param_width from Com_stats_parameter
|
status,create_by,create_time,update_by,update_time,remark,precondition,param_width,param_zct from Com_stats_parameter
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectComStatsParameterList" resultMap="ComStatsParameterResult" parameterType="com.czlis.common.core.domain.entity.lis.ComStatsParameter" >
|
<select id="selectComStatsParameterList" resultMap="ComStatsParameterResult" parameterType="com.czlis.common.core.domain.entity.lis.ComStatsParameter" >
|
||||||
<include refid="selectComStatsParameterVo"></include>
|
<include refid="selectComStatsParameterVo"></include>
|
||||||
@ -72,7 +74,7 @@
|
|||||||
|
|
||||||
<select id="checkDictNameUnique" parameterType="String" resultMap="ComStatsParameterResult">
|
<select id="checkDictNameUnique" parameterType="String" resultMap="ComStatsParameterResult">
|
||||||
select top 1 param_id,param_type,param_code,param_name,param_optiontype,param_sql,param_sort,param_hide,stats_code,param_defvalue,param_sequence,
|
select top 1 param_id,param_type,param_code,param_name,param_optiontype,param_sql,param_sort,param_hide,stats_code,param_defvalue,param_sequence,
|
||||||
status,create_by,create_time,update_by,update_time,remark,precondition,param_width
|
status,create_by,create_time,update_by,update_time,remark,precondition,param_width,param_zct
|
||||||
from Com_stats_parameter
|
from Com_stats_parameter
|
||||||
where param_name=#{paramName} and param_type = #{paramType} and stats_code = #{statsCode}
|
where param_name=#{paramName} and param_type = #{paramType} and stats_code = #{statsCode}
|
||||||
</select>
|
</select>
|
||||||
@ -80,7 +82,7 @@
|
|||||||
<select id="checkDictCodeUnique" parameterType="String" resultMap="ComStatsParameterResult">
|
<select id="checkDictCodeUnique" parameterType="String" resultMap="ComStatsParameterResult">
|
||||||
select top 1 param_id,param_type,param_code,param_name,param_optiontype,param_sql,
|
select top 1 param_id,param_type,param_code,param_name,param_optiontype,param_sql,
|
||||||
param_sort,param_hide,stats_code,param_defvalue,param_sequence,
|
param_sort,param_hide,stats_code,param_defvalue,param_sequence,
|
||||||
status,create_by,create_time,update_by,update_time,remark,precondition,param_width
|
status,create_by,create_time,update_by,update_time,remark,precondition,param_width,param_zct
|
||||||
from Com_stats_parameter
|
from Com_stats_parameter
|
||||||
where param_code=#{paramCode} and param_type = #{paramType} and stats_code = #{statsCode}
|
where param_code=#{paramCode} and param_type = #{paramType} and stats_code = #{statsCode}
|
||||||
</select>
|
</select>
|
||||||
@ -102,6 +104,8 @@
|
|||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
<if test="paramWidth != null ">param_width,</if>
|
<if test="paramWidth != null ">param_width,</if>
|
||||||
|
<if test="paramZct != null ">param_zct,</if>
|
||||||
|
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="paramId != null and paramId != 0">#{paramId},</if>
|
<if test="paramId != null and paramId != 0">#{paramId},</if>
|
||||||
@ -120,6 +124,7 @@
|
|||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
<if test="paramWidth != null ">#{paramWidth},</if>
|
<if test="paramWidth != null ">#{paramWidth},</if>
|
||||||
|
<if test="paramZct != null ">#{paramZct},</if>
|
||||||
getdate()
|
getdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
@ -142,7 +147,7 @@
|
|||||||
param_optiontype = #{paramOptiontype},param_defvalue= #{paramDefvalue},
|
param_optiontype = #{paramOptiontype},param_defvalue= #{paramDefvalue},
|
||||||
param_sequence= #{paramSequence},precondition=#{precondition},
|
param_sequence= #{paramSequence},precondition=#{precondition},
|
||||||
param_sql = #{paramSql},param_hide = #{paramHide},
|
param_sql = #{paramSql},param_hide = #{paramHide},
|
||||||
param_sort = #{paramSort},status = #{status},param_width = #{paramWidth},
|
param_sort = #{paramSort},status = #{status},param_width = #{paramWidth},param_zct = #{paramZct},
|
||||||
remark = #{remark},update_by = #{updateBy},update_time = getdate()
|
remark = #{remark},update_by = #{updateBy},update_time = getdate()
|
||||||
where param_id = #{paramId}
|
where param_id = #{paramId}
|
||||||
</update>
|
</update>
|
||||||
@ -163,6 +168,7 @@
|
|||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
<if test="paramWidth != null">param_width = #{paramWidth},</if>
|
<if test="paramWidth != null">param_width = #{paramWidth},</if>
|
||||||
|
<if test="paramZct != null">param_zct = #{paramZct},</if>
|
||||||
update_time = getdate()
|
update_time = getdate()
|
||||||
</set>
|
</set>
|
||||||
where param_id = #{paramId}
|
where param_id = #{paramId}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user