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
b050f932
Commit
b050f932
authored
Oct 10, 2022
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加事项来源字段
parent
1b494f6c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
790 additions
and
520 deletions
+790
-520
fill-manager/src/main/java/com/mortals/xhx/common/code/MatterSourceEnum.java
...in/java/com/mortals/xhx/common/code/MatterSourceEnum.java
+66
-0
fill-manager/src/main/java/com/mortals/xhx/module/matter/model/MatterEntity.java
...ava/com/mortals/xhx/module/matter/model/MatterEntity.java
+22
-1
fill-manager/src/main/java/com/mortals/xhx/module/matter/model/MatterQuery.java
...java/com/mortals/xhx/module/matter/model/MatterQuery.java
+122
-1
fill-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
...als/xhx/module/matter/service/impl/MatterServiceImpl.java
+11
-0
fill-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
...a/com/mortals/xhx/module/matter/web/MatterController.java
+3
-0
fill-manager/src/main/resources/sqlmap/module/matter/MatterMapper.xml
.../src/main/resources/sqlmap/module/matter/MatterMapper.xml
+566
-518
No files found.
fill-manager/src/main/java/com/mortals/xhx/common/code/MatterSourceEnum.java
0 → 100644
View file @
b050f932
package
com.mortals.xhx.common.code
;
import
com.mortals.framework.ap.SysConstains
;
import
com.mortals.framework.common.IBaseEnum
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
public
enum
MatterSourceEnum
implements
IBaseEnum
{
MANUAL
(
0
,
"手动添加"
,
SysConstains
.
STYLE_DEFAULT
),
AUTO
(
1
,
"站点事项"
,
SysConstains
.
STYLE_DEFAULT
);
private
int
value
;
private
String
desc
;
private
String
style
;
MatterSourceEnum
(
int
value
,
String
desc
,
String
style
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
this
.
style
=
style
;
}
@Override
public
int
getValue
()
{
return
this
.
value
;
}
public
String
getDesc
()
{
return
desc
;
}
public
String
getStyle
()
{
return
style
;
}
public
static
MatterSourceEnum
getByValue
(
int
value
)
{
for
(
MatterSourceEnum
e
:
MatterSourceEnum
.
values
())
{
if
(
e
.
getValue
()
==
value
)
{
return
e
;
}
}
return
null
;
}
public
static
Map
<
String
,
String
>
getEnumMap
(
int
...
eItem
)
{
Map
<
String
,
String
>
resultMap
=
new
LinkedHashMap
<
String
,
String
>();
for
(
MatterSourceEnum
item
:
MatterSourceEnum
.
values
())
{
try
{
boolean
hasE
=
false
;
for
(
int
e
:
eItem
){
if
(
item
.
getValue
()==
e
){
hasE
=
true
;
break
;
}
}
if
(!
hasE
){
resultMap
.
put
(
item
.
getValue
()+
""
,
item
.
getDesc
());
}
}
catch
(
Exception
ex
){
}
}
return
resultMap
;
}
}
fill-manager/src/main/java/com/mortals/xhx/module/matter/model/MatterEntity.java
View file @
b050f932
...
...
@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterVo;
* 事项申请材料实体对象
*
* @author zxfei
* @date 2022-
09-27
* @date 2022-
10-10
*/
public
class
MatterEntity
extends
MatterVo
{
...
...
@@ -64,6 +64,10 @@ public class MatterEntity extends MatterVo {
* 是否推荐(0.未推荐,1.推荐)
*/
private
Integer
isRecommend
;
/**
* 事项来源(0.手动添加,1.站点事项)
*/
private
Integer
source
;
...
...
@@ -236,6 +240,20 @@ public class MatterEntity extends MatterVo {
public
void
setIsRecommend
(
Integer
isRecommend
){
this
.
isRecommend
=
isRecommend
;
}
/**
* 获取 事项来源(0.手动添加,1.站点事项)
* @return Integer
*/
public
Integer
getSource
(){
return
source
;
}
/**
* 设置 事项来源(0.手动添加,1.站点事项)
* @param source
*/
public
void
setSource
(
Integer
source
){
this
.
source
=
source
;
}
...
...
@@ -270,6 +288,7 @@ public class MatterEntity extends MatterVo {
sb
.
append
(
",total:"
).
append
(
getTotal
());
sb
.
append
(
",sort:"
).
append
(
getSort
());
sb
.
append
(
",isRecommend:"
).
append
(
getIsRecommend
());
sb
.
append
(
",source:"
).
append
(
getSource
());
return
sb
.
toString
();
}
...
...
@@ -298,5 +317,7 @@ public class MatterEntity extends MatterVo {
this
.
sort
=
null
;
this
.
isRecommend
=
0
;
this
.
source
=
0
;
}
}
\ No newline at end of file
fill-manager/src/main/java/com/mortals/xhx/module/matter/model/MatterQuery.java
View file @
b050f932
...
...
@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterEntity;
* 事项申请材料查询对象
*
* @author zxfei
* @date 2022-
09-27
* @date 2022-
10-10
*/
public
class
MatterQuery
extends
MatterEntity
{
/** 开始 主键,自增长 */
...
...
@@ -102,6 +102,18 @@ public class MatterQuery extends MatterEntity {
/** 是否推荐(0.未推荐,1.推荐)列表 */
private
List
<
Integer
>
isRecommendList
;
/** 开始 事项来源(0.手动添加,1.站点事项) */
private
Integer
sourceStart
;
/** 结束 事项来源(0.手动添加,1.站点事项) */
private
Integer
sourceEnd
;
/** 增加 事项来源(0.手动添加,1.站点事项) */
private
Integer
sourceIncrement
;
/** 事项来源(0.手动添加,1.站点事项)列表 */
private
List
<
Integer
>
sourceList
;
/** 开始 创建时间 */
private
String
createTimeStart
;
...
...
@@ -623,6 +635,70 @@ public class MatterQuery extends MatterEntity {
this
.
isRecommendList
=
isRecommendList
;
}
/**
* 获取 开始 事项来源(0.手动添加,1.站点事项)
* @return sourceStart
*/
public
Integer
getSourceStart
(){
return
this
.
sourceStart
;
}
/**
* 设置 开始 事项来源(0.手动添加,1.站点事项)
* @param sourceStart
*/
public
void
setSourceStart
(
Integer
sourceStart
){
this
.
sourceStart
=
sourceStart
;
}
/**
* 获取 结束 事项来源(0.手动添加,1.站点事项)
* @return $sourceEnd
*/
public
Integer
getSourceEnd
(){
return
this
.
sourceEnd
;
}
/**
* 设置 结束 事项来源(0.手动添加,1.站点事项)
* @param sourceEnd
*/
public
void
setSourceEnd
(
Integer
sourceEnd
){
this
.
sourceEnd
=
sourceEnd
;
}
/**
* 获取 增加 事项来源(0.手动添加,1.站点事项)
* @return sourceIncrement
*/
public
Integer
getSourceIncrement
(){
return
this
.
sourceIncrement
;
}
/**
* 设置 增加 事项来源(0.手动添加,1.站点事项)
* @param sourceIncrement
*/
public
void
setSourceIncrement
(
Integer
sourceIncrement
){
this
.
sourceIncrement
=
sourceIncrement
;
}
/**
* 获取 事项来源(0.手动添加,1.站点事项)
* @return sourceList
*/
public
List
<
Integer
>
getSourceList
(){
return
this
.
sourceList
;
}
/**
* 设置 事项来源(0.手动添加,1.站点事项)
* @param sourceList
*/
public
void
setSourceList
(
List
<
Integer
>
sourceList
){
this
.
sourceList
=
sourceList
;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
...
...
@@ -1154,6 +1230,51 @@ public class MatterQuery extends MatterEntity {
return
this
;
}
/**
* 设置 事项来源(0.手动添加,1.站点事项)
* @param source
*/
public
MatterQuery
source
(
Integer
source
){
setSource
(
source
);
return
this
;
}
/**
* 设置 开始 事项来源(0.手动添加,1.站点事项)
* @param sourceStart
*/
public
MatterQuery
sourceStart
(
Integer
sourceStart
){
this
.
sourceStart
=
sourceStart
;
return
this
;
}
/**
* 设置 结束 事项来源(0.手动添加,1.站点事项)
* @param sourceEnd
*/
public
MatterQuery
sourceEnd
(
Integer
sourceEnd
){
this
.
sourceEnd
=
sourceEnd
;
return
this
;
}
/**
* 设置 增加 事项来源(0.手动添加,1.站点事项)
* @param sourceIncrement
*/
public
MatterQuery
sourceIncrement
(
Integer
sourceIncrement
){
this
.
sourceIncrement
=
sourceIncrement
;
return
this
;
}
/**
* 设置 事项来源(0.手动添加,1.站点事项)
* @param sourceList
*/
public
MatterQuery
sourceList
(
List
<
Integer
>
sourceList
){
this
.
sourceList
=
sourceList
;
return
this
;
}
/**
* 设置 创建用户
...
...
fill-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
View file @
b050f932
package
com.mortals.xhx.module.matter.service.impl
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.MatterSourceEnum
;
import
com.mortals.xhx.common.key.ParamKey
;
import
com.mortals.xhx.common.utils.StringUtils
;
import
com.mortals.xhx.module.sheet.dao.SheetMatterDao
;
...
...
@@ -40,6 +41,15 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
return
params
;
}
@Override
protected
void
saveBefore
(
MatterEntity
entity
,
Context
context
)
throws
AppException
{
entity
.
setTotal
(
0
);
entity
.
setSort
(
0
);
entity
.
setIsRecommend
(
0
);
entity
.
setSource
(
MatterSourceEnum
.
MANUAL
.
getValue
());
this
.
validData
(
entity
,
context
);
}
@Override
public
void
createMatterbBySheetMatter
(
Long
[]
sheetMatterIds
)
{
List
<
SheetMatterEntity
>
sheetMatterEntityList
=
sheetMatterDao
.
get
(
sheetMatterIds
);
...
...
@@ -67,6 +77,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
matterEntity
.
setTotal
(
0
);
matterEntity
.
setSort
(
0
);
matterEntity
.
setIsRecommend
(
0
);
matterEntity
.
setSource
(
MatterSourceEnum
.
AUTO
.
getValue
());
matterEntity
.
setCreateUserId
(
1
l
);
matterEntity
.
setCreateTime
(
now
);
list
.
add
(
matterEntity
);
...
...
fill-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
View file @
b050f932
package
com.mortals.xhx.module.matter.web
;
import
com.mortals.framework.common.IBaseEnum
;
import
com.mortals.framework.common.code.YesNo
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.MatterSourceEnum
;
import
com.mortals.xhx.common.key.ParamKey
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -48,6 +50,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
this
.
addDict
(
model
,
"isRecommend"
,
paramService
.
getParamBySecondOrganize
(
"Matter"
,
"isRecommend"
));
this
.
addDict
(
model
,
"source"
,
IBaseEnum
.
getEnumMap
(
MatterSourceEnum
.
class
));
super
.
init
(
model
,
context
);
}
...
...
fill-manager/src/main/resources/sqlmap/module/matter/MatterMapper.xml
View file @
b050f932
This diff is collapsed.
Click to expand it.
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