Browse Source

2023-12-22 日底稿表生成增加最后值

develop
zhousq 11 months ago
parent
commit
478033bf1d
  1. 3
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamDraftDay.java
  2. 1
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamDraftDayService.java
  3. 7
      lzbi-module/src/main/resources/mapper/asset/DcBusiParamDraftDayMapper.xml

3
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamDraftDay.java

@ -188,7 +188,8 @@ public class DcBusiParamDraftDay extends BaseModuleEntity
/** 统计单元名称 */
@Excel(name = "统计单元名称")
private String assetName;
/**最后值 */
private Double valLast;
public void setValForSeq(int key,Double value){
switch (key){
case 0:

1
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamDraftDayService.java

@ -158,6 +158,7 @@ public class DcBusiParamDraftDayService extends ServiceImpl<DcBusiParamDraftDayM
if(Double.compare(min,value)>0){
min=value;
}
target.setValLast(value);
}
}
target.setValTotal(totalCount);

7
lzbi-module/src/main/resources/mapper/asset/DcBusiParamDraftDayMapper.xml

@ -58,11 +58,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="val24" column="val24" />
<result property="assetName" column="asset_name" />
<result property="valTotal" column="val_total" />
<result property="valLast" column="val_last" />
</resultMap>
<sql id="selectDcBusiParamDraftDayVo">
select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, id, company_id, organize_name, organize_id, company_name, asset_code, param_code, param_name, param_field_code,param_field_name, target_uint, count_date, val_avg, val_max, val_sum, val_min, val_integrating, val_limit_up, val_limit_down, val01, val02, val03, val04, val05, val06, val07, val08, val09, val10, val11, val12, val13, val14, val15, val16, val17, val18, val19, val20, val21, val22, val23, val24, asset_name,val_total from dc_busi_param_draft_day
select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, id, company_id, organize_name, organize_id, company_name, asset_code, param_code, param_name, param_field_code,param_field_name, target_uint, count_date, val_avg, val_max, val_sum, val_min, val_integrating, val_limit_up, val_limit_down, val01, val02, val03, val04, val05, val06, val07, val08, val09, val10, val11, val12, val13, val14, val15, val16, val17, val18, val19, val20, val21, val22, val23, val24, asset_name,val_total,val_last from dc_busi_param_draft_day
</sql>
<select id="selectDcBusiParamDraftDayList" parameterType="DcBusiParamDraftDay" resultMap="DcBusiParamDraftDayResult">
@ -152,6 +153,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="val24 != null">val24,</if>
<if test="assetName != null">asset_name,</if>
<if test="valTotal != null">val_total,</if>
<if test="valLast != null">val_last,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantId != null">#{tenantId},</if>
@ -206,6 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="val24 != null">#{val24},</if>
<if test="assetName != null">#{assetName},</if>
<if test="valTotal != null">#{valTotal},</if>
<if test="valLast != null">#{valLast},</if>
</trim>
</insert>
@ -264,6 +268,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="val24 != null">val24 = #{val24},</if>
<if test="assetName != null">asset_name = #{assetName},</if>
<if test="valTotal != null">val_total=#{valTotal},</if>
<if test="valLast != null">val_last=#{valLast},</if>
</trim>
where id = #{id}
</update>

Loading…
Cancel
Save