Parcourir la source

Merge remote-tracking branch 'origin/master'

yue il y a 5 ans
Parent
commit
c533cd1c84
25 fichiers modifiés avec 3307 ajouts et 0 suppressions
  1. 91 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/entity/ModuleBlock.java
  2. 182 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/entity/ModuleListing.java
  3. 30 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/entity/ModuleVersion.java
  4. 23 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/mapper/ModuleBlockMapper.java
  5. 21 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/mapper/ModuleListingMapper.java
  6. 201 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/mapper/xml/ModuleBlockMapper.xml
  7. 256 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/mapper/xml/ModuleListingMapper.xml
  8. 82 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/service/ModuleBlockService.java
  9. 55 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/service/ModuleListingService.java
  10. 111 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/util/ModuleUtil.java
  11. 224 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/web/ModuleBlockWeb.java
  12. 151 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/web/ModuleListingWeb.java
  13. 63 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockForm.jsp
  14. 270 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockList.js
  15. 87 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockList.jsp
  16. 83 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockNewForm.jsp
  17. 258 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockNewList.js
  18. 97 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockNewList.jsp
  19. 275 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleListing.js
  20. 68 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleListing.jsp
  21. 128 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleListingNewForm.jsp
  22. 280 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleNewListing.js
  23. 81 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleNewListing.jsp
  24. 155 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleVersionList.js
  25. 35 0
      src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleVersionList.jsp

+ 91 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/entity/ModuleBlock.java

@@ -0,0 +1,91 @@
+package com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity;
+
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.core.persistence.DataEntity;
+
+import java.io.Externalizable;
+import java.io.Serializable;
+
+public class ModuleBlock extends DataEntity<ModuleBlock>{
+    private String mdBigClass;
+    private String mdTheClass;
+    private String mdSmallClass;
+    private String mdUnit;
+    private String mdImg;
+    private Integer mdBigSort;
+    private Integer mdTheSort;
+    private Integer mdSmallSort;
+    private String mdVersion;
+
+    public String getMdBigClass() {
+        return mdBigClass;
+    }
+
+    public void setMdBigClass(String mdBigClass) {
+        this.mdBigClass = mdBigClass;
+    }
+
+    public String getMdTheClass() {
+        return mdTheClass;
+    }
+
+    public void setMdTheClass(String mdTheClass) {
+        this.mdTheClass = mdTheClass;
+    }
+
+    public String getMdSmallClass() {
+        return mdSmallClass;
+    }
+
+    public void setMdSmallClass(String mdSmallClass) {
+        this.mdSmallClass = mdSmallClass;
+    }
+
+    public String getMdUnit() {
+        return mdUnit;
+    }
+
+    public void setMdUnit(String mdUnit) {
+        this.mdUnit = mdUnit;
+    }
+
+    public String getMdImg() {
+        return mdImg;
+    }
+
+    public void setMdImg(String mdImg) {
+        this.mdImg = mdImg;
+    }
+
+    public Integer getMdBigSort() {
+        return mdBigSort;
+    }
+
+    public void setMdBigSort(Integer mdBigSort) {
+        this.mdBigSort = mdBigSort;
+    }
+
+    public Integer getMdTheSort() {
+        return mdTheSort;
+    }
+
+    public void setMdTheSort(Integer mdTheSort) {
+        this.mdTheSort = mdTheSort;
+    }
+
+    public Integer getMdSmallSort() {
+        return mdSmallSort;
+    }
+
+    public void setMdSmallSort(Integer mdSmallSort) {
+        this.mdSmallSort = mdSmallSort;
+    }
+
+    public String getMdVersion() {
+        return mdVersion;
+    }
+
+    public void setMdVersion(String mdVersion) {
+        this.mdVersion = mdVersion;
+    }
+}

+ 182 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/entity/ModuleListing.java

@@ -0,0 +1,182 @@
+package com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+public class ModuleListing extends DataEntity<ModuleListing> {
+        private String mdBigClass;//模块大类
+        private String mdTheClass;//模块中类
+        private String mdName;//模块名称
+        private String bigClassification;//大分类
+        private String theClassification;//中分类
+        private String smallClassification;//小分类
+        private String materialCode;//物料编码
+        private String materialDescription;//物料描述
+        private String extensionDescription;//扩展描述
+        private String mdUnits;//单位
+        private Double mdCount;//数量
+        private Double mdSingleWeight;//单重
+        private Double mdTotalWeight;//总重
+        private String mdTheParty;//甲乙供
+        private String mdText;//备注
+        private Double mdTotalAmount;//总量
+        private String blockId;
+
+    @Override
+    public String toString() {
+        return "ModuleListing{" +
+                "mdBigClass='" + mdBigClass + '\'' +
+                ", mdTheClass='" + mdTheClass + '\'' +
+                ", mdName='" + mdName + '\'' +
+                ", bigClassification='" + bigClassification + '\'' +
+                ", theClassification='" + theClassification + '\'' +
+                ", smallClassification='" + smallClassification + '\'' +
+                ", materialCode='" + materialCode + '\'' +
+                ", materialDescription='" + materialDescription + '\'' +
+                ", extensionDescription='" + extensionDescription + '\'' +
+                ", mdUnits='" + mdUnits + '\'' +
+                ", mdCount=" + mdCount +
+                ", mdSingleWeight=" + mdSingleWeight +
+                ", mdTotalWeight=" + mdTotalWeight +
+                ", mdTheParty='" + mdTheParty + '\'' +
+                ", mdText='" + mdText + '\'' +
+                ", mdTotalAmount=" + mdTotalAmount +
+                ", blockId='" + blockId + '\'' +
+                '}';
+    }
+
+    public String getMdBigClass() {
+        return mdBigClass;
+    }
+
+    public void setMdBigClass(String mdBigClass) {
+        this.mdBigClass = mdBigClass;
+    }
+
+    public String getMdTheClass() {
+        return mdTheClass;
+    }
+
+    public void setMdTheClass(String mdTheClass) {
+        this.mdTheClass = mdTheClass;
+    }
+
+    public String getMdName() {
+        return mdName;
+    }
+
+    public void setMdName(String mdName) {
+        this.mdName = mdName;
+    }
+
+    public String getBigClassification() {
+        return bigClassification;
+    }
+
+    public void setBigClassification(String bigClassification) {
+        this.bigClassification = bigClassification;
+    }
+
+    public String getTheClassification() {
+        return theClassification;
+    }
+
+    public void setTheClassification(String theClassification) {
+        this.theClassification = theClassification;
+    }
+
+    public String getSmallClassification() {
+        return smallClassification;
+    }
+
+    public void setSmallClassification(String smallClassification) {
+        this.smallClassification = smallClassification;
+    }
+
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+
+    public String getMaterialDescription() {
+        return materialDescription;
+    }
+
+    public void setMaterialDescription(String materialDescription) {
+        this.materialDescription = materialDescription;
+    }
+
+    public String getExtensionDescription() {
+        return extensionDescription;
+    }
+
+    public void setExtensionDescription(String extensionDescription) {
+        this.extensionDescription = extensionDescription;
+    }
+
+    public String getMdUnits() {
+        return mdUnits;
+    }
+
+    public void setMdUnits(String mdUnits) {
+        this.mdUnits = mdUnits;
+    }
+
+    public Double getMdCount() {
+        return mdCount;
+    }
+
+    public void setMdCount(Double mdCount) {
+        this.mdCount = mdCount;
+    }
+
+    public Double getMdSingleWeight() {
+        return mdSingleWeight;
+    }
+
+    public void setMdSingleWeight(Double mdSingleWeight) {
+        this.mdSingleWeight = mdSingleWeight;
+    }
+
+    public Double getMdTotalWeight() {
+        return mdTotalWeight;
+    }
+
+    public void setMdTotalWeight(Double mdTotalWeight) {
+        this.mdTotalWeight = mdTotalWeight;
+    }
+
+    public String getMdTheParty() {
+        return mdTheParty;
+    }
+
+    public void setMdTheParty(String mdTheParty) {
+        this.mdTheParty = mdTheParty;
+    }
+
+    public String getMdText() {
+        return mdText;
+    }
+
+    public void setMdText(String mdText) {
+        this.mdText = mdText;
+    }
+
+    public Double getMdTotalAmount() {
+        return mdTotalAmount;
+    }
+
+    public void setMdTotalAmount(Double mdTotalAmount) {
+        this.mdTotalAmount = mdTotalAmount;
+    }
+
+    public String getBlockId() {
+        return blockId;
+    }
+
+    public void setBlockId(String blockId) {
+        this.blockId = blockId;
+    }
+}

+ 30 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/entity/ModuleVersion.java

@@ -0,0 +1,30 @@
+package com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.persistence.DataEntity;
+
+import java.util.Date;
+
+public class ModuleVersion extends DataEntity<ModuleVersion>{
+   private String version;//版本号
+   private Date updateDate;//版本生成时间
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    @Override
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    public Date getUpdateDate() {
+        return updateDate;
+    }
+
+    @Override
+    public void setUpdateDate(Date updateDate) {
+        this.updateDate = updateDate;
+    }
+}

+ 23 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/mapper/ModuleBlockMapper.java

@@ -0,0 +1,23 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.managementcenter.moduleacquisition.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleBlock;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleVersion;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+@MyBatisMapper
+public interface ModuleBlockMapper extends BaseMapper<ModuleBlock> {
+
+    Integer insertList(@Param("list") List<ModuleBlock> list);
+
+    String findMaxVersion();
+
+    List<ModuleVersion> findAllVersion(ModuleVersion moduleVersion);
+}

+ 21 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/mapper/ModuleListingMapper.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.managementcenter.moduleacquisition.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleBlock;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleListing;
+import org.apache.ibatis.annotations.Param;
+
+
+import java.util.List;
+
+
+@MyBatisMapper
+public interface ModuleListingMapper extends BaseMapper<ModuleListing> {
+    Integer insertList(@Param("list") List<ModuleListing> list);
+
+    List<ModuleListing> findByList(@Param("list") List<ModuleBlock> moduleBlocks);
+}

+ 201 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/mapper/xml/ModuleBlockMapper.xml

