提交代码
parent
50e93eb810
commit
43800049e6
|
@ -407,6 +407,9 @@ export default {
|
|||
.el-form-item {
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
.el-step.is-simple .el-step__title{
|
||||
font-size:13px !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.flow-labour-drawer {
|
||||
|
|
|
@ -283,6 +283,9 @@ export default {
|
|||
.el-form-item {
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
.el-step.is-simple .el-step__title{
|
||||
font-size:13px !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.flow-labour-drawer {
|
||||
|
|
|
@ -179,6 +179,7 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="getApprove(scope.row)"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-finished"
|
||||
|
@ -327,22 +328,59 @@ export default {
|
|||
// 表单校验
|
||||
rules: {},
|
||||
tabs: {
|
||||
all: "全部数据(0)",
|
||||
all: "全部投诉(0)",
|
||||
jxz: "进行中(0)",
|
||||
ywc: "已完成(0)",
|
||||
},
|
||||
projectDeptOptions: [],
|
||||
// 投诉时间范围
|
||||
daterangeDate: [],
|
||||
myMinRoles: [],
|
||||
zbsp: false,
|
||||
jdsp: false,
|
||||
jtsp: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.myMinRoles = this.$store.getters.roles;
|
||||
if (this.myMinRoles.includes("lc_zbxmjl")) {
|
||||
this.zbsp = true;
|
||||
}
|
||||
if (this.myMinRoles.includes("lc_jfdb")) {
|
||||
this.jdsp = true;
|
||||
}
|
||||
if (this.myMinRoles.includes("admin") ||this.myMinRoles.includes("super") || this.myMinRoles.includes("jtgs")) {
|
||||
this.jtsp = true;
|
||||
}
|
||||
this.getList();
|
||||
this.$api.publics.getZgsDeptList().then((d) => {
|
||||
this.projectDeptOptions = d?.data || [];
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getApprove(row) {
|
||||
if (row.approveStatus == "100") {
|
||||
return false;
|
||||
} else if (row.approveStatus == "10" || row.approveStatus == "21") {
|
||||
if (this.zbsp || this.jtsp) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else if (row.approveStatus == "20" || row.approveStatus == "31") {
|
||||
if (this.jdsp || this.jtsp) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (this.jtsp) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
/** 查询劳资投诉列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
@ -361,9 +399,10 @@ export default {
|
|||
queryCount() {
|
||||
findGroupCountByApprove(this.queryParams).then((response) => {
|
||||
if (response && response.data) {
|
||||
let sum = parseInt(response.data.db) + parseInt(response.data.yb);
|
||||
this.tabs.jxz = "进行中(" + response.data.db + ")";
|
||||
this.tabs.ywc = "已完成(" + response.data.yb + ")";
|
||||
this.tabs.all = "全部数据(" + response.data.db + response.data.yb + ")";
|
||||
this.tabs.all = "全部投诉(" + sum + ")";
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -66,8 +66,9 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属劳务分包单位" prop="subDeptId" v-if="form.projectId">
|
||||
<el-select
|
||||
<el-form-item label="劳务分包单位名称" prop="subDeptName" v-if="form.projectId">
|
||||
<el-input v-model="form.subDeptName" placeholder="请输入劳务分包单位名称" />
|
||||
<!-- <el-select
|
||||
v-model="form.subDeptId"
|
||||
placeholder="请选择所属劳务分包单位"
|
||||
@change="subDeptChange"
|
||||
|
@ -80,7 +81,7 @@
|
|||
:value="item.unitId"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="欠薪人数" prop="laborNumber">
|
||||
<el-input
|
||||
|
@ -382,8 +383,9 @@ export default {
|
|||
],
|
||||
projectId: [{ required: true, message: "请选择所属项目单位", trigger: "blur" }],
|
||||
deptId: [{ required: true, message: "请选择所属总承包单位", trigger: "blur" }],
|
||||
subDeptId: [
|
||||
{ required: true, message: "请选择所属劳务分包单位", trigger: "blur" },
|
||||
subDeptName: [
|
||||
{ required: true, message: "请输入所属劳务分包单位名称", trigger: "blur" },
|
||||
{ max: 20, message: "最多输入20字符", trigger: "blur" },
|
||||
],
|
||||
laborNumber: [
|
||||
{ required: true, message: "请输入欠薪人数", trigger: "blur" },
|
||||
|
@ -435,9 +437,9 @@ export default {
|
|||
this.$api.publics.queryAllUnitList(v, 2).then((response) => {
|
||||
this.deptOptions = response.data || [];
|
||||
});
|
||||
this.$api.publics.queryAllUnitList(v, 3).then((response) => {
|
||||
this.subDeptOptions = response.data || [];
|
||||
});
|
||||
// this.$api.publics.queryAllUnitList(v, 3).then((response) => {
|
||||
// this.subDeptOptions = response.data || [];
|
||||
// });
|
||||
},
|
||||
deptChange(v) {
|
||||
this.deptOptions.forEach((option) => {
|
||||
|
|
|
@ -7,27 +7,35 @@ import com.ruoyi.common.core.page.PageDomain;
|
|||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.page.TableSupport;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.sign.Md5Utils;
|
||||
import com.ruoyi.flowable.service.IFlowBusinessKeyService;
|
||||
import com.ruoyi.system.domain.FlowTaskEntity;
|
||||
import com.yanzhu.jh.bigscreen.web.vo.FlowTypeMapper;
|
||||
import com.yanzhu.jh.flow.domain.FlowLabourInfo;
|
||||
import com.yanzhu.jh.flow.service.IFlowLabourInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/bgscreen/flow")
|
||||
public class FloweController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
IFlowBusinessKeyService flowBusinessKeyService;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
private IFlowLabourInfoService flowLabourInfoService;
|
||||
|
||||
@GetMapping("/groupByCategory")
|
||||
public AjaxResult groupByCategory(long deptId,long projectId){
|
||||
|
@ -208,4 +216,29 @@ public class FloweController extends BaseController {
|
|||
return AjaxResult.success(flowBusinessKeyService.selectFormDatasByProcInsId(procInsId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件统计劳资预警信息
|
||||
* JiangYuQi
|
||||
*/
|
||||
@GetMapping("/findFlowLabourGroupCountByApprove")
|
||||
public AjaxResult findFlowLabourGroupCountByApprove(long deptId,long projectId)
|
||||
{
|
||||
FlowLabourInfo where = new FlowLabourInfo();
|
||||
if(deptId<=0){
|
||||
if (SecurityUtils.isUserB()) {
|
||||
where.setNowRole(Convert.toStr(SecurityUtils.getRoleId()));
|
||||
where.setPrjIds(getProjectIds());
|
||||
}
|
||||
}
|
||||
String key="bgscreen_flow_findFlowLabourGroupCountByApprove_"+deptId+"_"+projectId+"_"+where.getProType()+"_"+Md5Utils.hash(where.getPrjIds());
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
return AjaxResult.success(obj);
|
||||
}
|
||||
where.setProjectDeptId(deptId<1?"":""+deptId);
|
||||
where.setProjectId(projectId<1?null:projectId);
|
||||
Map<String, Object> data = flowLabourInfoService.findFlowLabourGroupCountByApprove(where);
|
||||
redisCache.setCacheObject(key, data, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return success(data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,14 @@ public interface IFlowLabourInfoService
|
|||
*/
|
||||
public Map<String, Object> findGroupCountByApprove(FlowLabourInfo flowLabourInfo);
|
||||
|
||||
/**
|
||||
* 统计劳资投诉信息
|
||||
*
|
||||
* @param flowLabourInfo 劳资投诉
|
||||
* @return 劳资投诉集合
|
||||
*/
|
||||
public Map<String, Object> findFlowLabourGroupCountByApprove(FlowLabourInfo flowLabourInfo);
|
||||
|
||||
/**
|
||||
* 新增劳资投诉
|
||||
*
|
||||
|
|
|
@ -124,6 +124,35 @@ public class FlowLabourInfoServiceImpl implements IFlowLabourInfoService
|
|||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("db",db);
|
||||
data.put("yb",yb);
|
||||
data.put("all",db+yb);
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计劳资投诉信息
|
||||
*
|
||||
* @param flowLabourInfo 劳资投诉
|
||||
* @return 劳资投诉集合
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> findFlowLabourGroupCountByApprove(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;
|
||||
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);
|
||||
data.put("all",db+yb);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<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.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.is_del=0)</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','20','21','30','31','100') and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.is_del=0)</if>
|
||||
<if test='activeName == "jxz"'>
|
||||
<if test='nowRole == "4"'> and fl.approve_status in ('20','31')</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
|
@ -68,8 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<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 test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fl.approve_status in ('11','20','30','31','100')</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('11','20','30','31','100')</if>
|
||||
</if>
|
||||
</where>
|
||||
order by fl.approve_status desc, fl.id asc
|
||||
|
@ -92,11 +92,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<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="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and spc.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and fl.approve_status in ('20','31','30','100') and sp.deptId = #{nowDept}</if>
|
||||
<if test='nowRole == "4"'> and fl.approve_status in ('20','21','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.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.is_del=0)</if>
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fl.approve_status in ('10','20','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','20','21','30','31','100') and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.is_del=0)</if>
|
||||
</where>
|
||||
group by fl.approve_status
|
||||
</select>
|
||||
|
@ -122,8 +129,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='21' and spui.is_del=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.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.is_del=0 )</if>
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fl.approve_status in ('20','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','20','21','30','31','100') and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.is_del=0 )</if>
|
||||
<if test='activeName == "jxz"'>
|
||||
<if test='nowRole == "4"'> and fl.approve_status in ('20','31')</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
|
@ -134,8 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<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 test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fl.approve_status in ('11','20','30','31','100')</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('11','20','30','31','100')</if>
|
||||
</if>
|
||||
</where>
|
||||
group by fl.approve_status
|
||||
|
|
Loading…
Reference in New Issue