Commit 173c7729 authored by 耿迪迪's avatar 耿迪迪

气量监管问题修改

parent 30a04fd0
......@@ -131,12 +131,12 @@ public class TSupBalGasSupController extends BaseController
/**
* 获取上报信息
* @param companyId 企业id
* @param reportDate 上报时间
* @param calendarDate 上报时间
* @return
*/
@GetMapping(value = "/getReportInfoByCompany")
public AjaxResult getReportInfoByCompany(@RequestParam(value="companyId")String companyId,@RequestParam(value="reportDate")String reportDate){
return AjaxResult.success(tSupBalGasSupService.getReportInfoByCompany(companyId,reportDate));
public AjaxResult getReportInfoByCompany(@RequestParam(value="companyId")String companyId,@RequestParam(value="calendarDate")String calendarDate){
return AjaxResult.success(tSupBalGasSupService.getReportInfoByCompany(companyId,calendarDate));
}
@GetMapping("/reportInfoList")
......@@ -144,4 +144,19 @@ public class TSupBalGasSupController extends BaseController
List<TSupBalGasSup> list = tSupBalGasSupService.selectTSupBalGasSupList(tSupBalGasSup);
return AjaxResult.success(list);
}
/**
* 上传气量监管记录
* @param fGasSupId 监管记录主键
* @return
*/
@GetMapping("/reportSupBalGasSupRecInfo")
public AjaxResult reportSupBalGasSupRecInfo(Long fGasSupId){
try{
return toAjax(tSupBalGasSupService.reportSupBalGasSupRecInfo(fGasSupId));
}catch (Exception e){
logger.error("上传气量监管记录接口异常=====",e);
return AjaxResult.error("上传气量监管记录接口异常");
}
}
}
......@@ -52,8 +52,8 @@ public class TSupBalGasSup extends BaseEntity
private String fRepStatus;
/** 上报日期 */
@Excel(name = "上报日期", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "上报日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date fRepDate;
......@@ -75,6 +75,21 @@ public class TSupBalGasSup extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endRepDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date beginCurrentMonthDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endCurrentMonthDate;
/** 政府端上报状态 */
@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")
private Date fGovUploadTime;
public void setfGasSupId(Long fGasSupId)
{
this.fGasSupId = fGasSupId;
......@@ -208,6 +223,38 @@ public class TSupBalGasSup extends BaseEntity
this.calendarDate = calendarDate;
}
public Date getBeginCurrentMonthDate() {
return beginCurrentMonthDate;
}
public void setBeginCurrentMonthDate(Date beginCurrentMonthDate) {
this.beginCurrentMonthDate = beginCurrentMonthDate;
}
public Date getEndCurrentMonthDate() {
return endCurrentMonthDate;
}
public void setEndCurrentMonthDate(Date endCurrentMonthDate) {
this.endCurrentMonthDate = endCurrentMonthDate;
}
public String getfGovUploadStatus() {
return fGovUploadStatus;
}
public void setfGovUploadStatus(String fGovUploadStatus) {
this.fGovUploadStatus = fGovUploadStatus;
}
public Date getfGovUploadTime() {
return fGovUploadTime;
}
public void setfGovUploadTime(Date fGovUploadTime) {
this.fGovUploadTime = fGovUploadTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -67,8 +67,15 @@ public interface ITSupBalGasSupService
/**
* 获取上报信息
* @param companyId 企业id
* @param reportDate 上报时间
* @param calendarDate 上报时间
* @return
*/
TSupBalGasSup getReportInfoByCompany(String companyId, String reportDate);
TSupBalGasSup getReportInfoByCompany(String companyId, String calendarDate);
/**
* 上传气量监管记录
* @param fGasSupId 监管记录主键
* @return
*/
int reportSupBalGasSupRecInfo(Long fGasSupId);
}
......@@ -111,14 +111,30 @@ public class TSupBalGasSupServiceImpl implements ITSupBalGasSupService
/**
* 获取上报信息
* @param companyId 企业id
* @param reportDate 上报时间
* @param calendarDate 上报时间
* @return
*/
@Override
public TSupBalGasSup getReportInfoByCompany(String companyId, String reportDate){
public TSupBalGasSup getReportInfoByCompany(String companyId, String calendarDate){
Map<String,String> param = new HashMap();
param.put("companyId",companyId);
param.put("reportDate",reportDate);
param.put("calendarDate",calendarDate);
return tSupBalGasSupMapper.getReportInfoByCompany(param);
}
/**
* 上传气量监管记录
* @param fGasSupId 监管记录主键
* @return
*/
@Override
public int reportSupBalGasSupRecInfo(Long fGasSupId) {
TSupBalGasSup tSupBalGasSup = new TSupBalGasSup();
tSupBalGasSup.setfGasSupId(fGasSupId);
tSupBalGasSup.setfGovUploadTime(new Date());
tSupBalGasSup.setfGovUploadStatus("1");
return tSupBalGasSupMapper.updateTSupBalGasSup(tSupBalGasSup);
}
}
......@@ -21,6 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
<result property="calendarDate" column="f_calendar_date" />
<result property="fGovUploadStatus" column="f_gov_upload_status" />
<result property="fGovUploadTime" column="f_gov_upload_time" />
</resultMap>
<sql id="selectTSupBalGasSupVo">
......@@ -41,6 +43,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sup.is_del,
sup.remarks,
sup.f_calendar_date,
sup.f_gov_upload_status,
sup.f_gov_upload_time,
en.enterprise_name as enterpriseName
FROM
t_sup_bal_gas_sup sup
......@@ -56,9 +60,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fSupGasVol != null "> and sup.f_sup_gas_vol = #{fSupGasVol}</if>
<if test="fStorageVol != null "> and sup.f_storage_vol = #{fStorageVol}</if>
<if test="fRepStatus != null and fRepStatus != ''"> and sup.f_rep_status = #{fRepStatus}</if>
<if test="beginRepDate != null and endRepDate != null">and sup.f_rep_date between #{beginRepDate} and #{endRepDate}</if>
<if test="beginRepDate != null and endRepDate != null">and sup.f_gov_upload_time between #{beginRepDate} and #{endRepDate}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and en.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="calendarDate != null"> and f_calendar_date = #{calendarDate}</if>
<if test="beginCurrentMonthDate != null and endCurrentMonthDate != null">and sup.f_calendar_date between #{beginCurrentMonthDate} and #{endCurrentMonthDate}</if>
<if test="fGovUploadStatus != null and fGovUploadStatus != ''"> and sup.f_gov_upload_status = #{fGovUploadStatus}</if>
<if test="fGovUploadTime != null "> and sup.f_gov_upload_time = #{fGovUploadTime}</if>
</where>
</select>
......@@ -108,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
<if test="calendarDate != null">f_calendar_date,</if>
<if test="fGovUploadStatus != null">f_gov_upload_status,</if>
<if test="fGovUploadTime != null">f_gov_upload_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fCompanyInfoId != null and fCompanyInfoId != ''">#{fCompanyInfoId},</if>
......@@ -125,6 +134,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
<if test="calendarDate != null">#{calendarDate},</if>
<if test="fGovUploadStatus != null">#{fGovUploadStatus},</if>
<if test="fGovUploadTime != null">#{fGovUploadTime},</if>
</trim>
</insert>
......@@ -146,6 +157,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="calendarDate != null">f_calendar_date = #{calendarDate},</if>
<if test="fGovUploadStatus != null">f_gov_upload_status = #{fGovUploadStatus},</if>
<if test="fGovUploadTime != null">f_gov_upload_time = #{fGovUploadTime},</if>
</trim>
where f_gas_sup_id = #{fGasSupId}
</update>
......@@ -163,6 +176,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getReportInfoByCompany" parameterType="Map" resultMap="TSupBalGasSupResult">
<include refid="selectTSupBalGasSupVo"/>
where sup.f_company_info_id = #{companyId} and sup.f_rep_date like concat('%', #{reportDate}, '%')
where sup.f_company_info_id = #{companyId} and sup.f_calendar_date = #{calendarDate}
</select>
</mapper>
\ No newline at end of file
......@@ -67,3 +67,11 @@ export function reportInfoList(query) {
params: query
})
}
export function reportSupBalGasSupRecInfo(query) {
return request({
url: '/supplyBalance/gas/reportSupBalGasSupRecInfo',
method: 'get',
params: query
})
}
......@@ -15,11 +15,9 @@
<el-date-picker
v-model="dateRange"
size="small"
style="width: 240px"
type="daterange"
type="datetimerange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd HH:mm:ss"
@change="timeChange"
></el-date-picker>
......@@ -50,7 +48,7 @@
:disabled="single"
@click="handleUpdate"
>修改</el-button>
</el-col>-->
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
......@@ -60,7 +58,7 @@
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
</el-col>
</el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
......@@ -82,16 +80,17 @@
<el-table-column label="供气量/wm³" align="center" prop="fSupGasVol" />
<el-table-column label="存储量/wm³" align="center" prop="fStorageVol" />
<el-table-column label="监管气量日期" align="center" prop="fSupDate" />
<el-table-column label="上报状态" align="center" prop="fRepStatus">
<el-table-column label="上报状态" align="center" prop="fGovUploadStatus">
<template slot-scope="scope">
<span v-if="scope.row.fRepStatus == '0'">未上报</span>
<span v-else-if="scope.row.fRepStatus == '1'">已上报</span>
<span v-if="scope.row.fGovUploadStatus == '0'">未上报</span>
<span v-else-if="scope.row.fGovUploadStatus == '1'">已上报</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报日期" align="center" prop="fRepDate" width="180">
<el-table-column label="上报日期" align="center" prop="fGovUploadTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.fRepDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
<span v-if="scope.row.fGovUploadTime">{{ parseTime(scope.row.fGovUploadTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......@@ -101,7 +100,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>-->
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
-->
<el-button
size="mini"
type="text"
......@@ -111,9 +117,8 @@
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
@click="handleReport(scope.row)"
>上报</el-button>
</template>
</el-table-column>
</el-table>
......@@ -213,7 +218,7 @@
<span v-else>未上报</span>
</div>
</el-col>
<el-col :span="11" style="text-align: right">
<el-col :span="11" style="padding-left: 45px">
<div class="label-warp">上报时间</div>
<div class="value-warp">
<span v-if="reportForm.fRepDate">{{ reportForm.fRepDate }}</span>
......@@ -257,7 +262,7 @@
</template>
<script>
import { listSup, getSup, delSup, addSup, updateSup, exportSup, getReportInfoByCompany, reportInfoList } from "@/api/supplybalance/gas";
import { listSup, getSup, delSup, addSup, updateSup, exportSup, getReportInfoByCompany, reportInfoList, reportSupBalGasSupRecInfo } from "@/api/supplybalance/gas";
import Calendar from "@/components/Calendar";
import moment from "moment";
import DetailInfo from "./components/DetailInfo";
......@@ -498,7 +503,7 @@ export default {
}
},
getReportInfo(){
getReportInfoByCompany({companyId:this.$store.state.user.enterpriseId,reportDate:this.reportDate}).then(res =>{
getReportInfoByCompany({companyId:this.$store.state.user.enterpriseId,calendarDate:this.reportDate}).then(res =>{
if(res.code && res.data){
this.reportForm = res.data;
}
......@@ -506,14 +511,25 @@ export default {
},
//上报
reportInfo(){
this.reportForm.fRepDate = this.reportDate;
this.reportForm.fRepStatus = '1';
if (this.reportForm.fGasSupId != null) {
updateSup(this.reportForm).then(response => {
this.msgSuccess("上报成功");
this.getReportInfo();
});
let that = this;
this.$confirm('当前已上报,是否确认再次上报?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
that.reportForm.fRepDate = moment().format('YYYY-MM-DD HH:mm:ss');
that.reportForm.calendarDate = that.reportDate;
that.reportForm.fRepStatus = '1';
return updateSup(that.reportForm);
}).then(() => {
that.getReportInfo();
that.msgSuccess("上报成功");
}).catch(() => {});
} else {
this.reportForm.fRepDate = moment().format('YYYY-MM-DD HH:mm:ss');
this.reportForm.calendarDate = this.reportDate;
this.reportForm.fRepStatus = '1';
addSup(this.reportForm).then(response => {
this.msgSuccess("上报成功");
const startOfMonth = moment(this.reportDate).startOf('month').format('YYYY-MM-DD HH:mm:ss');
......@@ -524,12 +540,12 @@ export default {
});
}
},
currentMonthReportInfo(beginRepDate,endRepDate){
reportInfoList({fCompanyInfoId:this.$store.state.user.enterpriseId,beginRepDate:beginRepDate,endRepDate:endRepDate}).then(res =>{
currentMonthReportInfo(beginCurrentMonthDate,endCurrentMonthDate){
reportInfoList({fCompanyInfoId:this.$store.state.user.enterpriseId,beginCurrentMonthDate:beginCurrentMonthDate,endCurrentMonthDate:endCurrentMonthDate}).then(res =>{
if(res.code == 200 && res.data){
this.scheduleData = [];
res.data.forEach(item =>{
this.scheduleData.push({date:item.fRepDate,content:item.fRepStatus == '1'?"已上报":"未上报"})
this.scheduleData.push({date:item.calendarDate,content:item.fRepStatus == '1'?"已上报":"未上报"})
})
}
......@@ -543,6 +559,21 @@ export default {
handleDetail(row){
this.$refs.detail.getDetailInfo(row.fGasSupId);
},
//上传
handleReport(row) {
this.$confirm('是否确认上报气量监管编号为"' + row.fGasSupId + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return reportSupBalGasSupRecInfo({fGasSupId : row.fGasSupId});
}).then(() => {
this.getList();
this.msgSuccess("上报成功");
}).catch((e) => {
console.log("==============",e)
});
},
}
};
</script>
......
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