@@ -0,0 +1,201 @@
+<?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.moduleacquisition.mapper.ModuleBlockMapper">
+    
+	<sql id="infoColumns">
+		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.md_big_class AS "mdBigClass",
+		a.md_the_class AS "mdTheClass",
+		a.md_small_class AS "mdSmallClass",
+		a.md_unit AS "mdUnit",
+		a.md_img AS "mdImg",
+		a.md_big_sort AS "mdBigSort",
+		a.md_the_sort AS "mdTheSort",
+		a.md_small_sort AS "mdSmallSort",
+		a.md_version AS "mdVersion"
+	</sql>
+
+    
+	<select id="get" resultType="ModuleBlock" >
+		SELECT 
+			<include refid="infoColumns"/>
+		FROM md_module_block a
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="ModuleBlock" >
+		SELECT 
+			<include refid="infoColumns"/>
+		FROM md_module_block a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+			<if test="mdBigClass != null and mdBigClass != ''">
+				AND a.md_big_class LIKE CONCAT(CONCAT('%',#{mdBigClass},'%'))
+			</if>
+			<if test="mdTheClass != null and mdTheClass != ''">
+				AND a.md_the_class LIKE CONCAT(CONCAT('%',#{mdTheClass},'%'))
+			</if>
+			<if test="mdSmallClass != null and mdSmallClass != ''">
+				AND a.md_small_class LIKE CONCAT(CONCAT('%',#{mdSmallClass},'%'))
+			</if>
+			<if test="mdSmallClass != null and mdSmallClass != ''">
+				AND a.md_small_class LIKE CONCAT(CONCAT('%',#{mdSmallClass},'%'))
+			</if>
+			<if test="mdVersion != null and mdVersion  != ''">
+				AND a.md_version =  #{mdVersion}
+			</if>
+		</where>
+		order by md_version+0,md_big_sort,md_the_sort,md_small_sort
+	</select>
+	
+	<select id="findAllList" resultType="MaterialProject" >
+		SELECT 
+			<include refid="infoColumns"/>
+		FROM md_module_block 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 md_module_block(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			md_big_class,
+			md_the_class,
+			md_small_class,
+			md_unit,
+			md_img,
+			md_big_sort,
+			md_the_sort,
+			md_small_sort,
+			md_version
+		) VALUES (
+				#{id},
+				#{createBy.id},
+				#{createDate},
+				#{updateBy.id},
+				#{updateDate},
+				#{remarks},
+				#{delFlag},
+				#{mdBigClass},
+				#{mdTheClass},
+				#{mdSmallClass},
+				#{mdUnit},
+				#{mdImg},
+				#{mdBigSort},
+				#{mdTheSort},
+				#{mdSmallSort},
+				#{mdVersion}
+
+		)
+	</insert>
+
+	<insert id="insertList">
+		INSERT INTO md_module_block(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			md_big_class,
+			md_the_class,
+			md_small_class,
+			md_unit,
+			md_img,
+			md_big_sort,
+			md_the_sort,
+			md_small_sort,
+			md_version
+		) 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.mdBigClass},
+				#{item.mdTheClass},
+				#{item.mdSmallClass},
+				#{item.mdUnit},
+				#{item.mdImg},
+				#{item.mdBigSort},
+				#{item.mdTheSort},
+				#{item.mdSmallSort},
+				#{item.mdVersion}
+			)
+		</foreach>
+	</insert>
+
+	<update id="update">
+		UPDATE md_module_block SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks},
+			del_flag = #{delFlag},
+			md_big_class = #{mdBigClass},
+			md_the_class = #{mdTheClass},
+			md_small_class = #{mdSmallClass},
+			md_unit = #{mdUnit},
+			md_img = #{mdImg}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM md_module_block
+		WHERE id = #{id}
+	</update>
+	
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE md_module_block SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="TestNote" statementType="STATEMENT">
+		select * FROM md_module_block  where ${propertyName} = '${value}'
+	</select>
+
+	<select id="findMaxVersion" resultType="java.lang.String">
+		select md_version from md_module_block group by md_version order by md_version+0 desc LIMIT 1
+	</select>
+
+	<select id="findAllVersion" resultType="ModuleVersion">
+		select md_version AS version ,update_date AS updateDate from md_module_block
+		<where>
+			del_flag = '0'
+		</where>
+		group by md_version order by md_version+0 DESC
+	</select>
+</mapper>

+ 256 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/mapper/xml/ModuleListingMapper.xml

@@ -0,0 +1,256 @@
+<?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.moduleacquisition.mapper.ModuleListingMapper">
+    
+	<sql id="infoColumns">
+		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.del_flag AS "delFlag",
+		a.remarks AS "remarks",
+		a.md_big_class AS "mdBigClass",
+        a.md_The_class AS "mdTheClass",
+        a.md_name AS "mdName",
+        a.big_classification AS "bigClassification",
+        a.the_classification AS "theClassification",
+        a.small_classification AS "smallClassification",
+        a.material_code AS "materialCode",
+        a.material_description AS "materialDescription",
+        a.extension_description AS "extensionDescription",
+        a.md_units AS "mdUnits",
+        a.md_count AS "mdCount",
+        a.md_single_weight AS "mdSingleWeight",
+        a.md_total_weight AS "mdTotalWeight",
+       	a.md_the_party AS "mdTheParty",
+        a.md_text AS "mdText",
+        a.md_total_amount AS "mdTotalAmount",
+        a.block_Id AS "blockId"
+	</sql>
+
+    
+	<select id="get" resultType="ModuleListing" >
+		SELECT 
+			<include refid="infoColumns"/>
+		FROM md_module_listing a
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="ModuleListing" >
+		SELECT 
+			<include refid="infoColumns"/>
+		FROM md_module_listing a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+			<if test="blockId != null and blockId != ''">
+				AND a.block_id = #{blockId}
+			</if>
+			<if test="mdBigClass != null and mdBigClass != ''">
+				AND a.md_big_class LIKE CONCAT(CONCAT('%',#{mdBigClass},'%'))
+			</if>
+			<if test="mdTheClass != null and mdTheClass != ''">
+				AND a.md_the_class LIKE CONCAT(CONCAT('%',#{mdTheClass},'%'))
+			</if>
+			<if test="mdName != null and mdName != ''">
+				AND a.md_name LIKE CONCAT(CONCAT('%',#{mdName},'%'))
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="ModuleListing" >
+		SELECT 
+			<include refid="infoColumns"/>
+		FROM md_module_listing 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 md_module_listing(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			del_flag,
+			remarks,
+			md_big_class,
+			md_the_class,
+			md_name,
+			big_classification,
+			the_classification,
+			small_classification,
+			material_code,
+			material_description,
+			extension_description,
+			md_units,
+			md_count,
+			md_single_weight,
+			md_total_weight,
+			md_the_party,
+			md_text,
+			md_total_amount,
+			block_Id
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{delFlag},
+			#{remarks},
+			#{mdBigClass},
+			#{mdTheClass},
+			#{mdName},
+			#{bigClassification},
+			#{theClassification},
+			#{smallClassification},
+			#{materialCode},
+			#{materialDescription},
+			#{extensionDescription},
+			#{mdUnits},
+			#{mdCount},
+			#{mdSingleWeight},
+			#{mdTotalWeight},
+			#{mdTheParty},
+			#{mdText},
+			#{mdTotalAmount},
+			#{blockId}
+		)
+	</insert>
+
+	<insert id="insertList" parameterType="java.util.List">
+		INSERT INTO md_module_listing(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			del_flag,
+			remarks,
+			md_big_class,
+			md_the_class,
+			md_name,
+			big_classification,
+			the_classification,
+			small_classification,
+			material_code,
+			material_description,
+			extension_description,
+			md_units,
+			md_count,
+			md_single_weight,
+			md_total_weight,
+			md_the_party,
+			md_text,
+			md_total_amount,
+			block_Id
+		) VALUES
+		<foreach collection="list" item="item" index="index" separator=",">
+		  (
+				#{item.id},
+				#{item.createBy.id},
+				#{item.createDate},
+				#{item.updateBy.id},
+				#{item.updateDate},
+				#{item.delFlag},
+				#{item.remarks},
+				#{item.mdBigClass},
+				#{item.mdTheClass},
+				#{item.mdName},
+				#{item.bigClassification},
+				#{item.theClassification},
+				#{item.smallClassification},
+				#{item.materialCode},
+				#{item.materialDescription},
+				#{item.extensionDescription},
+				#{item.mdUnits},
+				#{item.mdCount},
+				#{item.mdSingleWeight},
+				#{item.mdTotalWeight},
+				#{item.mdTheParty},
+				#{item.mdText},
+				#{item.mdTotalAmount},
+				#{item.blockId}
+			)
+		</foreach>
+	</insert>
+
+	<update id="update">
+		UPDATE md_module_listing SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks},
+			del_flag = #{delFlag},
+			md_big_class = #{mdBigClass},
+			md_The_class = #{mdTheClass},
+			md_name = #{mdName},
+			big_classification = #{bigClassification},
+			the_classification = #{theClassification},
+			small_classification = #{smallClassification},
+			material_code = #{materialCode},
+			material_description = #{materialDescription},
+			extension_description = #{extensionDescription},
+			md_units = #{mdUnits},
+			md_count = #{mdCount},
+			md_single_weight = #{mdSingleWeight},
+			md_total_weight = #{mdTotalWeight},
+			md_the_party = #{mdTheParty},
+			md_text = #{mdText},
+			md_total_amount = #{mdTotalAmount}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM md_module_listing
+		WHERE id = #{id}
+	</update>
+	
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE md_module_listing SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="TestNote" statementType="STATEMENT">
+		select * FROM md_module_listing  where ${propertyName} = '${value}'
+	</select>
+
+	<!-- 根据版本号查找模块清单-->
+	<select id="findByList" resultType="ModuleListing">
+		SELECT
+		<include refid="infoColumns"/>
+		FROM md_module_listing a
+		<where>
+			a.block_id in
+			<foreach collection="list" item="item" open="(" close=")" separator=",">
+				#{item.id}
+			</foreach>
+		</where>
+	</select>
+</mapper>

+ 82 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/service/ModuleBlockService.java

@@ -0,0 +1,82 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.managementcenter.moduleacquisition.service;
+
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleBlock;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleListing;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleVersion;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.mapper.ModuleBlockMapper;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.mapper.ModuleListingMapper;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.util.ModuleUtil;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+@Service
+@Transactional(readOnly = true)
+public class ModuleBlockService extends CrudService<ModuleBlockMapper,ModuleBlock> {
+	@Autowired
+	private ModuleBlockMapper moduleBlockMapper;
+
+	@Autowired
+	private ModuleListingService moduleListingService;
+
+
+	public ModuleBlock get(String id) {
+		return super.get(id);
+	}
+	
+	public List<ModuleBlock> findList(ModuleBlock moduleBlock) {
+		return super.findList(moduleBlock);
+	}
+
+	public Page<ModuleBlock> findPage(Page<ModuleBlock> page, ModuleBlock moduleBlock) {
+		return super.findPage(page, moduleBlock);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(ModuleBlock moduleBlock) {
+		super.save(moduleBlock);
+	}
+
+	//文件导入
+	@Transactional(readOnly = false)
+	public void savaList(List<ModuleBlock> blocks, List<ModuleListing> listings,String version){
+		Integer integer = 1;//版本号默认为1
+		if (null!=version&&!version.equals("")){
+			integer = new Integer(version)+1;
+		}
+		for (ModuleBlock moduleBlock:blocks){
+			moduleBlock.preInsert();
+			moduleBlock.setMdVersion(String.valueOf(integer));
+		}
+		List<ModuleListing> moduleListings = ModuleUtil.getModuleListing(listings, blocks);
+		moduleBlockMapper.insertList(blocks);
+		moduleListingService.savaList(moduleListings);
+	}
+
+	/*
+		获得最新版本号
+	 */
+	public String findVersion(){
+		return moduleBlockMapper.findMaxVersion();
+	}
+
+	/*
+		获得所有版本号
+	 */
+	public Page<ModuleVersion> findPage(Page<ModuleVersion> page, ModuleVersion moduleVersion) {
+		dataRuleFilter(moduleVersion);
+		moduleVersion.setPage(page);
+		page.setList(moduleBlockMapper.findAllVersion(moduleVersion));
+		return page;
+	}
+}

+ 55 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/service/ModuleListingService.java

@@ -0,0 +1,55 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.managementcenter.moduleacquisition.service;
+
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleBlock;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleListing;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.mapper.ModuleBlockMapper;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.mapper.ModuleListingMapper;
+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 ModuleListingService extends CrudService<ModuleListingMapper, ModuleListing> {
+	@Autowired
+	private ModuleListingMapper moduleListingMapper;
+
+
+	public ModuleListing get(String id) {
+		return super.get(id);
+	}
+	
+	public List<ModuleListing> findList(ModuleListing moduleListing) {
+		return super.findList(moduleListing);
+	}
+
+	public Page<ModuleListing> findPage(Page<ModuleListing> page, ModuleListing moduleListing) {
+		return super.findPage(page, moduleListing);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(ModuleListing moduleListing) {
+		super.save(moduleListing);
+	}
+
+	//文件导入
+	@Transactional(readOnly = false)
+	public void savaList(List<ModuleListing> listings){
+		for (ModuleListing moduleListing:listings){
+			moduleListing.preInsert();
+		}
+		moduleListingMapper.insertList(listings);
+	}
+	//根据版本号的id查找对应的模块清单
+	public List<ModuleListing> findByList(List<ModuleBlock> moduleBlocks){
+		return moduleListingMapper.findByList(moduleBlocks);
+	}
+}

+ 111 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/util/ModuleUtil.java

@@ -0,0 +1,111 @@
+package com.jeeplus.modules.sg.managementcenter.moduleacquisition.util;
+import com.jeeplus.common.utils.excel.ImportExcel;
+
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleBlock;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleListing;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.usermodel.Row;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public  class ModuleUtil {
+    /**
+     * 获取模块表清单
+     * @param importUtil
+     * @return List<MaterialProjectMapper> 导入表格数据
+     */
+    public static List<ModuleBlock> getModuleBlockUtil(ImportExcel importUtil)  {
+        int lastRow = importUtil.getLastDataRowNum();
+        List<ModuleBlock> list = new ArrayList<ModuleBlock>();
+        ModuleBlock moduleBlock = null;
+        for(int i=1; i<=lastRow;i++){
+            moduleBlock = new ModuleBlock();
+            Row row = importUtil.getRow(i);
+            String blockName = (String) importUtil.getCellValue(row,0);
+            if(StringUtils.isNotBlank(blockName)) {
+                moduleBlock.setMdBigClass(blockName);//获取大类名称
+                moduleBlock.setMdTheClass((String)importUtil.getCellValue(row,1));//获取模块中类
+                moduleBlock.setMdSmallClass((String)importUtil.getCellValue(row,2));//获取模块小类(模块名称)
+                moduleBlock.setMdUnit((String)importUtil.getCellValue(row,3));//获取单位
+                moduleBlock.setMdBigSort(new Integer((String)importUtil.getCellValue(row,4)));//获取大类排序
+                moduleBlock.setMdTheSort(new Integer((String)importUtil.getCellValue(row,5)));//获取中类排序
+                moduleBlock.setMdSmallSort(new Integer((String)importUtil.getCellValue(row,6)));//获取小类排序
+                list.add(moduleBlock);
+            }
+        }
+        return list;
+    }
+
+    /**
+     * 获取领料清单
+     * @param importUtil
+     * @return
+     */
+    public static List<ModuleListing> getModuleListingUtil(ImportExcel importUtil)  {
+        int lastRow = importUtil.getLastDataRowNum();
+        List<ModuleListing> list = new ArrayList<ModuleListing>();
+        ModuleListing moduleListing = null;
+        for(int i=1; i<=lastRow;i++){
+            moduleListing = new ModuleListing();
+            Row row = importUtil.getRow(i);
+            String listingName = (String) importUtil.getCellValue(row,0);
+            if(StringUtils.isNotBlank(listingName)) {
+                moduleListing.setMdBigClass(listingName);//获取模块大类
+                moduleListing.setMdTheClass((String)importUtil.getCellValue(row,1));//获取模块中类
+                moduleListing.setMdName((String)importUtil.getCellValue(row,2));//获取 模块名称
+                moduleListing.setBigClassification((String)importUtil.getCellValue(row,3));//大分类
+                moduleListing.setTheClassification((String)importUtil.getCellValue(row,4));//中分类
+                moduleListing.setSmallClassification((String)importUtil.getCellValue(row,5));//小分类
+                moduleListing.setMaterialCode((String)importUtil.getCellValue(row,6));//物料编码
+                moduleListing.setMaterialDescription((String)importUtil.getCellValue(row,7));//物料描述
+                moduleListing.setExtensionDescription((String)importUtil.getCellValue(row,8));//扩展描述
+                moduleListing.setMdUnits((String)importUtil.getCellValue(row,9));//单位
+                moduleListing.setMdCount(getDouble(importUtil,row,10));//数量
+                moduleListing.setMdSingleWeight(getDouble(importUtil,row,11));//单重
+                moduleListing.setMdTotalWeight(getDouble(importUtil,row,12));//总重
+                moduleListing.setMdTheParty((String)importUtil.getCellValue(row,13));//甲乙供
+                moduleListing.setMdText((String)importUtil.getCellValue(row,14));//备注
+                moduleListing.setMdTotalAmount(getDouble(importUtil,row,15));//总量
+                list.add(moduleListing);
+            }
+        }
+        return list;
+    }
+    /**
+     *获取excel double类型的值
+     */
+    private static double getDouble(ImportExcel importExcel,Row row,int col){
+        double d = 0.00;
+        Object o = importExcel.getCellValue(row,col);
+        if(!o.equals("")){
+            if (!o.equals("/")){
+                d = Double.parseDouble(o.toString());
+            }
+        }
+        return d;
+    }
+    /**
+     * 模块清单 获取 与之关联的模块表id
+     * @param moduleListings 导入时得到的模块清单集合
+     * @param moduleBlocks 导入时得到的模块表
+     * @return
+     */
+    public static List<ModuleListing> getModuleListing(List<ModuleListing> moduleListings,List<ModuleBlock> moduleBlocks){
+        String moduleId = "";
+        for (ModuleListing moduleListing:moduleListings){
+            moduleId = "";
+            for (ModuleBlock moduleBlock:moduleBlocks){
+                boolean bigFlag = StringUtils.equals(moduleListing.getMdBigClass(), moduleBlock.getMdBigClass());
+                boolean theFlag = StringUtils.equals(moduleListing.getMdTheClass(), moduleBlock.getMdTheClass());
+                boolean smallFlag = StringUtils.equals(moduleListing.getMdName(), moduleBlock.getMdSmallClass());
+                if (bigFlag&&theFlag&&smallFlag){
+                    moduleId = moduleBlock.getId();
+                    break;
+                }
+            }
+            moduleListing.setBlockId(moduleId);
+        }
+        return moduleListings;
+    }
+}

+ 224 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/web/ModuleBlockWeb.java

@@ -0,0 +1,224 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.managementcenter.moduleacquisition.web;
+
+
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleBlock;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleListing;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleVersion;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.service.ModuleBlockService;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.service.ModuleListingService;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.util.ModuleUtil;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.shiro.authz.annotation.Logical;
+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 javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+
+@Controller
+@RequestMapping(value = "${adminPath}/managementcenter/moduleacquisition")
+public class ModuleBlockWeb extends BaseController {
+
+	@Autowired
+	private ModuleBlockService moduleBlockService;
+	@Autowired
+	private ModuleListingService moduleListingService;
+	
+	@ModelAttribute
+	public ModuleBlock get(@RequestParam(required=false) String id) {
+		ModuleBlock entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = moduleBlockService.get(id);
+		}
+		if (entity == null){
+			entity = new ModuleBlock();
+		}
+		return entity;
+	}
+	
+	/**
+	 * 项目列表页面
+	 */
+	@RequiresPermissions("managementcenter:moduleacquisition:list")
+	@RequestMapping(value = {"list", ""})
+	public String list(ModuleBlock moduleBlock, Model model) {
+		model.addAttribute("ModuleBlock", moduleBlock);
+		return "modules/sg/managementcenter/moduleacquisition/moduleBlockList";
+	}
+	/**
+	 * 列表数据
+	 */
+	@ResponseBody
+	@RequiresPermissions("managementcenter:moduleacquisition:list")
+	@RequestMapping(value = "data")
+	public Map<String, Object> data(ModuleBlock moduleBlock, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<ModuleBlock> page = moduleBlockService.findPage(new Page<ModuleBlock>(request, response), moduleBlock);
+		return getBootstrapData(page);
+	}
+	/**
+	 * 生成新版本列表数据
+	 */
+	@ResponseBody
+	@RequestMapping(value = "newData")
+	public Map<String, Object> newData(ModuleBlock moduleBlock, HttpServletRequest request, HttpServletResponse response, Model model) {
+		HttpSession session = request.getSession();
+		String md_version = (String) session.getAttribute("md_version");
+		Integer version = new Integer(md_version) + 1;
+		moduleBlock.setMdVersion(String.valueOf(version));
+		Page<ModuleBlock> page = moduleBlockService.findPage(new Page<ModuleBlock>(request, response), moduleBlock);
+		return getBootstrapData(page);
+	}
+
+	/**
+	 * 查看,增加,编辑表单页面
+	 */
+	@RequiresPermissions(value={"managementcenter:moduleacquisition:view","managementcenter:moduleacquisition:list","managementcenter:moduleacquisition:edit"},logical=Logical.OR)
+	@RequestMapping(value = "form")
+	public String form(ModuleBlock moduleBlock, Model model) {
+		model.addAttribute("moduleBlock", moduleBlock);
+		return "modules/sg/managementcenter/moduleacquisition/moduleBlockNewForm";
+	}
+
+	/**
+	 * 查看,增加,编辑表单页面
+	 */
+	@RequiresPermissions(value={"managementcenter:moduleacquisition:view","managementcenter:moduleacquisition:list","managementcenter:moduleacquisition:edit"},logical=Logical.OR)
+	@RequestMapping(value = "form1")
+	public String form1(ModuleBlock moduleBlock, Model model) {
+		model.addAttribute("moduleBlock", moduleBlock);
+		return "modules/sg/managementcenter/moduleacquisition/moduleBlockForm";
+	}
+
+	/**
+	 * 保存
+	 */
+	@ResponseBody
+//	@RequiresPermissions(value={"managementcenter:moduleacquisition:add","managementcenter:moduleacquisition:edit"},logical=Logical.OR)
+	@RequestMapping(value = "save")
+	public AjaxJson save(ModuleBlock moduleBlock, Model model,HttpServletRequest request) throws Exception{
+		HttpSession session = request.getSession();
+		String md_version = (String) session.getAttribute("md_version");
+		AjaxJson j = new AjaxJson();
+		/**
+		 * 后台hibernate-validation插件校验
+		 */
+		String errMsg = beanValidator(moduleBlock);
+		if (StringUtils.isNotBlank(errMsg)){
+			j.setSuccess(false);
+			j.setMsg(errMsg);
+			return j;
+		}
+		//新增或编辑表单保存
+		Integer version = new Integer(md_version) + 1;
+		moduleBlock.setMdVersion(String.valueOf(version));
+		moduleBlockService.save(moduleBlock);//保存
+		j.setSuccess(true);
+		j.setMsg("保存模块成功");
+		return j;
+	}
+	
+	/**
+	 * 删除项目
+	 */
+	@ResponseBody
+	@RequiresPermissions("managementcenter:moduleacquisition:del")
+	@RequestMapping(value = "delete")
+	public AjaxJson delete(ModuleBlock moduleBlock) {
+		AjaxJson j = new AjaxJson();
+		moduleBlockService.delete(moduleBlock);
+		j.setMsg("删除项目成功");
+		return j;
+	}
+	
+	/**
+	 * 批量删除
+	 */
+	@ResponseBody
+	@RequiresPermissions("managementcenter:moduleacquisition:del")
+	@RequestMapping(value = "deleteAll")
+	public AjaxJson deleteAll(String ids) {
+		AjaxJson j = new AjaxJson();
+		String idArray[] =ids.split(",");
+		for(String id : idArray){
+			moduleBlockService.delete(moduleBlockService.get(id));
+		}
+		j.setMsg("删除项目成功");
+		return j;
+	}
+
+	/**
+	 * 导入Excel数据
+
+	 */
+	@ResponseBody
+	@RequiresPermissions("managementcenter:moduleacquisition:import")
+	@RequestMapping(value = "import")
+	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) throws IOException, InvalidFormatException {
+		AjaxJson j = new AjaxJson();
+		try {
+			ImportExcel importBlock = new ImportExcel(file, 0, "模块表");
+			ImportExcel importListing = new ImportExcel(file, 0, "模块清单");
+			List<ModuleBlock> moduleBlockUtil = ModuleUtil.getModuleBlockUtil(importBlock);
+			List<ModuleListing> moduleListingUtil = ModuleUtil.getModuleListingUtil(importListing);
+			String maxVersion = moduleBlockService.findVersion();//获得版本号
+			moduleBlockService.savaList(moduleBlockUtil,moduleListingUtil,maxVersion);
+			j.setMsg( "已成功导入 "+moduleBlockUtil.size()+" 条记录");
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("导入表单失败!失败信息:"+e.getMessage());
+		}
+		return j;
+	}
+	/*
+		生成新版本
+	 */
+	@RequestMapping(value = "insertVersion")
+	public String saveVersion(String mdVersion,ModuleBlock moduleBlock,Model model,HttpServletRequest request) {
+		String version = moduleBlockService.findVersion();
+		HttpSession session = request.getSession();
+		session.setAttribute("md_version",version);
+		moduleBlock.setMdVersion(mdVersion);
+		List<ModuleBlock> moduleBlocks = moduleBlockService.findList(moduleBlock);
+		List<ModuleListing> moduleListings = moduleListingService.findByList(moduleBlocks);
+		moduleBlockService.savaList(moduleBlocks,moduleListings,version);
+		model.addAttribute("ModuleBlock",moduleBlock);
+		return "modules/sg/managementcenter/moduleacquisition/moduleBlockNewList";
+	}
+
+	@ResponseBody
+	@RequestMapping(value = "dataVersion")
+	public Map<String, Object> dataVersion(ModuleVersion version, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<ModuleVersion> page = moduleBlockService.findPage(new Page<ModuleVersion>(request, response), version);
+		return getBootstrapData(page);
+	}
+
+	/**
+	 * 生成新版本页面
+	 */
+	@RequiresPermissions("managementcenter:moduleacquisition:insertVersion")
+	@RequestMapping(value ="listVersion")
+	public String listVersion(ModuleVersion moduleVersion, Model model,HttpServletRequest request) {
+		model.addAttribute("ModuleVersion",moduleVersion);
+		return "modules/sg/managementcenter/moduleacquisition/moduleVersionList";
+	}
+}

+ 151 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/web/ModuleListingWeb.java

@@ -0,0 +1,151 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.managementcenter.moduleacquisition.web;
+
+
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleBlock;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.entity.ModuleListing;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.service.ModuleBlockService;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.service.ModuleListingService;
+import com.jeeplus.modules.sg.managementcenter.moduleacquisition.util.ModuleUtil;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.shiro.authz.annotation.Logical;
+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 javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+
+@Controller
+@RequestMapping(value = "${adminPath}/managementcenter/moduleacquisition/moduleListing")
+public class ModuleListingWeb extends BaseController {
+
+	@Autowired
+	private ModuleListingService moduleListingService;
+
+	@ModelAttribute
+	public ModuleListing get(@RequestParam(required=false) String id) {
+		ModuleListing entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = moduleListingService.get(id);
+		}
+		if (entity == null){
+			entity = new ModuleListing();
+		}
+		return entity;
+	}
+
+	/**
+	 * 项目列表页面
+	 */
+	@RequestMapping(value = {"list", ""})
+	public String list(ModuleListing moduleListing, Model model,HttpServletRequest request) {
+		HttpSession session = request.getSession();
+		session.setAttribute("blockId",moduleListing.getBlockId());
+		model.addAttribute("ModuleListing", moduleListing);
+		return "modules/sg/managementcenter/moduleacquisition/moduleListing";
+	}
+
+	@RequestMapping(value = {"list1", ""})
+	public String list1(ModuleListing moduleListing, Model model,HttpServletRequest request) {
+		HttpSession session = request.getSession();
+		session.setAttribute("blockId",moduleListing.getBlockId());
+		model.addAttribute("ModuleListing", moduleListing);
+		return "modules/sg/managementcenter/moduleacquisition/moduleNewListing";
+	}
+
+		/**
+	 * 列表数据
+	 */
+	@ResponseBody
+	@RequestMapping(value = "data")
+	public Map<String, Object> data(ModuleListing moduleListing, HttpServletRequest request, HttpServletResponse response, Model model) {
+		HttpSession session = request.getSession();
+		String blockId = (String) session.getAttribute("blockId");
+		if (null!=blockId&&!blockId.equals("")){
+			moduleListing.setBlockId(blockId);
+		}else {
+			moduleListing.setBlockId("0");
+		}
+		Page<ModuleListing> page = moduleListingService.findPage(new Page<ModuleListing>(request, response), moduleListing);
+		return getBootstrapData(page);
+	}
+
+	/**
+	 * 查看,增加,编辑表单页面
+	 */
+	@RequestMapping(value = "form")
+	public String form(ModuleListing moduleListing, Model model) {
+		model.addAttribute("moduleListing", moduleListing);
+		return "modules/sg/managementcenter/moduleacquisition/moduleListingNewForm";
+	}
+
+
+	/**
+	 * 删除项目
+	 */
+	@ResponseBody
+	@RequestMapping(value = "delete")
+	public AjaxJson delete(ModuleListing moduleListing) {
+		AjaxJson j = new AjaxJson();
+		moduleListingService.delete(moduleListing);
+		j.setMsg("删除项目成功");
+		return j;
+	}
+	
+	/**
+	 * 批量删除
+	 */
+	@ResponseBody
+	@RequestMapping(value = "deleteAll")
+	public AjaxJson deleteAll(String ids) {
+		AjaxJson j = new AjaxJson();
+		String idArray[] =ids.split(",");
+		for(String id : idArray){
+			moduleListingService.delete(moduleListingService.get(id));
+		}
+		j.setMsg("删除项目成功");
+		return j;
+	}
+	@ResponseBody
+//	@RequiresPermissions(value={"managementcenter:moduleacquisition:add","managementcenter:moduleacquisition:edit"},logical=Logical.OR)
+	@RequestMapping(value = "save")
+	public AjaxJson save(ModuleListing moduleListing, Model model,HttpServletRequest request) throws Exception{
+		AjaxJson j = new AjaxJson();
+		HttpSession session = request.getSession();
+		String blockId = (String) session.getAttribute("blockId");
+		moduleListing.setBlockId(blockId);
+		/**
+		 * 后台hibernate-validation插件校验
+		 */
+		String errMsg = beanValidator(moduleListing);
+		if (StringUtils.isNotBlank(errMsg)){
+			j.setSuccess(false);
+			j.setMsg(errMsg);
+			return j;
+		}
+		//新增或编辑表单保存
+		moduleListingService.save(moduleListing);//保存
+		j.setSuccess(true);
+		j.setMsg("保存模块成功");
+		return j;
+	}
+}

+ 63 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockForm.jsp

@@ -0,0 +1,63 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>模块表</title>
+	<meta name="decorator" content="ani"/>
+	<script type="text/javascript">
+
+		$(document).ready(function() {
+
+	        $('#beginDate').datetimepicker({
+				 format: "YYYY-MM-DD HH:mm:ss"
+		    });
+	        $('#endDate').datetimepicker({
+				 format: "YYYY-MM-DD HH:mm:ss"
+		    });
+		});
+		function save() {
+		    var mdImg = $("#mdImg").val();
+            if (null!=mdImg&&mdImg!=""){
+                var valueArray = mdImg.split(",");
+                if (valueArray.length>1){
+                    alert("只允许上传一张");
+                    return false;
+				}
+			}
+            var isValidate = jp.validateForm('#inputForm');//校验表单
+            if(!isValidate){
+                return false;
+			}else{
+                jp.loading();
+                jp.post("${ctx}/managementcenter/moduleacquisition/save",$('#inputForm').serialize(),function(data){
+                    if(data.success){
+                        jp.getParent().refresh();
+                        var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
+                        parent.layer.close(dialogIndex);
+                        jp.success(data.msg)
+
+                    }else{
+                        jp.error(data.msg);
+                    }
+                })
+			}
+
+        }
+	</script>
+</head>
+<body class="bg-white">
+		<form:form id="inputForm" modelAttribute="moduleBlock" class="form-horizontal">
+		<form:hidden path="id"/>	
+		<table class="table table-bordered">
+			<tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>上传图纸:</label></td>
+					<td class="width-35">
+						<sys:fileUpload  path="mdImg" fileNumLimit="50" fileSizeLimit="50" value="${moduleBlock.mdImg}" type="image" uploadPath="/pick"></sys:fileUpload>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 270 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockList.js

@@ -0,0 +1,270 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+$(document).ready(function() {
+	$('#moduleBlockTable').bootstrapTable({
+		  //请求方法
+               method: 'post',
+               //类型json
+               dataType: "json",
+               contentType: "application/x-www-form-urlencoded",
+               //显示检索按钮
+	           showSearch: true,
+               //显示刷新按钮
+               showRefresh: true,
+               //显示切换手机试图按钮
+               showToggle: true,
+               //显示 内容列下拉框
+    	       showColumns: true,
+    	       //显示到处按钮
+    	       showExport: true,
+    	       //显示切换分页按钮
+    	       showPaginationSwitch: true,
+    	       //最低显示2行
+    	       minimumCountColumns: 2,
+               //是否显示行间隔色
+               striped: true,
+               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)     
+               cache: false,    
+               //是否显示分页(*)  
+               pagination: true,   
+                //排序方式 
+               sortOrder: "asc",  
+               //初始化加载第一页,默认第一页
+               pageNumber:1,   
+               //每页的记录行数(*)   
+               pageSize: 5,
+               //可供选择的每页的行数(*)    
+               pageList: [5,10, 25, 50, 100],
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据  
+               url: "${ctx}/managementcenter/moduleacquisition/data",
+               //默认值为 '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;
+               },
+               //分页方式:client客户端分页,server服务端分页(*)
+               sidePagination: "server",
+               contextMenuTrigger:"right",//pc端 按右键弹出菜单
+               contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
+               contextMenu: '#context-menu',
+               onContextMenuItem: function(row, $el){
+                   if($el.data("item") == "edit"){
+                   		edit(row.id);
+                   }else if($el.data("item") == "view"){
+                       view(row.id);
+                   } else if($el.data("item") == "delete"){
+                        jp.confirm('确认要删除该表单记录吗?', function(){
+                       	jp.loading();
+                       	jp.get("${ctx}/managementcenter/moduleacquisition/delete?id="+row.id, function(data){
+                   	  		if(data.success){
+                   	  			$('#moduleBlockTable').bootstrapTable('refresh');
+                   	  			jp.success(data.msg);
+                   	  		}else{
+                   	  			jp.error(data.msg);
+                   	  		}
+                   	  	})
+                   	   
+                   	});
+                      
+                   } 
+               },
+              
+               onClickRow: function(row, $el){
+               },
+               	onShowSearch: function () {
+			$("#search-collapse").slideToggle();
+		},
+               columns: [{
+		        checkbox: true
+		       
+		    }
+                   ,{
+                       field: 'mdSmallClass',
+                       title: '模块名称'
+                       ,formatter:function(value, row , index){
+
+                           if(value == null || value ==""){
+                               value = "-";
+                           }
+                           return "<a href='javascript:moduleList(\""+row.id+"\")'>"+value+"</a>";
+                       }
+                   }
+			,{
+		        field: 'mdBigClass',
+		        title: '模块大类'
+            }
+
+                   ,{
+                       field: 'mdTheClass',
+                       title: '模块中类',
+
+                   }
+                   ,{
+                       field: 'mdUnit',
+                       title: '单位'
+                   }
+                   ,{
+                       field: 'mdImg',
+                       title: '附件',
+                       formatter:function(value, row , index){
+                       		if (value!=null&&value!=""){
+                                var valueArray = value.split("|");
+                                var labelArray = [];
+                                for(var i =0 ; i<valueArray.length; i++){
+                                    if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                    {
+                                        labelArray[i] = "<a href=\""+valueArray[i]+"\" url=\""+valueArray[i]+"\" target=\"_blank\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>"
+                                    }else{
+                                        labelArray[i] = '<img   onclick="jp.showPic(\''+valueArray[i]+'\')"'+' height="50px" src="'+valueArray[i]+'">';
+                                    }
+                                }
+                                return labelArray.join(" ");
+							}
+
+                       }
+                   }
+                   ,{
+                       field: 'mdVersion',
+                       title: '版本号'
+                   }
+		     ]
+		
+		});
+		
+		  
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+
+		 
+		  $('#moduleBlockTable').bootstrapTable("toggleView");
+		}
+	  
+	  $('#moduleBlockTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+                'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', ! $('#moduleBlockTable').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#moduleBlockTable').bootstrapTable('getSelections').length!=1);
+        });
+		  
+		$("#btnImport").click(function(){
+			jp.open({
+			    type: 2,
+                area: [500, 200],
+                auto: true,
+			    title:"导入数据",
+			    content: "${ctx}/tag/importExcel" ,
+			    btn: ['确定', '关闭'],
+			    	btn1: function(index, layero){
+				        var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+						iframeWin.contentWindow.importExcel('${ctx}/managementcenter/moduleacquisition/import', function (data) {
+							if(data.success){
+								jp.success(data.msg);
+								refresh();
+							}else{
+								jp.error(data.msg);
+							}
+                            jp.close(index);
+						});//调用保存事件
+						return false;
+				  	},
+
+				  btn2: function(index){
+					//  jp.close(index);
+	    	       }
+			}); 
+		});
+    $("#insertVersion").click(function(){//生成新版本
+        top.layer.open({
+            type: 2,
+            area: ["800px", "500px"],
+            title: "请选择版本",
+            auto:false,
+            maxmin: true, //开启最大化最小化按钮
+            content: "${ctx}/managementcenter/moduleacquisition/listVersion" ,
+            btn: ['确定', '关闭'],
+            yes: function(index, layero){
+                var iframeWin = layero.find('iframe')[0]; //得到弹出的窗口对象,执行窗口内iframe页的方法:iframeWin.method();
+                iframeWin.contentWindow.save();//调用保存事件,在 弹出页内,需要定义save方法。处理保存事件。
+				var i = iframeWin.contentWindow.getIdSelections();
+                jp.downloadFile("${ctx}/managementcenter/moduleacquisition/insertVersion?mdVersion="+i);
+            },
+            cancel: function(index){
+            }
+        });
+    });
+		    
+	  $("#search").click("click", function() {// 绑定查询按扭
+		  $('#moduleBlockTable').bootstrapTable('refresh');
+		});
+	 
+	 $("#reset").click("click", function() {// 绑定查询按扭
+		  $("#searchForm  input").val("");
+		  $("#searchForm  select").val("");
+		  $("#searchForm  .select-item").html("");
+		  $('#moduleBlockTable').bootstrapTable('refresh');
+		});
+		
+		$('#beginBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		
+	});
+		
+  function getIdSelections() {
+        return $.map($("#moduleBlockTable").bootstrapTable('getSelections'), function (row) {
+            return row.id
+        });
+    }
+  
+  function deleteAll(){
+
+		jp.confirm('确认要删除该项目管理表单记录吗?', function(){
+			jp.loading();  	
+			jp.get("${ctx}/managementcenter/moduleacquisition/deleteAll?ids=" + getIdSelections(), function(data){
+         	  		if(data.success){
+         	  			$('#moduleBlockTable').bootstrapTable('refresh');
+         	  			jp.success(data.msg);
+         	  		}else{
+         	  			jp.error(data.msg);
+         	  		}
+         	  	})
+          	   
+		})
+  }
+
+    //刷新列表
+  function refresh(){
+  	$('#moduleBlockTable').bootstrapTable('refresh');
+  }
+
+	function moduleList(id){//没有权限时,不显示确定按钮
+		if(id == undefined){
+			id = getIdSelections();
+		}
+		jp.openViewDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/moduleListing/list?blockId="+id, '800px', '500px');
+	}
+
+	 function view(id){//没有权限时,不显示确定按钮
+		  if(id == undefined){
+				 id = getIdSelections();
+		  }
+			jp.openViewDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/moduleListing/list", '800px', '500px');
+	 }
+	function edit(id){//没有权限时,不显示确定按钮
+		if(id == undefined){
+			id = getIdSelections();
+		}
+		jp.openSaveDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/form1?id="+id, '800px', '500px');
+	}
+
+
+</script>

+ 87 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockList.jsp

@@ -0,0 +1,87 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>模块表</title>
+	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+	<meta name="decorator" content="ani"/>
+	<%@ include file="/webpage/include/bootstraptable.jsp"%>
+	<%@include file="/webpage/include/treeview.jsp" %>
+	<%@include file="moduleBlockList.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 id="search-collapse" class="collapse">
+			<div class="accordion-inner">
+				<form:form id="searchForm" modelAttribute="moduleBlock" class="form form-horizontal well clearfix">
+					<div class="col-xs-12 col-sm-6 col-md-4">
+						<label class="label-item single-overflow pull-left" title="模块名称:">模块名称:</label>
+						<form:input path="mdSmallClass" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+					<div class="col-xs-12 col-sm-6 col-md-4">
+						<label class="label-item single-overflow pull-left" title="模块大类:">模块大类:</label>
+						<form:input path="mdBigClass" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+					<div class="col-xs-12 col-sm-6 col-md-4">
+						<label class="label-item single-overflow pull-left" title="模块中类:">模块中类:</label>
+						<form:input path="mdTheClass" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+					<div class="col-xs-12 col-sm-6 col-md-4">
+						<label class="label-item single-overflow pull-left" title="版本号:">版本号:</label>
+						<form:input path="mdVersion" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+					<div class="col-xs-12 col-sm-6 col-md-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:form>
+			</div>
+		</div>
+	
+	<!-- 工具栏 -->
+	<div id="toolbar">
+				<shiro:hasPermission name="managementcenter:moduleacquisition:import">
+					<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
+				</shiro:hasPermission>
+				<shiro:hasPermission name="managementcenter:moduleacquisition:edit">
+					<button id="edit" class="btn btn-success" disabled onclick="edit()">
+						<i class="glyphicon glyphicon-edit"></i> 上传图片
+					</button>
+				</shiro:hasPermission>
+				<shiro:hasPermission name="managementcenter:moduleacquisition:insertVersion">
+					<button id="insertVersion" class="btn btn-warning">
+						<i class="fa fa-file-excel-o"></i> 生成新版本
+					</button>
+				</shiro:hasPermission>
+
+		    </div>
+		
+	<!-- 表格 -->
+	<table id="moduleBlockTable"  data-toolbar="#toolbar"></table>
+
+    <!-- context menu -->
+    <ul id="context-menu" class="dropdown-menu">
+    	<shiro:hasPermission name="sg:managementcenter:moduleacquisition:view">
+        <li data-item="view"><a>查看</a></li>
+        </shiro:hasPermission>
+    	<shiro:hasPermission name="sg:managementcenter:moduleacquisition:edit">
+        <li data-item="edit"><a>编辑</a></li>
+        </shiro:hasPermission>
+        <shiro:hasPermission name="sg:managementcenter:moduleacquisition:del">
+        <li data-item="delete"><a>删除</a></li>
+        </shiro:hasPermission>
+        <li data-item="action1"><a>取消</a></li>
+    </ul>  
+	</div>
+	</div>
+	</div>
+</body>
+</html>

+ 83 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockNewForm.jsp

@@ -0,0 +1,83 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>模块表</title>
+	<meta name="decorator" content="ani"/>
+	<script type="text/javascript">
+
+		$(document).ready(function() {
+
+	        $('#beginDate').datetimepicker({
+				 format: "YYYY-MM-DD HH:mm:ss"
+		    });
+	        $('#endDate').datetimepicker({
+				 format: "YYYY-MM-DD HH:mm:ss"
+		    });
+		});
+		function save() {
+            var mdImg = $("#mdImg").val();
+            if (null!=mdImg&&mdImg!=""){
+                var valueArray = mdImg.split(",");
+                if (valueArray.length>1){
+                    alert("只允许上传一张");
+                    return false;
+                }
+            }
+            var isValidate = jp.validateForm('#inputForm');//校验表单
+            if(!isValidate){
+                return false;
+			}else{
+                jp.loading();
+                jp.post("${ctx}/managementcenter/moduleacquisition/save",$('#inputForm').serialize(),function(data){
+                    if(data.success){
+                        jp.getParent().refresh();
+                        var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
+                        parent.layer.close(dialogIndex);
+                        jp.success(data.msg)
+
+                    }else{
+                        jp.error(data.msg);
+                    }
+                })
+			}
+
+        }
+	</script>
+</head>
+<body class="bg-white">
+		<form:form id="inputForm" modelAttribute="moduleBlock" class="form-horizontal">
+		<form:hidden path="id"/>	
+		<table class="table table-bordered">
+			<tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">模块名称:</label></td>
+					<td class="width-35">
+						<form:input path="mdSmallClass" htmlEscape="false"   class="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right" style="float: left">模块大类:</label></td>
+					<td class="width-35">
+						<form:input path="mdBigClass" htmlEscape="false" class="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">模块中类:</label></td>
+					<td class="width-35">
+						<form:input path="mdTheClass" htmlEscape="false"    class="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">单位:</label></td>
+					<td class="width-35">
+						<form:input path="mdUnit" htmlEscape="false"    class="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>上传图纸:</label></td>
+					<td class="width-35">
+						<sys:fileUpload  path="mdImg" fileNumLimit="50" fileSizeLimit="50" value="${moduleBlock.mdImg}" type="image" uploadPath="/pick"></sys:fileUpload>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 258 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockNewList.js

@@ -0,0 +1,258 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+$(document).ready(function() {
+	$('#moduleBlockNewTable').bootstrapTable({
+		  //请求方法
+               method: 'post',
+               //类型json
+               dataType: "json",
+               contentType: "application/x-www-form-urlencoded",
+               //显示检索按钮
+	           showSearch: true,
+               //显示刷新按钮
+               showRefresh: true,
+               //显示切换手机试图按钮
+               showToggle: true,
+               //显示 内容列下拉框
+    	       showColumns: true,
+    	       //显示到处按钮
+    	       showExport: true,
+    	       //显示切换分页按钮
+    	       showPaginationSwitch: true,
+    	       //最低显示2行
+    	       minimumCountColumns: 2,
+               //是否显示行间隔色
+               striped: true,
+               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)     
+               cache: false,    
+               //是否显示分页(*)  
+               pagination: true,   
+                //排序方式 
+               sortOrder: "asc",  
+               //初始化加载第一页,默认第一页
+               pageNumber:1,   
+               //每页的记录行数(*)   
+               pageSize: 5,
+               //可供选择的每页的行数(*)    
+               pageList: [5,10, 25, 50, 100],
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据  
+               url: "${ctx}/managementcenter/moduleacquisition/newData",
+               //默认值为 '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;
+               },
+               //分页方式:client客户端分页,server服务端分页(*)
+               sidePagination: "server",
+               contextMenuTrigger:"right",//pc端 按右键弹出菜单
+               contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
+               contextMenu: '#context-menu',
+               onContextMenuItem: function(row, $el){
+                   if($el.data("item") == "edit"){
+                   		edit(row.id);
+                   }else if($el.data("item") == "view"){
+                       view(row.id);
+                   } else if($el.data("item") == "delete"){
+                        jp.confirm('确认要删除该表单记录吗?', function(){
+                       	jp.loading();
+                       	jp.get("${ctx}/managementcenter/moduleacquisition/delete?id="+row.id, function(data){
+                   	  		if(data.success){
+                   	  			$('#moduleBlockNewTable').bootstrapTable('refresh');
+                   	  			jp.success(data.msg);
+                   	  		}else{
+                   	  			jp.error(data.msg);
+                   	  		}
+                   	  	})
+                   	   
+                   	});
+                      
+                   } 
+               },
+              
+               onClickRow: function(row, $el){
+               },
+               	onShowSearch: function () {
+			$("#search-collapse").slideToggle();
+		},
+               columns: [{
+		        checkbox: true
+		       
+		    }
+                   ,{
+                       field: 'mdSmallClass',
+                       title: '模块名称'
+                       ,formatter:function(value, row , index){
+
+                           if(value == null || value ==""){
+                               value = "-";
+                           }
+                           return "<a href='javascript:moduleList(\""+row.id+"\")'>"+value+"</a>";
+                       }
+                   }
+					,{
+						field: 'mdBigClass',
+						title: '模块大类'
+					}
+
+                   ,{
+                       field: 'mdTheClass',
+                       title: '模块中类'
+
+                   }
+
+                   ,{
+                       field: 'mdUnit',
+                       title: '单位'
+                   }
+                   ,{
+                       field: 'mdImg',
+                       title: '附件',
+                       formatter:function(value, row , index){
+                           if (value!=null&&value!=""){
+                               var valueArray = value.split("|");
+                               var labelArray = [];
+                               for(var i =0 ; i<valueArray.length; i++){
+                                   if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                   {
+                                       labelArray[i] = "<a href=\""+valueArray[i]+"\" url=\""+valueArray[i]+"\" target=\"_blank\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>"
+                                   }else{
+                                       labelArray[i] = '<img   onclick="jp.showPic(\''+valueArray[i]+'\')"'+' height="50px" src="'+valueArray[i]+'">';
+                                   }
+                               }
+                               return labelArray.join(" ");
+                           }
+
+                       }
+                   }
+                   ,{
+                       field: 'mdVersion',
+                       title: '版本号'
+                   }
+		     ]
+		
+		});
+		
+		  
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+
+		 
+		  $('#moduleBlockNewTable').bootstrapTable("toggleView");
+		}
+	  
+	  $('#moduleBlockNewTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+                'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', ! $('#moduleBlockNewTable').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#moduleBlockNewTable').bootstrapTable('getSelections').length!=1);
+        });
+		  
+		$("#btnImport").click(function(){
+			jp.open({
+			    type: 2,
+                area: [500, 200],
+                auto: true,
+			    title:"导入数据",
+			    content: "${ctx}/tag/importExcel" ,
+			    btn: ['确定', '关闭'],
+			    	btn1: function(index, layero){
+				        var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+						iframeWin.contentWindow.importExcel('${ctx}/managementcenter/moduleacquisition/import', function (data) {
+							if(data.success){
+								jp.success(data.msg);
+								refresh();
+							}else{
+								jp.error(data.msg);
+							}
+                            jp.close(index);
+						});//调用保存事件
+						return false;
+				  	},
+
+				  btn2: function(index){
+					//  jp.close(index);
+	    	       }
+			}); 
+		});
+		
+		
+	 $("#export").click(function(){//导出Excel文件
+			jp.downloadFile('${ctx}/managementcenter/moduleacquisition/export');
+	  });
+    $("#insertVersion").click(function(){//生成新版本
+        jp.downloadFile('${ctx}/managementcenter/moduleacquisition/export');
+    });
+		    
+	  $("#search").click("click", function() {// 绑定查询按扭
+		  $('#moduleBlockNewTable').bootstrapTable('refresh');
+		});
+	 
+	 $("#reset").click("click", function() {// 绑定查询按扭
+		  $("#searchForm  input").val("");
+		  $("#searchForm  select").val("");
+		  $("#searchForm  .select-item").html("");
+		  $('#moduleBlockNewTable').bootstrapTable('refresh');
+		});
+		
+		$('#beginBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		
+	});
+		
+  function getIdSelections() {
+        return $.map($("#moduleBlockNewTable").bootstrapTable('getSelections'), function (row) {
+            return row.id
+        });
+    }
+  
+  function deleteAll(){
+
+		jp.confirm('确认要删除该项目管理表单记录吗?', function(){
+			jp.loading();  	
+			jp.get("${ctx}/managementcenter/moduleacquisition/deleteAll?ids=" + getIdSelections(), function(data){
+         	  		if(data.success){
+         	  			$('#moduleBlockNewTable').bootstrapTable('refresh');
+         	  			jp.success(data.msg);
+         	  		}else{
+         	  			jp.error(data.msg);
+         	  		}
+         	  	})
+          	   
+		})
+  }
+
+    //刷新列表
+  function refresh(){
+  	$('#moduleBlockNewTable').bootstrapTable('refresh');
+  }
+  
+   function add(){
+	  jp.openSaveDialog('新增模块表', "${ctx}/managementcenter/moduleacquisition/form",'800px', '500px');
+  }
+
+
+  
+   function edit(id){//没有权限时,不显示确定按钮
+       if(id == undefined){
+	      id = getIdSelections();
+	}
+	jp.openSaveDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/form?id="+id, '800px', '500px');
+  }
+
+	function moduleList(id){//没有权限时,不显示确定按钮
+		if(id == undefined){
+			id = getIdSelections();
+		}
+		jp.openViewDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/moduleListing/list1?blockId="+id, '800px', '500px');
+	}
+</script>

+ 97 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleBlockNewList.jsp

@@ -0,0 +1,97 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>模块表</title>
+	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+	<meta name="decorator" content="ani"/>
+	<%@ include file="/webpage/include/bootstraptable.jsp"%>
+	<%@include file="/webpage/include/treeview.jsp" %>
+	<%@include file="moduleBlockNewList.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 id="search-collapse" class="collapse">
+			<div class="accordion-inner">
+				<form:form id="searchForm" modelAttribute="moduleBlock" class="form form-horizontal well clearfix">
+					<div class="col-xs-12 col-sm-6 col-md-4">
+						<label class="label-item single-overflow pull-left" title="模块名称:">模块名称:</label>
+						<form:input path="mdSmallClass" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+					<div class="col-xs-12 col-sm-6 col-md-4">
+						<label class="label-item single-overflow pull-left" title="模块大类:">模块大类:</label>
+						<form:input path="mdBigClass" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+					<div class="col-xs-12 col-sm-6 col-md-4">
+						<label class="label-item single-overflow pull-left" title="模块中类:">模块中类:</label>
+						<form:input path="mdTheClass" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+					<div class="col-xs-12 col-sm-6 col-md-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:form>
+			</div>
+		</div>
+	
+	<!-- 工具栏 -->
+	<div id="toolbar">
+				<shiro:hasPermission name="managementcenter:moduleacquisition:add">
+					<button id="add" class="btn btn-primary" onclick="add()">
+						<i class="glyphicon glyphicon-plus"></i> 新建
+					</button>
+				</shiro:hasPermission>
+				<shiro:hasPermission name="managementcenter:moduleacquisition:del">
+					<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
+						<i class="glyphicon glyphicon-remove"></i> 删除
+					</button>
+				</shiro:hasPermission>
+				<shiro:hasPermission name="managementcenter:moduleacquisition:edit">
+					<button id="edit" class="btn btn-success" disabled onclick="edit()">
+						<i class="glyphicon glyphicon-edit"></i> 修改
+					</button>
+				</shiro:hasPermission>
+				<%--<shiro:hasPermission name="managementcenter:moduleacquisition:view">--%>
+					<%--<button id="view" class="btn btn-default" disabled onclick="view()">--%>
+						<%--<i class="fa fa-search-plus"></i> 查看--%>
+					<%--</button>--%>
+				<%--</shiro:hasPermission>--%>
+				<%--<shiro:hasPermission name="managementcenter:moduleacquisition:import">--%>
+					<%--<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>--%>
+				<%--</shiro:hasPermission>--%>
+				<%--<shiro:hasPermission name="managementcenter:moduleacquisition:export">--%>
+					<%--<button id="insertVersion" class="btn btn-warning">--%>
+						<%--<i class="fa fa-file-excel-o"></i> 生成新版本--%>
+					<%--</button>--%>
+				<%--</shiro:hasPermission>--%>
+		    </div>
+		
+	<!-- 表格 -->
+	<table id="moduleBlockNewTable"  data-toolbar="#toolbar"></table>
+
+    <!-- context menu -->
+    <ul id="context-menu" class="dropdown-menu">
+    	<shiro:hasPermission name="sg:managementcenter:moduleacquisition:view">
+        <li data-item="view"><a>查看</a></li>
+        </shiro:hasPermission>
+    	<shiro:hasPermission name="sg:managementcenter:moduleacquisition:edit">
+        <li data-item="edit"><a>编辑</a></li>
+        </shiro:hasPermission>
+        <shiro:hasPermission name="sg:managementcenter:moduleacquisition:del">
+        <li data-item="delete"><a>删除</a></li>
+        </shiro:hasPermission>
+        <li data-item="action1"><a>取消</a></li>
+    </ul>  
+	</div>
+	</div>
+	</div>
+</body>
+</html>

+ 275 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleListing.js

@@ -0,0 +1,275 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+$(document).ready(function() {
+	$('#moduleListingTable').bootstrapTable({
+		  //请求方法
+               method: 'post',
+               //类型json
+               dataType: "json",
+               contentType: "application/x-www-form-urlencoded",
+                //显示检索按钮
+                showSearch: true,
+                //显示刷新按钮
+                showRefresh: true,
+                //显示切换手机试图按钮
+                showToggle: true,
+                //显示 内容列下拉框
+                showColumns: true,
+                //显示到处按钮
+                showExport: true,
+                //显示切换分页按钮
+                showPaginationSwitch: true,
+
+    	       //最低显示2行
+    	       minimumCountColumns: 2,
+               //是否显示行间隔色
+               striped: true,
+               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)     
+               cache: false,    
+               //是否显示分页(*)  
+               pagination: true,   
+                //排序方式 
+               sortOrder: "asc",  
+               //初始化加载第一页,默认第一页
+               pageNumber:1,   
+               //每页的记录行数(*)   
+               pageSize: 5,
+               //可供选择的每页的行数(*)    
+               pageList: [5,10, 25, 50, 100],
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据  
+               url: "${ctx}/managementcenter/moduleacquisition/moduleListing/data",
+               //默认值为 '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;
+               },
+               //分页方式:client客户端分页,server服务端分页(*)
+               sidePagination: "server",
+               contextMenuTrigger:"right",//pc端 按右键弹出菜单
+               contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
+               contextMenu: '#context-menu',
+               onContextMenuItem: function(row, $el){
+                   if($el.data("item") == "edit"){
+                   		edit(row.id);
+                   }else if($el.data("item") == "view"){
+                       view(row.id);
+                   } else if($el.data("item") == "delete"){
+                        jp.confirm('确认要删除该表单记录吗?', function(){
+                       	jp.loading();
+                       	jp.get("${ctx}/managementcenter/moduleacquisition/moduleListing/delete?id="+row.id, function(data){
+                   	  		if(data.success){
+                   	  			$('#moduleListingTable').bootstrapTable('refresh');
+                   	  			jp.success(data.msg);
+                   	  		}else{
+                   	  			jp.error(data.msg);
+                   	  		}
+                   	  	})
+                   	   
+                   	});
+                      
+                   } 
+               },
+              
+               onClickRow: function(row, $el){
+               },
+               	onShowSearch: function () {
+			$("#search-collapse").slideToggle();
+		},
+               columns: [{
+		        checkbox: true
+		       
+		    }
+                   ,{
+                       field: 'mdName',
+                       title: '模块名称'
+                   }
+                    ,{
+                        field: 'mdBigClass',
+                        title: '模块大类'
+                    }
+
+                   ,{
+                       field: 'mdTheClass',
+                       title: '模块中类',
+                   }
+                   ,{
+                       field: 'bigClassification',
+                       title: '大分类',
+                   }
+                   ,{
+                       field: 'theClassification',
+                       title: '中分类',
+                   }
+                   ,{
+                       field: 'smallClassification',
+                       title: '小分类',
+                   }
+                   ,{
+                       field: 'materialCode',
+                       title: '物料编码',
+                   }
+                   ,{
+                       field: 'materialDescription',
+                       title: '物料描述',
+                   }
+                   ,{
+                       field: 'extensionDescription',
+                       title: '扩展描述',
+                   }
+                   ,{
+                       field: 'mdUnits',
+                       title: '单位',
+                   }
+                   ,{
+                       field: 'mdCount',
+                       title: '数量',
+                   }
+                   ,{
+                       field: 'mdSingleWeight',
+                       title: '单重',
+                   }
+                   ,{
+                       field: 'mdTotalWeight',
+                       title: '总重',
+                   }
+                   ,{
+                       field: 'mdTheParty',
+                       title: '甲乙供',
+                   }
+                   ,{
+                       field: 'mdText',
+                       title: '备注',
+                   }
+                   ,{
+                       field: 'mdTotalAmount',
+                       title: '备注',
+                   }
+		     ]
+		
+		});
+		
+		  
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+
+		 
+		  $('#moduleListingTable').bootstrapTable("toggleView");
+		}
+	  
+	  $('#moduleListingTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+                'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', ! $('#moduleListingTable').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#moduleListingTable').bootstrapTable('getSelections').length!=1);
+        });
+		  
+		$("#btnImport").click(function(){
+			jp.open({
+			    type: 2,
+                area: [500, 200],
+                auto: true,
+			    title:"导入数据",
+			    content: "${ctx}/tag/importExcel" ,
+			    btn: ['确定', '关闭'],
+			    	btn1: function(index, layero){
+				        var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+						iframeWin.contentWindow.importExcel('${ctx}/managementcenter/moduleacquisition/import', function (data) {
+							if(data.success){
+								jp.success(data.msg);
+								refresh();
+							}else{
+								jp.error(data.msg);
+							}
+                            jp.close(index);
+						});//调用保存事件
+						return false;
+				  	},
+
+				  btn2: function(index){
+					//  jp.close(index);
+	    	       }
+			}); 
+		});
+		
+		
+	 $("#export").click(function(){//导出Excel文件
+			jp.downloadFile('${ctx}/managementcenter/moduleacquisition/export');
+	  });
+
+		    
+	  $("#search").click("click", function() {// 绑定查询按扭
+		  $('#moduleListingTable').bootstrapTable('refresh');
+		});
+	 
+	 $("#reset").click("click", function() {// 绑定查询按扭
+		  $("#searchForm  input").val("");
+		  $("#searchForm  select").val("");
+		  $("#searchForm  .select-item").html("");
+		  $('#moduleListingTable').bootstrapTable('refresh');
+		});
+		
+		$('#beginBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		
+	});
+		
+  function getIdSelections() {
+        return $.map($("#moduleListingTable").bootstrapTable('getSelections'), function (row) {
+            return row.id
+        });
+    }
+  
+  function deleteAll(){
+
+		jp.confirm('确认要删除该项目管理表单记录吗?', function(){
+			jp.loading();  	
+			jp.get("${ctx}/managementcenter/moduleacquisition/moduleListing/deleteAll?ids=" + getIdSelections(), function(data){
+         	  		if(data.success){
+         	  			$('#moduleListingTable').bootstrapTable('refresh');
+         	  			jp.success(data.msg);
+         	  		}else{
+         	  			jp.error(data.msg);
+         	  		}
+         	  	})
+          	   
+		})
+  }
+
+    //刷新列表
+  function refresh(){
+  	$('#moduleListingTable').bootstrapTable('refresh');
+  }
+  
+   function add(){
+	  jp.openSaveDialog('新增模块表', "${ctx}/managementcenter/moduleacquisition/moduleListing/form",'800px', '500px');
+  }
+
+
+
+    function edit(id){//没有权限时,不显示确定按钮
+        if(id == undefined){
+            id = getIdSelections();
+        }
+        jp.openSaveDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/moduleListing/form?id="+id, '800px', '500px');
+    }
+  
+     function view(id){//没有权限时,不显示确定按钮
+          if(id == undefined){
+                 id = getIdSelections();
+          }
+            jp.openViewDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/moduleListing/list", '800px', '500px');
+     }
+
+
+
+</script>

