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

jackwang 部署微服务接口

上级 2444d080
......@@ -37,11 +37,11 @@
git clone -b master $para2 ibizhumanresources/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizhumanresources/
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
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
</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 10327
EXPOSE 8080
ADD humanresource-app-pim.jar /humanresource-app-pim.jar
......@@ -3,25 +3,9 @@ services:
humanresource-app-pim:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-app-pim:latest
ports:
- "10327:10327"
- "8080:8080"
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:
......
......@@ -345,6 +345,14 @@ public class HREmployee extends EntityMP implements Serializable {
@JSONField(name = "hrdutyname")
@JsonProperty("hrdutyname")
private String hrdutyname;
/**
* 试用期
*/
@TableField(value = "probationtime")
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "probationtime" , format="yyyy-MM-dd")
@JsonProperty("probationtime")
private Timestamp probationtime;
/**
*
......@@ -668,6 +676,24 @@ public class HREmployee extends EntityMP implements Serializable {
this.modify("hrpostid",hrpostid);
}
/**
* 设置 [试用期]
*/
public void setProbationtime(Timestamp probationtime){
this.probationtime = probationtime ;
this.modify("probationtime",probationtime);
}
/**
* 格式化日期 [试用期]
*/
public String formatProbationtime(){
if (this.probationtime == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(probationtime);
}
}
......
......@@ -19,7 +19,11 @@ import com.alibaba.fastjson.JSONObject;
public interface HREmployeeMapper extends BaseMapper<HREmployee>{
Page<HREmployee> searchAfterProbation(IPage page, @Param("srf") HREmployeeSearchContext context, @Param("ew") Wrapper<HREmployee> wrapper) ;
Page<HREmployee> searchDefault(IPage page, @Param("srf") HREmployeeSearchContext context, @Param("ew") Wrapper<HREmployee> wrapper) ;
Page<HREmployee> searchLeaveDuty(IPage page, @Param("srf") HREmployeeSearchContext context, @Param("ew") Wrapper<HREmployee> wrapper) ;
Page<HREmployee> searchOnDuty(IPage page, @Param("srf") HREmployeeSearchContext context, @Param("ew") Wrapper<HREmployee> wrapper) ;
Page<HREmployee> searchWaitDuty(IPage page, @Param("srf") HREmployeeSearchContext context, @Param("ew") Wrapper<HREmployee> wrapper) ;
@Override
HREmployee selectById(Serializable id);
@Override
......
......@@ -36,7 +36,11 @@ public interface IHREmployeeService extends IService<HREmployee>{
boolean checkKey(HREmployee et) ;
boolean save(HREmployee et) ;
void saveBatch(List<HREmployee> list) ;
Page<HREmployee> searchAfterProbation(HREmployeeSearchContext context) ;
Page<HREmployee> searchDefault(HREmployeeSearchContext context) ;
Page<HREmployee> searchLeaveDuty(HREmployeeSearchContext context) ;
Page<HREmployee> searchOnDuty(HREmployeeSearchContext context) ;
Page<HREmployee> searchWaitDuty(HREmployeeSearchContext context) ;
List<HREmployee> selectByOrganizationid(String organizationid) ;
void removeByOrganizationid(String organizationid) ;
List<HREmployee> selectByEmpstate(String hrempstateid) ;
......
......@@ -232,6 +232,15 @@ public class HREmployeeServiceImpl extends ServiceImpl<HREmployeeMapper, HREmplo
}
/**
* 查询集合 待定工作人员
*/
@Override
public Page<HREmployee> searchAfterProbation(HREmployeeSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<HREmployee> pages=baseMapper.searchAfterProbation(context.getPages(),context,context.getSelectCond());
return new PageImpl<HREmployee>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 DEFAULT
*/
......@@ -241,6 +250,33 @@ public class HREmployeeServiceImpl extends ServiceImpl<HREmployeeMapper, HREmplo
return new PageImpl<HREmployee>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 前员工
*/
@Override
public Page<HREmployee> searchLeaveDuty(HREmployeeSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<HREmployee> pages=baseMapper.searchLeaveDuty(context.getPages(),context,context.getSelectCond());
return new PageImpl<HREmployee>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 在岗员工
*/
@Override
public Page<HREmployee> searchOnDuty(HREmployeeSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<HREmployee> pages=baseMapper.searchOnDuty(context.getPages(),context,context.getSelectCond());
return new PageImpl<HREmployee>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 待定工作人员
*/
@Override
public Page<HREmployee> searchWaitDuty(HREmployeeSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<HREmployee> pages=baseMapper.searchWaitDuty(context.getPages(),context,context.getSelectCond());
return new PageImpl<HREmployee>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
......
......@@ -87,7 +87,7 @@
"dename":"HREmployee",
"delogicname":"员工",
"sysmoudle":{"id":"HUMANRESOURCE","name":"人力"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"dedataset":[{"id":"AfterProbation" , "name":"待定工作人员"},{"id":"Default" , "name":"DEFAULT"},{"id":"LeaveDuty" , "name":"前员工"},{"id":"OnDuty" , "name":"在岗员工"},{"id":"WaitDuty" , "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 8081
EXPOSE 10317
ADD humanresource-provider-hrapi.jar /humanresource-provider-hrapi.jar
......@@ -3,9 +3,25 @@ services:
humanresource-provider-hrapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-provider-hrapi:latest
ports:
- "8081:8081"
- "10317:10317"
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:
......
......@@ -366,6 +366,15 @@ public class HREmployeeDTO extends DTOBase implements Serializable {
@JsonProperty("hrdutyname")
private String hrdutyname;
/**
* 属性 [PROBATIONTIME]
*
*/
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "probationtime" , format="yyyy-MM-dd")
@JsonProperty("probationtime")
private Timestamp probationtime;
/**
* 设置 [EMPLOYEENAME]
......@@ -623,6 +632,14 @@ public class HREmployeeDTO extends DTOBase implements Serializable {
this.modify("hrpostid",hrpostid);
}
/**
* 设置 [PROBATIONTIME]
*/
public void setProbationtime(Timestamp probationtime){
this.probationtime = probationtime ;
this.modify("probationtime",probationtime);
}
}
......@@ -139,6 +139,27 @@ public class HREmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HREmployee-searchAfterProbation-all') and hasPermission(#context,'iBizHumanResources-HREmployee-Get')")
@ApiOperation(value = "获取待定工作人员", tags = {"员工" } ,notes = "获取待定工作人员")
@RequestMapping(method= RequestMethod.GET , value="/hremployees/fetchafterprobation")
public ResponseEntity<List<HREmployeeDTO>> fetchAfterProbation(HREmployeeSearchContext context) {
Page<HREmployee> domains = hremployeeService.searchAfterProbation(context) ;
List<HREmployeeDTO> list = hremployeeMapping.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-HREmployee-searchAfterProbation-all') and hasPermission(#context,'iBizHumanResources-HREmployee-Get')")
@ApiOperation(value = "查询待定工作人员", tags = {"员工" } ,notes = "查询待定工作人员")
@RequestMapping(method= RequestMethod.POST , value="/hremployees/searchafterprobation")
public ResponseEntity<Page<HREmployeeDTO>> searchAfterProbation(@RequestBody HREmployeeSearchContext context) {
Page<HREmployee> domains = hremployeeService.searchAfterProbation(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hremployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HREmployee-searchDefault-all') and hasPermission(#context,'iBizHumanResources-HREmployee-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"员工" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/hremployees/fetchdefault")
......@@ -160,5 +181,68 @@ public class HREmployeeResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hremployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HREmployee-searchLeaveDuty-all') and hasPermission(#context,'iBizHumanResources-HREmployee-Get')")
@ApiOperation(value = "获取前员工", tags = {"员工" } ,notes = "获取前员工")
@RequestMapping(method= RequestMethod.GET , value="/hremployees/fetchleaveduty")
public ResponseEntity<List<HREmployeeDTO>> fetchLeaveDuty(HREmployeeSearchContext context) {
Page<HREmployee> domains = hremployeeService.searchLeaveDuty(context) ;
List<HREmployeeDTO> list = hremployeeMapping.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-HREmployee-searchLeaveDuty-all') and hasPermission(#context,'iBizHumanResources-HREmployee-Get')")
@ApiOperation(value = "查询前员工", tags = {"员工" } ,notes = "查询前员工")
@RequestMapping(method= RequestMethod.POST , value="/hremployees/searchleaveduty")
public ResponseEntity<Page<HREmployeeDTO>> searchLeaveDuty(@RequestBody HREmployeeSearchContext context) {
Page<HREmployee> domains = hremployeeService.searchLeaveDuty(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hremployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HREmployee-searchOnDuty-all') and hasPermission(#context,'iBizHumanResources-HREmployee-Get')")
@ApiOperation(value = "获取在岗员工", tags = {"员工" } ,notes = "获取在岗员工")
@RequestMapping(method= RequestMethod.GET , value="/hremployees/fetchonduty")
public ResponseEntity<List<HREmployeeDTO>> fetchOnDuty(HREmployeeSearchContext context) {
Page<HREmployee> domains = hremployeeService.searchOnDuty(context) ;
List<HREmployeeDTO> list = hremployeeMapping.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-HREmployee-searchOnDuty-all') and hasPermission(#context,'iBizHumanResources-HREmployee-Get')")
@ApiOperation(value = "查询在岗员工", tags = {"员工" } ,notes = "查询在岗员工")
@RequestMapping(method= RequestMethod.POST , value="/hremployees/searchonduty")
public ResponseEntity<Page<HREmployeeDTO>> searchOnDuty(@RequestBody HREmployeeSearchContext context) {
Page<HREmployee> domains = hremployeeService.searchOnDuty(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hremployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizHumanResources-HREmployee-searchWaitDuty-all') and hasPermission(#context,'iBizHumanResources-HREmployee-Get')")
@ApiOperation(value = "获取待定工作人员", tags = {"员工" } ,notes = "获取待定工作人员")
@RequestMapping(method= RequestMethod.GET , value="/hremployees/fetchwaitduty")
public ResponseEntity<List<HREmployeeDTO>> fetchWaitDuty(HREmployeeSearchContext context) {
Page<HREmployee> domains = hremployeeService.searchWaitDuty(context) ;
List<HREmployeeDTO> list = hremployeeMapping.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-HREmployee-searchWaitDuty-all') and hasPermission(#context,'iBizHumanResources-HREmployee-Get')")
@ApiOperation(value = "查询待定工作人员", tags = {"员工" } ,notes = "查询待定工作人员")
@RequestMapping(method= RequestMethod.POST , value="/hremployees/searchwaitduty")
public ResponseEntity<Page<HREmployeeDTO>> searchWaitDuty(@RequestBody HREmployeeSearchContext context) {
Page<HREmployee> domains = hremployeeService.searchWaitDuty(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hremployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册