Browse Source

[feat]

仓库管理 库存报损
修改库存报损详情实体类,新增字段,修改导出顺序;
新增报损详情mapper按单号数组查询详情列表方法;
dev
王晓迪 3 months ago
parent
commit
833d22f58c
  1. 66
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryReportDamageChild.java
  2. 3
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryReportDamageChildMapper.java
  3. 16
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryReportDamageChildMapper.xml

66
ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryReportDamageChild.java

@ -1,6 +1,8 @@
package com.ruoyi.warehouse.domain; package com.ruoyi.warehouse.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
@ -20,84 +22,92 @@ public class WarehouseInventoryReportDamageChild extends BaseEntity
private Long reportDamageChildId; private Long reportDamageChildId;
/** 关联生产单号 */ /** 关联生产单号 */
@Excel(name = "关联生产单号") @Excel(name = "关联生产单号", sort = 3)
private String makeNo; private String makeNo;
/** 报损单号 */ /** 报损单号 */
@Excel(name = "报损单号") @Excel(name = "报损单号", sort = 1)
private String reportDamageCode; private String reportDamageCode;
/** 料号 */ /** 料号 */
@Excel(name = "料号") @Excel(name = "料号", sort = 4)
private String materialNo; private String materialNo;
/** 图片 */ /** 图片 */
@Excel(name = "图片") // @Excel(name = "图片", sort = 5)
private String materialPhotourl; private String materialPhotourl;
/** 物料名称 */ /** 物料名称 */
@Excel(name = "物料名称") @Excel(name = "物料名称", sort = 5)
private String materialName; private String materialName;
/** 物料类型 */ /** 物料类型 */
@Excel(name = "物料类型") // @Excel(name = "物料类型", sort = 6, dictType = "materialType")
private String materialType; private String materialType;
/** 描述 */ /** 描述 */
@Excel(name = "描述") // @Excel(name = "描述", sort = 7)
private String materialDescribe; private String materialDescribe;
/** 品牌 */ /** 品牌 */
@Excel(name = "品牌") // @Excel(name = "品牌", sort = 8)
private String materialBrand; private String materialBrand;
// 单位 // 单位
@Excel(name = "单位", sort = 7)
private String materialUnit; private String materialUnit;
/** 实际报废数量 */ /** 实际报废数量 */
@Excel(name = "实际报废数量") @Excel(name = "实际报废数量", sort = 6)
private BigDecimal actualScrapQuantity; private BigDecimal actualScrapQuantity;
/** 报废类型 */ /** 报废类型 */
@Excel(name = "报废类型") @Excel(name = "报废类型", sort = 8)
private String scrapType; private String scrapType;
/** 报废明细 */ /** 报废明细 */
@Excel(name = "报废明细") @Excel(name = "报废明细", sort = 9)
private String scrapDetail; private String scrapDetail;
/** 品质判定 */ /** 品质判定 */
@Excel(name = "品质判定") @Excel(name = "品质判定", sort = 10)
private String qualityAssessment; private String qualityAssessment;
/** 预估价值(RMB) */ /** 预估价值(RMB) */
@Excel(name = "预估价值(RMB)") @Excel(name = "预估价值(RMB)", sort = 11)
private BigDecimal estimatedValueRmb; private BigDecimal estimatedValueRmb;
/** 报废日期 */
@Excel(name = "报废日期", sort = 12,dateFormat = "yyyy-MM-dd")
private Date scrapDate;
/** 责任单位 */ /** 责任单位 */
@Excel(name = "责任单位") @Excel(name = "责任单位", sort = 13)
private String responsibleUnit; private String responsibleUnit;
/** 仓库ID */ /** 仓库ID */
@Excel(name = "仓库ID") @Excel(name = "仓库ID", sort = 14)
private String warehouseCode; private String warehouseCode;
/** 仓库名称 */ /** 仓库名称 */
@Excel(name = "仓库名称") @Excel(name = "仓库名称", sort = 15)
private String warehouseName; private String warehouseName;
/** 仓库存放地址 */ /** 仓库存放地址 */
@Excel(name = "仓库存放地址") @Excel(name = "仓库存放地址", sort = 16)
private String warehouseStoreAddress; private String warehouseStoreAddress;
/** 申请部门ID */ /** 申请部门ID */
@Excel(name = "申请部门ID") // @Excel(name = "申请部门ID")
private String applyDeptId; private String applyDeptId;
/** 申请部门 */ /** 申请部门 */
@Excel(name = "申请部门") @Excel(name = "申请部门", sort = 2)
private String applyDept; private String applyDept;
// 备注
@Excel(name = "备注", sort = 17)
private String remark;
public void setReportDamageChildId(Long reportDamageChildId) public void setReportDamageChildId(Long reportDamageChildId)
{ {
this.reportDamageChildId = reportDamageChildId; this.reportDamageChildId = reportDamageChildId;
@ -287,6 +297,24 @@ public class WarehouseInventoryReportDamageChild extends BaseEntity
this.materialUnit = materialUnit; this.materialUnit = materialUnit;
} }
public Date getScrapDate() {
return scrapDate;
}
public void setScrapDate(Date scrapDate) {
this.scrapDate = scrapDate;
}
@Override
public String getRemark() {
return remark;
}
@Override
public void setRemark(String remark) {
this.remark = remark;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

3
ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryReportDamageChildMapper.java

@ -97,4 +97,7 @@ public interface WarehouseInventoryReportDamageChildMapper
* @return 结果 * @return 结果
*/ */
public int restoreWarehouseInventoryReportDamageChildById(Long reportDamageChildId); public int restoreWarehouseInventoryReportDamageChildById(Long reportDamageChildId);
// 按单号批量查询详情
public List<WarehouseInventoryReportDamageChild> selectWarehouseInventoryReportDamageChildByCodes(String[] reportDamageCode);
} }

