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

jackwang 部署微服务接口

上级 0eabedb5
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
git clone -b master $para2 ibizhumanresources/ git clone -b master $para2 ibizhumanresources/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibizhumanresources/ cd ibizhumanresources/
mvn clean package -Ppim mvn clean package -Phrapi
cd humanresource-app/humanresource-app-pim cd humanresource-provider/humanresource-provider-hrapi
mvn -Ppim docker:build mvn -Phrapi docker:build
mvn -Ppim docker:push mvn -Phrapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-app-pim.yaml iBizEE --with-registry-auth docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-provider-hrapi.yaml iBizEE --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-app-pim.jar 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 ADD humanresource-app-pim.jar /humanresource-app-pim.jar
...@@ -3,25 +3,9 @@ services: ...@@ -3,25 +3,9 @@ services:
humanresource-app-pim: humanresource-app-pim:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-app-pim:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-app-pim:latest
ports: ports:
- "10327:10327" - "8080:8080"
networks: networks:
- agent_network - 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: deploy:
resources: resources:
limits: limits:
......
...@@ -89,6 +89,66 @@ public class HRDistribution extends EntityMP implements Serializable { ...@@ -89,6 +89,66 @@ public class HRDistribution extends EntityMP implements Serializable {
@JSONField(name = "createman") @JSONField(name = "createman")
@JsonProperty("createman") @JsonProperty("createman")
private String createman; private String createman;
/**
* 员工标识
*/
@TableField(value = "hremployeeid")
@JSONField(name = "hremployeeid")
@JsonProperty("hremployeeid")
private String hremployeeid;
/**
* 员工姓名
*/
@TableField(exist = false)
@JSONField(name = "hremployeename")
@JsonProperty("hremployeename")
private String hremployeename;
/**
* 开始时间
*/
@TableField(value = "begintime")
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "begintime" , format="yyyy-MM-dd")
@JsonProperty("begintime")
private Timestamp begintime;
/**
* 结束时间
*/
@TableField(value = "endtime")
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "endtime" , format="yyyy-MM-dd")
@JsonProperty("endtime")
private Timestamp endtime;
/**
* 职位标识
*/
@TableField(value = "hrpostid")
@JSONField(name = "hrpostid")
@JsonProperty("hrpostid")
private String hrpostid;
/**
* 职位
*/
@TableField(exist = false)
@JSONField(name = "hrpostname")
@JsonProperty("hrpostname")
private String hrpostname;
/**
* 员工
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.humanresource.core.humanresource.domain.HREmployee hremployee;
/**
* 职位
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.humanresource.core.humanresource.domain.HRPost hrpost;
...@@ -100,6 +160,58 @@ public class HRDistribution extends EntityMP implements Serializable { ...@@ -100,6 +160,58 @@ public class HRDistribution extends EntityMP implements Serializable {
this.modify("hrdistributionname",hrdistributionname); this.modify("hrdistributionname",hrdistributionname);
} }
/**
* 设置 [员工标识]
*/
public void setHremployeeid(String hremployeeid){
this.hremployeeid = hremployeeid ;
this.modify("hremployeeid",hremployeeid);
}
/**
* 设置 [开始时间]
*/
public void setBegintime(Timestamp begintime){
this.begintime = begintime ;
this.modify("begintime",begintime);
}
/**
* 格式化日期 [开始时间]
*/
public String formatBegintime(){
if (this.begintime == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(begintime);
}
/**
* 设置 [结束时间]
*/
public void setEndtime(Timestamp endtime){
this.endtime = endtime ;
this.modify("endtime",endtime);
}
/**
* 格式化日期 [结束时间]
*/
public String formatEndtime(){
if (this.endtime == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(endtime);
}
/**
* 设置 [职位标识]
*/
public void setHrpostid(String hrpostid){
this.hrpostid = hrpostid ;
this.modify("hrpostid",hrpostid);
}
} }
......
...@@ -41,7 +41,7 @@ public class HREmployee extends EntityMP implements Serializable { ...@@ -41,7 +41,7 @@ public class HREmployee extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 员工名称 * 员工姓名
*/ */
@TableField(value = "employeename") @TableField(value = "employeename")
@JSONField(name = "employeename") @JSONField(name = "employeename")
...@@ -108,7 +108,7 @@ public class HREmployee extends EntityMP implements Serializable { ...@@ -108,7 +108,7 @@ public class HREmployee extends EntityMP implements Serializable {
/** /**
* 设置 [员工名称] * 设置 [员工姓名]
*/ */
public void setEmployeename(String employeename){ public void setEmployeename(String employeename){
this.employeename = employeename ; this.employeename = employeename ;
......
...@@ -146,6 +146,13 @@ public class HRPost extends EntityMP implements Serializable { ...@@ -146,6 +146,13 @@ public class HRPost extends EntityMP implements Serializable {
@JSONField(name = "entrytime" , format="yyyy-MM-dd") @JSONField(name = "entrytime" , format="yyyy-MM-dd")
@JsonProperty("entrytime") @JsonProperty("entrytime")
private Timestamp entrytime; private Timestamp entrytime;
/**
* 编制人数
*/
@TableField(value = "postnum")
@JSONField(name = "postnum")
@JsonProperty("postnum")
private BigInteger postnum;
/** /**
* 职务 * 职务
...@@ -231,6 +238,14 @@ public class HRPost extends EntityMP implements Serializable { ...@@ -231,6 +238,14 @@ public class HRPost extends EntityMP implements Serializable {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(entrytime); return sdf.format(entrytime);
} }
/**
* 设置 [编制人数]
*/
public void setPostnum(BigInteger postnum){
this.postnum = postnum ;
this.modify("postnum",postnum);
}
} }
......
...@@ -34,6 +34,48 @@ public class HRDistributionSearchContext extends QueryWrapperContext<HRDistribut ...@@ -34,6 +34,48 @@ public class HRDistributionSearchContext extends QueryWrapperContext<HRDistribut
this.getSearchCond().like("hrdistributionname", n_hrdistributionname_like); this.getSearchCond().like("hrdistributionname", n_hrdistributionname_like);
} }
} }
private String n_hremployeeid_eq;//[员工标识]
public void setN_hremployeeid_eq(String n_hremployeeid_eq) {
this.n_hremployeeid_eq = n_hremployeeid_eq;
if(!ObjectUtils.isEmpty(this.n_hremployeeid_eq)){
this.getSearchCond().eq("hremployeeid", n_hremployeeid_eq);
}
}
private String n_hremployeename_eq;//[员工姓名]
public void setN_hremployeename_eq(String n_hremployeename_eq) {
this.n_hremployeename_eq = n_hremployeename_eq;
if(!ObjectUtils.isEmpty(this.n_hremployeename_eq)){
this.getSearchCond().eq("hremployeename", n_hremployeename_eq);
}
}
private String n_hremployeename_like;//[员工姓名]
public void setN_hremployeename_like(String n_hremployeename_like) {
this.n_hremployeename_like = n_hremployeename_like;
if(!ObjectUtils.isEmpty(this.n_hremployeename_like)){
this.getSearchCond().like("hremployeename", n_hremployeename_like);
}
}
private String n_hrpostid_eq;//[职位标识]
public void setN_hrpostid_eq(String n_hrpostid_eq) {
this.n_hrpostid_eq = n_hrpostid_eq;
if(!ObjectUtils.isEmpty(this.n_hrpostid_eq)){
this.getSearchCond().eq("hrpostid", n_hrpostid_eq);
}
}
private String n_hrpostname_eq;//[职位]
public void setN_hrpostname_eq(String n_hrpostname_eq) {
this.n_hrpostname_eq = n_hrpostname_eq;
if(!ObjectUtils.isEmpty(this.n_hrpostname_eq)){
this.getSearchCond().eq("hrpostname", n_hrpostname_eq);
}
}
private String n_hrpostname_like;//[职位]
public void setN_hrpostname_like(String n_hrpostname_like) {
this.n_hrpostname_like = n_hrpostname_like;
if(!ObjectUtils.isEmpty(this.n_hrpostname_like)){
this.getSearchCond().like("hrpostname", n_hrpostname_like);
}
}
/** /**
* 启用快速搜索 * 启用快速搜索
......
...@@ -27,7 +27,7 @@ import cn.ibizlab.humanresource.core.humanresource.domain.HREmployee; ...@@ -27,7 +27,7 @@ import cn.ibizlab.humanresource.core.humanresource.domain.HREmployee;
@Data @Data
public class HREmployeeSearchContext extends QueryWrapperContext<HREmployee> { public class HREmployeeSearchContext extends QueryWrapperContext<HREmployee> {
private String n_employeename_like;//[员工名称] private String n_employeename_like;//[员工姓名]
public void setN_employeename_like(String n_employeename_like) { public void setN_employeename_like(String n_employeename_like) {
this.n_employeename_like = n_employeename_like; this.n_employeename_like = n_employeename_like;
if(!ObjectUtils.isEmpty(this.n_employeename_like)){ if(!ObjectUtils.isEmpty(this.n_employeename_like)){
......
...@@ -62,4 +62,8 @@ public interface HRDistributionMapper extends BaseMapper<HRDistribution>{ ...@@ -62,4 +62,8 @@ public interface HRDistributionMapper extends BaseMapper<HRDistribution>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<HRDistribution> selectByHremployeeid(@Param("employeeid") Serializable employeeid) ;
List<HRDistribution> selectByHrpostid(@Param("hrpostid") Serializable hrpostid) ;
} }
...@@ -37,6 +37,10 @@ public interface IHRDistributionService extends IService<HRDistribution>{ ...@@ -37,6 +37,10 @@ public interface IHRDistributionService extends IService<HRDistribution>{
boolean save(HRDistribution et) ; boolean save(HRDistribution et) ;
void saveBatch(List<HRDistribution> list) ; void saveBatch(List<HRDistribution> list) ;
Page<HRDistribution> searchDefault(HRDistributionSearchContext context) ; Page<HRDistribution> searchDefault(HRDistributionSearchContext context) ;
List<HRDistribution> selectByHremployeeid(String employeeid) ;
void removeByHremployeeid(String employeeid) ;
List<HRDistribution> selectByHrpostid(String hrpostid) ;
void removeByHrpostid(String hrpostid) ;
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -45,12 +45,19 @@ import org.springframework.util.StringUtils; ...@@ -45,12 +45,19 @@ import org.springframework.util.StringUtils;
@Service("HRDistributionServiceImpl") @Service("HRDistributionServiceImpl")
public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper, HRDistribution> implements IHRDistributionService { public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper, HRDistribution> implements IHRDistributionService {
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.humanresource.service.IHREmployeeService hremployeeService;
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.humanresource.service.IHRPostService hrpostService;
protected int batchSize = 500; protected int batchSize = 500;
@Override @Override
@Transactional @Transactional
public boolean create(HRDistribution et) { public boolean create(HRDistribution et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et)))
return false; return false;
CachedBeanCopier.copy(get(et.getHrdistributionid()),et); CachedBeanCopier.copy(get(et.getHrdistributionid()),et);
...@@ -59,12 +66,14 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper, ...@@ -59,12 +66,14 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
@Override @Override
public void createBatch(List<HRDistribution> list) { public void createBatch(List<HRDistribution> list) {
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize); this.saveBatch(list,batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean update(HRDistribution et) { public boolean update(HRDistribution et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("hrdistributionid",et.getHrdistributionid()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("hrdistributionid",et.getHrdistributionid())))
return false; return false;
CachedBeanCopier.copy(get(et.getHrdistributionid()),et); CachedBeanCopier.copy(get(et.getHrdistributionid()),et);
...@@ -73,6 +82,7 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper, ...@@ -73,6 +82,7 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
@Override @Override
public void updateBatch(List<HRDistribution> list) { public void updateBatch(List<HRDistribution> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize); updateBatchById(list,batchSize);
} }
...@@ -103,6 +113,7 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper, ...@@ -103,6 +113,7 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
@Override @Override
public HRDistribution getDraft(HRDistribution et) { public HRDistribution getDraft(HRDistribution et) {
fillParentData(et);
return et; return et;
} }
...@@ -130,16 +141,38 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper, ...@@ -130,16 +141,38 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
@Override @Override
public boolean saveBatch(Collection<HRDistribution> list) { public boolean saveBatch(Collection<HRDistribution> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize); saveOrUpdateBatch(list,batchSize);
return true; return true;
} }
@Override @Override
public void saveBatch(List<HRDistribution> list) { public void saveBatch(List<HRDistribution> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize); saveOrUpdateBatch(list,batchSize);
} }
@Override
public List<HRDistribution> selectByHremployeeid(String employeeid) {
return baseMapper.selectByHremployeeid(employeeid);
}
@Override
public void removeByHremployeeid(String employeeid) {
this.remove(new QueryWrapper<HRDistribution>().eq("hremployeeid",employeeid));
}
@Override
public List<HRDistribution> selectByHrpostid(String hrpostid) {
return baseMapper.selectByHrpostid(hrpostid);
}
@Override
public void removeByHrpostid(String hrpostid) {
this.remove(new QueryWrapper<HRDistribution>().eq("hrpostid",hrpostid));
}
/** /**
* 查询集合 DEFAULT * 查询集合 DEFAULT
...@@ -152,6 +185,32 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper, ...@@ -152,6 +185,32 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(HRDistribution et){
//实体关系[DER1N_HRDISTRIBUTION_HREMPLOYEE_HREMPLOYEEID_327A4D]
if(!ObjectUtils.isEmpty(et.getHremployeeid())){
cn.ibizlab.humanresource.core.humanresource.domain.HREmployee hremployee=et.getHremployee();
if(ObjectUtils.isEmpty(hremployee)){
cn.ibizlab.humanresource.core.humanresource.domain.HREmployee majorEntity=hremployeeService.get(et.getHremployeeid());
et.setHremployee(majorEntity);
hremployee=majorEntity;
}
et.setHremployeename(hremployee.getEmployeename());
}
//实体关系[DER1N_HRDISTRIBUTION_HRPOST_HRPOSTID]
if(!ObjectUtils.isEmpty(et.getHrpostid())){
cn.ibizlab.humanresource.core.humanresource.domain.HRPost hrpost=et.getHrpost();
if(ObjectUtils.isEmpty(hrpost)){
cn.ibizlab.humanresource.core.humanresource.domain.HRPost majorEntity=hrpostService.get(et.getHrpostid());
et.setHrpost(majorEntity);
hrpost=majorEntity;
}
et.setHrpostname(hrpost.getHrpostname());
}
}
......
...@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils; ...@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
@Service("HREmployeeServiceImpl") @Service("HREmployeeServiceImpl")
public class HREmployeeServiceImpl extends ServiceImpl<HREmployeeMapper, HREmployee> implements IHREmployeeService { public class HREmployeeServiceImpl extends ServiceImpl<HREmployeeMapper, HREmployee> implements IHREmployeeService {
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.humanresource.service.IHRDistributionService hrdistributionService;
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.humanresource.core.base.service.IHROrganizationService hrorganizationService; protected cn.ibizlab.humanresource.core.base.service.IHROrganizationService hrorganizationService;
......
...@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils; ...@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
@Service("HRPostServiceImpl") @Service("HRPostServiceImpl")
public class HRPostServiceImpl extends ServiceImpl<HRPostMapper, HRPost> implements IHRPostService { public class HRPostServiceImpl extends ServiceImpl<HRPostMapper, HRPost> implements IHRPostService {
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.humanresource.service.IHRDistributionService hrdistributionService;
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.humanresource.core.humanresource.service.IHRDutyService hrdutyService; protected cn.ibizlab.humanresource.core.humanresource.service.IHRDutyService hrdutyService;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<!--输出实体[HRDISTRIBUTION]数据结构 --> <!--输出实体[HRDISTRIBUTION]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hrdistribution-2-2"> <changeSet author="a_LAB01_e85d8801c" id="tab-hrdistribution-11-2">
<createTable tableName="T_HRDISTRIBUTION"> <createTable tableName="T_HRDISTRIBUTION">
<column name="UPDATEMAN" remarks="" type="VARCHAR(60)"> <column name="UPDATEMAN" remarks="" type="VARCHAR(60)">
</column> </column>
...@@ -39,6 +39,14 @@ ...@@ -39,6 +39,14 @@
</column> </column>
<column name="CREATEMAN" remarks="" type="VARCHAR(60)"> <column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column> </column>
<column name="HREMPLOYEEID" remarks="" type="VARCHAR(100)">
</column>
<column name="BEGINTIME" remarks="" type="DATETIME">
</column>
<column name="ENDTIME" remarks="" type="DATETIME">
</column>
<column name="HRPOSTID" remarks="" type="VARCHAR(100)">
</column>
</createTable> </createTable>
</changeSet> </changeSet>
...@@ -64,7 +72,7 @@ ...@@ -64,7 +72,7 @@
<!--输出实体[HREMPLOYEE]数据结构 --> <!--输出实体[HREMPLOYEE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hremployee-5-4"> <changeSet author="a_LAB01_e85d8801c" id="tab-hremployee-7-4">
<createTable tableName="EMPLOYEE"> <createTable tableName="EMPLOYEE">
<column name="EMPLOYEENAME" remarks="" type="VARCHAR(200)"> <column name="EMPLOYEENAME" remarks="" type="VARCHAR(200)">
</column> </column>
...@@ -180,7 +188,7 @@ ...@@ -180,7 +188,7 @@
<!--输出实体[HROMHIERARCHYCAT]数据结构 --> <!--输出实体[HROMHIERARCHYCAT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hromhierarchycat-70-9"> <changeSet author="a_LAB01_e85d8801c" id="tab-hromhierarchycat-76-9">
<createTable tableName="OMHIERARCHYCAT"> <createTable tableName="OMHIERARCHYCAT">
<column name="OMHIERARCHYCATID" remarks="" type="VARCHAR(100)"> <column name="OMHIERARCHYCATID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_HROMHIERARCHYCAT_OMHIERARCH"/> <constraints primaryKey="true" primaryKeyName="PK_HROMHIERARCHYCAT_OMHIERARCH"/>
...@@ -338,7 +346,7 @@ ...@@ -338,7 +346,7 @@
<!--输出实体[HRPOST]数据结构 --> <!--输出实体[HRPOST]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hrpost-45-15"> <changeSet author="a_LAB01_e85d8801c" id="tab-hrpost-47-15">
<createTable tableName="T_HRPOST"> <createTable tableName="T_HRPOST">
<column name="HRPOSTID" remarks="" type="VARCHAR(100)"> <column name="HRPOSTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_HRPOST_HRPOSTID"/> <constraints primaryKey="true" primaryKeyName="PK_HRPOST_HRPOSTID"/>
...@@ -365,6 +373,8 @@ ...@@ -365,6 +373,8 @@
</column> </column>
<column name="ENTRYTIME" remarks="" type="DATETIME"> <column name="ENTRYTIME" remarks="" type="DATETIME">
</column> </column>
<column name="POSTNUM" remarks="" type="BIGINT">
</column>
</createTable> </createTable>
</changeSet> </changeSet>
...@@ -390,44 +400,50 @@ ...@@ -390,44 +400,50 @@
<!--输出实体[HRATTENDANCE]外键关系 --> <!--输出实体[HRATTENDANCE]外键关系 -->
<!--输出实体[HRDISTRIBUTION]外键关系 --> <!--输出实体[HRDISTRIBUTION]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrdistribution-11-17">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRDISTRIBUTION" constraintName="DER1N_HRDISTRIBUTION_HREMPLOYE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hrdistribution-11-18">
<addForeignKeyConstraint baseColumnNames="HRPOSTID" baseTableName="T_HRDISTRIBUTION" constraintName="DER1N_HRDISTRIBUTION_HRPOST_HR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HRPOSTID" referencedTableName="T_HRPOST" validate="true"/>
</changeSet>
<!--输出实体[HRDUTY]外键关系 --> <!--输出实体[HRDUTY]外键关系 -->
<!--输出实体[HREMPLOYEE]外键关系 --> <!--输出实体[HREMPLOYEE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-5-17"> <changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-7-19">
<addForeignKeyConstraint baseColumnNames="ORGANIZATIONID" baseTableName="EMPLOYEE" constraintName="DER1N_EMPLOYEE_ORGANIZATION_OR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/> <addForeignKeyConstraint baseColumnNames="ORGANIZATIONID" baseTableName="EMPLOYEE" constraintName="DER1N_EMPLOYEE_ORGANIZATION_OR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[HRLEAVE]外键关系 --> <!--输出实体[HRLEAVE]外键关系 -->
<!--输出实体[HRLEGAL]外键关系 --> <!--输出实体[HRLEGAL]外键关系 -->
<!--输出实体[HROMHIERARCHYPURPOSE]外键关系 --> <!--输出实体[HROMHIERARCHYPURPOSE]外键关系 -->
<!--输出实体[HROMHIERARCHY]外键关系 --> <!--输出实体[HROMHIERARCHY]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-18"> <changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-20">
<addForeignKeyConstraint baseColumnNames="HROMHIERARCHYCATID" baseTableName="OMHIERARCHY" constraintName="DER1N_HROMHIERARCHY_HROMHIERAR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OMHIERARCHYCATID" referencedTableName="OMHIERARCHYCAT" validate="true"/> <addForeignKeyConstraint baseColumnNames="HROMHIERARCHYCATID" baseTableName="OMHIERARCHY" constraintName="DER1N_HROMHIERARCHY_HROMHIERAR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OMHIERARCHYCATID" referencedTableName="OMHIERARCHYCAT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-19"> <changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-21">
<addForeignKeyConstraint baseColumnNames="POMHIERARCHYID" baseTableName="OMHIERARCHY" constraintName="DER1N_OMHIERARCHY_OMHIERARCHY_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OMHIERARCHYID" referencedTableName="OMHIERARCHY" validate="true"/> <addForeignKeyConstraint baseColumnNames="POMHIERARCHYID" baseTableName="OMHIERARCHY" constraintName="DER1N_OMHIERARCHY_OMHIERARCHY_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OMHIERARCHYID" referencedTableName="OMHIERARCHY" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-20"> <changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-22">
<addForeignKeyConstraint baseColumnNames="ORGANIZATIONID" baseTableName="OMHIERARCHY" constraintName="DER1N_OMHIERARCHY_ORGANIZATION" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/> <addForeignKeyConstraint baseColumnNames="ORGANIZATIONID" baseTableName="OMHIERARCHY" constraintName="DER1N_OMHIERARCHY_ORGANIZATION" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[HROMHIERARCHYCAT]外键关系 --> <!--输出实体[HROMHIERARCHYCAT]外键关系 -->
<!--输出实体[HROMHIERARCHYPURPOSEREF]外键关系 --> <!--输出实体[HROMHIERARCHYPURPOSEREF]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchypurposeref-6-21"> <changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchypurposeref-6-23">
<addForeignKeyConstraint baseColumnNames="OMHIERARCHYCATID" baseTableName="OMHIERARCHYPURPOSEREF" constraintName="DER1N_OMHIERARCHYPURPOSEREF_OM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OMHIERARCHYCATID" referencedTableName="OMHIERARCHYCAT" validate="true"/> <addForeignKeyConstraint baseColumnNames="OMHIERARCHYCATID" baseTableName="OMHIERARCHYPURPOSEREF" constraintName="DER1N_OMHIERARCHYPURPOSEREF_OM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OMHIERARCHYCATID" referencedTableName="OMHIERARCHYCAT" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[HROPERATIONUNIT]外键关系 --> <!--输出实体[HROPERATIONUNIT]外键关系 -->
<!--输出实体[HRORGADDRESS]外键关系 --> <!--输出实体[HRORGADDRESS]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrorgaddress-29-23"> <changeSet author="a_LAB01_e85d8801c" id="fk-hrorgaddress-29-25">
<addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRORGADDRESS" constraintName="DER1N_HRORGADDRESS_HRORGANIZAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/> <addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRORGADDRESS" constraintName="DER1N_HRORGADDRESS_HRORGANIZAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[HRORGCONTACT]外键关系 --> <!--输出实体[HRORGCONTACT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrorgcontact-24-24"> <changeSet author="a_LAB01_e85d8801c" id="fk-hrorgcontact-24-26">
<addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRORGCONTACT" constraintName="DER1N_HRORGCONTACT_HRORGANIZAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/> <addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRORGCONTACT" constraintName="DER1N_HRORGCONTACT_HRORGANIZAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[HRORGANIZATION]外键关系 --> <!--输出实体[HRORGANIZATION]外键关系 -->
<!--输出实体[HRPOST]外键关系 --> <!--输出实体[HRPOST]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpost-45-25"> <changeSet author="a_LAB01_e85d8801c" id="fk-hrpost-47-27">
<addForeignKeyConstraint baseColumnNames="HRDUTYID" baseTableName="T_HRPOST" constraintName="DER1N_HRPOST_HRDUTY_HRDUTYID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HRDUTYID" referencedTableName="T_HRDUTY" validate="true"/> <addForeignKeyConstraint baseColumnNames="HRDUTYID" baseTableName="T_HRPOST" constraintName="DER1N_HRPOST_HRDUTY_HRDUTYID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HRDUTYID" referencedTableName="T_HRDUTY" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpost-45-26"> <changeSet author="a_LAB01_e85d8801c" id="fk-hrpost-47-28">
<addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRPOST" constraintName="DER1N_HRPOST_HRORGANIZATION_HR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/> <addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRPOST" constraintName="DER1N_HRPOST_HRORGANIZATION_HR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[HRPOSTREL]外键关系 --> <!--输出实体[HRPOSTREL]外键关系 -->
......
...@@ -5,16 +5,36 @@ ...@@ -5,16 +5,36 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="HRDistributionResultMap" databaseId="mysql"> <select id="selectById" resultMap="HRDistributionResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1 ) t1 where hrdistributionid=#{id}]]> <![CDATA[select t1.* from (SELECT t1.`BEGINTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENDTIME`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`HREMPLOYEEID`, t11.`EMPLOYEENAME` AS `HREMPLOYEENAME`, t1.`HRPOSTID`, t21.`HRPOSTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1 LEFT JOIN EMPLOYEE t11 ON t1.HREMPLOYEEID = t11.EMPLOYEEID LEFT JOIN T_HRPOST t21 ON t1.HRPOSTID = t21.HRPOSTID ) t1 where hrdistributionid=#{id}]]>
</select> </select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="HRDistributionResultMap" type="cn.ibizlab.humanresource.core.humanresource.domain.HRDistribution" autoMapping="true"> <resultMap id="HRDistributionResultMap" type="cn.ibizlab.humanresource.core.humanresource.domain.HRDistribution" autoMapping="true">
<id property="hrdistributionid" column="hrdistributionid" /><!--主键字段映射--> <id property="hrdistributionid" column="hrdistributionid" /><!--主键字段映射-->
<result property="hremployeeid" column="hremployeeid" />
<result property="hrpostid" column="hrpostid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="hremployee" javaType="cn.ibizlab.humanresource.core.humanresource.domain.HREmployee" column="hremployeeid" select="cn.ibizlab.humanresource.core.humanresource.mapper.HREmployeeMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="hrpost" javaType="cn.ibizlab.humanresource.core.humanresource.domain.HRPost" column="hrpostid" select="cn.ibizlab.humanresource.core.humanresource.mapper.HRPostMapper.selectById" fetchType="lazy"></association>
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HRDISTRIBUTION_HREMPLOYEE_HREMPLOYEEID_327A4D] -->
<select id="selectByHremployeeid" resultMap="HRDistributionResultMap">
select t1.* from (
<include refid="Default" />
) t1
where hremployeeid=#{employeeid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HRDISTRIBUTION_HRPOST_HRPOSTID] -->
<select id="selectByHrpostid" resultMap="HRDistributionResultMap">
select t1.* from (
<include refid="Default" />
) t1
where hrpostid=#{hrpostid}
</select>
<!--数据集合[Default]--> <!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.humanresource.core.humanresource.filter.HRDistributionSearchContext" resultMap="HRDistributionResultMap"> <select id="searchDefault" parameterType="cn.ibizlab.humanresource.core.humanresource.filter.HRDistributionSearchContext" resultMap="HRDistributionResultMap">
...@@ -27,12 +47,12 @@ ...@@ -27,12 +47,12 @@
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1 <![CDATA[ SELECT t1.`BEGINTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENDTIME`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`HREMPLOYEEID`, t11.`EMPLOYEENAME` AS `HREMPLOYEENAME`, t1.`HRPOSTID`, t21.`HRPOSTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1 LEFT JOIN EMPLOYEE t11 ON t1.HREMPLOYEEID = t11.EMPLOYEEID LEFT JOIN T_HRPOST t21 ON t1.HRPOSTID = t21.HRPOSTID
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="mysql"> <sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1 <![CDATA[ SELECT t1.`BEGINTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENDTIME`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`HREMPLOYEEID`, t11.`EMPLOYEENAME` AS `HREMPLOYEENAME`, t1.`HRPOSTID`, t21.`HRPOSTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1 LEFT JOIN EMPLOYEE t11 ON t1.HREMPLOYEEID = t11.EMPLOYEEID LEFT JOIN T_HRPOST t21 ON t1.HRPOSTID = t21.HRPOSTID
]]> ]]>
</sql> </sql>
</mapper> </mapper>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="HRPostResultMap" databaseId="mysql"> <select id="selectById" resultMap="HRPostResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POSTTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID ) t1 where hrpostid=#{id}]]> <![CDATA[select t1.* from (SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POSTNUM`, t1.`POSTTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID ) t1 where hrpostid=#{id}]]>
</select> </select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
...@@ -47,12 +47,12 @@ ...@@ -47,12 +47,12 @@
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POSTTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID <![CDATA[ SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POSTNUM`, t1.`POSTTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="mysql"> <sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POSTTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID <![CDATA[ SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POSTNUM`, t1.`POSTTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID
]]> ]]>
</sql> </sql>
</mapper> </mapper>
......
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-provider-hrapi.jar 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 ADD humanresource-provider-hrapi.jar /humanresource-provider-hrapi.jar
...@@ -3,9 +3,25 @@ services: ...@@ -3,9 +3,25 @@ services:
humanresource-provider-hrapi: humanresource-provider-hrapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-provider-hrapi:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-provider-hrapi:latest
ports: ports:
- "8081:8081" - "10317:10317"
networks: networks:
- agent_network - 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: deploy:
resources: resources:
limits: limits:
......
...@@ -139,6 +139,14 @@ public class HRPostDTO extends DTOBase implements Serializable { ...@@ -139,6 +139,14 @@ public class HRPostDTO extends DTOBase implements Serializable {
@JsonProperty("entrytime") @JsonProperty("entrytime")
private Timestamp entrytime; private Timestamp entrytime;
/**
* 属性 [POSTNUM]
*
*/
@JSONField(name = "postnum")
@JsonProperty("postnum")
private BigInteger postnum;
/** /**
* 设置 [HRPOSTNAME] * 设置 [HRPOSTNAME]
...@@ -196,6 +204,14 @@ public class HRPostDTO extends DTOBase implements Serializable { ...@@ -196,6 +204,14 @@ public class HRPostDTO extends DTOBase implements Serializable {
this.modify("entrytime",entrytime); this.modify("entrytime",entrytime);
} }
/**
* 设置 [POSTNUM]
*/
public void setPostnum(BigInteger postnum){
this.postnum = postnum ;
this.modify("postnum",postnum);
}
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册