Browse Source

信义碳源投加记录表重构

王苗苗 1 week ago
parent
commit
ff477425d8

+ 59 - 152
slibra-system/src/main/java/com/slibra/business/domain/TXinyiMedicineAddRecord.java

@@ -1,6 +1,11 @@
 package com.slibra.business.domain;
 
 import java.math.BigDecimal;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.slibra.common.annotation.Excel;
@@ -12,6 +17,10 @@ import com.slibra.common.core.domain.BaseEntity;
  * @author slibra
  * @date 2025-04-24
  */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
 public class TXinyiMedicineAddRecord extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -19,26 +28,66 @@ public class TXinyiMedicineAddRecord extends BaseEntity
     /** 主键 */
     private Long id;
 
+    /** 采用控制系数ID */
+    @Excel(name = "采用控制系数ID")
+    private Long relativeId;
+
     /** 投加时间(yyyy/MM/dd HH格式的) */
     @Excel(name = "投加时间", readConverterExp = "y=yyy/MM/dd,H=H格式的")
     private String addHour;
 
-    /** 选择的哪种方式投放(0一池 1二池 2自动) */
-    @Excel(name = "选择的哪种方式投放", readConverterExp = "0=一池,1=二池,2=自动")
+    /** 投放方式(0一池 1二池 2自动) */
+    @Excel(name = "投放方式", readConverterExp = "0=一池,1=二池,2=自动")
     private Integer choosePool;
 
-    /** 真实投加用的哪个池子(0一池 1二池) */
-    @Excel(name = "真实投加用的哪个池子", readConverterExp = "0=一池,1=二池")
+    /** 实际投放方式(0一池 1二池) */
+    @Excel(name = "实际投放方式", readConverterExp = "0=一池,1=二池")
     private Integer addPool;
 
-    /** 计算碳源投加值 */
-    @Excel(name = "计算碳源投加值")
-    private BigDecimal calculateVal;
+    /** 使用控制系数 */
+    @Excel(name = "使用控制系数")
+    private BigDecimal kzxs;
+
+    /** 使用后反馈设定 */
+    @Excel(name = "使用后反馈设定")
+    private BigDecimal htfksd;
 
-    /** 真实碳源投加值 */
-    @Excel(name = "真实碳源投加值")
+    /** 组态是否允许投放(0否  1是) */
+    @Excel(name = "组态是否允许投放", readConverterExp = "0=否,1=是")
+    private Boolean canAdd;
+
+    /** 瞬时加药量 */
+    @Excel(name = "瞬时加药量")
     private BigDecimal realVal;
 
+    /** 使用碳源投加值 */
+    @Excel(name = "使用碳源投加值")
+    private BigDecimal calculateVal;
+
+    /** 1池碳源投加值 */
+    @Excel(name = "1池碳源投加值")
+    private BigDecimal oneVal;
+
+    /** 2池碳源投加值 */
+    @Excel(name = "2池碳源投加值")
+    private BigDecimal twoVal;
+
+    /** 1池后反馈设定 */
+    @Excel(name = "1池后反馈设定")
+    private BigDecimal oneHtfksd;
+
+    /** 2池后反馈设定 */
+    @Excel(name = "2池后反馈设定")
+    private BigDecimal twoHtfksd;
+
+    /** 1池控制系数 */
+    @Excel(name = "1池控制系数")
+    private BigDecimal oneKzxs;
+
+    /** 2池控制系数 */
+    @Excel(name = "2池控制系数")
+    private BigDecimal twoKzxs;
+
     /** 质控值下限 */
     @Excel(name = "质控值下限")
     private BigDecimal zkzDown;
@@ -47,18 +96,6 @@ public class TXinyiMedicineAddRecord extends BaseEntity
     @Excel(name = "质控值下限")
     private BigDecimal zkzUp;
 
