浏览代码

新增投加记录对比 投加参数设置接口

王苗苗 5 月之前
父节点
当前提交
7c6af47e30

+ 39 - 3
src/main/java/com/xlht/xlhtproject/controller/ScheduledTasks.java

@@ -1,10 +1,10 @@
 package com.xlht.xlhtproject.controller;
 
 import com.xlht.xlhtproject.domain.TTbDu;
+import com.xlht.xlhtproject.domain.TTbXie;
+import com.xlht.xlhtproject.domain.TXlhtAddRecord;
 import com.xlht.xlhtproject.domain.TXlhtMedicineParam;
-import com.xlht.xlhtproject.mapper.TShuju1Mapper;
-import com.xlht.xlhtproject.mapper.TTbDuMapper;
-import com.xlht.xlhtproject.mapper.TXlhtMedicineParamMapper;
+import com.xlht.xlhtproject.mapper.*;
 import com.xlht.xlhtproject.utils.CalculateUtils;
 import com.xlht.xlhtproject.utils.DateUtils;
 import lombok.extern.slf4j.Slf4j;
@@ -35,6 +35,12 @@ public class ScheduledTasks {
     @Autowired
     private TTbDuMapper tTbDuMapper;
 
+    @Autowired
+    private TTbXieMapper tTbXieMapper;
+
+    @Autowired
+    private TXlhtAddRecordMapper xlhtAddRecordMapper;
+
     /*@Scheduled(fixedRate = 5, timeUnit = TimeUnit.MINUTES) // 五分钟行一次
     public void reportCurrentTime() {
         System.out.println("现在时间: " + System.currentTimeMillis() / 1000);
@@ -81,6 +87,36 @@ public class ScheduledTasks {
         tTbDu.setC2TjLl(val2);
         tTbDu.setC2TjLlTime(now);
         this.tTbDuMapper.updateTTbDu(tTbDu);
+        //2024年10月13日17:05:42  除了更新表外,还要记录投药的数据
+        TTbXie tTbXie = this.tTbXieMapper.selectTTbXieByID(LONG_1);
+        if(!Objects.isNull(tTbXie)){
+            TXlhtAddRecord xlhtAddRecord = TXlhtAddRecord.builder().build();
+            latestRecord.setTytjTransientLLOne(tTbXie.getOneJYL());
+            latestRecord.setTytjTransientLLTwo(tTbXie.getTwoJYL());
+
+            Integer oneRemoteStatus = tTbXie.getOneRemoteStatus();
+            Integer oneHLStatus = tTbXie.getOneHLStatus();
+            Integer oneHandleStatus = tTbXie.getOneHandleStatus();
+            if(!Objects.isNull(oneRemoteStatus) && oneRemoteStatus == 1 && !Objects.isNull(oneHLStatus) && oneHLStatus == 1 && !Objects.isNull(oneHandleStatus) && oneHandleStatus == 1){
+                xlhtAddRecord.setOneSystemAdd(1);
+            }else {
+                xlhtAddRecord.setOneSystemAdd(0);
+            }
+
+            Integer twoRemoteStatus = tTbXie.getTwoRemoteStatus();
+            Integer twoHLStatus = tTbXie.getTwoHLStatus();
+            Integer twoHandleStatus = tTbXie.getTwoHandleStatus();
+            if(!Objects.isNull(twoRemoteStatus) && twoRemoteStatus == 1 && !Objects.isNull(twoHLStatus) && twoHLStatus == 1 && !Objects.isNull(twoHandleStatus) && twoHandleStatus == 1){
+                xlhtAddRecord.setTwoSystemAdd(1);
+            }else{
+                xlhtAddRecord.setTwoSystemAdd(0);
+            }
+            xlhtAddRecord.setOneAmount(val1);
+            xlhtAddRecord.setTwoAmount(val2);
+            xlhtAddRecord.setRealOneAmount(tTbXie.getOneJYL());
+            xlhtAddRecord.setRealTwoAmount(tTbXie.getTwoJYL());
+            this.xlhtAddRecordMapper.insertTXlhtAddRecord(xlhtAddRecord);
+        }
         log.info("进入了定时投药的逻辑处理--结束");
     }
 

+ 54 - 0
src/main/java/com/xlht/xlhtproject/domain/TXlhtAddRecord.java

@@ -0,0 +1,54 @@
+package com.xlht.xlhtproject.domain;
+
+import java.math.BigDecimal;
+
+import com.xlht.xlhtproject.respParse.bean.BaseEntity;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+/**
+ * 锡林浩特投药记录对象 t_xlht_add_record
+ * 
+ * @author slibra
+ * @date 2024-10-13
+ */
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class TXlhtAddRecord extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 一池是否是系统投药(0否 1是) */
+    private Integer oneSystemAdd;
+
+    /** 二池是否是系统投药(0否 1是) */
+    private Integer twoSystemAdd;
+
+    /** 一池投药量 */
+    private BigDecimal oneAmount;
+
+    /** 二池投药量 */
+    private BigDecimal twoAmount;
+
+    /** 一池反馈的真实投药量 */
+    private BigDecimal realOneAmount;
+
+    /** 二池反馈的真实投药量 */
+    private BigDecimal realTwoAmount;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private Long delFlag;
+
+    /** 乐观锁 */
+    private Long revision;
+
+
+}

