change(轮胎详情页签): 轮胎管理中添加入库编码功能并优化轮胎详情页签展示

- 在轮胎管理中新增入库编码字段,支持导入时填写和展示
- 优化轮胎详情页的组织架构信息展示,区分公司、修理厂和车队
- 修改轮胎类型显示为字典标签,提升可读性
- 添加入库编码相关查询接口,支持按编码筛选轮胎
- 在导入模板中添加入库编码填写说明
master
zch 6 days ago
parent 7361dad99c
commit d05fb29660

@ -185,8 +185,10 @@
<div>
<div class="summary-name" th:text="'胎号:' + ${tyre.tyreNo}">胎号:-</div>
<div class="summary-meta">
<div th:text="'所属场站:' + (${#strings.isEmpty(tyre.deptName)} ? '-' : tyre.deptName)">所属场站:-</div>
<div th:text="'所属车队:' + (${#strings.isEmpty(tyre.team)} ? '-' : tyre.team)">所属车队:-</div>
<div th:text="'所在车辆:' + ${#strings.isEmpty(tyre.carNo) ? '-' : tyre.carNo}">所在车辆:-</div>
<div th:text="'所属公司:' + ${#strings.isEmpty(tyre.company) ? '-' : tyre.company}">所属公司:-</div>
<div th:text="'所属修理厂:' + ${#strings.isEmpty(tyre.team) ? '-' : tyre.team}">所属修理厂:-</div>
<div th:text="'所属车队:' + ${#strings.isEmpty(tyre.carTeam) ? '-' : tyre.carTeam}">所属车队:-</div>
</div>
<span class="summary-link" th:text="${tyre.tyreNo}">-</span>
</div>
@ -244,8 +246,8 @@
<!-- <td th:text="${tyreStatusText}">在库</td>-->
<!-- </tr>-->
<tr>
<th>轮胎类</th>
<td th:text="${#strings.isEmpty(tyre.tyreType) ? '-' : tyre.tyreType}">-</td>
<th>轮胎类</th>
<td th:text="${#strings.isEmpty(tyre.tyreType) ? '-' : @dict.getLabel('tyre_type', tyre.tyreType)}">-</td>
<th>初始花纹深度(mm)</th>
<td th:text="${#strings.isEmpty(tyre.patternDepth) ? '-' : tyre.patternDepth}">-</td>
<!-- <th>剩余花纹深度(mm)</th>-->

