houyaf 3 vuotta sitten
vanhempi
commit
c065e51bb6

+ 27 - 0
datamodels/wf_activity_action_def.go

@@ -1 +1,28 @@
 package datamodels
+import "time"
+
+type WfActivityActionDef struct {
+    WfDefId             int64     `json:"wfDefId"               xorm:"'wf_def_id'               bigint    pk comment('主键ID')       " `
+    ActivityDefId       int64     `json:"activityDefId"         xorm:"'activity_def_id'         bigint    pk comment('主键ID')       " `
+    
+    ActionId            int64     `json:"actionId"              xorm:"'action_id'               varchar(127) comment('TASK类型名称')  " `
+    ActionCode          string    `json:"actionCode"            xorm:"'action_code'             varchar(127) comment('描述')         " `
+    ActionTitle         string    `json:"actionTitle"           xorm:"'action_title'            varchar(127) comment('描述')         " `
+    ActionDesc          string    `json:"actionDesc"            xorm:"'action_desc'             varchar(127) comment('描述')         " `
+    
+    FormCode            string    `json:"formCode"              xorm:"'form_code'               varchar(127) comment('描述')         " `
+    
+    TargetActivityDefId int64     `json:"targetActivityDefId"   xorm:"'target_activity_def_id'  bigint       comment('Target Activity Def id')  " `
+    
+    CreatedBy    int64     `json:"createdBy"       xorm:"'created_by'  " `
+    CreatedAt    time.Time `json:"createdAt"       xorm:"'created_at'  " `
+    UpdatedBy    int64     `json:"updatedBy"       xorm:"'updated_by'  " `
+    UpdatedAt    time.Time `json:"updatedAt"       xorm:"'updated_at'  " `
+    DeletedFlag  int64     `json:"deletedFlag"     xorm:"'deleted_flag'" `
+    DeletedBy    int64     `json:"deletedBy"       xorm:"'deleted_by'  " `
+    DeletedAt    time.Time `json:"deletedAt"       xorm:"'deleted_at'  " `
+}
+
+func (m *WfActivityActionDef) TableName() string {
+    return "wf_activity_action_def"
+}

+ 45 - 0
datamodels/wf_activity_action_ins.go

@@ -1 +1,46 @@
 package datamodels
+import "time"
+
+type WfActivityActionIns struct {
+    OcId                int64     `json:"OcId"                  xorm:"'oc_id'                   bigint    pk comment('OC ID')       "`
+    
+    WfDefId             int64     `json:"wfDefId"               xorm:"'wf_def_id'               bigint    pk comment('WF DEF ID')   " `
+    WfInsId             int64     `json:"wfInsId"               xorm:"'wf_ins_id'               bigint    pk comment('WF INS ID')   " `
+    
+    ActivityDefId       int64     `json:"activityDefId"         xorm:"'activity_def_id'         bigint    pk comment('主键ID')       " `
+    ActivityInsId       int64     `json:"activityInsId"         xorm:"'activity_ins_id'         bigint    pk comment('主键ID')       " `
+    
+    ActionInsId         int64     `json:"actionInsId"           xorm:"'action_ins_id'           bigint       comment('Action Ins Id')  " `
+    
+    ActionId            int64     `json:"actionId"              xorm:"'action_id'               bigint       comment('Action Id')   " `
+    ActionCode          string    `json:"actionCode"            xorm:"'action_code'             varchar(127) comment('描述')         " `
+    ActionTitle         string    `json:"actionTitle"           xorm:"'action_title'            varchar(127) comment('描述')         " `
+    ActionDesc          string    `json:"actionDesc"            xorm:"'action_desc'             varchar(127) comment('描述')         " `
+    FormCode            string    `json:"formCode"              xorm:"'form_code'               varchar(127) comment('描述')         " `
+    
+    ActionTime          time.Time `json:"actionTime"            xorm:"'action_time'  " `
+    
+    ActionRemark        string    `json:"actionRemark"          xorm:"'action_remark'           varchar(127) comment('描述')         " `
+    ActionResult        string    `json:"actionResult"          xorm:"'action_result'           varchar(127) comment('描述')         " `
+    
+    TargetActivityInsId int64     `json:"targetActivityInsId"   xorm:"'target_activity_ins_id'  bigint       comment('Target Activity Ins id')" `
+    
+    GroupId             int64     `json:"groupId"               xorm:"'group_id'                bigint       comment('Group Id')     " `
+    GroupName           string    `json:"groupName"             xorm:"'group_name'              varchar(127) comment('Group Name')   " `
+    PositionId          int64     `json:"positionId"            xorm:"'position_id'             bigint       comment('Position Id')  " `
+    PositionName        string    `json:"positionName"          xorm:"'position_name'           varchar(127) comment('Position Name')" `
+    AccountId           int64     `json:"accountId"             xorm:"'account_id'              bigint       comment('Account Id')   " `
+    AccountName         string    `json:"accountName"           xorm:"'account_name'            varchar(127) comment('Account Name') " `
+    
+    CreatedBy    int64     `json:"createdBy"       xorm:"'created_by'  " `
+    CreatedAt    time.Time `json:"createdAt"       xorm:"'created_at'  " `
+    UpdatedBy    int64     `json:"updatedBy"       xorm:"'updated_by'  " `
+    UpdatedAt    time.Time `json:"updatedAt"       xorm:"'updated_at'  " `
+    DeletedFlag  int64     `json:"deletedFlag"     xorm:"'deleted_flag'" `
+    DeletedBy    int64     `json:"deletedBy"       xorm:"'deleted_by'  " `
+    DeletedAt    time.Time `json:"deletedAt"       xorm:"'deleted_at'  " `
+}
+
+func (m *WfActivityActionIns) TableName() string {
+    return "wf_activity_action_ins"
+}

