|
|
@@ -345,7 +345,7 @@ func (this *OilSupplierCertSubController) DeleteEntity() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// @Title 批量添加准入范围--物资类
|
|
|
+// @Title 批量添加准入范围--物资类-检查需要哪些资质
|
|
|
// @Description 批量添加准入范围
|
|
|
// @Success 200 {object} business.device.DeviceChannels
|
|
|
// @router /check-certsub-lost [post]
|
|
|
@@ -367,7 +367,12 @@ func (this *OilSupplierCertSubController) CheckCertSubLost() {
|
|
|
supplierTypeCode := dataother.SupplierTypeCode
|
|
|
var tableheaderList []supplierfile.OilSupplierFile
|
|
|
|
|
|
- fileSql := "SELECT * from OilSupplierFile WHERE SupplierId='" + strconv.Itoa(supplierId) + "' and SupType in (0, 1, 3, 5)"
|
|
|
+ var whereType = ""
|
|
|
+ if dataother.SubType == 1{
|
|
|
+ whereType = " and SupType in (0, 1, 3, 5)"
|
|
|
+ }
|
|
|
+
|
|
|
+ fileSql := "SELECT * from OilSupplierFile WHERE SupplierId='" + strconv.Itoa(supplierId) + "'" + whereType
|
|
|
fileSql += " AND (SupplierTypeCode='" + supplierTypeCode + "' or SupplierTypeCode='000')"
|
|
|
|
|
|
svcHeader := tableheader.GetTableHeaderService(utils.DBE)
|
|
|
@@ -633,8 +638,13 @@ func (this *OilSupplierCertSubController) CheckTechCertLost() {
|
|
|
// needList = append(needList, needFile)
|
|
|
//}
|
|
|
|
|
|
+ var whereType = ""
|
|
|
+ if dataother.SubType == 1{
|
|
|
+ whereType = " and SupType in (0, 1, 3, 5)"
|
|
|
+ }
|
|
|
+
|
|
|
var fileist []supplierfile.OilSupplierFile
|
|
|
- where := "SupplierTypeCode in ('03','000') and SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "' and SupType in (0, 1, 3, 5)"
|
|
|
+ where := "SupplierTypeCode in ('03','000') and SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "'" + whereType
|
|
|
svcSupplier.GetEntitysByWhere(OilSupplierFileName, where, &fileist)
|
|
|
|
|
|
var companyHasHeaders string
|
|
|
@@ -793,6 +803,8 @@ func (this *OilSupplierCertSubController) CheckBasisBusinessLost() {
|
|
|
var err error
|
|
|
var jsonblob = this.Ctx.Input.RequestBody
|
|
|
json.Unmarshal(jsonblob, &model)
|
|
|
+ var dataother suppliercertsub.TechnologySubModel
|
|
|
+ json.Unmarshal(jsonblob, &dataother)
|
|
|
|
|
|
var supplierCertModel suppliercert.OilSupplierCert
|
|
|
svcCert := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
@@ -816,9 +828,14 @@ func (this *OilSupplierCertSubController) CheckBasisBusinessLost() {
|
|
|
// needList = append(needList, needFile)
|
|
|
//}
|
|
|
|
|
|
+ var whereType = ""
|
|
|
+ if dataother.SubType == 1{
|
|
|
+ whereType = " and SupType in (0, 1, 3, 5)"
|
|
|
+ }
|
|
|
+
|
|
|
if err == nil {
|
|
|
var list []supplierfile.OilSupplierFile
|
|
|
- where := "SupplierTypeCode in (02,000) and SupplierId = '" + strconv.Itoa(model.SupplierId) + "' and SupType in (0, 1, 3, 5)"
|
|
|
+ where := "SupplierTypeCode in (02,000) and SupplierId = '" + strconv.Itoa(model.SupplierId) + "'" + whereType
|
|
|
svcCert.GetEntitysByWhere(OilSupplierFileName, where, &list)
|
|
|
var companyHasHeaders string
|
|
|
for _, tableheader := range list {
|