Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fill-system
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
fill-system
Commits
4aa06402
Commit
4aa06402
authored
May 13, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加材料排序
parent
63645e73
Pipeline
#2611
failed with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
146 deletions
+8
-146
fill-manager/src/main/java/com/mortals/xhx/base/system/param/dao/ibatis/ParamDaoImpl.java
...ortals/xhx/base/system/param/dao/ibatis/ParamDaoImpl.java
+0
-1
fill-manager/src/main/java/com/mortals/xhx/base/system/param/model/ParamEntity.java
.../com/mortals/xhx/base/system/param/model/ParamEntity.java
+1
-1
fill-manager/src/main/java/com/mortals/xhx/base/system/param/service/ParamService.java
...m/mortals/xhx/base/system/param/service/ParamService.java
+0
-32
fill-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
.../xhx/base/system/param/service/impl/ParamServiceImpl.java
+0
-92
fill-manager/src/main/java/com/mortals/xhx/base/system/param/web/ParamController.java
...om/mortals/xhx/base/system/param/web/ParamController.java
+7
-20
No files found.
fill-manager/src/main/java/com/mortals/xhx/base/system/param/dao/ibatis/ParamDaoImpl.java
View file @
4aa06402
...
@@ -11,7 +11,6 @@ package com.mortals.xhx.base.system.param.dao.ibatis;
...
@@ -11,7 +11,6 @@ package com.mortals.xhx.base.system.param.dao.ibatis;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.xhx.base.system.param.dao.ParamDao
;
import
com.mortals.xhx.base.system.param.dao.ParamDao
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
/**
/**
...
...
fill-manager/src/main/java/com/mortals/xhx/base/system/param/model/ParamEntity.java
View file @
4aa06402
...
@@ -21,7 +21,7 @@ import java.util.Date;
...
@@ -21,7 +21,7 @@ import java.util.Date;
* @author
* @author
* @version 1.0.0
* @version 1.0.0
*/
*/
public
class
ParamEntity
extends
ParamEntityExt
implements
IParam
{
public
class
ParamEntity
extends
BaseEntityLong
implements
IParam
{
private
static
final
long
serialVersionUID
=
1536307966363L
;
private
static
final
long
serialVersionUID
=
1536307966363L
;
/** 参数名称 */
/** 参数名称 */
...
...
fill-manager/src/main/java/com/mortals/xhx/base/system/param/service/ParamService.java
View file @
4aa06402
...
@@ -5,7 +5,6 @@ import com.mortals.framework.service.ICRUDCacheService;
...
@@ -5,7 +5,6 @@ import com.mortals.framework.service.ICRUDCacheService;
import
com.mortals.framework.service.IParamService
;
import
com.mortals.framework.service.IParamService
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -45,35 +44,4 @@ public interface ParamService extends ICRUDCacheService<ParamEntity, Long>, IPar
...
@@ -45,35 +44,4 @@ public interface ParamService extends ICRUDCacheService<ParamEntity, Long>, IPar
*/
*/
Map
<
String
,
String
>
getParamBySecondOrganize
(
String
firstOrganize
,
String
secondOrganize
,
String
...
excludeParamKeys
);
Map
<
String
,
String
>
getParamBySecondOrganize
(
String
firstOrganize
,
String
secondOrganize
,
String
...
excludeParamKeys
);
/**
* 获取热词列表
* @return
*/
String
getHotWords
();
/**
* 设置热词列表
* @return
*/
void
setHotWords
(
String
value
);
/**
* 空白打印材料展示数量
* @return
*/
int
getPrintDisplayQuantity
();
/**
* 设置空白打印材料展示数量
* @return
*/
void
setPrintDisplayQuantity
(
int
value
);
/**
* 通过Key设置参数值 value
* @param key
* @param value
* @return
*/
void
setValueByKey
(
String
key
,
String
value
);
}
}
\ No newline at end of file
fill-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
View file @
4aa06402
package
com.mortals.xhx.base.system.param.service.impl
;
package
com.mortals.xhx.base.system.param.service.impl
;
import
com.mortals.framework.common.code.YesNo
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.IParam
;
import
com.mortals.framework.service.IParam
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
...
@@ -8,12 +7,10 @@ import com.mortals.framework.util.DataUtil;
...
@@ -8,12 +7,10 @@ import com.mortals.framework.util.DataUtil;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.param.dao.ParamDao
;
import
com.mortals.xhx.base.system.param.dao.ParamDao
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
com.mortals.xhx.base.system.param.model.ParamQuery
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -30,9 +27,6 @@ import java.util.stream.Collectors;
...
@@ -30,9 +27,6 @@ import java.util.stream.Collectors;
@Service
(
"paramService"
)
@Service
(
"paramService"
)
public
class
ParamServiceImpl
extends
AbstractCRUDCacheServiceImpl
<
ParamDao
,
ParamEntity
,
Long
>
public
class
ParamServiceImpl
extends
AbstractCRUDCacheServiceImpl
<
ParamDao
,
ParamEntity
,
Long
>
implements
ParamService
{
implements
ParamService
{
private
final
String
HOT_WORDS
=
"HotWords"
;
private
final
String
PRINT_QUANTITY
=
"PrintDisplayQuantity"
;
@Override
@Override
protected
String
getCacheName
()
{
protected
String
getCacheName
()
{
return
"ParamEntity.paramKey"
;
return
"ParamEntity.paramKey"
;
...
@@ -65,92 +59,6 @@ public class ParamServiceImpl extends AbstractCRUDCacheServiceImpl<ParamDao, Par
...
@@ -65,92 +59,6 @@ public class ParamServiceImpl extends AbstractCRUDCacheServiceImpl<ParamDao, Par
).
collect
(
Collectors
.
toMap
(
ParamEntity:
:
getParamKey
,
ParamEntity:
:
getParamValue
,
(
o
,
n
)
->
n
));
).
collect
(
Collectors
.
toMap
(
ParamEntity:
:
getParamKey
,
ParamEntity:
:
getParamValue
,
(
o
,
n
)
->
n
));
}
}
@Override
public
String
getHotWords
()
{
return
this
.
getParamValue
(
HOT_WORDS
);
}
@Override
public
void
setHotWords
(
String
value
)
{
List
<
ParamEntity
>
list
=
this
.
getCacheList
();
ParamEntity
entity
=
null
;
for
(
ParamEntity
paramEntity:
list
){
if
(
HOT_WORDS
.
equals
(
paramEntity
.
getParamKey
())){
entity
=
paramEntity
;
break
;
}
}
if
(
entity
!=
null
){
entity
.
setParamValue
(
value
);
this
.
update
(
entity
);
}
else
{
entity
=
new
ParamEntity
();
entity
.
setParamValue
(
value
);
entity
.
setParamKey
(
HOT_WORDS
);
entity
.
setName
(
"热门搜索词汇"
);
entity
.
setCreateTime
(
new
Date
());
entity
.
setCreateUserId
(
1
l
);
entity
.
setCreateUserName
(
"系统管理员"
);
this
.
save
(
entity
);
}
}
@Override
public
int
getPrintDisplayQuantity
()
{
String
printV
=
this
.
getParamValue
(
PRINT_QUANTITY
);
return
DataUtil
.
converStr2Int
(
printV
,
20
);
}
@Override
public
void
setPrintDisplayQuantity
(
int
value
)
{
List
<
ParamEntity
>
list
=
this
.
getCacheList
();
ParamEntity
entity
=
null
;
for
(
ParamEntity
paramEntity:
list
){
if
(
PRINT_QUANTITY
.
equals
(
paramEntity
.
getParamKey
())){
entity
=
paramEntity
;
break
;
}
}
if
(
entity
!=
null
){
entity
.
setParamValue
(
String
.
valueOf
(
value
));
this
.
update
(
entity
);
}
else
{
entity
=
new
ParamEntity
();
entity
.
setParamValue
(
String
.
valueOf
(
value
));
entity
.
setParamKey
(
PRINT_QUANTITY
);
entity
.
setName
(
"空白打印材料展示数量"
);
entity
.
setCreateTime
(
new
Date
());
entity
.
setCreateUserId
(
1
l
);
entity
.
setCreateUserName
(
"系统管理员"
);
this
.
save
(
entity
);
}
}
@Override
public
void
setValueByKey
(
String
key
,
String
value
)
{
List
<
ParamEntity
>
list
=
this
.
getCacheList
();
ParamEntity
entity
=
null
;
for
(
ParamEntity
paramEntity:
list
){
if
(
key
.
equals
(
paramEntity
.
getParamKey
())){
entity
=
paramEntity
;
break
;
}
}
if
(
entity
!=
null
){
entity
.
setParamValue
(
String
.
valueOf
(
value
));
this
.
update
(
entity
);
}
else
{
entity
=
new
ParamEntity
();
entity
.
setParamValue
(
String
.
valueOf
(
value
));
entity
.
setParamKey
(
key
);
entity
.
setName
(
"key"
);
entity
.
setCreateTime
(
new
Date
());
entity
.
setCreateUserId
(
1
l
);
entity
.
setCreateUserName
(
"系统管理员"
);
this
.
save
(
entity
);
}
}
@Override
@Override
public
boolean
needRefresh
()
{
public
boolean
needRefresh
()
{
...
...
fill-manager/src/main/java/com/mortals/xhx/base/system/param/web/ParamController.java
View file @
4aa06402
package
com.mortals.xhx.base.system.param.web
;
package
com.mortals.xhx.base.system.param.web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.RepeatSubmit
;
import
com.mortals.framework.common.code.PageDisplayType
;
import
com.mortals.framework.common.code.PageDisplayType
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.util.FileUtil
;
import
com.mortals.framework.util.FileUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.mortals.framework.web.BaseCRUDJsonMappingController
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.DataSatusEnum
;
import
com.mortals.xhx.common.code.DataSatusEnum
;
import
com.mortals.xhx.common.code.ModStatusEnum
;
import
com.mortals.xhx.common.code.ModStatusEnum
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
*
* 参数信息
* 参数信息
*
* @author: zxfei
* @author: zxfei
* @date: 202
1/11/30 10:04
* @date: 202
2/5/7 15:38
*/
*/
@RestController
@RestController
@RequestMapping
(
"param"
)
@RequestMapping
(
"param"
)
public
class
ParamController
extends
BaseCRUDJson
MappingController
<
ParamService
,
ParamForm
,
ParamEntity
,
Long
>
{
public
class
ParamController
extends
BaseCRUDJson
BodyMappingController
<
ParamService
,
ParamEntity
,
Long
>
{
public
ParamController
()
{
public
ParamController
()
{
super
.
setFormClass
(
ParamForm
.
class
);
super
.
setFormClass
(
ParamForm
.
class
);
...
@@ -39,21 +31,17 @@ public class ParamController extends BaseCRUDJsonMappingController<ParamService,
...
@@ -39,21 +31,17 @@ public class ParamController extends BaseCRUDJsonMappingController<ParamService,
}
}
@Override
@Override
protected
void
init
(
HttpServletRequest
request
,
HttpServletResponse
response
,
ParamForm
form
,
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
Map
<
String
,
Object
>
model
,
Context
context
)
{
Map
<
String
,
Object
>
status
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
status
=
new
HashMap
<
String
,
Object
>();
status
.
put
(
"validStatus"
,
DataSatusEnum
.
getEnumMap
(
DataSatusEnum
.
CLOSE
.
getValue
(),
status
.
put
(
"validStatus"
,
DataSatusEnum
.
getEnumMap
(
DataSatusEnum
.
CLOSE
.
getValue
(),
DataSatusEnum
.
DELETE
.
getValue
(),
DataSatusEnum
.
OVERDUE
.
getValue
(),
DataSatusEnum
.
USEOUT
.
getValue
()));
DataSatusEnum
.
DELETE
.
getValue
(),
DataSatusEnum
.
OVERDUE
.
getValue
(),
DataSatusEnum
.
USEOUT
.
getValue
()));
status
.
put
(
"modStatus"
,
ModStatusEnum
.
getEnumMap
());
status
.
put
(
"modStatus"
,
ModStatusEnum
.
getEnumMap
());
status
.
put
(
"displayType"
,
getPageDisplayType
());
status
.
put
(
"displayType"
,
getPageDisplayType
());
model
.
put
(
KEY_RESULT_DICT
,
status
);
model
.
put
(
KEY_RESULT_DICT
,
status
);
super
.
init
(
request
,
response
,
form
,
model
,
context
);
}
}
private
Map
<
String
,
Object
>
getPageDisplayType
()
{
private
Map
<
String
,
Object
>
getPageDisplayType
()
{
PageDisplayType
[]
pageDisplayTypes
=
PageDisplayType
.
values
();
PageDisplayType
[]
pageDisplayTypes
=
PageDisplayType
.
values
();
Map
<
String
,
Object
>
result
=
new
HashMap
<>(
pageDisplayTypes
.
length
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>(
pageDisplayTypes
.
length
);
for
(
PageDisplayType
pageDisplayType
:
pageDisplayTypes
)
{
for
(
PageDisplayType
pageDisplayType
:
pageDisplayTypes
)
{
...
@@ -62,7 +50,6 @@ public class ParamController extends BaseCRUDJsonMappingController<ParamService,
...
@@ -62,7 +50,6 @@ public class ParamController extends BaseCRUDJsonMappingController<ParamService,
return
result
;
return
result
;
}
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
FileUtil
.
delete
(
"E:\\pic\\1.png"
);
FileUtil
.
delete
(
"E:\\pic\\1.png"
);
}
}
...
...
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