-    /** 控制系数 */
-    @Excel(name = "控制系数")
-    private BigDecimal kzxs;
-
-    /** 后台反馈设定 */
-    @Excel(name = "后台反馈设定")
-    private BigDecimal htfksd;
-
-    /** 组态是否允许投放 */
-    @Excel(name = "组态是否允许投放")
-    private Boolean canAdd;
-
     /** 删除标志(0代表存在 2代表删除) */
     private Long delFlag;
 
@@ -66,135 +103,5 @@ public class TXinyiMedicineAddRecord extends BaseEntity
     @Excel(name = "乐观锁")
     private Long revision;
 
-    public BigDecimal getKzxs() {
-        return kzxs;
-    }
-
-    public void setKzxs(BigDecimal kzxs) {
-        this.kzxs = kzxs;
-    }
-
-    public BigDecimal getHtfksd() {
-        return htfksd;
-    }
-
-    public void setHtfksd(BigDecimal htfksd) {
-        this.htfksd = htfksd;
-    }
-
-    public Boolean getCanAdd() {
-        return canAdd;
-    }
-
-    public void setCanAdd(Boolean canAdd) {
-        this.canAdd = canAdd;
-    }
-
-    public BigDecimal getZkzDown() {
-        return zkzDown;
-    }
-
-    public void setZkzDown(BigDecimal zkzDown) {
-        this.zkzDown = zkzDown;
-    }
-
-    public BigDecimal getZkzUp() {
-        return zkzUp;
-    }
-
-    public void setZkzUp(BigDecimal zkzUp) {
-        this.zkzUp = zkzUp;
-    }
-
-    public void setId(Long id)
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setAddHour(String addHour) 
-    {
-        this.addHour = addHour;
-    }
-
-    public String getAddHour() 
-    {
-        return addHour;
-    }
-    public void setChoosePool(Integer choosePool)
-    {
-        this.choosePool = choosePool;
-    }
-
-    public Integer getChoosePool()
-    {
-        return choosePool;
-    }
-    public void setAddPool(Integer addPool)
-    {
-        this.addPool = addPool;
-    }
-
-    public Integer getAddPool()
-    {
-        return addPool;
-    }
-    public void setCalculateVal(BigDecimal calculateVal) 
-    {
-        this.calculateVal = calculateVal;
-    }
-
-    public BigDecimal getCalculateVal() 
-    {
-        return calculateVal;
-    }
-    public void setRealVal(BigDecimal realVal) 
-    {
-        this.realVal = realVal;
-    }
-
-    public BigDecimal getRealVal() 
-    {
-        return realVal;
-    }
-    public void setDelFlag(Long delFlag) 
-    {
-        this.delFlag = delFlag;
-    }
-
-    public Long getDelFlag() 
-    {
-        return delFlag;
-    }
-    public void setRevision(Long revision) 
-    {
-        this.revision = revision;
-    }
-
-    public Long getRevision() 
-    {
-        return revision;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("addHour", getAddHour())
-            .append("choosePool", getChoosePool())
-            .append("addPool", getAddPool())
-            .append("calculateVal", getCalculateVal())
-            .append("realVal", getRealVal())
-            .append("delFlag", getDelFlag())
-            .append("revision", getRevision())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
+
 }

+ 56 - 21
slibra-system/src/main/resources/mapper/business/TXinyiMedicineAddRecordMapper.xml

@@ -6,16 +6,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="TXinyiMedicineAddRecord" id="TXinyiMedicineAddRecordResult">
         <result property="id"    column="id"    />
+        <result property="relativeId"    column="relative_id"    />
         <result property="addHour"    column="add_hour"    />
         <result property="choosePool"    column="choose_pool"    />
         <result property="addPool"    column="add_pool"    />
-        <result property="calculateVal"    column="calculate_val"    />
-        <result property="realVal"    column="real_val"    />
-        <result property="zkzDown"    column="zkz_down"    />
-        <result property="zkzUp"    column="zkz_up"    />
         <result property="kzxs"    column="kzxs"    />
         <result property="htfksd"    column="htfksd"    />
         <result property="canAdd"    column="can_add"    />