+ 68 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleListing.jsp

@@ -0,0 +1,68 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>模块清单</title>
+	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+	<meta name="decorator" content="ani"/>
+	<%@ include file="/webpage/include/bootstraptable.jsp"%>
+	<%@include file="/webpage/include/treeview.jsp" %>
+	<%@include file="moduleListing.js" %>
+</head>
+<body>
+
+	<div class="wrapper wrapper-content">
+	<div class="panel panel-primary">
+		<div class="panel-body">
+			<!-- 搜索 -->
+			<div id="search-collapse" class="collapse">
+				<div class="accordion-inner">
+					<form:form id="searchForm" modelAttribute="moduleListing" class="form form-horizontal well clearfix">
+						<div class="col-xs-12 col-sm-6 col-md-4">
+							<label class="label-item single-overflow pull-left" title="模块名称:">模块名称:</label>
+							<form:input path="mdName" htmlEscape="false" maxlength="100"  class=" form-control"/>
+						</div>
+						<div class="col-xs-12 col-sm-6 col-md-4">
+							<label class="label-item single-overflow pull-left" title="模块大类:">模块大类:</label>
+							<form:input path="mdBigClass" htmlEscape="false" maxlength="100"  class=" form-control"/>
+						</div>
+						<div class="col-xs-12 col-sm-6 col-md-4">
+							<label class="label-item single-overflow pull-left" title="模块中类:">模块中类:</label>
+							<form:input path="mdTheClass" htmlEscape="false" maxlength="100"  class=" form-control"/>
+						</div>
+
+						<div class="col-xs-12 col-sm-6 col-md-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:form>
+				</div>
+			</div>
+
+			<!-- 工具栏 -->
+			<div id="toolbar">
+			</div>
+
+			<!-- 表格 -->
+			<table id="moduleListingTable"  data-toolbar="#toolbar"></table>
+
+			<!-- context menu -->
+			<ul id="context-menu" class="dropdown-menu">
+				<shiro:hasPermission name="sg:managementcenter:moduleacquisition:view">
+					<li data-item="view"><a>查看</a></li>
+				</shiro:hasPermission>
+				<shiro:hasPermission name="sg:managementcenter:moduleacquisition:edit">
+					<li data-item="edit"><a>编辑</a></li>
+				</shiro:hasPermission>
+				<shiro:hasPermission name="sg:managementcenter:moduleacquisition:del">
+					<li data-item="delete"><a>删除</a></li>
+				</shiro:hasPermission>
+				<li data-item="action1"><a>取消</a></li>
+			</ul>
+		</div>
+	</div>
+	</div>
+</body>
+</html>

