Browse Source

Merge remote-tracking branch 'origin/master'

yue 5 years atrás
parent
commit
217c70a10f
28 changed files with 988 additions and 250 deletions
  1. 1 1
      src/main/java/com/jeeplus/modules/sg/financial/erpcredit/mapper/xml/ErpCreditMapper.xml
  2. 4 0
      src/main/java/com/jeeplus/modules/sg/financial/erpcredit/mapper/xml/ErpCreditMaterialMapper.xml
  3. 1 1
      src/main/java/com/jeeplus/modules/sg/financial/erpcredit/service/ErpCreditService.java
  4. 37 2
      src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ErpInfo.java
  5. 19 15
      src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtil1.java
  6. 14 2
      src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtil2.java
  7. 1 1
      src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/DataMaintenanceMapper.java
  8. 7 0
      src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/xml/DataMaintenanceMapper.xml
  9. 2 4
      src/main/java/com/jeeplus/modules/sg/financial/settlement/service/DataMaintenanceService.java
  10. 25 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/entity/Storage.java
  11. 1 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/mapper/MaterialPlanMapper.java
  12. 8 2
      src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/mapper/xml/MaterialPlanMapper.xml
  13. 41 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/service/MaterialPlanService.java
  14. 72 8
      src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/util/MaterialPlanInfo.java
  15. 93 21
      src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/web/MeterialPlanController.java
  16. 270 77
      src/main/java/com/jeeplus/modules/sg/managementcenter/project/entity/Project.java
  17. 80 2
      src/main/java/com/jeeplus/modules/sg/managementcenter/project/mapper/xml/ProjectMapper.xml
  18. 39 10
      src/main/java/com/jeeplus/modules/sg/managementcenter/project/util/ProExcelInfo.java
  19. 6 1
      src/main/java/com/jeeplus/modules/sg/managementcenter/project/web/ProjectController.java
  20. BIN
      src/main/resources/freemarker/excelmodel/flagstorage.xlsx
  21. BIN
      src/main/resources/freemarker/excelmodel/竣工决算模板.xlsx
  22. 10 10
      src/main/webapp/webpage/modules/sg/financial/erp/erpCreditList.jsp
  23. 1 1
      src/main/webapp/webpage/modules/sg/managementcenter/activiti/constructionForm.jsp
  24. 2 2
      src/main/webapp/webpage/modules/sg/managementcenter/materialplan/materialplanForm.jsp
  25. 75 35
      src/main/webapp/webpage/modules/sg/managementcenter/materialplan/materialplanList.js
  26. 13 23
      src/main/webapp/webpage/modules/sg/managementcenter/materialplan/materialplanList.jsp
  27. 154 21
      src/main/webapp/webpage/modules/sg/managementcenter/project/projectList.js
  28. 12 11
      src/main/webapp/webpage/modules/sg/managementcenter/project/projectList.jsp

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/mapper/xml/ErpCreditMapper.xml

@@ -51,7 +51,7 @@
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			${dataScope}
 			<if test="itemId != null and itemId != ''">
-				AND a.item_id = #{itemId}
+				AND a.item_id LIKE CONCAT(CONCAT('%',#{itemId},'%'))
 			</if>
 			<if test="status!=null and status !=''">
 				AND a.status = #{status}

+ 4 - 0
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/mapper/xml/ErpCreditMaterialMapper.xml

@@ -76,6 +76,8 @@
 			erp_credit_id,
 			eqm_material_details,
 			mtl_booked_fee,
+			mtl_unit,
+			mtl_numbers,
 			mtl_supplier_name
 		) VALUES (
 			#{id},
@@ -88,6 +90,8 @@
 			#{erpCredit.id},
 			#{eqmMaterialDetails2},
 			#{mtlBookedFee2},
+			#{mtlUnit},
+			#{mtlNumbers},
 			#{mtlSupplierName}
 		)
 	</insert>

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/service/ErpCreditService.java

@@ -160,7 +160,7 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
 
     //维护表
     public List<MaintainData> getFindListMain(List<String> strings){
-        return dataMaintenanceMapper.findListMain();
+        return dataMaintenanceMapper.findListMain(strings);
     }
 
     //导出

+ 37 - 2
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ErpInfo.java

@@ -8,6 +8,7 @@ import groovy.util.IFileNameFinder;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.Row;
 
+import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
@@ -157,7 +158,6 @@ public  class ErpInfo {
             if (flag){//如果为true
                 //施工费合计 赋值为安装费(有 设备费入账金额 或者 材料费入账金额)
                 erpCredit.setConsInstallFee(erpCredit.getConsTotalFee());
-                erpCredit.setCableTube("");
             }else {
                 //施工费合计 赋值为 建筑费(无 设备费入账金额 以及 材料费入账金额)
                 erpCredit.setConsBuildingFee(erpCredit.getConsTotalFee());
@@ -219,7 +219,9 @@ public  class ErpInfo {
                 }
             }
         }
-        return erpCredits;
+        List<ErpCredit> otherManageFee = getOtherManageFee(erpCredits);//计算其他费用法人管理费
+
+        return otherManageFee;
     }
 
     /**
@@ -531,6 +533,39 @@ public  class ErpInfo {
         }
         return erpCredit;
     }
+
+    /**
+     * 法人管理费计算
+     * @param erpCredits
+     * @return
+     */
+    public static List<ErpCredit> getOtherManageFee(List<ErpCredit> erpCredits){
+        Double total=0.0;//其他:监理费
+        Double otherLegalManage = 0.0;//法人管理费
+        for (ErpCredit erpCredit1:erpCredits){
+            total = 0.0;
+            if (null!=erpCredit1.getOtherSupervisorFee()){
+                total  += erpCredit1.getOtherSupervisorFee();
+            }
+            if (null!=erpCredit1.getOtherDesignFee()){
+                total += erpCredit1.getOtherDesignFee();
+            }
+            if (null!=erpCredit1.getOtherBeWorkFee()){
+                total += erpCredit1.getOtherBeWorkFee();
+            }
+            if (null!=erpCredit1.getConsBuildingFee()){
+                total += erpCredit1.getOtherBuildLoan();
+            }
+            if (null!=erpCredit1.getOtherLineDamages()){
+                total += erpCredit1.getOtherLineDamages();
+            }
+            if (null!=erpCredit1.getOtherLegalManage()){
+                otherLegalManage = erpCredit1.getOtherLegalManage();
+            }
+            erpCredit1.setOtherLegalManage(otherLegalManage-total);
+        }
+        return erpCredits;
+    }
     /**
      * 获取设备的list集合
      * @param list 导入的表格 bean对象

+ 19 - 15
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtil1.java

@@ -13,11 +13,11 @@ import java.util.TreeSet;
 /**
  * 导出数据计算类
  */
