Explorar el Código

基础信息管理

lem hace 4 años
padre
commit
6b024c7804

+ 214 - 0
src/main/java/com/jeeplus/modules/filing/basicInformation/entity/BasicInformation.java

@@ -0,0 +1,214 @@
+package com.jeeplus.modules.filing.basicInformation.entity;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.core.persistence.DataEntity;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild11;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild12;
+
+import java.util.List;
+
+/**
+ * 基础信息实体类
+ * */
+public class BasicInformation extends DataEntity<BasicInformation> {
+    /**
+     * 项目编码
+     * */
+    private String projectCode;
+
+    /**
+     * 单体编码
+     * */
+    private String monomerCode;
+
+    /**
+     * 项目名称
+     * */
+    private String entryName;
+
+    /**
+     * 工程属性/重点程度
+     * */
+    private String emphasis;
+
+
+    /**
+     * 建设年度1
+     * */
+    private String constructionYear;
+
+    /**
+     * 建设年度1投资
+     * */
+    private String annualInvestment;
+
+    /**
+     * 建设年度2
+     * */
+    private String constructionYearTwo;
+
+    /**
+     * 建设年度2投资
+     * */
+    private String annualInvestmentTwo;
+
+    /**
+     * 建设年度3
+     * */
+    private String constructionYearThree;
+
+    /**
+     * 建设年度3投资
+     * */
+    private String annualInvestmentThree;
+
+    /**
+     * 建设年度4
+     * */
+    private String constructionYearFour;
+
+    /**
+     * 建设年度4投资
+     * */
+    private String annualInvestmentFour;
+
+
+    /**
+     * 子类数据集合
+     * */
+    private List<BasicInformationChild> basicChildList = Lists.newArrayList();
+
+    /**
+     * 对应年度数据
+     * */
+    private List<BasicYear> yearList = Lists.newArrayList();
+
+
+
+    @ExcelField(title="项目编码", align=2, sort=1)
+    public String getProjectCode() {
+        return projectCode;
+    }
+
+    public void setProjectCode(String projectCode) {
+        this.projectCode = projectCode;
+    }
+
+    @ExcelField(title="单体编码", align=2, sort=2)
+    public String getMonomerCode() {
+        return monomerCode;
+    }
+
+    public void setMonomerCode(String monomerCode) {
+        this.monomerCode = monomerCode;
+    }
+
+    @ExcelField(title="项目名称", align=2, sort=3)
+    public String getEntryName() {
+        return entryName;
+    }
+
+    public void setEntryName(String entryName) {
+        this.entryName = entryName;
+    }
+
+    @ExcelField(title="工程属性/重点程度", align=2, sort=12)
+    public String getEmphasis() {
+        return emphasis;
+    }
+
+    public void setEmphasis(String emphasis) {
+        this.emphasis = emphasis;
+    }
+
+    @ExcelField(title="建设年度1", align=2, sort=4)
+    public String getConstructionYear() {
+        return constructionYear;
+    }
+
+    public void setConstructionYear(String constructionYear) {
+        this.constructionYear = constructionYear;
+    }
+
+    @ExcelField(title="建设年度1投资", align=2, sort=5)
+    public String getAnnualInvestment() {
+        return annualInvestment;
+    }
+
+    public void setAnnualInvestment(String annualInvestment) {
+        this.annualInvestment = annualInvestment;
+    }
+
+    @ExcelField(title="建设年度2", align=2, sort=6)
+    public String getConstructionYearTwo() {
+        return constructionYearTwo;
+    }
+
+    public void setConstructionYearTwo(String constructionYearTwo) {
+        this.constructionYearTwo = constructionYearTwo;
+    }
+
+    @ExcelField(title="建设年度2投资", align=2, sort=7)
+    public String getAnnualInvestmentTwo() {
+        return annualInvestmentTwo;
+    }
+
+    public void setAnnualInvestmentTwo(String annualInvestmentTwo) {
+        this.annualInvestmentTwo = annualInvestmentTwo;
+    }
+
+    @ExcelField(title="建设年度3", align=2, sort=8)
+    public String getConstructionYearThree() {
+        return constructionYearThree;
+    }
+
+    public void setConstructionYearThree(String constructionYearThree) {
+        this.constructionYearThree = constructionYearThree;
+    }
+
+    @ExcelField(title="建设年度3投资", align=2, sort=9)
+    public String getAnnualInvestmentThree() {
+        return annualInvestmentThree;
+    }
+
+    public void setAnnualInvestmentThree(String annualInvestmentThree) {
+        this.annualInvestmentThree = annualInvestmentThree;
+    }
+
+    @ExcelField(title="建设年度4", align=2, sort=10)
+    public String getConstructionYearFour() {
+        return constructionYearFour;
+    }
+
+    public void setConstructionYearFour(String constructionYearFour) {
+        this.constructionYearFour = constructionYearFour;
+    }
+
+    @ExcelField(title="建设年度4投资", align=2, sort=11)
+    public String getAnnualInvestmentFour() {
+        return annualInvestmentFour;
+    }
+
+    public void setAnnualInvestmentFour(String annualInvestmentFour) {
+        this.annualInvestmentFour = annualInvestmentFour;
+    }
+
+
+    public List<BasicInformationChild> getBasicChildList() {
+        return basicChildList;
+    }
+
+    public void setBasicChildList(List<BasicInformationChild> basicChildList) {
+        this.basicChildList = basicChildList;
+    }
+
+    public List<BasicYear> getYearList() {
+        return yearList;
+    }
+
+    public void setYearList(List<BasicYear> yearList) {
+        this.yearList = yearList;
+    }
+}

+ 180 - 0
src/main/java/com/jeeplus/modules/filing/basicInformation/entity/BasicInformationChild.java

@@ -0,0 +1,180 @@
+package com.jeeplus.modules.filing.basicInformation.entity;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.core.persistence.DataEntity;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild11;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild12;
+
+import java.util.List;
+
+public class BasicInformationChild extends DataEntity<BasicInformationChild> {
+    /**
+     * 项目编码
+     * */
+    private String projectCode;
+
+    /**
+     * 单体编码
+     * */
+    private String monomerCode;
+
+    /**
+     * 项目名称
+     * */
+    private String entryName;
+
+    /**
+     * 父级id
+     */
+    private String parentId;
+
+    /**
+     * 工程属性/重点程度
+     * */
+    private String emphasis;
+
+
+    /**
+     * 建设年度1
+     * */
+    private String constructionYear;
+
+    /**
+     * 建设年度1投资
+     * */
+    private String annualInvestment;
+
+    /**
+     * 建设年度2
+     * */
+    private String constructionYearTwo;
+
+    /**
+     * 建设年度2投资
+     * */
+    private String annualInvestmentTwo;
+
+    /**
+     * 建设年度3
+     * */
+    private String constructionYearThree;
+
+    /**
+     * 建设年度3投资
+     * */
+    private String annualInvestmentThree;
+
+    /**
+     * 建设年度4
+     * */
+    private String constructionYearFour;
+
+    /**
+     * 建设年度4投资
+     * */
+    private String annualInvestmentFour;
+
+    public String getProjectCode() {
+        return projectCode;
+    }
+
+    public void setProjectCode(String projectCode) {
+        this.projectCode = projectCode;
+    }
+
+    public String getMonomerCode() {
+        return monomerCode;
+    }
+
+    public void setMonomerCode(String monomerCode) {
+        this.monomerCode = monomerCode;
+    }
+
+    public String getEntryName() {
+        return entryName;
+    }
+
+    public void setEntryName(String entryName) {
+        this.entryName = entryName;
+    }
+
+    public String getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+
+    public String getEmphasis() {
+        return emphasis;
+    }
+
+    public void setEmphasis(String emphasis) {
+        this.emphasis = emphasis;
+    }
+
+    public String getConstructionYear() {
+        return constructionYear;
+    }
+
+    public void setConstructionYear(String constructionYear) {
+        this.constructionYear = constructionYear;
+    }
+
+    public String getAnnualInvestment() {
+        return annualInvestment;
+    }
+
+    public void setAnnualInvestment(String annualInvestment) {
+        this.annualInvestment = annualInvestment;
+    }
+
+    public String getConstructionYearTwo() {
+        return constructionYearTwo;
+    }
+
+    public void setConstructionYearTwo(String constructionYearTwo) {
+        this.constructionYearTwo = constructionYearTwo;
+    }
+
+    public String getAnnualInvestmentTwo() {
+        return annualInvestmentTwo;
+    }
+
+    public void setAnnualInvestmentTwo(String annualInvestmentTwo) {
+        this.annualInvestmentTwo = annualInvestmentTwo;
+    }
+
+    public String getConstructionYearThree() {
+        return constructionYearThree;
+    }
+
+    public void setConstructionYearThree(String constructionYearThree) {
+        this.constructionYearThree = constructionYearThree;
+    }
+
+    public String getAnnualInvestmentThree() {
+        return annualInvestmentThree;
+    }
+
+    public void setAnnualInvestmentThree(String annualInvestmentThree) {
+        this.annualInvestmentThree = annualInvestmentThree;
+    }
+
+    public String getConstructionYearFour() {
+        return constructionYearFour;
+    }
+
+    public void setConstructionYearFour(String constructionYearFour) {
+        this.constructionYearFour = constructionYearFour;
+    }
+
+    public String getAnnualInvestmentFour() {
+        return annualInvestmentFour;
+    }
+
+    public void setAnnualInvestmentFour(String annualInvestmentFour) {
+        this.annualInvestmentFour = annualInvestmentFour;
+    }
+}

