dev_xds
姜玉琦 2023-08-20 16:44:59 +08:00
parent ff14675b64
commit fd2b3b66f5
8 changed files with 184 additions and 33 deletions

View File

@ -24,14 +24,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工序部位" prop="checkWorkingPosition">
<el-input
v-model="queryParams.checkWorkingPosition"
placeholder="请输入工序部位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="质量专员" prop="qualityUser">
<el-input
v-model="queryParams.qualityUser"
@ -48,6 +41,25 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="验收时间">
<el-date-picker
v-model="daterangeCheckingDate"
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 label="工序部位" prop="checkWorkingPosition">
<el-input
v-model="queryParams.checkWorkingPosition"
placeholder="请输入工序部位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="验收结果" prop="checkResult">
<el-select
v-model="queryParams.checkResult"
@ -62,17 +74,6 @@
/>
</el-select>
</el-form-item>
<el-form-item label="验收时间">
<el-date-picker
v-model="daterangeCheckingDate"
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-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
>搜索</el-button

View File

@ -273,7 +273,10 @@
<el-input v-model="form.insuranceNumber" placeholder="请输入保保单号" />
</el-form-item>
<el-form-item label="保险合同" prop="insuranceFile">
<file-upload v-model="form.insuranceFile" />
<file-upload
v-model="form.insuranceFile"
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />

View File

@ -140,7 +140,11 @@
<el-input v-model="form.insuranceNumber" placeholder="请输入保险单号" />
</el-form-item>
<el-form-item label="保险合同" prop="insuranceFile">
<file-upload v-model="form.insuranceFile" :limit="1" :fileType="['pdf']" />
<file-upload
v-model="form.insuranceFile"
:limit="1"
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="form.remark" placeholder="请输入备注" />

View File

