|
|
@@ -591,6 +591,7 @@ func (this *OilSupplierController) GetJZPSJoinCertEntityList() {
|
|
|
BusinessScope := this.GetString("BusinessScope")
|
|
|
RecUnitName := this.GetString("RecUnitName")
|
|
|
RecUnitId := this.GetString("RecUnitId")
|
|
|
+ ThirdAudit := this.GetString("ThirdAudit")
|
|
|
|
|
|
if SupplierName != "" {
|
|
|
where = where + " and a.SupplierName like '%" + SupplierName + "%'"
|
|
|
@@ -685,6 +686,10 @@ func (this *OilSupplierController) GetJZPSJoinCertEntityList() {
|
|
|
where = where + " and b.RecUnitId = '" + RecUnitId + "' "
|
|
|
}
|
|
|
|
|
|
+ if ThirdAudit != "" {
|
|
|
+ where = where + " and b.ThirdAudit = '" + ThirdAudit + "' "
|
|
|
+ }
|
|
|
+
|
|
|
status := this.GetString("Status")
|
|
|
if status != "" {
|
|
|
where = where + " and b.Status='" + status + "'"
|
|
|
@@ -1297,6 +1302,15 @@ func (this *OilSupplierController) GetDictList() {
|
|
|
users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), this.User.AccCode) //
|
|
|
dictList["Auditer"] = users
|
|
|
|
|
|
+ // 所有专业处室
|
|
|
+ var allBusDeptList []organize.Base_Organize
|
|
|
+ //where = "Category='Unit' and ParentId in (100000001, 100000128)"
|
|
|
+ //00097005 直属机构 00265300 公司机关 00097004 机关附属机构
|
|
|
+ //where = "Category='Unit' and OuterPhone in (00097005,00265300,00097004)"
|
|
|
+ whereBus := "(Category='Unit' and ParentId in (100000009, 100000004))"
|
|
|
+ orgsvc.GetEntities(&allBusDeptList, whereBus)
|
|
|
+ dictList["AllBusDeptList"] = allBusDeptList
|
|
|
+
|
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = dictList
|
|
|
this.Data["json"] = &datainfo
|
|
|
@@ -2656,7 +2670,7 @@ func (this *OilSupplierController) CheckSupplierFile() {
|
|
|
|
|
|
idString := ""
|
|
|
idString1 := ""
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3, strconv.Itoa(i))
|
|
|
if ids.Id != "" {
|
|
|
@@ -2675,7 +2689,7 @@ func (this *OilSupplierController) CheckSupplierFile() {
|
|
|
if file.Type == 1 { //制造商
|
|
|
idString = ""
|
|
|
//如果是制造商,准入范围按照各项准入范围的类型判断
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1, strconv.Itoa(i))
|
|
|
|
|
|
@@ -2685,7 +2699,7 @@ func (this *OilSupplierController) CheckSupplierFile() {
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids1 suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2, strconv.Itoa(i))
|
|
|
if ids1.Id != "" {
|
|
|
@@ -2799,7 +2813,7 @@ func (this *OilSupplierController) CheckSupplierFileNew() {
|
|
|
certsubService.GetListByCertId(strconv.Itoa(cert.Id), &certSubList)
|
|
|
idString := ""
|
|
|
idString1 := ""
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3, strconv.Itoa(i))
|
|
|
if ids.Id != "" {
|
|
|
@@ -2836,7 +2850,7 @@ func (this *OilSupplierController) CheckSupplierFileNew() {
|
|
|
needList = filesvc.GetGoodsNeedFileListNew(idString, "2")
|
|
|
if file.Type == 1 { //制造商
|
|
|
idString = ""
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1, strconv.Itoa(i))
|
|
|
if ids.Id != "" {
|
|
|
@@ -2845,7 +2859,7 @@ func (this *OilSupplierController) CheckSupplierFileNew() {
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids1 suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2, strconv.Itoa(i))
|
|
|
if ids1.Id != "" {
|
|
|
@@ -2976,7 +2990,7 @@ func (this *OilSupplierController) CheckSupplierFileDelete() {
|
|
|
|
|
|
idString := ""
|
|
|
idString1 := ""
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3, strconv.Itoa(i))
|
|
|
if ids.Id != "" {
|
|
|
@@ -2995,7 +3009,7 @@ func (this *OilSupplierController) CheckSupplierFileDelete() {
|
|
|
//如果是制造商,准入范围按照各项准入范围的类型判断
|
|
|
// 制造
|
|
|
idString = ""
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1, strconv.Itoa(i))
|
|
|
if ids.Id != "" {
|
|
|
@@ -3005,7 +3019,7 @@ func (this *OilSupplierController) CheckSupplierFileDelete() {
|
|
|
}
|
|
|
}
|
|
|
// 非制造
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids1 suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2, strconv.Itoa(i))
|
|
|
if ids1.Id != "" {
|
|
|
@@ -3111,7 +3125,7 @@ func (this *OilSupplierController) CheckSupplierFileDelete() {
|
|
|
var supplierCert suppliercert.OilSupplierCert
|
|
|
supplierCert.BackRemark = needName
|
|
|
cols := []string{"BackRemark"}
|
|
|
- supplierService.UpdateEntityBywheretbl(OilSupplierCertName, &supplierCert, cols, "Id = " + strconv.Itoa(cert.Id))
|
|
|
+ supplierService.UpdateEntityBywheretbl(OilSupplierCertName, &supplierCert, cols, "Id = "+strconv.Itoa(cert.Id))
|
|
|
}
|
|
|
}
|
|
|
errinfo.Code = 1
|
|
|
@@ -3151,7 +3165,7 @@ func (this *OilSupplierController) CheckSupplierFileList() {
|
|
|
var certSubList2 suppliercertsub.OilSupplierCertSub
|
|
|
certSubList2.LackFile = ""
|
|
|
certSubList2.IsQuestion = 0
|
|
|
- svcHeader.UpdateEntityBywheretbl(OilSupplierCertSubName, &certSubList2, []string{"LackFile", "IsQuestion"}, "IsQuestion = 2 and SupplierId = " + strconv.Itoa(supplierEntity.Id) + " and SupplierCertId = " + file.CertId)
|
|
|
+ svcHeader.UpdateEntityBywheretbl(OilSupplierCertSubName, &certSubList2, []string{"LackFile", "IsQuestion"}, "IsQuestion = 2 and SupplierId = "+strconv.Itoa(supplierEntity.Id)+" and SupplierCertId = "+file.CertId)
|
|
|
|
|
|
//对准入范围的判断
|
|
|
var certSubList []suppliercertsub.OilSupplierCertSub
|
|
|
@@ -3159,7 +3173,7 @@ func (this *OilSupplierController) CheckSupplierFileList() {
|
|
|
certsubService.GetListByCertId(strconv.Itoa(cert.Id), &certSubList)
|
|
|
idString := ""
|
|
|
idString1 := ""
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3, strconv.Itoa(i))
|
|
|
if ids.Id != "" {
|
|
|
@@ -3178,7 +3192,7 @@ func (this *OilSupplierController) CheckSupplierFileList() {
|
|
|
//如果是制造商,准入范围按照各项准入范围的类型判断
|
|
|
// 制造
|
|
|
idString = ""
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1, strconv.Itoa(i))
|
|
|
if ids.Id != "" {
|
|
|
@@ -3188,7 +3202,7 @@ func (this *OilSupplierController) CheckSupplierFileList() {
|
|
|
}
|
|
|
}
|
|
|
// 非制造
|
|
|
- for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ for i := 0; i < len(certSubList); i = i + 1000 {
|
|
|
var ids1 suppliercertsub.Ids
|
|
|
certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2, strconv.Itoa(i))
|
|
|
if ids1.Id != "" {
|
|
|
@@ -3268,7 +3282,7 @@ func (this *OilSupplierController) CheckSupplierFileList() {
|
|
|
}
|
|
|
|
|
|
var certSubList1 []suppliercertsub.OilSupplierCertSub
|
|
|
- total := certsubService.GetPagingEntitiesWithOrderBytbl("", file.CurrentPage, file.Size,"Id", true, &certSubList1, "IsQuestion = 2 and SupplierId = " + strconv.Itoa(supplierEntity.Id) + " and SupplierCertId = " + file.CertId)
|
|
|
+ total := certsubService.GetPagingEntitiesWithOrderBytbl("", file.CurrentPage, file.Size, "Id", true, &certSubList1, "IsQuestion = 2 and SupplierId = "+strconv.Itoa(supplierEntity.Id)+" and SupplierCertId = "+file.CertId)
|
|
|
|
|
|
var datainfo DataInfo
|
|
|
datainfo.CurrentItemCount = total
|
|
|
@@ -3286,8 +3300,8 @@ func (this *OilSupplierController) CheckSupplierFileList() {
|
|
|
func (this *OilSupplierController) GetSupplierList() {
|
|
|
|
|
|
//获取分页信息
|
|
|
- CurrentPage, _ := this.GetInt64("pageIndex",1)
|
|
|
- Size, _ := this.GetInt64("pageSize",10)
|
|
|
+ CurrentPage, _ := this.GetInt64("pageIndex", 1)
|
|
|
+ Size, _ := this.GetInt64("pageSize", 10)
|
|
|
where := " b.InFlag = 1 "
|
|
|
orderby := "Id"
|
|
|
asc := false
|
|
|
@@ -3336,11 +3350,11 @@ func (this *OilSupplierController) GetSupplierCertId() {
|
|
|
Id := this.Ctx.Input.Param(":Id")
|
|
|
var certList []suppliercert.OilSupplierCert
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- svc.GetEntitysByWhere(OilSupplierCertName, "SupplierId = " + Id, &certList)
|
|
|
+ svc.GetEntitysByWhere(OilSupplierCertName, "SupplierId = "+Id, &certList)
|
|
|
|
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = certList
|
|
|
this.Data["json"] = &datainfo
|
|
|
this.ServeJSON()
|
|
|
|
|
|
-}
|
|
|
+}
|