Ver Fonte

复称界面 --init

HuKang há 1 ano atrás
pai
commit
b8065a7dd8

+ 1 - 1
ruoyi-system/pom.xml

@@ -25,4 +25,4 @@
 
     </dependencies>
 
-</project>
+</project>

+ 44 - 0
ruoyi-ui/src/api/weighData/data.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询【请填写功能名称】列表
+export function listData(query) {
+  return request({
+    url: '/system/data/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询【请填写功能名称】详细
+export function getData(id) {
+  return request({
+    url: '/system/data/' + id,
+    method: 'get'
+  })
+}
+
+// 新增【请填写功能名称】
+export function addData(data) {
+  return request({
+    url: '/system/data',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改【请填写功能名称】
+export function updateData(data) {
+  return request({
+    url: '/system/data',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除【请填写功能名称】
+export function delData(id) {
+  return request({
+    url: '/system/data/' + id,
+    method: 'delete'
+  })
+}

+ 385 - 0
ruoyi-ui/src/views/wms/weighData/index.vue

@@ -0,0 +1,385 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="批次" prop="lotnum">
+        <el-input
+          v-model="queryParams.lotnum"
+          placeholder="请输入批次"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="${comment}" prop="num">
+        <el-input
+          v-model="queryParams.num"
+          placeholder="请输入${comment}"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="${comment}" prop="ext1">
+        <el-input
+          v-model="queryParams.ext1"
+          placeholder="请输入${comment}"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="${comment}" prop="ext2">
+        <el-input
+          v-model="queryParams.ext2"
+          placeholder="请输入${comment}"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="${comment}" prop="ext3">
+        <el-input
+          v-model="queryParams.ext3"
+          placeholder="请输入${comment}"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="${comment}" prop="ext4">
+        <el-input
+          v-model="queryParams.ext4"
+          placeholder="请输入${comment}"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="${comment}" prop="ext5">
+        <el-input
+          v-model="queryParams.ext5"
+          placeholder="请输入${comment}"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="${comment}" prop="ext6">
+        <el-input
+          v-model="queryParams.ext6"
+          placeholder="请输入${comment}"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="${comment}" prop="ext7">
+        <el-input
+          v-model="queryParams.ext7"
+          placeholder="请输入${comment}"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="${comment}" prop="ext8">
+        <el-input
+          v-model="queryParams.ext8"
+          placeholder="请输入${comment}"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <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-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="['system:data: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="['system:data: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="['system:data: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="['system:data:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="${comment}" align="center" prop="id" />
+      <el-table-column label="批次" align="center" prop="lotnum" />
+      <el-table-column label="${comment}" align="center" prop="num" />
+      <el-table-column label="${comment}" align="center" prop="ext1" />
+      <el-table-column label="${comment}" align="center" prop="ext2" />
+      <el-table-column label="${comment}" align="center" prop="ext3" />
+      <el-table-column label="${comment}" align="center" prop="ext4" />
+      <el-table-column label="${comment}" align="center" prop="ext5" />
+      <el-table-column label="${comment}" align="center" prop="ext6" />
+      <el-table-column label="${comment}" align="center" prop="ext7" />
+      <el-table-column label="${comment}" align="center" prop="ext8" />
+      <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="['system:data:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['system:data: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="80px">
+        <el-form-item label="批次" prop="lotnum">
+          <el-input v-model="form.lotnum" placeholder="请输入批次" />
+        </el-form-item>
+        <el-form-item label="${comment}" prop="num">
+          <el-input v-model="form.num" placeholder="请输入${comment}" />
+        </el-form-item>
+        <el-form-item label="${comment}" prop="ext1">
+          <el-input v-model="form.ext1" placeholder="请输入${comment}" />
+        </el-form-item>
+        <el-form-item label="${comment}" prop="ext2">
+          <el-input v-model="form.ext2" placeholder="请输入${comment}" />
+        </el-form-item>
+        <el-form-item label="${comment}" prop="ext3">
+          <el-input v-model="form.ext3" placeholder="请输入${comment}" />
+        </el-form-item>
+        <el-form-item label="${comment}" prop="ext4">
+          <el-input v-model="form.ext4" placeholder="请输入${comment}" />
+        </el-form-item>
+        <el-form-item label="${comment}" prop="ext5">
+          <el-input v-model="form.ext5" placeholder="请输入${comment}" />
+        </el-form-item>
+        <el-form-item label="${comment}" prop="ext6">
+          <el-input v-model="form.ext6" placeholder="请输入${comment}" />
+        </el-form-item>
+        <el-form-item label="${comment}" prop="ext7">
+          <el-input v-model="form.ext7" placeholder="请输入${comment}" />
+        </el-form-item>
+        <el-form-item label="${comment}" prop="ext8">
+          <el-input v-model="form.ext8" placeholder="请输入${comment}" />
+        </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 { listData, getData, delData, addData, updateData } from "@/views/wms/weighData";
+
+export default {
+  name: "Data",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 【请填写功能名称】表格数据
+      dataList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        lotnum: null,
+        num: null,
+        ext1: null,
+        ext2: null,
+        ext3: null,
+        ext4: null,
+        ext5: null,
+        ext6: null,
+        ext7: null,
+        ext8: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询【请填写功能名称】列表 */
+    getList() {
+      this.loading = true;
+      listData(this.queryParams).then(response => {
+        this.dataList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        lotnum: null,
+        num: null,
+        ext1: null,
+        ext2: null,
+        ext3: null,
+        ext4: null,
+        ext5: null,
+        ext6: null,
+        ext7: null,
+        ext8: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: 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
+      getData(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) {
+            updateData(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addData(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 delData(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/data/export', {
+        ...this.queryParams
+      }, `data_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 105 - 0
warewms-ams/src/main/java/com/ruoyi/ams/weighData/controller/WeighDataController.java

@@ -0,0 +1,105 @@
+package com.ruoyi.ams.weighData.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.ams.weighData.domain.WeighData;
+import com.ruoyi.ams.weighData.service.IWeighDataService;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 【请填写功能名称】Controller
+ *
+ * @author ruoyi
+ * @date 2023-06-02
+ */
+@RestController
+@RequestMapping("/system/data")
+public class WeighDataController extends BaseController
+{
+    @Autowired
+    private IWeighDataService weighDataService;
+
+    /**
+     * 查询【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:data:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(WeighData weighData)
+    {
+        startPage();
+        List<WeighData> list = weighDataService.selectWeighDataList(weighData);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:data:export')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, WeighData weighData)
+    {
+        List<WeighData> list = weighDataService.selectWeighDataList(weighData);
+        ExcelUtil<WeighData> util = new ExcelUtil<WeighData>(WeighData.class);
+        util.exportExcel(response, list, "【请填写功能名称】数据");
+    }
+
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:data:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(weighDataService.selectWeighDataById(id));
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:data:add')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody WeighData weighData)
+    {
+        return toAjax(weighDataService.insertWeighData(weighData));
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:data:edit')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody WeighData weighData)
+    {
+        return toAjax(weighDataService.updateWeighData(weighData));
+    }
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:data:remove')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(weighDataService.deleteWeighDataByIds(ids));
+    }
+}

+ 181 - 0
warewms-ams/src/main/java/com/ruoyi/ams/weighData/domain/WeighData.java

@@ -0,0 +1,181 @@
+package com.ruoyi.ams.weighData.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 【请填写功能名称】对象 weigh_data
+ *
+ * @author ruoyi
+ * @date 2023-06-02
+ */
+public class WeighData extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 批次 */
+    @Excel(name = "批次")
+    private String lotnum;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long num;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String ext1;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String ext2;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String ext3;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String ext4;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String ext5;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String ext6;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String ext7;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String ext8;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setLotnum(String lotnum)
+    {
+        this.lotnum = lotnum;
+    }
+
+    public String getLotnum()
+    {
+        return lotnum;
+    }
+    public void setNum(Long num)
+    {
+        this.num = num;
+    }
+
+    public Long getNum()
+    {
+        return num;
+    }
+    public void setExt1(String ext1)
+    {
+        this.ext1 = ext1;
+    }
+
+    public String getExt1()
+    {
+        return ext1;
+    }
+    public void setExt2(String ext2)
+    {
+        this.ext2 = ext2;
+    }
+
+    public String getExt2()
+    {
+        return ext2;
+    }
+    public void setExt3(String ext3)
+    {
+        this.ext3 = ext3;
+    }
+
+    public String getExt3()
+    {
+        return ext3;
+    }
+    public void setExt4(String ext4)
+    {
+        this.ext4 = ext4;
+    }
+
+    public String getExt4()
+    {
+        return ext4;
+    }
+    public void setExt5(String ext5)
+    {
+        this.ext5 = ext5;
+    }
+
+    public String getExt5()
+    {
+        return ext5;
+    }
+    public void setExt6(String ext6)
+    {
+        this.ext6 = ext6;
+    }
+
+    public String getExt6()
+    {
+        return ext6;
+    }
+    public void setExt7(String ext7)
+    {
+        this.ext7 = ext7;
+    }
+
+    public String getExt7()
+    {
+        return ext7;
+    }
+    public void setExt8(String ext8)
+    {
+        this.ext8 = ext8;
+    }
+
+    public String getExt8()
+    {
+        return ext8;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("lotnum", getLotnum())
+            .append("num", getNum())
+            .append("ext1", getExt1())
+            .append("ext2", getExt2())
+            .append("ext3", getExt3())
+            .append("ext4", getExt4())
+            .append("ext5", getExt5())
+            .append("ext6", getExt6())
+            .append("ext7", getExt7())
+            .append("ext8", getExt8())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 63 - 0
warewms-ams/src/main/java/com/ruoyi/ams/weighData/mapper/WeighDataMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.ams.weighData.mapper;
+
+import com.ruoyi.ams.weighData.domain.WeighData;
+
+import java.util.List;
+
+
+/**
+ * 【请填写功能名称】Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-06-02
+ */
+public interface WeighDataMapper
+{
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+     WeighData selectWeighDataById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+     List<WeighData> selectWeighDataList(WeighData weighData);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 结果
+     */
+     int insertWeighData(WeighData weighData);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 结果
+     */
+     int updateWeighData(WeighData weighData);
+
+    /**
+     * 删除【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+     int deleteWeighDataById(Long id);
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+     int deleteWeighDataByIds(Long[] ids);
+}

+ 70 - 0
warewms-ams/src/main/java/com/ruoyi/ams/weighData/service/IWeighDataService.java

@@ -0,0 +1,70 @@
+package com.ruoyi.ams.weighData.service;
+
+import java.util.List;
+
+import com.ruoyi.ams.weighData.domain.WeighData;
+
+/**
+ * 【请填写功能名称】Service接口
+ *
+ * @author ruoyi
+ * @date 2023-06-02
+ */
+public interface IWeighDataService
+{
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+     WeighData selectWeighDataById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+     List<WeighData> selectWeighDataList(WeighData weighData);
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    WeighData selectWeighDataByModel(WeighData weighData);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 结果
+     */
+     int insertWeighData(WeighData weighData);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 结果
+     */
+     int updateWeighData(WeighData weighData);
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param ids 需要删除的【请填写功能名称】主键集合
+     * @return 结果
+     */
+     int deleteWeighDataByIds(Long[] ids);
+
+    /**
+     * 删除【请填写功能名称】信息
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+     int deleteWeighDataById(Long id);
+}

+ 115 - 0
warewms-ams/src/main/java/com/ruoyi/ams/weighData/service/impl/WeighDataServiceImpl.java

@@ -0,0 +1,115 @@
+package com.ruoyi.ams.weighData.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.ams.weighData.domain.WeighData;
+import com.ruoyi.ams.weighData.mapper.WeighDataMapper;
+import com.ruoyi.ams.weighData.service.IWeighDataService;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-06-02
+ */
+@Service
+public class WeighDataServiceImpl implements IWeighDataService
+{
+    @Autowired
+    private WeighDataMapper weighDataMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public WeighData selectWeighDataById(Long id)
+    {
+        return weighDataMapper.selectWeighDataById(id);
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<WeighData> selectWeighDataList(WeighData weighData)
+    {
+        return weighDataMapper.selectWeighDataList(weighData);
+    }
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public WeighData selectWeighDataByModel(WeighData weighData)
+    {
+        List<WeighData> list = weighDataMapper.selectWeighDataList(weighData);
+        if (list!=null && list.size()>0) {
+            return list.get(0);
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertWeighData(WeighData weighData)
+    {
+        weighData.setCreateTime(DateUtils.getNowDate());
+        return weighDataMapper.insertWeighData(weighData);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param weighData 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updateWeighData(WeighData weighData)
+    {
+        weighData.setUpdateTime(DateUtils.getNowDate());
+        return weighDataMapper.updateWeighData(weighData);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param ids 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteWeighDataByIds(Long[] ids)
+    {
+        return weighDataMapper.deleteWeighDataByIds(ids);
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteWeighDataById(Long id)
+    {
+        return weighDataMapper.deleteWeighDataById(id);
+    }
+}

+ 117 - 0
warewms-ams/src/main/resources/mapper/weighData/WeighDataMapper.xml

@@ -0,0 +1,117 @@
+<?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.ruoyi.ams.weighData.mapper.WeighDataMapper">
+
+    <resultMap type="WeighData" id="WeighDataResult">
+        <result property="id"    column="id"    />
+        <result property="lotnum"    column="lotnum"    />
+        <result property="num"    column="num"    />
+        <result property="ext1"    column="ext1"    />
+        <result property="ext2"    column="ext2"    />
+        <result property="ext3"    column="ext3"    />
+        <result property="ext4"    column="ext4"    />
+        <result property="ext5"    column="ext5"    />
+        <result property="ext6"    column="ext6"    />
+        <result property="ext7"    column="ext7"    />
+        <result property="ext8"    column="ext8"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectWeighDataVo">
+        select id, lotnum, num, ext1, ext2, ext3, ext4, ext5, ext6, ext7, ext8, create_by, create_time, update_by, update_time from weigh_data
+    </sql>
+
+    <select id="selectWeighDataList" parameterType="WeighData" resultMap="WeighDataResult">
+        <include refid="selectWeighDataVo"/>
+        <where>
+            <if test="lotnum != null  and lotnum != ''"> and lotnum = #{lotnum}</if>
+            <if test="num != null "> and num = #{num}</if>
+            <if test="ext1 != null  and ext1 != ''"> and ext1 = #{ext1}</if>
+            <if test="ext2 != null  and ext2 != ''"> and ext2 = #{ext2}</if>
+            <if test="ext3 != null  and ext3 != ''"> and ext3 = #{ext3}</if>
+            <if test="ext4 != null  and ext4 != ''"> and ext4 = #{ext4}</if>
+            <if test="ext5 != null  and ext5 != ''"> and ext5 = #{ext5}</if>
+            <if test="ext6 != null  and ext6 != ''"> and ext6 = #{ext6}</if>
+            <if test="ext7 != null  and ext7 != ''"> and ext7 = #{ext7}</if>
+            <if test="ext8 != null  and ext8 != ''"> and ext8 = #{ext8}</if>
+        </where>
+    </select>
+
+    <select id="selectWeighDataById" parameterType="Long" resultMap="WeighDataResult">
+        <include refid="selectWeighDataVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertWeighData" parameterType="WeighData" useGeneratedKeys="true" keyProperty="id">
+        insert into weigh_data
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="lotnum != null">lotnum,</if>
+            <if test="num != null">num,</if>
+            <if test="ext1 != null">ext1,</if>
+            <if test="ext2 != null">ext2,</if>
+            <if test="ext3 != null">ext3,</if>
+            <if test="ext4 != null">ext4,</if>
+            <if test="ext5 != null">ext5,</if>
+            <if test="ext6 != null">ext6,</if>
+            <if test="ext7 != null">ext7,</if>
+            <if test="ext8 != null">ext8,</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>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="lotnum != null">#{lotnum},</if>
+            <if test="num != null">#{num},</if>
+            <if test="ext1 != null">#{ext1},</if>
+            <if test="ext2 != null">#{ext2},</if>
+            <if test="ext3 != null">#{ext3},</if>
+            <if test="ext4 != null">#{ext4},</if>
+            <if test="ext5 != null">#{ext5},</if>
+            <if test="ext6 != null">#{ext6},</if>
+            <if test="ext7 != null">#{ext7},</if>
+            <if test="ext8 != null">#{ext8},</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>
+         </trim>
+    </insert>
+
+    <update id="updateWeighData" parameterType="WeighData">
+        update weigh_data
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="lotnum != null">lotnum = #{lotnum},</if>
+            <if test="num != null">num = #{num},</if>
+            <if test="ext1 != null">ext1 = #{ext1},</if>
+            <if test="ext2 != null">ext2 = #{ext2},</if>
+            <if test="ext3 != null">ext3 = #{ext3},</if>
+            <if test="ext4 != null">ext4 = #{ext4},</if>
+            <if test="ext5 != null">ext5 = #{ext5},</if>
+            <if test="ext6 != null">ext6 = #{ext6},</if>
+            <if test="ext7 != null">ext7 = #{ext7},</if>
+            <if test="ext8 != null">ext8 = #{ext8},</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>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteWeighDataById" parameterType="Long">
+        delete from weigh_data where id = #{id}
+    </delete>
+
+    <delete id="deleteWeighDataByIds" parameterType="String">
+        delete from weigh_data where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>