Commit c58ca615 authored by 耿迪迪's avatar 耿迪迪
parents 33c8afe7 6f64595f
......@@ -23,7 +23,7 @@ import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 特种设备台账Controller
* 特种设备台账记录Controller
*
* @author zehong
* @date 2022-07-02
......@@ -36,31 +36,31 @@ public class TSpecialDeviceRecordController extends BaseController
private ITSpecialDeviceRecordService tSpecialDeviceRecordService;
/**
* 查询特种设备台账列表
* 查询特种设备台账记录列表
*/
//@PreAuthorize("@ss.hasPermi('deviceManagement:specialDeviceRecord:list')")
@GetMapping("/list")
public TableDataInfo list(TSpecialDeviceRecord tSpecialDeviceRecord)
public TableDataInfo list(TSpecialDeviceRecordVo tSpecialDeviceRecordVo)
{
startPage();
List<TSpecialDeviceRecordVo> list = tSpecialDeviceRecordService.selectTSpecialDeviceRecordList(tSpecialDeviceRecord);
List<TSpecialDeviceRecordVo> list = tSpecialDeviceRecordService.selectTSpecialDeviceRecordList(tSpecialDeviceRecordVo);
return getDataTable(list);
}
/**
* 导出特种设备台账列表
* 导出特种设备台账记录列表
*/
@Log(title = "特种设备台账", businessType = BusinessType.EXPORT)
@Log(title = "特种设备台账记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSpecialDeviceRecord tSpecialDeviceRecord)
public AjaxResult export(TSpecialDeviceRecordVo tSpecialDeviceRecordVo)
{
List<TSpecialDeviceRecordVo> list = tSpecialDeviceRecordService.selectTSpecialDeviceRecordList(tSpecialDeviceRecord);
List<TSpecialDeviceRecordVo> list = tSpecialDeviceRecordService.selectTSpecialDeviceRecordList(tSpecialDeviceRecordVo);
ExcelUtil<TSpecialDeviceRecordVo> util = new ExcelUtil<TSpecialDeviceRecordVo>(TSpecialDeviceRecordVo.class);
return util.exportExcel(list, "特种设备台账数据");
return util.exportExcel(list, "特种设备台账记录数据");
}
/**
* 获取特种设备台账详细信息
* 获取特种设备台账记录详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
......@@ -69,9 +69,9 @@ public class TSpecialDeviceRecordController extends BaseController
}
/**
* 新增特种设备台账
* 新增特种设备台账记录
*/
@Log(title = "特种设备台账", businessType = BusinessType.INSERT)
@Log(title = "特种设备台账记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSpecialDeviceRecord tSpecialDeviceRecord)
{
......@@ -79,9 +79,9 @@ public class TSpecialDeviceRecordController extends BaseController
}
/**
* 修改特种设备台账
* 修改特种设备台账记录
*/
@Log(title = "特种设备台账", businessType = BusinessType.UPDATE)
@Log(title = "特种设备台账记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSpecialDeviceRecord tSpecialDeviceRecord)
{
......@@ -89,9 +89,9 @@ public class TSpecialDeviceRecordController extends BaseController
}
/**
* 删除特种设备台账
* 删除特种设备台账记录
*/
@Log(title = "特种设备台账", businessType = BusinessType.DELETE)
@Log(title = "特种设备台账记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
......
......@@ -28,8 +28,8 @@ public class TSpecialDeviceRecord extends BaseEntity
private String operateType;
/** 设备位号 */
@Excel(name = "设备位号")
private String tagNumber;
// @Excel(name = "设备位号")
// private String tagNumber;
/** 设备id */
private Long deviceId;
......@@ -70,13 +70,13 @@ public class TSpecialDeviceRecord extends BaseEntity
this.operateType = operateType;
}
public String getTagNumber() {
return tagNumber;
}
public void setTagNumber(String tagNumber) {
this.tagNumber = tagNumber;
}
// public String getTagNumber() {
// return tagNumber;
// }
//
// public void setTagNumber(String tagNumber) {
// this.tagNumber = tagNumber;
// }
public Long getDeviceId() {
return deviceId;
......
......@@ -32,10 +32,10 @@ public class TSpecialDeviceRecordVo extends BaseEntity
/** 对应类型 */
private String operateType;
/** 设备编号 */
private String deviceCode;
/** 设备id */
private Long deviceId;
/** 设备编号 */
/** 设备名称 */
private String deviceName;
/** 设备编号 */
......
......@@ -23,10 +23,10 @@ public interface TSpecialDeviceRecordMapper
/**
* 查询特种设备台账列表
*
* @param tSpecialDeviceRecord 特种设备台账
* @param tSpecialDeviceRecordVo 特种设备台账
* @return 特种设备台账集合
*/
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecord tSpecialDeviceRecord);
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecordVo tSpecialDeviceRecordVo);
/**
* 新增特种设备台账
......
......@@ -23,10 +23,10 @@ public interface ITSpecialDeviceRecordService
/**
* 查询特种设备台账列表
*
* @param tSpecialDeviceRecord 特种设备台账
* @param tSpecialDeviceRecordVo 特种设备台账
* @return 特种设备台账集合
*/
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecord tSpecialDeviceRecord);
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecordVo tSpecialDeviceRecordVo);
/**
* 新增特种设备台账
......
......@@ -68,7 +68,6 @@ public class TMaintainPlanServiceImpl implements ITMaintainPlanService
TDeviceInfo tDeviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(Long.valueOf(id));
TSpecialDeviceRecord tSpecialDeviceRecord = new TSpecialDeviceRecord();
tSpecialDeviceRecord.setTagNumber(tDeviceInfo.getTagNumber());
tSpecialDeviceRecord.setDeviceId(tDeviceInfo.getId());
tSpecialDeviceRecord.setOperateCode(planCode);
tSpecialDeviceRecord.setOperateType("1");
......
......@@ -66,7 +66,6 @@ public class TRepairOrderServiceImpl implements ITRepairOrderService
TDeviceInfo tDeviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(tRepairOrder.getDeviceId());
TSpecialDeviceRecord tSpecialDeviceRecord = new TSpecialDeviceRecord();
tSpecialDeviceRecord.setTagNumber(tDeviceInfo.getTagNumber());
tSpecialDeviceRecord.setDeviceId(tDeviceInfo.getId());
tSpecialDeviceRecord.setOperateCode(repairCode);
tSpecialDeviceRecord.setOperateType("2");
......
......@@ -36,13 +36,13 @@ public class TSpecialDeviceRecordServiceImpl implements ITSpecialDeviceRecordSer
/**
* 查询特种设备台账列表
*
* @param tSpecialDeviceRecord 特种设备台账
* @param tSpecialDeviceRecordVo 特种设备台账
* @return 特种设备台账
*/
@Override
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecord tSpecialDeviceRecord)
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecordVo tSpecialDeviceRecordVo)
{
return tSpecialDeviceRecordMapper.selectTSpecialDeviceRecordList(tSpecialDeviceRecord);
return tSpecialDeviceRecordMapper.selectTSpecialDeviceRecordList(tSpecialDeviceRecordVo);
}
/**
......
......@@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="operateCode" column="operate_code" />
<result property="operateType" column="operate_type" />
<result property="deviceCode" column="device_code" />
<result property="deviceId" column="device_id" />
<result property="deviceName" column="device_name" />
<result property="deviceType" column="device_type" />
<result property="effectiveDate" column="effective_date" />
......@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTSpecialDeviceRecordVo">
select t.id, t.operate_code, t.operate_type, t.device_code, t.effective_date, t.record_status, t.create_time, t.update_time, t.is_del,
select t.id, t.operate_code, t.operate_type, t.device_id, t.effective_date, t.record_status, t.create_time, t.update_time, t.is_del,
d.device_name, d.device_type
from t_special_device_record t
left join t_device_info d on t.device_id = d.id
......@@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> t.is_del = '0'
<if test="operateCode != null "> and t.operate_code = #{operateCode}</if>
<if test="operateType != null "> and t.operate_type = #{operateType}</if>
<if test="deviceCode != null and deviceCode != ''"> and t.device_code like concat('%', #{deviceCode}, '%')</if>
<if test="deviceName != null and deviceName != ''"> and d.device_name like concat('%', #{deviceName}, '%')</if>
<if test="effectiveDate != null "> and t.effective_date = #{effectiveDate}</if>
<if test="recordStatus != null and recordStatus != ''"> and t.record_status = #{recordStatus}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
......@@ -53,7 +53,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">id,</if>
<if test="operateCode != null">operate_code,</if>
<if test="operateType != null">operate_type,</if>
<if test="deviceCode != null">device_code,</if>
<if test="deviceId != null">device_id,</if>
<if test="effectiveDate != null">effective_date,</if>
<if test="recordStatus != null">record_status,</if>
......@@ -65,7 +64,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">#{id},</if>
<if test="operateCode != null">#{operateCode},</if>
<if test="operateType != null">#{operateType},</if>
<if test="deviceCode != null">#{deviceCode},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="effectiveDate != null">#{effectiveDate},</if>
<if test="recordStatus != null">#{recordStatus},</if>
......@@ -79,7 +77,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_special_device_record
<trim prefix="SET" suffixOverrides=",">
<if test="operateType != null">operate_type = #{operateType},</if>
<if test="deviceCode != null">device_code = #{deviceCode},</if>
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="effectiveDate != null">effective_date = #{effectiveDate},</if>
<if test="recordStatus != null">record_status = #{recordStatus},</if>
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="设备编号" prop="deviceCode">
<el-form-item label="设备名称" prop="deviceName">
<el-input
v-model="queryParams.deviceCode"
placeholder="请输入设备编号"
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
......@@ -41,12 +41,6 @@
</template>
</el-table-column>
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceCode" >
<template slot-scope="scope">
<span v-if="scope.row.deviceCode == '' || scope.row.deviceCode == null">-</span>
<span v-else>{{scope.row.deviceCode}}</span>
</template>
</el-table-column>
<el-table-column label="登记有效日期" align="center" prop="effectiveDate" width="180">
<template slot-scope="scope">
<span v-if="scope.row.effectiveDate != null && scope.row.effectiveDate != '' && getDays(scope.row.effectiveDate, new Date())<30 && getDays(scope.row.effectiveDate, new Date())>0" style="color: red;">
......@@ -127,7 +121,7 @@ export default {
pageNum: 1,
pageSize: 10,
operateId: null,
deviceCode: null,
deviceName: null,
effectiveDate: null,
maintenanceRecord: null,
},
......@@ -161,7 +155,6 @@ export default {
this.form = {
id: null,
operateId: null,
deviceCode: null,
effectiveDate: null,
maintenanceRecord: null,
createTime: null
......
......@@ -35,7 +35,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: process.env.VUE_APP_TARGET,
// target: `http://192.168.2.21:8908/dangerManage`,
// target: `http://localhost:8908/dangerManage`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment