소스 검색

项目管理列表表格宽度设定
导出项目列表,导出数据重新设定
调整栏目顺序

yue 5 년 전
부모
커밋
ad7866bcd7

+ 327 - 0
src/main/java/com/jeeplus/modules/sg/information/entity/OutInformation.java

@@ -0,0 +1,327 @@
+package com.jeeplus.modules.sg.information.entity;
+
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+
+import java.util.Date;
+
+public class OutInformation {
+    //项目定义号
+    private String projectId;
+    //	项目名称
+    private String projectName;
+    //	项目类型
+    private String projectType;
+    //工作状态(是否关闭)
+    private String outConstruction;
+    //	审定日期
+    private Date approvalDate;
+    //是否完成甲供物资领退料
+    private String complete;
+    //完成甲供物资领退料时间
+    private String finishDate;
+    //未完成甲供物资领退料时间
+    private String noFinishDate;
+    //是否超期
+    private String overdue;
+    //是否决算送审
+    private String trial;
+    //第一次是否完成甲供物资领退料
+    private String firstFinish;
+    //第一次完成甲供物资领退料的日期
+    private Date firstFinishDate;
+    //第二次是否完成甲供物资领退料
+    private String secondFinish;
+    //第二次完成甲供物资领退料的日期
+    private Date secondFinishDate;
+    //	一级单位
+    private String firstUnits;
+    //	二级单位
+    private String secondUnits;
+    //归口部门
+    private String underCentralized;
+    //	电压等级
+    private String projectGrade;
+    //	项目预算年度
+    private String projectYear;
+    //	项目总投资(元)
+    private String projectTotal;
+    //	实际开工日期
+    private Date projectStart;
+    //	实际竣工日期
+    private Date projectStop;
+    //施工单位
+    private String construction;
+    //	事务所名称
+    private String projectFirm;
+    //	提交送审日期
+    private Date subDate;
+    //	审计任务下达日期
+    private Date releaseDate;
+    //	审计应结束日时间
+    private Date endDate;
+    //	结果上传时间
+    private Date resultDate;
+    //结算单位
+    private String settlement;
+
+    @ExcelField(title="项目定义号", align=2, sort=1)
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    @ExcelField(title="项目名称", align=2, sort=2)
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    @ExcelField(title="项目类型", align=2, sort=3)
+    public String getProjectType() {
+        return projectType;
+    }
+
+    public void setProjectType(String projectType) {
+        this.projectType = projectType;
+    }
+
+    @ExcelField(title="工作状态", align=2, sort=4)
+    public String getOutConstruction() {
+        return outConstruction;
+    }
+
+    public void setOutConstruction(String outConstruction) {
+        this.outConstruction = outConstruction;
+    }
+
+    @ExcelField(title="审定日期", align=2, sort=5)
+    public Date getApprovalDate() {
+        return approvalDate;
+    }
+
+    public void setApprovalDate(Date approvalDate) {
+        this.approvalDate = approvalDate;
+    }
+
+    @ExcelField(title="是否完成甲供物资领退料", align=2, sort=6)
+    public String getComplete() {
+        return complete;
+    }
+
+    public void setComplete(String complete) {
+        this.complete = complete;
+    }
+
+    @ExcelField(title="完成甲供物资领退料时间", align=2, sort=7)
+    public String getFinishDate() {
+        return finishDate;
+    }
+
+    public void setFinishDate(String finishDate) {
+        this.finishDate = finishDate;
+    }
+
+    @ExcelField(title="未完成甲供物资领退料时间", align=2, sort=8)
+    public String getNoFinishDate() {
+        return noFinishDate;
+    }
+
+    public void setNoFinishDate(String noFinishDate) {
+        this.noFinishDate = noFinishDate;
+    }
+
+    @ExcelField(title="是否超期", align=2, sort=9)
+    public String getOverdue() {
+        return overdue;
+    }
+
+    public void setOverdue(String overdue) {
+        this.overdue = overdue;
+    }
+
+    @ExcelField(title="是否决算送审", align=2, sort=10)
+    public String getTrial() {
+        return trial;
+    }
+
+    public void setTrial(String trial) {
+        this.trial = trial;
+    }
+
+    @ExcelField(title="第一次是否完成甲供物资领退料", align=2, sort=11)
+    public String getFirstFinish() {
+        return firstFinish;
+    }
+
+    public void setFirstFinish(String firstFinish) {
+        this.firstFinish = firstFinish;
+    }
+
+    @ExcelField(title="第一次完成甲供物资领退料的日期", align=2, sort=12)
+    public Date getFirstFinishDate() {
+        return firstFinishDate;
+    }
+
+    public void setFirstFinishDate(Date firstFinishDate) {
+        this.firstFinishDate = firstFinishDate;
+    }
+
+    @ExcelField(title="第二次是否完成甲供物资领退料", align=2, sort=13)
+    public String getSecondFinish() {
+        return secondFinish;
+    }
+
+    public void setSecondFinish(String secondFinish) {
+        this.secondFinish = secondFinish;
+    }
+
+    @ExcelField(title="第二次完成甲供物资领退料的日期", align=2, sort=14)
+    public Date getSecondFinishDate() {
+        return secondFinishDate;
+    }
+
+    public void setSecondFinishDate(Date secondFinishDate) {
+        this.secondFinishDate = secondFinishDate;
+    }
+
+    @ExcelField(title="一级单位", align=2, sort=15)
+    public String getFirstUnits() {
+        return firstUnits;
+    }
+
+    public void setFirstUnits(String firstUnits) {
+        this.firstUnits = firstUnits;
+    }
+
+    @ExcelField(title="二级单位", align=2, sort=16)
+    public String getSecondUnits() {
+        return secondUnits;
+    }
+
+    public void setSecondUnits(String secondUnits) {
+        this.secondUnits = secondUnits;
+    }
+
+    @ExcelField(title="归口部门", align=2, sort=17)
+    public String getUnderCentralized() {
+        return underCentralized;
+    }
+
+    public void setUnderCentralized(String underCentralized) {
+        this.underCentralized = underCentralized;
+    }
+
+    @ExcelField(title="电压等级", align=2, sort=18)
+    public String getProjectGrade() {
+        return projectGrade;
+    }
+
+    public void setProjectGrade(String projectGrade) {
+        this.projectGrade = projectGrade;
+    }
+
+    @ExcelField(title="项目预算年度", align=2, sort=19)
+    public String getProjectYear() {
+        return projectYear;
+    }
+
+    public void setProjectYear(String projectYear) {
+        this.projectYear = projectYear;
+    }
+
+    @ExcelField(title="项目总投资", align=2, sort=20)
+    public String getProjectTotal() {
+        return projectTotal;
+    }
+
+    public void setProjectTotal(String projectTotal) {
+        this.projectTotal = projectTotal;
+    }
+
+    @ExcelField(title="实际开工日期", align=2, sort=21)
+    public Date getProjectStart() {
+        return projectStart;
+    }
+
+    public void setProjectStart(Date projectStart) {
+        this.projectStart = projectStart;
+    }
+
+    @ExcelField(title="实际竣工日期", align=2, sort=22)
+    public Date getProjectStop() {
+        return projectStop;
+    }
+
+    public void setProjectStop(Date projectStop) {
+        this.projectStop = projectStop;
+    }
+
+    @ExcelField(title="施工单位", align=2, sort=23)
+    public String getConstruction() {
+        return construction;
+    }
+
+    public void setConstruction(String construction) {
+        this.construction = construction;
+    }
+
+    @ExcelField(title="事务所名称", align=2, sort=24)
+    public String getProjectFirm() {
+        return projectFirm;
+    }
+
+    public void setProjectFirm(String projectFirm) {
+        this.projectFirm = projectFirm;
+    }
+
+    @ExcelField(title="提交送审日期", align=2, sort=25)
+    public Date getSubDate() {
+        return subDate;
+    }
+
+    public void setSubDate(Date subDate) {
+        this.subDate = subDate;
+    }
+
+    @ExcelField(title="审计任务下达日期", align=2, sort=26)
+    public Date getReleaseDate() {
+        return releaseDate;
+    }
+
+    public void setReleaseDate(Date releaseDate) {
+        this.releaseDate = releaseDate;
+    }
+
+    @ExcelField(title="审计应结束日时间", align=2, sort=27)
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    @ExcelField(title="结果上传时间", align=2, sort=28)
+    public Date getResultDate() {
+        return resultDate;
+    }
+
+    public void setResultDate(Date resultDate) {
+        this.resultDate = resultDate;
+    }
+
+    @ExcelField(title="结算单位", align=2, sort=29)
+    public String getSettlement() {
+        return settlement;
+    }
+
+    public void setSettlement(String settlement) {
+        this.settlement = settlement;
+    }
+}

