Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
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
赵啸非
sample-form-platform
Commits
d0e6b6a7
Commit
d0e6b6a7
authored
Feb 19, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/sample-form-platform
parents
93b4a288
60652f88
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1567 additions
and
107 deletions
+1567
-107
common-lib/src/main/java/com/mortals/xhx/common/pdu/site/SiteMatterPdu.java
...n/java/com/mortals/xhx/common/pdu/site/SiteMatterPdu.java
+1320
-0
common-lib/src/main/java/com/mortals/xhx/feign/site/ISiteMatterFeign.java
...ain/java/com/mortals/xhx/feign/site/ISiteMatterFeign.java
+100
-0
sample-form-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
sample-form-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
sample-form-manager/src/main/java/com/mortals/xhx/base/system/task/service/impl/TaskServiceImpl.java
...ls/xhx/base/system/task/service/impl/TaskServiceImpl.java
+18
-23
sample-form-manager/src/main/java/com/mortals/xhx/base/system/task/web/TaskController.java
.../com/mortals/xhx/base/system/task/web/TaskController.java
+20
-64
sample-form-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
...a/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
+84
-0
sample-form-manager/src/main/java/com/mortals/xhx/module/sheet/service/SheetMatterService.java
.../mortals/xhx/module/sheet/service/SheetMatterService.java
+3
-0
sample-form-manager/src/main/resources/logback-spring.xml
sample-form-manager/src/main/resources/logback-spring.xml
+13
-4
sample-form-manager/src/main/resources/sqlmap/module/sheet/SheetMatterMapper.xml
.../main/resources/sqlmap/module/sheet/SheetMatterMapper.xml
+5
-5
sample-form-manager/src/main/resources/sqlmap/module/sheet/SheetMatterMapperExt.xml
...in/resources/sqlmap/module/sheet/SheetMatterMapperExt.xml
+2
-8
No files found.
common-lib/src/main/java/com/mortals/xhx/common/pdu/site/SiteMatterPdu.java
0 → 100644
View file @
d0e6b6a7
This diff is collapsed.
Click to expand it.
common-lib/src/main/java/com/mortals/xhx/feign/site/ISiteMatterFeign.java
0 → 100644
View file @
d0e6b6a7
package
com.mortals.xhx.feign.site
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.common.pdu.RespData
;
import
com.mortals.xhx.common.pdu.site.SiteMatterPdu
;
import
com.mortals.xhx.feign.IFeign
;
import
feign.hystrix.FallbackFactory
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 站点事项 Feign接口
* @author zxfei
* @date 2023-02-17
*/
@FeignClient
(
name
=
"base-manager"
,
path
=
"/base"
,
fallbackFactory
=
SiteMatterFeignFallbackFactory
.
class
)
public
interface
ISiteMatterFeign
extends
IFeign
{
/**
* 查看站点事项列表
*
* @param siteMatterPdu
* @return
*/
@PostMapping
(
value
=
"/site/matter/list"
)
Rest
<
RespData
<
List
<
SiteMatterPdu
>>>
list
(
@RequestBody
SiteMatterPdu
siteMatterPdu
);
/**
* 查看站点事项
*
* @param id
* @return
*/
@GetMapping
(
value
=
"/site/matter/info"
)
Rest
<
SiteMatterPdu
>
info
(
@RequestParam
(
value
=
"id"
)
Long
id
);
/**
* 删除站点事项
*
* @param ids
* @return
*/
@GetMapping
(
value
=
"/site/matter/delete"
)
Rest
<
Void
>
delete
(
Long
[]
ids
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
/**
* 站点事项保存更新
*
* @param siteMatterPdu
* @return
*/
@PostMapping
(
value
=
"/site/matter/save"
)
Rest
<
RespData
<
SiteMatterPdu
>>
save
(
@RequestBody
SiteMatterPdu
siteMatterPdu
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
}
@Slf4j
@Component
class
SiteMatterFeignFallbackFactory
implements
FallbackFactory
<
ISiteMatterFeign
>
{
@Override
public
ISiteMatterFeign
create
(
Throwable
t
)
{
return
new
ISiteMatterFeign
()
{
@Override
public
Rest
<
RespData
<
List
<
SiteMatterPdu
>>>
list
(
SiteMatterPdu
siteMatterPdu
)
{
return
Rest
.
fail
(
"暂时无法获取站点事项列表,请稍后再试!"
);
}
@Override
public
Rest
<
SiteMatterPdu
>
info
(
Long
id
)
{
return
Rest
.
fail
(
"暂时无法获取站点事项详细,请稍后再试!"
);
}
@Override
public
Rest
<
Void
>
delete
(
Long
[]
ids
,
String
authorization
)
{
return
Rest
.
fail
(
"暂时无法删除站点事项,请稍后再试!"
);
}
@Override
public
Rest
<
RespData
<
SiteMatterPdu
>>
save
(
SiteMatterPdu
siteMatterPdu
,
String
authorization
)
{
return
Rest
.
fail
(
"暂时无法保存站点事项,请稍后再试!"
);
}
};
}
}
sample-form-manager/src/main/java/com/mortals/xhx/base/system/task/dao/ibatis/TaskDaoImpl.java
View file @
d0e6b6a7
...
@@ -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>
...
...
sample-form-manager/src/main/java/com/mortals/xhx/base/system/task/model/TaskEntity.java
View file @
d0e6b6a7
...
@@ -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>
...
...
sample-form-manager/src/main/java/com/mortals/xhx/base/system/task/service/impl/TaskServiceImpl.java
View file @
d0e6b6a7
...
@@ -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>
...
@@ -62,7 +57,7 @@ public class TaskServiceImpl extends AbstractCRUDServiceImpl<TaskDao, TaskEntity
...
@@ -62,7 +57,7 @@ public class TaskServiceImpl extends AbstractCRUDServiceImpl<TaskDao, TaskEntity
private
Thread
thread
=
null
;
private
Thread
thread
=
null
;
/** 日志打印时间,key:任务ID,value:最后一次打印日志时间 */
/** 日志打印时间,key:任务ID,value:最后一次打印日志时间 */
private
Map
<
Long
,
Long
>
printLogTime
=
new
HashMap
<
Long
,
Long
>();
private
Map
<
Long
,
Long
>
printLogTime
=
new
HashMap
<>();
@Autowired
(
required
=
false
)
@Autowired
(
required
=
false
)
private
TaskService
taskService
;
private
TaskService
taskService
;
...
@@ -297,7 +292,7 @@ public class TaskServiceImpl extends AbstractCRUDServiceImpl<TaskDao, TaskEntity
...
@@ -297,7 +292,7 @@ public class TaskServiceImpl extends AbstractCRUDServiceImpl<TaskDao, TaskEntity
executorService
.
shutdown
();
executorService
.
shutdown
();
log
.
info
(
"任务执行线程退出!"
);
log
.
info
(
"任务执行线程退出!"
);
});
});
//
thread.start();
thread
.
start
();
}
}
@Override
@Override
...
...
sample-form-manager/src/main/java/com/mortals/xhx/base/system/task/web/TaskController.java
View file @
d0e6b6a7
/**
* 文件:TaskController.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
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
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
;
/**
/**
* <p>Title: 任务信息</p>
* 任务信息
* <p>Description: TaskController </p>
*
* <p>Copyright: Copyright ® </p>
* @author: zxfei
* <p>Company: </p>
* @date: 2022/5/7 15:39
* @author
* @version 1.0.0
*/
*/
@RestController
@RestController
@RequestMapping
(
"task"
)
@RequestMapping
(
"task"
)
public
class
TaskController
extends
BaseCRUDJson
MappingController
<
TaskService
,
TaskForm
,
TaskEntity
,
Long
>
{
public
class
TaskController
extends
BaseCRUDJson
BodyMappingController
<
TaskService
,
TaskEntity
,
Long
>
{
public
TaskController
()
{
public
TaskController
()
{
super
.
setFormClass
(
TaskForm
.
class
);
super
.
setFormClass
(
TaskForm
.
class
);
...
@@ -50,8 +37,7 @@ public class TaskController extends BaseCRUDJsonMappingController<TaskService, T
...
@@ -50,8 +37,7 @@ public class TaskController extends BaseCRUDJsonMappingController<TaskService, T
@Override
@Override
protected
void
init
(
HttpServletRequest
request
,
HttpServletResponse
response
,
TaskForm
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
(
"status"
,
TaskExcuteStatusEnum
.
getEnumMap
());
status
.
put
(
"status"
,
TaskExcuteStatusEnum
.
getEnumMap
());
status
.
put
(
"excuteStrategy"
,
TaskExcuteStrategyEnum
.
getEnumMap
());
status
.
put
(
"excuteStrategy"
,
TaskExcuteStrategyEnum
.
getEnumMap
());
...
@@ -71,60 +57,30 @@ public class TaskController extends BaseCRUDJsonMappingController<TaskService, T
...
@@ -71,60 +57,30 @@ public class TaskController extends BaseCRUDJsonMappingController<TaskService, T
}
}
model
.
put
(
"excuteService"
,
serviceList
);
model
.
put
(
"excuteService"
,
serviceList
);
model
.
put
(
KEY_RESULT_DICT
,
status
);
model
.
put
(
KEY_RESULT_DICT
,
status
);
super
.
init
(
request
,
response
,
form
,
model
,
context
);
}
/**
* @param request
* @param response
* @param form
* @param model
* @param context
* @throws AppException
* @Description: TODO
*/
@Override
protected
void
saveBefore
(
HttpServletRequest
request
,
HttpServletResponse
response
,
TaskForm
form
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
if
(
null
==
form
.
getEntity
().
getExcuteService
())
{
}
// TaskEntity condition = new TaskEntity();
// condition.setExcuteService(form.getEntity().getExcuteService());
// List<TaskEntity> datas = this.service.find(condition, context);
// if (null != datas && datas.size() > 0) {
// for (TaskEntity entity : datas) {
// if (entity.getId().longValue() != form.getEntity().getId().longValue()) {
// throw new AppException("任务已存在,请勿重复配置");
// }
// }
// }
super
.
saveBefore
(
request
,
response
,
form
,
model
,
context
);
}
}
/**
/**
* 改变状态
* 改变状态
*/
*/
@RequestMapping
(
value
=
"change/status"
)
@RequestMapping
(
value
=
"change/status"
)
public
String
changeStatus
(
HttpServletRequest
request
,
HttpServletResponse
response
,
TaskForm
form
)
{
public
String
changeStatus
(
TaskQuery
query
)
{
JSONObject
ret
=
new
JSONObject
();
JSONObject
ret
=
new
JSONObject
();
Context
context
=
getContext
();
Context
context
=
getContext
();
try
{
try
{
TaskEntity
entity
=
this
.
service
.
get
(
form
.
getEntity
()
.
getId
(),
context
);
// .doSubmitAudit(form.getEntity(),
TaskEntity
entity
=
this
.
service
.
get
(
query
.
getId
(),
context
);
// .doSubmitAudit(form.getEntity(),
// context);
// context);
if
(
null
==
entity
)
{
if
(
null
==
entity
)
{
throw
new
AppException
(
"任务不存在!"
);
throw
new
AppException
(
"任务不存在!"
);
}
}
if
(
null
==
form
.
getEntity
()
.
getStatus
())
{
if
(
null
==
query
.
getStatus
())
{
throw
new
AppException
(
"任务状态不能为空!"
);
throw
new
AppException
(
"任务状态不能为空!"
);
}
}
if
(
form
.
getEntity
()
.
getStatus
()
!=
DataSatusEnum
.
ENABLE
.
getValue
()
if
(
query
.
getStatus
()
!=
DataSatusEnum
.
ENABLE
.
getValue
()
&&
form
.
getEntity
()
.
getStatus
()
!=
DataSatusEnum
.
DISENABLE
.
getValue
())
{
&&
query
.
getStatus
()
!=
DataSatusEnum
.
DISENABLE
.
getValue
())
{
throw
new
AppException
(
"非法任务状态!"
);
throw
new
AppException
(
"非法任务状态!"
);
}
}
String
busiDesc
=
DataSatusEnum
.
getByValue
(
form
.
getEntity
()
.
getStatus
()).
getDesc
();
String
busiDesc
=
DataSatusEnum
.
getByValue
(
query
.
getStatus
()).
getDesc
();
entity
.
setStatus
(
form
.
getEntity
()
.
getStatus
());
entity
.
setStatus
(
query
.
getStatus
());
this
.
service
.
update
(
entity
,
context
);
this
.
service
.
update
(
entity
,
context
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_MSG
,
busiDesc
+
"成功"
);
ret
.
put
(
KEY_RESULT_MSG
,
busiDesc
+
"成功"
);
...
...
sample-form-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
0 → 100644
View file @
d0e6b6a7
package
com.mortals.xhx.daemon.task
;
import
cn.hutool.core.collection.ListUtil
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ITask
;
import
com.mortals.framework.service.ITaskExcuteService
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.pdu.RespData
;
import
com.mortals.xhx.common.pdu.site.SiteMatterPdu
;
import
com.mortals.xhx.common.pdu.site.SitePdu
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
import
com.mortals.xhx.feign.site.ISiteMatterFeign
;
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
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 同步事项列表
*/
@Slf4j
@Service
(
"SyncSiteMatterTask"
)
public
class
SyncSiteMatterTaskImpl
implements
ITaskExcuteService
{
@Autowired
private
ISiteFeign
siteFeign
;
@Autowired
private
ISiteMatterFeign
siteMatterFeign
;
@Autowired
private
SheetMatterService
sheetMatterService
;
@Override
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
log
.
info
(
"开始同步事项列表!"
);
SitePdu
sitePdu
=
new
SitePdu
();
sitePdu
.
setId
(
1L
);
Rest
<
List
<
SitePdu
>>
siteRest
=
siteFeign
.
getFlatSitesBySiteId
(
sitePdu
);
if
(
siteRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
siteRest
.
getData
().
forEach
(
site
->
{
SiteMatterPdu
siteMatterPdu
=
new
SiteMatterPdu
();
siteMatterPdu
.
setPage
(
1
);
siteMatterPdu
.
setSize
(-
1
);
Rest
<
RespData
<
List
<
SiteMatterPdu
>>>
siteMatterRest
=
siteMatterFeign
.
list
(
siteMatterPdu
);
if
(
siteMatterRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
//删除后新增
List
<
SheetMatterEntity
>
sheetMatterEntities
=
siteMatterRest
.
getData
().
getData
().
stream
().
map
(
siteMatter
->
{
SheetMatterEntity
sheetMatterEntity
=
new
SheetMatterEntity
();
sheetMatterEntity
.
initAttrValue
();
sheetMatterEntity
.
setId
(
siteMatter
.
getMatterId
());
sheetMatterEntity
.
setSiteId
(
siteMatter
.
getSiteId
());
sheetMatterEntity
.
setMatterName
(
siteMatter
.
getMatterName
());
sheetMatterEntity
.
setMatterNo
(
siteMatter
.
getMatterCode
());
sheetMatterEntity
.
setDeptCode
(
siteMatter
.
getDeptCode
());
sheetMatterEntity
.
setDeptName
(
siteMatter
.
getDeptName
());
sheetMatterEntity
.
setAreaCode
(
siteMatter
.
getAreaCode
());
sheetMatterEntity
.
setSource
(
siteMatter
.
getSource
());
return
sheetMatterEntity
;
}).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
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
);
}
}
}
});
}
}
@Override
public
void
stopTask
(
ITask
task
)
throws
AppException
{
}
}
sample-form-manager/src/main/java/com/mortals/xhx/module/sheet/service/SheetMatterService.java
View file @
d0e6b6a7
...
@@ -4,6 +4,7 @@ import com.mortals.framework.model.Context;
...
@@ -4,6 +4,7 @@ import com.mortals.framework.model.Context;
import
com.mortals.framework.model.PageInfo
;
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.sheet.dao.SheetMatterDao
;
import
com.mortals.xhx.module.sheet.model.SheetMatterEntity
;
import
com.mortals.xhx.module.sheet.model.SheetMatterEntity
;
/**
/**
...
@@ -16,5 +17,7 @@ import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
...
@@ -16,5 +17,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
sample-form-manager/src/main/resources/logback-spring.xml
View file @
d0e6b6a7
...
@@ -40,11 +40,11 @@
...
@@ -40,11 +40,11 @@
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${logFilePath}/${springApplicationName:-default}/${springApplicationName:-default}-error.log.%d{yyyyMMdd}
</fileNamePattern>
<fileNamePattern>
${logFilePath}/${springApplicationName:-default}/${springApplicationName:-default}-error.log.%d{yyyyMMdd}
</fileNamePattern>
<!--日志文件保留天数-->
<!--日志文件保留天数-->
<MaxHistory>
7
</MaxHistory>
<MaxHistory>
15
</MaxHistory>
</rollingPolicy>
</rollingPolicy>
</appender>
</appender>
<root
level=
"
info
"
>
<root
level=
"
${logLevel}
"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"fileInfo"
/>
<appender-ref
ref=
"fileInfo"
/>
<appender-ref
ref=
"fileError"
/>
<appender-ref
ref=
"fileError"
/>
...
@@ -52,16 +52,25 @@
...
@@ -52,16 +52,25 @@
<!--TRACE < DEBUG < INFO < WARN < ERROR < FATAL -->
<!--TRACE < DEBUG < INFO < WARN < ERROR < FATAL -->
<!--用来设置某一个包或者具体的某一个类的日志打印级别、以及指定<appender>。
<!--用来设置某一个包或者具体的某一个类的日志打印级别、以及指定<appender>。<logger>仅有一个name属性,一个可选的level和一个可选的additivity属性。-->
<logger>仅有一个name属性,一个可选的level和一个可选的additivity属性。-->
<!-- name 用来指定受此loger约束的某一个包或者具体的某一个类-->
<!-- name 用来指定受此loger约束的某一个包或者具体的某一个类-->
<!-- level 用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。如果未设置此属性,那么当前logger将会继承上级的级别-->
<!-- level 用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。如果未设置此属性,那么当前logger将会继承上级的级别-->
<!-- additivity 是否向上级logger传递打印信息。默认是true。false:表示只用当前logger的appender-ref。true:表示当前logger的appender-ref和rootLogger的appender-ref都有效。-->
<!-- additivity 是否向上级logger传递打印信息。默认是true。false:表示只用当前logger的appender-ref。true:表示当前logger的appender-ref和rootLogger的appender-ref都有效。-->
<logger
name=
"com.mortals"
level=
"${logLevel}"
additivity=
"false"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"fileInfo"
/>
<appender-ref
ref=
"fileError"
/>
</logger>
<logger
name=
"com.mortals.xhx.module"
level=
"${logLevel}"
additivity=
"false"
>
<logger
name=
"com.mortals.xhx.module"
level=
"${logLevel}"
additivity=
"false"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"fileInfo"
/>
<appender-ref
ref=
"fileInfo"
/>
<appender-ref
ref=
"fileError"
/>
<appender-ref
ref=
"fileError"
/>
</logger>
</logger>
<!--
<logger name="com.mortals.xhx.module">
<level value="debug"/>
</logger>-->
</configuration>
</configuration>
\ No newline at end of file
sample-form-manager/src/main/resources/sqlmap/module/sheet/SheetMatterMapper.xml
View file @
d0e6b6a7
This diff is collapsed.
Click to expand it.
sample-form-manager/src/main/resources/sqlmap/module/sheet/SheetMatterMapperExt.xml
View file @
d0e6b6a7
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
SELECT
SELECT
count( 1 )
count( 1 )
FROM
FROM
mortals_
sys
_sheet_matter AS a
mortals_
xhx
_sheet_matter AS a
LEFT JOIN ( SELECT matterNo FROM mortals_xhx_matter WHERE siteId = #{condition.siteId} ) AS b ON a.matterNo = b.matterNo
LEFT JOIN ( SELECT matterNo FROM mortals_xhx_matter WHERE siteId = #{condition.siteId} ) AS b ON a.matterNo = b.matterNo
<trim
suffixOverrides=
"where"
suffix=
""
>
<trim
suffixOverrides=
"where"
suffix=
""
>
where b.matterNo IS NULL and
where b.matterNo IS NULL and
...
@@ -22,9 +22,6 @@
...
@@ -22,9 +22,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.matterFullName like #{condition.matterFullName}
</if>
</trim>
</trim>
</trim>
</trim>
</select>
</select>
...
@@ -34,7 +31,7 @@
...
@@ -34,7 +31,7 @@
select
select
<include
refid=
"_columns"
/>
<include
refid=
"_columns"
/>
FROM
FROM
mortals_
sys
_sheet_matter AS a
mortals_
xhx
_sheet_matter AS a
LEFT JOIN ( SELECT matterNo FROM mortals_xhx_matter WHERE siteId = #{condition.siteId} ) AS b ON a.matterNo = b.matterNo
LEFT JOIN ( SELECT matterNo FROM mortals_xhx_matter WHERE siteId = #{condition.siteId} ) AS b ON a.matterNo = b.matterNo
<trim
suffixOverrides=
"where"
suffix=
""
>
<trim
suffixOverrides=
"where"
suffix=
""
>
where b.matterNo IS NULL and
where b.matterNo IS NULL and
...
@@ -48,9 +45,6 @@
...
@@ -48,9 +45,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.matterFullName like #{condition.matterFullName}
</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