+ 53 - 0
src/main/java/com/xlht/xlhtproject/domain/TXlhtConf.java

@@ -0,0 +1,53 @@
+package com.xlht.xlhtproject.domain;
+
+import java.math.BigDecimal;
+
+import com.xlht.xlhtproject.respParse.bean.BaseEntity;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 指标配置对象 t_xlht_conf
+ * 
+ * @author slibra
+ * @date 2024-10-13
+ */
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class TXlhtConf extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 最小投药量 */
+    private BigDecimal minAddAmount;
+
+    /** 最大投药量 */
+    private BigDecimal maxAddAmount;
+
+    /** 最小进水流量 */
+    private BigDecimal minJsll;
+
+    /** 最大进水流量 */
+    private BigDecimal maxJsll;
+
+    /** 最小进水cod量 */
+    private BigDecimal minJsCod;
+
+    /** 最大进水cod量 */
+    private BigDecimal maxJsCod;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private Long delFlag;
+
+    /** 乐观锁 */
+    private Long revision;
+
+
+}

+ 5 - 0
src/main/java/com/xlht/xlhtproject/domain/TXlhtMedicineParam.java

@@ -2,6 +2,7 @@ package com.xlht.xlhtproject.domain;
 
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
@@ -229,14 +230,18 @@ public class TXlhtMedicineParam
     //请求参数
 
     /**  开始时间 */
+    @JsonIgnore
     private String timeBegin;
 
     /** 截止时间 */
+    @JsonIgnore
     private String timeEnd;
 
     /** 当前记录起始索引 */
+    @JsonIgnore
     private Integer pageNum = 1;
 
     /** 每页显示记录数 */
+    @JsonIgnore
     private Integer pageSize = 10;
 }

+ 62 - 0
src/main/java/com/xlht/xlhtproject/mapper/TXlhtAddRecordMapper.java

@@ -0,0 +1,62 @@
+package com.xlht.xlhtproject.mapper;
+
+import com.xlht.xlhtproject.domain.TXlhtAddRecord;
+
+import java.util.List;
+
+/**
+ * 锡林浩特投药记录Mapper接口
+ * 
+ * @author slibra
+ * @date 2024-10-13
+ */
+public interface TXlhtAddRecordMapper 
+{
+    /**
+     * 查询锡林浩特投药记录
+     * 
+     * @param id 锡林浩特投药记录主键
+     * @return 锡林浩特投药记录
+     */
+    public TXlhtAddRecord selectTXlhtAddRecordById(Long id);
+
+    /**
+     * 查询锡林浩特投药记录列表
+     * 
+     * @param tXlhtAddRecord 锡林浩特投药记录
+     * @return 锡林浩特投药记录集合
+     */
+    public List<TXlhtAddRecord> selectTXlhtAddRecordList(TXlhtAddRecord tXlhtAddRecord);
+
+    /**
+     * 新增锡林浩特投药记录
+     * 
+     * @param tXlhtAddRecord 锡林浩特投药记录
+     * @return 结果
+     */
+    public int insertTXlhtAddRecord(TXlhtAddRecord tXlhtAddRecord);
+
+    /**
+     * 修改锡林浩特投药记录
+     * 
+     * @param tXlhtAddRecord 锡林浩特投药记录
+     * @return 结果
+     */
+    public int updateTXlhtAddRecord(TXlhtAddRecord tXlhtAddRecord);
+
+    /**
+     * 删除锡林浩特投药记录
+     * 
+     * @param id 锡林浩特投药记录主键
+     * @return 结果
+     */
+    public int deleteTXlhtAddRecordById(Long id);
+
+    /**
+     * 批量删除锡林浩特投药记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTXlhtAddRecordByIds(Long[] ids);
+}

+ 62 - 0
src/main/java/com/xlht/xlhtproject/mapper/TXlhtConfMapper.java

@@ -0,0 +1,62 @@
+package com.xlht.xlhtproject.mapper;
+
+import com.xlht.xlhtproject.domain.TXlhtConf;
+
+import java.util.List;
+
+/**
+ * 指标配置Mapper接口
+ * 
+ * @author slibra
+ * @date 2024-10-13
+ */
+public interface TXlhtConfMapper 
+{
+    /**
+     * 查询指标配置
+     * 
+     * @param id 指标配置主键
+     * @return 指标配置
+     */
+    public TXlhtConf selectTXlhtConfById(Long id);
+
+    /**
+     * 查询指标配置列表
+     * 
+     * @param tXlhtConf 指标配置
+     * @return 指标配置集合
+     */
+    public List<TXlhtConf> selectTXlhtConfList(TXlhtConf tXlhtConf);
+
+    /**
+     * 新增指标配置
+     * 
+     * @param tXlhtConf 指标配置
+     * @return 结果
+     */
+    public int insertTXlhtConf(TXlhtConf tXlhtConf);
+
+    /**
+     * 修改指标配置
+     * 
+     * @param tXlhtConf 指标配置
+     * @return 结果
+     */
+    public int updateTXlhtConf(TXlhtConf tXlhtConf);
+
+    /**
+     * 删除指标配置
+     * 
+     * @param id 指标配置主键
+     * @return 结果
+     */
+    public int deleteTXlhtConfById(Long id);
+
+    /**
+     * 批量删除指标配置
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTXlhtConfByIds(Long[] ids);
+}

+ 62 - 0
src/main/java/com/xlht/xlhtproject/service/ITXlhtAddRecordService.java

@@ -0,0 +1,62 @@
+package com.xlht.xlhtproject.service;
+
+import com.xlht.xlhtproject.domain.TXlhtAddRecord;
+
+import java.util.List;
+
+/**
+ * 锡林浩特投药记录Service接口
+ * 
+ * @author slibra
+ * @date 2024-10-13
+ */
+public interface ITXlhtAddRecordService 
+{
+    /**
+     * 查询锡林浩特投药记录
+     * 
+     * @param id 锡林浩特投药记录主键
+     * @return 锡林浩特投药记录
+     */
+    public TXlhtAddRecord selectTXlhtAddRecordById(Long id);
+
+    /**
+     * 查询锡林浩特投药记录列表
+     * 
+     * @param tXlhtAddRecord 锡林浩特投药记录
+     * @return 锡林浩特投药记录集合
+     */
+    public List<TXlhtAddRecord> selectTXlhtAddRecordList(TXlhtAddRecord tXlhtAddRecord);
+
+    /**
+     * 新增锡林浩特投药记录
+     * 
+     * @param tXlhtAddRecord 锡林浩特投药记录
+     * @return 结果
+     */
+    public int insertTXlhtAddRecord(TXlhtAddRecord tXlhtAddRecord);
+
+    /**
+     * 修改锡林浩特投药记录
+     * 
+     * @param tXlhtAddRecord 锡林浩特投药记录
+     * @return 结果
+     */
+    public int updateTXlhtAddRecord(TXlhtAddRecord tXlhtAddRecord);
+
+    /**
+     * 批量删除锡林浩特投药记录
+     * 
+     * @param ids 需要删除的锡林浩特投药记录主键集合
+     * @return 结果
+     */
+    public int deleteTXlhtAddRecordByIds(Long[] ids);
+
+    /**
+     * 删除锡林浩特投药记录信息
+     * 
+     * @param id 锡林浩特投药记录主键
+     * @return 结果
+     */
+    public int deleteTXlhtAddRecordById(Long id);
+}

+ 62 - 0
src/main/java/com/xlht/xlhtproject/service/ITXlhtConfService.java

@@ -0,0 +1,62 @@
+package com.xlht.xlhtproject.service;
+
+import com.xlht.xlhtproject.domain.TXlhtConf;
+
+import java.util.List;
+
+/**
+ * 指标配置Service接口
+ * 
+ * @author slibra
+ * @date 2024-10-13
+ */
+public interface ITXlhtConfService 
+{
+    /**
+     * 查询指标配置
+     * 
+     * @param id 指标配置主键
+     * @return 指标配置
+     */
+    public TXlhtConf selectTXlhtConfById(Long id);
+
+    /**
+     * 查询指标配置列表
+     * 
+     * @param tXlhtConf 指标配置
+     * @return 指标配置集合
+     */
+    public List<TXlhtConf> selectTXlhtConfList(TXlhtConf tXlhtConf);
+
+    /**
+     * 新增指标配置
+     * 
+     * @param tXlhtConf 指标配置
+     * @return 结果
+     */
+    public int insertTXlhtConf(TXlhtConf tXlhtConf);
+
+    /**
+     * 修改指标配置
+     * 
+     * @param tXlhtConf 指标配置
+     * @return 结果
+     */
+    public int updateTXlhtConf(TXlhtConf tXlhtConf);
+
+    /**
+     * 批量删除指标配置
+     * 
+     * @param ids 需要删除的指标配置主键集合
+     * @return 结果
+     */
+    public int deleteTXlhtConfByIds(Long[] ids);
+
+    /**
+     * 删除指标配置信息
+     * 
+     * @param id 指标配置主键
+     * @return 结果
+     */
+    public int deleteTXlhtConfById(Long id);
+}

+ 97 - 0
src/main/java/com/xlht/xlhtproject/service/impl/TXlhtAddRecordServiceImpl.java

@@ -0,0 +1,97 @@
+package com.xlht.xlhtproject.service.impl;
+
+import java.util.List;
+
+import com.xlht.xlhtproject.domain.TXlhtAddRecord;
+import com.xlht.xlhtproject.mapper.TXlhtAddRecordMapper;
+import com.xlht.xlhtproject.service.ITXlhtAddRecordService;
+import com.xlht.xlhtproject.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 锡林浩特投药记录Service业务层处理
+ * 
+ * @author slibra
+ * @date 2024-10-13
+ */
+@Service
+public class TXlhtAddRecordServiceImpl implements ITXlhtAddRecordService
+{
+    @Autowired
+    private TXlhtAddRecordMapper tXlhtAddRecordMapper;
+
+    /**
+     * 查询锡林浩特投药记录
+     * 
+     * @param id 锡林浩特投药记录主键
+     * @return 锡林浩特投药记录
+     */
+    @Override
+    public TXlhtAddRecord selectTXlhtAddRecordById(Long id)
+    {
+        return tXlhtAddRecordMapper.selectTXlhtAddRecordById(id);
+    }
+
+    /**
+     * 查询锡林浩特投药记录列表
+     * 
+     * @param tXlhtAddRecord 锡林浩特投药记录
+     * @return 锡林浩特投药记录
+     */
+    @Override
+    public List<TXlhtAddRecord> selectTXlhtAddRecordList(TXlhtAddRecord tXlhtAddRecord)
+    {
+        return tXlhtAddRecordMapper.selectTXlhtAddRecordList(tXlhtAddRecord);
+    }
+
+    /**
+     * 新增锡林浩特投药记录
+     * 
+     * @param tXlhtAddRecord 锡林浩特投药记录
+     * @return 结果
+     */
+    @Override
+    public int insertTXlhtAddRecord(TXlhtAddRecord tXlhtAddRecord)
+    {
+        tXlhtAddRecord.setCreateTime(DateUtils.getNowDate());
+        return tXlhtAddRecordMapper.insertTXlhtAddRecord(tXlhtAddRecord);
+    }
+
+    /**
+     * 修改锡林浩特投药记录
+     * 
+     * @param tXlhtAddRecord 锡林浩特投药记录
+     * @return 结果
+     */
+    @Override
+    public int updateTXlhtAddRecord(TXlhtAddRecord tXlhtAddRecord)
+    {
+        tXlhtAddRecord.setUpdateTime(DateUtils.getNowDate());
+        return tXlhtAddRecordMapper.updateTXlhtAddRecord(tXlhtAddRecord);
+    }
+
+    /**
+     * 批量删除锡林浩特投药记录
+     * 
+     * @param ids 需要删除的锡林浩特投药记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTXlhtAddRecordByIds(Long[] ids)
+    {
+        return tXlhtAddRecordMapper.deleteTXlhtAddRecordByIds(ids);
+    }
+
+    /**
+     * 删除锡林浩特投药记录信息
+     * 
+     * @param id 锡林浩特投药记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTXlhtAddRecordById(Long id)
+    {
+        return tXlhtAddRecordMapper.deleteTXlhtAddRecordById(id);
+    }
+}

+ 97 - 0
src/main/java/com/xlht/xlhtproject/service/impl/TXlhtConfServiceImpl.java

@@ -0,0 +1,97 @@
+package com.xlht.xlhtproject.service.impl;
+
+import java.util.List;
+
+import com.xlht.xlhtproject.domain.TXlhtConf;
+import com.xlht.xlhtproject.mapper.TXlhtConfMapper;
+import com.xlht.xlhtproject.service.ITXlhtConfService;
+import com.xlht.xlhtproject.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 指标配置Service业务层处理
+ * 
+ * @author slibra
+ * @date 2024-10-13
+ */
+@Service
+public class TXlhtConfServiceImpl implements ITXlhtConfService
+{
+    @Autowired
+    private TXlhtConfMapper tXlhtConfMapper;
+
+    /**
+     * 查询指标配置
+     * 
+     * @param id 指标配置主键
+     * @return 指标配置
+     */
+    @Override
+    public TXlhtConf selectTXlhtConfById(Long id)
+    {
+        return tXlhtConfMapper.selectTXlhtConfById(id);
+    }
+
+    /**
+     * 查询指标配置列表
+     * 
+     * @param tXlhtConf 指标配置
+     * @return 指标配置
+     */
+    @Override
+    public List<TXlhtConf> selectTXlhtConfList(TXlhtConf tXlhtConf)
+    {
+        return tXlhtConfMapper.selectTXlhtConfList(tXlhtConf);
+    }
+
+    /**
+     * 新增指标配置
+     * 
+     * @param tXlhtConf 指标配置
+     * @return 结果
+     */
+    @Override
+    public int insertTXlhtConf(TXlhtConf tXlhtConf)
+    {
+        tXlhtConf.setCreateTime(DateUtils.getNowDate());
+        return tXlhtConfMapper.insertTXlhtConf(tXlhtConf);
+    }
+
+    /**
+     * 修改指标配置
+     * 
+     * @param tXlhtConf 指标配置
+     * @return 结果
+     */
+    @Override
+    public int updateTXlhtConf(TXlhtConf tXlhtConf)
+    {
+        tXlhtConf.setUpdateTime(DateUtils.getNowDate());
+        return tXlhtConfMapper.updateTXlhtConf(tXlhtConf);
+    }
+
+    /**
+     * 批量删除指标配置
+     * 
+     * @param ids 需要删除的指标配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTXlhtConfByIds(Long[] ids)
+    {
+        return tXlhtConfMapper.deleteTXlhtConfByIds(ids);
+    }
+
+    /**
+     * 删除指标配置信息
+     * 
+     * @param id 指标配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTXlhtConfById(Long id)
+    {
+        return tXlhtConfMapper.deleteTXlhtConfById(id);
+    }
+}

+ 116 - 0
src/main/resources/mapper/TXlhtAddRecordMapper.xml

@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xlht.xlhtproject.mapper.TXlhtAddRecordMapper">
+
+    <resultMap type="TXlhtAddRecord" id="TXlhtAddRecordResult">
+        <result property="id"    column="id"    />
+        <result property="oneSystemAdd"    column="one_system_add"    />
+        <result property="twoSystemAdd"    column="two_system_add"    />
+        <result property="oneAmount"    column="one_amount"    />
+        <result property="twoAmount"    column="two_amount"    />
+        <result property="realOneAmount"    column="real_one_amount"    />
+        <result property="realTwoAmount"    column="real_two_amount"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="revision"    column="revision"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectTXlhtAddRecordVo">
+        select id, one_system_add, two_system_add, one_amount, two_amount, real_one_amount, real_two_amount, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_xlht_add_record
+    </sql>
+
+    <select id="selectTXlhtAddRecordList" parameterType="TXlhtAddRecord" resultMap="TXlhtAddRecordResult">
+        <include refid="selectTXlhtAddRecordVo"/>
+        <where>
+            1 = 1
+            <if test="oneSystemAdd != null "> and one_system_add = #{oneSystemAdd}</if>
+            <if test="twoSystemAdd != null "> and two_system_add = #{twoSystemAdd}</if>
+            <if test="oneAmount != null "> and one_amount = #{oneAmount}</if>
+            <if test="twoAmount != null "> and two_amount = #{twoAmount}</if>
+            <if test="realOneAmount != null "> and real_one_amount = #{realOneAmount}</if>
+            <if test="realTwoAmount != null "> and real_two_amount = #{realTwoAmount}</if>
+            <if test="revision != null "> and revision = #{revision}</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
+
+    <select id="selectTXlhtAddRecordById" parameterType="Long" resultMap="TXlhtAddRecordResult">
+        <include refid="selectTXlhtAddRecordVo"/>
+        where id = #{id} and del_flag = 0
+    </select>
+
+    <insert id="insertTXlhtAddRecord" parameterType="TXlhtAddRecord" useGeneratedKeys="true" keyProperty="id">
+        insert into t_xlht_add_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="oneSystemAdd != null">one_system_add,</if>
+            <if test="twoSystemAdd != null">two_system_add,</if>
+            <if test="oneAmount != null">one_amount,</if>
+            <if test="twoAmount != null">two_amount,</if>
+            <if test="realOneAmount != null">real_one_amount,</if>
+            <if test="realTwoAmount != null">real_two_amount,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="revision != null">revision,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="oneSystemAdd != null">#{oneSystemAdd},</if>
+            <if test="twoSystemAdd != null">#{twoSystemAdd},</if>
+            <if test="oneAmount != null">#{oneAmount},</if>
+            <if test="twoAmount != null">#{twoAmount},</if>
+            <if test="realOneAmount != null">#{realOneAmount},</if>
+            <if test="realTwoAmount != null">#{realTwoAmount},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="revision != null">#{revision},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+        </trim>
+    </insert>
+
+    <update id="updateTXlhtAddRecord" parameterType="TXlhtAddRecord">
+        update t_xlht_add_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="oneSystemAdd != null">one_system_add = #{oneSystemAdd},</if>
+            <if test="twoSystemAdd != null">two_system_add = #{twoSystemAdd},</if>
+            <if test="oneAmount != null">one_amount = #{oneAmount},</if>
+            <if test="twoAmount != null">two_amount = #{twoAmount},</if>
+            <if test="realOneAmount != null">real_one_amount = #{realOneAmount},</if>
+            <if test="realTwoAmount != null">real_two_amount = #{realTwoAmount},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="revision != null">revision = #{revision},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        ,revision = revision + 1
+        where id = #{id}
+    </update>
+
+
+
+    <delete id="deleteTXlhtAddRecordById" parameterType="Long">
+        update t_xlht_add_record set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
+    </delete>
+
+    <delete id="deleteTXlhtAddRecordByIds" parameterType="String">
+        update t_xlht_add_record set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 115 - 0
src/main/resources/mapper/TXlhtConfMapper.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xlht.xlhtproject.mapper.TXlhtConfMapper">
+    
+    <resultMap type="TXlhtConf" id="TXlhtConfResult">
+        <result property="id"    column="id"    />
+        <result property="minAddAmount"    column="min_add_amount"    />
+        <result property="maxAddAmount"    column="max_add_amount"    />
+        <result property="minJsll"    column="min_jsll"    />
+        <result property="maxJsll"    column="max_jsll"    />
+        <result property="minJsCod"    column="min_js_cod"    />
+        <result property="maxJsCod"    column="max_js_cod"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="revision"    column="revision"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectTXlhtConfVo">
+        select id, min_add_amount, max_add_amount, min_jsll, max_jsll, min_js_cod, max_js_cod, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_xlht_conf
+    </sql>
+
+    <select id="selectTXlhtConfList" parameterType="TXlhtConf" resultMap="TXlhtConfResult">
+        <include refid="selectTXlhtConfVo"/>
+        <where>
+            1 = 1
+            <if test="minAddAmount != null "> and min_add_amount = #{minAddAmount}</if>
+            <if test="maxAddAmount != null "> and max_add_amount = #{maxAddAmount}</if>
+            <if test="minJsll != null "> and min_jsll = #{minJsll}</if>
+            <if test="maxJsll != null "> and max_jsll = #{maxJsll}</if>
+            <if test="minJsCod != null "> and min_js_cod = #{minJsCod}</if>
+            <if test="maxJsCod != null "> and max_js_cod = #{maxJsCod}</if>
+            <if test="revision != null "> and revision = #{revision}</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
+    
+    <select id="selectTXlhtConfById" parameterType="Long" resultMap="TXlhtConfResult">
+        <include refid="selectTXlhtConfVo"/>
+        where id = #{id} and del_flag = 0
+    </select>
+        
+    <insert id="insertTXlhtConf" parameterType="TXlhtConf" useGeneratedKeys="true" keyProperty="id">
+        insert into t_xlht_conf
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="minAddAmount != null">min_add_amount,</if>
+            <if test="maxAddAmount != null">max_add_amount,</if>
+            <if test="minJsll != null">min_jsll,</if>
+            <if test="maxJsll != null">max_jsll,</if>
+            <if test="minJsCod != null">min_js_cod,</if>
+            <if test="maxJsCod != null">max_js_cod,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="revision != null">revision,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="minAddAmount != null">#{minAddAmount},</if>
+            <if test="maxAddAmount != null">#{maxAddAmount},</if>
+            <if test="minJsll != null">#{minJsll},</if>
+            <if test="maxJsll != null">#{maxJsll},</if>
+            <if test="minJsCod != null">#{minJsCod},</if>
+            <if test="maxJsCod != null">#{maxJsCod},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="revision != null">#{revision},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTXlhtConf" parameterType="TXlhtConf">
+        update t_xlht_conf
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="minAddAmount != null">min_add_amount = #{minAddAmount},</if>
+            <if test="maxAddAmount != null">max_add_amount = #{maxAddAmount},</if>
+            <if test="minJsll != null">min_jsll = #{minJsll},</if>
+            <if test="maxJsll != null">max_jsll = #{maxJsll},</if>
+            <if test="minJsCod != null">min_js_cod = #{minJsCod},</if>
+            <if test="maxJsCod != null">max_js_cod = #{maxJsCod},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="revision != null">revision = #{revision},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        ,revision = revision + 1
+        where id = #{id}
+    </update>
+
+    
+
+    <delete id="deleteTXlhtConfById" parameterType="Long">
+        update t_xlht_conf set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
+    </delete>
+
+    <delete id="deleteTXlhtConfByIds" parameterType="String">
+        update t_xlht_conf set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>