+ 35 - 0
src/main/java/com/jeeplus/modules/filing/basicInformation/entity/BasicYear.java

@@ -0,0 +1,35 @@
+package com.jeeplus.modules.filing.basicInformation.entity;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.core.persistence.DataEntity;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild12;
+
+import java.util.List;
+
+public class BasicYear extends DataEntity<BasicYear> {
+     /**
+     * 建设年度
+     * */
+    private String constructionYear;
+
+    /**
+     * 建设年度投资
+     * */
+    private String annualInvestment;
+
+    public String getConstructionYear() {
+        return constructionYear;
+    }
+
+    public void setConstructionYear(String constructionYear) {
+        this.constructionYear = constructionYear;
+    }
+
+    public String getAnnualInvestment() {
+        return annualInvestment;
+    }
+
+    public void setAnnualInvestment(String annualInvestment) {
+        this.annualInvestment = annualInvestment;
+    }
+}

+ 56 - 0
src/main/java/com/jeeplus/modules/filing/basicInformation/mapper/BasicInformationMapper.java

@@ -0,0 +1,56 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.filing.basicInformation.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.filing.basicInformation.entity.BasicInformation;
+import com.jeeplus.modules.filing.basicInformation.entity.BasicInformationChild;
+
+import java.util.List;
+
+/**
+ * 基础信息管理
+ * @author qy
+ * @version 2021-03-23
+ */
+@MyBatisMapper
+public interface BasicInformationMapper extends BaseMapper<BasicInformation> {
+    /**
+     * 根据父级id查找所有的字类id
+     * */
+    List<BasicInformationChild> findChildList(BasicInformationChild basicInformation);
+
+    List<BasicInformationChild> findChildListBy(BasicInformation basicInformation);
+
+    /**
+     * 查早所有的父级数据
+     * */
+    BasicInformation findOne(String id);
+
+    /**
+     * 插入子级信息
+     * */
+    void insertChild(BasicInformationChild basicInformationChild);
+
+    /**
+     * 修改子级信息
+     * */
+    void updateChild(BasicInformationChild basicInformationChild);
+
+    /**
+     * 删除子级信息
+     * */
+    void deleteChild(BasicInformationChild basicInformationChild);
+
+    /**
+     * 通过projectCode查询项目是否已经存在
+     */
+    BasicInformation findByProjectCode(String projectCode);
+
+    /**
+     * 父类修改项目编码后字类自动更新对应父级id
+     * */
+    void updateChildParent(BasicInformationChild basicInformationChild);
+}

+ 276 - 0
src/main/java/com/jeeplus/modules/filing/basicInformation/mapper/xml/BasicInformationMapper.xml

