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
ad140c02
Commit
ad140c02
authored
4 years ago
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
da2ee2e8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
118 additions
and
76 deletions
+118
-76
src/main/java/cn/timer/api/bean/htzz/HtzzAdminZzda.java
+19
-8
src/main/java/cn/timer/api/bean/htzz/HtzzAssoHtgx.java
+1
-1
src/main/java/cn/timer/api/bean/htzz/HtzzAssoZztx.java
+3
-6
src/main/java/cn/timer/api/controller/htzz/HtzzController.java
+46
-39
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
+1
-1
src/main/java/cn/timer/api/dto/htzz/NotifyPersonDto.java
+20
-0
src/main/java/cn/timer/api/dto/htzz/ReminderObjectDto.java
+23
-0
src/main/resources/mapping/htzz/HtzzAdminZzdaMapper.xml
+4
-20
No files found.
src/main/java/cn/timer/api/bean/htzz/HtzzAdminZzda.java
View file @
ad140c02
package
cn
.
timer
.
api
.
bean
.
htzz
;
import
java.util.Date
;
import
javax.persistence.*
;
import
java.util.List
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
...
...
@@ -9,6 +15,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
cn.timer.api.dto.htzz.NotifyPersonDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
...
...
@@ -60,18 +67,12 @@ public class HtzzAdminZzda extends Model<HtzzAdminZzda> {
@ApiModelProperty
(
value
=
"有效期到期日 "
,
example
=
"有效期到期日"
)
private
Date
yxdqr
;
// @ApiModelProperty(value = "提醒组id ", example = "提醒组")
// private Integer txzid;
@ApiModelProperty
(
value
=
"提醒开关"
,
example
=
"0 关 1开"
)
private
Integer
txkgType
;
@ApiModelProperty
(
value
=
"证件附件 "
,
example
=
"证件附件"
)
private
String
zjfj
;
// @ApiModelProperty(value = "通知人 ", example = "通知人")
// private String tzr;
@ApiModelProperty
(
value
=
"录入人--用户id"
,
example
=
"101"
)
private
Integer
lrrid
;
...
...
@@ -85,9 +86,19 @@ public class HtzzAdminZzda extends Model<HtzzAdminZzda> {
@ApiModelProperty
(
value
=
"是否删除"
,
example
=
"0-否 1-是"
)
private
Integer
isDelete
;
@ApiModelProperty
(
value
=
"消息模板id"
,
example
=
"1"
)
private
Integer
templateId
;
@ApiModelProperty
(
value
=
"0:未发;1:已发"
,
example
=
"0"
)
private
Integer
sendingStatus
;
@Transient
@TableField
(
exist
=
false
)
private
List
<
NotifyPersonDto
>
ids
;
@Transient
@TableField
(
exist
=
false
)
private
Integer
[]
ids
;
private
List
<
HtzzAssoZztx
>
Zztx
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/bean/htzz/HtzzAssoHtgx.java
View file @
ad140c02
...
...
@@ -45,7 +45,7 @@ public class HtzzAssoHtgx extends Model<HtzzAssoHtgx> {
@ApiModelProperty
(
value
=
"通知人手机号"
,
example
=
"101"
)
private
String
phone
;
@ApiModelProperty
(
value
=
"
合同
id"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"
证照档案表
id"
,
example
=
"101"
)
private
Integer
htid
;
@ApiModelProperty
(
value
=
"公司id"
,
example
=
"101"
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/bean/htzz/HtzzAssoZztx.java
View file @
ad140c02
...
...
@@ -39,12 +39,6 @@ public class HtzzAssoZztx extends Model<HtzzAssoZztx> {
@ApiModelProperty
(
value
=
"名称 "
,
example
=
"名称"
)
private
String
name
;
// @ApiModelProperty(value = "提醒方式 ", example = "提醒方式")
// private String txfs;
// @ApiModelProperty(value = "优先级 ", example = "优先级")
// private String yxj;
@ApiModelProperty
(
value
=
"重复方式 "
,
example
=
"0-不重复 1-每天 2-每3天 3-每周"
)
private
Integer
cffs
;
...
...
@@ -62,6 +56,9 @@ public class HtzzAssoZztx extends Model<HtzzAssoZztx> {
@ApiModelProperty
(
value
=
"录入人员 "
,
example
=
"录入人员"
)
private
Integer
lrrid
;
@ApiModelProperty
(
value
=
"证照档案表id "
,
example
=
"1"
)
private
Integer
zzdaId
;
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ApiModelProperty
(
value
=
"录入时间 "
,
example
=
"录入时间"
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/htzz/HtzzController.java
View file @
ad140c02
...
...
@@ -22,17 +22,22 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.cron.CronUtil
;
import
cn.hutool.cron.task.Task
;
import
cn.timer.api.bean.htzz.HtzzAdminZzda
;
import
cn.timer.api.bean.htzz.HtzzAssoHtgx
;
import
cn.timer.api.bean.htzz.HtzzAssoZztx
;
import
cn.timer.api.bean.qyzx.businessService.QyzxRemainingQuantity
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dao.htzz.HtzzAdminZzdaMapper
;
import
cn.timer.api.dto.htzz.HtzzQueryDto
;
import
cn.timer.api.dto.htzz.NotifyPersonDto
;
import
cn.timer.api.dto.htzz.ReminderObjectDto
;
import
cn.timer.api.dto.kqmk.KqglAssoOvertimeRulesDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
...
...
@@ -47,22 +52,9 @@ public class HtzzController {
@Autowired
private
HtzzAdminZzdaMapper
htzzAdminZzdaMapper
;
// /**
// * 新增/修改提醒组
// */
// @PostMapping(value = "/addTxz")
// @ApiOperation(value = "新增提醒组", httpMethod = "POST", notes = "接口发布说明")
// public Result<HtzzAssoZztx> addTxz(@CurrentUser UserBean userBean,
// @RequestBody HtzzAssoZztx zztx) {
// zztx.setLrrid(userBean.getEmpNum());
// zztx.setLrsjTime(new Date());
// zztx.setOrgCode(userBean.getOrgCode());
// zztx.insertOrUpdate();
// return ResultUtil.data(zztx, "新增/修改成功");
// }
/**
* 新增
合同
证件
* 新增证件
*
* @param userBean
* @param htzzAdminZzda 证照档案实体
...
...
@@ -94,24 +86,27 @@ public class HtzzController {
zzda
.
setLrrid
(
userBean
.
getEmpNum
());
zzda
.
setLrsjTime
(
new
Date
());
zzda
.
setOrgCode
(
orgCode
);
zzda
.
setSendingStatus
(
0
);
//0:未发;1:已发
zzda
.
setTemplateId
(
zzda
.
getTemplateId
());
//消息模板id
zzda
.
insert
();
/**
* 新增通知关系表,每人一个
*/
YgglMainEmp
emp
=
null
;
Integer
[]
ids
=
zzda
.
getIds
();
List
<
HtzzAssoHtgx
>
htgxs
=
new
ArrayList
<
HtzzAssoHtgx
>(
ids
.
length
);
for
(
Integer
id
:
ids
)
{
List
<
NotifyPersonDto
>
ids
=
zzda
.
getIds
();
//通知人 用户id+手机号码
List
<
HtzzAssoHtgx
>
htgxs
=
new
ArrayList
<
HtzzAssoHtgx
>(
ids
.
size
()
);
for
(
NotifyPersonDto
pre
:
ids
)
{
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"name"
,
"phone"
,
"emp_num"
).
eq
(
"emp_num"
,
id
).
eq
(
"org_code"
,
orgCode
);
queryWrapper
.
select
(
"name"
,
"phone"
,
"emp_num"
).
eq
(
"emp_num"
,
pre
.
getUserids
()
).
eq
(
"org_code"
,
orgCode
);
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
queryWrapper
);
HtzzAssoHtgx
htgx
=
HtzzAssoHtgx
.
builder
().
build
();
htgx
.
setHtid
(
zzda
.
getId
());
htgx
.
setTzrid
(
emp
.
getEmpNum
());
htgx
.
setName
(
emp
.
getName
());
htgx
.
setPhone
(
emp
.
getPhone
());
htgx
.
setPhone
(
pre
.
getPhone
());
htgx
.
setOrgCode
(
orgCode
);
htgx
.
insert
();
htgxs
.
add
(
htgx
);
...
...
@@ -119,24 +114,33 @@ public class HtzzController {
return
ResultUtil
.
datas
(
zzda
,
htgxs
,
"新增证件成功!"
);
}
// /**
// * 查询公司所有证件
// *
// * @param userBean
// * @return
// */
// @GetMapping("/queryzj")
// @ApiOperation(value = "查询所有合同证件", httpMethod = "GET", notes = "接口发布说明")
// public Result<List<HtzzAdminZzda>> queryzj(@CurrentUser UserBean userBean) {
// Integer orgCode = userBean.getOrgCode();
// if (orgCode != null) {
// List<HtzzAdminZzda> htzzAdminZzda = HtzzAdminZzda.builder().orgCode(orgCode).isDelete(0)
// .build().selectAll();
// return ResultUtil.data(htzzAdminZzda, "查询证件成功!");
// }
// return ResultUtil.error("查询失败了!请检查是否登录");
// }
@GetMapping
(
"/modifytx/id"
)
@ApiOperation
(
value
=
"修改提醒数据"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
modifytx
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
ReminderObjectDto
obj
=
ReminderObjectDto
.
builder
().
build
();
List
<
HtzzAdminZzda
>
zzda
=
HtzzAdminZzda
.
builder
().
id
(
id
).
build
().
selectAll
();
obj
.
setZzda
(
zzda
);
//
List
<
NotifyPersonDto
>
tzids
=
new
ArrayList
<
NotifyPersonDto
>();
List
<
HtzzAssoHtgx
>
httxs
=
HtzzAssoHtgx
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
HtzzAssoHtgx
>().
lambda
().
eq
(
HtzzAssoHtgx:
:
getHtid
,
id
));
for
(
HtzzAssoHtgx
gx
:
httxs
)
{
NotifyPersonDto
predto
=
NotifyPersonDto
.
builder
().
build
();
BeanUtil
.
copyProperties
(
gx
,
predto
);
tzids
.
add
(
predto
);
}
obj
.
setIds
(
tzids
);
//
List
<
HtzzAssoZztx
>
zztx
=
HtzzAssoZztx
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
HtzzAssoZztx
>().
lambda
().
eq
(
HtzzAssoZztx:
:
getZzdaId
,
id
));
obj
.
setZztx
(
zztx
);
//
return
ResultUtil
.
data
(
obj
,
"新增成功"
);
}
/**
* 按条件搜索(关键字、到期时间)
...
...
@@ -200,8 +204,11 @@ public class HtzzController {
@ApiOperation
(
value
=
"根据id删除合同"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
delHt
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
htid
)
{
// 删除提醒关系
HtzzAssoHtgx
.
builder
().
build
()
.
delete
(
new
QueryWrapper
<
HtzzAssoHtgx
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"htid"
,
htid
));
HtzzAssoHtgx
.
builder
().
build
().
delete
(
new
QueryWrapper
<
HtzzAssoHtgx
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"htid"
,
htid
));
//删除证照提醒表配置
HtzzAssoZztx
.
builder
().
build
().
delete
(
new
QueryWrapper
<
HtzzAssoZztx
>().
lambda
().
eq
(
HtzzAssoZztx:
:
getZzdaId
,
htid
));
// 设置证照删除状态
return
ResultUtil
.
data
(
HtzzAdminZzda
.
builder
().
id
(
htid
).
isDelete
(
1
).
build
().
updateById
());
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
ad140c02
...
...
@@ -102,7 +102,7 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 6 17 * * ?")
//
@Scheduled(cron = "0 0 8,12,16,20 * * ?")//每天上午8、12点,下午16点,20点 执行
@Scheduled
(
cron
=
"0 0 8,12,16,20 * * ?"
)
//每天上午8、12点,下午16点,20点 执行
public
void
AttendanceTask
()
throws
ParseException
{
boolean
implement
=
true
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
View file @
ad140c02
...
...
@@ -94,7 +94,7 @@ public class LastMonthtimingExport {
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
// @Scheduled(cron = "0 48 16 * * ?")
//
@Scheduled(cron = "0 0 4,20 * * ?")//每天上午4点,下午20点 执行
@Scheduled
(
cron
=
"0 0 4,20 * * ?"
)
//每天上午4点,下午20点 执行
public
void
LastMonthtimingAttendanceTask
()
throws
ParseException
{
//获取前月的最后一天
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/htzz/NotifyPersonDto.java
0 → 100644
View file @
ad140c02
package
cn
.
timer
.
api
.
dto
.
htzz
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
NotifyPersonDto
{
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"101"
)
private
String
userids
;
@ApiModelProperty
(
value
=
"电话"
,
example
=
""
)
private
String
phone
;
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/htzz/ReminderObjectDto.java
0 → 100644
View file @
ad140c02
package
cn
.
timer
.
api
.
dto
.
htzz
;
import
java.util.List
;
import
cn.timer.api.bean.htzz.HtzzAdminZzda
;
import
cn.timer.api.bean.htzz.HtzzAssoZztx
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
ReminderObjectDto
{
private
List
<
HtzzAdminZzda
>
zzda
;
private
List
<
NotifyPersonDto
>
ids
;
private
List
<
HtzzAssoZztx
>
zztx
;
}
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/htzz/HtzzAdminZzdaMapper.xml
View file @
ad140c02
...
...
@@ -20,6 +20,7 @@
<result
column=
"zjmc"
property=
"zjmc"
/>
<result
column=
"is_delete"
property=
"isDelete"
/>
<result
column=
"template_id"
property=
"templateId"
/>
<result
column=
"sending_status"
property=
"sendingStatus"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -38,27 +39,10 @@
zjfj,
zjmc,
is_delete,
template_id
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id HtzzAdminZzda_id,
czrdh HtzzAdminZzda_czrdh,
czry HtzzAdminZzda_czry,
fzjg HtzzAdminZzda_fzjg,
fzrq HtzzAdminZzda_fzrq,
lrrid HtzzAdminZzda_lrrid,
lrsj_time HtzzAdminZzda_lrsj_time,
org_code HtzzAdminZzda_org_code,
txkg_type HtzzAdminZzda_txkg_type,
yxdqr HtzzAdminZzda_yxdqr,
yxksr HtzzAdminZzda_yxksr,
zjbh HtzzAdminZzda_zjbh,
zjfj HtzzAdminZzda_zjfj,
zjmc HtzzAdminZzda_zjmc,
is_delete HtzzAdminZzda_is_delete,
template_id HtzzAdminZzda_template_id
template_id,
sending_status
</sql>
<!--
...
...
This diff is collapsed.
Click to expand it.
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