Browse Source

Merge pull request '模糊查询零件,并且分页' (#167) from fix_searchArtId into develop

Reviewed-on: http://101.201.121.115:3000/leo/LAPP_CHEERSSON_BACKEND/pulls/167
pull/168/head
zhangxin 3 years ago
parent
commit
72813020ff
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      dao/ap/implments/CustDemandVerHead.dao.impl.go

+ 10
- 10
dao/ap/implments/CustDemandVerHead.dao.impl.go View File

@ -437,23 +437,23 @@ func (impl *CustDemandVerHeadDAOImplement) SelectData(paging *grmi.Paging, group
joinstr := " INNER JOIN AP_UserCustlst ON AP_CustDemandVerHead.PlantNr = AP_UserCustlst.PlantNr AND AP_CustDemandVerHead.CustomerId = AP_UserCustlst.CustomerId INNER JOIN AP_CustDemandHead ON AP_CustDemandVerHead.PlantNr = AP_CustDemandHead.PlantNr AND AP_CustDemandVerHead.CustomerId = AP_CustDemandHead.CustomerId AND AP_CustDemandVerHead.VersionId = AP_CustDemandHead.VersionId "
if customerId != "" {
where += fmt.Sprintf(" AND AP_CustDemandVerHead.CustomerId = %s", customerId)
where += fmt.Sprintf(" AND AP_CustDemandVerHead.CustomerId = '%s'", customerId)
}
if versionId != "" {
where += fmt.Sprintf(" AND AP_CustDemandVerHead.VersionId = %s", versionId)
where += fmt.Sprintf(" AND AP_CustDemandVerHead.VersionId = '%s'", versionId)
}
if status != "" {
where += fmt.Sprintf(" AND AP_CustDemandVerHead.Status = %s", status)
where += fmt.Sprintf(" AND AP_CustDemandVerHead.Status = '%s'", status)
}
if artId != "" {
joinstr += " INNER JOIN AP_CustDemandVerDetail ON AP_CustDemandVerHead.PlantNr = AP_CustDemandVerDetail.PlantNr And AP_CustDemandVerHead.CustomerId = AP_CustDemandVerDetail.CustomerId And AP_CustDemandVerHead.VersionId = AP_CustDemandVerDetail.VersionId "
where += fmt.Sprintf(" and AP_CustDemandVerDetail.ArtId like concat('%%', %s, '%%')", artId)
where += fmt.Sprintf(" and AP_CustDemandVerDetail.ArtId like concat('%%', '%s', '%%')", artId)
}
if grouptype != "" {
joinstr += " INNER JOIN Customer ON AP_CustDemandVerHead.PlantNr = Customer.PlantNr And AP_CustDemandVerHead.CustomerId = Customer.CustomerId "
where += fmt.Sprintf(" AND Customer.CustomerType = %s", grouptype)
where += fmt.Sprintf(" AND Customer.CustomerType = '%s'", grouptype)
}
orderBy := " order by " + " AP_CustDemandVerHead.VersionId "
where = " where " + where
@ -471,23 +471,23 @@ func (impl *CustDemandVerHeadDAOImplement) SelectData(paging *grmi.Paging, group
joinstr := " INNER JOIN AP_UserCustlst ON AP_CustDemandVerHead.PlantNr = AP_UserCustlst.PlantNr AND AP_CustDemandVerHead.CustomerId = AP_UserCustlst.CustomerId "
if customerId != "" {
where += fmt.Sprintf(" AND AP_CustDemandVerHead.CustomerId = %s", customerId)
where += fmt.Sprintf(" AND AP_CustDemandVerHead.CustomerId = '%s'", customerId)
}
if versionId != "" {
where += fmt.Sprintf(" AND AP_CustDemandVerHead.VersionId = %s", versionId)
where += fmt.Sprintf(" AND AP_CustDemandVerHead.VersionId = '%s'", versionId)
}
if status != "" {
where += fmt.Sprintf(" AND AP_CustDemandVerHead.Status = %s", status)
where += fmt.Sprintf(" AND AP_CustDemandVerHead.Status = '%s'", status)
}
if artId != "" {
joinstr += " INNER JOIN AP_CustDemandVerDetail ON AP_CustDemandVerHead.PlantNr = AP_CustDemandVerDetail.PlantNr And AP_CustDemandVerHead.CustomerId = AP_CustDemandVerDetail.CustomerId And AP_CustDemandVerHead.VersionId = AP_CustDemandVerDetail.VersionId "
where += fmt.Sprintf(" and AP_CustDemandVerDetail.ArtId like concat('%%', %s, '%%')", artId)
where += fmt.Sprintf(" and AP_CustDemandVerDetail.ArtId like concat('%%', '%s', '%%')", artId)
}
if grouptype != "" {
joinstr += " INNER JOIN Customer ON AP_CustDemandVerHead.PlantNr = Customer.PlantNr And AP_CustDemandVerHead.CustomerId = Customer.CustomerId "
where += fmt.Sprintf(" AND Customer.CustomerType = %s", grouptype)
where += fmt.Sprintf(" AND Customer.CustomerType = '%s'", grouptype)
}
orderBy := " order by " + " AP_CustDemandVerHead.VersionId "
where = " where " + where


Loading…
Cancel
Save