^1640740821232
@
sname
UserGroup
slabel
用户分组
stableName
tblUserGroup
sdataSource
xworker.app.user.datasource.UserDataSource
sshowSql
false
squerySqlForQueryOnly
false
seditCols
2
sgroup
xworker.app.user
spaging
false
sreadUrl
do?sc=xworker.web.app.view.extjs.server.DataObjectStore/@read
screateUrl
do?sc=xworker.web.app.view.extjs.server.DataObjectStore/@create
supdateUrl
do?sc=xworker.web.app.view.extjs.server.DataObjectStore/@update
sdestroyUrl
do?sc=xworker.web.app.view.extjs.server.DataObjectStore/@destroy
LstoreAutoDestroy
false
sstoreAutoLoad
false
LstoreAutoSave
true
LstoreBatch
true
LstorePruneModifiedRecords
false
LstoreRemoteSort
false
LstoreRestful
false
sstoreRoot
'rows'
sstoreSuccessProperty
'success'
sstoreTotalProperty
'totalCount'
sstoreMessageProperty
'msg'
sgridEditable
false
sgridEditType
cell
sformReadUrl
do?sc=xworker.web.app.view.extjs.server.DataObjectForm/@read
sformCreateUrl
do?sc=xworker.web.app.view.extjs.server.DataObjectForm/@create
sformUpdateUrl
do?sc=xworker.web.app.view.extjs.server.DataObjectForm/@update
sformDestroyUrl
do?sc=xworker.web.app.view.extjs.server.DataObjectForm/@delete
spaging_afterPageText
页 共
spaging_beforePageText
第
Lpaging_displayInfo
false
spaging_displayMsg
第{0}-第{1}条，共{2}条
spaging_emptyMsg
没有数据
spaging_firstText
首页
spaging_lastText
最后一页
spaging_nextText
下一页
Lpaging_prependButtons
false
spaging_prevText
上一页
spaging_refreshText
刷新
sgridColumnLocking
false
sgridLockText
'锁定'
sgridUnlockText
'解锁'
scolumnGroup
false
sgridCheckable
false
sgridRowNumber
false
sgridGrouping
false
sgridGroupTextTpl
'{text} ({[values.rs.length]} 条)'
sgridRowExpander
false
sautoGenerateId
true
sidGenerateType
native
sidAction
generateId
sstoreSortDir
ASC
sautoInit
true
sautoInitAction
beforeCreate
scacheRelation
false
scacheRelationMaxSize
1000
scacheRelationReadnone
false
safterCreated
false
sonLoaded
false
sbeforeUpdate
false
safterUpdated
false
sbeforeDelete
true
safterDeleted
false
safterQueryed
false
sdescriptors
xworker.dataObject.db.DbDataObject
sinheritDescription
false
sth_createIndex
true
sth_registThing
child|xworker.dataObject.DataObjectIns
sth_registMyChilds
false
sth_mark
false
  @/@id
  sname
  id
  slabel
  标识
  sfieldName
  tid
  sgenerator
  native
  stype
  long
  soptional
  true
  skey
  true
  sdataField
  true
  sviewField
  true
  sreadField
  true
  screateEditor
  true
  seditEditor
  true
  sviewEditor
  true
  sgridEditor
  true
  squeryEditor
  true
  sinputtype
  label
  sreadOnly
  true
  seditable
  true
  sdisabled
  false
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sshowInTable
  true
  sdisplayRelationLabel
  false
  sgridFixed
  false
  sgridHidden
  false
  sgridHideable
  true
  sgridSortable
  false
  scolumnLocked
  false
  sgridGroupable
  true
  sgridMenuDisabled
  false
  sgridResizable
  true
  sdescriptors
  xworker.dataObject.db.DbDataObject/@attribute
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  id
  @/@parentId
  sname
  parentId
  slabel
  分组父标识
  sfieldName
  parentId
  stype
  long
  soptional
  true
  skey
  false
  sdataField
  true
  sviewField
  true
  sreadField
  true
  sdefault
  0
  screateEditor
  true
  seditEditor
  true
  sviewEditor
  true
  sgridEditor
  true
  squeryEditor
  true
  sinputtype
  label
  sreadOnly
  true
  seditable
  true
  sdisabled
  false
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sshowInTable
  true
  sdisplayRelationLabel
  false
  sgridFixed
  false
  sgridHidden
  false
  sgridHideable
  true
  sgridSortable
  false
  scolumnLocked
  false
  sgridGroupable
  true
  sgridMenuDisabled
  false
  sgridResizable
  true
  sdescriptors
  xworker.dataObject.db.DbDataObject/@attribute
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  parentId
  @/@name
  sname
  name
  slabel
  名称
  sfieldName
  name
  stype
  string
  soptional
  true
  slength
  50
  skey
  false
  sdataField
  true
  sviewField
  true
  sreadField
  true
  screateEditor
  true
  seditEditor
  true
  sviewEditor
  true
  sgridEditor
  true
  squeryEditor
  true
  sreadOnly
  false
  seditable
  true
  sdisabled
  false
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sshowInTable
  true
  sdisplayRelationLabel
  false
  sgridFixed
  false
  sgridHidden
  false
  sgridHideable
  true
  sgridSortable
  false
  scolumnLocked
  false
  sgridGroupable
  true
  sgridMenuDisabled
  false
  sgridResizable
  true
  sdescriptors
  xworker.dataObject.db.DbDataObject/@attribute
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  name
  @/@createDate
  sname
  createDate
  slabel
  创建日期
  sfieldName
  createDate
  stype
  datetime
  soptional
  true
  skey
  false
  sdataField
  true
  sviewField
  true
  sreadField
  true
  sdefault
  now
  screateEditor
  true
  seditEditor
  true
  sviewEditor
  true
  sgridEditor
  true
  squeryEditor
  true
  sinputtype
  datePick
  sreadOnly
  true
  seditable
  true
  sdisabled
  false
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sshowInTable
  true
  sdisplayRelationLabel
  false
  sgridFixed
  false
  sgridHidden
  false
  sgridHideable
  true
  sgridSortable
  false
  scolumnLocked
  false
  sgridGroupable
  true
  sgridMenuDisabled
  false
  sgridResizable
  true
  sdescriptors
  xworker.dataObject.db.DbDataObject/@attribute
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  createDate
  @/@memo
  sname
  memo
  slabel
  备注
  sfieldName
  memo
  stype
  string
  soptional
  true
  slength
  2048
  skey
  false
  sdataField
  true
  sviewField
  true
  sreadField
  true
  screateEditor
  true
  seditEditor
  true
  sviewEditor
  true
  sgridEditor
  true
  squeryEditor
  true
  sinputtype
  html
  sheight
  150
  sreadOnly
  false
  seditable
  true
  sdisabled
  false
  scolspan
  2
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sshowInTable
  true
  sdisplayRelationLabel
  false
  sgridFixed
  false
  sgridHidden
  false
  sgridHideable
  true
  sgridSortable
  false
  scolumnLocked
  false
  sgridGroupable
  true
  sgridMenuDisabled
  false
  sgridResizable
  true
  sdescriptors
  xworker.dataObject.db.DbDataObject/@attribute
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  memo
  @/@actions
  sname
  actions
  sdescriptors
  xworker.dataObject.db.DbDataObject/@actions1
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  actions
    @/@actions/@query
    sname
    doLoad
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Local
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import xworker.dataObject.DataObject;

