Răsfoiți Sursa

碳源投加相关接口编写

王苗苗 6 luni în urmă
părinte
comite
d703618088

BIN
.DS_Store


+ 126 - 0
slibra-admin/src/main/java/com/slibra/web/controller/business/TXinyiMedicineParamController.java

@@ -0,0 +1,126 @@
+package com.slibra.web.controller.business;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.slibra.common.annotation.Log;
+import com.slibra.common.core.controller.BaseController;
+import com.slibra.common.core.domain.AjaxResult;
+import com.slibra.common.enums.BusinessType;
+import com.slibra.business.domain.TXinyiMedicineParam;
+import com.slibra.business.service.ITXinyiMedicineParamService;
+import com.slibra.common.utils.poi.ExcelUtil;
+import com.slibra.common.core.page.TableDataInfo;
+
+/**
+ * 智能投药参数设置Controller
+ * 
+ * @author slibra
+ * @date 2024-09-09
+ */
+@RestController
+@RequestMapping("/business/param")
+public class TXinyiMedicineParamController extends BaseController
+{
+    @Autowired
+    private ITXinyiMedicineParamService tXinyiMedicineParamService;
+
+//    前端需要的接口
+
+    /**
+     * 修改智能投药参数设置
+     *
+     */
+//    @PreAuthorize("@ss.hasPermi('business:param:edit')")
+//    @Log(title = "智能投药参数设置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TXinyiMedicineParam tXinyiMedicineParam)
+    {
+        tXinyiMedicineParam.setUpdateBy(getUsername());
+        return toAjax(tXinyiMedicineParamService.updateTXinyiMedicineParam(tXinyiMedicineParam));
+    }
+
+    /**
+     * 获取智能投药参数设置详细信息最新的一条数据
+     */
+//    @PreAuthorize("@ss.hasPermi('business:param:query')")
+    @GetMapping(value = "/getLatestRecord")
+    public AjaxResult getLatestRecord()
+    {
+        return success(tXinyiMedicineParamService.getLatestRecord());
+    }
+
+
+
+    //下面的前端暂时用不到
+
+
+
+    /**
+     * 查询智能投药参数设置列表
+     */
+//    @PreAuthorize("@ss.hasPermi('business:param:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TXinyiMedicineParam tXinyiMedicineParam)
+    {
+        startPage();
+        List<TXinyiMedicineParam> list = tXinyiMedicineParamService.selectTXinyiMedicineParamList(tXinyiMedicineParam);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出智能投药参数设置列表
+     */
+//    @PreAuthorize("@ss.hasPermi('business:param:export')")
+//    @Log(title = "智能投药参数设置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TXinyiMedicineParam tXinyiMedicineParam)
+    {
+        List<TXinyiMedicineParam> list = tXinyiMedicineParamService.selectTXinyiMedicineParamList(tXinyiMedicineParam);
+        ExcelUtil<TXinyiMedicineParam> util = new ExcelUtil<TXinyiMedicineParam>(TXinyiMedicineParam.class);
+        util.exportExcel(response, list, "智能投药参数设置数据");
+    }
+
+    /**
+     * 获取智能投药参数设置详细信息
+     */
+//    @PreAuthorize("@ss.hasPermi('business:param:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(tXinyiMedicineParamService.selectTXinyiMedicineParamById(id));
+    }
+
+    /**
+     * 新增智能投药参数设置
+     */
+//    @PreAuthorize("@ss.hasPermi('business:param:add')")
+//    @Log(title = "智能投药参数设置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TXinyiMedicineParam tXinyiMedicineParam)
+    {
+        tXinyiMedicineParam.setCreateBy(getUsername());
+        return toAjax(tXinyiMedicineParamService.insertTXinyiMedicineParam(tXinyiMedicineParam));
+    }
+
+
+    /**
+     * 删除智能投药参数设置
+     */
+//    @PreAuthorize("@ss.hasPermi('business:param:remove')")
+//    @Log(title = "智能投药参数设置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tXinyiMedicineParamService.deleteTXinyiMedicineParamByIds(ids));
+    }
+}

+ 1 - 0
slibra-common/src/main/java/com/slibra/common/constant/MyConstants.java

