xs 5 gadi atpakaļ
vecāks
revīzija
d1b34035dd

+ 0 - 540
src/main/java/com/jeeplus/modules/sg/financial/project/Project.java

@@ -1,540 +0,0 @@
-package com.jeeplus.modules.sg.financial.project;
-
-public class Project {
-    private String type;
-    private String demandUnit;//需求提出单位
-    private String bdzName;//变电站名称
-    private String lineName;//线路名称
-    private String requireName;//项目需求名称
-    private String bulidClassificationResons;//建设理由分类
-    private String bulbidResons;//建设理由
-    private String asicEquipment;//设备基本情况
-    private String runTheClass;//运行班
-    private String projectTeam;//项目组
-    private Double costEstimate;//费用估算
-    private String whetherRheUpwind;//是否迎风期度夏项目
-    private String sureDaDate;//确定下达时间
-    private String textRemark;//备注
-    private String powerLine;//停电线路
-    private String itemType;//项目类型
-    private String prowerPagerItem;//是否为停电打包项目
-    private String officeJudgment;//证处初步判断
-    private String includedCivil;//是否含土建
-    private String steelTube;//钢管杆基础类型
-    private String bulidResons;//是否需要规划报批
-    private String equipmentModificationType;//设备改造类型
-    private String changeTheSize;//改造设备尺寸及间隔数
-    private String canBecustomized;//是否可定制设备
-    private String newDeviceName;//是否含新设备命名
-    private String headOperationOf;//是否含变电站新间隔头运
-    private String nonSetElectrical;//是否含非设电电气点电器施工
-    private String automationIncluded;//是否含自动化
-    private String twoOfThree;//二摇或三遥
-    private String phoneStyle;//通信方式
-    private String openCentralizedOr;//柱开集中或就地
-    private String networkCabinet;//环网柜
-    private String rightrOfWayDtu;//站房DTU
-    private String checkHomeWork;//是否需要带带你作业查探
-    private String constructionOfChannel;//施工通道
-    private String canBexpanded;//设备基础是否可以扩容
-    private String fieldEquipmentSize;//现场设备尺寸
-    private String maximumCapacitySize;//最多可狂容尺寸
-    private String programSecurityRisks;//方案安全隐患
-    private String constructionImpact;//是否存在低压或同心县等施工影响
-    private String projectToRepeat;//立项重复
-    private String beenImplemented;//是否已经实施
-    private String transformerNoLoad;//变压器无负荷
-    private String LineConsistency;//线路名称一致性
-    private String quantityConsistent;//工程量是否一致
-    private String dryConsistency;//设备开光干好一致性
-    private String thePlaceType;//证处类型
-    private String precondition;//前置条件
-    private String dtuEmplacement;//DTU安放核查
-    private String dateOfProduction;//核查环网生产日期
-    private String integrationModule;//二次是否集成模块
-    private String ptReplaced;//PT是否需要更换
-    private String overallTransformation;//设备是否有整体改造必要
-
-    @Override
-    public String toString() {
-        return "Project{" +
-                "type='" + type + '\'' +
-                ", demandUnit='" + demandUnit + '\'' +
-                ", bdzName='" + bdzName + '\'' +
-                ", lineName='" + lineName + '\'' +
-                ", requireName='" + requireName + '\'' +
-                ", bulidClassificationResons='" + bulidClassificationResons + '\'' +
-                ", bulbidResons='" + bulbidResons + '\'' +
-                ", asicEquipment='" + asicEquipment + '\'' +
-                ", runTheClass='" + runTheClass + '\'' +
-                ", projectTeam='" + projectTeam + '\'' +
-                ", costEstimate=" + costEstimate +
-                ", whetherRheUpwind='" + whetherRheUpwind + '\'' +
-                ", sureDaDate='" + sureDaDate + '\'' +
-                ", textRemark='" + textRemark + '\'' +
-                ", powerLine='" + powerLine + '\'' +
-                ", itemType='" + itemType + '\'' +
-                ", prowerPagerItem='" + prowerPagerItem + '\'' +
-                ", officeJudgment='" + officeJudgment + '\'' +
-                ", includedCivil='" + includedCivil + '\'' +
-                ", steelTube='" + steelTube + '\'' +
-                ", bulidResons='" + bulidResons + '\'' +
-                ", equipmentModificationType='" + equipmentModificationType + '\'' +
-                ", changeTheSize='" + changeTheSize + '\'' +
-                ", canBecustomized='" + canBecustomized + '\'' +
-                ", newDeviceName='" + newDeviceName + '\'' +
-                ", headOperationOf='" + headOperationOf + '\'' +
-                ", nonSetElectrical='" + nonSetElectrical + '\'' +
-                ", automationIncluded='" + automationIncluded + '\'' +
-                ", twoOfThree='" + twoOfThree + '\'' +
-                ", phoneStyle='" + phoneStyle + '\'' +
-                ", openCentralizedOr='" + openCentralizedOr + '\'' +
-                ", networkCabinet='" + networkCabinet + '\'' +
-                ", rightrOfWayDtu='" + rightrOfWayDtu + '\'' +
-                ", checkHomeWork='" + checkHomeWork + '\'' +
-                ", constructionOfChannel='" + constructionOfChannel + '\'' +
-                ", canBexpanded='" + canBexpanded + '\'' +
-                ", fieldEquipmentSize='" + fieldEquipmentSize + '\'' +
-                ", maximumCapacitySize='" + maximumCapacitySize + '\'' +
-                ", programSecurityRisks='" + programSecurityRisks + '\'' +
-                ", constructionImpact='" + constructionImpact + '\'' +
-                ", projectToRepeat='" + projectToRepeat + '\'' +
-                ", beenImplemented='" + beenImplemented + '\'' +
-                ", transformerNoLoad='" + transformerNoLoad + '\'' +
-                ", LineConsistency='" + LineConsistency + '\'' +
-                ", quantityConsistent='" + quantityConsistent + '\'' +
-                ", dryConsistency='" + dryConsistency + '\'' +
-                ", thePlaceType='" + thePlaceType + '\'' +
-                ", precondition='" + precondition + '\'' +
-                ", dtuEmplacement='" + dtuEmplacement + '\'' +
-                ", dateOfProduction='" + dateOfProduction + '\'' +
-                ", integrationModule='" + integrationModule + '\'' +
-                ", ptReplaced='" + ptReplaced + '\'' +
-                ", overallTransformation='" + overallTransformation + '\'' +
-                '}';
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getDemandUnit() {
-        return demandUnit;
-    }
-
-    public void setDemandUnit(String demandUnit) {
-        this.demandUnit = demandUnit;
-    }
-
-    public String getBdzName() {
-        return bdzName;
-    }
-
-    public void setBdzName(String bdzName) {
-        this.bdzName = bdzName;
-    }
-
-    public String getLineName() {
-        return lineName;
-    }
-
-    public void setLineName(String lineName) {
-        this.lineName = lineName;
-    }
-
-    public String getRequireName() {
-        return requireName;
-    }
-
-    public void setRequireName(String requireName) {
-        this.requireName = requireName;
-    }
-
-    public String getBulidClassificationResons() {
-        return bulidClassificationResons;
-    }
-
-    public void setBulidClassificationResons(String bulidClassificationResons) {
-        this.bulidClassificationResons = bulidClassificationResons;
-    }
-
-    public String getBulbidResons() {
-        return bulbidResons;
-    }
-
-    public void setBulbidResons(String bulbidResons) {
-        this.bulbidResons = bulbidResons;
-    }
-
-    public String getAsicEquipment() {
-        return asicEquipment;
-    }
-
-    public void setAsicEquipment(String asicEquipment) {
-        this.asicEquipment = asicEquipment;
-    }
-
-    public String getRunTheClass() {
-        return runTheClass;
-    }
-
-    public void setRunTheClass(String runTheClass) {
-        this.runTheClass = runTheClass;
-    }
-
-    public String getProjectTeam() {
-        return projectTeam;
-    }
-
-    public void setProjectTeam(String projectTeam) {
-        this.projectTeam = projectTeam;
-    }
-
-    public Double getCostEstimate() {
-        return costEstimate;
-    }
-
-    public void setCostEstimate(Double costEstimate) {
-        this.costEstimate = costEstimate;
-    }
-
-    public String getWhetherRheUpwind() {
-        return whetherRheUpwind;
-    }
-
-    public void setWhetherRheUpwind(String whetherRheUpwind) {
-        this.whetherRheUpwind = whetherRheUpwind;
-    }
-
-    public String getSureDaDate() {
-        return sureDaDate;
-    }
-
-    public void setSureDaDate(String sureDaDate) {
-        this.sureDaDate = sureDaDate;
-    }
-
-    public String getTextRemark() {
-        return textRemark;
-    }
-
-    public void setTextRemark(String textRemark) {
-        this.textRemark = textRemark;
-    }
-
-    public String getPowerLine() {
-        return powerLine;
-    }
-
-    public void setPowerLine(String powerLine) {
-        this.powerLine = powerLine;
-    }
-
-    public String getItemType() {
-        return itemType;
-    }
-
-    public void setItemType(String itemType) {
-        this.itemType = itemType;
-    }
-
-    public String getProwerPagerItem() {
-        return prowerPagerItem;
-    }
-
-    public void setProwerPagerItem(String prowerPagerItem) {
-        this.prowerPagerItem = prowerPagerItem;
-    }
-
-    public String getOfficeJudgment() {
-        return officeJudgment;
-    }
-
-    public void setOfficeJudgment(String officeJudgment) {
-        this.officeJudgment = officeJudgment;
-    }
-
-    public String getIncludedCivil() {
-        return includedCivil;
-    }
-
-    public void setIncludedCivil(String includedCivil) {
-        this.includedCivil = includedCivil;
-    }
-
-    public String getSteelTube() {
-        return steelTube;
-    }
-
-    public void setSteelTube(String steelTube) {
-        this.steelTube = steelTube;
-    }
-
-    public String getBulidResons() {
-        return bulidResons;
-    }
-
-    public void setBulidResons(String bulidResons) {
-        this.bulidResons = bulidResons;
-    }
-
-    public String getEquipmentModificationType() {
-        return equipmentModificationType;
-    }
-
-    public void setEquipmentModificationType(String equipmentModificationType) {
-        this.equipmentModificationType = equipmentModificationType;
-    }
-
-    public String getChangeTheSize() {
-        return changeTheSize;
-    }
-
-    public void setChangeTheSize(String changeTheSize) {
-        this.changeTheSize = changeTheSize;
-    }
-
-    public String getCanBecustomized() {
-        return canBecustomized;
-    }
-
-    public void setCanBecustomized(String canBecustomized) {
-        this.canBecustomized = canBecustomized;
-    }
-
-    public String getNewDeviceName() {
-        return newDeviceName;
-    }
-
-    public void setNewDeviceName(String newDeviceName) {
-        this.newDeviceName = newDeviceName;
-    }
-
-    public String getHeadOperationOf() {
-        return headOperationOf;
-    }
-
-    public void setHeadOperationOf(String headOperationOf) {
-        this.headOperationOf = headOperationOf;
-    }
-
-    public String getNonSetElectrical() {
-        return nonSetElectrical;
-    }
-
-    public void setNonSetElectrical(String nonSetElectrical) {
-        this.nonSetElectrical = nonSetElectrical;
-    }
-
-    public String getAutomationIncluded() {
-        return automationIncluded;
-    }
-
-    public void setAutomationIncluded(String automationIncluded) {
-        this.automationIncluded = automationIncluded;
-    }
-
-    public String getTwoOfThree() {
-        return twoOfThree;
-    }
-
-    public void setTwoOfThree(String twoOfThree) {
-        this.twoOfThree = twoOfThree;
-    }
-
-    public String getPhoneStyle() {
-        return phoneStyle;
-    }
-
-    public void setPhoneStyle(String phoneStyle) {
-        this.phoneStyle = phoneStyle;
-    }
-
-    public String getOpenCentralizedOr() {
-        return openCentralizedOr;
-    }
-
-    public void setOpenCentralizedOr(String openCentralizedOr) {
-        this.openCentralizedOr = openCentralizedOr;
-    }
-
-    public String getNetworkCabinet() {
-        return networkCabinet;
-    }
-
-    public void setNetworkCabinet(String networkCabinet) {
-        this.networkCabinet = networkCabinet;
-    }
-
-    public String getRightrOfWayDtu() {
-        return rightrOfWayDtu;
-    }
-
-    public void setRightrOfWayDtu(String rightrOfWayDtu) {
-        this.rightrOfWayDtu = rightrOfWayDtu;
-    }
-
-    public String getCheckHomeWork() {
-        return checkHomeWork;
-    }
-
-    public void setCheckHomeWork(String checkHomeWork) {
-        this.checkHomeWork = checkHomeWork;
-    }
-
-    public String getConstructionOfChannel() {
-        return constructionOfChannel;
-    }
-
-    public void setConstructionOfChannel(String constructionOfChannel) {
-        this.constructionOfChannel = constructionOfChannel;
-    }
-
-    public String getCanBexpanded() {
-        return canBexpanded;
-    }
-
-    public void setCanBexpanded(String canBexpanded) {
-        this.canBexpanded = canBexpanded;
-    }
-
-    public String getFieldEquipmentSize() {
-        return fieldEquipmentSize;
-    }
-
-    public void setFieldEquipmentSize(String fieldEquipmentSize) {
-        this.fieldEquipmentSize = fieldEquipmentSize;
-    }
-
-    public String getMaximumCapacitySize() {
-        return maximumCapacitySize;
-    }
-
-    public void setMaximumCapacitySize(String maximumCapacitySize) {
-        this.maximumCapacitySize = maximumCapacitySize;
-    }
-
-    public String getProgramSecurityRisks() {
-        return programSecurityRisks;
-    }
-
-    public void setProgramSecurityRisks(String programSecurityRisks) {
-        this.programSecurityRisks = programSecurityRisks;
-    }
-
-    public String getConstructionImpact() {
-        return constructionImpact;
-    }
-
-    public void setConstructionImpact(String constructionImpact) {
-        this.constructionImpact = constructionImpact;
-    }
-
-    public String getProjectToRepeat() {
-        return projectToRepeat;
-    }
-
-    public void setProjectToRepeat(String projectToRepeat) {
-        this.projectToRepeat = projectToRepeat;
-    }
-
-    public String getBeenImplemented() {
-        return beenImplemented;
-    }
-
-    public void setBeenImplemented(String beenImplemented) {
-        this.beenImplemented = beenImplemented;
-    }
-
-    public String getTransformerNoLoad() {
-        return transformerNoLoad;
-    }
-
-    public void setTransformerNoLoad(String transformerNoLoad) {
-        this.transformerNoLoad = transformerNoLoad;
-    }
-
-    public String getLineConsistency() {
-        return LineConsistency;
-    }
-
-    public void setLineConsistency(String lineConsistency) {
-        LineConsistency = lineConsistency;
-    }
-
-    public String getQuantityConsistent() {
-        return quantityConsistent;
-    }
-
-    public void setQuantityConsistent(String quantityConsistent) {
-        this.quantityConsistent = quantityConsistent;
-    }
-
-    public String getDryConsistency() {
-        return dryConsistency;
-    }
-
-    public void setDryConsistency(String dryConsistency) {
-        this.dryConsistency = dryConsistency;
-    }
-
-    public String getThePlaceType() {
-        return thePlaceType;
-    }
-
-    public void setThePlaceType(String thePlaceType) {
-        this.thePlaceType = thePlaceType;
-    }
-
-    public String getPrecondition() {
-        return precondition;
-    }
-
-    public void setPrecondition(String precondition) {
-        this.precondition = precondition;
-    }
-
-    public String getDtuEmplacement() {
-        return dtuEmplacement;
-    }
-
-    public void setDtuEmplacement(String dtuEmplacement) {
-        this.dtuEmplacement = dtuEmplacement;
-    }
-
-    public String getDateOfProduction() {
-        return dateOfProduction;
-    }
-
-    public void setDateOfProduction(String dateOfProduction) {
-        this.dateOfProduction = dateOfProduction;
-    }
-
-    public String getIntegrationModule() {
-        return integrationModule;
-    }
-
-    public void setIntegrationModule(String integrationModule) {
-        this.integrationModule = integrationModule;
-    }
-
-    public String getPtReplaced() {
-        return ptReplaced;
-    }
-
-    public void setPtReplaced(String ptReplaced) {
-        this.ptReplaced = ptReplaced;
-    }
-
-    public String getOverallTransformation() {
-        return overallTransformation;
-    }
-
-    public void setOverallTransformation(String overallTransformation) {
-        this.overallTransformation = overallTransformation;
-    }
-}

+ 202 - 0
src/main/java/com/jeeplus/modules/sg/financial/project/entity/Project.java

@@ -0,0 +1,202 @@
+package com.jeeplus.modules.sg.financial.project.entity;
+
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.core.persistence.DataEntity;
+
+public class Project extends DataEntity<Project> {
+    private static final long serialVersionUID = 1L;
+    private String type;//类型
+    private String demandUnit;//需求提出单位
+    private String bdzName;//变电站名称
+    private String lineName;//线路名称
+    private String requireName;//项目需求名称
+    private String bulidClassificationResons;//建设理由分类
+    private String bulbidResons;//建设理由
+    private String asicEquipment;//设备基本情况
+    private String runTheClass;//运行班
+    private String projectTeam;//项目组
+    private Double costEstimate;//费用估算
+    private String whetherRheUpwind;//是否迎风期度夏项目
+    private String sureDaDate;//确定下达时间
+    private String textRemark;//备注
+    private String status;
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+    @ExcelField(title="类型", align=2, sort=1)
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+    @ExcelField(title="需求提出单位", align=2, sort=1)
+    public String getDemandUnit() {
+        return demandUnit;
+    }
+
+    public void setDemandUnit(String demandUnit) {
+        this.demandUnit = demandUnit;
+    }
+    @ExcelField(title="变电站名称", align=2, sort=1)
+    public String getBdzName() {
+        return bdzName;
+    }
+
+    public void setBdzName(String bdzName) {
+        this.bdzName = bdzName;
+    }
+    @ExcelField(title="线路名称", align=2, sort=1)
+    public String getLineName() {
+        return lineName;
+    }
+
+    public void setLineName(String lineName) {
+        this.lineName = lineName;
+    }
+    @ExcelField(title="项目需求名称", align=2, sort=1)
+    public String getRequireName() {
+        return requireName;
+    }
+
+    public void setRequireName(String requireName) {
+        this.requireName = requireName;
+    }
+    @ExcelField(title="建设理由分类", align=2, sort=1)
+    public String getBulidClassificationResons() {
+        return bulidClassificationResons;
+    }
+
+    public void setBulidClassificationResons(String bulidClassificationResons) {
+        this.bulidClassificationResons = bulidClassificationResons;
+    }
+    @ExcelField(title="建设理由", align=2, sort=1)
+    public String getBulbidResons() {
+        return bulbidResons;
+    }
+
+    public void setBulbidResons(String bulbidResons) {
+        this.bulbidResons = bulbidResons;
+    }
+    @ExcelField(title="设备基本情况", align=2, sort=1)
+    public String getAsicEquipment() {
+        return asicEquipment;
+    }
+
+    public void setAsicEquipment(String asicEquipment) {
+        this.asicEquipment = asicEquipment;
+    }
+    @ExcelField(title="运行班", align=2, sort=1)
+    public String getRunTheClass() {
+        return runTheClass;
+    }
+
+    public void setRunTheClass(String runTheClass) {
+        this.runTheClass = runTheClass;
+    }
+    @ExcelField(title="项目组", align=2, sort=1)
+    public String getProjectTeam() {
+        return projectTeam;
+    }
+
+    public void setProjectTeam(String projectTeam) {
+        this.projectTeam = projectTeam;
+    }
+    @ExcelField(title="费用估算", align=2, sort=1)
+    public Double getCostEstimate() {
+        return costEstimate;
+    }
+
+    public void setCostEstimate(Double costEstimate) {
+        this.costEstimate = costEstimate;
+    }
+    @ExcelField(title="是否迎风期度夏项目", align=2, sort=1)
+    public String getWhetherRheUpwind() {
+        return whetherRheUpwind;
+    }
+
+    public void setWhetherRheUpwind(String whetherRheUpwind) {
+        this.whetherRheUpwind = whetherRheUpwind;
+    }
+    @ExcelField(title="确定下达时间", align=2, sort=1)
+    public String getSureDaDate() {
+        return sureDaDate;
+    }
+
+    public void setSureDaDate(String sureDaDate) {
+        this.sureDaDate = sureDaDate;
+    }
+    @ExcelField(title="备注", align=2, sort=1)
+    public String getTextRemark() {
+        return textRemark;
+    }
+
+    public void setTextRemark(String textRemark) {
+        this.textRemark = textRemark;
+    }
+    //    private String powerLine;//停电线路
+//    private String itemType;//项目类型
+//    private String prowerPagerItem;//是否为停电打包项目
+//    private String officeJudgment;//证处初步判断
+//    private String includedCivil;//是否含土建
+//    private String steelTube;//钢管杆基础类型
+//    private String bulidResons;//是否需要规划报批
+//    private String equipmentModificationType;//设备改造类型
+//    private String changeTheSize;//改造设备尺寸及间隔数
+//    private String canBecustomized;//是否可定制设备
+//    private String newDeviceName;//是否含新设备命名
+//    private String headOperationOf;//是否含变电站新间隔头运
+//    private String nonSetElectrical;//是否含非设电电气点电器施工
+//    private String automationIncluded;//是否含自动化
+//    private String twoOfThree;//二摇或三遥
+//    private String phoneStyle;//通信方式
+//    private String openCentralizedOr;//柱开集中或就地
+//    private String networkCabinet;//环网柜
+//    private String rightrOfWayDtu;//站房DTU
+//    private String checkHomeWork;//是否需要带带你作业查探
+//    private String constructionOfChannel;//施工通道
+//    private String canBexpanded;//设备基础是否可以扩容
+//    private String fieldEquipmentSize;//现场设备尺寸
+//    private String maximumCapacitySize;//最多可狂容尺寸
+//    private String programSecurityRisks;//方案安全隐患
+//    private String constructionImpact;//是否存在低压或同心县等施工影响
+//    private String projectToRepeat;//立项重复
+//    private String beenImplemented;//是否已经实施
+//    private String transformerNoLoad;//变压器无负荷
+//    private String LineConsistency;//线路名称一致性
+//    private String quantityConsistent;//工程量是否一致
+//    private String dryConsistency;//设备开光干好一致性
+//    private String thePlaceType;//证处类型
+//    private String precondition;//前置条件
+//    private String dtuEmplacement;//DTU安放核查
+//    private String dateOfProduction;//核查环网生产日期
+//    private String integrationModule;//二次是否集成模块
+//    private String ptReplaced;//PT是否需要更换
+//    private String overallTransformation;//设备是否有整体改造必要
+
+    @Override
+    public String toString() {
+        return "Project{" +
+                "type='" + type + '\'' +
+                ", demandUnit='" + demandUnit + '\'' +
+                ", bdzName='" + bdzName + '\'' +
+                ", lineName='" + lineName + '\'' +
+                ", requireName='" + requireName + '\'' +
+                ", bulidClassificationResons='" + bulidClassificationResons + '\'' +
+                ", bulbidResons='" + bulbidResons + '\'' +
+                ", asicEquipment='" + asicEquipment + '\'' +
+                ", runTheClass='" + runTheClass + '\'' +
+                ", projectTeam='" + projectTeam + '\'' +
+                ", costEstimate=" + costEstimate +
+                ", whetherRheUpwind='" + whetherRheUpwind + '\'' +
+                ", sureDaDate='" + sureDaDate + '\'' +
+                ", textRemark='" + textRemark + '\'' +
+                '}';
+    }
+}

+ 19 - 0
src/main/java/com/jeeplus/modules/sg/financial/project/mapper/ProjectMapper.java

@@ -0,0 +1,19 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.financial.project.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.sg.financial.project.entity.Project;
+import com.jeeplus.modules.test.one.dialog.entity.Leave1;
+
+/**
+ * 请假表单MAPPER接口
+ * @author lgf
+ * @version 2018-06-12
+ */
+@MyBatisMapper
+public interface ProjectMapper extends BaseMapper<Project> {
+	
+}

+ 169 - 0
src/main/java/com/jeeplus/modules/sg/financial/project/mapper/xml/ProjectMapper.xml

@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.sg.financial.project.mapper.ProjectMapper">
+    
+	<sql id="projectColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.pro_type As "type",
+		a.demand_unit AS "demandUnit",
+		a.bdz_name As "bdzName",
+	  	a.line_name As "lineName",
+	  	a.require_name AS "requireName",
+		a.build_classification_resons As "bulidClassificationResons",
+		a.bulbid_resons As "bulbidResons",
+		a.asic_equipment AS "asicEquipment",
+		a.run_the_class As "runTheClass",
+		a.project_team AS "projectTeam",
+		a.cost_estimate As "costEstimate",
+		a.whether_rhe_upwind AS "whetherRheUpwind",
+		a.sure_da_date As "sureDaDate",
+		a.text_remark As "textRemark",
+		a.status As "a.status"
+	</sql>
+    
+	<select id="get" resultType="Project" >
+		SELECT 
+			<include refid="projectColumns"/>
+		FROM js_project_detail a
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="Project" >
+		SELECT 
+			<include refid="projectColumns"/>
+		FROM js_project_detail a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+			<if test="id != null and  id != ''">
+				AND a.id = #{id}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="Project" >
+		SELECT
+		<include refid="projectColumns"/>
+		FROM js_project_detail a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert">
+		INSERT INTO js_project_detail(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			pro_type,
+			demand_unit,
+			bdz_name,
+			line_name,
+			require_name,
+			build_classification_resons,
+			bulbid_resons,
+			asic_equipment,
+			run_the_class,
+			project_team,
+			cost_estimate,
+			whether_rhe_upwind,
+			sure_da_date,
+			text_remark,
+			status
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{type},
+			#{demandUnit},
+			#{bdzName},
+			#{lineName},
+    		#{requireName},
+    		#{bulidClassificationResons},
+    		#{bulbidResons},
+    		#{asicEquipment},
+    		#{runTheClass},
+    		#{projectTeam},
+    		#{costEstimate},
+    		#{whetherRheUpwind},
+    		#{sureDaDate},
+    		#{textRemark},
+    		#{status}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE js_project_detail SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks},
+			del_flag = #{delFlag},
+			pro_type = #{type},
+			demand_unit = #{demandUnit},
+			bdz_name = #{bdzName},
+			line_name = #{lineName},
+			require_name = #{requireName},
+			build_classification_resons = #{bulidClassificationResons},
+			bulbid_resons = #{bulbidResons},
+			asic_equipment = #{asicEquipment},
+			run_the_class = #{runTheClass},
+			project_team = #{projectTeam},
+			cost_estimate = #{costEstimate},
+			whether_rhe_upwind = #{whetherRheUpwind},
+			sure_da_date = #{sureDaDate},
+			text_remark = #{textRemark}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM js_project_detail
+		WHERE id = #{id}
+	</update>
+	
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE js_project_detail SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="Project" statementType="STATEMENT">
+		select * FROM js_project_detail  where ${id} = '${value}'
+	</select>
+	
+</mapper>

+ 49 - 0
src/main/java/com/jeeplus/modules/sg/financial/project/service/ProjectService.java

@@ -0,0 +1,49 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.financial.project.service;
+
+import java.util.List;
+
+import com.jeeplus.modules.sg.financial.project.entity.Project;
+import com.jeeplus.modules.sg.financial.project.mapper.ProjectMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.test.one.dialog.entity.Leave1;
+import com.jeeplus.modules.test.one.dialog.mapper.Leave1Mapper;
+
+/**
+ * 请假表单Service
+ * @author lgf
+ * @version 2018-06-12
+ */
+@Service
+@Transactional(readOnly = true)
+public class ProjectService extends CrudService<ProjectMapper, Project> {
+
+	public Project get(String id) {
+		return super.get(id);
+	}
+	
+	public List<Project> findList(Project project) {
+		return super.findList(project);
+	}
+	
+	public Page<Project> findPage(Page<Project> page, Project project) {
+		return super.findPage(page, project);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(Project project) {
+		super.save(project);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(Project project) {
+		super.delete(project);
+	}
+	
+}

+ 394 - 0
src/main/java/com/jeeplus/modules/sg/financial/project/util/ImportUtil.java

@@ -0,0 +1,394 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.financial.project.util;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.utils.Reflections;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.sys.entity.Area;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.text.NumberFormat;
+import java.text.SimpleDateFormat;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 导入Excel文件(支持“XLS”和“XLSX”格式)
+ * @author jeeplus
+ * @version 2016-03-10
+ */
+public class ImportUtil {
+
+	private static Logger log = LoggerFactory.getLogger(ImportUtil.class);
+
+	/**
+	 * 工作薄对象
+	 */
+	private Workbook wb;
+
+	/**
+	 * 工作表对象
+	 */
+	private Sheet sheet;
+
+	/**
+	 * 标题行号
+	 */
+	private int headerNum;
+
+	/**
+	 * 构造函数
+	 * @param path 导入文件,读取第一个工作表
+	 * @param headerNum 标题行号,数据行号=标题行号+1
+	 * @throws InvalidFormatException
+	 * @throws IOException
+	 */
+	public ImportUtil(String fileName, int headerNum)
+			throws InvalidFormatException, IOException {
+		this(new File(fileName), headerNum);
+	}
+
+	/**
+	 * 构造函数
+	 * @param path 导入文件对象,读取第一个工作表
+	 * @param headerNum 标题行号,数据行号=标题行号+1
+	 * @throws InvalidFormatException
+	 * @throws IOException
+	 */
+	public ImportUtil(File file, int headerNum)
+			throws InvalidFormatException, IOException {
+		this(file, headerNum, 0);
+	}
+
+	/**
+	 * 构造函数
+	 * @param path 导入文件
+	 * @param headerNum 标题行号,数据行号=标题行号+1
+	 * @param sheetIndex 工作表编号
+	 * @throws InvalidFormatException
+	 * @throws IOException
+	 */
+	public ImportUtil(String fileName, int headerNum, int sheetIndex)
+			throws InvalidFormatException, IOException {
+		this(new File(fileName), headerNum, sheetIndex);
+	}
+
+	/**
+	 * 构造函数
+	 * @param path 导入文件对象
+	 * @param headerNum 标题行号,数据行号=标题行号+1
+	 * @param sheetIndex 工作表编号
+	 * @throws InvalidFormatException
+	 * @throws IOException
+	 */
+	public ImportUtil(File file, int headerNum, int sheetIndex)
+			throws InvalidFormatException, IOException {
+		this(file.getName(), new FileInputStream(file), headerNum, sheetIndex);
+	}
+
+	/**
+	 * 构造函数
+	 * @param file 导入文件对象
+	 * @param headerNum 标题行号,数据行号=标题行号+1
+	 * @param sheetIndex 工作表编号
+	 * @throws InvalidFormatException
+	 * @throws IOException
+	 */
+	public ImportUtil(MultipartFile multipartFile, int headerNum, int sheetIndex)
+			throws InvalidFormatException, IOException {
+		this(multipartFile.getOriginalFilename(), multipartFile.getInputStream(), headerNum, sheetIndex);
+	}
+
+	/**
+	 * 构造函数
+	 * @param path 导入文件对象
+	 * @param headerNum 标题行号,数据行号=标题行号+1
+	 * @param sheetIndex 工作表编号
+	 * @throws InvalidFormatException
+	 * @throws IOException
+	 */
+	public ImportUtil(String fileName, InputStream is, int headerNum, int sheetIndex)
+			throws InvalidFormatException, IOException {
+		if (StringUtils.isBlank(fileName)){
+			throw new RuntimeException("导入文档为空!");
+		}else if(fileName.toLowerCase().endsWith("xls")){    
+			this.wb = new HSSFWorkbook(is);    
+        }else if(fileName.toLowerCase().endsWith("xlsx")){  
+        	this.wb = new XSSFWorkbook(is);
+        }else{  
+        	throw new RuntimeException("文档格式不正确!");
+        }  
+		if (this.wb.getNumberOfSheets()<sheetIndex){
+			throw new RuntimeException("文档中没有工作表!");
+		}
+		this.sheet = this.wb.getSheetAt(sheetIndex);
+		this.headerNum = headerNum;
+		log.debug("Initialize success.");
+	}
+	
+	/**
+	 * 获取行对象
+	 * @param rownum
+	 * @return
+	 */
+	public Row getRow(int rownum){
+		return this.sheet.getRow(rownum);
+	}
+
+	/**
+	 * 获取数据行号
+	 * @return
+	 */
+	public int getDataRowNum(){
+		return headerNum+1;
+	}
+	
+	/**
+	 * 获取最后一个数据行号
+	 * @return
+	 */
+	public int getLastDataRowNum(){
+		return this.sheet.getLastRowNum()+headerNum;
+	}
+	
+	/**
+	 * 获取最后一个列号
+	 * @return
+	 */
+	public int getLastCellNum(){
+		return this.getRow(headerNum).getLastCellNum();
+	}
+	
+	/**
+	 * 获取单元格值
+	 * @param row 获取的行
+	 * @param column 获取单元格列号
+	 * @return 单元格值
+	 */
+	public Object getCellValue(Row row, int column) {
+		Object val = "";
+		try {
+			Cell cell = row.getCell(column);
+			if (cell != null) {
+				if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
+					// val = cell.getNumericCellValue();
+					// 当excel 中的数据为数值或日期是需要特殊处理
+					if (HSSFDateUtil.isCellDateFormatted(cell)) {
+						double d = cell.getNumericCellValue();
+						Date date = HSSFDateUtil.getJavaDate(d);
+						SimpleDateFormat dformat = new SimpleDateFormat(
+								"yyyy-MM-dd");
+						val = dformat.format(date);
+					} else {
+						NumberFormat nf = NumberFormat.getInstance();
+						nf.setGroupingUsed(false);// true时的格式:1,234,567,890
+						val = nf.format(cell.getNumericCellValue());// 数值类型的数据为double,所以需要转换一下
+					}
+				} else if (cell.getCellType() == Cell.CELL_TYPE_STRING) {
+					val = cell.getStringCellValue();
+				} else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
+					val = cell.getCellFormula();
+				} else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) {
+					val = cell.getBooleanCellValue();
+				} else if (cell.getCellType() == Cell.CELL_TYPE_ERROR) {
+					val = cell.getErrorCellValue();
+				}
+			}
+		} catch (Exception e) {
+			return val;
+		}
+		return val;
+	}
+	
+	/**
+	 * 获取导入数据列表
+	 * @param cls 导入对象类型
+	 * @param groups 导入分组
+	 */
+	public <E> List<E> getDataList(Class<E> cls, int... groups) throws InstantiationException, IllegalAccessException{
+		List<Object[]> annotationList = Lists.newArrayList();
+		// Get annotation field 
+		Field[] fs = cls.getDeclaredFields();
+		for (Field f : fs){
+			ExcelField ef = f.getAnnotation(ExcelField.class);
+			if (ef != null && (ef.type()==0 || ef.type()==2)){
+				if (groups!=null && groups.length>0){
+					boolean inGroup = false;
+					for (int g : groups){
+						if (inGroup){
+							break;
+						}
+						for (int efg : ef.groups()){
+							if (g == efg){
+								inGroup = true;
+								annotationList.add(new Object[]{ef, f});
+								break;
+							}
+						}
+					}
+				}else{
+					annotationList.add(new Object[]{ef, f});
+				}
+			}
+		}
+		// Get annotation method
+		Method[] ms = cls.getDeclaredMethods();
+		for (Method m : ms){
+			ExcelField ef = m.getAnnotation(ExcelField.class);
+			if (ef != null && (ef.type()==0 || ef.type()==2)){
+				if (groups!=null && groups.length>0){
+					boolean inGroup = false;
+					for (int g : groups){
+						if (inGroup){
+							break;
+						}
+						for (int efg : ef.groups()){
+							if (g == efg){
+								inGroup = true;
+								annotationList.add(new Object[]{ef, m});
+								break;
+							}
+						}
+					}
+				}else{
+					annotationList.add(new Object[]{ef, m});
+				}
+			}
+		}
+		// Field sorting
+		Collections.sort(annotationList, new Comparator<Object[]>() {
+			public int compare(Object[] o1, Object[] o2) {
+				return new Integer(((ExcelField)o1[0]).sort()).compareTo(
+						new Integer(((ExcelField)o2[0]).sort()));
+			};
+		});
+		//log.debug("Import column count:"+annotationList.size());
+		// Get excel data
+		List<E> dataList = Lists.newArrayList();
+		for (int i = this.getDataRowNum(); i < this.getLastDataRowNum(); i++) {
+			E e = (E)cls.newInstance();
+			int column = 0;
+			Row row = this.getRow(i);
+			StringBuilder sb = new StringBuilder();
+			for (Object[] os : annotationList){
+				Object val = this.getCellValue(row, column++);
+				if (val != null){
+					ExcelField ef = (ExcelField)os[0];
+					// If is dict type, get dict value
+					if (StringUtils.isNotBlank(ef.dictType())){
+						val = DictUtils.getDictValue(val.toString(), ef.dictType(), "");
+						//log.debug("Dictionary type value: ["+i+","+colunm+"] " + val);
+					}
+					// Get param type and type cast
+					Class<?> valType = Class.class;
+					if (os[1] instanceof Field){
+						valType = ((Field)os[1]).getType();
+					}else if (os[1] instanceof Method){
+						Method method = ((Method)os[1]);
+						if ("get".equals(method.getName().substring(0, 3))){
+							valType = method.getReturnType();
+						}else if("set".equals(method.getName().substring(0, 3))){
+							valType = ((Method)os[1]).getParameterTypes()[0];
+						}
+					}
+					//log.debug("Import value type: ["+i+","+column+"] " + valType);
+					try {
+						//如果导入的java对象,需要在这里自己进行变换。
+						if (valType == String.class){
+							String s = String.valueOf(val.toString());
+							if(StringUtils.endsWith(s, ".0")){
+								val = StringUtils.substringBefore(s, ".0");
+							}else{
+								val = String.valueOf(val.toString());
+							}
+						}else if (valType == Integer.class){
+							val = Double.valueOf(val.toString()).intValue();
+						}else if (valType == Long.class){
+							val = Double.valueOf(val.toString()).longValue();
+						}else if (valType == Double.class){
+							val = Double.valueOf(val.toString());
+						}else if (valType == Float.class){
+							val = Float.valueOf(val.toString());
+						}else if (valType == Date.class){
+							SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
+							val=sdf.parse(val.toString()); 
+						}else if (valType == User.class){
+							val = UserUtils.getByUserName(val.toString());
+						}else if (valType == Office.class){
+							val = UserUtils.getByOfficeName(val.toString());
+						}else if (valType == Area.class){
+							val = UserUtils.getByAreaName(val.toString());
+						}else{
+							if (ef.fieldType() != Class.class){
+								val = ef.fieldType().getMethod("getValue", String.class).invoke(null, val.toString());
+							}else{
+								val = Class.forName(this.getClass().getName().replaceAll(this.getClass().getSimpleName(), 
+										"fieldtype."+valType.getSimpleName()+"Type")).getMethod("getValue", String.class).invoke(null, val.toString());
+							}
+						}
+					} catch (Exception ex) {
+						log.info("Get cell value ["+i+","+column+"] error: " + ex.toString());
+						val = null;
+					}
+					// set entity value
+					if (os[1] instanceof Field){
+						Reflections.invokeSetter(e, ((Field)os[1]).getName(), val);
+					}else if (os[1] instanceof Method){
+						String mthodName = ((Method)os[1]).getName();
+						if ("get".equals(mthodName.substring(0, 3))){
+							mthodName = "set"+StringUtils.substringAfter(mthodName, "get");
+						}
+						Reflections.invokeMethod(e, mthodName, new Class[] {valType}, new Object[] {val});
+					}
+				}
+				sb.append(val+", ");
+			}
+			dataList.add(e);
+			log.debug("Read success: ["+i+"] "+sb.toString());
+		}
+		return dataList;
+	}
+
+//	/**
+//	 * 导入测试
+//	 */
+//	public static void main(String[] args) throws Throwable {
+//		
+//		ImportExcel ei = new ImportExcel("target/export.xlsx", 1);
+//		
+//		for (int i = ei.getDataRowNum(); i < ei.getLastDataRowNum(); i++) {
+//			Row row = ei.getRow(i);
+//			for (int j = 0; j < ei.getLastCellNum(); j++) {
+//				Object val = ei.getCellValue(row, j);
+//				System.out.print(val+", ");
+//			}
+//			System.out.print("\n");
+//		}
+//		
+//	}
+}

+ 57 - 0
src/main/java/com/jeeplus/modules/sg/financial/project/util/ProExcelInfo.java

@@ -0,0 +1,57 @@
+package com.jeeplus.modules.sg.financial.project.util;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.modules.sg.financial.project.entity.Project;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.usermodel.Row;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+public  class ProExcelInfo {
+    /**
+     * 获取表格数据
+     * @param importUtil
+     * @return List<ErpAccount> 导入表格数据
+     */
+    public static List<Project> getProjectUtil(ImportUtil importUtil)  {
+        int lastRow = importUtil.getLastDataRowNum();
+        List<Project> list = new ArrayList<Project>();
+        Project project = null;
+        String costEstimate="";//费用估算
+        for(int i=2; i<lastRow;i++){
+            project = new Project();
+            Row row = importUtil.getRow(i);
+            String requireCode = (String) importUtil.getCellValue(row,5);
+            if(StringUtils.isNotBlank(requireCode)) {
+                project.setRequireName(requireCode);
+                project.setType((String)importUtil.getCellValue(row,1));//类型
+                project.setDemandUnit((String)importUtil.getCellValue(row,2));//需求提出单位
+                project.setBdzName((String)importUtil.getCellValue(row,3));//变电站名称
+                project.setLineName((String)importUtil.getCellValue(row,4));//线路名称
+                project.setBulidClassificationResons((String)importUtil.getCellValue(row,6));//建设理由分类
+                project.setBulbidResons((String)importUtil.getCellValue(row,7));//建设理由
+                project.setAsicEquipment((String)importUtil.getCellValue(row,8));//设备基本状况
+                project.setRunTheClass((String)importUtil.getCellValue(row,9));//运行班
+                project.setProjectTeam((String)importUtil.getCellValue(row,10));//项目组
+                costEstimate = (String) importUtil.getCellValue(row,11);
+                project.setCostEstimate(Double.parseDouble(costEstimate));//费用估算
+                project.setWhetherRheUpwind((String)importUtil.getCellValue(row,12));//是否迎风期度夏项目
+                project.setSureDaDate((String)importUtil.getCellValue(row,13));//确定下达时间
+                project.setTextRemark((String)importUtil.getCellValue(row,14));//备注
+                project.setStatus(getStatus());
+                list.add(project);
+            }
+        }
+        return list;
+    }
+
+    public static String getStatus(){
+        int machineId = 1;
+        int hashCodeV = UUID.randomUUID().toString().hashCode();
+        if (hashCodeV<0){
+            hashCodeV=-hashCodeV;
+        }
+        return  (machineId+String.format("%015d",hashCodeV));
+    }
+}

+ 203 - 0
src/main/java/com/jeeplus/modules/sg/financial/project/web/ProjectController.java

@@ -0,0 +1,203 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.financial.project.web;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+
+import com.jeeplus.modules.sg.financial.project.entity.Project;
+import com.jeeplus.modules.sg.financial.project.service.ProjectService;
+import com.jeeplus.modules.sg.financial.project.util.ImportUtil;
+import com.jeeplus.modules.sg.financial.project.util.ProExcelInfo;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.modules.test.one.dialog.entity.Leave1;
+
+/**
+ * 表单Controller
+ * @author lgf
+ * @version 2018-06-12
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/sg/financial/project")
+public class ProjectController extends BaseController {
+
+	@Autowired
+	private ProjectService projectService;
+	
+	@ModelAttribute
+	public Project get(@RequestParam(required=false) String id) {
+		Project entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = projectService.get(id);
+		}
+		if (entity == null){
+			entity = new Project();
+		}
+		return entity;
+	}
+	
+	/**
+	 * 工程管理表单列表页面
+	 */
+//	@RequiresPermissions("test:one:dialog:leave1:list")
+	@RequestMapping(value = {"list", ""})
+	public String list(Project project, Model model) {
+		model.addAttribute("leave1", project);
+		return "modules/sg/financial/project/projectList";
+	}
+	
+		/**
+	 * 表单列表数据
+	 */
+	@ResponseBody
+//	@RequiresPermissions("test:one:dialog:leave1:list")
+	@RequestMapping(value = "data")
+	public Map<String, Object> data(Project project, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<Project> page = projectService.findPage(new Page<Project>(request, response), project);
+		return getBootstrapData(page);
+	}
+
+	/**
+	 * 查看,增加,编辑表单表单页面
+	 */
+//	@RequiresPermissions(value={"test:one:dialog:leave1:view","test:one:dialog:leave1:add","test:one:dialog:leave1:edit"},logical=Logical.OR)
+	@RequestMapping(value = "form")
+	public String form(Project project, Model model) {
+		model.addAttribute("leave1", project);
+		return "modules/sg/financial/project/projectForm";
+	}
+
+	/**
+	 * 保存表单
+	 */
+	@ResponseBody
+//	@RequiresPermissions(value={"test:one:dialog:leave1:add","test:one:dialog:leave1:edit"},logical=Logical.OR)
+	@RequestMapping(value = "save")
+	public AjaxJson save(Project project, Model model) throws Exception{
+		AjaxJson j = new AjaxJson();
+		/**
+		 * 后台hibernate-validation插件校验
+		 */
+		String errMsg = beanValidator(project);
+		if (StringUtils.isNotBlank(errMsg)){
+			j.setSuccess(false);
+			j.setMsg(errMsg);
+			return j;
+		}
+		//新增或编辑表单保存
+		projectService.save(project);//保存
+		j.setSuccess(true);
+		j.setMsg("保存项目明细数据成功");
+		return j;
+	}
+	
+	/**
+	 * 删除表单
+	 */
+	@ResponseBody
+//	@RequiresPermissions("test:one:dialog:leave1:del")
+	@RequestMapping(value = "delete")
+	public AjaxJson delete(Project project) {
+		AjaxJson j = new AjaxJson();
+		projectService.delete(project);
+		j.setMsg("删除项目明细数据成功");
+		return j;
+	}
+	
+	/**
+	 * 批量表单
+	 */
+	@ResponseBody
+//	@RequiresPermissions("test:one:dialog:leave1:del")
+	@RequestMapping(value = "deleteAll")
+	public AjaxJson deleteAll(String ids) {
+		AjaxJson j = new AjaxJson();
+		String idArray[] =ids.split(",");
+		for(String id : idArray){
+			projectService.delete(projectService.get(id));
+		}
+		j.setMsg("删除项目明细数据成功");
+		return j;
+	}
+	
+	/**
+	 * 导出excel文件
+	 */
+	@ResponseBody
+//	@RequiresPermissions("test:one:dialog:leave1:export")
+    @RequestMapping(value = "export")
+    public AjaxJson exportFile(Project project, HttpServletRequest request, HttpServletResponse response) {
+		AjaxJson j = new AjaxJson();
+		try {
+            String fileName = "项目明细表"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<Project> page = projectService.findPage(new Page<Project>(request, response, -1), project);
+    		new ExportExcel("项目明细表", Project.class).setDataList(page.getList()).write(response, fileName).dispose();
+    		j.setSuccess(true);
+    		j.setMsg("导出成功!");
+    		return j;
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("导出项目明细表表单记录失败!失败信息:"+e.getMessage());
+		}
+			return j;
+    }
+
+	/**
+	 * 导入Excel数据
+
+	 */
+	@ResponseBody
+//	@RequiresPermissions("test:one:dialog:leave1:import")
+    @RequestMapping(value = "import")
+   	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
+		AjaxJson j = new AjaxJson();
+		try {
+			int successNum = 0;
+			int failureNum = 0;
+			StringBuilder failureMsg = new StringBuilder();
+			ImportUtil importUtil = new ImportUtil(file, 0, 0);
+			List<Project> projects = ProExcelInfo.getProjectUtil(importUtil);
+			for (Project project : projects){
+				try{
+					projectService.save(project);
+					successNum++;
+				}catch(ConstraintViolationException ex){
+					failureNum++;
+				}catch (Exception ex) {
+					failureNum++;
+				}
+			}
+			if (failureNum>0){
+				failureMsg.insert(0, ",失败 "+failureNum+" 条项目表单记录。");
+			}
+			j.setMsg( "已成功导入 "+successNum+" 条项目表单记录"+failureMsg);
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("导入项目表单失败!失败信息:"+e.getMessage());
+		}
+		return j;
+    }
+}