if(theData.id == 0){
    theData.put("name", "用户分组");
    theData.put("createDate", null);
    theData.put("id", 0);
    theData.put("parentId", 0);
    return theData;
}else{
    def action = world.getAction("xworker.dataObject.db.DbDataObject/@actions/@load");
    action.run(actionContext);
}
#$@text#$@
    sinterpretationType
    Action
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@GroovyAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_mark
    false
    sid
    query
    @/@actions/@beforeDelete
    sname
    beforeDelete
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Local
    sdisableGlobalContext
    false
    Scode
#$@text#$@
def dataSourceThing = world.getThing(self.dataSource);
def con = dataSourceThing.doAction("getConnection", actionContext);
try{
    def pst = con.prepareStatement("select * from tblUserGroup where parentId=?");
    pst.setLong(1, theData.get("id"));
    def rs = pst.executeQuery();
    if(rs.next()){
        throw new Exception("还有子分组，不能删除！");
    }
    rs.close();
    pst.close();
    
    //删除用户
    pst = con.prepareStatement("delete from tblUserGroupMembers where userGroupId=?");
    pst.setLong(1, theData.get("id"));
    pst.executeUpdate();
    pst.close();
}finally{
    if(con != null){
        con.close();
    }
}
#$@text#$@
    sinterpretationType
    Action
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@GroovyAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_mark
    false
    sid
    beforeDelete
