yuedefeng 6 yıl önce
ebeveyn
işleme
5e361c638e

+ 16 - 16
src/dashoo.cn/backend/api/controllers/oilsupplier/paymentinfo.go

@@ -1,6 +1,10 @@
 package oilsupplier
 
 import (
+	"encoding/json"
+	"strconv"
+	"time"
+
 	"dashoo.cn/backend/api/business/bankapi"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
@@ -8,10 +12,6 @@ import (
 	. "dashoo.cn/backend/api/controllers"
 	"dashoo.cn/business2/permission"
 	"dashoo.cn/utils"
-	"encoding/json"
-	"strconv"
-	"time"
-	"wayne-master/src/backend/util/integer"
 )
 
 type PaymentInfoController struct {
@@ -34,14 +34,14 @@ func (this *PaymentInfoController) GetEntityList() {
 	SupplierName := this.GetString("SupplierName")
 	IsPay := this.GetString("IsPay")
 
-	if (IsPay != "") {
-		where = where + " and p.IsPay = '" + IsPay +"'"
+	if IsPay != "" {
+		where = where + " and p.IsPay = '" + IsPay + "'"
 	}
 
-	if (SupplierTypeCode != "") {
+	if SupplierTypeCode != "" {
 		where = where + " and c.SupplierTypeCode like '%" + SupplierTypeCode + "%'"
 	}
-	if (SupplierName != "") {
+	if SupplierName != "" {
 		where = where + " and s.SupplierName like '%" + SupplierName + "%'"
 	}
 	//svc := suppliercert.GetOilSupplierCertService(utils.DBE)
@@ -55,7 +55,7 @@ func (this *PaymentInfoController) GetEntityList() {
 
 	var paylist []paymentinfo.PaymentinfoList
 	svc := paymentinfo.GetPaymentService(utils.DBE)
-	total := svc.GetPaymentinfoList( page.CurrentPage, page.Size, orderby, asc, &paylist, where)
+	total := svc.GetPaymentinfoList(page.CurrentPage, page.Size, orderby, asc, &paylist, where)
 	//total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo
 	datainfo.Items = paylist
@@ -78,11 +78,11 @@ func (this *PaymentInfoController) GetBillList() {
 
 	var supplierEntity supplier.OilSupplier
 	supplierSvc := supplier.GetOilSupplierService(utils.DBE)
-	supplierWhere := "1=1 and CommercialNo='"+ icbcBillQueryParam.CommercialNo +"'"
+	supplierWhere := "1=1 and CommercialNo='" + icbcBillQueryParam.CommercialNo + "'"
 	supplierSvc.DBE.Where(supplierWhere).Get(&supplierEntity)
 
 	var billList []paymentinfo.OilPaymentInfo
-	billWhere := "1=1 and SupplierId='" + strconv.Itoa(supplierEntity.Id) +"'"
+	billWhere := "1=1 and SupplierId='" + strconv.Itoa(supplierEntity.Id) + "'"
 	svc := paymentinfo.GetPaymentService(utils.DBE)
 	svc.DBE.Where(billWhere).OrderBy("Id DESC").Find(&billList)
 
@@ -90,7 +90,7 @@ func (this *PaymentInfoController) GetBillList() {
 	//page := this.GetPageInfoForm()
 	var datainfo DataInfo
 	datainfo.Items = billList
-	datainfo.CurrentItemCount = integer.Int2Int64(len(billList))
+	datainfo.CurrentItemCount = int64(len(billList))
 	datainfo.PageIndex = 1
 	datainfo.ItemsPerPage = 1000
 	this.Data["json"] = &datainfo
@@ -147,9 +147,9 @@ func (this *PaymentInfoController) UpdateEntity() {
 		"ModifiedUserId",
 		"ModifiedBy",
 	}
-	_,err := svc.UpdateEntityByIdCols(id, &model, cols)
+	_, err := svc.UpdateEntityByIdCols(id, &model, cols)
 
-	if (model.IsPay == "2") {
+	if model.IsPay == "2" {
 		var certentity suppliercert.OilSupplierCert
 		certentity.Status = suppliercert.STOREING_STATUS
 		certentity.Step = 5
@@ -157,7 +157,7 @@ func (this *PaymentInfoController) UpdateEntity() {
 			"Status",
 			"Step",
 		}
-		_,err = svc.UpdateEntityByIdCols(strconv.Itoa(model.SupplierCertId), &certentity, cols)
+		_, err = svc.UpdateEntityByIdCols(strconv.Itoa(model.SupplierCertId), &certentity, cols)
 	}
 
 	if err == nil {
@@ -171,4 +171,4 @@ func (this *PaymentInfoController) UpdateEntity() {
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
 	}
-}
+}