|
|
@@ -37,7 +37,7 @@ func (this *OilSupplierCertSubController) GetEntityList() {
|
|
|
//获取分页信息
|
|
|
page := this.GetPageInfoForm()
|
|
|
where := " 1=1 "
|
|
|
- orderby := "CertSubStatus, Code"
|
|
|
+ orderby := "Id, CertSubStatus, Code"
|
|
|
asc := false
|
|
|
Order := this.GetString("Order")
|
|
|
Prop := this.GetString("Prop")
|
|
|
@@ -349,7 +349,7 @@ func (this *OilSupplierCertSubController) DeleteEntity() {
|
|
|
// @Description 批量添加准入范围
|
|
|
// @Success 200 {object} business.device.DeviceChannels
|
|
|
// @router /check-certsub-lost [post]
|
|
|
-func (this *OilSupplierCertSubController) CheckCertSubLost () {
|
|
|
+func (this *OilSupplierCertSubController) CheckCertSubLost() {
|
|
|
var jsonblob = this.Ctx.Input.RequestBody
|
|
|
var datamain suppliercertsub.OilSupplierCertSub
|
|
|
var dataother suppliercertsub.SupplierCertSubModel
|
|
|
@@ -417,8 +417,8 @@ func (this *OilSupplierCertSubController) CheckCertSubLost () {
|
|
|
filesvc.GetEntityByWhere(OilSupplierFileName, where1, &fileist1)
|
|
|
|
|
|
var filelist2 suppliercertappendsub.OilAppendChangeDetail
|
|
|
- where2 := " SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "' and NeedFileType = '" +needHeader.FileName + "'"
|
|
|
- svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService (utils.DBE)
|
|
|
+ where2 := " SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "' and NeedFileType = '" + needHeader.FileName + "'"
|
|
|
+ svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService(utils.DBE)
|
|
|
svc2.GetEntityByWhere(OilAppendChangeDetailName, where2, &filelist2)
|
|
|
|
|
|
if !strings.Contains(companyHasHeaders, needHeader.FileName+",") {
|
|
|
@@ -601,7 +601,6 @@ func (this *OilSupplierCertSubController) AddGoodsByFilter() {
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// @Title 批量添加准入范围--技术服务类
|
|
|
// @Description 批量添加准入范围
|
|
|
// @Success 200 {object} business.device.DeviceChannels
|
|
|
@@ -657,7 +656,7 @@ func (this *OilSupplierCertSubController) CheckTechCertLost() {
|
|
|
|
|
|
var filelist2 suppliercertappendsub.OilAppendChangeDetail
|
|
|
where2 := " SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "' and NeedFileType = '" + needList[i].FileName + "'"
|
|
|
- svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService (utils.DBE)
|
|
|
+ svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService(utils.DBE)
|
|
|
svc2.GetEntityByWhere(OilAppendChangeDetailName, where2, &filelist2)
|
|
|
|
|
|
if !strings.Contains(companyHasHeaders, needList[i].FileName+",") {
|
|
|
@@ -841,7 +840,7 @@ func (this *OilSupplierCertSubController) CheckBasisBusinessLost() {
|
|
|
|
|
|
var filelist2 suppliercertappendsub.OilAppendChangeDetail
|
|
|
where2 := " SupplierId = '" + strconv.Itoa(model.SupplierId) + "' and NeedFileType = '" + needList[i].FileName + "'"
|
|
|
- svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService (utils.DBE)
|
|
|
+ svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService(utils.DBE)
|
|
|
svc2.GetEntityByWhere(OilAppendChangeDetailName, where2, &filelist2)
|
|
|
|
|
|
if !strings.Contains(companyHasHeaders, needList[i].FileName+",") {
|
|
|
@@ -995,7 +994,7 @@ func (this *OilSupplierCertSubController) BusinessDelete() {
|
|
|
}
|
|
|
|
|
|
//根据Id查出OilSupplierCertSub的SubClassId
|
|
|
- svc := suppliercertsub.GetOilSupplierCertSubService(utils.DBE) //获得数据库引擎
|
|
|
+ svc := suppliercertsub.GetOilSupplierCertSubService(utils.DBE) //获得数据库引擎
|
|
|
where := "delete from " + OilSupplierCertSubName + " where Id in (" + Id + ")" // 没有删除的准入范围
|
|
|
svc.DBE.Exec(where)
|
|
|
|
|
|
@@ -1274,9 +1273,9 @@ func setManufacturerHandler(manufacturerChangeDTO suppliercertsub.ManufacturerCh
|
|
|
}*/
|
|
|
|
|
|
type LostCertFiles struct {
|
|
|
- Code string
|
|
|
- Name string
|
|
|
- CertFileName string
|
|
|
+ Code string
|
|
|
+ Name string
|
|
|
+ CertFileName string
|
|
|
}
|
|
|
|
|
|
// @Title 记录准入项状态更改日志
|
|
|
@@ -1328,7 +1327,7 @@ type FileList struct {
|
|
|
// @Description 物资类准入提交审核检查资质
|
|
|
// @Success 200 {object} business.device.DeviceChannels
|
|
|
// @router /checkSubFile [post]
|
|
|
-func (this *OilSupplierCertSubController) CheckSubFile () {
|
|
|
+func (this *OilSupplierCertSubController) CheckSubFile() {
|
|
|
var jsonblob = this.Ctx.Input.RequestBody
|
|
|
var datamain suppliercertsub.OilSupplierCertSub
|
|
|
var dataother []suppliercertsub.OilSupplierCertSub
|
|
|
@@ -1357,7 +1356,7 @@ func (this *OilSupplierCertSubController) CheckSubFile () {
|
|
|
var supplierModel supplier.OilSupplier
|
|
|
svcSupplier := supplier.GetOilSupplierService(utils.DBE)
|
|
|
svcSupplier.GetEntityById(supplierId, &supplierModel)
|
|
|
- where := "SupplierId = " + strconv.Itoa(supplierId) + " and SupplierCertId = "+ strconv.Itoa(datamain.SupplierCertId) + " and SupplierTypeCode = "+ supplierTypeCode
|
|
|
+ where := "SupplierId = " + strconv.Itoa(supplierId) + " and SupplierCertId = " + strconv.Itoa(datamain.SupplierCertId) + " and SupplierTypeCode = " + supplierTypeCode
|
|
|
svcSupplier.GetEntitysByWhere(OilSupplierCertSubName, where, &dataother)
|
|
|
|
|
|
paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
|
|
|
@@ -1365,11 +1364,11 @@ func (this *OilSupplierCertSubController) CheckSubFile () {
|
|
|
var needList []supplierfile.FileList
|
|
|
|
|
|
//逐条检查需要的资质
|
|
|
- for _,sub := range dataother {
|
|
|
+ for _, sub := range dataother {
|
|
|
if supplierTypeCode == "01" {
|
|
|
if supplierModel.OperType == "制造商" {
|
|
|
datamain.IsManufacturer = 1
|
|
|
- } else if supplierModel.OperType == "贸易商" || supplierModel.OperType == "代理商"{
|
|
|
+ } else if supplierModel.OperType == "贸易商" || supplierModel.OperType == "代理商" {
|
|
|
datamain.IsManufacturer = 2
|
|
|
if sub.IsManufacturer == 1 {
|
|
|
var tmpLostCert LostCertFiles
|
|
|
@@ -1420,8 +1419,8 @@ func (this *OilSupplierCertSubController) CheckSubFile () {
|
|
|
filesvc.GetEntityByWhere(OilSupplierFileName, where1, &fileist1)
|
|
|
|
|
|
var filelist2 suppliercertappendsub.OilAppendChangeDetail
|
|
|
- where2 := " SupplierId = '" + strconv.Itoa(supplierId) + "' and NeedFileType = '" +needHeader.FileName + "'"
|
|
|
- svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService (utils.DBE)
|
|
|
+ where2 := " SupplierId = '" + strconv.Itoa(supplierId) + "' and NeedFileType = '" + needHeader.FileName + "'"
|
|
|
+ svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService(utils.DBE)
|
|
|
svc2.GetEntityByWhere(OilAppendChangeDetailName, where2, &filelist2)
|
|
|
|
|
|
if !strings.Contains(companyHasHeaders, needHeader.FileName+",") {
|