Browse Source

修改指标字段

develop
ljlong_2630 11 months ago
parent
commit
b5d19e1742
  1. 4
      lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java
  2. 40
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTarget.java
  3. 53
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml

4
lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java

@ -116,7 +116,7 @@ public class SelectOptionsControl extends BaseController {
{ {
DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget(); DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget();
dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode()); dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTarget.setTargetField(assetQueryParams.getFieldCode()); dcBaseAssetTarget.setFieldCode(assetQueryParams.getFieldCode());
dcBaseAssetTarget.setColumnType("T"); dcBaseAssetTarget.setColumnType("T");
//dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId()); //dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget)); return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget));
@ -126,7 +126,7 @@ public class SelectOptionsControl extends BaseController {
{ {
DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget(); DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget();
dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode()); dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTarget.setTargetField(assetQueryParams.getFieldCode()); dcBaseAssetTarget.setFieldCode(assetQueryParams.getFieldCode());
dcBaseAssetTarget.setColumnType("P"); dcBaseAssetTarget.setColumnType("P");
//dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId()); //dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget)); return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget));

40
lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTarget.java

@ -2,8 +2,9 @@ package com.lzbi.targetFolder.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import lombok.experimental.Accessors;
import lombok.Data; import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import com.lzbi.common.annotation.Excel; import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity; import com.lzbi.module.base.BaseModuleEntity;
@ -11,7 +12,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* 资产指标配置对象 dc_base_asset_target * 资产指标配置对象 dc_base_asset_target
* *
* @author Lu.JL * @author Lu.JL
* @date 2023-12-14 * @date 2023-12-19
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@ -21,70 +22,97 @@ public class DcBaseAssetTarget extends BaseModuleEntity
/** 统计单元编码 */ /** 统计单元编码 */
@Excel(name = "统计单元编码") @Excel(name = "统计单元编码")
@ApiModelProperty(name = "统计单元编码",notes = "assetCode")
private String assetCode; private String assetCode;
/** 统计单元ID */ /** 统计单元ID */
@Excel(name = "统计单元ID") @Excel(name = "统计单元ID")
@ApiModelProperty(name = "统计单元ID",notes = "assetId")
private Long assetId; private Long assetId;
/** 指标模型编码 */ /** 指标模型编码 */
@Excel(name = "指标模型编码") @Excel(name = "指标模型编码")
@ApiModelProperty(name = "指标模型编码",notes = "targetModelCode")
private String targetModelCode; private String targetModelCode;
/** 指标名称 */ /** 指标名称 */
@Excel(name = "指标名称") @Excel(name = "指标名称")
@ApiModelProperty(name = "指标名称",notes = "targetName")
private String targetName; private String targetName;
/** 指标别名 */ /** 指标别名 */
@Excel(name = "指标别名") @Excel(name = "指标别名")
@ApiModelProperty(name = "指标别名",notes = "targetNameAlias")
private String targetNameAlias; private String targetNameAlias;
/** 指标编码 */ /** 指标编码 */
@Excel(name = "指标编码") @Excel(name = "指标编码")
@ApiModelProperty(name = "指标编码",notes = "targetCode")
private String targetCode; private String targetCode;
/** 所属专业 */ /** 所属专业 */
@Excel(name = "所属专业") @Excel(name = "所属专业")
private String targetField; @ApiModelProperty(name = "所属专业",notes = "fieldCode")
private String fieldCode;
/** 上限 */ /** 上限 */
@Excel(name = "上限") @Excel(name = "上限")
@ApiModelProperty(name = "上限",notes = "limitUp")
private BigDecimal limitUp; private BigDecimal limitUp;
/** 下限 */ /** 下限 */
@Excel(name = "下限") @Excel(name = "下限")
@ApiModelProperty(name = "下限",notes = "limitDown")
private BigDecimal limitDown; private BigDecimal limitDown;
/** 值 */ /** 值 */
@Excel(name = "值") @Excel(name = "值")
@ApiModelProperty(name = "值",notes = "valueBase")
private BigDecimal valueBase; private BigDecimal valueBase;
/** 是否均值 */ /** 是否均值 */
@Excel(name = "是否均值") @Excel(name = "是否均值")
@ApiModelProperty(name = "是否均值",notes = "flagAvg")
private String flagAvg; private String flagAvg;
/** 是否汇总 */ /** 是否汇总 */
@Excel(name = "是否汇总") @Excel(name = "是否汇总")
@ApiModelProperty(name = "是否汇总",notes = "flagSum")
private String flagSum; private String flagSum;
/** 是否积算 */ /** 是否积算 */
@Excel(name = "是否积算") @Excel(name = "是否积算")
@ApiModelProperty(name = "是否积算",notes = "flagCompute")
private String flagCompute; private String flagCompute;
/** $column.columnComment */ /** */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "")
@ApiModelProperty(name = "",notes = "sort")
private String sort; private String sort;
/** 所属专业名称 */ /** 所属专业名称 */
@Excel(name = "所属专业名称") @Excel(name = "所属专业名称")
private String targetFieldName; @ApiModelProperty(name = "所属专业名称",notes = "fieldName")
private String fieldName;
/** T指标P参数 */ /** T指标P参数 */
@Excel(name = "T指标P参数") @Excel(name = "T指标P参数")
@ApiModelProperty(name = "T指标P参数",notes = "columnType")
private String columnType; private String columnType;
/** 单位 */ /** 单位 */
@Excel(name = "单位") @Excel(name = "单位")
@ApiModelProperty(name = "单位",notes = "fieldUnit")
private String fieldUnit; private String fieldUnit;
/** 部门id */
@Excel(name = "部门id")
@ApiModelProperty(name = "部门id",notes = "deptId")
private Long deptId;
/** 用户id */
@Excel(name = "用户id")
@ApiModelProperty(name = "用户id",notes = "userId")
private Long userId;
} }

53
lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper"> <mapper namespace="com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper">
<resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTarget" id="DcBaseAssetTargetResult"> <resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTarget" id="DcBaseAssetTargetResult">
@ -12,7 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="targetName" column="target_name" /> <result property="targetName" column="target_name" />
<result property="targetNameAlias" column="target_name_alias" /> <result property="targetNameAlias" column="target_name_alias" />
<result property="targetCode" column="target_code" /> <result property="targetCode" column="target_code" />
<result property="targetField" column="target_field" /> <result property="fieldCode" column="field_code" />
<result property="limitUp" column="limit_up" /> <result property="limitUp" column="limit_up" />
<result property="limitDown" column="limit_down" /> <result property="limitDown" column="limit_down" />
<result property="valueBase" column="value_base" /> <result property="valueBase" column="value_base" />
@ -28,29 +28,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deleteBy" column="delete_by" /> <result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" /> <result property="deleteTime" column="delete_time" />
<result property="sort" column="sort" /> <result property="sort" column="sort" />
<result property="targetFieldName" column="target_field_name" /> <result property="fieldName" column="field_name" />
<result property="columnType" column="column_type" /> <result property="columnType" column="column_type" />
<result property="fieldUnit" column="field_unit" /> <result property="fieldUnit" column="field_unit" />
<result property="deptId" column="dept_id" />
<result property="userId" column="user_id" />
</resultMap> </resultMap>
<sql id="selectDcBaseAssetTargetVo"> <sql id="selectDcBaseAssetTargetVo">
select id, asset_code, asset_id, target_model_code, target_name, target_name_alias, target_code, target_field, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, sort, target_field_name, column_type, field_unit from dc_base_asset_target select id, asset_code, asset_id, target_model_code, target_name, target_name_alias, target_code, field_code, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, sort, field_name, column_type, field_unit, dept_id, user_id from dc_base_asset_target
</sql> </sql>
<select id="selectDcBaseAssetTargetList" parameterType="DcBaseAssetTarget" resultMap="DcBaseAssetTargetResult"> <select id="selectDcBaseAssetTargetList" parameterType="DcBaseAssetTarget" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/> <include refid="selectDcBaseAssetTargetVo"/>
<where> <where>
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if>
<if test="assetId != null "> and asset_id = #{assetId}</if> <if test="assetId != null "> and asset_id = #{assetId}</if>
<if test="targetModelCode != null and targetModelCode != ''"> and target_model_code = #{targetModelCode}</if> <if test="targetModelCode != null and targetModelCode != ''"> and target_model_code = #{targetModelCode}</if>
<if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if> <if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if>
<if test="targetNameAlias != null and targetNameAlias != ''"> and target_name_alias = #{targetNameAlias}</if>
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if> <if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if>
<if test="targetField != null and targetField != ''"> and target_field = #{targetField}</if> <if test="fieldCode != null and fieldCode != ''"> and field_code = #{fieldCode}</if>
<if test="assetCode != null "> and asset_code = #{assetCode}</if> <if test="limitUp != null "> and limit_up = #{limitUp}</if>
<if test="columnType != null and columnType != ''"> and column_type = #{columnType}</if> <if test="limitDown != null "> and limit_down = #{limitDown}</if>
<if test="valueBase != null "> and value_base = #{valueBase}</if>
<if test="flagAvg != null and flagAvg != ''"> and flag_avg = #{flagAvg}</if>
<if test="flagSum != null and flagSum != ''"> and flag_sum = #{flagSum}</if>
<if test="flagCompute != null and flagCompute != ''"> and flag_compute = #{flagCompute}</if>
<if test="sort != null and sort != ''"> and sort = #{sort}</if>
<if test="fieldName != null and fieldName != ''"> and field_name like concat('%', #{fieldName}, '%')</if>
<if test="columnType != null and columnType != ''"> and column_type = #{columnType}</if>
<if test="fieldUnit != null and fieldUnit != ''"> and field_unit = #{fieldUnit}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
</where> </where>
</select> </select>
<select id="selectDcBaseAssetTargetById" parameterType="Long" resultMap="DcBaseAssetTargetResult"> <select id="selectDcBaseAssetTargetById" parameterType="Long" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/> <include refid="selectDcBaseAssetTargetVo"/>
where id = #{id} where id = #{id}
@ -65,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="targetName != null">target_name,</if> <if test="targetName != null">target_name,</if>
<if test="targetNameAlias != null">target_name_alias,</if> <if test="targetNameAlias != null">target_name_alias,</if>
<if test="targetCode != null">target_code,</if> <if test="targetCode != null">target_code,</if>
<if test="targetField != null">target_field,</if> <if test="fieldCode != null">field_code,</if>
<if test="limitUp != null">limit_up,</if> <if test="limitUp != null">limit_up,</if>
<if test="limitDown != null">limit_down,</if> <if test="limitDown != null">limit_down,</if>
<if test="valueBase != null">value_base,</if> <if test="valueBase != null">value_base,</if>
@ -81,9 +94,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deleteBy != null">delete_by,</if> <if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if> <if test="deleteTime != null">delete_time,</if>
<if test="sort != null">sort,</if> <if test="sort != null">sort,</if>
<if test="targetFieldName != null">target_field_name,</if> <if test="fieldName != null">field_name,</if>
<if test="columnType != null">column_type,</if> <if test="columnType != null">column_type,</if>
<if test="fieldUnit != null">field_unit,</if> <if test="fieldUnit != null">field_unit,</if>
<if test="deptId != null">dept_id,</if>
<if test="userId != null">user_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="assetCode != null">#{assetCode},</if> <if test="assetCode != null">#{assetCode},</if>
@ -92,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="targetName != null">#{targetName},</if> <if test="targetName != null">#{targetName},</if>
<if test="targetNameAlias != null">#{targetNameAlias},</if> <if test="targetNameAlias != null">#{targetNameAlias},</if>
<if test="targetCode != null">#{targetCode},</if> <if test="targetCode != null">#{targetCode},</if>
<if test="targetField != null">#{targetField},</if> <if test="fieldCode != null">#{fieldCode},</if>
<if test="limitUp != null">#{limitUp},</if> <if test="limitUp != null">#{limitUp},</if>
<if test="limitDown != null">#{limitDown},</if> <if test="limitDown != null">#{limitDown},</if>
<if test="valueBase != null">#{valueBase},</if> <if test="valueBase != null">#{valueBase},</if>
@ -108,9 +123,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deleteBy != null">#{deleteBy},</if> <if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if> <if test="deleteTime != null">#{deleteTime},</if>
<if test="sort != null">#{sort},</if> <if test="sort != null">#{sort},</if>
<if test="targetFieldName != null">#{targetFieldName},</if> <if test="fieldName != null">#{fieldName},</if>
<if test="columnType != null">#{columnType},</if> <if test="columnType != null">#{columnType},</if>
<if test="fieldUnit != null">#{fieldUnit},</if> <if test="fieldUnit != null">#{fieldUnit},</if>
<if test="deptId != null">#{deptId},</if>
<if test="userId != null">#{userId},</if>
</trim> </trim>
</insert> </insert>
@ -123,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="targetName != null">target_name = #{targetName},</if> <if test="targetName != null">target_name = #{targetName},</if>
<if test="targetNameAlias != null">target_name_alias = #{targetNameAlias},</if> <if test="targetNameAlias != null">target_name_alias = #{targetNameAlias},</if>
<if test="targetCode != null">target_code = #{targetCode},</if> <if test="targetCode != null">target_code = #{targetCode},</if>
<if test="targetField != null">target_field = #{targetField},</if> <if test="fieldCode != null">field_code = #{fieldCode},</if>
<if test="limitUp != null">limit_up = #{limitUp},</if> <if test="limitUp != null">limit_up = #{limitUp},</if>
<if test="limitDown != null">limit_down = #{limitDown},</if> <if test="limitDown != null">limit_down = #{limitDown},</if>
<if test="valueBase != null">value_base = #{valueBase},</if> <if test="valueBase != null">value_base = #{valueBase},</if>
@ -139,9 +156,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deleteBy != null">delete_by = #{deleteBy},</if> <if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if> <if test="deleteTime != null">delete_time = #{deleteTime},</if>
<if test="sort != null">sort = #{sort},</if> <if test="sort != null">sort = #{sort},</if>
<if test="targetFieldName != null">target_field_name = #{targetFieldName},</if> <if test="fieldName != null">field_name = #{fieldName},</if>
<if test="columnType != null">column_type = #{columnType},</if> <if test="columnType != null">column_type = #{columnType},</if>
<if test="fieldUnit != null">field_unit = #{fieldUnit},</if> <if test="fieldUnit != null">field_unit = #{fieldUnit},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="userId != null">user_id = #{userId},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
@ -151,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteDcBaseAssetTargetByIds" parameterType="String"> <delete id="deleteDcBaseAssetTargetByIds" parameterType="String">
delete from dc_base_asset_target where id in delete from dc_base_asset_target where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>

Loading…
Cancel
Save