Forráskód Böngészése

sap,mcs commit add

kptcwq911 2 éve
szülő
commit
92aa080077

+ 0 - 26
apiserver/dao/db.go

@@ -2,33 +2,7 @@ package dao
 
 import "github.com/pkg/errors"
 
-func (d *Dao) First(pi interface{}) error {
-	e := d.DB.Where(pi).First(pi).Error
-	return errors.Wrapf(e, "model First %v", pi)
-}
-func (d *Dao) Insert(pi interface{}) error {
-	e := d.DB.Create(pi).Error
-	return errors.Wrapf(e, "model Insert %v", pi)
-}
-func (d *Dao) Find(c map[string]interface{}, pi interface{}) error {
-	e := d.DB.Where(c).Find(pi).Error
-	return errors.Wrapf(e, "Find %v", c)
-}
-func (d *Dao) Update(c map[string]interface{}, pi interface{}) error {
-	e := d.DB.Where(c).Updates(pi).Error
-	return errors.Wrapf(e, "Update %v \n%v", c, pi)
-}
-func (d *Dao) UpdateAll(c map[string]interface{}, pi interface{}) error {
-	e := d.DB.Where(c).Select("*").Updates(pi).Error
-	return errors.Wrapf(e, "UpdateAll %v \n%v", c, pi)
-}
-
 func (d *Dao) Raw(sql string, args map[string]interface{}, r interface{}) error {
 	e := d.DB.Raw(sql, args).Scan(r).Error
 	return errors.Wrapf(e, "model Raw %s, %v", sql, args)
 }
-
-func (d *Dao) InsertOrUpdate(pi interface{}) {
-	// d.DB.FirstOrCreate(pi)
-	// d.DB.Clauses(clause.OnConflict{Columns: []clause.Column{{Name: "id"}}, DoUpdates: clause.AssignmentColumns([]string{"code"})}).Create(&nm)
-}

+ 13 - 13
apiserver/model/buydetail.go

