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