+        <result property="realVal"    column="real_val"    />
+        <result property="calculateVal"    column="calculate_val"    />
+        <result property="oneVal"    column="one_val"    />
+        <result property="twoVal"    column="two_val"    />
+        <result property="oneHtfksd"    column="one_htfksd"    />
+        <result property="twoHtfksd"    column="two_htfksd"    />
+        <result property="oneKzxs"    column="one_kzxs"    />
+        <result property="twoKzxs"    column="two_kzxs"    />
+        <result property="zkzDown"    column="zkz_down"    />
+        <result property="zkzUp"    column="zkz_up"    />
         <result property="delFlag"    column="del_flag"    />
         <result property="revision"    column="revision"    />
         <result property="createBy"    column="create_by"    />
@@ -26,23 +33,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTXinyiMedicineAddRecordVo">
-        select id, add_hour, choose_pool, add_pool, calculate_val, real_val, zkz_down, zkz_up, kzxs, htfksd, can_add, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_xinyi_medicine_add_record
+        select id, relative_id, add_hour, choose_pool, add_pool, kzxs, htfksd, can_add, real_val, calculate_val, one_val, two_val, one_htfksd, two_htfksd, one_kzxs, two_kzxs, zkz_down, zkz_up, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_xinyi_medicine_add_record
     </sql>
 
     <select id="selectTXinyiMedicineAddRecordList" parameterType="TXinyiMedicineAddRecord" resultMap="TXinyiMedicineAddRecordResult">
         <include refid="selectTXinyiMedicineAddRecordVo"/>
         <where>
             1 = 1
+            <if test="relativeId != null "> and relative_id = #{relativeId}</if>
             <if test="addHour != null  and addHour != ''"> and add_hour = #{addHour}</if>
             <if test="choosePool != null "> and choose_pool = #{choosePool}</if>
             <if test="addPool != null "> and add_pool = #{addPool}</if>
-            <if test="calculateVal != null "> and calculate_val = #{calculateVal}</if>
-            <if test="realVal != null "> and real_val = #{realVal}</if>
-            <if test="zkzDown != null "> and zkz_down = #{zkzDown}</if>
-            <if test="zkzUp != null "> and zkz_up = #{zkzUp}</if>
             <if test="kzxs != null "> and kzxs = #{kzxs}</if>
             <if test="htfksd != null "> and htfksd = #{htfksd}</if>
             <if test="canAdd != null "> and can_add = #{canAdd}</if>
+            <if test="realVal != null "> and real_val = #{realVal}</if>
+            <if test="calculateVal != null "> and calculate_val = #{calculateVal}</if>
+            <if test="oneVal != null "> and one_val = #{oneVal}</if>
+            <if test="twoVal != null "> and two_val = #{twoVal}</if>
+            <if test="oneHtfksd != null "> and one_htfksd = #{oneHtfksd}</if>
+            <if test="twoHtfksd != null "> and two_htfksd = #{twoHtfksd}</if>
+            <if test="oneKzxs != null "> and one_kzxs = #{oneKzxs}</if>
+            <if test="twoKzxs != null "> and two_kzxs = #{twoKzxs}</if>
+            <if test="zkzDown != null "> and zkz_down = #{zkzDown}</if>
+            <if test="zkzUp != null "> and zkz_up = #{zkzUp}</if>
             <if test="revision != null "> and revision = #{revision}</if>
         </where>
         and del_flag = 0 order by id desc
@@ -56,16 +70,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertTXinyiMedicineAddRecord" parameterType="TXinyiMedicineAddRecord" useGeneratedKeys="true" keyProperty="id">
         insert into t_xinyi_medicine_add_record
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="relativeId != null">relative_id,</if>
             <if test="addHour != null">add_hour,</if>
             <if test="choosePool != null">choose_pool,</if>
             <if test="addPool != null">add_pool,</if>
-            <if test="calculateVal != null">calculate_val,</if>
-            <if test="realVal != null">real_val,</if>
-            <if test="zkzDown != null">zkz_down,</if>
-            <if test="zkzUp != null">zkz_up,</if>
             <if test="kzxs != null">kzxs,</if>
             <if test="htfksd != null">htfksd,</if>
             <if test="canAdd != null">can_add,</if>