16
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryReportDamageChildMapper.xml

@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<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="scrapDate" column="scrap_date" />
</resultMap> </resultMap>
<sql id="selectWarehouseInventoryReportDamageChildVo"> <sql id="selectWarehouseInventoryReportDamageChildVo">
@ -38,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
actual_scrap_quantity, scrap_type, scrap_detail, quality_assessment, actual_scrap_quantity, scrap_type, scrap_detail, quality_assessment,
estimated_value_rmb, responsible_unit, remark, warehouse_code, warehouse_name, estimated_value_rmb, responsible_unit, remark, warehouse_code, warehouse_name,
warehouse_store_address, apply_dept_id, apply_dept, create_time, create_by, warehouse_store_address, apply_dept_id, apply_dept, create_time, create_by,
update_by, update_time, material_unit update_by, update_time, material_unit, scrap_date
from warehouse_inventory_report_damage_child from warehouse_inventory_report_damage_child
</sql> </sql>
@ -64,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseStoreAddress != null and warehouseStoreAddress != ''"> and warehouse_store_address = #{warehouseStoreAddress}</if> <if test="warehouseStoreAddress != null and warehouseStoreAddress != ''"> and warehouse_store_address = #{warehouseStoreAddress}</if>
<if test="applyDeptId != null and applyDeptId != ''"> and apply_dept_id = #{applyDeptId}</if> <if test="applyDeptId != null and applyDeptId != ''"> and apply_dept_id = #{applyDeptId}</if>
<if test="applyDept != null and applyDept != ''"> and apply_dept = #{applyDept}</if> <if test="applyDept != null and applyDept != ''"> and apply_dept = #{applyDept}</if>
<if test="scrapDate != null and scrapDate != ''"> and scrap_date = #{scrapDate}</if>
</where> </where>
</select> </select>
@ -103,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</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="scrapDate != null">scrap_date,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="makeNo != null">#{makeNo},</if> <if test="makeNo != null">#{makeNo},</if>
@ -130,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</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="scrapDate != null">#{scrapDate},</if>
</trim> </trim>
</insert> </insert>
@ -161,6 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</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="scrapDate != null">scrap_date = #{scrapDate},</if>
</trim> </trim>
where report_damage_child_id = #{reportDamageChildId} where report_damage_child_id = #{reportDamageChildId}
</update> </update>
@ -197,4 +202,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="restoreWarehouseInventoryReportDamageChildByCode" parameterType="String"> <update id="restoreWarehouseInventoryReportDamageChildByCode" parameterType="String">
update warehouse_inventory_report_damage_child set del_flag = '0' where report_damage_code = #{reportDamageCode} update warehouse_inventory_report_damage_child set del_flag = '0' where report_damage_code = #{reportDamageCode}
</update> </update>
<select id="selectWarehouseInventoryReportDamageChildByCodes" parameterType="String" resultMap="WarehouseInventoryReportDamageChildResult">
<include refid="selectWarehouseInventoryReportDamageChildVo"/>
where report_damage_code in
<foreach item="reportDamageCode" collection="array" open="(" separator="," close=")">
#{reportDamageCode}
</foreach>
</select>
</mapper> </mapper>
Loading…
Cancel
Save