@@ -9,15 +9,15 @@ type BigBuyDetail struct {
 	ID           int       `gorm:"column:id"`
 	DoneDate     time.Time `gorm:"column:DoneDate"`
 	ArrivalStatu int       `gorm:"column:arrivalStatu"`
-	BuyeCode     string    `gorm:"column:buyeCode"`
+	BuyeCode     string    `gorm:"column:buyeCode"` //申购单号
 	BuyerDate    time.Time `gorm:"column:buyerDate"`
 	BuyerPerson  int       `gorm:"column:buyerPerson"`
-	Enable       int       `gorm:"column:enable"`
-	MatchCode    string    `gorm:"column:matchCode"`
-	Note         string    `gorm:"column:note"`
+	Enable       int       `gorm:"column:enable"`    //是否删除
+	MatchCode    string    `gorm:"column:matchCode"` //配单
+	Note         string    `gorm:"column:note"`      //关闭原因
 	PastureID    int       `gorm:"column:pastureId"`
 	ProviderID   int       `gorm:"column:providerId"`
-	Statu        int       `gorm:"column:statu"`
+	Statu        int       `gorm:"column:statu"`   // 到货状态
 	ZeroCou      int       `gorm:"column:zeroCou"` //配单数量
 	SapNumber    string    `gorm:"column:sapNumber"`
 	SapStatus    int       `gorm:"column:sapStatus"`
@@ -30,23 +30,23 @@ type BuyDetail struct {
 	// 采购订单明细
 	ID int `json:"id" gorm:"column:id"`
 	// Model
-	Amount         int       `json:"amount" gorm:"column:amount"`
+	Amount         int       `json:"amount" gorm:"column:amount"` //采购数量
 	BigID          int       `json:"bigId" gorm:"column:bigId"`
 	BrandID        int       `json:"brandId" gorm:"column:brandId"`
 	ContractID     int       `json:"contractId" gorm:"column:contractId"`
 	PastureID      int       `json:"pastureId" gorm:"column:pastureId"`
 	ContractCode   string    `json:"contractCode" gorm:"column:contractCode"`
 	DepartmentName string    `json:"departmentName" gorm:"column:departmentName"`
-	IsStorage      int       `json:"isStorage" gorm:"column:isStorage"`
-	ReceiveDate    time.Time `json:"receiveDate" gorm:"column:receiveDate"`
+	IsStorage      int       `json:"isStorage" gorm:"column:isStorage"`     //'判断是否完全是否入库(0:否  1: 是)'
+	ReceiveDate    time.Time `json:"receiveDate" gorm:"column:receiveDate"` // '入库时间',
 	PartCode       string    `json:"partCode" gorm:"column:partCode"`
 	Price          float64   `json:"price" gorm:"column:price"`
-	ReceiveAmount  string    `json:"receiveAmount" gorm:"column:receiveAmount"`
-	Statue         int       `json:"statue" gorm:"column:statue"`
+	ReceiveAmount  string    `json:"receiveAmount" gorm:"column:receiveAmount"` // '入库数量',
+	Statue         int       `json:"statue" gorm:"column:statue"`               // '采购状态状态(0,未到货,1部分到货,3全部到货)',
 	Remark         string    `json:"remark" gorm:"column:remark"`
 	Note           string    `json:"note" gorm:"column:note"`
 	StoredQuantity string    `json:"storedQuantity" gorm:"column:storedQuantity"`
-	SumAmount      int       `json:"sumAmount" gorm:"column:sumAmount"`
+	SumAmount      int       `json:"sumAmount" gorm:"column:sumAmount"` //申购数量',
 	Enable         int       `json:"enable" gorm:"column:enable"`
 	Dflag          int       `json:"dflag" gorm:"column:dflag"`
 	Unit           string
@@ -54,6 +54,6 @@ type BuyDetail struct {
 	RowNumber      int `json:"rowNumber" gorm:"column:rowNumber"`
 }
 type BigBuyDetailReq struct {
-	Code string `json:"matchCode" gorm:"column:matchcode"`
-	ID   string `json:"id" gorm:"column:id"`
+	Code string `json:"matchCode" gorm:"column:matchcode"` //配单号
+	ID   string `json:"id" gorm:"column:id"`   //申购单id
 }

+ 1 - 0
apiserver/model/department.go

@@ -1,6 +1,7 @@
 package model
 
 type Department struct {
+	// 组织机构
 	KCcode         string `gorm:"column:KCcode"`
 	XRCode         string `gorm:"column:XRCode"`
 	Address        string `gorm:"column:address"`

+ 0 - 70
apiserver/model/http/asset.go

@@ -1,11 +1,5 @@
 package http
 
-import (
-	"kpt.xdmy/apiserver/model"
-	"kpt.xdmy/pkg/log"
-	"kpt.xdmy/pkg/util"
-)
-
 type AssetResp struct {
 	Dest Dest          `json:"DEST"`
 	Data AssetRespData `json:"DATA"`
@@ -64,67 +58,3 @@ type AssetReqData struct {
 type TANLN1 struct {
 	Code string `json:"ANLN1"` //主资产号,	财务资产码
 }
-
-func (p *AssetReq) NewReq() {
-	p.Dest = Dest{
-		DestID: "EQMAN",
-		BussTp: "FI004",
-		Url:    "https://app.modernfarming.cn:7443/sap/EAM/FI004/QueryAsset",
-	}
-	// s := model.SapLogTime(p.Dest.BussTp)
-	dt := AssetReqData{
-		// BudatB: s.Format("20060102"),
-		// BudatE: time.Now().Format("20060102"),
-		BudatB: "20220823",
-		BudatE: "20220823",
-	}
-	// dt.CompanyCode = []Company{
-	// 	{Code: "9099"},
-	// }
-	p.Data = dt
-}
-func (p *Asset) ToEquipment(m *model.Equipment) (e error) {
-	t, ei := util.ParseDateAndTime(p.Udate, p.Utime)
-	log.Errorf(e, "http asset ToEquipment ParseDateAndTime error %s %s", p.Udate, p.Utime)
-	if ei != nil {
-		return ei
-	}
-	m.PastureId = 18
-	m.SHStatus = 1
-	m.Status = 17
-
-	m.EqName = p.Name
-	m.AssetCode = p.AssetCode
-	m.EqClassName = p.Type
-	m.Specification = p.Model
-	m.EntranceDate = p.BuyDate
-	m.Yuanzhi = p.BuyValue
-	m.ModifyTime = t
-	m.Enable = util.Zero(p.Dflag == "")
-
-	m.CompanyCode = p.CompanyCode
-	m.Quantity = p.Quantity
-	m.CostCenter = p.CostCenter
-	m.Unit = p.Unit
-	m.ProfitCenter = p.ProfitCenter
-
-	m.EqCode = p.AssetCode
-
-	// 	`equipment`
-	// 	INNER JOIN pasture p
-	// 	  ON p.`id` = equipment.`pastureId`
-	// 	left JOIN department d
-	// 	  ON d.`id` = equipment.departmentId
-	// 	  #LEFT JOIN dictlist
-	// 	  #ON equipment.`status` = dictlist.id
-	//   WHERE (equipment.pastureId=? or  ?=18)
-	//    and (equipment.eqName LIKE CONCAT('%',?,'%') OR ?='' )
-	//    AND (equipment.eqCode LIKE CONCAT('%',?,'%') OR ?='')
-	//    AND (equipment.assetCode LIKE CONCAT('%',?,'%') OR ?='')
-	//    AND equipment.`enable` = '1' and (equipment.SHStatus = 3 or equipment.SHStatus=1)
-	//    and equipment.`status`=17
-	return
-	// m.PastureName = p.ProfitCenter
-	// m.DepartmentId = p.CostCenter
-	// m.DepartmentName = p.CostCenter
-}

+ 2 - 1
apiserver/model/http/material.go

@@ -16,11 +16,12 @@ type MATNR struct {
 type MTART struct {
 	MTART string `json:"MTART"`
 }
+// 接口请求对象
 type MaterialReq struct {
 	Dest `json:"DEST"`
 	Data MaterialReqData `json:"DATA"`
 }
-
+// 接口返回对象
 type MaterialResp struct {
 	Dest `json:"DEST"`
 	Data Material `json:"DATA"`

+ 0 - 172
apiserver/model/http/proof.go

@@ -1,14 +1,5 @@
 package http
 
-import (
-	"time"
-
-	"github.com/pkg/errors"
-	"kpt.xdmy/apiserver/dao"
-	"kpt.xdmy/pkg/log"
-	"kpt.xdmy/pkg/util"
-)
-
 type ProofReq struct {
 	Dest `json:"DEST"`
 	Data ProofReqData `json:"DATA"`
@@ -36,21 +27,6 @@ type ProofDetail struct {
 	AssetSon    string `json:"ANLN2"` //资产子项
 	Provider    string `json:"LIFNR"` //供应商编码,仅寄售入库业务时,输入
 }
-
-// "ZEILE": "1",
-// "MATNR": "14.01.01.01.000071",
-// "WERKS": "",
-// "LGORT": "1001",
-// "MENGE": "11.000000",
-// "MEINS": "M2",
-// "EBELN": "4900000026",
-// "EBPLP": "1",
-// "BWART": "101",
-// "SOBKZ": "",
-// "KOSTL": "",
-// "ANLN1": "",
-// "ANLN2": "",
-// "LIFNR": ""
 type ProofResp struct {
 	Dest Dest          `json:"DEST"`
 	Data ProofRespData `json:"DATA"`
@@ -100,151 +76,3 @@ type ProofPartReq struct {
 	PartCode  string
 	SapNumber string `json:"sapNumber"`
 }
-
-func (p *ProofReq) NewReq(pr *ProofPartReq, orderType int) (e error) {
-
-	p.Dest = Dest{
-		DestID: "EQMAN",
-		BussTp: "MM001",
-		Url:    "https://app.modernfarming.cn:7443/sap/Common/MM001/ModifyMblnr",
-	}
-
-	switch orderType {
-	case 1:
-		t, _ := util.ParseDate(pr.StorageTime)
-		ds := []ProofDetail{}
-
-		data := ProofReqData{
-			PostDate: t.Format("20060102"),
-			EqNumber: pr.LaidCode,
-		}
-		dao.D.DB.Raw(`select bp.partcode,bd.SapNumber from partlaid p 
-		join bigpartlaid bp on p.bigid=bp.id  
-		left join bigBuydetail bd on bp.purchaseId=bd.buyecode
-		 where bp.laidcode=?`, pr.LaidCode).Scan(&pr)
-		// Factory:     ,
-		// Location:    v.LocationID,
-		// Quantity: v.ReceivedAmount,
-		// Unit:     v.Unit,
-		detail := ProofDetail{
-			// RowNumber: 1,
-			// Code:      "14.01.07.01.000243",
-			Code:        pr.PartCode,
-			Factory:     "M001",
-			Location:    "1004",
-			Quantity:    "3",
-			Unit:        "EA",
-			OrderNumber: pr.SapNumber,
-
-			OrderRowNum: "10",
-			MoveType:    "101",
-		}
-		ds = append(ds, detail)
-		data.Detail = ds
-		p.Data = data
-	case 2:
-		if pr.UseForm == "" {
-			e = errors.New("退货单号为空")
-			return
-		}
-		t, e := time.Parse("2006-01-02", pr.CreateTime)
-		if e != nil {
-			log.Errorf(e, "退货时间解析错误")
-		}
-		p.Data = ProofReqData{
-			PostDate: t.Format("20060102"),
-			EqNumber: pr.UseForm,
-		}
-		dao.D.DB.Raw(`select pf.partcode from PartRefund pf 
-		join bigPartRefund bpf on pf.bigid=bpf.id
-		where bpf.useform=?`, pr.UseForm).Scan(&pr.PartCode)
-		ds := []ProofDetail{}
-		detail := ProofDetail{
-			RowNumber:   "1",
-			Code:        pr.PartCode,
-			Factory:     "M001",
-			Location:    "1004",
-			Quantity:    "1",
-			Unit:        "EA",
-			MoveType:    "161",
-			OrderNumber: "4900000005",
-			OrderRowNum: "10",
-		}
-		ds = append(ds, detail)
-		p.Data.Detail = ds
-	case 3:
-		t, e := util.ParseDate(pr.ReceiveTime)
-		if e != nil {
-			return errors.Errorf("出库凭证 时间解析错误 time=%s", pr.ReceiveTime)
-		}
-		data := ProofReqData{
-			PostDate: t.Format("20060102"),
-			EqNumber: pr.UseForm,
-		}
-		dao.D.DB.Raw(`select partcode from partuse p 
-		join bigpartuse bp on p.bigid=bp.id where bp.useForm=?`, pr.UseForm).Scan(&pr.PartCode)
-		ds := []ProofDetail{}
-		detail := ProofDetail{
-			// RowNumber: 1,
-			// Code:      "14.01.07.01.000243",
-			Code:     pr.PartCode,
-			Factory:  "M001",
-			Location: "1004",
-			Quantity: "1",
-			Unit:     "EA",
-			MoveType: "201",
-			// CostCenter: "1004",
-			AssetCode: "40501000000",
-
-			CostCenter: "9099010506",
-		}
-		ds = append(ds, detail)
-		data.Detail = ds
-		p.Data = data
-
-	// Location:    v.LocationID,
-	// OrderNumber: v.BigBuyerID,
-	// Code: v.PartCode,
-	// Quantity: v.ReceivedAmount,
-	// Unit:     v.Unit,
-	// RowNumber:   1,
-
-	// Code:        "14.01.01.01.000001",
-	// Factory:     "M001",
-	// Location:    "1004",
-	// Quantity:    "10",
-	// Unit:        "EA",
-	// OrderNumber: "4900000003",
-	// OrderRowNum: "10",
-	// MoveType:    "101",
-	case 4: //退库
-		t, e := util.ParseDate(pr.QuitDate)
-		if e != nil {
-			return errors.Errorf("退库凭证 时间解析错误 QuitDate=%s,useform=%s", pr.QuitDate, pr.UseForm)
-		}
-		data := ProofReqData{
-			PostDate: t.Format("20060102"),
-			EqNumber: pr.UseForm,
-		}
-		if e := dao.D.DB.Raw(`select partcode from partuse p 
-	join bigpartuse bp on p.bigid=bp.id where bp.useForm=?`, pr.UseForm).Scan(&pr.PartCode).Error; e != nil {
-			return errors.Errorf("退库凭证 备件编号查询错误 useform=%s", pr.UseForm)
-		}
-		ds := []ProofDetail{}
-		detail := ProofDetail{
-			// RowNumber:  1,
-			Code:       pr.PartCode,
-			Factory:    "M001",
-			Location:   "1004",
-			Quantity:   "1",
-			Unit:       "EA",
-			MoveType:   "202",
-			AssetCode:  "40501000000",
-			CostCenter: "9099010506",
-		}
-		ds = append(ds, detail)
-		data.Detail = ds
-		p.Data = data
-	}
-	return
-}

+ 0 - 42
apiserver/model/http/supplier.go

@@ -49,45 +49,3 @@ type Supplier struct {
 	KOINH      string `json:"KOINH"`        //账户持有人
 	ZRESP      string `json:"ZRESP"`        //法人
 }
-
-// func (p *SupplierReq) NewReq() {
-// 	// dest
-// 	p.Dest = Dest{
-// 		DestID: "EQMAN",
-// 		BussTp: "MM004",
-// 		Url:    "https://app.modernfarming.cn:7443/sap/Common/MM004/QuerySupplier/",
-// 	}
-// 	// time
-// 	// s := model.SapLogTime(p.Dest.BussTp)
-// 	// data
-// 	// s := []ZSORT{{ZSORT: "设备"}}
-// 	// s := make([]ZSORT, 0)
-// 	// s = append(s, ZSORT{ZSORT: "设备"})
-// 	d := SupplierReqData{
-// 		// BudatB:      s.Format("20060102"),
-// 		// BudatE:      time.Now().Local().Format("20060102"),
-// 		BudatB:      "20220815",
-// 		BudatE:      "20220816",
-// 		CompanyCode: "1004",
-// 		Type:        []ZSORT{{"设备"}},
-// 	}
-// 	p.Data = d
-// }
-
-// func (s *Supplier) ToProvider(p *model.Provider) error {
-// 	t, e := util.ParseDateAndTime(s.UpDate, s.UpTime)
-// 	if e != nil {
-// 		return errors.Wrapf(e, "http Transfer")
-// 	}
-// 	p.ProviderIntro = s.Name
-// 	p.ProviderName = s.ShortName
-// 	p.ProviderNumber = s.Code
-// 	p.CompanyCode = s.CompanyCode
-// 	p.SortName = s.ZSORT
-// 	p.Linkman = s.Contact
-// 	p.Email = s.Mail
-// 	p.Telphone = s.Phone
-// 	p.ModifyTime = t
-// 	p.Enable = util.Zero(s.Dflag == "")
-// 	return nil
-// }

+ 1 - 0
apiserver/model/pasture.go

@@ -1,6 +1,7 @@
 package model
 
 type Pasture struct {
+	// 牧场
 	ID         int    `gorm:"column:id" gorm:"column:id" `
 	Address    string `gorm:"column:address"`
 	Center     string `gorm:"column:center"`

+ 6 - 3
apiserver/model/transfer.go

@@ -9,11 +9,13 @@ type TransferParam struct {
 	UseCode  string `gorm:"column:useCode"`
 }
 
+//调拨单
 type BigPartTransfer struct {
+	//调拨单
 	ID          int `gorm:"column:id"`
 	EmpID       int `gorm:"column:empId"`
-	InPastureID int `gorm:"column:inPastureId"`
-	PastureID   int `gorm:"column:pastureId"`
+	InPastureID int `gorm:"column:inPastureId"` //调入牧场
+	PastureID   int `gorm:"column:pastureId"`   //调出牧场
 
 	ApplyCode string `gorm:"column:applyCode"` // 调拨单号
 	LaidCode  string `gorm:"column:laidCode"`  //入库单号
@@ -22,12 +24,13 @@ type BigPartTransfer struct {
 
 	ApplyDate time.Time `gorm:"column:applyDate"`
 	CreatDate time.Time `gorm:"column:creatDate"`
-	Statue    int       `gorm:"column:statue"`
+	Statue    int       `gorm:"column:statue"` //'调拨状态(0调拨中,1调拨完成,2驳回中,3已退回)',
 	DeptId    int       `gorm:"column:deptId"`
 	SapStatus int       `gorm:"column:sapStatus"`
 	SapText   string    `gorm:"column:sapText"`
 }
 type PartTransfer struct {
+	// 调拨明细
 	ID            int    `gorm:"column:id"`
 	BigID         int    `gorm:"column:bigId"`
 	BrandID       int    `gorm:"column:brandId"`

+ 0 - 8
apiserver/routers/api/api.go

@@ -19,10 +19,6 @@ func NextService(p []map[string]interface{}) {
 		pf := v["parammaps"].(map[string]interface{})
 		sqlname := v["name"].(string)
 		switch sqlname {
-		case "updatebigbuydetailenable", "createBuydetailBySG":
-			log.Info(v)
-			//采购:线下(申购配单)、线上(申购)
-			svc.PurchaseOrder(pf)
 		case "insertBigPartlaid":
 			log.Info(v)
 			laidType := pf["laidType"].(float64)
@@ -47,10 +43,6 @@ func NextService(p []map[string]interface{}) {
 			log.Info(v)
 			// 退库
 			svc.QuitProof(pf)
-		case "updateBigPartTransfer":
-			// 调拨
-			log.Info(v)
-			// svc.ApiTransfer(pf)
 		}
 	}
 

+ 1 - 0
apiserver/routers/api/db.go

@@ -2147,6 +2147,7 @@ func ExecDataParam(fasion map[string]interface{}, CommonParamMap map[string]inte
 
 		}
 	}
+	fmt.Println("=========")
 	if sql == "" {
 		sqltype = ""
 	}

+ 1 - 1
apiserver/routers/router.go

@@ -63,7 +63,7 @@ func InitRouter() *gin.Engine {
 
 	{
 
-		apiV1.POST("sap/transfer/send", ManaulSapOrder)
+		apiV1.POST("sap/order/send", ManaulSapOrder)
 		apiV1.POST("sap/transfer/send", ManualTransfer)
 		apiV1.POST("part/eas/batch", EasBatch)
 		apiV1.POST("/sap/proof/off/list", ProofOffList)

+ 5 - 1
apiserver/service/asset.go

@@ -15,6 +15,9 @@ import (
 
 var assetChan chan error
 
+// sap 设备资产数据拉取
+// 定时拉取,参数 为空;手动拉取可以传入参数
+// 参数:时间,设备编码
 func (s *Service) SapAsset(t time.Time, code string) {
 	assetChan = make(chan error, 10)
 	r := new(http.AssetReq)
@@ -72,6 +75,8 @@ func (s *Service) SapAsset(t time.Time, code string) {
 	s.AddSapLog(r, e)
 	return
 }
+
+// 更新设备资产数据
 func updateEQ(p *http.Asset) {
 	eq := new(model.Equipment)
 	pa := new(model.Pasture)
@@ -119,7 +124,6 @@ func updateEQ(p *http.Asset) {
 	if p.Dflag == "" && p.TransferFlag != "X" {
 		eq.Enable = 1
 	}
-	// pp.Print(eq)
 
 	if e := s.d.DB.Where(model.Equipment{EqCode: eq.EqCode}).Assign(eq).FirstOrCreate(&eq).Error; e != nil {
 		assetChan <- errors.Wrapf(e, "equipment update : %s, %s,%s,%s", p.AssetCode, p.SonCode, p.Name, p.CompanyCode)

+ 8 - 3
apiserver/service/charge_off.go

@@ -11,6 +11,7 @@ import (
 	"kpt.xdmy/pkg/util"
 )
 
+// 凭证冲销
 func (s *Service) ProofOff(p *model.ProofReq) (hrp *http.Response) {
 	r := new(http.ChargeOffReq)
 	rp := new(http.SapResp)
@@ -58,6 +59,7 @@ func (s *Service) ProofOff(p *model.ProofReq) (hrp *http.Response) {
 	return
 }
 
+//凭证冲销后状态更新
 func UpdateProof(p *model.ProofReq) (e error) {
 	var tname string
 	switch p.NumberType {
@@ -77,7 +79,7 @@ func UpdateProof(p *model.ProofReq) (e error) {
 	return e
 }
 
-// 查询 单据 对应备件
+// 查询 单据 对应备件明细
 func ProofList(p *model.ProofReq) (hrp *http.Response) {
 	switch p.NumberType {
 	case 1: // 入库
@@ -91,6 +93,8 @@ func ProofList(p *model.ProofReq) (hrp *http.Response) {
 	}
 	return
 }
+
+// 入库冲销
 func (s *Service) laidProofList(p *model.ProofReq) (hrp *http.Response) {
 	bp := new(model.BigPartLaid)
 	proofs := make([]model.ProofPart, 0)
@@ -151,6 +155,7 @@ func (s *Service) laidProofList(p *model.ProofReq) (hrp *http.Response) {
 	return
 }
 
+// 退货冲销
 func (s *Service) returnProofList(p *model.ProofReq) (hrp *http.Response) {
 	hrp = new(http.Response)
 	bp := new(model.BigPartRefund)
@@ -202,7 +207,7 @@ func (s *Service) returnProofList(p *model.ProofReq) (hrp *http.Response) {
 	return
 }
 
-// 查询 单据 对应备件
+// 出库冲销
 func (s *Service) useProofList(p *model.ProofReq) (hrp *http.Response) {
 	hrp = new(http.Response)
 	bp := new(model.BigPartUse)
@@ -272,7 +277,7 @@ func (s *Service) useProofList(p *model.ProofReq) (hrp *http.Response) {
 	return
 }
 
-// 查询 单据 对应备件
+// 退库冲销
 func (s *Service) quitProofList(p *model.ProofReq) (hrp *http.Response) {
 	hrp = new(http.Response)
 	bp := new(model.BigPartquit)

+ 1 - 5
apiserver/service/job.go

@@ -1,12 +1,11 @@
 package service
 
 import (
-	"fmt"
 	"time"
 )
 
 func SapJobInit() {
-	fmt.Println("================================================================")
+
 	// test()
 	// c := cron.New()
 	// 02:00
@@ -26,9 +25,6 @@ func SapJobInit() {
 
 }
 
-func test() {
-	fmt.Println("================================================================")
-}
 func jobMaterial() {
 	t := time.Now()
 	var code string

+ 3 - 0
apiserver/service/material.go

@@ -14,6 +14,8 @@ import (
 
 var partChan chan error
 
+// 定时从sap拉取物料(备件等)数据
+// 预留参数时间、备件编码,给手动调用接口
 func (s *Service) SapMaterial(t time.Time, code string) {
 	partChan = make(chan error, 10)
 	r := new(http.MaterialReq)
@@ -73,6 +75,7 @@ func (s *Service) SapMaterial(t time.Time, code string) {
 	return
 }
 
+// 物料数据更新
 func (s *Service) UpdatePart(p *http.MaterialDetail) {
 	part := new(model.Parts)
 

+ 7 - 5
apiserver/service/mcs.go

@@ -13,7 +13,7 @@ import (
 
 var McsChan = make(chan string, 0)
 
-// start  or stop mcs eq
+// 开启或者结束设备录像
 func (s *Service) McsPostHttp(mpd *model.McsPostDataReq) (res *http.Response, err error) {
 	url := "http://8.130.17.8:7711/api/postData"
 	req, e := s.http.NewRequest("POST", url, mpd)
@@ -64,8 +64,7 @@ func (s *Service) McsPostHttp(mpd *model.McsPostDataReq) (res *http.Response, er
 	return
 }
 
-// param has value empid, deviceid   use  to query mcs server
-// use param upkeepid   to  query  video  from s.d.DB
+// 查询保养单对应录像文件路径
 func (s *Service) McsGetFiles(mv *model.McsVideo) (err error) {
 	url := "https://www.51cow.cn:7715/api/GetRecordFileList"
 	st := time.Now().Local().AddDate(0, 0, -1).Format("2006-01-02")
@@ -137,7 +136,7 @@ func (s *Service) McsGetFiles(mv *model.McsVideo) (err error) {
 	return nil
 }
 
-// get the last record file from mcs server
+// 获取最新的录像记录
 func LastMCsFile(mfr *model.McsFilesResponse) (pmf *model.McsFile) {
 	if len(mfr.Data) == 0 {
 		return
@@ -151,7 +150,7 @@ func LastMCsFile(mfr *model.McsFilesResponse) (pmf *model.McsFile) {
 	return &mf
 }
 
-// param has value empid, upkeepid, deviceid,createdAt
+// 更新录像文件
 func (s *Service) UpdateOrAddVideo(m *model.McsVideo) (err error) {
 	//new  condition
 	cton := map[string]interface{}{
@@ -171,6 +170,8 @@ func (s *Service) UpdateOrAddVideo(m *model.McsVideo) (err error) {
 	}
 	return
 }
+
+// 查询录像文件
 func (s *Service) QueryVideo(m *model.McsVideo) (res []model.McsVideo, err error) {
 	if err = s.d.DB.Table("video").Where(m).Find(&res).Error; err != nil {
 		err = log.Error("QueryVideo query ", err, m)
@@ -178,6 +179,7 @@ func (s *Service) QueryVideo(m *model.McsVideo) (res []model.McsVideo, err error
 	return
 }
 
+// 设备账号列表
 func (s *Service) mcsAccounts(c *gin.Context) {
 	ma := []model.McsAccount{
 		{

+ 6 - 3
apiserver/service/order.go

@@ -16,7 +16,7 @@ import (
 	"kpt.xdmy/pkg/util"
 )
 
-// sap采购订单接口
+// 推送采购订单到sap(业务触发),已关闭 
 func (s *Service) PurchaseOrder(p interface{}) {
 	r := new(model.BigBuyDetailReq)
 	if e := util.Unmarshal(p, r); e != nil {
@@ -56,7 +56,9 @@ func (s *Service) PurchaseOrder(p interface{}) {
 		SrmOrder(&v)
 	}
 }
-
+// 定时(每分钟 一次)读取未同步的采购订单,同步到sap
+// 同步失败的采购订单,变更状态,改为手动同步
+// 状态(sapStatus):0,未同步;1,成功;2,失败
 func AutoSapOrderJob() {
 	orders := []model.BigBuyDetail{}
 	if e := s.d.DB.Where("sapStatus=0 and buyerDate >'2022-10-01'").Find(&orders, model.BigBuyDetail{}).Error; e != nil {
@@ -77,6 +79,7 @@ func AutoSapOrderJob() {
 		}
 	}
 }
+// 手动同步采购订单到sap
 func ManaulSapOrderJob(buyeCode string) (err error) {
 	order := new(model.BigBuyDetail)
 	if e := s.d.DB.First(order, model.BigBuyDetail{SapStatus: 2, BuyeCode: buyeCode}).Error; e != nil {
@@ -97,7 +100,7 @@ func ManaulSapOrderJob(buyeCode string) (err error) {
 	}
 	return
 }
-
+// 发送采购订单到sap
 func SapOrder(p *model.BigBuyDetail) (error, string) {
 	r := new(http.SapOrderReq)
 	rp := new(http.OrderResp)

+ 4 - 1
apiserver/service/proof.go

@@ -14,6 +14,7 @@ import (
 	"kpt.xdmy/pkg/util"
 )
 
+// sap入库凭证接口,业务触发
 func (s *Service) LaidProof(p interface{}) {
 	pr := new(http.ProofPartReq)
 	r := new(http.ProofReq)
@@ -110,6 +111,7 @@ func (s *Service) LaidProof(p interface{}) {
 
 }
 
+// 出库单推送sap,包括了报废出库
 func (s *Service) UseProof(p interface{}) {
 	pr := new(http.ProofPartReq)
 	r := new(http.ProofReq)
@@ -244,7 +246,7 @@ func (s *Service) UseProof(p interface{}) {
 
 }
 
-// 退库
+// 退库单推送sap
 func (s *Service) QuitProof(p interface{}) {
 	pr := new(http.ProofPartReq)
 	r := new(http.ProofReq)
@@ -329,6 +331,7 @@ func (s *Service) QuitProof(p interface{}) {
 
 }
 
+// 退货单推送sap
 func (s *Service) RefundProof(p interface{}) {
 	pr := new(model.RefundParam)
 	r := new(http.ProofReq)

+ 1 - 1
apiserver/service/service.go

@@ -25,7 +25,7 @@ func New(conf *config.Config) *Service {
 	c := http.NewClient(conf)
 	d := dao.New(conf)
 	model.ModelInit(d)
-	SapJobInit()
+	// SapJobInit()
 
 	s = &Service{
 		d:    d,

+ 3 - 2
apiserver/service/supplier.go

@@ -13,7 +13,8 @@ import (
 )
 
 var supplierChan chan error
-
+// 定时 从sap拉取供应商数据
+// 预留参数;时间、编码,提供给手动调用接口
 func (s *Service) SapSupplier(t time.Time, code string) {
 	supplierChan = make(chan error, 10)
 	r := new(http.SupplierReq)
@@ -68,7 +69,7 @@ func (s *Service) SapSupplier(t time.Time, code string) {
 	s.AddSapLog(r, e)
 	return
 }
-
+// 更新供应商
 func (s *Service) updateProvider(sup *http.Supplier) {
 	pv := new(model.Provider)
 

+ 5 - 5
apiserver/service/transfer.go

@@ -11,6 +11,8 @@ import (
 	"kpt.xdmy/apiserver/model/http"
 )
 
+// 定时每分钟读取已完成 未同步的的调拨单,同步到sap
+// 每个调拨单定时同步只进行一次 
 func autoTransfer() {
 	bp := []model.BigPartTransfer{}
 	if e := s.d.DB.Where(" CreatDate > '2022-09-28' and sapStatus =0  ").Find(&bp, model.BigPartTransfer{Statue: 1}).Error; e != nil {
@@ -23,6 +25,7 @@ func autoTransfer() {
 		TransferLog("auto", v.ApplyCode, err)
 	}
 }
+// 手动同步调拨单到sap
 func ManualTransfer(code string) (int, map[string]interface{}) {
 	bp := []model.BigPartTransfer{}
 	re := make(map[string]interface{})
@@ -48,7 +51,7 @@ func ManualTransfer(code string) (int, map[string]interface{}) {
 	}
 	return count, re
 }
-
+// 调拨接口日志
 func TransferLog(c, code string, err error) {
 	m := make(map[string]interface{})
 	if err != nil {
@@ -65,8 +68,7 @@ func TransferLog(c, code string, err error) {
 	}
 }
 func SapTransfer(bp *model.BigPartTransfer) error {
-	// 寄售无调拨
-	//非寄售
+	// 寄售(零库存)无调拨
 	r := new(http.TransferReq)
 
 	parts := []model.PartTransfer{}
@@ -141,8 +143,6 @@ func SapTransfer(bp *model.BigPartTransfer) error {
 		detail.InFactory = inpa.FactoryCode
 		detail.OutLocation = inw.WarehoseCode
 		detail.InLocation = outStock.Location
-		// detail.TaxCode = "J0"
-		// detail.NetPrice = "2"
 		r.Data.Detail = append(r.Data.Detail, *detail)
 	}
 	rp := new(http.TransferResp)

+ 0 - 0
cmd/logs/log20221012-105456.log


+ 2 - 0
cmd/logs/log20221012-105636.log

@@ -0,0 +1,2 @@
+[INFO][db.go:1891]2022/10/12 11:10:55 [ExecDataByConfig  map[] [::1]:54368 map[returnmap:0] [map[name:insertBigpartapply parammaps:map[SHStatus:9 applyCode:LY00221012017 applyDate:2022-10-12 applyType:1 departmentId:20 empId:3 pastureId:18] type:e] map[children:[] name:insertSpotList resultmaps:map[list:[]]]]]
+[INFO][db.go:1891]2022/10/12 11:15:16 [ExecDataByConfig  map[] [::1]:54368 map[returnmap:0] [map[name:insertBigpartapply parammaps:map[SHStatus:9 applyCode:LY00221012018 applyDate:2022-10-12 applyType:1 departmentId:20 empId:3 pastureId:18] type:e] map[children:[] name:insertSpotList resultmaps:map[list:[]]]]]

+ 1 - 0
cmd/logs/log20221012-111730.log

@@ -0,0 +1 @@
+[INFO][db.go:1891]2022/10/12 11:17:40 [ExecDataByConfig  map[] [::1]:54719 map[returnmap:0] [map[name:insertBigpartapply parammaps:map[SHStatus:9 applyCode:LY00221012019 applyDate:2022-10-12 applyType:1 departmentId:20 empId:3 pastureId:18] type:e] map[children:[] name:insertSpotList resultmaps:map[list:[]]]]]

BIN
cmd/sh/main


+ 5 - 3
doc/sql/i.sql

@@ -101,7 +101,8 @@ create temporary table save_temp (
 code  varchar(100),
 providername  varchar(100),
 brand  varchar(100),
-price decimal(15,5)
+price decimal(15,5),
+num  decimal(15,5)
 )
 num  integer 
 
@@ -128,12 +129,13 @@ from
 part_repertory pr 
 join save_temp s on pr.partcode =s.code and pr.price =s.price and pr.brand  =s.brand
 join provider pv on pv.id =pr.providerId  and pv.providerName  =s.providername
-where pr.pastureid  =631  or (select pastureId from warehouse w where w.id  =pr.locationid) =631
+where pr.pastureid  =619  or (select pastureId from warehouse w where w.id  =pr.locationid) =619
 )t
+where t.part
 
 update 
 part_repertory pr 
 join save_temp s on pr.partcode =s.code and pr.price =s.price and pr.brand  =s.brand
 join provider pv on pv.id =pr.providerId  and pv.providerName  =s.providername
 set pr.reportery = s.num
-where pr.pastureid  =631  or (select pastureId from warehouse w where w.id  =pr.locationid) =631
+where pr.pastureid  =619  or (select pastureId from warehouse w where w.id  =pr.locationid) =619

+ 77 - 0
doc/sql/p2.json

@@ -0,0 +1,77 @@
+{
+    "common": {
+        "returnmap": "0"
+    },
+    "data": [
+        {
+            "name": "insertBigPartTransfer",
+            "type": "e",
+            "parammaps": {
+                "pastureId": 304,
+                "inPastureId": 17,
+                "applyCode": "DB00221012002",
+                "empId": 2435,
+                "applyDate": "2022-10-12",
+                "groupName": ""
+            }
+        },
+        {
+            "name": "insertSpotList",
+            "resultmaps": {
+                "list": [
+                    {
+                        "bigId": 544995,
+                        "brand": "山猫",
+                        "brandId": 2035,
+                        "contractId": 518361,
+                        "enable": 1,
+                        "id": 449718,
+                        "inventoryType": 1,
+                        "isZeroStock": 0,
+                        "locationId": 9746,
+                        "partCode": "14.02.02.04.000064",
+                        "partId": 449718,
+                        "partName": "机油滤芯",
+                        "partRepId": 421755,
+                        "pastureId": 18,
+                        "pastureName": "马鞍山牧场,现代牧业,汶上牧场,商河牧场,合肥牧场,蚌埠牧场,洪雅牧场,宝鸡牧场,和林牧场,恒盛牧场,察北牧场,塞一牧场,塞二牧场,塞三牧场,塞四牧场,通辽牧场,双城牧场,尚志牧场,西藏牧场,新乐牧场",
+                        "planAmount": "1.00",
+                        "price": "100",
+                        "providerId": 1978,
+                        "providerName": "河北山猫",
+                        "remark": "货期5-7",
+                        "reportery": "3.00",
+                        "specification": "6675517",
+                        "unit": "只",
+                        "srcpath": "",
+                        "picpath": "",
+                        "amount": "1"
+                    }
+                ]
+            },
+            "children": [
+                {
+                    "name": "insertParttTransfer",
+                    "type": "e",
+                    "parammaps": {
+                        "bigId": "@insertBigPartTransfer.LastInsertId",
+                        "pastureId": "@insertSpotList.pastureId",
+                        "partId": "@insertSpotList.partId",
+                        "partCode": "@insertSpotList.partCode",
+                        "partName": "@insertSpotList.partName",
+                        "specification": "@insertSpotList.specification",
+                        "price": "@insertSpotList.price",
+                        "unit": "@insertSpotList.unit",
+                        "brandId": "@insertSpotList.brandId",
+                        "brandName": "@insertSpotList.brand",
+                        "amount": "@insertSpotList.amount",
+                        "providerName": "@insertSpotList.providerName",
+                        "providerId": "@insertSpotList.providerId",
+                        "note": "@insertSpotList.note",
+                        "partRepId": "@insertSpotList.partRepId"
+                    }
+                }
+            ]
+        }
+    ]
+}

+ 62 - 28
doc/sql/s.sql

@@ -21,32 +21,9 @@ or sqlname ='updatePartRepertoryTK'  --(还需要前端 修改参数)
 -- or sqlname ='insertPartquit' 
 -- or sqlname ='updatePartUseQuit'
 
-select sqlname,sqlstr,params from apisql where  sqlname ='getPartsListLY';
-select sqlname,sqlstr,params from apisql where  sqlname ='getPartsListLY_m'
-
-select sqlname,sqlstr,params from apisql where  sqlname ="insertBigPartTransfer";
-select sqlname,sqlstr,params from apisql where  sqlname ="getWarehouselistDB";
-select sqlname,sqlstr,params from apisql where  sqlname ="getBigpartapplyList";
-select sqlname,sqlstr,params from apisql where  sqlname ="updatePartapplyuseAmount_m";
-select sqlname,sqlstr,params from apisql where  sqlname ="autoCreatCode";
-select sqlname,sqlstr,params from apisql where  sqlname ='insertBigpartapply';
-select sqlname,sqlstr,params from apisql where  sqlname ='insertpartapply_m';
-select sqlname,sqlstr,params from apisql where  sqlname ='insertpartapply'
-select sqlname,sqlstr,params from apisql where  sqlname ='getBigpartusecode'
-select sqlname,sqlstr,params from apisql where  sqlname ='getpartUseListBybigTK'
-select sqlname,sqlstr,params from apisql where  sqlname ='getUserPCButtons'
-select sqlname,sqlstr,params from apisql where  sqlname ='updatePartUseQuit'
-select sqlname,sqlstr,params from apisql where  sqlname ='updatePartRepertoryTK'
-select sqlname,sqlstr,params from apisql where  sqlname ='updateBigPartTransfer'
-select sqlname,sqlstr,params from apisql where  sqlname ='getbuydetailList'
-select sqlname,sqlstr,params from apisql where  sqlname ='getPartListByProvider'
-select sqlname,sqlstr,params from apisql where  sqlname ='insertPartUseRepertory'
-select sqlname,sqlstr,params from apisql where  sqlname ='insertBigPartTransfer'
-select sqlname,sqlstr,params from apisql where  sqlname ='insertContractV2'
-select sqlname,sqlstr,params from apisql where  sqlname ='getbuydetailListbyBig'
-select sqlname,sqlstr,params from apisql where  sqlname ='getWXworkMsg'
-select sqlname,sqlstr,params from apisql where  sqlname ='getNoMesList'
-select sqlname,sqlstr,params from apisql where  sqlname ='getNoMesCount'
+select sqlname,sqlstr,params from apisql where  sqlname ='checkDeviceId';
+select sqlname,sqlstr,params from apisql where  sqlname ='insertParttTransfer'
+
 
 update  apisql set sqlname='getNoMesList_bk' where  sqlname ='getNoMesList';
 update  apisql set sqlname='getNoMesCount_bk' where  sqlname ='getNoMesCount';
@@ -462,7 +439,7 @@ select  CAST('123.12' as DECIMAL)
 
  UPDATE part_repertory SET reportery = reportery + '1' WHERE contractId = 497108  AND locationid = 10559 and partcode ="14.01.07.01.001030"
 
-select  pa.*  from bigpartapply bpa join partapply pa on pa.bigid =bpa.id where bpa.applycode ='LY19221008018'
+
 
 select id  from bigpartapply  order  by id desc limit 5
 select count(*) from partapply 
@@ -498,4 +475,61 @@ join bigpartuse  bpu on  bpu.id =pu.bigid
 where  bpu.useform ='CK56221002011'
 group by pr.contractId,w.pastureid
 
-select  pu.*   from  partuse pu join bigpartuse  bpu on  bpu.id =pu.bigid where  bpu.useform ='CK56221002011'
+select  pu.*   from  partuse pu join bigpartuse  bpu on  bpu.id =pu.bigid where  bpu.useform ='CK56221002011'
+
+
+select * from bigpartapply where id =210607
+select * from partapply where bigid =210607
+select  pa.*  from bigpartapply bpa join partapply pa on pa.bigid =bpa.id where bpa.applycode ='LY19221008018'
+select sqlname,params,sqlstr from apisql
+
+
+select * from menu where  name ='设备维保' or parentid =64 or parentid =247
+select  a.sqlname,m.name from apisql a join menu m on a.menuid   =m.id
+
+select  sqlname ,name from  apisql  where sqlstr  like '%update%' and sqlstr like '%partapply%'
+
+insertpartapply_m          | 插入领用子表_m             |
+updateBigPartApplystatue   | 领用出库状态更新           |
+completeRepirs             | 完成维修                   |
+completeUpkeep             | 完成保养                   |
+updatePartApplyDel         | 回滚领用出库数量           |
+partapplyCharge3           | 领用审核                   |
+partapplyCharge1           | 领用审核                   |
+partapplyCharge2           | 领用审核                   |
+partapplyCharge            | 领用审核                   |
+updatepartapplyCharge      | 领用                       |
+updatePartapplyuseAmount   | 更新领用出库数量           |
+updateBigPartApplystatueV2 | 领用出库状态更新           |
+insertBigpartapply_m       | 插入采购单主表_m           |
+updatePartapplyuseAmount_m | 更新领用出库数量_m
+
+select sqlname ,params,sqlstr from apisql where sqlname= 'insertpartapply_m';
+select sqlname ,params,sqlstr from apisql where sqlname= 'updateBigPartApplystatue';
+select sqlname ,params,sqlstr from apisql where sqlname= 'completeRepirs';
+select sqlname ,params,sqlstr from apisql where sqlname= 'completeUpkeep';
+select sqlname ,params,sqlstr from apisql where sqlname= 'updatePartApplyDel';
+select sqlname ,params,sqlstr from apisql where sqlname= 'partapplyCharge3';
+select sqlname ,params,sqlstr from apisql where sqlname= 'partapplyCharge1';
+select sqlname ,params,sqlstr from apisql where sqlname= 'partapplyCharge2';
+select sqlname ,params,sqlstr from apisql where sqlname= 'partapplyCharge';
+select sqlname ,params,sqlstr from apisql where sqlname= 'updatepartapplyCharge';
+select sqlname ,params,sqlstr from apisql where sqlname= 'updatePartapplyuseAmount';
+select sqlname ,params,sqlstr from apisql where sqlname= 'updateBigPartApplystatueV2';
+select sqlname ,params,sqlstr from apisql where sqlname= 'insertBigpartapply_m';
+select sqlname ,params,sqlstr from apisql where sqlname= 'updatePartapplyuseAmount_m';
+select sqlname ,params,sqlstr from apisql where sqlname= 'autoCreatCode';
+show create procedure createCodeN
+
+delete from bigpartapply where id >210628
+delete from partapply where bigid =210634
+
+insert into partapply (partcode) values ('1'),('2'),('3')
+update partapply  set bigid =210634 order by bigid desc limit 1
+
+
+
+ select bigid from partapply order by  bigid desc limit 1;
+select id from bigpartapply order by  id desc limit 1;
+
+select bigid from partuse order by  bigid desc limit 1;select id from bigpartuse order by  id desc limit 1;

+ 16 - 4
doc/sql/t3.sql

@@ -1,4 +1,16 @@
-SELECT `id`,`warehosetName`,`warehoseCode`,`pastureId` FROM warehouse
-   WHERE warehouse.`pastureId` =115 AND warehouse.isWhPostion=1 
-  --  AND (warehouse.warehoseCode LIKE CONCAT('%',?,'%') OR ?='')
-ORDER BY warehoseCode
+ update apisql set params='pastureId,inPastureId,applyCode,empId,applyDate,emp,groupName',
+ sqlstr="INSERT INTO bigparttransfer(
+    pastureId,
+    inPastureId,
+    applyCode,
+    empId,
+    applyDate,
+    emp,groupName
+  )
+  VALUES
+    (
+     ?,?,?,?,?,?,?
+    )
+	"
+    where sqlname ='insertBigPartTransfer'
+  

+ 11 - 5
doc/sql/test.md

@@ -2,7 +2,8 @@
 1. 退库接口
 修改参数名称
 参数值已修改
-后端:修改保存接口,生产已修改;updatePartRepertoryTK
+后端:修改保存接口,生产已修改;
+updatePartRepertoryTK
 2. 设备新增,设备名字
 已改为不可自定义
 前端:完成
@@ -11,14 +12,19 @@
 前端;完成
 4. 调拨
 前端:新增采购组,已修改
-后端:修改接口,和数据库
-insertBigPartTransfer
+后端:修改接口,和数据库,完成
+insertBigPartTransfer
 BigPartTransfer
+alter table  BigPartTransfer add column groupName varchar(100) default ''
 5. 申购
 新增采购组(未修改)
 6. 合同新增备件
 增加税码
-后端:insertContractV2,taxcode
+后端:
+insertContractV2
+taxcode
 
 account
-01532
+01532
+
+alter table contract add column  taxcode varchar(100) default '';

+ 1 - 2
test/test.go

@@ -4,7 +4,6 @@ import (
 	// "flag"
 
 	"flag"
-	"fmt"
 
 	"github.com/gin-gonic/gin"
 	log "github.com/sirupsen/logrus"
@@ -31,7 +30,7 @@ func Test() {
 	// Xorm()
 }
 func TestJob() {
-	fmt.Println("================================================================")
+
 	service.SapJobInit()
 }
 func Init() {