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

lab_gzf 部署微服务应用

上级 bcd47138
......@@ -46,9 +46,11 @@ export class AuthServiceRegister {
this.allAuthService.set('eamlocationstate', () => import('@/authservice/eamlocation-state/eamlocation-state-auth-service'));
this.allAuthService.set('eamassettype', () => import('@/authservice/eamasset-type/eamasset-type-auth-service'));
this.allAuthService.set('eamassetstatemodelline', () => import('@/authservice/eamasset-state-model-line/eamasset-state-model-line-auth-service'));
this.allAuthService.set('eamapplystatemodelline', () => import('@/authservice/eamapply-state-model-line/eamapply-state-model-line-auth-service'));
this.allAuthService.set('eamlocationstatemodelline', () => import('@/authservice/eamlocation-state-model-line/eamlocation-state-model-line-auth-service'));
this.allAuthService.set('eamasset', () => import('@/authservice/eamasset/eamasset-auth-service'));
this.allAuthService.set('eamapplystate', () => import('@/authservice/eamapply-state/eamapply-state-auth-service'));
this.allAuthService.set('eamapply', () => import('@/authservice/eamapply/eamapply-auth-service'));
this.allAuthService.set('eamassetstatemodel', () => import('@/authservice/eamasset-state-model/eamasset-state-model-auth-service'));
}
......
import AuthService from '../auth-service';
/**
* 维护申请状态模型明细权限服务对象基类
*
* @export
* @class EAMApplyStateModelLineAuthServiceBase
* @extends {AuthService}
*/
export default class EAMApplyStateModelLineAuthServiceBase extends AuthService {
/**
* Creates an instance of EAMApplyStateModelLineAuthServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMApplyStateModelLineAuthServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {*} mainSateOPPrivs 传入数据操作标识
* @returns {any}
* @memberof EAMApplyStateModelLineAuthServiceBase
*/
public getOPPrivs(mainSateOPPrivs:any):any{
let curDefaultOPPrivs:any = JSON.parse(JSON.stringify(this.defaultOPPrivs));
if(mainSateOPPrivs){
Object.assign(curDefaultOPPrivs,mainSateOPPrivs);
}
return curDefaultOPPrivs;
}
}
\ No newline at end of file
import EAMApplyStateModelLineAuthServiceBase from './eamapply-state-model-line-auth-service-base';
/**
* 维护申请状态模型明细权限服务对象
*
* @export
* @class EAMApplyStateModelLineAuthService
* @extends {EAMApplyStateModelLineAuthServiceBase}
*/
export default class EAMApplyStateModelLineAuthService extends EAMApplyStateModelLineAuthServiceBase {
/**
* Creates an instance of EAMApplyStateModelLineAuthService.
*
* @param {*} [opts={}]
* @memberof EAMApplyStateModelLineAuthService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import AuthService from '../auth-service';
/**
* 维护申请权限服务对象基类
*
* @export
* @class EAMApplyAuthServiceBase
* @extends {AuthService}
*/
export default class EAMApplyAuthServiceBase extends AuthService {
/**
* Creates an instance of EAMApplyAuthServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMApplyAuthServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {*} mainSateOPPrivs 传入数据操作标识
* @returns {any}
* @memberof EAMApplyAuthServiceBase
*/
public getOPPrivs(mainSateOPPrivs:any):any{
let curDefaultOPPrivs:any = JSON.parse(JSON.stringify(this.defaultOPPrivs));
if(mainSateOPPrivs){
Object.assign(curDefaultOPPrivs,mainSateOPPrivs);
}
return curDefaultOPPrivs;
}
}
\ No newline at end of file
import EAMApplyAuthServiceBase from './eamapply-auth-service-base';
/**
* 维护申请权限服务对象
*
* @export
* @class EAMApplyAuthService
* @extends {EAMApplyAuthServiceBase}
*/
export default class EAMApplyAuthService extends EAMApplyAuthServiceBase {
/**
* Creates an instance of EAMApplyAuthService.
*
* @param {*} [opts={}]
* @memberof EAMApplyAuthService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
/**
* 维护申请状态模型明细
*
* @export
* @interface EAMApplyStateModelLine
*/
export interface EAMApplyStateModelLine {
/**
* 维护申请状态模型明细名称
*
* @returns {*}
* @memberof EAMApplyStateModelLine
*/
eamapplystatemodellinename?: any;
/**
* 维护申请状态模型明细标识
*
* @returns {*}
* @memberof EAMApplyStateModelLine
*/
eamapplystatemodellineid?: any;
/**
* 更新人
*
* @returns {*}
* @memberof EAMApplyStateModelLine
*/
updateman?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof EAMApplyStateModelLine
*/
updatedate?: any;
/**
* 建立人
*
* @returns {*}
* @memberof EAMApplyStateModelLine
*/
createman?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof EAMApplyStateModelLine
*/
createdate?: any;
/**
* 维护申请状态标识
*
* @returns {*}
* @memberof EAMApplyStateModelLine
*/
eamapplystateid?: any;
/**
* 维护申请状态模型标识
*
* @returns {*}
* @memberof EAMApplyStateModelLine
*/
eamapplystatemodelid?: any;
}
\ No newline at end of file
/**
* 维护申请
*
* @export
* @interface EAMApply
*/
export interface EAMApply {
/**
* 更新人
*
* @returns {*}
* @memberof EAMApply
*/
updateman?: any;
/**
* 维护申请标识
*
* @returns {*}
* @memberof EAMApply
*/
eamapplyid?: any;
/**
* 建立人
*
* @returns {*}
* @memberof EAMApply
*/
createman?: any;
/**
* 维护申请名称
*
* @returns {*}
* @memberof EAMApply
*/
eamapplyname?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof EAMApply
*/
createdate?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof EAMApply
*/
updatedate?: any;
/**
* 维护申请类型标识
*
* @returns {*}
* @memberof EAMApply
*/
eamapplytypeid?: any;
/**
* 功能位置标识
*
* @returns {*}
* @memberof EAMApply
*/
eamlocationid?: any;
/**
* 资产标识
*
* @returns {*}
* @memberof EAMApply
*/
assetid?: any;
}
\ No newline at end of file
......@@ -5,9 +5,11 @@ import eamassetstate_en_US from '@locale/lanres/entities/eamasset-state/eamasset
import eamlocationstate_en_US from '@locale/lanres/entities/eamlocation-state/eamlocation-state_en_US';
import eamassettype_en_US from '@locale/lanres/entities/eamasset-type/eamasset-type_en_US';
import eamassetstatemodelline_en_US from '@locale/lanres/entities/eamasset-state-model-line/eamasset-state-model-line_en_US';
import eamapplystatemodelline_en_US from '@locale/lanres/entities/eamapply-state-model-line/eamapply-state-model-line_en_US';
import eamlocationstatemodelline_en_US from '@locale/lanres/entities/eamlocation-state-model-line/eamlocation-state-model-line_en_US';
import eamasset_en_US from '@locale/lanres/entities/eamasset/eamasset_en_US';
import eamapplystate_en_US from '@locale/lanres/entities/eamapply-state/eamapply-state_en_US';
import eamapply_en_US from '@locale/lanres/entities/eamapply/eamapply_en_US';
import eamassetstatemodel_en_US from '@locale/lanres/entities/eamasset-state-model/eamasset-state-model_en_US';
import components_en_US from '@locale/lanres/components/components_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
......@@ -247,9 +249,11 @@ export default {
eamlocationstate: eamlocationstate_en_US,
eamassettype: eamassettype_en_US,
eamassetstatemodelline: eamassetstatemodelline_en_US,
eamapplystatemodelline: eamapplystatemodelline_en_US,
eamlocationstatemodelline: eamlocationstatemodelline_en_US,
eamasset: eamasset_en_US,
eamapplystate: eamapplystate_en_US,
eamapply: eamapply_en_US,
eamassetstatemodel: eamassetstatemodel_en_US,
},
components: components_en_US,
......
......@@ -5,9 +5,11 @@ import eamassetstate_zh_CN from '@locale/lanres/entities/eamasset-state/eamasset
import eamlocationstate_zh_CN from '@locale/lanres/entities/eamlocation-state/eamlocation-state_zh_CN';
import eamassettype_zh_CN from '@locale/lanres/entities/eamasset-type/eamasset-type_zh_CN';
import eamassetstatemodelline_zh_CN from '@locale/lanres/entities/eamasset-state-model-line/eamasset-state-model-line_zh_CN';
import eamapplystatemodelline_zh_CN from '@locale/lanres/entities/eamapply-state-model-line/eamapply-state-model-line_zh_CN';
import eamlocationstatemodelline_zh_CN from '@locale/lanres/entities/eamlocation-state-model-line/eamlocation-state-model-line_zh_CN';
import eamasset_zh_CN from '@locale/lanres/entities/eamasset/eamasset_zh_CN';
import eamapplystate_zh_CN from '@locale/lanres/entities/eamapply-state/eamapply-state_zh_CN';
import eamapply_zh_CN from '@locale/lanres/entities/eamapply/eamapply_zh_CN';
import eamassetstatemodel_zh_CN from '@locale/lanres/entities/eamasset-state-model/eamasset-state-model_zh_CN';
import components_zh_CN from '@locale/lanres/components/components_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
......@@ -246,9 +248,11 @@ export default {
eamlocationstate: eamlocationstate_zh_CN,
eamassettype: eamassettype_zh_CN,
eamassetstatemodelline: eamassetstatemodelline_zh_CN,
eamapplystatemodelline: eamapplystatemodelline_zh_CN,
eamlocationstatemodelline: eamlocationstatemodelline_zh_CN,
eamasset: eamasset_zh_CN,
eamapplystate: eamapplystate_zh_CN,
eamapply: eamapply_zh_CN,
eamassetstatemodel: eamassetstatemodel_zh_CN,
},
components: components_zh_CN,
......
export default {
fields: {
eamapplystatemodellinename: "维护申请状态模型明细名称",
eamapplystatemodellineid: "维护申请状态模型明细标识",
updateman: "更新人",
updatedate: "更新时间",
createman: "建立人",
createdate: "建立时间",
eamapplystateid: "维护申请状态标识",
eamapplystatemodelid: "维护申请状态模型标识",
},
};
\ No newline at end of file
export default {
fields: {
eamapplystatemodellinename: "维护申请状态模型明细名称",
eamapplystatemodellineid: "维护申请状态模型明细标识",
updateman: "更新人",
updatedate: "更新时间",
createman: "建立人",
createdate: "建立时间",
eamapplystateid: "维护申请状态标识",
eamapplystatemodelid: "维护申请状态模型标识",
},
};
\ No newline at end of file
......@@ -109,69 +109,13 @@ export default {
},
},
editviewtoolbar_toolbar: {
tbitem10: {
caption: "Save",
tip: "Save",
},
tbitem12: {
caption: "Save And New",
tip: "Save And New",
},
tbitem11: {
tbitem2: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem18: {
caption: "-",
tip: "",
},
tbitem9: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem19: {
caption: "-",
tip: "",
},
tbitem5: {
caption: "New",
tip: "New",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem1: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem22: {
caption: "-",
tip: "",
},
tbitem2: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem7: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem6: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem4: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem25: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Help",
tip: "Help",
caption: "关闭",
tip: "关闭",
},
},
};
\ No newline at end of file
......@@ -108,69 +108,13 @@ export default {
},
},
editviewtoolbar_toolbar: {
tbitem10: {
caption: "保存",
tip: "保存",
},
tbitem12: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem11: {
tbitem2: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem18: {
caption: "-",
tip: "",
},
tbitem9: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem19: {
caption: "-",
tip: "",
},
tbitem5: {
caption: "新建",
tip: "新建",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem22: {
caption: "-",
tip: "",
},
tbitem2: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem7: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem6: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem4: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem25: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "帮助",
tip: "帮助",
caption: "关闭",
tip: "关闭",
},
},
};
\ No newline at end of file
export default {
fields: {
updateman: "更新人",
eamapplyid: "维护申请标识",
createman: "建立人",
eamapplyname: "维护申请名称",
createdate: "建立时间",
updatedate: "更新时间",
eamapplytypeid: "维护申请类型标识",
eamlocationid: "功能位置标识",
assetid: "资产标识",
},
};
\ No newline at end of file
export default {
fields: {
updateman: "更新人",
eamapplyid: "维护申请标识",
createman: "建立人",
eamapplyname: "维护申请名称",
createdate: "建立时间",
updatedate: "更新时间",
eamapplytypeid: "维护申请类型标识",
eamlocationid: "功能位置标识",
assetid: "资产标识",
},
};
\ No newline at end of file
......@@ -14,7 +14,9 @@ import './entity/eamasset-states/eamasset-states';
import './entity/eamlocation-states/eamlocation-states';
import './entity/eamasset-types/eamasset-types';
import './entity/eamasset-state-model-lines/eamasset-state-model-lines';
import './entity/eamapply-state-model-lines/eamapply-state-model-lines';
import './entity/eamlocation-state-model-lines/eamlocation-state-model-lines';
import './entity/eamassets/eamassets';
import './entity/eamapply-states/eamapply-states';
import './entity/eamapplys/eamapplys';
import './entity/eamasset-state-models/eamasset-state-models';
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 维护申请状态模型明细服务对象基类
*
* @export
* @class EAMApplyStateModelLineServiceBase
* @extends {EntityServie}
*/
export default class EAMApplyStateModelLineServiceBase extends EntityService {
/**
* Creates an instance of EAMApplyStateModelLineServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMApplyStateModelLineServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof EAMApplyStateModelLineServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='eamapplystatemodelline';
this.APPDEKEY = 'eamapplystatemodellineid';
this.APPDENAME = 'eamapplystatemodellines';
this.APPDETEXT = 'eamapplystatemodellinename';
this.APPNAME = 'assetmanagement';
this.SYSTEMNAME = 'ibizassetmanagement';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyStateModelLineServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamapplystatemodellines/${context.eamapplystatemodelline}/select`,isloading);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyStateModelLineServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamapplystatemodellines`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyStateModelLineServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamapplystatemodellines/${context.eamapplystatemodelline}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyStateModelLineServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamapplystatemodellines/${context.eamapplystatemodelline}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyStateModelLineServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamapplystatemodellines/${context.eamapplystatemodelline}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyStateModelLineServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamapplystatemodellines/getdraft`,isloading);
res.data.eamapplystatemodelline = data.eamapplystatemodelline;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyStateModelLineServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamapplystatemodellines/${context.eamapplystatemodelline}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyStateModelLineServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamapplystatemodellines/${context.eamapplystatemodelline}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyStateModelLineServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamapplystatemodellines/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EAMApplyStateModelLineServiceBase from './eamapply-state-model-line-service-base';
/**
* 维护申请状态模型明细服务对象
*
* @export
* @class EAMApplyStateModelLineService
* @extends {EAMApplyStateModelLineServiceBase}
*/
export default class EAMApplyStateModelLineService extends EAMApplyStateModelLineServiceBase {
/**
* Creates an instance of EAMApplyStateModelLineService.
*
* @param {*} [opts={}]
* @memberof EAMApplyStateModelLineService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 维护申请服务对象基类
*
* @export
* @class EAMApplyServiceBase
* @extends {EntityServie}
*/
export default class EAMApplyServiceBase extends EntityService {
/**
* Creates an instance of EAMApplyServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMApplyServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof EAMApplyServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='eamapply';
this.APPDEKEY = 'eamapplyid';
this.APPDENAME = 'eamapplies';
this.APPDETEXT = 'eamapplyname';
this.APPNAME = 'assetmanagement';
this.SYSTEMNAME = 'ibizassetmanagement';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamapplies/${context.eamapply}/select`,isloading);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamapplies`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamapplies/${context.eamapply}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamapplies/${context.eamapply}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamapplies/${context.eamapply}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamapplies/getdraft`,isloading);
res.data.eamapply = data.eamapply;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamapplies/${context.eamapply}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamapplies/${context.eamapply}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMApplyServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamapplies/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EAMApplyServiceBase from './eamapply-service-base';
/**
* 维护申请服务对象
*
* @export
* @class EAMApplyService
* @extends {EAMApplyServiceBase}
*/
export default class EAMApplyService extends EAMApplyServiceBase {
/**
* Creates an instance of EAMApplyService.
*
* @param {*} [opts={}]
* @memberof EAMApplyService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -46,9 +46,11 @@ export class EntityServiceRegister {
this.allEntityService.set('eamlocationstate', () => import('@/service/eamlocation-state/eamlocation-state-service'));
this.allEntityService.set('eamassettype', () => import('@/service/eamasset-type/eamasset-type-service'));
this.allEntityService.set('eamassetstatemodelline', () => import('@/service/eamasset-state-model-line/eamasset-state-model-line-service'));
this.allEntityService.set('eamapplystatemodelline', () => import('@/service/eamapply-state-model-line/eamapply-state-model-line-service'));
this.allEntityService.set('eamlocationstatemodelline', () => import('@/service/eamlocation-state-model-line/eamlocation-state-model-line-service'));
this.allEntityService.set('eamasset', () => import('@/service/eamasset/eamasset-service'));
this.allEntityService.set('eamapplystate', () => import('@/service/eamapply-state/eamapply-state-service'));
this.allEntityService.set('eamapply', () => import('@/service/eamapply/eamapply-service'));
this.allEntityService.set('eamassetstatemodel', () => import('@/service/eamasset-state-model/eamasset-state-model-service'));
}
......
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import EAMApplyStateModelLineService from '@/service/eamapply-state-model-line/eamapply-state-model-line-service';
import EAMApplyStateModelLineAuthService from '@/authservice/eamapply-state-model-line/eamapply-state-model-line-auth-service';
/**
* 维护申请状态模型明细UI服务对象基类
*
* @export
* @class EAMApplyStateModelLineUIServiceBase
*/
export default class EAMApplyStateModelLineUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public dataService:EAMApplyStateModelLineService = new EAMApplyStateModelLineService();
/**
* 所有关联视图
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* 主状态操作标识Map
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public allDeMainStateOPPrivsMap:Map<string,any> = new Map();
/**
* Creates an instance of EAMApplyStateModelLineUIServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMApplyStateModelLineUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.authService = new EAMApplyStateModelLineAuthService(opts);
this.initViewMap();
this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
}
/**
* 初始化视图Map
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public initViewMap(){
}
/**
* 初始化主状态集合
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 初始化主状态操作标识
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public initDeMainStateOPPrivsMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({eamapplystatemodelline:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
/**
* 获取数据对象当前操作标识
*
* @param data 当前数据
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public getDEMainStateOPPrivs(data:any){
if(this.getDEMainStateTag(data)){
return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
}else{
return null;
}
}
/**
* 获取数据对象所有的操作标识
*
* @param data 当前数据
* @memberof EAMApplyStateModelLineUIServiceBase
*/
public getAllOPPrivs(data:any){
return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
}
}
\ No newline at end of file
import EAMApplyStateModelLineUIServiceBase from './eamapply-state-model-line-ui-service-base';
/**
* 维护申请状态模型明细UI服务对象
*
* @export
* @class EAMApplyStateModelLineUIService
*/
export default class EAMApplyStateModelLineUIService extends EAMApplyStateModelLineUIServiceBase {
/**
* Creates an instance of EAMApplyStateModelLineUIService.
*
* @param {*} [opts={}]
* @memberof EAMApplyStateModelLineUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import EAMApplyService from '@/service/eamapply/eamapply-service';
import EAMApplyAuthService from '@/authservice/eamapply/eamapply-auth-service';
/**
* 维护申请UI服务对象基类
*
* @export
* @class EAMApplyUIServiceBase
*/
export default class EAMApplyUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof EAMApplyUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof EAMApplyUIServiceBase
*/
public dataService:EAMApplyService = new EAMApplyService();
/**
* 所有关联视图
*
* @memberof EAMApplyUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof EAMApplyUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof EAMApplyUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof EAMApplyUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof EAMApplyUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* 主状态操作标识Map
*
* @memberof EAMApplyUIServiceBase
*/
public allDeMainStateOPPrivsMap:Map<string,any> = new Map();
/**
* Creates an instance of EAMApplyUIServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMApplyUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.authService = new EAMApplyAuthService(opts);
this.initViewMap();
this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
}
/**
* 初始化视图Map
*
* @memberof EAMApplyUIServiceBase
*/
public initViewMap(){
}
/**
* 初始化主状态集合
*
* @memberof EAMApplyUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 初始化主状态操作标识
*
* @memberof EAMApplyUIServiceBase
*/
public initDeMainStateOPPrivsMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof EAMApplyUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({eamapply:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof EAMApplyUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof EAMApplyUIServiceBase
*/
public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof EAMApplyUIServiceBase
*/
public getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
/**
* 获取数据对象当前操作标识
*
* @param data 当前数据
* @memberof EAMApplyUIServiceBase
*/
public getDEMainStateOPPrivs(data:any){
if(this.getDEMainStateTag(data)){
return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
}else{
return null;
}
}
/**
* 获取数据对象所有的操作标识
*
* @param data 当前数据
* @memberof EAMApplyUIServiceBase
*/
public getAllOPPrivs(data:any){
return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
}
}
\ No newline at end of file
import EAMApplyUIServiceBase from './eamapply-ui-service-base';
/**
* 维护申请UI服务对象
*
* @export
* @class EAMApplyUIService
*/
export default class EAMApplyUIService extends EAMApplyUIServiceBase {
/**
* Creates an instance of EAMApplyUIService.
*
* @param {*} [opts={}]
* @memberof EAMApplyUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -46,9 +46,11 @@ export class UIServiceRegister {
this.allUIService.set('eamlocationstate', () => import('@/uiservice/eamlocation-state/eamlocation-state-ui-service'));
this.allUIService.set('eamassettype', () => import('@/uiservice/eamasset-type/eamasset-type-ui-service'));
this.allUIService.set('eamassetstatemodelline', () => import('@/uiservice/eamasset-state-model-line/eamasset-state-model-line-ui-service'));
this.allUIService.set('eamapplystatemodelline', () => import('@/uiservice/eamapply-state-model-line/eamapply-state-model-line-ui-service'));
this.allUIService.set('eamlocationstatemodelline', () => import('@/uiservice/eamlocation-state-model-line/eamlocation-state-model-line-ui-service'));
this.allUIService.set('eamasset', () => import('@/uiservice/eamasset/eamasset-ui-service'));
this.allUIService.set('eamapplystate', () => import('@/uiservice/eamapply-state/eamapply-state-ui-service'));
this.allUIService.set('eamapply', () => import('@/uiservice/eamapply/eamapply-ui-service'));
this.allUIService.set('eamassetstatemodel', () => import('@/uiservice/eamasset-state-model/eamasset-state-model-ui-service'));
}
......
......@@ -35,6 +35,10 @@ zuul:
path: /eamassetstatemodellines/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamapplystatemodelline:
path: /eamapplystatemodellines/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamlocationstatemodelline:
path: /eamlocationstatemodellines/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
......@@ -47,6 +51,10 @@ zuul:
path: /eamapplystates/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamapply:
path: /eamapplies/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamassetstatemodel:
path: /eamassetstatemodels/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
......
......@@ -60,6 +60,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMApplyStateModelLine",
"delogicname":"维护申请状态模型明细",
"sysmoudle":{"id":"APPLY","name":"维护申请"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMLocationStateModelLine",
"delogicname":"功能位置状态模型明细",
"sysmoudle":{"id":"LOCATION","name":"功能位置"},
......@@ -84,6 +92,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMApply",
"delogicname":"维护申请",
"sysmoudle":{"id":"APPLY","name":"维护申请"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMAssetStateModel",
"delogicname":"资产状态模型",
"sysmoudle":{"id":"ASSET","name":"资产管理"},
......
package cn.ibizlab.assetmanagement.assetapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.assetmanagement.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[EAMApplyDTO]
*/
@Data
public class EAMApplyDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [EAMAPPLYID]
*
*/
@JSONField(name = "eamapplyid")
@JsonProperty("eamapplyid")
private String eamapplyid;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [EAMAPPLYNAME]
*
*/
@JSONField(name = "eamapplyname")
@JsonProperty("eamapplyname")
private String eamapplyname;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [EAMAPPLYTYPEID]
*
*/
@JSONField(name = "eamapplytypeid")
@JsonProperty("eamapplytypeid")
private String eamapplytypeid;
/**
* 属性 [EAMLOCATIONID]
*
*/
@JSONField(name = "eamlocationid")
@JsonProperty("eamlocationid")
private String eamlocationid;
/**
* 属性 [ASSETID]
*
*/
@JSONField(name = "assetid")
@JsonProperty("assetid")
private String assetid;
/**
* 设置 [EAMAPPLYNAME]
*/
public void setEamapplyname(String eamapplyname){
this.eamapplyname = eamapplyname ;
this.modify("eamapplyname",eamapplyname);
}
/**
* 设置 [EAMAPPLYTYPEID]
*/
public void setEamapplytypeid(String eamapplytypeid){
this.eamapplytypeid = eamapplytypeid ;
this.modify("eamapplytypeid",eamapplytypeid);
}
/**
* 设置 [EAMLOCATIONID]
*/
public void setEamlocationid(String eamlocationid){
this.eamlocationid = eamlocationid ;
this.modify("eamlocationid",eamlocationid);
}
/**
* 设置 [ASSETID]
*/
public void setAssetid(String assetid){
this.assetid = assetid ;
this.modify("assetid",assetid);
}
}
package cn.ibizlab.assetmanagement.assetapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.assetmanagement.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[EAMApplyStateModelLineDTO]
*/
@Data
public class EAMApplyStateModelLineDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [EAMAPPLYSTATEMODELLINENAME]
*
*/
@JSONField(name = "eamapplystatemodellinename")
@JsonProperty("eamapplystatemodellinename")
private String eamapplystatemodellinename;
/**
* 属性 [EAMAPPLYSTATEMODELLINEID]
*
*/
@JSONField(name = "eamapplystatemodellineid")
@JsonProperty("eamapplystatemodellineid")
private String eamapplystatemodellineid;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [EAMAPPLYSTATEID]
*
*/
@JSONField(name = "eamapplystateid")
@JsonProperty("eamapplystateid")
private String eamapplystateid;
/**
* 属性 [EAMAPPLYSTATEMODELID]
*
*/
@JSONField(name = "eamapplystatemodelid")
@JsonProperty("eamapplystatemodelid")
private String eamapplystatemodelid;
/**
* 设置 [EAMAPPLYSTATEMODELLINENAME]
*/
public void setEamapplystatemodellinename(String eamapplystatemodellinename){
this.eamapplystatemodellinename = eamapplystatemodellinename ;
this.modify("eamapplystatemodellinename",eamapplystatemodellinename);
}
/**
* 设置 [EAMAPPLYSTATEID]
*/
public void setEamapplystateid(String eamapplystateid){
this.eamapplystateid = eamapplystateid ;
this.modify("eamapplystateid",eamapplystateid);
}
/**
* 设置 [EAMAPPLYSTATEMODELID]
*/
public void setEamapplystatemodelid(String eamapplystatemodelid){
this.eamapplystatemodelid = eamapplystatemodelid ;
this.modify("eamapplystatemodelid",eamapplystatemodelid);
}
}
package cn.ibizlab.assetmanagement.assetapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApply;
import cn.ibizlab.assetmanagement.assetapi.dto.EAMApplyDTO;
import cn.ibizlab.assetmanagement.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="AssetApiEAMApplyMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface EAMApplyMapping extends MappingBase<EAMApplyDTO, EAMApply> {
}
package cn.ibizlab.assetmanagement.assetapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModelLine;
import cn.ibizlab.assetmanagement.assetapi.dto.EAMApplyStateModelLineDTO;
import cn.ibizlab.assetmanagement.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="AssetApiEAMApplyStateModelLineMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface EAMApplyStateModelLineMapping extends MappingBase<EAMApplyStateModelLineDTO, EAMApplyStateModelLine> {
}
package cn.ibizlab.assetmanagement.assetapi.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.assetmanagement.assetapi.dto.*;
import cn.ibizlab.assetmanagement.assetapi.mapping.*;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApply;
import cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyService;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplySearchContext;
import cn.ibizlab.assetmanagement.util.annotation.VersionCheck;
@Slf4j
@Api(tags = {"维护申请" })
@RestController("AssetApi-eamapply")
@RequestMapping("")
public class EAMApplyResource {
@Autowired
public IEAMApplyService eamapplyService;
@Autowired
@Lazy
public EAMApplyMapping eamapplyMapping;
@PreAuthorize("hasPermission(this.eamapplyMapping.toDomain(#eamapplydto),'iBizAssetManagement-EAMApply-Create')")
@ApiOperation(value = "新建维护申请", tags = {"维护申请" }, notes = "新建维护申请")
@RequestMapping(method = RequestMethod.POST, value = "/eamapplies")
@Transactional
public ResponseEntity<EAMApplyDTO> create(@RequestBody EAMApplyDTO eamapplydto) {
EAMApply domain = eamapplyMapping.toDomain(eamapplydto);
eamapplyService.create(domain);
EAMApplyDTO dto = eamapplyMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamapplyMapping.toDomain(#eamapplydtos),'iBizAssetManagement-EAMApply-Create')")
@ApiOperation(value = "批量新建维护申请", tags = {"维护申请" }, notes = "批量新建维护申请")
@RequestMapping(method = RequestMethod.POST, value = "/eamapplies/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<EAMApplyDTO> eamapplydtos) {
eamapplyService.createBatch(eamapplyMapping.toDomain(eamapplydtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "eamapply" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.eamapplyService.get(#eamapply_id),'iBizAssetManagement-EAMApply-Update')")
@ApiOperation(value = "更新维护申请", tags = {"维护申请" }, notes = "更新维护申请")
@RequestMapping(method = RequestMethod.PUT, value = "/eamapplies/{eamapply_id}")
@Transactional
public ResponseEntity<EAMApplyDTO> update(@PathVariable("eamapply_id") String eamapply_id, @RequestBody EAMApplyDTO eamapplydto) {
EAMApply domain = eamapplyMapping.toDomain(eamapplydto);
domain .setEamapplyid(eamapply_id);
eamapplyService.update(domain );
EAMApplyDTO dto = eamapplyMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamapplyService.getEamapplyByEntities(this.eamapplyMapping.toDomain(#eamapplydtos)),'iBizAssetManagement-EAMApply-Update')")
@ApiOperation(value = "批量更新维护申请", tags = {"维护申请" }, notes = "批量更新维护申请")
@RequestMapping(method = RequestMethod.PUT, value = "/eamapplies/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<EAMApplyDTO> eamapplydtos) {
eamapplyService.updateBatch(eamapplyMapping.toDomain(eamapplydtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.eamapplyService.get(#eamapply_id),'iBizAssetManagement-EAMApply-Remove')")
@ApiOperation(value = "删除维护申请", tags = {"维护申请" }, notes = "删除维护申请")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamapplies/{eamapply_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("eamapply_id") String eamapply_id) {
return ResponseEntity.status(HttpStatus.OK).body(eamapplyService.remove(eamapply_id));
}
@PreAuthorize("hasPermission(this.eamapplyService.getEamapplyByIds(#ids),'iBizAssetManagement-EAMApply-Remove')")
@ApiOperation(value = "批量删除维护申请", tags = {"维护申请" }, notes = "批量删除维护申请")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamapplies/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
eamapplyService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.eamapplyMapping.toDomain(returnObject.body),'iBizAssetManagement-EAMApply-Get')")
@ApiOperation(value = "获取维护申请", tags = {"维护申请" }, notes = "获取维护申请")
@RequestMapping(method = RequestMethod.GET, value = "/eamapplies/{eamapply_id}")
public ResponseEntity<EAMApplyDTO> get(@PathVariable("eamapply_id") String eamapply_id) {
EAMApply domain = eamapplyService.get(eamapply_id);
EAMApplyDTO dto = eamapplyMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取维护申请草稿", tags = {"维护申请" }, notes = "获取维护申请草稿")
@RequestMapping(method = RequestMethod.GET, value = "/eamapplies/getdraft")
public ResponseEntity<EAMApplyDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(eamapplyMapping.toDto(eamapplyService.getDraft(new EAMApply())));
}
@ApiOperation(value = "检查维护申请", tags = {"维护申请" }, notes = "检查维护申请")
@RequestMapping(method = RequestMethod.POST, value = "/eamapplies/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody EAMApplyDTO eamapplydto) {
return ResponseEntity.status(HttpStatus.OK).body(eamapplyService.checkKey(eamapplyMapping.toDomain(eamapplydto)));
}
@PreAuthorize("hasPermission(this.eamapplyMapping.toDomain(#eamapplydto),'iBizAssetManagement-EAMApply-Save')")
@ApiOperation(value = "保存维护申请", tags = {"维护申请" }, notes = "保存维护申请")
@RequestMapping(method = RequestMethod.POST, value = "/eamapplies/save")
public ResponseEntity<Boolean> save(@RequestBody EAMApplyDTO eamapplydto) {
return ResponseEntity.status(HttpStatus.OK).body(eamapplyService.save(eamapplyMapping.toDomain(eamapplydto)));
}
@PreAuthorize("hasPermission(this.eamapplyMapping.toDomain(#eamapplydtos),'iBizAssetManagement-EAMApply-Save')")
@ApiOperation(value = "批量保存维护申请", tags = {"维护申请" }, notes = "批量保存维护申请")
@RequestMapping(method = RequestMethod.POST, value = "/eamapplies/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<EAMApplyDTO> eamapplydtos) {
eamapplyService.saveBatch(eamapplyMapping.toDomain(eamapplydtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMApply-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMApply-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"维护申请" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/eamapplies/fetchdefault")
public ResponseEntity<List<EAMApplyDTO>> fetchDefault(EAMApplySearchContext context) {
Page<EAMApply> domains = eamapplyService.searchDefault(context) ;
List<EAMApplyDTO> list = eamapplyMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMApply-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMApply-Get')")
@ApiOperation(value = "查询DEFAULT", tags = {"维护申请" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/eamapplies/searchdefault")
public ResponseEntity<Page<EAMApplyDTO>> searchDefault(@RequestBody EAMApplySearchContext context) {
Page<EAMApply> domains = eamapplyService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eamapplyMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册