修复错误
This commit is contained in:
@@ -577,7 +577,7 @@ func (c *BackendErpController) GetPosition() {
|
||||
|
||||
qs := models.Orm.QueryTable(new(models.BackendErpPosition))
|
||||
if tid > 0 {
|
||||
qs = qs.Filter("tenant_id", tid)
|
||||
qs = qs.Filter("tid", tid)
|
||||
}
|
||||
if departmentID > 0 {
|
||||
qs = qs.Filter("department_id", departmentID)
|
||||
@@ -641,7 +641,7 @@ func (c *BackendErpController) CreatePosition() {
|
||||
sortVal, _ := c.getUintValue(body, "sort")
|
||||
|
||||
row := models.BackendErpPosition{
|
||||
TenantID: tenantID,
|
||||
Tid: tenantID,
|
||||
DepartmentID: departmentID,
|
||||
PositionCode: positionCode,
|
||||
PositionName: positionName,
|
||||
@@ -675,7 +675,7 @@ func (c *BackendErpController) EditPosition() {
|
||||
update := orm.Params{}
|
||||
|
||||
if v, has := c.getUint64Value(body, "tenant_id", "tid"); has {
|
||||
update["tenant_id"] = v
|
||||
update["tid"] = v
|
||||
}
|
||||
if v, has := c.getUint64Value(body, "department_id"); has {
|
||||
update["department_id"] = v
|
||||
@@ -848,8 +848,8 @@ func (c *BackendErpController) organizationNameByIDString(idValue string) string
|
||||
func (c *BackendErpController) positionDTO(row models.BackendErpPosition) erpPositionDTO {
|
||||
return erpPositionDTO{
|
||||
ID: row.ID,
|
||||
TenantID: row.TenantID,
|
||||
Tid: row.TenantID,
|
||||
TenantID: row.Tid,
|
||||
Tid: row.Tid,
|
||||
DepartmentID: row.DepartmentID,
|
||||
PositionCode: row.PositionCode,
|
||||
PositionName: row.PositionName,
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ func (m *BackendErpEmployee) TableName() string {
|
||||
// BackendErpPosition 职位表 yz_backend_erp_position
|
||||
type BackendErpPosition struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID uint64 `orm:"column(tenant_id)" json:"tenant_id"`
|
||||
Tid uint64 `orm:"column(tid)" json:"tid"`
|
||||
DepartmentID uint64 `orm:"column(department_id)" json:"department_id"`
|
||||
PositionCode string `orm:"column(position_code);size(50)" json:"position_code"`
|
||||
PositionName string `orm:"column(position_name);size(100)" json:"position_name"`
|
||||
|
||||
Reference in New Issue
Block a user