Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydsj_tp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
ydsj_tp
Commits
52f5bf23
Commit
52f5bf23
authored
Dec 22, 2025
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首次提交
parent
ffd120d6
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
890 additions
and
3 deletions
+890
-3
ruoyi-admin/src/main/java/com/ruoyi/system/controller/TpRyInfoController.java
+115
-0
ruoyi-admin/src/main/java/com/ruoyi/system/controller/TzController.java
+1
-0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/TpRyInfo.java
+93
-0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/TpRyInfoCb.java
+96
-0
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/TpRyInfoMapper.java
+95
-0
ruoyi-admin/src/main/java/com/ruoyi/system/service/ITpRyInfoService.java
+67
-0
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/TpInfoServiceImpl.java
+3
-1
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/TpRyInfoServiceImpl.java
+222
-0
ruoyi-admin/src/main/resources/mapper/system/TpInfoMapper.xml
+1
-1
ruoyi-admin/src/main/resources/mapper/system/TpRyInfoMapper.xml
+196
-0
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+1
-1
No files found.
ruoyi-admin/src/main/java/com/ruoyi/system/controller/TpRyInfoController.java
0 → 100644
View file @
52f5bf23
package
com
.
ruoyi
.
system
.
controller
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
com.ruoyi.system.domain.TpRyInfoCb
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.system.domain.TpRyInfo
;
import
com.ruoyi.system.service.ITpRyInfoService
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.common.core.page.TableDataInfo
;
/**
* 人员投票信息Controller
*
* @author ruoyi
* @date 2025-12-19
*/
@RestController
@RequestMapping
(
"/system/tpRyInfo"
)
public
class
TpRyInfoController
extends
BaseController
{
@Autowired
private
ITpRyInfoService
tpRyInfoService
;
/**
* 查询人员投票信息列表
*/
//@PreAuthorize("@ss.hasPermi('system:tpRyInfo:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TpRyInfo
tpRyInfo
)
{
startPage
();
List
<
TpRyInfo
>
list
=
tpRyInfoService
.
selectTpRyInfoList
(
tpRyInfo
);
return
getDataTable
(
list
);
}
/**
* 人员统计
* @param tpRyInfo
* @return
*/
@GetMapping
(
"/tplist"
)
public
TableDataInfo
tplist
(
TpRyInfoCb
tpRyInfo
)
{
// startPage();
List
<
TpRyInfoCb
>
list
=
tpRyInfoService
.
tplist
(
tpRyInfo
);
return
getDataTable
(
list
);
}
/**
* 导出人员投票信息列表
*/
//@PreAuthorize("@ss.hasPermi('system:tpRyInfo:export')")
@Log
(
title
=
"人员投票信息"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
TpRyInfo
tpRyInfo
)
{
List
<
TpRyInfo
>
list
=
tpRyInfoService
.
selectTpRyInfoList
(
tpRyInfo
);
ExcelUtil
<
TpRyInfo
>
util
=
new
ExcelUtil
<
TpRyInfo
>(
TpRyInfo
.
class
);
util
.
exportExcel
(
response
,
list
,
"人员投票信息数据"
);
}
/**
* 获取人员投票信息详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:tpRyInfo:query')")
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
tpRyInfoService
.
selectTpRyInfoById
(
id
));
}
@PostMapping
(
"/tp"
)
public
AjaxResult
add
(
@RequestBody
TpRyInfo
tpRyInfo
)
{
return
tpRyInfoService
.
insertTpRyInfo
(
tpRyInfo
);
}
/**
* 修改人员投票信息
*/
//@PreAuthorize("@ss.hasPermi('system:tpRyInfo:edit')")
@Log
(
title
=
"人员投票信息"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TpRyInfo
tpRyInfo
)
{
return
toAjax
(
tpRyInfoService
.
updateTpRyInfo
(
tpRyInfo
));
}
/**
* 删除人员投票信息
*/
//@PreAuthorize("@ss.hasPermi('system:tpRyInfo:remove')")
@Log
(
title
=
"人员投票信息"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
tpRyInfoService
.
deleteTpRyInfoByIds
(
ids
));
}
}
ruoyi-admin/src/main/java/com/ruoyi/system/controller/TzController.java
View file @
52f5bf23
...
...
@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.GetMapping;
@Controller
public
class
TzController
{
//跳转的前端地址
private
static
final
String
VUEHOST
=
"http://10.61.1.241:8887"
;
@GetMapping
(
"/info"
)
...
...
ruoyi-admin/src/main/java/com/ruoyi/system/domain/TpRyInfo.java
0 → 100644
View file @
52f5bf23
package
com
.
ruoyi
.
system
.
domain
;
import
java.util.List
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
/**
* 人员投票信息对象 tp_ry_info
*
* @author ruoyi
* @date 2025-12-19
*/
@Data
public
class
TpRyInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
private
Long
id
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
name
;
/** AD账号 */
@Excel
(
name
=
"AD账号"
)
private
String
adzh
;
/** 统一账号 */
@Excel
(
name
=
"统一账号"
)
private
String
username
;
/** 单位编码 */
@Excel
(
name
=
"单位编码"
)
private
String
dwdm
;
/** 单位名称 */
@Excel
(
name
=
"单位名称"
)
private
String
dwmc
;
/** 完整单位编码 */
@Excel
(
name
=
"完整单位编码"
)
private
String
wzdwdm
;
/** 完整单位名称 */
@Excel
(
name
=
"完整单位名称"
)
private
String
wzdwmc
;
/** 二级单位编码 */
@Excel
(
name
=
"二级单位编码"
)
private
String
ejdwdm
;
/** 二级单位名称 */
@Excel
(
name
=
"二级单位名称"
)
private
String
ejdwmc
;
/** 预留1 */
@Excel
(
name
=
"预留1"
)
private
String
yl1
;
/** 预留2 */
@Excel
(
name
=
"预留2"
)
private
String
yl2
;
/** 预留3 */
@Excel
(
name
=
"预留3"
)
private
String
yl3
;
/** 预留4 */
@Excel
(
name
=
"预留4"
)
private
String
yl4
;
/** 预留5 */
@Excel
(
name
=
"预留5"
)
private
String
yl5
;
private
String
tpry
;
/** 人员投票信息从信息 */
private
List
<
TpRyInfoCb
>
tpRyInfoCbList
;
private
TpRyInfoCb
aqTpRyInfoCb
;
private
TpRyInfoCb
scTpRyInfoCb
;
private
TpRyInfoCb
sbTpRyInfoCb
;
private
TpRyInfoCb
qgTpRyInfoCb
;
private
TpRyInfoCb
djTpRyInfoCb
;
}
ruoyi-admin/src/main/java/com/ruoyi/system/domain/TpRyInfoCb.java
0 → 100644
View file @
52f5bf23
package
com
.
ruoyi
.
system
.
domain
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
/**
* 人员投票信息从对象 tp_ry_info_cb
*
* @author ruoyi
* @date 2025-12-19
*/
@Data
public
class
TpRyInfoCb
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
private
Long
id
;
/** 主表id */
@Excel
(
name
=
"主表id"
)
private
Long
zbid
;
/** 所属板块(安全、生产、设备、企管、党建) */
@Excel
(
name
=
"所属板块(安全、生产、设备、企管、党建)"
)
private
String
ssbk
;
/** 投票人员id */
@Excel
(
name
=
"投票人员id"
)
private
String
tpryid
;
/** 投票人员名称 */
@Excel
(
name
=
"投票人员名称"
)
private
String
tprymc
;
private
Integer
sl
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setZbid
(
Long
zbid
)
{
this
.
zbid
=
zbid
;
}
public
Long
getZbid
()
{
return
zbid
;
}
public
void
setSsbk
(
String
ssbk
)
{
this
.
ssbk
=
ssbk
;
}
public
String
getSsbk
()
{
return
ssbk
;
}
public
void
setTpryid
(
String
tpryid
)
{
this
.
tpryid
=
tpryid
;
}
public
String
getTpryid
()
{
return
tpryid
;
}
public
void
setTprymc
(
String
tprymc
)
{
this
.
tprymc
=
tprymc
;
}
public
String
getTprymc
()
{
return
tprymc
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"zbid"
,
getZbid
())
.
append
(
"ssbk"
,
getSsbk
())
.
append
(
"tpryid"
,
getTpryid
())
.
append
(
"tprymc"
,
getTprymc
())
.
toString
();
}
}
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/TpRyInfoMapper.java
0 → 100644
View file @
52f5bf23
package
com
.
ruoyi
.
system
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
com.ruoyi.system.domain.TpRyInfo
;
import
com.ruoyi.system.domain.TpRyInfoCb
;
/**
* 人员投票信息Mapper接口
*
* @author ruoyi
* @date 2025-12-19
*/
public
interface
TpRyInfoMapper
{
/**
* 查询人员投票信息
*
* @param id 人员投票信息主键
* @return 人员投票信息
*/
public
TpRyInfo
selectTpRyInfoById
(
Long
id
);
/**
* 查询人员投票信息列表
*
* @param tpRyInfo 人员投票信息
* @return 人员投票信息集合
*/
public
List
<
TpRyInfo
>
selectTpRyInfoList
(
TpRyInfo
tpRyInfo
);
/**
* 新增人员投票信息
*
* @param tpRyInfo 人员投票信息
* @return 结果
*/
public
int
insertTpRyInfo
(
TpRyInfo
tpRyInfo
);
/**
* 修改人员投票信息
*
* @param tpRyInfo 人员投票信息
* @return 结果
*/
public
int
updateTpRyInfo
(
TpRyInfo
tpRyInfo
);
/**
* 删除人员投票信息
*
* @param id 人员投票信息主键
* @return 结果
*/
public
int
deleteTpRyInfoById
(
Long
id
);
/**
* 批量删除人员投票信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteTpRyInfoByIds
(
Long
[]
ids
);
/**
* 批量删除人员投票信息从
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteTpRyInfoCbByZbids
(
Long
[]
ids
);
/**
* 批量新增人员投票信息从
*
* @param tpRyInfoCbList 人员投票信息从列表
* @return 结果
*/
public
int
batchTpRyInfoCb
(
List
<
TpRyInfoCb
>
tpRyInfoCbList
);
/**
* 通过人员投票信息主键删除人员投票信息从信息
*
* @param id 人员投票信息ID
* @return 结果
*/
public
int
deleteTpRyInfoCbByZbid
(
Long
id
);
TpRyInfo
selectTpInfoByIp
(
Map
map
);
List
<
TpRyInfoCb
>
selectTpRyInfoCbList
(
Long
id
);
List
<
TpRyInfoCb
>
tplist
(
TpRyInfoCb
tpRyInfo
);
}
ruoyi-admin/src/main/java/com/ruoyi/system/service/ITpRyInfoService.java
0 → 100644
View file @
52f5bf23
package
com
.
ruoyi
.
system
.
service
;
import
java.util.List
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.system.domain.TpRyInfo
;
import
com.ruoyi.system.domain.TpRyInfoCb
;
/**
* 人员投票信息Service接口
*
* @author ruoyi
* @date 2025-12-19
*/
public
interface
ITpRyInfoService
{
/**
* 查询人员投票信息
*
* @param id 人员投票信息主键
* @return 人员投票信息
*/
public
TpRyInfo
selectTpRyInfoById
(
Long
id
);
/**
* 查询人员投票信息列表
*
* @param tpRyInfo 人员投票信息
* @return 人员投票信息集合
*/
public
List
<
TpRyInfo
>
selectTpRyInfoList
(
TpRyInfo
tpRyInfo
);
/**
* 新增人员投票信息
*
* @param tpRyInfo 人员投票信息
* @return 结果
*/
public
AjaxResult
insertTpRyInfo
(
TpRyInfo
tpRyInfo
);
/**
* 修改人员投票信息
*
* @param tpRyInfo 人员投票信息
* @return 结果
*/
public
int
updateTpRyInfo
(
TpRyInfo
tpRyInfo
);
/**
* 批量删除人员投票信息
*
* @param ids 需要删除的人员投票信息主键集合
* @return 结果
*/
public
int
deleteTpRyInfoByIds
(
Long
[]
ids
);
/**
* 删除人员投票信息信息
*
* @param id 人员投票信息主键
* @return 结果
*/
public
int
deleteTpRyInfoById
(
Long
id
);
List
<
TpRyInfoCb
>
tplist
(
TpRyInfoCb
tpRyInfo
);
}
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/TpInfoServiceImpl.java
View file @
52f5bf23
...
...
@@ -11,6 +11,7 @@ import com.ruoyi.system.domain.TpDept;
import
com.ruoyi.system.mapper.TpDeptMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.common.utils.StringUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ruoyi.system.domain.TpInfoCb
;
...
...
@@ -67,7 +68,7 @@ public class TpInfoServiceImpl implements ITpInfoService
@Override
public
AjaxResult
insertTpInfo
(
TpInfo
tpInfo
)
throws
UnknownHostException
{
Date
nowDate
=
DateUtils
.
getNowDate
();
Date
date
=
DateUtils
.
dateTime
(
"yyyy-MM-dd HH:mm:ss"
,
"202
4-10-22
23:59:59"
);
Date
date
=
DateUtils
.
dateTime
(
"yyyy-MM-dd HH:mm:ss"
,
"202
5-12-31
23:59:59"
);
if
(
nowDate
.
after
(
date
)){
return
AjaxResult
.
error
(
"已过投票日期,不允许投票!"
);
...
...
@@ -84,6 +85,7 @@ public class TpInfoServiceImpl implements ITpInfoService
if
(
null
==
adzh
||
""
.
equals
(
adzh
)){
adzh
=
tyzh
;
}
tpInfo
.
setIpdz
(
tyzh
);
//后续都存id
//根据ip查询
Map
map
=
new
HashMap
();
...
...
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/TpRyInfoServiceImpl.java
0 → 100644
View file @
52f5bf23
package
com
.
ruoyi
.
system
.
service
.
impl
;
import
java.net.Inet4Address
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.system.domain.TpInfo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.common.utils.StringUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ruoyi.system.domain.TpRyInfoCb
;
import
com.ruoyi.system.mapper.TpRyInfoMapper
;
import
com.ruoyi.system.domain.TpRyInfo
;
import
com.ruoyi.system.service.ITpRyInfoService
;
/**
* 人员投票信息Service业务层处理
*
* @author ruoyi
* @date 2025-12-19
*/
@Service
public
class
TpRyInfoServiceImpl
implements
ITpRyInfoService
{
@Autowired
private
TpRyInfoMapper
tpRyInfoMapper
;
/**
* 查询人员投票信息
*
* @param id 人员投票信息主键
* @return 人员投票信息
*/
@Override
public
TpRyInfo
selectTpRyInfoById
(
Long
id
)
{
return
tpRyInfoMapper
.
selectTpRyInfoById
(
id
);
}
/**
* 查询人员投票信息列表
*
* @param tpRyInfo 人员投票信息
* @return 人员投票信息
*/
@Override
public
List
<
TpRyInfo
>
selectTpRyInfoList
(
TpRyInfo
tpRyInfo
)
{
List
<
TpRyInfo
>
tpRyInfos
=
tpRyInfoMapper
.
selectTpRyInfoList
(
tpRyInfo
);
for
(
TpRyInfo
item
:
tpRyInfos
)
{
List
<
TpRyInfoCb
>
cbList
=
tpRyInfoMapper
.
selectTpRyInfoCbList
(
item
.
getId
());
if
(
cbList
.
size
()>
0
){
List
<
String
>
collect
=
cbList
.
stream
().
map
(
TpRyInfoCb:
:
getTprymc
).
collect
(
Collectors
.
toList
());
item
.
setTpry
(
String
.
join
(
","
,
collect
));
}
}
return
tpRyInfos
;
}
/**
* 新增人员投票信息
*
* @param tpRyInfo 人员投票信息
* @return 结果
*/
@Transactional
@Override
public
AjaxResult
insertTpRyInfo
(
TpRyInfo
tpRyInfo
)
{
Date
nowDate
=
DateUtils
.
getNowDate
();
Date
date
=
DateUtils
.
dateTime
(
"yyyy-MM-dd HH:mm:ss"
,
"2025-12-31 23:59:59"
);
if
(
nowDate
.
after
(
date
)){
return
AjaxResult
.
error
(
"已过投票日期,不允许投票!"
);
}
String
adzh
=
tpRyInfo
.
getAdzh
();
// ad
String
tyzh
=
tpRyInfo
.
getUsername
();
// 统一
if
(
null
==
tyzh
||
""
.
equals
(
tyzh
)){
return
AjaxResult
.
error
(
"请重新登录"
);
}
if
(
null
==
adzh
||
""
.
equals
(
adzh
)){
adzh
=
tyzh
;
}
//根据ip查询
Map
map
=
new
HashMap
();
map
.
put
(
"adzh"
,
adzh
);
map
.
put
(
"tyzh"
,
tyzh
);
TpRyInfo
tpRyInfo1
=
tpRyInfoMapper
.
selectTpInfoByIp
(
map
);
if
(
tpRyInfo1
!=
null
){
return
AjaxResult
.
error
(
"已投票,请勿重复投票"
);
}
if
(
tpRyInfo
.
getAqTpRyInfoCb
()==
null
){
return
AjaxResult
.
error
(
"各板块请选择1人进行投票!"
);
}
if
(
tpRyInfo
.
getDjTpRyInfoCb
()==
null
){
return
AjaxResult
.
error
(
"各板块请选择1人进行投票!"
);
}
if
(
tpRyInfo
.
getQgTpRyInfoCb
()==
null
){
return
AjaxResult
.
error
(
"各板块请选择1人进行投票!"
);
}
if
(
tpRyInfo
.
getSbTpRyInfoCb
()==
null
){
return
AjaxResult
.
error
(
"各板块请选择1人进行投票!"
);
}
if
(
tpRyInfo
.
getScTpRyInfoCb
()==
null
){
return
AjaxResult
.
error
(
"各板块请选择1人进行投票!"
);
}
if
(
StringUtils
.
isNotEmpty
(
tpRyInfo
.
getWzdwdm
())){
String
a
=
tpRyInfo
.
getWzdwdm
();
String
b
=
tpRyInfo
.
getEjdwdm
();
tpRyInfo
.
setDwdm
(
a
.
substring
(
a
.
indexOf
(
b
)+
b
.
length
()+
1
,
a
.
length
()-
1
));
}
if
(
StringUtils
.
isNotEmpty
(
tpRyInfo
.
getWzdwmc
())){
String
a
=
tpRyInfo
.
getWzdwmc
();
String
b
=
tpRyInfo
.
getEjdwmc
();
tpRyInfo
.
setDwmc
(
a
.
substring
(
a
.
indexOf
(
b
)+
b
.
length
()+
1
,
a
.
length
()-
1
));
}
List
<
TpRyInfoCb
>
cbList
=
new
ArrayList
<>();
cbList
.
add
(
tpRyInfo
.
getQgTpRyInfoCb
());
cbList
.
add
(
tpRyInfo
.
getDjTpRyInfoCb
());
cbList
.
add
(
tpRyInfo
.
getSbTpRyInfoCb
());
cbList
.
add
(
tpRyInfo
.
getScTpRyInfoCb
());
cbList
.
add
(
tpRyInfo
.
getAqTpRyInfoCb
());
tpRyInfo
.
setTpRyInfoCbList
(
cbList
);
int
rows
=
tpRyInfoMapper
.
insertTpRyInfo
(
tpRyInfo
);
insertTpRyInfoCb
(
tpRyInfo
);
return
AjaxResult
.
success
(
"投票成功!"
);
}
public
static
void
main
(
String
[]
args
)
{
String
a
=
"/10010000/10010001/10200000/10210959/10211453/"
;
String
b
=
"10210959"
;
System
.
out
.
println
(
a
.
substring
(
a
.
indexOf
(
b
)+
b
.
length
()+
1
,
a
.
length
()-
1
));
String
c
=
"/中国石化/胜利油田/胜利石油管理局有限公司/机关管理服务中心/信息化运维项目部/"
;
String
d
=
"机关管理服务中心"
;
System
.
out
.
println
(
c
.
substring
(
c
.
indexOf
(
d
)+
d
.
length
()+
1
,
c
.
length
()-
1
));
}
/**
* 修改人员投票信息
*
* @param tpRyInfo 人员投票信息
* @return 结果
*/
@Transactional
@Override
public
int
updateTpRyInfo
(
TpRyInfo
tpRyInfo
)
{
tpRyInfo
.
setUpdateTime
(
DateUtils
.
getNowDate
());
tpRyInfoMapper
.
deleteTpRyInfoCbByZbid
(
tpRyInfo
.
getId
());
insertTpRyInfoCb
(
tpRyInfo
);
return
tpRyInfoMapper
.
updateTpRyInfo
(
tpRyInfo
);
}
/**
* 批量删除人员投票信息
*
* @param ids 需要删除的人员投票信息主键
* @return 结果
*/
@Transactional
@Override
public
int
deleteTpRyInfoByIds
(
Long
[]
ids
)
{
tpRyInfoMapper
.
deleteTpRyInfoCbByZbids
(
ids
);
return
tpRyInfoMapper
.
deleteTpRyInfoByIds
(
ids
);
}
/**
* 删除人员投票信息信息
*
* @param id 人员投票信息主键
* @return 结果
*/
@Transactional
@Override
public
int
deleteTpRyInfoById
(
Long
id
)
{
tpRyInfoMapper
.
deleteTpRyInfoCbByZbid
(
id
);
return
tpRyInfoMapper
.
deleteTpRyInfoById
(
id
);
}
@Override
public
List
<
TpRyInfoCb
>
tplist
(
TpRyInfoCb
tpRyInfo
)
{
List
<
TpRyInfoCb
>
tpRyInfos
=
tpRyInfoMapper
.
tplist
(
tpRyInfo
);
return
tpRyInfos
;
}
/**
* 新增人员投票信息从信息
*
* @param tpRyInfo 人员投票信息对象
*/
public
void
insertTpRyInfoCb
(
TpRyInfo
tpRyInfo
)
{
List
<
TpRyInfoCb
>
tpRyInfoCbList
=
tpRyInfo
.
getTpRyInfoCbList
();
Long
id
=
tpRyInfo
.
getId
();
if
(
StringUtils
.
isNotNull
(
tpRyInfoCbList
))
{
List
<
TpRyInfoCb
>
list
=
new
ArrayList
<
TpRyInfoCb
>();
for
(
TpRyInfoCb
tpRyInfoCb
:
tpRyInfoCbList
)
{
tpRyInfoCb
.
setZbid
(
id
);
list
.
add
(
tpRyInfoCb
);
}
if
(
list
.
size
()
>
0
)
{
tpRyInfoMapper
.
batchTpRyInfoCb
(
list
);
}
}
}
}
ruoyi-admin/src/main/resources/mapper/system/TpInfoMapper.xml
View file @
52f5bf23
...
...
@@ -73,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
<if
test=
"ipdz != null and ipdz != ''"
>
and ipdz like concat('%', #{ipdz}, '%')
</if>
group by a.id
group by a.id
order by create_time desc
</select>
<insert
id=
"insertTpInfo"
parameterType=
"TpInfo"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
...
ruoyi-admin/src/main/resources/mapper/system/TpRyInfoMapper.xml
0 → 100644
View file @
52f5bf23
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.system.mapper.TpRyInfoMapper"
>
<resultMap
type=
"TpRyInfo"
id=
"TpRyInfoResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"adzh"
column=
"adzh"
/>
<result
property=
"username"
column=
"username"
/>
<result
property=
"dwdm"
column=
"dwdm"
/>
<result
property=
"dwmc"
column=
"dwmc"
/>
<result
property=
"wzdwdm"
column=
"wzdwdm"
/>
<result
property=
"wzdwmc"
column=
"wzdwmc"
/>
<result
property=
"ejdwdm"
column=
"ejdwdm"
/>
<result
property=
"ejdwmc"
column=
"ejdwmc"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"yl1"
column=
"yl1"
/>
<result
property=
"yl2"
column=
"yl2"
/>
<result
property=
"yl3"
column=
"yl3"
/>
<result
property=
"yl4"
column=
"yl4"
/>
<result
property=
"yl5"
column=
"yl5"
/>
</resultMap>
<resultMap
id=
"TpRyInfoTpRyInfoCbResult"
type=
"TpRyInfo"
extends=
"TpRyInfoResult"
>
<collection
property=
"tpRyInfoCbList"
ofType=
"TpRyInfoCb"
column=
"id"
select=
"selectTpRyInfoCbList"
/>
</resultMap>
<resultMap
type=
"TpRyInfoCb"
id=
"TpRyInfoCbResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"zbid"
column=
"zbid"
/>
<result
property=
"ssbk"
column=
"ssbk"
/>
<result
property=
"tpryid"
column=
"tpryid"
/>
<result
property=
"tprymc"
column=
"tprymc"
/>
</resultMap>
<sql
id=
"selectTpRyInfoVo"
>
select id, name, adzh, username, dwdm, dwmc, wzdwdm, wzdwmc, ejdwdm, ejdwmc, create_by, create_time, update_by, update_time, remark, yl1, yl2, yl3, yl4, yl5 from tp_ry_info
</sql>
<select
id=
"selectTpRyInfoList"
parameterType=
"TpRyInfo"
resultMap=
"TpRyInfoResult"
>
<include
refid=
"selectTpRyInfoVo"
/>
<where>
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
<if
test=
"adzh != null and adzh != ''"
>
and adzh like concat('%', #{adzh}, '%')
</if>
<if
test=
"username != null and username != ''"
>
and username like concat('%', #{username}, '%')
</if>
<if
test=
"dwdm != null and dwdm != ''"
>
and dwdm = #{dwdm}
</if>
<if
test=
"dwmc != null and dwmc != ''"
>
and dwmc = #{dwmc}
</if>
<if
test=
"wzdwdm != null and wzdwdm != ''"
>
and wzdwdm = #{wzdwdm}
</if>
<if
test=
"wzdwmc != null and wzdwmc != ''"
>
and wzdwmc = #{wzdwmc}
</if>
<if
test=
"ejdwdm != null and ejdwdm != ''"
>
and ejdwdm = #{ejdwdm}
</if>
<if
test=
"ejdwmc != null and ejdwmc != ''"
>
and ejdwmc = #{ejdwmc}
</if>
<if
test=
"yl1 != null and yl1 != ''"
>
and yl1 = #{yl1}
</if>
<if
test=
"yl2 != null and yl2 != ''"
>
and yl2 = #{yl2}
</if>
<if
test=
"yl3 != null and yl3 != ''"
>
and yl3 = #{yl3}
</if>
<if
test=
"yl4 != null and yl4 != ''"
>
and yl4 = #{yl4}
</if>
<if
test=
"yl5 != null and yl5 != ''"
>
and yl5 = #{yl5}
</if>
</where>
</select>
<select
id=
"selectTpRyInfoById"
parameterType=
"Long"
resultMap=
"TpRyInfoTpRyInfoCbResult"
>
select id, name, adzh, username, dwdm, dwmc, wzdwdm, wzdwmc, ejdwdm, ejdwmc, create_by, create_time, update_by, update_time, remark, yl1, yl2, yl3, yl4, yl5
from tp_ry_info
where id = #{id}
</select>
<select
id=
"selectTpRyInfoCbList"
resultMap=
"TpRyInfoCbResult"
>
select id, zbid, ssbk, tpryid, tprymc
from tp_ry_info_cb
where zbid = #{zbid}
</select>
<select
id=
"selectTpInfoByIp"
resultType=
"com.ruoyi.system.domain.TpRyInfo"
>
select *
from tp_ry_info
where (adzh =#{adzh} or username = #{tyzh} )
</select>
<select
id=
"tplist"
resultType=
"com.ruoyi.system.domain.TpRyInfoCb"
>
select ssbk,tprymc,count(id) sl from
tp_ry_info_cb
where 1=1
<if
test=
"tprymc!=null and tprymc!=''"
>
and tprymc like concat('%',#{tprymc},'%')
</if>
<if
test=
"ssbk!=null and ssbk!=''"
>
and ssbk like concat('%',#{ssbk},'%')
</if>
group by ssbk,tprymc
</select>
<insert
id=
"insertTpRyInfo"
parameterType=
"TpRyInfo"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into tp_ry_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"adzh != null"
>
adzh,
</if>
<if
test=
"username != null"
>
username,
</if>
<if
test=
"dwdm != null"
>
dwdm,
</if>
<if
test=
"dwmc != null"
>
dwmc,
</if>
<if
test=
"wzdwdm != null"
>
wzdwdm,
</if>
<if
test=
"wzdwmc != null"
>
wzdwmc,
</if>
<if
test=
"ejdwdm != null"
>
ejdwdm,
</if>
<if
test=
"ejdwmc != null"
>
ejdwmc,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"yl1 != null"
>
yl1,
</if>
<if
test=
"yl2 != null"
>
yl2,
</if>
<if
test=
"yl3 != null"
>
yl3,
</if>
<if
test=
"yl4 != null"
>
yl4,
</if>
<if
test=
"yl5 != null"
>
yl5,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name},
</if>
<if
test=
"adzh != null"
>
#{adzh},
</if>
<if
test=
"username != null"
>
#{username},
</if>
<if
test=
"dwdm != null"
>
#{dwdm},
</if>
<if
test=
"dwmc != null"
>
#{dwmc},
</if>
<if
test=
"wzdwdm != null"
>
#{wzdwdm},
</if>
<if
test=
"wzdwmc != null"
>
#{wzdwmc},
</if>
<if
test=
"ejdwdm != null"
>
#{ejdwdm},
</if>
<if
test=
"ejdwmc != null"
>
#{ejdwmc},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"yl1 != null"
>
#{yl1},
</if>
<if
test=
"yl2 != null"
>
#{yl2},
</if>
<if
test=
"yl3 != null"
>
#{yl3},
</if>
<if
test=
"yl4 != null"
>
#{yl4},
</if>
<if
test=
"yl5 != null"
>
#{yl5},
</if>
</trim>
</insert>
<update
id=
"updateTpRyInfo"
parameterType=
"TpRyInfo"
>
update tp_ry_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name = #{name},
</if>
<if
test=
"adzh != null"
>
adzh = #{adzh},
</if>
<if
test=
"username != null"
>
username = #{username},
</if>
<if
test=
"dwdm != null"
>
dwdm = #{dwdm},
</if>
<if
test=
"dwmc != null"
>
dwmc = #{dwmc},
</if>
<if
test=
"wzdwdm != null"
>
wzdwdm = #{wzdwdm},
</if>
<if
test=
"wzdwmc != null"
>
wzdwmc = #{wzdwmc},
</if>
<if
test=
"ejdwdm != null"
>
ejdwdm = #{ejdwdm},
</if>
<if
test=
"ejdwmc != null"
>
ejdwmc = #{ejdwmc},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"yl1 != null"
>
yl1 = #{yl1},
</if>
<if
test=
"yl2 != null"
>
yl2 = #{yl2},
</if>
<if
test=
"yl3 != null"
>
yl3 = #{yl3},
</if>
<if
test=
"yl4 != null"
>
yl4 = #{yl4},
</if>
<if
test=
"yl5 != null"
>
yl5 = #{yl5},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteTpRyInfoById"
parameterType=
"Long"
>
delete from tp_ry_info where id = #{id}
</delete>
<delete
id=
"deleteTpRyInfoByIds"
parameterType=
"String"
>
delete from tp_ry_info where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
<delete
id=
"deleteTpRyInfoCbByZbids"
parameterType=
"String"
>
delete from tp_ry_info_cb where zbid in
<foreach
item=
"zbid"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{zbid}
</foreach>
</delete>
<delete
id=
"deleteTpRyInfoCbByZbid"
parameterType=
"Long"
>
delete from tp_ry_info_cb where zbid = #{zbid}
</delete>
<insert
id=
"batchTpRyInfoCb"
>
insert into tp_ry_info_cb( id, zbid, ssbk, tpryid, tprymc) values
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
","
>
( #{item.id}, #{item.zbid}, #{item.ssbk}, #{item.tpryid}, #{item.tprymc})
</foreach>
</insert>
</mapper>
\ No newline at end of file
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
View file @
52f5bf23
...
...
@@ -115,7 +115,7 @@ public class SecurityConfig
// 静态资源,可匿名访问
.
antMatchers
(
HttpMethod
.
GET
,
"/"
,
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/profile/**"
).
permitAll
()
.
antMatchers
(
"/swagger-ui.html"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/*/api-docs"
,
"/druid/**"
).
permitAll
()
.
antMatchers
(
"/system/tpInfo/*"
,
"/info"
).
permitAll
()
.
antMatchers
(
"/system/tpInfo/*"
,
"/
system/tpRyInfo/**"
,
"/
info"
).
permitAll
()
// 除上面外的所有请求全部需要鉴权认证
.
anyRequest
().
authenticated
();
})
...
...
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