Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
complex-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
赵啸非
complex-platform
Commits
6d6c51e0
Commit
6d6c51e0
authored
Jun 20, 2024
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
综窗事项管理等
parent
29d06970
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
4116 additions
and
0 deletions
+4116
-0
complex-window-manager/src/main/java/com/mortals/xhx/daemon/task/SyncImplementationTaskImpl.java
...m/mortals/xhx/daemon/task/SyncImplementationTaskImpl.java
+25
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/dao/ApplyMatterDao.java
...ava/com/mortals/xhx/module/matter/dao/ApplyMatterDao.java
+17
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/dao/EventImplementationDao.java
...mortals/xhx/module/matter/dao/EventImplementationDao.java
+17
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/dao/ibatis/ApplyMatterDaoImpl.java
...tals/xhx/module/matter/dao/ibatis/ApplyMatterDaoImpl.java
+21
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/dao/ibatis/EventImplementationDaoImpl.java
.../module/matter/dao/ibatis/EventImplementationDaoImpl.java
+21
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/ApplyMatterEntity.java
...om/mortals/xhx/module/matter/model/ApplyMatterEntity.java
+75
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/ApplyMatterQuery.java
...com/mortals/xhx/module/matter/model/ApplyMatterQuery.java
+1066
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/EventImplementationEntity.java
...ls/xhx/module/matter/model/EventImplementationEntity.java
+70
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/EventImplementationQuery.java
...als/xhx/module/matter/model/EventImplementationQuery.java
+916
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/vo/ApplyMatterVo.java
...com/mortals/xhx/module/matter/model/vo/ApplyMatterVo.java
+23
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/vo/EventImplementationVo.java
...als/xhx/module/matter/model/vo/EventImplementationVo.java
+23
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/service/ApplyMatterService.java
...mortals/xhx/module/matter/service/ApplyMatterService.java
+16
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/service/EventImplementationService.java
...xhx/module/matter/service/EventImplementationService.java
+29
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/ApplyMatterServiceImpl.java
...hx/module/matter/service/impl/ApplyMatterServiceImpl.java
+21
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/EventImplementationServiceImpl.java
...e/matter/service/impl/EventImplementationServiceImpl.java
+151
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/web/ApplyMatterController.java
.../mortals/xhx/module/matter/web/ApplyMatterController.java
+51
-0
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/web/EventImplementationController.java
.../xhx/module/matter/web/EventImplementationController.java
+82
-0
complex-window-manager/src/main/resources/sqlmap/module/matter/ApplyMatterMapper.xml
...main/resources/sqlmap/module/matter/ApplyMatterMapper.xml
+759
-0
complex-window-manager/src/main/resources/sqlmap/module/matter/EventImplementationMapper.xml
...ources/sqlmap/module/matter/EventImplementationMapper.xml
+691
-0
db/add.sql
db/add.sql
+42
-0
No files found.
complex-window-manager/src/main/java/com/mortals/xhx/daemon/task/SyncImplementationTaskImpl.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.daemon.task
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ITask
;
import
com.mortals.framework.service.ITaskExcuteService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
/**
* 同步综窗事项
*/
@Slf4j
@Service
(
"SyncImplementationTask"
)
public
class
SyncImplementationTaskImpl
implements
ITaskExcuteService
{
@Override
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
}
@Override
public
void
stopTask
(
ITask
task
)
throws
AppException
{
}
}
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/dao/ApplyMatterDao.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.module.matter.model.ApplyMatterEntity
;
import
java.util.List
;
/**
* 申报事项列表Dao
* 申报事项列表 DAO接口
*
* @author zxfei
* @date 2024-06-20
*/
public
interface
ApplyMatterDao
extends
ICRUDDao
<
ApplyMatterEntity
,
Long
>{
}
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/dao/EventImplementationDao.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.module.matter.model.EventImplementationEntity
;
import
java.util.List
;
/**
* 综窗事项列表Dao
* 综窗事项列表 DAO接口
*
* @author zxfei
* @date 2024-06-20
*/
public
interface
EventImplementationDao
extends
ICRUDDao
<
EventImplementationEntity
,
Long
>{
}
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/dao/ibatis/ApplyMatterDaoImpl.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.dao.ibatis
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.matter.dao.ApplyMatterDao
;
import
com.mortals.xhx.module.matter.model.ApplyMatterEntity
;
import
java.util.Date
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
java.util.List
;
/**
* 申报事项列表DaoImpl DAO接口
*
* @author zxfei
* @date 2024-06-20
*/
@Repository
(
"applyMatterDao"
)
public
class
ApplyMatterDaoImpl
extends
BaseCRUDDaoMybatis
<
ApplyMatterEntity
,
Long
>
implements
ApplyMatterDao
{
}
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/dao/ibatis/EventImplementationDaoImpl.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.dao.ibatis
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.matter.dao.EventImplementationDao
;
import
com.mortals.xhx.module.matter.model.EventImplementationEntity
;
import
java.util.Date
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
java.util.List
;
/**
* 综窗事项列表DaoImpl DAO接口
*
* @author zxfei
* @date 2024-06-20
*/
@Repository
(
"eventImplementationDao"
)
public
class
EventImplementationDaoImpl
extends
BaseCRUDDaoMybatis
<
EventImplementationEntity
,
Long
>
implements
EventImplementationDao
{
}
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/ApplyMatterEntity.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.model
;
import
java.util.List
;
import
java.util.ArrayList
;
import
java.math.BigDecimal
;
import
cn.hutool.core.date.DateUtil
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.matter.model.vo.ApplyMatterVo
;
import
lombok.Data
;
/**
* 申报事项列表实体对象
*
* @author zxfei
* @date 2024-06-20
*/
@Data
public
class
ApplyMatterEntity
extends
ApplyMatterVo
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 可申报类型
*/
private
Integer
applyType
;
/**
* 实施清单事项ID
*/
private
String
eventId
;
/**
* 事项类型
*/
private
String
eventType
;
/**
* 实施编码
*/
private
String
implementCoding
;
/**
* 业务办理项编码
*/
private
String
handlingItemCode
;
/**
* 实施清单名称
*/
private
String
implementName
;
/**
* 事项面向对象分类
*/
private
String
eventObjectType
;
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
return
false
;
if
(
obj
instanceof
ApplyMatterEntity
)
{
ApplyMatterEntity
tmp
=
(
ApplyMatterEntity
)
obj
;
if
(
this
.
getId
()
==
tmp
.
getId
())
{
return
true
;
}
}
return
false
;
}
public
void
initAttrValue
(){
this
.
applyType
=
0
;
this
.
eventId
=
""
;
this
.
eventType
=
""
;
this
.
implementCoding
=
""
;
this
.
handlingItemCode
=
""
;
this
.
implementName
=
""
;
this
.
eventObjectType
=
""
;
}
}
\ No newline at end of file
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/ApplyMatterQuery.java
0 → 100644
View file @
6d6c51e0
This diff is collapsed.
Click to expand it.
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/EventImplementationEntity.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.model
;
import
java.util.List
;
import
java.util.ArrayList
;
import
java.math.BigDecimal
;
import
cn.hutool.core.date.DateUtil
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.matter.model.vo.EventImplementationVo
;
import
lombok.Data
;
/**
* 综窗事项列表实体对象
*
* @author zxfei
* @date 2024-06-20
*/
@Data
public
class
EventImplementationEntity
extends
EventImplementationVo
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 实施清单事项ID
*/
private
String
eventId
;
/**
* 事项类型
*/
private
String
eventType
;
/**
* 实施编码
*/
private
String
implementCoding
;
/**
* 业务办理项编码
*/
private
String
handlingItemCode
;
/**
* 实施清单名称
*/
private
String
implementName
;
/**
* 事项面向对象分类
*/
private
String
eventObjectType
;
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
return
false
;
if
(
obj
instanceof
EventImplementationEntity
)
{
EventImplementationEntity
tmp
=
(
EventImplementationEntity
)
obj
;
if
(
this
.
getId
()
==
tmp
.
getId
())
{
return
true
;
}
}
return
false
;
}
public
void
initAttrValue
(){
this
.
eventId
=
""
;
this
.
eventType
=
""
;
this
.
implementCoding
=
""
;
this
.
handlingItemCode
=
""
;
this
.
implementName
=
""
;
this
.
eventObjectType
=
""
;
}
}
\ No newline at end of file
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/EventImplementationQuery.java
0 → 100644
View file @
6d6c51e0
This diff is collapsed.
Click to expand it.
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/vo/ApplyMatterVo.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.model.vo
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.matter.model.ApplyMatterEntity
;
import
java.util.ArrayList
;
import
java.util.List
;
import
lombok.Data
;
import
com.mortals.framework.annotation.Excel
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 申报事项列表视图对象
*
* @author zxfei
* @date 2024-06-20
*/
@Data
public
class
ApplyMatterVo
extends
BaseEntityLong
{
/** 序号,主键,自增长列表 */
private
List
<
Long
>
idList
;
}
\ No newline at end of file
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/model/vo/EventImplementationVo.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.model.vo
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.matter.model.EventImplementationEntity
;
import
java.util.ArrayList
;
import
java.util.List
;
import
lombok.Data
;
import
com.mortals.framework.annotation.Excel
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 综窗事项列表视图对象
*
* @author zxfei
* @date 2024-06-20
*/
@Data
public
class
EventImplementationVo
extends
BaseEntityLong
{
/** 序号,主键,自增长列表 */
private
List
<
Long
>
idList
;
}
\ No newline at end of file
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/service/ApplyMatterService.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.service
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.matter.model.ApplyMatterEntity
;
import
com.mortals.xhx.module.matter.dao.ApplyMatterDao
;
/**
* ApplyMatterService
*
* 申报事项列表 service接口
*
* @author zxfei
* @date 2024-06-20
*/
public
interface
ApplyMatterService
extends
ICRUDService
<
ApplyMatterEntity
,
Long
>{
ApplyMatterDao
getDao
();
}
\ No newline at end of file
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/service/EventImplementationService.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.service
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.matter.model.EventImplementationEntity
;
import
com.mortals.xhx.module.matter.dao.EventImplementationDao
;
import
java.util.List
;
/**
* EventImplementationService
*
* 综窗事项列表 service接口
*
* @author zxfei
* @date 2024-06-20
*/
public
interface
EventImplementationService
extends
ICRUDService
<
EventImplementationEntity
,
Long
>{
EventImplementationDao
getDao
();
/**
* 同步综窗事项到本地库
*/
void
syncEventImplementation
();
/**
* 新增或者修改
*/
void
saveOrUpdate
(
List
<
EventImplementationEntity
>
list
);
}
\ No newline at end of file
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/ApplyMatterServiceImpl.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.service.impl
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.xhx.module.matter.dao.ApplyMatterDao
;
import
com.mortals.xhx.module.matter.model.ApplyMatterEntity
;
import
com.mortals.xhx.module.matter.service.ApplyMatterService
;
import
lombok.extern.slf4j.Slf4j
;
/**
* ApplyMatterService
* 申报事项列表 service实现
*
* @author zxfei
* @date 2024-06-20
*/
@Service
(
"applyMatterService"
)
@Slf4j
public
class
ApplyMatterServiceImpl
extends
AbstractCRUDServiceImpl
<
ApplyMatterDao
,
ApplyMatterEntity
,
Long
>
implements
ApplyMatterService
{
}
\ No newline at end of file
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/EventImplementationServiceImpl.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.service.impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.RandomUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.xhx.busiz.req.ComplexImplementationReq
;
import
com.mortals.xhx.busiz.rsp.ApiResp
;
import
com.mortals.xhx.busiz.rsp.ImplementEventInfo
;
import
com.mortals.xhx.busiz.rsp.RecordsItem
;
import
com.mortals.xhx.common.code.ApiRespCodeEnum
;
import
com.mortals.xhx.module.matter.model.EventImplementationQuery
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.xhx.module.matter.dao.EventImplementationDao
;
import
com.mortals.xhx.module.matter.model.EventImplementationEntity
;
import
com.mortals.xhx.module.matter.service.EventImplementationService
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
Constant
.
HTTP_TIMEOUT
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_COMPLEX_REQ
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_EVENT_IMPLEMENTATION_RESP
;
/**
* EventImplementationService
* 综窗事项列表 service实现
*
* @author zxfei
* @date 2024-06-20
*/
@Service
(
"eventImplementationService"
)
@Slf4j
public
class
EventImplementationServiceImpl
extends
AbstractCRUDServiceImpl
<
EventImplementationDao
,
EventImplementationEntity
,
Long
>
implements
EventImplementationService
{
@Autowired
private
ICacheService
cacheService
;
@Override
public
void
syncEventImplementation
()
{
int
currentPage
=
1
;
int
pageSize
=
20
;
ComplexImplementationReq
req
=
new
ComplexImplementationReq
();
req
.
setUrlPath
(
"eventImplementation/list"
);
req
.
setPageSize
(
pageSize
);
req
.
setCurrentPage
(
currentPage
);
try
{
req
.
setNonce
(
RandomUtil
.
randomNumbers
(
6
));
cacheService
.
lpush
(
KEY_COMPLEX_REQ
,
JSONObject
.
toJSONString
(
req
));
String
rest
=
cacheService
.
blpop
(
KEY_EVENT_IMPLEMENTATION_RESP
+
req
.
getNonce
(),
HTTP_TIMEOUT
,
String
.
class
);
if
(
ObjectUtil
.
isEmpty
(
rest
))
{
throw
new
AppException
(
"请求访问超时"
);
}
Rest
<
ImplementEventInfo
>
eventListRest
=
JSON
.
parseObject
(
rest
,
new
TypeReference
<
Rest
<
ImplementEventInfo
>>()
{
});
if
(
eventListRest
.
getCode
()==
ApiRespCodeEnum
.
SUCCESS
.
getValue
()){
List
<
EventImplementationEntity
>
list
=
convertEventImplementation
(
eventListRest
.
getData
().
getRecords
());
this
.
saveOrUpdate
(
list
);
int
total
=
eventListRest
.
getData
().
getTotal
();
int
pages
=
total
/
pageSize
+
1
;
if
(
pages
>
1
){
while
(
currentPage
<
pages
){
currentPage
++;
req
.
setCurrentPage
(
currentPage
);
req
.
setNonce
(
RandomUtil
.
randomNumbers
(
6
));
cacheService
.
lpush
(
KEY_COMPLEX_REQ
,
JSONObject
.
toJSONString
(
req
));
String
restTemp
=
cacheService
.
blpop
(
KEY_EVENT_IMPLEMENTATION_RESP
+
req
.
getNonce
(),
HTTP_TIMEOUT
,
String
.
class
);
if
(
ObjectUtil
.
isEmpty
(
restTemp
))
{
throw
new
AppException
(
"请求访问超时"
);
}
Rest
<
ImplementEventInfo
>
eventListTemp
=
JSON
.
parseObject
(
rest
,
new
TypeReference
<
Rest
<
ImplementEventInfo
>>()
{
});
if
(
eventListTemp
.
getCode
()==
ApiRespCodeEnum
.
SUCCESS
.
getValue
()){
List
<
EventImplementationEntity
>
listTemp
=
convertEventImplementation
(
eventListTemp
.
getData
().
getRecords
());
this
.
saveOrUpdate
(
listTemp
);
}
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"同步数据失败"
,
e
);
}
}
@Override
public
void
saveOrUpdate
(
List
<
EventImplementationEntity
>
list
)
{
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
List
<
EventImplementationEntity
>
saveList
=
new
ArrayList
<>();
List
<
EventImplementationEntity
>
updateList
=
new
ArrayList
<>();
for
(
EventImplementationEntity
entity:
list
){
EventImplementationEntity
temp
=
this
.
selectOne
(
new
EventImplementationQuery
().
eventId
(
entity
.
getEventId
()));
if
(
temp
!=
null
){
entity
.
setId
(
temp
.
getId
());
entity
.
setUpdateTime
(
new
Date
());
updateList
.
add
(
entity
);
}
else
{
entity
.
setCreateTime
(
new
Date
());
saveList
.
add
(
entity
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
saveList
)){
this
.
save
(
saveList
);
}
if
(
CollectionUtils
.
isNotEmpty
(
updateList
)){
this
.
update
(
updateList
);
}
}
}
private
List
<
EventImplementationEntity
>
convertEventImplementation
(
List
<
RecordsItem
>
records
){
List
<
EventImplementationEntity
>
list
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
records
)){
for
(
RecordsItem
item:
records
){
EventImplementationEntity
entity
=
new
EventImplementationEntity
();
entity
.
initAttrValue
();
entity
.
setEventId
(
item
.
getEventId
());
entity
.
setEventObjectType
(
item
.
getEventObjectType
());
entity
.
setEventType
(
item
.
getEventType
());
entity
.
setHandlingItemCode
(
item
.
getHandlingItemCode
());
entity
.
setImplementName
(
item
.
getImplementName
());
entity
.
setImplementCoding
(
item
.
getImplementCoding
());
list
.
add
(
entity
);
}
}
return
list
;
}
public
static
void
main
(
String
[]
args
)
{
int
total
=
175
;
int
pageSize
=
50
;
int
currentPage
=
1
;
System
.
out
.
println
(
"当前页数:"
+
currentPage
);
int
pages
=
total
/
pageSize
+
1
;
System
.
out
.
println
(
"总页数:"
+
pages
);
while
(
currentPage
<
pages
){
currentPage
++;
System
.
out
.
println
(
"当前页数:"
+
currentPage
);
}
}
}
\ No newline at end of file
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/web/ApplyMatterController.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.web
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
com.mortals.framework.model.Context
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.module.matter.model.ApplyMatterEntity
;
import
com.mortals.xhx.module.matter.service.ApplyMatterService
;
import
org.apache.commons.lang3.ArrayUtils
;
import
com.mortals.framework.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.Arrays
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
import
com.mortals.xhx.common.code.*
;
/**
*
* 申报事项列表
*
* @author zxfei
* @date 2024-06-20
*/
@RestController
@RequestMapping
(
"apply/matter"
)
public
class
ApplyMatterController
extends
BaseCRUDJsonBodyMappingController
<
ApplyMatterService
,
ApplyMatterEntity
,
Long
>
{
@Autowired
private
ParamService
paramService
;
public
ApplyMatterController
(){
super
.
setModuleDesc
(
"申报事项列表"
);
}
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
//this.addDict(model, "applyType", ApplyTypeEnum.getEnumMap());
super
.
init
(
model
,
context
);
}
}
\ No newline at end of file
complex-window-manager/src/main/java/com/mortals/xhx/module/matter/web/EventImplementationController.java
0 → 100644
View file @
6d6c51e0
package
com.mortals.xhx.module.matter.web
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.module.matter.model.EventImplementationEntity
;
import
com.mortals.xhx.module.matter.service.EventImplementationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
/**
*
* 综窗事项列表
*
* @author zxfei
* @date 2024-06-20
*/
@RestController
@RequestMapping
(
"event/implementation"
)
public
class
EventImplementationController
extends
BaseCRUDJsonBodyMappingController
<
EventImplementationService
,
EventImplementationEntity
,
Long
>
{
@Autowired
private
ParamService
paramService
;
@Autowired
private
ICacheService
cacheService
;
private
ExecutorService
executorService
=
Executors
.
newCachedThreadPool
();
private
static
String
SYNC_TASK_KEY
=
"syncEventImplementation:run"
;
public
EventImplementationController
(){
super
.
setModuleDesc
(
"综窗事项列表"
);
}
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
super
.
init
(
model
,
context
);
}
@PostMapping
({
"sync"
})
@UnAuth
public
Rest
<
Object
>
syncEventImplementation
()
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
String
busiDesc
=
"同步综窗事项"
;
int
code
=
1
;
try
{
String
verify
=
cacheService
.
get
(
SYNC_TASK_KEY
);
if
(
StringUtils
.
isNotEmpty
(
verify
)&&
verify
.
equals
(
"true"
)){
throw
new
AppException
(
"同步任务正在执行,请勿重复操作"
);
}
executorService
.
submit
(
new
Runnable
()
{
@Override
public
void
run
()
{
cacheService
.
setnx
(
SYNC_TASK_KEY
,
"true"
,
3600
);
service
.
syncEventImplementation
();
}
});
cacheService
.
setnx
(
SYNC_TASK_KEY
,
"false"
,
60
);
model
.
put
(
"message_info"
,
"开始执行同步,请稍后查看"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
}
\ No newline at end of file
complex-window-manager/src/main/resources/sqlmap/module/matter/ApplyMatterMapper.xml
0 → 100644
View file @
6d6c51e0
This diff is collapsed.
Click to expand it.
complex-window-manager/src/main/resources/sqlmap/module/matter/EventImplementationMapper.xml
0 → 100644
View file @
6d6c51e0
This diff is collapsed.
Click to expand it.
db/add.sql
View file @
6d6c51e0
...
@@ -51,3 +51,45 @@ INSERT INTO `mortals_xhx_menu` VALUES (null, '员工离职信息', '/staff/leave
...
@@ -51,3 +51,45 @@ INSERT INTO `mortals_xhx_menu` VALUES (null, '员工离职信息', '/staff/leave
INSERT
INTO
`mortals_xhx_resource`
VALUES
(
null
,
'员工离职信息-菜单管理-查看'
,
'/staff/leave/list,/staff/leave/view,/staff/leave/info,/staff/leave/export,/staff/leave/exportExcel,/staff/leave/downloadTemplate,/staff/leave/download'
,
3
,
0
,
NULL
,
NULL
,
NULL
,
0
);
INSERT
INTO
`mortals_xhx_resource`
VALUES
(
null
,
'员工离职信息-菜单管理-查看'
,
'/staff/leave/list,/staff/leave/view,/staff/leave/info,/staff/leave/export,/staff/leave/exportExcel,/staff/leave/downloadTemplate,/staff/leave/download'
,
3
,
0
,
NULL
,
NULL
,
NULL
,
0
);
INSERT
INTO
`mortals_xhx_resource`
VALUES
(
null
,
'员工离职信息-菜单管理-维护'
,
'/staff/leave/add,/staff/leave/edit,/staff/leave/delete,/staff/leave/logicDelete,/staff/leave/save,/staff/leave/importData'
,
3
,
0
,
NULL
,
NULL
,
NULL
,
0
);
INSERT
INTO
`mortals_xhx_resource`
VALUES
(
null
,
'员工离职信息-菜单管理-维护'
,
'/staff/leave/add,/staff/leave/edit,/staff/leave/delete,/staff/leave/logicDelete,/staff/leave/save,/staff/leave/importData'
,
3
,
0
,
NULL
,
NULL
,
NULL
,
0
);
-- ----------------------------
-- 2024-06-20
-- 综窗事项列表表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_event_implementation`
;
CREATE
TABLE
mortals_xhx_event_implementation
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'序号,主键,自增长'
,
`eventId`
varchar
(
128
)
NOT
NULL
COMMENT
'实施清单事项ID'
,
`eventType`
varchar
(
128
)
NOT
NULL
COMMENT
'事项类型'
,
`implementCoding`
varchar
(
128
)
NOT
NULL
COMMENT
'实施编码'
,
`handlingItemCode`
varchar
(
128
)
NOT
NULL
COMMENT
'业务办理项编码'
,
`implementName`
varchar
(
128
)
NOT
NULL
COMMENT
'实施清单名称'
,
`eventObjectType`
varchar
(
32
)
NOT
NULL
COMMENT
'事项面向对象分类'
,
`createUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`createTime`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
,
KEY
`eventType`
(
`eventType`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'综窗事项列表'
;
-- ----------------------------
-- 申报事项列表表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_apply_matter`
;
CREATE
TABLE
mortals_xhx_apply_matter
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'序号,主键,自增长'
,
`applyType`
tinyint
(
2
)
NOT
NULL
COMMENT
'可申报类型'
,
`eventId`
varchar
(
128
)
NOT
NULL
COMMENT
'实施清单事项ID'
,
`eventType`
varchar
(
128
)
NOT
NULL
COMMENT
'事项类型'
,
`implementCoding`
varchar
(
128
)
NOT
NULL
COMMENT
'实施编码'
,
`handlingItemCode`
varchar
(
128
)
NOT
NULL
COMMENT
'业务办理项编码'
,
`implementName`
varchar
(
128
)
NOT
NULL
COMMENT
'实施清单名称'
,
`eventObjectType`
varchar
(
32
)
NOT
NULL
COMMENT
'事项面向对象分类'
,
`createUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`createTime`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
,
KEY
`eventType`
(
`eventType`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'申报事项列表'
;
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