+ 128 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleListingNewForm.jsp

@@ -0,0 +1,128 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>模块清单</title>
+	<meta name="decorator" content="ani"/>
+	<script type="text/javascript">
+
+		$(document).ready(function() {
+
+	        $('#beginDate').datetimepicker({
+				 format: "YYYY-MM-DD HH:mm:ss"
+		    });
+	        $('#endDate').datetimepicker({
+				 format: "YYYY-MM-DD HH:mm:ss"
+		    });
+		});
+		function save() {
+            var isValidate = jp.validateForm('#inputForm');//校验表单
+            if(!isValidate){
+                return false;
+			}else{
+                jp.loading();
+                jp.post("${ctx}/managementcenter/moduleacquisition/moduleListing/save",$('#inputForm').serialize(),function(data){
+                    if(data.success){
+                        $('#moduleNewListingTable').bootstrapTable('refresh');
+                        var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
+                        parent.layer.close(dialogIndex);
+                        jp.success(data.msg);
+                    }else{
+                        jp.error(data.msg);
+                    }
+                })
+			}
+
+        }
+	</script>
+</head>
+<body class="bg-white">
+		<form:form id="inputForm" modelAttribute="moduleListing" class="form-horizontal">
+		<form:hidden path="id"/>	
+		<table class="table table-bordered">
+			<tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right" style="float: left">模块名称:</label></td>
+					<td class="width-35">
+						<form:input path="mdName" htmlEscape="false" class="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">模块大类:</label></td>
+					<td class="width-35">
+						<form:input path="mdBigClass" htmlEscape="false"   class="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right" style="float: left">模块中类:</label></td>
+					<td class="width-35">
+						<form:input path="mdTheClass" htmlEscape="false" class="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">大分类:</label></td>
+					<td class="width-35">
+						<form:input path="bigClassification" htmlEscape="false"   class="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right" style="float: left">中分类:</label></td>
+					<td class="width-35">
+						<form:input path="theClassification" htmlEscape="false" class="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">小分类:</label></td>
+					<td class="width-35">
+						<form:input path="smallClassification" htmlEscape="false"   class="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right" style="float: left">物料编码:</label></td>
+					<td class="width-35">
+						<form:input path="materialCode" htmlEscape="false" class="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">物料描述:</label></td>
+					<td class="width-35">
+						<form:input path="materialDescription" htmlEscape="false"   class="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right" style="float: left">扩展描述:</label></td>
+					<td class="width-35">
+						<form:input path="extensionDescription" htmlEscape="false" class="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">单位:</label></td>
+					<td class="width-35">
+						<form:input path="mdUnits" htmlEscape="false"   class="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right" style="float: left">数量:</label></td>
+					<td class="width-35">
+						<form:input path="mdCount" htmlEscape="false" class="form-control number"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">单重:</label></td>
+					<td class="width-35">
+						<form:input path="mdSingleWeight" htmlEscape="false"   class="form-control number"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right" style="float: left">总重:</label></td>
+					<td class="width-35">
+						<form:input path="mdTotalWeight" htmlEscape="false" class="form-control number"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">甲乙供:</label></td>
+					<td class="width-35">
+						<form:input path="mdTheParty" htmlEscape="false"   class="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right" style="float: left">备注:</label></td>
+					<td class="width-35">
+						<form:input path="mdText" htmlEscape="false" class="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">总量:</label></td>
+					<td class="width-35">
+						<form:input path="mdTotalAmount" htmlEscape="false"   class="form-control number"/>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 280 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleNewListing.js

