Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
9c2751dc
Commit
9c2751dc
authored
May 06, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.人事代码
parent
6867089b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
33 deletions
+100
-33
src/main/java/cn/timer/api/bean/yggl/YgglAttaHtxxb.java
+22
-1
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+13
-16
src/main/java/cn/timer/api/dao/yggl/YgglAttaHtxxbMapper.java
+6
-0
src/main/java/cn/timer/api/dto/yggl/HtgkDto.java
+32
-0
src/main/resources/mapping/yggl/YgglAttaHtxxbMapper.xml
+27
-16
No files found.
src/main/java/cn/timer/api/bean/yggl/YgglAttaHtxxb.java
View file @
9c2751dc
...
...
@@ -46,6 +46,9 @@ public class YgglAttaHtxxb extends Model<YgglAttaHtxxb> {
@ApiModelProperty
(
value
=
"合同类型 0:固定期限劳动合同;1:无固定期限劳动合同;2:以完成一定工作任务为期限的劳动合同;3:实习协议;4:劳务合同;5:返聘协议;6:劳务派遣合同7:借调合同;8:其他"
,
example
=
"101"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"合同名称"
,
example
=
"合同名称"
)
private
Integer
htName
;
@ApiModelProperty
(
value
=
"合同开始日期 "
,
example
=
"合同开始日期"
)
private
Date
startTime
;
...
...
@@ -54,7 +57,7 @@ public class YgglAttaHtxxb extends Model<YgglAttaHtxxb> {
private
Date
endTime
;
@ApiModelProperty
(
value
=
"合同签约公司 "
,
example
=
"合同签约公司"
)
private
String
htqygs
;
private
Integer
htqygs
;
@ApiModelProperty
(
value
=
"合同状态 0:执行中;1:已到期;2:未执行"
,
example
=
"101"
)
private
Integer
status
;
...
...
@@ -65,4 +68,21 @@ public class YgglAttaHtxxb extends Model<YgglAttaHtxxb> {
@ApiModelProperty
(
value
=
"组织机构代码 组织机构代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"合同期限(年)"
,
example
=
"3"
)
private
Integer
htqx
;
@ApiModelProperty
(
value
=
"合同解除状态:0未解除,1已解除"
,
example
=
"0"
)
private
Integer
jcStatus
;
@ApiModelProperty
(
value
=
"合同签订日期"
,
example
=
"合同签订日期"
)
private
Date
qdDate
;
@ApiModelProperty
(
value
=
"合同解除时间"
,
example
=
"合同解除时间"
)
private
Date
jcDate
;
@ApiModelProperty
(
value
=
"合同附件"
,
example
=
"合同附件"
)
private
String
htfj
;
@ApiModelProperty
(
value
=
"逻辑删除标记0.未删除 1.删除"
,
example
=
"0"
)
private
Integer
deleteFlag
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
9c2751dc
...
...
@@ -22,6 +22,8 @@ import javax.servlet.ServletOutputStream;
import
javax.servlet.http.HttpServletResponse
;
import
javax.transaction.Transactional
;
import
cn.timer.api.dao.yggl.YgglAttaHtxxbMapper
;
import
cn.timer.api.dto.yggl.*
;
import
cn.timer.api.utils.redis.RedisUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -110,22 +112,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import
cn.timer.api.dao.yggl.YgglMainLzbMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.kqmk.AdditionalDto
;
import
cn.timer.api.dto.yggl.AddygdaDto
;
import
cn.timer.api.dto.yggl.EmpQuery
;
import
cn.timer.api.dto.yggl.ImportEmpDto
;
import
cn.timer.api.dto.yggl.LoginInfoDto
;
import
cn.timer.api.dto.yggl.LoginerChargeDto
;
import
cn.timer.api.dto.yggl.LzbQueryDto
;
import
cn.timer.api.dto.yggl.LzygQueryDto
;
import
cn.timer.api.dto.yggl.ModifyAvatarDto
;
import
cn.timer.api.dto.yggl.UserInfo
;
import
cn.timer.api.dto.yggl.YgCartogramDto
;
import
cn.timer.api.dto.yggl.YgKVDto
;
import
cn.timer.api.dto.yggl.YgQueryDto
;
import
cn.timer.api.dto.yggl.YgbintuDto
;
import
cn.timer.api.dto.yggl.YgglCartogramDto
;
import
cn.timer.api.bean.clazz.NationClass
;
import
cn.timer.api.dto.yggl.YgzzDto
;
import
cn.timer.api.utils.DateFormatUtils
;
import
cn.timer.api.utils.Md5
;
import
cn.timer.api.utils.Result
;
...
...
@@ -172,6 +159,9 @@ public class YgglController {
@Value
(
"${server.servlet.session.timeout}"
)
public
Integer
session_timeout
;
@Autowired
private
YgglAttaHtxxbMapper
ygglAttaHtxxbMapper
;
/**
* 获取员工档案
*
...
...
@@ -1235,7 +1225,7 @@ public class YgglController {
@ApiOperationSupport
(
order
=
43
)
public
Result
<
List
<
YgglAttaHtxxb
>>
selecthtxxb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaHtxxb
>
ygglAttaHtxxbs
=
YgglAttaHtxxb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaHtxxb
>().
lambda
()
.
selectList
(
new
QueryWrapper
<
YgglAttaHtxxb
>().
lambda
()
.
eq
(
YgglAttaHtxxb:
:
getDeleteFlag
,
0
)
.
eq
(
YgglAttaHtxxb:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
YgglAttaHtxxb:
:
getEmpNum
,
empNum
));
return
ResultUtil
.
data
(
ygglAttaHtxxbs
);
}
...
...
@@ -2058,5 +2048,12 @@ public class YgglController {
return
ResultUtil
.
data
(
ygQueryDto
);
}
@GetMapping
(
value
=
"/getContract"
)
@ApiOperation
(
value
=
"72.运营后台--合同概况列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
72
)
public
Result
<
Object
>
getContract
(
@CurrentUser
UserBean
userBean
)
{
List
<
HtgkDto
>
htgkDtos
=
ygglAttaHtxxbMapper
.
queryContract
(
userBean
.
getOrgCode
());
return
ResultUtil
.
data
(
htgkDtos
);
}
}
src/main/java/cn/timer/api/dao/yggl/YgglAttaHtxxbMapper.java
View file @
9c2751dc
package
cn
.
timer
.
api
.
dao
.
yggl
;
import
cn.timer.api.dto.yggl.HtgkDto
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.yggl.YgglAttaHtxxb
;
import
java.util.List
;
/**
* 员工合同信息表
* @author Tang 2019-11-15
...
...
@@ -12,6 +16,8 @@ import cn.timer.api.bean.yggl.YgglAttaHtxxb;
@Repository
public
interface
YgglAttaHtxxbMapper
extends
BaseMapper
<
YgglAttaHtxxb
>
{
List
<
HtgkDto
>
queryContract
(
@Param
(
"orgCode"
)
Integer
orgCode
);
}
src/main/java/cn/timer/api/dto/yggl/HtgkDto.java
0 → 100644
View file @
9c2751dc
package
cn
.
timer
.
api
.
dto
.
yggl
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
HtgkDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4358081686220759754L
;
@ApiModelProperty
(
value
=
"已签订"
,
example
=
"1"
)
private
Integer
signCount
;
@ApiModelProperty
(
value
=
"在职员工"
,
example
=
"12"
)
private
Integer
probation
;
@ApiModelProperty
(
value
=
"合同即将到期人数"
,
example
=
"12"
)
private
Integer
dueSoon
;
@ApiModelProperty
(
value
=
"合同签约公司"
,
example
=
"合同签约公司"
)
private
String
companyName
;
}
src/main/resources/mapping/yggl/YgglAttaHtxxbMapper.xml
View file @
9c2751dc
...
...
@@ -8,19 +8,27 @@
<id
column=
"id"
property=
"id"
/>
<result
column=
"emp_num"
property=
"empNum"
/>
<result
column=
"ht_id"
property=
"htId"
/>
<result
column=
"ht_name"
property=
"htName"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"qd_date"
property=
"qdDate"
/>
<result
column=
"start_time"
property=
"startTime"
/>
<result
column=
"end_time"
property=
"endTime"
/>
<result
column=
"htqygs"
property=
"htqygs"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"remark"
property=
"remark"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"jc_status"
property=
"jcStatus"
/>
<result
column=
"jc_date"
property=
"jcDate"
/>
<result
column=
"htfj"
property=
"htfj"
/>
<result
column=
"delete_flag"
property=
"deleteFlag"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
emp_num,
ht_id,
ht_name,
qd_date,
type,
start_time,
end_time,
...
...
@@ -28,23 +36,12 @@
htqygs,
status,
remark,
org_code
org_code,
jc_status,
jc_date,
htfj,
delete_flag
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id YgglAttaHtxxb_id,
emp_num YgglAttaHtxxb_emp_num,
ht_id YgglAttaHtxxb_ht_id,
type YgglAttaHtxxb_type,
start_time YgglAttaHtxxb_start_time,
end_time YgglAttaHtxxb_end_time,
htqx YgglAttaHtxxb_htqx,
htqygs YgglAttaHtxxb_htqygs,
status YgglAttaHtxxb_status,
remark YgglAttaHtxxb_remark,
org_code YgglAttaHtxxb_org_code
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglAttaHtxxb">
...
...
@@ -156,5 +153,18 @@
</select>
-->
<select
id=
"queryContract"
resultType=
"cn.timer.api.dto.yggl.HtgkDto"
>
SELECT
zc.company_name companyName,
(SELECT SUM(job_status BETWEEN 0 and 3) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}) as probation,
(SELECT count(DISTINCT emp_num) AS signCount FROM yggl_atta_htxxb AS yah WHERE org_code = #{orgCode} AND zc.id=yah.htqygs
AND yah.jc_status=0 AND yah.delete_flag=0 AND yah.status=0
) as signCount,
(SELECT count(DISTINCT emp_num) AS signCount FROM yggl_atta_htxxb AS yah WHERE org_code = 3 AND zc.id=yah.htqygs
AND yah.jc_status=0 AND yah.delete_flag=0 AND yah.status=0
and yah.end_time between NOW() AND DATE_FORMAT(DATE_add(NOW(),INTERVAL 5 DAY),'%Y-%m-%d')
) as due_soon
FROM `zpgl_company` zc
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment