Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
huaxin-rq
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
huaxin-rq
Commits
6109e78f
Commit
6109e78f
authored
Dec 09, 2025
by
zhangjianqian
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ac7d820c
dd8207e3
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
877 additions
and
78 deletions
+877
-78
TTaskRelationInfoController.java
...web/controller/checktask/TTaskRelationInfoController.java
+103
-0
TPersonGroupInfoController.java
...hong/web/controller/group/TPersonGroupInfoController.java
+6
-0
TTask.java
...-system/src/main/java/com/zehong/system/domain/TTask.java
+11
-0
TTaskRelationInfo.java
...main/java/com/zehong/system/domain/TTaskRelationInfo.java
+111
-0
TTaskRelationInfoMapper.java
...ava/com/zehong/system/mapper/TTaskRelationInfoMapper.java
+68
-0
ITTaskRelationInfoService.java
.../com/zehong/system/service/ITTaskRelationInfoService.java
+61
-0
TTaskRelationInfoServiceImpl.java
...ong/system/service/impl/TTaskRelationInfoServiceImpl.java
+96
-0
TTaskServiceImpl.java
...java/com/zehong/system/service/impl/TTaskServiceImpl.java
+49
-18
TTaskMapper.xml
...n-system/src/main/resources/mapper/system/TTaskMapper.xml
+1
-1
TTaskRelationInfoMapper.xml
.../main/resources/mapper/system/TTaskRelationInfoMapper.xml
+96
-0
groupInfo.js
huaxin-web/src/api/checktask/groupInfo.js
+9
-0
index.vue
huaxin-web/src/views/checktask/task/index.vue
+266
-59
No files found.
huaxin-admin/src/main/java/com/zehong/web/controller/checktask/TTaskRelationInfoController.java
0 → 100644
View file @
6109e78f
package
com
.
zehong
.
web
.
controller
.
checktask
;
import
java.util.List
;
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.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TTaskRelationInfo
;
import
com.zehong.system.service.ITTaskRelationInfoService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 安检任务关联信息Controller
*
* @author zehong
* @date 2025-12-08
*/
@RestController
@RequestMapping
(
"/checkTask/relation"
)
public
class
TTaskRelationInfoController
extends
BaseController
{
@Autowired
private
ITTaskRelationInfoService
tTaskRelationInfoService
;
/**
* 查询安检任务关联信息列表
*/
@PreAuthorize
(
"@ss.hasPermi('checkTask:relation:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TTaskRelationInfo
tTaskRelationInfo
)
{
startPage
();
List
<
TTaskRelationInfo
>
list
=
tTaskRelationInfoService
.
selectTTaskRelationInfoList
(
tTaskRelationInfo
);
return
getDataTable
(
list
);
}
/**
* 导出安检任务关联信息列表
*/
@PreAuthorize
(
"@ss.hasPermi('checkTask:relation:export')"
)
@Log
(
title
=
"安检任务关联信息"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TTaskRelationInfo
tTaskRelationInfo
)
{
List
<
TTaskRelationInfo
>
list
=
tTaskRelationInfoService
.
selectTTaskRelationInfoList
(
tTaskRelationInfo
);
ExcelUtil
<
TTaskRelationInfo
>
util
=
new
ExcelUtil
<
TTaskRelationInfo
>(
TTaskRelationInfo
.
class
);
return
util
.
exportExcel
(
list
,
"安检任务关联信息数据"
);
}
/**
* 获取安检任务关联信息详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('checkTask:relation:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
tTaskRelationInfoService
.
selectTTaskRelationInfoById
(
id
));
}
/**
* 新增安检任务关联信息
*/
@PreAuthorize
(
"@ss.hasPermi('checkTask:relation:add')"
)
@Log
(
title
=
"安检任务关联信息"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TTaskRelationInfo
tTaskRelationInfo
)
{
return
toAjax
(
tTaskRelationInfoService
.
insertTTaskRelationInfo
(
tTaskRelationInfo
));
}
/**
* 修改安检任务关联信息
*/
@PreAuthorize
(
"@ss.hasPermi('checkTask:relation:edit')"
)
@Log
(
title
=
"安检任务关联信息"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TTaskRelationInfo
tTaskRelationInfo
)
{
return
toAjax
(
tTaskRelationInfoService
.
updateTTaskRelationInfo
(
tTaskRelationInfo
));
}
/**
* 删除安检任务关联信息
*/
@PreAuthorize
(
"@ss.hasPermi('checkTask:relation:remove')"
)
@Log
(
title
=
"安检任务关联信息"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
tTaskRelationInfoService
.
deleteTTaskRelationInfoByIds
(
ids
));
}
}
huaxin-admin/src/main/java/com/zehong/web/controller/group/TPersonGroupInfoController.java
View file @
6109e78f
...
...
@@ -45,6 +45,12 @@ public class TPersonGroupInfoController extends BaseController
return
getDataTable
(
list
);
}
@GetMapping
(
"/personGroupInfoList"
)
public
AjaxResult
personGroupInfoList
(
TPersonGroupInfo
tPersonGroupInfo
)
{
List
<
TPersonGroupInfo
>
list
=
tPersonGroupInfoService
.
selectTPersonGroupInfoList
(
tPersonGroupInfo
);
return
AjaxResult
.
success
(
list
);
}
/**
* 导出人员分组信息列表
*/
...
...
huaxin-system/src/main/java/com/zehong/system/domain/TTask.java
View file @
6109e78f
...
...
@@ -7,6 +7,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.Date
;
import
java.util.List
;
/**
* 入户安检任务对象 t_task
...
...
@@ -76,6 +77,8 @@ public class TTask extends BaseEntity
//当前登录人安检数 2024-05-28需求要求
private
Integer
selfInspectNum
;
private
List
<
TTaskRelationInfo
>
relationInfoList
;
public
Integer
getIsjian
()
{
return
isjian
;
...
...
@@ -225,6 +228,14 @@ public class TTask extends BaseEntity
this
.
selfInspectNum
=
selfInspectNum
;
}
public
List
<
TTaskRelationInfo
>
getRelationInfoList
()
{
return
relationInfoList
;
}
public
void
setRelationInfoList
(
List
<
TTaskRelationInfo
>
relationInfoList
)
{
this
.
relationInfoList
=
relationInfoList
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
huaxin-system/src/main/java/com/zehong/system/domain/TTaskRelationInfo.java
0 → 100644
View file @
6109e78f
package
com
.
zehong
.
system
.
domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 安检任务关联信息对象 t_task_relation_info
*
* @author zehong
* @date 2025-12-08
*/
public
class
TTaskRelationInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
private
Long
id
;
/** 任务主键 */
@Excel
(
name
=
"任务主键"
)
private
Long
taskId
;
/** 组主键 */
@Excel
(
name
=
"组主键"
)
private
Long
relationId
;
/** 类型:1区域 2负责组 */
@Excel
(
name
=
"类型:1区域 2负责组"
)
private
String
type
;
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除(0正常,1删除)"
)
private
String
isDel
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setTaskId
(
Long
taskId
)
{
this
.
taskId
=
taskId
;
}
public
Long
getTaskId
()
{
return
taskId
;
}
public
void
setRelationId
(
Long
relationId
)
{
this
.
relationId
=
relationId
;
}
public
Long
getRelationId
()
{
return
relationId
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getType
()
{
return
type
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
{
return
remarks
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"taskId"
,
getTaskId
())
.
append
(
"relationId"
,
getRelationId
())
.
append
(
"type"
,
getType
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
}
}
huaxin-system/src/main/java/com/zehong/system/mapper/TTaskRelationInfoMapper.java
0 → 100644
View file @
6109e78f
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TTaskRelationInfo
;
/**
* 安检任务关联信息Mapper接口
*
* @author zehong
* @date 2025-12-08
*/
public
interface
TTaskRelationInfoMapper
{
/**
* 查询安检任务关联信息
*
* @param id 安检任务关联信息ID
* @return 安检任务关联信息
*/
public
TTaskRelationInfo
selectTTaskRelationInfoById
(
Long
id
);
/**
* 查询安检任务关联信息列表
*
* @param tTaskRelationInfo 安检任务关联信息
* @return 安检任务关联信息集合
*/
public
List
<
TTaskRelationInfo
>
selectTTaskRelationInfoList
(
TTaskRelationInfo
tTaskRelationInfo
);
/**
* 新增安检任务关联信息
*
* @param tTaskRelationInfo 安检任务关联信息
* @return 结果
*/
public
int
insertTTaskRelationInfo
(
TTaskRelationInfo
tTaskRelationInfo
);
/**
* 修改安检任务关联信息
*
* @param tTaskRelationInfo 安检任务关联信息
* @return 结果
*/
public
int
updateTTaskRelationInfo
(
TTaskRelationInfo
tTaskRelationInfo
);
/**
* 删除安检任务关联信息
*
* @param id 安检任务关联信息ID
* @return 结果
*/
public
int
deleteTTaskRelationInfoById
(
Long
id
);
/**
* 根据任务删除关联关系
* @param taskId 任务主键
* @return
*/
int
deleteTTaskRelationInfoByTaskId
(
Long
taskId
);
/**
* 批量删除安检任务关联信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteTTaskRelationInfoByIds
(
Long
[]
ids
);
}
huaxin-system/src/main/java/com/zehong/system/service/ITTaskRelationInfoService.java
0 → 100644
View file @
6109e78f
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TTaskRelationInfo
;
/**
* 安检任务关联信息Service接口
*
* @author zehong
* @date 2025-12-08
*/
public
interface
ITTaskRelationInfoService
{
/**
* 查询安检任务关联信息
*
* @param id 安检任务关联信息ID
* @return 安检任务关联信息
*/
public
TTaskRelationInfo
selectTTaskRelationInfoById
(
Long
id
);
/**
* 查询安检任务关联信息列表
*
* @param tTaskRelationInfo 安检任务关联信息
* @return 安检任务关联信息集合
*/
public
List
<
TTaskRelationInfo
>
selectTTaskRelationInfoList
(
TTaskRelationInfo
tTaskRelationInfo
);
/**
* 新增安检任务关联信息
*
* @param tTaskRelationInfo 安检任务关联信息
* @return 结果
*/
public
int
insertTTaskRelationInfo
(
TTaskRelationInfo
tTaskRelationInfo
);
/**
* 修改安检任务关联信息
*
* @param tTaskRelationInfo 安检任务关联信息
* @return 结果
*/
public
int
updateTTaskRelationInfo
(
TTaskRelationInfo
tTaskRelationInfo
);
/**
* 批量删除安检任务关联信息
*
* @param ids 需要删除的安检任务关联信息ID
* @return 结果
*/
public
int
deleteTTaskRelationInfoByIds
(
Long
[]
ids
);
/**
* 删除安检任务关联信息信息
*
* @param id 安检任务关联信息ID
* @return 结果
*/
public
int
deleteTTaskRelationInfoById
(
Long
id
);
}
huaxin-system/src/main/java/com/zehong/system/service/impl/TTaskRelationInfoServiceImpl.java
0 → 100644
View file @
6109e78f
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TTaskRelationInfoMapper
;
import
com.zehong.system.domain.TTaskRelationInfo
;
import
com.zehong.system.service.ITTaskRelationInfoService
;
/**
* 安检任务关联信息Service业务层处理
*
* @author zehong
* @date 2025-12-08
*/
@Service
public
class
TTaskRelationInfoServiceImpl
implements
ITTaskRelationInfoService
{
@Autowired
private
TTaskRelationInfoMapper
tTaskRelationInfoMapper
;
/**
* 查询安检任务关联信息
*
* @param id 安检任务关联信息ID
* @return 安检任务关联信息
*/
@Override
public
TTaskRelationInfo
selectTTaskRelationInfoById
(
Long
id
)
{
return
tTaskRelationInfoMapper
.
selectTTaskRelationInfoById
(
id
);
}
/**
* 查询安检任务关联信息列表
*
* @param tTaskRelationInfo 安检任务关联信息
* @return 安检任务关联信息
*/
@Override
public
List
<
TTaskRelationInfo
>
selectTTaskRelationInfoList
(
TTaskRelationInfo
tTaskRelationInfo
)
{
return
tTaskRelationInfoMapper
.
selectTTaskRelationInfoList
(
tTaskRelationInfo
);
}
/**
* 新增安检任务关联信息
*
* @param tTaskRelationInfo 安检任务关联信息
* @return 结果
*/
@Override
public
int
insertTTaskRelationInfo
(
TTaskRelationInfo
tTaskRelationInfo
)
{
tTaskRelationInfo
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tTaskRelationInfoMapper
.
insertTTaskRelationInfo
(
tTaskRelationInfo
);
}
/**
* 修改安检任务关联信息
*
* @param tTaskRelationInfo 安检任务关联信息
* @return 结果
*/
@Override
public
int
updateTTaskRelationInfo
(
TTaskRelationInfo
tTaskRelationInfo
)
{
tTaskRelationInfo
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
tTaskRelationInfoMapper
.
updateTTaskRelationInfo
(
tTaskRelationInfo
);
}
/**
* 批量删除安检任务关联信息
*
* @param ids 需要删除的安检任务关联信息ID
* @return 结果
*/
@Override
public
int
deleteTTaskRelationInfoByIds
(
Long
[]
ids
)
{
return
tTaskRelationInfoMapper
.
deleteTTaskRelationInfoByIds
(
ids
);
}
/**
* 删除安检任务关联信息信息
*
* @param id 安检任务关联信息ID
* @return 结果
*/
@Override
public
int
deleteTTaskRelationInfoById
(
Long
id
)
{
return
tTaskRelationInfoMapper
.
deleteTTaskRelationInfoById
(
id
);
}
}
huaxin-system/src/main/java/com/zehong/system/service/impl/TTaskServiceImpl.java
View file @
6109e78f
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.zehong.common.core.domain.entity.SysRole
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TTaskMapper
;
import
com.zehong.system.domain.TTask
;
import
com.zehong.system.domain.TTaskRelationInfo
;
import
com.zehong.system.mapper.TTaskMapper
;
import
com.zehong.system.mapper.TTaskRelationInfoMapper
;
import
com.zehong.system.service.ITTaskService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 入户安检任务Service业务层处理
*
...
...
@@ -27,6 +32,9 @@ public class TTaskServiceImpl implements ITTaskService
@Autowired
private
TTaskMapper
tTaskMapper
;
@Resource
private
TTaskRelationInfoMapper
tTaskRelationInfoMapper
;
/**
* 查询入户安检任务
*
...
...
@@ -34,9 +42,12 @@ public class TTaskServiceImpl implements ITTaskService
* @return 入户安检任务
*/
@Override
public
TTask
selectTTaskById
(
Long
id
)
{
return
tTaskMapper
.
selectTTaskById
(
id
);
public
TTask
selectTTaskById
(
Long
id
)
{
TTask
task
=
tTaskMapper
.
selectTTaskById
(
id
);
TTaskRelationInfo
relationInfo
=
new
TTaskRelationInfo
();
relationInfo
.
setTaskId
(
id
);
task
.
setRelationInfoList
(
tTaskRelationInfoMapper
.
selectTTaskRelationInfoList
(
relationInfo
));
return
task
;
}
/**
...
...
@@ -58,10 +69,25 @@ public class TTaskServiceImpl implements ITTaskService
* @return 结果
*/
@Override
public
int
insertTTask
(
TTask
tTask
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
insertTTask
(
TTask
tTask
)
{
tTask
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tTaskMapper
.
insertTTask
(
tTask
);
int
result
=
tTaskMapper
.
insertTTask
(
tTask
);
addTaskRelationInfo
(
tTask
);
return
result
;
}
/**
* 新增关联关系
* @param tTask 任务信息
*/
private
void
addTaskRelationInfo
(
TTask
tTask
){
for
(
TTaskRelationInfo
relationInfo
:
tTask
.
getRelationInfoList
()){
relationInfo
.
setTaskId
(
tTask
.
getId
());
relationInfo
.
setCreateTime
(
new
Date
());
relationInfo
.
setCreateBy
(
SecurityUtils
.
getLoginUser
().
getUser
().
getNickName
());
tTaskRelationInfoMapper
.
insertTTaskRelationInfo
(
relationInfo
);
}
}
/**
...
...
@@ -71,8 +97,10 @@ public class TTaskServiceImpl implements ITTaskService
* @return 结果
*/
@Override
public
int
updateTTask
(
TTask
tTask
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
updateTTask
(
TTask
tTask
)
{
tTaskRelationInfoMapper
.
deleteTTaskRelationInfoByTaskId
(
tTask
.
getId
());
addTaskRelationInfo
(
tTask
);
return
tTaskMapper
.
updateTTask
(
tTask
);
}
...
...
@@ -83,8 +111,11 @@ public class TTaskServiceImpl implements ITTaskService
* @return 结果
*/
@Override
public
int
deleteTTaskByIds
(
Long
[]
ids
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
deleteTTaskByIds
(
Long
[]
ids
)
{
for
(
Long
id
:
ids
){
tTaskRelationInfoMapper
.
deleteTTaskRelationInfoByTaskId
(
id
);
}
return
tTaskMapper
.
deleteTTaskByIds
(
ids
);
}
...
...
huaxin-system/src/main/resources/mapper/system/TTaskMapper.xml
View file @
6109e78f
...
...
@@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<insert
id=
"insertTTask"
parameterType=
"TTask"
>
<insert
id=
"insertTTask"
parameterType=
"TTask"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_task
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
...
...
huaxin-system/src/main/resources/mapper/system/TTaskRelationInfoMapper.xml
0 → 100644
View file @
6109e78f
<?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.zehong.system.mapper.TTaskRelationInfoMapper"
>
<resultMap
type=
"TTaskRelationInfo"
id=
"TTaskRelationInfoResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"taskId"
column=
"task_id"
/>
<result
property=
"relationId"
column=
"relation_id"
/>
<result
property=
"type"
column=
"type"
/>
<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=
"isDel"
column=
"is_del"
/>
<result
property=
"remarks"
column=
"remarks"
/>
</resultMap>
<sql
id=
"selectTTaskRelationInfoVo"
>
select id, task_id, relation_id, type, create_by, create_time, update_by, update_time, is_del, remarks from t_task_relation_info
</sql>
<select
id=
"selectTTaskRelationInfoList"
parameterType=
"TTaskRelationInfo"
resultMap=
"TTaskRelationInfoResult"
>
<include
refid=
"selectTTaskRelationInfoVo"
/>
<where>
<if
test=
"taskId != null "
>
and task_id = #{taskId}
</if>
<if
test=
"relationId != null "
>
and relation_id = #{relationId}
</if>
<if
test=
"type != null and type != ''"
>
and type = #{type}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
</select>
<select
id=
"selectTTaskRelationInfoById"
parameterType=
"Long"
resultMap=
"TTaskRelationInfoResult"
>
<include
refid=
"selectTTaskRelationInfoVo"
/>
where id = #{id}
</select>
<insert
id=
"insertTTaskRelationInfo"
parameterType=
"TTaskRelationInfo"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_task_relation_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"taskId != null"
>
task_id,
</if>
<if
test=
"relationId != null"
>
relation_id,
</if>
<if
test=
"type != null"
>
type,
</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=
"isDel != null"
>
is_del,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"taskId != null"
>
#{taskId},
</if>
<if
test=
"relationId != null"
>
#{relationId},
</if>
<if
test=
"type != null"
>
#{type},
</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=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
</trim>
</insert>
<update
id=
"updateTTaskRelationInfo"
parameterType=
"TTaskRelationInfo"
>
update t_task_relation_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"taskId != null"
>
task_id = #{taskId},
</if>
<if
test=
"relationId != null"
>
relation_id = #{relationId},
</if>
<if
test=
"type != null"
>
type = #{type},
</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=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteTTaskRelationInfoById"
parameterType=
"Long"
>
delete from t_task_relation_info where id = #{id}
</delete>
<delete
id=
"deleteTTaskRelationInfoByTaskId"
parameterType=
"Long"
>
delete from t_task_relation_info where task_id = #{taskId}
</delete>
<delete
id=
"deleteTTaskRelationInfoByIds"
parameterType=
"String"
>
delete from t_task_relation_info where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
huaxin-web/src/api/checktask/groupInfo.js
View file @
6109e78f
...
...
@@ -60,3 +60,12 @@ export function selectMemberInfo(data) {
data
:
data
})
}
// 查询组信息列表
export
function
personGroupInfoList
(
query
)
{
return
request
({
url
:
'/group/info/personGroupInfoList'
,
method
:
'get'
,
params
:
query
})
}
huaxin-web/src/views/checktask/task/index.vue
View file @
6109e78f
...
...
@@ -240,31 +240,18 @@
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"
5
00px"
width
=
"
9
00px"
append
-
to
-
body
:
close
-
on
-
click
-
modal
=
"false"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"任务标题"
prop
=
"title"
>
<
el
-
input
v
-
model
=
"form.title"
placeholder
=
"请输入任务名称"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"任务描述"
prop
=
"describe"
>
<
el
-
input
type
=
"textarea"
v
-
model
=
"form.describe"
placeholder
=
"请输入任务描述"
/>
<
/el-form-item
>
<!--
<
el
-
form
-
item
label
=
"用户类型,1是居民,2是工商户,3是工业"
prop
=
"type"
>-->
<!--
<
el
-
select
v
-
model
=
"form.type"
placeholder
=
"请选择用户类型,1是居民,2是工商户,3是工业"
>-->
<!--
<
el
-
option
label
=
"请选择字典生成"
value
=
""
/>-->
<!--
<
/el-select>--
>
<!--
<
/el-form-item>--
>
<!--
<
el
-
form
-
item
label
=
"工业安检类型 1月度巡检 2季度巡检"
prop
=
"checkType"
>-->
<!--
<
el
-
select
v
-
model
=
"form.checkType"
placeholder
=
"请选择工业安检类型 1月度巡检 2季度巡检"
>-->
<!--
<
el
-
option
label
=
"请选择字典生成"
value
=
""
/>-->
<!--
<
/el-select>--
>
<!--
<
/el-form-item>--
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"安检类型"
prop
=
"taskType"
...
...
@@ -279,7 +266,19 @@
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
form
-
item
label
=
"任务描述"
prop
=
"describe"
>
<
el
-
input
type
=
"textarea"
v
-
model
=
"form.describe"
placeholder
=
"请输入任务描述"
/>
<
/el-form-item
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"开始日期"
prop
=
"startTime"
>
<
el
-
date
-
picker
clearable
...
...
@@ -291,6 +290,9 @@
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"结束日期"
prop
=
"endTime"
>
<
el
-
date
-
picker
clearable
...
...
@@ -302,6 +304,56 @@
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
form
-
item
label
=
"所属区域"
prop
=
"community"
>
<
el
-
col
:
span
=
"6"
>
<
el
-
select
v
-
model
=
"form.city"
placeholder
=
"请选择市"
@
change
=
"proviceChange"
>
<
el
-
option
v
-
for
=
"item in proviceData"
:
key
=
"item.id"
:
label
=
"item.areaName"
:
value
=
"item.id"
/>
<
/el-select
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
style
=
"padding-left: 8px"
>
<
el
-
select
v
-
model
=
"form.county"
placeholder
=
"所属区县"
@
change
=
"countyChange"
>
<
el
-
option
v
-
for
=
"item in countyData"
:
key
=
"item.id"
:
label
=
"item.areaName"
:
value
=
"item.id"
/>
<
/el-select
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
style
=
"padding-left: 8px"
>
<
el
-
select
v
-
model
=
"form.street"
placeholder
=
"所属乡镇"
@
change
=
"steetChange"
>
<
el
-
option
v
-
for
=
"item in streeData"
:
key
=
"item.id"
:
label
=
"item.areaName"
:
value
=
"item.id"
/>
<
/el-select
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
style
=
"padding-left: 8px"
>
<
el
-
select
v
-
model
=
"form.community"
multiple
placeholder
=
"所属小区(村)"
>
<
el
-
option
v
-
for
=
"item in communityData"
:
key
=
"item.id"
:
label
=
"item.name"
:
value
=
"item.id"
/>
<
/el-select
>
<
/el-col
>
<
/el-form-item
>
<
/el-row
>
<!--
<
el
-
form
-
item
label
=
"任务状态 0进行中 1已结束"
>-->
<!--
<
el
-
radio
-
group
v
-
model
=
"form.status"
>-->
<!--
<
el
-
radio
label
=
"1"
>
请选择字典生成
<
/el-radio>--
>
...
...
@@ -310,6 +362,22 @@
<!--
<
el
-
form
-
item
label
=
"创建人"
prop
=
"adminId"
>-->
<!--
<
el
-
input
v
-
model
=
"form.adminId"
placeholder
=
"请输入创建人"
/>-->
<!--
<
/el-form-item>--
>
<
el
-
row
>
<
el
-
col
:
span
=
"24"
>
<
el
-
form
-
item
label
=
"负责人"
prop
=
"responsiblePerson"
>
<
el
-
select
v
-
model
=
"form.responsiblePerson"
multiple
placeholder
=
"请选择负责人"
>
<
el
-
option
v
-
for
=
"group in groupList"
:
key
=
"group.groupId"
:
label
=
"group.groupName"
:
value
=
"group.groupId"
/>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"24"
>
<
el
-
form
-
item
label
=
"备注"
prop
=
"remarks"
>
<
el
-
input
type
=
"textarea"
...
...
@@ -317,6 +385,9 @@
placeholder
=
"请输入备注"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
...
...
@@ -352,6 +423,9 @@ import {
import
ItemJc
from
"./components/ItemJc.vue"
;
import
VisitorMissInfo
from
"./components/VisitorMissInfo"
;
import
{
aLLAreaListInfo
}
from
"@/api/baseinfo/area"
;
import
{
communityList
}
from
"@/api/baseinfo/community"
;
import
{
personGroupInfoList
}
from
"@/api/checktask/groupInfo"
;
export
default
{
name
:
"Task"
,
components
:
{
...
...
@@ -391,7 +465,11 @@ export default {
}
,
taskId
:
""
,
// 表单参数
form
:
{
}
,
form
:
{
community
:
[],
responsiblePerson
:
[],
relationInfoList
:
[]
}
,
// 表单校验
rules
:
{
title
:
[
...
...
@@ -406,10 +484,21 @@ export default {
endTime
:
[
{
required
:
true
,
message
:
"结束日期不能为空"
,
trigger
:
"blur"
}
,
],
community
:
[
{
required
:
true
,
message
:
"请选择所属小区(村)"
,
trigger
:
"blur"
}
,
],
responsiblePerson
:
[
{
required
:
true
,
message
:
"请选择负责人"
,
trigger
:
"blur"
}
,
]
}
,
inspectUserTypeOptions
:
[],
visitorDialogOpen
:
false
,
taskDetailData
:{
}
taskDetailData
:{
}
,
proviceData
:
[],
countyData
:
[],
streeData
:
[],
communityData
:
[],
groupList
:
[],
}
;
}
,
created
()
{
...
...
@@ -448,6 +537,9 @@ export default {
adminId
:
null
,
createTime
:
null
,
remarks
:
null
,
community
:
[],
responsiblePerson
:
[],
relationInfoList
:
[]
}
;
this
.
resetForm
(
"form"
);
}
,
...
...
@@ -470,6 +562,8 @@ export default {
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
getProvinceInfo
();
this
.
getGroupInfo
();
this
.
open
=
true
;
this
.
title
=
"添加入户安检任务"
;
}
,
...
...
@@ -479,14 +573,40 @@ export default {
const
id
=
row
.
id
||
this
.
ids
;
getTask
(
id
).
then
((
response
)
=>
{
this
.
form
=
response
.
data
;
// 获取省市
this
.
getProvinceInfo
();
// 获取县区信息
this
.
getCounty
();
// 获取街道信息
this
.
getStreet
();
// 获取村镇信息
this
.
getCommunityInfo
();
this
.
getGroupInfo
();
this
.
open
=
true
;
this
.
title
=
"修改入户安检任务"
;
}
);
}
,
getRelationInfo
(){
if
(
this
.
form
.
relationInfoList
){
let
community
=
this
.
form
.
relationInfoList
.
filter
(
item
=>
item
.
type
==
"1"
).
map
(
item
=>
item
.
relationId
);
if
(
community
)
{
this
.
form
.
community
=
community
;
const
area
=
this
.
communityData
.
find
(
item
=>
item
.
id
==
community
[
0
]);
if
(
area
){
this
.
form
.
city
=
area
.
city
;
this
.
form
.
county
=
area
.
county
;
this
.
form
.
street
=
area
.
street
;
}
}
let
responsiblePerson
=
this
.
form
.
relationInfoList
.
filter
(
item
=>
item
.
type
==
"2"
).
map
(
item
=>
item
.
relationId
);
if
(
responsiblePerson
)
this
.
form
.
responsiblePerson
=
responsiblePerson
;
}
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
addRelationInfo
();
if
(
this
.
form
.
id
!=
null
)
{
updateTask
(
this
.
form
).
then
((
response
)
=>
{
this
.
msgSuccess
(
"修改成功"
);
...
...
@@ -503,6 +623,28 @@ export default {
}
}
);
}
,
addRelationInfo
(){
this
.
form
.
community
.
forEach
(
item
=>
{
const
relationInfo
=
{
type
:
"1"
,
relationId
:
item
,
}
;
if
(
this
.
form
.
id
){
relationInfo
.
taskId
=
this
.
form
.
id
}
this
.
form
.
relationInfoList
.
push
(
relationInfo
);
}
);
this
.
form
.
responsiblePerson
.
forEach
(
item
=>
{
const
relationInfo
=
{
type
:
"2"
,
relationId
:
item
,
}
;
if
(
this
.
form
.
id
){
item
.
taskId
=
this
.
form
.
id
}
this
.
form
.
relationInfoList
.
push
(
relationInfo
);
}
)
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
...
...
@@ -573,6 +715,71 @@ export default {
handleVisitorMiss
(
row
){
this
.
visitorDialogOpen
=
true
;
this
.
taskDetailData
=
row
;
}
,
//市选择
proviceChange
(){
this
.
getCounty
();
this
.
form
.
county
=
null
;
this
.
countyData
=
[];
this
.
form
.
street
=
null
;
this
.
streeData
=
[];
this
.
community
=
null
;
this
.
communityData
=
[];
}
,
//区选择
countyChange
(){
this
.
form
.
street
=
null
;
this
.
streeData
=
[];
this
.
community
=
null
;
this
.
communityData
=
[];
this
.
getStreet
();
}
,
//街道镇选择
steetChange
(){
this
.
community
=
null
;
this
.
communityData
=
[];
this
.
getCommunityInfo
();
}
,
//获取市信息
getProvinceInfo
(){
aLLAreaListInfo
({
areaLevel
:
1
}
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
proviceData
=
res
.
data
;
}
}
)
}
,
//获取县区信息
getCounty
(){
aLLAreaListInfo
({
parentId
:
this
.
form
.
city
}
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
countyData
=
res
.
data
;
}
}
)
}
,
//获取街道镇信息
getStreet
(){
aLLAreaListInfo
({
parentId
:
this
.
form
.
county
}
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
streeData
=
res
.
data
;
}
}
)
}
,
//获取小区信息
getCommunityInfo
(){
communityList
({
street
:
this
.
form
.
street
}
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
communityData
=
res
.
data
;
this
.
getRelationInfo
();
}
}
)
}
,
//获取组信息
getGroupInfo
(){
personGroupInfoList
().
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
groupList
=
res
.
data
;
}
}
)
}
}
,
}
;
...
...
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