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

Miracle 部署微服务应用

上级 1b506940
......@@ -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:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册