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
11fef7ed
Commit
11fef7ed
authored
Mar 09, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature_20220222_huayi
parents
c087099c
42eff639
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
357 additions
and
59 deletions
+357
-59
src/main/java/cn/timer/api/controller/disk/DiskCatalogueController.java
+85
-47
src/main/java/cn/timer/api/controller/disk/sevice/DiskCatalogueService.java
+17
-0
src/main/java/cn/timer/api/controller/disk/sevice/DiskCatalogueServiceImpl.java
+38
-0
src/main/java/cn/timer/api/controller/disk/sevice/DiskFilesService.java
+8
-0
src/main/java/cn/timer/api/controller/disk/sevice/DiskFilesServiceImpl.java
+5
-0
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
+162
-2
src/main/java/cn/timer/api/dao/disk/DiskCatalogueMapper.java
+11
-2
src/main/java/cn/timer/api/dao/disk/DiskFilesMapper.java
+9
-2
src/main/resources/mapping/disk/DiskCatalogueMapper.xml
+10
-2
src/main/resources/mapping/disk/DiskCloudDiskUserMapper.xml
+3
-2
src/main/resources/mapping/disk/DiskFilesMapper.xml
+9
-2
No files found.
src/main/java/cn/timer/api/controller/disk/DiskCatalogueController.java
View file @
11fef7ed
...
@@ -355,6 +355,8 @@ public class DiskCatalogueController {
...
@@ -355,6 +355,8 @@ public class DiskCatalogueController {
boolean
flag
=
diskCatalogue
.
updateById
();
boolean
flag
=
diskCatalogue
.
updateById
();
if
(
flag
){
if
(
flag
){
//资源上传文件 资源目录,上传文件中间关系
diskCatalogueService
.
updateDiskCatalogue
(
diskCatalogue
);
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
}
else
{
}
else
{
return
ResultUtil
.
error
(
"操作失败!"
);
return
ResultUtil
.
error
(
"操作失败!"
);
...
@@ -389,7 +391,7 @@ public class DiskCatalogueController {
...
@@ -389,7 +391,7 @@ public class DiskCatalogueController {
@GetMapping
(
value
=
"/getFileById"
)
@GetMapping
(
value
=
"/getFileById"
)
@ApiOperation
(
value
=
"查看用户文件夹列表"
,
httpMethod
=
"GET"
,
notes
=
"文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperation
(
value
=
"查看用户文件夹列表"
,
httpMethod
=
"GET"
,
notes
=
"文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperationSupport
(
order
=
2
)
@ApiOperationSupport
(
order
=
2
)
public
Result
<
Object
>
getFile
Of
Id
(
@CurrentUser
UserBean
userBean
,
DiskCatalogueParam
diskCatalogueParam
)
{
public
Result
<
Object
>
getFile
By
Id
(
@CurrentUser
UserBean
userBean
,
DiskCatalogueParam
diskCatalogueParam
)
{
diskCatalogueParam
.
setOrgId
(
userBean
.
getOrgCode
());
diskCatalogueParam
.
setOrgId
(
userBean
.
getOrgCode
());
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
diskCatalogueParam
.
getUserId
()));
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
diskCatalogueParam
.
getUserId
()));
// 获取文件夹
// 获取文件夹
...
@@ -443,11 +445,12 @@ public class DiskCatalogueController {
...
@@ -443,11 +445,12 @@ public class DiskCatalogueController {
return
ResultUtil
.
data
(
map
);
return
ResultUtil
.
data
(
map
);
}
}
@GetMapping
(
value
=
"/deleteAlLFile"
)
@GetMapping
(
value
=
"/deleteAlLFile"
)
@ApiOperation
(
value
=
"删除用户下的所有文件夹"
,
httpMethod
=
"GET"
,
notes
=
"文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperation
(
value
=
"删除用户下的所有文件夹"
,
httpMethod
=
"GET"
,
notes
=
"文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperationSupport
(
order
=
2
)
@ApiOperationSupport
(
order
=
2
)
@Log
(
title
=
"删除用户下的所有文件夹"
,
businessType
=
BusinessType
.
OTHER
)
@Log
(
title
=
"删除用户下的所有文件夹"
,
businessType
=
BusinessType
.
OTHER
)
p
rivate
Result
<
Object
>
deleteAlLFile
(
@CurrentUser
UserBean
userBean
,
DiskCatalogueParam
diskCatalogueParam
){
p
ublic
Result
<
Object
>
deleteAlLFile
(
@CurrentUser
UserBean
userBean
,
DiskCatalogueParam
diskCatalogueParam
){
List
<
DiskCatalogue
>
diskCatalogueList
=
DiskCatalogue
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
DiskCatalogue
>().
lambda
()
List
<
DiskCatalogue
>
diskCatalogueList
=
DiskCatalogue
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
DiskCatalogue
>().
lambda
()
.
eq
(
DiskCatalogue:
:
getCreateUserId
,
diskCatalogueParam
.
getUserId
())
.
eq
(
DiskCatalogue:
:
getCreateUserId
,
diskCatalogueParam
.
getUserId
())
.
eq
(
DiskCatalogue:
:
getParentId
,
0
)
.
eq
(
DiskCatalogue:
:
getParentId
,
0
)
...
@@ -455,57 +458,92 @@ public class DiskCatalogueController {
...
@@ -455,57 +458,92 @@ public class DiskCatalogueController {
if
(
diskCatalogueList
.
size
()<=
0
){
if
(
diskCatalogueList
.
size
()<=
0
){
return
ResultUtil
.
error
(
"该用户下没有文件"
);
return
ResultUtil
.
error
(
"该用户下没有文件"
);
}
}
/*查找ids第一个*/
diskCatalogueList
.
forEach
(
d
->{
diskCatalogueList
.
forEach
(
d
->{
getSubCatalogueList
(
d
.
getId
());
List
<
DiskCatalogue
>
subList
=
diskCatalogueService
.
getSubCatalogueList
(
d
.
getId
().
toString
(),
diskCatalogueParam
.
getUserId
());
//所有的子文件夹
if
(
subList
!=
null
)
{
subList
.
forEach
(
s
->
{
List
<
DiskCatalogueFiles
>
diskCatalogueFilesList
=
DiskCatalogueFiles
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
DiskCatalogueFiles
>().
lambda
()
.
eq
(
DiskCatalogueFiles:
:
getCatalogueId
,
s
.
getId
())
.
eq
(
DiskCatalogueFiles:
:
getDeleteFlag
,
0
));
if
(
diskCatalogueFilesList
.
size
()
>
0
)
{
diskFilesService
.
deleteDiskFile
(
diskCatalogueFilesList
.
stream
().
map
(
DiskCatalogueFiles:
:
getFilesId
).
collect
(
Collectors
.
toList
()));
}
});
}
d
.
setDeleteFlag
(
1
);
d
.
setDeleteFlag
(
1
);
d
.
updateById
();
d
.
updateById
();
});
});
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
}
}
private
void
getSubCatalogueList
(
Integer
id
){
List
<
DiskCatalogue
>
subFileList
=
DiskCatalogue
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
DiskCatalogue
>().
lambda
()
.
like
(
DiskCatalogue:
:
getParentId
,
id
)
.
eq
(
DiskCatalogue:
:
getDeleteFlag
,
0
));
subFileList
.
forEach
(
s
->{
if
(
subFileList
.
size
()>
0
){
getSubCatalogueList
(
s
.
getId
());
}
List
<
DiskCatalogueFiles
>
diskCatalogueFilesList
=
DiskCatalogueFiles
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
DiskCatalogueFiles
>().
lambda
()
.
eq
(
DiskCatalogueFiles:
:
getCatalogueId
,
s
.
getId
())
.
eq
(
DiskCatalogueFiles:
:
getDeleteFlag
,
0
));
diskCatalogueFilesList
.
forEach
(
f
->{
DiskFiles
.
builder
().
deleteFlag
(
1
).
build
().
update
(
new
QueryWrapper
<
DiskFiles
>().
lambda
().
eq
(
DiskFiles:
:
getId
,
f
.
getFilesId
()));
f
.
setDeleteFlag
(
1
);
f
.
updateById
();
});
s
.
setDeleteFlag
(
1
);
s
.
updateById
();
});
}
// private void getSubCatalogueList2(Integer id){
// List<DiskCatalogue> subFileList =DiskCatalogue.builder().build().selectList(new QueryWrapper<DiskCatalogue>().lambda()
// .like(DiskCatalogue::getParentId,id)
// .eq(DiskCatalogue::getDeleteFlag,0));
// subFileList.forEach(s->{
// if(subFileList.size()>0){
// getSubCatalogueList(s.getId());
// }
// List<DiskCatalogueFiles> diskCatalogueFilesList = DiskCatalogueFiles.builder().build().selectList(new QueryWrapper<DiskCatalogueFiles>().lambda()
// .eq(DiskCatalogueFiles::getCatalogueId,s.getId())
// .eq(DiskCatalogueFiles::getDeleteFlag,0));
// if(diskCatalogueFilesList!=null) {
// if(diskCatalogueFilesList.size()>0) {
// diskFilesService.deleteDiskFile(diskCatalogueFilesList.stream().map(DiskCatalogueFiles::getFilesId).collect(Collectors.toList()));
// }
// }
//// diskCatalogueFilesList.forEach(f->{
//// DiskFiles.builder().deleteFlag(1).build().update(new QueryWrapper<DiskFiles>().lambda().eq(DiskFiles::getId,f.getFilesId()));
//// });
// s.setDeleteFlag(1);
// s.updateById();
// });
// }
}
}
src/main/java/cn/timer/api/controller/disk/sevice/DiskCatalogueService.java
View file @
11fef7ed
...
@@ -2,6 +2,7 @@ package cn.timer.api.controller.disk.sevice;
...
@@ -2,6 +2,7 @@ package cn.timer.api.controller.disk.sevice;
import
cn.timer.api.bean.disk.DiskCatalogue
;
import
cn.timer.api.bean.disk.DiskCatalogue
;
import
cn.timer.api.dto.disk.DiskCatalogueParam
;
import
cn.timer.api.dto.disk.DiskCatalogueParam
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -27,4 +28,20 @@ public interface DiskCatalogueService {
...
@@ -27,4 +28,20 @@ public interface DiskCatalogueService {
* @return
* @return
*/
*/
List
<
DiskCatalogue
>
getDiskCatalogue
(
DiskCatalogueParam
diskCatalogueParam
);
List
<
DiskCatalogue
>
getDiskCatalogue
(
DiskCatalogueParam
diskCatalogueParam
);
/**
* 获取所有子文件夹
* @param ids
* @return
*/
List
<
DiskCatalogue
>
getSubCatalogueList
(
String
ids
,
Integer
userId
);
/**
* 逻辑删除 文件夹,空间 ,中间关系以及文件
* @param diskCatalogue
* @return Boolean
*/
boolean
updateDiskCatalogue
(
DiskCatalogue
diskCatalogue
);
}
}
src/main/java/cn/timer/api/controller/disk/sevice/DiskCatalogueServiceImpl.java
View file @
11fef7ed
...
@@ -2,10 +2,12 @@ package cn.timer.api.controller.disk.sevice;
...
@@ -2,10 +2,12 @@ package cn.timer.api.controller.disk.sevice;
import
cn.timer.api.bean.disk.DiskCatalogue
;
import
cn.timer.api.bean.disk.DiskCatalogue
;
import
cn.timer.api.bean.disk.DiskCatalogueFiles
;
import
cn.timer.api.bean.disk.DiskCatalogueFiles
;
import
cn.timer.api.bean.disk.DiskFileImage
;
import
cn.timer.api.bean.disk.DiskFiles
;
import
cn.timer.api.bean.disk.DiskFiles
;
import
cn.timer.api.dao.disk.DiskCatalogueMapper
;
import
cn.timer.api.dao.disk.DiskCatalogueMapper
;
import
cn.timer.api.dto.disk.DiskCatalogueParam
;
import
cn.timer.api.dto.disk.DiskCatalogueParam
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -70,6 +72,42 @@ public class DiskCatalogueServiceImpl implements DiskCatalogueService {
...
@@ -70,6 +72,42 @@ public class DiskCatalogueServiceImpl implements DiskCatalogueService {
return
null
;
return
null
;
}
}
@Override
public
boolean
updateDiskCatalogue
(
DiskCatalogue
diskCatalogue
)
{
List
<
Integer
>
ids
=
diskCatalogueMapper
.
selectIdListById
(
diskCatalogue
.
getId
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
return
true
;
}
List
<
DiskCatalogueFiles
>
diskCatalogueFilesList
=
DiskCatalogueFiles
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
DiskCatalogueFiles
>()
.
lambda
().
in
(
DiskCatalogueFiles:
:
getCatalogueId
,
ids
)
.
eq
(
DiskCatalogueFiles:
:
getDeleteFlag
,
0
)
);
if
(
CollectionUtils
.
isEmpty
(
diskCatalogueFilesList
)){
return
true
;
}
// 逻辑删除
DiskCatalogueFiles
.
builder
().
deleteFlag
(
1
).
build
().
update
(
new
QueryWrapper
<
DiskCatalogueFiles
>()
.
lambda
().
in
(
DiskCatalogueFiles:
:
getCatalogueId
,
ids
)
.
eq
(
DiskCatalogueFiles:
:
getDeleteFlag
,
0
)
);
List
<
Integer
>
filesIds
=
diskCatalogueFilesList
.
stream
().
map
(
item
->
item
.
getFilesId
()).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
filesIds
)){
return
true
;
}
// 逻辑删除
DiskFiles
.
builder
().
deleteFlag
(
1
).
updateUserId
(
diskCatalogue
.
getUpdateUserId
()).
build
().
update
(
new
QueryWrapper
<
DiskFiles
>()
.
lambda
().
in
(
DiskFiles:
:
getId
,
filesIds
)
.
eq
(
DiskFiles:
:
getDeleteFlag
,
0
)
);
return
true
;
}
@Override
public
List
<
DiskCatalogue
>
getSubCatalogueList
(
String
ids
,
Integer
userId
){
return
diskCatalogueMapper
.
getSubCatalogueList
(
ids
,
userId
);
}
/**
/**
* 递归获取树形结构
* 递归获取树形结构
*
*
...
...
src/main/java/cn/timer/api/controller/disk/sevice/DiskFilesService.java
View file @
11fef7ed
...
@@ -28,4 +28,12 @@ public interface DiskFilesService {
...
@@ -28,4 +28,12 @@ public interface DiskFilesService {
* @return
* @return
*/
*/
DiskFileCatalogueDto
getFileCount
(
Integer
userId
);
DiskFileCatalogueDto
getFileCount
(
Integer
userId
);
/**
* 删除文件
* @param list
* @return
*/
Integer
deleteDiskFile
(
List
<
Integer
>
list
);
}
}
src/main/java/cn/timer/api/controller/disk/sevice/DiskFilesServiceImpl.java
View file @
11fef7ed
...
@@ -40,4 +40,9 @@ public class DiskFilesServiceImpl implements DiskFilesService {
...
@@ -40,4 +40,9 @@ public class DiskFilesServiceImpl implements DiskFilesService {
dto
.
setShowSize
(
"1G"
);
dto
.
setShowSize
(
"1G"
);
return
dto
;
return
dto
;
}
}
@Override
public
Integer
deleteDiskFile
(
List
<
Integer
>
list
)
{
return
diskFilesMapper
.
deleteDiskFile
(
list
);
}
}
}
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
View file @
11fef7ed
...
@@ -326,8 +326,9 @@ public class KqglServiceImpl implements KqglService {
...
@@ -326,8 +326,9 @@ public class KqglServiceImpl implements KqglService {
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
repaappr
.
getUserid
(),
repaappr
.
getOrgcode
());
//考勤组信息
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
repaappr
.
getUserid
(),
repaappr
.
getOrgcode
());
//考勤组信息
if
(
attgro
!=
null
)
{
if
(
attgro
!=
null
)
{
AttendanceCardListDto
attdate
=
MethodCall
(
repaappr
.
getOrgcode
(),
repaappr
.
getUserid
(),
cardrepltime
);
//获取当天打卡班次信息
AttendanceCardListDto
attdate
=
MethodCall
(
repaappr
.
getOrgcode
(),
repaappr
.
getUserid
(),
cardrepltime
);
//获取当天打卡班次信息
//排班方式 // 考勤类型:1-固定排班、2-排班制、3-自由工时
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
()))
{
//班次不为空
//自由工时无班次ID 另行逻辑
if
(
attgro
.
getPbfs
()<
3
&&
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
()))
{
//班次不为空
List
<
AttSchedule
>
ash
=
attdate
.
getAttsch
();
//获取当天应打卡时间
List
<
AttSchedule
>
ash
=
attdate
.
getAttsch
();
//获取当天应打卡时间
shifid
=
ash
.
get
(
0
).
getId
();
//班次id
shifid
=
ash
.
get
(
0
).
getId
();
//班次id
long
starttime1
=
0
,
starttime1ks
=
0
,
starttime1js
=
0
,
endtime1
=
0
,
endtime1ks
=
0
,
endtime1js
=
0
,
starttime2
=
0
,
starttime2ks
=
0
,
starttime2js
=
0
,
endtime2
=
0
,
endtime2ks
=
0
,
endtime2js
=
0
,
starttime3
=
0
,
starttime3ks
=
0
,
starttime3js
=
0
,
long
starttime1
=
0
,
starttime1ks
=
0
,
starttime1js
=
0
,
endtime1
=
0
,
endtime1ks
=
0
,
endtime1js
=
0
,
starttime2
=
0
,
starttime2ks
=
0
,
starttime2js
=
0
,
endtime2
=
0
,
endtime2ks
=
0
,
endtime2js
=
0
,
starttime3
=
0
,
starttime3ks
=
0
,
starttime3js
=
0
,
...
@@ -806,6 +807,165 @@ public class KqglServiceImpl implements KqglService {
...
@@ -806,6 +807,165 @@ public class KqglServiceImpl implements KqglService {
}
}
}
}
if
(
attgro
.
getPbfs
()
==
3
){
long
starttime1
=
0
,
starttime1ks
=
0
,
starttime1js
=
0
,
endtime1
=
0
,
endtime1ks
=
0
,
endtime1js
=
0
,
starttime2
=
0
,
starttime2ks
=
0
,
starttime2js
=
0
,
endtime2
=
0
,
endtime2ks
=
0
,
endtime2js
=
0
,
starttime3
=
0
,
starttime3ks
=
0
,
starttime3js
=
0
,
endtime3
=
0
,
endtime3ks
=
0
,
endtime3js
=
0
;
KqglAssoDkmx
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
repaappr
.
getUserid
()).
eq
(
KqglAssoDkmx:
:
getQyid
,
repaappr
.
getOrgcode
())
.
ge
(
KqglAssoDkmx:
:
getDksj
,
start_time
).
le
(
KqglAssoDkmx:
:
getDksj
,
end_time
));
//获取补卡当天是否有打卡记录
if
(
dkmc
!=
null
)
{
dkmxid
=
dkmc
.
getId
();
if
(
repaappr
.
getCardreplperiod
()
==
1
&&
dkmc
.
getSbdk1
()
==
null
)
{
//上班
int
sbdkjg
=
0
;
if
(
isRange
)
{
Long
time
=
(
repaappr
.
getCardrepltime
()
-
starttime1
)/
1000
/
60
;
if
(
time
>
0
){
//上班1打卡结果
sbdkjg
=
Math
.
abs
(
Integer
.
valueOf
(
time
.
toString
()));
}
Double
gzsctime
=
null
;
//工作时长
if
(
dkmc
.
getXbdk1
()
!=
null
){
Long
time1
=
(
repaappr
.
getCardrepltime
()
-
dkmc
.
getXbdk1
())/
1000
/
60
;
gzsctime
=
Math
.
abs
(
Double
.
valueOf
(
time1
.
toString
()));
//只打一次卡时计算工作时长
}
KqglAssoDkmx
.
builder
().
id
(
dkmc
.
getId
()).
sbdk1
(
repaappr
.
getCardrepltime
()).
sbdk1jg
(
sbdkjg
).
dktj1
(
1
).
gzsc
(
gzsctime
).
build
().
updateById
();
}
atttype
=
1
;
results
=
sbdkjg
;
}
else
if
(
repaappr
.
getCardreplperiod
()
==
2
&&
dkmc
.
getXbdk1
()
==
null
)
{
//下班
int
xbdk1jg
=
0
;
if
(
isRange
)
{
Long
time
=
(
repaappr
.
getCardrepltime
()
-
endtime1
)/
1000
/
60
;
if
(
time
>
0
){}
else
{
xbdk1jg
=
Math
.
abs
(
Integer
.
valueOf
(
time
.
toString
()));
}
Double
gzsctime
=
null
;
//工作时长
if
(
dkmc
.
getSbdk1
()
!=
null
)
{
Long
time1
=
(
repaappr
.
getCardrepltime
()
-
dkmc
.
getSbdk1
())/
1000
/
60
;
gzsctime
=
Math
.
abs
(
Double
.
valueOf
(
time1
.
toString
()));
}
KqglAssoDkmx
.
builder
().
id
(
dkmc
.
getId
()).
xbdk1
(
repaappr
.
getCardrepltime
()).
xbdk1jg
(
xbdk1jg
).
dktj2
(
1
).
gzsc
(
gzsctime
).
build
().
updateById
();
}
atttype
=
2
;
results
=
xbdk1jg
;
}
}
else
{
//补卡当天无打卡记录时
KqglAssoDkmx
pcd
=
KqglAssoDkmx
.
builder
().
userid
(
repaappr
.
getUserid
()).
data
(
cardrepltime
).
qyid
(
repaappr
.
getOrgcode
()).
dksj
(
start_time
).
ydkcs
(
2
)
.
gzsc
(
0
d
).
build
();
if
(
repaappr
.
getCardreplperiod
()
==
1
)
{
//上班
int
sbdkjg
=
0
;
if
(
isRange
)
{
pcd
.
setSbdk1
(
repaappr
.
getCardrepltime
());
pcd
.
setSbdk1jg
(
sbdkjg
);
pcd
.
setDktj1
(
1
);
if
(!
pcd
.
insert
())
{
throw
new
CustomException
(
"打卡明细-新增异常-1"
);
}
}
atttype
=
1
;
}
else
if
(
repaappr
.
getCardreplperiod
()
==
2
)
{
//下班
int
xbdk1jg
=
0
;
if
(
isRange
)
{
pcd
.
setXbdk1
(
repaappr
.
getCardrepltime
());
pcd
.
setXbdk1jg
(
xbdk1jg
);
pcd
.
setDktj2
(
1
);
if
(!
pcd
.
insert
())
{
throw
new
CustomException
(
"打卡明细-新增异常-1"
);
}
}
atttype
=
2
;
}
if
(
isRange
)
{
dkmxid
=
pcd
.
getId
();
}
else
{
throw
new
CustomException
(
"当前时间,没有考勤异常无需补卡"
);
}
}
//0:打卡无效:此记录已被更新 1:正常 2:异常 3:迟到 4:早退 5:补卡 6:请假 7:加班 8:调休
//9:管理员改为正常 10:管理员改为迟到 11:管理员改为早退 12:补卡通过/正常 13:补卡通过/迟到 14:补卡通过/早退
int
status
=
2
;
if
((
atttype
)%
2
>
0
){
type
=
1
;
if
(
results
==
0
)
{
status
=
12
;
}
else
{
status
=
13
;
}
}
else
{
type
=
2
;
if
(
results
==
0
)
{
status
=
12
;
}
else
{
status
=
14
;
}
}
Long
startDate
=
DateUtil
.
getStartTime
(
0
,
DateUtil
.
getStringTime
(
cardrepltime
,
"yyyy-MM-dd"
)).
getTime
();
String
attdate_
=
new
SimpleDateFormat
(
"yy-MM-dd"
).
format
(
Double
.
valueOf
(
startDate
));
//转换打卡时间格式
//attime 应打卡时间
double
gzsc
=
0
;
//long rest_time = 0;
/*if(shif.getStartTime() != null && !("").equals(shif.getStartTime()) && shif.getEndTime() != null && !("").equals(shif.getEndTime())) {
long kaishixiuxi = Long.valueOf(ClockInTool.dateToStamp(cardrepltime + " " +shif.getStartTime()+":00"));
long jieshuxiuxi = Long.valueOf(ClockInTool.dateToStamp(cardrepltime + " " +shif.getEndTime()+":00"));
rest_time = (jieshuxiuxi - kaishixiuxi)/1000/60;//休息时间
}*/
//请假时长
//KqglAssoRelationSummary qjsc = kqglassorelationsummarymapper.Businessdayclockin(repaappr.getUserid(), 2, cardrepltime, repaappr.getOrgcode());
//计算工作时长
KqglAssoDkmx
dkgzsc
=
KqglAssoDkmx
.
builder
().
id
(
dkmxid
).
build
().
selectById
();
if
(
dkgzsc
.
getYdkcs
()
==
2
||
dkgzsc
.
getYdkcs
()
==
4
||
dkgzsc
.
getYdkcs
()
==
6
)
{
if
(
dkgzsc
.
getSbdk1
()
!=
null
&&
dkgzsc
.
getXbdk1
()
!=
null
)
{
gzsc
=
gzsc
+
(
dkgzsc
.
getXbdk1
()
-
dkgzsc
.
getSbdk1
())/
1000
/
60
;
}
}
if
(
dkgzsc
.
getYdkcs
()
==
4
||
dkgzsc
.
getYdkcs
()
==
6
)
{
if
(
dkgzsc
.
getSbdk2
()
!=
null
&&
dkgzsc
.
getXbdk2
()
!=
null
)
{
gzsc
=
gzsc
+
(
dkgzsc
.
getXbdk2
()
-
dkgzsc
.
getSbdk2
())/
1000
/
60
;
}
}
if
(
dkgzsc
.
getYdkcs
()
==
6
)
{
if
(
dkgzsc
.
getSbdk3
()
!=
null
&&
dkgzsc
.
getXbdk3
()
!=
null
)
{
gzsc
=
gzsc
+
(
dkgzsc
.
getXbdk3
()
-
dkgzsc
.
getSbdk3
())/
1000
/
60
;
}
}
//gzsc = gzsc - rest_time - qjsc.getDuration();
KqglAssoDkmx
.
builder
().
id
(
dkmxid
).
gzsc
(
gzsc
).
build
().
updateById
();
KqglAssoDkjl
pre
=
KqglAssoDkjl
.
builder
().
dktime
(
repaappr
.
getCardrepltime
()).
results
(
results
).
userId
(
repaappr
.
getUserid
()).
type
(
type
).
status
(
status
).
sort
(
atttype
)
.
cardType
(
0
).
qyid
(
repaappr
.
getOrgcode
()).
attdate
(
attdate_
+
" "
+
ClockInTool
.
dateToWeek2
(
cardrepltime
)).
attime
(
repaappr
.
getCardrepltime
()).
dkmxid
(
dkmxid
).
bcid
(
shifid
).
remarks
(
"审批补卡通过打卡"
).
punchmode
(
0
)
.
punchequipment
(
""
).
commentary
(
"成功打卡"
).
build
();
if
(!
pre
.
insert
())
{
throw
new
CustomException
(
"打卡记录-新增异常-2"
);
}
}
//}
}
}
...
...
src/main/java/cn/timer/api/dao/disk/DiskCatalogueMapper.java
View file @
11fef7ed
...
@@ -2,17 +2,26 @@ package cn.timer.api.dao.disk;
...
@@ -2,17 +2,26 @@ package cn.timer.api.dao.disk;
import
cn.timer.api.bean.disk.DiskCatalogue
;
import
cn.timer.api.bean.disk.DiskCatalogue
;
import
cn.timer.api.dto.disk.DiskCatalogueParam
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.swagger.models.auth.In
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
/**
* 云盘-资源目录表
* 云盘-资源目录表
*
*
* @author wuqingjun
* @author wuqingjun
* @email 284718418@qq.com
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
* @date 2021-12-27 10:05:49
*/
*/
@Repository
@Repository
public
interface
DiskCatalogueMapper
extends
BaseMapper
<
DiskCatalogue
>
{
public
interface
DiskCatalogueMapper
extends
BaseMapper
<
DiskCatalogue
>
{
List
<
Integer
>
selectIdListById
(
@Param
(
"id"
)
Integer
id
);
List
<
DiskCatalogue
>
getSubCatalogueList
(
@Param
(
"ids"
)
String
ids
,
@Param
(
"userId"
)
Integer
userId
);
}
}
src/main/java/cn/timer/api/dao/disk/DiskFilesMapper.java
View file @
11fef7ed
...
@@ -12,7 +12,7 @@ import java.util.List;
...
@@ -12,7 +12,7 @@ import java.util.List;
/**
/**
* 云盘-资源上传文件表
* 云盘-资源上传文件表
*
*
* @author wuqingjun
* @author wuqingjun
* @email 284718418@qq.com
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
* @date 2021-12-27 10:05:49
...
@@ -34,5 +34,12 @@ public interface DiskFilesMapper extends BaseMapper<DiskFiles> {
...
@@ -34,5 +34,12 @@ public interface DiskFilesMapper extends BaseMapper<DiskFiles> {
* @return
* @return
*/
*/
DiskFileCatalogueDto
selectFileCount
(
@Param
(
"userId"
)
Integer
userId
);
DiskFileCatalogueDto
selectFileCount
(
@Param
(
"userId"
)
Integer
userId
);
/**
* 删除文件
* @param list
* @return
*/
Integer
deleteDiskFile
(
@Param
(
"list"
)
List
<
Integer
>
list
);
}
}
src/main/resources/mapping/disk/DiskCatalogueMapper.xml
View file @
11fef7ed
...
@@ -23,4 +23,13 @@
...
@@ -23,4 +23,13 @@
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
</resultMap>
</mapper>
<select
id=
"selectIdListById"
resultType=
"java.lang.Integer"
>
\ No newline at end of file
SELECT id FROM disk_catalogue WHERE delete_flag = 0 AND find_in_set(#{id},parent_ids) OR id = #{id}
</select>
<select
id=
"getSubCatalogueList"
resultMap=
"BaseResultMap"
>
select d.* from disk_catalogue d
where d.delete_flag = 0 and d.parent_ids like CONCAT(#{ids},'%') and d.create_user_id = #{userId}
</select>
</mapper>
src/main/resources/mapping/disk/DiskCloudDiskUserMapper.xml
View file @
11fef7ed
...
@@ -20,7 +20,9 @@
...
@@ -20,7 +20,9 @@
SELECT c.*,cdu.id as cloud_disk_user_id,cdu.user_role,cdu.user_power FROM `disk_catalogue` c
SELECT c.*,cdu.id as cloud_disk_user_id,cdu.user_role,cdu.user_power FROM `disk_catalogue` c
LEFT JOIN disk_cloud_disk_user cdu ON c.id=cdu.catalogue_id AND c.id > 0
LEFT JOIN disk_cloud_disk_user cdu ON c.id=cdu.catalogue_id AND c.id > 0
WHERE c.delete_flag=0 AND cdu.delete_flag = 0
WHERE c.delete_flag=0 AND cdu.delete_flag = 0
<if
test=
"param.userId!=null"
>
AND cdu.user_id = #{param.userId}
AND cdu.user_id = #{param.userId}
</if>
AND cdu.org_id = #{param.orgId}
AND cdu.org_id = #{param.orgId}
AND c.parent_id = #{param.parentId}
AND c.parent_id = #{param.parentId}
<if
test=
"param.id != null and param.id != ''"
>
<if
test=
"param.id != null and param.id != ''"
>
...
@@ -28,4 +30,4 @@
...
@@ -28,4 +30,4 @@
</if>
</if>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapping/disk/DiskFilesMapper.xml
View file @
11fef7ed
...
@@ -36,4 +36,12 @@
...
@@ -36,4 +36,12 @@
SELECT COALESCE(sum(file_size),0) as countSize FROM `disk_files` where create_user_id = #{userId} AND delete_flag=0
SELECT COALESCE(sum(file_size),0) as countSize FROM `disk_files` where create_user_id = #{userId} AND delete_flag=0
</select>
</select>
</mapper>
\ No newline at end of file
<update
id=
"deleteDiskFile"
parameterType=
"java.util.List"
>
update disk_catalogue_files set delete_flag = 1
where id in
<foreach
item=
"item"
index=
"index"
collection=
"list"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
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