@@ -0,0 +1,276 @@
+<?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.filing.basicInformation.mapper.BasicInformationMapper">
+
+    <sql id="basicColumns">
+        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.parentId AS "parentId",
+		a.projectCode AS "projectCode",
+		a.monomerCode AS "monomerCode",
+		a.entryName AS "entryName",
+		a.emphasis AS "emphasis",
+		a.constructionYear AS "constructionYear",
+		a.annualInvestment AS "annualInvestment",
+        a.constructionYearTwo AS "constructionYearTwo",
+		a.annualInvestmentTwo AS "annualInvestmentTwo",
+        a.constructionYearThree AS "constructionYearThree",
+		a.annualInvestmentThree AS "annualInvestmentThree",
+        a.constructionYearFour AS "constructionYearFour",
+		a.annualInvestmentFour AS "annualInvestmentFour"
+    </sql>
+
+    <sql id="basicOneColumns">
+        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.parentId AS "parentId",
+		a.projectCode AS "projectCode",
+		a.monomerCode AS "monomerCode",
+		a.entryName AS "entryName",
+		a.emphasis AS "emphasis"
+    </sql>
+
+    <sql id="testBasicJoins">
+        LEFT JOIN filing_basic_year b ON a.projectCode = b.projectCode
+    </sql>
+
+
+
+    <select id="get" resultType="BasicInformation">
+        SELECT
+        <include refid="basicColumns"/>
+        FROM filing_basic_information a
+        <include refid="testBasicJoins"/>
+        WHERE a.id = #{id}
+    </select>
+
+    <select id="findList" resultType="BasicInformation">
+        SELECT
+        <include refid="basicColumns"/>
+        FROM filing_basic_information a
+        <where>
+            a.del_flag = #{DEL_FLAG_NORMAL}
+            ${dataScope}
+            and a.parentId = '0'
+        </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="BasicInformation">
+        SELECT
+        <include refid="basicColumns"/>
+        FROM filing_basic_information 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 filing_basic_information(
+             id,
+             create_by,
+             create_date,
+             update_by,
+             update_date,
+             remarks,
+             del_flag,
+             projectCode,
+             monomerCode,
+             entryName,
+             emphasis,
+             constructionYear,
+             annualInvestment,
+             constructionYearTwo,
+             annualInvestmentTwo,
+             constructionYearThree,
+             annualInvestmentThree,
+             constructionYearFour,
+             annualInvestmentFour
+        )
+        VALUES (#{id},
+                #{createBy.id},
+                #{createDate},
+                #{updateBy.id},
+                #{updateDate},
+                #{remarks},
+                #{delFlag},
+                #{projectCode},
+                #{monomerCode},
+                #{entryName},
+                #{emphasis},
+                #{constructionYear},
+                #{annualInvestment},
+                #{constructionYearTwo},
+                #{annualInvestmentTwo},
+                #{constructionYearThree},
+                #{annualInvestmentThree},
+                #{constructionYearFour},
+                #{annualInvestmentFour})
+    </insert>
+
+    <insert id="insertChild">
+        INSERT INTO filing_basic_information(
+            id,
+            create_by,
+            create_date,
+            update_by,
+            update_date,
+            remarks,
+            del_flag,
+            projectCode,
+            monomerCode,
+            entryName,
+             parentId
+        )
+        VALUES (
+          #{id},
+          #{createBy.id},
+          #{createDate},
+          #{updateBy.id},
+          #{updateDate},
+          #{remarks},
+          #{delFlag},
+          #{projectCode},
+          #{monomerCode},
+          #{entryName},
+          #{parentId}
+          )
+    </insert>
+
+    <update id="update">
+        UPDATE filing_basic_information
+        SET create_date = #{createDate},
+            update_by   = #{updateBy.id},
+            update_date = #{updateDate},
+            remarks     = #{remarks},
+            projectCode = #{projectCode},
+            monomerCode = #{monomerCode},
+            entryName = #{entryName},
+            emphasis = #{emphasis},
+            constructionYear = #{constructionYear},
+            annualInvestment = #{annualInvestment},
+            constructionYearTwo = #{constructionYearTwo},
+            annualInvestmentTwo = #{annualInvestmentTwo},
+            constructionYearThree = #{constructionYearThree},
+            annualInvestmentThree = #{annualInvestmentThree},
+            constructionYearFour = #{constructionYearFour},
+            annualInvestmentFour = #{annualInvestmentFour}
+        WHERE id = #{id}
+    </update>
+
+
+    <!--物理删除-->
+    <update id="delete">
+        DELETE
+        FROM filing_basic_information
+        WHERE id = #{id}
+    </update>
+
+    <delete id="deleteChild">
+        DELETE
+        FROM filing_basic_information
+        WHERE id = #{id}
+    </delete>
+
+    <!--逻辑删除-->
+    <update id="deleteByLogic">
+        UPDATE filing_basic_information
+        SET del_flag = #{DEL_FLAG_DELETE}
+        WHERE id = #{id}
+    </update>
+    <update id="updateChild">
+        UPDATE filing_basic_information
+        SET create_date = #{createDate},
+            update_by   = #{updateBy.id},
+            update_date = #{updateDate},
+            remarks     = #{remarks},
+            projectCode = #{projectCode},
+            monomerCode = #{monomerCode},
+            entryName = #{entryName}
+        WHERE id = #{id}
+    </update>
+
+    <update id="updateChildParent">
+        update filing_basic_information
+        set parentId = #{parentId}
+        where parentId = #{projectCode}
+    </update>
+
+
+    <!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+    <select id="findUniqueByProperty" resultType="BasicInformation" statementType="STATEMENT">
+        select *
+        FROM filing_basic_information
+        where ${propertyName} = '${value}'
+    </select>
+    <select id="findChildList"
+            resultType="com.jeeplus.modules.filing.basicInformation.entity.BasicInformationChild">
+        SELECT
+            id,
+            projectCode,
+            monomerCode,
+            entryName
+        FROM filing_basic_information
+        <where>
+            <if test="projectCode != null  and projectCode != ''">
+                parentId = #{projectCode}
+            </if>
+        </where>
+    </select>
+
+    <select id="findChildListBy"
+            resultType="com.jeeplus.modules.filing.basicInformation.entity.BasicInformationChild">
+        SELECT
+        id,
+        projectCode,
+        monomerCode,
+        entryName
+        FROM filing_basic_information
+        <where>
+            <if test="projectCode != null  and projectCode != ''">
+                parentId = #{projectCode}
+            </if>
+        </where>
+    </select>
+    <select id="findOne" resultType="com.jeeplus.modules.filing.basicInformation.entity.BasicInformation">
+        SELECT
+        <include refid="basicColumns"/>
+        FROM filing_basic_information a
+        WHERE a.id = #{id}
+    </select>
+    <select id="findByProjectCode"
+            resultType="com.jeeplus.modules.filing.basicInformation.entity.BasicInformation">
+        SELECT projectCode,
+               monomerCode,
+               entryName
+        FROM filing_basic_information
+        where projectCode = #{projectCode}
+    </select>
+
+</mapper>

+ 185 - 0
src/main/java/com/jeeplus/modules/filing/basicInformation/service/BasicInformationService.java

@@ -0,0 +1,185 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.filing.basicInformation.service;
+
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.filing.basicInformation.entity.BasicInformation;
+import com.jeeplus.modules.filing.basicInformation.entity.BasicInformationChild;
+import com.jeeplus.modules.filing.basicInformation.mapper.BasicInformationMapper;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild12;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.security.auth.login.CredentialNotFoundException;
+import java.util.List;
+
+/**
+ * 基础信息管理Service
+ *
+ * @author qy
+ * @version 2021-03-23
+ */
+@Service
+@Transactional(readOnly = true)
+public class BasicInformationService extends CrudService<BasicInformationMapper, BasicInformation> {
+
+
+	public BasicInformation get(String id) {
+		BasicInformation basicInformation = mapper.findOne(id);
+		basicInformation.setBasicChildList(mapper.findChildListBy(basicInformation));
+		return basicInformation;
+	}
+
+	public List<BasicInformation> findList(BasicInformation basicInformation) {
+		return super.findList(basicInformation);
+	}
+
+	public Page<BasicInformation> findPage(Page<BasicInformation> page, BasicInformation basicInformation) {
+		return super.findPage(page, basicInformation);
+	}
+
+	public Page<BasicInformationChild> findOnePage(Page<BasicInformationChild> page, BasicInformationChild basicInformation) {
+		dataRuleFilter(basicInformation);
+		basicInformation.setPage(page);
+		page.setList(mapper.findChildList(basicInformation));
+		return page;
+	}
+
+	public Page<BasicInformation> findAllPage(Page<BasicInformation> page, BasicInformation basicInformation) {
+		dataRuleFilter(basicInformation);
+		basicInformation.setPage(page);
+		page.setList(mapper.findAllList(basicInformation));
+		return page;
+	}
+
+	@Transactional(readOnly = false)
+	public Boolean saveAll(BasicInformation basicInformation) {
+		//通过查询projectCode判断项目是否存在
+		BasicInformation byProjectCode = mapper.findByProjectCode(basicInformation.getProjectCode());
+		if (null != byProjectCode) {
+			return false;
+		}
+		for (BasicInformationChild b : basicInformation.getBasicChildList()) {
+			if (b.getId() == null) {
+				continue;
+			}
+			if (BasicInformationChild.DEL_FLAG_NORMAL.equals(b.getDelFlag())) {
+				if (StringUtils.isBlank(b.getId())) {
+					b.preInsert();
+					BasicInformation byProjectCode1 = mapper.findByProjectCode(b.getProjectCode());
+					if (null != byProjectCode1) {
+						return false;
+					}
+					b.setParentId(basicInformation.getProjectCode());
+					mapper.insertChild(b);
+				} else {
+					b.preUpdate();
+					mapper.updateChild(b);
+				}
+			} else {
+				mapper.deleteChild(b);
+			}
+		}
+		super.save(basicInformation);
+		return true;
+	}
+
+
+	@Transactional(readOnly = false)
+	public Boolean updateAll(BasicInformation basicInformation) {
+		//通过查询projectCode判断项目是否存在
+		for (BasicInformationChild b : basicInformation.getBasicChildList()) {
+			if (b.getId() == null) {
+				continue;
+			}
+			if (BasicInformationChild.DEL_FLAG_NORMAL.equals(b.getDelFlag())) {
+				if (b.getIsNewRecord()) {
+					BasicInformation byProjectCode = mapper.findByProjectCode(b.getProjectCode());
+					if (null != byProjectCode) {
+						return true;
+					}
+					b.setParentId(basicInformation.getProjectCode());
+					b.preInsert();
+					mapper.insertChild(b);
+				} else {
+					BasicInformation one = mapper.findOne(b.getId());
+					BasicInformation byProjectCode = mapper.findByProjectCode(b.getProjectCode());
+					if (!one.getProjectCode().equals(b.getProjectCode()) && null != byProjectCode) {
+						return true;
+					}
+					b.preUpdate();
+					mapper.updateChild(b);
+				}
+			} else {
+				mapper.deleteChild(b);
+			}
+		}
+		if (basicInformation.getIsNewRecord()) {
+			basicInformation.preInsert();
+			mapper.insert(basicInformation);
+		} else {
+			BasicInformation one = mapper.findOne(basicInformation.getId());
+			BasicInformation byProjectCode = mapper.findByProjectCode(basicInformation.getProjectCode());
+			if (!one.getProjectCode().equals(basicInformation.getProjectCode()) && null != byProjectCode) {
+				return true;
+			}
+			if (!one.getProjectCode().equals(basicInformation.getProjectCode())) {
+				BasicInformationChild basicInformationChild = new BasicInformationChild();
+				basicInformationChild.setProjectCode(one.getProjectCode());
+				basicInformationChild.setParentId(basicInformation.getProjectCode());
+				basicInformation.preUpdate();
+				mapper.updateChildParent(basicInformationChild);
+			}
+			basicInformation.preUpdate();
+			mapper.update(basicInformation);
+		}
+		return false;
+	}
+
+	@Transactional(readOnly = false)
+	public void delete(BasicInformation basicInformation) {
+		super.delete(basicInformation);
+	}
+
+
+	@Transactional(readOnly = false)
+	public Boolean updateChild(BasicInformationChild basicInformationChild) {
+		BasicInformation byProjectCode = mapper.findByProjectCode(basicInformationChild.getProjectCode());
+		BasicInformation one = mapper.findOne(basicInformationChild.getProjectCode());
+		if (!one.getProjectCode().equals(basicInformationChild.getProjectCode()) && null != byProjectCode) {
+			return true;
+		}
+		mapper.updateChild(basicInformationChild);
+		return false;
+	}
+
+	@Transactional(readOnly = false)
+	public void insertChild(BasicInformationChild basicInformationChild) {
+		BasicInformation byProjectCode = mapper.findByProjectCode(basicInformationChild.getProjectCode());
+		if (null == byProjectCode) {
+			basicInformationChild.preInsert();
+			mapper.insertChild(basicInformationChild);
+		} else {
+			basicInformationChild.preUpdate();
+			basicInformationChild.setId(byProjectCode.getId());
+			mapper.updateChild(basicInformationChild);
+		}
+	}
+
+	@Override
+	@Transactional(readOnly = false)
+	public void save(BasicInformation entity) {
+		BasicInformation byProjectCode = mapper.findByProjectCode(entity.getProjectCode());
+		if (null == byProjectCode) {
+			entity.preInsert();
+			mapper.insert(entity);
+		} else {
+			entity.setId(byProjectCode.getId());
+			entity.preUpdate();
+			mapper.update(entity);
+		}
+	}
+}

+ 329 - 0
src/main/java/com/jeeplus/modules/filing/basicInformation/web/BasicInformationController.java

@@ -0,0 +1,329 @@
+package com.jeeplus.modules.filing.basicInformation.web;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.modules.filing.basicInformation.entity.BasicInformation;
+import com.jeeplus.modules.filing.basicInformation.entity.BasicInformationChild;
+import com.jeeplus.modules.filing.basicInformation.service.BasicInformationService;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataMain1;
+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.validation.ConstraintViolationException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 基础信息管理Controller
+ * @author qy
+ * @version 2021-03-23
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/filing/basicInformation")
+public class BasicInformationController extends BaseController {
+
+	@Autowired
+	private BasicInformationService basicInformationService;
+	
+	@ModelAttribute
+	public BasicInformation get(@RequestParam(required=false) String id) {
+		BasicInformation entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = basicInformationService.get(id);
+		}
+		if (entity == null){
+			entity = new BasicInformation();
+		}
+		return entity;
+	}
+	
+	/**
+	 * 基础信息列表页面
+	 */
+	@RequiresPermissions("test:filing:basicInformation:list")
+	@RequestMapping(value = {"list", ""})
+	public String list(BasicInformation basicInformation, Model model) {
+		model.addAttribute("basicInformation", basicInformation);
+		return "modules/filing/basicInformation/basicInformationList";
+	}
+	
+		/**
+	 * 基础信息列表数据
+	 */
+	@ResponseBody
+	@RequiresPermissions("test:filing:basicInformation:list")
+	@RequestMapping(value = "data")
+	public Map<String, Object> data(BasicInformation basicInformation, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<BasicInformation> page = basicInformationService.findPage(new Page<BasicInformation>(request, response,-1), basicInformation);
+		return getBootstrapData(page);
+	}
+
+	/**
+	 * 查看,增加,基础信息表单页面
+	 */
+	@RequiresPermissions(value={"test:filing:basicInformation:view","test:filing:basicInformation:add","test:filing:basicInformation:edit"},logical=Logical.OR)
+	@RequestMapping(value = "form")
+	public String form(BasicInformation basicInformation, Model model) {
+		model.addAttribute("basicInformation", basicInformation);
+		return "modules/filing/basicInformation/basicInformationForm";
+	}
+
+	/**
+	 * 修改,基础信息表单页面
+	 */
+	@RequiresPermissions(value={"test:filing:basicInformation:view","test:filing:basicInformation:add","test:filing:basicInformation:edit"},logical=Logical.OR)
+	@RequestMapping(value = "updateForm")
+	public String updateForm(BasicInformation basicInformation, Model model) {
+		model.addAttribute("basicInformation", basicInformation);
+		return "modules/filing/basicInformation/updateForm";
+	}
+
+	/**
+	 * 字类查看,增加,编辑基础信息表单页面
+	 */
+	@RequiresPermissions(value={"test:filing:basicInformation:view","test:filing:basicInformation:add","test:filing:basicInformation:edit"},logical=Logical.OR)
+	@RequestMapping(value = "childForm")
+	public String childForm(BasicInformation basicInformation, Model model) {
+		model.addAttribute("basicInformation", basicInformation);
+		return "modules/filing/basicInformation/childForm";
+	}
+
+	/**
+	 * 保存基础信息
+	 */
+	@ResponseBody
+	@RequiresPermissions(value={"test:filing:basicInformation:add","test:filing:basicInformation:edit"},logical=Logical.OR)
+	@RequestMapping(value = "save")
+	public AjaxJson save(BasicInformation basicInformation, Model model) throws Exception{
+		AjaxJson j = new AjaxJson();
+		/**
+		 * 后台hibernate-validation插件校验
+		 */
+		String errMsg = beanValidator(basicInformation);
+		if (StringUtils.isNotBlank(errMsg)){
+			j.setSuccess(false);
+			j.setMsg(errMsg);
+			return j;
+		}
+		//新增或编辑表单保存
+		Boolean aBoolean = basicInformationService.saveAll(basicInformation);//保存
+		if (false == aBoolean) {
+			j.setSuccess(false);
+			j.setMsg("项目编码已存在");
+		} else {
+			j.setSuccess(true);
+			j.setMsg("保存基础信息成功");
+		}
+		return j;
+	}
+
+	/**
+	 * 保存基础信息
+	 */
+	@ResponseBody
+	@RequiresPermissions(value={"test:filing:basicInformation:add","test:filing:basicInformation:edit"},logical=Logical.OR)
+	@RequestMapping(value = "updateSave")
+	public AjaxJson updateSave(BasicInformation basicInformation, Model model) throws Exception{
+		AjaxJson j = new AjaxJson();
+		/**
+		 * 后台hibernate-validation插件校验
+		 */
+		String errMsg = beanValidator(basicInformation);
+		if (StringUtils.isNotBlank(errMsg)){
+			j.setSuccess(false);
+			j.setMsg(errMsg);
+			return j;
+		}
+		//新增或编辑表单保存
+		Boolean aBoolean = basicInformationService.updateAll(basicInformation);//保存
+		if (true == aBoolean) {
+			j.setSuccess(false);
+			j.setMsg("项目编码重复");
+		} else {
+			j.setSuccess(true);
+			j.setMsg("保存基础信息成功");
+		}
+		return j;
+	}
+
+	/**
+	 * 保存基础信息
+	 */
+	@ResponseBody
+	@RequiresPermissions(value={"test:filing:basicInformation:add","test:filing:basicInformation:edit"},logical=Logical.OR)
+	@RequestMapping(value = "childSave")
+	public AjaxJson childSave(BasicInformationChild basicInformationChild, Model model) throws Exception{
+		AjaxJson j = new AjaxJson();
+		/**
+		 * 后台hibernate-validation插件校验
+		 */
+		String errMsg = beanValidator(basicInformationChild);
+		if (StringUtils.isNotBlank(errMsg)){
+			j.setSuccess(false);
+			j.setMsg(errMsg);
+			return j;
+		}
+		//新增或编辑表单保存
+		Boolean aBoolean = basicInformationService.updateChild(basicInformationChild);//保存
+		if (true == aBoolean) {
+			j.setSuccess(false);
+			j.setMsg("项目编码重复");
+		} else {
+			j.setSuccess(true);
+			j.setMsg("保存基础信息成功");
+		}
+		return j;
+	}
+	
+	/**
+	 * 删除基础信息
+	 */
+	@ResponseBody
+	@RequiresPermissions("test:filing:basicInformation:del")
+	@RequestMapping(value = "delete")
+	public AjaxJson delete(BasicInformation basicInformation) {
+		AjaxJson j = new AjaxJson();
+		basicInformationService.delete(basicInformation);
+		j.setMsg("删除基础信息成功");
+		return j;
+	}
+	
+	/**
+	 * 批量删除基础信息
+	 */
+	@ResponseBody
+	@RequiresPermissions("test:filing:basicInformation:del")
+	@RequestMapping(value = "deleteAll")
+	public AjaxJson deleteAll(String ids) {
+		AjaxJson j = new AjaxJson();
+		String idArray[] =ids.split(",");
+		for(String id : idArray){
+			basicInformationService.delete(basicInformationService.get(id));
+		}
+		j.setMsg("删除基础信息成功");
+		return j;
+	}
+	
+	/**
+	 * 导出excel文件
+	 */
+	@ResponseBody
+	@RequiresPermissions("test:filing:basicInformation:export")
+    @RequestMapping(value = "export")
+    public AjaxJson exportFile(BasicInformation basicInformation, HttpServletRequest request, HttpServletResponse response) {
+		AjaxJson j = new AjaxJson();
+		try {
+            String fileName = "基础信息"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<BasicInformation> page = basicInformationService.findAllPage(new Page<BasicInformation>(request, response, -1), basicInformation);
+    		new ExportExcel("基础信息", BasicInformation.class).setDataList(page.getList()).write(response, fileName).dispose();
+    		j.setSuccess(true);
+    		j.setMsg("导出成功!");
+    		return j;
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("导出基础信息记录失败!失败信息:"+e.getMessage());
+		}
+			return j;
+    }
+    
+    @ResponseBody
+    @RequestMapping(value = "detail")
+	public Map<String, Object> detail(BasicInformationChild basicInformation, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<BasicInformationChild> page = basicInformationService.findOnePage(new Page<BasicInformationChild>(request, response), basicInformation);
+		return getBootstrapData(page);
+	}
+	
+
+	/**
+	 * 导入Excel数据
+	 */
+	@ResponseBody
+	@RequiresPermissions("test:filing:basicInformation:import")
+    @RequestMapping(value = "import")
+   	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
+		AjaxJson j = new AjaxJson();
+		try {
+			ImportExcel ei = new ImportExcel(file, 1, 0);
+			List<BasicInformation> list = ei.getDataList(BasicInformation.class);
+			List<BasicInformation> parentList = new ArrayList<>();
+			List<BasicInformationChild> childRenList = new ArrayList<>();
+			for (BasicInformation basicInformation : list){
+				int length = basicInformation.getProjectCode().length();
+				if (length == 12) {
+					parentList.add(basicInformation);
+				} else {
+					BasicInformationChild basicInformationChild = new BasicInformationChild();
+					basicInformationChild.setProjectCode(basicInformation.getProjectCode());
+					basicInformationChild.setMonomerCode(basicInformation.getMonomerCode());
+					basicInformationChild.setEntryName(basicInformation.getEntryName());
+					childRenList.add(basicInformationChild);
+				}
+			}
+			for (BasicInformation a :
+					parentList) {
+				for (BasicInformationChild b :
+						childRenList) {
+					if (b.getProjectCode().startsWith(a.getProjectCode())) {
+						b.setParentId(a.getProjectCode());
+					}
+				}
+			}
+			if (parentList.size() > 0) {
+				for (BasicInformation a :
+						parentList) {
+					basicInformationService.save(a);
+				}
+			}
+			if (childRenList.size() > 0) {
+				for (BasicInformationChild a :
+						childRenList) {
+					basicInformationService.insertChild(a);
+				}
+			}
+			j.setMsg( "已成功导入条基础信息记录");
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("导入基础信息失败!失败信息:"+e.getMessage());
+		}
+		return j;
+    }
+	
+	/**
+	 * 下载导入基础信息数据模板
+	 */
+	@ResponseBody
+	@RequiresPermissions("test:filing:basicInformation:import")
+    @RequestMapping(value = "import/template")
+     public AjaxJson importFileTemplate(HttpServletResponse response) {
+		AjaxJson j = new AjaxJson();
+		try {
+            String fileName = "基础信息数据导入模板.xlsx";
+    		List<BasicInformation> list = Lists.newArrayList(); 
+    		new ExportExcel("基础信息数据", BasicInformation.class, 1).setDataList(list).write(response, fileName).dispose();
+    		return null;
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg( "导入模板下载失败!失败信息:"+e.getMessage());
+		}
+		return j;
+    }
+	
+
+}

