优化气站订单合同气瓶候选选择
This commit is contained in:
@@ -206,6 +206,14 @@ func ListGasorderContractProduct(ctx *gin.Context) {
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
// 订单候选场景先校验合同属于当前气站,再复用可读名称和有效绑定过滤。
|
||||
if contractIdentity := strings.TrimSpace(ctx.Query("contract_identity")); contractIdentity != "" {
|
||||
if _, ok := scopedContract(ctx, contractIdentity, station.ID); !ok {
|
||||
return
|
||||
}
|
||||
platformgasorder.ListGasorderContractProduct(ctx)
|
||||
return
|
||||
}
|
||||
query := common.ActiveRecords(impl.DBService.Model(&models.GasorderContractProduct{})).
|
||||
Joins("JOIN gasorder_contract ON gasorder_contract.id = gasorder_contract_product.gasorder_contract_id").
|
||||
Where("gasorder_contract.gas_basic_id = ?", station.ID)
|
||||
|
||||
Reference in New Issue
Block a user