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

Miracle 部署微服务应用

上级 1b506940
......@@ -428,6 +428,95 @@ mock.onPost(new RegExp(/^\/hrcertificates\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).re
});
// FetchActive
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/fetchactive$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchActive");
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\/fetchactive$/).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];
});
// FetchActive
mock.onGet(new RegExp(/^\/hrcertificates\/fetchactive$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchActive");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchActive
mock.onGet(new RegExp(/^\/hrcertificates\/fetchactive(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchActive");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchDefault");
......@@ -516,6 +605,184 @@ mock.onGet(new RegExp(/^\/hrcertificates\/fetchdefault(\?[\w-./?%&=,]*)*$/)).rep
return [status, records ? records : []];
});
// FetchInActive
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/fetchinactive$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchInActive");
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\/fetchinactive$/).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];
});
// FetchInActive
mock.onGet(new RegExp(/^\/hrcertificates\/fetchinactive$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchInActive");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchInActive
mock.onGet(new RegExp(/^\/hrcertificates\/fetchinactive(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchInActive");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// FetchSoonExpired
mock.onGet(new RegExp(/^\/hremployees\/([a-zA-Z0-9\-\;]{1,35})\/hrcertificates\/fetchsoonexpired$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchSoonExpired");
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\/fetchsoonexpired$/).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];
});
// FetchSoonExpired
mock.onGet(new RegExp(/^\/hrcertificates\/fetchsoonexpired$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchSoonExpired");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchSoonExpired
mock.onGet(new RegExp(/^\/hrcertificates\/fetchsoonexpired(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:hrcertificate 方法: FetchSoonExpired");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
......
......@@ -225,6 +225,26 @@ export default class HRCertificateServiceBase extends EntityService {
return res;
}
/**
* FetchActive接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRCertificateServiceBase
*/
public async FetchActive(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/fetchactive`,tempData,isloading);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hrcertificates/fetchactive`,tempData,isloading);
return res;
}
/**
* FetchDefault接口方法
*
......@@ -244,4 +264,44 @@ export default class HRCertificateServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/hrcertificates/fetchdefault`,tempData,isloading);
return res;
}
/**
* FetchInActive接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRCertificateServiceBase
*/
public async FetchInActive(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/fetchinactive`,tempData,isloading);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hrcertificates/fetchinactive`,tempData,isloading);
return res;
}
/**
* FetchSoonExpired接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRCertificateServiceBase
*/
public async FetchSoonExpired(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/fetchsoonexpired`,tempData,isloading);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/hrcertificates/fetchsoonexpired`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -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:
......
......@@ -19,7 +19,10 @@ import com.alibaba.fastjson.JSONObject;
public interface HRCertificateMapper extends BaseMapper<HRCertificate>{
Page<HRCertificate> searchActive(IPage page, @Param("srf") HRCertificateSearchContext context, @Param("ew") Wrapper<HRCertificate> wrapper) ;
Page<HRCertificate> searchDefault(IPage page, @Param("srf") HRCertificateSearchContext context, @Param("ew") Wrapper<HRCertificate> wrapper) ;
Page<HRCertificate> searchInActive(IPage page, @Param("srf") HRCertificateSearchContext context, @Param("ew") Wrapper<HRCertificate> wrapper) ;
Page<HRCertificate> searchSoonExpired(IPage page, @Param("srf") HRCertificateSearchContext context, @Param("ew") Wrapper<HRCertificate> wrapper) ;
@Override
HRCertificate selectById(Serializable id);
@Override
......
......@@ -36,7 +36,10 @@ public interface IHRCertificateService extends IService<HRCertificate>{
boolean checkKey(HRCertificate et) ;
boolean save(HRCertificate et) ;
void saveBatch(List<HRCertificate> list) ;
Page<HRCertificate> searchActive(HRCertificateSearchContext context) ;
Page<HRCertificate> searchDefault(HRCertificateSearchContext context) ;
Page<HRCertificate> searchInActive(HRCertificateSearchContext context) ;
Page<HRCertificate> searchSoonExpired(HRCertificateSearchContext context) ;
List<HRCertificate> selectByHremployeeid(String employeeid) ;
void removeByHremployeeid(String employeeid) ;
List<HRCertificate> selectByRegisterorganizationid(String organizationid) ;
......
......@@ -174,6 +174,15 @@ public class HRCertificateServiceImpl extends ServiceImpl<HRCertificateMapper, H
}
/**
* 查询集合 有效证书
*/
@Override
public Page<HRCertificate> searchActive(HRCertificateSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<HRCertificate> pages=baseMapper.searchActive(context.getPages(),context,context.getSelectCond());
return new PageImpl<HRCertificate>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 DEFAULT
*/
......@@ -183,6 +192,24 @@ public class HRCertificateServiceImpl extends ServiceImpl<HRCertificateMapper, H
return new PageImpl<HRCertificate>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 有效证书
*/
@Override
public Page<HRCertificate> searchInActive(HRCertificateSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<HRCertificate> pages=baseMapper.searchInActive(context.getPages(),context,context.getSelectCond());
return new PageImpl<HRCertificate>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 即将过期
*/
@Override
public Page<HRCertificate> searchSoonExpired(HRCertificateSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<HRCertificate> pages=baseMapper.searchSoonExpired(context.getPages(),context,context.getSelectCond());
return new PageImpl<HRCertificate>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
......
......@@ -36,6 +36,15 @@
where registerorganizationid=#{organizationid}
</select>
<!--数据集合[Active]-->
<select id="searchActive" parameterType="cn.ibizlab.humanresource.core.humanresource.filter.HRCertificateSearchContext" resultMap="HRCertificateResultMap">
select t1.* from (
<include refid="Active" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.humanresource.core.humanresource.filter.HRCertificateSearchContext" resultMap="HRCertificateResultMap">
select t1.* from (
......@@ -45,6 +54,24 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[InActive]-->
<select id="searchInActive" parameterType="cn.ibizlab.humanresource.core.humanresource.filter.HRCertificateSearchContext" resultMap="HRCertificateResultMap">
select t1.* from (
<include refid="InActive" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[SoonExpired]-->
<select id="searchSoonExpired" parameterType="cn.ibizlab.humanresource.core.humanresource.filter.HRCertificateSearchContext" resultMap="HRCertificateResultMap">
select t1.* from (
<include refid="SoonExpired" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Active]-->
<sql id="Active" databaseId="mysql">
<![CDATA[ SELECT t1.`ACTIVEFLAG`, t1.`ATTACHMENT`, t1.`AUTHDATE`, t1.`AUTHORGANIZATION`, t1.`CERTIFICATECODE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t11.`EMPLOYEECODE`, t11.`EMPSTATE`, t1.`EXPIREDATE`, t1.`HRCERTIFICATEID`, t1.`HRCERTIFICATENAME`, t1.`HREMPLOYEEID`, t11.`EMPLOYEENAME` AS `HREMPLOYEENAME`, t1.`MEMO`, t11.`ORGANIZATIONID`, t31.`ORGANIZATIONNAME`, t1.`REGISTERCODE`, t1.`REGISTERORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `REGISTERORGANIZATIONNAME`, t1.`REGISTERTIME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRCERTIFICATE` t1 LEFT JOIN EMPLOYEE t11 ON t1.HREMPLOYEEID = t11.EMPLOYEEID LEFT JOIN ORGANIZATION t21 ON t1.REGISTERORGANIZATIONID = t21.ORGANIZATIONID LEFT JOIN ORGANIZATION t31 ON t11.ORGANIZATIONID = t31.ORGANIZATIONID
......
......@@ -47,7 +47,7 @@
"dename":"HRCertificate",
"delogicname":"证书信息",
"sysmoudle":{"id":"HUMANRESOURCE","name":"人力"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"dedataset":[{"id":"Active" , "name":"有效证书"},{"id":"Default" , "name":"DEFAULT"},{"id":"InActive" , "name":"有效证书"},{"id":"SoonExpired" , "name":"即将过期"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
......
......@@ -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:
......
......@@ -139,6 +139,27 @@ public class HRCertificateResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HRCertificate-searchActive-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "获取有效证书", tags = {"证书信息" } ,notes = "获取有效证书")
@RequestMapping(method= RequestMethod.GET , value="/hrcertificates/fetchactive")
public ResponseEntity<List<HRCertificateDTO>> fetchActive(HRCertificateSearchContext context) {
Page<HRCertificate> domains = hrcertificateService.searchActive(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-searchActive-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "查询有效证书", tags = {"证书信息" } ,notes = "查询有效证书")
@RequestMapping(method= RequestMethod.POST , value="/hrcertificates/searchactive")
public ResponseEntity<Page<HRCertificateDTO>> searchActive(@RequestBody HRCertificateSearchContext context) {
Page<HRCertificate> domains = hrcertificateService.searchActive(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrcertificateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@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="/hrcertificates/fetchdefault")
......@@ -160,6 +181,48 @@ public class HRCertificateResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrcertificateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HRCertificate-searchInActive-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "获取有效证书", tags = {"证书信息" } ,notes = "获取有效证书")
@RequestMapping(method= RequestMethod.GET , value="/hrcertificates/fetchinactive")
public ResponseEntity<List<HRCertificateDTO>> fetchInActive(HRCertificateSearchContext context) {
Page<HRCertificate> domains = hrcertificateService.searchInActive(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-searchInActive-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "查询有效证书", tags = {"证书信息" } ,notes = "查询有效证书")
@RequestMapping(method= RequestMethod.POST , value="/hrcertificates/searchinactive")
public ResponseEntity<Page<HRCertificateDTO>> searchInActive(@RequestBody HRCertificateSearchContext context) {
Page<HRCertificate> domains = hrcertificateService.searchInActive(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrcertificateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HRCertificate-searchSoonExpired-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "获取即将过期", tags = {"证书信息" } ,notes = "获取即将过期")
@RequestMapping(method= RequestMethod.GET , value="/hrcertificates/fetchsoonexpired")
public ResponseEntity<List<HRCertificateDTO>> fetchSoonExpired(HRCertificateSearchContext context) {
Page<HRCertificate> domains = hrcertificateService.searchSoonExpired(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-searchSoonExpired-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "查询即将过期", tags = {"证书信息" } ,notes = "查询即将过期")
@RequestMapping(method= RequestMethod.POST , value="/hrcertificates/searchsoonexpired")
public ResponseEntity<Page<HRCertificateDTO>> searchSoonExpired(@RequestBody HRCertificateSearchContext context) {
Page<HRCertificate> domains = hrcertificateService.searchSoonExpired(context) ;
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")
......@@ -270,6 +333,29 @@ public class HRCertificateResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HRCertificate-searchActive-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "根据员工获取有效证书", tags = {"证书信息" } ,notes = "根据员工获取有效证书")
@RequestMapping(method= RequestMethod.GET , value="/hremployees/{hremployee_id}/hrcertificates/fetchactive")
public ResponseEntity<List<HRCertificateDTO>> fetchHRCertificateActiveByHREmployee(@PathVariable("hremployee_id") String hremployee_id,HRCertificateSearchContext context) {
context.setN_hremployeeid_eq(hremployee_id);
Page<HRCertificate> domains = hrcertificateService.searchActive(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-searchActive-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "根据员工查询有效证书", tags = {"证书信息" } ,notes = "根据员工查询有效证书")
@RequestMapping(method= RequestMethod.POST , value="/hremployees/{hremployee_id}/hrcertificates/searchactive")
public ResponseEntity<Page<HRCertificateDTO>> searchHRCertificateActiveByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRCertificateSearchContext context) {
context.setN_hremployeeid_eq(hremployee_id);
Page<HRCertificate> domains = hrcertificateService.searchActive(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrcertificateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@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")
......@@ -293,5 +379,51 @@ public class HRCertificateResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrcertificateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HRCertificate-searchInActive-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "根据员工获取有效证书", tags = {"证书信息" } ,notes = "根据员工获取有效证书")
@RequestMapping(method= RequestMethod.GET , value="/hremployees/{hremployee_id}/hrcertificates/fetchinactive")
public ResponseEntity<List<HRCertificateDTO>> fetchHRCertificateInActiveByHREmployee(@PathVariable("hremployee_id") String hremployee_id,HRCertificateSearchContext context) {
context.setN_hremployeeid_eq(hremployee_id);
Page<HRCertificate> domains = hrcertificateService.searchInActive(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-searchInActive-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "根据员工查询有效证书", tags = {"证书信息" } ,notes = "根据员工查询有效证书")
@RequestMapping(method= RequestMethod.POST , value="/hremployees/{hremployee_id}/hrcertificates/searchinactive")
public ResponseEntity<Page<HRCertificateDTO>> searchHRCertificateInActiveByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRCertificateSearchContext context) {
context.setN_hremployeeid_eq(hremployee_id);
Page<HRCertificate> domains = hrcertificateService.searchInActive(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrcertificateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HRCertificate-searchSoonExpired-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "根据员工获取即将过期", tags = {"证书信息" } ,notes = "根据员工获取即将过期")
@RequestMapping(method= RequestMethod.GET , value="/hremployees/{hremployee_id}/hrcertificates/fetchsoonexpired")
public ResponseEntity<List<HRCertificateDTO>> fetchHRCertificateSoonExpiredByHREmployee(@PathVariable("hremployee_id") String hremployee_id,HRCertificateSearchContext context) {
context.setN_hremployeeid_eq(hremployee_id);
Page<HRCertificate> domains = hrcertificateService.searchSoonExpired(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-searchSoonExpired-all') and hasPermission(#context,'iBizHumanResources-HRCertificate-Get')")
@ApiOperation(value = "根据员工查询即将过期", tags = {"证书信息" } ,notes = "根据员工查询即将过期")
@RequestMapping(method= RequestMethod.POST , value="/hremployees/{hremployee_id}/hrcertificates/searchsoonexpired")
public ResponseEntity<Page<HRCertificateDTO>> searchHRCertificateSoonExpiredByHREmployee(@PathVariable("hremployee_id") String hremployee_id, @RequestBody HRCertificateSearchContext context) {
context.setN_hremployeeid_eq(hremployee_id);
Page<HRCertificate> domains = hrcertificateService.searchSoonExpired(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hrcertificateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册