+ 194 - 0
src/main/webapp/webpage/modules/filing/basicInformation/basicInformationForm.jsp

@@ -0,0 +1,194 @@
+<%@ 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() {
+	        $('#inDate').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}/filing/basicInformation/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);
+                    }
+                })
+			}
+
+        }
+		function addRow(list, idx, tpl, row){
+			$(list).append(Mustache.render(tpl, {
+				idx: idx, delBtn: true, row: row
+			}));
+			$(list+idx).find("select").each(function(){
+				$(this).val($(this).attr("data-value"));
+			});
+			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+				var ss = $(this).attr("data-value").split(',');
+				for (var i=0; i<ss.length; i++){
+					if($(this).val() == ss[i]){
+						$(this).attr("checked","checked");
+					}
+				}
+			});
+			$(list+idx).find(".form_datetime").each(function(){
+				 $(this).datetimepicker({
+					 format: "YYYY-MM-DD HH:mm:ss"
+			    });
+			});
+		}
+		function delRow(obj, prefix){
+			var id = $(prefix+"_id");
+			var delFlag = $(prefix+"_delFlag");
+			if (id.val() == ""){
+				$(obj).parent().parent().remove();
+			}else if(delFlag.val() == "0"){
+				delFlag.val("1");
+				$(obj).html("&divide;").attr("title", "撤销删除");
+				$(obj).parent().parent().addClass("error");
+			}else if(delFlag.val() == "1"){
+				delFlag.val("0");
+				$(obj).html("&times;").attr("title", "删除");
+				$(obj).parent().parent().removeClass("error");
+			}
+		}
+	</script>
+</head>
+<body class="bg-white">
+		<form:form id="inputForm" modelAttribute="basicInformation" action="${ctx}/filing/basicInformation/save" method="post" 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">
+						<form:input path="projectCode" htmlEscape="false"  class="form-control required"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>单体编码:</label></td>
+					<td class="width-35">
+						<form:input path="monomerCode" htmlEscape="false"  class="form-control required"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>项目名称:</label></td>
+					<td class="width-35">
+						<form:input path="entryName" htmlEscape="false"  class="form-control required"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">工程属性/重点程度:</label></td>
+					<td class="width-35">
+						<form:input path="emphasis" htmlEscape="false"  class="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">建设年度1:</label></td>
+					<td class="width-35">
+						<form:input path="constructionYear" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">建设年度1投资:</label></td>
+					<td class="width-35">
+						<form:input path="annualInvestment" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+		  		</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">建设年度2:</label></td>
+					<td class="width-35">
+						<form:input path="constructionYearTwo" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">建设年度2投资:</label></td>
+					<td class="width-35">
+						<form:input path="annualInvestmentTwo" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">建设年度3:</label></td>
+					<td class="width-35">
+						<form:input path="constructionYearThree" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">建设年度3投资:</label></td>
+					<td class="width-35">
+						<form:input path="annualInvestmentThree" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">建设年度4:</label></td>
+					<td class="width-35">
+						<form:input path="constructionYearFour" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">建设年度4投资:</label></td>
+					<td class="width-35">
+						<form:input path="annualInvestmentFour" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+		<div class="tabs-container">
+            <div class="tab-content">
+				<div id="tab-1" class="tab-pane fade in  active">
+			<a class="btn btn-white btn-sm" onclick="addRow('#basicChildList', basicInformationRowIdx, basicInformationTpl);basicInformationRowIdx = basicInformationRowIdx + 1;" title="新增">	<i class="glyphicon glyphicon-plus"></i> 新建</a>
+			<table class="table table-striped table-bordered table-condensed">
+				<thead>
+					<tr>
+						<th class="hide"></th>
+						<th>项目编码</th>
+						<th>单体编码</th>
+						<th>项目名称</th>
+						<th width="10">&nbsp;</th>
+					</tr>
+				</thead>
+				<tbody id="basicChildList">
+				</tbody>
+			</table>
+			<script type="text/template" id="basicInformationTpl">//<!--
+				<tr id="basicChildList{{idx}}">
+					<td class="hide">
+						<input id="basicChildList{{idx}}_id" name="basicChildList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+						<input id="basicChildList{{idx}}_delFlag" name="basicChildList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					
+					<td  class="max-width-250">
+						<input type='text'  name="basicChildList[{{idx}}].projectCode" class="form-control"  value="{{row.projectCode}}"/>
+					</td>
+
+					<td  class="max-width-250">
+						<input type='text'  name="basicChildList[{{idx}}].monomerCode" class="form-control"  value="{{row.monomerCode}}"/>
+					</td>
+					<td>
+						<input type='text'  name="basicChildList[{{idx}}].entryName" class="form-control"  value="{{row.entryName}}"/>
+					</td>
+					<td class="text-center" width="10">
+						{{#delBtn}}<span class="close" onclick="delRow(this, '#basicChildList{{idx}}')" title="删除">&times;</span>{{/delBtn}}
+					</td>
+				</tr>//-->
+			</script>
+			<script type="text/javascript">
+				var basicInformationRowIdx = 0, basicInformationTpl = $("#basicInformationTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+				$(document).ready(function() {
+					var data = ${fns:toJson(basicInformation.basicChildList)};
+					for (var i=0; i<data.length; i++){
+						addRow('#basicChildList', basicInformationRowIdx, basicInformationTpl, data[i]);
+						basicInformationRowIdx = basicInformationRowIdx + 1;
+					}
+				});
+			</script>
+			</div>
+		</div>
+		</div>
+		</form:form>
+</body>
+</html>

+ 556 - 0
src/main/webapp/webpage/modules/filing/basicInformation/basicInformationList.js

@@ -0,0 +1,556 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+$(document).ready(function() {
+	$('#basicTable').bootstrapTable({
+		  //请求方法
+               method: 'post',
+               //类型json
+               dataType: "json",
+               contentType: "application/x-www-form-urlencoded",
+               //显示检索按钮
+	       showSearch: true,
+               //显示刷新按钮
+               showRefresh: true,
+               //显示切换手机试图按钮
+               showToggle: true,
+               //显示 内容列下拉框
+    	       showColumns: true,
+    	       //显示到处按钮
+    	       showExport: true,
+    	       //显示切换分页按钮
+    	       showPaginationSwitch: true,
+    	       //显示详情按钮
+    	       detailView: true,
+    	       	//显示详细内容函数
+	           // detailFormatter: "detailFormatter",
+    	       //最低显示2行
+    	       minimumCountColumns: 2,
+               //是否显示行间隔色
+               striped: true,
+               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+               cache: false,
+               //是否显示分页(*)
+               pagination: true,
+                //排序方式
+               sortOrder: "asc",
+               //初始化加载第一页,默认第一页
+               pageNumber:1,
+               //每页的记录行数(*)
+               pageSize: 10,
+               //可供选择的每页的行数(*)
+               pageList: [10, 25, 50, 100],
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
+               url: "${ctx}/filing/basicInformation/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}/filing/basicInformation/delete?id="+row.id, function(data){
+                   	  		if(data.success){
+                   	  			$('#basicTable').bootstrapTable('refresh');
+                   	  			jp.success(data.msg);
+                   	  		}else{
+                   	  			jp.error(data.msg);
+                   	  		}
+                   	  	})
+
+                   	});
+
+                   }
+               },
+		/*		onPostBody:function(){
+					window.rowProps = undefined;
+					_table_rowspan("#basicTable" , 1);
+					_table_rowspan("#basicTable" , 2);
+					_table_rowspan("#basicTable" , 3);
+					_table_rowspan("#basicTable" , 4);
+					_table_rowspan("#basicTable" , 5);
+					return true;
+				},*/
+               onClickRow: function(row, $el){
+               },
+               	onShowSearch: function () {
+			$("#search-collapse").slideToggle();
+		},
+               columns: [{
+		        checkbox: true
+
+		    }
+			,{
+		        field: 'projectCode',
+		        title: '项目编码',
+			    width: '100px',
+		        sortable: true,
+		        sortName: 'projectCode'
+		        ,formatter:function(value, row , index){
+			   if(value == null || value ==""){
+				   value = "-";
+			   }
+			   <c:choose>
+				   <c:when test="${fns:hasPermission('test:filing:basicInformation:edit')}">
+				      return "<a href='javascript:edit(\""+row.id+"\")'>"+value+"</a>";
+			      </c:when>
+				  <c:when test="${fns:hasPermission('test:filing:basicInformation:view')}">
+				      return "<a href='javascript:view(\""+row.id+"\")'>"+value+"</a>";
+			      </c:when>
+				  <c:otherwise>
+				      return value;
+			      </c:otherwise>
+			   </c:choose>
+
+		        }
+		    }
+			,{
+		        field: 'monomerCode',
+		        title: '单体编码',
+		        sortable: true,
+			   width: '100px',
+		        sortName: 'monomerCode'
+
+		    }
+			,{
+		        field: 'entryName',
+		        title: '项目名称',
+					   width: '100px',
+		        sortable: true,
+		        sortName: 'entryName'
+
+		    }
+			,{
+		        field: 'constructionYear',
+		        title: '建设年度1',
+					   width: '100px',
+		        sortable: true,
+		        sortName: 'constructionYear'
+		    }
+			,{
+		        field: 'annualInvestment',
+		        title: '建设年度1</br>投资',
+					   width: '100px',
+		        sortable: true,
+		        sortName: 'annualInvestment'
+
+		    }
+				   ,{
+					   field: 'constructionYearTwo',
+					   title: '建设年度2',
+					   width: '100px',
+					   sortable: true,
+					   sortName: 'constructionYearTwo'
+				   }
+				   ,{
+					   field: 'annualInvestmentTwo',
+					   title: '建设年度2</br>投资',
+					   width: '100px',
+					   sortable: true,
+					   sortName: 'annualInvestmentTwo'
+
+				   }
+				   ,{
+					   field: 'constructionYearThree',
+					   title: '建设年度3',
+					   width: '100px',
+					   sortable: true,
+					   sortName: 'constructionYearThree'
+				   }
+				   ,{
+					   field: 'annualInvestmentThree',
+					   title: '建设年度3</br>投资',
+					   width: '100px',
+					   sortable: true,
+					   sortName: 'annualInvestmentThree'
+
+				   }
+				   ,{
+					   field: 'constructionYearFour',
+					   title: '建设年度4',
+					   width: '100px',
+					   sortable: true,
+					   sortName: 'constructionYearFour'
+				   }
+				   ,{
+					   field: 'annualInvestmentFour',
+					   title: '建设年度4</br>投资',
+					   width: '100px',
+					   sortable: true,
+					   sortName: 'annualInvestmentFour'
+
+				   }
+			,{
+		        field: 'emphasis',
+		        title: '工程属性/重点程度',
+			   width: '100px',
+		        sortable: true,
+		        sortName: 'emphasis'
+
+		    }
+		     ],
+		onExpandRow: function (index, row, $detail) {
+			initSubTable(index, row, $detail);
+		}
+		});
+
+	//初始化子表格(无线循环)
+	initSubTable = function (index, row, $detail) {
+		var parentid = row.projectCode;
+		var cur_table = $detail.html('<table></table>').find('table');
+		$(cur_table).bootstrapTable({
+			url: '${ctx}/filing/basicInformation/detail',
+			method: 'post',
+			//类型json
+			dataType: "json",
+			contentType: "application/x-www-form-urlencoded",
+			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;
+				searchParam.projectCode = parentid;
+				return searchParam;
+			},
+			striped: true, //是否显示行间隔色
+			pagination: false,//显示分页
+			sidePagination: "server",
+			pageNumber:1,
+			pageSize: 10,
+			pageList: [10, 25],
+			columns: [{
+				field: 'projectCode',
+				title: '项目编码',
+				width: '164px'
+				,formatter:function(value, row , index){
+					if(value == null || value ==""){
+						value = "-";
+					}
+				<c:choose>
+					<c:when test="${fns:hasPermission('test:filing:basicInformation:edit')}">
+					return "<a href='javascript:editChild(\""+row.id+"\")'>"+value+"</a>";
+				</c:when>
+				<c:otherwise>
+					return value;
+				</c:otherwise>
+					</c:choose>
+
+				}
+			}, {
+				field: 'monomerCode',
+				title: '单体编码',
+				width: '100px'
+			}, {
+				field: 'entryName',
+				title: '项目名称',
+				width: '100px',
+			},{
+					field: 'constructionYear',
+					title: '建设年度1',
+				width: '100px',
+				}
+				,{
+					field: 'annualInvestment',
+					title: '建设年度1</br>投资',
+					width: '100px',
+
+				}
+				,{
+					field: 'constructionYearTwo',
+					title: '建设年度2',
+					width: '100px',
+				}
+				,{
+					field: 'annualInvestmentTwo',
+					title: '建设年度2</br>投资',
+					width: '100px',
+				}
+				,{
+					field: 'constructionYearThree',
+					title: '建设年度3',
+					width: '100px',
+				}
+				,{
+					field: 'annualInvestmentThree',
+					title: '建设年度3</br>投资',
+					width: '100px',
+				}
+				,{
+					field: 'constructionYearFour',
+					title: '建设年度4',
+					width: '100px',
+				}
+				,{
+					field: 'annualInvestmentFour',
+					title: '建设年度4</br>投资',
+					width: '100px',
+				}
+				,{
+					field: 'emphasis',
+					title: '工程属性/</br>重点程度',
+					width: '100px',
+				}]
+		});
+	};
+
+		  
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+
+		 
+		  $('#basicTable').bootstrapTable("toggleView");
+		}
+	  
+	  $('#basicTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+                'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', ! $('#basicTable').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#basicTable').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){
+					  jp.downloadFile('${ctx}/filing/basicInformation/import/template');
+				  },
+			    btn2: function(index, layero){
+						var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+						iframeWin.contentWindow.importExcel('${ctx}/filing/basicInformation/import', function (data) {
+							if(data.success){
+								jp.success(data.msg);
+								refresh();
+							}else{
+								jp.error(data.msg);
+							}
+                            jp.close(index);
+                        });//调用保存事件
+                    return false;
+				  },
+				 
+				  btn3: function(index){ 
+					  jp.close(index);
+	    	       }
+			}); 
+		});
+	  $("#export").click(function(){//导出Excel文件
+			jp.downloadFile('${ctx}/filing/basicInformation/export');
+	  });
+	  $("#search").click("click", function() {// 绑定查询按扭
+		  $('#basicTable').bootstrapTable('refresh');
+		});
+
+	  $("#open").click(function () {
+		  $("#basicTable").bootstrapTable('expandAllRows');
+	  })
+
+		$("#close").click(function (row) {
+			$('#basicTable').bootstrapTable('refresh');
+		})
+
+	 $("#reset").click("click", function() {// 绑定查询按扭
+		  $("#searchForm  input").val("");
+		  $("#searchForm  select").val("");
+		   $("#searchForm  .select-item").html("");
+		  $('#basicTable').bootstrapTable('refresh');
+		});
+		
+				$('#beginInDate').datetimepicker({
+					 format: "YYYY-MM-DD HH:mm:ss"
+				});
+				$('#endInDate').datetimepicker({
+					 format: "YYYY-MM-DD HH:mm:ss"
+				});
+		
+	});
+		
+  function getIdSelections() {
+        return $.map($("#basicTable").bootstrapTable('getSelections'), function (row) {
+            return row.id
+        });
+    }
+  
+  function deleteAll(){
+
+		jp.confirm('确认要删除该基础信息记录吗?', function(){
+			jp.loading();  	
+			jp.get("${ctx}/filing/basicInformation/deleteAll?ids=" + getIdSelections(), function(data){
+         	  		if(data.success){
+         	  			$('#basicTable').bootstrapTable('refresh');
+         	  			jp.success(data.msg);
+         	  		}else{
+         	  			jp.error(data.msg);
+         	  		}
+         	  	})
+          	   
+		})
+  }
+  
+    //刷新列表
+  function refresh() {
+      $('#basicTable').bootstrapTable('refresh');
+  }
+  function add(){
+	  jp.openSaveDialog('新增基础信息', "${ctx}/filing/basicInformation/form",'1000px', '800px');
+  }
+  
+   function edit(id){//没有权限时,不显示确定按钮
+       if(id == undefined){
+	      id = getIdSelections();
+	}
+	jp.openSaveDialog('编辑基础信息', "${ctx}/filing/basicInformation/updateForm?id=" + id, '800px', '500px');
+  }
+
+function editChild(id){//没有权限时,不显示确定按钮
+	if(id == undefined){
+		id = getIdSelections();
+	}
+	jp.openSaveDialog('编辑基础信息', "${ctx}/filing/basicInformation/childForm?id=" + id, '800px', '500px');
+}
+
+  
+ function view(id){//没有权限时,不显示确定按钮
+      if(id == undefined){
+             id = getIdSelections();
+      }
+        jp.openViewDialog('查看基础信息', "${ctx}/filing/basicInformation/form?id=" + id, '800px', '500px');
+ }
+
+function _table_rowspan(_t_id, _t_colnum) {
+	//声明合并数组
+	var _t_merge_arr = [];
+	//声明起始行、合并行数
+	var _t_start_index = 0;
+	var _t_merge_number = 0;
+	//声明临时比较变量
+	var _t_compare_value = '';
+	//获取数据行数
+	var _t_rows = null;
+	if($(_t_id).length == 1){
+		_t_rows = $(_t_id + " tr td:nth-child(" + _t_colnum + ")");
+	} else if($(_t_id).length > 1){
+		_t_rows = $(_t_id).eq($(_t_id).length - 1).find("tr td:nth-child(" + _t_colnum + ")");
+	} else {
+		return;
+	}
+	_t_rows.each(function(i) {
+		var _t_temp_value = $(this).text();
+		if (i==0) {
+			//首行不比较
+			_t_compare_value = _t_temp_value;
+			_t_merge_number ++;
+		} else {
+			//对比本行数据和上行数据是否一样
+			if (_t_compare_value == _t_temp_value) {
+				_t_merge_number ++;
+				if(_t_merge_number > 1){
+					//声明合并行大于1的对象
+					var _t_merge_object = {index: _t_start_index,rowspan: _t_merge_number};
+					//取出合并数组最后一个对象
+					var _t_merge_arr_last_object = _t_merge_arr[_t_merge_arr.length - 1];
+					if (_t_merge_arr.length > 0) {
+						//根据起始下标看是否是同一合并
+						if (_t_merge_arr_last_object.index == _t_merge_object.index) {
+							_t_merge_arr[_t_merge_arr.length - 1] = _t_merge_object;
+						} else {
+							_t_merge_arr.push(_t_merge_object);
+						}
+					} else {
+						_t_merge_arr.push(_t_merge_object);
+					}
+				}
+			} else {
+				_t_merge_number = 1;
+				_t_start_index = i;
+				_t_compare_value = _t_temp_value;
+			}
+		}
+	});
+	for (var i = 0; i < _t_merge_arr.length; i++) {
+		var item = _t_merge_arr[i];
+		var rowsnum = item.rowspan;
+		for ( var j = 0; j < rowsnum-1; j++) {
+			$(_t_rows[item.index+j+1]).css('display','none');
+		}
+		$(_t_rows[item.index]).attr("rowSpan", item.rowspan);
+	}
+}
+  
+  
+  
+		   
+  function detailFormatter(index, row) {
+	  var htmltpl =  $("#testDataMain1ChildrenTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+	  var html = Mustache.render(htmltpl, {
+			idx:row.id
+		});
+	  $.get("${ctx}/filing/basicInformation/detail?id="+row.id, function(testDataMain1){
+    	var testDataMain1Child1RowIdx = 0, testDataMain1Child1Tpl = $("#testDataMain1Child1Tpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+		var data1 =  testDataMain1.basicChildList;
+		for (var i=0; i<data1.length; i++){
+			/*data1[i].dict = {};
+			data1[i].dict.isHave = jp.getDictLabel(${fns:toJson(fns:getDictList('yes_no'))}, data1[i].isHave, "-");*/
+			addRow('#testDataMain1Child-'+row.id+'-1-List', testDataMain1Child1RowIdx, testDataMain1Child1Tpl, data1[i]);
+			testDataMain1Child1RowIdx = testDataMain1Child1RowIdx + 1;
+		}
+      })
+        return html;
+    }
+  
+	function addRow(list, idx, tpl, row){
+		$(list).append(Mustache.render(tpl, {
+			idx: idx, delBtn: true, row: row
+		}));
+	}
+			
+</script>
+<script type="text/template" id="testDataMain1ChildrenTpl">//<!--
+	<div class="tabs-container">
+		<div class="tab-content">
+				 <div id="tab-{{idx}}-1" class="tab-pane fade in active">
+					<table class="ani table">
+						<thead>
+							<tr>
+								<th>项目编码</th>
+								<th>单体编码</th>
+								<th>项目名称</th>
+							</tr>
+						</thead>
+							<tbody id="testDataMain1Child-{{idx}}-1-List">
+							</tbody>
+					</table>
+		</div>
+		</div>//-->
+	</script>
+	<script type="text/template" id="testDataMain1Child1Tpl">//<!--
+				<tr>
+					<td>
+						{{row.projectCode}}
+					</td>
+					<td>
+						{{row.monomerCode}}
+					</td>
+					<td>
+						{{row.entryName}}
+					</td>
+				</tr>//-->
+	</script>
+

