فهرست منبع

新增 硝酸盐反馈表查询相关接口

王苗苗 2 روز پیش
والد
کامیت
4e55f6a6e1

+ 104 - 0
slibra-admin/src/main/java/com/slibra/web/controller/business/XsyFeedbackController.java

@@ -0,0 +1,104 @@
+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.XsyFeedback;
+import com.slibra.business.service.IXsyFeedbackService;
+import com.slibra.common.utils.poi.ExcelUtil;
+import com.slibra.common.core.page.TableDataInfo;
+
+/**
+ * 【请填写功能名称】Controller
+ * 
+ * @author slibra
+ * @date 2025-05-16
+ */
+@RestController
+@RequestMapping("/business/xsyFeedback")
+public class XsyFeedbackController extends BaseController
+{
+    @Autowired
+    private IXsyFeedbackService xsyFeedbackService;
+
+    /**
+     * 查询【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:feedback:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(XsyFeedback xsyFeedback)
+    {
+        startPage();
+        List<XsyFeedback> list = xsyFeedbackService.selectXsyFeedbackList(xsyFeedback);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:feedback:export')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, XsyFeedback xsyFeedback)
+    {
+        List<XsyFeedback> list = xsyFeedbackService.selectXsyFeedbackList(xsyFeedback);
+        ExcelUtil<XsyFeedback> util = new ExcelUtil<XsyFeedback>(XsyFeedback.class);
+        util.exportExcel(response, list, "【请填写功能名称】数据");
+    }
+
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:feedback:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(xsyFeedbackService.selectXsyFeedbackById(id));
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('business:feedback:add')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody XsyFeedback xsyFeedback)
+    {
+        return toAjax(xsyFeedbackService.insertXsyFeedback(xsyFeedback));
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('business:feedback:edit')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody XsyFeedback xsyFeedback)
+    {
+        return toAjax(xsyFeedbackService.updateXsyFeedback(xsyFeedback));
+    }
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('business:feedback:remove')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(xsyFeedbackService.deleteXsyFeedbackByIds(ids));
+    }
+}

+ 26 - 109
slibra-system/src/main/java/com/slibra/business/domain/XsyFeedback.java

@@ -1,5 +1,9 @@
 package com.slibra.business.domain;
 
+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;
@@ -9,9 +13,13 @@ import com.slibra.common.core.domain.BaseEntity;
  * 【请填写功能名称】对象 xsy_feedback
  * 
  * @author slibra
- * @date 2025-04-22
+ * @date 2025-05-16
  */
-public class XsyFeedback extends BaseEntity
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class XsyFeedback
 {
     private static final long serialVersionUID = 1L;
 
@@ -26,6 +34,10 @@ public class XsyFeedback extends BaseEntity
     @Excel(name = "后反馈设定目标最新更新时间")
     private String startTime;
 
+    /** 来源#1,#2 */
+    @Excel(name = "来源#1,#2")
+    private Long source;
+
     /** 硝酸盐后反馈控制目标 */
     @Excel(name = "硝酸盐后反馈控制目标")
     private Long feedbackXsy;
@@ -54,111 +66,16 @@ public class XsyFeedback extends BaseEntity
     @Excel(name = "记录变化过程信息")
     private String ext;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setReqTime(String reqTime) 
-    {
-        this.reqTime = reqTime;
-    }
-
-    public String getReqTime() 
-    {
-        return reqTime;
-    }
-    public void setStartTime(String startTime) 
-    {
-        this.startTime = startTime;
-    }
-
-    public String getStartTime() 
-    {
-        return startTime;
-    }
-    public void setFeedbackXsy(Long feedbackXsy) 
-    {
-        this.feedbackXsy = feedbackXsy;
-    }
-
-    public Long getFeedbackXsy() 
-    {
-        return feedbackXsy;
-    }
-    public void setHyNh3(Long hyNh3) 
-    {
-        this.hyNh3 = hyNh3;
-    }
-
-    public Long getHyNh3() 
-    {
-        return hyNh3;
-    }
-    public void setWarnings(String warnings) 
-    {
-        this.warnings = warnings;
-    }
-
-    public String getWarnings() 
-    {
-        return warnings;
-    }
-    public void setHistory(String history) 
-    {
-        this.history = history;
-    }
-
-    public String getHistory() 
-    {
-        return history;
-    }
-    public void setTimes(Long times) 
-    {
-        this.times = times;
-    }
-
-    public Long getTimes() 
-    {
-        return times;
-    }
-    public void setFlag(Long flag) 
-    {
-        this.flag = flag;
-    }
-
-    public Long getFlag() 
-    {
-        return flag;
-    }
-    public void setExt(String ext) 
-    {
-        this.ext = ext;
-    }
-
-    public String getExt() 
-    {
-        return ext;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("reqTime", getReqTime())
-            .append("updateTime", getUpdateTime())
-            .append("startTime", getStartTime())
-            .append("feedbackXsy", getFeedbackXsy())
-            .append("hyNh3", getHyNh3())
-            .append("warnings", getWarnings())
-            .append("history", getHistory())
-            .append("times", getTimes())
-            .append("flag", getFlag())
-            .append("ext", getExt())
-            .toString();
-    }
+
+    /** 当前请求时间 */
+    @Excel(name = "后反馈设定日志更新时间")
+    private String updateTime;
+
+    //2025年05月09日16:40:08 新增请求参数
+    //开始日期
+    private String dateBegin;
+
+    //截止日期
+    private String dateEnd;
+
 }

+ 61 - 0
slibra-system/src/main/java/com/slibra/business/service/IXsyFeedbackService.java

@@ -0,0 +1,61 @@
+package com.slibra.business.service;
+
+import java.util.List;
+import com.slibra.business.domain.XsyFeedback;
+
+/**
+ * 【请填写功能名称】Service接口
+ * 
+ * @author slibra
+ * @date 2025-05-16
+ */
+public interface IXsyFeedbackService 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public XsyFeedback selectXsyFeedbackById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param xsyFeedback 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<XsyFeedback> selectXsyFeedbackList(XsyFeedback xsyFeedback);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param xsyFeedback 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertXsyFeedback(XsyFeedback xsyFeedback);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param xsyFeedback 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateXsyFeedback(XsyFeedback xsyFeedback);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的【请填写功能名称】主键集合
+     * @return 结果
+     */
+    public int deleteXsyFeedbackByIds(Long[] ids);
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteXsyFeedbackById(Long id);
+}

