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

ibizdev提交

上级 da99b3a4
...@@ -38,6 +38,11 @@ ...@@ -38,6 +38,11 @@
git clone -b master $para2 ibzou/ git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/ cd ibzou/
mvn clean package -Papi
cd ibzou-provider/ibzou-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-provider-api.yaml dev --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -16,5 +16,9 @@ zuul: ...@@ -16,5 +16,9 @@ zuul:
path: /ibzorganizations/** path: /ibzorganizations/**
serviceId: ibzou-api serviceId: ibzou-api
stripPrefix: false stripPrefix: false
wfcore:
path: /wfcore/**
serviceId: ibzwf-api
stripPrefix: false
sensitive-headers: sensitive-headers:
- Cookie,Set-Cookie,Authorization - Cookie,Set-Cookie,Authorization
server: server:
port: 8080 port: 40001
\ No newline at end of file
...@@ -2,29 +2,26 @@ ...@@ -2,29 +2,26 @@
{ {
"predefineddatarange":[{"id":"ALL","name":"全部数据"},{"id":"CURORG","name":"当前单位"},{"id":"PORG","name":"上级单位"},{"id":"SORG","name":"下级单位"},{"id":"CURORGDEPT","name":"当前部门"},{"id":"PORGDEPT","name":"上级部门"},{"id":"SORGDEPT","name":"下级部门"}], "predefineddatarange":[{"id":"ALL","name":"全部数据"},{"id":"CURORG","name":"当前单位"},{"id":"PORG","name":"上级单位"},{"id":"SORG","name":"下级单位"},{"id":"CURORGDEPT","name":"当前部门"},{"id":"PORGDEPT","name":"上级部门"},{"id":"SORGDEPT","name":"下级部门"}],
"entities":[ "entities":[
{ {
"dename":"IBZDepartment", "dename":"IBZDepartment",
"delogicname":"部门", "delogicname":"部门",
"sysmoudle":{"id":"OU","name":"ou"}, "sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"Default","name":"默认数据集"}], "dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"CREATE","name":"新建","type":"BUILTIN"},{"id":"UPDATE","name":"编辑","type":"BUILTIN"},{"id":"READ","name":"读取","type":"BUILTIN"},{"id":"DELETE","name":"删除","type":"BUILTIN"},{"id":"CUSTOM","name":"自定义行为","type":"USERCUSTOM"}] "deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" }]
} }
, , {
{
"dename":"IBZEmployee", "dename":"IBZEmployee",
"delogicname":"人员", "delogicname":"人员",
"sysmoudle":{"id":"OU","name":"ou"}, "sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"Default","name":"默认数据集"}], "dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"CREATE","name":"新建","type":"BUILTIN"},{"id":"UPDATE","name":"编辑","type":"BUILTIN"},{"id":"READ","name":"读取","type":"BUILTIN"},{"id":"DELETE","name":"删除","type":"BUILTIN"},{"id":"CUSTOM","name":"自定义行为","type":"USERCUSTOM"}] "deaction":[{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"InitPwd" , "name":"初始化密码" , "type":"USERCUSTOM" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" }]
} }
, , {
{
"dename":"IBZOrganization", "dename":"IBZOrganization",
"delogicname":"单位机构", "delogicname":"单位机构",
"sysmoudle":{"id":"OU","name":"ou"}, "sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"Default","name":"默认数据集"}], "dedataset":[{"id":"SelectSOrg" , "name":"查询下级单位"},{"id":"SelectPOrg" , "name":"查询上级单位"},{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"CREATE","name":"新建","type":"BUILTIN"},{"id":"UPDATE","name":"编辑","type":"BUILTIN"},{"id":"READ","name":"读取","type":"BUILTIN"},{"id":"DELETE","name":"删除","type":"BUILTIN"},{"id":"CUSTOM","name":"自定义行为","type":"USERCUSTOM"}] "deaction":[{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" }]
} }
] ]
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar
EXPOSE 8081 EXPOSE 40001
ADD ibzou-provider-api.jar /ibzou-provider-api.jar ADD ibzou-provider-api.jar /ibzou-provider-api.jar
...@@ -3,9 +3,11 @@ services: ...@@ -3,9 +3,11 @@ services:
ibzou-provider-api: ibzou-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest
ports: ports:
- "8081:8081" - "40001:40001"
networks: networks:
- agent_network - agent_network
environment:
SPRING_CLOUD_NACOS_DISCOVERY_IP: 172.16.180.237
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 1
......
...@@ -55,7 +55,7 @@ public class IBZDepartmentResource { ...@@ -55,7 +55,7 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission('','CREATE',this.getEntity())") @PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "Create", tags = {"IBZDepartment" }, notes = "Create") @ApiOperation(value = "Create", tags = {"IBZDepartment" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments")
@Transactional @Transactional
...@@ -66,7 +66,7 @@ public class IBZDepartmentResource { ...@@ -66,7 +66,7 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission('','CREATE',this.getEntity())") @PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "createBatch", tags = {"createBatch" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"createBatch" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/createbatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/createbatch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
...@@ -77,7 +77,7 @@ public class IBZDepartmentResource { ...@@ -77,7 +77,7 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission(#ibzdepartment_id,'READ',this.getEntity())") @PreAuthorize("hasPermission(#ibzdepartment_id,'Get',this.getEntity())")
@ApiOperation(value = "Get", tags = {"IBZDepartment" }, notes = "Get") @ApiOperation(value = "Get", tags = {"IBZDepartment" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}")
public ResponseEntity<IBZDepartmentDTO> get(@PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<IBZDepartmentDTO> get(@PathVariable("ibzdepartment_id") String ibzdepartment_id) {
...@@ -123,7 +123,7 @@ public class IBZDepartmentResource { ...@@ -123,7 +123,7 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission('DELETE',{#ibzdepartment_id,this.getEntity()})") @PreAuthorize("hasPermission('Remove',{#ibzdepartment_id,this.getEntity()})")
@ApiOperation(value = "Remove", tags = {"IBZDepartment" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"IBZDepartment" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}")
@Transactional @Transactional
...@@ -141,7 +141,7 @@ public class IBZDepartmentResource { ...@@ -141,7 +141,7 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission(#ibzdepartment_id,'UPDATE',this.getEntity())") @PreAuthorize("hasPermission(#ibzdepartment_id,'Update',this.getEntity())")
@ApiOperation(value = "Update", tags = {"IBZDepartment" }, notes = "Update") @ApiOperation(value = "Update", tags = {"IBZDepartment" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}")
@Transactional @Transactional
...@@ -153,7 +153,7 @@ public class IBZDepartmentResource { ...@@ -153,7 +153,7 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(#ibzdepartment_id,'UPDATE',this.getEntity())") @PreAuthorize("hasPermission(#ibzdepartment_id,'Update',this.getEntity())")
@ApiOperation(value = "UpdateBatch", tags = {"UpdateBatch" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"UpdateBatch" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/updatebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/updatebatch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
...@@ -161,7 +161,7 @@ public class IBZDepartmentResource { ...@@ -161,7 +161,7 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})") @PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZDepartment" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"IBZDepartment" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchdefault")
public ResponseEntity<List<IBZDepartmentDTO>> fetchDefault(IBZDepartmentSearchContext context) { public ResponseEntity<List<IBZDepartmentDTO>> fetchDefault(IBZDepartmentSearchContext context) {
...@@ -174,7 +174,7 @@ public class IBZDepartmentResource { ...@@ -174,7 +174,7 @@ public class IBZDepartmentResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})") @PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZDepartment" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"IBZDepartment" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/searchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/searchdefault")
public ResponseEntity<Page<IBZDepartmentDTO>> searchDefault(IBZDepartmentSearchContext context) { public ResponseEntity<Page<IBZDepartmentDTO>> searchDefault(IBZDepartmentSearchContext context) {
......
...@@ -55,7 +55,7 @@ public class IBZEmployeeResource { ...@@ -55,7 +55,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasPermission('DELETE',{#ibzemployee_id,this.getEntity()})") @PreAuthorize("hasPermission('Remove',{#ibzemployee_id,this.getEntity()})")
@ApiOperation(value = "Remove", tags = {"IBZEmployee" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"IBZEmployee" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}")
@Transactional @Transactional
...@@ -86,7 +86,7 @@ public class IBZEmployeeResource { ...@@ -86,7 +86,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasPermission('','CREATE',this.getEntity())") @PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "Create", tags = {"IBZEmployee" }, notes = "Create") @ApiOperation(value = "Create", tags = {"IBZEmployee" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees")
@Transactional @Transactional
...@@ -97,7 +97,7 @@ public class IBZEmployeeResource { ...@@ -97,7 +97,7 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission('','CREATE',this.getEntity())") @PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "createBatch", tags = {"createBatch" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"createBatch" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/createbatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/createbatch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
...@@ -117,7 +117,7 @@ public class IBZEmployeeResource { ...@@ -117,7 +117,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasPermission(#ibzemployee_id,'UPDATE',this.getEntity())") @PreAuthorize("hasPermission(#ibzemployee_id,'Update',this.getEntity())")
@ApiOperation(value = "Update", tags = {"IBZEmployee" }, notes = "Update") @ApiOperation(value = "Update", tags = {"IBZEmployee" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}")
@Transactional @Transactional
...@@ -129,7 +129,7 @@ public class IBZEmployeeResource { ...@@ -129,7 +129,7 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(#ibzemployee_id,'UPDATE',this.getEntity())") @PreAuthorize("hasPermission(#ibzemployee_id,'Update',this.getEntity())")
@ApiOperation(value = "UpdateBatch", tags = {"UpdateBatch" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"UpdateBatch" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/updatebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/updatebatch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
...@@ -156,7 +156,7 @@ public class IBZEmployeeResource { ...@@ -156,7 +156,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasPermission(#ibzemployee_id,'READ',this.getEntity())") @PreAuthorize("hasPermission(#ibzemployee_id,'Get',this.getEntity())")
@ApiOperation(value = "Get", tags = {"IBZEmployee" }, notes = "Get") @ApiOperation(value = "Get", tags = {"IBZEmployee" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}")
public ResponseEntity<IBZEmployeeDTO> get(@PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<IBZEmployeeDTO> get(@PathVariable("ibzemployee_id") String ibzemployee_id) {
...@@ -174,7 +174,7 @@ public class IBZEmployeeResource { ...@@ -174,7 +174,7 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeMapping.toDto(ibzemployeeService.getDraft(new IBZEmployee()))); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeMapping.toDto(ibzemployeeService.getDraft(new IBZEmployee())));
} }
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})") @PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZEmployee" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"IBZEmployee" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzemployees/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzemployees/fetchdefault")
public ResponseEntity<List<IBZEmployeeDTO>> fetchDefault(IBZEmployeeSearchContext context) { public ResponseEntity<List<IBZEmployeeDTO>> fetchDefault(IBZEmployeeSearchContext context) {
...@@ -187,7 +187,7 @@ public class IBZEmployeeResource { ...@@ -187,7 +187,7 @@ public class IBZEmployeeResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})") @PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZEmployee" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"IBZEmployee" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzemployees/searchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzemployees/searchdefault")
public ResponseEntity<Page<IBZEmployeeDTO>> searchDefault(IBZEmployeeSearchContext context) { public ResponseEntity<Page<IBZEmployeeDTO>> searchDefault(IBZEmployeeSearchContext context) {
......
...@@ -64,7 +64,7 @@ public class IBZOrganizationResource { ...@@ -64,7 +64,7 @@ public class IBZOrganizationResource {
@PreAuthorize("hasPermission(#ibzorganization_id,'UPDATE',this.getEntity())") @PreAuthorize("hasPermission(#ibzorganization_id,'Update',this.getEntity())")
@ApiOperation(value = "Update", tags = {"IBZOrganization" }, notes = "Update") @ApiOperation(value = "Update", tags = {"IBZOrganization" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}")
@Transactional @Transactional
...@@ -76,7 +76,7 @@ public class IBZOrganizationResource { ...@@ -76,7 +76,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(#ibzorganization_id,'UPDATE',this.getEntity())") @PreAuthorize("hasPermission(#ibzorganization_id,'Update',this.getEntity())")
@ApiOperation(value = "UpdateBatch", tags = {"UpdateBatch" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"UpdateBatch" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/updatebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/updatebatch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
...@@ -87,7 +87,7 @@ public class IBZOrganizationResource { ...@@ -87,7 +87,7 @@ public class IBZOrganizationResource {
@PreAuthorize("hasPermission('','CREATE',this.getEntity())") @PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "Create", tags = {"IBZOrganization" }, notes = "Create") @ApiOperation(value = "Create", tags = {"IBZOrganization" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations")
@Transactional @Transactional
...@@ -98,7 +98,7 @@ public class IBZOrganizationResource { ...@@ -98,7 +98,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission('','CREATE',this.getEntity())") @PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "createBatch", tags = {"createBatch" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"createBatch" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/createbatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/createbatch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
...@@ -125,7 +125,7 @@ public class IBZOrganizationResource { ...@@ -125,7 +125,7 @@ public class IBZOrganizationResource {
@PreAuthorize("hasPermission('DELETE',{#ibzorganization_id,this.getEntity()})") @PreAuthorize("hasPermission('Remove',{#ibzorganization_id,this.getEntity()})")
@ApiOperation(value = "Remove", tags = {"IBZOrganization" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"IBZOrganization" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}")
@Transactional @Transactional
...@@ -143,7 +143,7 @@ public class IBZOrganizationResource { ...@@ -143,7 +143,7 @@ public class IBZOrganizationResource {
@PreAuthorize("hasPermission(#ibzorganization_id,'READ',this.getEntity())") @PreAuthorize("hasPermission(#ibzorganization_id,'Get',this.getEntity())")
@ApiOperation(value = "Get", tags = {"IBZOrganization" }, notes = "Get") @ApiOperation(value = "Get", tags = {"IBZOrganization" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}")
public ResponseEntity<IBZOrganizationDTO> get(@PathVariable("ibzorganization_id") String ibzorganization_id) { public ResponseEntity<IBZOrganizationDTO> get(@PathVariable("ibzorganization_id") String ibzorganization_id) {
...@@ -161,7 +161,7 @@ public class IBZOrganizationResource { ...@@ -161,7 +161,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationMapping.toDto(ibzorganizationService.getDraft(new IBZOrganization()))); return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationMapping.toDto(ibzorganizationService.getDraft(new IBZOrganization())));
} }
@PreAuthorize("hasPermission('READ',{#context,'SelectSOrg',this.getEntity()})") @PreAuthorize("hasPermission('Get',{#context,'SelectSOrg',this.getEntity()})")
@ApiOperation(value = "fetch查询下级单位", tags = {"IBZOrganization" } ,notes = "fetch查询下级单位") @ApiOperation(value = "fetch查询下级单位", tags = {"IBZOrganization" } ,notes = "fetch查询下级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectsorg") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectsorg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectSOrg(IBZOrganizationSearchContext context) { public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectSOrg(IBZOrganizationSearchContext context) {
...@@ -174,7 +174,7 @@ public class IBZOrganizationResource { ...@@ -174,7 +174,7 @@ public class IBZOrganizationResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('READ',{#context,'SelectSOrg',this.getEntity()})") @PreAuthorize("hasPermission('Get',{#context,'SelectSOrg',this.getEntity()})")
@ApiOperation(value = "search查询下级单位", tags = {"IBZOrganization" } ,notes = "search查询下级单位") @ApiOperation(value = "search查询下级单位", tags = {"IBZOrganization" } ,notes = "search查询下级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/searchselectsorg") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/searchselectsorg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectSOrg(IBZOrganizationSearchContext context) { public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectSOrg(IBZOrganizationSearchContext context) {
...@@ -183,7 +183,7 @@ public class IBZOrganizationResource { ...@@ -183,7 +183,7 @@ public class IBZOrganizationResource {
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasPermission('READ',{#context,'SelectPOrg',this.getEntity()})") @PreAuthorize("hasPermission('Get',{#context,'SelectPOrg',this.getEntity()})")
@ApiOperation(value = "fetch查询上级单位", tags = {"IBZOrganization" } ,notes = "fetch查询上级单位") @ApiOperation(value = "fetch查询上级单位", tags = {"IBZOrganization" } ,notes = "fetch查询上级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectporg") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectporg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectPOrg(IBZOrganizationSearchContext context) { public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectPOrg(IBZOrganizationSearchContext context) {
...@@ -196,7 +196,7 @@ public class IBZOrganizationResource { ...@@ -196,7 +196,7 @@ public class IBZOrganizationResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('READ',{#context,'SelectPOrg',this.getEntity()})") @PreAuthorize("hasPermission('Get',{#context,'SelectPOrg',this.getEntity()})")
@ApiOperation(value = "search查询上级单位", tags = {"IBZOrganization" } ,notes = "search查询上级单位") @ApiOperation(value = "search查询上级单位", tags = {"IBZOrganization" } ,notes = "search查询上级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/searchselectporg") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/searchselectporg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectPOrg(IBZOrganizationSearchContext context) { public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectPOrg(IBZOrganizationSearchContext context) {
...@@ -205,7 +205,7 @@ public class IBZOrganizationResource { ...@@ -205,7 +205,7 @@ public class IBZOrganizationResource {
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})") @PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZOrganization" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"IBZOrganization" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchdefault")
public ResponseEntity<List<IBZOrganizationDTO>> fetchDefault(IBZOrganizationSearchContext context) { public ResponseEntity<List<IBZOrganizationDTO>> fetchDefault(IBZOrganizationSearchContext context) {
...@@ -218,7 +218,7 @@ public class IBZOrganizationResource { ...@@ -218,7 +218,7 @@ public class IBZOrganizationResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})") @PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZOrganization" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"IBZOrganization" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/searchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/searchdefault")
public ResponseEntity<Page<IBZOrganizationDTO>> searchDefault(IBZOrganizationSearchContext context) { public ResponseEntity<Page<IBZOrganizationDTO>> searchDefault(IBZOrganizationSearchContext context) {
......
server: server:
port: 8081 port: 40001
\ No newline at end of file \ No newline at end of file
...@@ -69,7 +69,7 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -69,7 +69,7 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
return false; return false;
List gridParamList = (ArrayList) gridParam; List gridParamList = (ArrayList) gridParam;
if(action.equals("DELETE")){ //grid delete if(action.equalsIgnoreCase("DELETE")){ //grid delete
//准备参数 //准备参数
Object srfKey =gridParamList.get(0); Object srfKey =gridParamList.get(0);
EntityBase entity = (EntityBase) gridParamList.get(1); EntityBase entity = (EntityBase) gridParamList.get(1);
...@@ -145,7 +145,7 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -145,7 +145,7 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
JSONObject permissionList=userPermission.getJSONObject("userPermissionList"); JSONObject permissionList=userPermission.getJSONObject("userPermissionList");
String entityName = entity.getClass().getSimpleName(); String entityName = entity.getClass().getSimpleName();
if(action.equals("CREATE")){ if(action.equalsIgnoreCase("CREATE")){
return validDEActionHasPermission(permissionList,entityName,action); return validDEActionHasPermission(permissionList,entityName,action);
} }
else{ else{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册