提交 1d3bc849 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 408b2cfe
......@@ -1070,7 +1070,7 @@ export default class IBZDeptMemberGridViewBase extends Vue {
'resAppKey':'userid'},
{view:{viewname:'ibzdepartment-mpickup-view',height: 0,width: 0,title: '部门数据多项选择视图'},
res:['IBZDepartment'],
'resAppKey':''}
'resAppKey':'userid'}
];
if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
......@@ -1128,9 +1128,9 @@ export default class IBZDeptMemberGridViewBase extends Vue {
Object.assign(curViewParam,args[0]);
}
let deResParameters: any[] = [];
if(curViewParam.ibzemployee && true){
if(curViewParam.ibzdepartment && true){
deResParameters = [
{ pathName: 'ibzemployees', parameterName: 'ibzemployee' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
]
}
const parameters: any[] = [
......
......@@ -449,6 +449,21 @@ const router = new Router({
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{
path: 'ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
caption: 'entities.ibzdeptmember.views.gridview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{
path: 'ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
......@@ -478,6 +493,20 @@ const router = new Router({
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{
path: 'ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
caption: 'entities.ibzdeptmember.views.gridview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{
path: 'ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
......@@ -1049,6 +1078,21 @@ const router = new Router({
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{
path: 'ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
caption: 'entities.ibzdeptmember.views.editview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{
path: 'ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
......@@ -1078,6 +1122,20 @@ const router = new Router({
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{
path: 'ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
caption: 'entities.ibzdeptmember.views.editview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{
path: 'ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
......@@ -1529,6 +1587,20 @@ const router = new Router({
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{
path: '/ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
caption: 'entities.ibzdeptmember.views.gridview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{
path: '/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
......@@ -1556,6 +1628,19 @@ const router = new Router({
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{
path: '/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
caption: 'entities.ibzdeptmember.views.gridview.caption',
parameters: [
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{
path: '/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
......@@ -2047,6 +2132,20 @@ const router = new Router({
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{
path: '/ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
caption: 'entities.ibzdeptmember.views.editview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{
path: '/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
......@@ -2074,6 +2173,19 @@ const router = new Router({
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{
path: '/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
caption: 'entities.ibzdeptmember.views.editview.caption',
parameters: [
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{
path: '/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
......
......@@ -83,9 +83,25 @@ export default class IBZDepartmentServiceBase extends EntityService {
}
}
masterData.ibzemployees = ibzemployeesData;
let ibzdeptmembersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers'),'undefined')){
ibzdeptmembersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers') as any);
if(ibzdeptmembersData && ibzdeptmembersData.length && ibzdeptmembersData.length > 0){
ibzdeptmembersData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.memberid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.ibzdeptmembers = ibzdeptmembersData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibzdepartments/${context.ibzdepartment}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees));
this.tempStorage.setItem(context.srfsessionkey+'_ibzdeptmembers',JSON.stringify(res.data.ibzdeptmembers));
return res;
}
......@@ -104,6 +120,7 @@ export default class IBZDepartmentServiceBase extends EntityService {
}
let res:any = await Http.getInstance().get(`/ibzdepartments/${context.ibzdepartment}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees));
this.tempStorage.setItem(context.srfsessionkey+'_ibzdeptmembers',JSON.stringify(res.data.ibzdeptmembers));
return res;
}
......@@ -170,9 +187,25 @@ export default class IBZDepartmentServiceBase extends EntityService {
}
}
masterData.ibzemployees = ibzemployeesData;
let ibzdeptmembersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers'),'undefined')){
ibzdeptmembersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers') as any);
if(ibzdeptmembersData && ibzdeptmembersData.length && ibzdeptmembersData.length > 0){
ibzdeptmembersData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.memberid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.ibzdeptmembers = ibzdeptmembersData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/ibzdepartments/${context.ibzdepartment}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees));
this.tempStorage.setItem(context.srfsessionkey+'_ibzdeptmembers',JSON.stringify(res.data.ibzdeptmembers));
return res;
}
......@@ -211,6 +244,21 @@ export default class IBZDepartmentServiceBase extends EntityService {
}
}
masterData.ibzemployees = ibzemployeesData;
let ibzdeptmembersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers'),'undefined')){
ibzdeptmembersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers') as any);
if(ibzdeptmembersData && ibzdeptmembersData.length && ibzdeptmembersData.length > 0){
ibzdeptmembersData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.memberid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.ibzdeptmembers = ibzdeptmembersData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -221,6 +269,7 @@ export default class IBZDepartmentServiceBase extends EntityService {
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/ibzdepartments`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees));
this.tempStorage.setItem(tempContext.srfsessionkey+'_ibzdeptmembers',JSON.stringify(res.data.ibzdeptmembers));
return res;
}
......@@ -240,6 +289,7 @@ export default class IBZDepartmentServiceBase extends EntityService {
let res:any = await Http.getInstance().get(`/ibzdepartments/getdraft`,isloading);
res.data.ibzdepartment = data.ibzdepartment;
this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees));
this.tempStorage.setItem(context.srfsessionkey+'_ibzdeptmembers',JSON.stringify(res.data.ibzdeptmembers));
return res;
}
......
......@@ -162,7 +162,7 @@
paramItem='ibzemployee'
:parentdata='{"srfparentdefname":"USERID","srfparentdename":"IBZEMP","SRFPARENTTYPE":"DER1N","srfparentmode":"DER1N_IBZDEPTMEMBER_IBZEMP_USERID","SRFDER1NID":"DER1N_IBZDEPTMEMBER_IBZEMP_USERID"}'
:parameters="[
{ pathName: 'ibzemployees', parameterName: 'ibzemployee' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
]"
:context="context"
:viewparams="viewparams"
......
......@@ -21,7 +21,7 @@ zuul:
stripPrefix: false
wf_user:
path: /wfusers/**
serviceId: ibzrt-api
serviceId: ibzwf-api
stripPrefix: false
ibzorg:
path: /ibzorganizations/**
......@@ -29,7 +29,7 @@ zuul:
stripPrefix: false
wf_group:
path: /wfgroups/**
serviceId: ibzrt-api
serviceId: ibzwf-api
stripPrefix: false
wf_model:
path: /wfremodels/**
......
......@@ -52,6 +52,14 @@ zuul:
path: /sys_users/**
serviceId: ibzuaa-api
stripPrefix: false
wf_user:
path: /wf_users/**
serviceId: ibzwf-api
stripPrefix: false
wf_group:
path: /wf_groups/**
serviceId: ibzwf-api
stripPrefix: false
ibzdict:
path: /ibzdicts/**
serviceId: ibzdict-api
......
package cn.ibizlab.core.workflow.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.workflow.domain.WFGroup;
import cn.ibizlab.core.workflow.filter.WFGroupSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[WFGroup] 服务对象接口
*/
@Component
public class WFGroupFallback implements WFGroupFeignClient{
public Page<WFGroup> select(){
return null;
}
public Boolean remove(String id){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public Boolean save(WFGroup wfgroup){
return false;
}
public Boolean saveBatch(List<WFGroup> wfgroups){
return false;
}
public WFGroup get(String id){
return null;
}
public WFGroup create(WFGroup wfgroup){
return null;
}
public Boolean createBatch(List<WFGroup> wfgroups){
return false;
}
public WFGroup getDraft(){
return null;
}
public Boolean checkKey(WFGroup wfgroup){
return false;
}
public WFGroup update(String id, WFGroup wfgroup){
return null;
}
public Boolean updateBatch(List<WFGroup> wfgroups){
return false;
}
public Page<WFGroup> searchDefault(WFGroupSearchContext context){
return null;
}
}
package cn.ibizlab.core.workflow.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.workflow.domain.WFGroup;
import cn.ibizlab.core.workflow.filter.WFGroupSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[WFGroup] 服务对象接口
*/
@FeignClient(value = "ibzwf-api", contextId = "WFGroup", fallback = WFGroupFallback.class)
public interface WFGroupFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/select")
Page<WFGroup> select();
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/{id}")
Boolean remove(@PathVariable("id") String id);
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/save")
Boolean save(@RequestBody WFGroup wfgroup);
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/save")
Boolean saveBatch(@RequestBody List<WFGroup> wfgroups);
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/{id}")
WFGroup get(@PathVariable("id") String id);
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups")
WFGroup create(@RequestBody WFGroup wfgroup);
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/batch")
Boolean createBatch(@RequestBody List<WFGroup> wfgroups);
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/getdraft")
WFGroup getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/checkkey")
Boolean checkKey(@RequestBody WFGroup wfgroup);
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/{id}")
WFGroup update(@PathVariable("id") String id,@RequestBody WFGroup wfgroup);
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/batch")
Boolean updateBatch(@RequestBody List<WFGroup> wfgroups);
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/searchdefault")
Page<WFGroup> searchDefault(@RequestBody WFGroupSearchContext context);
}
package cn.ibizlab.core.workflow.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.workflow.domain.WFUser;
import cn.ibizlab.core.workflow.filter.WFUserSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[WFUser] 服务对象接口
*/
@Component
public class WFUserFallback implements WFUserFeignClient{
public Page<WFUser> select(){
return null;
}
public WFUser update(String id, WFUser wfuser){
return null;
}
public Boolean updateBatch(List<WFUser> wfusers){
return false;
}
public WFUser getDraft(){
return null;
}
public WFUser get(String id){
return null;
}
public WFUser create(WFUser wfuser){
return null;
}
public Boolean createBatch(List<WFUser> wfusers){
return false;
}
public Boolean checkKey(WFUser wfuser){
return false;
}
public Boolean save(WFUser wfuser){
return false;
}
public Boolean saveBatch(List<WFUser> wfusers){
return false;
}
public Boolean remove(String id){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public Page<WFUser> searchDefault(WFUserSearchContext context){
return null;
}
}
package cn.ibizlab.core.workflow.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.workflow.domain.WFUser;
import cn.ibizlab.core.workflow.filter.WFUserSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[WFUser] 服务对象接口
*/
@FeignClient(value = "ibzwf-api", contextId = "WFUser", fallback = WFUserFallback.class)
public interface WFUserFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/select")
Page<WFUser> select();
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/{id}")
WFUser update(@PathVariable("id") String id,@RequestBody WFUser wfuser);
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/batch")
Boolean updateBatch(@RequestBody List<WFUser> wfusers);
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/getdraft")
WFUser getDraft();
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/{id}")
WFUser get(@PathVariable("id") String id);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers")
WFUser create(@RequestBody WFUser wfuser);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/batch")
Boolean createBatch(@RequestBody List<WFUser> wfusers);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/checkkey")
Boolean checkKey(@RequestBody WFUser wfuser);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/save")
Boolean save(@RequestBody WFUser wfuser);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/save")
Boolean saveBatch(@RequestBody List<WFUser> wfusers);
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{id}")
Boolean remove(@PathVariable("id") String id);
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/searchdefault")
Page<WFUser> searchDefault(@RequestBody WFUserSearchContext context);
}
......@@ -21,54 +21,48 @@ import java.io.Serializable;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
import cn.ibizlab.util.domain.EntityClient;
/**
* 实体[角色/用户组]
* ServiceApi [角色/用户组] 对象
*/
@Data
@TableName(value = "IBZWFGROUP",resultMap = "WFGroupResultMap")
public class WFGroup extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
public class WFGroup extends EntityClient implements Serializable {
/**
* 组标识
*/
@DEField(name = "groupid" , isKeyField=true)
@TableId(value= "groupid",type=IdType.UUID)
@JSONField(name = "id")
@JsonProperty("id")
private String id;
/**
* 组名称
*/
@DEField(name = "groupname")
@TableField(value = "groupname")
@JSONField(name = "name")
@JsonProperty("name")
private String name;
/**
* 范围
*/
@TableField(value = "groupscope")
@JSONField(name = "groupscope")
@JsonProperty("groupscope")
private String groupscope;
/**
* 成员
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
@JSONField(name = "wfmembers")
@JsonProperty("wfmembers")
private List<cn.ibizlab.core.workflow.domain.WFMember> wfmember;
/**
* 设置 [组名称]
*/
......
......@@ -21,47 +21,42 @@ import java.io.Serializable;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
import cn.ibizlab.util.domain.EntityClient;
/**
* 实体[用户]
* ServiceApi [用户] 对象
*/
@Data
@TableName(value = "IBZUSER",resultMap = "WFUserResultMap")
public class WFUser extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
public class WFUser extends EntityClient implements Serializable {
/**
* 用户标识
*/
@DEField(name = "userid" , isKeyField=true)
@TableId(value= "userid",type=IdType.UUID)
@JSONField(name = "id")
@JsonProperty("id")
private String id;
/**
* 用户全局名
*/
@DEField(name = "username")
@TableField(value = "username")
@JSONField(name = "firstname")
@JsonProperty("firstname")
private String firstname;
/**
* 用户名称
*/
@DEField(name = "personname")
@TableField(value = "personname")
@JSONField(name = "displayname")
@JsonProperty("displayname")
private String displayname;
/**
* 设置 [用户全局名]
*/
......
......@@ -17,36 +17,17 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.workflow.domain.WFGroup;
import cn.ibizlab.util.filter.SearchContextBase;
/**
* 关系型数据实体[WFGroup] 查询条件对象
* ServiceApi数据实体[WFGroup] 查询条件对象
*/
@Slf4j
@Data
public class WFGroupSearchContext extends QueryWrapperContext<WFGroup> {
public class WFGroupSearchContext extends SearchContextBase {
private String n_groupname_like;//[组名称]
public void setN_groupname_like(String n_groupname_like) {
this.n_groupname_like = n_groupname_like;
if(!ObjectUtils.isEmpty(this.n_groupname_like)){
this.getSelectCond().like("groupname", n_groupname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("groupname",query);
}
}
}
}
......@@ -17,36 +17,17 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.workflow.domain.WFUser;
import cn.ibizlab.util.filter.SearchContextBase;
/**
* 关系型数据实体[WFUser] 查询条件对象
* ServiceApi数据实体[WFUser] 查询条件对象
*/
@Slf4j
@Data
public class WFUserSearchContext extends QueryWrapperContext<WFUser> {
public class WFUserSearchContext extends SearchContextBase {
private String n_personname_like;//[用户名称]
public void setN_personname_like(String n_personname_like) {
this.n_personname_like = n_personname_like;
if(!ObjectUtils.isEmpty(this.n_personname_like)){
this.getSelectCond().like("personname", n_personname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("personname",query);
}
}
}
}
......@@ -18,12 +18,10 @@ import cn.ibizlab.core.workflow.domain.WFGroup;
import cn.ibizlab.core.workflow.filter.WFGroupSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[WFGroup] 服务对象接口
*/
public interface IWFGroupService extends IService<WFGroup>{
public interface IWFGroupService{
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
......@@ -37,22 +35,8 @@ public interface IWFGroupService extends IService<WFGroup>{
boolean update(WFGroup et) ;
void updateBatch(List<WFGroup> list) ;
Page<WFGroup> searchDefault(WFGroupSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
......@@ -18,12 +18,10 @@ import cn.ibizlab.core.workflow.domain.WFUser;
import cn.ibizlab.core.workflow.filter.WFUserSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[WFUser] 服务对象接口
*/
public interface IWFUserService extends IService<WFUser>{
public interface IWFUserService{
boolean update(WFUser et) ;
void updateBatch(List<WFUser> list) ;
......@@ -37,22 +35,8 @@ public interface IWFUserService extends IService<WFUser>{
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
Page<WFUser> searchDefault(WFUserSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
......@@ -30,160 +30,103 @@ import cn.ibizlab.core.workflow.service.IWFGroupService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.workflow.mapper.WFGroupMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
import cn.ibizlab.core.workflow.client.WFGroupFeignClient;
/**
* 实体[角色/用户组] 服务对象接口实现
*/
@Slf4j
@Service("WFGroupServiceImpl")
public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> implements IWFGroupService {
@Service
public class WFGroupServiceImpl implements IWFGroupService {
@Autowired
@Lazy
private cn.ibizlab.core.workflow.service.IWFMemberService wfmemberService;
WFGroupFeignClient wFGroupFeignClient;
private int batchSize = 500;
@Override
@Transactional
public boolean remove(String key) {
wfmemberService.removeByGroupid(key) ;
boolean result=removeById(key);
return result ;
public boolean remove(String id) {
boolean result=wFGroupFeignClient.remove(id) ;
return result;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
public void removeBatch(Collection<String> idList){
wFGroupFeignClient.removeBatch(idList);
}
@Override
@Transactional
public boolean save(WFGroup et) {
if(!saveOrUpdate(et))
if(et.getId()==null) et.setId((String)et.getDefaultKey(true));
if(!wFGroupFeignClient.save(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(WFGroup et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<WFGroup> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<WFGroup> list) {
saveOrUpdateBatch(list,batchSize);
wFGroupFeignClient.saveBatch(list) ;
}
@Override
@Transactional
public WFGroup get(String key) {
WFGroup et = getById(key);
public WFGroup get(String id) {
WFGroup et=wFGroupFeignClient.get(id);
if(et==null){
et=new WFGroup();
et.setId(key);
et.setId(id);
}
else{
et.setWfmember(wfmemberService.selectByGroupid(key));
}
return et;
return et;
}
@Override
@Transactional
public boolean create(WFGroup et) {
if(!this.retBool(this.baseMapper.insert(et)))
WFGroup rt = wFGroupFeignClient.create(et);
if(rt==null)
return false;
wfmemberService.saveByGroupid(et.getId(),et.getWfmember());
CachedBeanCopier.copy(get(et.getId()),et);
CachedBeanCopier.copy(rt,et);
return true;
}
@Override
public void createBatch(List<WFGroup> list) {
this.saveBatch(list,batchSize);
public void createBatch(List<WFGroup> list){
wFGroupFeignClient.createBatch(list) ;
}
@Override
public WFGroup getDraft(WFGroup et) {
et=wFGroupFeignClient.getDraft();
return et;
}
@Override
public boolean checkKey(WFGroup et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
return wFGroupFeignClient.checkKey(et);
}
@Override
@Transactional
public boolean update(WFGroup et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("groupid",et.getId())))
WFGroup rt = wFGroupFeignClient.update(et.getId(),et);
if(rt==null)
return false;
wfmemberService.saveByGroupid(et.getId(),et.getWfmember());
CachedBeanCopier.copy(get(et.getId()),et);
CachedBeanCopier.copy(rt,et);
return true;
}
@Override
public void updateBatch(List<WFGroup> list) {
updateBatchById(list,batchSize);
public void updateBatch(List<WFGroup> list){
wFGroupFeignClient.updateBatch(list) ;
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<WFGroup> searchDefault(WFGroupSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFGroup> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFGroup>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
Page<WFGroup> wFGroups=wFGroupFeignClient.searchDefault(context);
return wFGroups;
}
......
......@@ -30,119 +30,93 @@ import cn.ibizlab.core.workflow.service.IWFUserService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.workflow.mapper.WFUserMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
import cn.ibizlab.core.workflow.client.WFUserFeignClient;
/**
* 实体[用户] 服务对象接口实现
*/
@Slf4j
@Service("WFUserServiceImpl")
public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> implements IWFUserService {
@Service
public class WFUserServiceImpl implements IWFUserService {
@Autowired
@Lazy
private cn.ibizlab.core.workflow.service.IWFMemberService wfmemberService;
WFUserFeignClient wFUserFeignClient;
private int batchSize = 500;
@Override
@Transactional
public boolean update(WFUser et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("userid",et.getId())))
WFUser rt = wFUserFeignClient.update(et.getId(),et);
if(rt==null)
return false;
CachedBeanCopier.copy(get(et.getId()),et);
CachedBeanCopier.copy(rt,et);
return true;
}
@Override
public void updateBatch(List<WFUser> list) {
updateBatchById(list,batchSize);
public void updateBatch(List<WFUser> list){
wFUserFeignClient.updateBatch(list) ;
}
@Override
public WFUser getDraft(WFUser et) {
et=wFUserFeignClient.getDraft();
return et;
}
@Override
@Transactional
public WFUser get(String key) {
WFUser et = getById(key);
public WFUser get(String id) {
WFUser et=wFUserFeignClient.get(id);
if(et==null){
et=new WFUser();
et.setId(key);
et.setId(id);
}
else{
}
return et;
return et;
}
@Override
@Transactional
public boolean create(WFUser et) {
if(!this.retBool(this.baseMapper.insert(et)))
WFUser rt = wFUserFeignClient.create(et);
if(rt==null)
return false;
CachedBeanCopier.copy(get(et.getId()),et);
CachedBeanCopier.copy(rt,et);
return true;
}
@Override
public void createBatch(List<WFUser> list) {
this.saveBatch(list,batchSize);
public void createBatch(List<WFUser> list){
wFUserFeignClient.createBatch(list) ;
}
@Override
public boolean checkKey(WFUser et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
return wFUserFeignClient.checkKey(et);
}
@Override
@Transactional
public boolean save(WFUser et) {
if(!saveOrUpdate(et))
if(et.getId()==null) et.setId((String)et.getDefaultKey(true));
if(!wFUserFeignClient.save(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(WFUser et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
public void saveBatch(List<WFUser> list) {
wFUserFeignClient.saveBatch(list) ;
}
@Override
public boolean saveBatch(Collection<WFUser> list) {
saveOrUpdateBatch(list,batchSize);
return true;
public boolean remove(String id) {
boolean result=wFUserFeignClient.remove(id) ;
return result;
}
@Override
public void saveBatch(List<WFUser> list) {
saveOrUpdateBatch(list,batchSize);
public void removeBatch(Collection<String> idList){
wFUserFeignClient.removeBatch(idList);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
......@@ -151,35 +125,8 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
*/
@Override
public Page<WFUser> searchDefault(WFUserSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFUser> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFUser>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
Page<WFUser> wFUsers=wFUserFeignClient.searchDefault(context);
return wFUsers;
}
......
......@@ -29,18 +29,6 @@
<!--输出实体[WF_GROUP]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-wf_group-3-1">
<createTable tableName="IBZWFGROUP">
<column name="GROUPID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_WF_GROUP_GROUPID"/>
</column>
<column name="GROUPNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="GROUPSCOPE" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
......@@ -60,6 +48,5 @@
<!--输出实体[WF_GROUP]外键关系 -->
</databaseChangeLog>
......@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -46,15 +46,13 @@ public class WFGroupResource {
@Lazy
public WFGroupMapping wfgroupMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFGroup" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/{wfgroup_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfgroup_id") String wfgroup_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.remove(wfgroup_id));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"WFGroup" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
......@@ -62,14 +60,12 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Save-all')")
@ApiOperation(value = "Save", tags = {"WFGroup" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/save")
public ResponseEntity<Boolean> save(@RequestBody WFGroupDTO wfgroupdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.save(wfgroupMapping.toDomain(wfgroupdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"WFGroup" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
......@@ -77,7 +73,6 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Get-all')")
@ApiOperation(value = "Get", tags = {"WFGroup" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/{wfgroup_id}")
public ResponseEntity<WFGroupDTO> get(@PathVariable("wfgroup_id") String wfgroup_id) {
......@@ -86,10 +81,9 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Create-all')")
@ApiOperation(value = "Create", tags = {"WFGroup" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups")
@Transactional
public ResponseEntity<WFGroupDTO> create(@RequestBody WFGroupDTO wfgroupdto) {
WFGroup domain = wfgroupMapping.toDomain(wfgroupdto);
wfgroupService.create(domain);
......@@ -97,7 +91,6 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFGroup" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
......@@ -117,10 +110,9 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.checkKey(wfgroupMapping.toDomain(wfgroupdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Update-all')")
@ApiOperation(value = "Update", tags = {"WFGroup" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/{wfgroup_id}")
@Transactional
public ResponseEntity<WFGroupDTO> update(@PathVariable("wfgroup_id") String wfgroup_id, @RequestBody WFGroupDTO wfgroupdto) {
WFGroup domain = wfgroupMapping.toDomain(wfgroupdto);
domain .setId(wfgroup_id);
......@@ -129,7 +121,6 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFGroup" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
......@@ -137,7 +128,6 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFGroup" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfgroups/fetchdefault")
public ResponseEntity<List<WFGroupDTO>> fetchDefault(WFGroupSearchContext context) {
......@@ -150,7 +140,6 @@ public class WFGroupResource {
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFGroup" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/wfgroups/searchdefault")
public ResponseEntity<Page<WFGroupDTO>> searchDefault(@RequestBody WFGroupSearchContext context) {
......
......@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -46,10 +46,9 @@ public class WFUserResource {
@Lazy
public WFUserMapping wfuserMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Update-all')")
@ApiOperation(value = "Update", tags = {"WFUser" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/{wfuser_id}")
@Transactional
public ResponseEntity<WFUserDTO> update(@PathVariable("wfuser_id") String wfuser_id, @RequestBody WFUserDTO wfuserdto) {
WFUser domain = wfuserMapping.toDomain(wfuserdto);
domain .setId(wfuser_id);
......@@ -58,7 +57,6 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFUser" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
......@@ -72,7 +70,6 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(wfuserMapping.toDto(wfuserService.getDraft(new WFUser())));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Get-all')")
@ApiOperation(value = "Get", tags = {"WFUser" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/{wfuser_id}")
public ResponseEntity<WFUserDTO> get(@PathVariable("wfuser_id") String wfuser_id) {
......@@ -81,10 +78,9 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Create-all')")
@ApiOperation(value = "Create", tags = {"WFUser" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers")
@Transactional
public ResponseEntity<WFUserDTO> create(@RequestBody WFUserDTO wfuserdto) {
WFUser domain = wfuserMapping.toDomain(wfuserdto);
wfuserService.create(domain);
......@@ -92,7 +88,6 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFUser" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
......@@ -106,14 +101,12 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(wfuserService.checkKey(wfuserMapping.toDomain(wfuserdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Save-all')")
@ApiOperation(value = "Save", tags = {"WFUser" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/save")
public ResponseEntity<Boolean> save(@RequestBody WFUserDTO wfuserdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfuserService.save(wfuserMapping.toDomain(wfuserdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"WFUser" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
......@@ -121,15 +114,13 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFUser" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{wfuser_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfuser_id") String wfuser_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfuserService.remove(wfuser_id));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"WFUser" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
......@@ -137,7 +128,6 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFUser" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfusers/fetchdefault")
public ResponseEntity<List<WFUserDTO>> fetchDefault(WFUserSearchContext context) {
......@@ -150,7 +140,6 @@ public class WFUserResource {
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFUser" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/wfusers/searchdefault")
public ResponseEntity<Page<WFUserDTO>> searchDefault(@RequestBody WFUserSearchContext context) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册