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

ibizdev提交

上级 dcfe22f3
...@@ -47,6 +47,14 @@ export default class AppFormDRUIPart extends Vue { ...@@ -47,6 +47,14 @@ export default class AppFormDRUIPart extends Vue {
*/ */
@Prop({ default: '' }) public refreshitems!: string; @Prop({ default: '' }) public refreshitems!: string;
/**
* 禁止加载
*
* @type {string}
* @memberof AppFormDRUIPart
*/
@Prop({ default: false }) public isForbidLoad!: boolean;
/** /**
* 关系视图类型 * 关系视图类型
* *
...@@ -254,8 +262,10 @@ export default class AppFormDRUIPart extends Vue { ...@@ -254,8 +262,10 @@ export default class AppFormDRUIPart extends Vue {
this.blockUIStop(); this.blockUIStop();
} }
} }
if(!this.isForbidLoad){
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}}); this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}});
} }
}
/** /**
* vue 生命周期 * vue 生命周期
......
...@@ -22,7 +22,7 @@ export const Environment = { ...@@ -22,7 +22,7 @@ export const Environment = {
// 是否为开发模式 // 是否为开发模式
devMode: true, devMode: true,
// 项目模板地址 // 项目模板地址
ProjectUrl: "http://demo.ibizlab.cn/groups/ibizr7pfstdtempl", ProjectUrl: "http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7",
// 配置平台地址 // 配置平台地址
StudioUrl: "http://172.16.170.145/slnstudio/", StudioUrl: "http://172.16.170.145/slnstudio/",
// 中心标识 // 中心标识
......
...@@ -92,7 +92,7 @@ export class StudioActionUtil { ...@@ -92,7 +92,7 @@ export class StudioActionUtil {
const config: any = await this.getConfig(viewName); const config: any = await this.getConfig(viewName);
if (config) { if (config) {
const context: string = `视图模块:${config.viewmodule}\n视图标识:${config.viewname}\n视图类型:${config.viewtype}\n`; const context: string = `视图模块:${config.viewmodule}\n视图标识:${config.viewname}\n视图类型:${config.viewtype}\n`;
window.open(`${Environment.ProjectUrl}/issues/`, '_blank'); window.open(`${Environment.ProjectUrl}/issues/new?issue[title]=${encodeURIComponent('问题')}&issue[description]=${encodeURIComponent(context)}`, '_blank');
} }
} }
......
...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService { ...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.deptid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.ibzdepartment = Data.deptid; Data.deptid = PrimaryKey;
Data.ibzdepartment = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService { ...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.deptid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -297,8 +297,9 @@ export default class MainService extends ControlService { ...@@ -297,8 +297,9 @@ export default class MainService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.deptid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.ibzdepartment = Data.deptid; Data.deptid = PrimaryKey;
Data.ibzdepartment = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -308,6 +309,7 @@ export default class MainService extends ControlService { ...@@ -308,6 +309,7 @@ export default class MainService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.deptid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -264,7 +264,7 @@ export default class MainService extends ControlService { ...@@ -264,7 +264,7 @@ export default class MainService extends ControlService {
if(response.data){ if(response.data){
Object.assign(response.data,{srfuf:'0'}); Object.assign(response.data,{srfuf:'0'});
//仿真主键数据 //仿真主键数据
response.data.ibzdepartment = Util.createUUID(); response.data.deptid = Util.createUUID();
} }
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
this.mergeDefaults(response); this.mergeDefaults(response);
......
...@@ -297,8 +297,9 @@ export default class NewFormService extends ControlService { ...@@ -297,8 +297,9 @@ export default class NewFormService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.deptid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.ibzdepartment = Data.deptid; Data.deptid = PrimaryKey;
Data.ibzdepartment = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -308,6 +309,7 @@ export default class NewFormService extends ControlService { ...@@ -308,6 +309,7 @@ export default class NewFormService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.deptid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -282,8 +282,9 @@ export default class ChangePwService extends ControlService { ...@@ -282,8 +282,9 @@ export default class ChangePwService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.userid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.ibzemployee = Data.userid; Data.userid = PrimaryKey;
Data.ibzemployee = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class ChangePwService extends ControlService { ...@@ -293,6 +294,7 @@ export default class ChangePwService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.userid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService { ...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.userid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.ibzemployee = Data.userid; Data.userid = PrimaryKey;
Data.ibzemployee = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService { ...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.userid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -306,8 +306,9 @@ export default class MainService extends ControlService { ...@@ -306,8 +306,9 @@ export default class MainService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.userid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.ibzemployee = Data.userid; Data.userid = PrimaryKey;
Data.ibzemployee = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -317,6 +318,7 @@ export default class MainService extends ControlService { ...@@ -317,6 +318,7 @@ export default class MainService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.userid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -264,7 +264,7 @@ export default class MainService extends ControlService { ...@@ -264,7 +264,7 @@ export default class MainService extends ControlService {
if(response.data){ if(response.data){
Object.assign(response.data,{srfuf:'0'}); Object.assign(response.data,{srfuf:'0'});
//仿真主键数据 //仿真主键数据
response.data.ibzemployee = Util.createUUID(); response.data.userid = Util.createUUID();
} }
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
this.mergeDefaults(response); this.mergeDefaults(response);
......
...@@ -306,8 +306,9 @@ export default class NewFormService extends ControlService { ...@@ -306,8 +306,9 @@ export default class NewFormService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.userid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.ibzemployee = Data.userid; Data.userid = PrimaryKey;
Data.ibzemployee = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -317,6 +318,7 @@ export default class NewFormService extends ControlService { ...@@ -317,6 +318,7 @@ export default class NewFormService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.userid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -283,8 +283,9 @@ export default class DefaultService extends ControlService { ...@@ -283,8 +283,9 @@ export default class DefaultService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.orgid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.ibzorganization = Data.orgid; Data.orgid = PrimaryKey;
Data.ibzorganization = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -294,6 +295,7 @@ export default class DefaultService extends ControlService { ...@@ -294,6 +295,7 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.orgid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -285,8 +285,9 @@ export default class MainService extends ControlService { ...@@ -285,8 +285,9 @@ export default class MainService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.orgid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.ibzorganization = Data.orgid; Data.orgid = PrimaryKey;
Data.ibzorganization = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -296,6 +297,7 @@ export default class MainService extends ControlService { ...@@ -296,6 +297,7 @@ export default class MainService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.orgid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -264,7 +264,7 @@ export default class MainService extends ControlService { ...@@ -264,7 +264,7 @@ export default class MainService extends ControlService {
if(response.data){ if(response.data){
Object.assign(response.data,{srfuf:'0'}); Object.assign(response.data,{srfuf:'0'});
//仿真主键数据 //仿真主键数据
response.data.ibzorganization = Util.createUUID(); response.data.orgid = Util.createUUID();
} }
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
this.mergeDefaults(response); this.mergeDefaults(response);
......
...@@ -285,8 +285,9 @@ export default class NewFormService extends ControlService { ...@@ -285,8 +285,9 @@ export default class NewFormService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.orgid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.ibzorganization = Data.orgid; Data.orgid = PrimaryKey;
Data.ibzorganization = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -296,6 +297,7 @@ export default class NewFormService extends ControlService { ...@@ -296,6 +297,7 @@ export default class NewFormService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.orgid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -37,11 +37,6 @@ ...@@ -37,11 +37,6 @@
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 -Pweb
cd ibzou-app/ibzou-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-app-web.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -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-app-web.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar
EXPOSE 30001 EXPOSE 8080
ADD ibzou-app-web.jar /ibzou-app-web.jar ADD ibzou-app-web.jar /ibzou-app-web.jar
...@@ -3,11 +3,9 @@ services: ...@@ -3,11 +3,9 @@ services:
ibzou-app-web: ibzou-app-web:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest
ports: ports:
- "30001:30001" - "8080:8080"
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
......
...@@ -42,6 +42,9 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -42,6 +42,9 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter {
@Value("${ibiz.auth.path:v7/login}") @Value("${ibiz.auth.path:v7/login}")
private String loginPath; private String loginPath;
@Value("${ibiz.auth.logoutpath:v7/logout}")
private String logoutPath;
@Value("${ibiz.file.uploadpath:ibizutil/upload}") @Value("${ibiz.file.uploadpath:ibizutil/upload}")
private String uploadpath; private String uploadpath;
...@@ -107,6 +110,8 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -107,6 +110,8 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter {
).permitAll() ).permitAll()
//放行登录请求 //放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll() .antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
//放行注销请求
.antMatchers( HttpMethod.POST,"/"+logoutPath).permitAll()
// 文件操作 // 文件操作
.antMatchers("/"+downloadpath+"/**").permitAll() .antMatchers("/"+downloadpath+"/**").permitAll()
.antMatchers("/"+uploadpath).permitAll() .antMatchers("/"+uploadpath).permitAll()
......
server: server:
port: 30001 port: 8080
\ No newline at end of file \ No newline at end of file
server: server:
port: 30001 port: 8080
#zuul网关路由设置 #zuul网关路由设置
zuul: zuul:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<!--输出实体[IBZORG]数据结构 --> <!--输出实体[IBZORG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzorg-422-1"> <changeSet author="a_A_5d9d78509" id="tab-ibzorg-423-1">
<createTable tableName="IBZORG"> <createTable tableName="IBZORG">
<column name="ORGID" remarks="" type="VARCHAR(100)"> <column name="ORGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZORG_ORGID"/> <constraints primaryKey="true" primaryKeyName="PK_IBZORG_ORGID"/>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[IBZDEPT]数据结构 --> <!--输出实体[IBZDEPT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzdept-530-3"> <changeSet author="a_A_5d9d78509" id="tab-ibzdept-531-3">
<createTable tableName="IBZDEPT"> <createTable tableName="IBZDEPT">
<column name="DEPTID" remarks="" type="VARCHAR(100)"> <column name="DEPTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDEPT_DEPTID"/> <constraints primaryKey="true" primaryKeyName="PK_IBZDEPT_DEPTID"/>
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</changeSet> </changeSet>
<!--输出实体[IBZORG]外键关系 --> <!--输出实体[IBZORG]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzorg-422-4"> <changeSet author="a_A_5d9d78509" id="fk-ibzorg-423-4">
<addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_IBZORG_IBZORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_IBZORG_IBZORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[IBZEMP]外键关系 --> <!--输出实体[IBZEMP]外键关系 -->
...@@ -148,10 +148,10 @@ ...@@ -148,10 +148,10 @@
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZEMP" constraintName="DER1N_IBZEMP_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZEMP" constraintName="DER1N_IBZEMP_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[IBZDEPT]外键关系 --> <!--输出实体[IBZDEPT]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-530-7"> <changeSet author="a_A_5d9d78509" id="fk-ibzdept-531-7">
<addForeignKeyConstraint baseColumnNames="PDEPTID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZDEPT_PDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/> <addForeignKeyConstraint baseColumnNames="PDEPTID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZDEPT_PDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-530-8"> <changeSet author="a_A_5d9d78509" id="fk-ibzdept-531-8">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet> </changeSet>
......
{
"unires":[
],
"predefineddatarange":[{"id":"ALL","name":"全部数据"},{"id":"CURORG","name":"当前单位"},{"id":"PORG","name":"上级单位"},{"id":"SORG","name":"下级单位"},{"id":"CURORGDEPT","name":"当前部门"},{"id":"PORGDEPT","name":"上级部门"},{"id":"SORGDEPT","name":"下级部门"}],
"entities":[
],
"appmenus":[
{
"appid":"web",
"appname":"统一组织单位",
"appmenu":[{"menuid":"OUIndexView", "menuname":"OUIndexView", "menuitem":[{ "id":"menuitem1" , "name":"单位管理" },{ "id":"menuitem2" , "name":"部门管理" },{ "id":"menuitem3" , "name":"人员管理" }] }]
}
]
}
...@@ -3,13 +3,14 @@ package cn.ibizlab.util.client; ...@@ -3,13 +3,14 @@ package cn.ibizlab.util.client;
import cn.ibizlab.util.security.AuthenticationUser; import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.security.AuthorizationLogin; import cn.ibizlab.util.security.AuthorizationLogin;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import java.util.Map; import java.util.Map;
@Component @Component
public class IBZUAAFallback implements IBZUAAFeignClient { public class IBZUAAFallback implements IBZUAAFeignClient {
@Override @Override
public Map<String, Object> pushSystemPermissionData(Map<String, Object> systemPermissionData, String systemId) { public JSONObject pushSystemPermissionData(Map<String, Object> systemPermissionData, String systemId) {
return null; return null;
} }
......
...@@ -4,6 +4,7 @@ import cn.ibizlab.util.security.AuthenticationUser; ...@@ -4,6 +4,7 @@ import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.security.AuthorizationLogin; import cn.ibizlab.util.security.AuthorizationLogin;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject;
import java.util.Map; import java.util.Map;
@FeignClient(value = "ibzuaa-api",fallback = IBZUAAFallback.class) @FeignClient(value = "ibzuaa-api",fallback = IBZUAAFallback.class)
...@@ -16,7 +17,7 @@ public interface IBZUAAFeignClient ...@@ -16,7 +17,7 @@ public interface IBZUAAFeignClient
* @return * @return
*/ */
@PostMapping("/uaa/permission/save") @PostMapping("/uaa/permission/save")
Map<String,Object> pushSystemPermissionData(@RequestBody Map<String, Object> systemPermissionData, @RequestParam("systemid") String systemId); JSONObject pushSystemPermissionData(@RequestBody Map<String, Object> systemPermissionData, @RequestParam("systemid") String systemId);
/** /**
* 用户登录 * 用户登录
......
...@@ -39,15 +39,20 @@ public class PermissionSyncJob implements ApplicationRunner { ...@@ -39,15 +39,20 @@ public class PermissionSyncJob implements ApplicationRunner {
public void run(ApplicationArguments args) { public void run(ApplicationArguments args) {
if(enablePermissionValid){ if(enablePermissionValid){
try { try {
InputStream permission= this.getClass().getResourceAsStream("/deprivs/DEPrivs.json"); //获取当前系统所有实体资源能力 InputStream permission= this.getClass().getResourceAsStream("/permission/systemResource.json"); //获取当前系统所有实体资源能力
String permissionResult = IOUtils.toString(permission,"UTF-8"); String permissionResult = IOUtils.toString(permission,"UTF-8");
JSONObject jsonNodePermission = JSONObject.parseObject(permissionResult); JSONObject jsonNodePermission = JSONObject.parseObject(permissionResult);
Map<String,Object> map=new HashMap<>(); Map<String,Object> map=new HashMap<>();
map.put("permission",jsonNodePermission); map.put("permission",jsonNodePermission);
client.pushSystemPermissionData(map,systemId); JSONObject syncResult=client.pushSystemPermissionData(map,systemId);
if(syncResult.getInteger("code")==1){
log.info("向[UAA]同步系统资源成功");
}else{
log.info(String.format("向[UAA]同步系统资源失败,失败原因为[%s]",syncResult.getString("msg")));
}
} }
catch (Exception ex) { catch (Exception ex) {
log.error(String.format("向UAA同步数据发生错误,请检查UAA服务是否正常! [%s]",ex)); log.error(String.format("向[UAA]同步系统资源失败,请检查[UAA]服务是否正常! [%s]",ex));
} }
} }
} }
......
...@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Autowired;
import cn.ibizlab.util.security.AuthenticationUser; import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.service.AuthenticationUserService;
@RestController @RestController
@RequestMapping(value = "") @RequestMapping(value = "")
...@@ -18,19 +20,32 @@ public class AppController { ...@@ -18,19 +20,32 @@ public class AppController {
@Value("${ibiz.enablePermissionValid:false}") @Value("${ibiz.enablePermissionValid:false}")
boolean enablePermissionValid; //是否开启权限校验 boolean enablePermissionValid; //是否开启权限校验
@Autowired
private AuthenticationUserService userDetailsService;
@RequestMapping(method = RequestMethod.GET, value = "/appdata") @RequestMapping(method = RequestMethod.GET, value = "/appdata")
public ResponseEntity<JSONObject> getAppData() { public ResponseEntity<JSONObject> getAppData() {
JSONObject appData = new JSONObject() ; JSONObject appData = new JSONObject() ;
JSONArray uniRes=new JSONArray(); JSONArray uniRes=new JSONArray();
JSONArray appMenu=new JSONArray();
if(enablePermissionValid){ if(enablePermissionValid){
JSONObject userPermission=AuthenticationUser.getAuthenticationUser().getPermissionList(); JSONObject userPermission=AuthenticationUser.getAuthenticationUser().getPermissionList();
if(!ObjectUtils.isEmpty(userPermission)){ if(!ObjectUtils.isEmpty(userPermission)){
uniRes = userPermission.getJSONArray("unires"); uniRes = userPermission.getJSONArray("unires");
appMenu = userPermission.getJSONArray("appmenu");
} }
} }
appData.put("unires",uniRes); appData.put("unires",uniRes);
appData.put("appmenu",appMenu);
appData.put("enablepermissionvalid",enablePermissionValid); appData.put("enablepermissionvalid",enablePermissionValid);
return ResponseEntity.status(HttpStatus.OK).body(appData); return ResponseEntity.status(HttpStatus.OK).body(appData);
} }
@RequestMapping(method = RequestMethod.GET, value = "${ibiz.auth.logoutpath:v7/logout}")
public void logout() {
if(AuthenticationUser.getAuthenticationUser()!=null){
userDetailsService.resetByUsername(AuthenticationUser.getAuthenticationUser().getUsername());
}
}
} }
...@@ -18,7 +18,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; ...@@ -18,7 +18,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
* 实体[IBZUSER] 服务对象接口实现 * 实体[IBZUSER] 服务对象接口实现
*/ */
@Service("IBZUAAUserService") @Service("IBZUAAUserService")
@ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.service:SimpleUserService}'.equals('IBZUAAUserService')") @ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.service:IBZUAAUserService}'.equals('IBZUAAUserService')")
public class IBZUAAUserService implements AuthenticationUserService{ public class IBZUAAUserService implements AuthenticationUserService{
@Autowired @Autowired
......
...@@ -19,7 +19,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; ...@@ -19,7 +19,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
* 实体[IBZUSER] 服务对象接口实现 * 实体[IBZUSER] 服务对象接口实现
*/ */
@Service("IBZUSERService") @Service("IBZUSERService")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:SimpleUserService}'.equals('IBZUSERService')") @ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:IBZUAAUserService}'.equals('IBZUSERService')")
public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> implements IBZUSERService,AuthenticationUserService{ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> implements IBZUSERService,AuthenticationUserService{
@Value("${ibiz.auth.pwencrymode:0}") @Value("${ibiz.auth.pwencrymode:0}")
......
...@@ -18,7 +18,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; ...@@ -18,7 +18,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
*/ */
@Primary @Primary
@Service("SimpleUserService") @Service("SimpleUserService")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:SimpleUserService}'.equals('SimpleUserService')") @ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:IBZUAAUserService}'.equals('SimpleUserService')")
public class SimpleUserService implements AuthenticationUserService{ public class SimpleUserService implements AuthenticationUserService{
@Override @Override
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册