+ 25 - 0
datamodels/wf_activity_def.go

@@ -1 +1,26 @@
 package datamodels
+
+import "time"
+
+type WfActivityDef struct {
+    WfDefId             int64     `json:"wfDefId"           xorm:"'wf_def_id'           bigint    pk comment('主键ID')       " `
+    ActivityDefId       int64     `json:"activityDefId"     xorm:"'activity_def_id'     bigint    pk comment('主键ID')       " `
+    ActivityDefTitle    string    `json:"activityDefTitle"  xorm:"'activity_def_title'  varchar(127) comment('TASK类型名称')  " `
+    
+    ActivityCode        string    `json:"activityCode"      xorm:"'activity_code'       varchar(127) comment('TASK类型名称')  " `
+    ActivityDefDesc     string    `json:"activityDefDesc"   xorm:"'activity_def_desc'   varchar(127) comment('描述')         " `
+    
+    FormCode            string    `json:"formCode"          xorm:"'form_code'           varchar(127) comment('描述')         " `
+    
+    CreatedBy    int64     `json:"createdBy"       xorm:"'created_by'  " `
+    CreatedAt    time.Time `json:"createdAt"       xorm:"'created_at'  " `
+    UpdatedBy    int64     `json:"updatedBy"       xorm:"'updated_by'  " `
+    UpdatedAt    time.Time `json:"updatedAt"       xorm:"'updated_at'  " `
+    DeletedFlag  int64     `json:"deletedFlag"     xorm:"'deleted_flag'" `
+    DeletedBy    int64     `json:"deletedBy"       xorm:"'deleted_by'  " `
+    DeletedAt    time.Time `json:"deletedAt"       xorm:"'deleted_at'  " `
+}
+
+func (m *WfActivityDef) TableName() string {
+    return "wf_activity_def"
+}

+ 43 - 0
datamodels/wf_activity_ins.go

@@ -1 +1,44 @@
 package datamodels
