1.0.24 合同物料关联字段

dev
yinq 2 months ago
parent 340c6f1788
commit d56e614fcb

@ -222,7 +222,7 @@ public class ErpContractInfoVo implements Serializable {
/** /**
* List * List
*/ */
private List<ErpContractMaterial> contractMaterialList; private List<ErpContractMaterialVo> contractMaterialList;
/** /**
* *

@ -139,5 +139,27 @@ public class ErpContractMaterialVo implements Serializable {
@ExcelProperty(value = "创建时间") @ExcelProperty(value = "创建时间")
private Date createTime; private Date createTime;
/**
*
*/
@ExcelProperty(value = "物料编号")
private String materialCode;
/**
*
*/
@ExcelProperty(value = "物料名称")
private String materialName;
/**
*
*/
@ExcelProperty(value = "销售物料名称")
private String saleMaterialName;
/**
*
*/
@ExcelProperty(value = "计量单位名称")
private String unitName;
} }

@ -18,6 +18,7 @@ import com.github.yulichang.wrapper.MPJLambdaWrapper;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.dromara.common.tenant.helper.TenantHelper; import org.dromara.common.tenant.helper.TenantHelper;
import org.dromara.oa.erp.domain.ErpContractMaterial; import org.dromara.oa.erp.domain.ErpContractMaterial;
import org.dromara.oa.erp.domain.vo.ErpContractMaterialVo;
import org.dromara.oa.erp.mapper.ErpContractMaterialMapper; import org.dromara.oa.erp.mapper.ErpContractMaterialMapper;
import org.dromara.workflow.api.RemoteWorkflowService; import org.dromara.workflow.api.RemoteWorkflowService;
import org.dromara.workflow.api.domain.RemoteStartProcess; import org.dromara.workflow.api.domain.RemoteStartProcess;
@ -64,7 +65,7 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
MPJLambdaWrapper<ErpContractMaterial> lqw = JoinWrappers.lambda(ErpContractMaterial.class) MPJLambdaWrapper<ErpContractMaterial> lqw = JoinWrappers.lambda(ErpContractMaterial.class)
.selectAll(ErpContractMaterial.class) .selectAll(ErpContractMaterial.class)
.eq(contractId != null, ErpContractMaterial::getContractId, contractId); .eq(contractId != null, ErpContractMaterial::getContractId, contractId);
List<ErpContractMaterial> contractMaterialList = contractMaterialMapper.selectList(lqw); List<ErpContractMaterialVo> contractMaterialList = contractMaterialMapper.selectCustomErpContractMaterialVoList(lqw);
contractInfoVo.setContractMaterialList(contractMaterialList); contractInfoVo.setContractMaterialList(contractMaterialList);
return contractInfoVo; return contractInfoVo;
} }

@ -7,29 +7,36 @@
</resultMap> </resultMap>
<select id="selectCustomErpContractMaterialVoList" resultMap="ErpContractMaterialResult"> <select id="selectCustomErpContractMaterialVoList" resultMap="ErpContractMaterialResult">
select contract_material_id, select t.contract_material_id,
tenant_id, t.tenant_id,
plan_flag, t.plan_flag,
contract_id, t.contract_id,
product_name, t.product_name,
specification_description, t.specification_description,
material_id, t.material_id,
relation_material_id, t.relation_material_id,
amount, t.amount,
unit_id, t.unit_id,
before_price, t.before_price,
tax_rate, t.tax_rate,
including_price, t.including_price,
subtotal, t.subtotal,
remark, t.remark,
active_flag, t.active_flag,
del_flag, t.del_flag,
create_dept, t.create_dept,
create_by, t.create_by,
create_time, t.create_time,
update_by, t.update_by,
update_time t.update_time,
m.material_code,
m.material_name,
r.sale_material_name,
u.unit_name
from erp_contract_material t from erp_contract_material t
left join base_material_info m on m.material_id = t.material_id
left join base_relation_material r on r.relation_material_id = t.relation_material_id
left join base_unit_info u on u.unit_id = t.unit_id
${ew.getCustomSqlSegment} ${ew.getCustomSqlSegment}
</select> </select>

Loading…
Cancel
Save