@ -22,6 +22,10 @@
<p>轮胎芯片:</p>
<input type="text" name="tyreEpc"/>
</li>
<li>
<p>入库编码:</p>
<input type="text" name="inboundCode"/>
</li>
<li>
轮胎品牌:<select name="tyreBrand" th:with="type=${@dict.getType('brand')}">
<option value="">所有</option>
@ -190,6 +194,10 @@
field : 'createBy',
title : '创建人'
},
{
field : 'inboundCode',
title : '入库编码'
},
{
title: '操作',
align: 'center',
@ -212,6 +220,9 @@
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果轮胎已经存在,更新这条数据。"> 是否更新已经存在的轮胎数据
&nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
</div>
<div class="mt10 pt5 text-danger">
入库编码填写说明Excel 第一行必须填写默认入库编码,后续空行自动沿用最近一次出现的编码;如中途填写新编码,则从该行开始切换为新批次,直到再次填写其他编码。
</div>
<font color="red" class="pull-left mt10">
提示仅允许导入“xls”或“xlsx”格式文件
</font>

@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="tyreNo" column="tyre_no" />
<result property="selfNo" column="self_no" />
<result property="tyreEpc" column="tyre_epc" />
<result property="inboundCode" column="inbound_code" />
<result property="tyreBrand" column="tyre_brand" />
<result property="tyreModel" column="tyre_model" />
<result property="tyreLevel" column="tyre_level" />
@ -32,10 +33,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectBaseTyreVo">
select d.tyre_id, d.tyre_no, d.self_no, d.tyre_epc, d.tyre_brand, d.tyre_model, d.tyre_level, d.tyre_pattern,
d.grooves, d.pattern_depth, d.tyre_type, d.team, d.create_by, d.create_time, d.update_by, d.update_time,
d.remark, d.car_no, d.wheel_postion, d.dept_id, sd.dept_name
d.grooves, d.pattern_depth, d.tyre_type, d.team, d.inbound_code, d.create_by, d.create_time, d.update_by, d.update_time,
d.remark, d.car_no, d.wheel_postion, d.dept_id, tyre_dept.dept_name,
company_dept.dept_name as company, car_dept.dept_name as carTeam
from base_tyre d
left join sys_dept sd on sd.dept_id = d.dept_id
<!-- 详情页与 tyre.html 列表页保持同一口径:公司/车队跟随当前安装车辆,修理厂跟随轮胎档案 team。 -->
left join base_car bc on bc.car_no = d.car_no
left join sys_dept car_dept on car_dept.dept_id = bc.dept_id
left join sys_dept repair_dept on repair_dept.dept_id = car_dept.parent_id
left join sys_dept company_dept on company_dept.dept_id = repair_dept.parent_id
left join sys_dept tyre_dept on tyre_dept.dept_id = d.dept_id
</sql>
<select id="selectBaseTyreList" parameterType="BaseTyre" resultMap="BaseTyreResult">
@ -44,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tyre_no,
self_no,
tyre_epc,
d.inbound_code,
tyre_brand,
tyre_model,
tyre_level,
@ -71,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tyreNo != null and tyreNo != ''"> and tyre_no like concat('%', #{tyreNo}, '%')</if>
<if test="selfNo != null and selfNo != ''"> and self_no like concat('%', #{selfNo}, '%')</if>
<if test="tyreEpc != null and tyreEpc != ''"> and tyre_epc like concat('%', #{tyreEpc}, '%')</if>
<if test="inboundCode != null and inboundCode != ''"> and d.inbound_code = #{inboundCode}</if>
<if test="tyreBrand != null and tyreBrand != ''"> and tyre_brand like concat('%', #{tyreBrand}, '%')</if>
<if test="tyreModel != null and tyreModel != ''"> and tyre_model = #{tyreModel}</if>
<if test="tyreLevel != null and tyreLevel != ''"> and tyre_level = #{tyreLevel}</if>
@ -101,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tyreEpc != null and tyreEpc != ''"> and d.tyre_epc like concat('%', #{tyreEpc}, '%')</if>
</where>
</select>
<select id="getTeamByUser" resultType="java.lang.String">
SELECT
dept_name
@ -135,6 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tyreNo != null and tyreNo != ''">tyre_no,</if>
<if test="selfNo != null and selfNo != ''">self_no,</if>
<if test="tyreEpc != null and tyreEpc != ''">tyre_epc,</if>
<if test="inboundCode != null and inboundCode != ''">inbound_code,</if>
<if test="tyreBrand != null and tyreBrand != ''">tyre_brand,</if>
<if test="tyreModel != null and tyreModel != ''">tyre_model,</if>
<if test="tyreLevel != null and tyreLevel != ''">tyre_level,</if>
@ -155,6 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tyreNo != null and tyreNo != ''">#{tyreNo},</if>
<if test="selfNo != null and selfNo != ''">#{selfNo},</if>
<if test="tyreEpc != null and tyreEpc != ''">#{tyreEpc},</if>
<if test="inboundCode != null and inboundCode != ''">#{inboundCode},</if>
<if test="tyreBrand != null and tyreBrand != ''">#{tyreBrand},</if>
<if test="tyreModel != null and tyreModel != ''">#{tyreModel},</if>
<if test="tyreLevel != null and tyreLevel != ''">#{tyreLevel},</if>
@ -178,6 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tyreNo != null and tyreNo != ''">tyre_no = #{tyreNo},</if>
<if test="selfNo != null and selfNo != ''">self_no = #{selfNo},</if>
<if test="tyreEpc != null and tyreEpc != ''">tyre_epc = #{tyreEpc},</if>
<if test="inboundCode != null and inboundCode != ''">inbound_code = #{inboundCode},</if>
<if test="tyreBrand != null and tyreBrand != ''">tyre_brand = #{tyreBrand},</if>
<if test="tyreModel != null and tyreModel != ''">tyre_model = #{tyreModel},</if>
<if test="tyreLevel != null and tyreLevel != ''">tyre_level = #{tyreLevel},</if>
@ -207,4 +220,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<select id="selectByInboundCode" resultMap="BaseTyreResult">
<include refid="selectBaseTyreVo"/>
where d.inbound_code = #{inboundCode}
and d.tyre_epc is not null
and d.tyre_epc &lt;&gt; ''
order by d.tyre_id
</select>
<select id="countBaseTyreByInboundCode" resultType="int">
select count(1)
from base_tyre
where inbound_code = #{inboundCode}
</select>
</mapper>
Loading…
Cancel
Save