@@ -0,0 +1,280 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+$(document).ready(function() {
+	$('#moduleNewListingTable').bootstrapTable({
+		  //请求方法
+               method: 'post',
+               //类型json
+               dataType: "json",
+               contentType: "application/x-www-form-urlencoded",
+                //显示检索按钮
+                showSearch: true,
+                //显示刷新按钮
+                showRefresh: true,
+                //显示切换手机试图按钮
+                showToggle: true,
+                //显示 内容列下拉框
+                showColumns: true,
+                //显示到处按钮
+                showExport: true,
+                //显示切换分页按钮
+                showPaginationSwitch: true,
+
+    	       //最低显示2行
+    	       minimumCountColumns: 2,
+               //是否显示行间隔色
+               striped: true,
+               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)     
+               cache: false,    
+               //是否显示分页(*)  
+               pagination: true,   
+                //排序方式 
+               sortOrder: "asc",  
+               //初始化加载第一页,默认第一页
+               pageNumber:1,   
+               //每页的记录行数(*)   
+               pageSize: 5,
+               //可供选择的每页的行数(*)    
+               pageList: [5,10, 25, 50, 100],
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据  
+               url: "${ctx}/managementcenter/moduleacquisition/moduleListing/data",
+               //默认值为 '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;
+               },
+               //分页方式:client客户端分页,server服务端分页(*)
+               sidePagination: "server",
+               contextMenuTrigger:"right",//pc端 按右键弹出菜单
+               contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
+               contextMenu: '#context-menu',
+               onContextMenuItem: function(row, $el){
+                   if($el.data("item") == "edit"){
+                   		edit(row.id);
+                   }else if($el.data("item") == "view"){
+                       view(row.id);
+                   } else if($el.data("item") == "delete"){
+                        jp.confirm('确认要删除该表单记录吗?', function(){
+                       	jp.loading();
+                       	jp.get("${ctx}/managementcenter/moduleacquisition/moduleListing/delete?id="+row.id, function(data){
+                   	  		if(data.success){
+                   	  			$('#moduleNewListingTable').bootstrapTable('refresh');
+                   	  			jp.success(data.msg);
+                   	  		}else{
+                   	  			jp.error(data.msg);
+                   	  		}
+                   	  	})
+                   	   
+                   	});
+                      
+                   } 
+               },
+              
+               onClickRow: function(row, $el){
+               },
+               	onShowSearch: function () {
+			$("#search-collapse").slideToggle();
+		},
+               columns: [{
+		        checkbox: true
+		       
+		    }
+                   ,{
+                       field: 'mdName',
+                       title: '模块名称'
+                       ,formatter:function(value, row , index){
+                           if(value == null || value ==""){
+                               value = "-";
+                           }
+                           return "<a href='javascript:edit(\""+row.id+"\")'>"+value+"</a>";
+                       }
+                   }
+                    ,{
+                        field: 'mdBigClass',
+                        title: '模块大类'
+                    }
+
+                   ,{
+                       field: 'mdTheClass',
+                       title: '模块中类',
+                   }
+                   ,{
+                       field: 'bigClassification',
+                       title: '大分类',
+                   }
+                   ,{
+                       field: 'theClassification',
+                       title: '中分类',
+                   }
+                   ,{
+                       field: 'smallClassification',
+                       title: '小分类',
+                   }
+                   ,{
+                       field: 'materialCode',
+                       title: '物料编码',
+                   }
+                   ,{
+                       field: 'materialDescription',
+                       title: '物料描述',
+                   }
+                   ,{
+                       field: 'extensionDescription',
+                       title: '扩展描述',
+                   }
+                   ,{
+                       field: 'mdUnits',
+                       title: '单位',
+                   }
+                   ,{
+                       field: 'mdCount',
+                       title: '数量',
+                   }
+                   ,{
+                       field: 'mdSingleWeight',
+                       title: '单重',
+                   }
+                   ,{
+                       field: 'mdTotalWeight',
+                       title: '总重',
+                   }
+                   ,{
+                       field: 'mdTheParty',
+                       title: '甲乙供',
+                   }
+                   ,{
+                       field: 'mdText',
+                       title: '备注',
+                   }
+                   ,{
+                       field: 'mdTotalAmount',
+                       title: '总量',
+                   }
+		     ]
+		
+		});
+		
+		  
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+
+		 
+		  $('#moduleNewListingTable').bootstrapTable("toggleView");
+		}
+	  
+	  $('#moduleNewListingTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+                'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', ! $('#moduleNewListingTable').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#moduleNewListingTable').bootstrapTable('getSelections').length!=1);
+        });
+		  
+		$("#btnImport").click(function(){
+			jp.open({
+			    type: 2,
+                area: [500, 200],
+                auto: true,
+			    title:"导入数据",
+			    content: "${ctx}/tag/importExcel" ,
+			    btn: ['确定', '关闭'],
+			    	btn1: function(index, layero){
+				        var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+						iframeWin.contentWindow.importExcel('${ctx}/managementcenter/moduleacquisition/import', function (data) {
+							if(data.success){
+								jp.success(data.msg);
+								refresh();
+							}else{
+								jp.error(data.msg);
+							}
+                            jp.close(index);
+						});//调用保存事件
+						return false;
+				  	},
+
+				  btn2: function(index){
+					//  jp.close(index);
+	    	       }
+			}); 
+		});
+		
+		
+	 $("#export").click(function(){//导出Excel文件
+			jp.downloadFile('${ctx}/managementcenter/moduleacquisition/export');
+	  });
+
+		    
+	  $("#search").click("click", function() {// 绑定查询按扭
+		  $('#moduleNewListingTable').bootstrapTable('refresh');
+		});
+	 
+	 $("#reset").click("click", function() {// 绑定查询按扭
+		  $("#searchForm  input").val("");
+		  $("#searchForm  select").val("");
+		  $("#searchForm  .select-item").html("");
+		  $('#moduleNewListingTable').bootstrapTable('refresh');
+		});
+		
+		$('#beginBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		
+	});
+		
+  function getIdSelections() {
+        return $.map($("#moduleNewListingTable").bootstrapTable('getSelections'), function (row) {
+            return row.id
+        });
+    }
+  
+  function deleteAll(){
+
+		jp.confirm('确认要删除该项目管理表单记录吗?', function(){
+			jp.loading();  	
+			jp.get("${ctx}/managementcenter/moduleacquisition/moduleListing/deleteAll?ids=" + getIdSelections(), function(data){
+         	  		if(data.success){
+         	  			$('#moduleNewListingTable').bootstrapTable('refresh');
+         	  			jp.success(data.msg);
+         	  		}else{
+         	  			jp.error(data.msg);
+         	  		}
+         	  	})
+          	   
+		})
+  }
+
+    //刷新列表
+  function refresh(){
+  	$('#moduleNewListingTable').bootstrapTable('refresh');
+  }
+  
+   function add(){
+	  jp.openSaveDialog('新增模块表', "${ctx}/managementcenter/moduleacquisition/moduleListing/form",'800px', '500px');
+  }
+
+
+
+    function edit(id){//没有权限时,不显示确定按钮
+        if(id == undefined){
+            id = getIdSelections();
+        }
+        jp.openSaveDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/moduleListing/form?id="+id, '800px', '500px');
+    }
+  
+     function view(id){//没有权限时,不显示确定按钮
+          if(id == undefined){
+                 id = getIdSelections();
+          }
+            jp.openViewDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/moduleListing/list", '800px', '500px');
+     }
+
+
+</script>

