Browse Source

[fix]:修复物料信息导出报错

dev
youjianchi 9 months ago
parent
commit
947d4db284
  1. 15
      ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterial.java
  2. 10
      ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml

15
ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterial.java

@ -47,8 +47,10 @@ public class ErpMaterial extends BaseEntity
/**技术团队名称 */
private String itemName;
/** 物料类型 */
@Excel(name = "物料类型",sort = 4)
private String materialType;
/** 物料类型名称 */
@Excel(name = "物料类型名称",sort = 4)
private String materialTypeName;
/** 加工方式 */
@Excel(name = "加工方式",sort = 8,dictType = "processMethod")
@ -175,7 +177,16 @@ public class ErpMaterial extends BaseEntity
{
return materialType;
}
public void setProcessMethod(String processMethod)
public String getMaterialTypeName() {
return materialTypeName;
}
public void setMaterialTypeName(String materialTypeName) {
this.materialTypeName = materialTypeName;
}
public void setProcessMethod(String processMethod)
{
this.processMethod = processMethod;
}

10
ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml

@ -20,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="productItem" column="product_item" />
<result property="itemName" column="itemName" />
<result property="materialType" column="material_type" />
<result property="materialTypeName" column="material_type_name" />
<result property="processMethod" column="process_method" />
<result property="unit" column="unit" />
<result property="brand" column="brand" />
@ -47,13 +48,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
, erp.material_name, erp.audit_status, erp.use_status, erp.hava_product_tem, erp.product_item,erp.`itemName`, erp.material_type, erp.process_method
, erp.unit, erp.brand, erp.`describe`, erp.warehouse_dept
,erp.instance_id,erp.instance_type,process_type_dict.dict_label as instance_type_name,erp.submit_instance_id,erp.cancel_instance_id,erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time
,file.url as photo_url
,file.url as photo_url,cate.name as material_type_name
from erp_material erp
left join(
select dict_value,dict_label from sys_dict_data
where dict_type = 'processType'
)process_type_dict
on erp.instance_type = process_type_dict.dict_value
left join (
select code,name from sys_category
where parent_id in(
select id from sys_category
where parent_id = (select id from sys_category where code = 'materialType') )
)cate
on erp.material_type = cate.code
left join (
select
att.rel_id

Loading…
Cancel
Save