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
b0e33ddd
Commit
b0e33ddd
authored
Feb 17, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加应用白名单接口
parent
0715e197
Pipeline
#2478
canceled with stages
Changes
9
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
43 additions
and
37 deletions
+43
-37
common-lib/src/main/java/com/mortals/xhx/common/pdu/site/SiteMatterPdu.java
...n/java/com/mortals/xhx/common/pdu/site/SiteMatterPdu.java
+11
-0
common-lib/src/main/java/com/mortals/xhx/feign/site/ISiteMatterFeign.java
...ain/java/com/mortals/xhx/feign/site/ISiteMatterFeign.java
+1
-1
fill-manager/src/main/java/com/mortals/xhx/base/system/task/dao/ibatis/TaskDaoImpl.java
.../mortals/xhx/base/system/task/dao/ibatis/TaskDaoImpl.java
+0
-1
fill-manager/src/main/java/com/mortals/xhx/base/system/task/model/TaskEntity.java
...va/com/mortals/xhx/base/system/task/model/TaskEntity.java
+2
-2
fill-manager/src/main/java/com/mortals/xhx/base/system/task/service/impl/TaskServiceImpl.java
...ls/xhx/base/system/task/service/impl/TaskServiceImpl.java
+6
-11
fill-manager/src/main/java/com/mortals/xhx/base/system/task/web/TaskController.java
.../com/mortals/xhx/base/system/task/web/TaskController.java
+7
-13
fill-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
...a/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
+13
-3
fill-manager/src/main/java/com/mortals/xhx/module/sheet/service/SheetMatterService.java
.../mortals/xhx/module/sheet/service/SheetMatterService.java
+3
-0
fill-manager/src/main/resources/sqlmap/module/sheet/SheetMatterMapperExt.xml
...in/resources/sqlmap/module/sheet/SheetMatterMapperExt.xml
+0
-6
No files found.
common-lib/src/main/java/com/mortals/xhx/common/pdu/site/SiteMatterPdu.java
View file @
b0e33ddd
...
@@ -41,6 +41,8 @@ public class SiteMatterPdu extends BaseEntityLong {
...
@@ -41,6 +41,8 @@ public class SiteMatterPdu extends BaseEntityLong {
* 部门名称
* 部门名称
*/
*/
private
String
deptName
;
private
String
deptName
;
private
String
areaCode
;
/**
/**
* 事项类型
* 事项类型
*/
*/
...
@@ -163,6 +165,15 @@ public class SiteMatterPdu extends BaseEntityLong {
...
@@ -163,6 +165,15 @@ public class SiteMatterPdu extends BaseEntityLong {
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private
List
<
SiteMatterPdu
>
andConditionList
;
private
List
<
SiteMatterPdu
>
andConditionList
;
public
String
getAreaCode
()
{
return
areaCode
;
}
public
void
setAreaCode
(
String
areaCode
)
{
this
.
areaCode
=
areaCode
;
}
public
SiteMatterPdu
(){}
public
SiteMatterPdu
(){}
/**
/**
* 获取 站点ID
* 获取 站点ID
...
...
common-lib/src/main/java/com/mortals/xhx/feign/site/ISiteMatterFeign.java
View file @
b0e33ddd
...
@@ -15,7 +15,7 @@ import java.util.List;
...
@@ -15,7 +15,7 @@ import java.util.List;
* @author zxfei
* @author zxfei
* @date 2023-02-17
* @date 2023-02-17
*/
*/
@FeignClient
(
name
=
"
"
,
path
=
"
"
,
fallbackFactory
=
SiteMatterFeignFallbackFactory
.
class
)
@FeignClient
(
name
=
"
base-manager"
,
path
=
"/base
"
,
fallbackFactory
=
SiteMatterFeignFallbackFactory
.
class
)
public
interface
ISiteMatterFeign
extends
IFeign
{
public
interface
ISiteMatterFeign
extends
IFeign
{
...
...
fill-manager/src/main/java/com/mortals/xhx/base/system/task/dao/ibatis/TaskDaoImpl.java
View file @
b0e33ddd
...
@@ -11,7 +11,6 @@ package com.mortals.xhx.base.system.task.dao.ibatis;
...
@@ -11,7 +11,6 @@ package com.mortals.xhx.base.system.task.dao.ibatis;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.xhx.base.system.task.dao.TaskDao
;
import
com.mortals.xhx.base.system.task.dao.TaskDao
;
import
com.mortals.xhx.base.system.task.model.TaskEntity
;
import
com.mortals.xhx.base.system.task.model.TaskEntity
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
/**
/**
* <p>Title: 任务信息</p>
* <p>Title: 任务信息</p>
...
...
fill-manager/src/main/java/com/mortals/xhx/base/system/task/model/TaskEntity.java
View file @
b0e33ddd
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
package
com.mortals.xhx.base.system.task.model
;
package
com.mortals.xhx.base.system.task.model
;
import
java.util.Date
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.framework.service.ITask
;
import
com.mortals.framework.service.ITask
;
import
java.util.Date
;
/**
/**
* <p>Title: 任务信息</p>
* <p>Title: 任务信息</p>
* <p>Description: TaskEntity </p>
* <p>Description: TaskEntity </p>
...
...
fill-manager/src/main/java/com/mortals/xhx/base/system/task/service/impl/TaskServiceImpl.java
View file @
b0e33ddd
...
@@ -4,17 +4,6 @@
...
@@ -4,17 +4,6 @@
package
com.mortals.xhx.base.system.task.service.impl
;
package
com.mortals.xhx.base.system.task.service.impl
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.common.code.ExcuteStatus
;
import
com.mortals.framework.common.code.ExcuteStatus
;
import
com.mortals.framework.common.code.TaskExcuteStrategy
;
import
com.mortals.framework.common.code.TaskExcuteStrategy
;
...
@@ -30,6 +19,12 @@ import com.mortals.xhx.base.system.task.dao.TaskDao;
...
@@ -30,6 +19,12 @@ import com.mortals.xhx.base.system.task.dao.TaskDao;
import
com.mortals.xhx.base.system.task.model.TaskEntity
;
import
com.mortals.xhx.base.system.task.model.TaskEntity
;
import
com.mortals.xhx.base.system.task.model.TaskQuery
;
import
com.mortals.xhx.base.system.task.model.TaskQuery
;
import
com.mortals.xhx.base.system.task.service.TaskService
;
import
com.mortals.xhx.base.system.task.service.TaskService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
/**
/**
* <p>
* <p>
...
...
fill-manager/src/main/java/com/mortals/xhx/base/system/task/web/TaskController.java
View file @
b0e33ddd
package
com.mortals.xhx.base.system.task.web
;
package
com.mortals.xhx.base.system.task.web
;
import
java.util.HashMap
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.task.model.TaskQuery
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ITaskExcuteService
;
import
com.mortals.framework.service.ITaskExcuteService
;
import
com.mortals.framework.web.BaseCRUDJsonMappingController
;
import
com.mortals.framework.web.BaseCRUDJson
Body
MappingController
;
import
com.mortals.xhx.base.system.task.model.TaskEntity
;
import
com.mortals.xhx.base.system.task.model.TaskEntity
;
import
com.mortals.xhx.base.system.task.model.TaskQuery
;
import
com.mortals.xhx.base.system.task.service.TaskService
;
import
com.mortals.xhx.base.system.task.service.TaskService
;
import
com.mortals.xhx.common.code.DataSatusEnum
;
import
com.mortals.xhx.common.code.DataSatusEnum
;
import
com.mortals.xhx.common.code.TaskExcuteStatusEnum
;
import
com.mortals.xhx.common.code.TaskExcuteStatusEnum
;
import
com.mortals.xhx.common.code.TaskExcuteStrategyEnum
;
import
com.mortals.xhx.common.code.TaskExcuteStrategyEnum
;
import
com.mortals.xhx.common.code.TaskInterimExcuteStatusEnum
;
import
com.mortals.xhx.common.code.TaskInterimExcuteStatusEnum
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* 任务信息
* 任务信息
...
...
fill-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
View file @
b0e33ddd
package
com.mortals.xhx.daemon.task
;
package
com.mortals.xhx.daemon.task
;
import
cn.hutool.core.collection.ListUtil
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ITask
;
import
com.mortals.framework.service.ITask
;
...
@@ -11,6 +12,7 @@ import com.mortals.xhx.common.pdu.site.SitePdu;
...
@@ -11,6 +12,7 @@ import com.mortals.xhx.common.pdu.site.SitePdu;
import
com.mortals.xhx.feign.site.ISiteFeign
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
import
com.mortals.xhx.feign.site.ISiteMatterFeign
;
import
com.mortals.xhx.feign.site.ISiteMatterFeign
;
import
com.mortals.xhx.module.sheet.model.SheetMatterEntity
;
import
com.mortals.xhx.module.sheet.model.SheetMatterEntity
;
import
com.mortals.xhx.module.sheet.model.SheetMatterQuery
;
import
com.mortals.xhx.module.sheet.service.SheetMatterService
;
import
com.mortals.xhx.module.sheet.service.SheetMatterService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -36,7 +38,7 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
...
@@ -36,7 +38,7 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
@Override
@Override
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
log
.
info
(
"开始同步事项列表!"
);
SitePdu
sitePdu
=
new
SitePdu
();
SitePdu
sitePdu
=
new
SitePdu
();
sitePdu
.
setId
(
1L
);
sitePdu
.
setId
(
1L
);
Rest
<
List
<
SitePdu
>>
siteRest
=
siteFeign
.
getFlatSitesBySiteId
(
sitePdu
);
Rest
<
List
<
SitePdu
>>
siteRest
=
siteFeign
.
getFlatSitesBySiteId
(
sitePdu
);
...
@@ -51,16 +53,24 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
...
@@ -51,16 +53,24 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
List
<
SheetMatterEntity
>
sheetMatterEntities
=
siteMatterRest
.
getData
().
getData
().
stream
().
map
(
siteMatter
->
{
List
<
SheetMatterEntity
>
sheetMatterEntities
=
siteMatterRest
.
getData
().
getData
().
stream
().
map
(
siteMatter
->
{
SheetMatterEntity
sheetMatterEntity
=
new
SheetMatterEntity
();
SheetMatterEntity
sheetMatterEntity
=
new
SheetMatterEntity
();
sheetMatterEntity
.
initAttrValue
();
sheetMatterEntity
.
initAttrValue
();
sheetMatterEntity
.
setId
(
siteMatter
.
getMatterId
());
sheetMatterEntity
.
setSiteId
(
siteMatter
.
getSiteId
());
sheetMatterEntity
.
setSiteId
(
siteMatter
.
getSiteId
());
sheetMatterEntity
.
setMatterName
(
siteMatter
.
getMatterName
());
sheetMatterEntity
.
setMatterName
(
siteMatter
.
getMatterName
());
sheetMatterEntity
.
setMatterNo
(
siteMatter
.
getMatterCode
());
sheetMatterEntity
.
setMatterNo
(
siteMatter
.
getMatterCode
());
sheetMatterEntity
.
setDeptCode
(
siteMatter
.
getDeptCode
());
sheetMatterEntity
.
setDeptCode
(
siteMatter
.
getDeptCode
());
sheetMatterEntity
.
setDeptName
(
siteMatter
.
getDeptCode
());
sheetMatterEntity
.
setDeptName
(
siteMatter
.
getDeptName
());
sheetMatterEntity
.
setAreaCode
(
siteMatter
.
getAreaCode
());
sheetMatterEntity
.
setSource
(
siteMatter
.
getSource
());
return
sheetMatterEntity
;
return
sheetMatterEntity
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
sheetMatterEntities
))
{
if
(!
ObjectUtils
.
isEmpty
(
sheetMatterEntities
))
{
sheetMatterService
.
save
(
sheetMatterEntities
);
sheetMatterService
.
getDao
().
delete
(
new
SheetMatterQuery
().
siteId
(
site
.
getId
()));
List
<
List
<
SheetMatterEntity
>>
partition
=
ListUtil
.
partition
(
sheetMatterEntities
,
500
);
for
(
List
<
SheetMatterEntity
>
matterEntities
:
partition
)
{
sheetMatterService
.
save
(
matterEntities
);
}
}
}
}
}
});
});
...
...
fill-manager/src/main/java/com/mortals/xhx/module/sheet/service/SheetMatterService.java
View file @
b0e33ddd
...
@@ -5,6 +5,7 @@ import com.mortals.framework.model.PageInfo;
...
@@ -5,6 +5,7 @@ import com.mortals.framework.model.PageInfo;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.matter.model.MatterEntity
;
import
com.mortals.xhx.module.matter.model.MatterEntity
;
import
com.mortals.xhx.module.sheet.dao.SheetMatterDao
;
import
com.mortals.xhx.module.sheet.model.SheetMatterEntity
;
import
com.mortals.xhx.module.sheet.model.SheetMatterEntity
;
/**
/**
...
@@ -17,5 +18,7 @@ import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
...
@@ -17,5 +18,7 @@ import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
*/
*/
public
interface
SheetMatterService
extends
ICRUDService
<
SheetMatterEntity
,
Long
>
{
public
interface
SheetMatterService
extends
ICRUDService
<
SheetMatterEntity
,
Long
>
{
SheetMatterDao
getDao
();
Result
<
SheetMatterEntity
>
findSubList
(
SheetMatterEntity
matterQuery
,
PageInfo
pageInfo
,
Context
context
);
Result
<
SheetMatterEntity
>
findSubList
(
SheetMatterEntity
matterQuery
,
PageInfo
pageInfo
,
Context
context
);
}
}
\ No newline at end of file
fill-manager/src/main/resources/sqlmap/module/sheet/SheetMatterMapperExt.xml
View file @
b0e33ddd
...
@@ -20,9 +20,6 @@
...
@@ -20,9 +20,6 @@
<if
test=
"condition.matterName != null and condition.matterName != ''"
>
<if
test=
"condition.matterName != null and condition.matterName != ''"
>
and a.matterName like #{condition.matterName}
and a.matterName like #{condition.matterName}
</if>
</if>
<if
test=
"condition.matterFullName != null and condition.matterFullName != ''"
>
and a.matterName like #{condition.matterName}
</if>
</trim>
</trim>
</trim>
</trim>
</select>
</select>
...
@@ -46,9 +43,6 @@
...
@@ -46,9 +43,6 @@
<if
test=
"condition.matterName != null and condition.matterName != ''"
>
<if
test=
"condition.matterName != null and condition.matterName != ''"
>
and a.matterName like #{condition.matterName}
and a.matterName like #{condition.matterName}
</if>
</if>
<if
test=
"condition.matterFullName != null and condition.matterFullName != ''"
>
and a.matterName like #{condition.matterName}
</if>
</trim>
</trim>
</trim>
</trim>
</select>
</select>
...
...
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