Commit 3b8ad115 authored by wanghao's avatar wanghao

1 料架号和物料维护调整

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