+ 92 - 0
src/main/webapp/webpage/modules/filing/basicInformation/basicInformationList.jsp

@@ -0,0 +1,92 @@
+<%@ 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="basicInformationList.js" %>
+    <style type="text/css">
+        .table {
+            table-layout: fixed;
+            word-break: break-all;
+            word-wrap: break-word;
+            text-align: center;
+        }
+
+        .table th, .table td {
+            text-align: center;
+            vertical-align: middle !important;
+        }
+    </style>
+</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="basicInformation"
+                               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="projectCode" htmlEscape="false" maxlength="257"  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">
+                <button id="open" class="btn btn-primary" >
+                    <i class="glyphicon glyphicon-list"></i> 全部展开
+                </button>
+                <button id="close" class="btn btn-primary">
+                    <i class="glyphicon glyphicon-minus"></i> 全部折叠
+                </button>
+                <shiro:hasPermission name="test:filing:basicInformation:add">
+                    <button id="add" class="btn btn-primary" onclick="add()">
+                        <i class="glyphicon glyphicon-plus"></i> 新建
+                    </button>
+                </shiro:hasPermission>
+                <shiro:hasPermission name="test:filing:basicInformation:edit">
+                    <button id="edit" class="btn btn-success" disabled onclick="edit()">
+                        <i class="glyphicon glyphicon-edit"></i> 修改
+                    </button>
+                </shiro:hasPermission>
+                <shiro:hasPermission name="test:filing:basicInformation:del">
+                    <button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
+                        <i class="glyphicon glyphicon-remove"></i> 删除
+                    </button>
+                </shiro:hasPermission>
+                <shiro:hasPermission name="test:filing:basicInformation:import">
+                    <button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
+                </shiro:hasPermission>
+                <shiro:hasPermission name="test:filing:basicInformation:export">
+                    <button id="export" class="btn btn-warning">
+                        <i class="fa fa-file-excel-o"></i> 导出
+                    </button>
+                </shiro:hasPermission>
+            </div>
+
+            <!-- 表格 -->
+            <table id="basicTable" data-toolbar="#toolbar"></table>
+        </div>
+    </div>
+</div>
+</body>
+</html>