+ 81 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleNewListing.jsp

@@ -0,0 +1,81 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>模块清单</title>
+	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+	<meta name="decorator" content="ani"/>
+	<%@ include file="/webpage/include/bootstraptable.jsp"%>
+	<%@include file="/webpage/include/treeview.jsp" %>
+	<%@include file="moduleNewListing.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 id="search-collapse" class="collapse">
+				<div class="accordion-inner">
+					<form:form id="searchForm" modelAttribute="moduleListing" class="form form-horizontal well clearfix">
+						<div class="col-xs-12 col-sm-6 col-md-4">
+							<label class="label-item single-overflow pull-left" title="模块名称:">模块名称:</label>
+							<form:input path="mdName" htmlEscape="false" maxlength="100"  class=" form-control"/>
+						</div>
+						<div class="col-xs-12 col-sm-6 col-md-4">
+							<label class="label-item single-overflow pull-left" title="模块大类:">模块大类:</label>
+							<form:input path="mdBigClass" htmlEscape="false" maxlength="100"  class=" form-control"/>
+						</div>
+						<div class="col-xs-12 col-sm-6 col-md-4">
+							<label class="label-item single-overflow pull-left" title="模块中类:">模块中类:</label>
+							<form:input path="mdTheClass" htmlEscape="false" maxlength="100"  class=" form-control"/>
+						</div>
+
+						<div class="col-xs-12 col-sm-6 col-md-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:form>
+				</div>
+			</div>
+
+			<!-- 工具栏 -->
+			<div id="toolbar">
+				<shiro:hasPermission name="managementcenter:moduleacquisition:add">
+					<button id="add" class="btn btn-primary" onclick="add()">
+					<i class="glyphicon glyphicon-plus"></i> 新建
+					</button>
+				</shiro:hasPermission>
+				<shiro:hasPermission name="managementcenter:moduleacquisition:del">
+					<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
+						<i class="glyphicon glyphicon-remove"></i> 删除
+					</button>
+				</shiro:hasPermission>
+			</div>
+
+			<!-- 表格 -->
+			<table id="moduleNewListingTable"  data-toolbar="#toolbar"></table>
+
+			<!-- context menu -->
+			<ul id="context-menu" class="dropdown-menu">
+				<shiro:hasPermission name="sg:managementcenter:moduleacquisition:view">
+					<li data-item="view"><a>查看</a></li>
+				</shiro:hasPermission>
+				<shiro:hasPermission name="sg:managementcenter:moduleacquisition:edit">
+					<li data-item="edit"><a>编辑</a></li>
+				</shiro:hasPermission>
+				<shiro:hasPermission name="sg:managementcenter:moduleacquisition:del">
+					<li data-item="delete"><a>删除</a></li>
+				</shiro:hasPermission>
+				<li data-item="action1"><a>取消</a></li>
+			</ul>
+		</div>
+	</div>
+	</div>
+</body>
+</html>

