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

jackwang 部署微服务应用

上级 cca70b4c
......@@ -87,6 +87,35 @@ mock.onDelete(new RegExp(/^\/hrarchives\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrarchivesid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrarchivesid, tempValue.hrarchivesid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Select
mock.onGet(new RegExp(/^\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: Select");
......@@ -114,6 +143,33 @@ mock.onGet(new RegExp(/^\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply(
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: Create");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrarchivesid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Create
mock.onPost(new RegExp(/^\/hrarchives\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -140,6 +196,33 @@ mock.onPost(new RegExp(/^\/hrarchives\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((confi
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrarchivesid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Update
mock.onPut(new RegExp(/^\/hrarchives\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -179,6 +262,25 @@ mock.onPut(new RegExp(/^\/hrarchives\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// GetDraft
mock.onGet(new RegExp(/^\/hrarchives\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: GetDraft");
......@@ -194,6 +296,33 @@ mock.onGet(new RegExp(/^\/hrarchives\/getdraft$/)).reply((config: any) => {
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrarchivesid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/hrarchives\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -232,6 +361,33 @@ mock.onPost(new RegExp(/^\/hrarchives\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).re
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrarchivesid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Save
mock.onPost(new RegExp(/^\/hrarchives\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -270,6 +426,51 @@ mock.onPost(new RegExp(/^\/hrarchives\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply(
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/fetchdefault$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchDefault
mock.onGet(new RegExp(/^\/hrarchives\/fetchdefault$/)).reply((config: any) => {
......@@ -314,15 +515,57 @@ mock.onGet(new RegExp(/^\/hrarchives\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrarchivesid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrarchivesid, tempValue.hrarchivesid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: Remove");
......@@ -351,6 +594,34 @@ mock.onDelete(new RegExp(/^\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((conf
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrarchivesid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrarchivesid, tempValue.hrarchivesid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/hrarchives\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrarchives 方法: Get");
......
......@@ -87,6 +87,35 @@ mock.onDelete(new RegExp(/^\/hrcertificates\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrcertificateid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrcertificateid, tempValue.hrcertificateid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Select
mock.onGet(new RegExp(/^\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: Select");
......@@ -114,6 +143,33 @@ mock.onGet(new RegExp(/^\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).re
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: Create");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrcertificateid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Create
mock.onPost(new RegExp(/^\/hrcertificates\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -140,6 +196,33 @@ mock.onPost(new RegExp(/^\/hrcertificates\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((c
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrcertificateid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Update
mock.onPut(new RegExp(/^\/hrcertificates\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -179,6 +262,25 @@ mock.onPut(new RegExp(/^\/hrcertificates\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((co
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// GetDraft
mock.onGet(new RegExp(/^\/hrcertificates\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: GetDraft");
......@@ -194,6 +296,33 @@ mock.onGet(new RegExp(/^\/hrcertificates\/getdraft$/)).reply((config: any) => {
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrcertificateid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/hrcertificates\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -232,6 +361,33 @@ mock.onPost(new RegExp(/^\/hrcertificates\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrcertificateid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Save
mock.onPost(new RegExp(/^\/hrcertificates\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -270,6 +426,51 @@ mock.onPost(new RegExp(/^\/hrcertificates\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).re
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/fetchdefault$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchDefault
mock.onGet(new RegExp(/^\/hrcertificates\/fetchdefault$/)).reply((config: any) => {
......@@ -314,15 +515,57 @@ mock.onGet(new RegExp(/^\/hrcertificates\/fetchdefault(\?[\w-./?%&=,]*)*$/)).rep
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrcertificateid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrcertificateid, tempValue.hrcertificateid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: Remove");
......@@ -351,6 +594,34 @@ mock.onDelete(new RegExp(/^\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrcertificateid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrcertificateid, tempValue.hrcertificateid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/hrcertificates\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: Get");
......
......@@ -87,6 +87,35 @@ mock.onDelete(new RegExp(/^\/hrfamilies\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrfamilyid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrfamilyid, tempValue.hrfamilyid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Select
mock.onGet(new RegExp(/^\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: Select");
......@@ -114,6 +143,33 @@ mock.onGet(new RegExp(/^\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply(
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: Create");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrfamilyid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Create
mock.onPost(new RegExp(/^\/hrfamilies\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -140,6 +196,33 @@ mock.onPost(new RegExp(/^\/hrfamilies\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((confi
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrfamilyid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Update
mock.onPut(new RegExp(/^\/hrfamilies\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -179,6 +262,25 @@ mock.onPut(new RegExp(/^\/hrfamilies\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// GetDraft
mock.onGet(new RegExp(/^\/hrfamilies\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: GetDraft");
......@@ -194,6 +296,33 @@ mock.onGet(new RegExp(/^\/hrfamilies\/getdraft$/)).reply((config: any) => {
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrfamilyid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/hrfamilies\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -232,6 +361,33 @@ mock.onPost(new RegExp(/^\/hrfamilies\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).re
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrfamilyid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Save
mock.onPost(new RegExp(/^\/hrfamilies\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -270,6 +426,51 @@ mock.onPost(new RegExp(/^\/hrfamilies\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply(
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/fetchdefault$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchDefault
mock.onGet(new RegExp(/^\/hrfamilies\/fetchdefault$/)).reply((config: any) => {
......@@ -314,15 +515,57 @@ mock.onGet(new RegExp(/^\/hrfamilies\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrfamilyid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrfamilyid, tempValue.hrfamilyid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: Remove");
......@@ -351,6 +594,34 @@ mock.onDelete(new RegExp(/^\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((conf
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrfamilyid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrfamilyid, tempValue.hrfamilyid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/hrfamilies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrfamily 方法: Get");
......
......@@ -87,6 +87,35 @@ mock.onDelete(new RegExp(/^\/hrlanguageabilities\/batch$/)).reply((config: any)
});
// Select
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrlanguageabilityid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrlanguageabilityid, tempValue.hrlanguageabilityid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Select
mock.onGet(new RegExp(/^\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: Select");
......@@ -114,6 +143,33 @@ mock.onGet(new RegExp(/^\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})\/select$/
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: Create");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrlanguageabilityid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Create
mock.onPost(new RegExp(/^\/hrlanguageabilities\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -140,6 +196,33 @@ mock.onPost(new RegExp(/^\/hrlanguageabilities\/?([a-zA-Z0-9\-\;]{0,35})$/)).rep
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrlanguageabilityid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Update
mock.onPut(new RegExp(/^\/hrlanguageabilities\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -179,6 +262,25 @@ mock.onPut(new RegExp(/^\/hrlanguageabilities\/?([a-zA-Z0-9\-\;]{0,35})$/)).repl
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// GetDraft
mock.onGet(new RegExp(/^\/hrlanguageabilities\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: GetDraft");
......@@ -194,6 +296,33 @@ mock.onGet(new RegExp(/^\/hrlanguageabilities\/getdraft$/)).reply((config: any)
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrlanguageabilityid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/hrlanguageabilities\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -232,6 +361,33 @@ mock.onPost(new RegExp(/^\/hrlanguageabilities\/?([a-zA-Z0-9\-\;]{0,35})\/checkk
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrlanguageabilityid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Save
mock.onPost(new RegExp(/^\/hrlanguageabilities\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -270,6 +426,51 @@ mock.onPost(new RegExp(/^\/hrlanguageabilities\/?([a-zA-Z0-9\-\;]{0,35})\/save$/
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/fetchdefault$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchDefault
mock.onGet(new RegExp(/^\/hrlanguageabilities\/fetchdefault$/)).reply((config: any) => {
......@@ -314,15 +515,57 @@ mock.onGet(new RegExp(/^\/hrlanguageabilities\/fetchdefault(\?[\w-./?%&=,]*)*$/)
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrlanguageabilityid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrlanguageabilityid, tempValue.hrlanguageabilityid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: Remove");
......@@ -351,6 +594,34 @@ mock.onDelete(new RegExp(/^\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/)).re
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['employeeid','hrlanguageabilityid'];
const matchArray:any = new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.hrlanguageabilityid, tempValue.hrlanguageabilityid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/hrlanguageabilities\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrlanguageability 方法: Get");
......
......@@ -561,7 +561,12 @@ export class HRArchivesGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrarchives', parameterName: 'hrarchives' },
{ pathName: 'editview', parameterName: 'editview' },
......@@ -595,7 +600,12 @@ export class HRArchivesGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrarchives', parameterName: 'hrarchives' },
{ pathName: 'editview', parameterName: 'editview' },
......
......@@ -561,7 +561,12 @@ export class HRCertificateGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrcertificates', parameterName: 'hrcertificate' },
{ pathName: 'editview', parameterName: 'editview' },
......@@ -595,7 +600,12 @@ export class HRCertificateGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrcertificates', parameterName: 'hrcertificate' },
{ pathName: 'editview', parameterName: 'editview' },
......
......@@ -561,7 +561,12 @@ export class HRFamilyGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrfamilies', parameterName: 'hrfamily' },
{ pathName: 'editview', parameterName: 'editview' },
......@@ -595,7 +600,12 @@ export class HRFamilyGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrfamilies', parameterName: 'hrfamily' },
{ pathName: 'editview', parameterName: 'editview' },
......
......@@ -561,7 +561,12 @@ export class HRLanguageAbilityGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrlanguageabilities', parameterName: 'hrlanguageability' },
{ pathName: 'editview', parameterName: 'editview' },
......@@ -595,7 +600,12 @@ export class HRLanguageAbilityGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrlanguageabilities', parameterName: 'hrlanguageability' },
{ pathName: 'editview', parameterName: 'editview' },
......
......@@ -57,6 +57,21 @@ const router = new Router({
},
component: () => import('@pages/human-resource/hrreward-grid-view/hrreward-grid-view.vue'),
},
{
path: 'hremployees/:hremployee?/hrcertificates/:hrcertificate?/editview/:editview?',
meta: {
caption: 'entities.hrcertificate.views.editview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hremployees', parameterName: 'hremployee' },
{ pathName: 'hrcertificates', parameterName: 'hrcertificate' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrcertificate-edit-view/hrcertificate-edit-view.vue'),
},
{
path: 'hrcertificates/:hrcertificate?/editview/:editview?',
meta: {
......@@ -113,6 +128,21 @@ const router = new Router({
},
component: () => import('@pages/base/hromhierarchy-cat-tab-exp-view/hromhierarchy-cat-tab-exp-view.vue'),
},
{
path: 'hremployees/:hremployee?/hrlanguageabilities/:hrlanguageability?/editview/:editview?',
meta: {
caption: 'entities.hrlanguageability.views.editview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hremployees', parameterName: 'hremployee' },
{ pathName: 'hrlanguageabilities', parameterName: 'hrlanguageability' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrlanguage-ability-edit-view/hrlanguage-ability-edit-view.vue'),
},
{
path: 'hrlanguageabilities/:hrlanguageability?/editview/:editview?',
meta: {
......@@ -382,6 +412,21 @@ const router = new Router({
},
component: () => import('@pages/human-resource/hrduty-edu-v-001/hrduty-edu-v-001.vue'),
},
{
path: 'hremployees/:hremployee?/hrarchives/:hrarchives?/gridview/:gridview?',
meta: {
caption: 'entities.hrarchives.views.gridview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hremployees', parameterName: 'hremployee' },
{ pathName: 'hrarchives', parameterName: 'hrarchives' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrarchives-grid-view/hrarchives-grid-view.vue'),
},
{
path: 'hrarchives/:hrarchives?/gridview/:gridview?',
meta: {
......@@ -1209,6 +1254,21 @@ const router = new Router({
},
component: () => import('@pages/base/hrorganization-pickup-view/hrorganization-pickup-view.vue'),
},
{
path: 'hremployees/:hremployee?/hrlanguageabilities/:hrlanguageability?/gridview/:gridview?',
meta: {
caption: 'entities.hrlanguageability.views.gridview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hremployees', parameterName: 'hremployee' },
{ pathName: 'hrlanguageabilities', parameterName: 'hrlanguageability' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrlanguage-ability-grid-view/hrlanguage-ability-grid-view.vue'),
},
{
path: 'hrlanguageabilities/:hrlanguageability?/gridview/:gridview?',
meta: {
......@@ -1496,6 +1556,21 @@ const router = new Router({
},
component: () => import('@pages/human-resource/hrduty-skill-v-001/hrduty-skill-v-001.vue'),
},
{
path: 'hremployees/:hremployee?/hrfamilies/:hrfamily?/gridview/:gridview?',
meta: {
caption: 'entities.hrfamily.views.gridview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hremployees', parameterName: 'hremployee' },
{ pathName: 'hrfamilies', parameterName: 'hrfamily' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrfamily-grid-view/hrfamily-grid-view.vue'),
},
{
path: 'hrfamilies/:hrfamily?/gridview/:gridview?',
meta: {
......@@ -1553,6 +1628,21 @@ const router = new Router({
},
component: () => import('@pages/human-resource/hrdistribution-v-002/hrdistribution-v-002.vue'),
},
{
path: 'hremployees/:hremployee?/hrcertificates/:hrcertificate?/gridview/:gridview?',
meta: {
caption: 'entities.hrcertificate.views.gridview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hremployees', parameterName: 'hremployee' },
{ pathName: 'hrcertificates', parameterName: 'hrcertificate' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrcertificate-grid-view/hrcertificate-grid-view.vue'),
},
{
path: 'hrcertificates/:hrcertificate?/gridview/:gridview?',
meta: {
......@@ -1796,6 +1886,21 @@ const router = new Router({
},
component: () => import('@pages/base/hrorg-contact-edit-view/hrorg-contact-edit-view.vue'),
},
{
path: 'hremployees/:hremployee?/hrfamilies/:hrfamily?/editview/:editview?',
meta: {
caption: 'entities.hrfamily.views.editview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hremployees', parameterName: 'hremployee' },
{ pathName: 'hrfamilies', parameterName: 'hrfamily' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrfamily-edit-view/hrfamily-edit-view.vue'),
},
{
path: 'hrfamilies/:hrfamily?/editview/:editview?',
meta: {
......@@ -1853,6 +1958,21 @@ const router = new Router({
},
component: () => import('@pages/human-resource/hrdistribution-grid-view/hrdistribution-grid-view.vue'),
},
{
path: 'hremployees/:hremployee?/hrarchives/:hrarchives?/editview/:editview?',
meta: {
caption: 'entities.hrarchives.views.editview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hremployees', parameterName: 'hremployee' },
{ pathName: 'hrarchives', parameterName: 'hrarchives' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrarchives-edit-view/hrarchives-edit-view.vue'),
},
{
path: 'hrarchives/:hrarchives?/editview/:editview?',
meta: {
......
......@@ -48,6 +48,11 @@ export default class HRArchivesServiceBase extends EntityService {
* @memberof HRArchivesServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrarchives){
let res:any = Http.getInstance().get(`/hremployees/${context.hremployee}/hrarchives/${context.hrarchives}/select`,isloading);
return res;
}
let res:any = Http.getInstance().get(`/hrarchives/${context.hrarchives}/select`,isloading);
return res;
......@@ -63,6 +68,20 @@ export default class HRArchivesServiceBase extends EntityService {
* @memberof HRArchivesServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
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(`/hremployees/${context.hremployee}/hrarchives`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
......@@ -87,6 +106,13 @@ export default class HRArchivesServiceBase extends EntityService {
* @memberof HRArchivesServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrarchives){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/hremployees/${context.hremployee}/hrarchives/${context.hrarchives}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/hrarchives/${context.hrarchives}`,data,isloading);
......@@ -104,6 +130,10 @@ export default class HRArchivesServiceBase extends EntityService {
* @memberof HRArchivesServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrarchives){
let res:any = Http.getInstance().delete(`/hremployees/${context.hremployee}/hrarchives/${context.hrarchives}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/hrarchives/${context.hrarchives}`,isloading);
return res;
}
......@@ -118,6 +148,11 @@ export default class HRArchivesServiceBase extends EntityService {
* @memberof HRArchivesServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrarchives){
let res:any = await Http.getInstance().get(`/hremployees/${context.hremployee}/hrarchives/${context.hrarchives}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/hrarchives/${context.hrarchives}`,isloading);
return res;
......@@ -133,6 +168,12 @@ export default class HRArchivesServiceBase extends EntityService {
* @memberof HRArchivesServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
let res:any = await Http.getInstance().get(`/hremployees/${context.hremployee}/hrarchives/getdraft`,isloading);
res.data.hrarchives = data.hrarchives;
return res;
}
let res:any = await Http.getInstance().get(`/hrarchives/getdraft`,isloading);
res.data.hrarchives = data.hrarchives;
......@@ -149,6 +190,13 @@ export default class HRArchivesServiceBase extends EntityService {
* @memberof HRArchivesServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrarchives){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hremployees/${context.hremployee}/hrarchives/${context.hrarchives}/checkkey`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/hrarchives/${context.hrarchives}/checkkey`,data,isloading);
return res;
}
......@@ -163,6 +211,13 @@ export default class HRArchivesServiceBase extends EntityService {
* @memberof HRArchivesServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrarchives){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hremployees/${context.hremployee}/hrarchives/${context.hrarchives}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hrarchives/${context.hrarchives}/save`,data,isloading);
......@@ -180,6 +235,11 @@ export default class HRArchivesServiceBase extends EntityService {
* @memberof HRArchivesServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hremployees/${context.hremployee}/hrarchives/fetchdefault`,tempData,isloading);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hrarchives/fetchdefault`,tempData,isloading);
return res;
......
......@@ -48,6 +48,11 @@ export default class HRCertificateServiceBase extends EntityService {
* @memberof HRCertificateServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrcertificate){
let res:any = Http.getInstance().get(`/hremployees/${context.hremployee}/hrcertificates/${context.hrcertificate}/select`,isloading);
return res;
}
let res:any = Http.getInstance().get(`/hrcertificates/${context.hrcertificate}/select`,isloading);
return res;
......@@ -63,6 +68,20 @@ export default class HRCertificateServiceBase extends EntityService {
* @memberof HRCertificateServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
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(`/hremployees/${context.hremployee}/hrcertificates`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
......@@ -87,6 +106,13 @@ export default class HRCertificateServiceBase extends EntityService {
* @memberof HRCertificateServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrcertificate){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/hremployees/${context.hremployee}/hrcertificates/${context.hrcertificate}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/hrcertificates/${context.hrcertificate}`,data,isloading);
......@@ -104,6 +130,10 @@ export default class HRCertificateServiceBase extends EntityService {
* @memberof HRCertificateServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrcertificate){
let res:any = Http.getInstance().delete(`/hremployees/${context.hremployee}/hrcertificates/${context.hrcertificate}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/hrcertificates/${context.hrcertificate}`,isloading);
return res;
}
......@@ -118,6 +148,11 @@ export default class HRCertificateServiceBase extends EntityService {
* @memberof HRCertificateServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrcertificate){
let res:any = await Http.getInstance().get(`/hremployees/${context.hremployee}/hrcertificates/${context.hrcertificate}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/hrcertificates/${context.hrcertificate}`,isloading);
return res;
......@@ -133,6 +168,12 @@ export default class HRCertificateServiceBase extends EntityService {
* @memberof HRCertificateServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
let res:any = await Http.getInstance().get(`/hremployees/${context.hremployee}/hrcertificates/getdraft`,isloading);
res.data.hrcertificate = data.hrcertificate;
return res;
}
let res:any = await Http.getInstance().get(`/hrcertificates/getdraft`,isloading);
res.data.hrcertificate = data.hrcertificate;
......@@ -149,6 +190,13 @@ export default class HRCertificateServiceBase extends EntityService {
* @memberof HRCertificateServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrcertificate){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hremployees/${context.hremployee}/hrcertificates/${context.hrcertificate}/checkkey`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/hrcertificates/${context.hrcertificate}/checkkey`,data,isloading);
return res;
}
......@@ -163,6 +211,13 @@ export default class HRCertificateServiceBase extends EntityService {
* @memberof HRCertificateServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrcertificate){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hremployees/${context.hremployee}/hrcertificates/${context.hrcertificate}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hrcertificates/${context.hrcertificate}/save`,data,isloading);
......@@ -180,6 +235,11 @@ export default class HRCertificateServiceBase extends EntityService {
* @memberof HRCertificateServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hremployees/${context.hremployee}/hrcertificates/fetchdefault`,tempData,isloading);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hrcertificates/fetchdefault`,tempData,isloading);
return res;
......
......@@ -73,6 +73,10 @@ export default class HREmployeeServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/hremployees`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_hrarchives',JSON.stringify(res.data.hrarchives?res.data.hrarchives:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_hrcertificates',JSON.stringify(res.data.hrcertificates?res.data.hrcertificates:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_hrfamilies',JSON.stringify(res.data.hrfamilies?res.data.hrfamilies:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_hrlanguageabilities',JSON.stringify(res.data.hrlanguageabilities?res.data.hrlanguageabilities:[]));
return res;
}
......
......@@ -48,6 +48,11 @@ export default class HRFamilyServiceBase extends EntityService {
* @memberof HRFamilyServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrfamily){
let res:any = Http.getInstance().get(`/hremployees/${context.hremployee}/hrfamilies/${context.hrfamily}/select`,isloading);
return res;
}
let res:any = Http.getInstance().get(`/hrfamilies/${context.hrfamily}/select`,isloading);
return res;
......@@ -63,6 +68,20 @@ export default class HRFamilyServiceBase extends EntityService {
* @memberof HRFamilyServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
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(`/hremployees/${context.hremployee}/hrfamilies`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
......@@ -87,6 +106,13 @@ export default class HRFamilyServiceBase extends EntityService {
* @memberof HRFamilyServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrfamily){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/hremployees/${context.hremployee}/hrfamilies/${context.hrfamily}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/hrfamilies/${context.hrfamily}`,data,isloading);
......@@ -104,6 +130,10 @@ export default class HRFamilyServiceBase extends EntityService {
* @memberof HRFamilyServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrfamily){
let res:any = Http.getInstance().delete(`/hremployees/${context.hremployee}/hrfamilies/${context.hrfamily}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/hrfamilies/${context.hrfamily}`,isloading);
return res;
}
......@@ -118,6 +148,11 @@ export default class HRFamilyServiceBase extends EntityService {
* @memberof HRFamilyServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrfamily){
let res:any = await Http.getInstance().get(`/hremployees/${context.hremployee}/hrfamilies/${context.hrfamily}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/hrfamilies/${context.hrfamily}`,isloading);
return res;
......@@ -133,6 +168,12 @@ export default class HRFamilyServiceBase extends EntityService {
* @memberof HRFamilyServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
let res:any = await Http.getInstance().get(`/hremployees/${context.hremployee}/hrfamilies/getdraft`,isloading);
res.data.hrfamily = data.hrfamily;
return res;
}
let res:any = await Http.getInstance().get(`/hrfamilies/getdraft`,isloading);
res.data.hrfamily = data.hrfamily;
......@@ -149,6 +190,13 @@ export default class HRFamilyServiceBase extends EntityService {
* @memberof HRFamilyServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrfamily){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hremployees/${context.hremployee}/hrfamilies/${context.hrfamily}/checkkey`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/hrfamilies/${context.hrfamily}/checkkey`,data,isloading);
return res;
}
......@@ -163,6 +211,13 @@ export default class HRFamilyServiceBase extends EntityService {
* @memberof HRFamilyServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrfamily){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hremployees/${context.hremployee}/hrfamilies/${context.hrfamily}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hrfamilies/${context.hrfamily}/save`,data,isloading);
......@@ -180,6 +235,11 @@ export default class HRFamilyServiceBase extends EntityService {
* @memberof HRFamilyServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hremployees/${context.hremployee}/hrfamilies/fetchdefault`,tempData,isloading);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hrfamilies/fetchdefault`,tempData,isloading);
return res;
......
......@@ -48,6 +48,11 @@ export default class HRLanguageAbilityServiceBase extends EntityService {
* @memberof HRLanguageAbilityServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrlanguageability){
let res:any = Http.getInstance().get(`/hremployees/${context.hremployee}/hrlanguageabilities/${context.hrlanguageability}/select`,isloading);
return res;
}
let res:any = Http.getInstance().get(`/hrlanguageabilities/${context.hrlanguageability}/select`,isloading);
return res;
......@@ -63,6 +68,20 @@ export default class HRLanguageAbilityServiceBase extends EntityService {
* @memberof HRLanguageAbilityServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
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(`/hremployees/${context.hremployee}/hrlanguageabilities`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
......@@ -87,6 +106,13 @@ export default class HRLanguageAbilityServiceBase extends EntityService {
* @memberof HRLanguageAbilityServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrlanguageability){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/hremployees/${context.hremployee}/hrlanguageabilities/${context.hrlanguageability}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/hrlanguageabilities/${context.hrlanguageability}`,data,isloading);
......@@ -104,6 +130,10 @@ export default class HRLanguageAbilityServiceBase extends EntityService {
* @memberof HRLanguageAbilityServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrlanguageability){
let res:any = Http.getInstance().delete(`/hremployees/${context.hremployee}/hrlanguageabilities/${context.hrlanguageability}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/hrlanguageabilities/${context.hrlanguageability}`,isloading);
return res;
}
......@@ -118,6 +148,11 @@ export default class HRLanguageAbilityServiceBase extends EntityService {
* @memberof HRLanguageAbilityServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrlanguageability){
let res:any = await Http.getInstance().get(`/hremployees/${context.hremployee}/hrlanguageabilities/${context.hrlanguageability}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/hrlanguageabilities/${context.hrlanguageability}`,isloading);
return res;
......@@ -133,6 +168,12 @@ export default class HRLanguageAbilityServiceBase extends EntityService {
* @memberof HRLanguageAbilityServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
let res:any = await Http.getInstance().get(`/hremployees/${context.hremployee}/hrlanguageabilities/getdraft`,isloading);
res.data.hrlanguageability = data.hrlanguageability;
return res;
}
let res:any = await Http.getInstance().get(`/hrlanguageabilities/getdraft`,isloading);
res.data.hrlanguageability = data.hrlanguageability;
......@@ -149,6 +190,13 @@ export default class HRLanguageAbilityServiceBase extends EntityService {
* @memberof HRLanguageAbilityServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrlanguageability){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hremployees/${context.hremployee}/hrlanguageabilities/${context.hrlanguageability}/checkkey`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/hrlanguageabilities/${context.hrlanguageability}/checkkey`,data,isloading);
return res;
}
......@@ -163,6 +211,13 @@ export default class HRLanguageAbilityServiceBase extends EntityService {
* @memberof HRLanguageAbilityServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && context.hrlanguageability){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hremployees/${context.hremployee}/hrlanguageabilities/${context.hrlanguageability}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/hrlanguageabilities/${context.hrlanguageability}/save`,data,isloading);
......@@ -180,6 +235,11 @@ export default class HRLanguageAbilityServiceBase extends EntityService {
* @memberof HRLanguageAbilityServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.hremployee && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hremployees/${context.hremployee}/hrlanguageabilities/fetchdefault`,tempData,isloading);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hrlanguageabilities/fetchdefault`,tempData,isloading);
return res;
......
......@@ -37,11 +37,11 @@
git clone -b master $para2 ibizhumanresources/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizhumanresources/
mvn clean package -Phrapi
cd humanresource-provider/humanresource-provider-hrapi
mvn -Phrapi docker:build
mvn -Phrapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-provider-hrapi.yaml iBizEE --with-registry-auth
mvn clean package -Ppim
cd humanresource-app/humanresource-app-pim
mvn -Ppim docker:build
mvn -Ppim docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-app-pim.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-app-pim.jar
EXPOSE 8080
EXPOSE 10327
ADD humanresource-app-pim.jar /humanresource-app-pim.jar
......@@ -3,9 +3,25 @@ services:
humanresource-app-pim:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-app-pim:latest
ports:
- "8080:8080"
- "10327:10327"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10327
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-provider-hrapi.jar
EXPOSE 10317
EXPOSE 8081
ADD humanresource-provider-hrapi.jar /humanresource-provider-hrapi.jar
......@@ -3,25 +3,9 @@ services:
humanresource-provider-hrapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-provider-hrapi:latest
ports:
- "10317:10317"
- "8081:8081"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10317
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -160,5 +160,138 @@ public class HRCertificateResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrcertificateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasPermission(this.hrcertificateMapping.toDomain(#hrcertificatedto),'iBizHumanResources-HRCertificate-Create')")
@ApiOperation(value = "根据员工建立证书信息", tags = {"证书信息" }, notes = "根据员工建立证书信息")
@RequestMapping(method = RequestMethod.POST, value = "/hremployees/{hremployee_id}/hrcertificates")
@Transactional
public ResponseEntity<HRCertificateDTO> createByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRCertificateDTO hrcertificatedto) {
HRCertificate domain = hrcertificateMapping.toDomain(hrcertificatedto);
domain.setHremployeeid(hremployee_id);
hrcertificateService.create(domain);
HRCertificateDTO dto = hrcertificateMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.hrcertificateMapping.toDomain(#hrcertificatedtos),'iBizHumanResources-HRCertificate-Create')")
@ApiOperation(value = "根据员工批量建立证书信息", tags = {"证书信息" }, notes = "根据员工批量建立证书信息")
@RequestMapping(method = RequestMethod.POST, value = "/hremployees/{hremployee_id}/hrcertificates/batch")
public ResponseEntity<Boolean> createBatchByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody List<HRCertificateDTO> hrcertificatedtos) {
List<HRCertificate> domainlist=hrcertificateMapping.toDomain(hrcertificatedtos);
for(HRCertificate domain:domainlist){
domain.setHremployeeid(hremployee_id);
}
hrcertificateService.createBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "hrcertificate" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.hrcertificateService.get(#hrcertificate_id),'iBizHumanResources-HRCertificate-Update')")
@ApiOperation(value = "根据员工更新证书信息", tags = {"证书信息" }, notes = "根据员工更新证书信息")
@RequestMapping(method = RequestMethod.PUT, value = "/hremployees/{hremployee_id}/hrcertificates/{hrcertificate_id}")
@Transactional
public ResponseEntity<HRCertificateDTO> updateByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @PathVariable("hrcertificate_id") String hrcertificate_id, @RequestBody HRCertificateDTO hrcertificatedto) {
HRCertificate domain = hrcertificateMapping.toDomain(hrcertificatedto);
domain.setHremployeeid(hremployee_id);
domain.setHrcertificateid(hrcertificate_id);
hrcertificateService.update(domain);
HRCertificateDTO dto = hrcertificateMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.hrcertificateService.getHrcertificateByEntities(this.hrcertificateMapping.toDomain(#hrcertificatedtos)),'iBizHumanResources-HRCertificate-Update')")
@ApiOperation(value = "根据员工批量更新证书信息", tags = {"证书信息" }, notes = "根据员工批量更新证书信息")
@RequestMapping(method = RequestMethod.PUT, value = "/hremployees/{hremployee_id}/hrcertificates/batch")
public ResponseEntity<Boolean> updateBatchByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody List<HRCertificateDTO> hrcertificatedtos) {
List<HRCertificate> domainlist=hrcertificateMapping.toDomain(hrcertificatedtos);
for(HRCertificate domain:domainlist){
domain.setHremployeeid(hremployee_id);
}
hrcertificateService.updateBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.hrcertificateService.get(#hrcertificate_id),'iBizHumanResources-HRCertificate-Remove')")
@ApiOperation(value = "根据员工删除证书信息", tags = {"证书信息" }, notes = "根据员工删除证书信息")
@RequestMapping(method = RequestMethod.DELETE, value = "/hremployees/{hremployee_id}/hrcertificates/{hrcertificate_id}")
@Transactional
public ResponseEntity<Boolean> removeByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @PathVariable("hrcertificate_id") String hrcertificate_id) {
return ResponseEntity.status(HttpStatus.OK).body(hrcertificateService.remove(hrcertificate_id));
}
@PreAuthorize("hasPermission(this.hrcertificateService.getHrcertificateByIds(#ids),'iBizHumanResources-HRCertificate-Remove')")
@ApiOperation(value = "根据员工批量删除证书信息", tags = {"证书信息" }, notes = "根据员工批量删除证书信息")
@RequestMapping(method = RequestMethod.DELETE, value = "/hremployees/{hremployee_id}/hrcertificates/batch")
public ResponseEntity<Boolean> removeBatchByHREmployee(@RequestBody List<String> ids) {
hrcertificateService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.hrcertificateMapping.toDomain(returnObject.body),'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "根据员工获取证书信息", tags = {"证书信息" }, notes = "根据员工获取证书信息")
@RequestMapping(method = RequestMethod.GET, value = "/hremployees/{hremployee_id}/hrcertificates/{hrcertificate_id}")
public ResponseEntity<HRCertificateDTO> getByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @PathVariable("hrcertificate_id") String hrcertificate_id) {
HRCertificate domain = hrcertificateService.get(hrcertificate_id);
HRCertificateDTO dto = hrcertificateMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "根据员工获取证书信息草稿", tags = {"证书信息" }, notes = "根据员工获取证书信息草稿")
@RequestMapping(method = RequestMethod.GET, value = "/hremployees/{hremployee_id}/hrcertificates/getdraft")
public ResponseEntity<HRCertificateDTO> getDraftByHREmployee(@PathVariable("hremployee_id") String hremployee_id) {
HRCertificate domain = new HRCertificate();
domain.setHremployeeid(hremployee_id);
return ResponseEntity.status(HttpStatus.OK).body(hrcertificateMapping.toDto(hrcertificateService.getDraft(domain)));
}
@ApiOperation(value = "根据员工检查证书信息", tags = {"证书信息" }, notes = "根据员工检查证书信息")
@RequestMapping(method = RequestMethod.POST, value = "/hremployees/{hremployee_id}/hrcertificates/checkkey")
public ResponseEntity<Boolean> checkKeyByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRCertificateDTO hrcertificatedto) {
return ResponseEntity.status(HttpStatus.OK).body(hrcertificateService.checkKey(hrcertificateMapping.toDomain(hrcertificatedto)));
}
@PreAuthorize("hasPermission(this.hrcertificateMapping.toDomain(#hrcertificatedto),'iBizHumanResources-HRCertificate-Save')")
@ApiOperation(value = "根据员工保存证书信息", tags = {"证书信息" }, notes = "根据员工保存证书信息")
@RequestMapping(method = RequestMethod.POST, value = "/hremployees/{hremployee_id}/hrcertificates/save")
public ResponseEntity<Boolean> saveByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRCertificateDTO hrcertificatedto) {
HRCertificate domain = hrcertificateMapping.toDomain(hrcertificatedto);
domain.setHremployeeid(hremployee_id);
return ResponseEntity.status(HttpStatus.OK).body(hrcertificateService.save(domain));
}
@PreAuthorize("hasPermission(this.hrcertificateMapping.toDomain(#hrcertificatedtos),'iBizHumanResources-HRCertificate-Save')")
@ApiOperation(value = "根据员工批量保存证书信息", tags = {"证书信息" }, notes = "根据员工批量保存证书信息")
@RequestMapping(method = RequestMethod.POST, value = "/hremployees/{hremployee_id}/hrcertificates/savebatch")
public ResponseEntity<Boolean> saveBatchByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody List<HRCertificateDTO> hrcertificatedtos) {
List<HRCertificate> domainlist=hrcertificateMapping.toDomain(hrcertificatedtos);
for(HRCertificate domain:domainlist){
domain.setHremployeeid(hremployee_id);
}
hrcertificateService.saveBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HRCertificate-searchDefault-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "根据员工获取DEFAULT", tags = {"证书信息" } ,notes = "根据员工获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/hremployees/{hremployee_id}/hrcertificates/fetchdefault")
public ResponseEntity<List<HRCertificateDTO>> fetchHRCertificateDefaultByHREmployee(@PathVariable("hremployee_id") String hremployee_id,HRCertificateSearchContext context) {
context.setN_hremployeeid_eq(hremployee_id);
Page<HRCertificate> domains = hrcertificateService.searchDefault(context) ;
List<HRCertificateDTO> list = hrcertificateMapping.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','iBizHumanResources-HRCertificate-searchDefault-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "根据员工查询DEFAULT", tags = {"证书信息" } ,notes = "根据员工查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/hremployees/{hremployee_id}/hrcertificates/searchdefault")
public ResponseEntity<Page<HRCertificateDTO>> searchHRCertificateDefaultByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRCertificateSearchContext context) {
context.setN_hremployeeid_eq(hremployee_id);
Page<HRCertificate> domains = hrcertificateService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrcertificateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -160,5 +160,138 @@ public class HRLanguageAbilityResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrlanguageabilityMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasPermission(this.hrlanguageabilityMapping.toDomain(#hrlanguageabilitydto),'iBizHumanResources-HRLanguageAbility-Create')")
@ApiOperation(value = "根据员工建立语言能力", tags = {"语言能力" }, notes = "根据员工建立语言能力")
@RequestMapping(method = RequestMethod.POST, value = "/hremployees/{hremployee_id}/hrlanguageabilities")
@Transactional
public ResponseEntity<HRLanguageAbilityDTO> createByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRLanguageAbilityDTO hrlanguageabilitydto) {
HRLanguageAbility domain = hrlanguageabilityMapping.toDomain(hrlanguageabilitydto);
domain.setHremployeeid(hremployee_id);
hrlanguageabilityService.create(domain);
HRLanguageAbilityDTO dto = hrlanguageabilityMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.hrlanguageabilityMapping.toDomain(#hrlanguageabilitydtos),'iBizHumanResources-HRLanguageAbility-Create')")
@ApiOperation(value = "根据员工批量建立语言能力", tags = {"语言能力" }, notes = "根据员工批量建立语言能力")
@RequestMapping(method = RequestMethod.POST, value = "/hremployees/{hremployee_id}/hrlanguageabilities/batch")
public ResponseEntity<Boolean> createBatchByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody List<HRLanguageAbilityDTO> hrlanguageabilitydtos) {
List<HRLanguageAbility> domainlist=hrlanguageabilityMapping.toDomain(hrlanguageabilitydtos);
for(HRLanguageAbility domain:domainlist){
domain.setHremployeeid(hremployee_id);
}
hrlanguageabilityService.createBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "hrlanguageability" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.hrlanguageabilityService.get(#hrlanguageability_id),'iBizHumanResources-HRLanguageAbility-Update')")
@ApiOperation(value = "根据员工更新语言能力", tags = {"语言能力" }, notes = "根据员工更新语言能力")
@RequestMapping(method = RequestMethod.PUT, value = "/hremployees/{hremployee_id}/hrlanguageabilities/{hrlanguageability_id}")
@Transactional
public ResponseEntity<HRLanguageAbilityDTO> updateByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @PathVariable("hrlanguageability_id") String hrlanguageability_id, @RequestBody HRLanguageAbilityDTO hrlanguageabilitydto) {
HRLanguageAbility domain = hrlanguageabilityMapping.toDomain(hrlanguageabilitydto);
domain.setHremployeeid(hremployee_id);
domain.setHrlanguageabilityid(hrlanguageability_id);
hrlanguageabilityService.update(domain);
HRLanguageAbilityDTO dto = hrlanguageabilityMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.hrlanguageabilityService.getHrlanguageabilityByEntities(this.hrlanguageabilityMapping.toDomain(#hrlanguageabilitydtos)),'iBizHumanResources-HRLanguageAbility-Update')")
@ApiOperation(value = "根据员工批量更新语言能力", tags = {"语言能力" }, notes = "根据员工批量更新语言能力")
@RequestMapping(method = RequestMethod.PUT, value = "/hremployees/{hremployee_id}/hrlanguageabilities/batch")
public ResponseEntity<Boolean> updateBatchByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody List<HRLanguageAbilityDTO> hrlanguageabilitydtos) {
List<HRLanguageAbility> domainlist=hrlanguageabilityMapping.toDomain(hrlanguageabilitydtos);
for(HRLanguageAbility domain:domainlist){
domain.setHremployeeid(hremployee_id);
}
hrlanguageabilityService.updateBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.hrlanguageabilityService.get(#hrlanguageability_id),'iBizHumanResources-HRLanguageAbility-Remove')")
@ApiOperation(value = "根据员工删除语言能力", tags = {"语言能力" }, notes = "根据员工删除语言能力")
@RequestMapping(method = RequestMethod.DELETE, value = "/hremployees/{hremployee_id}/hrlanguageabilities/{hrlanguageability_id}")
@Transactional
public ResponseEntity<Boolean> removeByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @PathVariable("hrlanguageability_id") String hrlanguageability_id) {
return ResponseEntity.status(HttpStatus.OK).body(hrlanguageabilityService.remove(hrlanguageability_id));
}
@PreAuthorize("hasPermission(this.hrlanguageabilityService.getHrlanguageabilityByIds(#ids),'iBizHumanResources-HRLanguageAbility-Remove')")
@ApiOperation(value = "根据员工批量删除语言能力", tags = {"语言能力" }, notes = "根据员工批量删除语言能力")
@RequestMapping(method = RequestMethod.DELETE, value = "/hremployees/{hremployee_id}/hrlanguageabilities/batch")
public ResponseEntity<Boolean> removeBatchByHREmployee(@RequestBody List<String> ids) {
hrlanguageabilityService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.hrlanguageabilityMapping.toDomain(returnObject.body),'iBizHumanResources-HRLanguageAbility-Get')")
@ApiOperation(value = "根据员工获取语言能力", tags = {"语言能力" }, notes = "根据员工获取语言能力")
@RequestMapping(method = RequestMethod.GET, value = "/hremployees/{hremployee_id}/hrlanguageabilities/{hrlanguageability_id}")
public ResponseEntity<HRLanguageAbilityDTO> getByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @PathVariable("hrlanguageability_id") String hrlanguageability_id) {
HRLanguageAbility domain = hrlanguageabilityService.get(hrlanguageability_id);
HRLanguageAbilityDTO dto = hrlanguageabilityMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "根据员工获取语言能力草稿", tags = {"语言能力" }, notes = "根据员工获取语言能力草稿")
@RequestMapping(method = RequestMethod.GET, value = "/hremployees/{hremployee_id}/hrlanguageabilities/getdraft")
public ResponseEntity<HRLanguageAbilityDTO> getDraftByHREmployee(@PathVariable("hremployee_id") String hremployee_id) {
HRLanguageAbility domain = new HRLanguageAbility();
domain.setHremployeeid(hremployee_id);
return ResponseEntity.status(HttpStatus.OK).body(hrlanguageabilityMapping.toDto(hrlanguageabilityService.getDraft(domain)));
}
@ApiOperation(value = "根据员工检查语言能力", tags = {"语言能力" }, notes = "根据员工检查语言能力")
@RequestMapping(method = RequestMethod.POST, value = "/hremployees/{hremployee_id}/hrlanguageabilities/checkkey")
public ResponseEntity<Boolean> checkKeyByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRLanguageAbilityDTO hrlanguageabilitydto) {
return ResponseEntity.status(HttpStatus.OK).body(hrlanguageabilityService.checkKey(hrlanguageabilityMapping.toDomain(hrlanguageabilitydto)));
}
@PreAuthorize("hasPermission(this.hrlanguageabilityMapping.toDomain(#hrlanguageabilitydto),'iBizHumanResources-HRLanguageAbility-Save')")
@ApiOperation(value = "根据员工保存语言能力", tags = {"语言能力" }, notes = "根据员工保存语言能力")
@RequestMapping(method = RequestMethod.POST, value = "/hremployees/{hremployee_id}/hrlanguageabilities/save")
public ResponseEntity<Boolean> saveByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRLanguageAbilityDTO hrlanguageabilitydto) {
HRLanguageAbility domain = hrlanguageabilityMapping.toDomain(hrlanguageabilitydto);
domain.setHremployeeid(hremployee_id);
return ResponseEntity.status(HttpStatus.OK).body(hrlanguageabilityService.save(domain));
}
@PreAuthorize("hasPermission(this.hrlanguageabilityMapping.toDomain(#hrlanguageabilitydtos),'iBizHumanResources-HRLanguageAbility-Save')")
@ApiOperation(value = "根据员工批量保存语言能力", tags = {"语言能力" }, notes = "根据员工批量保存语言能力")
@RequestMapping(method = RequestMethod.POST, value = "/hremployees/{hremployee_id}/hrlanguageabilities/savebatch")
public ResponseEntity<Boolean> saveBatchByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody List<HRLanguageAbilityDTO> hrlanguageabilitydtos) {
List<HRLanguageAbility> domainlist=hrlanguageabilityMapping.toDomain(hrlanguageabilitydtos);
for(HRLanguageAbility domain:domainlist){
domain.setHremployeeid(hremployee_id);
}
hrlanguageabilityService.saveBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HRLanguageAbility-searchDefault-all') and hasPermission(#context,'iBizHumanResources-HRLanguageAbility-Get')")
@ApiOperation(value = "根据员工获取DEFAULT", tags = {"语言能力" } ,notes = "根据员工获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/hremployees/{hremployee_id}/hrlanguageabilities/fetchdefault")
public ResponseEntity<List<HRLanguageAbilityDTO>> fetchHRLanguageAbilityDefaultByHREmployee(@PathVariable("hremployee_id") String hremployee_id,HRLanguageAbilitySearchContext context) {
context.setN_hremployeeid_eq(hremployee_id);
Page<HRLanguageAbility> domains = hrlanguageabilityService.searchDefault(context) ;
List<HRLanguageAbilityDTO> list = hrlanguageabilityMapping.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','iBizHumanResources-HRLanguageAbility-searchDefault-all') and hasPermission(#context,'iBizHumanResources-HRLanguageAbility-Get')")
@ApiOperation(value = "根据员工查询DEFAULT", tags = {"语言能力" } ,notes = "根据员工查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/hremployees/{hremployee_id}/hrlanguageabilities/searchdefault")
public ResponseEntity<Page<HRLanguageAbilityDTO>> searchHRLanguageAbilityDefaultByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRLanguageAbilitySearchContext context) {
context.setN_hremployeeid_eq(hremployee_id);
Page<HRLanguageAbility> domains = hrlanguageabilityService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrlanguageabilityMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册