Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

yue 5 yıl önce
ebeveyn
işleme
422dcfc99c
22 değiştirilmiş dosya ile 2270 ekleme ve 41 silme
  1. 89 0
      src/main/java/com/jeeplus/modules/oa/entity/OaNotifyMaterial.java
  2. 9 1
      src/main/java/com/jeeplus/modules/oa/mapper/OaNotifyMapper.java
  3. 29 0
      src/main/java/com/jeeplus/modules/oa/mapper/OaNotifyMaterialMapper.java
  4. 12 0
      src/main/java/com/jeeplus/modules/oa/mapper/xml/OaNotifyMapper.xml
  5. 149 0
      src/main/java/com/jeeplus/modules/oa/mapper/xml/OaNotifyMaterialMapper.xml
  6. 64 0
      src/main/java/com/jeeplus/modules/oa/service/OaNotifyMaterialService.java
  7. 21 1
      src/main/java/com/jeeplus/modules/oa/service/OaNotifyService.java
  8. 51 0
      src/main/java/com/jeeplus/modules/oa/web/OaNotifyController.java
  9. 210 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/entity/ConstructionProject.java
  10. 12 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/mapper/ConstructionProjectMapper.java
  11. 237 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/mapper/xml/ConstructionProjectMapper.xml
  12. 50 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/service/ConstructionProjectService.java
  13. 78 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/util/ImportProUtil.java
  14. 394 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/util/ImportUtil.java
  15. 52 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/util/TreeTableUtil.java
  16. 166 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/web/ConstructionProjectController.java
  17. 92 24
      src/main/java/com/jeeplus/modules/sg/managementcenter/project/util/PickingInfo.java
  18. 17 15
      src/main/java/com/jeeplus/modules/sg/managementcenter/project/web/ProjectController.java
  19. 166 0
      src/main/webapp/webpage/modules/oa/notify/oaNotifyFormMaterial.js
  20. 149 0
      src/main/webapp/webpage/modules/oa/notify/oaNotifyFormMaterial.jsp
  21. 106 0
      src/main/webapp/webpage/modules/sg/managementcenter/constructionProject/constructionList.js
  22. 117 0
      src/main/webapp/webpage/modules/sg/managementcenter/constructionProject/constructionList.jsp

+ 89 - 0
src/main/java/com/jeeplus/modules/oa/entity/OaNotifyMaterial.java

@@ -0,0 +1,89 @@
+package com.jeeplus.modules.oa.entity;
+
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.core.persistence.DataEntity;
+
+public class OaNotifyMaterial extends DataEntity<OaNotifyMaterial> {
+    private String itemDetail;//项目描述
+    private String projectDefinition;//项目定义号
+    private String materialCode;//物料编码
+    private String materialDescription;//物料描述
+    private String measuringUnit;//计量单位
+    private Double quantityDemanded;//需求数量
+    private Double quantityDelivered;//已经出库数量
+    private Double stockNumber;//库存数量
+    private String parentId;//父类id
+
+    @ExcelField(title = "项目描述", align = 2, sort = 1)
+    public String getItemDetail() {
+        return itemDetail;
+    }
+
+    public void setItemDetail(String itemDetail) {
+        this.itemDetail = itemDetail;
+    }
+    @ExcelField(title = "项目定义号", align = 2, sort = 2)
+    public String getProjectDefinition() {
+        return projectDefinition;
+    }
+
+    public void setProjectDefinition(String projectDefinition) {
+        this.projectDefinition = projectDefinition;
+    }
+    @ExcelField(title = "物料编码", align = 2, sort = 3)
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+    @ExcelField(title = "物料描述", align = 2, sort = 4)
+    public String getMaterialDescription() {
+        return materialDescription;
+    }
+
+    public void setMaterialDescription(String materialDescription) {
+        this.materialDescription = materialDescription;
+    }
+    @ExcelField(title = "计量单位", align = 2, sort = 5)
+    public String getMeasuringUnit() {
+        return measuringUnit;
+    }
+
+    public void setMeasuringUnit(String measuringUnit) {
+        this.measuringUnit = measuringUnit;
+    }
+    @ExcelField(title = "需求数量", align = 2, sort = 6)
+    public Double getQuantityDemanded() {
+        return quantityDemanded;
+    }
+
+    public void setQuantityDemanded(Double quantityDemanded) {
+        this.quantityDemanded = quantityDemanded;
+    }
+    @ExcelField(title = "已经出库数量", align = 2, sort = 7)
+    public Double getQuantityDelivered() {
+        return quantityDelivered;
+    }
+
+    public void setQuantityDelivered(Double quantityDelivered) {
+        this.quantityDelivered = quantityDelivered;
+    }
+    @ExcelField(title = "库存数量", align = 2, sort = 8)
+    public Double getStockNumber() {
+        return stockNumber;
+    }
+
+    public void setStockNumber(Double stockNumber) {
+        this.stockNumber = stockNumber;
+    }
+
+    public String getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+}

+ 9 - 1
src/main/java/com/jeeplus/modules/oa/mapper/OaNotifyMapper.java

@@ -6,6 +6,9 @@ package com.jeeplus.modules.oa.mapper;
 import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
 import com.jeeplus.modules.oa.entity.OaNotify;
+import com.jeeplus.modules.sg.managementcenter.project.entity.PickingRequisition;
+
+import java.util.List;
 
 /**
  * 通知通告MAPPER接口
@@ -21,5 +24,10 @@ public interface OaNotifyMapper extends BaseMapper<OaNotify> {
 	 * @return
 	 */
 	public Long findCount(OaNotify oaNotify);
-	
+
+	/**
+	 * 获取缺货信息
+	 */
+	public List<PickingRequisition> notifyInformation();
+
 }

+ 29 - 0
src/main/java/com/jeeplus/modules/oa/mapper/OaNotifyMaterialMapper.java

@@ -0,0 +1,29 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.oa.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.oa.entity.OaNotify;
+import com.jeeplus.modules.oa.entity.OaNotifyMaterial;
+import com.jeeplus.modules.sg.managementcenter.project.entity.PickingRequisition;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 通知通告MAPPER接口
+ * @author jeeplus
+ * @version 2017-05-16
+ */
+@MyBatisMapper
+public interface OaNotifyMaterialMapper extends BaseMapper<OaNotifyMaterial> {
+	/**
+	 * 获取缺货信息
+	 */
+//	public List<PickingRequisition> notifyInformation();
+
+	public int insertList(@Param(value = "list") List<OaNotifyMaterial> list);
+
+}

+ 12 - 0
src/main/java/com/jeeplus/modules/oa/mapper/xml/OaNotifyMapper.xml

@@ -18,6 +18,18 @@
 	    b.read_num,
 	    b.un_read_num
 	</sql>
+
+	<sql id="pickingColumns">
+		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.requisition AS requisition,
+		a.projectDefinition AS projectDefinition
+	</sql>
 	
 	<sql id="oaNotifyJoins">
 		<!-- 查询已读和未读条数 -->

+ 149 - 0
src/main/java/com/jeeplus/modules/oa/mapper/xml/OaNotifyMaterialMapper.xml

@@ -0,0 +1,149 @@
+<?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.oa.mapper.OaNotifyMaterialMapper">
+
+	<sql id="materialColumns">
+		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.itemDetail AS "itemDetail",
+		a.projectDefinition AS "projectDefinition",
+		a.materialCode AS "materialCode",
+		a.materialDescription AS "materialDescription",
+		a.measuringUnit AS "measuringUnit",
+		a.quantityDemanded AS "quantityDemanded",
+		a.quantityDelivered AS "quantityDelivered",
+		a.stockNumber AS "stockNumber",
+		a.parentId AS "parentId"
+	</sql>
+
+	<select id="get" resultType="com.jeeplus.modules.oa.entity.OaNotifyMaterial" >
+		SELECT
+		<include refid="materialColumns"/>
+		FROM oa_notify_material a
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="com.jeeplus.modules.oa.entity.OaNotifyMaterial" >
+		SELECT
+		<include refid="materialColumns"/>
+		FROM oa_notify_material a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+			<if test="parentId != null and  parentId != ''">
+				AND parentId = #{parentId}
+			</if>
+		</where>
+	</select>
+
+	<select id="findAllList" resultType="com.jeeplus.modules.oa.entity.OaNotifyMaterial" >
+		SELECT
+		<include refid="materialColumns"/>
+		FROM oa_notify_material 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 oa_notify_material(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+		)
+	</insert>
+
+	<insert id="insertList">
+		INSERT INTO oa_notify_material(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			itemDetail,
+			projectDefinition,
+			materialCode,
+			materialDescription,
+			measuringUnit,
+			quantityDemanded,
+			quantityDelivered,
+			stockNumber,
+			parentId
+		) VALUES
+		<foreach collection="list" item="item" index="index" separator="," >
+			(
+			#{item.id},
+			#{item.createBy.id},
+			#{item.createDate},
+			#{item.updateBy.id},
+			#{item.updateDate},
+			#{item.remarks},
+			#{item.delFlag},
+			#{item.itemDetail},
+			#{item.projectDefinition},
+			#{item.materialCode},
+			#{item.materialDescription},
+			#{item.measuringUnit},
+			#{item.quantityDemanded},
+			#{item.quantityDelivered},
+			#{item.stockNumber},
+			#{item.parentId}
+			)
+		</foreach>
+	</insert>
+
+	<update id="update">
+		UPDATE oa_notify_material SET
+
+		WHERE id = #{id}
+	</update>
+
+
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM oa_notify_material
+		WHERE parentId = #{parentId}
+	</update>
+
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE oa_notify_material SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+
+
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="com.jeeplus.modules.oa.entity.OaNotifyMaterial" statementType="STATEMENT">
+		select * FROM oa_notify_material  where ${id} = '${value}'
+	</select>
+
+</mapper>

+ 64 - 0
src/main/java/com/jeeplus/modules/oa/service/OaNotifyMaterialService.java