@@ -178,6 +178,7 @@ public class MyConstants {
     public static final int INDEX_2 = 2;
     public static final int INT_2 = 2;
     public static final int INT_3 = 3;
+    public static final int INT_4 = 4;
     public static final int INT_6 = 6;
     public static final int INT_7 = 7;
     public static final int INT_10000 = 10000;//10秒钟

+ 2 - 3
slibra-quartz/src/main/java/com/slibra/quartz/task/RyTask.java

@@ -741,11 +741,10 @@ public class RyTask
 //                    handleXinYiWarningsYC(cscodBzz, split, cscodGkz, BusinessEnum.WarningCategoryEnum.CS_COD_YC.getCode(), hour, normConfig);
                     continue;
                 }
-                //todo 测试环境临时测试,测试完打开注释
-//                if(PROD_ENVIRONMENT.equalsIgnoreCase(environment)){
+                if(PROD_ENVIRONMENT.equalsIgnoreCase(environment)){
                     //解析数据 处理报警 调研prompt 保存等
                     this.handlePredictorWarning(split, hour, task, tXinyiIndustries6, tXinyiRobots6, date);
-//                }
+                }
             }else {
                 log.error("预测数据返回结果为{},无法正常解析", result);
             }

+ 169 - 0
slibra-system/src/main/java/com/slibra/business/domain/TXinyiMedicineParam.java

@@ -0,0 +1,169 @@
+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;
+import com.slibra.common.core.domain.BaseEntity;
+
+/**
+ * 智能投药参数设置对象 t_xinyi_medicine_param
+ * 
+ * @author slibra
+ * @date 2024-09-09
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class TXinyiMedicineParam extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 加药泵(1 1号泵 ;2 2号泵 ;3 3号泵) */
+    @Excel(name = "加药泵", readConverterExp = "1=,1=号泵,;=2,2=号泵,;=3,3=号泵")
+    private Long numberBeng;
+
+    /** 加药方式(0自动 1一号池 2二号池 3人工投放) */
+    @Excel(name = "加药方式(0自动 1一号池 2二号池 3人工投放)")
+    private Long type;
+
+    /** 进水流量类型(0手动 1仪表) */
+    @Excel(name = "进水流量类型", readConverterExp = "0=手动,1=仪表")
+    private Long jsLlType;
+
+    /** 进水流量1号池 */
+    @Excel(name = "进水流量1号池")
+    private BigDecimal jsLlOne;
+
+    /** 进水流量2号池 */
+    @Excel(name = "进水流量2号池")
+    private BigDecimal jsLlTwo;
+
+    /** 进水cod类型(0手动 1仪表 2化验) */
+    @Excel(name = "进水cod类型", readConverterExp = "0=手动,1=仪表,2=化验")
+    private Long jsCodType;
+
+    /** 进水cod1号池 */
+    @Excel(name = "进水cod1号池")
+    private BigDecimal jsCodOne;
+
+    /** 进水cod二号池 */
+    @Excel(name = "进水cod二号池")
+    private BigDecimal jsCodTwo;
+
+    /** 好氧池硝酸盐类型(0手动 1化验 2预测) */
+    @Excel(name = "好氧池硝酸盐类型", readConverterExp = "0=手动,1=化验,2=预测")
+    private Long hycXsyType;
+
+    /** 好氧池硝酸盐1号池 */
+    @Excel(name = "好氧池硝酸盐1号池")
+    private BigDecimal hycXsyOne;
+
+    /** 好氧池硝酸盐二号池 */
+    @Excel(name = "好氧池硝酸盐二号池")
+    private BigDecimal hycXsyTwo;
+
+    /** 缺氧池硝酸盐类型(0手动 1化验) */
+    @Excel(name = "缺氧池硝酸盐类型", readConverterExp = "0=手动,1=化验")
+    private Long qycYxyType;
+
+    /** 缺氧池硝酸盐1号池 */
+    @Excel(name = "缺氧池硝酸盐1号池")
+    private BigDecimal qycYxyOne;
+
+    /** 缺氧池硝酸盐2号池 */
+    @Excel(name = "缺氧池硝酸盐2号池")
+    private BigDecimal qycYxyTwo;
+
+    /** 缺氧池氨氮类型(0手动 1化验) */
+    @Excel(name = "缺氧池氨氮类型", readConverterExp = "0=手动,1=化验")
+    private Long qycAdType;
+
+    /** 缺氧池氨氮1号池 */
+    @Excel(name = "缺氧池氨氮1号池")
+    private BigDecimal qycAdOne;
+
+    /** 缺氧池氨氮二号池 */
+    @Excel(name = "缺氧池氨氮二号池")
+    private BigDecimal qycAdTwo;
+
+    /** 进水总氮类型(0手动 1仪表) */
+    @Excel(name = "进水总氮类型", readConverterExp = "0=手动,1=仪表")
+    private Long jsTnType;
+
+    /** 进水总氮1号池 */
+    @Excel(name = "进水总氮1号池")
+    private BigDecimal jsTnOne;
+
+    /** 进水总氮2号池 */
+    @Excel(name = "进水总氮2号池")
+    private BigDecimal jsTnTwo;
+
+    /** 后台反馈设定 */
+    @Excel(name = "后台反馈设定")
+    private BigDecimal htfksd;
+
+    /** 基准系数 */
+    @Excel(name = "基准系数")
+    private BigDecimal jzxs;
+
+    /** 修正系数 */
+    @Excel(name = "修正系数")
+    private BigDecimal xzxs;
+
+    /** 控制系数 */
+    @Excel(name = "控制系数")
+    private BigDecimal kzxs;
+
+    /** 水量分配系数 */
+    @Excel(name = "水量分配系数")
+    private BigDecimal slfpxs;
+
+    /** 碳源当量 */
+    @Excel(name = "碳源当量")
+    private BigDecimal tydl;
+
+    /** 转换系数 */
+    @Excel(name = "转换系数")
+    private BigDecimal zhxs;
+
+    /** 稀释配属 */
+    @Excel(name = "稀释配属")
+    private BigDecimal sxps;
+
+    /** 药剂密度 */
+    @Excel(name = "药剂密度")
+    private BigDecimal yymd;
+
+    /** 最小启动流量 */
+    @Excel(name = "最小启动流量")
+    private BigDecimal zxqdll;
+
+    /** 碳氮比 */
+    @Excel(name = "碳氮比")
+    private BigDecimal tdb;
+
+    /** 加药量 */
+    @Excel(name = "加药量")
+    private BigDecimal medicineAmount;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private Long delFlag;
+
+    /** 乐观锁 */
+    @Excel(name = "乐观锁")
+    private Long revision;
+
+    //额外查询的字段
+    //碳源投加瞬时流量
+    private BigDecimal tytjTransientLL;
+}

