|
|
@@ -2287,4 +2287,54 @@ func (this *OilSupplierController) GetSceneFileList() {
|
|
|
this.ServeJSON()
|
|
|
|
|
|
|
|
|
+}
|
|
|
+
|
|
|
+// @Title 获取已使用的银行账号
|
|
|
+// @Description
|
|
|
+// @Success 200 {object} controllers.Request
|
|
|
+// @router /getBankAccount [get]
|
|
|
+func (this *OilSupplierController) GetBankAccountIsExist() {
|
|
|
+ bankAccount := this.GetString("bankAccount")
|
|
|
+ supplierId := this.GetString("supId")
|
|
|
+ sqlStr := "SELECT BankAccount FROM OilSupplier where BankAccount='" + bankAccount + "'"
|
|
|
+ if supplierId != "" {
|
|
|
+ sqlStr += " and Id !=" + supplierId
|
|
|
+ }
|
|
|
+ svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
+ list, _ := svc.DBE.QueryString(sqlStr)
|
|
|
+ var errorInfo ErrorDataInfo
|
|
|
+ if list != nil {
|
|
|
+ errorInfo.Item = true
|
|
|
+ this.Data["json"] = &errorInfo
|
|
|
+ this.ServeJSON()
|
|
|
+ } else {
|
|
|
+ errorInfo.Item = false
|
|
|
+ this.Data["json"] = &errorInfo
|
|
|
+ this.ServeJSON()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// @Title 获取已使用的统一社会信用代码
|
|
|
+// @Description
|
|
|
+// @Success 200 {object} controllers.Request
|
|
|
+// @router /getCommercialNo [get]
|
|
|
+func (this *OilSupplierController) GetCommercialNoIsExist() {
|
|
|
+ commercialNo := this.GetString("commercialNo")
|
|
|
+ supplierId := this.GetString("supId")
|
|
|
+ sqlStr := "SELECT CommercialNo FROM OilSupplier where CommercialNo='" + commercialNo + "'"
|
|
|
+ if supplierId != "" {
|
|
|
+ sqlStr += " and Id !=" + supplierId
|
|
|
+ }
|
|
|
+ svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
+ list, _ := svc.DBE.QueryString(sqlStr)
|
|
|
+ var errorInfo ErrorDataInfo
|
|
|
+ if list != nil {
|
|
|
+ errorInfo.Item = true
|
|
|
+ this.Data["json"] = &errorInfo
|
|
|
+ this.ServeJSON()
|
|
|
+ } else {
|
|
|
+ errorInfo.Item = false
|
|
|
+ this.Data["json"] = &errorInfo
|
|
|
+ this.ServeJSON()
|
|
|
+ }
|
|
|
}
|