@@ -0,0 +1,64 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.oa.service;
+
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.oa.entity.OaNotify;
+import com.jeeplus.modules.oa.entity.OaNotifyMaterial;
+import com.jeeplus.modules.oa.mapper.OaNotifyMaterialMapper;
+import com.jeeplus.modules.sg.managementcenter.project.entity.PickingRequisition;
+import com.jeeplus.modules.sg.managementcenter.project.entity.Project;
+import com.jeeplus.modules.sg.managementcenter.project.mapper.PickingRequisitionMapper;
+import com.jeeplus.modules.sg.picking.activiti.entity.Acquisition;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 请假表单Service
+ * @author lgf
+ * @version 2018-06-12
+ */
+@Service
+@Transactional(readOnly = true)
+public class OaNotifyMaterialService extends CrudService<OaNotifyMaterialMapper, OaNotifyMaterial> {
+    @Autowired
+	private OaNotifyMaterialMapper oaNotifyMaterialMapper;
+
+	public OaNotifyMaterial get(String id) {
+		OaNotifyMaterial oaNotifyMaterial = super.get(id);
+		return oaNotifyMaterial;
+	}
+	
+	public List<OaNotifyMaterial> findList(OaNotifyMaterial oaNotifyMaterial) {
+		return super.findList(oaNotifyMaterial);
+	}
+
+	public Page<OaNotifyMaterial> find(Page<OaNotifyMaterial> page, OaNotifyMaterial oaNotifyMaterial) {
+		oaNotifyMaterial.setPage(page);
+		page.setList(mapper.findList(oaNotifyMaterial));
+		return page;
+	}
+
+	@Transactional(readOnly = false)
+	public void save(OaNotifyMaterial oaNotifyMaterial) {
+		super.save(oaNotifyMaterial);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(OaNotifyMaterial oaNotifyMaterial) {
+		super.delete(oaNotifyMaterial);
+	}
+
+	@Transactional(readOnly = false)
+	public void saveList(List<OaNotifyMaterial> oaNotifyMaterials) {
+		for (OaNotifyMaterial oaNotifyMaterial:oaNotifyMaterials){
+			oaNotifyMaterial.preInsert();
+		}
+		oaNotifyMaterialMapper.insertList(oaNotifyMaterials);
+	}
+}

+ 21 - 1
src/main/java/com/jeeplus/modules/oa/service/OaNotifyService.java

@@ -4,7 +4,10 @@
 package com.jeeplus.modules.oa.service;
 
 import java.util.Date;
+import java.util.List;
 
+import com.jeeplus.modules.oa.entity.OaNotifyMaterial;
+import com.jeeplus.modules.oa.mapper.OaNotifyMaterialMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -28,6 +31,9 @@ public class OaNotifyService extends CrudService<OaNotifyMapper, OaNotify> {
 	@Autowired
 	private OaNotifyRecordMapper oaNotifyRecordMapper;
 
+	@Autowired
+	private OaNotifyMaterialMapper oaNotifyMaterialMapper;
+
 	public OaNotify get(String id) {
 		OaNotify entity = mapper.get(id);
 		return entity;
@@ -61,7 +67,21 @@ public class OaNotifyService extends CrudService<OaNotifyMapper, OaNotify> {
 	@Transactional(readOnly = false)
 	public void save(OaNotify oaNotify) {
 		super.save(oaNotify);
-		
+		// 更新发送接受人记录
+		oaNotifyRecordMapper.deleteByOaNotifyId(oaNotify.getId());
+		if (oaNotify.getOaNotifyRecordList().size() > 0){
+			oaNotifyRecordMapper.insertAll(oaNotify.getOaNotifyRecordList());
+		}
+	}
+
+	@Transactional(readOnly = false)
+	public void saveList(OaNotify oaNotify, List<OaNotifyMaterial> oaNotifyMaterials) {
+		super.save(oaNotify);
+		for (OaNotifyMaterial oaNotifyMaterial:oaNotifyMaterials){
+			oaNotifyMaterial.preInsert();
+			oaNotifyMaterial.setParentId(oaNotify.getId());
+		}
+		oaNotifyMaterialMapper.insertList(oaNotifyMaterials);
 		// 更新发送接受人记录
 		oaNotifyRecordMapper.deleteByOaNotifyId(oaNotify.getId());
 		if (oaNotify.getOaNotifyRecordList().size() > 0){

+ 51 - 0
src/main/java/com/jeeplus/modules/oa/web/OaNotifyController.java

@@ -11,6 +11,11 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.modules.oa.entity.OaNotifyMaterial;
+import com.jeeplus.modules.oa.service.OaNotifyMaterialService;
+import com.jeeplus.modules.sg.managementcenter.materialplan.entity.MaterialPlan;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -43,6 +48,9 @@ public class OaNotifyController extends BaseController {
 
 	@Autowired
 	private OaNotifyService oaNotifyService;
+
+	@Autowired
+	private OaNotifyMaterialService oaNotifyMaterialService;
 	
 	@ModelAttribute
 	public OaNotify get(@RequestParam(required=false) String id) {
@@ -78,6 +86,17 @@ public class OaNotifyController extends BaseController {
 	}
 
 	/**
+	 * 通告列表数据:缺货通知列表
+	 */
+	@ResponseBody
+	@RequiresPermissions("oa:oaNotify:list")
+	@RequestMapping(value = "marterialData")
+	public Map<String, Object> materialData(OaNotifyMaterial oaNotifyMaterial,String parentId,HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<OaNotifyMaterial> page = oaNotifyMaterialService.findPage(new Page<OaNotifyMaterial>(request, response),oaNotifyMaterial);
+		return getBootstrapData(page);
+	}
+
+	/**
 	 * 查看,增加,编辑报告表单页面
 	 */
 	@RequiresPermissions(value={"oa:oaNotify:view","oa:oaNotify:add","oa:oaNotify:edit"},logical=Logical.OR)
@@ -92,6 +111,13 @@ public class OaNotifyController extends BaseController {
 		}
 		model.addAttribute("isSelf", isSelf);
 		model.addAttribute("oaNotify", oaNotify);
+        if(oaNotify.getTitle().contains("缺货")){
+			OaNotifyMaterial oaNotifyMaterial = new OaNotifyMaterial();
+			oaNotifyMaterial.setParentId(oaNotify.getId());
+			List<OaNotifyMaterial> oaNotifyMaterialList = oaNotifyMaterialService.findList(oaNotifyMaterial);
+			model.addAttribute("oaNotifyMaterialList",oaNotifyMaterialList);
+            return "modules/oa/notify/oaNotifyFormMaterial";
+        }
 		return "modules/oa/notify/oaNotifyForm";
 	}
 
@@ -149,8 +175,12 @@ public class OaNotifyController extends BaseController {
 	public AjaxJson deleteAll(String ids, RedirectAttributes redirectAttributes) {
 		AjaxJson j = new AjaxJson();
 		String idArray[] =ids.split(",");
+		OaNotifyMaterial oaNotifyMaterial = null;
 		for(String id : idArray){
+			oaNotifyMaterial = new OaNotifyMaterial();
+			oaNotifyMaterial.setParentId(id);
 			oaNotifyService.delete(oaNotifyService.get(id));
+			oaNotifyMaterialService.delete(oaNotifyMaterial);
 		}
 		j.setMsg("删除通知成功");
 		return j;
@@ -204,4 +234,25 @@ public class OaNotifyController extends BaseController {
 		oaNotify.setReadFlag("0");
 		return String.valueOf(oaNotifyService.findCount(oaNotify));
 	}
+
+    /**
+     * 导出excel文件
+     */
+    @ResponseBody
+    @RequestMapping(value = "export")
+    public AjaxJson exportFile(OaNotifyMaterial oaNotifyMaterial, HttpServletRequest request, HttpServletResponse response) {
+        AjaxJson j = new AjaxJson();
+        try {
+            String fileName = "通知项目表"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<OaNotifyMaterial> page = oaNotifyMaterialService.findPage(new Page<OaNotifyMaterial>(request, response, -1), oaNotifyMaterial);
+            new ExportExcel("通知项目表", OaNotifyMaterial.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;
+    }
 }

+ 210 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/entity/ConstructionProject.java

@@ -0,0 +1,210 @@
+package com.jeeplus.modules.sg.managementcenter.constructionProject.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.persistence.DataEntity;
+
+import java.util.Date;
+
+public class ConstructionProject extends DataEntity<ConstructionProject> {
+    private static final long serialVersionUID = 1L;
+    private String cityCompany;//  市公司
+    private String countyCompany;//  县公司
+    private String projectNature;//  项目性质
+    private String powerSupplyArea;//  供电区域
+    private String gridNumber;//  网格编号
+    private String cellNumber;//  单元格编号
+    private String reserveNumber;//  项目储备编号
+    private String projectName;//  项目名称
+    private String projectNumber;//  项目定义号
+    private String substationName;//  变电站名称
+    private String lineName;//  线路名称
+    private String projectType;//  项目类型
+    private String instructions;//  说明
+    private String workAreaNote;//  工区备注
+    private String contructiveContent;//  建设必要性内容
+    private Double costEstimate;//  费用估算
+    private String whetherGraceProject;//  是否迎风度夏项目
+    private String projectNote;//  项目备注
+    private String constructionUnit;//  施工单位
+    private Date arrangeTime;//  安排时间
+    private Date specificTime;//  具体时间
+    private String projectStatus;//  项目状态0-在项目中 1-在计划中
+
+    public String getCityCompany() {
+        return cityCompany;
+    }
+
+    public void setCityCompany(String cityCompany) {
+        this.cityCompany = cityCompany;
+    }
+
+    public String getCountyCompany() {
+        return countyCompany;
+    }
+
+    public void setCountyCompany(String countyCompany) {
+        this.countyCompany = countyCompany;
+    }
+
+    public String getProjectNature() {
+        return projectNature;
+    }
+
+    public void setProjectNature(String projectNature) {
+        this.projectNature = projectNature;
+    }
+
+    public String getPowerSupplyArea() {
+        return powerSupplyArea;
+    }
+
+    public void setPowerSupplyArea(String powerSupplyArea) {
+        this.powerSupplyArea = powerSupplyArea;
+    }
+
+    public String getGridNumber() {
+        return gridNumber;
+    }
+
+    public void setGridNumber(String gridNumber) {
+        this.gridNumber = gridNumber;
+    }
+
+    public String getCellNumber() {
+        return cellNumber;
+    }
+
+    public void setCellNumber(String cellNumber) {
+        this.cellNumber = cellNumber;
+    }
+
+    public String getReserveNumber() {
+        return reserveNumber;
+    }
+
+    public void setReserveNumber(String reserveNumber) {
+        this.reserveNumber = reserveNumber;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public String getProjectNumber() {
+        return projectNumber;
+    }
+
+    public void setProjectNumber(String projectNumber) {
+        this.projectNumber = projectNumber;
+    }
+
+    public String getSubstationName() {
+        return substationName;
+    }
+
+    public void setSubstationName(String substationName) {
+        this.substationName = substationName;
+    }
+
+    public String getLineName() {
+        return lineName;
+    }
+
+    public void setLineName(String lineName) {
+        this.lineName = lineName;
+    }
+
+    public String getProjectType() {
+        return projectType;
+    }
+
+    public void setProjectType(String projectType) {
+        this.projectType = projectType;
+    }
+
+    public String getInstructions() {
+        return instructions;
+    }
+
+    public void setInstructions(String instructions) {
+        this.instructions = instructions;
+    }
+
+    public String getWorkAreaNote() {
+        return workAreaNote;
+    }
+
+    public void setWorkAreaNote(String workAreaNote) {
+        this.workAreaNote = workAreaNote;
+    }
+
+    public String getContructiveContent() {
+        return contructiveContent;
+    }
+
+    public void setContructiveContent(String contructiveContent) {
+        this.contructiveContent = contructiveContent;
+    }
+
+    public Double getCostEstimate() {
+        return costEstimate;
+    }
+
+    public void setCostEstimate(Double costEstimate) {
+        this.costEstimate = costEstimate;
+    }
+
+    public String getWhetherGraceProject() {
+        return whetherGraceProject;
+    }
+
+    public void setWhetherGraceProject(String whetherGraceProject) {
+        this.whetherGraceProject = whetherGraceProject;
+    }
+
+    public String getProjectNote() {
+        return projectNote;
+    }
+
+    public void setProjectNote(String projectNote) {
+        this.projectNote = projectNote;
+    }
+
+    public String getConstructionUnit() {
+        return constructionUnit;
+    }
+
+    public void setConstructionUnit(String constructionUnit) {
+        this.constructionUnit = constructionUnit;
+    }
+    @JsonFormat(pattern = "YYYY-MM-DD")
+    public Date getArrangeTime() {
+        return arrangeTime;
+    }
+    @JsonFormat(pattern = "YYYY-MM-DD")
+    public void setArrangeTime(Date arrangeTime) {
+        this.arrangeTime = arrangeTime;
+    }
+
+    @JsonFormat(pattern = "YYYY-MM-DD")
+    public Date getSpecificTime() {
+        return specificTime;
+    }
+
+    @JsonFormat(pattern = "YYYY-MM-DD")
+    public void setSpecificTime(Date specificTime) {
+        this.specificTime = specificTime;
+    }
+
+    public String getProjectStatus() {
+        return projectStatus;
+    }
+
+    public void setProjectStatus(String projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+}

+ 12 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/mapper/ConstructionProjectMapper.java

@@ -0,0 +1,12 @@
+package com.jeeplus.modules.sg.managementcenter.constructionProject.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+@MyBatisMapper
+public interface ConstructionProjectMapper extends BaseMapper<ConstructionProject> {
+    Integer insertList(@Param("list") List<ConstructionProject> list);
+}

+ 237 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/mapper/xml/ConstructionProjectMapper.xml

@@ -0,0 +1,237 @@
+<?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.managementcenter.constructionProject.mapper.ConstructionProjectMapper">
+    
+	<sql id="constructionColumns">
+		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",
+		cityCompany AS "cityCompany",
+		countyCompany AS "countyCompany",
+		projectNature AS "projectNature",
+		powerSupplyArea AS "powerSupplyArea",
+		gridNumber AS "gridNumber",
+		cellNumber AS "cellNumber",
+		reserveNumber AS "reserveNumber",
+		projectName AS "projectName",
+		projectNumber AS "projectNumber",
+		substationName AS "substationName",
+		lineName AS "lineName",
+		projectType AS "projectType",
+		instructions AS "instructions",
+		workAreaNote AS "workAreaNote",
+		contructiveContent AS "contructiveContent",
+		costEstimate AS "costEstimate",
+		whetherGraceProject AS "whetherGraceProject",
+		projectNote AS "projectNote",
+		constructionUnit AS "constructionUnit",
+		arrangeTime AS "arrangeTime",
+		specificTime AS "specificTime",
+		projectStatus AS "projectStatus"
+	</sql>
+    
+	<select id="get" resultType="com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject" >
+		SELECT 
+			<include refid="constructionColumns"/>
+		FROM ms_construction_project a
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject" >
+		SELECT
+			<include refid="constructionColumns"/>
+		FROM ms_construction_project 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>
+	
+	<select id="findAllList" resultType="com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject" >
+		SELECT
+		<include refid="constructionColumns"/>
+		FROM ms_construction_project 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 ms_construction_project(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			cityCompany,
+			countyCompany,
+			projectNature,
+			powerSupplyArea,
+			gridNumber,
+			cellNumber,
+			reserveNumber,
+			projectName,
+			projectNumber,
+			substationName,
+			lineName,
+			projectType,
+			instructions,
+			workAreaNote,
+			contructiveContent,
+			costEstimate,
+			whetherGraceProject,
+			projectNote,
+			constructionUnit,
+			arrangeTime,
+			specificTime,
+			projectStatus
+		) VALUES
+		(
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{cityCompany},
+			#{countyCompany},
+			#{projectNature},
+			#{powerSupplyArea},
+			#{gridNumber},
+			#{cellNumber},
+			#{reserveNumber},
+			#{projectName},
+			#{projectNumber},
+			#{substationName},
+			#{lineName},
+			#{projectType},
+			#{instructions},
+			#{workAreaNote},
+			#{contructiveContent},
+			#{costEstimate},
+			#{whetherGraceProject},
+			#{projectNote},
+			#{constructionUnit},
+			#{arrangeTime},
+			#{specificTime},
+			#{projectStatus}
+		)
+	</insert>
+
+	<insert id="insertList">
+		replace INTO ms_construction_project(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			cityCompany,
+			countyCompany,
+			projectNature,
+			powerSupplyArea,
+			gridNumber,
+			cellNumber,
+			reserveNumber,
+			projectName,
+			projectNumber,
+			substationName,
+			lineName,
+			projectType,
+			instructions,
+			workAreaNote,
+			contructiveContent,
+			costEstimate,
+			whetherGraceProject,
+			projectNote,
+			constructionUnit,
+			arrangeTime,
+			specificTime,
+			projectStatus
+		) VALUES
+		<foreach collection="list" item="item" index="index" separator="," >
+			(
+			#{item.id},
+			#{item.createBy.id},
+			#{item.createDate},
+			#{item.updateBy.id},
+			#{item.updateDate},
+			#{item.remarks},
+			#{item.delFlag},
+			#{item.cityCompany},
+			#{item.countyCompany},
+			#{item.projectNature},
+			#{item.powerSupplyArea},
+			#{item.gridNumber},
+			#{item.cellNumber},
+			#{item.reserveNumber},
+			#{item.projectName},
+			#{item.projectNumber},
+			#{item.substationName},
+			#{item.lineName},
+			#{item.projectType},
+			#{item.instructions},
+			#{item.workAreaNote},
+			#{item.contructiveContent},
+			#{item.costEstimate},
+			#{item.whetherGraceProject},
+			#{item.projectNote},
+			#{item.constructionUnit},
+			#{item.arrangeTime},
+			#{item.specificTime},
+			#{item.projectStatus}
+			)
+		</foreach>
+	</insert>
+
+	<update id="update">
+		UPDATE ms_construction_project SET
+
+		WHERE id = #{id}
+	</update>
+
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM ms_construction_project
+		WHERE id = #{id}
+	</update>
+
+
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE ms_construction_project SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject" statementType="STATEMENT">
+		select * FROM ms_construction_project  where ${id} = '${value}'
+	</select>
+
+</mapper>

+ 50 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/service/ConstructionProjectService.java

@@ -0,0 +1,50 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.managementcenter.constructionProject.service;
+
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject;
+import com.jeeplus.modules.sg.managementcenter.constructionProject.mapper.ConstructionProjectMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+
+@Service
+@Transactional(readOnly = true)
+public class ConstructionProjectService extends CrudService<ConstructionProjectMapper, ConstructionProject> {
+
+	@Autowired
+	private ConstructionProjectMapper constructionProjectMapper;
+
+	public ConstructionProject get(String id) {
+		return super.get(id);
+	}
+	
+	public List<ConstructionProject> findList(ConstructionProject constructionProject) {
+		return super.findList(constructionProject);
+	}
+
+	public Page<ConstructionProject> findPage(Page<ConstructionProject> page, ConstructionProject constructionProject) {
+		return super.findPage(page, constructionProject);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(ConstructionProject constructionProject) {
+		super.save(constructionProject);
+	}
+
+	//文件导入
+	@Transactional(readOnly = false)
+	public void savaList(List<ConstructionProject> list){
+		for (ConstructionProject constructionProject:list){
+			constructionProject.preInsert();
+		}
+		constructionProjectMapper.insertList(list);
+	}
+
+}

+ 78 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/util/ImportProUtil.java

@@ -0,0 +1,78 @@
+package com.jeeplus.modules.sg.managementcenter.constructionProject.util;
+
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.usermodel.Row;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public  class ImportProUtil {
+    /**
+     * 获取表格数据
+     * @param importUtil
+     * @return List<MaterialProjectMapper> 导入表格数据
+     */
+    public static List<ConstructionProject> getProjectUtil(ImportUtil importUtil)  {
+        int lastRow = importUtil.getLastDataRowNum();
+        List<ConstructionProject> list = new ArrayList<ConstructionProject>();
+        ConstructionProject constructionProject = null;
+        String projectName="";
+        for(int i=2; i<=lastRow;i++){
+            constructionProject = new ConstructionProject();
+            Row row = importUtil.getRow(i);
+            projectName = (String) importUtil.getCellValue(row,8);
+            if(StringUtils.isNotBlank(projectName)) {
+                constructionProject.setProjectName(projectName);
+                constructionProject.setCityCompany((String)importUtil.getCellValue(row,1));//  市公司
+                constructionProject.setCountyCompany((String)importUtil.getCellValue(row,2));//  县公司
+                constructionProject.setProjectNature((String)importUtil.getCellValue(row,3));//  项目性质
+                constructionProject.setPowerSupplyArea((String)importUtil.getCellValue(row,4));//  供电区域
+                constructionProject.setGridNumber((String)importUtil.getCellValue(row,5));//  网格编号
+                constructionProject.setCellNumber((String)importUtil.getCellValue(row,6));//  单元格编号
+                constructionProject.setReserveNumber((String)importUtil.getCellValue(row,7));//  项目储备编号
+                constructionProject.setProjectNumber((String)importUtil.getCellValue(row,9));//  项目定义号
+                constructionProject.setSubstationName((String)importUtil.getCellValue(row,10));//  变电站名称
+                constructionProject.setLineName((String)importUtil.getCellValue(row,11));//  线路名称
+                constructionProject.setProjectType((String)importUtil.getCellValue(row,12));//  项目类型
+                constructionProject.setInstructions((String)importUtil.getCellValue(row,13));//  说明
+                constructionProject.setWorkAreaNote((String)importUtil.getCellValue(row,14));//  工区备注
+//                constructionProject.setContructiveContent((String)importUtil.getCellValue(row,15));//  建设必要性内容
+//                constructionProject.setCostEstimate(ImportProUtil.getDouble(importUtil,row,16));//  费用估算
+//                constructionProject.setWhetherGraceProject((String)importUtil.getCellValue(row,17));///  是否迎风度夏项目
+//                constructionProject.setProjectNote((String)importUtil.getCellValue(row,18));//  项目备注
+//                constructionProject.setConstructionUnit((String)importUtil.getCellValue(row,19));//  施工单位
+                constructionProject.setProjectStatus("0");
+                list.add(constructionProject);
+            }
+        }
+        return list;
+    }
+    //验证表格数据是否正确
+    public static Boolean getMaterialProjectFlag(ImportUtil importUtil){
+        Boolean flag = false;
+        Row row = importUtil.getRow(0);
+        String index =  (String)importUtil.getCellValue(row,0);
+        String two = (String)importUtil.getCellValue(row,1);
+        if (!index.contains("储备")){
+            flag = true;
+        }
+        if (!two.contains("项目")){
+            flag = true;
+        }
+        return flag;
+    }
+    /**
+     *获取excel double类型的值
+     */
+    private static double getDouble(ImportUtil importUtil, Row row, int col){
+        double d = 0.00;
+        Object o = importUtil.getCellValue(row,col);
+        if(!o.equals("")){
+            d = Double.parseDouble(o.toString());
+        }
+        return d;
+    }
+}

+ 394 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/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.managementcenter.constructionProject.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");
+//		}
+//		
+//	}
+}

+ 52 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/util/TreeTableUtil.java

@@ -0,0 +1,52 @@
+package com.jeeplus.modules.sg.managementcenter.constructionProject.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject;
+import org.hibernate.validator.constraints.EAN;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class TreeTableUtil {
+    public static List<Map<String,Object>> getBootstrapTreeTable(List<Map<String,Object>> objects,List<ConstructionProject> constructionProjects){
+        List<ConstructionProject> lineNames = new ArrayList<ConstructionProject>();
+        Map<String,Object> maps = Maps.newHashMap();
+        boolean flag = false;
+        for (ConstructionProject constructionProject:constructionProjects){
+            flag = true;
+            for (ConstructionProject project:lineNames){
+                if (project.getLineName().equals(constructionProject.getLineName())){
+                    flag = false;
+                    break;
+                }
+            }
+            if (flag){
+                lineNames.add(constructionProject);
+                maps = Maps.newHashMap();
+                maps.put("id",constructionProject.getId());
+                maps.put("name",constructionProject.getLineName());
+                getTreeChild(maps,constructionProjects,constructionProject.getLineName());
+                objects.add(maps);
+            }
+        }
+        return objects;
+    }
+
+    public static void getTreeChild(Map<String,Object> mapList,List<ConstructionProject> constructionProjects,String lineName){
+        List<Map<String,Object>> lists = Lists.newArrayList();
+        Map<String,Object> maps =Maps.newHashMap();
+        for (ConstructionProject constructionProject:constructionProjects){
+            if (lineName.equals(constructionProject.getLineName())){
+                maps = Maps.newHashMap();
+                maps.put("id",constructionProject.getId());
+                maps.put("name",constructionProject.getProjectName());
+                lists.add(maps);
+            }
+        }
+        if (lists.size()>0){
+            mapList.put("children",lists);
+        }
+    }
+}

+ 166 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/constructionProject/web/ConstructionProjectController.java

@@ -0,0 +1,166 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.managementcenter.constructionProject.web;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject;
+import com.jeeplus.modules.sg.managementcenter.constructionProject.service.ConstructionProjectService;
+import com.jeeplus.modules.sg.managementcenter.constructionProject.util.ImportProUtil;
+import com.jeeplus.modules.sg.managementcenter.constructionProject.util.ImportUtil;
+import com.jeeplus.modules.sg.managementcenter.constructionProject.util.TreeTableUtil;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+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 javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+
+@Controller
+@RequestMapping(value = "${adminPath}/sg/managementCenter/constructionProject")
+public class ConstructionProjectController extends BaseController {
+
+	@Autowired
+	private ConstructionProjectService constructionProjectService;
+	
+	@ModelAttribute
+	public ConstructionProject get(@RequestParam(required=false) String id) {
+		ConstructionProject entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = constructionProjectService.get(id);
+		}
+		if (entity == null){
+			entity = new ConstructionProject();
+		}
+		return entity;
+	}
+	
+	/**
+	 * 项目列表页面
+	 */
+//	@RequiresPermissions("managementcenter:materialproject:list")
+	@RequestMapping(value = {"list", ""})
+	public String list(ConstructionProject constructionProject, Model model) {
+		model.addAttribute("constructionProject", constructionProject);
+		return "modules/sg/managementcenter/constructionProject/constructionList";
+	}
+	//树形列表页面
+	@ResponseBody
+	@RequestMapping(value = "bootstrapTreeTable")
+	public List<Map<String,Object>> getBootstrapTreeTable(ConstructionProject constructionProject){
+		List<Map<String,Object>> objects = Lists.newArrayList();
+		List<ConstructionProject> constructionProjects = constructionProjectService.findList(constructionProject);
+		List<Map<String, Object>> bootstrapTreeTables = TreeTableUtil.getBootstrapTreeTable(objects, constructionProjects);
+		return bootstrapTreeTables;
+	}
+		/**
+	 * 列表数据
+	 */
+	@ResponseBody
+//	@RequiresPermissions("managementcenter:materialproject:list")
+	@RequestMapping(value = "data")
+	public Map<String, Object> data(ConstructionProject constructionProject, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<ConstructionProject> page = constructionProjectService.findPage(new Page<ConstructionProject>(request, response), constructionProject);
+		return getBootstrapData(page);
+	}
+
+	/**
+	 * 查看,增加,编辑表单页面
+	 */
+//	@RequiresPermissions(value={"managementcenter:materialproject:view","managementcenter:materialproject:add","managementcenter:materialproject:edit"},logical=Logical.OR)
+	@RequestMapping(value = "form")
+	public String form(ConstructionProject constructionProject, Model model) {
+		model.addAttribute("constructionProject", constructionProject);
+		return "modules/sg/managementcenter/materialproject/materialProjectForm";
+	}
+
+	/**
+	 * 保存
+	 */
+	@ResponseBody
+//	@RequiresPermissions(value={"managementcenter:materialproject:add","managementcenter:materialproject:edit"},logical=Logical.OR)
+	@RequestMapping(value = "save")
+	public AjaxJson save(ConstructionProject constructionProject, Model model) throws Exception{
+		AjaxJson j = new AjaxJson();
+		/**
+		 * 后台hibernate-validation插件校验
+		 */
+		String errMsg = beanValidator(constructionProject);
+		if (StringUtils.isNotBlank(errMsg)){
+			j.setSuccess(false);
+			j.setMsg(errMsg);
+			return j;
+		}
+		//新增或编辑表单保存
+		constructionProjectService.save(constructionProject);//保存
+		j.setSuccess(true);
+		j.setMsg("保存项目成功");
+		return j;
+	}
+	
+	/**
+	 * 删除项目
+	 */
+	@ResponseBody
+	@RequiresPermissions("managementcenter:materialproject:del")
+	@RequestMapping(value = "delete")
+	public AjaxJson delete(ConstructionProject constructionProject) {
+		AjaxJson j = new AjaxJson();
+		constructionProjectService.delete(constructionProject);
+		j.setMsg("删除项目成功");
+		return j;
+	}
+	
+	/**
+	 * 批量删除
+	 */
+	@ResponseBody
+	@RequiresPermissions("managementcenter:materialproject:del")
+	@RequestMapping(value = "deleteAll")
+	public AjaxJson deleteAll(String ids) {
+		AjaxJson j = new AjaxJson();
+		String idArray[] =ids.split(",");
+		for(String id : idArray){
+			constructionProjectService.delete(constructionProjectService.get(id));
+		}
+		j.setMsg("删除项目成功");
+		return j;
+	}
+	
+
+
+	/**
+	 * 导入Excel数据
+
+	 */
+	@ResponseBody
+//	@RequiresPermissions("managementcenter:materialproject:import")
+	@RequestMapping(value = "import")
+	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request){
+		AjaxJson j = new AjaxJson();
+		try {
+			ImportUtil importUtil = new ImportUtil(file, 0, 0);
+			List<ConstructionProject> constructionProjects = ImportProUtil.getProjectUtil(importUtil);
+			constructionProjectService.savaList(constructionProjects);
+			j.setMsg( "已成功导入 "+constructionProjects.size()+" 条项目表单记录");
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("导入项目失败!失败信息:"+e.getMessage());
+		}
+		return j;
+	}
+}

+ 92 - 24
src/main/java/com/jeeplus/modules/sg/managementcenter/project/util/PickingInfo.java

@@ -2,6 +2,7 @@ package com.jeeplus.modules.sg.managementcenter.project.util;
 import com.jeeplus.common.utils.SpringContextHolder;
 import com.jeeplus.common.websocket.service.system.SystemInfoSocketHandler;
 import com.jeeplus.modules.oa.entity.OaNotify;
+import com.jeeplus.modules.oa.entity.OaNotifyMaterial;
 import com.jeeplus.modules.oa.entity.OaNotifyRecord;
 import com.jeeplus.modules.sg.managementcenter.materialInventory.entity.MaterialInventory;
 import com.jeeplus.modules.sg.managementcenter.project.entity.PickingRequisition;
@@ -420,56 +421,74 @@ public  class PickingInfo {
         }
         return pickingRequisitionList;
     }
-
     /**
      * @param pickingRequisitions 所有缺货和未缺货信息的登记
      * @return 非缺货信息1
      */
-    public static String getNoStock(List<PickingRequisition> pickingRequisitions){
-        String noStock = "";
+    public static List<OaNotifyMaterial> getNoStock(List<PickingRequisition> pickingRequisitions){
+        ArrayList<OaNotifyMaterial> oaNotifyMaterials = new ArrayList<OaNotifyMaterial>();
+        OaNotifyMaterial oaNotifyMaterial = null;
         for (PickingRequisition pickingRequisition:pickingRequisitions){
             if (pickingRequisition.getWhetherStock()==0.0){
-                noStock+="【项目描述:"+pickingRequisition.getItemDetail()+";项目定义:"+pickingRequisition.getProjectDefinition()+";物料:"+pickingRequisition.getMaterialCode()
-                        +";物料描述:"+pickingRequisition.getMaterialDescription()+";计量单位:"+pickingRequisition.getMeasuringUnit()
-                        +";需求数量:"+pickingRequisition.getQuantityDemanded()+";已出库数量:"+pickingRequisition.getQuantityDelivered()
-                        +";非限制性库存数量:"+pickingRequisition.getStockNumber()+"】\n";
+                oaNotifyMaterial = new OaNotifyMaterial();
+                oaNotifyMaterial.setItemDetail(pickingRequisition.getItemDetail());//项目描述
+                oaNotifyMaterial.setProjectDefinition(pickingRequisition.getProjectDefinition());//项目定义
+                oaNotifyMaterial.setMaterialCode(pickingRequisition.getMaterialCode());//物料
+                oaNotifyMaterial.setMaterialDescription(pickingRequisition.getMaterialDescription());//物料描述
+                oaNotifyMaterial.setMeasuringUnit(pickingRequisition.getMeasuringUnit());//计量单位
+                oaNotifyMaterial.setQuantityDemanded(pickingRequisition.getQuantityDemanded());//需求数量
+                oaNotifyMaterial.setQuantityDelivered(pickingRequisition.getQuantityDelivered());//已经出库数量
+                oaNotifyMaterial.setStockNumber(pickingRequisition.getStockNumber());//非限制型库存数量
+                oaNotifyMaterials.add(oaNotifyMaterial);//添加进集合中
             }
         }
-        return noStock;
+        return oaNotifyMaterials;
     }
 
+
     /**
      * @param pickingRequisitions 所有缺货和未缺货信息的登记
      * @return 缺货信息3
      */
-    public static String getYesStock2(List<PickingRequisition> pickingRequisitions){
-        String yesStock2 = "";
+    public static List<OaNotifyMaterial> getYesStock2(List<PickingRequisition> pickingRequisitions){
+        ArrayList<OaNotifyMaterial> oaNotifyMaterials = new ArrayList<OaNotifyMaterial>();
+        OaNotifyMaterial oaNotifyMaterial = null;
         for (PickingRequisition pickingRequisition:pickingRequisitions){
             if (pickingRequisition.getWhetherStock()==1.0){
-                yesStock2+="【项目描述:"+pickingRequisition.getItemDetail()+";项目定义:"+pickingRequisition.getProjectDefinition()+";物料:"+pickingRequisition.getMaterialCode()
-                        +";物料描述:"+pickingRequisition.getMaterialDescription()+";计量单位:"+pickingRequisition.getMeasuringUnit()
-                        +";需求数量:"+pickingRequisition.getQuantityDemanded()+";已出库数量:"+pickingRequisition.getQuantityDelivered()
-                        +";非限制性库存数量:"+pickingRequisition.getStockNumber()+"】\n";
+                oaNotifyMaterial = new OaNotifyMaterial();
+                oaNotifyMaterial.setItemDetail(pickingRequisition.getItemDetail());//项目描述
+                oaNotifyMaterial.setProjectDefinition(pickingRequisition.getProjectDefinition());//项目定义
+                oaNotifyMaterial.setMaterialCode(pickingRequisition.getMaterialCode());//物料
+                oaNotifyMaterial.setMaterialDescription(pickingRequisition.getMaterialDescription());//物料描述
+                oaNotifyMaterial.setMeasuringUnit(pickingRequisition.getMeasuringUnit());//计量单位
+                oaNotifyMaterial.setQuantityDemanded(pickingRequisition.getQuantityDemanded());//需求数量
+                oaNotifyMaterial.setQuantityDelivered(pickingRequisition.getQuantityDelivered());//已经出库数量
+                oaNotifyMaterial.setStockNumber(pickingRequisition.getStockNumber());//非限制型库存数量
+                oaNotifyMaterials.add(oaNotifyMaterial);//添加进集合中
             }
         }
-        return yesStock2;
+        return oaNotifyMaterials;
     }
     /**
      * @param pickingRequisitions 所有缺货和未缺货信息的登记
      * @return 缺货信息2
      */
-    public static String getYesStock1(List<PickingRequisition> pickingRequisitions){
-        String yesStock1 = "";
-        List<PickingRequisition> duplicateRemoval2 = getDuplicateRemoval2(pickingRequisitions);
-        for (PickingRequisition pickingRequisition:duplicateRemoval2){
+    public static List<OaNotifyMaterial> getYesStock1(List<PickingRequisition> pickingRequisitions){
+        ArrayList<OaNotifyMaterial> oaNotifyMaterials = new ArrayList<OaNotifyMaterial>();
+        OaNotifyMaterial oaNotifyMaterial = null;
+        for (PickingRequisition pickingRequisition:pickingRequisitions){
             if (pickingRequisition.getWhetherStock()==1.0){
-                yesStock1+="【物料:"+pickingRequisition.getMaterialCode()
-                        +";物料描述:"+pickingRequisition.getMaterialDescription()+";计量单位:"+pickingRequisition.getMeasuringUnit()
-                        +";需求数量:"+pickingRequisition.getQuantityDemanded()+";已出库数量:"+pickingRequisition.getQuantityDelivered()
-                        +";非限制性库存数量:"+pickingRequisition.getStockNumber()+"】\n";
+                oaNotifyMaterial = new OaNotifyMaterial();
+                oaNotifyMaterial.setMaterialCode(pickingRequisition.getMaterialCode());//物料
+                oaNotifyMaterial.setMaterialDescription(pickingRequisition.getMaterialDescription());//物料描述
+                oaNotifyMaterial.setMeasuringUnit(pickingRequisition.getMeasuringUnit());//计量单位
+                oaNotifyMaterial.setQuantityDemanded(pickingRequisition.getQuantityDemanded());//需求数量
+                oaNotifyMaterial.setQuantityDelivered(pickingRequisition.getQuantityDelivered());//已经出库数量
+                oaNotifyMaterial.setStockNumber(pickingRequisition.getStockNumber());//非限制型库存数量
+                oaNotifyMaterials.add(oaNotifyMaterial);//添加进集合中
             }
         }
-        return yesStock1;
+        return oaNotifyMaterials;
     }
 
     //根据物料编码和物料描述进行去重
@@ -523,4 +542,53 @@ public  class PickingInfo {
         }
         return 0;
     }
+    /**
+     * @param pickingRequisitions 所有缺货和未缺货信息的登记
+     * @return 缺货信息2
+     */
+//    public static String getYesStock11(List<PickingRequisition> pickingRequisitions){
+//        String yesStock1 = "";
+//        List<PickingRequisition> duplicateRemoval2 = getDuplicateRemoval2(pickingRequisitions);
+//        for (PickingRequisition pickingRequisition:duplicateRemoval2){
+//            if (pickingRequisition.getWhetherStock()==1.0){
+//                yesStock1+="【物料:"+pickingRequisition.getMaterialCode()
+//                        +";物料描述:"+pickingRequisition.getMaterialDescription()+";计量单位:"+pickingRequisition.getMeasuringUnit()
+//                        +";需求数量:"+pickingRequisition.getQuantityDemanded()+";已出库数量:"+pickingRequisition.getQuantityDelivered()
+//                        +";非限制性库存数量:"+pickingRequisition.getStockNumber()+"】\n";
+//            }
+//        }
+//        return yesStock1;
+//    }
+    /**
+     * @param pickingRequisitions 所有缺货和未缺货信息的登记
+     * @return 非缺货信息1
+     */
+//    public static String getNoStock1(List<PickingRequisition> pickingRequisitions){
+//        String noStock = "";
+//        for (PickingRequisition pickingRequisition:pickingRequisitions){
+//            if (pickingRequisition.getWhetherStock()==0.0){
+//                noStock+="【项目描述:"+pickingRequisition.getItemDetail()+";项目定义:"+pickingRequisition.getProjectDefinition()+";物料:"+pickingRequisition.getMaterialCode()
+//                        +";物料描述:"+pickingRequisition.getMaterialDescription()+";计量单位:"+pickingRequisition.getMeasuringUnit()
+//                        +";需求数量:"+pickingRequisition.getQuantityDemanded()+";已出库数量:"+pickingRequisition.getQuantityDelivered()
+//                        +";非限制性库存数量:"+pickingRequisition.getStockNumber()+"】\n";
+//            }
+//        }
+//        return noStock;
+//    }
+    /**
+     * @param pickingRequisitions 所有缺货和未缺货信息的登记
+     * @return 缺货信息3
+     */
+//    public static String getYesStock21(List<PickingRequisition> pickingRequisitions){
+//        String yesStock2 = "";
+//        for (PickingRequisition pickingRequisition:pickingRequisitions){
+//            if (pickingRequisition.getWhetherStock()==1.0){
+//                yesStock2+="【项目描述:"+pickingRequisition.getItemDetail()+";项目定义:"+pickingRequisition.getProjectDefinition()+";物料:"+pickingRequisition.getMaterialCode()
+//                        +";物料描述:"+pickingRequisition.getMaterialDescription()+";计量单位:"+pickingRequisition.getMeasuringUnit()
+//                        +";需求数量:"+pickingRequisition.getQuantityDemanded()+";已出库数量:"+pickingRequisition.getQuantityDelivered()
+//                        +";非限制性库存数量:"+pickingRequisition.getStockNumber()+"】\n";
+//            }
+//        }
+//        return yesStock2;
+//    }
 }

+ 17 - 15
src/main/java/com/jeeplus/modules/sg/managementcenter/project/web/ProjectController.java

@@ -17,6 +17,7 @@ import javax.validation.ConstraintViolationException;
 import com.jeeplus.common.utils.SpringContextHolder;
 import com.jeeplus.common.websocket.service.system.SystemInfoSocketHandler;
 import com.jeeplus.modules.oa.entity.OaNotify;
+import com.jeeplus.modules.oa.entity.OaNotifyMaterial;
 import com.jeeplus.modules.oa.entity.OaNotifyRecord;
 import com.jeeplus.modules.oa.service.OaNotifyService;
 import com.jeeplus.modules.sg.managementcenter.materialInventory.entity.MaterialInventory;
@@ -451,7 +452,7 @@ public class ProjectController extends BaseController {
 	@ResponseBody
 	@RequiresPermissions("sg:managementcenter:project:importPicking")
 	@RequestMapping(value = "importPicking")
-	public AjaxJson importFileRequisition(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
+	public AjaxJson importFileRequisition(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request){
 		AjaxJson j = new AjaxJson();
 		String str = "";//提示
 		try {
@@ -515,25 +516,26 @@ public class ProjectController extends BaseController {
 						List<PickingRequisition> whetherStock = PickingInfo.getWhetherStock(listSameSetOf, byListPicking);
 
 						//得到非缺货信息1的通知
-						String noStock = PickingInfo.getNoStock(whetherStock);
-						//得到缺货信息3的通知
-						String yesStock2 = PickingInfo.getYesStock2(whetherStock);
+						List<OaNotifyMaterial> noStockList = PickingInfo.getNoStock(whetherStock);
+						//得到缺货信息3的通知(缺货项目信息)
+						List<OaNotifyMaterial> yesStock2List = PickingInfo.getYesStock2(whetherStock);
 						//得到缺货信息2的通知
-						String yesStock1 = PickingInfo.getYesStock1(whetherStock);
+						List<OaNotifyMaterial> yesStock1List = PickingInfo.getYesStock1(whetherStock);
 						//发送通知方法
 						//非缺货信息1
-						if (!"".equals(noStock)){
+						if (null!=noStockList && noStockList.size()>0){
 							int count = 0;
 							List<String> listUserId = PickingInfo.getListUserId(PickingInfo.ALL_USER_ID);
 							List<String> userId = pickingRequisitionService.findUserId(listUserId);
 							String stringJoiningTogether = PickingInfo.getStringJoiningTogether(userId);//获取通知人
 							OaNotify oaNotify = new OaNotify();
 							oaNotify.setType("5");
-							oaNotify.setTitle("非缺货信息");
-							oaNotify.setContent(noStock);
+							oaNotify.setTitle("非缺货信息");//非缺货信息
+//							oaNotify.setContent(noStock);
+							oaNotify.setContent("请在详情中查看...");
 							oaNotify.setStatus("1");
 							oaNotify.setOaNotifyRecordIds(stringJoiningTogether);
-							oaNotifyService.save(oaNotify);
+							oaNotifyService.saveList(oaNotify,noStockList);
 							List<OaNotifyRecord> list = oaNotify.getOaNotifyRecordList();
 							for(OaNotifyRecord o : list){
 								count++;
@@ -545,7 +547,7 @@ public class ProjectController extends BaseController {
 							str="已经发送非缺货信息通知;";
 						}
 						//非缺货信息2
-						if (!"".equals(yesStock1)){
+						if (null!=yesStock1List&&yesStock1List.size()>0){
 							int count = 0;
 							List<String> listUserId = PickingInfo.getListUserId(PickingInfo.QH_USER_ID);
 							List<String> userId = pickingRequisitionService.findUserId(listUserId);
@@ -553,10 +555,10 @@ public class ProjectController extends BaseController {
 							OaNotify oaNotify = new OaNotify();
 							oaNotify.setType("6");
 							oaNotify.setTitle("缺货信息");
-							oaNotify.setContent(yesStock1);
+							oaNotify.setContent("请在详情中查看...");
 							oaNotify.setStatus("1");
 							oaNotify.setOaNotifyRecordIds(stringJoiningTogether);
-							oaNotifyService.save(oaNotify);
+							oaNotifyService.saveList(oaNotify,yesStock1List);
 							List<OaNotifyRecord> list = oaNotify.getOaNotifyRecordList();
 							for(OaNotifyRecord o : list){
 								count++;
@@ -568,7 +570,7 @@ public class ProjectController extends BaseController {
 							str+="已经发送缺货信息通知;";
 						}
 						//非缺货信息2
-						if (!"".equals(yesStock2)){
+						if (null!=yesStock2List&&yesStock2List.size()>0){
 							int count = 0;
 							List<String> listUserId = PickingInfo.getListUserId(PickingInfo.QH_USER_ID);
 							List<String> userId = pickingRequisitionService.findUserId(listUserId);
@@ -576,10 +578,10 @@ public class ProjectController extends BaseController {
 							OaNotify oaNotify = new OaNotify();
 							oaNotify.setType("7");
 							oaNotify.setTitle("缺货项目信息");
-							oaNotify.setContent(yesStock2);
+							oaNotify.setContent("请在详情中查看...");
 							oaNotify.setStatus("1");
 							oaNotify.setOaNotifyRecordIds(stringJoiningTogether);
-							oaNotifyService.save(oaNotify);
+							oaNotifyService.saveList(oaNotify,yesStock2List);
 							List<OaNotifyRecord> list = oaNotify.getOaNotifyRecordList();
 							for(OaNotifyRecord o : list){
 								count++;

+ 166 - 0
src/main/webapp/webpage/modules/oa/notify/oaNotifyFormMaterial.js

@@ -0,0 +1,166 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+$(document).ready(function() {
+	var parentId = $("#parentId").val();
+	$('#table').bootstrapTable({
+		  //请求方法
+				method: 'post',
+				//类型json
+				dataType: "json",
+				contentType: "application/x-www-form-urlencoded",
+    	       //最低显示2行
+    	       minimumCountColumns: 2,
+               //是否显示行间隔色
+               striped: true,
+               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+               cache: false,
+               //是否显示分页(*)
+               pagination: true,
+                //排序方式
+               sortOrder: "asc",
+               //初始化加载第一页,默认第一页
+               pageNumber:1,
+               //每页的记录行数(*)
+               pageSize: 10,
+               //可供选择的每页的行数(*)
+               pageList: [10, 25, 50, 100],
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
+               url: "${ctx}/oa/oaNotify/marterialData?parentId="+parentId,
+               //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
+               //queryParamsType:'',
+               ////查询参数,每次调用是会带上这个参数,可自定义
+               queryParams : function(params) {
+               	var searchParam = $("#searchForm").serializeJSON();
+               	searchParam.pageNo = params.limit === undefined? "1" :params.offset/params.limit+1;
+               	searchParam.pageSize = params.limit === undefined? -1 : params.limit;
+               	searchParam.orderBy = params.sort === undefined? "" : params.sort+ " "+  params.order;
+                   return searchParam;
+               },
+				formatNoMatches : function(){return '无数据'},
+               //分页方式:client客户端分页,server服务端分页(*)
+               sidePagination: "server",
+               contextMenuTrigger:"right",//pc端 按右键弹出菜单
+               contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
+               contextMenu: '#context-menu',
+
+				onShowSearch: function () {
+					$("#search-collapse").slideToggle();
+				},
+               columns: [
+		    {
+		        field: 'itemDetail',
+		        title: '项目描述'
+		    }
+		    ,{
+		        field: 'projectDefinition',
+		        title: '项目定义号'
+
+		    },{
+		        field: 'materialCode',
+		        title: '物料编码'
+		    }
+			,{
+		        field: 'materialDescription',
+		        title: '物料描述'
+
+		    },{
+		        field: 'measuringUnit',
+		        title: '计量单位'
+
+		    },{
+		        field: 'quantityDemanded',
+		        title: '需求数量'
+
+		    }
+                   ,{
+                       field: 'quantityDelivered',
+                       title: '已经出库数量'
+                   }
+                   ,{
+                       field: 'stockNumber',
+                       title: '库存数量'
+
+                   }
+		     ]
+
+		});
+
+
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+
+		 
+		  $('#table').bootstrapTable("toggleView");
+		}
+	  
+	  $('#table').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+                'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', ! $('#table').bootstrapTable('getSelections').length);
+            $('#edit').prop('disabled', $('#table').bootstrapTable('getSelections').length!=1);
+        });
+		  
+		$("#btnImport").click(function(){
+			jp.open({
+			    type: 1, 
+			    area: [500, 300],
+			    title:"导入数据",
+			    content:$("#importBox").html() ,
+			    btn: ['下载模板','确定', '关闭'],
+				    btn1: function(index, layero){
+					  window.location='${ctx}/oa/oaNotify/import/template';
+				  },
+			    btn2: function(index, layero){
+				        var inputForm =top.$("#importForm");
+				        var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe 
+				        inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				        inputForm.onsubmit = function(){
+				        	jp.loading('  正在导入,请稍等...');
+				        }
+				        inputForm.submit();
+					    jp.close(index);
+				  },
+				 
+				  btn3: function(index){ 
+					  jp.close(index);
+	    	       }
+			}); 
+		});
+		    
+	  $("#search").click("click", function() {// 绑定查询按扭
+		  $('#table').bootstrapTable('refresh');
+		});
+		$("#export").click(function(){//导出Excel文件
+			jp.downloadFile('${ctx}/oa/oaNotify/export?parentId='+parentId);
+		});
+	 $("#reset").click("click", function() {// 绑定查询按扭
+		  $("#searchForm  input").val("");
+		  $("#searchForm  select").val("");
+		  $('#table').bootstrapTable('refresh');
+		});
+	});
+		
+  function getIdSelections() {
+        return $.map($("#table").bootstrapTable('getSelections'), function (row) {
+            return row.id
+        });
+    }
+
+function deleteAll(){
+
+    jp.confirm('确认要删除通知吗?', function(){
+        jp.loading();
+        jp.get("${ctx}/oa/oaNotify/deleteAll?ids=" + getIdSelections(), function(data){
+            if(data.success){
+                $('#table').bootstrapTable('refresh');
+                jp.success(data.msg);
+            }else{
+                jp.error(data.msg);
+            }
+        })
+
+    })
+}
+  function edit(){
+	  jp.go("${ctx}/oa/oaNotify/form?id=" + getIdSelections());
+  }
+  
+</script>

+ 149 - 0
src/main/webapp/webpage/modules/oa/notify/oaNotifyFormMaterial.jsp

@@ -0,0 +1,149 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ include file="/webpage/include/bootstraptable.jsp"%>
+<%@include file="/webpage/include/treeview.jsp" %>
+<html>
+<head>
+	<title>通知管理</title>
+	<meta name="decorator" content="ani"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			jp.ajaxForm("#inputForm",function(data){
+				if(data.success){
+					jp.success(data.msg);
+					jp.go("${ctx}/oa/oaNotify");
+				}else{
+					jp.error(data.msg);
+				}
+			})
+			
+		});
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">				
+<div class="row">
+	<div class="col-md-12">
+	<div class="panel panel-primary">
+		<div class="panel-heading">
+			<h3 class="panel-title"> 
+				<a class="panelButton" href="${ctx}/oa/oaNotify${isSelf?'/self':'' }"><i class="ti-angle-left"></i> 返回</a>
+			</h3>
+		</div>
+		<div class="panel-body">
+		<form:form id="inputForm" modelAttribute="oaNotify" action="${ctx}/oa/oaNotify/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+			<input id="parentId"  type="hidden" readonly="readonly" value="${oaNotify.id}">
+				<div class="form-group">
+					<label class="col-sm-2 control-label"><font color="red">*</font>类型:</label>
+					<div class="col-sm-10">
+						<form:select path="type" class="form-control required">
+						<form:option value="" label=""/>
+						<form:options items="${fns:getDictList('oa_notify_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				
+				<div class="form-group">
+					<label class="col-sm-2 control-label"><font color="red">*</font>标题:</label>
+					<div class="col-sm-10">
+						<form:input path="title" htmlEscape="false" maxlength="200" class="form-control required"/>
+					</div>
+				</div>
+
+			<%@ include file="oaNotifyFormMaterial.js"%>
+			<div>
+				<button id="export" class="btn btn-warning">
+					<i class="fa fa-file-excel-o"></i> 导出
+				</button>
+				<table id="table"   data-toolbar="#toolbar"></table>
+			</div>
+				<%--<div class="form-group">--%>
+					<%--<label class="col-sm-2 control-label">附件:</label>--%>
+					<%--<div class="col-sm-10">--%>
+						<%--<c:if test="${oaNotify.status ne '1'}">--%>
+							<%--<sys:fileUpload path="files" value="${oaNotify.files}" type="file" uploadPath="/oa/notify"/>--%>
+						<%--</c:if>--%>
+				         <%--<c:if test="${oaNotify.status eq '1'}">--%>
+							 <%--<sys:fileUpload path="files" value="${oaNotify.files}" type="file" uploadPath="/oa/notify"  readonly="true"/>--%>
+				         <%--</c:if>--%>
+					<%--</div>--%>
+				<%--</div>--%>
+				
+				<c:if test="${oaNotify.status ne '1'}">
+				<div class="form-group">
+					<label class="col-sm-2 control-label"><font color="red">*</font>状态:</label>
+					<div class="col-sm-10">
+					<form:radiobuttons path="status" items="${fns:getDictList('oa_notify_status')}" itemLabel="label" itemValue="value" htmlEscape="false" class="i-checks required"/>
+					</div>
+				</div>
+				<div class="form-group">
+					<label class="col-sm-2 control-label"><font color="red">*</font>接受人:</label>
+					<div class="col-sm-10">
+						<sys:userselect roleName="配网工程专职;配网系统专职" id="user" name="userId" value="${construction.tuser.id}" loginName="loginName" loginValue="系统专职"
+										labelName="user.name" labelValue="${construction.tuser.name}"
+										cssClass="form-control required"/>
+					</div>
+				</div>
+				</c:if>
+				
+				
+			  <c:if test="${oaNotify.status eq '1'}">
+				<div class="form-group">
+				<table>
+					  <tr>
+				         <td  class="width-15 active">	<label class="pull-right">接受人:</label></td>
+				         <td class="width-35" colspan="3"><table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+								<thead>
+									<tr>
+										<th>接受人</th>
+										<th>接受部门</th>
+										<th>阅读状态</th>
+										<th>阅读时间</th>
+									</tr>
+								</thead>
+								<tbody>
+								<c:forEach items="${oaNotify.oaNotifyRecordList}" var="oaNotifyRecord">
+									<tr>
+										<td>
+											${oaNotifyRecord.user.name}
+										</td>
+										<td>
+											${oaNotifyRecord.user.office.name}
+										</td>
+										<td>
+											${fns:getDictLabel(oaNotifyRecord.readFlag, 'oa_notify_read', '')}
+										</td>
+										<td>
+											<fmt:formatDate value="${oaNotifyRecord.readDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+										</td>
+									</tr>
+								</c:forEach>
+								</tbody>
+							</table>
+							已查阅:${oaNotify.readNum} &nbsp; 未查阅:${oaNotify.unReadNum} &nbsp; 总共:${oaNotify.readNum + oaNotify.unReadNum}</td>
+				      </tr>
+				  </table>
+				  </div>
+				</c:if>
+				<c:if test="${oaNotify.status ne '1'}">
+				<shiro:hasPermission name="oa:oaNotify:edit">
+						<div class="col-lg-3"></div>
+				        <div class="col-lg-6">
+				             <div class="form-group text-center">
+				                 <div>
+				                     <button class="btn btn-primary btn-block btn-lg btn-parsley" data-loading-text="正在提交...">提 交</button>
+				                 </div>
+				             </div>
+				        </div>
+				</shiro:hasPermission>
+				</c:if>
+		</form:form>
+		</div>
+
+	</div>
+	</div>
+</div>
+</div>
+</body>
+</html>

+ 106 - 0
src/main/webapp/webpage/modules/sg/managementcenter/constructionProject/constructionList.js

@@ -0,0 +1,106 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script type="text/javascript">
+		$(document).ready(function() {
+		//zTree初始化
+			$.getJSON("${ctx}/sg/managementCenter/constructionProject/bootstrapTreeTable",function(data){
+				$('#jstree').treeview({
+					data: data,
+					levels: 1,
+                    highlightSelected:true,
+                    // multiSelect:true,
+                    showCheckbox:true,
+		            // onNodeSelected: function(event, treeNode) {
+					// 	alert(treeNode.id);
+		            // 	// var id = treeNode.id == '0' ? '' :treeNode.id;
+					// 	// if(treeNode.level == 1){//level=0 代表公司
+					// 	// 	$("#companyId").val(id);
+					// 	// 	$("#companyName").val(treeNode.text);
+					// 	// 	$("#officeId").val("");
+					// 	// 	$("#officeName").val("");
+					// 	// }else{
+					// 	// 	$("#companyId").val("");
+					// 	// 	$("#companyName").val("");
+					// 	// 	$("#officeId").val(id);
+					// 	// 	$("#officeName").val(treeNode.text);
+					// 	// }
+		            // },
+		         });
+			});
+            $testTree1TreeTable=$('#testTree1TreeTable').treeTable({
+                theme:'vsStyle',
+                expandLevel : 2,
+                column:0,
+                checkbox: false,
+                url:'${ctx}/test/tree/dialog/testTree1/getChildren?parentId=',
+                callback:function(item) {
+                    var treeTableTpl= $("#testTree1TreeTableTpl").html();
+                    item.dict = {};
+
+                    var result = laytpl(treeTableTpl).render({
+                        row: item
+                    });
+                    return result;
+                },
+                beforeClick: function($testTree1TreeTable, id) {
+                    //异步获取数据 这里模拟替换处理
+                    $testTree1TreeTable.refreshPoint(id);
+                },
+                beforeExpand : function($testTree1TreeTable, id) {
+                },
+                afterExpand : function($testTree1TreeTable, id) {
+                },
+                beforeClose : function($testTree1TreeTable, id) {
+
+                }
+            });
+
+            $testTree1TreeTable.initParents('${parentIds}', "0");//在保存编辑时定位展开当前节点
+        });
+		  function refresh() {
+              $('#table').bootstrapTable('refresh');
+          }
+	</script>
+     <script type="text/html" id="testTree1TreeTableTpl">
+            <td>
+            <c:choose>
+        <c:when test="${fns:hasPermission('test:tree:dialog:testTree1:edit')}">
+            <a  href="#" onclick="jp.openSaveDialog('编辑机构', '${ctx}/test/tree/dialog/testTree1/form?id={{d.row.id}}','800px', '500px')">
+            {{d.row.name === undefined ? "": d.row.name}}
+        </a>
+        </c:when>
+        <c:when test="${fns:hasPermission('test:tree:dialog:testTree1:view')}">
+            <a  href="#" onclick="jp.openViewDialog('查看机构', '${ctx}/test/tree/dialog/testTree1/form?id={{d.row.id}}','800px', '500px')">
+            {{d.row.name === undefined ? "": d.row.name}}
+        </a>
+        </c:when>
+        <c:otherwise>
+        {{d.row.name === undefined ? "": d.row.name}}
+        </c:otherwise>
+        </c:choose>
+        </td>
+        <td>
+        {{d.row.remarks === undefined ? "": d.row.remarks}}
+        </td>
+        <td>
+        <div class="btn-group">
+            <button type="button" class="btn  btn-primary btn-xs dropdown-toggle" data-toggle="dropdown">
+            <i class="fa fa-cog"></i>
+            <span class="fa fa-chevron-down"></span>
+            </button>
+            <ul class="dropdown-menu" role="menu">
+            <shiro:hasPermission name="test:tree:dialog:testTree1:view">
+            <li><a href="#" onclick="jp.openViewDialog('查看机构', '${ctx}/test/tree/dialog/testTree1/form?id={{d.row.id}}','800px', '500px')"><i class="fa fa-search-plus"></i> 查看</a></li>
+        </shiro:hasPermission>
+        <shiro:hasPermission name="test:tree:dialog:testTree1:edit">
+            <li><a href="#" onclick="jp.openSaveDialog('修改机构', '${ctx}/test/tree/dialog/testTree1/form?id={{d.row.id}}','800px', '500px')"><i class="fa fa-edit"></i> 修改</a></li>
+        </shiro:hasPermission>
+        <shiro:hasPermission name="test:tree:dialog:testTree1:del">
+            <li><a  onclick="return del(this, '{{d.row.id}}')"><i class="fa fa-trash"></i> 删除</a></li>
+        </shiro:hasPermission>
+        <shiro:hasPermission name="test:tree:dialog:testTree1:add">
+            <li><a href="#" onclick="jp.openSaveDialog('添加下级机构', '${ctx}/test/tree/dialog/testTree1/form?parent.id={{d.row.id}}','800px', '500px')"><i class="fa fa-plus"></i> 添加下级机构</a></li>
+        </shiro:hasPermission>
+        </ul>
+        </div>
+        </td>
+</script>

+ 117 - 0
src/main/webapp/webpage/modules/sg/managementcenter/constructionProject/constructionList.jsp

@@ -0,0 +1,117 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>用户管理</title>
+	<meta name="decorator" content="ani"/>
+	<%@ include file="/webpage/include/bootstraptable.jsp"%>
+	<link href="${ctxStatic}/plugin/bootstrapTree/bootstrap-treeview.css" rel="stylesheet" type="text/css"/>
+	<script src="${ctxStatic}/plugin/bootstrapTree/bootstrap-treeview.js" type="text/javascript"></script>
+	<%@ include file="constructionList.js"%>
+</head>
+<body>
+	<div class="wrapper wrapper-content">
+	<div class="panel panel-primary">
+	<div class="panel-heading">
+		<h3 class="panel-title">项目明细列表</h3>
+	</div>
+	<div class="panel-body">
+	<div class="row">
+		<div class="col-sm-3 col-md-3" >
+			<div id="jstree"></div> 
+		</div>
+		<div  class="col-sm-9 col-md-8 animated fadeInRight">
+			<!-- 搜索框-->
+			<%--<div id="search-collapse" class="collapse">--%>
+				<%--<div class="accordion-inner">--%>
+					<%--<form id="searchForm" class="form form-horizontal well clearfix" >--%>
+						<%--<div class="col-sm-4">--%>
+							<%--<label class="label-item single-overflow pull-left" title="登录名:">登录名:</label>--%>
+							<%--<input type="text" name="loginName" maxlength="100"  class=" form-control"/>--%>
+						<%--</div>--%>
+						<%--<div class="col-sm-4">--%>
+							<%--<label class="label-item single-overflow pull-left" title="姓名:">姓名:</label>--%>
+							<%--<input type="text" name="name" maxlength="100"  class=" form-control"/>--%>
+						<%--</div>--%>
+						<%--<div class="col-sm-4">--%>
+					    	<%--<label class="label-item single-overflow pull-left" title="公司:">归属公司:</label>--%>
+					    	<%--<sys:treeselect id="company" name="company.id"--%>
+										<%--title="公司" url="/sys/office/treeData?type=1" cssClass=" form-control" allowClear="true"/>--%>
+					    <%--</div>--%>
+					    <%--<div class="col-sm-4">--%>
+					    	<%--<label class="label-item single-overflow pull-left" title="员工:">归属部门:</label>--%>
+					   		<%--<sys:treeselect id="office" name="office.id"--%>
+								<%--title="部门" url="/sys/office/treeData?type=2" cssClass=" form-control" allowClear="true" notAllowSelectParent="true"/>--%>
+					    <%--</div>--%>
+					    <%--<div class="col-sm-4">--%>
+							 <%--<div style="margin-top:26px">--%>
+							  <%--<a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>--%>
+							  <%--<a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>--%>
+							<%--</div>--%>
+					    <%--</div>--%>
+					<%--</form>--%>
+				<%--</div>--%>
+			<%--</div><!-- 搜索框结束 -->--%>
+
+		<!-- 工具栏 -->
+	    <div id="toolbar">
+
+	    	<shiro:hasPermission name="sys:user:add">
+	    		<a id="add" class="btn btn-primary"  onclick="jp.openSaveDialog('新建用户', '${ctx}/sys/user/form','800px', '680px')"><i class="glyphicon glyphicon-plus"></i> 新建</a>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="sys:user:edit">
+				<button id="edit" class="btn btn-success" disabled onclick="edit()">
+		            <i class="glyphicon glyphicon-edit"></i> 修改
+		        </button>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="sys:user:del">
+				<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
+		            <i class="glyphicon glyphicon-remove"></i> 删除
+		        </button>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="sys:user:import">
+				<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
+				<div id="importBox" class="hide">
+					<form id="importForm" action="${ctx}/sys/user/import" method="post" enctype="multipart/form-data"
+						 style="padding-left:20px;text-align:center;" ><br/>
+						<input id="uploadFile" name="file" type="file" style="width:330px"/>导入文件不能超过5M,仅允许导入“xls”或“xlsx”格式文件!<br/>  
+					</form>
+				</div>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="sys:user:export">
+				<a id="export" class="btn btn-warning" href="${ctx}/sys/user/export"><i class="fa fa-file-excel-o"></i> 导出</a>
+	       </shiro:hasPermission>
+	    </div><!-- 工具栏结束 -->
+	    
+	    
+	    <!-- 表格 -->
+	    <%--<table id="table"--%>
+	           <%--data-toolbar="#toolbar">--%>
+	    <%--</table>--%>
+
+		<table id="testTree1TreeTable" class="table table-hover">
+			<thead>
+			<tr>
+				<th>名称</th>
+				<th>备注信息</th>
+				<th>操作</th>
+			</tr>
+			</thead>
+			<tbody id="testTree1TreeTableList"></tbody>
+		</table>
+		<%--&lt;%&ndash;<div class="col-sm-3 col-md-2" >&ndash;%&gt;--%>
+			<%--&lt;%&ndash;<div id="jstree1"></div>&ndash;%&gt;--%>
+		<%--&lt;%&ndash;</div>&ndash;%&gt;--%>
+	    <%--<!-- context menu -->--%>
+	    <%--&lt;%&ndash;<ul id="context-menu" class="dropdown-menu">&ndash;%&gt;--%>
+	        <%--&lt;%&ndash;<li data-item="edit"><a>编辑</a></li>&ndash;%&gt;--%>
+	        <%--&lt;%&ndash;<li data-item="delete"><a>删除</a></li>&ndash;%&gt;--%>
+	        <%--&lt;%&ndash;<li data-item="cancel"><a>取消</a></li>&ndash;%&gt;--%>
+	    <%--&lt;%&ndash;</ul> &ndash;%&gt;--%>
+	</div>
+	</div>
+	</div>
+	</div>
+	</div>
+</body>
+</html>