Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
e1343de8
Commit
e1343de8
authored
Nov 22, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
2490b642
6d4c6ebe
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
299 additions
and
12 deletions
+299
-12
LogisticsController.java
...office/modules/manage/controller/LogisticsController.java
+91
-0
MedicalController.java
...o/office/modules/manage/controller/MedicalController.java
+7
-8
LogisticsDao.java
src/main/java/io/office/modules/manage/dao/LogisticsDao.java
+17
-0
LogisticsEntity.java
...java/io/office/modules/manage/entity/LogisticsEntity.java
+83
-0
MedicalEntity.java
...n/java/io/office/modules/manage/entity/MedicalEntity.java
+5
-1
LogisticsService.java
...va/io/office/modules/manage/service/LogisticsService.java
+20
-0
LogisticsServiceImpl.java
...ice/modules/manage/service/impl/LogisticsServiceImpl.java
+41
-0
MedicalServiceImpl.java
...ffice/modules/manage/service/impl/MedicalServiceImpl.java
+9
-2
LogisticsDao.xml
src/main/resources/mapper/manage/LogisticsDao.xml
+25
-0
PolicyDao.xml
src/main/resources/mapper/manage/PolicyDao.xml
+1
-1
No files found.
src/main/java/io/office/modules/manage/controller/LogisticsController.java
0 → 100644
View file @
e1343de8
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Map
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.LogisticsEntity
;
import
io.office.modules.manage.service.LogisticsService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 15:48:47
*/
@RestController
@RequestMapping
(
"/logistics"
)
public
class
LogisticsController
{
@Autowired
private
LogisticsService
logisticsService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:logistics:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
logisticsService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:logistics:info")
public
R
info
(
@PathVariable
(
"id"
)
String
id
){
LogisticsEntity
logistics
=
logisticsService
.
getById
(
id
);
return
R
.
ok
().
put
(
"logistics"
,
logistics
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:logistics:save")
public
R
save
(
@RequestBody
LogisticsEntity
logistics
){
logistics
.
setId
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
logistics
.
setInputdate
(
new
Date
());
logisticsService
.
save
(
logistics
);
return
R
.
ok
(
"新增成功!"
);
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:logistics:update")
public
R
update
(
@RequestBody
LogisticsEntity
logistics
){
logisticsService
.
updateById
(
logistics
);
return
R
.
ok
(
"修改成功!"
);
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:logistics:delete")
public
R
delete
(
@RequestBody
String
[]
ids
){
logisticsService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
(
"删除成功!"
);
}
}
src/main/java/io/office/modules/manage/controller/MedicalController.java
View file @
e1343de8
...
@@ -4,6 +4,8 @@ import java.util.*;
...
@@ -4,6 +4,8 @@ import java.util.*;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.service.MedicalService
;
import
io.office.modules.manage.service.MedicalService
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -33,7 +35,6 @@ public class MedicalController {
...
@@ -33,7 +35,6 @@ public class MedicalController {
// @RequiresPermissions("manage:medical:list")
// @RequiresPermissions("manage:medical:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
medicalService
.
queryPage
(
params
);
PageUtils
page
=
medicalService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
}
...
@@ -55,9 +56,9 @@ public class MedicalController {
...
@@ -55,9 +56,9 @@ public class MedicalController {
@RequestMapping
(
"/save"
)
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:medical:save")
// @RequiresPermissions("manage:medical:save")
public
R
save
(
@RequestBody
MedicalEntity
medical
){
public
R
save
(
@RequestBody
MedicalEntity
medical
){
medical
.
setId
(
UUID
.
randomUUID
().
toString
(
));
medical
.
setId
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
medical
.
setInputDate
(
new
Date
());
medical
.
setInputDate
(
new
Date
());
// medicalService.insertMedical
(medical);
medicalService
.
save
(
medical
);
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
}
}
...
@@ -68,8 +69,7 @@ public class MedicalController {
...
@@ -68,8 +69,7 @@ public class MedicalController {
// @RequiresPermissions("manage:medical:update")
// @RequiresPermissions("manage:medical:update")
public
R
update
(
@RequestBody
MedicalEntity
medical
){
public
R
update
(
@RequestBody
MedicalEntity
medical
){
medicalService
.
updateById
(
medical
);
medicalService
.
updateById
(
medical
);
return
R
.
ok
(
"修改成功!"
);
return
R
.
ok
();
}
}
/**
/**
...
@@ -77,10 +77,9 @@ public class MedicalController {
...
@@ -77,10 +77,9 @@ public class MedicalController {
*/
*/
@RequestMapping
(
"/delete"
)
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:medical:delete")
// @RequiresPermissions("manage:medical:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
public
R
delete
(
@RequestBody
String
[]
ids
){
medicalService
.
removeByIds
(
Arrays
.
asList
(
ids
));
medicalService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
(
"删除成功!"
);
return
R
.
ok
();
}
}
@GetMapping
(
"/getMedicalTypeList"
)
@GetMapping
(
"/getMedicalTypeList"
)
...
...
src/main/java/io/office/modules/manage/dao/LogisticsDao.java
0 → 100644
View file @
e1343de8
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.LogisticsEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 15:48:47
*/
@Mapper
public
interface
LogisticsDao
extends
BaseMapper
<
LogisticsEntity
>
{
}
src/main/java/io/office/modules/manage/entity/LogisticsEntity.java
0 → 100644
View file @
e1343de8
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 15:48:47
*/
@Data
@TableName
(
"logistics"
)
public
class
LogisticsEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
(
type
=
IdType
.
INPUT
)
private
String
id
;
/**
* $column.comments
*/
private
String
title
;
/**
* $column.comments
*/
private
String
type
;
/**
* $column.comments
*/
private
Integer
level
;
/**
* $column.comments
*/
private
String
jumppath
;
/**
* $column.comments
*/
private
String
keyword
;
/**
* $column.comments
*/
private
String
source
;
/**
* $column.comments
*/
private
String
author
;
/**
* $column.comments
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:smm:ss"
)
private
Date
releasetime
;
/**
* $column.comments
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
implementationtime
;
/**
* $column.comments
*/
private
String
remarks
;
/**
* $column.comments
*/
private
String
content
;
/**
* $column.comments
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@TableId
(
"inputdate"
)
private
Date
inputdate
;
}
src/main/java/io/office/modules/manage/entity/MedicalEntity.java
View file @
e1343de8
package
io
.
office
.
modules
.
manage
.
entity
;
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
@@ -8,6 +10,7 @@ import java.util.Date;
...
@@ -8,6 +10,7 @@ import java.util.Date;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.data.annotation.Id
;
/**
/**
* ${comments}
* ${comments}
...
@@ -24,7 +27,7 @@ public class MedicalEntity implements Serializable {
...
@@ -24,7 +27,7 @@ public class MedicalEntity implements Serializable {
/**
/**
* $column.comments
* $column.comments
*/
*/
@TableId
@TableId
(
type
=
IdType
.
INPUT
)
private
String
id
;
private
String
id
;
/**
/**
* $column.comments
* $column.comments
...
@@ -73,6 +76,7 @@ public class MedicalEntity implements Serializable {
...
@@ -73,6 +76,7 @@ public class MedicalEntity implements Serializable {
*/
*/
private
String
content
;
private
String
content
;
@TableField
(
"inputDate"
)
private
Date
inputDate
;
private
Date
inputDate
;
}
}
src/main/java/io/office/modules/manage/service/LogisticsService.java
0 → 100644
View file @
e1343de8
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.LogisticsEntity
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 15:48:47
*/
public
interface
LogisticsService
extends
IService
<
LogisticsEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/impl/LogisticsServiceImpl.java
0 → 100644
View file @
e1343de8
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.qiniu.util.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.LogisticsDao
;
import
io.office.modules.manage.entity.LogisticsEntity
;
import
io.office.modules.manage.service.LogisticsService
;
@Service
(
"logisticsService"
)
public
class
LogisticsServiceImpl
extends
ServiceImpl
<
LogisticsDao
,
LogisticsEntity
>
implements
LogisticsService
{
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
QueryWrapper
<
LogisticsEntity
>
logisticsEntityQueryWrapper
=
new
QueryWrapper
<>();
if
(!
StringUtils
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"title"
)))){
logisticsEntityQueryWrapper
.
eq
(
"title"
,
params
.
get
(
"title"
));
}
if
(!
StringUtils
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"keyword"
)))){
logisticsEntityQueryWrapper
.
eq
(
"keyword"
,
params
.
get
(
"keyword"
));
}
if
(!
StringUtils
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"type"
)))){
logisticsEntityQueryWrapper
.
eq
(
"type"
,
params
.
get
(
"type"
));
}
IPage
<
LogisticsEntity
>
page
=
this
.
page
(
new
Query
<
LogisticsEntity
>().
getPage
(
params
),
new
QueryWrapper
<
LogisticsEntity
>()
);
return
new
PageUtils
(
page
);
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/MedicalServiceImpl.java
View file @
e1343de8
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
io.netty.util.internal.StringUtil
;
import
io.office.modules.manage.dao.MedicalDao
;
import
io.office.modules.manage.dao.MedicalDao
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.service.MedicalService
;
import
io.office.modules.manage.service.MedicalService
;
...
@@ -24,11 +25,17 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
...
@@ -24,11 +25,17 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
MedicalDao
medicalDao
;
MedicalDao
medicalDao
;
@Override
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
QueryWrapper
<
MedicalEntity
>
medicalEntityQueryWrapper
=
new
QueryWrapper
<>();
if
(!
StringUtil
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"title"
)))){
medicalEntityQueryWrapper
.
eq
(
"title"
,
params
.
get
(
"title"
));
}
if
(!
StringUtil
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"type"
)))){
medicalEntityQueryWrapper
.
eq
(
"type"
,
params
.
get
(
"type"
));
}
IPage
<
MedicalEntity
>
page
=
this
.
page
(
IPage
<
MedicalEntity
>
page
=
this
.
page
(
new
Query
<
MedicalEntity
>().
getPage
(
params
),
new
Query
<
MedicalEntity
>().
getPage
(
params
),
new
QueryWrapper
<
MedicalEntity
>()
medicalEntityQueryWrapper
);
);
return
new
PageUtils
(
page
);
return
new
PageUtils
(
page
);
}
}
...
...
src/main/resources/mapper/manage/LogisticsDao.xml
0 → 100644
View file @
e1343de8
<?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=
"io.office.modules.manage.dao.LogisticsDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.LogisticsEntity"
id=
"logisticsMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"level"
column=
"level"
/>
<result
property=
"jumppath"
column=
"jumppath"
/>
<result
property=
"keyword"
column=
"keyword"
/>
<result
property=
"source"
column=
"source"
/>
<result
property=
"author"
column=
"author"
/>
<result
property=
"releasetime"
column=
"releaseTime"
/>
<result
property=
"implementationtime"
column=
"implementationTime"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"inputdate"
column=
"inputDate"
/>
</resultMap>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/PolicyDao.xml
View file @
e1343de8
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<result
property=
"auditor"
column=
"auditor"
/>
<result
property=
"auditor"
column=
"auditor"
/>
</resultMap>
</resultMap>
<select
id=
"selectPolicyList"
resultMap=
"policyMap"
parameterType=
"io.office.modules.manage.entity.dto.PolicyParams"
>
<select
id=
"selectPolicyList"
resultMap=
"policyMap"
parameterType=
"io.office.modules.manage.entity.dto.PolicyParams"
>
select class,title,editor,lasteditor,releasedate,updatedate,auditor,status from Policy
select
id,
class,title,editor,lasteditor,releasedate,updatedate,auditor,status from Policy
where 1=1
where 1=1
<if
test=
"newsParams.updateTimeStart !=null and newsParams.updateTimeEnd !=null"
>
<if
test=
"newsParams.updateTimeStart !=null and newsParams.updateTimeEnd !=null"
>
and updatedate BETWEEN #{newsParams.updateTimeStart} AND #{newsParams.updateTimeEnd}
and updatedate BETWEEN #{newsParams.updateTimeStart} AND #{newsParams.updateTimeEnd}
...
...
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