Commit 6f0c3f35 authored by wanghao's avatar wanghao

1 老旧管网,供需平衡,第三方施工 不同角色查询 和 导出,显示 不同的 上报省厅状态,上报省厅时间 和 上报状态,上报时间 调整。

2 测试-供需平衡-日用气量上报条件搜索 报错 bug修复。
parent c58dfda2
......@@ -3,6 +3,7 @@ package com.zehong.web.controller.supplybalance;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
......@@ -86,23 +87,32 @@ public class TSupBalGasSupController extends BaseController
@Log(title = "供需平衡-气量监管", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSupBalGasSup tSupBalGasSup){
if("-2".equals(SecurityUtils.getLoginUser().getUser().getDeptId())){
LoginUser loginUser = SecurityUtils.getLoginUser();
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
tSupBalGasSup.setfRepStatus("1");
}
List<TSupBalGasSup> list = tSupBalGasSupService.selectTSupBalGasSupList(tSupBalGasSup);
ExcelUtil<TSupBalGasSup> util = new ExcelUtil<>(TSupBalGasSup.class);
if("-2".equals(SecurityUtils.getLoginUser().getUser().getDeptId())){
List<String> columns = new ArrayList<>();
columns.add("fRepStatus");
columns.add("fRepDate");
util.hideColumns(util.clazz,columns);
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
// List<String> columns = new ArrayList<>();
// columns.add("fRepStatus");
// columns.add("fRepDate");
// util.hideColumns(util.clazz,columns);
ExcelUtil.hiddencolumns.add(6);
ExcelUtil.hiddencolumns.add(7);
}else{
List<String> columns = new ArrayList<>();
columns.add("fGovUploadStatus");
columns.add("fGovUploadTime");
util.hideColumns(util.clazz,columns);
// List<String> columns = new ArrayList<>();
// columns.add("fGovUploadStatus");
// columns.add("fGovUploadTime");
// util.hideColumns(util.clazz,columns);
ExcelUtil.hiddencolumns.add(9);
ExcelUtil.hiddencolumns.add(10);
}
return util.exportExcel(list, "供需平衡-气量监管数据");
AjaxResult ajaxResult = util.exportExcel(list, "供需平衡-气量监管数据");
ExcelUtil.hiddencolumns.clear();
return ajaxResult;
}
/**
......
......@@ -3,6 +3,7 @@ package com.zehong.web.controller.supplybalance;
import java.util.ArrayList;
import java.util.List;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -59,25 +60,32 @@ public class TSupBalStopSupController extends BaseController
@GetMapping("/export")
public AjaxResult export(TSupBalStopSup tSupBalStopSup)
{
if(!"-2".equals(SecurityUtils.getLoginUser().getUser().getDeptId())){
LoginUser loginUser = SecurityUtils.getLoginUser();
if(loginUser.getUser().getRoles().get(0).getRoleId()==5){
tSupBalStopSup.setfCompanyInfoId(SecurityUtils.getLoginUser().getUser().getDeptId());
}else{
tSupBalStopSup.setfRepStatus("1");
}
List<TSupBalStopSup> list = tSupBalStopSupService.selectTSupBalStopSupList(tSupBalStopSup);
ExcelUtil<TSupBalStopSup> util = new ExcelUtil<TSupBalStopSup>(TSupBalStopSup.class);
if("-2".equals(SecurityUtils.getLoginUser().getUser().getDeptId())){
List<String> columns = new ArrayList<>();
columns.add("fRepStatus");
columns.add("entRepTime");
util.hideColumns(util.clazz,columns);
if(loginUser.getUser().getRoles().get(0).getRoleId()==5){
// List<String> columns = new ArrayList<>();
// columns.add("fRepStatus");
// columns.add("entRepTime");
// util.hideColumns(util.clazz,columns);
ExcelUtil.hiddencolumns.add(12);
ExcelUtil.hiddencolumns.add(13);
}else{
List<String> columns = new ArrayList<>();
columns.add("fGovUploadStatus");
columns.add("fGovUploadTime");
util.hideColumns(util.clazz,columns);
// List<String> columns = new ArrayList<>();
// columns.add("fGovUploadStatus");
// columns.add("fGovUploadTime");
// util.hideColumns(util.clazz,columns);
ExcelUtil.hiddencolumns.add(8);
ExcelUtil.hiddencolumns.add(9);
}
return util.exportExcel(list, "供需平衡-停气监管数据");
AjaxResult ajaxResult = util.exportExcel(list, "供需平衡-停气监管数据");
ExcelUtil.hiddencolumns.clear();
return ajaxResult;
}
/**
......
......@@ -3,6 +3,7 @@ package com.zehong.web.controller.supplybalance;
import java.util.ArrayList;
import java.util.List;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.TSupBalGasSup;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -49,23 +50,30 @@ public class TSupBalUsgDayController extends BaseController
@Log(title = "供需平衡-企业每日填报", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSupBalUsgDay tSupBalUsgDay){
if("-2".equals(SecurityUtils.getLoginUser().getUser().getDeptId())){
LoginUser loginUser = SecurityUtils.getLoginUser();
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
tSupBalUsgDay.setfReportStatus("1");
}
List<TSupBalUsgDay> list = tSupBalUsgDayService.selectTSupBalUsgDayList(tSupBalUsgDay);
ExcelUtil<TSupBalUsgDay> util = new ExcelUtil<TSupBalUsgDay>(TSupBalUsgDay.class);
if("-2".equals(SecurityUtils.getLoginUser().getUser().getDeptId())){
List<String> columns = new ArrayList<>();
columns.add("fReportStatus");
columns.add("fReportTime");
util.hideColumns(util.clazz,columns);
if(loginUser.getUser().getRoles().get(0).getRoleId()==5){
// List<String> columns = new ArrayList<>();
// columns.add("fReportStatus");
// columns.add("fReportTime");
// util.hideColumns(util.clazz,columns);
ExcelUtil.hiddencolumns.add(24);
ExcelUtil.hiddencolumns.add(25);
}else{
List<String> columns = new ArrayList<>();
columns.add("fGovUploadStatus");
columns.add("fGovUploadTime");
util.hideColumns(util.clazz,columns);
// List<String> columns = new ArrayList<>();
// columns.add("fGovUploadStatus");
// columns.add("fGovUploadTime");
// util.hideColumns(util.clazz,columns);
ExcelUtil.hiddencolumns.add(19);
ExcelUtil.hiddencolumns.add(20);
}
return util.exportExcel(list, "供需平衡-企业每日填报数据");
AjaxResult ajaxResult = util.exportExcel(list, "供需平衡-企业每日填报数据");
ExcelUtil.hiddencolumns.clear();
return ajaxResult;
}
/**
......
......@@ -53,7 +53,9 @@ public class TConGasProIncController extends BaseController
{
List<TConGasProInc> list = tConGasProIncService.exportTConGasProIncList(tConGasProInc);
ExcelUtil<TConGasProInc> util = new ExcelUtil<TConGasProInc>(TConGasProInc.class);
return util.exportExcel(list, "第三方施工-涉气第三方施工意外事件数据");
AjaxResult ajaxResult = util.exportExcel(list, "第三方施工-涉气第三方施工意外事件数据");
ExcelUtil.hiddencolumns.clear();
return ajaxResult;
}
/**
......
......@@ -57,24 +57,26 @@ public class TConGasProInc extends BaseEntity
/**
* 企业端上传状态 0-未上传,1-已上传*/
@Excel(name = "上传状态",readConverterExp = "1=已上传,0=未上传")
@Excel(name = "上报状态",readConverterExp = "1=已上报,0=未上报")
private String entUploadState;
/**
* 企业端上传时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date entUploadTime;
/**
* 企业端上传状态 0-未上报,1-已上报*/
@Excel(name = "上报省厅状态",readConverterExp = "1=已上报,0=未上报")
private String govUploadState;
/**
* 政府端上传时间 */
@Excel(name = "上报省厅时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date govUploadTime;
/**
* 企业端上传状态 0-未上传,1-已上传*/
private String govUploadState;
public void updateFields() {
this.entUploadState = govUploadState;
......
......@@ -193,26 +193,26 @@ public class TConGasProInfor extends BaseEntity
/**
* 企业端上传状态 0-未上传,1-已上传*/
@Excel(name = "上传状态",readConverterExp = "1=已上传,0=未上传")
@Excel(name = "上报状态",readConverterExp = "1=已上报,0=未上报")
private String entUploadState;
/**
* 企业端上传时间 */
@Excel(name = "上时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@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=未上传")
* 企业端上传状态 0-未上报,1-已上报*/
@Excel(name = "上报省厅状态",readConverterExp = "1=已上报,0=未上报")
private String govUploadState;
/**
* 政府端上传时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上传时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上传省厅时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date govUploadTime;
public void updateFields() {
......
......@@ -112,11 +112,11 @@ public class TPipeOldPlanProcess extends BaseEntity
private Float fFundsDisbursementProgress;
/** 是否已上传,1-是,0-否 */
@Excel(name = "上传状态",readConverterExp = "1=已上传,0=未上传")
@Excel(name = "上报状态",readConverterExp = "1=已上报,0=未上报")
private String fUploadType;
/** 上传时间,yyyy-MM-dd hh:mm:ss */
@Excel(name = "上时间")
@Excel(name = "上时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String fUploadTime;
......@@ -124,12 +124,12 @@ public class TPipeOldPlanProcess extends BaseEntity
* 政府端上传数据
*/
/** 是否已上传,1-是,0-否 */
@Excel(name = " 上传状态",readConverterExp = "1=已上传,0=未上传")
@Excel(name = "上报省厅状态",readConverterExp = "1=已上报,0=未上报")
private String govUploadState;
/** 政府端上传时间,yyyy-MM-dd hh:mm:ss */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = " 上传时间")
@Excel(name = "上报省厅时间")
private Date govUploadTime;
public String getEnterpriseName() {
......
......@@ -48,7 +48,7 @@ public class TSupBalGasSup extends BaseEntity
private Date fSupDate;
/** 上报状态 0-未上报,1-已上报 */
@Excel(name = "上报状态",readConverterExp = "0=未上报,1=已上报",isExport = false)
@Excel(name = "上报状态",readConverterExp = "0=未上报,1=已上报")
private String fRepStatus;
/** 上报日期 */
......@@ -81,12 +81,12 @@ public class TSupBalGasSup extends BaseEntity
private Date endCurrentMonthDate;
/** 政府端上报状态 */
@Excel(name = "上报状态",readConverterExp = "0=未上报,1=已上报")
@Excel(name = "上报省厅状态",readConverterExp = "0=未上报,1=已上报")
private String fGovUploadStatus;
/** 政府端上报时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报省厅日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date fGovUploadTime;
public void setfGasSupId(Long fGasSupId)
......
......@@ -69,7 +69,7 @@ public class TSupBalStopSup extends BaseEntity
* 企业端上传时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报时间", width = 30)
private String entRepTime;
/** 停气区域 */
......@@ -83,12 +83,12 @@ public class TSupBalStopSup extends BaseEntity
@Excel(name = "备注")
private String remarks;
@Excel(name = "上报状态",readConverterExp = "0=未上报,1=已上报")
@Excel(name = "上报省厅状态",readConverterExp = "0=未上报,1=已上报")
private String fGovUploadStatus;
/** 政府端上报时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报省厅时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date fGovUploadTime;
public void setfGasStopId(Long fGasStopId)
......
......@@ -127,12 +127,12 @@ public class TSupBalUsgDay extends BaseEntity
private Date fCalendarDate;
/** 政府端上报状态0-未上报,1-已上报,默认0 */
@Excel(name = "上报状态",readConverterExp = " 0=未上报,1=已上报")
@Excel(name = "上报省厅状态",readConverterExp = " 0=未上报,1=已上报")
private String fGovUploadStatus;
/** 政府端上报时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报省厅时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date fGovUploadTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
......
......@@ -7,6 +7,7 @@ import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.GovernmentDataCopyUtil;
import com.zehong.common.utils.GovernmentDataUtil;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TConGasProInc;
import com.zehong.system.domain.TConGasProInfor;
import com.zehong.system.domain.vo.TConGasProIncVo;
......@@ -84,17 +85,15 @@ public class TConGasProIncServiceImpl implements ITConGasProIncService
LoginUser loginUser = SecurityUtils.getLoginUser();
// 如果是 政府端 则 把 govUploadState 赋值给 entUploadState, 把 govUploadTime 赋值给 entUploadTime
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
tConGasProInc.setEntUploadState("1");
ExcelUtil.hiddencolumns.add(7);
ExcelUtil.hiddencolumns.add(8);
}
List<TConGasProInc> tConGasProIncs = tConGasProIncMapper.selectTConGasProIncList(tConGasProInc);
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
if(tConGasProIncs.size() > 0) {
return tConGasProIncs.stream().peek(TConGasProInc::updateFields).collect(Collectors.toList());
}
if(loginUser.getUser().getRoles().get(0).getRoleId()==5){
ExcelUtil.hiddencolumns.add(9);
ExcelUtil.hiddencolumns.add(10);
}
return tConGasProIncMapper.selectTConGasProIncList(tConGasProInc);
......
......@@ -97,7 +97,6 @@ public class TConGasProInforServiceImpl implements ITConGasProInforService
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){
ExcelUtil.hiddencolumns.add(36);
......
......@@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="fCompanyInfoId != null and fCompanyInfoId != ''"> and da.f_company_info_id = #{fCompanyInfoId}</if>
<if test="beginRepDate != null and endRepDate != null">and da.f_gov_upload_time between #{beginRepDate} and #{endRepDate}</if>
<if test="fReportStatus != null and fReportStatus != ''">da.f_report_status = #{fReportStatus}</if>
<if test="fReportStatus != null and fReportStatus != ''">and da.f_report_status = #{fReportStatus}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and en.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="fCalendarDate != null"> and f_calendar_date = #{fCalendarDate}</if>
<if test="beginCurrentMonthDate != null and endCurrentMonthDate != null">and da.f_calendar_date between #{beginCurrentMonthDate} and #{endCurrentMonthDate}</if>
......
......@@ -150,6 +150,7 @@
detailInfo: {},
enterpriseName:"",
detailOpen: false,
fUploadTimeLable: "",
fUploadTypeLable: "",
fUploadType: "",
fUploadTime: null
......
......@@ -104,13 +104,13 @@
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="上报省厅状态" >
<el-form-item :label="fUploadTypeLable" >
<span>{{fUploadType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上报省厅时间" >
<el-form-item :label="fUploadTimeLable" >
<span>{{ fUploadTime }}</span>
</el-form-item>
</el-col>
......@@ -143,6 +143,8 @@
total: 0,
fUploadType: "",
fUploadTime: null,
fUploadTimeLable: "",
fUploadTypeLable: "",
queryParams: {
pageNum: 1,
pageSize: 5,
......@@ -167,9 +169,11 @@
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadType = this.detailInfo.fGovUploadStatus
this.fUploadTypeLable = "上报省厅状态"
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.fRepStatus
this.fUploadTypeLable = "上报状态"
}
if (this.fUploadType == '0') {
......@@ -184,9 +188,11 @@
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadTime = this.detailInfo.fGovUploadTime
this.fUploadTimeLable = "上报省厅时间"
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entRepTime
this.fUploadTimeLable = "上报时间"
}
},
getDetailInfo(id){
......
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