Commit 37cb9dff authored by wanghao's avatar wanghao

1托盘查询加了一个老化开始时间

2实时数据界面的绑定时间显示错误调整
parent 2e997ea1
...@@ -51,13 +51,13 @@ public class PalletDeviceBinding extends BaseEntity ...@@ -51,13 +51,13 @@ public class PalletDeviceBinding extends BaseEntity
private Integer number; private Integer number;
/** 绑定时间 */ /** 绑定时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "绑定时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "绑定时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date bindingTime; private Date bindingTime;
/** 解绑时间 */ /** 解绑时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "解绑时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "解绑时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date unbindingTime; private Date unbindingTime;
/** /**
......
...@@ -49,13 +49,13 @@ public class PalletDeviceUploadHistory extends BaseEntity ...@@ -49,13 +49,13 @@ public class PalletDeviceUploadHistory extends BaseEntity
private Integer number; private Integer number;
/** 绑定时间 */ /** 绑定时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "绑定时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "绑定时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date bindingTime; private Date bindingTime;
/** 解绑时间 */ /** 解绑时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "解绑时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "解绑时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date unbindingTime; private Date unbindingTime;
/** 0-预热;1-正常;3-传感器故障;4-报警;5-通讯故障 */ /** 0-预热;1-正常;3-传感器故障;4-报警;5-通讯故障 */
......
...@@ -49,6 +49,11 @@ public class TTrayInfo extends BaseEntity ...@@ -49,6 +49,11 @@ public class TTrayInfo extends BaseEntity
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fCreateTime; private Date fCreateTime;
/** 老化开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "老化开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date fAgingStartTime;
public void setfTrayId(Long fTrayId) public void setfTrayId(Long fTrayId)
{ {
this.fTrayId = fTrayId; this.fTrayId = fTrayId;
...@@ -121,6 +126,14 @@ public class TTrayInfo extends BaseEntity ...@@ -121,6 +126,14 @@ public class TTrayInfo extends BaseEntity
this.boardCount = boardCount; this.boardCount = boardCount;
} }
public Date getfAgingStartTime() {
return fAgingStartTime;
}
public void setfAgingStartTime(Date fAgingStartTime) {
this.fAgingStartTime = fAgingStartTime;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
...@@ -131,6 +144,7 @@ public class TTrayInfo extends BaseEntity ...@@ -131,6 +144,7 @@ public class TTrayInfo extends BaseEntity
.append("fBindingTime", getfBindingTime()) .append("fBindingTime", getfBindingTime())
.append("fUnbindingTime", getfUnbindingTime()) .append("fUnbindingTime", getfUnbindingTime())
.append("fCreateTime", getfCreateTime()) .append("fCreateTime", getfCreateTime())
.append("fAgingStartTime", getfAgingStartTime())
.toString(); .toString();
} }
} }
...@@ -12,54 +12,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -12,54 +12,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fBindingTime" column="f_binding_time" /> <result property="fBindingTime" column="f_binding_time" />
<result property="fUnbindingTime" column="f_unbinding_time" /> <result property="fUnbindingTime" column="f_unbinding_time" />
<result property="fCreateTime" column="f_create_time" /> <result property="fCreateTime" column="f_create_time" />
<result property="fAgingStartTime" column="f_aging_start_time" />
</resultMap> </resultMap>
<sql id="selectTTrayInfoVo"> <sql id="selectTTrayInfoVo">
SELECT SELECT
f_tray_id, trayInfo.f_tray_id,
f_tray_code, trayInfo.f_tray_code,
f_storey_code, trayInfo.f_storey_code,
f_status, trayInfo.f_status,
f_binding_time, trayInfo.f_binding_time,
f_unbinding_time, trayInfo.f_unbinding_time,
f_create_time, trayInfo.f_create_time,
( ( SELECT count( 1 ) FROM t_pallet_device_binding WHERE f_tray_id = trayInfo.f_tray_id AND ( f_device_code != '' ) AND f_unbinding_time IS NULL ) AS boardCount ,
SELECT storeyInfo.f_aging_start_time
count( 1 )
FROM
t_pallet_device_binding
WHERE
f_tray_id = t_tray_info.f_tray_id
AND ( f_device_code <![CDATA[<>]]> '' )
AND f_unbinding_time IS NULL
) AS boardCount
FROM FROM
t_tray_info t_tray_info trayInfo
LEFT JOIN t_storey_info storeyInfo ON trayInfo.f_storey_code = storeyInfo.f_storey_code
</sql> </sql>
<select id="selectTTrayInfoList" parameterType="TTrayInfo" resultMap="TTrayInfoResult"> <select id="selectTTrayInfoList" parameterType="TTrayInfo" resultMap="TTrayInfoResult">
<include refid="selectTTrayInfoVo"/> <include refid="selectTTrayInfoVo"/>
<where> <where>
<if test="fTrayCode != null and fTrayCode != ''"> and f_tray_code like concat('%',#{fTrayCode},'%')</if> <if test="fTrayCode != null and fTrayCode != ''"> and trayInfo.f_tray_code like concat('%',#{fTrayCode},'%')</if>
<if test="fStoreyCode != null and fStoreyCode != ''"> and f_storey_code = #{fStoreyCode}</if> <if test="fStoreyCode != null and fStoreyCode != ''"> and trayInfo.f_storey_code = #{fStoreyCode}</if>
<if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if> <if test="fStatus != null and fStatus != ''"> and trayInfo.f_status = #{fStatus}</if>
<if test="fBindingTime != null "> and f_binding_time = #{fBindingTime}</if> <if test="fBindingTime != null "> and trayInfo.f_binding_time = #{fBindingTime}</if>
<if test="fUnbindingTime != null "> and f_unbinding_time = #{fUnbindingTime}</if> <if test="fUnbindingTime != null "> and trayInfo.f_unbinding_time = #{fUnbindingTime}</if>
<if test="fCreateTime != null "> and f_create_time = #{fCreateTime}</if> <if test="fCreateTime != null "> and trayInfo.f_create_time = #{fCreateTime}</if>
</where> </where>
</select> </select>
<select id="selectTTrayInfoById" parameterType="Long" resultMap="TTrayInfoResult"> <select id="selectTTrayInfoById" parameterType="Long" resultMap="TTrayInfoResult">
<include refid="selectTTrayInfoVo"/> <include refid="selectTTrayInfoVo"/>
where f_tray_id = #{fTrayId} where trayInfo.f_tray_id = #{fTrayId}
</select> </select>
<select id="selectTTrayInfoByCode" parameterType="string" resultMap="TTrayInfoResult"> <select id="selectTTrayInfoByCode" parameterType="string" resultMap="TTrayInfoResult">
<include refid="selectTTrayInfoVo"/> <include refid="selectTTrayInfoVo"/>
where f_tray_code = #{fTrayCode} where trayInfo.f_tray_code = #{fTrayCode}
</select> </select>
<select id="selectTTrayInfoByStoreyCode" parameterType="string" resultMap="TTrayInfoResult"> <select id="selectTTrayInfoByStoreyCode" parameterType="string" resultMap="TTrayInfoResult">
<include refid="selectTTrayInfoVo"/> <include refid="selectTTrayInfoVo"/>
where f_storey_code = #{fStoreyCode} where trayInfo.f_storey_code = #{fStoreyCode}
</select> </select>
<insert id="insertTTrayInfo" parameterType="TTrayInfo" useGeneratedKeys="true" keyProperty="fTrayId"> <insert id="insertTTrayInfo" parameterType="TTrayInfo" useGeneratedKeys="true" keyProperty="fTrayId">
......
...@@ -312,7 +312,7 @@ export default { ...@@ -312,7 +312,7 @@ export default {
/** 日期格式化(兼容字符串和Date对象) */ /** 日期格式化(兼容字符串和Date对象) */
formatDate(date) { formatDate(date) {
return formatDate(date, "yyyy-MM-dd"); return formatDate(date, "yyyy-MM-dd HH:mm:ss");
}, },
/** 处理查询 */ /** 处理查询 */
......
...@@ -57,6 +57,11 @@ ...@@ -57,6 +57,11 @@
<el-tag :type="statusTagType(scope.row.fStatus)" v-else class="status-tag">空闲</el-tag> <el-tag :type="statusTagType(scope.row.fStatus)" v-else class="status-tag">空闲</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="fAgingStartTime" label="老化开始时间" align="center" width="200px">
<template slot-scope="scope">
<div class="device-code">{{ scope.row.fAgingStartTime ? formatDate(scope.row.fAgingStartTime) : '-' }}</div>
</template>
</el-table-column>
<el-table-column prop="boardCount" label="主板数量" align="center"> <el-table-column prop="boardCount" label="主板数量" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="board-count"> <div class="board-count">
...@@ -91,6 +96,7 @@ ...@@ -91,6 +96,7 @@
<script> <script>
import { listTray } from "@/api/tray/tray" import { listTray } from "@/api/tray/tray"
import {formatDate} from "@/utils";
export default { export default {
name: "TrayInformation", name: "TrayInformation",
data() { data() {
...@@ -149,6 +155,10 @@ export default { ...@@ -149,6 +155,10 @@ export default {
}, },
}, },
methods: { methods: {
/** 日期格式化(兼容字符串和Date对象) */
formatDate(date) {
return formatDate(date, "yyyy-MM-dd HH:mm:ss");
},
// 获取托盘数据 // 获取托盘数据
fetchTrays() { fetchTrays() {
listTray(this.queryParams).then(response => { listTray(this.queryParams).then(response => {
......
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