+ 155 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleVersionList.js

@@ -0,0 +1,155 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+$(document).ready(function() {
+	$('#moduleVersionTable').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: 5,
+               //可供选择的每页的行数(*)    
+               pageList: [5,10, 25, 50, 100],
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据  
+               url: "${ctx}/managementcenter/moduleacquisition/dataVersion",
+               //默认值为 '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;
+               },
+               //分页方式:client客户端分页,server服务端分页(*)
+               sidePagination: "server",
+               contextMenuTrigger:"right",//pc端 按右键弹出菜单
+               contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
+               contextMenu: '#context-menu',
+               onContextMenuItem: function(row, $el){
+                   save(row.version)
+               },
+              
+               onClickRow: function(row, $el){
+               },
+               	onShowSearch: function () {
+			$("#search-collapse").slideToggle();
+		},
+               columns: [{
+		        radio: true
+		       
+		    }
+			,{
+		        field: 'version',
+		        title: '版本号',
+            }
+
+                   ,{
+                       field: 'updateDate',
+                       title: '版本生成时间',
+
+                   }
+
+		     ]
+		
+		});
+		
+		  
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+
+		 
+		  $('#moduleVersionTable').bootstrapTable("toggleView");
+		}
+	  
+	  $('#moduleVersionTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+                'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', ! $('#moduleVersionTable').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#moduleVersionTable').bootstrapTable('getSelections').length!=1);
+        });
+
+	  $("#search").click("click", function() {// 绑定查询按扭
+		  $('#moduleVersionTable').bootstrapTable('refresh');
+		});
+
+	 $("#reset").click("click", function() {// 绑定查询按扭
+		  $("#searchForm  input").val("");
+		  $("#searchForm  select").val("");
+		  $("#searchForm  .select-item").html("");
+		  $('#moduleVersionTable').bootstrapTable('refresh');
+		});
+
+		$('#beginBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+
+	});
+
+  function getIdSelections() {
+        return $.map($("#moduleVersionTable").bootstrapTable('getSelections'), function (row) {
+            return row.version
+        });
+    }
+
+  function deleteAll(){
+
+		jp.confirm('确认要删除该项目管理表单记录吗?', function(){
+			jp.loading();
+			jp.get("${ctx}/managementcenter/moduleacquisition/deleteAll?ids=" + getIdSelections(), function(data){
+         	  		if(data.success){
+         	  			$('#moduleVersionTable').bootstrapTable('refresh');
+         	  			jp.success(data.msg);
+         	  		}else{
+         	  			jp.error(data.msg);
+         	  		}
+         	  	})
+
+		})
+  }
+
+    //刷新列表
+  function refresh(){
+  	$('#moduleVersionTable').bootstrapTable('refresh');
+  }
+
+	function moduleList(id){//没有权限时,不显示确定按钮
+		if(id == undefined){
+			id = getIdSelections();
+		}
+		jp.openViewDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/moduleListing/list?blockId="+id, '800px', '500px');
+	}
+
+	 function view(id){//没有权限时,不显示确定按钮
+		  if(id == undefined){
+				 id = getIdSelections();
+		  }
+			jp.openViewDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/moduleListing/list", '800px', '500px');
+	 }
+	function edit(id){//没有权限时,不显示确定按钮
+		if(id == undefined){
+			id = getIdSelections();
+		}
+		jp.openSaveDialog('模块清单', "${ctx}/managementcenter/moduleacquisition/form1?id="+id, '800px', '500px');
+	}
+
+
+</script>

+ 35 - 0
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleVersionList.jsp

@@ -0,0 +1,35 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>模块表</title>
+	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+	<meta name="decorator" content="ani"/>
+	<%@ include file="/webpage/include/bootstraptable.jsp"%>
+	<%@include file="/webpage/include/treeview.jsp" %>
+	<%@include file="moduleVersionList.js" %>
+	<script type="text/javascript">
+
+        $(document).ready(function() {
+
+            $('#beginDate').datetimepicker({
+                format: "YYYY-MM-DD HH:mm:ss"
+            });
+            $('#endDate').datetimepicker({
+                format: "YYYY-MM-DD HH:mm:ss"
+            });
+        });
+        function save() {
+            var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
+            parent.layer.close(dialogIndex);
+        }
+	</script>
+</head>
+<body>
+	<div class="wrapper wrapper-content">
+	<div class="panel panel-primary">
+		<table id="moduleVersionTable"  data-toolbar="#toolbar"></table>
+	</div>
+	</div>
+</body>
+</html>