+            <if test="realVal != null">real_val,</if>
+            <if test="calculateVal != null">calculate_val,</if>
+            <if test="oneVal != null">one_val,</if>
+            <if test="twoVal != null">two_val,</if>
+            <if test="oneHtfksd != null">one_htfksd,</if>
+            <if test="twoHtfksd != null">two_htfksd,</if>
+            <if test="oneKzxs != null">one_kzxs,</if>
+            <if test="twoKzxs != null">two_kzxs,</if>
+            <if test="zkzDown != null">zkz_down,</if>
+            <if test="zkzUp != null">zkz_up,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="revision != null">revision,</if>
             <if test="createBy != null">create_by,</if>
@@ -75,16 +96,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="relativeId != null">#{relativeId},</if>
             <if test="addHour != null">#{addHour},</if>
             <if test="choosePool != null">#{choosePool},</if>
             <if test="addPool != null">#{addPool},</if>
-            <if test="calculateVal != null">#{calculateVal},</if>
-            <if test="realVal != null">#{realVal},</if>
-            <if test="zkzDown != null">#{zkzDown},</if>
-            <if test="zkzUp != null">#{zkzUp},</if>
             <if test="kzxs != null">#{kzxs},</if>
             <if test="htfksd != null">#{htfksd},</if>
             <if test="canAdd != null">#{canAdd},</if>
+            <if test="realVal != null">#{realVal},</if>
+            <if test="calculateVal != null">#{calculateVal},</if>
+            <if test="oneVal != null">#{oneVal},</if>
+            <if test="twoVal != null">#{twoVal},</if>
+            <if test="oneHtfksd != null">#{oneHtfksd},</if>
+            <if test="twoHtfksd != null">#{twoHtfksd},</if>
+            <if test="oneKzxs != null">#{oneKzxs},</if>
+            <if test="twoKzxs != null">#{twoKzxs},</if>
+            <if test="zkzDown != null">#{zkzDown},</if>
+            <if test="zkzUp != null">#{zkzUp},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="revision != null">#{revision},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -98,16 +126,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateTXinyiMedicineAddRecord" parameterType="TXinyiMedicineAddRecord">
         update t_xinyi_medicine_add_record
         <trim prefix="SET" suffixOverrides=",">
+            <if test="relativeId != null">relative_id = #{relativeId},</if>
             <if test="addHour != null">add_hour = #{addHour},</if>
             <if test="choosePool != null">choose_pool = #{choosePool},</if>
             <if test="addPool != null">add_pool = #{addPool},</if>
-            <if test="calculateVal != null">calculate_val = #{calculateVal},</if>
-            <if test="realVal != null">real_val = #{realVal},</if>
-            <if test="zkzDown != null">zkz_down = #{zkzDown},</if>
-            <if test="zkzUp != null">zkz_up = #{zkzUp},</if>
             <if test="kzxs != null">kzxs = #{kzxs},</if>
             <if test="htfksd != null">htfksd = #{htfksd},</if>
             <if test="canAdd != null">can_add = #{canAdd},</if>
+            <if test="realVal != null">real_val = #{realVal},</if>
+            <if test="calculateVal != null">calculate_val = #{calculateVal},</if>
+            <if test="oneVal != null">one_val = #{oneVal},</if>
+            <if test="twoVal != null">two_val = #{twoVal},</if>
+            <if test="oneHtfksd != null">one_htfksd = #{oneHtfksd},</if>
+            <if test="twoHtfksd != null">two_htfksd = #{twoHtfksd},</if>
+            <if test="oneKzxs != null">one_kzxs = #{oneKzxs},</if>
+            <if test="twoKzxs != null">two_kzxs = #{twoKzxs},</if>
+            <if test="zkzDown != null">zkz_down = #{zkzDown},</if>
+            <if test="zkzUp != null">zkz_up = #{zkzUp},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="revision != null">revision = #{revision},</if>
             <if test="createBy != null">create_by = #{createBy},</if>