+
+import "time"
+
+type WfActivityIns struct {
+    OcId                int64     `json:"OcId"              xorm:"'oc_id'               bigint    pk comment('OC ID')       "`
+    
+    WfDefId             int64     `json:"wfDefId"           xorm:"'wf_def_id'           bigint    pk comment('主键ID')       " `
+    WfInsId             int64     `json:"wfInsId"           xorm:"'wf_ins_id'           bigint    pk comment('WF INS ID')   " `
+    
+    ActivityDefId       int64     `json:"activityDefId"     xorm:"'activity_def_id'     bigint    pk comment('主键ID')       " `
+    ActivityInsId       int64     `json:"activityInsId"     xorm:"'activity_ins_id'     bigint    pk comment('主键ID')       " `
+    ActivityInsTitle    string    `json:"activityInsTitle"  xorm:"'activity_ins_title'  varchar(127) comment('Activity Ins Title')"`
+    ActivityCode        string    `json:"activityCode"      xorm:"'activity_code'       varchar(127) comment('Activity Code')"`
+    
+    GroupId             int64     `json:"groupId"           xorm:"'group_id'            bigint       comment('Group Id')     " `
+    GroupName           string    `json:"groupName"         xorm:"'group_name'          varchar(127) comment('Group Name')   " `
+    PositionId          int64     `json:"positionId"        xorm:"'position_id'         bigint       comment('Position Id')  " `
+    PositionName        string    `json:"positionName"      xorm:"'position_name'       varchar(127) comment('Position Name')" `
+    AccountId           int64     `json:"accountId"         xorm:"'account_id'          bigint       comment('Account Id')   " `
+    AccountName         string    `json:"accountName"       xorm:"'account_name'        varchar(127) comment('Account Name') " `
+    
+    FormCode            string    `json:"formCode"          xorm:"'form_code'           varchar(127) comment('描述')         " `
+    
+    ActivityInsFrom     int64     `json:"activityInsFrom"   xorm:"'activity_ins_from'   bigint    pk comment('主键ID')       " `
+    ActivityInsTo       int64     `json:"activityInsTo"     xorm:"'activity_ins_to'     bigint    pk comment('主键ID')       " `
+    
+    StartTime           time.Time `json:"startTime"         xorm:"'start_time'  " `
+    EndTime             time.Time `json:"endTime"           xorm:"'end_time'    " `
+    
+    Status              int64     `json:"status"            xorm:"'status'              bigint       comment('Account Id')   " `
+    
+    CreatedBy    int64     `json:"createdBy"       xorm:"'created_by'  " `
+    CreatedAt    time.Time `json:"createdAt"       xorm:"'created_at'  " `
+    UpdatedBy    int64     `json:"updatedBy"       xorm:"'updated_by'  " `
+    UpdatedAt    time.Time `json:"updatedAt"       xorm:"'updated_at'  " `
+    DeletedFlag  int64     `json:"deletedFlag"     xorm:"'deleted_flag'" `
+    DeletedBy    int64     `json:"deletedBy"       xorm:"'deleted_by'  " `
+    DeletedAt    time.Time `json:"deletedAt"       xorm:"'deleted_at'  " `
+}
+
+func (m *WfActivityIns) TableName() string {
+    return "wf_activity_ins"
+}

+ 22 - 8
datamodels/wf_ins.go

