Commit face7351 authored by wanghao's avatar wanghao

1 层配置调整

parent 16d19b6a
...@@ -35,6 +35,9 @@ public class TStoreyInfo extends BaseEntity ...@@ -35,6 +35,9 @@ public class TStoreyInfo extends BaseEntity
@Excel(name = "所属老化柜ID") @Excel(name = "所属老化柜ID")
private Long fEquipmentId; private Long fEquipmentId;
/** 设备编号 */
private String fEquipmentCode;
/** 层编号 */ /** 层编号 */
@Excel(name = "层编号") @Excel(name = "层编号")
private String fStoreyCode; private String fStoreyCode;
...@@ -82,6 +85,12 @@ public class TStoreyInfo extends BaseEntity ...@@ -82,6 +85,12 @@ public class TStoreyInfo extends BaseEntity
@Excel(name = "报警时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "报警时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fAlarmTime; private Date fAlarmTime;
/** 投料指令 */
private String feedingCommand;
/** 退料指令 */
private String blankingCommand;
public String getfTrayCode() { public String getfTrayCode() {
return fTrayCode; return fTrayCode;
} }
...@@ -191,6 +200,30 @@ public class TStoreyInfo extends BaseEntity ...@@ -191,6 +200,30 @@ public class TStoreyInfo extends BaseEntity
return fAlarmTime; return fAlarmTime;
} }
public String getFeedingCommand() {
return feedingCommand;
}
public void setFeedingCommand(String feedingCommand) {
this.feedingCommand = feedingCommand;
}
public String getBlankingCommand() {
return blankingCommand;
}
public void setBlankingCommand(String blankingCommand) {
this.blankingCommand = blankingCommand;
}
public String getfEquipmentCode() {
return fEquipmentCode;
}
public void setfEquipmentCode(String fEquipmentCode) {
this.fEquipmentCode = fEquipmentCode;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -19,7 +19,6 @@ public interface TEquipmentInfoMapper ...@@ -19,7 +19,6 @@ public interface TEquipmentInfoMapper
* @return 生产设备信息 * @return 生产设备信息
*/ */
public TEquipmentInfo selectTEquipmentInfoById(Long fEquipmentId); public TEquipmentInfo selectTEquipmentInfoById(Long fEquipmentId);
public TEquipmentInfo selectTEquipmentInfoByCode(String fEquipmentCode); public TEquipmentInfo selectTEquipmentInfoByCode(String fEquipmentCode);
/** /**
......
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.List; import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TEquipmentInfo;
import com.zehong.system.mapper.TEquipmentInfoMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TStoreyInfoMapper; import com.zehong.system.mapper.TStoreyInfoMapper;
import com.zehong.system.domain.TStoreyInfo; import com.zehong.system.domain.TStoreyInfo;
import com.zehong.system.service.ITStoreyInfoService; import com.zehong.system.service.ITStoreyInfoService;
import javax.annotation.Resource;
/** /**
* 老化层信息Service业务层处理 * 老化层信息Service业务层处理
* *
...@@ -16,9 +23,12 @@ import com.zehong.system.service.ITStoreyInfoService; ...@@ -16,9 +23,12 @@ import com.zehong.system.service.ITStoreyInfoService;
@Service @Service
public class TStoreyInfoServiceImpl implements ITStoreyInfoService public class TStoreyInfoServiceImpl implements ITStoreyInfoService
{ {
@Autowired @Resource
private TStoreyInfoMapper tStoreyInfoMapper; private TStoreyInfoMapper tStoreyInfoMapper;
@Resource
private TEquipmentInfoMapper equipmentInfoMapper;
/** /**
* 查询老化层信息 * 查询老化层信息
* *
...@@ -74,9 +84,35 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService ...@@ -74,9 +84,35 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
@Override @Override
public int insertTStoreyInfo(TStoreyInfo tStoreyInfo) public int insertTStoreyInfo(TStoreyInfo tStoreyInfo)
{ {
check(tStoreyInfo);
tStoreyInfo.setfCreateTime(DateUtils.getNowDate());
return tStoreyInfoMapper.insertTStoreyInfo(tStoreyInfo); return tStoreyInfoMapper.insertTStoreyInfo(tStoreyInfo);
} }
private void check(TStoreyInfo tStoreyInfo) {
if(StringUtils.isBlank(tStoreyInfo.getfStoreyCode())){
throw new RuntimeException("层编号不能为空");
}
if(tStoreyInfo.getfStoreyCode() != null && tStoreyInfo.getfStoreyId() == null) {
TStoreyInfo storeyInfo = tStoreyInfoMapper.selectTStoreyInfoByCode(tStoreyInfo.getfStoreyCode());
if(storeyInfo != null) {
throw new RuntimeException("层编号已存在");
}
}
if(StringUtils.isBlank(tStoreyInfo.getfEquipmentCode())){
throw new RuntimeException("柜编号不许为空");
}
TEquipmentInfo tEquipmentInfo = equipmentInfoMapper.selectTEquipmentInfoByCode(tStoreyInfo.getfEquipmentCode());
if(tEquipmentInfo == null) {
throw new RuntimeException("柜编号不存在");
}
tStoreyInfo.setfEquipmentId(tEquipmentInfo.getfEquipmentId());
}
/** /**
* 修改老化层信息 * 修改老化层信息
* *
...@@ -86,6 +122,8 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService ...@@ -86,6 +122,8 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
@Override @Override
public int updateTStoreyInfo(TStoreyInfo tStoreyInfo) public int updateTStoreyInfo(TStoreyInfo tStoreyInfo)
{ {
check(tStoreyInfo);
tStoreyInfo.setUpdateTime(DateUtils.getNowDate());
return tStoreyInfoMapper.updateTStoreyInfo(tStoreyInfo); return tStoreyInfoMapper.updateTStoreyInfo(tStoreyInfo);
} }
......
...@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="TStoreyInfo" id="TStoreyInfoResult"> <resultMap type="TStoreyInfo" id="TStoreyInfoResult">
<result property="fStoreyId" column="f_storey_id" /> <result property="fStoreyId" column="f_storey_id" />
<result property="fEquipmentId" column="f_equipment_id" /> <result property="fEquipmentId" column="f_equipment_id" />
<result property="fEquipmentCode" column="f_equipment_code" />
<result property="fStoreyCode" column="f_storey_code" /> <result property="fStoreyCode" column="f_storey_code" />
<result property="fTrayCode" column="f_tray_code" /> <result property="fTrayCode" column="f_tray_code" />
<result property="fIp" column="f_ip" /> <result property="fIp" column="f_ip" />
...@@ -16,6 +17,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -16,6 +17,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fUpdateTime" column="f_update_time" /> <result property="fUpdateTime" column="f_update_time" />
<result property="fCreateTime" column="f_create_time" /> <result property="fCreateTime" column="f_create_time" />
<result property="fAlarmTime" column="f_alarm_time" /> <result property="fAlarmTime" column="f_alarm_time" />
<result property="blankingCommand" column="f_blanking_command" />
<result property="feedingCommand" column="f_feeding_command" />
</resultMap> </resultMap>
<sql id="selectTStoreyInfoVo"> <sql id="selectTStoreyInfoVo">
...@@ -29,22 +33,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -29,22 +33,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
storeyInfo.f_update_time, storeyInfo.f_update_time,
storeyInfo.f_create_time, storeyInfo.f_create_time,
storeyInfo.f_alarm_time, storeyInfo.f_alarm_time,
trayInfo.f_tray_code storeyInfo.f_blanking_command,
storeyInfo.f_feeding_command,
trayInfo.f_tray_code,
equipmentInfo.f_equipment_code
from t_storey_info storeyInfo from t_storey_info storeyInfo
left join t_tray_info trayInfo on storeyInfo.f_storey_code = trayInfo.f_storey_code left join t_tray_info trayInfo on storeyInfo.f_storey_code = trayInfo.f_storey_code
left join t_equipment_info equipmentInfo on storeyInfo.f_equipment_id = equipmentInfo.f_equipment_id
</sql> </sql>
<select id="selectTStoreyInfoList" parameterType="TStoreyInfo" resultMap="TStoreyInfoResult"> <select id="selectTStoreyInfoList" parameterType="TStoreyInfo" resultMap="TStoreyInfoResult">
<include refid="selectTStoreyInfoVo"/> <include refid="selectTStoreyInfoVo"/>
<where> <where>
<if test="fEquipmentId != null "> and f_equipment_id = #{fEquipmentId}</if> <if test="fEquipmentCode != null "> and equipmentInfo.f_equipment_code like concat('%',#{fEquipmentCode},'%')</if>
<if test="fStoreyCode != null and fStoreyCode != ''"> and f_storey_code = #{fStoreyCode}</if> <if test="fStoreyCode != null and fStoreyCode != ''"> and storeyInfo.f_storey_code like concat('%',#{fStoreyCode},'%')</if>
<if test="fIp != null and fIp != ''"> and f_ip = #{fIp}</if> <if test="fIp != null and fIp != ''"> and storeyInfo.f_ip like concat concat('%',#{fIp},'%')</if>
<if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if> <if test="fStatus != null and fStatus != ''"> and storeyInfo.f_status = #{fStatus}</if>
<if test="fPort != null "> and f_port = #{fPort}</if> <if test="fPort != null "> and storeyInfo.f_port = #{fPort}</if>
<if test="fUpdateTime != null "> and f_update_time = #{fUpdateTime}</if> <if test="fUpdateTime != null "> and storeyInfo.f_update_time = #{fUpdateTime}</if>
<if test="fCreateTime != null "> and f_create_time = #{fCreateTime}</if> <if test="fCreateTime != null "> and storeyInfo.f_create_time = #{fCreateTime}</if>
<if test="fAlarmTime != null "> and f_alarm_time = #{fAlarmTime}</if> <if test="fAlarmTime != null "> and storeyInfo.f_alarm_time = #{fAlarmTime}</if>
</where> </where>
</select> </select>
<select id="queryByDepartmentId" parameterType="long" resultMap="TStoreyInfoResult"> <select id="queryByDepartmentId" parameterType="long" resultMap="TStoreyInfoResult">
...@@ -59,13 +67,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -59,13 +67,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTStoreyInfoByCode" parameterType="String" resultMap="TStoreyInfoResult"> <select id="selectTStoreyInfoByCode" parameterType="String" resultMap="TStoreyInfoResult">
<include refid="selectTStoreyInfoVo"/> <include refid="selectTStoreyInfoVo"/>
where f_storey_code = #{fStoreyCode} where storeyInfo.f_storey_code = #{fStoreyCode}
</select> </select>
<select id="selectNearestFreeStorey" resultMap="TStoreyInfoResult"> <select id="selectNearestFreeStorey" resultMap="TStoreyInfoResult">
SELECT SELECT
f_storey_id, f_equipment_id, f_storey_code, f_ip, f_status, f_port, f_storey_id, f_equipment_id, f_storey_code, f_ip, f_status, f_port,
f_aging_start_time, f_update_time, f_create_time, f_alarm_time f_aging_start_time, f_update_time, f_create_time, f_alarm_timel, f_blanking_command, f_feeding_command
FROM ( FROM (
SELECT SELECT
*, *,
...@@ -103,6 +111,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -103,6 +111,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fUpdateTime != null">f_update_time,</if> <if test="fUpdateTime != null">f_update_time,</if>
<if test="fCreateTime != null">f_create_time,</if> <if test="fCreateTime != null">f_create_time,</if>
<if test="fAlarmTime != null">f_alarm_time,</if> <if test="fAlarmTime != null">f_alarm_time,</if>
<if test="blankingCommand != null">f_blanking_command,</if>
<if test="feedingCommand != null">f_feeding_command,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fStoreyId != null">#{fStoreyId},</if> <if test="fStoreyId != null">#{fStoreyId},</if>
...@@ -114,6 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -114,6 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fUpdateTime != null">#{fUpdateTime},</if> <if test="fUpdateTime != null">#{fUpdateTime},</if>
<if test="fCreateTime != null">#{fCreateTime},</if> <if test="fCreateTime != null">#{fCreateTime},</if>
<if test="fAlarmTime != null">#{fAlarmTime},</if> <if test="fAlarmTime != null">#{fAlarmTime},</if>
<if test="blankingCommand != null">#{blankingCommand},</if>
<if test="feedingCommand != null">#{feedingCommand},</if>
</trim> </trim>
</insert> </insert>
...@@ -130,6 +144,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -130,6 +144,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if> <if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
<if test="fCreateTime != null">f_create_time = #{fCreateTime},</if> <if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
<if test="fAlarmTime != null">f_alarm_time = #{fAlarmTime},</if> <if test="fAlarmTime != null">f_alarm_time = #{fAlarmTime},</if>
<if test="blankingCommand != null">f_blanking_command = #{blankingCommand},</if>
<if test="feedingCommand != null">f_feeding_command = #{feedingCommand},</if>
</trim> </trim>
where f_storey_id = #{fStoreyId} where f_storey_id = #{fStoreyId}
</update> </update>
......
...@@ -156,33 +156,8 @@ export default { ...@@ -156,33 +156,8 @@ export default {
showAddDialog: false, showAddDialog: false,
trayCode: '', trayCode: '',
loadingCommands: [ loadingCommands: [
{ trayCode: 'TP-10023', position: 'A区-3号架' },
{ trayCode: 'TP-10045', position: 'B区-1号架' },
{ trayCode: 'TP-10067', position: 'C区-5号架' },
{ trayCode: 'TP-10023', position: 'A区-3号架' },
{ trayCode: 'TP-10045', position: 'B区-1号架' },
{ trayCode: 'TP-10067', position: 'C区-5号架' },
{ trayCode: 'TP-10023', position: 'A区-3号架' },
{ trayCode: 'TP-10045', position: 'B区-1号架' },
{ trayCode: 'TP-10067', position: 'C区-5号架' },
{ trayCode: 'TP-10023', position: 'A区-3号架' },
{ trayCode: 'TP-10045', position: 'B区-1号架' },
{ trayCode: 'TP-10067', position: 'C区-5号架' }
], ],
unloadingCommands: [ unloadingCommands: [
{ trayCode: 'TP-10089', position: '老化区-1号柜' },
{ trayCode: 'TP-10101', position: '老化区-3号柜' },
{ trayCode: 'TP-10089', position: '老化区-1号柜' },
{ trayCode: 'TP-10101', position: '老化区-3号柜' },
{ trayCode: 'TP-10089', position: '老化区-1号柜' },
{ trayCode: 'TP-10101', position: '老化区-3号柜' },
{ trayCode: 'TP-10089', position: '老化区-1号柜' },
{ trayCode: 'TP-10101', position: '老化区-3号柜' },
{ trayCode: 'TP-10101', position: '老化区-3号柜' },
{ trayCode: 'TP-10089', position: '老化区-1号柜' },
{ trayCode: 'TP-10101', position: '老化区-3号柜' },
{ trayCode: 'TP-10089', position: '老化区-1号柜' },
{ trayCode: 'TP-10101', position: '老化区-3号柜' }
], ],
websocket: null, websocket: null,
reconnectInterval: null, reconnectInterval: null,
......
This diff is collapsed.
...@@ -34,7 +34,7 @@ module.exports = { ...@@ -34,7 +34,7 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8080/agecal`, target: `http://localhost:8087/agecal`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + 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