+ 63 - 0
slibra-system/src/main/java/com/slibra/business/mapper/TXinyiMedicineParamMapper.java

@@ -0,0 +1,63 @@
+package com.slibra.business.mapper;
+
+import java.util.List;
+import com.slibra.business.domain.TXinyiMedicineParam;
+
+/**
+ * 智能投药参数设置Mapper接口
+ * 
+ * @author slibra
+ * @date 2024-09-09
+ */
+public interface TXinyiMedicineParamMapper 
+{
+    /**
+     * 查询智能投药参数设置
+     * 
+     * @param id 智能投药参数设置主键
+     * @return 智能投药参数设置
+     */
+    public TXinyiMedicineParam selectTXinyiMedicineParamById(Long id);
+
+    /**
+     * 查询智能投药参数设置列表
+     * 
+     * @param tXinyiMedicineParam 智能投药参数设置
+     * @return 智能投药参数设置集合
+     */
+    public List<TXinyiMedicineParam> selectTXinyiMedicineParamList(TXinyiMedicineParam tXinyiMedicineParam);
+
+    /**
+     * 新增智能投药参数设置
+     * 
+     * @param tXinyiMedicineParam 智能投药参数设置
+     * @return 结果
+     */
+    public int insertTXinyiMedicineParam(TXinyiMedicineParam tXinyiMedicineParam);
+
+    /**
+     * 修改智能投药参数设置
+     * 
+     * @param tXinyiMedicineParam 智能投药参数设置
+     * @return 结果
+     */
+    public int updateTXinyiMedicineParam(TXinyiMedicineParam tXinyiMedicineParam);
+
+    /**
+     * 删除智能投药参数设置
+     * 
+     * @param id 智能投药参数设置主键
+     * @return 结果
+     */
+    public int deleteTXinyiMedicineParamById(Long id);
+
+    /**
+     * 批量删除智能投药参数设置
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTXinyiMedicineParamByIds(Long[] ids);
+
+    TXinyiMedicineParam getLatestRecord();
+}

+ 63 - 0
slibra-system/src/main/java/com/slibra/business/service/ITXinyiMedicineParamService.java

@@ -0,0 +1,63 @@
+package com.slibra.business.service;
+
+import java.util.List;
+import com.slibra.business.domain.TXinyiMedicineParam;
+
+/**
+ * 智能投药参数设置Service接口
+ * 
+ * @author slibra
+ * @date 2024-09-09
+ */
+public interface ITXinyiMedicineParamService 
+{
+    /**
+     * 查询智能投药参数设置
+     * 
+     * @param id 智能投药参数设置主键
+     * @return 智能投药参数设置
+     */
+    public TXinyiMedicineParam selectTXinyiMedicineParamById(Long id);
+
+    /**
+     * 查询智能投药参数设置列表
+     * 
+     * @param tXinyiMedicineParam 智能投药参数设置
+     * @return 智能投药参数设置集合
+     */
+    public List<TXinyiMedicineParam> selectTXinyiMedicineParamList(TXinyiMedicineParam tXinyiMedicineParam);
+
+    /**
+     * 新增智能投药参数设置
+     * 
+     * @param tXinyiMedicineParam 智能投药参数设置
+     * @return 结果
+     */
+    public int insertTXinyiMedicineParam(TXinyiMedicineParam tXinyiMedicineParam);
+
+    /**
+     * 修改智能投药参数设置
+     * 
+     * @param tXinyiMedicineParam 智能投药参数设置
+     * @return 结果
+     */
+    public int updateTXinyiMedicineParam(TXinyiMedicineParam tXinyiMedicineParam);
+
+    /**
+     * 批量删除智能投药参数设置
+     * 
+     * @param ids 需要删除的智能投药参数设置主键集合
+     * @return 结果
+     */
+    public int deleteTXinyiMedicineParamByIds(Long[] ids);
+
+    /**
+     * 删除智能投药参数设置信息
+     * 
+     * @param id 智能投药参数设置主键
+     * @return 结果
+     */
+    public int deleteTXinyiMedicineParamById(Long id);
+
+    TXinyiMedicineParam getLatestRecord();
+}

+ 119 - 0
slibra-system/src/main/java/com/slibra/business/service/impl/TXinyiMedicineParamServiceImpl.java

@@ -0,0 +1,119 @@
+package com.slibra.business.service.impl;
+
+import java.util.List;
+import java.util.Objects;
+
+import com.slibra.business.domain.TXinyiIndustry;
+import com.slibra.business.mapper.TXinyiIndustryMapper;
+import com.slibra.common.DecimalUtils;
+import com.slibra.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.slibra.business.mapper.TXinyiMedicineParamMapper;
+import com.slibra.business.domain.TXinyiMedicineParam;
+import com.slibra.business.service.ITXinyiMedicineParamService;
+
+import static com.slibra.common.constant.MyConstants.INT_2;
+import static com.slibra.common.constant.MyConstants.INT_4;
+
+/**
+ * 智能投药参数设置Service业务层处理
+ * 
+ * @author slibra
+ * @date 2024-09-09
+ */
+@Service
+public class TXinyiMedicineParamServiceImpl implements ITXinyiMedicineParamService 
+{
+    @Autowired
+    private TXinyiMedicineParamMapper tXinyiMedicineParamMapper;
+
+    @Autowired
+    private TXinyiIndustryMapper xinyiIndustryMapper;
+
+    /**
+     * 查询智能投药参数设置
+     * 
+     * @param id 智能投药参数设置主键
+     * @return 智能投药参数设置
+     */
+    @Override
+    public TXinyiMedicineParam selectTXinyiMedicineParamById(Long id)
+    {
+        return tXinyiMedicineParamMapper.selectTXinyiMedicineParamById(id);
+    }
+
+    /**
+     * 查询智能投药参数设置列表
+     * 
+     * @param tXinyiMedicineParam 智能投药参数设置
+     * @return 智能投药参数设置
+     */
+    @Override
+    public List<TXinyiMedicineParam> selectTXinyiMedicineParamList(TXinyiMedicineParam tXinyiMedicineParam)
+    {
+        return tXinyiMedicineParamMapper.selectTXinyiMedicineParamList(tXinyiMedicineParam);
+    }
+
+    /**
+     * 新增智能投药参数设置
+     * 
+     * @param tXinyiMedicineParam 智能投药参数设置
+     * @return 结果
+     */
+    @Override
+    public int insertTXinyiMedicineParam(TXinyiMedicineParam tXinyiMedicineParam)
+    {
+        tXinyiMedicineParam.setCreateTime(DateUtils.getNowDate());
+        return tXinyiMedicineParamMapper.insertTXinyiMedicineParam(tXinyiMedicineParam);
+    }
+
+    /**
+     * 修改智能投药参数设置
+     * 
+     * @param tXinyiMedicineParam 智能投药参数设置
+     * @return 结果
+     */
+    @Override
+    public int updateTXinyiMedicineParam(TXinyiMedicineParam tXinyiMedicineParam)
+    {
+        tXinyiMedicineParam.setUpdateTime(DateUtils.getNowDate());
+        return tXinyiMedicineParamMapper.updateTXinyiMedicineParam(tXinyiMedicineParam);
+    }
+
+    /**
+     * 批量删除智能投药参数设置
+     * 
+     * @param ids 需要删除的智能投药参数设置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTXinyiMedicineParamByIds(Long[] ids)
+    {
+        return tXinyiMedicineParamMapper.deleteTXinyiMedicineParamByIds(ids);
+    }
+
+    /**
+     * 删除智能投药参数设置信息
+     * 
+     * @param id 智能投药参数设置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTXinyiMedicineParamById(Long id)
+    {
+        return tXinyiMedicineParamMapper.deleteTXinyiMedicineParamById(id);
+    }
+
+    @Override
+    public TXinyiMedicineParam getLatestRecord() {
+        TXinyiMedicineParam latestRecord = this.tXinyiMedicineParamMapper.getLatestRecord();
+        if (!Objects.isNull(latestRecord)) {
+            TXinyiIndustry tXinyiIndustry = this.xinyiIndustryMapper.selectTXinyiIndustryNewest();
+            if (!Objects.isNull(tXinyiIndustry)) {
+                latestRecord.setTytjTransientLL(DecimalUtils.getAbsAndScale(tXinyiIndustry.getSJTYJLY(), INT_4));
+            }
+        }
+        return latestRecord;
+    }
+}

+ 251 - 0
slibra-system/src/main/resources/mapper/business/TXinyiMedicineParamMapper.xml

@@ -0,0 +1,251 @@
+<?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.slibra.business.mapper.TXinyiMedicineParamMapper">
+    
+    <resultMap type="TXinyiMedicineParam" id="TXinyiMedicineParamResult">
+        <result property="id"    column="id"    />
+        <result property="numberBeng"    column="number_beng"    />
+        <result property="type"    column="type"    />
+        <result property="jsLlType"    column="js_ll_type"    />
+        <result property="jsLlOne"    column="js_ll_one"    />
+        <result property="jsLlTwo"    column="js_ll_two"    />
+        <result property="jsCodType"    column="js_cod_type"    />
+        <result property="jsCodOne"    column="js_cod_one"    />
+        <result property="jsCodTwo"    column="js_cod_two"    />
+        <result property="hycXsyType"    column="hyc_xsy_type"    />
+        <result property="hycXsyOne"    column="hyc_xsy_one"    />
+        <result property="hycXsyTwo"    column="hyc_xsy_two"    />
+        <result property="qycYxyType"    column="qyc_yxy_type"    />
+        <result property="qycYxyOne"    column="qyc_yxy_one"    />
+        <result property="qycYxyTwo"    column="qyc_yxy_two"    />
+        <result property="qycAdType"    column="qyc_ad_type"    />
+        <result property="qycAdOne"    column="qyc_ad_one"    />
+        <result property="qycAdTwo"    column="qyc_ad_two"    />
+        <result property="jsTnType"    column="js_tn_type"    />
+        <result property="jsTnOne"    column="js_tn_one"    />
+        <result property="jsTnTwo"    column="js_tn_two"    />
+        <result property="htfksd"    column="htfksd"    />
+        <result property="jzxs"    column="jzxs"    />
+        <result property="xzxs"    column="xzxs"    />
+        <result property="kzxs"    column="kzxs"    />
+        <result property="slfpxs"    column="slfpxs"    />
+        <result property="tydl"    column="tydl"    />
+        <result property="zhxs"    column="zhxs"    />
+        <result property="sxps"    column="sxps"    />
+        <result property="yymd"    column="yymd"    />
+        <result property="zxqdll"    column="zxqdll"    />
+        <result property="tdb"    column="tdb"    />
+        <result property="medicineAmount"    column="medicine_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="selectTXinyiMedicineParamVo">
+        select id, number_beng, type, js_ll_type, js_ll_one, js_ll_two, js_cod_type, js_cod_one, js_cod_two, hyc_xsy_type, hyc_xsy_one, hyc_xsy_two, qyc_yxy_type, qyc_yxy_one, qyc_yxy_two, qyc_ad_type, qyc_ad_one, qyc_ad_two, js_tn_type, js_tn_one, js_tn_two, htfksd, jzxs, xzxs, kzxs, slfpxs, tydl, zhxs, sxps, yymd, zxqdll, tdb, medicine_amount, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_xinyi_medicine_param
+    </sql>
+
+    <select id="selectTXinyiMedicineParamList" parameterType="TXinyiMedicineParam" resultMap="TXinyiMedicineParamResult">
+        <include refid="selectTXinyiMedicineParamVo"/>
+        <where>
+            1 = 1
+            <if test="numberBeng != null "> and number_beng = #{numberBeng}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="jsLlType != null "> and js_ll_type = #{jsLlType}</if>
+            <if test="jsLlOne != null "> and js_ll_one = #{jsLlOne}</if>
+            <if test="jsLlTwo != null "> and js_ll_two = #{jsLlTwo}</if>
+            <if test="jsCodType != null "> and js_cod_type = #{jsCodType}</if>
+            <if test="jsCodOne != null "> and js_cod_one = #{jsCodOne}</if>
+            <if test="jsCodTwo != null "> and js_cod_two = #{jsCodTwo}</if>
+            <if test="hycXsyType != null "> and hyc_xsy_type = #{hycXsyType}</if>
+            <if test="hycXsyOne != null "> and hyc_xsy_one = #{hycXsyOne}</if>
+            <if test="hycXsyTwo != null "> and hyc_xsy_two = #{hycXsyTwo}</if>
+            <if test="qycYxyType != null "> and qyc_yxy_type = #{qycYxyType}</if>
+            <if test="qycYxyOne != null "> and qyc_yxy_one = #{qycYxyOne}</if>
+            <if test="qycYxyTwo != null "> and qyc_yxy_two = #{qycYxyTwo}</if>
+            <if test="qycAdType != null "> and qyc_ad_type = #{qycAdType}</if>
+            <if test="qycAdOne != null "> and qyc_ad_one = #{qycAdOne}</if>
+            <if test="qycAdTwo != null "> and qyc_ad_two = #{qycAdTwo}</if>
+            <if test="jsTnType != null "> and js_tn_type = #{jsTnType}</if>
+            <if test="jsTnOne != null "> and js_tn_one = #{jsTnOne}</if>
+            <if test="jsTnTwo != null "> and js_tn_two = #{jsTnTwo}</if>
+            <if test="htfksd != null "> and htfksd = #{htfksd}</if>
+            <if test="jzxs != null "> and jzxs = #{jzxs}</if>
+            <if test="xzxs != null "> and xzxs = #{xzxs}</if>
+            <if test="kzxs != null "> and kzxs = #{kzxs}</if>
+            <if test="slfpxs != null "> and slfpxs = #{slfpxs}</if>
+            <if test="tydl != null "> and tydl = #{tydl}</if>
+            <if test="zhxs != null "> and zhxs = #{zhxs}</if>
+            <if test="sxps != null "> and sxps = #{sxps}</if>
+            <if test="yymd != null "> and yymd = #{yymd}</if>
+            <if test="zxqdll != null "> and zxqdll = #{zxqdll}</if>
+            <if test="tdb != null "> and tdb = #{tdb}</if>
+            <if test="medicineAmount != null "> and medicine_amount = #{medicineAmount}</if>
+            <if test="revision != null "> and revision = #{revision}</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
+    
+    <select id="selectTXinyiMedicineParamById" parameterType="Long" resultMap="TXinyiMedicineParamResult">
+        <include refid="selectTXinyiMedicineParamVo"/>
+        where id = #{id} and del_flag = 0
+    </select>
+        
+    <insert id="insertTXinyiMedicineParam" parameterType="TXinyiMedicineParam" useGeneratedKeys="true" keyProperty="id">
+        insert into t_xinyi_medicine_param
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="numberBeng != null">number_beng,</if>
+            <if test="type != null">type,</if>
+            <if test="jsLlType != null">js_ll_type,</if>
+            <if test="jsLlOne != null">js_ll_one,</if>
+            <if test="jsLlTwo != null">js_ll_two,</if>
+            <if test="jsCodType != null">js_cod_type,</if>
+            <if test="jsCodOne != null">js_cod_one,</if>
+            <if test="jsCodTwo != null">js_cod_two,</if>
+            <if test="hycXsyType != null">hyc_xsy_type,</if>
+            <if test="hycXsyOne != null">hyc_xsy_one,</if>
+            <if test="hycXsyTwo != null">hyc_xsy_two,</if>
+            <if test="qycYxyType != null">qyc_yxy_type,</if>
+            <if test="qycYxyOne != null">qyc_yxy_one,</if>
+            <if test="qycYxyTwo != null">qyc_yxy_two,</if>
+            <if test="qycAdType != null">qyc_ad_type,</if>
+            <if test="qycAdOne != null">qyc_ad_one,</if>
+            <if test="qycAdTwo != null">qyc_ad_two,</if>
+            <if test="jsTnType != null">js_tn_type,</if>
+            <if test="jsTnOne != null">js_tn_one,</if>
+            <if test="jsTnTwo != null">js_tn_two,</if>
+            <if test="htfksd != null">htfksd,</if>
+            <if test="jzxs != null">jzxs,</if>
+            <if test="xzxs != null">xzxs,</if>
+            <if test="kzxs != null">kzxs,</if>
+            <if test="slfpxs != null">slfpxs,</if>
+            <if test="tydl != null">tydl,</if>
+            <if test="zhxs != null">zhxs,</if>
+            <if test="sxps != null">sxps,</if>
+            <if test="yymd != null">yymd,</if>
+            <if test="zxqdll != null">zxqdll,</if>
+            <if test="tdb != null">tdb,</if>
+            <if test="medicineAmount != null">medicine_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="numberBeng != null">#{numberBeng},</if>
+            <if test="type != null">#{type},</if>
+            <if test="jsLlType != null">#{jsLlType},</if>
+            <if test="jsLlOne != null">#{jsLlOne},</if>
+            <if test="jsLlTwo != null">#{jsLlTwo},</if>
+            <if test="jsCodType != null">#{jsCodType},</if>
+            <if test="jsCodOne != null">#{jsCodOne},</if>
+            <if test="jsCodTwo != null">#{jsCodTwo},</if>
+            <if test="hycXsyType != null">#{hycXsyType},</if>
+            <if test="hycXsyOne != null">#{hycXsyOne},</if>
+            <if test="hycXsyTwo != null">#{hycXsyTwo},</if>
+            <if test="qycYxyType != null">#{qycYxyType},</if>
+            <if test="qycYxyOne != null">#{qycYxyOne},</if>
+            <if test="qycYxyTwo != null">#{qycYxyTwo},</if>
+            <if test="qycAdType != null">#{qycAdType},</if>
+            <if test="qycAdOne != null">#{qycAdOne},</if>
+            <if test="qycAdTwo != null">#{qycAdTwo},</if>
+            <if test="jsTnType != null">#{jsTnType},</if>
+            <if test="jsTnOne != null">#{jsTnOne},</if>
+            <if test="jsTnTwo != null">#{jsTnTwo},</if>
+            <if test="htfksd != null">#{htfksd},</if>
+            <if test="jzxs != null">#{jzxs},</if>
+            <if test="xzxs != null">#{xzxs},</if>
+            <if test="kzxs != null">#{kzxs},</if>
+            <if test="slfpxs != null">#{slfpxs},</if>
+            <if test="tydl != null">#{tydl},</if>
+            <if test="zhxs != null">#{zhxs},</if>
+            <if test="sxps != null">#{sxps},</if>
+            <if test="yymd != null">#{yymd},</if>
+            <if test="zxqdll != null">#{zxqdll},</if>
+            <if test="tdb != null">#{tdb},</if>
+            <if test="medicineAmount != null">#{medicineAmount},</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="updateTXinyiMedicineParam" parameterType="TXinyiMedicineParam">
+        update t_xinyi_medicine_param
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="numberBeng != null">number_beng = #{numberBeng},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="jsLlType != null">js_ll_type = #{jsLlType},</if>
+            <if test="jsLlOne != null">js_ll_one = #{jsLlOne},</if>
+            <if test="jsLlTwo != null">js_ll_two = #{jsLlTwo},</if>
+            <if test="jsCodType != null">js_cod_type = #{jsCodType},</if>
+            <if test="jsCodOne != null">js_cod_one = #{jsCodOne},</if>
+            <if test="jsCodTwo != null">js_cod_two = #{jsCodTwo},</if>
+            <if test="hycXsyType != null">hyc_xsy_type = #{hycXsyType},</if>
+            <if test="hycXsyOne != null">hyc_xsy_one = #{hycXsyOne},</if>
+            <if test="hycXsyTwo != null">hyc_xsy_two = #{hycXsyTwo},</if>
+            <if test="qycYxyType != null">qyc_yxy_type = #{qycYxyType},</if>
+            <if test="qycYxyOne != null">qyc_yxy_one = #{qycYxyOne},</if>
+            <if test="qycYxyTwo != null">qyc_yxy_two = #{qycYxyTwo},</if>
+            <if test="qycAdType != null">qyc_ad_type = #{qycAdType},</if>
+            <if test="qycAdOne != null">qyc_ad_one = #{qycAdOne},</if>
+            <if test="qycAdTwo != null">qyc_ad_two = #{qycAdTwo},</if>
+            <if test="jsTnType != null">js_tn_type = #{jsTnType},</if>
+            <if test="jsTnOne != null">js_tn_one = #{jsTnOne},</if>
+            <if test="jsTnTwo != null">js_tn_two = #{jsTnTwo},</if>
+            <if test="htfksd != null">htfksd = #{htfksd},</if>
+            <if test="jzxs != null">jzxs = #{jzxs},</if>
+            <if test="xzxs != null">xzxs = #{xzxs},</if>
+            <if test="kzxs != null">kzxs = #{kzxs},</if>
+            <if test="slfpxs != null">slfpxs = #{slfpxs},</if>
+            <if test="tydl != null">tydl = #{tydl},</if>
+            <if test="zhxs != null">zhxs = #{zhxs},</if>
+            <if test="sxps != null">sxps = #{sxps},</if>
+            <if test="yymd != null">yymd = #{yymd},</if>
+            <if test="zxqdll != null">zxqdll = #{zxqdll},</if>
+            <if test="tdb != null">tdb = #{tdb},</if>
+            <if test="medicineAmount != null">medicine_amount = #{medicineAmount},</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="deleteTXinyiMedicineParamById" parameterType="Long">
+        update t_xinyi_medicine_param set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
+    </delete>
+
+    <delete id="deleteTXinyiMedicineParamByIds" parameterType="String">
+        update t_xinyi_medicine_param 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>
+
+    <!-- 下面是新增的SQL,不要覆盖 -->
+    <select id="getLatestRecord" resultMap="TXinyiMedicineParamResult">
+        <include refid="selectTXinyiMedicineParamVo"/>
+        where del_flag = 0 order by id desc limit 1
+    </select>
+</mapper>