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
b1546998
Commit
b1546998
authored
Sep 01, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request 8timerv2/8timerapiv200!472
parents
479f66b1
6d04d320
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
30 deletions
+76
-30
src/main/java/cn/timer/api/controller/crm/CrmController.java
+39
-26
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+34
-3
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+3
-1
No files found.
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
b1546998
...
@@ -401,15 +401,15 @@ public class CrmController {
...
@@ -401,15 +401,15 @@ public class CrmController {
Integer
clientSource
=
crmClientData
.
getClientSource
();
Integer
clientSource
=
crmClientData
.
getClientSource
();
Integer
clientType
=
crmClientData
.
getClientType
();
Integer
clientType
=
crmClientData
.
getClientType
();
Integer
industry
=
crmClientData
.
getIndustry
();
Integer
industry
=
crmClientData
.
getIndustry
();
if
(
clientSource
!=
null
)
{
if
(
clientSource
!=
null
&&
clientSource
>
0
)
{
String
clientSourceName
=
ClientSourceClass
.
builder
().
id
(
clientSource
).
build
().
selectById
().
getName
();
// 客户来源
String
clientSourceName
=
ClientSourceClass
.
builder
().
id
(
clientSource
).
build
().
selectById
().
getName
();
// 客户来源
crmClientData
.
setClientSourceName
(
clientSourceName
);
crmClientData
.
setClientSourceName
(
clientSourceName
);
}
}
if
(
clientType
!=
null
)
{
if
(
clientType
!=
null
&&
clientType
>
0
)
{
String
clientTypeName
=
ClientTypeClass
.
builder
().
id
(
clientType
).
build
().
selectById
().
getName
();
// 客户类型
String
clientTypeName
=
ClientTypeClass
.
builder
().
id
(
clientType
).
build
().
selectById
().
getName
();
// 客户类型
crmClientData
.
setClientTypeName
(
clientTypeName
);
crmClientData
.
setClientTypeName
(
clientTypeName
);
}
}
if
(
industry
!=
null
)
{
if
(
industry
!=
null
&&
industry
>
0
)
{
String
industryName
=
IndustryClass
.
builder
().
id
(
industry
).
build
().
selectById
().
getName
();
// 行业名
String
industryName
=
IndustryClass
.
builder
().
id
(
industry
).
build
().
selectById
().
getName
();
// 行业名
crmClientData
.
setIndustryName
(
industryName
);
crmClientData
.
setIndustryName
(
industryName
);
}
}
...
@@ -417,11 +417,14 @@ public class CrmController {
...
@@ -417,11 +417,14 @@ public class CrmController {
return
ResultUtil
.
error
(
"新增失败"
);
return
ResultUtil
.
error
(
"新增失败"
);
Integer
crmDataId
=
crmClientData
.
getId
();
Integer
crmDataId
=
crmClientData
.
getId
();
Integer
[]
ids
=
crmClientData
.
getIds
();
Integer
[]
ids
=
crmClientData
.
getIds
();
if
(
ids
!=
null
)
{
for
(
Integer
id
:
ids
)
{
for
(
Integer
id
:
ids
)
{
CrmClientAssociate
.
builder
().
cid
(
crmDataId
).
associateId
(
id
).
orgCode
(
getOrgCode
(
userBean
)).
build
().
insert
();
CrmClientAssociate
.
builder
().
cid
(
crmDataId
).
associateId
(
id
).
orgCode
(
getOrgCode
(
userBean
)).
build
().
insert
();
}
}
}
List
<
CrmClientContacts
>
crmClientContacts
=
crmClientData
.
getCrmClientContacts
();
List
<
CrmClientContacts
>
crmClientContacts
=
crmClientData
.
getCrmClientContacts
();
int
contactsnum
=
0
;
int
contactsnum
=
0
;
if
(
crmClientContacts
!=
null
)
{
for
(
CrmClientContacts
crmClientContact
:
crmClientContacts
)
{
for
(
CrmClientContacts
crmClientContact
:
crmClientContacts
)
{
if
(
crmClientContact
.
getName
()
!=
null
)
{
if
(
crmClientContact
.
getName
()
!=
null
)
{
crmClientContact
.
setCid
(
crmDataId
);
crmClientContact
.
setCid
(
crmDataId
);
...
@@ -429,6 +432,7 @@ public class CrmController {
...
@@ -429,6 +432,7 @@ public class CrmController {
contactsnum
++;
contactsnum
++;
}
}
}
}
}
crmClientData
.
setContactsNum
(
contactsnum
);
crmClientData
.
setContactsNum
(
contactsnum
);
crmClientData
.
updateById
();
crmClientData
.
updateById
();
return
ResultUtil
.
success
(
"新增成功"
);
return
ResultUtil
.
success
(
"新增成功"
);
...
@@ -474,6 +478,7 @@ public class CrmController {
...
@@ -474,6 +478,7 @@ public class CrmController {
CrmClientAssociate
.
builder
().
cid
(
cid
).
associateId
(
id
).
orgCode
(
getOrgCode
(
userBean
)).
build
().
insert
();
CrmClientAssociate
.
builder
().
cid
(
cid
).
associateId
(
id
).
orgCode
(
getOrgCode
(
userBean
)).
build
().
insert
();
}
}
crmClientData
.
setModifyUser
(
getEmpNum
(
userBean
));
crmClientData
.
setModifyUser
(
getEmpNum
(
userBean
));
crmClientData
.
setOrgCode
(
userBean
.
getOrgCode
());
if
(
crmClientData
.
updateById
())
if
(
crmClientData
.
updateById
())
return
ResultUtil
.
success
(
"编辑成功"
);
return
ResultUtil
.
success
(
"编辑成功"
);
return
ResultUtil
.
error
(
"编辑失败"
);
return
ResultUtil
.
error
(
"编辑失败"
);
...
@@ -503,16 +508,16 @@ public class CrmController {
...
@@ -503,16 +508,16 @@ public class CrmController {
// 归属我的客户
// 归属我的客户
private
List
<
CrmClientData
>
getMyCilent
(
Integer
empNum
,
Integer
orgCode
,
Integer
groupId
,
Integer
status
,
private
List
<
CrmClientData
>
getMyCilent
(
Integer
empNum
,
Integer
orgCode
,
Integer
groupId
,
Integer
status
,
String
like
,
String
startCreateTime
,
String
endCreateTime
,
String
startFollowTime
,
String
endFollowTime
)
{
String
like
,
String
startCreateTime
,
String
endCreateTime
,
String
startFollowTime
,
String
endFollowTime
,
Integer
typei
)
{
return
CrmClientData
.
builder
().
build
()
return
CrmClientData
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
.
eq
(
CrmClientData:
:
getBelongUser
,
empNum
)
.
eq
(
CrmClientData:
:
getBelongUser
,
empNum
)
.
eq
(
groupId
!=
null
&&
groupId
>
=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
groupId
!=
null
&&
groupId
>
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
status
!=
null
&&
status
>
=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
eq
(
status
!=
null
&&
status
>
0
,
CrmClientData:
:
getClientStatus
,
status
).
eq
(
typei
!=
null
&&
typei
>
0
,
CrmClientData:
:
getClientType
,
typei
)
.
ge
(
StringUtils
.
isNotBlank
(
startCreateTime
),
CrmClientData:
:
getCreateTime
,
startCreateTime
)
.
ge
(
StringUtils
.
isNotBlank
(
startCreateTime
),
CrmClientData:
:
getCreateTime
,
startCreateTime
)
.
le
(
StringUtils
.
isNotBlank
(
endCreateTime
),
CrmClientData:
:
getCreateTime
,
endCreateTime
)
.
le
(
StringUtils
.
isNotBlank
(
endCreateTime
),
CrmClientData:
:
getCreateTime
,
endCreateTime
)
.
ge
(
StringUtils
.
isNotBlank
(
startFollowTime
),
CrmClientData:
:
getCreateTime
,
startFollowTime
)
.
ge
(
StringUtils
.
isNotBlank
(
startFollowTime
),
CrmClientData:
:
getCreateTime
,
startFollowTime
)
.
le
(
StringUtils
.
isNotBlank
(
endFollowTime
),
CrmClientData:
:
getCreateTime
,
endFollowTime
)
.
le
(
StringUtils
.
isNotBlank
(
endFollowTime
),
CrmClientData:
:
getCreateTime
,
endFollowTime
)
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getBelongUserName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
)
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
)
.
orderByDesc
(
CrmClientData:
:
getCreateTime
));
.
orderByDesc
(
CrmClientData:
:
getCreateTime
));
...
@@ -541,21 +546,21 @@ public class CrmController {
...
@@ -541,21 +546,21 @@ public class CrmController {
// 我的全部客户
// 我的全部客户
private
List
<
CrmClientData
>
getMyTotalCilent
(
Integer
empNum
,
Integer
orgCode
,
Integer
groupId
,
Integer
status
,
private
List
<
CrmClientData
>
getMyTotalCilent
(
Integer
empNum
,
Integer
orgCode
,
Integer
groupId
,
Integer
status
,
String
like
)
{
String
like
,
Integer
type
)
{
return
CheckUtil
.
distinct
(
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
,
null
,
null
,
null
,
null
),
return
CheckUtil
.
distinct
(
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
,
null
,
null
,
null
,
null
,
null
),
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
),
true
);
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
),
true
);
}
}
// 我关注的客户
// 我关注的客户
private
List
<
CrmClientData
>
getMyStarCilent
(
Integer
empNum
,
Integer
orgCode
,
Integer
groupId
,
Integer
status
)
{
private
List
<
CrmClientData
>
getMyStarCilent
(
Integer
empNum
,
Integer
orgCode
,
Integer
groupId
,
Integer
status
,
Integer
type
)
{
return
getMyTotalCilent
(
empNum
,
orgCode
,
groupId
,
status
,
null
).
stream
()
return
getMyTotalCilent
(
empNum
,
orgCode
,
groupId
,
status
,
null
,
null
).
stream
()
.
filter
(
item
->
item
.
getStar
().
equals
(
1
)).
collect
(
Collectors
.
toList
());
.
filter
(
item
->
item
.
getStar
().
equals
(
1
)).
collect
(
Collectors
.
toList
());
}
}
// 七天未跟进的客户
// 七天未跟进的客户
private
List
<
CrmClientData
>
getCilentFollowOvertime
(
Integer
empNum
,
Integer
orgCode
,
Integer
groupId
,
private
List
<
CrmClientData
>
getCilentFollowOvertime
(
Integer
empNum
,
Integer
orgCode
,
Integer
groupId
,
Integer
status
)
{
Integer
status
,
Integer
type
)
{
return
getMyTotalCilent
(
empNum
,
orgCode
,
groupId
,
status
,
null
).
stream
()
return
getMyTotalCilent
(
empNum
,
orgCode
,
groupId
,
status
,
null
,
null
).
stream
()
.
filter
(
item
->
item
.
getLastFollowTime
()
!=
null
.
filter
(
item
->
item
.
getLastFollowTime
()
!=
null
&&
item
.
getLastFollowTime
().
before
(
DateUtil
.
offsetDay
(
new
Date
(),
-
7
)))
&&
item
.
getLastFollowTime
().
before
(
DateUtil
.
offsetDay
(
new
Date
(),
-
7
)))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
...
@@ -570,7 +575,7 @@ public class CrmController {
...
@@ -570,7 +575,7 @@ public class CrmController {
@GetMapping
(
"getMyCilentTotal"
)
@GetMapping
(
"getMyCilentTotal"
)
@ApiOperation
(
value
=
"获取我的客户列表(全)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"获取我的客户列表(全)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
CrmClientData
>>
getMyCilentTotal
(
@CurrentUser
UserBean
userBean
,
public
Result
<
List
<
CrmClientData
>>
getMyCilentTotal
(
@CurrentUser
UserBean
userBean
,
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
required
=
false
)
Integer
type
,
@RequestParam
(
required
=
false
)
Integer
groupId
,
@RequestParam
(
required
=
false
)
Integer
status
,
@RequestParam
(
required
=
false
)
Integer
groupId
,
@RequestParam
(
required
=
false
)
Integer
status
,
@RequestParam
(
required
=
false
)
String
like
,
@RequestParam
(
required
=
false
)
String
like
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
int
pageNumber
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
int
pageNumber
,
...
@@ -578,12 +583,13 @@ public class CrmController {
...
@@ -578,12 +583,13 @@ public class CrmController {
@RequestParam
(
required
=
false
)
String
startCreateTime
,
@RequestParam
(
required
=
false
)
String
startCreateTime
,
@RequestParam
(
required
=
false
)
String
endCreateTime
,
@RequestParam
(
required
=
false
)
String
endCreateTime
,
@RequestParam
(
required
=
false
)
String
startFollowTime
,
@RequestParam
(
required
=
false
)
String
startFollowTime
,
@RequestParam
(
required
=
false
)
String
endFollowTime
)
{
@RequestParam
(
required
=
false
)
String
endFollowTime
,
@RequestParam
(
required
=
false
)
Integer
typei
)
{
if
(
endCreateTime
!=
null
)
{
if
(
endCreateTime
!=
null
&&
!(
""
).
equals
(
endCreateTime
)
)
{
endCreateTime
=
endCreateTime
.
substring
(
0
,
10
)+
" 23:59:59"
;
endCreateTime
=
endCreateTime
.
substring
(
0
,
10
)+
" 23:59:59"
;
}
}
if
(
endFollowTime
!=
null
)
{
if
(
endFollowTime
!=
null
&&
!(
""
).
equals
(
endFollowTime
)
)
{
endFollowTime
=
endFollowTime
.
substring
(
0
,
10
)+
" 23:59:59"
;
endFollowTime
=
endFollowTime
.
substring
(
0
,
10
)+
" 23:59:59"
;
}
}
...
@@ -591,18 +597,18 @@ public class CrmController {
...
@@ -591,18 +597,18 @@ public class CrmController {
Integer
orgCode
=
getOrgCode
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
List
<
CrmClientData
>
crmClientDatas
=
null
;
List
<
CrmClientData
>
crmClientDatas
=
null
;
if
(
type
==
null
||
type
==
0
)
{
// 全部客户(去重)
if
(
type
==
null
||
type
==
0
)
{
// 全部客户(去重)
List
<
CrmClientData
>
myClient
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
,
startCreateTime
,
endCreateTime
,
startFollowTime
,
endFollowTime
);
List
<
CrmClientData
>
myClient
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
,
startCreateTime
,
endCreateTime
,
startFollowTime
,
endFollowTime
,
typei
);
List
<
CrmClientData
>
myAsso
=
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
List
<
CrmClientData
>
myAsso
=
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
crmClientDatas
=
CheckUtil
.
distinct
(
myClient
,
myAsso
,
true
).
stream
()
crmClientDatas
=
CheckUtil
.
distinct
(
myClient
,
myAsso
,
true
).
stream
()
.
filter
(
CheckUtil
.
distinctByKey
(
CrmClientData:
:
getId
)).
collect
(
Collectors
.
toList
());
.
filter
(
CheckUtil
.
distinctByKey
(
CrmClientData:
:
getId
)).
collect
(
Collectors
.
toList
());
}
else
if
(
type
==
1
)
// 我负责的客户
}
else
if
(
type
==
1
)
// 我负责的客户
crmClientDatas
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
,
startCreateTime
,
endCreateTime
,
startFollowTime
,
endFollowTime
);
crmClientDatas
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
,
startCreateTime
,
endCreateTime
,
startFollowTime
,
endFollowTime
,
type
);
else
if
(
type
==
2
)
// 我协作的客户
else
if
(
type
==
2
)
// 我协作的客户
crmClientDatas
=
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
crmClientDatas
=
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
else
if
(
type
==
3
)
// 我关注的客户
else
if
(
type
==
3
)
// 我关注的客户
crmClientDatas
=
getMyStarCilent
(
empNum
,
orgCode
,
groupId
,
status
);
crmClientDatas
=
getMyStarCilent
(
empNum
,
orgCode
,
groupId
,
status
,
type
);
else
if
(
type
==
4
)
// 七天未跟进的客户
else
if
(
type
==
4
)
// 七天未跟进的客户
crmClientDatas
=
getCilentFollowOvertime
(
empNum
,
orgCode
,
groupId
,
status
);
crmClientDatas
=
getCilentFollowOvertime
(
empNum
,
orgCode
,
groupId
,
status
,
type
);
else
else
return
ResultUtil
.
error
(
"查询失败"
);
return
ResultUtil
.
error
(
"查询失败"
);
// Collections.sort(crmClientDatas, Comparator.comparing(CrmClientData::getCreateTime).reversed()); // 按时间降序排序
// Collections.sort(crmClientDatas, Comparator.comparing(CrmClientData::getCreateTime).reversed()); // 按时间降序排序
...
@@ -703,7 +709,7 @@ public class CrmController {
...
@@ -703,7 +709,7 @@ public class CrmController {
@ApiOperation
(
value
=
"获取所有客户列表(全)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"获取所有客户列表(全)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getAllCilentTotal
(
@CurrentUser
UserBean
userBean
,
public
Result
<
Object
>
getAllCilentTotal
(
@CurrentUser
UserBean
userBean
,
@RequestParam
(
required
=
false
)
Integer
type
,
@RequestParam
(
required
=
false
)
Integer
groupId
,
@RequestParam
(
required
=
false
)
Integer
type
,
@RequestParam
(
required
=
false
)
Integer
groupId
,
@RequestParam
(
required
=
false
)
Integer
status
,
@RequestParam
(
required
=
false
)
String
like
,
@RequestParam
(
required
=
false
)
Integer
status
,
@RequestParam
(
required
=
false
)
String
like
,
@RequestParam
(
required
=
false
)
String
customerowner
,
@RequestParam
(
required
=
false
)
String
startCreateTime
,
@RequestParam
(
required
=
false
)
String
startCreateTime
,
@RequestParam
(
required
=
false
)
String
endCreateTime
,
@RequestParam
(
required
=
false
)
String
endCreateTime
,
@RequestParam
(
required
=
false
)
String
startFollowTime
,
@RequestParam
(
required
=
false
)
String
startFollowTime
,
...
@@ -714,6 +720,13 @@ public class CrmController {
...
@@ -714,6 +720,13 @@ public class CrmController {
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
if
(
endCreateTime
!=
null
&&
!(
""
).
equals
(
endCreateTime
))
{
endCreateTime
=
endCreateTime
.
substring
(
0
,
10
)+
" 23:59:59"
;
}
if
(
endFollowTime
!=
null
&&
!(
""
).
equals
(
endFollowTime
))
{
endFollowTime
=
endFollowTime
.
substring
(
0
,
10
)+
" 23:59:59"
;
}
// YgglMainEmp yg = YgglMainEmp.builder().build()
// YgglMainEmp yg = YgglMainEmp.builder().build()
// .selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, orgCode)
// .selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, orgCode)
// .eq(YgglMainEmp::getEmpNum, empNum).select(YgglMainEmp::getIsManager));
// .eq(YgglMainEmp::getEmpNum, empNum).select(YgglMainEmp::getIsManager));
...
@@ -746,7 +759,7 @@ public class CrmController {
...
@@ -746,7 +759,7 @@ public class CrmController {
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
like
(!
StrUtil
.
isBlank
(
customerowner
),
CrmClientData:
:
getBelongUserName
,
customerowner
)
.
ge
(
StringUtils
.
isNotBlank
(
startCreateTime
),
CrmClientData:
:
getCreateTime
,
startCreateTime
)
.
ge
(
StringUtils
.
isNotBlank
(
startCreateTime
),
CrmClientData:
:
getCreateTime
,
startCreateTime
)
.
le
(
StringUtils
.
isNotBlank
(
endCreateTime
),
CrmClientData:
:
getCreateTime
,
endCreateTime
)
.
le
(
StringUtils
.
isNotBlank
(
endCreateTime
),
CrmClientData:
:
getCreateTime
,
endCreateTime
)
.
ge
(
StringUtils
.
isNotBlank
(
startFollowTime
),
CrmClientData:
:
getCreateTime
,
startFollowTime
)
.
ge
(
StringUtils
.
isNotBlank
(
startFollowTime
),
CrmClientData:
:
getCreateTime
,
startFollowTime
)
...
@@ -766,7 +779,7 @@ public class CrmController {
...
@@ -766,7 +779,7 @@ public class CrmController {
datas
=
CrmClientData
.
builder
().
build
().
selectPage
(
page
,
datas
=
CrmClientData
.
builder
().
build
().
selectPage
(
page
,
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
like
(!
StrUtil
.
isBlank
(
customerowner
),
CrmClientData:
:
getBelongUserName
,
customerowner
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
).
in
(
CrmClientData:
:
getBelongGroup
,
keywordStr
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
).
in
(
CrmClientData:
:
getBelongGroup
,
keywordStr
)
.
ge
(
StringUtils
.
isNotBlank
(
startCreateTime
),
CrmClientData:
:
getCreateTime
,
startCreateTime
)
.
ge
(
StringUtils
.
isNotBlank
(
startCreateTime
),
CrmClientData:
:
getCreateTime
,
startCreateTime
)
.
le
(
StringUtils
.
isNotBlank
(
endCreateTime
),
CrmClientData:
:
getCreateTime
,
endCreateTime
)
.
le
(
StringUtils
.
isNotBlank
(
endCreateTime
),
CrmClientData:
:
getCreateTime
,
endCreateTime
)
...
@@ -1455,7 +1468,7 @@ public class CrmController {
...
@@ -1455,7 +1468,7 @@ public class CrmController {
}
}
crmClientData
.
setClientStatus
(
1
);
crmClientData
.
setClientStatus
(
1
);
if
(
linknam
e
!=
null
)
{
if
(
!(
""
).
equals
(
linkname
)
&&
linkname
!=
null
||
!(
""
).
equals
(
linkcellphone
)
&&
linkcellphon
e
!=
null
)
{
crmClientData
.
setContactsNum
(
1
);
crmClientData
.
setContactsNum
(
1
);
}
}
crmClientData
.
setBelongUser
(
empNum
);
crmClientData
.
setBelongUser
(
empNum
);
...
@@ -1480,7 +1493,7 @@ public class CrmController {
...
@@ -1480,7 +1493,7 @@ public class CrmController {
Integer
cid
=
crmClientData
.
getId
();
Integer
cid
=
crmClientData
.
getId
();
if
(
linknam
e
!=
null
)
{
if
(
!(
""
).
equals
(
linkname
)
&&
linkname
!=
null
||
!(
""
).
equals
(
linkcellphone
)
&&
linkcellphon
e
!=
null
)
{
CrmClientContacts
contacts
=
new
CrmClientContacts
();
CrmClientContacts
contacts
=
new
CrmClientContacts
();
contacts
.
setName
(
linkname
);
contacts
.
setName
(
linkname
);
contacts
.
setCellphone
(
linkcellphone
);
contacts
.
setCellphone
(
linkcellphone
);
...
...
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
b1546998
...
@@ -95,9 +95,11 @@ import cn.timer.api.dao.kqgl.ShiftManagementMapper;
...
@@ -95,9 +95,11 @@ import cn.timer.api.dao.kqgl.ShiftManagementMapper;
import
cn.timer.api.dao.kqgl.SpecialDateMapper
;
import
cn.timer.api.dao.kqgl.SpecialDateMapper
;
import
cn.timer.api.dao.kqgl.UserAttendanceRelMapper
;
import
cn.timer.api.dao.kqgl.UserAttendanceRelMapper
;
import
cn.timer.api.dao.kqgl.UserEquiRelationMapper
;
import
cn.timer.api.dao.kqgl.UserEquiRelationMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoPbmxMapper
;
import
cn.timer.api.dao.kqmk.KqglMainKqzMapper
;
import
cn.timer.api.dao.kqmk.KqglMainKqzMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
import
cn.timer.api.dto.kqmk.KqglAssoPbmxDto
;
import
cn.timer.api.dto.kqmk.KqglMainKqzDto
;
import
cn.timer.api.dto.kqmk.KqglMainKqzDto
;
import
cn.timer.api.utils.DateUtil
;
import
cn.timer.api.utils.DateUtil
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.Result
;
...
@@ -314,6 +316,10 @@ public class AttController {
...
@@ -314,6 +316,10 @@ public class AttController {
return
ResultUtil
.
data
(
shifs
);
return
ResultUtil
.
data
(
shifs
);
}
}
@Autowired
private
KqglAssoPbmxMapper
kqglassopbmxmapper
;
/**
/**
* 修改考勤组排班(修改排班后,需判断是否有打卡记录,有则匹配当天修改后的班次,无则不需要修改)
* 修改考勤组排班(修改排班后,需判断是否有打卡记录,有则匹配当天修改后的班次,无则不需要修改)
*/
*/
...
@@ -327,12 +333,35 @@ public class AttController {
...
@@ -327,12 +333,35 @@ public class AttController {
int
qyid
=
userBean
.
getOrgCode
();
//坏小孩【企业id】
int
qyid
=
userBean
.
getOrgCode
();
//坏小孩【企业id】
int
userid
=
userBean
.
getEmpNum
();
//用户id
int
userid
=
userBean
.
getEmpNum
();
//用户id
AttendanceGroup
qttgrop
=
attendancegroupservice
.
selectByPrimaryKey
(
Integer
.
valueOf
(
attass
.
getAttgroupid
()));
String
dastr
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
()).
toString
();
//
AttendanceGroup
qttgrop
=
attendancegroupservice
.
selectByPrimaryKey
(
Integer
.
valueOf
(
attass
.
getAttgroupid
()));
boolean
xiugai
=
true
;
//记录排班(排班制)
//记录排班(排班制)
List
<
Schedule
>
schlist
=
new
ArrayList
<
Schedule
>();
List
<
Schedule
>
schlist
=
new
ArrayList
<
Schedule
>();
Schedule
[]
schedules
=
attass
.
getSchedules
();
// 排班日期【排班制】--班次id、日期
Schedule
[]
schedules
=
attass
.
getSchedules
();
// 排班日期【排班制】--班次id、日期
if
(
schedules
.
length
>
0
&&
attass
.
getAtttype
()
==
2
){
if
(
schedules
.
length
>
0
&&
attass
.
getAtttype
()
==
2
){
String
date
=
String
.
valueOf
(
schedules
[
0
].
getData
());
Date
dt
=
new
Date
(
date
);
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
System
.
out
.
println
(
famt
.
format
(
dt
));
if
(!(
famt
.
format
(
dt
)).
equals
(
dastr
))
{
xiugai
=
false
;
for
(
int
p
=
0
;
p
<
schedules
.
length
;
p
++){
Schedule
sch
=
new
Schedule
();
sch
.
setUserid
(
schedules
[
p
].
getUserid
());
//用户id
sch
.
setData
(
schedules
[
p
].
getData
());
//排班日期 格式:yyyy-MM-dd
sch
.
setBcid
(
schedules
[
p
].
getBcid
());
//班次id 0为休息
sch
.
setKqzid
(
Integer
.
valueOf
(
attass
.
getAttgroupid
()));
//考勤组id
schlist
.
add
(
sch
);
}
if
(
schlist
.
size
()>
0
){
scheduleservice
.
insertKqglAssoPbmxList
(
schlist
);
}
}
else
{
xiugai
=
true
;
for
(
int
p
=
0
;
p
<
schedules
.
length
;
p
++){
for
(
int
p
=
0
;
p
<
schedules
.
length
;
p
++){
Schedule
sch
=
new
Schedule
();
Schedule
sch
=
new
Schedule
();
sch
.
setUserid
(
schedules
[
p
].
getUserid
());
//用户id
sch
.
setUserid
(
schedules
[
p
].
getUserid
());
//用户id
...
@@ -1102,15 +1131,17 @@ public class AttController {
...
@@ -1102,15 +1131,17 @@ public class AttController {
/***********************/
/***********************/
}
}
}
//判断新增或修改
}
}
if
(
schlist
.
size
()>
0
){
if
(
schlist
.
size
()>
0
&&
xiugai
){
//删除排班明细表(自由排班)
//删除排班明细表(自由排班)
scheduleservice
.
deleteByPrimaryBykqzid
(
id
);
scheduleservice
.
deleteByPrimaryBykqzid
(
id
);
scheduleservice
.
insertKqglAssoPbmxList
(
schlist
);
scheduleservice
.
insertKqglAssoPbmxList
(
schlist
);
return
ResultUtil
.
data
(
schlist
,
"修改考勤组排班成功"
);
return
ResultUtil
.
data
(
schlist
,
"修改考勤组排班成功"
);
}
}
return
ResultUtil
.
error
(
"修改考勤组排班失败"
);
return
ResultUtil
.
data
(
schlist
,
"修改考勤组排班成功"
);
// return ResultUtil.error("修改考勤组排班失败");
}
}
/**
/**
...
...
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
b1546998
...
@@ -3927,7 +3927,7 @@ public class ClockInController {
...
@@ -3927,7 +3927,7 @@ public class ClockInController {
}
}
}
}
if
(!(
nextrange
[
0
]).
equals
(
""
))
{
for
(
String
nus
:
nextrange
)
{
for
(
String
nus
:
nextrange
)
{
WorkbenchCalendarDto
wocal
=
WorkbenchCalendarDto
.
builder
().
build
();
WorkbenchCalendarDto
wocal
=
WorkbenchCalendarDto
.
builder
().
build
();
wocal
.
setDate
(
nus
);
wocal
.
setDate
(
nus
);
...
@@ -3947,6 +3947,8 @@ public class ClockInController {
...
@@ -3947,6 +3947,8 @@ public class ClockInController {
workcal
.
add
(
wocal
);
workcal
.
add
(
wocal
);
}
}
}
}
}
}
else
{
}
else
{
...
...
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