Browse Source

[feat]

采购管理的采购报价:新增查询方法,根据物料料号查询已通过物料料号相同,供应商采购价列表的。
dev
zhangsiqi 5 months ago
parent
commit
bc203916cf
  1. 24
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteChild.java
  2. 2
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteChildMapper.java
  3. 1
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java
  4. 5
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java
  5. 7
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml

24
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteChild.java

@ -22,7 +22,6 @@ public class PurchaseQuoteChild extends BaseEntity
/** 关联报价编号字段 */ /** 关联报价编号字段 */
@Excel(name = "关联报价编号字段") @Excel(name = "关联报价编号字段")
private String purchaseQuoteCode; private String purchaseQuoteCode;
/** 物料表中的id */ /** 物料表中的id */
@Excel(name = "物料表中的id") @Excel(name = "物料表中的id")
private Long materialId; private Long materialId;
@ -288,7 +287,22 @@ public class PurchaseQuoteChild extends BaseEntity
{ {
return delFlag; return delFlag;
} }
private String purchasePlanCode;
public void setPurchasePlanCode(String purchasePlanCode) {
this.purchasePlanCode = purchasePlanCode;
}
public String getPurchasePlanCode() {
return purchasePlanCode;
}
private String correlationCode;
public void setCorrelationCode(String correlationCode) {
this.correlationCode = correlationCode;
}
public String getCorrelationCode() {
return correlationCode;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -320,11 +334,5 @@ public class PurchaseQuoteChild extends BaseEntity
.append("delFlag", getDelFlag()) .append("delFlag", getDelFlag())
.toString(); .toString();
} }
private String purchasePlanCode;
public String setPurchasePlanCode(String purchasePlanCode) {
return this.purchasePlanCode = purchasePlanCode;
}
public String getPurchasePlanCode() {
return purchasePlanCode;
}
} }

2
ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteChildMapper.java

@ -78,4 +78,6 @@ public interface PurchaseQuoteChildMapper
* @return 结果 * @return 结果
*/ */
public int restorePurchaseQuoteChildById(Long purchaseQuoteChildId); public int restorePurchaseQuoteChildById(Long purchaseQuoteChildId);
List<PurchaseQuoteChild> selectQuoteChildByMaterialCode(String materialCode);
} }

1
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java

@ -81,4 +81,5 @@ public interface IPurchaseQuoteChildService
*/ */
int restorePurchaseQuoteChildById(Long purchaseQuoteChildId); int restorePurchaseQuoteChildById(Long purchaseQuoteChildId);
List<PurchaseQuoteChild> selectQuoteChildByMaterialCode(String materialCode);
} }

5
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java

@ -128,4 +128,9 @@ public class PurchaseQuoteChildServiceImpl implements IPurchaseQuoteChildService
{ {
return purchaseQuoteChildMapper.restorePurchaseQuoteChildById(purchaseQuoteChildId); return purchaseQuoteChildMapper.restorePurchaseQuoteChildById(purchaseQuoteChildId);
} }
@Override
public List<PurchaseQuoteChild> selectQuoteChildByMaterialCode(String materialCode) {
return purchaseQuoteChildMapper.selectQuoteChildByMaterialCode(materialCode);
}
} }

7
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml

@ -182,5 +182,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="restorePurchaseQuoteChildById" parameterType="Long"> <update id="restorePurchaseQuoteChildById" parameterType="Long">
update purchase_quote_child set del_flag = '0' where purchase_quote_child_id = #{purchaseQuoteChildId} update purchase_quote_child set del_flag = '0' where purchase_quote_child_id = #{purchaseQuoteChildId}
</update> </update>
<select id="selectQuoteChildByMaterialCode" parameterType="String" resultMap="PurchaseQuoteChildResult">
select * from purchase_quote_child as quoteChild
left JOIN purchase_quote as quote on quote.purchase_quote_code = quoteChild.purchase_quote_code
WHERE
quote.audit_status = '1' and quote.use_status = '1' and
quoteChild.material_code = #{material} and quoteChild.del_flag = '0';
</select>
</mapper> </mapper>
Loading…
Cancel
Save