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

ibizdev提交

上级 87e01ce8
# 系统概览 # 系统概览 iBiz4j Spring R7 dev
import EditViewEngine from './edit-view-engine';
/**
* 视图引擎基础
*
* @export
* @class WFDynaEditViewEngine
* @extends {EditViewEngine}
*/
export default class WFDynaEditViewEngine extends EditViewEngine {
/**
* Creates an instance of WFDynaEditViewEngine.
* @memberof WFDynaEditViewEngine
*/
constructor() {
super();
}
/**
* 表单加载完成
*
* @param {*} args
* @memberof WFDynaEditViewEngine
*/
public onFormLoad(arg: any): void {
super.onFormLoad(arg);
this.view.getWFLinkModel();
}
}
\ No newline at end of file
...@@ -4,6 +4,7 @@ export default { ...@@ -4,6 +4,7 @@ export default {
userid: '用户标识', userid: '用户标识',
username: '用户全局名', username: '用户全局名',
personname: '用户姓名', personname: '用户姓名',
password: '密码',
}, },
views: { views: {
mpickupview: { mpickupview: {
......
...@@ -3,6 +3,7 @@ export default { ...@@ -3,6 +3,7 @@ export default {
userid: '用户标识', userid: '用户标识',
username: '用户全局名', username: '用户全局名',
personname: '用户姓名', personname: '用户姓名',
password: '密码',
}, },
views: { views: {
mpickupview: { mpickupview: {
......
...@@ -759,7 +759,7 @@ export default class EntityService { ...@@ -759,7 +759,7 @@ export default class EntityService {
* @memberof EntityService * @memberof EntityService
*/ */
public async GetWFLink(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async GetWFLink(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${data[this.APPDEKEY]}/usertasks/${data['taskDefinitionKey']}/ways`); return Http.getInstance().get(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${context[this.APPLYDEKEY]}/usertasks/${data['taskDefinitionKey']}/ways`);
} }
/** /**
...@@ -768,13 +768,19 @@ export default class EntityService { ...@@ -768,13 +768,19 @@ export default class EntityService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {boolean} [isEmbeddedApp] * @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof EntityService * @memberof EntityService
*/ */
public async WFSubmit(context: any = {},data: any = {}, isloading?: boolean,isEmbeddedApp?:boolean): Promise<any> { public async WFSubmit(context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
if(isEmbeddedApp){ if(localdata && Object.keys(localdata).length > 0){
return Http.getInstance().post(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${data[this.APPDEKEY]}/tasks/${data['taskId']}`); const requestData:any = {};
if(data.viewparams){
delete data.viewparams;
}
Object.assign(requestData,{activedata:data});
Object.assign(requestData,localdata);
return Http.getInstance().post(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${data[this.APPDEKEY]}/tasks/${localdata['taskId']}`,requestData,isloading);
}else{ }else{
const requestData:any = {}; const requestData:any = {};
if(data.srfwfmemo){ if(data.srfwfmemo){
......
...@@ -122,20 +122,21 @@ export default class DefaultService extends ControlService { ...@@ -122,20 +122,21 @@ export default class DefaultService extends ControlService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof DefaultService * @memberof DefaultService
*/ */
@Errorlog @Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true); data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context; context = this.handleRequestData(action,context,data).context;
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;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading); result = _appEntityService[action](context,data, isloading,localdata);
} else { } else {
result = this.appEntityService.Create(context,data, isloading); result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -1295,10 +1295,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1295,10 +1295,11 @@ export default class MainBase extends Vue implements ControlInterface {
* 工作流提交 * 工作流提交
* *
* @param {*} [data={}] * @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof Main * @memberof Main
*/ */
protected async wfsubmit(data: any): Promise<any> { protected async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){ if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: 'SYS_PERMISSIONEditView视图表单WFSubmitAction参数未配置' }); this.$Notice.error({ title: '错误', desc: 'SYS_PERMISSIONEditView视图表单WFSubmitAction参数未配置' });
...@@ -1310,13 +1311,13 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1310,13 +1311,13 @@ export default class MainBase extends Vue implements ControlInterface {
if (!arg.sys_permission || Object.is(arg.sys_permission, '')) { if (!arg.sys_permission || Object.is(arg.sys_permission, '')) {
return; return;
} }
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
} }
const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => { result.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info }); this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info });
......
...@@ -122,20 +122,21 @@ export default class MainService extends ControlService { ...@@ -122,20 +122,21 @@ export default class MainService extends ControlService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof MainService * @memberof MainService
*/ */
@Errorlog @Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true); data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context; context = this.handleRequestData(action,context,data).context;
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;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading); result = _appEntityService[action](context,data, isloading,localdata);
} else { } else {
result = this.appEntityService.Create(context,data, isloading); result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -122,20 +122,21 @@ export default class DefaultService extends ControlService { ...@@ -122,20 +122,21 @@ export default class DefaultService extends ControlService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof DefaultService * @memberof DefaultService
*/ */
@Errorlog @Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true); data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context; context = this.handleRequestData(action,context,data).context;
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;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading); result = _appEntityService[action](context,data, isloading,localdata);
} else { } else {
result = this.appEntityService.Create(context,data, isloading); result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -1388,10 +1388,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1388,10 +1388,11 @@ export default class MainBase extends Vue implements ControlInterface {
* 工作流提交 * 工作流提交
* *
* @param {*} [data={}] * @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof Main * @memberof Main
*/ */
protected async wfsubmit(data: any): Promise<any> { protected async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){ if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: 'SYS_ROLE_PERMISSIONEditView2视图表单WFSubmitAction参数未配置' }); this.$Notice.error({ title: '错误', desc: 'SYS_ROLE_PERMISSIONEditView2视图表单WFSubmitAction参数未配置' });
...@@ -1403,13 +1404,13 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1403,13 +1404,13 @@ export default class MainBase extends Vue implements ControlInterface {
if (!arg.sys_role_permission || Object.is(arg.sys_role_permission, '')) { if (!arg.sys_role_permission || Object.is(arg.sys_role_permission, '')) {
return; return;
} }
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
} }
const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => { result.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info }); this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info });
......
...@@ -146,20 +146,21 @@ export default class MainService extends ControlService { ...@@ -146,20 +146,21 @@ export default class MainService extends ControlService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof MainService * @memberof MainService
*/ */
@Errorlog @Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true); data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context; context = this.handleRequestData(action,context,data).context;
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;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading); result = _appEntityService[action](context,data, isloading,localdata);
} else { } else {
result = this.appEntityService.Create(context,data, isloading); result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -122,20 +122,21 @@ export default class DefaultService extends ControlService { ...@@ -122,20 +122,21 @@ export default class DefaultService extends ControlService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof DefaultService * @memberof DefaultService
*/ */
@Errorlog @Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true); data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context; context = this.handleRequestData(action,context,data).context;
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;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading); result = _appEntityService[action](context,data, isloading,localdata);
} else { } else {
result = this.appEntityService.Create(context,data, isloading); result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -1313,10 +1313,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1313,10 +1313,11 @@ export default class MainBase extends Vue implements ControlInterface {
* 工作流提交 * 工作流提交
* *
* @param {*} [data={}] * @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof Main * @memberof Main
*/ */
protected async wfsubmit(data: any): Promise<any> { protected async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){ if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: 'SYS_ROLEEditView视图表单WFSubmitAction参数未配置' }); this.$Notice.error({ title: '错误', desc: 'SYS_ROLEEditView视图表单WFSubmitAction参数未配置' });
...@@ -1328,13 +1329,13 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1328,13 +1329,13 @@ export default class MainBase extends Vue implements ControlInterface {
if (!arg.sys_role || Object.is(arg.sys_role, '')) { if (!arg.sys_role || Object.is(arg.sys_role, '')) {
return; return;
} }
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
} }
const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => { result.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info }); this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info });
......
...@@ -122,20 +122,21 @@ export default class MainService extends ControlService { ...@@ -122,20 +122,21 @@ export default class MainService extends ControlService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof MainService * @memberof MainService
*/ */
@Errorlog @Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true); data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context; context = this.handleRequestData(action,context,data).context;
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;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading); result = _appEntityService[action](context,data, isloading,localdata);
} else { } else {
result = this.appEntityService.Create(context,data, isloading); result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -122,20 +122,21 @@ export default class DefaultService extends ControlService { ...@@ -122,20 +122,21 @@ export default class DefaultService extends ControlService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof DefaultService * @memberof DefaultService
*/ */
@Errorlog @Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true); data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context; context = this.handleRequestData(action,context,data).context;
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;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading); result = _appEntityService[action](context,data, isloading,localdata);
} else { } else {
result = this.appEntityService.Create(context,data, isloading); result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -1429,10 +1429,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1429,10 +1429,11 @@ export default class MainBase extends Vue implements ControlInterface {
* 工作流提交 * 工作流提交
* *
* @param {*} [data={}] * @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof Main * @memberof Main
*/ */
protected async wfsubmit(data: any): Promise<any> { protected async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){ if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: 'SYS_USER_ROLEEditView2视图表单WFSubmitAction参数未配置' }); this.$Notice.error({ title: '错误', desc: 'SYS_USER_ROLEEditView2视图表单WFSubmitAction参数未配置' });
...@@ -1444,13 +1445,13 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1444,13 +1445,13 @@ export default class MainBase extends Vue implements ControlInterface {
if (!arg.sys_user_role || Object.is(arg.sys_user_role, '')) { if (!arg.sys_user_role || Object.is(arg.sys_user_role, '')) {
return; return;
} }
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
} }
const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => { result.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info }); this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info });
......
...@@ -146,20 +146,21 @@ export default class MainService extends ControlService { ...@@ -146,20 +146,21 @@ export default class MainService extends ControlService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof MainService * @memberof MainService
*/ */
@Errorlog @Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true); data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context; context = this.handleRequestData(action,context,data).context;
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;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading); result = _appEntityService[action](context,data, isloading,localdata);
} else { } else {
result = this.appEntityService.Create(context,data, isloading); result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -24,6 +24,9 @@ export default class DefaultModel { ...@@ -24,6 +24,9 @@ export default class DefaultModel {
{ {
name: 'personname', name: 'personname',
}, },
{
name: 'password',
},
] ]
} }
......
...@@ -122,20 +122,21 @@ export default class DefaultService extends ControlService { ...@@ -122,20 +122,21 @@ export default class DefaultService extends ControlService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof DefaultService * @memberof DefaultService
*/ */
@Errorlog @Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true); data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context; context = this.handleRequestData(action,context,data).context;
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;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading); result = _appEntityService[action](context,data, isloading,localdata);
} else { } else {
result = this.appEntityService.Create(context,data, isloading); result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -1278,10 +1278,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1278,10 +1278,11 @@ export default class MainBase extends Vue implements ControlInterface {
* 工作流提交 * 工作流提交
* *
* @param {*} [data={}] * @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof Main * @memberof Main
*/ */
protected async wfsubmit(data: any): Promise<any> { protected async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){ if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: 'SYS_USEREditView视图表单WFSubmitAction参数未配置' }); this.$Notice.error({ title: '错误', desc: 'SYS_USEREditView视图表单WFSubmitAction参数未配置' });
...@@ -1293,13 +1294,13 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1293,13 +1294,13 @@ export default class MainBase extends Vue implements ControlInterface {
if (!arg.sys_user || Object.is(arg.sys_user, '')) { if (!arg.sys_user || Object.is(arg.sys_user, '')) {
return; return;
} }
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
} }
const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => { result.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info }); this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info });
......
...@@ -122,20 +122,21 @@ export default class MainService extends ControlService { ...@@ -122,20 +122,21 @@ export default class MainService extends ControlService {
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof MainService * @memberof MainService
*/ */
@Errorlog @Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true); data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context; context = this.handleRequestData(action,context,data).context;
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;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading); result = _appEntityService[action](context,data, isloading,localdata);
} else { } else {
result = this.appEntityService.Create(context,data, isloading); result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -24,6 +24,9 @@ export default class MPickupViewpickupviewpanelModel { ...@@ -24,6 +24,9 @@ export default class MPickupViewpickupviewpanelModel {
{ {
name: 'personname', name: 'personname',
}, },
{
name: 'password',
},
] ]
} }
......
...@@ -24,6 +24,9 @@ export default class PickupViewpickupviewpanelModel { ...@@ -24,6 +24,9 @@ export default class PickupViewpickupviewpanelModel {
{ {
name: 'personname', name: 'personname',
}, },
{
name: 'password',
},
] ]
} }
......
...@@ -35,6 +35,6 @@ zuul: ...@@ -35,6 +35,6 @@ zuul:
wfcore: wfcore:
path: /wfcore/** path: /wfcore/**
serviceId: ibzwf-api serviceId: ibzwf-api
stripPrefix: false stripPrefix: true
sensitive-headers: sensitive-headers:
- Cookie,Set-Cookie,Authorization - Cookie,Set-Cookie,Authorization
...@@ -54,6 +54,13 @@ public class SYS_USER extends EntityMP implements Serializable { ...@@ -54,6 +54,13 @@ public class SYS_USER extends EntityMP implements Serializable {
@JSONField(name = "personname") @JSONField(name = "personname")
@JsonProperty("personname") @JsonProperty("personname")
private String personname; private String personname;
/**
* 密码
*/
@TableField(value = "password")
@JSONField(name = "password")
@JsonProperty("password")
private String password;
/** /**
...@@ -79,6 +86,13 @@ public class SYS_USER extends EntityMP implements Serializable { ...@@ -79,6 +86,13 @@ public class SYS_USER extends EntityMP implements Serializable {
this.personname = personname ; this.personname = personname ;
this.modify("personname",personname); this.modify("personname",personname);
} }
/**
* 设置 [密码]
*/
public void setPassword(String password){
this.password = password ;
this.modify("password",password);
}
} }
......
...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Map; import java.util.HashMap;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.uaa.domain.SYS_PERMISSION; import cn.ibizlab.core.uaa.domain.SYS_PERMISSION;
import cn.ibizlab.core.uaa.filter.SYS_PERMISSIONSearchContext; import cn.ibizlab.core.uaa.filter.SYS_PERMISSIONSearchContext;
......
...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Map; import java.util.HashMap;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.uaa.domain.SYS_PSAPPMENUITEM; import cn.ibizlab.core.uaa.domain.SYS_PSAPPMENUITEM;
import cn.ibizlab.core.uaa.filter.SYS_PSAPPMENUITEMSearchContext; import cn.ibizlab.core.uaa.filter.SYS_PSAPPMENUITEMSearchContext;
......
...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Map; import java.util.HashMap;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.uaa.domain.SYS_PSDEOPPRIV; import cn.ibizlab.core.uaa.domain.SYS_PSDEOPPRIV;
import cn.ibizlab.core.uaa.filter.SYS_PSDEOPPRIVSearchContext; import cn.ibizlab.core.uaa.filter.SYS_PSDEOPPRIVSearchContext;
......
...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Map; import java.util.HashMap;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.uaa.domain.SYS_PSSYSTEM; import cn.ibizlab.core.uaa.domain.SYS_PSSYSTEM;
import cn.ibizlab.core.uaa.filter.SYS_PSSYSTEMSearchContext; import cn.ibizlab.core.uaa.filter.SYS_PSSYSTEMSearchContext;
......
...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Map; import java.util.HashMap;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.uaa.domain.SYS_ROLE; import cn.ibizlab.core.uaa.domain.SYS_ROLE;
import cn.ibizlab.core.uaa.filter.SYS_ROLESearchContext; import cn.ibizlab.core.uaa.filter.SYS_ROLESearchContext;
......
...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Map; import java.util.HashMap;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.uaa.domain.SYS_ROLE_PERMISSION; import cn.ibizlab.core.uaa.domain.SYS_ROLE_PERMISSION;
import cn.ibizlab.core.uaa.filter.SYS_ROLE_PERMISSIONSearchContext; import cn.ibizlab.core.uaa.filter.SYS_ROLE_PERMISSIONSearchContext;
......
...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Map; import java.util.HashMap;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.uaa.domain.SYS_USER; import cn.ibizlab.core.uaa.domain.SYS_USER;
import cn.ibizlab.core.uaa.filter.SYS_USERSearchContext; import cn.ibizlab.core.uaa.filter.SYS_USERSearchContext;
......
...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Map; import java.util.HashMap;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.uaa.domain.SYS_USER_ROLE; import cn.ibizlab.core.uaa.domain.SYS_USER_ROLE;
import cn.ibizlab.core.uaa.filter.SYS_USER_ROLESearchContext; import cn.ibizlab.core.uaa.filter.SYS_USER_ROLESearchContext;
......
...@@ -5,6 +5,7 @@ import java.util.ArrayList; ...@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection; import java.util.Collection;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
......
...@@ -5,6 +5,7 @@ import java.util.ArrayList; ...@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection; import java.util.Collection;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
......
...@@ -5,6 +5,7 @@ import java.util.ArrayList; ...@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection; import java.util.Collection;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
......
...@@ -5,6 +5,7 @@ import java.util.ArrayList; ...@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection; import java.util.Collection;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
......
...@@ -5,6 +5,7 @@ import java.util.ArrayList; ...@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection; import java.util.Collection;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
......
...@@ -5,6 +5,7 @@ import java.util.ArrayList; ...@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection; import java.util.Collection;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
......
...@@ -5,6 +5,7 @@ import java.util.ArrayList; ...@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection; import java.util.Collection;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
......
...@@ -5,6 +5,7 @@ import java.util.ArrayList; ...@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection; import java.util.Collection;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[SYS_USER]数据结构 --> <!--输出实体[SYS_USER]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_user-37-2"> <changeSet author="a_A_5d9d78509" id="tab-sys_user-39-2">
<createTable tableName="IBZUSER"> <createTable tableName="IBZUSER">
<column name="USERID" remarks="" type="VARCHAR(100)"> <column name="USERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_USER_USERID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_USER_USERID"/>
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
</column> </column>
<column name="PERSONNAME" remarks="" type="VARCHAR(100)"> <column name="PERSONNAME" remarks="" type="VARCHAR(100)">
</column> </column>
<column name="PASSWORD" remarks="" type="VARCHAR(100)">
</column>
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 --> <!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`PERSONNAME`, t1.`USERID`, t1.`USERNAME` FROM `IBZUSER` t1 <![CDATA[ SELECT t1.`PASSWORD`, t1.`PERSONNAME`, t1.`USERID`, t1.`USERNAME` FROM `IBZUSER` t1
]]> ]]>
</sql> </sql>
......
...@@ -47,6 +47,14 @@ public class SYS_USERDTO extends DTOBase implements Serializable { ...@@ -47,6 +47,14 @@ public class SYS_USERDTO extends DTOBase implements Serializable {
@JsonProperty("personname") @JsonProperty("personname")
private String personname; private String personname;
/**
* 属性 [PASSWORD]
*
*/
@JSONField(name = "password")
@JsonProperty("password")
private String password;
/** /**
* 设置 [USERNAME] * 设置 [USERNAME]
...@@ -64,6 +72,14 @@ public class SYS_USERDTO extends DTOBase implements Serializable { ...@@ -64,6 +72,14 @@ public class SYS_USERDTO extends DTOBase implements Serializable {
this.modify("personname",personname); this.modify("personname",personname);
} }
/**
* 设置 [PASSWORD]
*/
public void setPassword(String password){
this.password = password ;
this.modify("password",password);
}
} }
package cn.ibizlab.util.client; package cn.ibizlab.util.client;
import com.alibaba.fastjson.JSONObject; import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.security.AuthorizationLogin;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Map; import java.util.Map;
...@@ -8,12 +9,12 @@ import java.util.Map; ...@@ -8,12 +9,12 @@ import java.util.Map;
public class IBZUAAFallback implements IBZUAAFeignClient { public class IBZUAAFallback implements IBZUAAFeignClient {
@Override @Override
public JSONObject getUserPermissionData(String loginName, String systemId) { public Map<String, Object> pushSystemPermissionData(Map<String, Object> systemPermissionData, String systemId) {
return null; return null;
} }
@Override @Override
public Map<String, Object> pushSystemPermissionData(Map<String, Object> systemPermissionData, String systemId) { public AuthenticationUser login(AuthorizationLogin authorizationLogin) {
return null; return null;
} }
......
package cn.ibizlab.util.client; package cn.ibizlab.util.client;
import com.alibaba.fastjson.JSONObject; import cn.ibizlab.util.security.AuthenticationUser;
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 java.util.Map; import java.util.Map;
...@@ -8,16 +9,6 @@ import java.util.Map; ...@@ -8,16 +9,6 @@ import java.util.Map;
@FeignClient(value = "ibzuaa",fallback = IBZUAAFallback.class) @FeignClient(value = "ibzuaa",fallback = IBZUAAFallback.class)
public interface IBZUAAFeignClient public interface IBZUAAFeignClient
{ {
/**
* 从uaa中获取当前用户权限
* @param loginName
* @param systemId
* @return
*/
@GetMapping(value = "/uaa/permission/{loginname}")
JSONObject getUserPermissionData(@PathVariable("loginname") String loginName, @RequestParam("systemid") String systemId);
/** /**
* 推送系统权限数据到uaa * 推送系统权限数据到uaa
* @param systemPermissionData * @param systemPermissionData
...@@ -27,4 +18,12 @@ public interface IBZUAAFeignClient ...@@ -27,4 +18,12 @@ public interface IBZUAAFeignClient
@PostMapping("/uaa/permission/save") @PostMapping("/uaa/permission/save")
Map<String,Object> pushSystemPermissionData(@RequestBody Map<String, Object> systemPermissionData, @RequestParam("systemid") String systemId); Map<String,Object> pushSystemPermissionData(@RequestBody Map<String, Object> systemPermissionData, @RequestParam("systemid") String systemId);
/**
* 用户登录
* @param authorizationLogin 登录信息
* @return
*/
@PostMapping(value = "/uaa/authentication/login")
AuthenticationUser login(@RequestBody AuthorizationLogin authorizationLogin);
} }
...@@ -4,8 +4,6 @@ import com.alibaba.fastjson.JSONArray; ...@@ -4,8 +4,6 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mongodb.BasicDBList;
import com.mongodb.BasicDBObject;
import com.mongodb.QueryBuilder; import com.mongodb.QueryBuilder;
import cn.ibizlab.util.annotation.DEField; import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.domain.EntityBase; import cn.ibizlab.util.domain.EntityBase;
...@@ -13,9 +11,7 @@ import cn.ibizlab.util.enums.DEPredefinedFieldType; ...@@ -13,9 +11,7 @@ import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.filter.QueryBuildContext; import cn.ibizlab.util.filter.QueryBuildContext;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.QueryWrapperContext;
import cn.ibizlab.util.helper.DEFieldCacheMap; import cn.ibizlab.util.helper.DEFieldCacheMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.BasicQuery; import org.springframework.data.mongodb.core.query.BasicQuery;
import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Query;
...@@ -25,13 +21,9 @@ import org.springframework.stereotype.Component; ...@@ -25,13 +21,9 @@ import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.swing.text.html.parser.Entity;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* spring security 权限管理类 * spring security 权限管理类
...@@ -440,13 +432,11 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -440,13 +432,11 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
String orgDeptField=permissionField.get("orgsecfield"); String orgDeptField=permissionField.get("orgsecfield");
String createManField=permissionField.get("createmanfield"); String createManField=permissionField.get("createmanfield");
AuthenticationUser authenticationUser = AuthenticationUser.getAuthenticationUser(); AuthenticationUser authenticationUser = AuthenticationUser.getAuthenticationUser();
JSONObject userInfo = authenticationUser.getOrgInfo(); Map<String, Set<String>> userInfo = authenticationUser.getOrgInfo();
JSONObject orgObject = userInfo.getJSONObject("org"); Set<String> orgParent = userInfo.get("parentorg");
JSONArray orgParent = orgObject.getJSONArray("porg"); Set<String> orgChild = userInfo.get("suborg");
JSONArray orgChild = orgObject.getJSONArray("sorg"); Set<String> orgDeptParent = userInfo.get("parentdept");
JSONObject orgDeptObject = userInfo.getJSONObject("orgdept"); Set<String> orgDeptChild = userInfo.get("subdept");
JSONArray orgDeptParent = orgDeptObject.getJSONArray("porgdept");
JSONArray orgDeptChild = orgDeptObject.getJSONArray("sorgdept");
for(int i=0;i<oppriList.size();i++){ for(int i=0;i<oppriList.size();i++){
String permissionCond=oppriList.getString(i);//权限配置条件 String permissionCond=oppriList.getString(i);//权限配置条件
...@@ -492,13 +482,11 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -492,13 +482,11 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
String createManField=permissionField.get("createmanfield"); String createManField=permissionField.get("createmanfield");
StringBuffer permissionSQL=new StringBuffer(); StringBuffer permissionSQL=new StringBuffer();
AuthenticationUser authenticationUser = AuthenticationUser.getAuthenticationUser(); AuthenticationUser authenticationUser = AuthenticationUser.getAuthenticationUser();
JSONObject userInfo = authenticationUser.getOrgInfo(); Map<String, Set<String>> userInfo = authenticationUser.getOrgInfo();
JSONObject orgObject = userInfo.getJSONObject("org"); Set<String> orgParent = userInfo.get("parentorg");
JSONArray orgParent = orgObject.getJSONArray("porg"); Set<String> orgChild = userInfo.get("suborg");
JSONArray orgChild = orgObject.getJSONArray("sorg"); Set<String> orgDeptParent = userInfo.get("parentdept");
JSONObject orgDeptObject = userInfo.getJSONObject("orgdept"); Set<String> orgDeptChild = userInfo.get("subdept");
JSONArray orgDeptParent = orgDeptObject.getJSONArray("porgdept");
JSONArray orgDeptChild = orgDeptObject.getJSONArray("sorgdept");
for(int i=0;i<oppriList.size();i++){ for(int i=0;i<oppriList.size();i++){
permissionSQL.append("OR"); permissionSQL.append("OR");
...@@ -607,7 +595,7 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -607,7 +595,7 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
* 转换[a,b]格式字符串到 'a','b'格式 * 转换[a,b]格式字符串到 'a','b'格式
* @return * @return
*/ */
private String formatStringArr(JSONArray array) { private String formatStringArr(Set<String> array) {
String[] arr = array.toArray(new String[array.size()]); String[] arr = array.toArray(new String[array.size()]);
return "'" + String.join("','", arr) + "'"; return "'" + String.join("','", arr) + "'";
......
...@@ -12,6 +12,7 @@ import java.util.Map; ...@@ -12,6 +12,7 @@ import java.util.Map;
import java.util.HashMap; import java.util.HashMap;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Collection; import java.util.Collection;
import java.util.Set;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@Data @Data
...@@ -60,14 +61,12 @@ public class AuthenticationUser implements UserDetails ...@@ -60,14 +61,12 @@ public class AuthenticationUser implements UserDetails
private Collection<GrantedAuthority> authorities; private Collection<GrantedAuthority> authorities;
@JsonIgnore @JsonIgnore
private int superuser; private int superuser;
@JsonIgnore
private JSONObject permisionList; private JSONObject permisionList;
private String orglevel;//单位级别 private String orglevel;//单位级别
private String deptlevel;//部门级别 private String deptlevel;//部门级别
@JsonIgnore @JsonIgnore
private Map<String,Object> userSessionParam;//用户自定义session值 private Map<String,Object> userSessionParam;//用户自定义session值
@JsonIgnore private Map<String, Set<String>> orgInfo;//上下级组织信息
private JSONObject orgInfo;//上下级组织信息
@JsonIgnore @JsonIgnore
......
package cn.ibizlab.util.service;
import com.alibaba.fastjson.JSONObject;
import cn.ibizlab.util.client.IBZOUFeignClient;
import cn.ibizlab.util.client.IBZUAAFeignClient;
import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.security.AuthorizationLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
/**
* 实体[IBZUSER] 服务对象接口实现
*/
//@Primary
@Service("IBZUAAUserService")
public class IBZUAAUserService implements AuthenticationUserService{
@Autowired
private IBZUAAFeignClient uaaFeignClient;
@Override
public AuthenticationUser loadUserByUsername(String username) {
String[] data=username.split("[|]");
String loginname=username;
String domains="";
String password="";
if(data.length==3) {
loginname=data[0].trim();
domains=data[1].trim();
password=data[2].trim();
}
else if(data.length==2) {
loginname=data[0].trim();
password=data[1].trim();
}
AuthorizationLogin user = new AuthorizationLogin();
user.setDomain(domains);
user.setLoginname(loginname);
user.setPassword(password);
return uaaFeignClient.login(user);
}
@Override
public AuthenticationUser loadUserByLogin(String username, String password) {
AuthenticationUser authuserdetail = loadUserByUsername(username+"|"+password);
return authuserdetail;
}
@Override
public AuthenticationUser loadUserByLogin(String domain, String username, String password) {
if(!StringUtils.isEmpty(domain))
username = username+"|"+domain;
return loadUserByLogin(username,password);
}
@Override
public void resetByUsername(String username) {
}
}
...@@ -25,12 +25,6 @@ public class SimpleUserService implements AuthenticationUserService{ ...@@ -25,12 +25,6 @@ public class SimpleUserService implements AuthenticationUserService{
@Value("${ibiz.systemid:2C40DFCD-0DF5-47BF-91A5-C45F810B0001}") @Value("${ibiz.systemid:2C40DFCD-0DF5-47BF-91A5-C45F810B0001}")
private String systemid; private String systemid;
@Autowired
private IBZUAAFeignClient uaaFeignClient;
@Autowired
private IBZOUFeignClient ouFeignClient;
@Override @Override
public AuthenticationUser loadUserByUsername(String username) { public AuthenticationUser loadUserByUsername(String username) {
AuthenticationUser user = new AuthenticationUser(); AuthenticationUser user = new AuthenticationUser();
...@@ -60,9 +54,6 @@ public class SimpleUserService implements AuthenticationUserService{ ...@@ -60,9 +54,6 @@ public class SimpleUserService implements AuthenticationUserService{
user.setOrgcode(domains); user.setOrgcode(domains);
user.setOrgname(domains); user.setOrgname(domains);
setUserPermission(user);
setUserOrgInfo(user);
return user; return user;
} }
...@@ -85,30 +76,4 @@ public class SimpleUserService implements AuthenticationUserService{ ...@@ -85,30 +76,4 @@ public class SimpleUserService implements AuthenticationUserService{
} }
/**
* 设置用户权限
*/
private void setUserPermission(AuthenticationUser user) {
if(enablePermissionValid){
JSONObject permission= uaaFeignClient.getUserPermissionData(user.getLoginname(),systemid);
user.setPermisionList(permission);
}
}
/**
* 设置用户组织相关信息
* @param user
*/
private void setUserOrgInfo(AuthenticationUser user) {
if(enablePermissionValid) {
JSONObject orgInfo=ouFeignClient.getOrgInfo(user.getLoginname());
if(orgInfo==null)
throw new RuntimeException("获取用户信息失败,请检查用户中心[IBZOU]中是否存在当前用户!");
JSONObject curUser=orgInfo.getJSONObject("curuser");
user.setOrgInfo(orgInfo);
user.setMdeptid(curUser.getString("orgdept"));
user.setOrgid(curUser.getString("org"));
}
}
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册