+ 54 - 1
src/main/java/com/jeeplus/modules/sg/information/service/InformationService.java

@@ -40,7 +40,60 @@ public class InformationService extends CrudService<InformationMapper, Informati
 	}
 
 	public List<Information> findList(Information information) {
-		return super.findList(information);
+		List<Information> list = super.findList(information);
+		String find = informationMapper.findOverTime("overTime");
+		int overTime = Integer.parseInt(find);
+		Calendar cal = Calendar.getInstance();
+
+		long between_days = 0;
+		for (Information in : list) {
+			//判断审定日期是否为空
+//			if (in.getApprovalDate() != null) {
+			//格式化审定日期
+			if ("否".equals(in.getFirstFinish()) || "否".equals(in.getSecondFinish())) {
+				in.setComplete("否");
+				if (in.getApprovalDate() != null) {
+					cal.setTime(in.getApprovalDate());
+					long appDay = cal.getTimeInMillis();
+					cal.setTime(new Date());
+					long nowDate = cal.getTimeInMillis();
+					between_days = (nowDate - appDay) / (1000 * 3600 * 24);
+					in.setNoFinishDate(String.valueOf(between_days) + "天");
+				}
+			} else {
+				in.setComplete("是");
+				if (in.getApprovalDate() != null) {
+					cal.setTime(in.getApprovalDate());
+					long appDay = cal.getTimeInMillis();
+					if (in.getFirstFinishDate() != null || in.getSecondFinishDate() != null) {
+						if (in.getSecondFinishDate() != null) {
+							cal.setTime(in.getSecondFinishDate());
+							long secondDate = cal.getTimeInMillis();
+							between_days = (secondDate - appDay) / (1000 * 3600 * 24);
+							in.setFinishDate(String.valueOf(between_days) + "天");
+							if (between_days > overTime) {
+								in.setOverdue("是");
+							} else {
+								in.setOverdue("否");
+							}
+						} else {
+							cal.setTime(in.getFirstFinishDate());
+							long firstDate = cal.getTimeInMillis();
+							between_days = (firstDate - appDay) / (1000 * 3600 * 24);
+							in.setFinishDate(String.valueOf(between_days) + "天");
+							if (between_days > overTime) {
+								in.setOverdue("是");
+							} else {
+								in.setOverdue("否");
+							}
+						}
+					}
+				}
+			}
+//			}
+		}
+		return list;
+
 	}
 
 