+ 103 - 0
src/main/webapp/webpage/modules/filing/basicInformation/childForm.jsp

@@ -0,0 +1,103 @@
+<%@ 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() {
+	        $('#inDate').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}/filing/basicInformation/childSave",$('#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);
+                    }
+                })
+			}
+
+        }
+		function addRow(list, idx, tpl, row){
+			$(list).append(Mustache.render(tpl, {
+				idx: idx, delBtn: true, row: row
+			}));
+			$(list+idx).find("select").each(function(){
+				$(this).val($(this).attr("data-value"));
+			});
+			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+				var ss = $(this).attr("data-value").split(',');
+				for (var i=0; i<ss.length; i++){
+					if($(this).val() == ss[i]){
+						$(this).attr("checked","checked");
+					}
+				}
+			});
+			$(list+idx).find(".form_datetime").each(function(){
+				 $(this).datetimepicker({
+					 format: "YYYY-MM-DD HH:mm:ss"
+			    });
+			});
+		}
+		function delRow(obj, prefix){
+			var id = $(prefix+"_id");
+			var delFlag = $(prefix+"_delFlag");
+			if (id.val() == ""){
+				$(obj).parent().parent().remove();
+			}else if(delFlag.val() == "0"){
+				delFlag.val("1");
+				$(obj).html("&divide;").attr("title", "撤销删除");
+				$(obj).parent().parent().addClass("error");
+			}else if(delFlag.val() == "1"){
+				delFlag.val("0");
+				$(obj).html("&times;").attr("title", "删除");
+				$(obj).parent().parent().removeClass("error");
+			}
+		}
+	</script>
+</head>
+<body class="bg-white">
+		<form:form id="inputForm" modelAttribute="basicInformation" action="${ctx}/filing/basicInformation/childSave" method="post" 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">
+						<form:input path="projectCode" htmlEscape="false"  class="form-control required"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>单体编码:</label></td>
+					<td class="width-35">
+						<form:input path="monomerCode" htmlEscape="false"  class="form-control required"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>项目名称:</label></td>
+					<td class="width-35">
+						<form:input path="entryName" htmlEscape="false"  class="form-control required"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">工程属性/重点程度:</label></td>
+					<td class="width-35">
+						<form:input path="emphasis" htmlEscape="false"  class="form-control"/>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+		</div>
+		</form:form>
+</body>
+</html>

