提交代码

dev_xds
姜玉琦 2024-04-21 13:07:15 +08:00
parent 694b343fcb
commit 17bd1141f2
22 changed files with 1487 additions and 145 deletions

View File

@ -81,4 +81,9 @@ public class CacheConstants
* *
*/ */
public static final String WX_MPMESSAGE_P_MAG = "wx.mpmessage.p.mag::"; public static final String WX_MPMESSAGE_P_MAG = "wx.mpmessage.p.mag::";
/**
*
*/
public static final String WX_MPMESSAGE_P_ORG = "wx.mpmessage.p.org::";
} }

View File

@ -16,7 +16,9 @@ public enum MessageTypeEnum {
GCSPCSBL("70", "办理工程审批超时提醒"), GCSPCSBL("70", "办理工程审批超时提醒"),
GCSPCSCS("80", "抄送工程审批超时提醒"), GCSPCSCS("80", "抄送工程审批超时提醒"),
YHZGCSGZ("90", "隐患整改超时通知"), YHZGCSGZ("90", "隐患整改超时通知"),
YHFJCSGZ("100", "隐患复检超时通知"); YHFJCSGZ("100", "隐患复检超时通知"),
LZYJSP("110", "劳资预警审批"),
LZYJCSTZ("120", "劳资预警审批超时");
//工作流审批由ProcDefKey组成 //工作流审批由ProcDefKey组成
private final String code; private final String code;

View File

@ -51,6 +51,14 @@ public interface SysUserOpenidMapper
*/ */
public List<SysUserOpenid> findMsgProSupUsers(Long proId); public List<SysUserOpenid> findMsgProSupUsers(Long proId);
/**
* openId[]
*
* @param proId
* @return openId
*/
public List<SysUserOpenid> findMsgProOrgUsers(Long proId);
/** /**
* openId[] * openId[]
* *

View File

@ -45,6 +45,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where spu.project_id = #{proId} and spu.job_type=1 and spu.is_del = 0 and su.del_flag = '0' and suo.isDel=0 where spu.project_id = #{proId} and spu.job_type=1 and spu.is_del = 0 and su.del_flag = '0' and suo.isDel=0
</select> </select>
<select id="findMsgProOrgUsers" parameterType="Long" resultMap="SysUserOpenidResult">
select suo.id, suo.openId, suo.msgOpenId, suo.userId, suo.loginName, suo.nickname, suo.isDel, suo.creatTime, suo.unionid
from sys_user_openid suo
left join sys_user su on su.phonenumber = suo.loginName
left join sur_project_userinfo spu on spu.user_id = su.user_id
where spu.project_id = #{proId} and spu.job_type=24 and spu.is_del = 0 and su.del_flag = '0' and suo.isDel=0
</select>
<select id="findMsgProMagUsers" parameterType="Long" resultMap="SysUserOpenidResult"> <select id="findMsgProMagUsers" parameterType="Long" resultMap="SysUserOpenidResult">
select suo.id, suo.openId, suo.msgOpenId, suo.userId, suo.loginName, suo.nickname, suo.isDel, suo.creatTime, suo.unionid select suo.id, suo.openId, suo.msgOpenId, suo.userId, suo.loginName, suo.nickname, suo.isDel, suo.creatTime, suo.unionid
from sys_user_openid suo from sys_user_openid suo

View File

@ -43,6 +43,15 @@ export function delFlowLabourInfo(id) {
}) })
} }
//分组统计
export function findGroupCountByApprove(query) {
return request({
url: '/flow/flowLabourInfo/findGroupCountByApprove',
method: 'get',
params: query
})
}
// 查询我的劳资投诉列表 // 查询我的劳资投诉列表
export function findMyFlowLabours(cardId) { export function findMyFlowLabours(cardId) {
return request({ return request({
@ -59,3 +68,12 @@ export function findMyFlowLabourNodes(flowId) {
}) })
} }
//审批劳资预警
export function flowLabourAuditNode(data) {
return request({
url: '/flow/flowLabourAuditNode',
method: 'put',
data: data
})
}

View File

@ -27,7 +27,7 @@ export default {
vnodes.push(<span slot='title'>{(title)}</span>) vnodes.push(<span slot='title'>{(title)}</span>)
} }
let name=context?.parent?.item?.name; let name=context?.parent?.item?.name;
if(['Todo','Task','Approve','Project','CheckDetection','ProjectMeasure','MaterialSeal','ProjectChecking'].includes(name)){ if(['Todo','Task','Approve','Project','CheckDetection','ProjectMeasure','MaterialSeal','ProjectChecking','Attendance','FlowLabourInfo'].includes(name)){
console.log(name); console.log(name);
vnodes.push(h('span',{class:"todo_num_tips tips_"+name},1)) vnodes.push(h('span',{class:"todo_num_tips tips_"+name},1))
} }

View File

@ -108,6 +108,28 @@ const flowtask = {
} }
}); });
} }
let Attendance=document.querySelectorAll(".tips_Attendance");
if(Attendance.length>0){
Attendance.forEach(el=>{
el.innerHTML=response.data.approveLZYJ;
if(response.data.approveLZYJ>0){
el.style.display="inline";
}else{
el.style.display="none";
}
});
}
let FlowLabourInfo=document.querySelectorAll(".tips_FlowLabourInfo");
if(FlowLabourInfo.length>0){
FlowLabourInfo.forEach(el=>{
el.innerHTML=response.data.approveLZYJ;
if(response.data.approveLZYJ>0){
el.style.display="inline";
}else{
el.style.display="none";
}
});
}
resolve() resolve()
}).catch(error => { }).catch(error => {
reject(error) reject(error)

View File

@ -0,0 +1,437 @@
<template>
<div class="flow-labour-drawer">
<el-drawer
v-if="isOpen"
:visible.sync="isOpen"
ref="drawer"
direction="rtl"
@close="closeCallBack"
size="60%"
>
<template slot="title">
<div>{{ title }}</div>
</template>
<div class="drawer">
<div class="drawerLeft">
<el-steps :active="active" finish-status="success" simple>
<el-step title="提交投诉"></el-step>
<el-step title="总包处理"></el-step>
<el-step title="甲代审核"></el-step>
<el-step title="集团审核"></el-step>
</el-steps>
<el-timeline>
<el-timeline-item
v-for="(item, index) in flowLabourNodes"
:key="index"
:icon="setIcon(item)"
:color="setColor(item)"
>
<p style="font-weight: 700">
{{ getSort(index)
}}{{
item.flowNode == "0" ? item.createBy + "提交投诉" : item.flowNodeName
}}
</p>
<el-card :body-style="{ padding: '6px' }">
<el-descriptions class="margin-top" :column="1" size="small" border>
<el-descriptions-item
v-if="item.createBy"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>办理人</template>
{{ item.createBy }}
<el-tag type="info" size="mini" v-show="item.flowNode == '0'">{{
dataInfo.subDeptName
}}</el-tag>
</el-descriptions-item>
<el-descriptions-item
v-if="item.createTime"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-date"></i>处理时间</template>
{{ item.createTime }}
</el-descriptions-item>
<el-descriptions-item
v-if="item.flowComment"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"
><i class="el-icon-tickets"></i>处理意见</template
>
{{ item.flowComment }}
</el-descriptions-item>
<el-descriptions-item
v-if="item.files"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"
><i class="el-icon-picture"></i>凭证附件</template
>
<el-image
ref="preview"
v-for="(img, idx) in item.files.split(',')"
:key="idx"
:src="getImageUrl(img)"
style="width: 60px; height: 60px; margin-right: 8px"
@click="onPreview(img)"
></el-image>
</el-descriptions-item>
</el-descriptions>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<div class="drawerRight">
<el-form
ref="form"
v-loading="loading"
:model="form"
:rules="rules"
label-width="80px"
style="padding-right: 20px; padding-left: 20px"
>
<el-form-item label="项目名称">
{{ dataInfo.projectName }}
</el-form-item>
<el-form-item label="总包单位">
{{ dataInfo.deptName }}
</el-form-item>
<el-form-item label="分包单位">
{{ dataInfo.subDeptName }}
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="投诉人">
{{ dataInfo.laborName }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话">
{{ dataInfo.laborPhone }}
</el-form-item>
</el-col>
</el-row>
<el-form-item label="身份证号">
{{ dataInfo.laborCardId }}
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="欠薪人数">
{{ dataInfo.laborNumber }} <el-tag size="small"></el-tag>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="欠薪金额">
{{ dataInfo.laborNumber }} <el-tag size="small"></el-tag>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="原因说明">
{{ dataInfo.laborReason }}
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="投诉时间">
<span>{{ parseTime(dataInfo.createTime, "{y}-{m}-{d}") }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="投诉进度">
<dict-tag
:options="dict.type.flow_labou_appstatus"
:value="dataInfo.approveStatus"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="凭证附件" v-if="dataInfo.files">
<el-image
ref="preview"
v-for="(img, idx) in dataInfo.files.split(',')"
:key="idx"
:src="getImageUrl(img)"
style="width: 65px; height: 65px; margin-right: 8px"
@click="onPreview(img)"
></el-image>
</el-form-item>
<!-- <el-alert
v-if="dataInfo.approveStatus != '100'"
show-icon
title="温馨提示"
type="info"
description="请如实并客观的受理投诉并核实!"
>
</el-alert> -->
<el-form-item label="处理意见" prop="flowComment">
<el-input
type="textarea"
:rows="3"
placeholder="请输入处理意见600字内"
v-model="form.flowComment"
/>
</el-form-item>
<el-form-item label="凭证附件" prop="files">
<image-upload v-model="form.files" :limit="9" />
</el-form-item>
<div style="text-align: center; padding-bottom: 20px">
<el-button @click="cancel"> </el-button>
<el-button
type="success"
icon="el-icon-success"
@click="submitForm(100)"
v-if="dataInfo.approveStatus == '10'"
> </el-button
>
<el-button
type="danger"
icon="el-icon-error"
@click="submitForm(1)"
v-if="dataInfo.approveStatus != '10' && dataInfo.approveStatus != '21'"
> </el-button
>
<el-button
type="success"
icon="el-icon-success"
@click="submitForm(100)"
v-if="dataInfo.approveStatus != '10'"
> </el-button
>
</div>
</el-form>
</div>
</div>
</el-drawer>
<el-image-viewer
v-if="showViewer"
:on-close="closeViewer"
:url-list="previewList"
style="z-index: 2050"
/>
</div>
</template>
<script>
import {
getFlowLabourInfo,
flowLabourAuditNode,
findMyFlowLabourNodes,
} from "@/api/flow/flowLabourInfo";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
export default {
name: "approveFlowLabourDrawer",
components: {
ElImageViewer,
},
props: {
closeCallBack: {
type: Function,
},
},
dicts: ["flow_labou_appstatus"],
data() {
return {
showViewer: false,
open: false,
isOpen: false,
dataInfo: {
files: "",
},
title: "",
form: {},
rules: {
flowComment: [
{ required: true, message: "请输入处理意见", trigger: "blur" },
{ max: 600, message: "处理意见最多600字符", trigger: "blur" },
],
},
//
loading: true,
previewList: [],
flowLabourNodes: [],
active: 100,
//label
labelStyle: { width: "180px" },
minRoles: [],
};
},
computed: {},
mounted() {},
created() {
this.minRoles = this.$store.getters.roles;
},
methods: {
setIcon(row) {
if (row.flowResult == null || row.flowResult == "100") {
return "el-icon-check";
} else {
return "el-icon-close";
}
},
setColor(row) {
if (row.flowResult == null || row.flowResult == "100") {
return "#2bc418";
} else {
return "#f56c6c";
}
},
getSort(i) {
let num = this.flowLabourNodes.length - i;
if (num < 10) {
num = "0" + num;
}
return num + ". ";
},
getImageUrl(url) {
return process.env.VUE_APP_BASE_API + url + ".min.jpg";
},
onPreview(urls) {
this.previewList = [];
urls.split(",").forEach((item) => {
this.previewList.push(process.env.VUE_APP_BASE_API + item);
});
this.showViewer = true;
},
closeViewer() {
this.showViewer = false;
},
show(options) {
this.title = "劳资投诉审批详情";
this.form = {};
this.form.flowId = options.id;
this.active = parseInt(options.approveStatus / 10);
this.isOpen = true;
getFlowLabourInfo(options.id).then((res) => {
this.dataInfo = res.data;
this.loading = false;
});
//
findMyFlowLabourNodes(options.id).then((res) => {
this.flowLabourNodes = res.data || [];
});
},
//
cancel() {
this.isOpen = false;
},
/** 提交按钮 */
submitForm(v) {
let that = this;
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.flowResult = v;
let msg = "审批通过";
let wagMsg = "";
if (v != "100") {
msg = "审批驳回";
}
if (
this.dataInfo.approveStatus == "10" ||
this.dataInfo.approveStatus == "21"
) {
msg = "提交处理结果";
if (
this.minRoles.includes("admin") ||
this.minRoles.includes("super") ||
this.minRoles.includes("jtgs") ||
this.minRoles.includes("zgs")
) {
wagMsg = "当前数据总包单位正在处理,您";
}
} else if (
this.dataInfo.approveStatus == "20" ||
this.dataInfo.approveStatus == "31"
) {
if (
this.minRoles.includes("admin") ||
this.minRoles.includes("super") ||
this.minRoles.includes("jtgs")
) {
wagMsg = "当前数据甲方代表正在审批,您";
}
}
this.$confirm(wagMsg + "是否确认" + msg + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
that.loading = true;
flowLabourAuditNode(that.form).then((res) => {
that.$modal.msgSuccess("操作成功");
that.loading = false;
//
that.$refs.drawer.closeDrawer();
});
})
.catch(() => {
console.log("取消操作");
});
}
});
},
},
};
</script>
<style scope>
.el-alert {
display: flex !important;
}
.el-alert--info.is-light {
background: cornflowerblue !important;
color: #ffffff !important;
}
.el-alert--info .el-alert__description {
color: #ffffff !important;
}
.el-steps--simple {
padding: 5px 5px !important;
}
.el-timeline-item {
padding-bottom: 0px !important;
}
.el-timeline {
padding-left: 5px !important;
padding-top: 20px !important;
}
.el-timeline-item__wrapper {
padding-left: 15px !important;
}
.el-timeline-item__content {
font-weight: 900;
}
.el-form-item {
margin-bottom: 15px !important;
}
</style>
<style lang="scss">
.flow-labour-drawer {
.drawer {
width: 100%;
height: 100%;
padding-left: 20px;
padding-right: 20px;
padding-bottom: 20px;
.drawerLeft {
width: 55%;
min-width: 280px;
height: 100%;
float: left;
border-right: 1px solid #dcdfe6;
overflow-y: scroll;
padding-right: 20px;
}
.drawerRight {
width: 45%;
min-width: 400px;
height: 100%;
float: left;
padding-left: 20px;
}
}
}
</style>