+ 94 - 0
slibra-system/src/main/java/com/slibra/business/service/impl/XsyFeedbackServiceImpl.java

@@ -0,0 +1,94 @@
+package com.slibra.business.service.impl;
+
+import java.util.List;
+import com.slibra.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.slibra.business.mapper.XsyFeedbackMapper;
+import com.slibra.business.domain.XsyFeedback;
+import com.slibra.business.service.IXsyFeedbackService;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ * 
+ * @author slibra
+ * @date 2025-05-16
+ */
+@Service
+public class XsyFeedbackServiceImpl implements IXsyFeedbackService 
+{
+    @Autowired
+    private XsyFeedbackMapper xsyFeedbackMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public XsyFeedback selectXsyFeedbackById(Long id)
+    {
+        return xsyFeedbackMapper.selectXsyFeedbackById(id);
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param xsyFeedback 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<XsyFeedback> selectXsyFeedbackList(XsyFeedback xsyFeedback)
+    {
+        return xsyFeedbackMapper.selectXsyFeedbackList(xsyFeedback);
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param xsyFeedback 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertXsyFeedback(XsyFeedback xsyFeedback)
+    {
+        return xsyFeedbackMapper.insertXsyFeedback(xsyFeedback);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param xsyFeedback 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updateXsyFeedback(XsyFeedback xsyFeedback)
+    {
+        return xsyFeedbackMapper.updateXsyFeedback(xsyFeedback);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteXsyFeedbackByIds(Long[] ids)
+    {
+        return xsyFeedbackMapper.deleteXsyFeedbackByIds(ids);
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteXsyFeedbackById(Long id)
+    {
+        return xsyFeedbackMapper.deleteXsyFeedbackById(id);
+    }
+}

+ 31 - 22
slibra-system/src/main/resources/mapper/business/XsyFeedbackMapper.xml

@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="reqTime"    column="req_time"    />
         <result property="updateTime"    column="update_time"    />
         <result property="startTime"    column="start_time"    />
+        <result property="source"    column="source"    />
         <result property="feedbackXsy"    column="feedback_xsy"    />
         <result property="hyNh3"    column="hy_nh3"    />
         <result property="warnings"    column="warnings"    />
@@ -19,29 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectXsyFeedbackVo">
-        select id, req_time, update_time, start_time, feedback_xsy, hy_nh3, warnings, history, times, flag, ext from xsy_feedback
+        select id, req_time, update_time, start_time, source, feedback_xsy, hy_nh3, warnings, history, times, flag, ext from xsy_feedback
     </sql>
 
-    <select id="selectXsyFeedbackList" parameterType="XsyFeedback" resultMap="XsyFeedbackResult">
-        <include refid="selectXsyFeedbackVo"/>
-        <where>
-            1 = 1
-            <if test="reqTime != null  and reqTime != ''"> and req_time = #{reqTime}</if>
-            <if test="startTime != null  and startTime != ''"> and start_time = #{startTime}</if>
-            <if test="feedbackXsy != null "> and feedback_xsy = #{feedbackXsy}</if>
-            <if test="hyNh3 != null "> and hy_nh3 = #{hyNh3}</if>
-            <if test="warnings != null  and warnings != ''"> and warnings = #{warnings}</if>
-            <if test="history != null  and history != ''"> and history = #{history}</if>
-            <if test="times != null "> and times = #{times}</if>
-            <if test="flag != null "> and flag = #{flag}</if>
-            <if test="ext != null  and ext != ''"> and ext = #{ext}</if>
-        </where>
-        and del_flag = 0 order by id desc
-    </select>
-    
     <select id="selectXsyFeedbackById" parameterType="Long" resultMap="XsyFeedbackResult">
         <include refid="selectXsyFeedbackVo"/>
-        where id = #{id} and del_flag = 0
+        where id = #{id}
     </select>
         
     <insert id="insertXsyFeedback" parameterType="XsyFeedback" useGeneratedKeys="true" keyProperty="id">
@@ -50,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reqTime != null">req_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="startTime != null">start_time,</if>
+            <if test="source != null">source,</if>
             <if test="feedbackXsy != null">feedback_xsy,</if>
             <if test="hyNh3 != null">hy_nh3,</if>
             <if test="warnings != null">warnings,</if>
@@ -62,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reqTime != null">#{reqTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="startTime != null">#{startTime},</if>
+            <if test="source != null">#{source},</if>
             <if test="feedbackXsy != null">#{feedbackXsy},</if>
             <if test="hyNh3 != null">#{hyNh3},</if>
             <if test="warnings != null">#{warnings},</if>
@@ -78,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reqTime != null">req_time = #{reqTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="source != null">source = #{source},</if>
             <if test="feedbackXsy != null">feedback_xsy = #{feedbackXsy},</if>
             <if test="hyNh3 != null">hy_nh3 = #{hyNh3},</if>
             <if test="warnings != null">warnings = #{warnings},</if>
@@ -86,25 +73,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="flag != null">flag = #{flag},</if>
             <if test="ext != null">ext = #{ext},</if>
         </trim>
-        ,revision = revision + 1
         where id = #{id}
     </update>
 
     
 
     <delete id="deleteXsyFeedbackById" parameterType="Long">
-        delete from xsy_feedback whereid = #{id}
+        delete from xsy_feedback where id = #{id}
     </delete>
 
     <delete id="deleteXsyFeedbackByIds" parameterType="String">
-        update xsy_feedback set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
+        delete from xsy_feedback where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
 
+    <!-- 2025年05月16日10:26:38 新增或者调整的SQL,不允许删除或者覆盖 -->
+
     <delete id="deleteAll" >
         <!-- truncate table xsy_feedback -->
         delete from xsy_feedback
      </delete>
+
+    <select id="selectXsyFeedbackList" parameterType="XsyFeedback" resultMap="XsyFeedbackResult">
+        <include refid="selectXsyFeedbackVo"/>
+        <where>
+            1 = 1
+            <if test="reqTime != null  and reqTime != ''"> and req_time = #{reqTime}</if>
+            <if test="startTime != null  and startTime != ''"> and start_time = #{startTime}</if>
+            <if test="source != null "> and source = #{source}</if>
+            <if test="feedbackXsy != null "> and feedback_xsy = #{feedbackXsy}</if>
+            <if test="hyNh3 != null "> and hy_nh3 = #{hyNh3}</if>
+            <if test="warnings != null  and warnings != ''"> and warnings = #{warnings}</if>
+            <if test="history != null  and history != ''"> and history = #{history}</if>
+            <if test="times != null "> and times = #{times}</if>
+            <if test="flag != null "> and flag = #{flag}</if>
+            <if test="ext != null  and ext != ''"> and ext = #{ext}</if>
+            <!-- 2025年05月16日10:28:16 新增的筛选条件 -->
+            <if test="dateBegin != null "> and SUBSTRING(update_time, 1, 10)  &gt;= #{dateBegin}</if>
+            <if test="dateEnd != null "> and SUBSTRING(update_time, 1, 10)  &lt;= #{dateEnd}</if>
+        </where>
+        order by id desc
+    </select>
  </mapper>