Commit f7f5456a authored by wanghao's avatar wanghao

1 第三方施工-项目档案-优化,具体项有

    逻辑部分不考虑 admin角色
    调整后去掉数据列表前多选框
    数据 倒序
    详情界面 分不同角色显示调整
    导出数据分不同角色显示
parent 2e18dcdb
......@@ -56,7 +56,7 @@ public class TConGasProInforController extends BaseController
@GetMapping("/export")
public AjaxResult export(TConGasProInfor tConGasProInfor)
{
List<TConGasProInfor> list = tConGasProInforService.selectTConGasProInforList(tConGasProInfor);
List<TConGasProInfor> list = tConGasProInforService.exportTConGasProInforList(tConGasProInfor);
ExcelUtil<TConGasProInfor> util = new ExcelUtil<TConGasProInfor>(TConGasProInfor.class);
return util.exportExcel(list, "第三方施工-涉气第三方施工项目档案数据");
}
......
package com.zehong.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.utils.DateUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
......@@ -21,6 +22,18 @@ public class TConGasProInfor extends BaseEntity
/** id */
private Long fConGasProInforId;
/** 燃气企业编码 */
private String fCompanyInfoId;
@Excel(name = "燃气企业")
private String companyInfoName;
/** 所属县级行政区ID */
private Long fDistrictId;
@Excel(name = "所属县级行政区")
private String districtName;
/** 项目编码,6位县级行政区划编码+4位年+4位顺序码 */
@Excel(name = "项目编码")
private String fProjectCode;
......@@ -45,9 +58,6 @@ public class TConGasProInfor extends BaseEntity
@Excel(name = "项目位置描述")
private String fAddress;
/** 所属县级行政区ID */
@Excel(name = "所属县级行政区ID")
private Long fDistrictId;
/** 经度 */
@Excel(name = "经度")
......@@ -59,10 +69,9 @@ public class TConGasProInfor extends BaseEntity
/** 涉气施工点位位置属性 1城镇,2 农村 */
@Excel(name = "涉气施工点位位置属性",readConverterExp = "1=城镇,2=农村")
private Long fConstructionPointType;
private String fConstructionPointType;
/** 涉及村,村级行政区ID */
@Excel(name = "涉及村,村级行政区ID")
private Long fVillageId;
/** 管道压力等级分类,按分类代码表14分类填写
......@@ -81,11 +90,11 @@ public class TConGasProInfor extends BaseEntity
/** 施工是否主动报备 1 是 0 否 */
@Excel(name = "施工是否主动报备",readConverterExp = "1=是,0=否")
private Long fReportFlag;
private String fReportFlag;
/** 施工状态,1 未开工,2 正在施工,3 已完工 */
@Excel(name = "施工状态",readConverterExp = "1=未开工,2=正在施工,3=已完工")
private Long fConstructionStatus;
private String fConstructionStatus;
/** 建设单位名称 */
@Excel(name = "建设单位名称")
......@@ -139,9 +148,6 @@ public class TConGasProInfor extends BaseEntity
@Excel(name = "监理单位总监理工程师电话")
private String fChiefEngineerPhone;
/** 燃气企业编码 */
@Excel(name = "燃气企业编码")
private String fCompanyInfoId;
/** 施工点位巡线员编码 */
@Excel(name = "施工点位巡线员编码")
......@@ -183,16 +189,17 @@ public class TConGasProInfor extends BaseEntity
private String fRemark;
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
@Excel(name = "最后修改时间")
private String fUpdateTime;
/**
* 企业端上传时间 */
@Excel(name = "上传时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date entUploadTime;
/**
* 企业端上传状态 0-未上传,1-已上传*/
@Excel(name = "上传状态",readConverterExp = "1=已上传,0=未上传")
private String entUploadState;
/**
......@@ -203,6 +210,16 @@ public class TConGasProInfor extends BaseEntity
/**
* 企业端上传状态 0-未上传,1-已上传*/
private String govUploadState;
public void updateFields() {
this.entUploadState = govUploadState;
if (govUploadTime != null) {
this.entUploadTime = govUploadTime;
} else {
this.entUploadTime = null;
}
}
public void setfConGasProInforId(Long fConGasProInforId)
{
this.fConGasProInforId = fConGasProInforId;
......@@ -293,12 +310,12 @@ public class TConGasProInfor extends BaseEntity
{
return fConstructionLatitude;
}
public void setfConstructionPointType(Long fConstructionPointType)
public void setfConstructionPointType(String fConstructionPointType)
{
this.fConstructionPointType = fConstructionPointType;
}
public Long getfConstructionPointType()
public String getfConstructionPointType()
{
return fConstructionPointType;
}
......@@ -320,21 +337,21 @@ public class TConGasProInfor extends BaseEntity
{
return fPipePress;
}
public void setfReportFlag(Long fReportFlag)
public void setfReportFlag(String fReportFlag)
{
this.fReportFlag = fReportFlag;
}
public Long getfReportFlag()
public String getfReportFlag()
{
return fReportFlag;
}
public void setfConstructionStatus(Long fConstructionStatus)
public void setfConstructionStatus(String fConstructionStatus)
{
this.fConstructionStatus = fConstructionStatus;
}
public Long getfConstructionStatus()
public String getfConstructionStatus()
{
return fConstructionStatus;
}
......@@ -596,6 +613,22 @@ public class TConGasProInfor extends BaseEntity
this.govUploadState = govUploadState;
}
public String getCompanyInfoName() {
return companyInfoName;
}
public void setCompanyInfoName(String companyInfoName) {
this.companyInfoName = companyInfoName;
}
public String getDistrictName() {
return districtName;
}
public void setDistrictName(String districtName) {
this.districtName = districtName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -29,6 +29,14 @@ public interface TConGasProInforMapper
*/
public List<TConGasProInfor> selectTConGasProInforList(TConGasProInfor tConGasProInfor);
/**
* 查询第三方施工-涉气第三方施工项目档案列表-导出用
*
* @param tConGasProInfor 第三方施工-涉气第三方施工项目档案
* @return 第三方施工-涉气第三方施工项目档案集合
*/
public List<TConGasProInfor> exportTConGasProInforList(TConGasProInfor tConGasProInfor);
/**
* 新增第三方施工-涉气第三方施工项目档案
*
......
......@@ -27,6 +27,14 @@ public interface ITConGasProInforService
*/
public List<TConGasProInfor> selectTConGasProInforList(TConGasProInfor tConGasProInfor);
/**
* 查询第三方施工-涉气第三方施工项目档案列表-导出用
*
* @param tConGasProInfor 第三方施工-涉气第三方施工项目档案
* @return 第三方施工-涉气第三方施工项目档案集合
*/
public List<TConGasProInfor> exportTConGasProInforList(TConGasProInfor tConGasProInfor);
/**
* 新增第三方施工-涉气第三方施工项目档案
*
......
......@@ -7,6 +7,7 @@ import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.*;
import com.zehong.system.domain.SysSetting;
import com.zehong.system.domain.TConGasProInfor;
import com.zehong.system.domain.TPipeOldPlanProcess;
import com.zehong.system.domain.vo.TConGasProInforVo;
import com.zehong.system.mapper.TConGasProInforMapper;
import com.zehong.system.service.ISysSettingService;
......@@ -24,6 +25,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 第三方施工-涉气第三方施工项目档案Service业务层处理
......@@ -77,6 +79,33 @@ public class TConGasProInforServiceImpl implements ITConGasProInforService
return tConGasProInforMapper.selectTConGasProInforList(tConGasProInfor);
}
/**
* 查询第三方施工-涉气第三方施工项目档案列表
*
* @param tConGasProInfor 第三方施工-涉气第三方施工项目档案
* @return 第三方施工-涉气第三方施工项目档案
*/
@Override
public List<TConGasProInfor> exportTConGasProInforList(TConGasProInfor tConGasProInfor)
{
LoginUser loginUser = SecurityUtils.getLoginUser();
// 如果是 政府端 则 把 govUploadState 赋值给 entUploadState, 把 govUploadTime 赋值给 entUploadTime
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
tConGasProInfor.setEntUploadState("1");
}
List<TConGasProInfor> tConGasProInfors = tConGasProInforMapper.exportTConGasProInforList(tConGasProInfor);
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
if(tConGasProInfors.size() > 0) {
return tConGasProInfors.stream().peek(TConGasProInfor::updateFields).collect(Collectors.toList());
}
}
return tConGasProInforMapper.exportTConGasProInforList(tConGasProInfor);
}
/**
* 新增第三方施工-涉气第三方施工项目档案
*
......
......@@ -56,6 +56,74 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select f_con_gas_pro_infor_id, f_project_code, f_project_no, f_project_name, f_construction_start, f_construction_end, f_address, f_district_id, f_construction_longitude, f_construction_latitude, f_construction_point_type, f_village_id, f_pipe_press, f_report_flag, f_construction_status, f_build_department, f_project_leader, f_project_leader_phone, f_industry, f_department_name, f_construct_department, f_build_project_leader_name, f_build_project_leader_phone, f_technical_leader_name, f_technical_leader_phone, f_supervision_unit_name, f_chief_engineer_name, f_chief_engineer_phone, f_company_info_id, f_patrol_safety_officer_no, f_partrol_safety_officer_name, f_patrol_safety_officer_phone, f_resident_safety_officer_no, f_resident_safety_officer_name, f_resident_safety_officer_phone, f_gas_company_station_no, f_gas_company_station_name, f_gas_company_station_phone, f_remark, f_update_time,f_ent_upload_time,f_ent_upload_state,f_gov_upload_time,f_gov_upload_state from t_con_gas_pro_infor
</sql>
<resultMap type="TConGasProInfor" id="TConGasProInforResultForExport">
<result property="fConGasProInforId" column="f_con_gas_pro_infor_id" />
<result property="fProjectCode" column="f_project_code" />
<result property="fProjectNo" column="f_project_no" />
<result property="fProjectName" column="f_project_name" />
<result property="fConstructionStart" column="f_construction_start" />
<result property="fConstructionEnd" column="f_construction_end" />
<result property="fAddress" column="f_address" />
<result property="fDistrictId" column="f_district_id" />
<result property="districtName" column="regionName" />
<result property="fConstructionLongitude" column="f_construction_longitude" />
<result property="fConstructionLatitude" column="f_construction_latitude" />
<result property="fConstructionPointType" column="f_construction_point_type" />
<result property="fVillageId" column="f_village_id" />
<result property="fPipePress" column="f_pipe_press" />
<result property="fReportFlag" column="f_report_flag" />
<result property="fConstructionStatus" column="f_construction_status" />
<result property="fBuildDepartment" column="f_build_department" />
<result property="fProjectLeader" column="f_project_leader" />
<result property="fProjectLeaderPhone" column="f_project_leader_phone" />
<result property="fIndustry" column="f_industry" />
<result property="fDepartmentName" column="f_department_name" />
<result property="fConstructDepartment" column="f_construct_department" />
<result property="fBuildProjectLeaderName" column="f_build_project_leader_name" />
<result property="fBuildProjectLeaderPhone" column="f_build_project_leader_phone" />
<result property="fTechnicalLeaderName" column="f_technical_leader_name" />
<result property="fTechnicalLeaderPhone" column="f_technical_leader_phone" />
<result property="fSupervisionUnitName" column="f_supervision_unit_name" />
<result property="fChiefEngineerName" column="f_chief_engineer_name" />
<result property="fChiefEngineerPhone" column="f_chief_engineer_phone" />
<result property="fCompanyInfoId" column="f_company_info_id" />
<result property="companyInfoName" column="enterpriseName" />
<result property="fPatrolSafetyOfficerNo" column="f_patrol_safety_officer_no" />
<result property="fPartrolSafetyOfficerName" column="f_partrol_safety_officer_name" />
<result property="fPatrolSafetyOfficerPhone" column="f_patrol_safety_officer_phone" />
<result property="fResidentSafetyOfficerNo" column="f_resident_safety_officer_no" />
<result property="fResidentSafetyOfficerName" column="f_resident_safety_officer_name" />
<result property="fResidentSafetyOfficerPhone" column="f_resident_safety_officer_phone" />
<result property="fGasCompanyStationNo" column="f_gas_company_station_no" />
<result property="fGasCompanyStationName" column="f_gas_company_station_name" />
<result property="fGasCompanyStationPhone" column="f_gas_company_station_phone" />
<result property="fRemark" column="f_remark" />
<result property="fUpdateTime" column="f_update_time" />
<result property="entUploadTime" column="f_ent_upload_time" />
<result property="entUploadState" column="f_ent_upload_state" />
<result property="govUploadTime" column="f_gov_upload_time" />
<result property="govUploadState" column="f_gov_upload_state" />
</resultMap>
<sql id="exprotTConGasProInforVo">
select f_con_gas_pro_infor_id, f_project_code, f_project_no, f_project_name, f_construction_start,
f_construction_end, f_address, f_district_id,
region.f_name as regionName,f_construction_longitude, f_construction_latitude,
f_construction_point_type, f_village_id, f_pipe_press, f_report_flag, f_construction_status,
f_build_department, f_project_leader, f_project_leader_phone, f_industry, f_department_name,
f_construct_department, f_build_project_leader_name, f_build_project_leader_phone,
f_technical_leader_name, f_technical_leader_phone, f_supervision_unit_name, f_chief_engineer_name,
f_chief_engineer_phone, f_company_info_id,
enterprise.enterprise_name as enterpriseName,f_patrol_safety_officer_no, f_partrol_safety_officer_name,
f_patrol_safety_officer_phone, f_resident_safety_officer_no, f_resident_safety_officer_name,
f_resident_safety_officer_phone, f_gas_company_station_no, f_gas_company_station_name,
f_gas_company_station_phone, f_remark, f_update_time,f_ent_upload_time,f_ent_upload_state,
f_gov_upload_time,f_gov_upload_state from t_con_gas_pro_infor gasInfo left join t_enterprise_info enterprise on gasInfo.f_company_info_id = enterprise.enterprise_id
left join t_county_level_region region on gasInfo.f_district_id = region.f_id
</sql>
<select id="selectTConGasProInforList" parameterType="TConGasProInfor" resultMap="TConGasProInforResult">
<include refid="selectTConGasProInforVo"/>
<where>
......@@ -68,7 +136,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by f_update_time desc
</select>
<select id="exportTConGasProInforList" parameterType="TConGasProInfor" resultMap="TConGasProInforResultForExport">
<include refid="exprotTConGasProInforVo"/>
<where>
<if test="fProjectCode != null and fProjectCode != ''"> and f_project_code like concat('%', #{fProjectCode}, '%')</if>
<if test="fProjectNo != null "> and f_project_no = #{fProjectNo}</if>
<if test="fProjectName != null and fProjectName != ''"> and f_project_name like concat('%', #{fProjectName}, '%')</if>
<if test="fPipePress != null and fPipePress != ''"> and f_pipe_press = #{fPipePress}</if>
<if test="entUploadState != null and entUploadState != ''"> and f_ent_upload_state = #{entUploadState}</if>
<if test="fCompanyInfoId != null and fCompanyInfoId != ''"> and f_company_info_id = #{fCompanyInfoId}</if>
</where>
order by f_update_time desc
</select>
<select id="selectTConGasProInforById" parameterType="Long" resultMap="TConGasProInforResult">
<include refid="selectTConGasProInforVo"/>
where f_con_gas_pro_infor_id = #{fConGasProInforId}
......
......@@ -646,7 +646,7 @@ export default {
},
handleReport(row){
// 如果是 超级管理员或者 企业,并且 企业端上传状态为0
if ((this.user.roleId == 5 || this.user.roleId == 1) && row.fUploadType == '0') {
if (this.user.roleId == 5 && row.fUploadType == '0') {
this.$confirm('是否确认上传老旧管网改造计划项目名称为"' + row.fProjectName + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -661,7 +661,7 @@ export default {
// 如果是 超级管理员或者 政府,并且 政府端上传状态为0
if ((this.user.roleId == 3 || this.user.roleId == 1) && row.govUploadState == '0') {
if (this.user.roleId == 3 && row.govUploadState == '0') {
this.$confirm('是否确认上传老旧管网改造计划项目名称为"' + row.fProjectName + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......
......@@ -59,8 +59,9 @@
</el-col>
<el-col :span="12">
<el-form-item label="涉气施工点位位置属性">
<span v-if="detailInfo.fConstructionPointType">{{ detailInfo.fConstructionPointType }}</span>
<el-form-item label="涉气施工点位位置属性">
<span v-if="detailInfo.fConstructionPointType == 1">城镇</span>
<span v-else-if="detailInfo.fConstructionPointType == 0">农村</span>
<span v-else>-</span>
</el-form-item>
</el-col>
......@@ -243,10 +244,22 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="更新时间">
<span v-if="detailInfo.fUpdateTime">{{ detailInfo.fUpdateTime }}</span>
<span v-else>-</span>
<el-form-item label="上传状态" >
<span>{{fUploadType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上传时间" >
<span>{{fUploadTime}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="this.$store.state.user.roleId == 3" label="企业端上传时间" >
<span>{{ detailInfo.entUploadTime }}</span>
</el-form-item>
</el-col>
</el-row>
......@@ -267,7 +280,9 @@
countyInfo: [],
enterpriseName:"",
detailInfo: {},
detailOpen: false
detailOpen: false,
fUploadType: "",
fUploadTime: null
}
},
created() {
......@@ -275,6 +290,34 @@
this.getEnterpriseLists();
},
methods:{
//根据不同角色显示不同字段
showUploadType() {
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadType = this.detailInfo.govUploadState
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.entUploadState
}
if (this.fUploadType == '0') {
this.fUploadType = "未上传"
}
if (this.fUploadType == '1') {
this.fUploadType = "已上传"
}
},
showUploadTime() {
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadTime = this.detailInfo.govUploadTime
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entUploadTime
}
},
//获取县级
getCountyInfo(){
getDefaultCountyList().then(res =>{
......@@ -306,6 +349,8 @@
if (companyInfoId != null) {
this.enterpriseName= this.beyondCompanyFormat(this.detailInfo);
}
this.showUploadType();
this.showUploadTime();
this.detailOpen = true;
}
})
......
......@@ -31,6 +31,14 @@
/>
</el-select>
</el-form-item>
<el-form-item label="上传状态" prop="fUploadType">
<el-select v-model="queryParams.fUploadType" placeholder="请选择上传状态" clearable size="small">
<el-option label="未上传" value="0" />
<el-option label="已上传" value="1" />
</el-select>
</el-form-item>
<el-form-item>
<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>
......@@ -45,7 +53,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5"
>新增</el-button>
</el-col>
<el-col :span="1.5">
......@@ -56,7 +64,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5"
>修改</el-button>
</el-col>
<el-col :span="1.5">
......@@ -67,7 +75,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5"
>删除</el-button>
</el-col>
<el-col :span="1.5">
......@@ -83,8 +91,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inforList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table v-loading="loading" :data="inforList" @selection-change="handleSelectionChange">
<el-table-column label="项目编码" align="center" prop="fProjectCode" />
<el-table-column label="外部工程编码" align="center" prop="fProjectNo" />
<el-table-column label="施工工程项目名称" align="center" prop="fProjectName" />
......@@ -114,14 +121,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5&&scope.row.entUploadState==0"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5&&scope.row.entUploadState==0"
>删除</el-button>
<el-button
size="mini"
......@@ -254,8 +261,8 @@
<el-col :span="12">
<el-form-item label="施工是否主动报备" prop="fReportFlag">
<el-select style="width: 100%" v-model="form.fReportFlag" placeholder="请选择施工是否主动报备">
<el-option label="是" value="1" />
<el-option label="否" value="0" />
<el-option label="是" value=1 />
<el-option label="否" value=0 />
</el-select>
</el-form-item>
</el-col>
......@@ -263,9 +270,9 @@
<el-col :span="12">
<el-form-item label="施工状态">
<el-select style="width: 100%" v-model="form.fConstructionStatus" placeholder="请选择施工状态">
<el-option label="未开工" value="1" />
<el-option label="正在施工" value="2" />
<el-option label="已完工" value="3" />
<el-option label="未开工" value='1' />
<el-option label="正在施工" value='2' />
<el-option label="已完工" value='3' />
</el-select>
</el-form-item>
</el-col>
......@@ -533,6 +540,7 @@ export default {
fProjectName: null,
fPipePress: null,
fCompanyInfoId: null,
fUploadType:null,
},
// 表单参数
form: {},
......@@ -619,8 +627,12 @@ export default {
// 企业查自己的数据
if (this.user.roleId == 5) {
this.queryParams.fCompanyInfoId = this.$store.state.user.enterpriseId
this.queryParams.entUploadState = this.queryParams.fUploadType;
}
console.log("this.queryParams = " + this.queryParams)
// 政府如果按照状态查的话,是查的 govUploadState
if (this.user.roleId == 3) {
this.queryParams.govUploadState = this.queryParams.fUploadType;
}
listInfor(this.queryParams).then(response => {
this.inforList = response.rows;
this.total = response.total;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment