|
|
@@ -1208,7 +1208,7 @@ func (this *OilSupplierController) GetMyTaskEntityList() {
|
|
|
var list []supplier.OilSupplierView
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
var total int64 = 0
|
|
|
- if (certIdList != "") {
|
|
|
+ if certIdList != "" {
|
|
|
where += " and b.Id in (" + certIdList + ")"
|
|
|
total = svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
|
|
|
|
|
|
@@ -1398,7 +1398,6 @@ func (this *OilSupplierController) GetDictListByStatus() {
|
|
|
isInvestigate := paramSvc.GetBaseparameterMessage("GFGL1", "paramset", "isInvestigate")
|
|
|
dictList["isInvestigate"] = isInvestigate
|
|
|
|
|
|
-
|
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = dictList
|
|
|
this.Data["json"] = &datainfo
|
|
|
@@ -1608,7 +1607,7 @@ func (this *OilSupplierController) AddEntity() {
|
|
|
modelCert.SupplierTypeName = modelCertVM.SupplierTypeName
|
|
|
modelCert.InStyle = modelCertVM.InStyle
|
|
|
|
|
|
- if modelCert.InStyle == suppliercert.PINGSHEN {
|
|
|
+ if modelCert.InStyle == suppliercert.PINGSHEN {
|
|
|
modelCert.IsPay = 0
|
|
|
} else {
|
|
|
modelCert.IsPay = 2
|
|
|
@@ -1697,7 +1696,7 @@ func (this *OilSupplierController) UpdateEntity() {
|
|
|
var info register.OilCorporateInfo
|
|
|
info.CommercialNo = model.CommercialNo
|
|
|
info.SupplierName = model.SupplierName
|
|
|
- svc.UpdateEntityBywheretbl(OilCorporateInfoName, &info, cols, "CommercialNo = '" + oldModel.CommercialNo + "'")
|
|
|
+ svc.UpdateEntityBywheretbl(OilCorporateInfoName, &info, cols, "CommercialNo = '"+oldModel.CommercialNo+"'")
|
|
|
}
|
|
|
|
|
|
//判断基本信息是否可修改
|
|
|
@@ -1712,10 +1711,10 @@ func (this *OilSupplierController) UpdateEntity() {
|
|
|
//}
|
|
|
|
|
|
if err == nil {
|
|
|
- svc.DBE.Exec("update OilSupplierCert set InStyle='" + instyle + "' where SupplierId=" + id + " and SupplierTypeCode='" + typeCode + "'") // "', IsPay= " + isPay +
|
|
|
+ svc.DBE.Exec("update OilSupplierCert set InStyle='" + instyle + "' where SupplierId=" + id + " and SupplierTypeCode='" + typeCode + "'") // "', IsPay= " + isPay +
|
|
|
//一级变二级删除一级准入范围
|
|
|
if model.Grade == "2" {
|
|
|
- svc.DeleteEntityBytbl(OilSupplierCertSubName, "SupplierTypeCode = '01' and GoodsLevel = '1' and SupplierId = " + id)
|
|
|
+ svc.DeleteEntityBytbl(OilSupplierCertSubName, "SupplierTypeCode = '01' and GoodsLevel = '1' and SupplierId = "+id)
|
|
|
}
|
|
|
//供应商类型改变对资质的检查
|
|
|
errinfo.Message = "修改成功!"
|
|
|
@@ -1842,7 +1841,7 @@ func (this *OilSupplierController) DeleteAllEntity() {
|
|
|
return
|
|
|
}
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- deleteWhere := "SupplierId="+Id+" and SupplierTypeCode='"+SupplierTypeCode+"'"
|
|
|
+ deleteWhere := "SupplierId=" + Id + " and SupplierTypeCode='" + SupplierTypeCode + "'"
|
|
|
err := svc.DeleteEntityBytbl(OilSupplierCertSubName, deleteWhere)
|
|
|
err = svc.DeleteEntityBytbl(OilSupplierFileName, deleteWhere)
|
|
|
|
|
|
@@ -1938,9 +1937,10 @@ func (this *OilSupplierController) IsCanApply() {
|
|
|
// @Description
|
|
|
// @Success 200 {string} Count
|
|
|
// @Failure 403 :id 为空
|
|
|
-// @router /iscanupdatesupplier/:supplierid [get]
|
|
|
+// @router /iscanupdatesupplier/:supplierid/:typecode [get]
|
|
|
func (this *OilSupplierController) CanUpdateSupplier() {
|
|
|
supplierId := this.Ctx.Input.Param(":supplierid")
|
|
|
+ typeCode := this.Ctx.Input.Param(":typecode")
|
|
|
var errinfo ErrorInfo
|
|
|
if supplierId == "" {
|
|
|
errinfo.Message = "操作失败!请求信息不完整"
|
|
|
@@ -1952,7 +1952,7 @@ func (this *OilSupplierController) CanUpdateSupplier() {
|
|
|
|
|
|
Id, _ := strconv.Atoi(supplierId)
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- canUpdate := svc.CanUpdateSupplier(OilSupplierCertName, Id)
|
|
|
+ canUpdate := svc.CanUpdateSupplier(OilSupplierCertName, Id, typeCode) // 区分物资类01 基建类02 服务类03
|
|
|
|
|
|
if canUpdate {
|
|
|
errinfo.Message = "可以修改"
|
|
|
@@ -2331,10 +2331,10 @@ func (this *OilSupplierController) ImportExcel() {
|
|
|
}
|
|
|
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- log.Printf("url:==" + url) // http://60.30.245.229//upfile/dc1/2,063156edd288
|
|
|
- extranetIP := utils.Cfg.MustValue("server", "extranetIP")
|
|
|
+ log.Printf("url:==" + url) // http://60.30.245.229//upfile/dc1/2,063156edd288
|
|
|
+ extranetIP := utils.Cfg.MustValue("server", "extranetIP")
|
|
|
localIP := utils.Cfg.MustValue("server", "localIP")
|
|
|
- if strings.Index(url, extranetIP) >= 0 {
|
|
|
+ if strings.Index(url, extranetIP) >= 0 {
|
|
|
url = strings.Replace(url, extranetIP, localIP, 1)
|
|
|
}
|
|
|
_dir := utils.Cfg.MustValue("file", "tmplateDir") + "xlsx"
|
|
|
@@ -2420,7 +2420,6 @@ func (this *OilSupplierController) GetSceneFileList() {
|
|
|
this.Data["json"] = &errinfo
|
|
|
this.ServeJSON()
|
|
|
|
|
|
-
|
|
|
}
|
|
|
|
|
|
// @Title 获取已使用的银行账号
|
|
|
@@ -2471,4 +2470,4 @@ func (this *OilSupplierController) GetCommercialNoIsExist() {
|
|
|
this.Data["json"] = &errorInfo
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
-}
|
|
|
+}
|