feat:报废连资产表

master
wanghao 3 weeks ago
parent 3c1f2ca37b
commit 6ef3caff31

@ -57,6 +57,17 @@ public class RecordAssetScrap extends BaseEntity
@Excel(name = "删除标志0=正常 1=删除")
private Long delFlag;
/** 关联资产基本信息 */
private BaseBasketInfo baseBasketInfo;
public BaseBasketInfo getBaseBasketInfo() {
return baseBasketInfo;
}
public void setBaseBasketInfo(BaseBasketInfo baseBasketInfo) {
this.baseBasketInfo = baseBasketInfo;
}
public void setId(Long id)
{
this.id = id;

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.manager.mapper.RecordAssetScrapMapper">
<resultMap type="RecordAssetScrap" id="RecordAssetScrapResult">
<resultMap type="com.ruoyi.manager.domain.RecordAssetScrap" id="RecordAssetScrapResult">
<result property="id" column="id" />
<result property="assetId" column="asset_id" />
<result property="scrapReasonType" column="scrap_reason_type" />
@ -17,20 +17,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="approveTime" column="approve_time" />
<result property="rejectReason" column="reject_reason" />
<result property="delFlag" column="del_flag" />
<association property="baseBasketInfo" resultMap="com.ruoyi.manager.mapper.BaseBasketInfoMapper.BaseBasketInfoResult"/>
</resultMap>
<sql id="selectRecordAssetScrapVo">
select id, asset_id, scrap_reason_type, scrap_remark, gps_location, status, create_by, create_time, approve_by, approve_time, reject_reason, del_flag from record_asset_scrap
</sql>
<sql id="selectLeft">
select ras.id,
ras.asset_id,
ras.scrap_reason_type,
ras.scrap_remark,
ras.gps_location,
ras.status,
ras.create_by,
ras.create_time,
ras.approve_by,
ras.approve_time,
ras.reject_reason,
ras.del_flag,
bbi.obj_id,
bbi.basket_code,
bbi.basket_spe,
bbi.basket_type,
bbi.steel_grade,
bbi.self_code
from record_asset_scrap ras
left join base_basket_info bbi on ras.asset_id = bbi.obj_id
</sql>
<select id="selectRecordAssetScrapList" parameterType="RecordAssetScrap" resultMap="RecordAssetScrapResult">
<include refid="selectRecordAssetScrapVo"/>
<where>
<if test="scrapReasonType != null and scrapReasonType != ''"> and scrap_reason_type = #{scrapReasonType}</if>
<if test="status != null "> and status = #{status}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="params.beginApproveTime != null and params.beginApproveTime != '' and params.endApproveTime != null and params.endApproveTime != ''"> and approve_time between #{params.beginApproveTime} and #{params.endApproveTime}</if>
<include refid="selectLeft"/>
<where>
and ras.del_flag = 0
<if test="assetId != null "> and ras.asset_id = #{assetId}</if>
<if test="scrapReasonType != null and scrapReasonType != ''"> and ras.scrap_reason_type = #{scrapReasonType}</if>
<if test="status != null "> and ras.status = #{status}</if>
<if test="createBy != null and createBy != ''"> and ras.create_by = #{createBy}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and ras.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="params.beginApproveTime != null and params.beginApproveTime != '' and params.endApproveTime != null and params.endApproveTime != ''"> and ras.approve_time between #{params.beginApproveTime} and #{params.endApproveTime}</if>
<if test="params.basketCode != null and params.basketCode != ''"> and bbi.basket_code like concat('%', #{params.basketCode}, '%')</if>
<if test="params.steelGrade != null and params.steelGrade != ''"> and bbi.steel_grade like concat('%', #{params.steelGrade}, '%')</if>
<if test="params.selfCode != null and params.selfCode != ''"> and bbi.self_code like concat('%', #{params.selfCode}, '%')</if>
<if test="params.basketType != null and params.basketType != ''"> and bbi.basket_type = #{params.basketType}</if>
</where>
</select>
@ -87,15 +117,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<delete id="deleteRecordAssetScrapById" parameterType="Long">
delete from record_asset_scrap where id = #{id}
</delete>
<update id="deleteRecordAssetScrapById" parameterType="Long">
update record_asset_scrap set del_flag = 1 where id = #{id}
</update>
<delete id="deleteRecordAssetScrapByIds" parameterType="String">
delete from record_asset_scrap where id in
<update id="deleteRecordAssetScrapByIds" parameterType="String">
update record_asset_scrap set del_flag = 1 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</update>
</mapper>

@ -17,21 +17,41 @@
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>资产编号:</label>
<input type="text" name="params[basketCode]"/>
</li>
<li>
<label>钢号:</label>
<input type="text" name="params[steelGrade]"/>
</li>
<li>
<label>自编号:</label>
<input type="text" name="params[selfCode]"/>
</li>
<li>
<label>资产类型:</label>
<select name="params[basketType]" th:with="type=${@dict.getType('basket_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>提报人:</label>
<input type="text" name="createBy"/>
</li>
<li class="select-time">
<label>提报时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<input type="text" class="time-input" id="startCreateTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
<input type="text" class="time-input" id="endCreateTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li class="select-time">
<label>审批时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginApproveTime]"/>
<input type="text" class="time-input" id="startApproveTime" placeholder="开始时间" name="params[beginApproveTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endApproveTime]"/>
<input type="text" class="time-input" id="endApproveTime" placeholder="结束时间" name="params[endApproveTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@ -66,6 +86,7 @@
var editFlag = [[${@permission.hasPermi('manager:asset_scrap:edit')}]];
var removeFlag = [[${@permission.hasPermi('manager:asset_scrap:remove')}]];
var scrapReasonTypeDatas = [[${@dict.getType('asset_scrap_reason')}]];
var basketTypeDatas = [[${@dict.getType('basket_type')}]];
var prefix = ctx + "manager/asset_scrap";
$(function() {
@ -86,7 +107,27 @@
},
{
field: 'assetId',
title: '资产ID'
title: '资产ID',
visible: false
},
{
field: 'baseBasketInfo.basketCode',
title: '资产编号'
},
{
field: 'baseBasketInfo.basketType',
title: '资产类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(basketTypeDatas, value);
}
},
{
field: 'baseBasketInfo.steelGrade',
title: '钢号'
},
{
field: 'baseBasketInfo.selfCode',
title: '自编号'
},
{
field: 'scrapReasonType',
@ -101,7 +142,8 @@
},
{
field: 'gpsLocation',
title: 'GPS坐标'
title: 'GPS坐标',
visible:false
},
{
field: 'status',

@ -14,10 +14,7 @@
<label>任务编码:</label>
<input type="text" name="taskCode"/>
</li>
<li>
<label>资产ID</label>
<input type="text" name="basketId"/>
</li>
<li>
<label>盘点状态:</label>
<select name="checkState" th:with="type=${@dict.getType('check_basket_state')}">

Loading…
Cancel
Save