-public class ExportUtil1 {
+public class ExportUtil1{
     public static String POWER_DEPARTMENT="配电检修工区";
     public static String POWER_BDZ="变压器";
     public static String POWER_BOXBDZ="箱式变电站";
-    public static String POWER_HGW="环网";
+    public static String POWER_HGW="环网";
     public static String POWER_KGG="高压开关柜";
     public static String POWER_ZYXL="中压线路";
     public static String POWER_BDZCOUNT="160200001";
@@ -175,7 +175,8 @@ public class ExportUtil1 {
         schedule.setItemId(erpCredit.getItemId());//得到项目定义编号
         schedule.setItemName(erpCredit.getItemName());//得到项目名称
         netAmount = getErpCreditMaterial(erpCredit);//得到材料费
-        if (null!=erpCredit.getConsInstallFee()&&erpCredit.getTenKvModel()!=null){
+        //设备费&&erpCredit.getTenKvModel()!=null
+        if (null!=erpCredit.getConsInstallFee()){
             schedule.setActualIntallProject(decimalFormat.format(netAmount+erpCredit.getConsInstallFee()));
             actualTotalFee=actualTotalFee+netAmount+erpCredit.getConsInstallFee();//合计金额累加
         }
@@ -195,15 +196,17 @@ public class ExportUtil1 {
                 }
             }
             if (flag){
-                if (null!=erpCredit.getConsInstallFee()){
-                   if (null==erpCredit.getTenKvModel()){
-                       schedule.setActualEquipmentValue(decimalFormat.format(netAmount+erpCredit.getConsInstallFee()));//实际设备价值
-                       actualTotalFee+=netAmount+erpCredit.getConsInstallFee();//实际费用累加
-                   }else {
-                       schedule.setActualEquipmentValue(decimalFormat.format(netAmount));//实际设备价值
-                       actualTotalFee+=netAmount;//实际费用累加
-                   }
-                }
+                schedule.setActualEquipmentValue(decimalFormat.format(netAmount));//实际设备价值
+                actualTotalFee+=netAmount;//实际费用累加
+//                if (null!=erpCredit.getConsInstallFee()){
+//                   if (null==erpCredit.getTenKvModel()){
+//                       schedule.setActualEquipmentValue(decimalFormat.format(netAmount+erpCredit.getConsInstallFee()));//实际设备价值
+//                       actualTotalFee+=netAmount+erpCredit.getConsInstallFee();//实际费用累加
+//                   }else {
+//                       schedule.setActualEquipmentValue(decimalFormat.format(netAmount));//实际设备价值
+//                       actualTotalFee+=netAmount;//实际费用累加
+//                   }
+//                }
             }
             flag=false;//数据清0
             netAmount=0.0;
@@ -312,14 +315,14 @@ public class ExportUtil1 {
                 compensateFee+=maintainData.getDamages();
                 cleaningFees+=maintainData.getDamages();//清理费
                 preWorkingFee+=maintainData.getPreliminaryWorkFee();//项目前期工作费
-                itemManageFee+=maintainData.getMaterialFee();//法人管理经费
+                itemManageFee+=maintainData.getManagementFee();//法人管理经费
                 supervisionFee+=maintainData.getSupervisionFee();//监理费
                 designFee+=maintainData.getDesignFee();//工程设计费
             }
             //项目建设管理费
             managementFee = preWorkingFee+itemManageFee+supervisionFee;
             //合计金额
-            totalFee=preWorkingFee+itemManageFee+supervisionFee+designFee;
+            totalFee=preWorkingFee+itemManageFee+supervisionFee+designFee+compensateFee;//合计金额
             scheduleOther.setPreWorkingFee(decimalFormat.format(preparationFee));//项目前期工作费合计
             scheduleOther.setItemManageFee(decimalFormat.format(itemManageFee));//法人管理经费
 //            scheduleOther.setCleaningFees(decimalFormat.format(cleaningFees));//余物清理费
@@ -420,7 +423,7 @@ public class ExportUtil1 {
                             materialEquipment.setMeUnitPrice(decimalFormat.format(erpCreditChild2.getMtlBookedFee2()));
                         }
                     }else {
-                        materialEquipment.setMeUnit("0");
+                        materialEquipment.setMeUnit("");
                     }
                     materialEquipments.add(materialEquipment);
                 }
@@ -495,6 +498,7 @@ public class ExportUtil1 {
             if (null!=erpCredit.getTenKvModel()){//10kv电缆架空导线型号
                 transferOfPower1.setPowerTenKvCableType(erpCredit.getTenKvModel());
             }
+            //添加保护管信息
             if (null!=erpCredit.getCableTube()){
                 transferOfPower1.setPowerTenKvCableType(erpCredit.getCableTube());
             }

+ 14 - 2
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtil2.java

@@ -426,6 +426,7 @@ public class ExportUtil2 {
         XSSFRow row = (XSSFRow) sheet.createRow(5);
         XSSFCell cell = row.getCell(0);
         CellStyle cellStyle = getCellStyle(workbook);//设备材料清册
+        CellStyle cellStyle1 = getCellStyleAlign(workbook);
         MaterialEquipment materialEquipment = null;
         if (null!=sheet){
             List<MaterialEquipment> materialEquipments = ExportUtil1.getMaterialEquipment(erpCredits);
@@ -438,8 +439,8 @@ public class ExportUtil2 {
                 }else {
                     cell = row.getCell(0);
                 }
-                cell.setCellValue(materialEquipment.getId());//项目定义编号
-                cell.setCellStyle(cellStyle);//添加边框
+                cell.setCellValue(i+1);//项目定义编号
+                cell.setCellStyle(cellStyle1);//添加边框
                 //第二行
                 if (row.getCell(1)==null){
                     cell = row.createCell(1);
@@ -866,6 +867,17 @@ public class ExportUtil2 {
         style.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框
         return style;
     }
+    //设置边框
+    public static CellStyle getCellStyleAlign(Workbook workbook){
+        CellStyle style = workbook.createCellStyle();
+        style.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 居中
+        style.setBorderBottom(HSSFCellStyle.BORDER_THIN); //下边框
+        style.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框
+        style.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框
+        style.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框
+        return style;
+    }
+
     public static List<String> getListSchOther(List<String> list,ScheduleOther scheduleOther){
         list.add(scheduleOther.getRequisitionSite());
         list.add(scheduleOther.getCompensationAcquisition());

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/DataMaintenanceMapper.java

@@ -15,5 +15,5 @@ import java.util.List;
 public interface DataMaintenanceMapper extends BaseMapper<MaintainData> {
 	int insertList(@Param("list") List<MaintainData> list);
 	void deleteData(String projectId);
-	List<MaintainData> findListMain();
+	List<MaintainData> findListMain(List<String> strings);
 }

+ 7 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/xml/DataMaintenanceMapper.xml

@@ -256,5 +256,12 @@
 		<include refid="infoColumns"/>
 		FROM js_maintain_data a
 		WHERE a.del_flag = '0'
+		and a.project_id in
+		<if test="list != null">
+			<foreach collection="list" index="index" item="item" open="("
+					 separator="," close=")">
+				#{item}
+			</foreach>
+		</if>
 	</select>
 </mapper>

+ 2 - 4
src/main/java/com/jeeplus/modules/sg/financial/settlement/service/DataMaintenanceService.java

@@ -70,9 +70,10 @@ public class DataMaintenanceService extends CrudService<DataMaintenanceMapper, M
 
     //判断erp是否存在
     public List<String> getJudge(List<String> strings){
+		MaintainData maintainData1 = new MaintainData();
 		Boolean flag = false;
 		List<String> list = new ArrayList<>();//定义一个集合
-		List<MaintainData> maintainDatas = dataMaintenanceMapper.findListMain();//得到维护表所有数据
+		List<MaintainData> maintainDatas = dataMaintenanceMapper.findList(maintainData1);//得到维护表所有数据
 		if (null!=strings&&strings.size()>0){
 			if (null!=maintainDatas&&maintainDatas.size()>0){
 				for (String str :strings){
@@ -88,9 +89,6 @@ public class DataMaintenanceService extends CrudService<DataMaintenanceMapper, M
 					}
 				}
 			}
-			for (MaintainData maintainData:maintainDatas){
-				System.out.println(maintainData+"---");
-			}
 		}
 		return list;
 	}

+ 25 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/entity/Storage.java

@@ -0,0 +1,25 @@
+package com.jeeplus.modules.sg.managementcenter.materialplan.entity;
+
+/**
+ * 是否入库
+ */
+public class Storage {
+    private String uniqueCode;//物资唯一码(批次编码)
+    private String flagStorage;//是否入库
+
+    public String getUniqueCode() {
+        return uniqueCode;
+    }
+
+    public void setUniqueCode(String uniqueCode) {
+        this.uniqueCode = uniqueCode;
+    }
+
+    public String getFlagStorage() {
+        return flagStorage;
+    }
+
+    public void setFlagStorage(String flagStorage) {
+        this.flagStorage = flagStorage;
+    }
+}

+ 1 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/mapper/MaterialPlanMapper.java

@@ -22,4 +22,5 @@ import java.util.List;
 public interface MaterialPlanMapper extends BaseMapper<MaterialPlan> {
     public Integer insertList(@Param("list") List<MaterialPlan> list);
     void deleteData(String uniqueCode);
+    void updateTime(MaterialPlan materialPlan);
 }

+ 8 - 2
src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/mapper/xml/MaterialPlanMapper.xml

@@ -42,7 +42,7 @@
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			${dataScope}
 			<if test="uniqueCode != null and  uniqueCode != ''">
-				AND a.unique_code = LIKE CONCAT(CONCAT('%',#{uniqueCode},'%'))
+				AND a.unique_code LIKE CONCAT(CONCAT('%',#{uniqueCode},'%'))
 			</if>
 		</where>
 		<choose>
@@ -198,7 +198,13 @@
 			supplier_name = #{supplierName}
 		WHERE unique_code = #{uniqueCode}
 	</update>
-	
+	<update id="updateTime">
+		UPDATE sm_material_plan SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			delivery_schedule =#{deliverySchedule}
+		WHERE unique_code = #{uniqueCode}
+	</update>
 	
 	<!--物理删除-->
 	<update id="delete">

+ 41 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/service/MaterialPlanService.java

@@ -10,10 +10,17 @@ import com.jeeplus.modules.sg.managementcenter.materialplan.entity.MaterialPlan;
 import com.jeeplus.modules.sg.managementcenter.materialplan.mapper.MaterialPlanMapper;
 import com.jeeplus.modules.sg.managementcenter.project.entity.Project;
 import com.jeeplus.modules.sg.managementcenter.project.mapper.ProjectMapper;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URLEncoder;
 import java.util.List;
 
 @Service
@@ -60,4 +67,38 @@ public class MaterialPlanService extends CrudService<MaterialPlanMapper, Materia
 	@Transactional(readOnly = false)
 	public void deleteData(String uniqueCode){materialPlanMapper.deleteData(uniqueCode);
 	}
+
+	@Transactional
+	public void updateTime(MaterialPlan materialPlan){
+		materialPlan.preUpdate();
+		materialPlanMapper.updateTime(materialPlan);
+	}
+
+	public void exportHeard( HttpServletResponse response){
+		InputStream inputStream = null;
+		XSSFWorkbook workbook = null;
+		try {
+			String path = (getSispPath() + "excelmodel/flagstorage.xlsx");
+			File file = new File(path);
+			inputStream = new FileInputStream(file);// 将excel文件转为输入流
+			workbook = new XSSFWorkbook(inputStream);// 创建个workbook,
+			String str = URLEncoder.encode("是否入库模板.xlsx", "UTF8");
+			OutputStream outputStream = response.getOutputStream();
+			response.reset();
+			response.setHeader("Content-Disposition", "attachment;filename="+str);
+			response.setContentType("application/vnd.ms-excel;charset=UTF-8");
+			workbook.write(outputStream);
+			outputStream.flush();
+			outputStream.close();
+		} catch (Exception e) {
+			e.printStackTrace();
+		} finally {
+		}
+	}
+
+
+	public  String getSispPath() {
+		String sispPath = this.getClass().getResource("/").getPath()+ "freemarker/";
+		return sispPath;
+	}
 }

+ 72 - 8
src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/util/MaterialPlanInfo.java

@@ -1,6 +1,7 @@
 package com.jeeplus.modules.sg.managementcenter.materialplan.util;
 import com.jeeplus.modules.sg.managementcenter.materialplan.entity.InventoryTable;
 import com.jeeplus.modules.sg.managementcenter.materialplan.entity.MaterialPlan;
+import com.jeeplus.modules.sg.managementcenter.materialplan.entity.Storage;
 import groovy.util.IFileNameFinder;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.formula.functions.T;
@@ -15,9 +16,13 @@ public class MaterialPlanInfo {
     public static final Integer MATER_TWO = 2;
     public static final Integer MATER_THREE = 3;
     public static final Integer MATER_FOUR = 4;
-    public static final String MATER_CODE = "物资唯一码";
+    public static final String MATER_CODE = "物资唯一码";
     public static final String MATER_CODETWO = "批次编码";
     public static final String MATER_NUMBER = "序号";
+    public static final String MATER_FLAG = "入库";
+    public static final String MATER_MATERIAL="物料";
+    public static final String MATER_YES = "是";
+    public static final String MATER_NO = "否";
 //    public static final String MATER_STORAGE = "是否入库";
 //    public static final String MATER_COUNT = "库存数量";
 //    public static final String MATER_DONGCOUNT = "冻结数量";
@@ -84,30 +89,73 @@ public class MaterialPlanInfo {
     }
 
     /**
+     * 导入是否入库
+     */
+    public static List<Storage> getFlagStorage(ImportUtil importUtil)  {
+        int lastRow = importUtil.getLastDataRowNum();
+        List<Storage> list = new ArrayList<Storage>();
+        Storage storage = null;
+        String uniqueCode="";//费用估算
+        for(int i=1; i<lastRow;i++){
+            storage = new Storage();
+            Row row = importUtil.getRow(i);
+            uniqueCode = (String)importUtil.getCellValue(row,0);
+            if (StringUtils.isNotBlank(uniqueCode)){
+                storage.setUniqueCode(uniqueCode);
+                storage.setFlagStorage((String)importUtil.getCellValue(row,1));
+                list.add(storage);
+            }
+        }
+        return list;
+    }
+    /**
      * 判断excel是哪张表
      * @return
      */
     public static Integer getJudgeExcel(ImportUtil importUtil){
         Row row = importUtil.getRow(0);
         String firstName = (String) importUtil.getCellValue(row,0);
+        String basicTwoName = (String) importUtil.getCellValue(row,2);
+        String twoName = (String)importUtil.getCellValue(row,1);
+        String fourName = (String)importUtil.getCellValue(row,4);
         if (firstName.contains(MATER_CODE)||firstName.contains(MATER_CODETWO)){
-            return MATER_ONE;
+           if (basicTwoName.contains(MATER_MATERIAL)){
+               return MATER_ONE;
+           }
+            if (twoName.contains(MATER_FLAG)){
+                return MATER_THREE;
+            }
         }
-        if (firstName.contains(MATER_NUMBER)){
+        if (firstName.contains(MATER_NUMBER)&&fourName.contains(MATER_MATERIAL)){
             return MATER_TWO;
         }
         return MATER_FOUR;
     }
 
     /**
-     * 获取新的数据系列
+     * 判断是否入库符合规范
+     * @param importUtil
+     * @return
+     */
+    public static boolean getJudeStorage(ImportUtil importUtil){
+        boolean flag = false;
+        List<Storage> flagStorage = MaterialPlanInfo.getFlagStorage(importUtil);
+        if (null!=flagStorage&&flagStorage.size()>0){
+            for (Storage storage:flagStorage){
+                if (!storage.getFlagStorage().equals(MATER_YES)&&!storage.getFlagStorage().equals(MATER_NO)){
+                    flag = true;
+                    break;
+                }
+            }
+        }
+        return flag;
+    }
+    /**
+     * 获取库存数据
      * @return
      */
     public static List<MaterialPlan> getUpdateMaterPlan(List<MaterialPlan> materialPlanList,ImportUtil importUtil){
         List<InventoryTable> inventoryTableList = MaterialPlanInfo.getInventoryTableUtil(importUtil);
-        for (InventoryTable inventoryTable:inventoryTableList){
-            System.out.println(inventoryTable);
-        }
         for (MaterialPlan materialPlan:materialPlanList){
             for (InventoryTable inventoryTable:inventoryTableList){
                 if (materialPlan.getUniqueCode().equals(inventoryTable.getUniqueCode())){
@@ -116,12 +164,28 @@ public class MaterialPlanInfo {
                     materialPlan.setSupplierName(inventoryTable.getSupplierName());
                 }
             }
-            System.out.println("qweqweqw====="+materialPlan);
         }
         return materialPlanList;
     }
 
     /**
+     * 获取是否入库数据
+     * @param materialPlanList
+     * @param importUtil
+     * @return
+     */
+    public static List<MaterialPlan> getUpdateMaterPlanStorage(List<MaterialPlan> materialPlanList,ImportUtil importUtil){
+        List<Storage> flagStorage = MaterialPlanInfo.getFlagStorage(importUtil);
+        for (MaterialPlan materialPlan:materialPlanList){
+            for (Storage storage:flagStorage){
+                if (materialPlan.getUniqueCode().equals(storage.getUniqueCode())){
+                    materialPlan.setFlagStorage(storage.getFlagStorage());
+                }
+            }
+        }
+        return materialPlanList;
+    }
+    /**
      * 生成随机数
      * @return
      */

+ 93 - 21
src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/web/MeterialPlanController.java

@@ -18,6 +18,7 @@ import com.jeeplus.modules.sg.managementcenter.project.entity.Project;
 import com.jeeplus.modules.sg.managementcenter.project.service.ProjectService;
 import com.jeeplus.modules.sg.managementcenter.project.util.ProExcelInfo;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -151,15 +152,15 @@ public class MeterialPlanController extends BaseController {
     public AjaxJson exportFile(MaterialPlan materialPlan, HttpServletRequest request, HttpServletResponse response) {
 		AjaxJson j = new AjaxJson();
 		try {
-            String fileName = "项目明细表"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            String fileName = "物料计划表"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
             Page<MaterialPlan> page = materialPlanService.findPage(new Page<MaterialPlan>(request, response, -1), materialPlan);
-    		new ExportExcel("项目明细表", MaterialPlan.class).setDataList(page.getList()).write(response, fileName).dispose();
+    		new ExportExcel("物料计划表", MaterialPlan.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());
+			j.setMsg("导出物料计划表单记录失败!失败信息:"+e.getMessage());
 		}
 			return j;
     }
@@ -173,25 +174,35 @@ public class MeterialPlanController extends BaseController {
     @RequestMapping(value = "import")
    	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) throws IOException, InvalidFormatException {
 		AjaxJson j = new AjaxJson();
-//		try {
+		MaterialPlan material = new MaterialPlan();
+		List<MaterialPlan> materialPlanList = materialPlanService.findAllList(material);
+		if (null==materialPlanList&&materialPlanList.size()<=0){
+			j.setSuccess(false);
+			j.setMsg( "还没有导入基础数据表");
+			return j;
+		}
+		try {
+			Integer count = 0;
 			int successNum = 0;
 			int failureNum = 0;
 			StringBuilder failureMsg = new StringBuilder();
 			ImportUtil importUtil = new ImportUtil(file,0,0);
 			Integer integer = MaterialPlanInfo.getJudgeExcel(importUtil);//验证表
-
-			System.out.println(integer);
-			if (integer==1){
-				List<MaterialPlan> materialPlans = MaterialPlanInfo.getMaterPlanUtil(importUtil);
-				materialPlanService.saveList(materialPlans);
+			if (integer==MaterialPlanInfo.MATER_FOUR){
+				j.setSuccess(false);
+				j.setMsg("表不符合规范,请重新导入");
+				return j;
 			}
-			if (integer==2){
-				MaterialPlan material = new MaterialPlan();
-				List<MaterialPlan> materialPlanList = materialPlanService.findAllList(material);
-				if (null==materialPlanList&&materialPlanList.size()<=0){
-					j.setMsg( "还没有导入基础数据表");
-					return j;
+			if (integer==MaterialPlanInfo.MATER_ONE){
+				List<MaterialPlan> materialPlans = MaterialPlanInfo.getMaterPlanUtil(importUtil);
+				try{
+					materialPlanService.saveList(materialPlans);
+					count = materialPlans.size();
+				}catch (Exception e){
+					e.printStackTrace();
 				}
+			}
+			if (integer==MaterialPlanInfo.MATER_TWO){
 				List<MaterialPlan> updateMaterPlans = MaterialPlanInfo.getUpdateMaterPlan(materialPlanList, importUtil);
 				for (MaterialPlan updateMaterPlan:updateMaterPlans){
 					try{
@@ -204,14 +215,75 @@ public class MeterialPlanController extends BaseController {
 					}
 				}
 			}
+			if (integer == MaterialPlanInfo.MATER_THREE){
+				boolean judeStorage = MaterialPlanInfo.getJudeStorage(importUtil);
+				if (judeStorage){
+					j.setSuccess(false);
+					j.setMsg( "是否入库表不符合规范");
+					return j;
+				}
+				List<MaterialPlan> updateMaterPlanStorage = MaterialPlanInfo.getUpdateMaterPlanStorage(materialPlanList, importUtil);
+				for (MaterialPlan updateStorage:updateMaterPlanStorage){
+					try{
+						materialPlanService.update(updateStorage);
+						successNum++;
+					}catch(ConstraintViolationException ex){
+						failureNum++;
+					}catch (Exception ex) {
+						failureNum++;
+					}
+				}
+			}
 			if (failureNum>0){
-				failureMsg.insert(0, ",失败 "+failureNum+" 条项目表单记录。");
+				failureMsg.insert(0, ",失败 "+failureNum+" 条项记录。");
+			}
+			if (integer == MaterialPlanInfo.MATER_ONE){
+				j.setMsg( "已成功导入 "+count+" 条基本表记录"+failureMsg);
+			}
+			if (integer == MaterialPlanInfo.MATER_TWO){
+				j.setMsg( "已成功导入 "+successNum+" 条库存表记录"+failureMsg);
 			}
-			j.setMsg( "已成功导入 "+successNum+" 条项目表单记录"+failureMsg);
-//		} catch (Exception e) {
-//			j.setSuccess(false);
-//			j.setMsg("导入失败!失败信息:"+e.getMessage());
-//		}
+			if (integer == MaterialPlanInfo.MATER_THREE){
+				j.setMsg( "已成功导入 "+successNum+" 条是否入库记录"+failureMsg);
+			}
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("导入失败!失败信息:"+e.getMessage());
+		}
 		return j;
     }
+	@ResponseBody
+    @RequestMapping(value = "addtime")
+    public AjaxJson addTime(MaterialPlan materialPlan){
+		AjaxJson j = new AjaxJson();
+		try {
+			materialPlanService.updateTime(materialPlan);
+			j.setSuccess(true);
+			j.setMsg("更新成功");
+			return j;
+		}catch (Exception e){
+			e.printStackTrace();
+		}
+		j.setSuccess(false);
+		j.setMsg("时间不符合规范");
+		return j;
+	}
+
+	/**
+	 * 下载导入数据模板
+	 */
+	@ResponseBody
+	@RequestMapping(value = "import/template")
+	public AjaxJson importFileTemplate(HttpServletResponse response) {
+		AjaxJson j = new AjaxJson();
+		try {
+			materialPlanService.exportHeard(response);
+			j.setSuccess(true);
+			j.setMsg("导出成功!");
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg( "导入模板下载失败!失败信息:"+e.getMessage());
+		}
+		return j;
+	}
 }

+ 270 - 77
src/main/java/com/jeeplus/modules/sg/managementcenter/project/entity/Project.java

@@ -9,7 +9,15 @@ public class Project extends DataEntity<Project> {
     private String demandUnit;//需求提出单位
     private String bdzName;//变电站名称
     private String lineName;//线路名称
-    private String requireName;//项目需求名称
+    private String requireName;//需求项目名称
+
+    private String projectId;//工程编号
+    private String projectName;//项目名称
+    private String projectNumber;//项目定义号
+    private String projectManageRole;//项目经理角色
+    private String constructionUnit;//施工单位
+    private String constructionUnitRole;//施工单位角色
+    private String clarificaitonType;//交底类型
     private String bulidClassificationResons;//建设理由分类
     private String bulbidResons;//建设理由
     private String asicEquipment;//设备基本情况
@@ -19,12 +27,28 @@ public class Project extends DataEntity<Project> {
     private String whetherRheUpwind;//是否迎风期度夏项目
     private String sureDaDate;//确定下达时间
     private String textRemark;//备注
-    private String status;
-
-    public String getStatus() {
-        return status;
-    }
 
+    private String powerLine;//停电线路
+    private String powerScope;//停电范围
+    private String projectType;//项目类型
+    private String powerFlagPackage;//是否为停电打包项目
+    private String preliminaryJudgment;//证处初步判断
+    private String flagCivilEngineering;//是否含土建(不含钢管杆)
+    private String steelTubePole;//钢管杆基础类型
+    private String flagApprovalPlanning;//是否需要规矩报批
+    private String equCreateType;//设备改造类型
+    private String equCreateSize;//改造设备尺寸及间隔数
+    private String flagNewEquName;//是否新设备命名
+    private String includeBdzNews;//是否含变电站新闻格投运
+    private String flagNoElectrical;//是否非涉电电气施工
+    private String drawingsWork;//图纸标注的带点作业情况
+    private String flagAutomation;//是否含自动化
+    private String twoAndThreeRemote;//二或三
+    private String phoneStyle;//通信方式
+    private String stayOpenArea;//柱开集中或就业地
+    private String ringNetworkCabinet;//环网柜
+    private String stationDtu;//站房dtu
+    private String status;
     public void setStatus(String status) {
         this.status = status;
     }
@@ -36,7 +60,8 @@ public class Project extends DataEntity<Project> {
     public void setType(String type) {
         this.type = type;
     }
-    @ExcelField(title="需求提出单位", align=2, sort=1)
+
+    @ExcelField(title="需求提出单位", align=2, sort=2)
     public String getDemandUnit() {
         return demandUnit;
     }
@@ -44,7 +69,7 @@ public class Project extends DataEntity<Project> {
     public void setDemandUnit(String demandUnit) {
         this.demandUnit = demandUnit;
     }
-    @ExcelField(title="变电站名称", align=2, sort=1)
+    @ExcelField(title="变电站名称", align=2, sort=3)
     public String getBdzName() {
         return bdzName;
     }
@@ -52,7 +77,7 @@ public class Project extends DataEntity<Project> {
     public void setBdzName(String bdzName) {
         this.bdzName = bdzName;
     }
-    @ExcelField(title="线路名称", align=2, sort=1)
+    @ExcelField(title="线路名称", align=2, sort=4)
     public String getLineName() {
         return lineName;
     }
@@ -60,15 +85,72 @@ public class Project extends DataEntity<Project> {
     public void setLineName(String lineName) {
         this.lineName = lineName;
     }
-    @ExcelField(title="项目需求名称", align=2, sort=1)
+    @ExcelField(title="项目需求名称", align=2, sort=5)
     public String getRequireName() {
         return requireName;
     }
 
+    @ExcelField(title="工程编号", align=2, sort=6)
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+    @ExcelField(title="项目名称", align=2, sort=7)
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+    @ExcelField(title="项目定义号", align=2, sort=8)
+    public String getProjectNumber() {
+        return projectNumber;
+    }
+
+    public void setProjectNumber(String projectNumber) {
+        this.projectNumber = projectNumber;
+    }
+    @ExcelField(title="项目经理角色", align=2, sort=9)
+    public String getProjectManageRole() {
+        return projectManageRole;
+    }
+
+    public void setProjectManageRole(String projectManageRole) {
+        this.projectManageRole = projectManageRole;
+    }
+    @ExcelField(title="施工单位", align=2, sort=10)
+    public String getConstructionUnit() {
+        return constructionUnit;
+    }
+
+    public void setConstructionUnit(String constructionUnit) {
+        this.constructionUnit = constructionUnit;
+    }
+    @ExcelField(title="施工单位角色", align=2, sort=11)
+    public String getConstructionUnitRole() {
+        return constructionUnitRole;
+    }
+
+    public void setConstructionUnitRole(String constructionUnitRole) {
+        this.constructionUnitRole = constructionUnitRole;
+    }
+    @ExcelField(title="交底类型", align=2, sort=12)
+    public String getClarificaitonType() {
+        return clarificaitonType;
+    }
+
+    public void setClarificaitonType(String clarificaitonType) {
+        this.clarificaitonType = clarificaitonType;
+    }
+
     public void setRequireName(String requireName) {
         this.requireName = requireName;
     }
-    @ExcelField(title="建设理由分类", align=2, sort=1)
+    @ExcelField(title="建设理由分类", align=2, sort=13)
     public String getBulidClassificationResons() {
         return bulidClassificationResons;
     }
@@ -76,7 +158,7 @@ public class Project extends DataEntity<Project> {
     public void setBulidClassificationResons(String bulidClassificationResons) {
         this.bulidClassificationResons = bulidClassificationResons;
     }
-    @ExcelField(title="建设理由", align=2, sort=1)
+    @ExcelField(title="建设理由", align=2, sort=14)
     public String getBulbidResons() {
         return bulbidResons;
     }
@@ -84,7 +166,7 @@ public class Project extends DataEntity<Project> {
     public void setBulbidResons(String bulbidResons) {
         this.bulbidResons = bulbidResons;
     }
-    @ExcelField(title="设备基本情况", align=2, sort=1)
+    @ExcelField(title="设备基本情况", align=2, sort=15)
     public String getAsicEquipment() {
         return asicEquipment;
     }
@@ -92,7 +174,7 @@ public class Project extends DataEntity<Project> {
     public void setAsicEquipment(String asicEquipment) {
         this.asicEquipment = asicEquipment;
     }
-    @ExcelField(title="运行班", align=2, sort=1)
+    @ExcelField(title="运行班", align=2, sort=16)
     public String getRunTheClass() {
         return runTheClass;
     }
@@ -100,7 +182,7 @@ public class Project extends DataEntity<Project> {
     public void setRunTheClass(String runTheClass) {
         this.runTheClass = runTheClass;
     }
-    @ExcelField(title="项目组", align=2, sort=1)
+    @ExcelField(title="项目组", align=2, sort=17)
     public String getProjectTeam() {
         return projectTeam;
     }
@@ -108,7 +190,7 @@ public class Project extends DataEntity<Project> {
     public void setProjectTeam(String projectTeam) {
         this.projectTeam = projectTeam;
     }
-    @ExcelField(title="费用估算", align=2, sort=1)
+    @ExcelField(title="费用估算", align=2, sort=18)
     public Double getCostEstimate() {
         return costEstimate;
     }
@@ -116,7 +198,7 @@ public class Project extends DataEntity<Project> {
     public void setCostEstimate(Double costEstimate) {
         this.costEstimate = costEstimate;
     }
-    @ExcelField(title="是否迎风期度夏项目", align=2, sort=1)
+    @ExcelField(title="是否迎风期度夏项目", align=2, sort=19)
     public String getWhetherRheUpwind() {
         return whetherRheUpwind;
     }
@@ -124,7 +206,7 @@ public class Project extends DataEntity<Project> {
     public void setWhetherRheUpwind(String whetherRheUpwind) {
         this.whetherRheUpwind = whetherRheUpwind;
     }
-    @ExcelField(title="确定下达时间", align=2, sort=1)
+    @ExcelField(title="确定下达时间", align=2, sort=20)
     public String getSureDaDate() {
         return sureDaDate;
     }
@@ -132,71 +214,182 @@ public class Project extends DataEntity<Project> {
     public void setSureDaDate(String sureDaDate) {
         this.sureDaDate = sureDaDate;
     }
-    @ExcelField(title="备注", align=2, sort=1)
+
+    @ExcelField(title="备注", align=2, sort=21)
     public String getTextRemark() {
         return textRemark;
     }
 
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
     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 + '\'' +
-                '}';
+
+    @ExcelField(title="停电线路", align=2, sort=22)
+    public String getPowerLine() {
+        return powerLine;
+    }
+
+    public void setPowerLine(String powerLine) {
+        this.powerLine = powerLine;
+    }
+    @ExcelField(title="停电范围", align=2, sort=23)
+    public String getPowerScope() {
+        return powerScope;
+    }
+
+    public void setPowerScope(String powerScope) {
+        this.powerScope = powerScope;
+    }
+    @ExcelField(title="项目类型", align=2, sort=24)
+    public String getProjectType() {
+        return projectType;
+    }
+
+    public void setProjectType(String projectType) {
+        this.projectType = projectType;
+    }
+    @ExcelField(title="是否为停电打包项目", align=2, sort=25)
+    public String getPowerFlagPackage() {
+        return powerFlagPackage;
+    }
+
+    public void setPowerFlagPackage(String powerFlagPackage) {
+        this.powerFlagPackage = powerFlagPackage;
+    }
+    @ExcelField(title="证处初步判断", align=2, sort=26)
+    public String getPreliminaryJudgment() {
+        return preliminaryJudgment;
+    }
+
+    public void setPreliminaryJudgment(String preliminaryJudgment) {
+        this.preliminaryJudgment = preliminaryJudgment;
+    }
+    @ExcelField(title="是否含土建(不含钢管杆)", align=2, sort=27)
+    public String getFlagCivilEngineering() {
+        return flagCivilEngineering;
+    }
+
+    public void setFlagCivilEngineering(String flagCivilEngineering) {
+        this.flagCivilEngineering = flagCivilEngineering;
+    }
+    @ExcelField(title="钢管杆基础类型", align=2, sort=28)
+    public String getSteelTubePole() {
+        return steelTubePole;
+    }
+
+    public void setSteelTubePole(String steelTubePole) {
+        this.steelTubePole = steelTubePole;
+    }
+    @ExcelField(title="是否需要规矩报批", align=2, sort=29)
+    public String getFlagApprovalPlanning() {
+        return flagApprovalPlanning;
+    }
+
+    public void setFlagApprovalPlanning(String flagApprovalPlanning) {
+        this.flagApprovalPlanning = flagApprovalPlanning;
+    }
+    @ExcelField(title="设备改造类型", align=2, sort=30)
+    public String getEquCreateType() {
+        return equCreateType;
+    }
+
+    public void setEquCreateType(String equCreateType) {
+        this.equCreateType = equCreateType;
+    }
+    @ExcelField(title="改造设备尺寸及间隔数", align=2, sort=31)
+    public String getEquCreateSize() {
+        return equCreateSize;
+    }
+
+    public void setEquCreateSize(String equCreateSize) {
+        this.equCreateSize = equCreateSize;
+    }
+    @ExcelField(title="是否新设备命名", align=2, sort=32)
+    public String getFlagNewEquName() {
+        return flagNewEquName;
+    }
+
+    public void setFlagNewEquName(String flagNewEquName) {
+        this.flagNewEquName = flagNewEquName;
+    }
+    @ExcelField(title="是否含变电站新闻隔投运", align=2, sort=33)
+    public String getIncludeBdzNews() {
+        return includeBdzNews;
+    }
+
+    public void setIncludeBdzNews(String includeBdzNews) {
+        this.includeBdzNews = includeBdzNews;
+    }
+    @ExcelField(title="是否非涉电电气施工", align=2, sort=34)
+    public String getFlagNoElectrical() {
+        return flagNoElectrical;
+    }
+
+    public void setFlagNoElectrical(String flagNoElectrical) {
+        this.flagNoElectrical = flagNoElectrical;
+    }
+    @ExcelField(title="图纸标注的带点作业情况", align=2, sort=35)
+    public String getDrawingsWork() {
+        return drawingsWork;
+    }
+
+    public void setDrawingsWork(String drawingsWork) {
+        this.drawingsWork = drawingsWork;
+    }
+    @ExcelField(title="是否含自动化", align=2, sort=36)
+    public String getFlagAutomation() {
+        return flagAutomation;
+    }
+
+    public void setFlagAutomation(String flagAutomation) {
+        this.flagAutomation = flagAutomation;
+    }
+    @ExcelField(title="二摇或三摇", align=2, sort=37)
+    public String getTwoAndThreeRemote() {
+        return twoAndThreeRemote;
+    }
+
+    public void setTwoAndThreeRemote(String twoAndThreeRemote) {
+        this.twoAndThreeRemote = twoAndThreeRemote;
+    }
+    @ExcelField(title="通信方式", align=2, sort=38)
+    public String getPhoneStyle() {
+        return phoneStyle;
+    }
+
+    public void setPhoneStyle(String phoneStyle) {
+        this.phoneStyle = phoneStyle;
+    }
+    @ExcelField(title="stayOpenArea", align=2, sort=39)
+    public String getStayOpenArea() {
+        return stayOpenArea;
+    }
+
+    public void setStayOpenArea(String stayOpenArea) {
+        this.stayOpenArea = stayOpenArea;
+    }
+    @ExcelField(title="环网柜", align=2, sort=40)
+    public String getRingNetworkCabinet() {
+        return ringNetworkCabinet;
+    }
+
+    public void setRingNetworkCabinet(String ringNetworkCabinet) {
+        this.ringNetworkCabinet = ringNetworkCabinet;
+    }
+    @ExcelField(title="站房DTU", align=2, sort=41)
+    public String getStationDtu() {
+        return stationDtu;
+    }
+
+    public void setStationDtu(String stationDtu) {
+        this.stationDtu = stationDtu;
+    }
+
+    public String getStatus() {
+        return status;
     }
 }

+ 80 - 2
src/main/java/com/jeeplus/modules/sg/managementcenter/project/mapper/xml/ProjectMapper.xml

@@ -15,6 +15,13 @@
 		a.bdz_name As "bdzName",
 	  	a.line_name As "lineName",
 	  	a.require_name AS "requireName",
+	  	a.project_id AS "projectId",
+	  	a.project_name AS "projectName",
+	  	a.project_number AS "projectNumber",
+		a.project_manage_role AS "projectManageRole",
+		a.construction_unit AS "constructionUnit",
+		a.construction_unit_role AS "constructionUnitRole",
+		a.clarificaiton_type AS "clarificaitonType",
 		a.build_classification_resons As "bulidClassificationResons",
 		a.bulbid_resons As "bulbidResons",
 		a.asic_equipment AS "asicEquipment",
@@ -22,8 +29,27 @@
 		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.sure_da_date AS "sureDaDate",
+		a.text_remark AS "textRemark",
+		a.power_line AS "powerLine",
+    	a.power_scope AS "powerScope",
+    	a.project_type AS "projectType",
+        a.power_flag_package AS "powerFlagPackage",
+     	a.preliminary_judgment AS "preliminaryJudgment",
+    	a.flag_civil_engineering AS "flagCivilEngineering",
+    	a.steel_tube_pole AS "steelTubePole",
+    	a.flag_approval_planning AS "flagApprovalPlanning",
+    	a.equ_create_type AS "equCreateType",
+    	a.equ_create_size AS "equCreateSize",
+    	a.flag_new_equ_name AS "flagNewEquName",
+    	a.flag_no_electrical AS "flagNoElectrical",
+		a.drawings_work AS "drawingsWork",
+    	a.flag_automation AS "flagAutomation",
+    	a.two_and_three_remote AS "twoAndThreeRemote",
+    	a.phone_style AS "phoneStyle",
+    	a.stay_open_area AS "stayOpenArea",
+    	a.ring_network_cabinet AS "ringNetworkCabinet",
+    	a.station_dtu AS "stationDtu",
 		a.status As "a.status"
 	</sql>
     
@@ -93,6 +119,13 @@
 			bdz_name,
 			line_name,
 			require_name,
+			project_id,
+			project_name,
+			project_number,
+			project_manage_role,
+			construction_unit,
+			construction_unit_role,
+			clarificaiton_type,
 			build_classification_resons,
 			bulbid_resons,
 			asic_equipment,
@@ -102,6 +135,25 @@
 			whether_rhe_upwind,
 			sure_da_date,
 			text_remark,
+			power_line,
+			power_scope,
+			project_type,
+			power_flag_package,
+			preliminary_judgment,
+			flag_civil_engineering,
+			steel_tube_pole,
+			flag_approval_planning,
+			equ_create_type,
+			equ_create_size,
+			flag_new_equ_name,
+			flag_no_electrical,
+			drawings_work,
+			flag_automation,
+			two_and_three_remote,
+			phone_style,
+			stay_open_area,
+			ring_network_cabinet,
+			station_dtu,
 			status
 		) VALUES (
 			#{id},
@@ -116,6 +168,13 @@
 			#{bdzName},
 			#{lineName},
     		#{requireName},
+    		#{projectId},
+			#{projectName},
+			#{projectNumber},
+			#{projectManageRole},
+			#{constructionUnit},
+			#{constructionUnitRole},
+			#{clarificaitonType},
     		#{bulidClassificationResons},
     		#{bulbidResons},
     		#{asicEquipment},
@@ -125,6 +184,25 @@
     		#{whetherRheUpwind},
     		#{sureDaDate},
     		#{textRemark},
+    		#{powerLine},
+    	 	#{powerScope},
+    	 	#{projectType},
+        	#{powerFlagPackage},
+     	 	#{preliminaryJudgment},
+    	 	#{flagCivilEngineering},
+    	 	#{steelTubePole},
+    	 	#{flagApprovalPlanning},
+    		#{equCreateType},
+    		#{equCreateSize},
+    	 	#{flagNewEquName},
+    		#{flagNoElectrical},
+			#{drawingsWork},
+    	 	#{flagAutomation},
+    	 	#{twoAndThreeRemote},
+     		#{phoneStyle},
+    	 	#{stayOpenArea},
+    	 	#{ringNetworkCabinet},
+    	 	#{stationDtu},
     		#{status}
 		)
 	</insert>

+ 39 - 10
src/main/java/com/jeeplus/modules/sg/managementcenter/project/util/ProExcelInfo.java

@@ -28,16 +28,45 @@ public  class ProExcelInfo {
                 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.setProjectId((String)importUtil.getCellValue(row,6));//工程编号
+                project.setProjectName((String)importUtil.getCellValue(row,7));//项目名称
+                project.setProjectNumber((String)importUtil.getCellValue(row,8));//项目定义号
+                project.setProjectManageRole((String)importUtil.getCellValue(row,9));//项目经理角色
+                project.setConstructionUnit((String)importUtil.getCellValue(row,10));//施工单位
+                project.setConstructionUnitRole((String)importUtil.getCellValue(row,11));//施工单位角色
+                project.setClarificaitonType((String)importUtil.getCellValue(row,12));//交底类型
+                project.setBulidClassificationResons((String)importUtil.getCellValue(row,13));//建设理由分类
+                project.setBulbidResons((String)importUtil.getCellValue(row,14));//建设理由
+                project.setAsicEquipment((String)importUtil.getCellValue(row,15));//设备基本状况
+                project.setRunTheClass((String)importUtil.getCellValue(row,16));//运行班
+                project.setProjectTeam((String)importUtil.getCellValue(row,17));//项目组
+                costEstimate = (String) importUtil.getCellValue(row,18);
+                if (null!=costEstimate&&!costEstimate.equals("")){
+                    project.setCostEstimate(Double.parseDouble(costEstimate));//费用估算
+                }
+                project.setWhetherRheUpwind((String)importUtil.getCellValue(row,19));//是否迎风期度夏项目
+                project.setSureDaDate((String)importUtil.getCellValue(row,20));//确定下达时间
+                project.setTextRemark((String)importUtil.getCellValue(row,21));//备注
+                project.setPowerLine((String)importUtil.getCellValue(row,22));//停电线路
+                project.setPowerScope((String)importUtil.getCellValue(row,23));//停电范围
+                project.setProjectType((String)importUtil.getCellValue(row,24));//项目类型
+                project.setPowerFlagPackage((String)importUtil.getCellValue(row,25));//是否为停电打包项目
+                project.setPreliminaryJudgment((String)importUtil.getCellValue(row,26));//证处初步判断
+                project.setFlagCivilEngineering((String)importUtil.getCellValue(row,27));//是否含土建
+                project.setSteelTubePole((String)importUtil.getCellValue(row,28));//钢管杆基础类型
+                project.setFlagApprovalPlanning((String)importUtil.getCellValue(row,29));//是否需要规划报批
+                project.setEquCreateType((String)importUtil.getCellValue(row,30));//设备改造类型
+                project.setEquCreateSize((String)importUtil.getCellValue(row,31));//间隔数
+                project.setFlagNewEquName((String)importUtil.getCellValue(row,32));//是否新设备命名
+                project.setIncludeBdzNews((String)importUtil.getCellValue(row,33));//是否含变电站新闻格投运
+                project.setFlagNoElectrical((String)importUtil.getCellValue(row,34));//是否非射电电气施工
+                project.setDrawingsWork((String)importUtil.getCellValue(row,35));//图纸标注的带点作业情况
+                project.setFlagAutomation((String)importUtil.getCellValue(row,36));//是否含自动化
+                project.setTwoAndThreeRemote((String)importUtil.getCellValue(row,37));//二遥或三
+                project.setPhoneStyle((String)importUtil.getCellValue(row,38));//通信方式
+                project.setStayOpenArea((String)importUtil.getCellValue(row,39));//柱开集中或就业地
+                project.setRingNetworkCabinet((String)importUtil.getCellValue(row,40));//环网柜
+                project.setStationDtu((String)importUtil.getCellValue(row,41));//站房dtu
                 project.setStatus("0");
                 list.add(project);
             }

+ 6 - 1
src/main/java/com/jeeplus/modules/sg/managementcenter/project/web/ProjectController.java

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.modules.sg.managementcenter.project.web;
 
+import java.io.IOException;
 import java.util.List;
 import java.util.Map;
 
@@ -14,6 +15,7 @@ import com.jeeplus.modules.sg.managementcenter.project.entity.Project;
 import com.jeeplus.modules.sg.managementcenter.project.service.ProjectService;
 import com.jeeplus.modules.sg.managementcenter.project.util.ImportUtil;
 import com.jeeplus.modules.sg.managementcenter.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;
@@ -175,7 +177,7 @@ public class ProjectController extends BaseController {
 	@ResponseBody
 //	@RequiresPermissions("test:one:dialog:leave1:import")
     @RequestMapping(value = "import")
-   	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
+   	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request){
 		AjaxJson j = new AjaxJson();
 		try {
 			int successNum = 0;
@@ -183,6 +185,9 @@ public class ProjectController extends BaseController {
 			StringBuilder failureMsg = new StringBuilder();
 			ImportUtil importUtil = new ImportUtil(file, 0, 0);
 			List<Project> projects = ProExcelInfo.getProjectUtil(importUtil);
+			for (Project project1:projects){
+				System.out.println(project1);
+			}
 			for (Project project : projects){
 				try{
 					projectService.save(project);

BIN
src/main/resources/freemarker/excelmodel/flagstorage.xlsx


BIN
src/main/resources/freemarker/excelmodel/竣工决算模板.xlsx


+ 10 - 10
src/main/webapp/webpage/modules/sg/financial/erp/erpCreditList.jsp

@@ -42,16 +42,21 @@
 					<i class="glyphicon glyphicon-plus"></i> 新建
 				</button>
 			<%--</shiro:hasPermission>--%>
+				<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:del">--%>
+				<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
+					<i class="glyphicon glyphicon-remove"></i> 删除
+				</button>
+				<%--</shiro:hasPermission>--%>
 			<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:edit">--%>
 			    <button id="edit" class="btn btn-success" disabled onclick="edit()">
 	            	<i class="glyphicon glyphicon-edit"></i> 修改
 	        	</button>
 			<%--</shiro:hasPermission>--%>
-			<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:del">--%>
-				<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
-	            	<i class="glyphicon glyphicon-remove"></i> 删除
-	        	</button>
-			<%--</shiro:hasPermission>--%>
+				<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:view">--%>
+				<button id="view" class="btn btn-default" onclick="view()">
+					<i class="fa fa-search-plus"></i> 查看
+				</button>
+				<%--</shiro:hasPermission>--%>
 			<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:import">--%>
 				<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
 			<%--</shiro:hasPermission>--%>
@@ -60,11 +65,6 @@
 					<i class="fa fa-file-excel-o"></i> 导出
 				</button>
 			 <%--</shiro:hasPermission>--%>
-			<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:view">--%>
-				<button id="view" class="btn btn-default" onclick="view()">
-					<i class="fa fa-search-plus"></i> 查看
-				</button>
-			<%--</shiro:hasPermission>--%>
 		    </div>
 		
 	<!-- 表格 -->

+ 1 - 1
src/main/webapp/webpage/modules/sg/managementcenter/activiti/constructionForm.jsp

@@ -54,7 +54,7 @@
 								<td class="width-35">
 									<%--<input type='text'  name="projectName" class="form-control required"  value="${construction.projectName}"/>--%>
 									<sys:itemselect url="${ctx}/sg/managementcenter/project/dataSys" id="project" name="project.id" value="${construction.projectName}" labelName="project.requireName" labelValue="${construction.projectName}"
-													title="选择项目号" cssClass="form-control " fieldLabels="${fns:urlEncode('需求编号|项目需求名称|需求提出单位|变电站名称|线路名称|设备基本情况|运行班')}" fieldKeys="id|requireName|demandUnit|bdzName|lineName|asicEquipment|runTheClass" searchLabels="${fns:urlEncode('需求编号|项目需求名称')}" searchKeys="id|requireName" ></sys:itemselect>
+													title="选择项目号" cssClass="form-control " fieldLabels="${fns:urlEncode('项目需求名称|需求提出单位|变电站名称|线路名称|设备基本情况|运行班')}" fieldKeys="requireName|demandUnit|bdzName|lineName|asicEquipment|runTheClass" searchLabels="${fns:urlEncode('项目需求名称')}" searchKeys="requireName" ></sys:itemselect>
 								</td>
 								<td class="width-15 active"><label class="pull-right">接收图纸时间:</label></td>
 								<td class="width-35">

+ 2 - 2
src/main/webapp/webpage/modules/sg/managementcenter/materialplan/materialplanForm.jsp

@@ -2,14 +2,14 @@
 <%@ include file="/webpage/include/taglib.jsp"%>
 <html>
 <head>
-	<title>工程表单管理</title>
+	<title>物料计划管理</title>
 	<meta name="decorator" content="ani"/>
 	<script type="text/javascript">
 
 		$(document).ready(function() {
 
 	        $('#deliverySchedule').datetimepicker({
-				 format: "YYYY-MM-DD HH:mm:ss"
+				 format: "YYYY-MM-DD"
 		    });
 		});
 		function save() {

+ 75 - 35
src/main/webapp/webpage/modules/sg/managementcenter/materialplan/materialplanList.js

@@ -71,11 +71,46 @@ $(document).ready(function() {
                    	   
                    	});
                       
-                   } 
+                   }
                },
               
                onClickRow: function(row, $el){
                },
+                onLoadSuccess:function(data){
+                    var split = data.rows;
+                    for (var i = 0; i < split.length; i++) {
+                        $('#'+split[i].uniqueCode).datetimepicker({
+                            format: "YYYY-MM-DD"
+                        }).on('dp.change',function(i){
+                            return function(ev) {
+                                var newDateTime = ev.date ? ev.date.format('YYYY-MM-DD') : "";
+                                var oldDateTime = ev.oldDate ? ev.oldDate.format('YYYY-MM-DD') : "";
+                                if (newDateTime != oldDateTime) {
+                                    if (""!=oldDateTime){
+                                        jp.confirm('确认要更新时间吗?', function () {
+                                            jp.get("${ctx}/sg/managementcenter/materialplan/addtime?uniqueCode=" + split[i].uniqueCode + "&deliverySchedule=" + newDateTime, function (data) {
+                                                if (data.success) {
+                                                    // jp.success(data.msg);
+                                                } else {
+                                                    jp.error(data.msg);
+                                                }
+                                            })
+                                        })
+                                    }else {
+                                        jp.get("${ctx}/sg/managementcenter/materialplan/addtime?uniqueCode=" + split[i].uniqueCode + "&deliverySchedule=" + newDateTime, function (data) {
+                                            if (data.success) {
+                                                // jp.success(data.msg);
+                                            } else {
+                                                jp.error(data.msg);
+                                            }
+                                        })
+                                    }
+
+                                }
+                            }
+                        }(i));
+                    }
+                },
                	onShowSearch: function () {
 			$("#search-collapse").slideToggle();
 		},
@@ -86,7 +121,7 @@ $(document).ready(function() {
 			,{
 		        field: 'uniqueCode',
 		        title: '物资唯一码(批次编码)',
-                       width:200,
+                       width:180,
 		        sortName: 'uniqueCode'
 		        ,formatter:function(value, row , index){
 
@@ -111,7 +146,7 @@ $(document).ready(function() {
 			,{
 		        field: 'requireCoding',
 		        title: '需求物资编码',
-				width:200,
+				width:120,
 		        sortName: 'requireCoding'
 		       
 		    }
@@ -125,7 +160,7 @@ $(document).ready(function() {
 			,{
 		        field: 'expansionCode',
 		        title: '物料扩展编码',
-					   width:200,
+					   width:100,
 		        sortName: 'expansionCode'
 		    }
 			,{
@@ -136,69 +171,69 @@ $(document).ready(function() {
 
 		    }
                    ,{
+                       field: 'deliverySchedule',
+                       title: '供货计划到日',
+                       width:230,
+                       sortName: 'deliverySchedule',
+                       formatter: getTime
+                   }
+                   ,{
                        field: 'bigDescribe',
                        title: '大类描述',
-                       width:200,
+                       width:120,
                        sortName: 'bigDescribe'
 
                    }
                    ,{
                        field: 'moderateDescribe',
                        title: '中类描述',
-                       width:200,
+                       width:120,
                        sortName: 'moderateDescribe'
 
                    }
                    ,{
                        field: 'smallDescribe',
                        title: '小类描述',
-                       width:200,
+                       width:120,
                        sortName: 'smallDescribe'
 
                    }
                    ,{
                        field: 'requireNumber',
                        title: '需求数量',
-                       width:200,
+                       width:80,
                        sortName: 'requireNumber'
                    }
                    ,{
                        field: 'util',
                        title: '单位',
-                       width:200,
+                       width:50,
                        sortName: 'util'
 
                    }
                    ,{
                        field: 'planToBatch',
                        title: '计划批次',
-                       width:200,
+                       width:120,
                        sortName: 'planToBatch'
 
                    }
                    ,{
-                       field: 'deliverySchedule',
-                       title: '供货计划到日',
-					   width:230,
-                       sortName: 'deliverySchedule',
-                       formatter: getTime
-                   }
-                   ,{
                        field: 'flagStorage',
                        title: '是否入库',
-                       width:200,
+                       width:120,
                        sortName: 'flagStorage'
                    }
                    ,{
                        field: 'inventoryQuantity',
                        title: '库存数量',
-                       width:200,
+                       width:120,
                        sortName: 'inventoryQuantity'
                    }
                    ,{
                        field: 'numberFrozen',
                        title: '冻结数量',
-                       width:200,
+                       width:120,
                        sortName: 'numberFrozen'
                    }
                    ,{
@@ -210,12 +245,16 @@ $(document).ready(function() {
 		     ]
 		
 		});
-		function getTime(value, row, index) {
-			return [
-				"<div class='input-group form_datetime deliverySchedule' onclick="+"listDate()"+"> <input type='text' id="+row.uniqueCode+" name='deliverySchedule' class='form-control required'  value=''/> <span class='input-group-addon'> <span class='glyphicon glyphicon-calendar'></span> </span></div>" ,
-			].join('');
-		}
-
+		// function getTime(value, row, index) {
+		// 	return [
+		// 		"<div class='input-group form_datetime' id="+row.uniqueCode+"  onclick=\"listDate( '" + row.uniqueCode +" ')\"> <input type='text'   name='deliverySchedule' class='form-control required'  value=''/> <span class='input-group-addon'> <span class='glyphicon glyphicon-calendar'></span> </span></div>" ,
+		// 	].join('');
+		// }
+        function getTime(value, row, index) {
+            return [
+                "<div class='input-group form_datetime' id="+row.uniqueCode+"> <input type='text'   name='deliverySchedule' class='form-control required'  value="+row.deliverySchedule+"/> <span class='input-group-addon'> <span class='glyphicon glyphicon-calendar'></span> </span></div>" ,
+            ].join('');
+        }
 	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
 
 		 
@@ -260,7 +299,9 @@ $(document).ready(function() {
 	 $("#export").click(function(){//导出Excel文件
 			jp.downloadFile('${ctx}/sg/managementcenter/materialplan/export');
 	  });
-
+        $("#export1").click(function(){//导出Excel文件
+            jp.downloadFile('${ctx}/sg/managementcenter/materialplan/import/template');
+        });
 		    
 	  $("#search").click("click", function() {// 绑定查询按扭
 		  $('#materialPlanTable').bootstrapTable('refresh');
@@ -272,9 +313,9 @@ $(document).ready(function() {
 		  $("#searchForm  .select-item").html("");
 		  $('#materialPlanTable').bootstrapTable('refresh');
 		});
-		
-		$('.deliverySchedule').datetimepicker({
-			 format: "YYYY-MM-DD HH:mm:ss"
+
+		$('.beginDate').datetimepicker({
+			 format: "YYYY-MM-DD"
 		});
 		$('#endBeginDate').datetimepicker({
 			 format: "YYYY-MM-DD HH:mm:ss"
@@ -292,7 +333,7 @@ $(document).ready(function() {
     }
   
   function deleteAll(){
-		jp.confirm('确认要删除该项目管理表单记录吗?', function(){
+		jp.confirm('确认要删除该物料计划表单记录吗?', function(){
           jp.loading();
           jp.get("${ctx}/sg/managementcenter/materialplan/deleteAll?ids=" + getIdSelections(), function(data){
               if(data.success){
@@ -302,7 +343,6 @@ $(document).ready(function() {
                   jp.error(data.msg);
               }
           })
-
       })
   }
 
@@ -312,7 +352,7 @@ $(document).ready(function() {
   }
   
    function add(){
-	  jp.openSaveDialog('新增项目管理表单', "${ctx}/sg/managementcenter/materialplan/form",'800px', '500px');
+	  jp.openSaveDialog('新增物料计划表单', "${ctx}/sg/managementcenter/materialplan/form",'800px', '500px');
   }
 
 
@@ -321,14 +361,14 @@ $(document).ready(function() {
        if(id == undefined){
 	      id = getIdSelections();
 	}
-	jp.openSaveDialog('编辑项目管理表单', "${ctx}/sg/managementcenter/materialplan/form?id=" + id, '800px', '500px');
+	jp.openSaveDialog('编辑物料计划表单', "${ctx}/sg/managementcenter/materialplan/form?id=" + id, '800px', '500px');
   }
   
  function view(id){//没有权限时,不显示确定按钮
       if(id == undefined){
              id = getIdSelections();
       }
-        jp.openViewDialog('查看项目管理表单', "${ctx}/sg/managementcenter/materialplan/form?id=" + id, '800px', '500px');
+        jp.openViewDialog('查看物料计划表单', "${ctx}/sg/managementcenter/materialplan/form?id=" + id, '800px', '500px');
  }
 
 

+ 13 - 23
src/main/webapp/webpage/modules/sg/managementcenter/materialplan/materialplanList.jsp

@@ -40,46 +40,36 @@
 				<button id="add" class="btn btn-primary" onclick="add()">
 					<i class="glyphicon glyphicon-plus"></i> 新建
 				</button>
+				<%--</shiro:hasPermission>--%>
+				<%--<shiro:hasPermission name="test:one:dialog:leave1:del">--%>
+				<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
+					<i class="glyphicon glyphicon-remove"></i> 删除
+				</button>
 			<%--</shiro:hasPermission>--%>
 			<%--<shiro:hasPermission name="test:one:dialog:leave1:edit">--%>
 			    <button id="edit" class="btn btn-success" disabled onclick="edit()">
 	            	<i class="glyphicon glyphicon-edit"></i> 修改
 	        	</button>
-			<%--</shiro:hasPermission>--%>
-			<%--<shiro:hasPermission name="test:one:dialog:leave1:del">--%>
-				<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
-	            	<i class="glyphicon glyphicon-remove"></i> 删除
-	        	</button>
+				<%--</shiro:hasPermission>--%>
+				<%--<shiro:hasPermission name="test:one:dialog:leave1:view">--%>
+				<button id="view" class="btn btn-default" disabled onclick="view()">
+					<i class="fa fa-search-plus"></i> 查看
+				</button>
 			<%--</shiro:hasPermission>--%>
 			<%--<shiro:hasPermission name="test:one:dialog:leave1:import">--%>
 				<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
 			<%--</shiro:hasPermission>--%>
 			<%--<shiro:hasPermission name="test:one:dialog:leave1:export">--%>
-	        		<button id="export" class="btn btn-warning">
+				<button id="export" class="btn btn-warning">
 					<i class="fa fa-file-excel-o"></i> 导出
 				</button>
-			 <%--</shiro:hasPermission>--%>
-	                 <%--<shiro:hasPermission name="test:one:dialog:leave1:view">--%>
-				<button id="view" class="btn btn-default" disabled onclick="view()">
-					<i class="fa fa-search-plus"></i> 查看
+				<button id="export1" class="btn btn-warning">
+					<i class="fa fa-file-excel-o"></i> 导出入库模板
 				</button>
 			<%--</shiro:hasPermission>--%>
 		    </div>
 	<!-- 表格 -->
 	<table id="materialPlanTable" style="table-layout:fixed"  data-toolbar="#toolbar"></table>
-		<script>
-			function listDate() {
-                $('.deliverySchedule').datetimepicker({
-                    format: "YYYY-MM-DD HH:mm:ss"
-                });
-
-                // jp.confirm('确认要删除该项目管理表单记录吗?', function(){
-                //     jp.loading();
-				//
-                // })
-            }
-		</script>
-
     <!-- context menu -->
     <ul id="context-menu" class="dropdown-menu">
     	<%--<shiro:hasPermission name="test:one:dialog:leave1:view">--%>

+ 154 - 21
src/main/webapp/webpage/modules/sg/managementcenter/project/projectList.js

@@ -86,7 +86,7 @@ $(document).ready(function() {
 			,{
 		        field: 'type',
 		        title: '类型',
-		        sortName: 'type'
+                width:50
 		        ,formatter:function(value, row , index){
 
 			   if(value == null || value ==""){
@@ -110,82 +110,215 @@ $(document).ready(function() {
 			,{
 		        field: 'demandUnit',
 		        title: '需求提出单位',
-		        sortName: 'demandUnit'
+                width:100
 		       
 		    }
 			,{
 		        field: 'bdzName',
 		        title: '变电站名称',
-		        sortName: 'bdzName'
+                width:100
 		       
 		    }
 			,{
 		        field: 'lineName',
 		        title: '线路名称',
-		        sortName: 'lineName'
+                width:100
 		       
 		    }
 			,{
 		        field: 'requireName',
 		        title: '项目需求名称',
-		        sortName: 'requireName'
-		       
-		    }
-			,{
-		        field: 'bulidClassificationResons',
-		        title: '建设理由分类',
-		        sortable: true,
-		        sortName: 'bulidClassificationResons'
+                width:120
 		       
 		    }
+
+                   ,{
+                       field: 'projectId',
+                       title: '工程编号',
+                       width:120
+
+                   }
+                   ,{
+                       field: 'projectName',
+                       title: '项目名称',
+                       width:120
+                   }
+                   ,{
+                       field: 'projectManageRole',
+                       title: '项目经理角色',
+                       width:120
+                   }
+                   ,{
+                       field: 'constructionUnit',
+                       title: '施工单位',
+                       width:120
+                   }
+                   ,{
+                       field: 'constructionUnitRole',
+                       title: '施工单位角色',
+                       width:160
+                   }
+                   ,{
+                       field: 'clarificaitonType',
+                       title: '交底类型',
+                       width:120
+                   }
+					,{
+						field: 'bulidClassificationResons',
+						title: '建设理由分类',
+						width:160
+
+					}
                    ,{
                        field: 'bulbidResons',
                        title: '建设理由',
-					   width:250,
-                       sortName: 'bulbidResons'
+					   width:300
+
 
                    }
                    ,{
                        field: 'asicEquipment',
                        title: '设备基本情况',
-                       sortName: 'asicEquipment'
+                       width:160
 
                    }
                    ,{
                        field: 'runTheClass',
                        title: '运行班',
-                       sortName: 'runTheClass'
+                       width:120
 
                    }
                    ,{
                        field: 'projectTeam',
                        title: '项目组',
-                       sortName: 'projectTeam'
+                       width:120
 
                    }
                    ,{
                        field: 'costEstimate',
                        title: '费用估算',
-                       sortName: 'costEstimate'
+                       width:120
 
                    }
                    ,{
                        field: 'whetherRheUpwind',
                        title: '是否迎风期度夏项目',
-                       sortName: 'whetherRheUpwind'
+                       width:120
 
                    }
                    ,{
                        field: 'sureDaDate',
                        title: '确定下达时间',
-                       sortName: 'sureDaDate'
+                       width:120
 
                    }
                    ,{
                        field: 'textRemark',
                        title: '备注',
-                       sortName: 'textRemark'
+                       width:120
+                   }
+
+                   ,{
+                       field: 'powerLine',
+                       title: '停电线路',
+                       width:120
+                   }
+                   ,{
+                       field: 'powerScope',
+                       title: '停电范围',
+                       width:400
                    }
+                   ,{
+                       field: 'projectType',
+                       title: '项目类型',
+                       width:300
+                   }
+                   ,{
+                       field: 'powerFlagPackage',
+                       title: '是否为停电打包项目',
+                       width:200
+                   }
+                   ,{
+                       field: 'preliminaryJudgment',
+                       title: '证处初步判断',
+                       width:220
+                   }
+                   ,{
+                       field: 'flagCivilEngineering',
+                       title: '是否含土建(不含钢管杆)',
+                       width:200
+                   }
+                   ,{
+                       field: 'steelTubePole',
+                       title: '钢管杆基础类型',
+                       width:160
+                   }
+                   ,{
+                       field: 'flagApprovalPlanning',
+                       title: '是否需要规矩报批',
+                       width:170
+                   }
+                   ,{
+                       field: 'equCreateType',
+                       title: '设备改造类型',
+                       width:160
+                   }
+                   ,{
+                       field: 'equCreateSize',
+                       title: '改造设备尺寸及间隔数',
+                       width:200
+                   }
+                   ,{
+                       field: 'flagNewEquName',
+                       title: '是否新设备命名',
+                       width:160
+                   }
+                   ,{
+                       field: 'includeBdzNews',
+                       title: '是否含变电站新闻格投运',
+                       width:200
+                   }
+                   ,{
+                       field: 'flagNoElectrical',
+                       title: '是否非涉电电气施工',
+                       width:200
+                   }
+                   ,{
+                       field: 'drawingsWork',
+                       title: '图纸标注的带点作业情况',
+                       width:200
+                   }
+                   ,{
+                       field: 'flagAutomation',
+                       title: '是否含自动化',
+                       width:120
+                   }
+                   ,{
+                       field: 'twoAndThreeRemote',
+                       title: '二摇或三摇',
+                       width:120
+                   }
+                   ,{
+                       field: 'phoneStyle',
+                       title: '通信方式',
+                       width:120
+                   }
+                   ,{
+                       field: 'stayOpenArea',
+                       title: '柱开集中或就业地',
+                       width:160
+                   }
+                   ,{
+                       field: 'ringNetworkCabinet',
+                       title: '环网柜',
+                       width:120
+                   }
+                   ,{
+                       field: 'stationDtu',
+                       title: '站房DTU',
+                       width:120
+                   }
+
 		     ]
 		
 		});

+ 12 - 11
src/main/webapp/webpage/modules/sg/managementcenter/project/projectList.jsp

@@ -41,16 +41,21 @@
 					<i class="glyphicon glyphicon-plus"></i> 新建
 				</button>
 			<%--</shiro:hasPermission>--%>
+				<%--<shiro:hasPermission name="test:one:dialog:leave1:del">--%>
+				<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
+					<i class="glyphicon glyphicon-remove"></i> 删除
+				</button>
+				<%--</shiro:hasPermission>--%>
 			<%--<shiro:hasPermission name="test:one:dialog:leave1:edit">--%>
 			    <button id="edit" class="btn btn-success" disabled onclick="edit()">
 	            	<i class="glyphicon glyphicon-edit"></i> 修改
 	        	</button>
 			<%--</shiro:hasPermission>--%>
-			<%--<shiro:hasPermission name="test:one:dialog:leave1:del">--%>
-				<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
-	            	<i class="glyphicon glyphicon-remove"></i> 删除
-	        	</button>
-			<%--</shiro:hasPermission>--%>
+				<%--<shiro:hasPermission name="test:one:dialog:leave1:view">--%>
+				<button id="view" class="btn btn-default" disabled onclick="view()">
+					<i class="fa fa-search-plus"></i> 查看
+				</button>
+				<%--</shiro:hasPermission>--%>
 			<%--<shiro:hasPermission name="test:one:dialog:leave1:import">--%>
 				<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
 			<%--</shiro:hasPermission>--%>
@@ -59,15 +64,11 @@
 					<i class="fa fa-file-excel-o"></i> 导出
 				</button>
 			 <%--</shiro:hasPermission>--%>
-	                 <%--<shiro:hasPermission name="test:one:dialog:leave1:view">--%>
-				<button id="view" class="btn btn-default" disabled onclick="view()">
-					<i class="fa fa-search-plus"></i> 查看
-				</button>
-			<%--</shiro:hasPermission>--%>
+
 		    </div>
 		
 	<!-- 表格 -->
-	<table id="projectTable"   data-toolbar="#toolbar"></table>
+	<table id="projectTable"  style="table-layout:fixed"  data-toolbar="#toolbar"></table>
 
     <!-- context menu -->
     <ul id="context-menu" class="dropdown-menu">