提交代码

dev_xds
姜玉琦 2024-03-24 23:39:50 +08:00
parent 77c2a74c25
commit 05b4938827
6 changed files with 98 additions and 3 deletions

View File

@ -0,0 +1,50 @@
package com.ruoyi.web.project.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.yanzhu.jh.work.domain.WorkFile;
import com.yanzhu.jh.work.service.IWorkFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @version : V1.0
* @ClassName: ProjectFilesController
* @Description:
* @Auther: JiangYuQi
* @Date: 2020/7/7 18:03
*/
@RestController
@RequestMapping("/wechat/projectFiles")
public class ProjectFilesController extends BaseController {
@Autowired
private IWorkFileService workFileService;
/**
*
* workFile
*/
@GetMapping("/list")
public AjaxResult list(WorkFile workFile)
{
return success(workFileService.selectWorkFileList(workFile));
}
/**
*
* @param workFile
* @return
*/
@GetMapping("/findCountByType")
public AjaxResult findCountByType(WorkFile workFile){
return success(workFileService.findCountByType(workFile));
}
}

View File

@ -3,6 +3,7 @@ package com.yanzhu.jh.work.mapper;
import com.yanzhu.jh.work.domain.WorkFile; import com.yanzhu.jh.work.domain.WorkFile;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Mapper * Mapper
@ -28,6 +29,14 @@ public interface WorkFileMapper
*/ */
public List<WorkFile> selectWorkFileList(WorkFile workFile); public List<WorkFile> selectWorkFileList(WorkFile workFile);
/**
*
*
* @param workFile
* @return
*/
public List<Map<String, Object>> findCountByType(WorkFile workFile);
/** /**
* *
* *

View File

@ -3,6 +3,7 @@ package com.yanzhu.jh.work.service;
import com.yanzhu.jh.work.domain.WorkFile; import com.yanzhu.jh.work.domain.WorkFile;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Service * Service
@ -28,6 +29,13 @@ public interface IWorkFileService
*/ */
public List<WorkFile> selectWorkFileList(WorkFile workFile); public List<WorkFile> selectWorkFileList(WorkFile workFile);
/**
*
*
* @param workFile
* @return
*/
public List<Map<String, Object>> findCountByType(WorkFile workFile);
/** /**
* *
* *

View File

@ -60,6 +60,16 @@ public class WorkFileServiceImpl implements IWorkFileService
return workFileMapper.selectWorkFileList(workFile); return workFileMapper.selectWorkFileList(workFile);
} }
/**
*
*
* @param workFile
* @return
*/
public List<Map<String, Object>> findCountByType(WorkFile workFile) {
return workFileMapper.findCountByType(workFile);
}
/** /**
* *
* *

View File

@ -56,9 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectSmzSspProblemmodifyList" parameterType="SmzSspProblemmodifyWhere" resultMap="SmzSspProblemmodifyResult"> <select id="selectSmzSspProblemmodifyList" parameterType="SmzSspProblemmodifyWhere" resultMap="SmzSspProblemmodifyResult">
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.createBy select ssp.id, ssp.projectId, ssp.infoType, sp.projectName as problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, su.nick_name as createBy
from vw_smz_ssp_problemmodify_audit ssp from vw_smz_ssp_problemmodify_audit ssp
left join sur_project sp on ssp.projectId = sp.id left join sur_project sp on ssp.projectId = sp.id
left join sys_user su ON su.phonenumber = ssp.createUser
<!--监理单位/总包公司/分包单位--> <!--监理单位/总包公司/分包单位-->
<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 == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<where> <where>
@ -87,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="startDate!=null">and DATE(ssp.createtime)>=DATE(#{startDate})</if> <if test="startDate!=null">and DATE(ssp.createtime)>=DATE(#{startDate})</if>
<if test="endDate!=null">and DATE(ssp.createtime) &lt;= DATE(#{endDate})</if> <if test="endDate!=null">and DATE(ssp.createtime) &lt;= DATE(#{endDate})</if>
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if> <if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
<if test="createBy != null and createBy != ''"> and (ssp.createUser like concat('%', #{createBy}, '%') or su.nick_name like concat('%', #{createBy}, '%'))</if>
<if test="createTime != null "> and ssp.createTime = #{createTime}</if> <if test="createTime != null "> and ssp.createTime = #{createTime}</if>
<if test="updateUser != null and updateUser != ''"> and ssp.updateUser = #{updateUser}</if> <if test="updateUser != null and updateUser != ''"> and ssp.updateUser = #{updateUser}</if>
<if test="updateTime != null "> and ssp.updateTime = #{updateTime}</if> <if test="updateTime != null "> and ssp.updateTime = #{updateTime}</if>
@ -113,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectWechatSmzSspProblemmodifyList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult"> <select id="selectWechatSmzSspProblemmodifyList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.problemType, su.nick_name as createBy, select ssp.id, ssp.projectId, ssp.infoType, sp.projectName as problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.problemType, su.nick_name as createBy,
case when ud.type_flag in (1,11) then sd.dept_name else ud.dept_name end as deptName, case when ud.type_flag in (1,11) then sd.dept_name else ud.dept_name end as deptName,
sdd.dict_label as danger_type_name, sdd.dict_label as danger_type_name,
case when ssp.recheckSendUser = #{nowUser} and ssp.checkState=1 then 0 case when ssp.recheckSendUser = #{nowUser} and ssp.checkState=1 then 0
@ -152,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="checkUserPhone != null and checkUserPhone != ''"> and ssp.checkUserPhone = #{checkUserPhone}</if> <if test="checkUserPhone != null and checkUserPhone != ''"> and ssp.checkUserPhone = #{checkUserPhone}</if>
<if test="isDel != null "> and ssp.isDel = #{isDel}</if> <if test="isDel != null "> and ssp.isDel = #{isDel}</if>
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if> <if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
<if test="createBy != null and createBy != ''"> and (ssp.createUser like concat('%', #{createBy}, '%') or su.nick_name like concat('%', #{createBy}, '%'))</if>
<if test="createTime != null "> and ssp.createTime = #{createTime}</if> <if test="createTime != null "> and ssp.createTime = #{createTime}</if>
<if test="updateUser != null and updateUser != ''"> and ssp.updateUser = #{updateUser}</if> <if test="updateUser != null and updateUser != ''"> and ssp.updateUser = #{updateUser}</if>
<if test="updateTime != null "> and ssp.updateTime = #{updateTime}</if> <if test="updateTime != null "> and ssp.updateTime = #{updateTime}</if>
@ -206,6 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="findProblemmodifyGroupByCheckState" parameterType="SmzSspProblemmodify" resultType="map"> <select id="findProblemmodifyGroupByCheckState" parameterType="SmzSspProblemmodify" resultType="map">
SELECT ssp.checkState,COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp SELECT ssp.checkState,COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
left join sur_project sp on ssp.projectId = sp.id left join sur_project sp on ssp.projectId = sp.id
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
<!--监理单位/总包公司/分包单位--> <!--监理单位/总包公司/分包单位-->
<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 == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
WHERE ssp.isDel=0 WHERE ssp.isDel=0
@ -216,6 +220,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</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="dangerType != null and dangerType != ''"> and ssp.danger_type = #{dangerType}</if>
<if test="lordSent != null and lordSent != ''"> and (ssp.lordSent like concat('%', #{lordSent}, '%') or ssp.lordSentUser like concat('%', #{lordSent}, '%'))</if> <if test="lordSent != null and lordSent != ''"> and (ssp.lordSent like concat('%', #{lordSent}, '%') or ssp.lordSentUser like concat('%', #{lordSent}, '%'))</if>
<if test="createBy != null and createBy != ''"> and (ssp.createUser like concat('%', #{createBy}, '%') or su.nick_name like concat('%', #{createBy}, '%'))</if>
<if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and date(ssp.createTime) between #{params.beginMarksTime} and #{params.endMarksTime}</if> <if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and date(ssp.createTime) between #{params.beginMarksTime} and #{params.endMarksTime}</if>
<!-- 查询条件-项目部门 --> <!-- 查询条件-项目部门 -->
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if> <if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
@ -236,6 +241,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="findProblemmodifyTimeoutCount" parameterType="SmzSspProblemmodify" resultType="Integer"> <select id="findProblemmodifyTimeoutCount" parameterType="SmzSspProblemmodify" resultType="Integer">
SELECT COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp SELECT COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
left join sur_project sp on ssp.projectId = sp.id left join sur_project sp on ssp.projectId = sp.id
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
<!--监理单位/总包公司/分包单位--> <!--监理单位/总包公司/分包单位-->
<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 == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
WHERE ssp.isDel=0 WHERE ssp.isDel=0
@ -243,6 +249,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and (date(NOW())<![CDATA[ > ]]> date(ssp.nickedTime) and (ssp.updateTime is null or date(ssp.updateTime) <![CDATA[ > ]]> date(ssp.nickedTime))) 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="infoType !=null">and infoType=#{infoType}</if>
<if test="lordSent != null and lordSent != ''"> and (ssp.lordSent like concat('%', #{lordSent}, '%') or ssp.lordSentUser like concat('%', #{lordSent}, '%'))</if> <if test="lordSent != null and lordSent != ''"> and (ssp.lordSent like concat('%', #{lordSent}, '%') or ssp.lordSentUser like concat('%', #{lordSent}, '%'))</if>
<if test="createBy != null and createBy != ''"> and (ssp.createUser like concat('%', #{createBy}, '%') or su.nick_name like concat('%', #{createBy}, '%'))</if>
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</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="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="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
@ -269,7 +276,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectSmzSspProblemmodifyInfoById" parameterType="Long" resultMap="SmzSspProblemmodifyResult"> <select id="selectSmzSspProblemmodifyInfoById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.problemType, su.nick_name as createBy, select ssp.id, ssp.projectId, ssp.infoType, sp.projectName as problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.problemType, su.nick_name as createBy,
case when ud.type_flag in (1,11) then concat(sd.dept_name,' ', '[责任主体]') else concat(ud.dept_name, ' ', '[', sdd3.dict_label ,']') end as deptName, case when ud.type_flag in (1,11) then concat(sd.dept_name,' ', '[责任主体]') else concat(ud.dept_name, ' ', '[', sdd3.dict_label ,']') end as deptName,
IFNULL(sdd1.dict_label,sdd2.dict_label) as danger_type_name, IFNULL(sdd1.dict_label,sdd2.dict_label) as danger_type_name,
su.nick_name as createUserName su.nick_name as createUserName

View File

@ -42,6 +42,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by create_time desc order by create_time desc
</select> </select>
<select id="findCountByType" parameterType="WorkFile" resultType="map">
select file_belong as fileBelong,count(1) as total from work_file
<where>
<if test="isDel != null "> and is_del = #{isDel}</if>
<if test="deptId != null and deptId>0"> and dept_id = #{deptId}</if>
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
<if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and create_time between #{params.beginMarksTime} and #{params.endMarksTime}</if>
</where>
group by file_belong
</select>
<select id="selectWorkFileListLimit20" parameterType="WorkFile" resultMap="WorkFileResult"> <select id="selectWorkFileListLimit20" parameterType="WorkFile" resultMap="WorkFileResult">
<include refid="selectWorkFileVo"/> <include refid="selectWorkFileVo"/>
<where> <where>