提交代码

dev_xds
姜玉琦 2023-08-17 23:39:50 +08:00
parent 7353c8a0e2
commit a8494d1bd3
12 changed files with 278 additions and 16 deletions

View File

@ -9,6 +9,15 @@ export function listSspProblemmodify(query) {
})
}
// 查询质量整改统计
export function findGroupCount(query) {
return request({
url: '/trouble/sspProblemmodify/findGroupCount',
method: 'get',
params: query
})
}
// 查询质量整改详细
export function getSspProblemmodify(id) {
return request({
@ -42,6 +51,7 @@ export function delSspProblemmodify(id) {
method: 'delete'
})
}
//随手拍流程处理列表
export function auditinfoList(query) {
return request({

View File

@ -126,11 +126,11 @@
</el-row>-->
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部数据" name="all"></el-tab-pane>
<el-tab-pane label="待整改" name="dzg"></el-tab-pane>
<el-tab-pane label="待复检" name="dqr"></el-tab-pane>
<el-tab-pane label="整改完成" name="ycl"></el-tab-pane>
<el-tab-pane label="整改超时" name="zgcs"></el-tab-pane>
<el-tab-pane :label="tabs.all" name="all"></el-tab-pane>
<el-tab-pane :label="tabs.dzg" name="dzg"></el-tab-pane>
<el-tab-pane :label="tabs.dqr" name="dqr"></el-tab-pane>
<el-tab-pane :label="tabs.ycl" name="ycl"></el-tab-pane>
<el-tab-pane :label="tabs.zgcs" name="zgcs"></el-tab-pane>
<el-table
v-loading="loading"
:data="sspProblemmodifyList"
@ -221,10 +221,21 @@
<div>{{ scope.row.copySendUser }}</div>
</template>
</el-table-column>
<el-table-column label="提交用户" align="center" prop="createUser" width="100" />
<el-table-column label="提交时间" align="center" prop="createTime" width="135">
<el-table-column
label="提交用户"
align="left"
prop="createUser"
width="120"
show-overflow-tooltip
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{s}") }}</span>
<div>{{ scope.row.createBy }}</div>
<div>{{ scope.row.createUser }}</div>
</template>
</el-table-column>
<el-table-column label="提交时间" align="center" prop="createTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}</span>
</template>
</el-table-column>
<el-table-column
@ -388,6 +399,7 @@ import {
delSspProblemmodify,
addSspProblemmodify,
updateSspProblemmodify,
findGroupCount,
} from "@/api/trouble/sspProblemmodify";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import sspProblemmodifyAuditinfoDrawer from "../sspProblemmodify/sspProblemmodifyAuditinfoDrawer.vue";
@ -466,9 +478,17 @@ export default {
formData: {
problemmodifyId: null,
},
tabs: {
all: "全部数据0",
dzg: "待整改0",
dqr: "待复检0",
ycl: "整改完成0",
zgcs: "整改超时0",
},
};
},
created() {
this.queryParams.activeName = this.activeName;
this.getList();
this.$api.publics.getZgsDeptList().then((d) => {
this.depts = d?.data || [];
@ -494,12 +514,36 @@ export default {
this.queryParams.params["beginMarksTime"] = this.daterangeMarksTime[0];
this.queryParams.params["endMarksTime"] = this.daterangeMarksTime[1];
}
this.queryGroupCount();
listSspProblemmodify(this.queryParams).then((response) => {
this.sspProblemmodifyList = response.rows;
this.total = response.total;
this.loading = false;
});
},
queryGroupCount() {
findGroupCount(this.queryParams).then((response) => {
if (response && response.data) {
let sum = 0;
if (response.data.check0) {
sum += response.data.check0;
this.tabs.dzg = "待整改(" + response.data.check0 + "";
}
if (response.data.check1) {
sum += response.data.check1;
this.tabs.dqr = "待复检(" + response.data.check1 + "";
}
if (response.data.check4) {
sum += response.data.check4;
this.tabs.ycl = "整改完成(" + response.data.check4 + "";
}
this.tabs.all = "全部数据(" + sum + "";
if (response.data.check99) {
this.tabs.zgcs = "整改超时(" + response.data.check99 + "";
}
}
});
},
//
cancel() {
this.open = false;

View File

@ -126,11 +126,11 @@
</el-row>-->
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部数据" name="all"></el-tab-pane>
<el-tab-pane label="待整改" name="dzg"></el-tab-pane>
<el-tab-pane label="待复检" name="dqr"></el-tab-pane>
<el-tab-pane label="整改完成" name="ycl"></el-tab-pane>
<el-tab-pane label="整改超时" name="zgcs"></el-tab-pane>
<el-tab-pane :label="tabs.all" name="all"></el-tab-pane>
<el-tab-pane :label="tabs.dzg" name="dzg"></el-tab-pane>
<el-tab-pane :label="tabs.dqr" name="dqr"></el-tab-pane>
<el-tab-pane :label="tabs.ycl" name="ycl"></el-tab-pane>
<el-tab-pane :label="tabs.zgcs" name="zgcs"></el-tab-pane>
<el-table
v-loading="loading"
:data="sspProblemmodifyList"
@ -222,10 +222,21 @@
<div>{{ scope.row.copySendUser }}</div>
</template>
</el-table-column>
<el-table-column label="提交用户" align="center" prop="createUser" width="100" />
<el-table-column label="提交时间" align="center" prop="createTime" width="135">
<el-table-column
label="提交用户"
align="left"
prop="createUser"
width="120"
show-overflow-tooltip
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{s}") }}</span>
<div>{{ scope.row.createBy }}</div>
<div>{{ scope.row.createUser }}</div>
</template>
</el-table-column>
<el-table-column label="提交时间" align="center" prop="createTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}</span>
</template>
</el-table-column>
<el-table-column
@ -382,6 +393,7 @@ import {
delSspProblemmodify,
addSspProblemmodify,
updateSspProblemmodify,
findGroupCount,
} from "@/api/trouble/sspProblemmodify";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import sspProblemmodifyAuditinfoDrawer from "./sspProblemmodifyAuditinfoDrawer.vue";
@ -460,9 +472,17 @@ export default {
formData: {
problemmodifyId: null,
},
tabs: {
all: "全部数据0",
dzg: "待整改0",
dqr: "待复检0",
ycl: "整改完成0",
zgcs: "整改超时0",
},
};
},
created() {
this.queryParams.activeName = this.activeName;
this.getList();
this.$api.publics.getZgsDeptList().then((d) => {
this.depts = d?.data || [];
@ -488,12 +508,36 @@ export default {
this.queryParams.params["beginMarksTime"] = this.daterangeMarksTime[0];
this.queryParams.params["endMarksTime"] = this.daterangeMarksTime[1];
}
this.queryGroupCount();
listSspProblemmodify(this.queryParams).then((response) => {
this.sspProblemmodifyList = response.rows;
this.total = response.total;
this.loading = false;
});
},
queryGroupCount() {
findGroupCount(this.queryParams).then((response) => {
if (response && response.data) {
let sum = 0;
if (response.data.check0) {
sum += response.data.check0;
this.tabs.dzg = "待整改(" + response.data.check0 + "";
}
if (response.data.check1) {
sum += response.data.check1;
this.tabs.dqr = "待复检(" + response.data.check1 + "";
}
if (response.data.check4) {
sum += response.data.check4;
this.tabs.ycl = "整改完成(" + response.data.check4 + "";
}
this.tabs.all = "全部数据(" + sum + "";
if (response.data.check99) {
this.tabs.zgcs = "整改超时(" + response.data.check99 + "";
}
}
});
},
//
cancel() {
this.open = false;

View File

@ -2,6 +2,10 @@ package com.yanzhu.jh.project.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.SysRoleEnum;
import com.ruoyi.system.service.ISysDeptService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -34,6 +38,9 @@ public class SurProjectInsuranceController extends BaseController
@Autowired
private ISurProjectInsuranceService surProjectInsuranceService;
@Autowired
private ISysDeptService sysDeptService;
/**
*
*/
@ -42,6 +49,13 @@ public class SurProjectInsuranceController extends BaseController
public TableDataInfo list(SurProjectInsurance surProjectInsurance)
{
startPage();
surProjectInsurance.setNowRole(Convert.toStr(getUserFirstRole()));
if(SysRoleEnum.ZGS.getCode().equals(surProjectInsurance.getNowRole())){
surProjectInsurance.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
}else{
surProjectInsurance.setNowDept(Convert.toStr(getDeptId()));
}
surProjectInsurance.setNowUser(Convert.toStr(getUserId()));
List<SurProjectInsurance> list = surProjectInsuranceService.selectSurProjectInsuranceList(surProjectInsurance);
return getDataTable(list);
}

View File

@ -4,7 +4,10 @@ import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.SysRoleEnum;
import com.ruoyi.common.utils.file.ImageUtils;
import com.ruoyi.system.service.ISysDeptService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -37,6 +40,9 @@ public class SurProjectWorkAttendanceController extends BaseController
@Autowired
private ISurProjectWorkAttendanceService surProjectWorkAttendanceService;
@Autowired
private ISysDeptService sysDeptService;
/**
*
*/
@ -45,6 +51,13 @@ public class SurProjectWorkAttendanceController extends BaseController
public TableDataInfo list(SurProjectWorkAttendance surProjectWorkAttendance)
{
startPage();
surProjectWorkAttendance.setNowRole(Convert.toStr(getUserFirstRole()));
if(SysRoleEnum.ZGS.getCode().equals(surProjectWorkAttendance.getNowRole())){
surProjectWorkAttendance.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
}else{
surProjectWorkAttendance.setNowDept(Convert.toStr(getDeptId()));
}
surProjectWorkAttendance.setNowUser(Convert.toStr(getUserId()));
List<SurProjectWorkAttendance> list = surProjectWorkAttendanceService.selectSurProjectWorkAttendanceList(surProjectWorkAttendance);
return getDataTable(list);
}

View File

@ -65,6 +65,23 @@ public class SmzSspProblemmodifyController extends BaseController
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('trouble:sspProblemmodify:query')")
@GetMapping("/findGroupCount")
public AjaxResult findGroupCount(SmzSspProblemmodify smzSspProblemmodify)
{
smzSspProblemmodify.setNowRole(Convert.toStr(getUserFirstRole()));
if(SysRoleEnum.ZGS.getCode().equals(smzSspProblemmodify.getNowRole())){
smzSspProblemmodify.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
}else{
smzSspProblemmodify.setNowDept(Convert.toStr(getDeptId()));
}
smzSspProblemmodify.setNowUser(getLoginUser().getUsername());
return success(smzSspProblemmodifyService.findProblemmodifyGroupByCheckState(smzSspProblemmodify));
}
/**
*
*/

View File

@ -4,6 +4,7 @@ import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;
import java.util.List;
import java.util.Map;
/**
* Mapper
@ -29,6 +30,20 @@ public interface SmzSspProblemmodifyMapper
*/
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
/**
*
* @param smzSspProblemmodify
* @return List<Map<String, Integer>>
*/
public List<Map<String, Object>> findProblemmodifyGroupByCheckState(SmzSspProblemmodify smzSspProblemmodify);
/**
*
* @param smzSspProblemmodify
* @return Integer
*/
public Integer findProblemmodifyTimeoutCount(SmzSspProblemmodify smzSspProblemmodify);
/**
*
*
@ -92,4 +107,5 @@ public interface SmzSspProblemmodifyMapper
public List<SmzSspProblemmodify> groupByInfotypeCheckState(SmzSspProblemmodifyWhere where);
public int countTimeout(SmzSspProblemmodifyWhere where);
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.trouble.service;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;
@ -28,6 +30,13 @@ public interface ISmzSspProblemmodifyService
*/
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
/**
*
* @param smzSspProblemmodify
* @return List<Map<String, Integer>>
*/
public Map<String, Object> findProblemmodifyGroupByCheckState(SmzSspProblemmodify smzSspProblemmodify);
/**
*
*

View File

@ -1,6 +1,9 @@
package com.yanzhu.jh.trouble.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ruoyi.common.utils.DateUtils;
import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;
import org.springframework.beans.factory.annotation.Autowired;
@ -45,6 +48,24 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
return smzSspProblemmodifyMapper.selectSmzSspProblemmodifyList(smzSspProblemmodify);
}
/**
*
* @param smzSspProblemmodify
* @return List<Map<String, Integer>>
*/
@Override
public Map<String, Object> findProblemmodifyGroupByCheckState(SmzSspProblemmodify smzSspProblemmodify) {
List<Map<String, Object>> dataList = smzSspProblemmodifyMapper.findProblemmodifyGroupByCheckState(smzSspProblemmodify);
Map<String, Object> dataMap = new HashMap<>();
if(dataList!=null && dataList.size()>0){
for(Map<String, Object> map:dataList){
dataMap.put("check"+map.get("checkState"),map.get("total"));
}
dataMap.put("check99",smzSspProblemmodifyMapper.findProblemmodifyTimeoutCount(smzSspProblemmodify));
}
return dataMap;
}
/**
*
*

View File

@ -58,6 +58,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN sur_project_insurance spi ON spi.project_id = sp.id
AND spi.insurance_type = sdd.dict_value
AND spi.is_del = 0
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and sp.isDel=0
and spui.del_flag=0
@ -70,6 +74,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='insuranceState == "0"'>and spi.insurance_state IS NULL</if>
<if test='insuranceState == "1"'>and spi.insurance_state IS NOT NULL</if>
<if test="insuranceType != null and insuranceType != ''"> and spi.insurance_type = #{insuranceType}</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 spui.unitId = #{nowDept}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
</where>
ORDER BY
sp.projectSort,

View File

@ -47,6 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sur_project_work_attendance spwa
left join sur_project sp on sp.id=spwa.project_id
left join sys_dept d on d.dept_id=spwa.dept_id
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and spwa.is_del=0
<if test="projectId != null "> and spwa.project_id = #{projectId}</if>
@ -55,6 +59,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
<if test="params.beginWorkDate != null and params.beginWorkDate != '' and params.endWorkDate != null and params.endWorkDate != ''"> and spwa.work_date between #{params.beginWorkDate} and #{params.endWorkDate}</if>
<if test="workDate != null"> and DATE_FORMAT(spwa.work_date,'%Y-%m-%d')=DATE_FORMAT(#{workDate},'%Y-%m-%d')</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 spui.unitId = #{nowDept}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
</where>
</select>

View File

@ -52,6 +52,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
END AS v_del
from vw_smz_ssp_problemmodify_audit ssp
left join sur_project sp on ssp.projectId = sp.id
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<where>
and ssp.isDel=0
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
@ -94,6 +96,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by createTime desc
</select>
<!--根据状态分组查询-->
<select id="findProblemmodifyGroupByCheckState" parameterType="SmzSspProblemmodify" resultType="map">
SELECT ssp.checkState,COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
left join sur_project sp on ssp.projectId = sp.id
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
WHERE ssp.isDel=0
<if test="infoType !=null">and infoType=#{infoType}</if>
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
<if test="workParts != null and workParts != ''"> and ssp.workParts like concat('%', #{workParts}, '%')</if>
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
<if test="dangerType != null and dangerType != ''"> and ssp.danger_type = #{dangerType}</if>
<if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and ssp.createTime between #{params.beginMarksTime} and #{params.endMarksTime}</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 spui.unitId = #{nowDept}</if>
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser = #{nowUser} or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
GROUP BY checkState
</select>
<!--整改超时数-->
<select id="findProblemmodifyTimeoutCount" parameterType="SmzSspProblemmodify" resultType="Integer">
SELECT ssp.checkState,COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
left join sur_project sp on ssp.projectId = sp.id
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
WHERE ssp.isDel=0
and (date(NOW())<![CDATA[ > ]]> date(ssp.nickedTime) and (ssp.updateTime is null or date(ssp.updateTime) <![CDATA[ > ]]> date(ssp.nickedTime)))
<if test="infoType !=null">and infoType=#{infoType}</if>
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
<if test="workParts != null and workParts != ''"> and ssp.workParts like concat('%', #{workParts}, '%')</if>
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
<if test="dangerType != null and dangerType != ''"> and ssp.danger_type = #{dangerType}</if>
<if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and ssp.createTime between #{params.beginMarksTime} and #{params.endMarksTime}</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 spui.unitId = #{nowDept}</if>
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser = #{nowUser} or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
</select>
<select id="selectSmzSspProblemmodifyById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
<include refid="selectSmzSspProblemmodifyVo"/>