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
1f7a0ed4
Commit
1f7a0ed4
authored
May 14, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时后台--
合同页面-列表查询问题
parent
1d7a0d37
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
136 additions
and
36 deletions
+136
-36
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
+6
-0
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+8
-2
src/main/java/cn/timer/api/controller/zpgl/ZpglController.java
+15
-0
src/main/java/cn/timer/api/dao/yggl/YgglAttaHtxxbMapper.java
+3
-1
src/main/java/cn/timer/api/dto/yggl/HtgkDto.java
+6
-0
src/main/java/cn/timer/api/dto/zpgl/ZpglRcxxDto.java
+5
-0
src/main/resources/mapping/yggl/YgglAttaHtxxbMapper.xml
+84
-31
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
+9
-2
No files found.
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
View file @
1f7a0ed4
...
...
@@ -236,4 +236,10 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty
(
value
=
"职级字典id "
,
example
=
""
)
private
int
zpglZjId
;
@ApiModelProperty
(
value
=
"参加工作时间 "
,
example
=
""
)
private
Date
workBeginYear
;
@ApiModelProperty
(
value
=
"是否结婚:0否,1是 "
,
example
=
""
)
private
int
marryStatus
;
}
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
1f7a0ed4
...
...
@@ -30,6 +30,7 @@ import cn.timer.api.dao.yggl.YgglPersonnelFormMapper;
import
cn.timer.api.dto.yggl.*
;
import
cn.timer.api.utils.redis.RedisUtil
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
io.swagger.models.auth.In
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -2103,12 +2104,17 @@ public class YgglController {
@ApiOperationSupport
(
order
=
72
)
public
Result
<
Object
>
getContract
(
@CurrentUser
UserBean
userBean
,
@RequestBody
HtgkDto
htgkDto
)
{
List
<
HtgkDto
>
htgkDtos
=
Lists
.
newArrayList
();
Map
map
=
Maps
.
newHashMap
();
if
(
htgkDto
.
getType
()!=
2
){
htgkDtos
=
ygglAttaHtxxbMapper
.
selectListByType
(
htgkDto
.
getType
());
htgkDtos
=
ygglAttaHtxxbMapper
.
selectListByType
(
htgkDto
.
getType
(),
htgkDto
.
getPage
(),
userBean
.
getOrgCode
());
map
.
put
(
"totalNum"
,
ygglAttaHtxxbMapper
.
selectTotalByType
(
htgkDto
.
getType
(),
userBean
.
getOrgCode
()));
}
else
{
htgkDtos
=
ygglAttaHtxxbMapper
.
queryContract
(
userBean
.
getOrgCode
());
map
.
put
(
"totalNum"
,
0
);
}
return
ResultUtil
.
data
(
htgkDtos
);
map
.
put
(
"list"
,
htgkDtos
);
return
ResultUtil
.
data
(
map
);
}
@GetMapping
(
value
=
"/getPersonnelForm"
)
...
...
src/main/java/cn/timer/api/controller/zpgl/ZpglController.java
View file @
1f7a0ed4
...
...
@@ -5,6 +5,7 @@ import cn.timer.api.bean.kqgl.UserEquiRelation;
import
cn.timer.api.bean.kqmk.*
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.qyzx.businessService.QyzxOrderRecord
;
import
cn.timer.api.bean.spmk.SpmkCustomApproval
;
import
cn.timer.api.bean.wechat.MessageTemplate
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
...
...
@@ -35,6 +36,7 @@ import cn.timer.api.utils.ZpglMessageTemplate;
import
cn.timer.api.utils.query.BaseQuery
;
import
cn.timer.api.config.enuminterface.YgEnumInterface.jobStatus
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -205,6 +207,7 @@ public class ZpglController {
}
}
/**
* 添加员工档案
*
...
...
@@ -774,5 +777,17 @@ public class ZpglController {
}
}
@PostMapping
(
value
=
"/editInfo"
)
@ApiOperation
(
value
=
"14.招聘-变更基础信息"
,
httpMethod
=
"POST"
,
notes
=
"招聘-变更人才信息状态"
)
@ApiOperationSupport
(
order
=
3
)
public
Result
<
Object
>
editInfo
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZpglRcxxDto
zpglRcxxDto
)
{
try
{
boolean
re
=
ZpglRcxx
.
builder
().
name
(
zpglRcxxDto
.
getName
()).
mobile
(
zpglRcxxDto
.
getMobile
()).
mail
(
zpglRcxxDto
.
getMail
()).
build
().
update
(
new
LambdaUpdateWrapper
<
ZpglRcxx
>().
eq
(
ZpglRcxx:
:
getId
,
zpglRcxxDto
.
getId
()));
return
re
?
ResultUtil
.
success
(
"修改成功"
):
ResultUtil
.
error
(
"修改成功"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-修改成功"
);
}
}
}
src/main/java/cn/timer/api/dao/yggl/YgglAttaHtxxbMapper.java
View file @
1f7a0ed4
package
cn
.
timer
.
api
.
dao
.
yggl
;
import
cn.timer.api.dto.yggl.HtgkDto
;
import
cn.timer.api.utils.Page
;
import
io.swagger.models.auth.In
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -19,7 +20,8 @@ public interface YgglAttaHtxxbMapper extends BaseMapper<YgglAttaHtxxb> {
List
<
HtgkDto
>
queryContract
(
@Param
(
"orgCode"
)
Integer
orgCode
);
List
<
HtgkDto
>
selectListByType
(
@Param
(
"type"
)
Integer
type
);
List
<
HtgkDto
>
selectListByType
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"page"
)
Page
page
,
@Param
(
"orgCode"
)
Integer
orgCode
);
Integer
selectTotalByType
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"orgCode"
)
Integer
orgCode
);
...
...
src/main/java/cn/timer/api/dto/yggl/HtgkDto.java
View file @
1f7a0ed4
package
cn
.
timer
.
api
.
dto
.
yggl
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
...
...
@@ -42,4 +43,9 @@ public class HtgkDto implements Serializable{
private
Date
statTime
;
private
Date
endTime
;
private
Integer
empNum
;
private
Page
page
;
private
Integer
bmgwId
;
private
String
query
;
private
Integer
htType
;
}
src/main/java/cn/timer/api/dto/zpgl/ZpglRcxxDto.java
View file @
1f7a0ed4
...
...
@@ -120,4 +120,9 @@ public class ZpglRcxxDto implements Serializable{
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"电话"
)
private
String
mobile
;
@ApiModelProperty
(
value
=
"邮箱"
)
private
String
mail
;
}
src/main/resources/mapping/yggl/YgglAttaHtxxbMapper.xml
View file @
1f7a0ed4
...
...
@@ -3,28 +3,29 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.yggl.YgglAttaHtxxbMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.yggl.YgglAttaHtxxb"
>
<id
column=
"id"
property=
"id"
/>
<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
id=
"BaseResultMap"
type=
"cn.timer.api.bean.yggl.YgglAttaHtxxb"
>
<id
column=
"id"
property=
"id"
/>
<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,
id
,
emp_num,
ht_id,
ht_name,
...
...
@@ -154,23 +155,35 @@
-->
<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
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 = #{orgCode} 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')
(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
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
where zc.org_code =#{orgCode}
</select>
<select
id=
"selectListByType"
resultType=
"cn.timer.api.dto.yggl.HtgkDto"
>
SELECT
yh.id as id,
yh
.emp_num as empNum,
ye
.emp_num as empNum,
ye.name as userName,
ye.head_url as headUrl,
zm.name as deptName,
...
...
@@ -183,11 +196,51 @@
yh.start_time as statTime,
yh.end_time as endTime
FROM
yggl_atta_htxxb yh
LEFT JOIN yggl_main_emp ye ON ( ye.emp_num = yh.emp_num AND ye.org_code = yh.org_code )
yggl_main_emp ye
LEFT JOIN yggl_atta_htxxb yh ON ( ye.emp_num = yh.emp_num AND ye.org_code = yh.org_code )
LEFT JOIN zzgl_bmgw_m zm ON zm.id = ye.bmgw_id
LEFT JOIN zpgl_company zc ON zc.id = yh.htqygs
<where>
ye.org_code=#{orgCode}
<if
test=
"type == 0"
>
and yh.id is not null
and yh.delete_flag = 0
</if>
<if
test=
"type == 1"
>
and yh.id is null
</if>
</where>
LIMIT #{page.offset}, #{page.totalPage}
</select>
<select
id=
"selectTotalByType"
resultType=
"java.lang.Integer"
>
SELECT
count(ye.id)
FROM
yggl_main_emp ye
LEFT JOIN yggl_atta_htxxb yh ON ( ye.emp_num = yh.emp_num AND ye.org_code = yh.org_code )
LEFT JOIN zzgl_bmgw_m zm ON zm.id = ye.bmgw_id
LEFT JOIN zpgl_company zc ON zc.id = yh.htqygs
where yh.jc_status = #{type}
<where>
ye.org_code=#{orgCode}
<if
test=
"type == 0"
>
and yh.id is not null
and yh.delete_flag = 0
</if>
<if
test=
"type == 1"
>
and yh.id is null
</if>
<!-- <if test="bmgwId != null and bmgwId != null">-->
<!-- and ye.bmgwId = #{bmgwId}-->
<!-- </if>-->
<!-- <if test="htType != null and htType != null">-->
<!-- and yh.htType = #{htType}-->
<!-- </if>-->
<!-- <if test="jobType != null and jobType != null">-->
<!-- and ye.jobType = #{jobType}-->
<!-- </if>-->
</where>
</select>
</mapper>
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
View file @
1f7a0ed4
...
...
@@ -57,6 +57,9 @@
<result
column=
"appopenid"
property=
"appopenid"
/>
<result
column=
"is_insure"
property=
"isInsure"
/>
<result
column=
"zpgl_zj_id"
property=
"zpglZjId"
/>
<result
column=
"work_begin_year"
property=
"workBeginYear"
/>
<result
column=
"marry_status"
property=
"marryStatus"
/>
</resultMap>
<resultMap
id=
"Bintu"
type=
"cn.timer.api.dto.yggl.YgbintuDto"
>
...
...
@@ -130,7 +133,9 @@
appopenid,
custom_num,
is_insure,
zpgl_zj_id
zpgl_zj_id,
work_begin_year,
marry_status
</sql>
<sql
id=
"Base_Column_List_a"
>
...
...
@@ -154,7 +159,9 @@
a.zz_time,
a.custom_num,
a.is_insure,
a.zpgl_zj_id
a.zpgl_zj_id,
a.work_begin_year,
a.marry_status
</sql>
...
...
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