@ -1,10 +1,11 @@
package com.yanzhu.jh.bigscreen.web.controller;
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.core.text.Convert;
import com.yanzhu.jh.project.domain.SurProjectInsurance;
import com.yanzhu.jh.project.domain.SurProjectChecking;
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
import com.yanzhu.jh.project.service.ISurProjectInsuranceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -15,26 +16,44 @@ import org.springframework.web.bind.annotation.RestController;
*/
@RestController
@RequestMapping("/bgscreen/projectChecking")
public class ProjectCheckingController {
public class ProjectCheckingController extends BaseController {
@Autowired
private ISurProjectCheckingService surProjectCheckingService;
/**
*
*
* @param deptId
* @param projectId
* @return
*/
@GetMapping("/getProjectInsuranceList")
public TableDataInfo getProjectInsuranceList(String deptId, String projectId){
SurProjectInsurance surProjectInsurance = new SurProjectInsurance();
@GetMapping("/getProjectCheckingList")
public TableDataInfo getProjectCheckingList(String deptId, String projectId){
SurProjectChecking surProjectChecking = new SurProjectChecking();
if(deptId!=null && !"0".equals(deptId)){
surProjectInsurance.setNowDept(deptId);
surProjectChecking.setProjectDeptId(deptId);
}
if(projectId!=null && !"0".equals(projectId)){
surProjectInsurance.setProjectId(Convert.toLong(projectId));
surProjectChecking.setProjectId(Convert.toLong(projectId));
}
return getDataTable(surProjectInsuranceService.selectBgscreenInsuranceList(surProjectInsurance));
return getDataTable(surProjectCheckingService.selectBgscreenProjectCheckingList(surProjectChecking));
}
/**
*
* @param deptId
* @param projectId
* @return
*/
@GetMapping("/getProjectCheckingView")
public AjaxResult getProjectCheckingView(String deptId, String projectId){
SurProjectChecking surProjectChecking = new SurProjectChecking();
if(deptId!=null && !"0".equals(deptId)){
surProjectChecking.setProjectDeptId(deptId);
}
if(projectId!=null && !"0".equals(projectId)){
surProjectChecking.setProjectId(Convert.toLong(projectId));
}
return success(surProjectCheckingService.selectBgscreenProjectCheckingView(surProjectChecking));
}
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.project.mapper;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.project.domain.SurProjectChecking;
/**
@ -27,6 +29,22 @@ public interface SurProjectCheckingMapper
*/
public List<SurProjectChecking> selectSurProjectCheckingList(SurProjectChecking surProjectChecking);
/**
*
*
* @param surProjectChecking
* @return
*/
public List<SurProjectChecking> selectBgscreenProjectCheckingList(SurProjectChecking surProjectChecking);
/**
*
*
* @param surProjectChecking
* @return
*/
public List<Map<String, Object>> selectBgscreenProjectCheckingView(SurProjectChecking surProjectChecking);
/**
*
*

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.project.service;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.project.domain.SurProjectChecking;
/**
@ -27,6 +29,22 @@ public interface ISurProjectCheckingService
*/
public List<SurProjectChecking> selectSurProjectCheckingList(SurProjectChecking surProjectChecking);
/**
*
*
* @param surProjectChecking
* @return
*/
public List<SurProjectChecking> selectBgscreenProjectCheckingList(SurProjectChecking surProjectChecking);
/**
*
*
* @param surProjectChecking
* @return
*/
public Map<String, Object> selectBgscreenProjectCheckingView(SurProjectChecking surProjectChecking);
/**
*
*

View File

@ -1,7 +1,9 @@
package com.yanzhu.jh.project.service.impl;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.PublicStateEnum;
@ -48,6 +50,41 @@ public class SurProjectCheckingServiceImpl implements ISurProjectCheckingService
return surProjectCheckingMapper.selectSurProjectCheckingList(surProjectChecking);
}
/**
*
*
* @param surProjectChecking
* @return
*/
@Override
public List<SurProjectChecking> selectBgscreenProjectCheckingList(SurProjectChecking surProjectChecking) {
return surProjectCheckingMapper.selectBgscreenProjectCheckingList(surProjectChecking);
}
/**
*
*
* @param surProjectChecking
* @return
*/
@Override
public Map<String, Object> selectBgscreenProjectCheckingView(SurProjectChecking surProjectChecking) {
List<Map<String, Object>> list = surProjectCheckingMapper.selectBgscreenProjectCheckingView(surProjectChecking);
Map<String, Object> dataMap = new HashMap<>();
int sum=0;
int okSum=0;
for(Map<String, Object> map:list){
sum += Convert.toInt(map.get("total"));
//"1"为验收合格
if("1".equals(map.get("check_result").toString())){
okSum+=Convert.toInt(map.get("total"));
}
}
dataMap.put("sum",sum);//验收数
dataMap.put("okSum",Math.floor(okSum/sum));//合格率
return dataMap;
}
/**
*
*

View File

@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and is_del=0
and spc.is_del=0
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
<if test="deptId != null "> and spc.dept_id = #{deptId}</if>
@ -77,7 +77,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by checking_date desc
</select>
<select id="selectBgscreenProjectCheckingList" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, sp.projectName, sd.dept_name from sur_project_checking spc
left join sur_project sp on spc.project_id = sp.id
left join sys_dept sd on sd.dept_id = spc.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 spc.is_del=0
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
<if test="deptId != null "> and spc.dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
<if test="groupDeptId != null "> and spc.group_dept_id = #{groupDeptId}</if>
<if test="checkType != null and checkType != ''"> and spc.check_type = #{checkType}</if>
<if test="workingPositionType != null and workingPositionType != ''"> and spc.working_position_type = #{workingPositionType}</if>
<if test="checkWorkingPosition != null and checkWorkingPosition != ''"> and spc.check_working_position like concat('%', #{checkWorkingPosition}, '%')</if>
<if test="checkResult != null and checkResult != ''"> and spc.check_result = #{checkResult}</if>
<if test="qualityUser != null and qualityUser != ''"> and (spc.quality_user like concat('%', #{qualityUser}, '%') or spc.quality_user_name like concat('%', #{qualityUser}, '%'))</if>
<if test="qualityUserName != null and qualityUserName != ''"> and spc.quality_user_name like concat('%', #{qualityUserName}, '%')</if>
<if test="superviseUser != null and superviseUser != ''"> and (spc.supervise_user like concat('%', #{superviseUser}, '%') or spc.supervise_user_name like concat('%', #{superviseUser}, '%'))</if>
<if test="superviseUserName != null and superviseUserName != ''"> and spc.supervise_user_name like concat('%', #{superviseUserName}, '%')</if>
<if test="groupDeptUser != null and groupDeptUser != ''"> and spc.group_dept_user like concat('%', #{groupDeptUser}, '%')</if>
<if test="groupDeptUserName != null and groupDeptUserName != ''"> and spc.group_dept_user_name like concat('%', #{groupDeptUserName}, '%')</if>
<if test="params.beginCheckingDate != null and params.beginCheckingDate != '' and params.endCheckingDate != null and params.endCheckingDate != ''"> and spc.checking_date between #{params.beginCheckingDate} and #{params.endCheckingDate}</if>
<if test="isDel != null "> and spc.is_del = #{isDel}</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 checking_date desc
limit 0,10
</select>
<select id="selectBgscreenProjectCheckingView" parameterType="SurProjectChecking" resultType="map">
select spc.check_result, count(spc.id) as total from sur_project_checking spc
left join sur_project sp on spc.project_id = sp.id
<where>
and spc.is_del=0
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
</where>
group by check_result
</select>
<select id="selectSurProjectCheckingById" parameterType="Long" resultMap="SurProjectCheckingResult">
<include refid="selectSurProjectCheckingVo"/>
where id = #{id}