Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
44d2a378
Commit
44d2a378
authored
Jul 13, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.交接班记录
parent
572b0d5b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
4 deletions
+34
-4
IShiftChangeService.java
...amos/boot/module/jcs/api/service/IShiftChangeService.java
+6
-0
DutyCarController.java
.../boot/module/common/biz/controller/DutyCarController.java
+2
-0
ShiftChangeController.java
...boot/module/jcs/biz/controller/ShiftChangeController.java
+12
-4
ShiftChangeServiceImpl.java
...t/module/jcs/biz/service/impl/ShiftChangeServiceImpl.java
+14
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IShiftChangeService.java
View file @
44d2a378
...
...
@@ -53,4 +53,10 @@ public interface IShiftChangeService {
* @return List<Map < String, Object>>
*/
List
<
Map
<
String
,
Object
>>
queryForShiftChangeList
();
/**
* 最近交班记录
* @return Map<String, Object>
*/
Map
<
String
,
Object
>
lastRecord
();
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyCarController.java
View file @
44d2a378
...
...
@@ -143,4 +143,5 @@ public class DutyCarController extends BaseController {
@ApiParam
(
value
=
"岗位"
)
@RequestParam
(
required
=
false
)
String
postType
){
return
ResponseHelper
.
buildResponse
(
iDutyCarService
.
dayDutyPersonList
(
dutyDay
,
shiftId
,
postType
));
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ShiftChangeController.java
View file @
44d2a378
...
...
@@ -24,7 +24,7 @@ import javax.servlet.http.HttpServletResponse;
*/
@RestController
@Api
(
tags
=
"交接班记录表Api"
)
@RequestMapping
(
value
=
"/
jcs/
shift-change"
)
@RequestMapping
(
value
=
"/shift-change"
)
public
class
ShiftChangeController
extends
BaseController
{
@Autowired
...
...
@@ -98,9 +98,17 @@ public class ShiftChangeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"
POS
T"
,
value
=
"pdf下载"
,
notes
=
"pdf下载"
)
@
Pos
tMapping
(
"/pdf/export"
)
public
void
exportPdf
(
HttpServletResponse
response
,
Long
shiftChangeId
){
@ApiOperation
(
httpMethod
=
"
GE
T"
,
value
=
"pdf下载"
,
notes
=
"pdf下载"
)
@
Ge
tMapping
(
"/pdf/export"
)
public
void
exportPdf
(
HttpServletResponse
response
,
@RequestParam
Long
shiftChangeId
){
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"上次最新记录"
,
notes
=
"上次最新记录"
)
@GetMapping
(
"/lastRecord"
)
public
ResponseModel
lastRecord
(){
return
ResponseHelper
.
buildResponse
(
iShiftChangeService
.
lastRecord
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ShiftChangeServiceImpl.java
View file @
44d2a378
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
...
...
@@ -16,6 +17,8 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.Comparator
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
...
...
@@ -45,6 +48,8 @@ public class ShiftChangeServiceImpl extends BaseService<ShiftChangeDto, ShiftCha
Long
instanceId
=
dynamicFormInstanceService
.
commonSave
(
GROUP_CODE
,
model
);
ShiftChange
shiftChange
=
(
ShiftChange
)
Bean
.
mapToBean
(
model
,
ShiftChange
.
class
);
shiftChange
.
setInstanceId
(
instanceId
);
shiftChange
.
setDutyJson
(
shiftChange
.
getDutyJson
()
==
null
?
new
JSONObject
()
:
shiftChange
.
getDutyJson
());
shiftChange
.
setPowerJson
(
shiftChange
.
getPowerJson
()
==
null
?
new
JSONObject
()
:
shiftChange
.
getPowerJson
());
this
.
save
(
shiftChange
);
return
model
;
}
...
...
@@ -96,4 +101,13 @@ public class ShiftChangeServiceImpl extends BaseService<ShiftChangeDto, ShiftCha
});
return
list
;
}
@Override
public
Map
<
String
,
Object
>
lastRecord
()
{
List
<
Map
<
String
,
Object
>>
list
=
dynamicFormInstanceService
.
listAll
(
GROUP_CODE
);
list
=
list
.
stream
().
sorted
(
Comparator
.
comparing
(
e
->
e
.
get
(
"instanceId"
),
Comparator
.
comparingLong
(
s
->
-
Long
.
parseLong
(
s
.
toString
())))).
collect
(
Collectors
.
toList
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
=
list
.
isEmpty
()
?
map
:
list
.
get
(
0
);
return
map
;
}
}
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