Commit 08d1a091 authored by 耿迪迪's avatar 耿迪迪

居民安检详情修改添加所属区域及负责人

parent dd8207e3
...@@ -38,6 +38,16 @@ public class TTaskRelationInfo extends BaseEntity ...@@ -38,6 +38,16 @@ public class TTaskRelationInfo extends BaseEntity
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
private String community;
private String street;
private String county;
private String city;
private String groupName;
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
...@@ -93,6 +103,46 @@ public class TTaskRelationInfo extends BaseEntity ...@@ -93,6 +103,46 @@ public class TTaskRelationInfo extends BaseEntity
return remarks; return remarks;
} }
public String getCommunity() {
return community;
}
public void setCommunity(String community) {
this.community = community;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -57,9 +57,15 @@ public class TTaskServiceImpl implements ITTaskService ...@@ -57,9 +57,15 @@ public class TTaskServiceImpl implements ITTaskService
* @return 入户安检任务 * @return 入户安检任务
*/ */
@Override @Override
public List<TTask> selectTTaskList(TTask tTask) public List<TTask> selectTTaskList(TTask tTask) {
{ List<TTask> taskList = tTaskMapper.selectTTaskList(tTask);
return tTaskMapper.selectTTaskList(tTask); for(TTask task : taskList){
TTaskRelationInfo relationInfo = new TTaskRelationInfo();
relationInfo.setTaskId(task.getId());
task.setRelationInfoList(tTaskRelationInfoMapper.selectTTaskRelationInfoList(relationInfo));
}
return taskList;
} }
/** /**
......
...@@ -124,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -124,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="taskType!=null and taskType != ''"> and u.task_type = #{taskType}</if> <if test="taskType!=null and taskType != ''"> and u.task_type = #{taskType}</if>
<if test="village!=null"> and u.village = #{village}</if> <if test="village!=null"> and u.village = #{village}</if>
<if test="missNum != 0">and inspect.totalMissNum = #{ missNum }</if> <if test="missNum != 0">and inspect.totalMissNum = #{ missNum }</if>
and u.village in (SELECT re.relation_id FROM t_task_relation_info re WHERE re.task_id = #{taskId} and re.type = '1' )
</where> </where>
order by inspect.create_time desc order by inspect.create_time desc
</select> </select>
......
...@@ -18,7 +18,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -18,7 +18,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTTaskRelationInfoVo"> <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 SELECT
relation.id,
relation.task_id,
relation.relation_id,
relation.type,
relation.create_by,
relation.create_time,
relation.update_by,
relation.update_time,
relation.is_del,
relation.remarks,
community.name as community,
street.area_name as street,
county.area_name as county,
city.area_name as city,
gr.group_name as groupName
FROM
t_task_relation_info relation
LEFT JOIN t_community community ON community.id = relation.relation_id
LEFT JOIN t_area street ON street.id = community.street
LEFT JOIN t_area county ON county.id = community.county
LEFT JOIN t_area city ON city.id = community.city
LEFT JOIN t_person_group_info gr ON gr.group_id = relation.relation_id
</sql> </sql>
<select id="selectTTaskRelationInfoList" parameterType="TTaskRelationInfo" resultMap="TTaskRelationInfoResult"> <select id="selectTTaskRelationInfoList" parameterType="TTaskRelationInfo" resultMap="TTaskRelationInfoResult">
......
...@@ -194,14 +194,14 @@ ...@@ -194,14 +194,14 @@
:loading="exportLoading" :loading="exportLoading"
@click="handlejmInspectExport" @click="handlejmInspectExport"
>导出</el-button> >导出</el-button>
<el-button <!--<el-button
type="warning" type="warning"
plain plain
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
:loading="batchExportLoading" :loading="batchExportLoading"
@click="handleBatchInspectExport" @click="handleBatchInspectExport"
>安检单导出</el-button> >安检单导出</el-button>-->
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -50,6 +50,18 @@ ...@@ -50,6 +50,18 @@
{{ typeOptions[itemData.checkType] }} {{ typeOptions[itemData.checkType] }}
</div> </div>
</div> </div>
<div v-if="itemData.type == 1" class="list flex">
<div class="a">所属区域:</div>
<div class="b">
{{ getBeyongArea() }}
</div>
</div>
<div v-if="itemData.type == 1" class="list flex">
<div class="a">负责人:</div>
<div class="b">
{{ getResponsiblePerson() }}
</div>
</div>
<div class="list flex"> <div class="list flex">
<div class="a">备注:</div> <div class="a">备注:</div>
<div class="b"> <div class="b">
...@@ -127,7 +139,34 @@ export default { ...@@ -127,7 +139,34 @@ export default {
}, },
}; };
}, },
methods: {}, methods: {
getBeyongArea(){
if(this.itemData.relationInfoList){
const result = Object.values(
this.itemData.relationInfoList.filter(item => item.type == "1").reduce((acc, item) => {
const key = `${item.city}-${item.county}-${item.street}`;
acc[key] = acc[key] || { ...item, communitys: [] };
acc[key].communitys.push(item.community);
return acc;
}, {})
)
.map(item => `${item.city}-${item.county}-${item.street}-${item.communitys.join('|')}`)[0];
return result;
}else{
return "-";
}
},
getResponsiblePerson(){
if(this.itemData.relationInfoList){
return this.itemData.relationInfoList.filter(item => item.type == "2").map(item => item.groupName).join("|");
}else{
return "-";
}
}
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment