From 20c287a2d82d0e28a3f5ec6e6235a95b21f48907 Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期五, 22 十一月 2024 09:36:31 +0800
Subject: [PATCH] -拧紧数据

---
 billion-ui/src/views/main/da/tightenCollection/index.vue                                        |  319 +++++++++++++++++++++
 billion-main/src/main/java/com/billion/main/da/service/impl/DaTightenCollectionServiceImpl.java |   95 ++++++
 billion-main/src/main/resources/mapper/da/DaTightenCollectionMapper.xml                         |   94 ++++++
 billion-ui/src/api/main/da/tightenCollection.js                                                 |   44 ++
 billion-ui/src/views/main/da/paramCollection/index.vue                                          |    3 
 billion-main/src/main/java/com/billion/main/da/mapper/DaTightenCollectionMapper.java            |   63 ++++
 billion-main/src/main/java/com/billion/main/da/domain/DaParamCollection.java                    |    6 
 billion-main/src/main/java/com/billion/main/da/service/impl/DaParamCollectionServiceImpl.java   |    5 
 billion-main/src/main/java/com/billion/main/da/service/IDaTightenCollectionService.java         |   63 ++++
 billion-main/src/main/java/com/billion/main/da/controller/DaTightenCollectionController.java    |  104 ++++++
 billion-main/src/main/java/com/billion/main/da/domain/DaTightenCollection.java                  |   63 ++++
 billion-main/src/main/resources/mapper/da/DaParamCollectionMapper.xml                           |    2 
 12 files changed, 859 insertions(+), 2 deletions(-)

diff --git a/billion-main/src/main/java/com/billion/main/da/controller/DaTightenCollectionController.java b/billion-main/src/main/java/com/billion/main/da/controller/DaTightenCollectionController.java
new file mode 100644
index 0000000..9e49def
--- /dev/null
+++ b/billion-main/src/main/java/com/billion/main/da/controller/DaTightenCollectionController.java
@@ -0,0 +1,104 @@
+package com.billion.main.da.controller;
+
+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.billion.common.annotation.Log;
+import com.billion.common.core.controller.BaseController;
+import com.billion.common.core.domain.AjaxResult;
+import com.billion.common.enums.BusinessType;
+import com.billion.main.da.domain.DaTightenCollection;
+import com.billion.main.da.service.IDaTightenCollectionService;
+import com.billion.common.utils.poi.ExcelUtil;
+import com.billion.common.core.page.TableDataInfo;
+
+/**
+ * 鎷х揣閲囬泦Controller
+ * 
+ * @author Billion-Yi
+ * @date 2024-11-22
+ */
+@RestController
+@RequestMapping("/da/tightenCollection")
+public class DaTightenCollectionController extends BaseController
+{
+    @Autowired
+    private IDaTightenCollectionService daTightenCollectionService;
+
+    /**
+     * 鏌ヨ鎷х揣閲囬泦鍒楄〃
+     */
+    @PreAuthorize("@ss.hasPermi('da:tightenCollection:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(DaTightenCollection daTightenCollection)
+    {
+        startPage();
+        List<DaTightenCollection> list = daTightenCollectionService.selectDaTightenCollectionList(daTightenCollection);
+        return getDataTable(list);
+    }
+
+    /**
+     * 瀵煎嚭鎷х揣閲囬泦鍒楄〃
+     */
+    @PreAuthorize("@ss.hasPermi('da:tightenCollection:export')")
+    @Log(title = "鎷х揣閲囬泦", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DaTightenCollection daTightenCollection)
+    {
+        List<DaTightenCollection> list = daTightenCollectionService.selectDaTightenCollectionList(daTightenCollection);
+        ExcelUtil<DaTightenCollection> util = new ExcelUtil<DaTightenCollection>(DaTightenCollection.class);
+        util.exportExcel(response, list, "鎷х揣閲囬泦鏁版嵁");
+    }
+
+    /**
+     * 鑾峰彇鎷х揣閲囬泦璇︾粏淇℃伅
+     */
+    @PreAuthorize("@ss.hasPermi('da:tightenCollection:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(daTightenCollectionService.selectDaTightenCollectionById(id));
+    }
+
+    /**
+     * 鏂板鎷х揣閲囬泦
+     */
+    @PreAuthorize("@ss.hasPermi('da:tightenCollection:add')")
+    @Log(title = "鎷х揣閲囬泦", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody DaTightenCollection daTightenCollection)
+    {
+        return toAjax(daTightenCollectionService.insertDaTightenCollection(daTightenCollection));
+    }
+
+    /**
+     * 淇敼鎷х揣閲囬泦
+     */
+    @PreAuthorize("@ss.hasPermi('da:tightenCollection:edit')")
+    @Log(title = "鎷х揣閲囬泦", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody DaTightenCollection daTightenCollection)
+    {
+        return toAjax(daTightenCollectionService.updateDaTightenCollection(daTightenCollection));
+    }
+
+    /**
+     * 鍒犻櫎鎷х揣閲囬泦
+     */
+    @PreAuthorize("@ss.hasPermi('da:tightenCollection:remove')")
+    @Log(title = "鎷х揣閲囬泦", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(daTightenCollectionService.deleteDaTightenCollectionByIds(ids));
+    }
+}
diff --git a/billion-main/src/main/java/com/billion/main/da/domain/DaParamCollection.java b/billion-main/src/main/java/com/billion/main/da/domain/DaParamCollection.java
index 3b88c1b..7fdbc6f 100644
--- a/billion-main/src/main/java/com/billion/main/da/domain/DaParamCollection.java
+++ b/billion-main/src/main/java/com/billion/main/da/domain/DaParamCollection.java
@@ -52,5 +52,11 @@
     @TableField(exist = false)
     private String[] timeQuery;
 
+    @TableField(exist = false)
+    private String startTime;
+
+    @TableField(exist = false)
+    private String stopTime;
+
 
 }
diff --git a/billion-main/src/main/java/com/billion/main/da/domain/DaTightenCollection.java b/billion-main/src/main/java/com/billion/main/da/domain/DaTightenCollection.java
new file mode 100644
index 0000000..f768b09
--- /dev/null
+++ b/billion-main/src/main/java/com/billion/main/da/domain/DaTightenCollection.java
@@ -0,0 +1,63 @@
+package com.billion.main.da.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.billion.common.annotation.Excel;
+import com.billion.main.common.BaseEntity;
+
+/**
+ * 鎷х揣閲囬泦瀵硅薄 da_tighten_collection
+ * 
+ * @author Billion-Yi
+ * @date 2024-11-22
+ */
+@Data
+public class DaTightenCollection extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 涓婚敭id */
+    private Long id;
+
+    /** 鎬绘垚搴忓垪鍙� */
+    @Excel(name = "鎬绘垚搴忓垪鍙�")
+    private String sfcCode;
+
+    /** 宸ヤ綅缂栫爜 */
+    @Excel(name = "宸ヤ綅缂栫爜")
+    private String locationCode;
+
+    /** 鍙傛暟闆嗙紪鐮� */
+    @Excel(name = "鍙傛暟闆嗙紪鐮�")
+    private String paramSetCode;
+
+    /** 鍙傛暟闆嗗悕绉� */
+    @Excel(name = "鍙傛暟闆嗗悕绉�")
+    private String paramSetName;
+
+    /** 鎵煩鍊� */
+    @Excel(name = "鎵煩鍊�")
+    private String torque;
+
+    /** 鎵煩鐘舵�� */
+    @Excel(name = "鎵煩鐘舵��")
+    private String torqueStatus;
+
+    /** 瑙掑害鍊� */
+    @Excel(name = "瑙掑害鍊�")
+    private String angle;
+
+    /** 瑙掑害鐘舵�� */
+    @Excel(name = "瑙掑害鐘舵��")
+    private String angleStatus;
+
+    /** 閲囬泦鏃堕棿 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "閲囬泦鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date collectTime;
+
+
+}
diff --git a/billion-main/src/main/java/com/billion/main/da/mapper/DaTightenCollectionMapper.java b/billion-main/src/main/java/com/billion/main/da/mapper/DaTightenCollectionMapper.java
new file mode 100644
index 0000000..4f0d15f
--- /dev/null
+++ b/billion-main/src/main/java/com/billion/main/da/mapper/DaTightenCollectionMapper.java
@@ -0,0 +1,63 @@
+package com.billion.main.da.mapper;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.billion.main.da.domain.DaTightenCollection;
+
+/**
+ * 鎷х揣閲囬泦Mapper鎺ュ彛
+ * 
+ * @author Billion-Yi
+ * @date 2024-11-22
+ */
+public interface DaTightenCollectionMapper extends BaseMapper<DaTightenCollection>
+{
+    /**
+     * 鏌ヨ鎷х揣閲囬泦
+     * 
+     * @param id 鎷х揣閲囬泦涓婚敭
+     * @return 鎷х揣閲囬泦
+     */
+    public DaTightenCollection selectDaTightenCollectionById(Long id);
+
+    /**
+     * 鏌ヨ鎷х揣閲囬泦鍒楄〃
+     * 
+     * @param daTightenCollection 鎷х揣閲囬泦
+     * @return 鎷х揣閲囬泦闆嗗悎
+     */
+    public List<DaTightenCollection> selectDaTightenCollectionList(DaTightenCollection daTightenCollection);
+
+    /**
+     * 鏂板鎷х揣閲囬泦
+     * 
+     * @param daTightenCollection 鎷х揣閲囬泦
+     * @return 缁撴灉
+     */
+    public int insertDaTightenCollection(DaTightenCollection daTightenCollection);
+
+    /**
+     * 淇敼鎷х揣閲囬泦
+     * 
+     * @param daTightenCollection 鎷х揣閲囬泦
+     * @return 缁撴灉
+     */
+    public int updateDaTightenCollection(DaTightenCollection daTightenCollection);
+
+    /**
+     * 鍒犻櫎鎷х揣閲囬泦
+     * 
+     * @param id 鎷х揣閲囬泦涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteDaTightenCollectionById(Long id);
+
+    /**
+     * 鎵归噺鍒犻櫎鎷х揣閲囬泦
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteDaTightenCollectionByIds(Long[] ids);
+}
diff --git a/billion-main/src/main/java/com/billion/main/da/service/IDaTightenCollectionService.java b/billion-main/src/main/java/com/billion/main/da/service/IDaTightenCollectionService.java
new file mode 100644
index 0000000..1ba17ef
--- /dev/null
+++ b/billion-main/src/main/java/com/billion/main/da/service/IDaTightenCollectionService.java
@@ -0,0 +1,63 @@
+package com.billion.main.da.service;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.billion.main.da.domain.DaTightenCollection;
+
+/**
+ * 鎷х揣閲囬泦Service鎺ュ彛
+ * 
+ * @author Billion-Yi
+ * @date 2024-11-22
+ */
+public interface IDaTightenCollectionService extends IService<DaTightenCollection>
+{
+    /**
+     * 鏌ヨ鎷х揣閲囬泦
+     * 
+     * @param id 鎷х揣閲囬泦涓婚敭
+     * @return 鎷х揣閲囬泦
+     */
+    public DaTightenCollection selectDaTightenCollectionById(Long id);
+
+    /**
+     * 鏌ヨ鎷х揣閲囬泦鍒楄〃
+     * 
+     * @param daTightenCollection 鎷х揣閲囬泦
+     * @return 鎷х揣閲囬泦闆嗗悎
+     */
+    public List<DaTightenCollection> selectDaTightenCollectionList(DaTightenCollection daTightenCollection);
+
+    /**
+     * 鏂板鎷х揣閲囬泦
+     * 
+     * @param daTightenCollection 鎷х揣閲囬泦
+     * @return 缁撴灉
+     */
+    public int insertDaTightenCollection(DaTightenCollection daTightenCollection);
+
+    /**
+     * 淇敼鎷х揣閲囬泦
+     * 
+     * @param daTightenCollection 鎷х揣閲囬泦
+     * @return 缁撴灉
+     */
+    public int updateDaTightenCollection(DaTightenCollection daTightenCollection);
+
+    /**
+     * 鎵归噺鍒犻櫎鎷х揣閲囬泦
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑鎷х揣閲囬泦涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteDaTightenCollectionByIds(Long[] ids);
+
+    /**
+     * 鍒犻櫎鎷х揣閲囬泦淇℃伅
+     * 
+     * @param id 鎷х揣閲囬泦涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteDaTightenCollectionById(Long id);
+}
diff --git a/billion-main/src/main/java/com/billion/main/da/service/impl/DaParamCollectionServiceImpl.java b/billion-main/src/main/java/com/billion/main/da/service/impl/DaParamCollectionServiceImpl.java
index a646020..1c6ebae 100644
--- a/billion-main/src/main/java/com/billion/main/da/service/impl/DaParamCollectionServiceImpl.java
+++ b/billion-main/src/main/java/com/billion/main/da/service/impl/DaParamCollectionServiceImpl.java
@@ -3,6 +3,7 @@
 import java.util.Date;
 import java.util.List;
 
+import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -43,6 +44,10 @@
     @Override
     public List<DaParamCollection> selectDaParamCollectionList(DaParamCollection daParamCollection)
     {
+        if(ObjectUtil.isNotNull(daParamCollection.getTimeQuery())){
+            daParamCollection.setStartTime(daParamCollection.getTimeQuery()[0]);
+            daParamCollection.setStopTime(daParamCollection.getTimeQuery()[1]);
+        }
         return daParamCollectionMapper.selectDaParamCollectionList(daParamCollection);
     }
 
diff --git a/billion-main/src/main/java/com/billion/main/da/service/impl/DaTightenCollectionServiceImpl.java b/billion-main/src/main/java/com/billion/main/da/service/impl/DaTightenCollectionServiceImpl.java
new file mode 100644
index 0000000..34382cd
--- /dev/null
+++ b/billion-main/src/main/java/com/billion/main/da/service/impl/DaTightenCollectionServiceImpl.java
@@ -0,0 +1,95 @@
+package com.billion.main.da.service.impl;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.billion.main.da.mapper.DaTightenCollectionMapper;
+import com.billion.main.da.domain.DaTightenCollection;
+import com.billion.main.da.service.IDaTightenCollectionService;
+
+/**
+ * 鎷х揣閲囬泦Service涓氬姟灞傚鐞�
+ * 
+ * @author Billion-Yi
+ * @date 2024-11-22
+ */
+@Service
+public class DaTightenCollectionServiceImpl extends ServiceImpl<DaTightenCollectionMapper, DaTightenCollection> implements IDaTightenCollectionService
+{
+    @Autowired
+    private DaTightenCollectionMapper daTightenCollectionMapper;
+
+    /**
+     * 鏌ヨ鎷х揣閲囬泦
+     * 
+     * @param id 鎷х揣閲囬泦涓婚敭
+     * @return 鎷х揣閲囬泦
+     */
+    @Override
+    public DaTightenCollection selectDaTightenCollectionById(Long id)
+    {
+        return daTightenCollectionMapper.selectDaTightenCollectionById(id);
+    }
+
+    /**
+     * 鏌ヨ鎷х揣閲囬泦鍒楄〃
+     * 
+     * @param daTightenCollection 鎷х揣閲囬泦
+     * @return 鎷х揣閲囬泦
+     */
+    @Override
+    public List<DaTightenCollection> selectDaTightenCollectionList(DaTightenCollection daTightenCollection)
+    {
+        return daTightenCollectionMapper.selectDaTightenCollectionList(daTightenCollection);
+    }
+
+    /**
+     * 鏂板鎷х揣閲囬泦
+     * 
+     * @param daTightenCollection 鎷х揣閲囬泦
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertDaTightenCollection(DaTightenCollection daTightenCollection)
+    {
+        return daTightenCollectionMapper.insertDaTightenCollection(daTightenCollection);
+    }
+
+    /**
+     * 淇敼鎷х揣閲囬泦
+     * 
+     * @param daTightenCollection 鎷х揣閲囬泦
+     * @return 缁撴灉
+     */
+    @Override
+    public int updateDaTightenCollection(DaTightenCollection daTightenCollection)
+    {
+        return daTightenCollectionMapper.updateDaTightenCollection(daTightenCollection);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎鎷х揣閲囬泦
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑鎷х揣閲囬泦涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteDaTightenCollectionByIds(Long[] ids)
+    {
+        return daTightenCollectionMapper.deleteDaTightenCollectionByIds(ids);
+    }
+
+    /**
+     * 鍒犻櫎鎷х揣閲囬泦淇℃伅
+     * 
+     * @param id 鎷х揣閲囬泦涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteDaTightenCollectionById(Long id)
+    {
+        return daTightenCollectionMapper.deleteDaTightenCollectionById(id);
+    }
+}
diff --git a/billion-main/src/main/resources/mapper/da/DaParamCollectionMapper.xml b/billion-main/src/main/resources/mapper/da/DaParamCollectionMapper.xml
index 7a2d95b..68cb403 100644
--- a/billion-main/src/main/resources/mapper/da/DaParamCollectionMapper.xml
+++ b/billion-main/src/main/resources/mapper/da/DaParamCollectionMapper.xml
@@ -25,6 +25,8 @@
             <if test="locationCode != null  and locationCode != ''"> and location_code like concat('%', #{locationCode}, '%')</if>
             <if test="paramCode != null  and paramCode != ''"> and param_code = #{paramCode}</if>
             <if test="paramName != null  and paramName != ''"> and param_name like concat('%', #{paramName}, '%')</if>
+            <if test="startTime != null"> and collect_time BETWEEN #{startTime} and #{stopTime}</if>
+
         </where>
     </select>
     
diff --git a/billion-main/src/main/resources/mapper/da/DaTightenCollectionMapper.xml b/billion-main/src/main/resources/mapper/da/DaTightenCollectionMapper.xml
new file mode 100644
index 0000000..021f163
--- /dev/null
+++ b/billion-main/src/main/resources/mapper/da/DaTightenCollectionMapper.xml
@@ -0,0 +1,94 @@
+<?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.billion.main.da.mapper.DaTightenCollectionMapper">
+    
+    <resultMap type="DaTightenCollection" id="DaTightenCollectionResult">
+        <result property="id"    column="id"    />
+        <result property="sfcCode"    column="sfc_code"    />
+        <result property="locationCode"    column="location_code"    />
+        <result property="paramSetCode"    column="param_set_code"    />
+        <result property="paramSetName"    column="param_set_name"    />
+        <result property="torque"    column="torque"    />
+        <result property="torqueStatus"    column="torque_status"    />
+        <result property="angle"    column="angle"    />
+        <result property="angleStatus"    column="angle_status"    />
+        <result property="collectTime"    column="collect_time"    />
+    </resultMap>
+
+    <sql id="selectDaTightenCollectionVo">
+        select id, sfc_code, location_code, param_set_code, param_set_name, torque, torque_status, angle, angle_status, collect_time from da_tighten_collection
+    </sql>
+
+    <select id="selectDaTightenCollectionList" parameterType="DaTightenCollection" resultMap="DaTightenCollectionResult">
+        <include refid="selectDaTightenCollectionVo"/>
+        <where>  
+            <if test="sfcCode != null  and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
+            <if test="locationCode != null  and locationCode != ''"> and location_code like concat('%', #{locationCode}, '%')</if>
+            <if test="paramSetCode != null  and paramSetCode != ''"> and param_set_code like concat('%', #{paramSetCode}, '%')</if>
+            <if test="paramSetName != null  and paramSetName != ''"> and param_set_name like concat('%', #{paramSetName}, '%')</if>
+            <if test="torqueStatus != null  and torqueStatus != ''"> and torque_status = #{torqueStatus}</if>
+            <if test="angleStatus != null  and angleStatus != ''"> and angle_status = #{angleStatus}</if>
+            <if test="collectTime != null "> and collect_time = #{collectTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectDaTightenCollectionById" parameterType="Long" resultMap="DaTightenCollectionResult">
+        <include refid="selectDaTightenCollectionVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertDaTightenCollection" parameterType="DaTightenCollection" useGeneratedKeys="true" keyProperty="id">
+        insert into da_tighten_collection
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="sfcCode != null">sfc_code,</if>
+            <if test="locationCode != null">location_code,</if>
+            <if test="paramSetCode != null">param_set_code,</if>
+            <if test="paramSetName != null">param_set_name,</if>
+            <if test="torque != null">torque,</if>
+            <if test="torqueStatus != null">torque_status,</if>
+            <if test="angle != null">angle,</if>
+            <if test="angleStatus != null">angle_status,</if>
+            <if test="collectTime != null">collect_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="sfcCode != null">#{sfcCode},</if>
+            <if test="locationCode != null">#{locationCode},</if>
+            <if test="paramSetCode != null">#{paramSetCode},</if>
+            <if test="paramSetName != null">#{paramSetName},</if>
+            <if test="torque != null">#{torque},</if>
+            <if test="torqueStatus != null">#{torqueStatus},</if>
+            <if test="angle != null">#{angle},</if>
+            <if test="angleStatus != null">#{angleStatus},</if>
+            <if test="collectTime != null">#{collectTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateDaTightenCollection" parameterType="DaTightenCollection">
+        update da_tighten_collection
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="sfcCode != null">sfc_code = #{sfcCode},</if>
+            <if test="locationCode != null">location_code = #{locationCode},</if>
+            <if test="paramSetCode != null">param_set_code = #{paramSetCode},</if>
+            <if test="paramSetName != null">param_set_name = #{paramSetName},</if>
+            <if test="torque != null">torque = #{torque},</if>
+            <if test="torqueStatus != null">torque_status = #{torqueStatus},</if>
+            <if test="angle != null">angle = #{angle},</if>
+            <if test="angleStatus != null">angle_status = #{angleStatus},</if>
+            <if test="collectTime != null">collect_time = #{collectTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteDaTightenCollectionById" parameterType="Long">
+        delete from da_tighten_collection where id = #{id}
+    </delete>
+
+    <delete id="deleteDaTightenCollectionByIds" parameterType="String">
+        delete from da_tighten_collection where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>
\ No newline at end of file
diff --git a/billion-ui/src/api/main/da/tightenCollection.js b/billion-ui/src/api/main/da/tightenCollection.js
new file mode 100644
index 0000000..4829fce
--- /dev/null
+++ b/billion-ui/src/api/main/da/tightenCollection.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 鏌ヨ鎷х揣閲囬泦鍒楄〃
+export function listTightenCollection(query) {
+  return request({
+    url: '/da/tightenCollection/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 鏌ヨ鎷х揣閲囬泦璇︾粏
+export function getTightenCollection(id) {
+  return request({
+    url: '/da/tightenCollection/' + id,
+    method: 'get'
+  })
+}
+
+// 鏂板鎷х揣閲囬泦
+export function addTightenCollection(data) {
+  return request({
+    url: '/da/tightenCollection',
+    method: 'post',
+    data: data
+  })
+}
+
+// 淇敼鎷х揣閲囬泦
+export function updateTightenCollection(data) {
+  return request({
+    url: '/da/tightenCollection',
+    method: 'put',
+    data: data
+  })
+}
+
+// 鍒犻櫎鎷х揣閲囬泦
+export function delTightenCollection(id) {
+  return request({
+    url: '/da/tightenCollection/' + id,
+    method: 'delete'
+  })
+}
diff --git a/billion-ui/src/views/main/da/paramCollection/index.vue b/billion-ui/src/views/main/da/paramCollection/index.vue
index 4b78660..1e8d026 100644
--- a/billion-ui/src/views/main/da/paramCollection/index.vue
+++ b/billion-ui/src/views/main/da/paramCollection/index.vue
@@ -22,7 +22,7 @@
       <el-form-item style="float: right">
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
-            <el-button icon="el-icon-setting" size="mini" @click="toggleAdvancedSearch">楂樼骇鏌ヨ</el-button>
+        <el-button icon="el-icon-setting" size="mini" @click="toggleAdvancedSearch">楂樼骇鏌ヨ</el-button>
       </el-form-item>
      <transition name="fade">
         <div v-if="advancedSearchVisible" class="advanced-search">
@@ -245,7 +245,6 @@
   methods: {
     toggleAdvancedSearch() {
       this.advancedSearchVisible = !this.advancedSearchVisible;
-
     },
     /** 鏌ヨ鍙傛暟閲囬泦鍒楄〃 */
     getList() {
diff --git a/billion-ui/src/views/main/da/tightenCollection/index.vue b/billion-ui/src/views/main/da/tightenCollection/index.vue
new file mode 100644
index 0000000..84171aa
--- /dev/null
+++ b/billion-ui/src/views/main/da/tightenCollection/index.vue
@@ -0,0 +1,319 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label-width="120" label="鎬绘垚搴忓垪鍙�" prop="sfcCode">
+        <el-input
+          v-model="queryParams.sfcCode"
+          placeholder="璇疯緭鍏ユ�绘垚搴忓垪鍙�"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="宸ヤ綅缂栫爜" prop="locationCode">
+        <el-input
+          v-model="queryParams.locationCode"
+          placeholder="璇疯緭鍏ュ伐浣嶇紪鐮�"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+<!--      <el-form-item label="鍙傛暟闆嗙紪鐮�" prop="paramSetCode">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.paramSetCode"-->
+<!--          placeholder="璇疯緭鍏ュ弬鏁伴泦缂栫爜"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="鍙傛暟闆嗗悕绉�" prop="paramSetName">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.paramSetName"-->
+<!--          placeholder="璇疯緭鍏ュ弬鏁伴泦鍚嶇О"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="閲囬泦鏃堕棿" prop="collectTime">-->
+<!--        <el-date-picker clearable-->
+<!--          v-model="queryParams.collectTime"-->
+<!--          type="date"-->
+<!--          value-format="yyyy-MM-dd"-->
+<!--          placeholder="璇烽�夋嫨閲囬泦鏃堕棿">-->
+<!--        </el-date-picker>-->
+<!--      </el-form-item>-->
+      <el-form-item style="float: right">
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+<!--        <el-button icon="el-icon-setting" size="mini" @click="toggleAdvancedSearch">楂樼骇鏌ヨ</el-button>-->
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['da:tightenCollection:add']"
+        >鏂板</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['da:tightenCollection:edit']"
+        >淇敼</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['da:tightenCollection:remove']"
+        >鍒犻櫎</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['da:tightenCollection:export']"
+        >瀵煎嚭</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="tightenCollectionList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+<!--      <el-table-column label="涓婚敭id" align="center" prop="id" />-->
+      <el-table-column label="鎬绘垚搴忓垪鍙�" align="center" prop="sfcCode" />
+      <el-table-column label="宸ヤ綅缂栫爜" align="center" prop="locationCode" />
+      <el-table-column label="鍙傛暟闆嗙紪鐮�" align="center" prop="paramSetCode" />
+      <el-table-column label="鍙傛暟闆嗗悕绉�" align="center" prop="paramSetName" />
+      <el-table-column label="鎵煩鍊�" align="center" prop="torque" />
+      <el-table-column label="鎵煩鐘舵��" align="center" prop="torqueStatus" />
+      <el-table-column label="瑙掑害鍊�" align="center" prop="angle" />
+      <el-table-column label="瑙掑害鐘舵��" align="center" prop="angleStatus" />
+      <el-table-column label="閲囬泦鏃堕棿" align="center" prop="collectTime" width="180">
+      </el-table-column>
+      <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['da:tightenCollection:edit']"
+          >淇敼</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['da:tightenCollection:remove']"
+          >鍒犻櫎</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 娣诲姞鎴栦慨鏀规嫥绱ч噰闆嗗璇濇 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <el-form-item label="鎬绘垚搴忓垪鍙�" prop="sfcCode">
+          <el-input v-model="form.sfcCode" placeholder="璇疯緭鍏ユ�绘垚搴忓垪鍙�" />
+        </el-form-item>
+        <el-form-item label="宸ヤ綅缂栫爜" prop="locationCode">
+          <el-input v-model="form.locationCode" placeholder="璇疯緭鍏ュ伐浣嶇紪鐮�" />
+        </el-form-item>
+        <el-form-item label="鍙傛暟闆嗙紪鐮�" prop="paramSetCode">
+          <el-input v-model="form.paramSetCode" placeholder="璇疯緭鍏ュ弬鏁伴泦缂栫爜" />
+        </el-form-item>
+        <el-form-item label="鍙傛暟闆嗗悕绉�" prop="paramSetName">
+          <el-input v-model="form.paramSetName" placeholder="璇疯緭鍏ュ弬鏁伴泦鍚嶇О" />
+        </el-form-item>
+        <el-form-item label="鎵煩鍊�" prop="torque">
+          <el-input v-model="form.torque" placeholder="璇疯緭鍏ユ壄鐭╁��" />
+        </el-form-item>
+        <el-form-item label="瑙掑害鍊�" prop="angle">
+          <el-input v-model="form.angle" placeholder="璇疯緭鍏ヨ搴﹀��" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+        <el-button @click="cancel">鍙� 娑�</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listTightenCollection, getTightenCollection, delTightenCollection, addTightenCollection, updateTightenCollection } from "@/api/main/da/tightenCollection";
+
+export default {
+  name: "TightenCollection",
+  data() {
+    return {
+      // 閬僵灞�
+      loading: true,
+      // 閫変腑鏁扮粍
+      ids: [],
+      // 闈炲崟涓鐢�
+      single: true,
+      // 闈炲涓鐢�
+      multiple: true,
+      // 鏄剧ず鎼滅储鏉′欢
+      showSearch: true,
+      // 鎬绘潯鏁�
+      total: 0,
+      // 鎷х揣閲囬泦琛ㄦ牸鏁版嵁
+      tightenCollectionList: [],
+      // 寮瑰嚭灞傛爣棰�
+      title: "",
+      // 鏄惁鏄剧ず寮瑰嚭灞�
+      open: false,
+      // 鏌ヨ鍙傛暟
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        sfcCode: null,
+        locationCode: null,
+        paramSetCode: null,
+        paramSetName: null,
+        torqueStatus: null,
+        angleStatus: null,
+        collectTime: null
+      },
+      // 琛ㄥ崟鍙傛暟
+      form: {},
+      // 琛ㄥ崟鏍¢獙
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    toggleAdvancedSearch() {
+      this.advancedSearchVisible = !this.advancedSearchVisible;
+    },
+    /** 鏌ヨ鎷х揣閲囬泦鍒楄〃 */
+    getList() {
+      this.loading = true;
+      listTightenCollection(this.queryParams).then(response => {
+        this.tightenCollectionList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 鍙栨秷鎸夐挳
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 琛ㄥ崟閲嶇疆
+    reset() {
+      this.form = {
+        id: null,
+        sfcCode: null,
+        locationCode: null,
+        paramSetCode: null,
+        paramSetName: null,
+        torque: null,
+        torqueStatus: null,
+        angle: null,
+        angleStatus: null,
+        collectTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 鎼滅储鎸夐挳鎿嶄綔 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 閲嶇疆鎸夐挳鎿嶄綔 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 澶氶�夋閫変腑鏁版嵁
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 鏂板鎸夐挳鎿嶄綔 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "娣诲姞鎷х揣閲囬泦";
+    },
+    /** 淇敼鎸夐挳鎿嶄綔 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getTightenCollection(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "淇敼鎷х揣閲囬泦";
+      });
+    },
+    /** 鎻愪氦鎸夐挳 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateTightenCollection(this.form).then(response => {
+              this.$modal.msgSuccess("淇敼鎴愬姛");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addTightenCollection(this.form).then(response => {
+              this.$modal.msgSuccess("鏂板鎴愬姛");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('鏄惁纭鍒犻櫎鎷х揣閲囬泦缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() {
+        return delTightenCollection(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      }).catch(() => {});
+    },
+    /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+    handleExport() {
+      this.download('da/tightenCollection/export', {
+        ...this.queryParams
+      }, `tightenCollection_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

--
Gitblit v1.9.3