@@ -3,14 +3,28 @@ package datamodels
 import "time"
 
 type WfIns struct {
-    OcId         int64     `json:"ocId"            xorm:"'oc_id'         bigint    pk comment('OC Id')       " `
-    WfDefId      int64     `json:"wfDefId"         xorm:"'wf_def_id'     bigint    pk comment('主键ID')       " `
-    WfInsId      int64     `json:"wfInsId"         xorm:"'wf_ins_id'     bigint    pk comment('主键ID')       " `
-    WfInsTitle   string    `json:"wfInsTitle"      xorm:"'wf_ins_title'  varchar(127) comment('描述')         " `
-    BeginTime    time.Time `json:"beginTime"       xorm:"'begin_time'    datetime     comment('描述')         " `
-    FinishTime   time.Time `json:"finishTime"      xorm:"'finish_time'   datetime     comment('描述')         " `
-    Status       int64     `json:"status"          xorm:"'status'        bigint       comment('Status')      " `
-    CurGroupId   int64     `json:"curGroupId"      xorm:"'cur_group_id'  bigint       comment('CurGroupId')  " `
+    OcId            int64     `json:"ocId"            xorm:"'oc_id'             bigint    pk comment('OC Id')       " `
+    WfDefId         int64     `json:"wfDefId"         xorm:"'wf_def_id'         bigint    pk comment('主键ID')       " `
+    WfInsId         int64     `json:"wfInsId"         xorm:"'wf_ins_id'         bigint    pk comment('主键ID')       " `
+    WfInsTitle      string    `json:"wfInsTitle"      xorm:"'wf_ins_title'      varchar(127) comment('描述')         " `
+    BeginTime       time.Time `json:"beginTime"       xorm:"'begin_time'        datetime     comment('描述')         " `
+    FinishTime      time.Time `json:"finishTime"      xorm:"'finish_time'       datetime     comment('描述')         " `
+    Status          int64     `json:"status"          xorm:"'status'            bigint       comment('Status')      " `
+    CurGroupId      int64     `json:"curGroupId"      xorm:"'cur_group_id'      bigint       comment('CurGroupId')  " `
+    CurGroupName    string    `json:"curGroupName"    xorm:"'cur_group_name'    varchar(127) comment('描述')         " `
+    CurPositionId   int64     `json:"curPositionId"   xorm:"'cur_position_id'   bigint       comment('CurGroupId')  " `
+    CurPositionName string    `json:"curPositionName" xorm:"'cur_position_name' varchar(127) comment('描述')         " `
+    CurAccountId    int64     `json:"curAccountId"    xorm:"'cur_account_id'    bigint       comment('CurGroupId')  " `
+    CurAccountName  string    `json:"curAccountName"  xorm:"'cur_account_name'  varchar(127) comment('描述')         " `
+    
+    CurActivityInsId     int64     `json:"curActivityInsId"      xorm:"'cur_activity_ins_id'      bigint       comment('CurGroupId')  " `
+    CurActivityBeginTime time.Time `json:"curActivityBeginTime"  xorm:"'cur_activity_begin_name'  varchar(127) comment('描述')         " `
+    
+    CurActivityCode  string    `json:"curActivityCode"  xorm:"'cur_activity_code'  varchar(127) comment('描述')         " `
+    CurActivityTitle string    `json:"curActivityTitle" xorm:"'cur_activity_title'  varchar(127) comment('描述')         " `
+    
+    CurFormCode  string    `json:"curFormCode"     xorm:"'cur_form_code'  varchar(127) comment('描述')         " `
+    
     
     CreatedBy    int64     `json:"createdBy"       xorm:"'created_by'  " `
     CreatedAt    time.Time `json:"createdAt"       xorm:"'created_at'  " `

+ 23 - 0
datamodels/wf_ins_attach.go

@@ -1 +1,24 @@
 package datamodels
+
+import "time"
+
+type WfInsAttach struct {
+    OcId            int64     `json:"ocId"            xorm:"'oc_id'             bigint    pk comment('OC Id')       " `
+    WfInsId         int64     `json:"wfInsId"         xorm:"'wf_ins_id'         bigint    pk comment('主键ID')       " `
+    ActivityInsId   int64     `json:"activityInsId"   xorm:"'activity_ins_id'   bigint    pk comment('主键ID')       " `
+    ActivityCode    string    `json:"activityCode"    xorm:"'activity_code'     varchar(127) comment('Activity Code')"`
+    
+    FileId          int64     `json:"fileId"          xorm:"'file_id'           bigint    pk comment('主键ID')       " `
+    
+    CreatedBy    int64     `json:"createdBy"       xorm:"'created_by'  " `
+    CreatedAt    time.Time `json:"createdAt"       xorm:"'created_at'  " `
+    UpdatedBy    int64     `json:"updatedBy"       xorm:"'updated_by'  " `
+    UpdatedAt    time.Time `json:"updatedAt"       xorm:"'updated_at'  " `
+    DeletedFlag  int64     `json:"deletedFlag"     xorm:"'deleted_flag'" `
+    DeletedBy    int64     `json:"deletedBy"       xorm:"'deleted_by'  " `
+    DeletedAt    time.Time `json:"deletedAt"       xorm:"'deleted_at'  " `
+}
+
+func (m *WfInsAttach) TableName() string {
+    return "wf_ins_attach"
+}

+ 4 - 2
repositories/oc_repo.go

@@ -221,8 +221,10 @@ func (d *OcRepo) CountOfChildren(iRoot, iid int64) (int64, error) {
 }
 
 func (d *OcRepo) GetAdmin(ocId int64)(*viewmodels.OcAdminInfo, error) {
-	sqlSelect := ` SELECT A.*       ,
-                          B.*            `
+	sqlSelect := ` SELECT A.oc_id,
+                          A.admin_id,
+                          B.account_name  AS admin_name,
+                          B.account_phone AS admin_phone`
 	sqlFrom   := ` FROM       oc           AS A
                    LEFT  JOIN account      AS B ON(A.oc_id = B.oc_id AND A.admin_id = B.account_id) `
 	sqlWhere  := ` WHERE A.deleted_flag = 0  AND A.oc_id = ` + fmt.Sprintf("%d", ocId)