Commit b394a2ab authored by 耿迪迪's avatar 耿迪迪

客服及督查页面及后台接口开发

parent e517630b
...@@ -124,11 +124,20 @@ public class TRectifyGroupMemberInfoController extends BaseController ...@@ -124,11 +124,20 @@ public class TRectifyGroupMemberInfoController extends BaseController
/** /**
* 非居民安检根据登录人职位获取可选成员小程序接口 * 非居民安检(工商业)根据登录人职位获取可选成员小程序接口
* @return * @return
*/ */
@GetMapping("/otherDangerSelectMemberByUserPost") @GetMapping("/otherDangerSelectMemberByUserPost")
public AjaxResult otherDangerSelectMemberByUserPost(){ public AjaxResult otherDangerSelectMemberByUserPost(){
return AjaxResult.success(tRectifyGroupMemberInfoService.otherDangerSelectMemberByUserPost()); return AjaxResult.success(tRectifyGroupMemberInfoService.otherDangerSelectMemberByUserPost());
} }
/**
* 客服和督查类型隐患获取可选人员小程序接口
* @return
*/
@GetMapping("/customerAndSuperviseDangerSelectMemberByUserPost")
public AjaxResult customerAndSuperviseDangerSelectMemberByUserPost(){
return AjaxResult.success(tRectifyGroupMemberInfoService.otherDangerSelectMemberByUserPost());
}
} }
...@@ -197,6 +197,14 @@ public class TDanger extends BaseEntity ...@@ -197,6 +197,14 @@ public class TDanger extends BaseEntity
//是否有审核权限 //是否有审核权限
private boolean hasApprovalPermission; private boolean hasApprovalPermission;
/** 联系人 */
@Excel(name="联系人")
private String contact;
/** 表号记录 */
@Excel(name="表号")
private String meterNumRecord;
public String getBranch() { public String getBranch() {
return branch; return branch;
} }
...@@ -634,6 +642,22 @@ public class TDanger extends BaseEntity ...@@ -634,6 +642,22 @@ public class TDanger extends BaseEntity
this.hasApprovalPermission = hasApprovalPermission; this.hasApprovalPermission = hasApprovalPermission;
} }
public String getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact;
}
public String getMeterNumRecord() {
return meterNumRecord;
}
public void setMeterNumRecord(String meterNumRecord) {
this.meterNumRecord = meterNumRecord;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -79,4 +79,10 @@ public interface ITRectifyGroupMemberInfoService ...@@ -79,4 +79,10 @@ public interface ITRectifyGroupMemberInfoService
* @return * @return
*/ */
List<TRectifyGroupMemberInfo> otherDangerSelectMemberByUserPost(); List<TRectifyGroupMemberInfo> otherDangerSelectMemberByUserPost();
/**
* 客服和督查类型隐患获取可选人员小程序接口
* @return
*/
List<TRectifyGroupMemberInfo> customerAndSuperviseDangerSelectMemberByUserPost();
} }
...@@ -242,4 +242,55 @@ public class TRectifyGroupMemberInfoServiceImpl implements ITRectifyGroupMemberI ...@@ -242,4 +242,55 @@ public class TRectifyGroupMemberInfoServiceImpl implements ITRectifyGroupMemberI
} }
return result; return result;
} }
/**
* 客服和督查类型隐患获取可选人员小程序接口
* @return
*/
@Override
public List<TRectifyGroupMemberInfo> customerAndSuperviseDangerSelectMemberByUserPost(){
//登录人信息
Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
//获取登录人职务
TRectifyGroupMemberInfo tRectifyGroupMemberInfo = new TRectifyGroupMemberInfo();
tRectifyGroupMemberInfo.setUserId(userId);
List<TRectifyGroupMemberInfo> memberInfoList = tRectifyGroupMemberInfoMapper.selectTRectifyGroupMemberInfoList(tRectifyGroupMemberInfo);
if(CollectionUtils.isEmpty(memberInfoList)) throw new CustomException("未获取到登录人分组信息");
List<TRectifyGroupMemberInfo> result = new ArrayList<>();
for(TRectifyGroupMemberInfo memberInfo : memberInfoList){
/**
* 1.不是维修班的组员只能看到自己的组长
* 2.不是维修班的班长只能看到自己的组员和维修班的班长
* 3.维修班的班长只能看到自己的组员和其他维修班的班长
* 4.维修班的组员只能看到自己的组长
*/
if("1".equals(memberInfo.getPost())){
//班长登录
//自己的组员
TRectifyGroupMemberInfo InspectTeam = new TRectifyGroupMemberInfo();
InspectTeam.setGroupId(memberInfo.getGroupId());
InspectTeam.setPost("2");
List<TRectifyGroupMemberInfo> teamInfo = tRectifyGroupMemberInfoMapper.selectTRectifyGroupMemberInfoList(InspectTeam);
result.addAll(teamInfo);
//维修班组长信息
TRectifyGroupMemberInfo leader = new TRectifyGroupMemberInfo();
leader.setPost("1");
leader.setType("2");
List<TRectifyGroupMemberInfo> leaderInfo = tRectifyGroupMemberInfoMapper.selectTRectifyGroupMemberInfoList(leader);
result.addAll(leaderInfo);
}else{
//组员登录
//本组组长信息
TRectifyGroupMemberInfo team = new TRectifyGroupMemberInfo();
team.setGroupId(memberInfo.getGroupId());
team.setPost("1");
List<TRectifyGroupMemberInfo> leaderInfo = tRectifyGroupMemberInfoMapper.selectTRectifyGroupMemberInfoList(team);
result.addAll(leaderInfo);
}
}
return result;
}
} }
...@@ -46,6 +46,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -46,6 +46,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="dealMethod" column="deal_method" /> <result property="dealMethod" column="deal_method" />
<result property="branch" column="branch" /> <result property="branch" column="branch" />
<result property="approvalStatus" column="approval_status" /> <result property="approvalStatus" column="approval_status" />
<result property="contact" column="contact" />
<result property="meterNumRecord" column="meter_num_record" />
</resultMap> </resultMap>
<sql id="selectTDangerVo"> <sql id="selectTDangerVo">
...@@ -92,6 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -92,6 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
danger.deal_method, danger.deal_method,
danger.branch, danger.branch,
danger.approval_status, danger.approval_status,
danger.contact,
danger.meter_num_record,
(SELECT nick_name FROM sys_user where user_id = danger.file_id) as fileName, (SELECT nick_name FROM sys_user where user_id = danger.file_id) as fileName,
( (
case type case type
...@@ -153,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -153,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="branch != null "> and danger.branch = #{branch}</if> <if test="branch != null "> and danger.branch = #{branch}</if>
<if test="params != null and params.approvalCondition != null and params.approvalCondition != ''">${params.approvalCondition}</if> <if test="params != null and params.approvalCondition != null and params.approvalCondition != ''">${params.approvalCondition}</if>
<if test="reformName != null and reformName != ''"> and ref.nick_name like concat('%',#{reformName},'%')</if> <if test="reformName != null and reformName != ''"> and ref.nick_name like concat('%',#{reformName},'%')</if>
<if test="params != null and params.queryType != null and params.queryType != '' and params.queryType == 1">and danger.type not in (9,10)</if>
</where> </where>
ORDER BY create_time DESC ORDER BY create_time DESC
</select> </select>
...@@ -205,6 +210,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -205,6 +210,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dealMethod != null">deal_method,</if> <if test="dealMethod != null">deal_method,</if>
<if test="branch != null">branch,</if> <if test="branch != null">branch,</if>
<if test="approvalStatus != null">approval_status,</if> <if test="approvalStatus != null">approval_status,</if>
<if test="contact != null">contact,</if>
<if test="meterNumRecord != null">meter_num_record,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">#{taskId},</if> <if test="taskId != null">#{taskId},</if>
...@@ -247,6 +254,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -247,6 +254,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dealMethod != null">#{dealMethod},</if> <if test="dealMethod != null">#{dealMethod},</if>
<if test="branch != null"> #{branch},</if> <if test="branch != null"> #{branch},</if>
<if test="approvalStatus != null"> #{approvalStatus},</if> <if test="approvalStatus != null"> #{approvalStatus},</if>
<if test="contact != null">#{contact},</if>
<if test="meterNumRecord != null">#{meterNumRecord},</if>
</trim> </trim>
</insert> </insert>
...@@ -293,6 +302,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -293,6 +302,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dealMethod != null">deal_method = #{dealMethod},</if> <if test="dealMethod != null">deal_method = #{dealMethod},</if>
<if test="branch != null">branch = #{branch},</if> <if test="branch != null">branch = #{branch},</if>
<if test="approvalStatus != null">approval_status = #{approvalStatus},</if> <if test="approvalStatus != null">approval_status = #{approvalStatus},</if>
<if test="contact != null">contact = #{contact},</if>
<if test="meterNumRecord != null">meter_num_record = #{meterNumRecord},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
...@@ -370,6 +381,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -370,6 +381,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
danger.safety_emergency_plan, danger.safety_emergency_plan,
danger.deal_method, danger.deal_method,
danger.approval_status, danger.approval_status,
danger.contact,
danger.meter_num_record,
(SELECT nick_name FROM sys_user where user_id = danger.file_id) as fileName, (SELECT nick_name FROM sys_user where user_id = danger.file_id) as fileName,
( (
<if test="type == 1"> <if test="type == 1">
......
...@@ -47,6 +47,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -47,6 +47,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null and isDel != ''"> and member.is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and member.is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and member.remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and member.remarks = #{remarks}</if>
<if test="type != null and type != ''"> and info.type = #{type}</if> <if test="type != null and type != ''"> and info.type = #{type}</if>
<if test="params != null and params.queryType != null and params.queryType != '' and params.queryType == 1">and info.type in ('3','4')</if>
<if test="params != null and params.queryType != null and params.queryType != '' and params.queryType == 2">and info.type not in ('1')</if>
<if test="nickName != null and nickName != ''"> <if test="nickName != null and nickName != ''">
AND su.nick_name like concat('%', #{nickName}, '%') AND su.nick_name like concat('%', #{nickName}, '%')
</if> </if>
......
<template>
<el-dialog :title="title" :visible.sync="approvalOpen" width="800px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="审核状态" prop="state">
<el-radio-group v-model="form.state">
<el-radio :label="0">通过</el-radio>
<el-radio :label="1">不通过</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="审核意见" prop="suggestion">
<el-input type="textarea" v-model="form.suggestion" placeholder="请输入审核意见"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { dangerApproval } from "@/api/checktask/danger";
export default {
name: "approval",
data(){
return{
title: "审核",
approvalOpen: false,
ids: [],
form: {},
rules: {
state: [
{ required: true, message: "请选择审核状态", trigger: "change" }
],
}
}
},
methods:{
open(ids){
this.reset();
this.ids = ids;
this.approvalOpen = true;
},
submitForm(){
this.$refs["form"].validate(valid => {
if (valid) {
let data = [];
this.ids.forEach(item =>{
data.push({
id: item,
...this.form
})
})
dangerApproval(data).then(res =>{
this.$message.success("审核成功");
this.approvalOpen = false;
this.$parent.getList();
})
}
})
},
cancel(){
this.approvalOpen = false;
},
reset(){
this.form = {
state: null,
suggestion: null
}
this.resetForm("form");
}
}
}
</script>
<style scoped>
</style>
This diff is collapsed.
...@@ -401,6 +401,9 @@ export default { ...@@ -401,6 +401,9 @@ export default {
endDate : null, endDate : null,
branch:null, branch:null,
reformName: null, reformName: null,
params:{
queryType: 1
}
}, },
// 表单参数 // 表单参数
form: {}, form: {},
......
...@@ -116,9 +116,10 @@ ...@@ -116,9 +116,10 @@
style="width: 100%" style="width: 100%"
@change="changeType" @change="changeType"
> >
<el-option label="巡检组" value="1"/> <el-option label="督查班" value="1"/>
<el-option label="维修班" value="2"/> <el-option label="维修班" value="2"/>
<el-option label="网格班" value="3"/> <el-option label="网格班" value="3"/>
<el-option label="巡线班" value="4"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
......
<template>
<el-dialog :title="title" :visible.sync="approvalOpen" width="800px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="审核状态" prop="state">
<el-radio-group v-model="form.state">
<el-radio :label="0">通过</el-radio>
<el-radio :label="1">不通过</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="审核意见" prop="suggestion">
<el-input type="textarea" v-model="form.suggestion" placeholder="请输入审核意见"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { dangerApproval } from "@/api/checktask/danger";
export default {
name: "approval",
data(){
return{
title: "审核",
approvalOpen: false,
ids: [],
form: {},
rules: {
state: [
{ required: true, message: "请选择审核状态", trigger: "change" }
],
}
}
},
methods:{
open(ids){
this.reset();
this.ids = ids;
this.approvalOpen = true;
},
submitForm(){
this.$refs["form"].validate(valid => {
if (valid) {
let data = [];
this.ids.forEach(item =>{
data.push({
id: item,
...this.form
})
})
dangerApproval(data).then(res =>{
this.$message.success("审核成功");
this.approvalOpen = false;
this.$parent.getList();
})
}
})
},
cancel(){
this.approvalOpen = false;
},
reset(){
this.form = {
state: null,
suggestion: null
}
this.resetForm("form");
}
}
}
</script>
<style scoped>
</style>
This diff is collapsed.
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