+ 194 - 0
src/main/webapp/webpage/modules/filing/basicInformation/updateForm.jsp

@@ -0,0 +1,194 @@
+<%@ 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() {
+	        $('#inDate').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}/filing/basicInformation/updateSave",$('#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);
+                    }
+                })
+			}
+
+        }
+		function addRow(list, idx, tpl, row){
+			$(list).append(Mustache.render(tpl, {
+				idx: idx, delBtn: true, row: row
+			}));
+			$(list+idx).find("select").each(function(){
+				$(this).val($(this).attr("data-value"));
+			});
+			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+				var ss = $(this).attr("data-value").split(',');
+				for (var i=0; i<ss.length; i++){
+					if($(this).val() == ss[i]){
+						$(this).attr("checked","checked");
+					}
+				}
+			});
+			$(list+idx).find(".form_datetime").each(function(){
+				 $(this).datetimepicker({
+					 format: "YYYY-MM-DD HH:mm:ss"
+			    });
+			});
+		}
+		function delRow(obj, prefix){
+			var id = $(prefix+"_id");
+			var delFlag = $(prefix+"_delFlag");
+			if (id.val() == ""){
+				$(obj).parent().parent().remove();
+			}else if(delFlag.val() == "0"){
+				delFlag.val("1");
+				$(obj).html("&divide;").attr("title", "撤销删除");
+				$(obj).parent().parent().addClass("error");
+			}else if(delFlag.val() == "1"){
+				delFlag.val("0");
+				$(obj).html("&times;").attr("title", "删除");
+				$(obj).parent().parent().removeClass("error");
+			}
+		}
+	</script>
+</head>
+<body class="bg-white">
+		<form:form id="inputForm" modelAttribute="basicInformation" action="${ctx}/filing/basicInformation/updateSave" method="post" 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">
+						<form:input path="projectCode" htmlEscape="false"  class="form-control required"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>单体编码:</label></td>
+					<td class="width-35">
+						<form:input path="monomerCode" htmlEscape="false"  class="form-control required"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>项目名称:</label></td>
+					<td class="width-35">
+						<form:input path="entryName" htmlEscape="false"  class="form-control required"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">工程属性/重点程度:</label></td>
+					<td class="width-35">
+						<form:input path="emphasis" htmlEscape="false"  class="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">建设年度1:</label></td>
+					<td class="width-35">
+						<form:input path="constructionYear" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">建设年度1投资:</label></td>
+					<td class="width-35">
+						<form:input path="annualInvestment" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+		  		</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">建设年度2:</label></td>
+					<td class="width-35">
+						<form:input path="constructionYearTwo" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">建设年度2投资:</label></td>
+					<td class="width-35">
+						<form:input path="annualInvestmentTwo" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">建设年度3:</label></td>
+					<td class="width-35">
+						<form:input path="constructionYearThree" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">建设年度3投资:</label></td>
+					<td class="width-35">
+						<form:input path="annualInvestmentThree" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">建设年度4:</label></td>
+					<td class="width-35">
+						<form:input path="constructionYearFour" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">建设年度4投资:</label></td>
+					<td class="width-35">
+						<form:input path="annualInvestmentFour" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+		<div class="tabs-container">
+            <div class="tab-content">
+				<div id="tab-1" class="tab-pane fade in  active">
+			<a class="btn btn-white btn-sm" onclick="addRow('#basicChildList', basicInformationRowIdx, basicInformationTpl);basicInformationRowIdx = basicInformationRowIdx + 1;" title="新增">	<i class="glyphicon glyphicon-plus"></i> 新建</a>
+			<table class="table table-striped table-bordered table-condensed">
+				<thead>
+					<tr>
+						<th class="hide"></th>
+						<th>项目编码</th>
+						<th>单体编码</th>
+						<th>项目名称</th>
+						<th width="10">&nbsp;</th>
+					</tr>
+				</thead>
+				<tbody id="basicChildList">
+				</tbody>
+			</table>
+			<script type="text/template" id="basicInformationTpl">//<!--
+				<tr id="basicChildList{{idx}}">
+					<td class="hide">
+						<input id="basicChildList{{idx}}_id" name="basicChildList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+						<input id="basicChildList{{idx}}_delFlag" name="basicChildList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					
+					<td  class="max-width-250">
+						<input type='text'  name="basicChildList[{{idx}}].projectCode" class="form-control"  value="{{row.projectCode}}"/>
+					</td>
+
+					<td  class="max-width-250">
+						<input type='text'  name="basicChildList[{{idx}}].monomerCode" class="form-control"  value="{{row.monomerCode}}"/>
+					</td>
+					<td>
+						<input type='text'  name="basicChildList[{{idx}}].entryName" class="form-control"  value="{{row.entryName}}"/>
+					</td>
+					<td class="text-center" width="10">
+						{{#delBtn}}<span class="close" onclick="delRow(this, '#basicChildList{{idx}}')" title="删除">&times;</span>{{/delBtn}}
+					</td>
+				</tr>//-->
+			</script>
+			<script type="text/javascript">
+				var basicInformationRowIdx = 0, basicInformationTpl = $("#basicInformationTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+				$(document).ready(function() {
+					var data = ${fns:toJson(basicInformation.basicChildList)};
+					for (var i=0; i<data.length; i++){
+						addRow('#basicChildList', basicInformationRowIdx, basicInformationTpl, data[i]);
+						basicInformationRowIdx = basicInformationRowIdx + 1;
+					}
+				});
+			</script>
+			</div>
+		</div>
+		</div>
+		</form:form>
+</body>
+</html>