Commit 3b8ad115 authored by wanghao's avatar wanghao

1 料架号和物料维护调整

2 货架位置显示 料架号调整
parent 4c153d3f
...@@ -13,9 +13,9 @@ spring: ...@@ -13,9 +13,9 @@ spring:
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭
enabled: false enabled: false
url: url:
username: username:
password: password:
# 初始连接数 # 初始连接数
initialSize: 5 initialSize: 5
# 最小连接池数量 # 最小连接池数量
...@@ -35,7 +35,7 @@ spring: ...@@ -35,7 +35,7 @@ spring:
testWhileIdle: true testWhileIdle: true
testOnBorrow: false testOnBorrow: false
testOnReturn: false testOnReturn: false
webStatFilter: webStatFilter:
enabled: true enabled: true
statViewServlet: statViewServlet:
enabled: true enabled: true
...@@ -97,4 +97,4 @@ zehong: ...@@ -97,4 +97,4 @@ zehong:
captchaType: math captchaType: math
shelf: shelf:
apiUrl: http://192.168.3.117:8099 apiUrl: http://192.168.1.252:8099
\ No newline at end of file
...@@ -113,6 +113,7 @@ public class ITShelfApiServiceImpl implements ITShelfApiService{ ...@@ -113,6 +113,7 @@ public class ITShelfApiServiceImpl implements ITShelfApiService{
tRackMaterialRelation.setRackCode(param.getString("rackCode")); tRackMaterialRelation.setRackCode(param.getString("rackCode"));
tRackMaterialRelation.setCreateTime(new Date()); tRackMaterialRelation.setCreateTime(new Date());
tRackMaterialRelation.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); tRackMaterialRelation.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
tRackMaterialRelation.setShelf(param.getString("shelf"));
int result = rackMaterialRelationMapper.insertTRackMaterialRelation(tRackMaterialRelation); int result = rackMaterialRelationMapper.insertTRackMaterialRelation(tRackMaterialRelation);
if(result == 0) throw new CustomException("入库料盘物料信息关联失败"); if(result == 0) throw new CustomException("入库料盘物料信息关联失败");
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.material.TRackMaterialRelationMapper"> <mapper namespace="com.zehong.system.mapper.material.TRackMaterialRelationMapper">
<resultMap type="TRackMaterialRelation" id="TRackMaterialRelationResult"> <resultMap type="TRackMaterialRelation" id="TRackMaterialRelationResult">
<result property="relationId" column="relation_id" /> <result property="relationId" column="relation_id" />
<result property="rackCode" column="rack_code" /> <result property="rackCode" column="rack_code" />
...@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="shelf" column="f_shelf" />
</resultMap> </resultMap>
<sql id="selectTRackMaterialRelationVo"> <sql id="selectTRackMaterialRelationVo">
...@@ -28,25 +29,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -28,25 +29,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
relation.create_time, relation.create_time,
relation.update_by, relation.update_by,
relation.update_time, relation.update_time,
shelfInfo.f_shelf as shelf relation.f_shelf as shelf
FROM FROM
t_rack_material_relation relation t_rack_material_relation relation
LEFT JOIN t_rack_material_info info ON info.material_id = relation.material_id LEFT JOIN t_rack_material_info info ON info.material_id = relation.material_id
LEFT JOIN t_shelf_storage_location location ON location.f_rid = relation.rack_code LEFT JOIN t_shelf_storage_location location ON location.f_rid = relation.rack_code
LEFT JOIN t_shelf_info shelfInfo ON shelfInfo.f_shelf_id = location.f_shelf_id
</sql> </sql>
<select id="selectTRackMaterialRelationList" parameterType="TRackMaterialRelation" resultMap="TRackMaterialRelationResult"> <select id="selectTRackMaterialRelationList" parameterType="TRackMaterialRelation" resultMap="TRackMaterialRelationResult">
<include refid="selectTRackMaterialRelationVo"/> <include refid="selectTRackMaterialRelationVo"/>
<where> <where>
<if test="rackCode != null and rackCode != ''"> and relation.rack_code like concat('%', #{rackCode}, '%')</if> <if test="rackCode != null and rackCode != ''"> and relation.rack_code like concat('%', #{rackCode}, '%')</if>
<if test="materialCode != null and materialCode != ''"> and info.material_code like concat('%', #{materialCode}, '%')</if> <if test="materialCode != null and materialCode != ''"> and info.material_code like concat('%', #{materialCode}, '%')</if>
<if test="materialName != null and materialName != ''"> and info.material_name like concat('%', #{materialName}, '%')</if> <if test="materialName != null and materialName != ''"> and info.material_name like concat('%', #{materialName}, '%')</if>
<if test="materialSpecifications != null and materialSpecifications != ''"> and info.material_specifications = #{materialSpecifications}</if> <if test="materialSpecifications != null and materialSpecifications != ''"> and info.material_specifications = #{materialSpecifications}</if>
<if test="shelf != null and shelf != ''"> and shelfInfo.f_shelf like concat('%', #{shelf}, '%')</if> <if test="shelf != null and shelf != ''"> and relation.f_shelf like concat('%', #{shelf}, '%')</if>
</where> </where>
</select> </select>
<select id="selectTRackMaterialRelationById" parameterType="Long" resultMap="TRackMaterialRelationResult"> <select id="selectTRackMaterialRelationById" parameterType="Long" resultMap="TRackMaterialRelationResult">
<include refid="selectTRackMaterialRelationVo"/> <include refid="selectTRackMaterialRelationVo"/>
where relation.relation_id = #{relationId} where relation.relation_id = #{relationId}
...@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTRackMaterialRelationVo"/> <include refid="selectTRackMaterialRelationVo"/>
where relation.rack_code = #{rackCode} where relation.rack_code = #{rackCode}
</select> </select>
<insert id="insertTRackMaterialRelation" parameterType="TRackMaterialRelation" useGeneratedKeys="true" keyProperty="relationId"> <insert id="insertTRackMaterialRelation" parameterType="TRackMaterialRelation" useGeneratedKeys="true" keyProperty="relationId">
insert into t_rack_material_relation insert into t_rack_material_relation
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -66,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -66,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="shelf != null">f_shelf,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="rackCode != null and rackCode != ''">#{rackCode},</if> <if test="rackCode != null and rackCode != ''">#{rackCode},</if>
...@@ -74,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -74,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="shelf != null">#{shelf},</if>
</trim> </trim>
</insert> </insert>
...@@ -86,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -86,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="shelf != null">f_shelf = #{shelf},</if>
</trim> </trim>
where relation_id = #{relationId} where relation_id = #{relationId}
</update> </update>
...@@ -95,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -95,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteTRackMaterialRelationByIds" parameterType="String"> <delete id="deleteTRackMaterialRelationByIds" parameterType="String">
delete from t_rack_material_relation where relation_id in delete from t_rack_material_relation where relation_id in
<foreach item="relationId" collection="array" open="(" separator="," close=")"> <foreach item="relationId" collection="array" open="(" separator="," close=")">
#{relationId} #{relationId}
</foreach> </foreach>
...@@ -107,4 +110,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -107,4 +110,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{rackCode} #{rackCode}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
</el-button> </el-button>
<div class="location-operate"> <div class="location-operate">
<div class="scanner-input">
<span>料架号:</span>
<el-input disabled v-model="fShelf" clearable/>
</div>
<div class="scanner-input"> <div class="scanner-input">
<span>料盘码:</span> <span>料盘码:</span>
<el-input ref="barCode" placeholder="扫描料盘条形码..." v-model="barCode" clearable/> <el-input ref="barCode" placeholder="扫描料盘条形码..." v-model="barCode" clearable/>
...@@ -134,7 +138,8 @@ ...@@ -134,7 +138,8 @@
materialCode: null, materialCode: null,
materialName: null, materialName: null,
materialSpecifications: null, materialSpecifications: null,
materialId: null materialId: null,
shelf: this.$route.query.shelf
}, },
open: false, open: false,
// 表单校验 // 表单校验
...@@ -143,11 +148,14 @@ ...@@ -143,11 +148,14 @@
{ required: true, message: "物料代码不能为空", trigger: "blur" } { required: true, message: "物料代码不能为空", trigger: "blur" }
], ],
}, },
materialInfoList: [] materialInfoList: [],
// 料盘号
fShelf: null
} }
}, },
created(){ created(){
this.queryParams.shelfId = this.$route.query.shelfId; this.queryParams.shelfId = this.$route.query.shelfId;
this.fShelf = this.$route.query.shelf;
this.getList(); this.getList();
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.barCode.focus(); this.$refs.barCode.focus();
......
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