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
80b7af2e
Commit
80b7af2e
authored
Nov 19, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request 8timerv2/8timerapiv200!539
parents
29728e01
2eefecc1
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
2574 additions
and
325 deletions
+2574
-325
src/main/java/cn/timer/api/bean/admin/AdminAssoTxjlb.java
+62
-0
src/main/java/cn/timer/api/bean/admin/AdminMenuTemplate.java
+63
-0
src/main/java/cn/timer/api/bean/admin/AdminMsgTemplate.java
+73
-0
src/main/java/cn/timer/api/bean/htzz/HtzzAdminZzda.java
+22
-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/bean/qyzx/QyzxAdminColour.java
+54
-0
src/main/java/cn/timer/api/bean/qyzx/QyzxAdminMenu.java
+56
-0
src/main/java/cn/timer/api/bean/qyzx/QyzxEmpLogin.java
+11
-1
src/main/java/cn/timer/api/controller/LoginController.java
+56
-64
src/main/java/cn/timer/api/controller/admin/AdminAssoTxjlbcontroller.java
+87
-0
src/main/java/cn/timer/api/controller/admin/AdminMsgTemplateController.java
+88
-0
src/main/java/cn/timer/api/controller/htzz/HtzzController.java
+59
-48
src/main/java/cn/timer/api/controller/htzz/atttimer/AlicloudSMS.java
+163
-0
src/main/java/cn/timer/api/controller/htzz/atttimer/NewsTaskTiming.java
+60
-0
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+41
-0
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+25
-5
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
+30
-4
src/main/java/cn/timer/api/controller/kqgl/atttimer/RealTimeUpdate.java
+24
-3
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+108
-2
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+153
-176
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+1
-1
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
+73
-1
src/main/java/cn/timer/api/dao/admin/AdminAssoTxjlbMapper.java
+32
-0
src/main/java/cn/timer/api/dao/admin/AdminMenuTemplateMapper.java
+17
-0
src/main/java/cn/timer/api/dao/admin/AdminMsgTemplateMapper.java
+45
-0
src/main/java/cn/timer/api/dao/qyzx/QyzxAdminColourMapper.java
+17
-0
src/main/java/cn/timer/api/dao/qyzx/QyzxAdminMenuMapper.java
+17
-0
src/main/java/cn/timer/api/dto/admin/AdminMsgTemplateDto.java
+36
-0
src/main/java/cn/timer/api/dto/htzz/HtzzQueryDto.java
+3
-0
src/main/java/cn/timer/api/dto/htzz/NotifyPersonDto.java
+23
-0
src/main/java/cn/timer/api/dto/htzz/QueryNoReadingDto.java
+21
-0
src/main/java/cn/timer/api/dto/htzz/ReminderObjectDto.java
+23
-0
src/main/java/cn/timer/api/dto/qyzx/MenuStructureDto.java
+21
-0
src/main/java/cn/timer/api/dto/xcgl/ImportDescriptionDto.java
+23
-5
src/main/resources/mapping/admin/AdminAssoTxjlbMapper.xml
+60
-0
src/main/resources/mapping/admin/AdminMenuTemplateMapper.xml
+131
-0
src/main/resources/mapping/admin/AdminMsgTemplateMapper.xml
+121
-0
src/main/resources/mapping/htzz/HtzzAdminZzdaMapper.xml
+197
-0
src/main/resources/mapping/htzz/HtzzAssoHtgxMapper.xml
+111
-0
src/main/resources/mapping/htzz/HtzzAssoZztxMapper.xml
+151
-0
src/main/resources/mapping/qyzx/QyzxAdminColourMapper.xml
+101
-0
src/main/resources/mapping/qyzx/QyzxAdminMenuMapper.xml
+111
-0
No files found.
src/main/java/cn/timer/api/bean/admin/AdminAssoTxjlb.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
bean
.
admin
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author LAL 2020-11-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"admin_asso_txjlb"
)
@ApiModel
(
"系统消息记录"
)
public
class
AdminAssoTxjlb
extends
Model
<
AdminAssoTxjlb
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"内容 "
,
example
=
"内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"提醒用户姓名 提醒用户姓名"
,
example
=
"101"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"提醒用户id 提醒用户id"
,
example
=
"101"
)
private
Integer
empNum
;
@ApiModelProperty
(
value
=
"提醒类型:1;证照... 提醒类型:1;证照..."
,
example
=
"101"
)
private
Integer
txType
;
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"生成时间 生成时间"
,
example
=
"101"
)
private
Long
addtime
;
@ApiModelProperty
(
value
=
"状态 0:未读 1:已读"
,
example
=
"101"
)
private
Integer
txstate
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/admin/AdminMenuTemplate.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
bean
.
admin
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author LAL 2020-11-12
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"admin_menu_template"
)
@ApiModel
(
"企业菜单配置"
)
public
class
AdminMenuTemplate
extends
Model
<
AdminMenuTemplate
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"父菜单ID, 0 表示第一级菜单"
,
example
=
"101"
)
private
Integer
parentid
;
@ApiModelProperty
(
value
=
"菜单code "
,
example
=
"菜单code"
)
private
String
menuCode
;
@ApiModelProperty
(
value
=
"菜单名称 "
,
example
=
"菜单名称"
)
private
String
menuName
;
@ApiModelProperty
(
value
=
"菜单排序号 菜单排序号"
,
example
=
"101"
)
private
Integer
sortNumber
;
@ApiModelProperty
(
value
=
"路由地址 "
,
example
=
"路由地址"
)
private
String
path
;
@ApiModelProperty
(
value
=
"0:未启用;1:已启用 0:未启用;1:已启用"
,
example
=
"101"
)
private
Integer
enable
;
@ApiModelProperty
(
value
=
"0:不可分配;1:可分配 0:不可分配;1:可分配"
,
example
=
"101"
)
private
Integer
distribution
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/admin/AdminMsgTemplate.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
bean
.
admin
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author LAL 2020-11-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"admin_msg_template"
)
@ApiModel
(
"消息模板"
)
public
class
AdminMsgTemplate
extends
Model
<
AdminMsgTemplate
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"模板名称 "
,
example
=
"模板名称"
)
private
String
templateName
;
@ApiModelProperty
(
value
=
"对应平台模板编号 "
,
example
=
"对应平台模板编号"
)
private
String
platformNum
;
@ApiModelProperty
(
value
=
"平台类型 1 阿里云"
,
example
=
"101"
)
private
Integer
platformType
;
@ApiModelProperty
(
value
=
"模板内容 "
,
example
=
"模板内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"类型 1 合同到期提醒, 2 证照到期提醒"
,
example
=
"101"
)
private
Integer
msgType
;
@ApiModelProperty
(
value
=
"状态 0 启用 1 停用"
,
example
=
"101"
)
private
Integer
state
;
@ApiModelProperty
(
value
=
"生产时间 生产时间"
,
example
=
"101"
)
private
Long
addtime
;
@ApiModelProperty
(
value
=
"0 系统默认(公共模板), 1 企业定制"
,
example
=
"0"
)
private
Integer
sysDefault
;
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
@ApiModelProperty
(
value
=
"企业ID 企业ID"
,
example
=
"101"
)
private
Integer
orgCode
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/htzz/HtzzAdminZzda.java
View file @
80b7af2e
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,22 @@ 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
;
@ApiModelProperty
(
value
=
"1:合同;2:证照"
,
example
=
"1"
)
private
Integer
documentType
;
@Transient
@TableField
(
exist
=
false
)
private
List
<
NotifyPersonDto
>
ids
;
@Transient
@TableField
(
exist
=
false
)
private
Integer
[]
ids
;
private
HtzzAssoZztx
zztx
;
...
...
src/main/java/cn/timer/api/bean/htzz/HtzzAssoHtgx.java
View file @
80b7af2e
...
...
@@ -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"
)
...
...
src/main/java/cn/timer/api/bean/htzz/HtzzAssoZztx.java
View file @
80b7af2e
...
...
@@ -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
=
"录入时间"
)
...
...
src/main/java/cn/timer/api/bean/qyzx/QyzxAdminColour.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
bean
.
qyzx
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author LAL 2020-11-17
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"qyzx_admin_colour"
)
@ApiModel
(
"企业自定义颜色"
)
public
class
QyzxAdminColour
extends
Model
<
QyzxAdminColour
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"导航栏背景色 "
,
example
=
"导航栏背景色"
)
private
String
navbackColor
;
@ApiModelProperty
(
value
=
"右侧菜单栏背景色 "
,
example
=
"右侧菜单栏背景色"
)
private
String
menubackColor
;
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"生成时间 生成时间"
,
example
=
"101"
)
private
Long
addtime
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/qyzx/QyzxAdminMenu.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
bean
.
qyzx
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author LAL 2020-11-12
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"qyzx_admin_menu"
)
@ApiModel
(
"企业自定义菜单"
)
public
class
QyzxAdminMenu
extends
Model
<
QyzxAdminMenu
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"菜单code "
,
example
=
"菜单code"
)
private
String
menuCode
;
@ApiModelProperty
(
value
=
"菜单名称 "
,
example
=
"菜单名称"
)
private
String
menuName
;
@ApiModelProperty
(
value
=
"菜单排序号 菜单排序号"
,
example
=
"101"
)
private
Integer
sortNumber
;
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"生成时间 生成时间"
,
example
=
"101"
)
private
Long
addtime
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/qyzx/QyzxEmpLogin.java
View file @
80b7af2e
...
...
@@ -3,7 +3,7 @@ package cn.timer.api.bean.qyzx;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
...
...
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.dto.login.QysDto
;
import
cn.timer.api.dto.qyzx.MenuStructureDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
...
...
@@ -93,4 +94,12 @@ public class QyzxEmpLogin extends Model<QyzxEmpLogin> {
@TableField
(
exist
=
false
)
private
YgglMainEmp
ygglMainEmp
;
@TableField
(
exist
=
false
)
private
List
<
MenuStructureDto
>
menstr
;
@TableField
(
exist
=
false
)
private
QyzxAdminColour
zdyys
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/LoginController.java
View file @
80b7af2e
package
cn
.
timer
.
api
.
controller
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
...
...
@@ -9,7 +7,6 @@ import java.util.Date;
import
java.util.HashMap
;
import
java.util.List
;
import
javax.management.Query
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -40,8 +37,8 @@ import cn.hutool.core.date.DateUtil;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.admin.AdminMenuTemplate
;
import
cn.timer.api.bean.jxgl.JxglBasicSetting
;
import
cn.timer.api.bean.kqmk.KqglAssoBcsz
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRulesT
;
...
...
@@ -49,6 +46,8 @@ import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeRules
;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeRulesM
;
import
cn.timer.api.bean.qyxx.CmsContent
;
import
cn.timer.api.bean.qyzx.QyzxAdminColour
;
import
cn.timer.api.bean.qyzx.QyzxAdminMenu
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
...
...
@@ -75,6 +74,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.login.QysDto
;
import
cn.timer.api.dto.qyzx.EntRegisterDto
;
import
cn.timer.api.dto.qyzx.MenuStructureDto
;
import
cn.timer.api.dto.yggl.ScancodeloginparametersDto
;
import
cn.timer.api.utils.Md5
;
import
cn.timer.api.utils.Result
;
...
...
@@ -114,26 +114,6 @@ public class LoginController {
@Value
(
"${config-8timer.Aliyun.SECRET}"
)
private
String
SECRET
;
// public static String host;
// public static String PROJECT_ID;
// public static String PROJECT_SECRET;
//
// @Value("${config-8timer.esign.host}")
// private String host_s;
//
// @Value("${config-8timer.esign.PROJECT_ID}")
// private String PROJECT_ID_s;
//
// @Value("${config-8timer.esign.PROJECT_SECRET}")
// private String PROJECT_SECRET_s;
//
// @PostConstruct
// public void init() {
// host = host_s;
// PROJECT_ID = PROJECT_ID_s;
// PROJECT_SECRET = PROJECT_SECRET_s;
// }
@Value
(
"${config-8timer.Aliyun.PROJECT_NAME}"
)
private
String
endpoint
;
...
...
@@ -194,7 +174,7 @@ public class LoginController {
/**
* 发送验证码
*
* @param
qyzxEmpLogin
* @param
entRegisterDto
* @return
*/
@PostMapping
(
value
=
"/sendcode"
)
...
...
@@ -288,7 +268,7 @@ public class LoginController {
/**
* 手机号码认证
*
* @param
qyzxEmpLogin
* @param
entRegisterDto
* @return
*/
@PostMapping
(
value
=
"/authentication"
)
...
...
@@ -314,39 +294,6 @@ public class LoginController {
return
ResultUtil
.
success
(
"验证码正确"
);
}
/**
* 手机号码认证
*
* @param qyzxEmpLogin
* @return
* @throws IOException
*//*
* @PostMapping(value = "/test")
*
* @ApiOperation(value = "3.测试", httpMethod = "POST", notes = "接口发布说明")
*
* @ApiOperationSupport(order = 3) public void test(HttpServletRequest request,
* HttpServletResponse res) throws IOException {
*
* res.setHeader("content-type","text/html;charset=UTF-8");
* res.setHeader("selfHeader","selfHeaderValue"); //
* res.addHeader("response_code", "123"); //
* res.setContentType("application/octet-stream"); //
* res.addHeader("Content-Length", "0");
*
* res.addHeader("response_code", "100"); res.addHeader("trans_id", "");
* res.addHeader("cmd_code", "NO com");
*
* res.setContentType("application/octet-stream");
* res.addHeader("Content-Length", "0");
*
* res.flushBuffer(); // response.addHeader("response_code",
* "ERROR_INVALID_LIB_NAME"); //
* response.setContentType("application/octet-stream"); //
* response.addHeader("Content-Length", "0"); // response.flushBuffer();
* Logoutput(111); }
*/
@PostMapping
(
value
=
"/updatePwd"
)
@ApiOperation
(
value
=
"4.修改密码(新)"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
)
...
...
@@ -395,7 +342,7 @@ public class LoginController {
/**
* 修改密码
*
* @param
qyzxEmpLogin
* @param
entRegisterDto
* @return
*/
@PostMapping
(
value
=
"/updatepassword"
)
...
...
@@ -458,7 +405,7 @@ public class LoginController {
/**
* 修改手机号/用户名
*
* @param
qyzxEmpLogin
* @param
entRegisterDto
* @return
*/
@PostMapping
(
value
=
"/updatephone"
)
...
...
@@ -732,7 +679,7 @@ public class LoginController {
/**
* 验证码登录
*
* @param
qyzxEmpLogin
* @param
entRegisterDto
* @return
*/
@PostMapping
(
value
=
"/code"
)
...
...
@@ -821,7 +768,7 @@ public class LoginController {
}
YgglMainEmp
userInfo
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
select
(
YgglMainEmp:
:
get
Name
,
YgglMainEmp:
:
getPhone
,
YgglMainEmp:
:
getBmgwId
)
.
select
(
YgglMainEmp:
:
get
EmpNum
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getPhone
,
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getOrgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
qyzxEmpLogin1
.
getId
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
qyzxEmpLogin1
.
getOrgId
()));
if
(
userInfo
==
null
)
{
...
...
@@ -852,8 +799,53 @@ public class LoginController {
List
<
String
>
menus
=
new
ArrayList
<>();
zas
.
stream
().
forEach
(
o
->
menus
.
add
(
o
.
getMenuId
()));
qyzxEmpLogin1
.
setMenus
(
menus
);
}
}
List
<
MenuStructureDto
>
mestrs
=
new
ArrayList
<
MenuStructureDto
>();
List
<
QyzxAdminMenu
>
qyme
=
QyzxAdminMenu
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
QyzxAdminMenu
>().
lambda
().
eq
(
QyzxAdminMenu:
:
getOrgCode
,
qyzxEmpLogin1
.
getOrgId
()).
orderByAsc
(
QyzxAdminMenu:
:
getSortNumber
));
String
[]
zdy
=
new
String
[
qyme
.
size
()];
int
i
=
0
;
for
(
QyzxAdminMenu
me
:
qyme
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
me
.
getMenuCode
());
metr
.
setMenuName
(
me
.
getMenuName
());
metr
.
setSortNumber
(
me
.
getSortNumber
());
metr
.
setPath
(
""
);
mestrs
.
add
(
metr
);
zdy
[
i
]
=
me
.
getMenuCode
();
i
++;
}
//
List
<
AdminMenuTemplate
>
adtes
=
AdminMenuTemplate
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
AdminMenuTemplate
>().
lambda
().
eq
(
AdminMenuTemplate:
:
getEnable
,
1
).
orderByAsc
(
AdminMenuTemplate:
:
getSortNumber
));
for
(
AdminMenuTemplate
adm
:
adtes
)
{
if
(!
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull
(
zdy
),
adm
.
getMenuCode
()))
{
if
(
adm
.
getDistribution
()
==
0
&&
qyzxEmpLogin1
.
getOrgId
()
==
3
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
adm
.
getMenuCode
());
metr
.
setMenuName
(
adm
.
getMenuName
());
metr
.
setSortNumber
(
adm
.
getSortNumber
());
metr
.
setPath
(
""
);
mestrs
.
add
(
metr
);
}
else
if
(
adm
.
getDistribution
()
==
1
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
adm
.
getMenuCode
());
metr
.
setMenuName
(
adm
.
getMenuName
());
metr
.
setSortNumber
(
adm
.
getSortNumber
());
metr
.
setPath
(
""
);
mestrs
.
add
(
metr
);
}
}
}
qyzxEmpLogin1
.
setMenstr
(
mestrs
);
QyzxAdminColour
cdys
=
QyzxAdminColour
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
QyzxAdminColour
>().
lambda
().
eq
(
QyzxAdminColour:
:
getOrgCode
,
qyzxEmpLogin1
.
getOrgId
()));
qyzxEmpLogin1
.
setZdyys
(
cdys
);
// 可操作企业
// 需要更新最后一次登陆信息
...
...
@@ -868,7 +860,7 @@ public class LoginController {
/**
* 密码登录
*
* @param
qyzxEmpLogin
* @param
entRegisterDto
* @return
*/
@PostMapping
(
value
=
"/password"
)
...
...
src/main/java/cn/timer/api/controller/admin/AdminAssoTxjlbcontroller.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
controller
.
admin
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
javax.transaction.Transactional
;
import
cn.timer.api.dao.admin.AdminAssoTxjlbMapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.timer.api.bean.admin.AdminAssoTxjlb
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dto.htzz.QueryNoReadingDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
=
"消息记录"
)
@RestController
@Transactional
@RequestMapping
(
value
=
"/record"
)
public
class
AdminAssoTxjlbcontroller
{
@Resource
private
AdminAssoTxjlbMapper
txjlbMapper
;
@PostMapping
(
"/noreading"
)
@ApiOperation
(
value
=
"未读数量"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
noreading
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QueryNoReadingDto
ws
)
{
Integer
wds
=
AdminAssoTxjlb
.
builder
().
build
()
.
selectCount
(
new
QueryWrapper
<
AdminAssoTxjlb
>().
lambda
().
eq
(
AdminAssoTxjlb:
:
getEmpNum
,
ws
.
getEmpNum
())
.
eq
(
AdminAssoTxjlb:
:
getOrgCode
,
ws
.
getOrgCode
()).
eq
(
AdminAssoTxjlb:
:
getTxstate
,
0
));
return
ResultUtil
.
data
(
wds
,
"查询成功"
);
}
@PostMapping
(
"/datanotread"
)
@ApiOperation
(
value
=
"未读数据"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
datanotread
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QueryNoReadingDto
ws
)
{
List
<
AdminAssoTxjlb
>
wds
=
AdminAssoTxjlb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
AdminAssoTxjlb
>().
lambda
().
eq
(
AdminAssoTxjlb:
:
getEmpNum
,
ws
.
getEmpNum
())
.
eq
(
AdminAssoTxjlb:
:
getOrgCode
,
ws
.
getOrgCode
()).
eq
(
AdminAssoTxjlb:
:
getTxstate
,
0
));
return
ResultUtil
.
data
(
wds
,
"查询成功"
);
}
@GetMapping
(
"/recorddetails/{id}"
)
@ApiOperation
(
value
=
"记录详情"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
recorddetails
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
AdminAssoTxjlb
jlxq
=
AdminAssoTxjlb
.
builder
().
id
(
id
).
build
().
selectById
();
return
ResultUtil
.
data
(
jlxq
,
"成功"
);
}
@GetMapping
(
"/recordmodification/{id}"
)
@ApiOperation
(
value
=
"未读记录标记已读"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
recordmodification
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
AdminAssoTxjlb
.
builder
().
id
(
id
).
build
()
.
update
(
new
UpdateWrapper
<
AdminAssoTxjlb
>().
lambda
().
set
(
AdminAssoTxjlb:
:
getTxstate
,
1
)
.
eq
(
AdminAssoTxjlb:
:
getId
,
id
)
);
return
ResultUtil
.
success
(
"修改成功"
);
}
@PostMapping
(
"/pageTxjlb"
)
@ApiOperation
(
value
=
"分页查询消息记录"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
pageTxjlb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QueryNoReadingDto
search
)
{
Page
<
AdminAssoTxjlb
>
page
=
new
Page
<>(
search
.
getCurrentPage
()
==
null
?
1
:
search
.
getCurrentPage
(),
search
.
getTotalPage
()
==
null
?
10
:
search
.
getTotalPage
());
long
total
=
txjlbMapper
.
pageTxjlbCount
(
search
);
List
<
AdminAssoTxjlb
>
list
=
txjlbMapper
.
pageTxjlb
(
search
);
page
.
setTotal
(
total
);
return
ResultUtil
.
data
(
page
,
list
,
"分页查询消息记录"
);
}
}
src/main/java/cn/timer/api/controller/admin/AdminMsgTemplateController.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
controller
.
admin
;
import
cn.timer.api.bean.admin.AdminMsgTemplate
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dao.admin.AdminMsgTemplateMapper
;
import
cn.timer.api.dto.admin.AdminMsgTemplateDto
;
import
cn.timer.api.dto.xcgl.FixedSalaryStaffDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.transaction.Transactional
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
@Api
(
tags
=
"消息模板管理"
)
@RestController
@Transactional
@RequestMapping
(
value
=
"/msg"
)
public
class
AdminMsgTemplateController
{
@Resource
private
AdminMsgTemplateMapper
msgTemplateMapper
;
@PostMapping
(
"/listMsgTemplate"
)
@ApiOperation
(
value
=
"列出企业可选择的消息模板"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
listMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AdminMsgTemplateDto
search
)
{
search
.
setOrgCode
(
userBean
.
getOrgCode
());
List
<
AdminMsgTemplate
>
list
=
msgTemplateMapper
.
listMsgTemplate
(
search
);
return
ResultUtil
.
data
(
list
);
}
@PostMapping
(
"/pageMsgTemplate"
)
@ApiOperation
(
value
=
"消息模板分页查询"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
pageMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AdminMsgTemplateDto
search
)
{
Page
<
FixedSalaryStaffDto
>
page
=
new
Page
<
FixedSalaryStaffDto
>(
search
.
getCurrentPage
()
==
null
?
1
:
search
.
getCurrentPage
(),
search
.
getTotalPage
()
==
null
?
10
:
search
.
getTotalPage
());
long
total
=
msgTemplateMapper
.
pageMsgTemplateCount
(
search
);
List
<
AdminMsgTemplate
>
list
=
msgTemplateMapper
.
pageMsgTemplate
(
search
);
page
.
setTotal
(
total
);
return
ResultUtil
.
data
(
page
,
list
,
"消息模板分页查询"
);
}
@PostMapping
(
"/getMsgTemplate/{id}"
)
@ApiOperation
(
value
=
"根据ID获取消息模板"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
pageMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
return
ResultUtil
.
data
(
msgTemplateMapper
.
selectById
(
id
));
}
@PostMapping
(
"/delMsgTemplate/{id}"
)
@ApiOperation
(
value
=
"根据ID删除消息模板"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
delMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
msgTemplateMapper
.
deleteById
(
id
);
return
ResultUtil
.
success
(
"删除成功"
);
}
@PostMapping
(
"/editMsgTemplate"
)
@ApiOperation
(
value
=
"新增/编辑消息模板"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
editMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AdminMsgTemplate
temp
)
{
AdminMsgTemplateDto
search
=
new
AdminMsgTemplateDto
();
search
.
setPlatformNum
(
temp
.
getPlatformNum
());
search
.
setPlatformType
(
temp
.
getPlatformType
());
search
.
setState
(
0
);
AdminMsgTemplate
exits
=
msgTemplateMapper
.
getByParams
(
search
);
if
(
Objects
.
nonNull
(
exits
))
{
if
(
Objects
.
isNull
(
temp
.
getId
())
||
(
Objects
.
nonNull
(
temp
.
getId
())
&&
!
temp
.
getId
().
equals
(
exits
.
getId
())))
{
return
ResultUtil
.
error
(
"对应平台编号已经存在!"
);
}
}
temp
.
setAddtime
(
new
Date
().
getTime
());
if
(
Objects
.
isNull
(
temp
.
getId
()))
{
msgTemplateMapper
.
insert
(
temp
);
}
else
{
msgTemplateMapper
.
updateById
(
temp
);
}
return
ResultUtil
.
success
(
"保存成功"
);
}
}
src/main/java/cn/timer/api/controller/htzz/HtzzController.java
View file @
80b7af2e
...
...
@@ -21,18 +21,23 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.cron.CronUtil
;
import
cn.hutool.cron.task.Task
;
import
cn.timer.api.bean.admin.AdminAssoTxjlb
;
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.QueryNoReadingDto
;
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 证照档案实体
...
...
@@ -89,54 +81,69 @@ public class HtzzController {
Logoutput
(
"企业 "
+
orgCode
+
" :短信套餐已过期"
);
return
ResultUtil
.
error
(
"短信套餐已到期!"
);
}
zzda
.
setTxkgType
(
1
);
if
(
zzda
.
getId
()
==
null
)
{
zzda
.
setTxkgType
(
1
);
//默认开启提醒
}
zzda
.
setLrrid
(
userBean
.
getEmpNum
());
zzda
.
setLrsjTime
(
new
Date
());
zzda
.
setOrgCode
(
orgCode
);
zzda
.
insert
();
zzda
.
setSendingStatus
(
0
);
//0:未发;1:已发
zzda
.
setTemplateId
(
zzda
.
getTemplateId
());
//消息模板id
// zzda.insert();
zzda
.
insertOrUpdate
();
/**
* 新增通知关系表,每人一个
*/
YgglMainEmp
emp
=
null
;
Integer
[]
ids
=
zzda
.
getIds
();
List
<
HtzzAssoHtgx
>
htgxs
=
new
ArrayList
<
HtzzAssoHtgx
>(
ids
.
length
);
for
(
Integer
id
:
ids
)
{
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"name"
,
"phone"
,
"emp_num"
).
eq
(
"emp_num"
,
id
).
eq
(
"org_code"
,
orgCode
);
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
queryWrapper
);
List
<
NotifyPersonDto
>
ids
=
zzda
.
getIds
();
//通知人 用户id+手机号码
List
<
HtzzAssoHtgx
>
htgxs
=
Lists
.
newArrayList
();
for
(
NotifyPersonDto
pre
:
ids
)
{
HtzzAssoHtgx
.
builder
().
build
().
delete
(
new
QueryWrapper
<
HtzzAssoHtgx
>().
lambda
().
eq
(
HtzzAssoHtgx:
:
getOrgCode
,
orgCode
).
eq
(
HtzzAssoHtgx:
:
getTzrid
,
pre
.
getEmpNum
())
.
eq
(
HtzzAssoHtgx:
:
getPhone
,
pre
.
getPhone
()));
HtzzAssoHtgx
htgx
=
HtzzAssoHtgx
.
builder
().
build
();
htgx
.
setHtid
(
zzda
.
getId
());
htgx
.
setTzrid
(
emp
.
getEmpNum
());
htgx
.
setName
(
emp
.
get
Name
());
htgx
.
setPhone
(
emp
.
getPhone
());
htgx
.
setTzrid
(
pre
.
getEmpNum
());
htgx
.
setName
(
pre
.
getEmp
Name
());
htgx
.
setPhone
(
pre
.
getPhone
());
htgx
.
setOrgCode
(
orgCode
);
htgx
.
insert
();
htgxs
.
add
(
htgx
);
}
HtzzAssoZztx
zztx
=
zzda
.
getZztx
();
zztx
.
setZzdaId
(
zzda
.
getId
());
zztx
.
setOrgCode
(
orgCode
);
zztx
.
setLrrid
(
userBean
.
getEmpNum
());
zztx
.
setLrsjTime
(
new
Date
());
zztx
.
insertOrUpdate
();
return
ResultUtil
.
datas
(
zzda
,
htgxs
,
"新增证件成功!"
);
}
@GetMapping
(
"/modifytx/{id}"
)
@ApiOperation
(
value
=
"修改提醒数据"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
modifytx
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
// /**
// * 查询公司所有证件
// *
// * @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("查询失败了!请检查是否登录");
// }
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
();
predto
.
setEmpName
(
gx
.
getName
());
predto
.
setEmpNum
(
gx
.
getTzrid
());
predto
.
setPhone
(
gx
.
getPhone
());
tzids
.
add
(
predto
);
}
HtzzAdminZzda
zzda
=
HtzzAdminZzda
.
builder
().
id
(
id
).
build
().
selectById
();
HtzzAssoZztx
zztx
=
HtzzAssoZztx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
HtzzAssoZztx
>().
lambda
().
eq
(
HtzzAssoZztx:
:
getZzdaId
,
id
));
zzda
.
setZztx
(
zztx
);
zzda
.
setIds
(
tzids
);
return
ResultUtil
.
data
(
zzda
,
"新增成功"
);
}
/**
* 按条件搜索(关键字、到期时间)
...
...
@@ -155,7 +162,7 @@ public class HtzzController {
QueryWrapper
<
HtzzAdminZzda
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"org_code"
,
userBean
.
getOrgCode
())
.
select
(
"id"
,
"zjmc"
,
"czry"
,
"czrdh"
,
"fzrq"
,
"yxdqr"
,
"txkg_type"
).
eq
(
"is_delete"
,
0
)
.
select
(
"id"
,
"zjmc"
,
"czry"
,
"czrdh"
,
"fzrq"
,
"yxdqr"
,
"txkg_type"
).
eq
(
"is_delete"
,
0
)
.
eq
(
"document_type"
,
htzzQueryDto
.
getDocumentType
())
.
gt
(!
StrUtil
.
hasBlank
(
e
),
"yxdqr"
,
!
StrUtil
.
hasBlank
(
e
)
?
e
:
"9999-01-01 00:00:00"
)
.
and
(!
StrUtil
.
hasBlank
(
q
),
wq
->
wq
.
like
(
"zjmc"
,
q
).
or
().
like
(
"czry"
,
q
)).
orderByDesc
(
"lrsj_time"
);
...
...
@@ -200,8 +207,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
());
}
...
...
@@ -239,7 +249,7 @@ public class HtzzController {
@ApiOperation
(
value
=
"查詢全部員工id、姓名"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
queryYg
(
@CurrentUser
UserBean
userBean
)
{
return
ResultUtil
.
data
(
YgglMainEmp
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
select
(
"emp_num"
,
"name"
).
eq
(
"org_code"
,
userBean
.
getOrgCode
())));
new
QueryWrapper
<
YgglMainEmp
>().
select
(
"emp_num"
,
"name"
,
"phone"
).
eq
(
"org_code"
,
userBean
.
getOrgCode
())));
}
@GetMapping
(
value
=
"/test"
)
...
...
@@ -256,6 +266,7 @@ public class HtzzController {
CronUtil
.
start
();
return
ResultUtil
.
success
(
"操作成功"
);
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
...
...
src/main/java/cn/timer/api/controller/htzz/atttimer/AlicloudSMS.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
controller
.
htzz
.
atttimer
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.aliyuncs.CommonRequest
;
import
com.aliyuncs.CommonResponse
;
import
com.aliyuncs.DefaultAcsClient
;
import
com.aliyuncs.IAcsClient
;
import
com.aliyuncs.exceptions.ClientException
;
import
com.aliyuncs.exceptions.ServerException
;
import
com.aliyuncs.http.MethodType
;
import
com.aliyuncs.profile.DefaultProfile
;
import
com.google.gson.JsonArray
;
import
com.google.gson.JsonObject
;
import
cn.timer.api.bean.admin.AdminAssoTxjlb
;
import
cn.timer.api.bean.admin.AdminMsgTemplate
;
import
cn.timer.api.bean.htzz.HtzzAdminZzda
;
import
cn.timer.api.config.enums.PinType
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
@Transactional
@Component
public
class
AlicloudSMS
{
@Value
(
"${config-8timer.Aliyun.PROJECT_NAME}"
)
public
String
PROJECT_NAME
;
@Value
(
"${config-8timer.Aliyun.REGION_ID}"
)
public
String
REGION_ID
;
@Value
(
"${config-8timer.Aliyun.ACCESSKEY_ID}"
)
public
String
ACCESSKEY_ID
;
@Value
(
"${config-8timer.Aliyun.SECRET}"
)
public
String
SECRET
;
final
static
String
CODE_NAME
=
"TemplateCode"
;
// 短信模板代码参数名
final
static
String
TEMPLATE_PARAM
=
"TemplateParam"
;
// 自定义参数
final
static
String
DOMAIN
=
"dysmsapi.aliyuncs.com"
;
final
static
String
VERSION
=
"2017-05-25"
;
final
static
String
ACTION_SEND
=
"SendSms"
;
// 发短信
final
static
String
ACTION_QUERY
=
"QuerySendDetails"
;
// 短信查询
final
static
String
PAGE_SIZE
=
"1"
;
final
static
String
CURRENT_PAGE
=
"1"
;
/**
* 提醒功能
*/
@SuppressWarnings
(
"deprecation"
)
public
List
<
Object
>
remind
(
HtzzAdminZzda
zzda
,
String
phone
,
String
tzname
,
Integer
tzrid
)
{
//短信模板详情
AdminMsgTemplate
dxmb
=
AdminMsgTemplate
.
builder
().
id
(
zzda
.
getTemplateId
()).
build
().
selectById
();
String
str
=
dxmb
.
getContent
();
String
code
=
dxmb
.
getPlatformNum
();
DefaultProfile
profile
=
DefaultProfile
.
getProfile
(
REGION_ID
,
ACCESSKEY_ID
,
SECRET
);
IAcsClient
client
=
new
DefaultAcsClient
(
profile
);
CommonRequest
request
=
new
CommonRequest
();
request
.
setMethod
(
MethodType
.
POST
);
request
.
setDomain
(
DOMAIN
);
request
.
setVersion
(
VERSION
);
request
.
setAction
(
ACTION_SEND
);
request
.
putQueryParameter
(
"RegionId"
,
REGION_ID
);
request
.
putQueryParameter
(
"PhoneNumbers"
,
phone
);
request
.
putQueryParameter
(
"SignName"
,
PROJECT_NAME
);
request
.
putQueryParameter
(
CODE_NAME
,
code
);
//模版CODE
ArrayList
<
String
>
word
=
new
ArrayList
<
String
>();
int
m
=
0
,
n
=
0
;
int
count
=
0
;
for
(
int
i
=
0
;
i
<
str
.
length
();
i
++)
{
if
(
str
.
charAt
(
i
)
==
'{'
)
{
if
(
count
==
0
)
{
m
=
i
;
}
count
++;
}
if
(
str
.
charAt
(
i
)
==
'}'
)
{
count
--;
if
(
count
==
0
)
{
n
=
i
;
word
.
add
(
str
.
substring
(
m
,
n
+
1
).
replace
(
"{"
,
""
).
replace
(
"}"
,
""
));
}
}
}
JsonArray
array
=
new
JsonArray
();
JsonObject
lan
=
new
JsonObject
();
for
(
String
bl
:
word
)
{
if
(
bl
.
equals
(
"name"
))
{
lan
.
addProperty
(
bl
,
tzname
);
}
else
if
(
bl
.
equals
(
"yxdqr"
)){
lan
.
addProperty
(
bl
,
ClockInTool
.
SunNovCSTYMD
(
zzda
.
getYxdqr
()));
}
else
{
String
strjson
=
JSON
.
toJSONString
(
zzda
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
strjson
);
String
value
=
jsonObject
.
getString
(
bl
);
lan
.
addProperty
(
bl
,
value
);
}
}
array
.
add
(
lan
);
String
SMSformat
=
String
.
valueOf
(
array
).
replace
(
"["
,
""
).
replace
(
"]"
,
""
);
// System.out.println(SMSformat);
//短信模板格式
request
.
putQueryParameter
(
TEMPLATE_PARAM
,
SMSformat
);
CommonResponse
response
=
null
;
String
a
=
null
;
try
{
response
=
client
.
getCommonResponse
(
request
);
a
=
response
.
getData
();
// System.err.println("response:"+a); // 短信服务响应内容
}
catch
(
ServerException
e
)
{
e
.
printStackTrace
();
}
catch
(
ClientException
e
)
{
e
.
printStackTrace
();
}
Integer
id
=
null
;
if
(
a
!=
null
&&
a
.
contains
(
"OK"
))
{
AdminAssoTxjlb
txs
=
AdminAssoTxjlb
.
builder
().
build
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
SMSformat
);
Map
<
String
,
Object
>
jsonToMap
=
JSONObject
.
parseObject
(
jsonObject
.
toJSONString
());
for
(
Entry
<
String
,
Object
>
entry
:
jsonToMap
.
entrySet
()){
String
mapKey
=
entry
.
getKey
();
String
mapValue
=
String
.
valueOf
(
entry
.
getValue
());
str
=
str
.
replace
(
"${"
+
mapKey
+
"}"
,
mapValue
);
}
// System.out.println(str);
txs
.
setContent
(
str
);
//内容
txs
.
setUserName
(
tzname
);
txs
.
setEmpNum
(
tzrid
);
txs
.
setTxType
(
zzda
.
getDocumentType
());
txs
.
setOrgCode
(
zzda
.
getOrgCode
());
txs
.
setAddtime
(
new
Date
().
getTime
());
txs
.
setTxstate
(
0
);
txs
.
insert
();
List
<
Object
>
list
=
new
ArrayList
<
Object
>();
list
.
add
(
id
);
list
.
add
(
JSONObject
.
parseObject
(
response
.
getData
()));
return
list
;
// 代表请求成功
}
return
null
;
}
}
src/main/java/cn/timer/api/controller/htzz/atttimer/NewsTaskTiming.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
controller
.
htzz
.
atttimer
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
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.controller.kqgl.ClockInTool
;
/**
* 消息定时器
*
*/
@Configuration
// 1.主要用于标记配置类,兼备Component的效果。
@EnableScheduling
// 2.开启定时任务
public
class
NewsTaskTiming
{
@Autowired
private
AlicloudSMS
sms
;
@Scheduled
(
cron
=
"0 0 8 * * ?"
)
//早上八点
public
void
MessageAlert
()
throws
ParseException
{
//当前时间
String
nowdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
()).
toString
();
//
List
<
HtzzAdminZzda
>
htzzs
=
HtzzAdminZzda
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
HtzzAdminZzda
>().
lambda
().
eq
(
HtzzAdminZzda:
:
getTxkgType
,
1
)
.
ge
(
HtzzAdminZzda:
:
getYxdqr
,
nowdate
));
for
(
HtzzAdminZzda
zz
:
htzzs
)
{
String
dqrq
=
ClockInTool
.
SunNovCSTYMD
(
zz
.
getYxdqr
());
//有效期到期日
//合同证照提醒表设置
HtzzAssoZztx
zzsz
=
HtzzAssoZztx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
HtzzAssoZztx
>().
lambda
().
eq
(
HtzzAssoZztx:
:
getZzdaId
,
zz
.
getId
()));
if
(
zzsz
!=
null
)
{
int
txsj
=
zzsz
.
getTxsj
();
//提醒时间周期 0-到期提醒 1-提前一天 2-提前二天 ...
String
tqsj
=
ClockInTool
.
requires_extra_times
(
dqrq
,-
txsj
,
3
,
1
);
if
(
nowdate
.
equals
(
tqsj
))
{
List
<
HtzzAssoHtgx
>
txrs
=
HtzzAssoHtgx
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
HtzzAssoHtgx
>().
lambda
().
eq
(
HtzzAssoHtgx:
:
getHtid
,
zz
.
getId
()));
for
(
HtzzAssoHtgx
rt
:
txrs
)
{
//发送短信
List
<
Object
>
list
=
sms
.
remind
(
zz
,
rt
.
getPhone
(),
rt
.
getName
(),
rt
.
getTzrid
());
}
}
}
}
}
}
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
80b7af2e
...
...
@@ -12,6 +12,7 @@ import java.util.Date;
import
java.util.GregorianCalendar
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Locale
;
import
java.util.Set
;
...
...
@@ -26,6 +27,24 @@ public class ClockInTool {
static
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
public
static
String
[]
shuzuqucong
(
String
[]
temp
)
{
List
<
String
>
list
=
new
LinkedList
<
String
>();
for
(
int
i
=
0
;
i
<
temp
.
length
;
i
++)
{
if
(!
list
.
contains
(
temp
[
i
]))
{
list
.
add
(
temp
[
i
]);
}
}
String
[]
rowsTemp
=
list
.
toArray
(
new
String
[
list
.
size
()]);
if
(
rowsTemp
!=
null
&&
rowsTemp
.
length
>
0
)
{
for
(
int
i
=
0
;
i
<
rowsTemp
.
length
;
i
++)
{
System
.
out
.
println
(
rowsTemp
[
i
]);
}
}
return
rowsTemp
;
}
public
static
boolean
useArrayUtils
(
String
[]
arr
,
String
targetValue
)
{
return
ArrayUtils
.
contains
(
arr
,
targetValue
);
...
...
@@ -210,6 +229,28 @@ public class ClockInTool {
return
strArrLast
;
}
/***
* 去除String数组中的空值
*/
public
static
String
[]
deleteArrayNull2
(
String
string
[])
{
String
strArr
[]
=
string
;
// step1: 定义一个list列表,并循环赋值
ArrayList
<
String
>
strList
=
new
ArrayList
<
String
>();
for
(
int
i
=
0
;
i
<
strArr
.
length
;
i
++)
{
strList
.
add
(
strArr
[
i
]);
}
// step2: 删除list列表中所有的空值
while
(
strList
.
remove
(
null
));
// while (strList.remove(""));
// step3: 把list列表转换给一个新定义的中间数组,并赋值给它
String
strArrLast
[]
=
strList
.
toArray
(
new
String
[
strList
.
size
()]);
return
strArrLast
;
}
public
static
Date
strToDateLong
(
String
strDate
)
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
ParsePosition
pos
=
new
ParsePosition
(
0
);
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
80b7af2e
...
...
@@ -101,7 +101,7 @@ public class AttendanceTaskTiming{
//typeid:1-员工 2-考勤组
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0
33 9
* * ?")
// @Scheduled(cron = "0
6 17
* * ?")
@Scheduled
(
cron
=
"0 0 8,12,16,20 * * ?"
)
//每天上午8、12点,下午16点,20点 执行
public
void
AttendanceTask
()
throws
ParseException
{
...
...
@@ -289,8 +289,10 @@ public class AttendanceTaskTiming{
String
yemo
=
year
+
"-"
+
month
;
sdf1
.
setLenient
(
false
);
int
y
=
0
,
q
=
0
,
jj
=
0
;
//jj:节假日
int
y
=
0
,
q
=
0
,
jj
=
0
,
xx
=
0
;
//jj:节假日
String
[]
zdxx
=
new
String
[
31
];
//法定休息的具体天数(yyyy-MM-dd)
for
(
int
i
=
1
;
i
<=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
);
i
++){
boolean
xixi
=
true
;
Date
date1
=
sdf1
.
parse
(
yemo
+
"-"
+
i
);
for
(
int
u
=
0
;
u
<
week
.
length
;
u
++){
if
(
sdf2
.
format
(
date1
).
equals
(
week
[
u
])){
...
...
@@ -306,13 +308,26 @@ public class AttendanceTaskTiming{
jj
++;
}
}
xixi
=
false
;
}
}
if
(
xixi
)
{
zdxx
[
xx
]
=
yemo
+
"-"
+
i
;
xx
++;
}
}
if
(
appmaps
.
length
>
0
)
{
for
(
String
aa
:
ClockInTool
.
deleteArrayNull
(
zdxx
))
{
appmaps
=
ClockInTool
.
doChinFilters
(
ClockInTool
.
deleteArrayNull
(
appmaps
),
aa
);
}
}
//全月时间 - 应打卡时间 - 必须打卡时间 + 无需打卡时间
int
xiuxi
=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
)
-
q
-
bxdk
+
wxdk
.
size
()+
jj
;
int
xiuxi
=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
)
-
q
-
bxdk
+
appmaps
.
length
+
jj
;
//ClockInTool.getDaysByYearMonth(year,month) - q - bxdk + wxdk.size()+jj;
daysOff
=
xiuxi
;
daysOnDuty
=
y
+
bxdk
;
// String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期
...
...
@@ -322,6 +337,7 @@ public class AttendanceTaskTiming{
int
zj
=
6
;
int
fd
=
0
;
for
(
String
num
:
range
)
{
boolean
xxr
=
true
;
if
(
ClockInTool
.
useArrayUtils
(
needfig
,
String
.
valueOf
(
ClockInTool
.
dateToWeek
(
num
))))
{
//对比排班应打卡时间
String
[]
ycqtst
=
new
String
[
ycqts
.
length
+
zj
];
System
.
arraycopy
(
ycqts
,
0
,
ycqtst
,
0
,
ycqts
.
length
);
...
...
@@ -339,6 +355,7 @@ public class AttendanceTaskTiming{
//xxts[x] = num;
x
++;
xxr
=
false
;
}
if
(
ClockInTool
.
useArrayUtils
(
bxdkss
,
num
))
{
//检查是否存在 必须打卡名单中
String
[]
ycqtst
=
new
String
[
ycqts
.
length
+
zj
];
...
...
@@ -357,7 +374,10 @@ public class AttendanceTaskTiming{
// ycqts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
zjgzts
=
zjgzts
-
1
;
//防止休息日重复减
if
(
xxr
)
{
zjgzts
=
zjgzts
-
1
;
}
String
[]
xxtst
=
new
String
[
xxts
.
length
+
zj
];
System
.
arraycopy
(
xxts
,
0
,
xxtst
,
0
,
xxts
.
length
);
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
View file @
80b7af2e
...
...
@@ -93,7 +93,7 @@ public class LastMonthtimingExport {
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
// @Scheduled(cron = "0
25 9
* * ?")
// @Scheduled(cron = "0
48 16
* * ?")
@Scheduled
(
cron
=
"0 0 4,20 * * ?"
)
//每天上午4点,下午20点 执行
public
void
LastMonthtimingAttendanceTask
()
throws
ParseException
{
...
...
@@ -278,13 +278,16 @@ public class LastMonthtimingExport {
String
yemo
=
year
+
"-"
+
month
;
sdf1
.
setLenient
(
false
);
int
y
=
0
,
q
=
0
,
jj
=
0
;
//jj:节假日
int
y
=
0
,
q
=
0
,
jj
=
0
,
xx
=
0
;
//jj:节假日
String
[]
zdxx
=
new
String
[
31
];
//法定休息的具体天数(yyyy-MM-dd)
for
(
int
i
=
1
;
i
<=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
);
i
++){
boolean
xixi
=
true
;
Date
date1
=
sdf1
.
parse
(
yemo
+
"-"
+
i
);
for
(
int
u
=
0
;
u
<
week
.
length
;
u
++){
if
(
sdf2
.
format
(
date1
).
equals
(
week
[
u
])){
q
++;
y
++;
//无需打卡天数
if
(
Arrays
.
asList
(
appmaps
).
contains
(
String
.
valueOf
(
sdf1
.
format
(
date1
)))){
y
=
y
-
1
;
}
...
...
@@ -295,11 +298,26 @@ public class LastMonthtimingExport {
jj
++;
}
}
xixi
=
false
;
}
}
if
(
xixi
)
{
zdxx
[
xx
]
=
yemo
+
"-"
+
i
;
xx
++;
}
}
// System.out.println(zdxx);
if
(
appmaps
.
length
>
0
)
{
for
(
String
aa
:
ClockInTool
.
deleteArrayNull
(
zdxx
))
{
appmaps
=
ClockInTool
.
doChinFilters
(
ClockInTool
.
deleteArrayNull
(
appmaps
),
aa
);
}
}
//全月时间 - 应打卡时间 - 必须打卡时间 + 无需打卡时间
int
xiuxi
=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
)
-
q
-
bxdk
+
wxdk
.
size
()+
jj
;
int
xiuxi
=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
)
-
q
-
bxdk
+
appmaps
.
length
+
jj
;
//ClockInTool.getDaysByYearMonth(year,month) - q - bxdk +
wxdk.size()+jj;
daysOff
=
xiuxi
;
daysOnDuty
=
y
+
bxdk
;
// String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期
...
...
@@ -309,6 +327,7 @@ public class LastMonthtimingExport {
int
zj
=
6
;
int
fd
=
0
;
for
(
String
num
:
range
)
{
boolean
xxr
=
true
;
if
(
ClockInTool
.
useArrayUtils
(
needfig
,
String
.
valueOf
(
ClockInTool
.
dateToWeek
(
num
))))
{
//对比排班应打卡时间
String
[]
ycqtst
=
new
String
[
ycqts
.
length
+
zj
];
System
.
arraycopy
(
ycqts
,
0
,
ycqtst
,
0
,
ycqts
.
length
);
...
...
@@ -319,6 +338,7 @@ public class LastMonthtimingExport {
w
++;
zjgzts
++;
}
else
{
//休息日
String
[]
xxtst
=
new
String
[
xxts
.
length
+
zj
];
System
.
arraycopy
(
xxts
,
0
,
xxtst
,
0
,
xxts
.
length
);
xxtst
[
x
]
=
num
;
...
...
@@ -326,6 +346,8 @@ public class LastMonthtimingExport {
//xxts[x] = num;
x
++;
xxr
=
false
;
}
if
(
ClockInTool
.
useArrayUtils
(
bxdkss
,
num
))
{
//检查是否存在 必须打卡名单中
String
[]
ycqtst
=
new
String
[
ycqts
.
length
+
zj
];
...
...
@@ -341,7 +363,11 @@ public class LastMonthtimingExport {
if
(
ClockInTool
.
useArrayUtils
(
appmaps
,
num
))
{
//检查是否存在 无需打卡名单中
ycqts
=
ClockInTool
.
doChinFilters
(
ycqts
,
num
);
//为必须休息的话从上班日期中去除
// ycqts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
zjgzts
=
zjgzts
-
1
;
//防止休息日重复减
if
(
xxr
)
{
zjgzts
=
zjgzts
-
1
;
}
String
[]
xxtst
=
new
String
[
xxts
.
length
+
zj
];
System
.
arraycopy
(
xxts
,
0
,
xxtst
,
0
,
xxts
.
length
);
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/RealTimeUpdate.java
View file @
80b7af2e
...
...
@@ -266,8 +266,10 @@ public class RealTimeUpdate{
String
yemo
=
year
+
"-"
+
month
;
sdf1
.
setLenient
(
false
);
int
y
=
0
,
q
=
0
,
jj
=
0
;
//jj:节假日
int
y
=
0
,
q
=
0
,
jj
=
0
,
xx
=
0
;
//jj:节假日
String
[]
zdxx
=
new
String
[
31
];
//法定休息的具体天数(yyyy-MM-dd)
for
(
int
i
=
1
;
i
<=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
);
i
++){
boolean
xixi
=
true
;
Date
date1
=
sdf1
.
parse
(
yemo
+
"-"
+
i
);
for
(
int
u
=
0
;
u
<
week
.
length
;
u
++){
if
(
sdf2
.
format
(
date1
).
equals
(
week
[
u
])){
...
...
@@ -283,11 +285,23 @@ public class RealTimeUpdate{
jj
++;
}
}
xixi
=
false
;
}
}
if
(
xixi
)
{
zdxx
[
xx
]
=
yemo
+
"-"
+
i
;
xx
++;
}
}
if
(
appmaps
.
length
>
0
)
{
for
(
String
aa
:
ClockInTool
.
deleteArrayNull
(
zdxx
))
{
appmaps
=
ClockInTool
.
doChinFilters
(
ClockInTool
.
deleteArrayNull
(
appmaps
),
aa
);
}
}
//全月时间 - 应打卡时间 - 必须打卡时间 + 无需打卡时间
int
xiuxi
=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
)
-
q
-
bxdk
+
wxdk
.
size
()+
jj
;
int
xiuxi
=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
)
-
q
-
bxdk
+
appmaps
.
length
+
jj
;
//ClockInTool.getDaysByYearMonth(year,month) - q - bxdk +
wxdk.size()+jj;
daysOff
=
xiuxi
;
daysOnDuty
=
y
+
bxdk
;
// String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期
...
...
@@ -297,6 +311,7 @@ public class RealTimeUpdate{
int
zj
=
6
;
int
fd
=
0
;
for
(
String
num
:
range
)
{
boolean
xxr
=
true
;
if
(
Arrays
.
binarySearch
(
needfig
,
String
.
valueOf
(
ClockInTool
.
dateToWeek
(
num
)))
>=
0
)
{
//对比排班应打卡时间
String
[]
ycqtst
=
new
String
[
ycqts
.
length
+
zj
];
System
.
arraycopy
(
ycqts
,
0
,
ycqtst
,
0
,
ycqts
.
length
);
...
...
@@ -314,6 +329,8 @@ public class RealTimeUpdate{
//xxts[x] = num;
x
++;
xxr
=
false
;
}
if
(
Arrays
.
binarySearch
(
bxdkss
,
num
)
>=
0
)
{
//检查是否存在 必须打卡名单中
String
[]
ycqtst
=
new
String
[
ycqts
.
length
+
zj
];
...
...
@@ -329,7 +346,11 @@ public class RealTimeUpdate{
if
(
Arrays
.
binarySearch
(
appmaps
,
num
)
>=
0
)
{
//检查是否存在 无需打卡名单中
ycqts
=
ClockInTool
.
doChinFilters
(
ycqts
,
num
);
//为必须休息的话从上班日期中去除
// ycqts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
zjgzts
=
zjgzts
-
1
;
//防止休息日重复减
if
(
xxr
)
{
zjgzts
=
zjgzts
-
1
;
}
String
[]
xxtst
=
new
String
[
xxts
.
length
+
zj
];
System
.
arraycopy
(
xxts
,
0
,
xxtst
,
0
,
xxts
.
length
);
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
80b7af2e
...
...
@@ -29,6 +29,9 @@ import cn.hutool.core.util.NumberUtil;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.admin.AdminMenuTemplate
;
import
cn.timer.api.bean.qyzx.QyzxAdminColour
;
import
cn.timer.api.bean.qyzx.QyzxAdminMenu
;
import
cn.timer.api.bean.qyzx.QyzxAttaFwjsb
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
...
...
@@ -44,6 +47,7 @@ import cn.timer.api.config.annotation.CurrentUser;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.config.enums.SysRoleType
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.qyzx.QyzxEntInfoMMapper
;
...
...
@@ -57,6 +61,7 @@ import cn.timer.api.dto.qyzx.AdminListDto;
import
cn.timer.api.dto.qyzx.AttaFpglQueryDto
;
import
cn.timer.api.dto.qyzx.EntauthDto
;
import
cn.timer.api.dto.qyzx.LogBuyDto
;
import
cn.timer.api.dto.qyzx.MenuStructureDto
;
import
cn.timer.api.dto.qyzx.QyzxOperLogQuaryDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
...
...
@@ -246,13 +251,13 @@ public class QyzxController {
*/
/**
* 企业列表
*
当前用户
企业列表
*
* @param
* @return
*/
@GetMapping
(
value
=
"/entlist"
)
@ApiOperation
(
value
=
"企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
当前用户
企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxEntInfoM
>>
entlist1
(
@CurrentUser
UserBean
userBean
)
{
List
<
Object
>
orgCodes
=
qyzxEmpEntAssoMapper
.
selectObjs
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
()
...
...
@@ -263,6 +268,20 @@ public class QyzxController {
}
/**
* 所有企业列表
*
* @param
* @return
*/
@GetMapping
(
value
=
"/entlistAll"
)
@ApiOperation
(
value
=
"所有企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxEntInfoM
>>
entlistAll
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxEntInfoM
>
qyzxEntInfoMs
=
new
LambdaQueryChainWrapper
<
QyzxEntInfoM
>(
qyzxEntInfoMMapper
)
.
list
();
return
ResultUtil
.
data
(
qyzxEntInfoMs
,
"获取企业信息成功"
);
}
/**
* 切换企业
*
* @param org_num
...
...
@@ -494,6 +513,93 @@ public class QyzxController {
return
ResultUtil
.
data
(
pages
,
listOl
,
"操作成功!"
);
}
@PostMapping
(
value
=
"/menusequencedata"
)
@ApiOperation
(
value
=
"菜单顺序数据"
,
httpMethod
=
"POST"
,
notes
=
""
)
public
Result
<
Object
>
menusequencedata
(
@CurrentUser
UserBean
userBean
)
{
List
<
MenuStructureDto
>
mestrs
=
new
ArrayList
<
MenuStructureDto
>();
List
<
QyzxAdminMenu
>
qyme
=
QyzxAdminMenu
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
QyzxAdminMenu
>().
lambda
().
eq
(
QyzxAdminMenu:
:
getOrgCode
,
userBean
.
getOrgCode
()).
orderByAsc
(
QyzxAdminMenu:
:
getSortNumber
));
String
[]
zdy
=
new
String
[
qyme
.
size
()];
int
i
=
0
;
for
(
QyzxAdminMenu
me
:
qyme
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
me
.
getMenuCode
());
metr
.
setMenuName
(
me
.
getMenuName
());
metr
.
setSortNumber
(
me
.
getSortNumber
());
metr
.
setPath
(
""
);
mestrs
.
add
(
metr
);
zdy
[
i
]
=
me
.
getMenuCode
();
i
++;
}
//
List
<
AdminMenuTemplate
>
adtes
=
AdminMenuTemplate
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
AdminMenuTemplate
>().
lambda
().
eq
(
AdminMenuTemplate:
:
getEnable
,
1
).
orderByAsc
(
AdminMenuTemplate:
:
getSortNumber
));
for
(
AdminMenuTemplate
adm
:
adtes
)
{
if
(!
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull
(
zdy
),
adm
.
getMenuCode
()))
{
if
(
adm
.
getDistribution
()
==
0
&&
userBean
.
getOrgCode
()
==
3
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
adm
.
getMenuCode
());
metr
.
setMenuName
(
adm
.
getMenuName
());
metr
.
setSortNumber
(
adm
.
getSortNumber
());
metr
.
setPath
(
""
);
mestrs
.
add
(
metr
);
}
else
if
(
adm
.
getDistribution
()
==
1
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
adm
.
getMenuCode
());
metr
.
setMenuName
(
adm
.
getMenuName
());
metr
.
setSortNumber
(
adm
.
getSortNumber
());
metr
.
setPath
(
""
);
mestrs
.
add
(
metr
);
}
}
}
return
ResultUtil
.
data
(
mestrs
,
"成功"
);
}
@PostMapping
(
value
=
"/menustructure"
)
@ApiOperation
(
value
=
"菜单结构"
,
httpMethod
=
"POST"
,
notes
=
""
)
public
Result
<
Object
>
menustructure
(
@CurrentUser
UserBean
userBean
,
@RequestBody
List
<
QyzxAdminMenu
>
qymu
)
{
QyzxAdminMenu
.
builder
().
build
().
delete
(
new
QueryWrapper
<
QyzxAdminMenu
>().
lambda
().
eq
(
QyzxAdminMenu:
:
getOrgCode
,
userBean
.
getOrgCode
()));
for
(
QyzxAdminMenu
me
:
qymu
)
{
QyzxAdminMenu
meu
=
QyzxAdminMenu
.
builder
().
build
();
meu
.
setMenuCode
(
me
.
getMenuCode
());
meu
.
setMenuName
(
me
.
getMenuName
());
meu
.
setSortNumber
(
me
.
getSortNumber
());
meu
.
setOrgCode
(
userBean
.
getOrgCode
());
meu
.
setAddtime
(
new
Date
().
getTime
());
meu
.
insert
();
}
return
ResultUtil
.
data
(
qymu
,
"修改成功"
);
}
@PostMapping
(
value
=
"/corporatecolor"
)
@ApiOperation
(
value
=
"菜单自定义颜色"
,
httpMethod
=
"POST"
,
notes
=
""
)
public
Result
<
Object
>
corporatecolor
(
@CurrentUser
UserBean
userBean
)
{
QyzxAdminColour
cdys
=
QyzxAdminColour
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
QyzxAdminColour
>().
lambda
().
eq
(
QyzxAdminColour:
:
getOrgCode
,
userBean
.
getOrgCode
()));
return
ResultUtil
.
data
(
cdys
,
"查询成功"
);
}
@PostMapping
(
value
=
"/customcolor"
)
@ApiOperation
(
value
=
"菜单自定义颜色"
,
httpMethod
=
"POST"
,
notes
=
""
)
public
Result
<
Object
>
customcolor
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QyzxAdminColour
cdys
)
{
cdys
.
setOrgCode
(
userBean
.
getOrgCode
());
cdys
.
setAddtime
(
new
Date
().
getTime
());
cdys
.
insertOrUpdate
();
return
ResultUtil
.
data
(
cdys
,
"保存成功"
);
}
/**
* 删除-操作日志
...
...
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
80b7af2e
...
...
@@ -11,6 +11,8 @@ import javax.script.ScriptEngineManager;
import
javax.script.ScriptException
;
import
cn.timer.api.dto.xcgl.*
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
lombok.SneakyThrows
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -157,31 +159,31 @@ public class SalaryManagementController {
//考勤组
@
Autowired
@
Resource
private
AttendanceGroupMapper
attendancegroupservice
;
//打卡明细表
@
Autowired
@
Resource
private
PunchCardDetailsMapper
punchcarddetailsservice
;
//打卡记录
@
Autowired
@
Resource
private
PunchRecordMapper
punchrecordservice
;
@
Autowired
@
Resource
private
SpecialDateMapper
specialdateservice
;
//考勤周排班
@
Autowired
@
Resource
private
AttendanceWeeklySchMapper
attendanceweeklyschservice
;
//排班明细
@
Autowired
@
Resource
private
ScheduleMapper
scheduleservice
;
//专项附加扣除
@
Autowired
@
Resource
private
XcglAssoZxfjkcMapper
xcglassozxfjkcmapper
;
//工资条组内成员状态
@
Autowired
@
Resource
private
XcglAssoGztztMapper
xcglassogztztmapper
;
//工资条组-设置
@
Autowired
@
Resource
private
XcglAssoGztszMapper
xcglassogztszmapper
;
static
SimpleDateFormat
mat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
...
@@ -1453,20 +1455,20 @@ public class SalaryManagementController {
*/
@PostMapping
(
value
=
"/payimport"
)
@ApiOperation
(
value
=
"导入薪资"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
ImportSalaryData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ImportSalarySetDto
impor
)
{
ImportSalaryDto
[]
ims
=
impor
.
getImsalary
();
//
if
(
ims
.
length
>
0
){
for
(
int
p
=
0
;
p
<
ims
.
length
;
p
++){
public
Result
<
ImportDescriptionDto
>
ImportSalaryData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ImportSalarySetDto
impor
)
{
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
ImportSalaryDto
[]
ims
=
impor
.
getImsalary
();
//
if
(
ims
.
length
>
0
)
{
for
(
int
p
=
0
;
p
<
ims
.
length
;
p
++)
{
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
String
name
=
ims
[
0
].
getUsername
();
try
{
//用户工号来匹配入库
XcglAssoXzury
xzuryone
=
new
LambdaQueryChainWrapper
<
XcglAssoXzury
>(
xcglassoxzurymapper
).
eq
(
XcglAssoXzury:
:
getQyid
,
userBean
.
getOrgCode
())
.
eq
(
XcglAssoXzury:
:
getXzzid
,
impor
.
getGid
()).
eq
(
XcglAssoXzury:
:
getUserid
,
ims
[
p
].
getUsernum
()).
one
();
//用户名称来匹配入库
// XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),ims[p].getUsername(),String.valueOf(userBean.getOrgCode()));
int
k
=
0
;
if
(
xzuryone
!=
null
)
{
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
();
xzb
.
setUserid
(
xzuryone
.
getUserid
());
//
...
...
@@ -1475,21 +1477,24 @@ public class SalaryManagementController {
xzb
.
setXzxjg
(
ims
[
p
].
getSrz
());
//
xzb
.
setQyid
(
userBean
.
getOrgCode
());
xcglassoxzbmapper
.
ModifyImportedSalary
(
xzb
);
k
++;
toupdate
++;
}
// if(yhmpp != null && k == 0) {
// XcglAssoXzb xzb = XcglAssoXzb.builder().build();
// xzb.setUserid(yhmpp.getUserid());//
// xzb.setXzyf(impor.getSxrq());//
// xzb.setXzxid(ims[p].getJsgzzx());//
// xzb.setXzxjg(Double.valueOf(ims[p].getSrz()));//
// xzb.setQyid(userBean.getOrgCode());
// xcglassoxzbmapper.ModifyImportedSalary(xzb);
// }
}
catch
(
Exception
e
)
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
}
finally
{
reasons
.
add
(
map
);
}
}
return
new
ResponseResult
().
success
(
"导入成功"
);
}
ImportDescriptionDto
imds
=
new
ImportDescriptionDto
();
imds
.
setSuccess
(
toinsert
+
toupdate
);
//成功
imds
.
setToinsert
(
toinsert
);
imds
.
setToupdate
(
toupdate
);
//更新
imds
.
setFailure
(
failure
);
//失败
imds
.
setReasons
(
reasons
);
return
ResultUtil
.
data
(
imds
,
"导入成功"
);
}
@PostMapping
(
value
=
"/determinesalaryrules"
)
...
...
@@ -2207,12 +2212,12 @@ public class SalaryManagementController {
taxmonth
=
SalaryTool
.
getfirstnextMo
(
salary_month
+
"-01 00:00:00"
);
}
gsmx
.
setTaxMonth
(
taxmonth
);
//税款所属月份
gsmx
.
setCumZljy
(
zxf
==
null
?
0
:
zxf
.
getChildrenedu
(
));
//累计子女教育
gsmx
.
setCumZfdklx
(
zxf
==
null
?
0
:
zxf
.
getHouseloans
(
));
//累计住房贷款利息
gsmx
.
setCumZfzj
(
zxf
==
null
?
0
:
zxf
.
getHouserents
(
));
//累计住房租金
gsmx
.
setCumSylr
(
zxf
==
null
?
0
:
zxf
.
getSupportolder
(
));
//累计赡养老人
gsmx
.
setCumJxjy
(
zxf
==
null
?
0
:
zxf
.
getContinueedu
(
));
//累计继续教育
gsmx
.
setCumZxfjkc
(
zxf
==
null
?
0
:
zxf
.
getTotalmoney
(
));
//累计专项附加扣除
gsmx
.
setCumZljy
(
zxf
==
null
?
0
:
(
zxf
.
getChildrenedu
()
==
null
?
0
:
zxf
.
getChildrenedu
()
));
//累计子女教育
gsmx
.
setCumZfdklx
(
zxf
==
null
?
0
:
(
zxf
.
getHouseloans
()
==
null
?
0
:
zxf
.
getHouseloans
()
));
//累计住房贷款利息
gsmx
.
setCumZfzj
(
zxf
==
null
?
0
:
(
zxf
.
getHouserents
()
==
null
?
0
:
zxf
.
getHouserents
()
));
//累计住房租金
gsmx
.
setCumSylr
(
zxf
==
null
?
0
:
(
zxf
.
getSupportolder
()
==
null
?
0
:
zxf
.
getSupportolder
()
));
//累计赡养老人
gsmx
.
setCumJxjy
(
zxf
==
null
?
0
:
(
zxf
.
getContinueedu
()
==
null
?
0
:
zxf
.
getContinueedu
()
));
//累计继续教育
gsmx
.
setCumZxfjkc
(
zxf
==
null
?
0
:
(
zxf
.
getTotalmoney
()
==
null
?
0
:
zxf
.
getTotalmoney
()
));
//累计专项附加扣除
gsmx
.
setTaxType
(
"工资薪金所得"
);
//计税类型
gsmx
.
setCurrentIncome
(
wages_payable
);
//本期收入 【应发工资】
SbgjjAssoYjzd
cuspde
=
sbgjjassoyjzdmapper
.
IndividualTotalsbgjj
(
gsus
,
orgcode
,
salary_month
);
...
...
@@ -3191,81 +3196,100 @@ public class SalaryManagementController {
*/
@PostMapping
(
value
=
"/import_special_additional_deduction"
)
@ApiOperation
(
value
=
"导入专项附加扣除"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
JSONObject
>
importSpecialAdditionalDeduction
(
@CurrentUser
UserBean
userBean
,
public
Result
<
ImportDescriptionDto
>
importSpecialAdditionalDeduction
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ValidList
<
SpecialDeductionDto
>
specialdeductiondto
)
throws
Exception
{
Integer
orgCode
=
userBean
.
getOrgCode
();
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
for
(
SpecialDeductionDto
spec
:
specialdeductiondto
)
{
String
name
=
spec
.
getName
();
String
phone
=
spec
.
getPhone
();
String
date
=
spec
.
getDate
();
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
name
)
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
XcglAssoZxfjkc
xcg
=
XcglAssoZxfjkc
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoZxfjkc
>().
lambda
().
eq
(
XcglAssoZxfjkc:
:
getTaxmonth
,
date
)
.
eq
(
XcglAssoZxfjkc:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
XcglAssoZxfjkc:
:
getUserid
,
ygl
.
getEmpNum
()));
if
(
xcg
==
null
)
{
XcglAssoZxfjkc
xcglas
=
XcglAssoZxfjkc
.
builder
().
build
();
xcglas
.
setUserid
(
ygl
.
getEmpNum
());
xcglas
.
setTaxmonth
(
date
);
xcglas
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
xcglas
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
xcglas
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
xcglas
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
xcglas
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
xcglas
.
setTotalmoney
(
result
);
//累计专项附加扣除
xcglas
.
setQyid
(
userBean
.
getOrgCode
());
xcglas
.
setAddtime
(
new
Date
().
getTime
());
xcglassozxfjkcmapper
.
insertXcglAssoZxfjkc
(
xcglas
);
}
else
{
XcglAssoZxfjkc
fjkc
=
XcglAssoZxfjkc
.
builder
().
build
();
fjkc
.
setId
(
xcg
.
getId
());
fjkc
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
fjkc
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
fjkc
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
fjkc
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
fjkc
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
fjkc
.
setTotalmoney
(
Double
.
valueOf
(
result
));
//累计专项附加扣除
xcglassozxfjkcmapper
.
updateXcglAssoZxfjkc
(
fjkc
);
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
try
{
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
name
)
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
XcglAssoZxfjkc
xcg
=
XcglAssoZxfjkc
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoZxfjkc
>().
lambda
().
eq
(
XcglAssoZxfjkc:
:
getTaxmonth
,
date
)
.
eq
(
XcglAssoZxfjkc:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
XcglAssoZxfjkc:
:
getUserid
,
ygl
.
getEmpNum
()));
if
(
xcg
==
null
)
{
XcglAssoZxfjkc
xcglas
=
XcglAssoZxfjkc
.
builder
().
build
();
xcglas
.
setUserid
(
ygl
.
getEmpNum
());
xcglas
.
setTaxmonth
(
date
);
xcglas
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
xcglas
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
xcglas
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
xcglas
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
xcglas
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
xcglas
.
setTotalmoney
(
result
);
//累计专项附加扣除
xcglas
.
setQyid
(
userBean
.
getOrgCode
());
xcglas
.
setAddtime
(
new
Date
().
getTime
());
xcglassozxfjkcmapper
.
insertXcglAssoZxfjkc
(
xcglas
);
toinsert
++;
}
else
{
XcglAssoZxfjkc
fjkc
=
XcglAssoZxfjkc
.
builder
().
build
();
fjkc
.
setId
(
xcg
.
getId
());
fjkc
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
fjkc
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
fjkc
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
fjkc
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
fjkc
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
fjkc
.
setTotalmoney
(
Double
.
valueOf
(
result
));
//累计专项附加扣除
xcglassozxfjkcmapper
.
updateXcglAssoZxfjkc
(
fjkc
);
toupdate
++;
}
}
catch
(
Exception
e
)
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
}
finally
{
reasons
.
add
(
map
);
}
}
return
ResultUtil
.
success
(
"成功"
);
ImportDescriptionDto
imds
=
new
ImportDescriptionDto
();
imds
.
setSuccess
(
toinsert
+
toupdate
);
//成功
imds
.
setToinsert
(
toinsert
);
imds
.
setToupdate
(
toupdate
);
//更新
imds
.
setFailure
(
failure
);
//失败
imds
.
setReasons
(
reasons
);
return
ResultUtil
.
data
(
imds
,
"成功"
);
}
...
...
@@ -3280,29 +3304,25 @@ public class SalaryManagementController {
Integer
orgCode
=
userBean
.
getOrgCode
();
int
success
=
0
;
//成功
int
failure
=
0
;
//失败
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
String
[]
names
=
new
String
[
individualtaxdetailsdto
.
size
()];
int
i
=
0
;
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
for
(
IndividualTaxDetailsDto
indv
:
individualtaxdetailsdto
)
{
XcglAssoBszqsz
bssz
=
XcglAssoBszqsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoBszqsz
>().
lambda
().
eq
(
XcglAssoBszqsz:
:
getQyid
,
orgCode
));
String
taxmonth
=
""
;
if
(
bssz
.
getTaxReturnCycle
().
equals
(
1
))
{
taxmonth
=
indv
.
getTaxMonth
();
}
else
{
taxmonth
=
SalaryTool
.
getfirstnextMo
(
indv
.
getTaxMonth
()+
"-01 00:00:00"
);
}
String
name
=
indv
.
getUserName
();
String
userName
=
indv
.
getUserName
();
String
phone
=
indv
.
getPhone
();
String
date
=
indv
.
getSalaryMonth
();
//薪资月
String
date
=
indv
.
getSalaryMonth
();
//薪资月
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
try
{
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
name
)
XcglAssoBszqsz
bssz
=
XcglAssoBszqsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoBszqsz
>().
lambda
().
eq
(
XcglAssoBszqsz:
:
getQyid
,
orgCode
));
String
taxmonth
=
""
;
if
(
bssz
.
getTaxReturnCycle
().
equals
(
1
))
{
taxmonth
=
indv
.
getTaxMonth
();
}
else
{
taxmonth
=
SalaryTool
.
getfirstnextMo
(
indv
.
getTaxMonth
()+
"-01 00:00:00"
);
}
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
userName
)
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
if
(
ygl
!=
null
)
{
...
...
@@ -3337,7 +3357,7 @@ public class SalaryManagementController {
gsgs
.
setCumYbtse
(
indv
.
getCumYbtse
()
==
null
?
null
:
Double
.
valueOf
(
indv
.
getCumYbtse
()));
gsgs
.
setQyid
(
ygl
.
getOrgCode
());
gsgs
.
insert
();
success
++;
toinsert
++;
}
else
{
XcglAssoGsjsmx
gsgs
=
XcglAssoGsjsmx
.
builder
().
build
();
gsgs
.
setUserNum
(
String
.
valueOf
(
ygl
.
getEmpNum
()));
...
...
@@ -3371,27 +3391,26 @@ public class SalaryManagementController {
}
}
else
{
failure
++;
int
j
=
5
/
0
;
map
.
put
(
"name"
,
userName
);
map
.
put
(
"msg"
,
"员工不存在"
);
}
}
catch
(
Exception
e
)
{
// e.printStackTrace();
names
[
i
]
=
indv
.
getUserName
();
i
++;
failure
++;
map
.
put
(
"name"
,
userName
);
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
}
finally
{
reasons
.
add
(
map
);
}
}
ImportDescriptionDto
imds
=
new
ImportDescriptionDto
();
imds
.
setSuccess
(
success
);
//成功
imds
.
set
Failure
(
failure
);
//失败
imds
.
setSuccess
(
toinsert
+
toupdate
);
//成功
imds
.
set
Toinsert
(
toinsert
);
imds
.
setToupdate
(
toupdate
);
//更新
imds
.
setNames
(
ClockInTool
.
deleteArrayNull
(
names
));
return
ResultUtil
.
data
(
imds
,
"编辑员工权限成功"
);
imds
.
setFailure
(
failure
);
//失败
imds
.
setReasons
(
reasons
);
// return ResultUtil.success("成功
");
return
ResultUtil
.
data
(
imds
,
"导入个税明细
"
);
}
...
...
@@ -3768,54 +3787,12 @@ public class SalaryManagementController {
}
spe
.
setDetailed
(
detailed
);
}
specific
.
add
(
spe
);
}
top
.
setSpecific
(
specific
);
}
}
return
ResultUtil
.
data
(
top
,
"操作成功!"
);
}
}
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
80b7af2e
...
...
@@ -253,7 +253,7 @@ public class YgglController {
String
phone
=
addygdaDto
.
getPhone
();
Integer
zjType
=
addygdaDto
.
getZjType
();
String
zjNum
=
addygdaDto
.
getZjNum
();
int
attgroupid
=
addygdaDto
.
getAttgroupid
();
//考勤组id
Integer
attgroupid
=
addygdaDto
.
getAttgroupid
();
//考勤组id
boolean
isvalid
=
true
;
switch
(
zjType
)
{
case
0
:
...
...
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
80b7af2e
...
...
@@ -34,6 +34,8 @@ import cn.hutool.core.lang.tree.TreeUtil;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.admin.AdminMenuTemplate
;
import
cn.timer.api.bean.qyzx.QyzxAdminMenu
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
...
...
@@ -42,12 +44,14 @@ import cn.timer.api.bean.zzgl.ZzglPostMenu;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enuminterface.YgEnumInterface
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dao.zzgl.ZzglLogDgjlMapper
;
import
cn.timer.api.dao.zzgl.ZzglMenuMapper
;
import
cn.timer.api.dao.zzgl.ZzglPostMenuMapper
;
import
cn.timer.api.dto.qyzx.MenuStructureDto
;
import
cn.timer.api.dto.zzgl.DepartmentStaffDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsQueryDto
;
...
...
@@ -412,7 +416,75 @@ public class ZzglController {
wp
.
select
(
ZzglAuth:
:
getMenuId
,
ZzglAuth:
:
getBmgwId
).
eq
(
ZzglAuth:
:
getOrgCode
,
orgCode
)
.
and
(
i
->
i
.
in
(
ZzglAuth:
:
getBmgwId
,
list
.
toArray
()));
List
<
ZzglAuth
>
zas
=
ZzglAuth
.
builder
().
build
().
selectList
(
wp
);
return
ResultUtil
.
data
(
zas
);
List
<
MenuStructureDto
>
mestrs
=
new
ArrayList
<
MenuStructureDto
>();
List
<
QyzxAdminMenu
>
qyme
=
QyzxAdminMenu
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
QyzxAdminMenu
>().
lambda
().
eq
(
QyzxAdminMenu:
:
getOrgCode
,
userBean
.
getOrgCode
()).
orderByAsc
(
QyzxAdminMenu:
:
getSortNumber
));
String
[]
zdy
=
new
String
[
qyme
.
size
()];
int
i
=
0
;
for
(
QyzxAdminMenu
me
:
qyme
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
me
.
getMenuCode
());
metr
.
setMenuName
(
me
.
getMenuName
());
metr
.
setSortNumber
(
me
.
getSortNumber
());
AdminMenuTemplate
adte
=
AdminMenuTemplate
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
AdminMenuTemplate
>().
lambda
().
eq
(
AdminMenuTemplate:
:
getMenuCode
,
me
.
getMenuCode
()));
metr
.
setPath
(
adte
.
getPath
());
mestrs
.
add
(
metr
);
zdy
[
i
]
=
me
.
getMenuCode
();
i
++;
}
//
List
<
AdminMenuTemplate
>
adtes
=
AdminMenuTemplate
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
AdminMenuTemplate
>().
lambda
().
eq
(
AdminMenuTemplate:
:
getEnable
,
1
).
orderByAsc
(
AdminMenuTemplate:
:
getSortNumber
));
for
(
AdminMenuTemplate
adm
:
adtes
)
{
if
(!
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull
(
zdy
),
adm
.
getMenuCode
()))
{
if
(
adm
.
getDistribution
()
==
0
&&
userBean
.
getOrgCode
()
==
3
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
adm
.
getMenuCode
());
metr
.
setMenuName
(
adm
.
getMenuName
());
metr
.
setSortNumber
(
adm
.
getSortNumber
());
metr
.
setPath
(
adm
.
getPath
());
mestrs
.
add
(
metr
);
}
else
if
(
adm
.
getDistribution
()
==
1
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
adm
.
getMenuCode
());
metr
.
setMenuName
(
adm
.
getMenuName
());
metr
.
setSortNumber
(
adm
.
getSortNumber
());
metr
.
setPath
(
adm
.
getPath
());
mestrs
.
add
(
metr
);
}
}
}
List
<
ZzglAuth
>
zas_
=
new
ArrayList
<
ZzglAuth
>();
String
[]
qhf
=
new
String
[
mestrs
.
size
()];
int
y
=
0
;
for
(
MenuStructureDto
metu
:
mestrs
)
{
ZzglAuth
zd
=
ZzglAuth
.
builder
().
build
();
for
(
ZzglAuth
zg
:
zas
)
{
if
(
metu
.
getPath
().
equals
(
zg
.
getMenuId
()))
{
zd
.
setBmgwId
(
zg
.
getBmgwId
());
zd
.
setMenuId
(
zg
.
getMenuId
());
zas_
.
add
(
zd
);
qhf
[
y
]
=
zg
.
getMenuId
();
y
++;
break
;
}
}
}
for
(
ZzglAuth
zg
:
zas
)
{
if
(!
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull2
(
qhf
),
zg
.
getMenuId
()))
{
ZzglAuth
zd
=
ZzglAuth
.
builder
().
build
();
zd
.
setBmgwId
(
zg
.
getBmgwId
());
zd
.
setMenuId
(
zg
.
getMenuId
());
zas_
.
add
(
zd
);
}
}
return
ResultUtil
.
data
(
zas_
);
}
}
...
...
src/main/java/cn/timer/api/dao/admin/AdminAssoTxjlbMapper.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
dao
.
admin
;
import
cn.timer.api.dto.htzz.QueryNoReadingDto
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.admin.AdminAssoTxjlb
;
import
java.util.List
;
/**
* 系统消息记录
*
* @author LAL 2020-11-09
*/
@Repository
public
interface
AdminAssoTxjlbMapper
extends
BaseMapper
<
AdminAssoTxjlb
>
{
/**
* 分页查询总数
* @param param
* @return
*/
Long
pageTxjlbCount
(
@Param
(
"param"
)
QueryNoReadingDto
param
);
/**
* 分页查询
* @param param
* @return
*/
List
<
AdminAssoTxjlb
>
pageTxjlb
(
@Param
(
"param"
)
QueryNoReadingDto
param
);
}
src/main/java/cn/timer/api/dao/admin/AdminMenuTemplateMapper.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
dao
.
admin
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.admin.AdminMenuTemplate
;
/**
* 企业菜单配置
* @author LAL 2020-11-12
*/
@Repository
public
interface
AdminMenuTemplateMapper
extends
BaseMapper
<
AdminMenuTemplate
>
{
}
src/main/java/cn/timer/api/dao/admin/AdminMsgTemplateMapper.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
dao
.
admin
;
import
cn.timer.api.dto.admin.AdminMsgTemplateDto
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.admin.AdminMsgTemplate
;
import
java.util.List
;
/**
* 消息模板
*
* @author LAL 2020-11-09
*/
@Repository
public
interface
AdminMsgTemplateMapper
extends
BaseMapper
<
AdminMsgTemplate
>
{
/**
* 根据参数获取模板
* @param param
* @return
*/
AdminMsgTemplate
getByParams
(
@Param
(
"param"
)
AdminMsgTemplateDto
param
);
/**
* 列出企业可选择的消息模板
* @param param
* @return
*/
List
<
AdminMsgTemplate
>
listMsgTemplate
(
@Param
(
"param"
)
AdminMsgTemplateDto
param
);
/**
* 分页查询总数
* @param param
* @return
*/
Long
pageMsgTemplateCount
(
@Param
(
"param"
)
AdminMsgTemplateDto
param
);
/**
* 分页查询
* @param param
* @return
*/
List
<
AdminMsgTemplate
>
pageMsgTemplate
(
@Param
(
"param"
)
AdminMsgTemplateDto
param
);
}
src/main/java/cn/timer/api/dao/qyzx/QyzxAdminColourMapper.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
dao
.
qyzx
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.qyzx.QyzxAdminColour
;
/**
* 企业自定义颜色
* @author LAL 2020-11-17
*/
@Repository
public
interface
QyzxAdminColourMapper
extends
BaseMapper
<
QyzxAdminColour
>
{
}
src/main/java/cn/timer/api/dao/qyzx/QyzxAdminMenuMapper.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
dao
.
qyzx
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.qyzx.QyzxAdminMenu
;
/**
* 企业自定义菜单
*
* @author LAL 2020-11-12
*/
@Repository
public
interface
QyzxAdminMenuMapper
extends
BaseMapper
<
QyzxAdminMenu
>
{
}
src/main/java/cn/timer/api/dto/admin/AdminMsgTemplateDto.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
dto
.
admin
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
AdminMsgTemplateDto
extends
Page
implements
Serializable
{
@ApiModelProperty
(
value
=
"模板名称 "
,
example
=
"模板名称"
)
private
String
templateName
;
@ApiModelProperty
(
value
=
"对应平台模板编号 "
,
example
=
"对应平台模板编号"
)
private
String
platformNum
;
@ApiModelProperty
(
value
=
"平台类型 1 阿里云"
,
example
=
"101"
)
private
Integer
platformType
;
@ApiModelProperty
(
value
=
"类型 1 合同到期提醒, 2 证照到期提醒"
,
example
=
"101"
)
private
Integer
msgType
;
@ApiModelProperty
(
value
=
"状态 0 启用 1 停用"
,
example
=
"101"
)
private
Integer
state
;
@ApiModelProperty
(
value
=
"0 系统默认(公共模板), 1 企业定制"
,
example
=
"0"
)
private
Integer
sysDefault
;
@ApiModelProperty
(
value
=
"企业ID 企业ID"
,
example
=
"101"
)
private
Integer
orgCode
;
}
src/main/java/cn/timer/api/dto/htzz/HtzzQueryDto.java
View file @
80b7af2e
...
...
@@ -23,5 +23,8 @@ public class HtzzQueryDto extends Page implements Serializable{
@ApiModelProperty
(
value
=
"名称、型号、供应商"
,
example
=
"张三"
)
private
String
query
;
@ApiModelProperty
(
value
=
"1:合同;2:证照"
,
example
=
"1"
)
private
Integer
documentType
;
}
src/main/java/cn/timer/api/dto/htzz/NotifyPersonDto.java
0 → 100644
View file @
80b7af2e
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
empName
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"101"
)
private
Integer
empNum
;
@ApiModelProperty
(
value
=
"电话"
,
example
=
""
)
private
String
phone
;
}
src/main/java/cn/timer/api/dto/htzz/QueryNoReadingDto.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
dto
.
htzz
;
import
cn.timer.api.utils.Page
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
QueryNoReadingDto
extends
Page
implements
Serializable
{
private
String
text
;
private
Integer
empNum
;
private
Integer
txType
;
private
Integer
txstate
;
private
Integer
orgCode
;
}
src/main/java/cn/timer/api/dto/htzz/ReminderObjectDto.java
0 → 100644
View file @
80b7af2e
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
;
}
src/main/java/cn/timer/api/dto/qyzx/MenuStructureDto.java
0 → 100644
View file @
80b7af2e
package
cn
.
timer
.
api
.
dto
.
qyzx
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
MenuStructureDto
{
private
String
menuCode
;
private
String
menuName
;
private
Integer
sortNumber
;
private
String
path
;
}
src/main/java/cn/timer/api/dto/xcgl/ImportDescriptionDto.java
View file @
80b7af2e
...
...
@@ -4,13 +4,31 @@ import lombok.AllArgsConstructor;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
import
java.util.Map
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
ImportDescriptionDto
{
int
success
=
0
;
//成功
int
failure
=
0
;
//失败
int
toupdate
=
0
;
//更新
String
[]
names
;
/**
* 成功(包含新增和更新)
*/
int
success
=
0
;
/**
* 成功新增
*/
int
toinsert
=
0
;
/**
* 成功更新
*/
int
toupdate
=
0
;
/**
* 失败
*/
int
failure
=
0
;
/**
* 失败原因
*/
List
<
Map
<
String
,
String
>>
reasons
;
}
src/main/resources/mapping/admin/AdminAssoTxjlbMapper.xml
0 → 100644
View file @
80b7af2e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.admin.AdminAssoTxjlbMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.admin.AdminAssoTxjlb"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"content"
property=
"content"
/>
<result
column=
"user_name"
property=
"userName"
/>
<result
column=
"emp_num"
property=
"empNum"
/>
<result
column=
"tx_type"
property=
"txType"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"addtime"
property=
"addtime"
/>
<result
column=
"txstate"
property=
"txstate"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
content,
user_name,
emp_num,
tx_type,
org_code,
addtime,
txstate
</sql>
<!-- 分页查询 -->
<sql
id=
"pageTxjlbCondition"
>
<where>
<if
test=
"param.text != null and param.text !=''"
>
and (txjlb.user_name like CONCAT('%',#{param.text},'%') or txjlb.emp_num = #{param.text})
</if>
<if
test=
"param.txType != null"
>
and txjlb.tx_type = #{param.txType}
</if>
<if
test=
"param.txstate != null"
>
and txjlb.txstate = #{param.txstate}
</if>
<if
test=
"param.empNum != null"
>
and txjlb.emp_num = #{param.empNum}
</if>
<if
test=
"param.orgCode != null"
>
and txjlb.org_code = #{param.orgCode}
</if>
</where>
</sql>
<select
id=
"pageTxjlbCount"
resultType=
"java.lang.Long"
>
SELECT count(*) FROM admin_asso_txjlb txjlb
<include
refid=
"pageTxjlbCondition"
/>
</select>
<select
id=
"pageTxjlb"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM admin_asso_txjlb txjlb
<include
refid=
"pageTxjlbCondition"
/>
ORDER BY txjlb.txstate ASC
LIMIT #{param.offset}, #{param.totalPage}
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapping/admin/AdminMenuTemplateMapper.xml
0 → 100644
View file @
80b7af2e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.admin.AdminMenuTemplateMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.admin.AdminMenuTemplate"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"parentid"
property=
"parentid"
/>
<result
column=
"menu_code"
property=
"menuCode"
/>
<result
column=
"menu_name"
property=
"menuName"
/>
<result
column=
"sort_number"
property=
"sortNumber"
/>
<result
column=
"path"
property=
"path"
/>
<result
column=
"enable"
property=
"enable"
/>
<result
column=
"distribution"
property=
"distribution"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
parentid,
menu_code,
menu_name,
sort_number,
path,
enable,
distribution
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id AdminMenuTemplate_id,
parentId AdminMenuTemplate_parentid,
menu_code AdminMenuTemplate_menu_code,
menu_name AdminMenuTemplate_menu_name,
sort_number AdminMenuTemplate_sort_number,
path AdminMenuTemplate_path,
enable AdminMenuTemplate_enable,
distribution AdminMenuTemplate_distribution
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.admin.AdminMenuTemplate">
INSERT INTO admin_menu_template
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != parentId'>
parentId,
</if>
<if test ='null != menuCode'>
menu_code,
</if>
<if test ='null != menuName'>
menu_name,
</if>
<if test ='null != sortNumber'>
sort_number,
</if>
<if test ='null != path'>
path,
</if>
<if test ='null != enable'>
enable,
</if>
<if test ='null != distribution'>
distribution
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != parentId'>
#{parentId},
</if>
<if test ='null != menuCode'>
#{menuCode},
</if>
<if test ='null != menuName'>
#{menuName},
</if>
<if test ='null != sortNumber'>
#{sortNumber},
</if>
<if test ='null != path'>
#{path},
</if>
<if test ='null != enable'>
#{enable},
</if>
<if test ='null != distribution'>
#{distribution}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM admin_menu_template
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.admin.AdminMenuTemplate">
UPDATE admin_menu_template
<set>
<if test ='null != parentId'>parentId = #{parentId},</if>
<if test ='null != menuCode'>menu_code = #{menuCode},</if>
<if test ='null != menuName'>menu_name = #{menuName},</if>
<if test ='null != sortNumber'>sort_number = #{sortNumber},</if>
<if test ='null != path'>path = #{path},</if>
<if test ='null != enable'>enable = #{enable},</if>
<if test ='null != distribution'>distribution = #{distribution}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM admin_menu_template
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM admin_menu_template
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM admin_menu_template
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/admin/AdminMsgTemplateMapper.xml
0 → 100644
View file @
80b7af2e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.admin.AdminMsgTemplateMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.admin.AdminMsgTemplate"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"template_name"
property=
"templateName"
/>
<result
column=
"platform_num"
property=
"platformNum"
/>
<result
column=
"platform_type"
property=
"platformType"
/>
<result
column=
"content"
property=
"content"
/>
<result
column=
"msg_type"
property=
"msgType"
/>
<result
column=
"state"
property=
"state"
/>
<result
column=
"addtime"
property=
"addtime"
/>
<result
column=
"sys_default"
property=
"sysDefault"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
template_name,
platform_num,
platform_type,
content,
msg_type,
state,
addtime,
sys_default,
org_code
</sql>
<select
id=
"getByParams"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM admin_msg_template temp
<where>
<if
test=
"param.templateName != null and param.templateName !=''"
>
and temp.template_name like CONCAT('%',#{param.templateName},'%')
</if>
<if
test=
"param.platformNum != null"
>
and temp.platform_num = #{param.platformNum}
</if>
<if
test=
"param.platformType != null"
>
and temp.platform_type = #{param.platformType}
</if>
<if
test=
"param.msgType != null"
>
and temp.msg_type = #{param.msgType}
</if>
<if
test=
"param.state != null"
>
and temp.state = #{param.state}
</if>
<if
test=
"param.sysDefault != null"
>
and temp.sys_default = #{param.sysDefault}
</if>
<if
test=
"param.orgCode != null"
>
and temp.org_code = #{param.orgCode}
</if>
</where>
</select>
<!-- 列出企业可选择的消息模板 -->
<sql
id=
"listMsgTemplateCondition"
>
<if
test=
"param.templateName != null and param.templateName !=''"
>
and temp.template_name like CONCAT('%',#{param.templateName},'%')
</if>
<if
test=
"param.platformType != null"
>
and temp.platform_type = #{param.platformType}
</if>
<if
test=
"param.msgType != null"
>
and temp.msg_type = #{param.msgType}
</if>
<if
test=
"param.state != null"
>
and temp.state = #{param.state}
</if>
</sql>
<select
id=
"listMsgTemplate"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM admin_msg_template temp
WHERE temp.sys_default = 0
<include
refid=
"listMsgTemplateCondition"
/>
UNION ALL
SELECT
<include
refid=
"Base_Column_List"
/>
FROM admin_msg_template temp
WHERE temp.sys_default = 1 AND temp.org_code = #{param.orgCode}
<include
refid=
"listMsgTemplateCondition"
/>
</select>
<!-- 分页查询 -->
<sql
id=
"pageMsgTemplateCondition"
>
<where>
<if
test=
"param.templateName != null and param.templateName !=''"
>
and temp.template_name like CONCAT('%',#{param.templateName},'%')
</if>
<if
test=
"param.platformType != null"
>
and temp.platform_type = #{param.platformType}
</if>
<if
test=
"param.msgType != null"
>
and temp.msg_type = #{param.msgType}
</if>
<if
test=
"param.state != null"
>
and temp.state = #{param.state}
</if>
<if
test=
"param.sysDefault != null"
>
and temp.sys_default = #{param.sysDefault}
</if>
<if
test=
"param.orgCode != null"
>
and temp.org_code = #{param.orgCode}
</if>
</where>
</sql>
<select
id=
"pageMsgTemplateCount"
resultType=
"java.lang.Long"
>
SELECT count(*) FROM admin_msg_template temp
<include
refid=
"pageMsgTemplateCondition"
/>
</select>
<select
id=
"pageMsgTemplate"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM admin_msg_template temp
<include
refid=
"pageMsgTemplateCondition"
/>
LIMIT #{param.offset}, #{param.totalPage}
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapping/htzz/HtzzAdminZzdaMapper.xml
0 → 100644
View file @
80b7af2e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.htzz.HtzzAdminZzdaMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.htzz.HtzzAdminZzda"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"czrdh"
property=
"czrdh"
/>
<result
column=
"czry"
property=
"czry"
/>
<result
column=
"fzjg"
property=
"fzjg"
/>
<result
column=
"fzrq"
property=
"fzrq"
/>
<result
column=
"lrrid"
property=
"lrrid"
/>
<result
column=
"lrsj_time"
property=
"lrsjTime"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"txkg_type"
property=
"txkgType"
/>
<result
column=
"yxdqr"
property=
"yxdqr"
/>
<result
column=
"yxksr"
property=
"yxksr"
/>
<result
column=
"zjbh"
property=
"zjbh"
/>
<result
column=
"zjfj"
property=
"zjfj"
/>
<result
column=
"zjmc"
property=
"zjmc"
/>
<result
column=
"is_delete"
property=
"isDelete"
/>
<result
column=
"template_id"
property=
"templateId"
/>
<result
column=
"sending_status"
property=
"sendingStatus"
/>
<result
column=
"document_type"
property=
"documentType"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
czrdh,
czry,
fzjg,
fzrq,
lrrid,
lrsj_time,
org_code,
txkg_type,
yxdqr,
yxksr,
zjbh,
zjfj,
zjmc,
is_delete,
template_id,
sending_status,
document_type
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.htzz.HtzzAdminZzda">
INSERT INTO htzz_admin_zzda
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != czrdh'>
czrdh,
</if>
<if test ='null != czry'>
czry,
</if>
<if test ='null != fzjg'>
fzjg,
</if>
<if test ='null != fzrq'>
fzrq,
</if>
<if test ='null != lrrid'>
lrrid,
</if>
<if test ='null != lrsjTime'>
lrsj_time,
</if>
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != txkgType'>
txkg_type,
</if>
<if test ='null != yxdqr'>
yxdqr,
</if>
<if test ='null != yxksr'>
yxksr,
</if>
<if test ='null != zjbh'>
zjbh,
</if>
<if test ='null != zjfj'>
zjfj,
</if>
<if test ='null != zjmc'>
zjmc,
</if>
<if test ='null != isDelete'>
is_delete,
</if>
<if test ='null != templateId'>
template_id
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != czrdh'>
#{czrdh},
</if>
<if test ='null != czry'>
#{czry},
</if>
<if test ='null != fzjg'>
#{fzjg},
</if>
<if test ='null != fzrq'>
#{fzrq},
</if>
<if test ='null != lrrid'>
#{lrrid},
</if>
<if test ='null != lrsjTime'>
#{lrsjTime},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != txkgType'>
#{txkgType},
</if>
<if test ='null != yxdqr'>
#{yxdqr},
</if>
<if test ='null != yxksr'>
#{yxksr},
</if>
<if test ='null != zjbh'>
#{zjbh},
</if>
<if test ='null != zjfj'>
#{zjfj},
</if>
<if test ='null != zjmc'>
#{zjmc},
</if>
<if test ='null != isDelete'>
#{isDelete},
</if>
<if test ='null != templateId'>
#{templateId}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM htzz_admin_zzda
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.htzz.HtzzAdminZzda">
UPDATE htzz_admin_zzda
<set>
<if test ='null != czrdh'>czrdh = #{czrdh},</if>
<if test ='null != czry'>czry = #{czry},</if>
<if test ='null != fzjg'>fzjg = #{fzjg},</if>
<if test ='null != fzrq'>fzrq = #{fzrq},</if>
<if test ='null != lrrid'>lrrid = #{lrrid},</if>
<if test ='null != lrsjTime'>lrsj_time = #{lrsjTime},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != txkgType'>txkg_type = #{txkgType},</if>
<if test ='null != yxdqr'>yxdqr = #{yxdqr},</if>
<if test ='null != yxksr'>yxksr = #{yxksr},</if>
<if test ='null != zjbh'>zjbh = #{zjbh},</if>
<if test ='null != zjfj'>zjfj = #{zjfj},</if>
<if test ='null != zjmc'>zjmc = #{zjmc},</if>
<if test ='null != isDelete'>is_delete = #{isDelete},</if>
<if test ='null != templateId'>template_id = #{templateId}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM htzz_admin_zzda
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM htzz_admin_zzda
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM htzz_admin_zzda
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/htzz/HtzzAssoHtgxMapper.xml
0 → 100644
View file @
80b7af2e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.htzz.HtzzAssoHtgxMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.htzz.HtzzAssoHtgx"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"htid"
property=
"htid"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"tzrid"
property=
"tzrid"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"phone"
property=
"phone"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
htid,
org_code,
tzrid,
name,
phone
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id HtzzAssoHtgx_id,
htid HtzzAssoHtgx_htid,
org_code HtzzAssoHtgx_org_code,
tzrid HtzzAssoHtgx_tzrid,
name HtzzAssoHtgx_name,
phone HtzzAssoHtgx_phone
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.htzz.HtzzAssoHtgx">
INSERT INTO htzz_asso_htgx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != htid'>
htid,
</if>
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != tzrid'>
tzrid,
</if>
<if test ='null != name'>
name,
</if>
<if test ='null != phone'>
phone
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != htid'>
#{htid},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != tzrid'>
#{tzrid},
</if>
<if test ='null != name'>
#{name},
</if>
<if test ='null != phone'>
#{phone}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM htzz_asso_htgx
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.htzz.HtzzAssoHtgx">
UPDATE htzz_asso_htgx
<set>
<if test ='null != htid'>htid = #{htid},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != tzrid'>tzrid = #{tzrid},</if>
<if test ='null != name'>name = #{name},</if>
<if test ='null != phone'>phone = #{phone}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM htzz_asso_htgx
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM htzz_asso_htgx
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM htzz_asso_htgx
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/htzz/HtzzAssoZztxMapper.xml
0 → 100644
View file @
80b7af2e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.htzz.HtzzAssoZztxMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.htzz.HtzzAssoZztx"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"cffs"
property=
"cffs"
/>
<result
column=
"is_email"
property=
"isEmail"
/>
<result
column=
"is_message"
property=
"isMessage"
/>
<result
column=
"lrrid"
property=
"lrrid"
/>
<result
column=
"lrsj_time"
property=
"lrsjTime"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"txsj"
property=
"txsj"
/>
<result
column=
"zzda_id"
property=
"zzdaId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
cffs,
is_email,
is_message,
lrrid,
lrsj_time,
name,
org_code,
txsj,
zzda_id
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id HtzzAssoZztx_id,
cffs HtzzAssoZztx_cffs,
is_email HtzzAssoZztx_is_email,
is_message HtzzAssoZztx_is_message,
lrrid HtzzAssoZztx_lrrid,
lrsj_time HtzzAssoZztx_lrsj_time,
name HtzzAssoZztx_name,
org_code HtzzAssoZztx_org_code,
txsj HtzzAssoZztx_txsj,
zzda_id HtzzAssoZztx_zzda_id
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.htzz.HtzzAssoZztx">
INSERT INTO htzz_asso_zztx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != cffs'>
cffs,
</if>
<if test ='null != isEmail'>
is_email,
</if>
<if test ='null != isMessage'>
is_message,
</if>
<if test ='null != lrrid'>
lrrid,
</if>
<if test ='null != lrsjTime'>
lrsj_time,
</if>
<if test ='null != name'>
name,
</if>
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != txsj'>
txsj,
</if>
<if test ='null != zzdaId'>
zzda_id
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != cffs'>
#{cffs},
</if>
<if test ='null != isEmail'>
#{isEmail},
</if>
<if test ='null != isMessage'>
#{isMessage},
</if>
<if test ='null != lrrid'>
#{lrrid},
</if>
<if test ='null != lrsjTime'>
#{lrsjTime},
</if>
<if test ='null != name'>
#{name},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != txsj'>
#{txsj},
</if>
<if test ='null != zzdaId'>
#{zzdaId}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM htzz_asso_zztx
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.htzz.HtzzAssoZztx">
UPDATE htzz_asso_zztx
<set>
<if test ='null != cffs'>cffs = #{cffs},</if>
<if test ='null != isEmail'>is_email = #{isEmail},</if>
<if test ='null != isMessage'>is_message = #{isMessage},</if>
<if test ='null != lrrid'>lrrid = #{lrrid},</if>
<if test ='null != lrsjTime'>lrsj_time = #{lrsjTime},</if>
<if test ='null != name'>name = #{name},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != txsj'>txsj = #{txsj},</if>
<if test ='null != zzdaId'>zzda_id = #{zzdaId}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM htzz_asso_zztx
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM htzz_asso_zztx
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM htzz_asso_zztx
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/qyzx/QyzxAdminColourMapper.xml
0 → 100644
View file @
80b7af2e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.qyzx.QyzxAdminColourMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.qyzx.QyzxAdminColour"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"navback_color"
property=
"navbackColor"
/>
<result
column=
"menuback_color"
property=
"menubackColor"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"addtime"
property=
"addtime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
navback_color,
menuback_color,
org_code,
addtime
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id QyzxAdminColour_id,
navback_color QyzxAdminColour_navback_color,
menuback_color QyzxAdminColour_menuback_color,
org_code QyzxAdminColour_org_code,
addtime QyzxAdminColour_addtime
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.qyzx.QyzxAdminColour">
INSERT INTO qyzx_admin_colour
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != navbackColor'>
navback_color,
</if>
<if test ='null != menubackColor'>
menuback_color,
</if>
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != addtime'>
addtime
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != navbackColor'>
#{navbackColor},
</if>
<if test ='null != menubackColor'>
#{menubackColor},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != addtime'>
#{addtime}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM qyzx_admin_colour
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.qyzx.QyzxAdminColour">
UPDATE qyzx_admin_colour
<set>
<if test ='null != navbackColor'>navback_color = #{navbackColor},</if>
<if test ='null != menubackColor'>menuback_color = #{menubackColor},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != addtime'>addtime = #{addtime}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM qyzx_admin_colour
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM qyzx_admin_colour
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM qyzx_admin_colour
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/qyzx/QyzxAdminMenuMapper.xml
0 → 100644
View file @
80b7af2e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.qyzx.QyzxAdminMenuMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.qyzx.QyzxAdminMenu"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"menu_code"
property=
"menuCode"
/>
<result
column=
"menu_name"
property=
"menuName"
/>
<result
column=
"sort_number"
property=
"sortNumber"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"addtime"
property=
"addtime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
menu_code,
menu_name,
sort_number,
org_code,
addtime
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id QyzxAdminMenu_id,
menu_code QyzxAdminMenu_menu_code,
menu_name QyzxAdminMenu_menu_name,
sort_number QyzxAdminMenu_sort_number,
org_code QyzxAdminMenu_org_code,
addtime QyzxAdminMenu_addtime
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.qyzx.QyzxAdminMenu">
INSERT INTO qyzx_admin_menu
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != menuCode'>
menu_code,
</if>
<if test ='null != menuName'>
menu_name,
</if>
<if test ='null != sortNumber'>
sort_number,
</if>
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != addtime'>
addtime
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != menuCode'>
#{menuCode},
</if>
<if test ='null != menuName'>
#{menuName},
</if>
<if test ='null != sortNumber'>
#{sortNumber},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != addtime'>
#{addtime}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM qyzx_admin_menu
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.qyzx.QyzxAdminMenu">
UPDATE qyzx_admin_menu
<set>
<if test ='null != menuCode'>menu_code = #{menuCode},</if>
<if test ='null != menuName'>menu_name = #{menuName},</if>
<if test ='null != sortNumber'>sort_number = #{sortNumber},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != addtime'>addtime = #{addtime}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM qyzx_admin_menu
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM qyzx_admin_menu
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM qyzx_admin_menu
</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