+ 2 - 5
src/main/java/com/jeeplus/modules/sg/information/web/InformationController.java

@@ -19,10 +19,7 @@ import com.alibaba.fastjson.JSONObject;*/
 import com.google.common.collect.Lists;
 import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.common.utils.excel.ExportExcel;
-import com.jeeplus.modules.sg.information.entity.Information;
-import com.jeeplus.modules.sg.information.entity.InformationDto;
-import com.jeeplus.modules.sg.information.entity.append;
-import com.jeeplus.modules.sg.information.entity.constant;
+import com.jeeplus.modules.sg.information.entity.*;
 import com.jeeplus.modules.sg.information.service.InformationService;
 import com.jeeplus.modules.sg.information.utils.FreemarkerUtil;
 import com.jeeplus.modules.sg.information.utils.ImportInformation;
@@ -608,7 +605,7 @@ public class InformationController extends BaseController {
         try {
             String fileName = "导出项目清单" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
             List<Information> informationList = informationService.findList(information);
-            new ExportExcel("导出项目清单", Information.class).setDataList(informationList).write(response, fileName).dispose();
+            new ExportExcel("导出项目清单", OutInformation.class).setDataList(informationList).write(response, fileName).dispose();
             j.setSuccess(true);
             j.setMsg("导出成功!");
             return j;

+ 4 - 1
src/main/webapp/webpage/modules/sg/information/informationList.js

@@ -17,7 +17,7 @@ $(document).ready(function() {
                contentType: "application/x-www-form-urlencoded",
                //显示检索按钮
 	       		showSearch: true,
-				height:h,
+/*				height:h,*/
                //显示刷新按钮
                showRefresh: true,
                //显示切换手机试图按钮
@@ -69,6 +69,9 @@ $(document).ready(function() {
                	onShowSearch: function () {
 			$("#search-collapse").slideToggle();
 		},
+		formatNoMatches:function(){
+			return "你的自定义文字说明";
+		},
                columns: [
                	{
 		        field: 'projectId',