feat:完善项目
This commit is contained in:
@ -442,3 +442,22 @@ func (*Manage) MaterialSupplierDelete(c *gin.Context) {
|
|||||||
err := manage.NewMaterialSuppler()(getSession()(c).(*service.Session)).Delete(form.Convert())
|
err := manage.NewMaterialSuppler()(getSession()(c).(*service.Session)).Delete(form.Convert())
|
||||||
APIResponse(err)(c)
|
APIResponse(err)(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (*Manage) Notice(c *gin.Context) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Manage) NoticeDetail(c *gin.Context) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Manage) NoticeAdd(c *gin.Context) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Manage) NoticeEdit(c *gin.Context) {
|
||||||
|
|
||||||
|
}
|
||||||
|
func (*Manage) NoticeDelete(c *gin.Context) {
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -53,7 +53,8 @@ func initModel() {
|
|||||||
&synchronized{iModel: model.NewManageMaterial()}, &synchronized{iModel: model.NewManageMaterialSupplier()},
|
&synchronized{iModel: model.NewManageMaterial()}, &synchronized{iModel: model.NewManageMaterialSupplier()},
|
||||||
&synchronized{iModel: model.NewManageMaterialPurchase()}, &synchronized{iModel: model.NewManageMaterialWarehouse()},
|
&synchronized{iModel: model.NewManageMaterialPurchase()}, &synchronized{iModel: model.NewManageMaterialWarehouse()},
|
||||||
&synchronized{iModel: model.NewWorkInstance()}, &synchronized{iModel: model.NewWorkMaterial()}, &synchronized{iModel: model.NewWorkProgress()},
|
&synchronized{iModel: model.NewWorkInstance()}, &synchronized{iModel: model.NewWorkMaterial()}, &synchronized{iModel: model.NewWorkProgress()},
|
||||||
&synchronized{iModel: model.NewWorkSchedule()}, &synchronized{iModel: model.NewWorkRepair()},
|
&synchronized{iModel: model.NewWorkSchedule()},
|
||||||
|
&synchronized{iModel: model.NewWorkRepair()}, &synchronized{iModel: model.NewWorkRepairDetail()},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
func initCacheMode() {
|
func initCacheMode() {
|
||||||
|
@ -18,6 +18,7 @@ type (
|
|||||||
InstanceBasic struct {
|
InstanceBasic struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Avatar string `json:"avatar"`
|
Avatar string `json:"avatar"`
|
||||||
|
TenantName string `json:"tenant_name"`
|
||||||
}
|
}
|
||||||
// InstanceInfo 用户信息
|
// InstanceInfo 用户信息
|
||||||
InstanceInfo struct {
|
InstanceInfo struct {
|
||||||
@ -39,7 +40,15 @@ type (
|
|||||||
|
|
||||||
// Info 基本信息
|
// Info 基本信息
|
||||||
func (c *Instance) Info() *InstanceBasic {
|
func (c *Instance) Info() *InstanceBasic {
|
||||||
return &InstanceBasic{Name: c.Name, Avatar: c.Avatar}
|
out := &InstanceBasic{Name: c.Name, Avatar: c.Avatar}
|
||||||
|
|
||||||
|
if c.TenantID > 0 {
|
||||||
|
mSysTenant := model.NewSysTenant()
|
||||||
|
mSysTenant.ID = c.TenantID
|
||||||
|
_, _ = model2.FirstField(mSysTenant.SysTenant, []string{"id", "name"})
|
||||||
|
out.TenantName = mSysTenant.Name
|
||||||
|
}
|
||||||
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
// Select 筛选信息
|
// Select 筛选信息
|
||||||
|
11
app/model/manage_notice.go
Normal file
11
app/model/manage_notice.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import "ArmedPolice/app/common/model"
|
||||||
|
|
||||||
|
type ManageNotice struct {
|
||||||
|
*model.ManageNotice
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewManageNotice() *ManageNotice {
|
||||||
|
return &ManageNotice{model.NewManageNotice()}
|
||||||
|
}
|
@ -42,7 +42,7 @@ func init() {
|
|||||||
|
|
||||||
dir, err := os.Getwd()
|
dir, err := os.Getwd()
|
||||||
|
|
||||||
output := "../..//app/common/model"
|
output := "../../app/common/model"
|
||||||
|
|
||||||
output = path.Join(dir, output)
|
output = path.Join(dir, output)
|
||||||
|
|
||||||
|
@ -156,6 +156,11 @@ func (this *Router) registerAPI() {
|
|||||||
manageV1.POST("/material/supplier/select", _api.MaterialSupplierSelect)
|
manageV1.POST("/material/supplier/select", _api.MaterialSupplierSelect)
|
||||||
manageV1.POST("/material/supplier/bind", _api.MaterialSupplierBind)
|
manageV1.POST("/material/supplier/bind", _api.MaterialSupplierBind)
|
||||||
manageV1.POST("/material/supplier/delete", _api.MaterialSupplierDelete)
|
manageV1.POST("/material/supplier/delete", _api.MaterialSupplierDelete)
|
||||||
|
manageV1.POST("/notice", _api.Notice)
|
||||||
|
manageV1.POST("/notice/detail", _api.NoticeDetail)
|
||||||
|
manageV1.POST("/notice/add", _api.NoticeAdd)
|
||||||
|
manageV1.POST("/notice/edit", _api.NoticeEdit)
|
||||||
|
manageV1.POST("/notice/delete", _api.NoticeEdit)
|
||||||
}
|
}
|
||||||
// Work 工单管理
|
// Work 工单管理
|
||||||
workV1 := v1.Group("/work")
|
workV1 := v1.Group("/work")
|
||||||
|
Reference in New Issue
Block a user