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

xignzi006 发布系统代码 [Spring Boot]

上级 ba7ba545
......@@ -108,6 +108,14 @@ public class Hr_skill_level extends EntityMP implements Serializable {
@JSONField(name = "create_uid")
@JsonProperty("create_uid")
private Long createUid;
/**
* 进度
*/
@DEField(name = "level_progress")
@TableField(value = "level_progress")
@JSONField(name = "level_progress")
@JsonProperty("level_progress")
private Integer levelProgress;
/**
*
......@@ -203,6 +211,14 @@ public class Hr_skill_level extends EntityMP implements Serializable {
this.modify("create_uid",createUid);
}
/**
* 设置 [进度]
*/
public void setLevelProgress(Integer levelProgress){
this.levelProgress = levelProgress ;
this.modify("level_progress",levelProgress);
}
@Override
public Serializable getDefaultKey(boolean gen) {
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Hr_skill_levelResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t1.ID, t1.NAME, t1.SKILL_TYPE_ID, t11.NAME AS SKILL_TYPE_NAME, t1.WRITE_DATE, t1.WRITE_UID FROM HR_SKILL_LEVEL t1 LEFT JOIN HR_SKILL_TYPE t11 ON t1.SKILL_TYPE_ID = t11.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t1.ID, t1.LEVEL_PROGRESS, t1.NAME, t1.SKILL_TYPE_ID, t11.NAME AS SKILL_TYPE_NAME, t1.WRITE_DATE, t1.WRITE_UID FROM HR_SKILL_LEVEL t1 LEFT JOIN HR_SKILL_TYPE t11 ON t1.SKILL_TYPE_ID = t11.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -17,6 +17,7 @@
<result property="createDate" column="create_date" />
<result property="writeUid" column="write_uid" />
<result property="createUid" column="create_uid" />
<result property="levelProgress" column="level_progress" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
......@@ -60,12 +61,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t1.ID, t1.NAME, t1.SKILL_TYPE_ID, t11.NAME AS SKILL_TYPE_NAME, t1.WRITE_DATE, t1.WRITE_UID FROM HR_SKILL_LEVEL t1 LEFT JOIN HR_SKILL_TYPE t11 ON t1.SKILL_TYPE_ID = t11.ID
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t1.ID, t1.LEVEL_PROGRESS, t1.NAME, t1.SKILL_TYPE_ID, t11.NAME AS SKILL_TYPE_NAME, t1.WRITE_DATE, t1.WRITE_UID FROM HR_SKILL_LEVEL t1 LEFT JOIN HR_SKILL_TYPE t11 ON t1.SKILL_TYPE_ID = t11.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t1.ID, t1.NAME, t1.SKILL_TYPE_ID, t11.NAME AS SKILL_TYPE_NAME, t1.WRITE_DATE, t1.WRITE_UID FROM HR_SKILL_LEVEL t1 LEFT JOIN HR_SKILL_TYPE t11 ON t1.SKILL_TYPE_ID = t11.ID
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t1.ID, t1.LEVEL_PROGRESS, t1.NAME, t1.SKILL_TYPE_ID, t11.NAME AS SKILL_TYPE_NAME, t1.WRITE_DATE, t1.WRITE_UID FROM HR_SKILL_LEVEL t1 LEFT JOIN HR_SKILL_TYPE t11 ON t1.SKILL_TYPE_ID = t11.ID
]]>
</sql>
......
......@@ -75841,6 +75841,19 @@
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"LEVEL_PROGRESS" ,
"codename":"Level_progress",
"field_logic_name":"进度",
"entity_name":"Hr_skill_level",
"field_type":"INT",
"nullable":1,
"physical_field":1,
"data_type":"INT",
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
......@@ -101,6 +101,14 @@ public class Hr_skill_levelDTO extends DTOBase implements Serializable {
@JsonSerialize(using = ToStringSerializer.class)
private Long createUid;
/**
* 属性 [LEVEL_PROGRESS]
*
*/
@JSONField(name = "level_progress")
@JsonProperty("level_progress")
private Integer levelProgress;
/**
* 设置 [NAME]
......@@ -150,6 +158,14 @@ public class Hr_skill_levelDTO extends DTOBase implements Serializable {
this.modify("create_uid",createUid);
}
/**
* 设置 [LEVEL_PROGRESS]
*/
public void setLevelProgress(Integer levelProgress){
this.levelProgress = levelProgress ;
this.modify("level_progress",levelProgress);
}
}
......
......@@ -164,7 +164,7 @@ public class Hr_leaveResource {
@RequestMapping(method = RequestMethod.POST, value = "/hr_employees/{hr_employee_id}/hr_leaves")
public ResponseEntity<Hr_leaveDTO> createByHr_employee(@PathVariable("hr_employee_id") Long hr_employee_id, @RequestBody Hr_leaveDTO hr_leavedto) {
Hr_leave domain = hr_leaveMapping.toDomain(hr_leavedto);
domain.setFirstApproverId(hr_employee_id);
domain.setEmployeeId(hr_employee_id);
hr_leaveService.create(domain);
Hr_leaveDTO dto = hr_leaveMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
......@@ -176,7 +176,7 @@ public class Hr_leaveResource {
public ResponseEntity<Boolean> createBatchByHr_employee(@PathVariable("hr_employee_id") Long hr_employee_id, @RequestBody List<Hr_leaveDTO> hr_leavedtos) {
List<Hr_leave> domainlist=hr_leaveMapping.toDomain(hr_leavedtos);
for(Hr_leave domain:domainlist){
domain.setFirstApproverId(hr_employee_id);
domain.setEmployeeId(hr_employee_id);
}
hr_leaveService.createBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
......@@ -188,7 +188,7 @@ public class Hr_leaveResource {
@RequestMapping(method = RequestMethod.PUT, value = "/hr_employees/{hr_employee_id}/hr_leaves/{hr_leave_id}")
public ResponseEntity<Hr_leaveDTO> updateByHr_employee(@PathVariable("hr_employee_id") Long hr_employee_id, @PathVariable("hr_leave_id") Long hr_leave_id, @RequestBody Hr_leaveDTO hr_leavedto) {
Hr_leave domain = hr_leaveMapping.toDomain(hr_leavedto);
domain.setFirstApproverId(hr_employee_id);
domain.setEmployeeId(hr_employee_id);
domain.setId(hr_leave_id);
hr_leaveService.update(domain);
Hr_leaveDTO dto = hr_leaveMapping.toDto(domain);
......@@ -201,7 +201,7 @@ public class Hr_leaveResource {
public ResponseEntity<Boolean> updateBatchByHr_employee(@PathVariable("hr_employee_id") Long hr_employee_id, @RequestBody List<Hr_leaveDTO> hr_leavedtos) {
List<Hr_leave> domainlist=hr_leaveMapping.toDomain(hr_leavedtos);
for(Hr_leave domain:domainlist){
domain.setFirstApproverId(hr_employee_id);
domain.setEmployeeId(hr_employee_id);
}
hr_leaveService.updateBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
......@@ -235,7 +235,7 @@ public class Hr_leaveResource {
@RequestMapping(method = RequestMethod.GET, value = "/hr_employees/{hr_employee_id}/hr_leaves/getdraft")
public ResponseEntity<Hr_leaveDTO> getDraftByHr_employee(@PathVariable("hr_employee_id") Long hr_employee_id) {
Hr_leave domain = new Hr_leave();
domain.setFirstApproverId(hr_employee_id);
domain.setEmployeeId(hr_employee_id);
return ResponseEntity.status(HttpStatus.OK).body(hr_leaveMapping.toDto(hr_leaveService.getDraft(domain)));
}
......@@ -250,7 +250,7 @@ public class Hr_leaveResource {
@RequestMapping(method = RequestMethod.POST, value = "/hr_employees/{hr_employee_id}/hr_leaves/save")
public ResponseEntity<Boolean> saveByHr_employee(@PathVariable("hr_employee_id") Long hr_employee_id, @RequestBody Hr_leaveDTO hr_leavedto) {
Hr_leave domain = hr_leaveMapping.toDomain(hr_leavedto);
domain.setFirstApproverId(hr_employee_id);
domain.setEmployeeId(hr_employee_id);
return ResponseEntity.status(HttpStatus.OK).body(hr_leaveService.save(domain));
}
......@@ -260,7 +260,7 @@ public class Hr_leaveResource {
public ResponseEntity<Boolean> saveBatchByHr_employee(@PathVariable("hr_employee_id") Long hr_employee_id, @RequestBody List<Hr_leaveDTO> hr_leavedtos) {
List<Hr_leave> domainlist=hr_leaveMapping.toDomain(hr_leavedtos);
for(Hr_leave domain:domainlist){
domain.setFirstApproverId(hr_employee_id);
domain.setEmployeeId(hr_employee_id);
}
hr_leaveService.saveBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
......@@ -270,7 +270,7 @@ public class Hr_leaveResource {
@ApiOperation(value = "根据员工获取数据集", tags = {"休假" } ,notes = "根据员工获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/hr_employees/{hr_employee_id}/hr_leaves/fetchdefault")
public ResponseEntity<List<Hr_leaveDTO>> fetchHr_leaveDefaultByHr_employee(@PathVariable("hr_employee_id") Long hr_employee_id,Hr_leaveSearchContext context) {
context.setN_first_approver_id_eq(hr_employee_id);
context.setN_employee_id_eq(hr_employee_id);
Page<Hr_leave> domains = hr_leaveService.searchDefault(context) ;
List<Hr_leaveDTO> list = hr_leaveMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
......@@ -284,7 +284,7 @@ public class Hr_leaveResource {
@ApiOperation(value = "根据员工查询数据集", tags = {"休假" } ,notes = "根据员工查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/hr_employees/{hr_employee_id}/hr_leaves/searchdefault")
public ResponseEntity<Page<Hr_leaveDTO>> searchHr_leaveDefaultByHr_employee(@PathVariable("hr_employee_id") Long hr_employee_id, @RequestBody Hr_leaveSearchContext context) {
context.setN_first_approver_id_eq(hr_employee_id);
context.setN_employee_id_eq(hr_employee_id);
Page<Hr_leave> domains = hr_leaveService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hr_leaveMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册