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
c48cfc0c
Commit
c48cfc0c
authored
Jun 15, 2020
by
tangzhaoqian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://develop-gitlab.youlingrc.com/8timerv2/8timerapiv200.git
into tzq
parents
fe0f4daa
6acd9e03
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
185 additions
and
51 deletions
+185
-51
src/main/java/cn/timer/api/bean/crm/CrmSeaRule.java
+5
-5
src/main/java/cn/timer/api/controller/crm/CrmController.java
+121
-36
src/main/java/cn/timer/api/controller/crm/CrmRuleController.java
+4
-2
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
+8
-3
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+23
-3
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
+1
-1
src/main/java/cn/timer/api/controller/qyzx/QyzxAuthController.java
+18
-0
src/main/java/cn/timer/api/dto/kqmk/KqglAssoOvertimeRulesDto.java
+5
-1
No files found.
src/main/java/cn/timer/api/bean/crm/CrmSeaRule.java
View file @
c48cfc0c
...
...
@@ -53,17 +53,17 @@ public class CrmSeaRule extends Model<CrmSeaRule> {
private
Integer
gid
;
@ApiModelProperty
(
value
=
"添加客户之后(one)天没有跟进 (以跟进记录为准)"
)
private
Integer
one
;
private
int
one
;
@ApiModelProperty
(
value
=
"距上次跟进(two)天没有再次跟进 (以跟进记录为准)"
)
private
Integer
two
;
private
int
two
;
@ApiModelProperty
(
value
=
"添加客户之后(three)天没有成交 (天数必须大于规则1)"
)
private
Integer
three
;
private
int
three
;
@ApiModelProperty
(
value
=
"系统提前(four)天自动提醒业务员客户将被回收"
)
private
Integer
four
;
private
int
four
;
// @ApiModelProperty(value = "我的客户数量最多(five)人(合作中的不算)")
// private
Integer
five;
// private
int
five;
}
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
c48cfc0c
...
...
@@ -8,6 +8,8 @@
package
cn
.
timer
.
api
.
controller
.
crm
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
...
...
@@ -18,7 +20,6 @@ import java.util.Map;
import
java.util.stream.Collectors
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -34,7 +35,6 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.io.resource.ResourceUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.poi.excel.ExcelReader
;
import
cn.hutool.poi.excel.ExcelUtil
;
...
...
@@ -52,7 +52,6 @@ import cn.timer.api.bean.crm.CrmSeaRule;
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.controller.dzht.cn.tign.hz.comm.FileHelper
;
import
cn.timer.api.dao.crm.CrmClientContactsMapper
;
import
cn.timer.api.dao.crm.CrmClientDataMapper
;
import
cn.timer.api.dto.crm.CrmClientDataImportVo
;
...
...
@@ -77,8 +76,8 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping
(
value
=
"/crm"
,
produces
=
{
"application/json"
})
public
class
CrmController
{
@Value
(
value
=
"${config-8timer.crm-excel.realPath}"
)
private
String
realPath
;
//
@Value(value = "${config-8timer.crm-excel.realPath}")
//
private String realPath;
@Autowired
private
CrmClientDataMapper
crmClientDataMapper
;
...
...
@@ -104,6 +103,13 @@ public class CrmController {
return
getYg
(
orgCode
,
empNum
).
getName
();
}
// private Integer getQyzxManager(Integer orgCode, Integer empNum) {
// return YgglMainEmp.builder().build()
// .selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, orgCode)
// .eq(YgglMainEmp::getEmpNum, empNum).select(YgglMainEmp::getIsManager))
// .getIsManager();
// }
@GetMapping
(
"getIndustry"
)
@ApiOperation
(
value
=
"获取行业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
IndustryClass
>>
getIndustry
(
@CurrentUser
UserBean
userBean
)
{
...
...
@@ -212,22 +218,36 @@ public class CrmController {
@GetMapping
(
"getBusinessGroup"
)
@ApiOperation
(
value
=
"获取业务组列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getBusinessGroup
(
@CurrentUser
UserBean
userBean
)
{
Integer
nowEmpNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
nowEmpNum
).
select
(
YgglMainEmp:
:
getIsManager
));
if
(
yg
!=
null
&&
yg
.
getIsManager
()
!=
null
&&
(
yg
.
getIsManager
()
==
1
||
yg
.
getIsManager
()
==
2
))
{
List
<
CrmBusinessGroup
>
list
=
CrmBusinessGroup
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmBusinessGroup
>().
lambda
()
.
eq
(
CrmBusinessGroup:
:
getOrgCode
,
getOrgCode
(
userBean
)).
select
(
CrmBusinessGroup:
:
getId
,
CrmBusinessGroup:
:
getSort
,
CrmBusinessGroup:
:
getName
,
CrmBusinessGroup:
:
getModifyTime
));
CrmBusinessGroup:
:
getSort
,
CrmBusinessGroup:
:
getName
,
CrmBusinessGroup:
:
getModifyTime
));
for
(
CrmBusinessGroup
crmBusinessGroup
:
list
)
{
Integer
gid
=
crmBusinessGroup
.
getId
();
List
<
CrmBusinessGroupMember
>
crmBusinessGroupManagers
=
CrmBusinessGroupMember
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
CrmBusinessGroupMember
>().
lambda
().
eq
(
CrmBusinessGroupMember:
:
getGid
,
gid
)
.
eq
(
CrmBusinessGroupMember:
:
getType
,
1
).
select
(
CrmBusinessGroupMember:
:
getEmpNum
));
List
<
CrmBusinessGroupMember
>
crmBusinessGroupMembers
=
CrmBusinessGroupMember
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
CrmBusinessGroupMember
>().
lambda
().
eq
(
CrmBusinessGroupMember:
:
getGid
,
gid
)
.
eq
(
CrmBusinessGroupMember:
:
getType
,
0
).
select
(
CrmBusinessGroupMember:
:
getEmpNum
));
List
<
CrmBusinessGroupMember
>
crmBusinessGroupManagers
=
CrmBusinessGroupMember
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmBusinessGroupMember
>().
lambda
()
.
eq
(
CrmBusinessGroupMember:
:
getGid
,
gid
).
eq
(
CrmBusinessGroupMember:
:
getType
,
1
)
.
eq
(
CrmBusinessGroupMember:
:
getOrgCode
,
getOrgCode
(
userBean
))
.
select
(
CrmBusinessGroupMember:
:
getEmpNum
));
List
<
CrmBusinessGroupMember
>
crmBusinessGroupMembers
=
CrmBusinessGroupMember
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmBusinessGroupMember
>().
lambda
()
.
eq
(
CrmBusinessGroupMember:
:
getGid
,
gid
).
eq
(
CrmBusinessGroupMember:
:
getType
,
0
)
.
eq
(
CrmBusinessGroupMember:
:
getOrgCode
,
getOrgCode
(
userBean
))
.
select
(
CrmBusinessGroupMember:
:
getEmpNum
));
List
<
Map
<
String
,
Object
>>
managers
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
CrmBusinessGroupMember
crmBusinessGroupManager
:
crmBusinessGroupManagers
)
{
Integer
empNum
=
crmBusinessGroupManager
.
getEmpNum
();
String
name
=
getEmpName
(
getOrgCode
(
userBean
)
,
empNum
);
String
name
=
getEmpName
(
orgCode
,
empNum
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"name"
,
name
);
map
.
put
(
"empNum"
,
empNum
);
...
...
@@ -238,7 +258,7 @@ public class CrmController {
List
<
Map
<
String
,
Object
>>
members
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
CrmBusinessGroupMember
crmBusinessGroupManager
:
crmBusinessGroupMembers
)
{
Integer
empNum
=
crmBusinessGroupManager
.
getEmpNum
();
String
name
=
getEmpName
(
getOrgCode
(
userBean
)
,
empNum
);
String
name
=
getEmpName
(
orgCode
,
empNum
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"name"
,
name
);
map
.
put
(
"empNum"
,
empNum
);
...
...
@@ -251,20 +271,37 @@ public class CrmController {
crmBusinessGroup
.
setCrmSeaRules
(
crmSeaRules
);
}
return
ResultUtil
.
data
(
list
,
"获取成功"
);
}
else
return
ResultUtil
.
error
(
"暂无查看权限"
);
}
@GetMapping
(
"getBusinessGroupId"
)
@ApiOperation
(
value
=
"获取业务组列表(id,name)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getBusinessGroupId
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
nowEmpNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
nowEmpNum
).
select
(
YgglMainEmp:
:
getIsManager
));
if
(
yg
!=
null
&&
yg
.
getIsManager
()
!=
null
&&
(
yg
.
getIsManager
()
==
1
||
yg
.
getIsManager
()
==
2
))
{
List
<
CrmBusinessGroup
>
list
=
CrmBusinessGroup
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
CrmBusinessGroup
>().
eq
(
CrmBusinessGroup:
:
getOrgCode
,
orgCode
)
.
select
(
CrmBusinessGroup:
:
getName
,
CrmBusinessGroup:
:
getId
));
return
ResultUtil
.
data
(
list
,
"获取成功"
);
}
else
{
List
<
CrmBusinessGroupMember
>
list
=
CrmBusinessGroupMember
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
CrmBusinessGroupMember
>()
.
eq
(
CrmBusinessGroupMember:
:
getEmpNum
,
empNum
).
select
(
CrmBusinessGroupMember:
:
getGid
));
.
eq
(
CrmBusinessGroupMember:
:
getEmpNum
,
getEmpNum
(
userBean
))
.
eq
(
CrmBusinessGroupMember:
:
getOrgCode
,
getOrgCode
(
userBean
))
.
select
(
CrmBusinessGroupMember:
:
getGid
));
List
<
Integer
>
gids
=
list
.
stream
().
map
(
CrmBusinessGroupMember:
:
getGid
).
collect
(
Collectors
.
toList
()).
stream
()
.
distinct
().
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
Integer
gid
:
gids
)
{
System
.
err
.
println
(
gid
);
String
name
=
CrmBusinessGroup
.
builder
().
build
().
selectOne
(
new
LambdaQueryWrapper
<
CrmBusinessGroup
>()
.
eq
(
CrmBusinessGroup:
:
getId
,
gid
).
select
(
CrmBusinessGroup:
:
getName
)).
getName
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -274,6 +311,7 @@ public class CrmController {
}
return
ResultUtil
.
data
(
result
,
"获取成功"
);
}
}
// @GetMapping("getBusinessGroupMembers")
// @ApiOperation(value = "获取业务组列表成员", httpMethod = "GET", notes = "接口发布说明")
...
...
@@ -535,6 +573,25 @@ public class CrmController {
@RequestParam
(
required
=
false
)
Integer
status
,
@RequestParam
(
required
=
false
)
String
like
)
{
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
select
(
YgglMainEmp:
:
getIsManager
));
if
(
yg
!=
null
&&
yg
.
getIsManager
()
!=
null
&&
(
yg
.
getIsManager
()
==
1
||
yg
.
getIsManager
()
==
2
))
{
List
<
CrmClientData
>
list
=
CrmClientData
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
.
eq
(
CrmClientData:
:
getBelongUser
,
0
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
));
return
ResultUtil
.
data
(
list
,
"查询成功"
);
}
else
{
// 当前用户加入的组
List
<
Integer
>
gids1
=
MyJoinGroup
(
empNum
,
orgCode
);
// 当前用户管理的组
...
...
@@ -555,6 +612,7 @@ public class CrmController {
}
return
ResultUtil
.
data
(
crmClientDatas
,
"查询成功"
);
}
}
@GetMapping
(
"getAllCilentTotal"
)
@ApiOperation
(
value
=
"获取所有客户列表(全)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
...
...
@@ -565,14 +623,34 @@ public class CrmController {
@RequestParam
(
required
=
false
)
String
endCreateTime
,
@RequestParam
(
required
=
false
)
String
startFollowTime
,
@RequestParam
(
required
=
false
)
String
endFollowTime
)
{
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
select
(
YgglMainEmp:
:
getIsManager
));
if
(
yg
!=
null
&&
yg
.
getIsManager
()
!=
null
&&
(
yg
.
getIsManager
()
==
1
||
yg
.
getIsManager
()
==
2
))
{
List
<
CrmClientData
>
datas
=
CrmClientData
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
ge
(
StringUtils
.
isNotBlank
(
startCreateTime
),
CrmClientData:
:
getCreateTime
,
startCreateTime
)
.
le
(
StringUtils
.
isNotBlank
(
endCreateTime
),
CrmClientData:
:
getCreateTime
,
endCreateTime
)
.
ge
(
StringUtils
.
isNotBlank
(
startFollowTime
),
CrmClientData:
:
getCreateTime
,
startFollowTime
)
.
le
(
StringUtils
.
isNotBlank
(
endFollowTime
),
CrmClientData:
:
getCreateTime
,
endFollowTime
)
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
));
return
ResultUtil
.
data
(
datas
,
"查询成功"
);
}
else
{
// 当前用户管理的组
List
<
Integer
>
gids
=
MyManageGroup
(
empNum
,
orgCode
);
List
<
Object
>
crmClientDatas
=
new
ArrayList
<
Object
>();
for
(
Integer
gid
:
gids
)
{
List
<
CrmClientData
>
datas
=
CrmClientData
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientData
>()
.
lambda
().
eq
(
CrmClientData:
:
getBelongGroup
,
gid
)
List
<
CrmClientData
>
datas
=
CrmClientData
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
CrmClientData
>
()
.
lambda
().
eq
(
CrmClientData:
:
getBelongGroup
,
gid
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
...
...
@@ -587,6 +665,7 @@ public class CrmController {
}
return
ResultUtil
.
data
(
crmClientDatas
,
"查询成功"
);
}
}
@PostMapping
(
"addCilentLinkMan"
)
@Transactional
...
...
@@ -715,7 +794,7 @@ public class CrmController {
crmClientData
.
updateById
();
return
ResultUtil
.
success
(
"封档成功"
);
}
else
if
(
status
==
5
)
{
// crmClientData.setClientStatus(0); // 解封后默认无
状态
crmClientData
.
setClientStatus
(
1
);
// 解封后默认潜在
状态
crmClientData
.
updateById
();
return
ResultUtil
.
success
(
"解封成功"
);
}
else
...
...
@@ -944,9 +1023,6 @@ public class CrmController {
List
<
Integer
>
members
=
getAllBusinessGroupMember
(
orgCode
,
groupId
);
for
(
Integer
memberId
:
members
)
{
Map
<
String
,
Object
>
map
=
selectMap
(
orgCode
,
memberId
,
status
,
startCreateTime
,
endCreateTime
);
if
(
memberId
.
equals
(
12414
))
{
System
.
err
.
println
(
"map++"
+
map
);
}
if
((
Integer
)
map
.
get
(
"num"
)
>
0
)
{
list
.
add
(
map
);
}
...
...
@@ -1063,19 +1139,20 @@ public class CrmController {
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
String
filePath
=
null
;
String
time
=
null
;
try
{
time
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMddHHmmssSSS"
);
filePath
=
FileHelper
.
downLoadFromUrl
(
url
,
time
+
".xls"
,
realPath
);
System
.
err
.
println
(
filePath
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
// String filePath = null;
// String time = null;
// try {
// time = DateUtil.format(new Date(), "yyyyMMddHHmmssSSS");
// filePath = FileHelper.downLoadFromUrl(url, time + ".xls", realPath);
// } catch (IOException e) {
// e.printStackTrace();
// }
// 从文件中读取Excel为ExcelReader
ExcelReader
reader
;
// 从流中读取Excel为ExcelReader(比如从ClassPath中读取Excel文件)
reader
=
ExcelUtil
.
getReader
(
ResourceUtil
.
getStream
(
filePath
));
// reader = ExcelUtil.getReader(ResourceUtil.getStream(filePath));
// 从网络流OSS中读取excel资源
reader
=
getReaderByUrl
(
url
);
reader
.
addHeaderAlias
(
"*客户名称(必填)"
,
"clientName"
);
reader
.
addHeaderAlias
(
"*所属分组(必填)"
,
"belongGroupName"
);
reader
.
addHeaderAlias
(
"行业"
,
"industryName"
);
...
...
@@ -1095,7 +1172,6 @@ public class CrmController {
reader
.
addHeaderAlias
(
"个人地址"
,
"linkAddress"
);
List
<
CrmClientDataImportVo
>
list
=
reader
.
read
(
0
,
1
,
CrmClientDataImportVo
.
class
);
for
(
CrmClientDataImportVo
crmClientDataImportVo
:
list
)
{
System
.
err
.
println
(
crmClientDataImportVo
);
String
clientName
=
crmClientDataImportVo
.
getClientName
();
// 客户名称(必填)
String
belongGroupName
=
crmClientDataImportVo
.
getBelongGroupName
();
// 分组名(必填)
...
...
@@ -1120,8 +1196,7 @@ public class CrmController {
// 业务组
CrmBusinessGroup
crmBusinessGroup
=
CrmBusinessGroup
.
builder
().
build
()
.
selectOne
(
new
LambdaQueryWrapper
<
CrmBusinessGroup
>()
.
eq
(
CrmBusinessGroup:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
selectOne
(
new
LambdaQueryWrapper
<
CrmBusinessGroup
>().
eq
(
CrmBusinessGroup:
:
getOrgCode
,
orgCode
)
.
eq
(
CrmBusinessGroup:
:
getName
,
belongGroupName
).
select
(
CrmBusinessGroup:
:
getId
));
if
(
crmBusinessGroup
==
null
)
return
ResultUtil
.
error
(
"没有匹配的业务组名称"
);
...
...
@@ -1188,4 +1263,14 @@ public class CrmController {
}
return
ResultUtil
.
success
(
"导入成功"
);
}
private
ExcelReader
getReaderByUrl
(
String
url
)
{
InputStream
is
=
null
;
try
{
is
=
new
URL
(
url
).
openConnection
().
getInputStream
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
ExcelUtil
.
getReader
(
is
);
}
}
src/main/java/cn/timer/api/controller/crm/CrmRuleController.java
View file @
c48cfc0c
...
...
@@ -65,10 +65,12 @@ public class CrmRuleController {
Date
now
=
new
Date
();
// 客户创建时间+ x天 = 过期释放时间
DateTime
overDate1
=
DateUtil
.
offsetDay
(
createTime
,
one
);
Long
compare2
=
null
;
long
compare2
=
0
;
if
(
lastFollowTime
!=
null
)
{
DateTime
overDate2
=
DateUtil
.
offsetDay
(
lastFollowTime
,
two
);
compare2
=
DateUtil
.
between
(
overDate2
,
now
,
DateUnit
.
DAY
,
false
);
if
(
compare2
==
-
four
)
remind
(
belongUserName
,
clientName
,
four
);
}
DateTime
overDate3
=
DateUtil
.
offsetDay
(
createTime
,
three
);
// 时间比较
...
...
@@ -80,7 +82,7 @@ public class CrmRuleController {
||
(
compare3
>=
0
&&
status
!=
3
&&
status
!=
4
))
release
(
crmClientData
);
// 判断4
if
(
compare1
==
-
four
||
compare
2
==
-
four
||
compare3
==
-
four
)
// TODO
if
(
compare1
==
-
four
||
compare
3
==
-
four
)
remind
(
belongUserName
,
clientName
,
four
);
}
}
...
...
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
View file @
c48cfc0c
...
...
@@ -201,9 +201,14 @@ public class DzhtController2 {
@PostMapping
(
"/orgTemplate"
)
@ApiOperation
(
value
=
"创建机构模板印章"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
orgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
DzhtAssoQyyz
qyyz
)
{
String
orgId
=
DzhtAssoQyzc
.
builder
().
build
().
selectOne
(
// new QueryWrapper<DzhtAssoQyzc>().eq("third_party_user_id", qyyz.getThirdPartyUserId()).select("org_id"))
new
QueryWrapper
<
DzhtAssoQyzc
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
select
(
"org_id"
)).
getOrgId
();
// 查询orgId
DzhtAssoQyzc
yz
=
DzhtAssoQyzc
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
DzhtAssoQyzc
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
select
(
"org_id"
));
if
(
yz
==
null
)
{
return
ResultUtil
.
error
(
"请先在签约主体中进行企业认证"
);
}
String
orgId
=
yz
.
getOrgId
();
// 查询orgId
// String orgId = "dfd84b9a58d345ea90f6711bad853435";// 测试公司账户
// 印章参数
String
alias
=
qyyz
.
getAlias
();
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
c48cfc0c
...
...
@@ -257,20 +257,40 @@ public class TimeCardController {
List
<
KqglAssoOvertimeRulesDto
>
rulesdto
=
new
ArrayList
<
KqglAssoOvertimeRulesDto
>();
for
(
int
i
=
0
,
n
=
listAs
.
size
();
i
<
n
;
i
++)
{
String
[]
nary
=
null
;
String
[]
naryid
=
null
;
if
(
listAs
.
get
(
i
).
getAppliedScope
()
==
0
)
{
//全公司
nary
=
new
String
[
1
];
//用户名
naryid
=
new
String
[
1
];
//用户名
nary
[
0
]
=
"全公司"
;
naryid
[
0
]
=
"0"
;
}
else
{
List
<
KqglAssoOvertimeRange
>
overtim
=
kqglassoovertimerangemapper
.
selectList
(
new
QueryWrapper
<
KqglAssoOvertimeRange
>().
lambda
().
eq
(
KqglAssoOvertimeRange:
:
getOvertimeRulesId
,
listAs
.
get
(
i
).
getId
()));
nary
=
new
String
[
overtim
.
size
()];
//用户名
naryid
=
new
String
[
overtim
.
size
()];
//用户名
for
(
int
y
=
0
,
l
=
overtim
.
size
();
y
<
l
;
y
++)
{
KqglMainKqz
kqzmc
=
kqglmainkqzmapper
.
selectOne
(
new
QueryWrapper
<
KqglMainKqz
>().
lambda
().
eq
(
KqglMainKqz:
:
getId
,
overtim
.
get
(
y
).
getAttgroupId
()));
nary
[
y
]
=
kqzmc
.
getName
();
naryid
[
y
]
=
String
.
valueOf
(
kqzmc
.
getId
());
}
}
List
<
KqglAssOvertimeVice
>
vice
=
kqglassovertimevicemapper
.
selectList
(
new
QueryWrapper
<
KqglAssOvertimeVice
>().
lambda
().
eq
(
KqglAssOvertimeVice:
:
getOvertimeRulesId
,
listAs
.
get
(
i
).
getId
()));
StartTimeRestDto
[]
starttime
=
new
StartTimeRestDto
[
vice
.
size
()];
//用户名;
for
(
int
r
=
0
,
t
=
vice
.
size
();
r
<
t
;
r
++)
{
StartTimeRestDto
startt
=
new
StartTimeRestDto
(
vice
.
get
(
r
).
getBreakStartTime
(),
vice
.
get
(
r
).
getBreakEndTime
(),
vice
.
get
(
r
).
getOverType
());
starttime
[
r
]
=
startt
;
}
KqglAssoOvertimeRulesDto
ruldto
=
KqglAssoOvertimeRulesDto
.
builder
().
build
();
ruldto
.
setApplyrange
(
nary
);
BeanUtil
.
copyProperties
(
listAs
.
get
(
i
),
ruldto
,
"starttime"
,
"applyrange"
);
ruldto
.
setApplyrangeid
(
naryid
);
ruldto
.
setStarttime
(
starttime
);
BeanUtil
.
copyProperties
(
listAs
.
get
(
i
),
ruldto
,
"starttime"
,
"applyrange"
,
"applyrangeid"
);
rulesdto
.
add
(
ruldto
);
}
return
ResultUtil
.
data
(
pageAs
,
rulesdto
,
"操作成功!"
);
...
...
@@ -296,7 +316,7 @@ public class TimeCardController {
Integer
id
=
rul
.
getId
();
Console
.
log
(
"新增/修改加班规则id: "
+
id
);
List
<
KqglAssoOvertimeRange
>
overatts
=
new
ArrayList
<
KqglAssoOvertimeRange
>();
String
[]
launchs
=
overrules
.
getApplyrange
();
String
[]
launchs
=
overrules
.
getApplyrange
id
();
if
(
launchs
.
length
==
0
)
{
KqglAssoOvertimeRange
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoOvertimeRange
>().
lambda
().
eq
(
KqglAssoOvertimeRange:
:
getOvertimeRulesId
,
id
));
}
else
if
(
launchs
!=
null
&&
launchs
.
length
>
0
){
...
...
@@ -2006,7 +2026,7 @@ public class TimeCardController {
public
Result
<
Object
>
LeaveBalanceList
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AttqueryCriteriaDto
attquerycriteriadto
)
{
IPage
<
EmployeeLeaveBalanceDto
>
page
=
new
Page
<
EmployeeLeaveBalanceDto
>(
attquerycriteriadto
.
getCurrentPage
()
==
null
?
1
:
attquerycriteriadto
.
getCurrentPage
(),
attquerycriteriadto
.
getTotalPage
()
==
null
?
10
:
attquerycriteriadto
.
getTotalPage
());
attquerycriteriadto
.
getTotalPage
()
==
10
?
9999
:
attquerycriteriadto
.
getTotalPage
());
attquerycriteriadto
.
setOrgCode
(
userBean
.
getOrgCode
());
attquerycriteriadto
.
setEmpNum
(
userBean
.
getEmpNum
());
// 缺-部门id 搜索
...
...
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
View file @
c48cfc0c
...
...
@@ -358,7 +358,7 @@ public class CmsController {
// 查询条件
QueryWrapper
<
CmsContent
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"organization_id"
,
userBean
.
getOrgCode
())
.
select
(
"id"
,
"auditopinion"
,
"modularid"
,
"status"
,
"title"
,
"releasetime"
,
"addeddate"
,
"author"
,
.
select
(
"id"
,
"publisher_name"
,
"auditopinion"
,
"modularid"
,
"status"
,
"title"
,
"releasetime"
,
"addeddate"
,
"author"
,
"summary"
,
"releasetype"
,
"fmtpath"
)
.
ne
(
"status"
,
1
).
eq
(
t
!=
null
&&
t
>
-
1
,
"modularid"
,
t
)
.
between
(!
StrUtil
.
hasBlank
(
s
)
&&
!
StrUtil
.
hasBlank
(
e
),
"releasetime"
,
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxAuthController.java
View file @
c48cfc0c
...
...
@@ -9,6 +9,7 @@ package cn.timer.api.controller.qyzx;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.timer.api.bean.qyzx.auth.QyzxAuthAccount
;
...
...
@@ -170,4 +172,20 @@ public class QyzxAuthController {
}
@GetMapping
(
value
=
"/getYgAuth"
)
@ApiOperation
(
value
=
"获取全部权限信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
YgglMainEmp
>>
getYgAuth
(
@CurrentUser
UserBean
userBean
)
{
YgglMainEmp
main
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
LambdaQueryWrapper
<
YgglMainEmp
>().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getIsManager
,
1
).
select
(
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getPhone
,
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getIsManager
));
List
<
YgglMainEmp
>
child
=
YgglMainEmp
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
YgglMainEmp
>().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getIsManager
,
2
).
select
(
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getPhone
,
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getIsManager
));
child
.
add
(
main
);
return
ResultUtil
.
data
(
child
,
"查询成功"
);
}
}
src/main/java/cn/timer/api/dto/kqmk/KqglAssoOvertimeRulesDto.java
View file @
c48cfc0c
...
...
@@ -98,7 +98,10 @@ public class KqglAssoOvertimeRulesDto {
@ApiModelProperty
(
value
=
"扣除休息时间段"
,
example
=
"12:00-13:30"
)
private
StartTimeRestDto
[]
starttime
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"[]"
)
@ApiModelProperty
(
value
=
"应用范围
name
"
,
example
=
"[]"
)
private
String
[]
applyrange
;
@ApiModelProperty
(
value
=
"应用范围id"
,
example
=
"[]"
)
private
String
[]
applyrangeid
;
}
\ 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