test_controller.go
1.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package controllers
import (
"github.com/linmadan/egglib-go/web/beego"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/application/syncdata"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/domainService"
)
type TestController struct {
beego.BaseController
}
func (c *TestController) InvokPullMaterialNewest() {
srv := syncdata.PullDataK3CloudService{}
err := srv.PullMaterialNewest()
c.Response(nil, err)
}
func (c *TestController) InvokPullMaterialGroup() {
srv := syncdata.PullDataK3CloudService{}
err := srv.PullMaterialGroup()
c.Response(nil, err)
}
func (c *TestController) InvokPullPrdMoNewest() {
srv := syncdata.PullDataK3CloudService{}
err := srv.PullPrdMoNewest()
c.Response(nil, err)
}
func (c *TestController) CreateDeviceCollection() {
data := &domain.DeviceCollection{}
Must(c.Unmarshal(data))
domainService.SendWorkshopDeviceData(data)
c.Response(nil, nil)
}