|
|
@@ -1482,6 +1482,30 @@ func (this *OilSupplierController) GetEntityByName() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// @Title 获取实体
|
|
|
+// @Description 判断统一社会码
|
|
|
+// @Success 200 {object} supplier.OilSupplier
|
|
|
+// @router /getbycomminercialno [get]
|
|
|
+func (this *OilSupplierController) GetEntityComminercialNo() {
|
|
|
+ comminercialno := this.GetString("comminercialno")
|
|
|
+ svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
+ var datainfo ErrorDataInfo
|
|
|
+ var sqlsus string
|
|
|
+ sqlsus = "select Id from OilSupplier where CommercialNo= '" + comminercialno + "'"
|
|
|
+ var tempMap []map[string]string
|
|
|
+ tempMap, _ = svc.DBE.QueryString(sqlsus)
|
|
|
+
|
|
|
+ if tempMap != nil && tempMap[0]["Id"] != "" {
|
|
|
+ datainfo.Code = 1
|
|
|
+ this.Data["json"] = &datainfo
|
|
|
+ this.ServeJSON()
|
|
|
+ } else {
|
|
|
+ datainfo.Code = 0
|
|
|
+ this.Data["json"] = &datainfo
|
|
|
+ this.ServeJSON()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// @Title 添加
|
|
|
// @Description 新增
|
|
|
// @Success 200 {object} controllers.Request
|