View File

@ -0,0 +1,313 @@
<template>
<div class="flow-labour-drawer">
<el-drawer
v-if="isOpen"
:visible.sync="isOpen"
ref="drawer"
direction="rtl"
size="60%"
>
<template slot="title">
<div>{{ title }}</div>
</template>
<div class="drawer">
<div class="drawerLeft">
<el-steps :active="active" finish-status="success" simple>
<el-step title="提交投诉"></el-step>
<el-step title="总包处理"></el-step>
<el-step title="甲代审核"></el-step>
<el-step title="集团审核"></el-step>
</el-steps>
<el-timeline>
<el-timeline-item
v-for="(item, index) in flowLabourNodes"
:key="index"
:icon="setIcon(item)"
:color="setColor(item)"
>
<p style="font-weight: 700">
{{ getSort(index)
}}{{
item.flowNode == "0" ? item.createBy + "提交投诉" : item.flowNodeName
}}
</p>
<el-card :body-style="{ padding: '6px' }">
<el-descriptions class="margin-top" :column="1" size="small" border>
<el-descriptions-item
v-if="item.createBy"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>办理人</template>
{{ item.createBy }}
<el-tag type="info" size="mini" v-show="item.flowNode == '0'">{{
dataInfo.subDeptName
}}</el-tag>
</el-descriptions-item>
<el-descriptions-item
v-if="item.createTime"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-date"></i>处理时间</template>
{{ item.createTime }}
</el-descriptions-item>
<el-descriptions-item
v-if="item.flowComment"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"
><i class="el-icon-tickets"></i>处理意见</template
>
{{ item.flowComment }}
</el-descriptions-item>
<el-descriptions-item
v-if="item.files"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"
><i class="el-icon-picture"></i>凭证附件</template
>
<el-image
ref="preview"
v-for="(img, idx) in item.files.split(',')"
:key="idx"
:src="getImageUrl(img)"
style="width: 60px; height: 60px; margin-right: 8px"
@click="onPreview(img)"
></el-image>
</el-descriptions-item>
</el-descriptions>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<div class="drawerRight">
<el-form
ref="form"
v-loading="loading"
:model="form"
:rules="rules"
label-width="80px"
style="padding-right: 20px; padding-left: 20px"
>
<el-form-item label="项目名称">
{{ dataInfo.projectName }}
</el-form-item>
<el-form-item label="总包单位">
{{ dataInfo.deptName }}
</el-form-item>
<el-form-item label="分包单位">
{{ dataInfo.subDeptName }}
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="投诉人">
{{ dataInfo.laborName }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话">
{{ dataInfo.laborPhone }}
</el-form-item>
</el-col>
</el-row>
<el-form-item label="身份证号">
{{ dataInfo.laborCardId }}
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="欠薪人数">
{{ dataInfo.laborNumber }} <el-tag size="small"></el-tag>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="欠薪金额">
{{ dataInfo.laborNumber }} <el-tag size="small"></el-tag>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="原因说明">
{{ dataInfo.laborReason }}
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="投诉时间">
<span>{{ parseTime(dataInfo.createTime, "{y}-{m}-{d}") }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="投诉进度">
<dict-tag
:options="dict.type.flow_labou_appstatus"
:value="dataInfo.approveStatus"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="凭证附件" v-if="dataInfo.files">
<el-image
ref="preview"
v-for="(img, idx) in dataInfo.files.split(',')"
:key="idx"
:src="getImageUrl(img)"
style="width: 65px; height: 65px; margin-right: 8px"
@click="onPreview(img)"
></el-image>
</el-form-item>
</el-form>
</div>
</div>
</el-drawer>
<el-image-viewer
v-if="showViewer"
:on-close="closeViewer"
:url-list="previewList"
style="z-index: 2050"
/>
</div>
</template>
<script>
import { getFlowLabourInfo, findMyFlowLabourNodes } from "@/api/flow/flowLabourInfo";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
export default {
name: "approveFlowLabourDrawer",
components: {
ElImageViewer,
},
dicts: ["flow_labou_appstatus"],
data() {
return {
showViewer: false,
open: false,
isOpen: false,
dataInfo: {
files: "",
},
title: "",
//
loading: true,
previewList: [],
flowLabourNodes: [],
active: 100,
//label
labelStyle: { width: "180px" },
};
},
computed: {},
mounted() {},
methods: {
setIcon(row) {
if (row.flowResult == null || row.flowResult == "100") {
return "el-icon-check";
} else {
return "el-icon-close";
}
},
setColor(row) {
if (row.flowResult == null || row.flowResult == "100") {
return "#2bc418";
} else {
return "#f56c6c";
}
},
getSort(i) {
let num = this.flowLabourNodes.length - i;
if (num < 10) {
num = "0" + num;
}
return num + ". ";
},
getImageUrl(url) {
return process.env.VUE_APP_BASE_API + url + ".min.jpg";
},
onPreview(urls) {
this.previewList = [];
urls.split(",").forEach((item) => {
this.previewList.push(process.env.VUE_APP_BASE_API + item);
});
this.showViewer = true;
},
closeViewer() {
this.showViewer = false;
},
show(options) {
this.title = "劳资投诉详情查看";
this.form = {};
this.form.flowId = options.id;
this.active = parseInt(options.approveStatus / 10);
this.isOpen = true;
getFlowLabourInfo(options.id).then((res) => {
this.dataInfo = res.data;
this.loading = false;
});
//
findMyFlowLabourNodes(options.id).then((res) => {
this.flowLabourNodes = res.data || [];
});
},
},
};
</script>
<style scope>
.el-alert {
display: flex !important;
}
.el-alert--info.is-light {
background: cornflowerblue !important;
color: #ffffff !important;
}
.el-alert--info .el-alert__description {
color: #ffffff !important;
}
.el-steps--simple {
padding: 5px 5px !important;
}
.el-timeline-item {
padding-bottom: 0px !important;
}
.el-timeline {
padding-left: 5px !important;
padding-top: 20px !important;
}
.el-timeline-item__wrapper {
padding-left: 15px !important;
}
.el-timeline-item__content {
font-weight: 900;
}
.el-form-item {
margin-bottom: 15px !important;
}
</style>
<style lang="scss">
.flow-labour-drawer {
.drawer {
width: 100%;
height: 100%;
padding-left: 20px;
padding-right: 20px;
padding-bottom: 20px;
.drawerLeft {
width: 55%;
min-width: 280px;
height: 100%;
float: left;
border-right: 1px solid #dcdfe6;
overflow-y: scroll;
padding-right: 20px;
}
.drawerRight {
width: 45%;
min-width: 400px;
height: 100%;
float: left;
padding-left: 20px;
}
}
}
</style>

View File

@ -1,14 +1,13 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
<el-form-item label="所属项目" prop="projectId"> :model="queryParams"
<el-input ref="queryForm"
v-model="queryParams.projectId" size="small"
placeholder="请输入所属项目" :inline="true"
clearable v-show="showSearch"
@keyup.enter.native="handleQuery" label-width="68px"
/> >
</el-form-item>
<el-form-item label="项目名称" prop="projectName"> <el-form-item label="项目名称" prop="projectName">
<el-input <el-input
v-model="queryParams.projectName" v-model="queryParams.projectName"
@ -17,15 +16,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="总包单位" prop="deptId"> <el-form-item label="总包单位" prop="deptName">
<el-input
v-model="queryParams.deptId"
placeholder="请输入总包单位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="总包单位名称" prop="deptName">
<el-input <el-input
v-model="queryParams.deptName" v-model="queryParams.deptName"
placeholder="请输入总包单位名称" placeholder="请输入总包单位名称"
@ -33,15 +24,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="分包单位" prop="subDeptId"> <el-form-item label="分包单位" prop="subDeptName">
<el-input
v-model="queryParams.subDeptId"
placeholder="请输入分包单位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="分包单位名称" prop="subDeptName">
<el-input <el-input
v-model="queryParams.subDeptName" v-model="queryParams.subDeptName"
placeholder="请输入分包单位名称" placeholder="请输入分包单位名称"
@ -49,18 +32,18 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="劳工名称" prop="laborName"> <el-form-item label="投诉人" prop="laborName">
<el-input <el-input
v-model="queryParams.laborName" v-model="queryParams.laborName"
placeholder="请输入劳工名称" placeholder="请输入投诉人名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="身份证码" prop="laborCardid"> <el-form-item label="身份证号" prop="laborCardId">
<el-input <el-input
v-model="queryParams.laborCardid" v-model="queryParams.laborCardId"
placeholder="请输入身份证" placeholder="请输入身份证"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -73,22 +56,45 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="是否有效" prop="isDel"> <el-form-item
<el-input label="责任主体"
v-model="queryParams.isDel" prop="projectDeptId"
placeholder="请输入是否有效" v-hasPermi="['project:project:zgs']"
>
<el-select
v-model="queryParams.projectDeptId"
placeholder="请选择责任主体"
clearable clearable
@keyup.enter.native="handleQuery" >
/> <el-option
v-for="dict in projectDeptOptions"
:key="dict.deptId"
:label="dict.deptName"
:value="dict.deptId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="投诉时间">
<el-date-picker
v-model="daterangeDate"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
@ -119,7 +125,7 @@
@click="handleDelete" @click="handleDelete"
v-hasPermi="['flow:flowLabourInfo:remove']" v-hasPermi="['flow:flowLabourInfo:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -128,52 +134,72 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['flow:flowLabourInfo:export']" v-hasPermi="['flow:flowLabourInfo:export']"
>导出</el-button> >导出</el-button
>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="flowLabourInfoList" @selection-change="handleSelectionChange"> <el-tabs type="card" v-model="queryParams.activeName" @tab-click="getList">
<el-table-column type="selection" width="55" align="center" /> <el-tab-pane :label="tabs.all" name="all"></el-tab-pane>
<el-table-column label="主键" align="center" prop="id" /> <el-tab-pane :label="tabs.jxz" name="jxz"></el-tab-pane>
<el-table-column label="所属项目" align="center" prop="projectId" /> <el-tab-pane :label="tabs.ywc" name="ywc"></el-tab-pane
></el-tabs>
<el-table
v-loading="loading"
:data="flowLabourInfoList"
@selection-change="handleSelectionChange"
>
<el-table-column label="项目名称" align="center" prop="projectName" /> <el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="总包单位" align="center" prop="deptId" /> <el-table-column label="总包单位" align="center" prop="deptName" />
<el-table-column label="总包单位名称" align="center" prop="deptName" /> <el-table-column label="分包单位" align="center" prop="subDeptName" />
<el-table-column label="分包单位" align="center" prop="subDeptId" /> <el-table-column label="投诉人" align="center" prop="laborName" />
<el-table-column label="分包单位名称" align="center" prop="subDeptName" /> <el-table-column label="身份证号" align="center" prop="laborCardId" />
<el-table-column label="劳工名称" align="center" prop="laborName" />
<el-table-column label="身份证码" align="center" prop="laborCardid" />
<el-table-column label="联系电话" align="center" prop="laborPhone" /> <el-table-column label="联系电话" align="center" prop="laborPhone" />
<el-table-column label="欠薪人数" align="center" prop="laborNumber" /> <el-table-column label="欠薪人数" align="center" prop="laborNumber" />
<el-table-column label="欠薪金额" align="center" prop="laborAmount" /> <el-table-column label="欠薪金额" align="center" prop="laborAmount" />
<el-table-column label="欠薪原因说明" align="center" prop="laborReason" /> <el-table-column label="投诉进度" align="center" prop="approveStatus">
<el-table-column label="附件凭证" align="center" prop="files" /> <template slot-scope="scope">
<el-table-column label="审核状态" align="center" prop="approveStatus" /> <dict-tag
<el-table-column label="是否有效" align="center" prop="isDel" /> :options="dict.type.flow_labou_appstatus"
<el-table-column label="备注" align="center" prop="remark" /> :value="scope.row.approveStatus"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> />
</template>
</el-table-column>
<el-table-column label="是否有效" align="center" prop="isDel">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel" />
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="120"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-finished"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['flow:flowLabourInfo:edit']" v-hasPermi="['flow:flowLabourInfo:edit']"
>修改</el-button> >办理</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-c-scale-to-original"
@click="handleDelete(scope.row)" @click="handleDetail(scope.row)"
v-hasPermi="['flow:flowLabourInfo:remove']" v-hasPermi="['flow:flowLabourInfo:remove']"
>删除</el-button> >查看</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@ -220,7 +246,7 @@
<el-input v-model="form.laborReason" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.laborReason" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
<el-form-item label="附件凭证" prop="files"> <el-form-item label="附件凭证" prop="files">
<file-upload v-model="form.files"/> <file-upload v-model="form.files" />
</el-form-item> </el-form-item>
<el-form-item label="是否有效" prop="isDel"> <el-form-item label="是否有效" prop="isDel">
<el-input v-model="form.isDel" placeholder="请输入是否有效" /> <el-input v-model="form.isDel" placeholder="请输入是否有效" />
@ -234,14 +260,30 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<detailFlowLabourDrawer ref="detailFlowLabourDrawer"/>
<approveFlowLabourDrawer ref="approveFlowLabourDrawer" :closeCallBack="getList" />
</div> </div>
</template> </template>
<script> <script>
import { listFlowLabourInfo, getFlowLabourInfo, delFlowLabourInfo, addFlowLabourInfo, updateFlowLabourInfo } from "@/api/flow/flowLabourInfo"; import {
listFlowLabourInfo,
getFlowLabourInfo,
delFlowLabourInfo,
addFlowLabourInfo,
updateFlowLabourInfo,
findGroupCountByApprove,
} from "@/api/flow/flowLabourInfo";
import detailFlowLabourDrawer from "./detailFlowLabourDrawer.vue";
import approveFlowLabourDrawer from "./approveFlowLabourDrawer.vue";
export default { export default {
name: "FlowLabourInfo", name: "FlowLabourInfo",
components: {
detailFlowLabourDrawer,
approveFlowLabourDrawer,
},
dicts: ["sys_common_isdel", "flow_labou_appstatus"],
data() { data() {
return { return {
// //
@ -273,31 +315,58 @@ export default {
subDeptId: null, subDeptId: null,
subDeptName: null, subDeptName: null,
laborName: null, laborName: null,
laborCardid: null, laborCardId: null,
laborPhone: null, laborPhone: null,
approveStatus: null, approveStatus: null,
isDel: null, isDel: null,
projectDeptId: null,
activeName: "jxz",
}, },
// //
form: {}, form: {},
// //
rules: { rules: {},
} tabs: {
all: "全部数据0",
jxz: "进行中0",
ywc: "已完成0",
},
projectDeptOptions: [],
//
daterangeDate: [],
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.$api.publics.getZgsDeptList().then((d) => {
this.projectDeptOptions = d?.data || [];
});
}, },
methods: { methods: {
/** 查询劳资投诉列表 */ /** 查询劳资投诉列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listFlowLabourInfo(this.queryParams).then(response => { this.queryParams.params = {};
if (null != this.daterangeDate && "" != this.daterangeDate) {
this.queryParams.params["beginDate"] = this.daterangeDate[0];
this.queryParams.params["endDate"] = this.daterangeDate[1];
}
this.queryCount();
listFlowLabourInfo(this.queryParams).then((response) => {
this.flowLabourInfoList = response.rows; this.flowLabourInfoList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
queryCount() {
findGroupCountByApprove(this.queryParams).then((response) => {
if (response && response.data) {
this.tabs.jxz = "进行中(" + response.data.db + "";
this.tabs.ywc = "已完成(" + response.data.yb + "";
this.tabs.all = "全部数据(" + response.data.db + response.data.yb + "";
}
});
},
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -326,7 +395,7 @@ export default {
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
remark: null remark: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -337,14 +406,15 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.daterangeDate = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length!==1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
@ -354,26 +424,24 @@ export default {
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.$refs.approveFlowLabourDrawer.show(row);
const id = row.id || this.ids },
getFlowLabourInfo(id).then(response => { /** 详情查看 */
this.form = response.data; handleDetail(row){
this.open = true; this.$refs.detailFlowLabourDrawer.show(row);
this.title = "修改劳资投诉";
});
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
updateFlowLabourInfo(this.form).then(response => { updateFlowLabourInfo(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addFlowLabourInfo(this.form).then(response => { addFlowLabourInfo(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -385,19 +453,27 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除劳资投诉编号为"' + ids + '"的数据项?').then(function() { this.$modal
return delFlowLabourInfo(ids); .confirm('是否确认删除劳资投诉编号为"' + ids + '"的数据项?')
}).then(() => { .then(function () {
this.getList(); return delFlowLabourInfo(ids);
this.$modal.msgSuccess("删除成功"); })
}).catch(() => {}); .then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('flow/flowLabourInfo/export', { this.download(
...this.queryParams "flow/flowLabourInfo/export",
}, `flowLabourInfo_${new Date().getTime()}.xlsx`) {
} ...this.queryParams,
} },
`flowLabourInfo_${new Date().getTime()}.xlsx`
);
},
},
}; };
</script> </script>

View File

@ -242,9 +242,7 @@
:class=" :class="
item.approveStatus == '100' item.approveStatus == '100'
? 'inspect_shtg' ? 'inspect_shtg'
: item.approveStatus % 10 == 0 : 'inspect_shz'
? 'inspect_shz'
: 'inspect_shbh'
" "
> >
<div class="inspect_list_info_details"> <div class="inspect_list_info_details">
@ -285,7 +283,7 @@
@click="showDetail(item.id, index)" @click="showDetail(item.id, index)"
> >
<i class="el-icon-d-arrow-right"></i> <i class="el-icon-d-arrow-right"></i>
{{ nav == index ? "收起" : "展开" }}流程详细信息 {{ nav == index ? "收起" : "展开" }}处理详细信息
<i class="el-icon-d-arrow-left"></i> <i class="el-icon-d-arrow-left"></i>
</el-button> </el-button>
</div> </div>
@ -350,7 +348,7 @@ export default {
name: "labourComplaint", name: "labourComplaint",
data() { data() {
return { return {
state: "QUERY", state: "INIT",
// //
loading: false, loading: false,
display: true, display: true,

View File

@ -0,0 +1,91 @@
package com.ruoyi.web.flowable.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.yanzhu.jh.flow.domain.FlowLabourAuditNode;
import com.yanzhu.jh.flow.domain.FlowLabourInfo;
import com.yanzhu.jh.flow.service.IFlowLabourAuditNodeService;
import com.yanzhu.jh.flow.service.IFlowLabourInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @version : V1.0
* @ClassName: WcFlowLabourController
* @Description:
* @Auther: JiangYuQi
* @Date: 2024/04/20 18:03
*/
@RestController
@RequestMapping("/wechat/flow/flowLabour")
public class WcFlowLabourController extends BaseController {
@Autowired
private IFlowLabourInfoService flowLabourInfoService;
@Autowired
private IFlowLabourAuditNodeService flowLabourAuditNodeService;
/**
*
*/
@GetMapping("/list")
public TableDataInfo list(FlowLabourInfo flowLabourInfo)
{
if(flowLabourInfo.getDeptId()==0){
flowLabourInfo.setDeptId(null);
}
//启用分页
List<FlowLabourInfo> list = flowLabourInfoService.selectFlowLabourInfoList(flowLabourInfo);
return getDataTable(list);
}
/**
*
*/
@GetMapping("/findGroupCountByApprove")
public AjaxResult findGroupCountByApprove(FlowLabourInfo flowLabourInfo)
{
if(flowLabourInfo.getDeptId()==0){
flowLabourInfo.setDeptId(null);
}
//启用分页
return success(flowLabourInfoService.findGroupCountByApprove(flowLabourInfo));
}
/**
*
*/
@GetMapping("/findMyFlowLabourNodes/{flowId}")
public AjaxResult findMyFlowLabours(@PathVariable("flowId") Long flowId)
{
FlowLabourAuditNode flowLabourAuditNode = new FlowLabourAuditNode();
flowLabourAuditNode.setFlowId(flowId);
List<FlowLabourAuditNode> list = flowLabourAuditNodeService.selectFlowLabourAuditNodeList(flowLabourAuditNode);
return success(list);
}
/**
*
*/
@Log(title = "劳资投诉审批", businessType = BusinessType.UPDATE)
@PostMapping("/submitFlowLabour")
public AjaxResult submitFlowLabour(@RequestBody FlowLabourAuditNode flowLabourAuditNode)
{
return toAjax(flowLabourAuditNodeService.updateFlowLabourAuditNode(flowLabourAuditNode));
}
/**
*
*/
@GetMapping(value = "/info/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(flowLabourInfoService.selectFlowLabourInfoById(id));
}
}

View File

@ -9,7 +9,7 @@ ruoyi:
# 实例演示开关 # 实例演示开关
demoEnabled: true demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath # 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: D:/data/uploadPath profile: D:/data2/uploadPath
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: false addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证 # 验证码类型 math 数字计算 char 字符验证
@ -51,7 +51,7 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://cd-cynosdbmysql-grp-9rqrhxsm.sql.tencentcdb.com:27981/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8 url: jdbc:mysql://cd-cynosdbmysql-grp-9rqrhxsm.sql.tencentcdb.com:27981/yanzhu_jh_test?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
username: root username: root
password: Sxyanzhu@cf password: Sxyanzhu@cf
# 从库数据源 # 从库数据源

View File

@ -87,9 +87,10 @@ public class FlowLabourAuditNodeController extends BaseController
/** /**
* *
* flow:flowLabourInfo:edit
*/ */
@PreAuthorize("@ss.hasPermi('flow:flowLabourAuditNode:edit')") @PreAuthorize("@ss.hasPermi('flow:flowLabourInfo:edit')")
@Log(title = "劳资投诉审批节点", businessType = BusinessType.UPDATE) @Log(title = "劳资投诉审批", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody FlowLabourAuditNode flowLabourAuditNode) public AjaxResult edit(@RequestBody FlowLabourAuditNode flowLabourAuditNode)
{ {
@ -108,7 +109,7 @@ public class FlowLabourAuditNodeController extends BaseController
} }
/** /**
* *
*/ */
@Anonymous @Anonymous
@GetMapping("/findMyFlowLabourNodes/{flowId}") @GetMapping("/findMyFlowLabourNodes/{flowId}")

View File

@ -1,29 +1,25 @@
package com.yanzhu.jh.flow.controller; package com.yanzhu.jh.flow.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.annotation.Anonymous; import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.RateLimiter;
import com.ruoyi.common.enums.LimitType;
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.annotation.Log;
import com.ruoyi.common.annotation.RateLimiter;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.LimitType;
import com.ruoyi.common.enums.SysRoleEnum;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.service.ISysDeptService;
import com.yanzhu.jh.flow.domain.FlowLabourInfo; import com.yanzhu.jh.flow.domain.FlowLabourInfo;
import com.yanzhu.jh.flow.service.IFlowLabourInfoService; import com.yanzhu.jh.flow.service.IFlowLabourInfoService;
import com.ruoyi.common.utils.poi.ExcelUtil; import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.common.core.page.TableDataInfo; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/** /**
* Controller * Controller
@ -35,6 +31,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RequestMapping("/flow/flowLabourInfo") @RequestMapping("/flow/flowLabourInfo")
public class FlowLabourInfoController extends BaseController public class FlowLabourInfoController extends BaseController
{ {
@Autowired
private ISysDeptService sysDeptService;
@Autowired @Autowired
private IFlowLabourInfoService flowLabourInfoService; private IFlowLabourInfoService flowLabourInfoService;
@ -46,10 +45,34 @@ public class FlowLabourInfoController extends BaseController
public TableDataInfo list(FlowLabourInfo flowLabourInfo) public TableDataInfo list(FlowLabourInfo flowLabourInfo)
{ {
startPage(); startPage();
flowLabourInfo.setNowRole(Convert.toStr(getUserFirstRole()));
if(SysRoleEnum.ZGS.getCode().equals(flowLabourInfo.getNowRole())){
flowLabourInfo.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
}else{
flowLabourInfo.setNowDept(Convert.toStr(getDeptId()));
}
flowLabourInfo.setNowUser(Convert.toStr(getUserId()));
List<FlowLabourInfo> list = flowLabourInfoService.selectFlowLabourInfoList(flowLabourInfo); List<FlowLabourInfo> list = flowLabourInfoService.selectFlowLabourInfoList(flowLabourInfo);
return getDataTable(list); return getDataTable(list);
} }
/**
*
*/
@PreAuthorize("@ss.hasPermi('flow:flowLabourInfo:list')")
@GetMapping("/findGroupCountByApprove")
public AjaxResult findGroupCountByApprove(FlowLabourInfo flowLabourInfo)
{
flowLabourInfo.setNowRole(Convert.toStr(getUserFirstRole()));
if(SysRoleEnum.ZGS.getCode().equals(flowLabourInfo.getNowRole())){
flowLabourInfo.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
}else{
flowLabourInfo.setNowDept(Convert.toStr(getDeptId()));
}
flowLabourInfo.setNowUser(Convert.toStr(getUserId()));
return success(flowLabourInfoService.findGroupCountByApprove(flowLabourInfo));
}
/** /**
* *
*/ */
@ -85,7 +108,7 @@ public class FlowLabourInfoController extends BaseController
} }
/** /**
* *
*/ */
@Anonymous @Anonymous
@GetMapping("/findMyFlowLabours/{cardId}") @GetMapping("/findMyFlowLabours/{cardId}")
@ -119,4 +142,5 @@ public class FlowLabourInfoController extends BaseController
{ {
return toAjax(flowLabourInfoService.deleteFlowLabourInfoByIds(ids)); return toAjax(flowLabourInfoService.deleteFlowLabourInfoByIds(ids));
} }
} }

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.flow.mapper; package com.yanzhu.jh.flow.mapper;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yanzhu.jh.flow.domain.FlowLabourInfo; import com.yanzhu.jh.flow.domain.FlowLabourInfo;
/** /**
@ -27,6 +29,22 @@ public interface FlowLabourInfoMapper
*/ */
public List<FlowLabourInfo> selectFlowLabourInfoList(FlowLabourInfo flowLabourInfo); public List<FlowLabourInfo> selectFlowLabourInfoList(FlowLabourInfo flowLabourInfo);
/**
*
*
* @param flowLabourInfo
* @return
*/
public List<Map<String, Object>> findGroupCountByApprove(FlowLabourInfo flowLabourInfo);
/**
*
*
* @param flowLabourInfo
* @return
*/
public List<Map<String, Object>> findGroupCountByApproveTask(FlowLabourInfo flowLabourInfo);
/** /**
* *
* *

View File

@ -1,6 +1,7 @@
package com.yanzhu.jh.flow.service; package com.yanzhu.jh.flow.service;
import java.util.List; import java.util.List;
import java.util.Map;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.yanzhu.jh.flow.domain.FlowLabourInfo; import com.yanzhu.jh.flow.domain.FlowLabourInfo;
@ -29,6 +30,14 @@ public interface IFlowLabourInfoService
*/ */
public List<FlowLabourInfo> selectFlowLabourInfoList(FlowLabourInfo flowLabourInfo); public List<FlowLabourInfo> selectFlowLabourInfoList(FlowLabourInfo flowLabourInfo);
/**
*
*
* @param flowLabourInfo
* @return
*/
public Map<String, Object> findGroupCountByApprove(FlowLabourInfo flowLabourInfo);
/** /**
* *
* *

View File

@ -1,7 +1,12 @@
package com.yanzhu.jh.flow.service.impl; package com.yanzhu.jh.flow.service.impl;
import java.util.List; import java.util.List;
import java.util.Objects;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.yanzhu.jh.flow.domain.FlowLabourInfo;
import com.yanzhu.jh.flow.mapper.FlowLabourInfoMapper;
import com.yanzhu.jh.wxsetting.service.impl.WeChatMessageServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.yanzhu.jh.flow.mapper.FlowLabourAuditNodeMapper; import com.yanzhu.jh.flow.mapper.FlowLabourAuditNodeMapper;
@ -15,8 +20,11 @@ import com.ruoyi.common.utils.SecurityUtils;
* @date 2024-04-20 * @date 2024-04-20
*/ */
@Service @Service
public class FlowLabourAuditNodeServiceImpl implements IFlowLabourAuditNodeService public class FlowLabourAuditNodeServiceImpl extends WeChatMessageServiceImpl implements IFlowLabourAuditNodeService
{ {
@Autowired
private FlowLabourInfoMapper flowLabourInfoMapper;
@Autowired @Autowired
private FlowLabourAuditNodeMapper flowLabourAuditNodeMapper; private FlowLabourAuditNodeMapper flowLabourAuditNodeMapper;
@ -66,9 +74,62 @@ public class FlowLabourAuditNodeServiceImpl implements IFlowLabourAuditNodeServi
@Override @Override
public int updateFlowLabourAuditNode(FlowLabourAuditNode flowLabourAuditNode) public int updateFlowLabourAuditNode(FlowLabourAuditNode flowLabourAuditNode)
{ {
flowLabourAuditNode.setUpdateBy(SecurityUtils.getUsername()); //查询节点
flowLabourAuditNode.setUpdateTime(DateUtils.getNowDate()); FlowLabourInfo flowLabourInfo = flowLabourInfoMapper.selectFlowLabourInfoById(flowLabourAuditNode.getFlowId());
return flowLabourAuditNodeMapper.updateFlowLabourAuditNode(flowLabourAuditNode); if(Objects.equals(flowLabourInfo.getApproveStatus(),"100")){
throw new RuntimeException("数据异常...请刷新重试");
}
String approveStatus = flowLabourInfo.getApproveStatus();
String flowNode = flowLabourAuditNode.getFlowNode();
//总包审批
if(Objects.equals(flowLabourInfo.getApproveStatus(),"10") || Objects.equals(flowLabourInfo.getApproveStatus(),"21")){
//通过||驳回
if(Objects.equals(flowLabourAuditNode.getFlowResult(),"100")){
approveStatus = "20";
flowNode = "10";
}else{
approveStatus = "11";
flowNode = "11";
}
}
//甲代审批
else if(Objects.equals(flowLabourInfo.getApproveStatus(),"20") || Objects.equals(flowLabourInfo.getApproveStatus(),"31")){
//通过||驳回
if(Objects.equals(flowLabourAuditNode.getFlowResult(),"100")){
approveStatus = "30";
flowNode = "20";
}else{
approveStatus = "21";
flowNode = "21";
}
}
//集团公司审核
else if(Objects.equals(flowLabourInfo.getApproveStatus(),"30")){
//通过||驳回
if(Objects.equals(flowLabourAuditNode.getFlowResult(),"100")){
approveStatus = "100";
flowNode = "30";
}else{
approveStatus = "31";
flowNode = "31";
}
}
flowLabourInfo.setApproveStatus(approveStatus);
flowLabourAuditNode.setFlowNode(flowNode);
flowLabourInfo.setUpdateBy(SecurityUtils.getUsername());
flowLabourInfo.setUpdateTime(DateUtils.getNowDate());
int res = flowLabourInfoMapper.updateFlowLabourInfo(flowLabourInfo);
if(res>0){
flowLabourAuditNode.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
flowLabourAuditNode.setCreateTime(DateUtils.getNowDate());
flowLabourAuditNode.setUpdateBy(SecurityUtils.getUsername());
flowLabourAuditNode.setUpdateTime(DateUtils.getNowDate());
flowLabourAuditNodeMapper.insertFlowLabourAuditNode(flowLabourAuditNode);
//super.send(flowLabourInfo);
}
return res;
} }
/** /**

View File

@ -1,9 +1,12 @@
package com.yanzhu.jh.flow.service.impl; package com.yanzhu.jh.flow.service.impl;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.yanzhu.jh.flow.domain.FlowLabourAuditNode; import com.yanzhu.jh.flow.domain.FlowLabourAuditNode;
@ -50,9 +53,68 @@ public class FlowLabourInfoServiceImpl implements IFlowLabourInfoService
@Override @Override
public List<FlowLabourInfo> selectFlowLabourInfoList(FlowLabourInfo flowLabourInfo) public List<FlowLabourInfo> selectFlowLabourInfoList(FlowLabourInfo flowLabourInfo)
{ {
if(Convert.toInt(flowLabourInfo.getNowRole())>4){
//这里总包只能审批自己单位数据
flowLabourInfo.setDeptId(Convert.toLong(flowLabourInfo.getNowDept()));
}
return flowLabourInfoMapper.selectFlowLabourInfoList(flowLabourInfo); return flowLabourInfoMapper.selectFlowLabourInfoList(flowLabourInfo);
} }
/**
*
*
* @param flowLabourInfo
* @return
*/
@Override
public Map<String, Object> findGroupCountByApprove(FlowLabourInfo flowLabourInfo){
if(Convert.toInt(flowLabourInfo.getNowRole())>4){
//这里总包只能审批自己单位数据
flowLabourInfo.setDeptId(Convert.toLong(flowLabourInfo.getNowDept()));
}
List<Map<String, Object>> list = flowLabourInfoMapper.findGroupCountByApprove(flowLabourInfo);
int db=0,yb=0;
if(StringUtils.isNotEmpty(list)){
if(flowLabourInfo.getNowRole().equals("4")){
for(Map<String, Object> map:list){
if(map.get("approveStatus").equals("20") || map.get("approveStatus").equals("31")){
db+= Convert.toInt(map.get("total"));
}else{
yb+= Convert.toInt(map.get("total"));
}
}
}else if(flowLabourInfo.getNowRole().equals("5") || flowLabourInfo.getNowRole().equals("6") || flowLabourInfo.getNowRole().equals("7")){
for(Map<String, Object> map:list){
if(map.get("approveStatus").equals("10") || map.get("approveStatus").equals("21")){
db+= Convert.toInt(map.get("total"));
}else{
yb+= Convert.toInt(map.get("total"));
}
}
}else if(flowLabourInfo.getNowRole().equals("15") || flowLabourInfo.getNowRole().equals("16") || flowLabourInfo.getNowRole().equals("17")){
for(Map<String, Object> map:list){
if(map.get("approveStatus").equals("10") || map.get("approveStatus").equals("21")){
db+= Convert.toInt(map.get("total"));
}else{
yb+= Convert.toInt(map.get("total"));
}
}
}else if(flowLabourInfo.getNowRole().equals("1") || flowLabourInfo.getNowRole().equals("2") || flowLabourInfo.getNowRole().equals("3")){
for(Map<String, Object> map:list){
if(map.get("approveStatus").equals("100")){
yb+= Convert.toInt(map.get("total"));
}else{
db+= Convert.toInt(map.get("total"));
}
}
}
}
Map<String, Object> data = new HashMap<>();
data.put("db",db);
data.put("yb",yb);
return data;
}
/** /**
* *
* *

View File

@ -1,13 +1,17 @@
package com.yanzhu.jh.project.service.impl; package com.yanzhu.jh.project.service.impl;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.PublicStateEnum; import com.ruoyi.common.enums.PublicStateEnum;
import com.ruoyi.common.enums.SysRoleEnum;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.FlowTaskEntity; import com.ruoyi.system.domain.FlowTaskEntity;
import com.ruoyi.system.mapper.FlowBusinessKeyMapper; import com.ruoyi.system.mapper.FlowBusinessKeyMapper;
import com.yanzhu.jh.flow.domain.FlowLabourInfo;
import com.yanzhu.jh.flow.mapper.FlowLabourInfoMapper;
import com.yanzhu.jh.project.domain.*; import com.yanzhu.jh.project.domain.*;
import com.yanzhu.jh.project.mapper.*; import com.yanzhu.jh.project.mapper.*;
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify; import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
@ -47,6 +51,9 @@ public class SurProjectAuditinfoServiceImpl implements ISurProjectAuditinfoServi
@Autowired @Autowired
private SmzSspProblemmodifyMapper smzSspProblemmodifyMapper; private SmzSspProblemmodifyMapper smzSspProblemmodifyMapper;
@Autowired
private FlowLabourInfoMapper flowLabourInfoMapper;
/** /**
* *
* *
@ -199,6 +206,22 @@ public class SurProjectAuditinfoServiceImpl implements ISurProjectAuditinfoServi
dataMap.put("approveSCSL",b); dataMap.put("approveSCSL",b);
dataMap.put("approveJPYS",c); dataMap.put("approveJPYS",c);
dataMap.put("approveCLFY",d); dataMap.put("approveCLFY",d);
//查询劳资预警审批信息
FlowLabourInfo flowLabourInfo=new FlowLabourInfo();
flowLabourInfo.setNowRole(flowTaskEntity.getNowRole());
flowLabourInfo.setNowDept(flowTaskEntity.getNowDept());
flowLabourInfo.setNowUser(flowTaskEntity.getNowUser());
if(Convert.toInt(flowTaskEntity.getNowRole())>4){
//这里总包只能审批自己单位数据
flowLabourInfo.setDeptId(Convert.toLong(flowTaskEntity.getNowDept()));
}
flowLabourInfo.setActiveName("jxz");
List<Map<String, Object>> list = flowLabourInfoMapper.findGroupCountByApproveTask(flowLabourInfo);
if(StringUtils.isNotEmpty(list)){
dataMap.put("approveLZYJ",list.get(0).get("total"));
}else{
dataMap.put("approveLZYJ",0);
}
return dataMap; return dataMap;
} }

View File

@ -18,6 +18,7 @@ import com.ruoyi.system.mapper.SysDeptMapper;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.mapper.SysUserOpenidMapper; import com.ruoyi.system.mapper.SysUserOpenidMapper;
import com.ruoyi.system.service.ISysConfigService; import com.ruoyi.system.service.ISysConfigService;
import com.yanzhu.jh.flow.domain.FlowLabourInfo;
import com.yanzhu.jh.project.domain.*; import com.yanzhu.jh.project.domain.*;
import com.yanzhu.jh.project.mapper.SurProjectMapper; import com.yanzhu.jh.project.mapper.SurProjectMapper;
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify; import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
@ -586,6 +587,58 @@ public class WeChatMessageServiceImpl {
this.send(list,MessageTypeEnum.QYFSSP.getCode()+stateStr); this.send(list,MessageTypeEnum.QYFSSP.getCode()+stateStr);
} }
/**
*
* @param flowLabourInfo
*/
@Async
public void send(FlowLabourInfo flowLabourInfo){
List<WxMpTemplateMessage> list = new ArrayList<>();
String stateStr = flowLabourInfo.getApproveStatus();
if(Objects.equals("10",stateStr) || Objects.equals("21",stateStr)){
/**
*
*/
String supMsgId = this.getMsgProOrgUsers(flowLabourInfo.getProjectId());
//模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(supMsgId)
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_checkDetection/list/index?barProId="+flowLabourInfo.getProjectId()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", flowLabourInfo.getProjectName()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", MessageTypeEnum.LZYJSP.getName()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", Objects.equals("10",stateStr)?"待项目经理处理":"甲代驳回,待项目经理处理"));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
String subDeptName = flowLabourInfo.getSubDeptName().length()<14?flowLabourInfo.getSubDeptName():flowLabourInfo.getSubDeptName().substring(0,13);
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", flowLabourInfo.getLaborName()+"["+subDeptName+"]"));
list.add(templateMessage);
}else if(Objects.equals("20",stateStr) || Objects.equals("31",stateStr)){
/**
*
*
*/
String supMsgId = this.getMsgProMagUsers(flowLabourInfo.getProjectId());
//模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(supMsgId)
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_checkDetection/list/index?barProId="+flowLabourInfo.getProjectId()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", flowLabourInfo.getProjectName()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", MessageTypeEnum.LZYJSP.getName()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", Objects.equals("20",stateStr)?"待甲方代表审批":"甲代驳回,待甲方代表审批"));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
String subDeptName = flowLabourInfo.getSubDeptName().length()<14?flowLabourInfo.getSubDeptName():flowLabourInfo.getSubDeptName().substring(0,13);
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", flowLabourInfo.getLaborName()+"["+subDeptName+"]"));
list.add(templateMessage);
}else if(Objects.equals("30",stateStr)){
/**
*
*
*/
}
this.send(list,MessageTypeEnum.QYFSSP.getCode()+stateStr);
}
@Autowired @Autowired
private RedisCache redisCache; private RedisCache redisCache;
@ -612,6 +665,29 @@ public class WeChatMessageServiceImpl {
} }
} }
/**
*
* @param proId
* @return
*/
private String getMsgProOrgUsers(Long proId){
List<SysUserOpenid> list = redisCache.getCacheObject(CacheConstants.WX_MPMESSAGE_P_ORG +proId);
if(list!=null){
List<String> strs = list.stream().map(SysUserOpenid :: getMsgOpenId).collect(Collectors.toList());
return String.join(",",strs);
}else{
list = sysUserOpenidMapper.findMsgProOrgUsers(proId);
if(StringUtils.isNotEmpty(list)){
//设置30分钟有效期
redisCache.setCacheObject(CacheConstants.WX_MPMESSAGE_P_ORG +proId,list,30, TimeUnit.MINUTES);
List<String> strs = list.stream().map(SysUserOpenid :: getMsgOpenId).collect(Collectors.toList());
return String.join(",",strs);
}else{
return null;
}
}
}
/** /**
* *
* @param proId * @param proId

View File

@ -29,31 +29,121 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectFlowLabourInfoVo"> <sql id="selectFlowLabourInfoVo">
select id, project_id, project_name, dept_id, dept_name, sub_dept_id, sub_dept_name, labor_name, labor_cardId, labor_phone, labor_number, labor_amount, labor_reason, files, approve_status, is_del, create_by, create_time, update_by, update_time, remark from flow_labour_info select fl.id, fl.project_id, fl.project_name, fl.dept_id, fl.dept_name, fl.sub_dept_id, fl.sub_dept_name, fl.labor_name, fl.labor_cardId, fl.labor_phone, fl.labor_number, fl.labor_amount, fl.labor_reason, fl.files, fl.approve_status, fl.is_del, fl.create_by, fl.create_time, fl.update_by, fl.update_time, fl.remark from flow_labour_info fl
left join sur_project sp on sp.id = fl.project_id
</sql> </sql>
<select id="selectFlowLabourInfoList" parameterType="FlowLabourInfo" resultMap="FlowLabourInfoResult"> <select id="selectFlowLabourInfoList" parameterType="FlowLabourInfo" resultMap="FlowLabourInfoResult">
<include refid="selectFlowLabourInfoVo"/> <include refid="selectFlowLabourInfoVo"/>
<where> <where>
is_del=0 fl.is_del=0
<if test="projectId != null "> and project_id = #{projectId}</if> <if test="projectId != null "> and fl.project_id = #{projectId}</if>
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if> <if test="projectName != null and projectName != ''"> and fl.project_name like concat('%', #{projectName}, '%')</if>
<if test="deptId != null "> and dept_id = #{deptId}</if> <if test="deptId != null "> and fl.dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if> <if test="deptName != null and deptName != ''"> and fl.dept_name like concat('%', #{deptName}, '%')</if>
<if test="subDeptId != null "> and sub_dept_id = #{subDeptId}</if> <if test="subDeptId != null "> and fl.sub_dept_id = #{subDeptId}</if>
<if test="subDeptName != null and subDeptName != ''"> and sub_dept_name like concat('%', #{subDeptName}, '%')</if> <if test="subDeptName != null and subDeptName != ''"> and fl.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
<if test="laborName != null and laborName != ''"> and labor_name like concat('%', #{laborName}, '%')</if> <if test="laborName != null and laborName != ''"> and fl.labor_name like concat('%', #{laborName}, '%')</if>
<if test="laborCardId != null "> and labor_cardId like concat('%', #{laborCardId}, '%')</if> <if test="laborCardId != null "> and fl.labor_cardId like concat('%', #{laborCardId}, '%')</if>
<if test="laborPhone != null and laborPhone != ''"> and labor_phone = #{laborPhone}</if> <if test="laborPhone != null and laborPhone != ''"> and fl.labor_phone = #{laborPhone}</if>
<if test="approveStatus != null and approveStatus != ''"> and approve_status = #{approveStatus}</if> <if test="approveStatus != null and approveStatus != ''"> and fl.approve_status = #{approveStatus}</if>
<if test='activeName != null and activeName == "MyAwait"'> and approve_status != 100</if> <if test='activeName != null and activeName == "MyAwait"'> and fl.approve_status != 100</if>
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and date(fl.create_time) between #{params.beginDate} and #{params.endDate}</if>
<!-- 查询条件-项目部门 -->
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
<!--子部门数据-->
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'>
and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.job_type='24' and spui.del_flag=0 )
</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.del_flag=0 )</if>
<if test='activeName == "jxz"'>
<if test='nowRole == "4"'> and fl.approve_status in ('20','31')</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fl.approve_status in ('10','21')</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21')</if>
and fl.approve_status != '100'
</if>
<if test='activeName == "ywc"'>
<if test='nowRole == "4"'> and fl.approve_status in ('21','30','100')</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fl.approve_status in ('11','20','100')</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('11','20','100')</if>
</if>
</where> </where>
order by create_time desc order by fl.approve_status desc, fl.id asc
</select>
<select id="findGroupCountByApprove" parameterType="FlowLabourInfo" resultType="Map">
select fl.approve_status as approveStatus, count(1) as total from flow_labour_info fl
left join sur_project sp on sp.id = fl.project_id
<where>
fl.is_del=0
<if test="projectId != null "> and fl.project_id = #{projectId}</if>
<if test="projectName != null and projectName != ''"> and fl.project_name like concat('%', #{projectName}, '%')</if>
<if test="deptId != null "> and fl.dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and fl.dept_name like concat('%', #{deptName}, '%')</if>
<if test="subDeptId != null "> and fl.sub_dept_id = #{subDeptId}</if>
<if test="subDeptName != null and subDeptName != ''"> and fl.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
<if test="laborName != null and laborName != ''"> and fl.labor_name like concat('%', #{laborName}, '%')</if>
<if test="laborCardId != null "> and fl.labor_cardId like concat('%', #{laborCardId}, '%')</if>
<if test="laborPhone != null and laborPhone != ''"> and fl.labor_phone = #{laborPhone}</if>
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and date(fl.create_time) between #{params.beginDate} and #{params.endDate}</if>
<!-- 查询条件-项目部门 -->
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
<!--子部门数据-->
<if test='nowRole == "4"'> and fl.approve_status in ('20','31','30','100') and sp.deptId = #{nowDept}</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.job_type='24' and spui.del_flag=0 )</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.del_flag=0 )</if>
</where>
group by fl.approve_status
</select>
<select id="findGroupCountByApproveTask" parameterType="FlowLabourInfo" resultType="Map">
select fl.approve_status as approveStatus, count(1) as total from flow_labour_info fl
left join sur_project sp on sp.id = fl.project_id
<where>
fl.is_del=0
<if test="projectId != null "> and fl.project_id = #{projectId}</if>
<if test="projectName != null and projectName != ''"> and fl.project_name like concat('%', #{projectName}, '%')</if>
<if test="deptId != null "> and fl.dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and fl.dept_name like concat('%', #{deptName}, '%')</if>
<if test="subDeptId != null "> and fl.sub_dept_id = #{subDeptId}</if>
<if test="subDeptName != null and subDeptName != ''"> and fl.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
<if test="laborName != null and laborName != ''"> and fl.labor_name like concat('%', #{laborName}, '%')</if>
<if test="laborCardId != null "> and fl.labor_cardId like concat('%', #{laborCardId}, '%')</if>
<if test="laborPhone != null and laborPhone != ''"> and fl.labor_phone = #{laborPhone}</if>
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and date(fl.create_time) between #{params.beginDate} and #{params.endDate}</if>
<!-- 查询条件-项目部门 -->
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
<if test='nowRole == "1" or nowRole == "2" or nowRole == "3"'> and fl.approve_status in ('30')</if>
<!--子部门数据-->
<if test='nowRole == "4"'> and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='21' and spui.del_flag=0 )</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.job_type='24' and spui.del_flag=0 )</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.del_flag=0 )</if>
<if test='activeName == "jxz"'>
<if test='nowRole == "4"'> and fl.approve_status in ('20','31')</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fl.approve_status in ('10','21') </if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21') </if>
and fl.approve_status != '100'
</if>
<if test='activeName == "ywc"'>
<if test='nowRole == "4"'> and fl.approve_status in ('21','30','100')</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fl.approve_status in ('11','20','100')</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('11','20','100')</if>
</if>
</where>
group by fl.approve_status
</select> </select>
<select id="selectFlowLabourInfoById" parameterType="Long" resultMap="FlowLabourInfoResult"> <select id="selectFlowLabourInfoById" parameterType="Long" resultMap="FlowLabourInfoResult">
<include refid="selectFlowLabourInfoVo"/> <include refid="selectFlowLabourInfoVo"/>
where id = #{id} where fl.id = #{id}
</select> </select>
<insert id="insertFlowLabourInfo" parameterType="FlowLabourInfo" useGeneratedKeys="true" keyProperty="id"> <insert id="insertFlowLabourInfo" parameterType="FlowLabourInfo" useGeneratedKeys="true" keyProperty="id">