hanfucheng 11 months ago
parent
commit
c1383f068f

+ 2 - 2
data-ui/src/api/data/housingconstruction/steelcylinder.js

@@ -54,7 +54,7 @@ export function getEnterpriseList() {
 //添加流转信息
 export function addLog(data) {
   return request({
-    url: '/center-data/log/addLog',
+    url: '/center-data/steelcylinderLog/addLog',
     method: 'post',
     data: data
   })
@@ -72,7 +72,7 @@ export function getUserList(query) {
 //获取钢瓶日志详情
 export function getSteelcylinderLog(steelcylinderId) {
   return request({
-    url: '/center-data/log/getSteelcylinderLog/' + steelcylinderId,
+    url: '/center-data/steelcylinderLog/getSteelcylinderLog/' + steelcylinderId,
     method: 'get'
   })
 }

+ 21 - 0
data-ui/src/api/data/housingconstruction/steelcylinderLog.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+
+// 查询钢瓶日志列表
+export function listSteelcylinderLog(query) {
+  return request({
+    url: '/center-data/steelcylinderLog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询钢瓶日志详细
+export function getsteelcylinderLog(id) {
+  return request({
+    url: '/center-data/steelcylinderLog/' + id,
+    method: 'get'
+  })
+}
+
+
+

+ 156 - 0
data-ui/src/views/data/housingconstruction/steelcylinderLog/index.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"
+             @submit.native.prevent>
+      <el-form-item label="钢瓶名称" prop="steelcylinderName">
+        <el-input
+          v-model="queryParams.steelcylinderName"
+          placeholder="请输入钢瓶名称"
+          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="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['data:steelcylinder:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="listSteelcylinderLog" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="钢瓶名称" align="center" prop="steelcylinderName"/>
+      <el-table-column label="企业名称" align="center" prop="enterpriseName"/>
+      <el-table-column label="入库时间" align="center" prop="joinWarehouseTime"/>
+      <el-table-column label="充装介质" align="center" prop="fillingMedium"/>
+      <el-table-column label="充装时间" align="center" prop="fillingTime"/>
+      <el-table-column label="操作员名称" align="center" prop="operatorName"/>
+      <el-table-column label="车牌号" align="center" prop="carNumber"/>
+      <el-table-column label="配送时间" align="center" prop="deliveryTime"/>
+      <el-table-column label="配送员" align="center" prop="deliveryName"/>
+      <el-table-column label="签收时间" align="center" prop="signTime"/>
+      <el-table-column label="入户用户" align="center" prop="joinHouseName"/>
+      <el-table-column label="回收所在用户" align="center" prop="recyclingName"/>
+      <el-table-column label="回收时间" align="center" prop="recyclingTime"/>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import {
+   listSteelcylinderLog
+} from "@/api/data/housingconstruction/steelcylinderLog";
+import {format_date} from "@/views/data/common/dateExport";
+
+
+export default {
+  name: "SteelcylinderLog",
+  data() {
+    return {
+      listSteelcylinderLog:[],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        steelcylinderName: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询钢瓶日志列表 */
+    getList() {
+      this.loading = true;
+      listSteelcylinderLog(this.queryParams).then(response => {
+        this.listSteelcylinderLog = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    cancel1() {
+      this.open1 = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        name: 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
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('center-data/steelcylinderLog/export', {
+        ...this.queryParams
+      }, `钢瓶日志_${format_date(new Date())}.xlsx`)
+    },
+  }
+};
+</script>

+ 1 - 1
src/main/java/com/sooka/sponest/data/housingconstruction/controller/CenterdataTHousingconstructionSteelcylinderController.java

@@ -89,7 +89,7 @@ public class CenterdataTHousingconstructionSteelcylinderController extends BaseC
     public AjaxResult remove(@PathVariable String[] ids) {
         int num = centerdataTHousingconstructionSteelcylinderService.deleteCenterdataTHousingconstructionSteelcylinderByIds(ids);
         if (num == -1) {
-            return AjaxResult.error("请先删除下级资源");
+            return AjaxResult.error("钢瓶有流转信息,不能删除!");
         }
         return toAjax(num);
     }

+ 4 - 34
src/main/java/com/sooka/sponest/data/housingconstruction/controller/CenterdataTHousingconstructionSteelcylinderLogController.java

@@ -24,7 +24,7 @@ import java.util.List;
  * @date 2024-07-30
  */
 @RestController
-@RequestMapping("/log")
+@RequestMapping("/steelcylinderLog")
 public class CenterdataTHousingconstructionSteelcylinderLogController extends BaseController {
     @Autowired
     private ICenterdataTHousingconstructionSteelcylinderLogService centerdataTHousingconstructionSteelcylinderLogService;
@@ -35,7 +35,7 @@ public class CenterdataTHousingconstructionSteelcylinderLogController extends Ba
     /**
      * 查询钢瓶日志列表
      */
-    @RequiresPermissions("system:log:list")
+    @RequiresPermissions("data:steelcylinderLog:list")
     @GetMapping("/list")
     public TableDataInfo list(CenterdataTHousingconstructionSteelcylinderLog centerdataTHousingconstructionSteelcylinderLog) {
         startPage();
@@ -46,7 +46,7 @@ public class CenterdataTHousingconstructionSteelcylinderLogController extends Ba
     /**
      * 导出钢瓶日志列表
      */
-    @RequiresPermissions("system:log:export")
+    @RequiresPermissions("data:steelcylinderLog:export")
     @Log(title = "钢瓶日志", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, CenterdataTHousingconstructionSteelcylinderLog centerdataTHousingconstructionSteelcylinderLog) {
@@ -58,42 +58,12 @@ public class CenterdataTHousingconstructionSteelcylinderLogController extends Ba
     /**
      * 获取钢瓶日志详细信息
      */
-    @RequiresPermissions("system:log:query")
+    @RequiresPermissions("data:steelcylinderLog:query")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") String id) {
         return AjaxResult.success(centerdataTHousingconstructionSteelcylinderLogService.selectCenterdataTHousingconstructionSteelcylinderLogById(id));
     }
 
-    /**
-     * 新增钢瓶日志
-     */
-    @RequiresPermissions("system:log:add")
-    @Log(title = "钢瓶日志", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody CenterdataTHousingconstructionSteelcylinderLog centerdataTHousingconstructionSteelcylinderLog) {
-        return toAjax(centerdataTHousingconstructionSteelcylinderLogService.insertCenterdataTHousingconstructionSteelcylinderLog(centerdataTHousingconstructionSteelcylinderLog));
-    }
-
-    /**
-     * 修改钢瓶日志
-     */
-    @RequiresPermissions("system:log:edit")
-    @Log(title = "钢瓶日志", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody CenterdataTHousingconstructionSteelcylinderLog centerdataTHousingconstructionSteelcylinderLog) {
-        return toAjax(centerdataTHousingconstructionSteelcylinderLogService.updateCenterdataTHousingconstructionSteelcylinderLog(centerdataTHousingconstructionSteelcylinderLog));
-    }
-
-    /**
-     * 删除钢瓶日志
-     */
-    @RequiresPermissions("system:log:remove")
-    @Log(title = "钢瓶日志", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable String[] ids) {
-        return toAjax(centerdataTHousingconstructionSteelcylinderLogService.deleteCenterdataTHousingconstructionSteelcylinderLogByIds(ids));
-    }
-
     /*
     * 按钢瓶id查询最新日志
     *

+ 12 - 4
src/main/java/com/sooka/sponest/data/housingconstruction/domain/CenterdataTHousingconstructionSteelcylinderLog.java

@@ -3,7 +3,6 @@ package com.sooka.sponest.data.housingconstruction.domain;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.core.annotation.Excel;
 import com.ruoyi.common.core.web.domain.BaseEntity;
-import com.sooka.sponest.data.base.domain.BaseBusinessEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -15,7 +14,7 @@ import java.util.Date;
  * @author ruoyi
  * @date 2024-07-30
  */
-public class CenterdataTHousingconstructionSteelcylinderLog extends BaseBusinessEntity {
+public class CenterdataTHousingconstructionSteelcylinderLog extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
     /**
@@ -34,6 +33,9 @@ public class CenterdataTHousingconstructionSteelcylinderLog extends BaseBusiness
     @Excel(name = "钢瓶名称")
     private String steelcylinderName;
 
+    @Excel(name = "企业名称")
+    private String enterpriseName;
+
     /**
      * 入库时间
      */
@@ -127,6 +129,14 @@ public class CenterdataTHousingconstructionSteelcylinderLog extends BaseBusiness
 
     private String state;
 
+    public String getEnterpriseName() {
+        return enterpriseName;
+    }
+
+    public void setEnterpriseName(String enterpriseName) {
+        this.enterpriseName = enterpriseName;
+    }
+
     public String getState() {
         return state;
     }
@@ -284,10 +294,8 @@ public class CenterdataTHousingconstructionSteelcylinderLog extends BaseBusiness
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                 .append("id", getId())
                 .append("createBy", getCreateBy())
-                .append("createName", getCreateName())
                 .append("createTime", getCreateTime())
                 .append("updateBy", getUpdateBy())
-                .append("updateName", getUpdateName())
                 .append("updateTime", getUpdateTime())
                 .append("steelcylinderId", getSteelcylinderId())
                 .append("steelcylinderName", getSteelcylinderName())

+ 0 - 16
src/main/java/com/sooka/sponest/data/housingconstruction/service/ICenterdataTHousingconstructionSteelcylinderLogService.java

@@ -44,22 +44,6 @@ public interface ICenterdataTHousingconstructionSteelcylinderLogService {
      */
     public int updateCenterdataTHousingconstructionSteelcylinderLog(CenterdataTHousingconstructionSteelcylinderLog centerdataTHousingconstructionSteelcylinderLog);
 
-    /**
-     * 批量删除钢瓶日志
-     *
-     * @param ids 需要删除的钢瓶日志主键集合
-     * @return 结果
-     */
-    public int deleteCenterdataTHousingconstructionSteelcylinderLogByIds(String[] ids);
-
-    /**
-     * 删除钢瓶日志信息
-     *
-     * @param id 钢瓶日志主键
-     * @return 结果
-     */
-    public int deleteCenterdataTHousingconstructionSteelcylinderLogById(String id);
-
     /*
     * 按钢瓶id查询最新一条日志
     *

+ 0 - 22
src/main/java/com/sooka/sponest/data/housingconstruction/service/impl/CenterdataTHousingconstructionSteelcylinderLogServiceImpl.java

@@ -69,28 +69,6 @@ public class CenterdataTHousingconstructionSteelcylinderLogServiceImpl extends B
         return centerdataTHousingconstructionSteelcylinderLogMapper.updateCenterdataTHousingconstructionSteelcylinderLog(centerdataTHousingconstructionSteelcylinderLog);
     }
 
-    /**
-     * 批量删除钢瓶日志
-     *
-     * @param ids 需要删除的钢瓶日志主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCenterdataTHousingconstructionSteelcylinderLogByIds(String[] ids) {
-        return centerdataTHousingconstructionSteelcylinderLogMapper.deleteCenterdataTHousingconstructionSteelcylinderLogByIds(ids);
-    }
-
-    /**
-     * 删除钢瓶日志信息
-     *
-     * @param id 钢瓶日志主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCenterdataTHousingconstructionSteelcylinderLogById(String id) {
-        return centerdataTHousingconstructionSteelcylinderLogMapper.deleteCenterdataTHousingconstructionSteelcylinderLogById(id);
-    }
-
     /*
     * 按钢瓶id查询最新一条日志
     *

+ 0 - 1
src/main/java/com/sooka/sponest/data/housingconstruction/service/impl/CenterdataTHousingconstructionSteelcylinderServiceImpl.java

@@ -113,7 +113,6 @@ public class CenterdataTHousingconstructionSteelcylinderServiceImpl extends Base
         for (String id : ids) {
             CenterdataTHousingconstructionSteelcylinderLog steelcylinderLog = new CenterdataTHousingconstructionSteelcylinderLog();
             steelcylinderLog.setSteelcylinderId(id);
-            setSookaDataBase(steelcylinderLog);
             List<CenterdataTHousingconstructionSteelcylinderLog> list = centerdataTHousingconstructionSteelcylinderLogMapper.selectCenterdataTHousingconstructionSteelcylinderLogList(steelcylinderLog);
             if (!list.isEmpty()) {
                 return -1;

+ 8 - 19
src/main/resources/mapper/housingconstruction/CenterdataTHousingconstructionSteelcylinderLogMapper.xml

@@ -23,32 +23,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="joinHouseName"    column="join_house_name"    />
         <result property="recyclingName"    column="recycling_name"    />
         <result property="recyclingTime"    column="recycling_time"    />
+        <result property="enterpriseName"    column="enterprise_name"    />
     </resultMap>
 
     <sql id="selectCenterdataTHousingconstructionSteelcylinderLogVo">
-        select id, steelcylinder_id, steelcylinder_name, join_warehouse_time, filling_medium, filling_time, operator_id, operator_name, car_id, car_number, delivery_time, delivery_id, delivery_name, sign_time, join_house_id, join_house_name, recycling_name, recycling_time from centerdata_t_housingconstruction_steelcylinder_log
+        select a.id, a.steelcylinder_id, a.steelcylinder_name, a.join_warehouse_time, a.filling_medium, a.filling_time, a.operator_id, a.operator_name, a.car_id,
+               a.car_number, a.delivery_time, a.delivery_id, a.delivery_name, a.sign_time, a.join_house_id, a.join_house_name, a.recycling_name, a.recycling_time from centerdata_t_housingconstruction_steelcylinder_log a
     </sql>
 
     <select id="selectCenterdataTHousingconstructionSteelcylinderLogList" parameterType="CenterdataTHousingconstructionSteelcylinderLog" resultMap="CenterdataTHousingconstructionSteelcylinderLogResult">
-        <include refid="selectCenterdataTHousingconstructionSteelcylinderLogVo"/>
+        select a.id, a.steelcylinder_id, a.steelcylinder_name, a.join_warehouse_time, a.filling_medium, a.filling_time, a.operator_id, a.operator_name, a.car_id,b.enterprise_name,
+        a.car_number, a.delivery_time, a.delivery_id, a.delivery_name, a.sign_time, a.join_house_id, a.join_house_name, a.recycling_name, a.recycling_time from centerdata_t_housingconstruction_steelcylinder_log a
+        left join centerdata_t_housingconstruction_steelcylinder b on a.steelcylinder_id = b.id
         <where>
-            <if test="steelcylinderId != null  and steelcylinderId != ''"> and steelcylinder_id = #{steelcylinderId}</if>
-            <if test="steelcylinderName != null  and steelcylinderName != ''"> and steelcylinder_name like concat('%', #{steelcylinderName}, '%')</if>
-            <if test="joinWarehouseTime != null "> and join_warehouse_time = #{joinWarehouseTime}</if>
-            <if test="fillingMedium != null  and fillingMedium != ''"> and filling_medium = #{fillingMedium}</if>
-            <if test="fillingTime != null "> and filling_time = #{fillingTime}</if>
-            <if test="operatorId != null  and operatorId != ''"> and operator_id = #{operatorId}</if>
-            <if test="operatorName != null  and operatorName != ''"> and operator_name like concat('%', #{operatorName}, '%')</if>
-            <if test="carId != null  and carId != ''"> and car_id = #{carId}</if>
-            <if test="carNumber != null  and carNumber != ''"> and car_number = #{carNumber}</if>
-            <if test="deliveryTime != null "> and delivery_time = #{deliveryTime}</if>
-            <if test="deliveryId != null  and deliveryId != ''"> and delivery_id = #{deliveryId}</if>
-            <if test="deliveryName != null  and deliveryName != ''"> and delivery_name like concat('%', #{deliveryName}, '%')</if>
-            <if test="signTime != null "> and sign_time = #{signTime}</if>
-            <if test="joinHouseId != null  and joinHouseId != ''"> and join_house_id = #{joinHouseId}</if>
-            <if test="joinHouseName != null  and joinHouseName != ''"> and join_house_name like concat('%', #{joinHouseName}, '%')</if>
-            <if test="recyclingName != null  and recyclingName != ''"> and recycling_name like concat('%', #{recyclingName}, '%')</if>
-            <if test="recyclingTime != null "> and recycling_time = #{recyclingTime}</if>
+            <if test="steelcylinderId != null  and steelcylinderId != ''"> and a.steelcylinder_id = #{steelcylinderId}</if>
+            <if test="steelcylinderName != null  and steelcylinderName != ''"> and a.steelcylinder_name like concat('%', #{steelcylinderName}, '%')</if>
         </where>
     </select>