设备备品备件台账 优化 1.加入展示列,隐藏展示列 主表关联附属表

orign^2
A0010407 1 year ago
parent ad6f335ffc
commit 3491c4a326

@ -203,6 +203,174 @@ public class SparePartsLedger extends BaseEntity {
@Excel(name = "备件类型", readConverterExp = "备=件用")
private String spareType;
//////////////////////////////////////////////////////////附属表
/** id */
private String id;
/** 主表备件编码 */
@Excel(name = "主表备件编码")
private String primaryCode;
/** 所属设备名称 */
@Excel(name = "所属设备名称")
private String ownEquipmentName;
/** 单机装配数量 */
@Excel(name = "单机装配数量")
private String unitQuantity;
/** 安全库存 */
@Excel(name = "安全库存")
private String safeStock;
/** 单价 */
@Excel(name = "单价")
private BigDecimal unitPrice;
/** 采购方式 */
@Excel(name = "采购方式")
private String procurementMethod;
/** 采购周期 */
@Excel(name = "采购周期")
private String procurementCycle;
/** 期初结存 */
@Excel(name = "期初结存")
private String openingBalance;
/** 出库记录 */
@Excel(name = "出库记录")
private String outputRecords;
/** 入库记录 */
@Excel(name = "入库记录")
private String inputRecords;
/** 期末盘点 */
@Excel(name = "期末盘点")
private String endInventory;
/** 期末金额 */
@Excel(name = "期末金额")
private BigDecimal endMoney;
/** 代用件 */
@Excel(name = "代用件")
private String substituteParts;
/** 所属设备编码 */
@Excel(name = "所属设备编码")
private String ownEquipmentCode;
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setPrimaryCode(String primaryCode) {
this.primaryCode = primaryCode;
}
public String getPrimaryCode() {
return primaryCode;
}
public void setOwnEquipmentName(String ownEquipmentName) {
this.ownEquipmentName = ownEquipmentName;
}
public String getOwnEquipmentName() {
return ownEquipmentName;
}
public void setUnitQuantity(String unitQuantity) {
this.unitQuantity = unitQuantity;
}
public String getUnitQuantity() {
return unitQuantity;
}
public void setSafeStock(String safeStock) {
this.safeStock = safeStock;
}
public String getSafeStock() {
return safeStock;
}
public void setUnitPrice(BigDecimal unitPrice) {
this.unitPrice = unitPrice;
}
public BigDecimal getUnitPrice() {
return unitPrice;
}
public void setProcurementMethod(String procurementMethod) {
this.procurementMethod = procurementMethod;
}
public String getProcurementMethod() {
return procurementMethod;
}
public void setProcurementCycle(String procurementCycle) {
this.procurementCycle = procurementCycle;
}
public String getProcurementCycle() {
return procurementCycle;
}
public void setOpeningBalance(String openingBalance) {
this.openingBalance = openingBalance;
}
public String getOpeningBalance() {
return openingBalance;
}
public void setOutputRecords(String outputRecords) {
this.outputRecords = outputRecords;
}
public String getOutputRecords() {
return outputRecords;
}
public void setInputRecords(String inputRecords) {
this.inputRecords = inputRecords;
}
public String getInputRecords() {
return inputRecords;
}
public void setEndInventory(String endInventory) {
this.endInventory = endInventory;
}
public String getEndInventory() {
return endInventory;
}
public void setEndMoney(BigDecimal endMoney) {
this.endMoney = endMoney;
}
public BigDecimal getEndMoney() {
return endMoney;
}
public void setSubstituteParts(String substituteParts) {
this.substituteParts = substituteParts;
}
public String getSubstituteParts() {
return substituteParts;
}
public void setOwnEquipmentCode(String ownEquipmentCode) {
this.ownEquipmentCode = ownEquipmentCode;
}
public String getOwnEquipmentCode() {
return ownEquipmentCode;
}
/////////////////////////////
// 领用数量-保养备件领用使用
private BigDecimal applyNum;
public BigDecimal getApplyNum() {

@ -32,6 +32,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="factoryCode" column="factory_code" />
<result property="sapFactoryCode" column="sap_factory_code" />
<result property="delFlag" column="del_flag" />
<!--附属表-->
<result property="id" column="id" />
<result property="primaryCode" column="primary_code" />
<result property="ownEquipmentName" column="own_equipment_name" />
<result property="unitQuantity" column="unit_quantity" />
<result property="safeStock" column="safe_stock" />
<result property="unitPrice" column="unit_price" />
<result property="procurementMethod" column="procurement_method" />
<result property="procurementCycle" column="procurement_cycle" />
<result property="openingBalance" column="opening_balance" />
<result property="outputRecords" column="output_records" />
<result property="inputRecords" column="input_records" />
<result property="endInventory" column="end_inventory" />
<result property="endMoney" column="end_money" />
<result property="createBy" column="create_by" />
<result property="factoryCode" column="factory_code" />
<result property="substituteParts" column="substitute_parts" />
<result property="ownEquipmentCode" column="own_equipment_code" />
</resultMap>
<sql id="selectSparePartsLedgerVo">
@ -67,53 +87,99 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectSparePartsLedgerList" parameterType="SparePartsLedger" resultMap="SparePartsLedgerResult">
<include refid="selectSparePartsLedgerVo"/>
select
womsn.storage_id,
womsn.storage_type,
womsn.material_code,
womsn.material_desc,
womsn.amount,
womsn.storage_amount,
womsn.sap_factory_code,
womsn.wl_name,
womsn.del_flag,
womsn.spare_use_life,
womsn.spare_name,
womsn.spare_mode,
womsn.spare_manufacturer,
womsn.spare_supplier,
womsn.spare_replacement_cycle,
womsn.spare_measurement_unit,
womsn.spare_conversion_unit,
womsn.spare_conversion_ratio,
womsn.spare_inventory_floor,
womsn.spare_inventory_upper,
womsn.spare_type,
womsn.create_by,
womsn.gmt_create,
womsn.last_modified_by,
womsn.gmt_modified,
womsn.active_flag,
womsn.factory_code,
womsna.id,
womsna.primary_code,
womsna.own_equipment_name,
womsna.unit_quantity,
womsna.safe_stock,
womsna.unit_price,
womsna.procurement_method,
womsna.procurement_cycle,
womsna.opening_balance,
womsna.output_records,
womsna.input_records,
womsna.end_inventory,
womsna.end_money,
womsna.substitute_parts,
womsna.own_equipment_code
from wms_ods_mate_storage_news womsn
left join wms_ods_mate_storage_news_attached womsna on womsn.material_code = womsna.primary_code
<where>
<if test="storageId != null and storageId != ''"> and storage_id = #{storageId}</if>
<if test="whCode != null and whCode != ''"> and wh_code = #{whCode}</if>
<if test="regionCode != null and regionCode != ''"> and region_code = #{regionCode}</if>
<if test="waCode != null and waCode != ''"> and wa_code = #{waCode}</if>
<if test="storageType != null and storageType != ''"> and storage_type = #{storageType}</if>
<if test="wlCode != null and wlCode != ''"> and wl_code = #{wlCode}</if>
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if>
<if test="materialDesc != null and materialDesc != ''"> and material_desc like concat('%', #{materialDesc}, '%')</if>
<if test="amount != null "> and amount = #{amount}</if>
<if test="storageAmount != null "> and storage_amount = #{storageAmount}</if>
<if test="occupyAmount != null "> and occupy_amount = #{occupyAmount}</if>
<if test="lpn != null and lpn != ''"> and lpn = #{lpn}</if>
<if test="productBatch != null and productBatch != ''"> and product_batch = #{productBatch}</if>
<if test="receiveDate != null "> and receive_date = #{receiveDate}</if>
<if test="productDate != null "> and product_date = #{productDate}</if>
<if test="userDefined1 != null and userDefined1 != ''"> and user_defined1 = #{userDefined1}</if>
<if test="userDefined2 != null and userDefined2 != ''"> and user_defined2 = #{userDefined2}</if>
<if test="userDefined3 != null and userDefined3 != ''"> and user_defined3 = #{userDefined3}</if>
<if test="userDefined4 != null and userDefined4 != ''"> and user_defined4 = #{userDefined4}</if>
<if test="userDefined5 != null and userDefined5 != ''"> and user_defined5 = #{userDefined5}</if>
<if test="userDefined6 != null and userDefined6 != ''"> and user_defined6 = #{userDefined6}</if>
<if test="userDefined7 != null and userDefined7 != ''"> and user_defined7 = #{userDefined7}</if>
<if test="userDefined8 != null and userDefined8 != ''"> and user_defined8 = #{userDefined8}</if>
<if test="userDefined9 != null and userDefined9 != ''"> and user_defined9 = #{userDefined9}</if>
<if test="userDefined10 != null and userDefined10 != ''"> and user_defined10 = #{userDefined10}</if>
<if test="gmtCreate != null "> and gmt_create = #{gmtCreate}</if>
<if test="lastModifiedBy != null and lastModifiedBy != ''"> and last_modified_by = #{lastModifiedBy}</if>
<if test="gmtModified != null "> and gmt_modified = #{gmtModified}</if>
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="sapFactoryCode != null and sapFactoryCode != ''"> and sap_factory_code = #{sapFactoryCode}</if>
<if test="wlName != null and wlName != ''"> and wl_name like concat('%', #{wlName}, '%')</if>
<if test="spareUseLife != null and spareUseLife != ''"> and spare_use_life = #{spareUseLife}</if>
<if test="spareName != null and spareName != ''"> and spare_name like concat('%', #{spareName}, '%')</if>
<if test="spareMode != null and spareMode != ''"> and spare_mode like concat('%', #{spareMode}, '%')</if>
<if test="spareManufacturer != null and spareManufacturer != ''"> and spare_manufacturer = #{spareManufacturer}</if>
<if test="spareSupplier != null and spareSupplier != ''"> and spare_supplier = #{spareSupplier}</if>
<if test="spareReplacementCycle != null and spareReplacementCycle != ''"> and spare_replacement_cycle = #{spareReplacementCycle}</if>
<if test="spareMeasurementUnit != null and spareMeasurementUnit != ''"> and spare_measurement_unit = #{spareMeasurementUnit}</if>
<if test="spareConversionUnit != null and spareConversionUnit != ''"> and spare_conversion_unit = #{spareConversionUnit}</if>
<if test="spareConversionRatio != null and spareConversionRatio != ''"> and spare_conversion_ratio = #{spareConversionRatio}</if>
<if test="spareInventoryFloor != null and spareInventoryFloor != ''"> and spare_inventory_floor = #{spareInventoryFloor}</if>
<if test="spareInventoryUpper != null and spareInventoryUpper != ''"> and spare_inventory_upper = #{spareInventoryUpper}</if>
<if test="spareType != null and spareType != ''"> and spare_type = #{spareType}</if>
and del_flag = '0'
<if test="storageId != null and storageId != ''"> and womsn.storage_id = #{storageId}</if>
<if test="whCode != null and whCode != ''"> and womsn.wh_code = #{whCode}</if>
<if test="regionCode != null and regionCode != ''"> and womsn.region_code = #{regionCode}</if>
<if test="waCode != null and waCode != ''"> and womsn.wa_code = #{waCode}</if>
<if test="storageType != null and storageType != ''"> and womsn.storage_type = #{storageType}</if>
<if test="wlCode != null and wlCode != ''"> and womsn.wl_code = #{wlCode}</if>
<if test="materialCode != null and materialCode != ''"> and womsn.material_code like concat('%', #{materialCode}, '%')</if>
<if test="materialDesc != null and materialDesc != ''"> and womsn.material_desc like concat('%', #{materialDesc}, '%')</if>
<if test="amount != null "> and womsn.amount = #{amount}</if>
<if test="storageAmount != null "> and womsn.storage_amount = #{storageAmount}</if>
<if test="occupyAmount != null "> and womsn.occupy_amount = #{occupyAmount}</if>
<if test="lpn != null and lpn != ''"> and womsn.lpn = #{lpn}</if>
<if test="productBatch != null and productBatch != ''"> and womsn.product_batch = #{productBatch}</if>
<if test="receiveDate != null "> and womsn.receive_date = #{receiveDate}</if>
<if test="productDate != null "> and womsn.product_date = #{productDate}</if>
<if test="userDefined1 != null and userDefined1 != ''"> and womsn.user_defined1 = #{userDefined1}</if>
<if test="userDefined2 != null and userDefined2 != ''"> and womsn.user_defined2 = #{userDefined2}</if>
<if test="userDefined3 != null and userDefined3 != ''"> and womsn.user_defined3 = #{userDefined3}</if>
<if test="userDefined4 != null and userDefined4 != ''"> and womsn.user_defined4 = #{userDefined4}</if>
<if test="userDefined5 != null and userDefined5 != ''"> and womsn.user_defined5 = #{userDefined5}</if>
<if test="userDefined6 != null and userDefined6 != ''"> and womsn.user_defined6 = #{userDefined6}</if>
<if test="userDefined7 != null and userDefined7 != ''"> and womsn.user_defined7 = #{userDefined7}</if>
<if test="userDefined8 != null and userDefined8 != ''"> and womsn.user_defined8 = #{userDefined8}</if>
<if test="userDefined9 != null and userDefined9 != ''"> and womsn.user_defined9 = #{userDefined9}</if>
<if test="userDefined10 != null and userDefined10 != ''"> and womsn.user_defined10 = #{userDefined10}</if>
<if test="gmtCreate != null "> and womsn.gmt_create = #{gmtCreate}</if>
<if test="lastModifiedBy != null and lastModifiedBy != ''"> and womsn.last_modified_by = #{lastModifiedBy}</if>
<if test="gmtModified != null "> and womsn.gmt_modified = #{gmtModified}</if>
<if test="activeFlag != null and activeFlag != ''"> and womsn.active_flag = #{activeFlag}</if>
<if test="factoryCode != null and factoryCode != ''"> and womsn.factory_code = #{factoryCode}</if>
<if test="sapFactoryCode != null and sapFactoryCode != ''"> and womsn.sap_factory_code = #{sapFactoryCode}</if>
<if test="wlName != null and wlName != ''"> and womsn.wl_name like concat('%', #{wlName}, '%')</if>
<if test="spareUseLife != null and spareUseLife != ''"> and womsn.spare_use_life = #{spareUseLife}</if>
<if test="spareName != null and spareName != ''"> and womsn.spare_name like concat('%', #{spareName}, '%')</if>
<if test="spareMode != null and spareMode != ''"> and womsn.spare_mode like concat('%', #{spareMode}, '%')</if>
<if test="spareManufacturer != null and spareManufacturer != ''"> and womsn.spare_manufacturer = #{spareManufacturer}</if>
<if test="spareSupplier != null and spareSupplier != ''"> and womsn.spare_supplier like concat('%', #{spareSupplier}, '%')</if>
<if test="spareReplacementCycle != null and spareReplacementCycle != ''"> and womsn.spare_replacement_cycle = #{spareReplacementCycle}</if>
<if test="spareMeasurementUnit != null and spareMeasurementUnit != ''"> and womsn.spare_measurement_unit = #{spareMeasurementUnit}</if>
<if test="spareConversionUnit != null and spareConversionUnit != ''"> and womsn.spare_conversion_unit = #{spareConversionUnit}</if>
<if test="spareConversionRatio != null and spareConversionRatio != ''"> and womsn.spare_conversion_ratio = #{spareConversionRatio}</if>
<if test="spareInventoryFloor != null and spareInventoryFloor != ''"> and womsn.spare_inventory_floor = #{spareInventoryFloor}</if>
<if test="spareInventoryUpper != null and spareInventoryUpper != ''"> and womsn.spare_inventory_upper = #{spareInventoryUpper}</if>
<if test="spareType != null and spareType != ''"> and womsn.spare_type = #{spareType}</if>
<if test="ownEquipmentName != null and ownEquipmentName != ''"> and womsna.own_equipment_name like concat('%', #{ownEquipmentName}, '%')</if>
and womsn.del_flag = '0'
</where>
</select>

Loading…
Cancel
Save