Explorar o código

项目管理列表页展示完成,查询完成,导入欠供物资完成,导入综合信息完成,更加项目定义号查看下属物料情况完成

yue %!s(int64=5) %!d(string=hai) anos
pai
achega
7991abfc7b
Modificáronse 16 ficheiros con 1900 adicións e 0 borrados
  1. 97 0
      src/main/java/com/jeeplus/modules/test/information/entity/Information.java
  2. 25 0
      src/main/java/com/jeeplus/modules/test/information/mapper/InformationMapper.java
  3. 119 0
      src/main/java/com/jeeplus/modules/test/information/mapper/xml/InformationMapper.xml
  4. 174 0
      src/main/java/com/jeeplus/modules/test/information/material/entity/Material.java
  5. 19 0
      src/main/java/com/jeeplus/modules/test/information/material/mapper/MaterialMapper.java
  6. 139 0
      src/main/java/com/jeeplus/modules/test/information/material/mapper/xml/MaterialMapper.xml
  7. 52 0
      src/main/java/com/jeeplus/modules/test/information/material/service/MaterialService.java
  8. 138 0
      src/main/java/com/jeeplus/modules/test/information/material/web/MaterialController.java
  9. 74 0
      src/main/java/com/jeeplus/modules/test/information/service/InformationService.java
  10. 258 0
      src/main/java/com/jeeplus/modules/test/information/web/InformationController.java
  11. 64 0
      src/main/webapp/webpage/modules/test/information/informationForm.jsp
  12. 226 0
      src/main/webapp/webpage/modules/test/information/informationList.js
  13. 94 0
      src/main/webapp/webpage/modules/test/information/informationList.jsp
  14. 64 0
      src/main/webapp/webpage/modules/test/information/material/materialForm.jsp
  15. 263 0
      src/main/webapp/webpage/modules/test/information/material/materialList.js
  16. 94 0
      src/main/webapp/webpage/modules/test/information/material/materialList.jsp

+ 97 - 0
src/main/java/com/jeeplus/modules/test/information/entity/Information.java

@@ -0,0 +1,97 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.test.information.entity;
+
+import com.jeeplus.modules.sys.entity.User;
+import javax.validation.constraints.NotNull;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.Area;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.util.List;
+import com.google.common.collect.Lists;
+
+import com.jeeplus.core.persistence.DataEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild11;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild12;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild13;
+
+/**
+ * 项目信息Entity
+ * @author qiuyue
+ * @version 2019-09-04
+ */
+public class Information extends DataEntity<Information>  {
+	//项目定义号
+	private String projectId;
+	//项目名称
+	private String projectName;
+	//送审部门
+	private String department;
+	//审定日期
+	private Date approvalDate;
+	//二级单位
+	private String secondUnits;
+	//一级单位
+	private String firstUnits;
+
+	public Information(){
+		super();
+	}
+
+	public Information(String id){
+		super(id);
+	}
+
+	public String getProjectId() {
+		return projectId;
+	}
+
+	public void setProjectId(String projectId) {
+		this.projectId = projectId;
+	}
+
+	public String getProjectName() {
+		return projectName;
+	}
+
+	public void setProjectName(String projectName) {
+		this.projectName = projectName;
+	}
+
+	public String getDepartment() {
+		return department;
+	}
+
+	public void setDepartment(String department) {
+		this.department = department;
+	}
+
+	@JsonFormat(pattern = "yyyy-MM-dd")
+	public Date getApprovalDate() {
+		return approvalDate;
+	}
+
+	@JsonFormat(pattern = "yyyy-MM-dd")
+	public void setApprovalDate(Date approvalDate) {
+		this.approvalDate = approvalDate;
+	}
+
+	public String getSecondUnits() {
+		return secondUnits;
+	}
+
+	public void setSecondUnits(String secondUnits) {
+		this.secondUnits = secondUnits;
+	}
+
+	public String getFirstUnits() {
+		return firstUnits;
+	}
+
+	public void setFirstUnits(String firstUnits) {
+		this.firstUnits = firstUnits;
+	}
+}

+ 25 - 0
src/main/java/com/jeeplus/modules/test/information/mapper/InformationMapper.java

@@ -0,0 +1,25 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.test.information.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.test.information.entity.Information;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 项目管理MAPPER接口
+ * @author
+ * @version
+ */
+@MyBatisMapper
+public interface InformationMapper extends BaseMapper<Information> {
+    List<Information> findAllInformationList();
+
+    int updateInformationDate(Information information);
+
+    Information findInformationByID(Information information);
+}

+ 119 - 0
src/main/java/com/jeeplus/modules/test/information/mapper/xml/InformationMapper.xml

@@ -0,0 +1,119 @@
+<?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.test.information.mapper.InformationMapper">
+
+    <sql id="informationColumns">
+		project_Id,
+		project_Name,
+		department,
+		approvalDate,
+		second_Units,
+		first_Units
+	</sql>
+    <select id="findAllInformationList" resultType="com.jeeplus.modules.test.information.entity.Information">
+		select project_id,project_name from project_information
+	</select>
+
+    <update id="updateInformationDate" parameterType="com.jeeplus.modules.test.information.entity.Information">
+		update project_information set
+		approvalDate = #{approvalDate}
+		where project_Id = #{projectId} and project_Name = #{projectName}
+	</update>
+
+    <select id="findInformationByID" resultType="com.jeeplus.modules.test.information.entity.Information">
+		select * from project_information where project_Id = #{projectId} and project_Name = #{projectName}
+	</select>
+
+    <select id="findList" resultType="Information">
+        SELECT
+        <include refid="informationColumns"/>
+        FROM project_information
+        <where>
+            1 = 1
+            <if test="projectId != null and projectId != ''">
+                AND project_Id = #{projectId}
+            </if>
+            <if test="projectName != null and projectName != ''">
+                AND project_Name LIKE
+                <if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
+                <if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
+                <if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
+            </if>
+            <if test="department != null and department != ''">
+                AND department = #{department}
+            </if>
+            <if test="secondUnits != null and secondUnits != '' ">
+                AND second_Units #{secondUnits}
+            </if>
+            <if test="firstUnits != null and firstUnits != '' ">
+                AND first_Units #{firstUnits}
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                ORDER BY update_date DESC
+            </otherwise>
+        </choose>
+    </select>
+
+    <select id="findAllList" resultType="Information">
+        SELECT
+        <include refid="informationColumns"/>
+        FROM project_information a
+        <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 project_information(
+			id,
+			project_Id,
+			project_Name,
+			department,
+			approvalDate,
+			second_Units,
+			first_Units,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			del_flag
+		) VALUES (
+			#{id},
+			#{projectId},
+			#{projectName},
+			#{department},
+			#{approvalDate},
+			#{secondUnits},
+			#{firstUnits},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{delFlag}
+		)on duplicate key update
+			id = #{id},
+			project_Id = #{projectId},
+			project_Name = #{projectName},
+			department = #{department},
+			approvalDate = #{approvalDate},
+			second_Units = #{secondUnits},
+			first_Units = #{firstUnits},
+			create_by = #{createBy.id},
+			create_date = #{createDate},
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			del_flag = #{delFlag}
+	</insert>
+
+
+</mapper>

+ 174 - 0
src/main/java/com/jeeplus/modules/test/information/material/entity/Material.java

@@ -0,0 +1,174 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.test.information.material.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+/**
+ * 项目信息Entity
+ * @author qiuyue
+ * @version 2019-09-04
+ */
+public class Material extends DataEntity<Material>  {
+    //项目编号
+    private String projectId;
+    //物料编号
+    private String inforId;
+    //物料描述
+    private String materialName;
+    //出库金额
+    private Double outboundAmount;
+    //审定金额
+    private Double authorizedAmount;
+    //差额
+    private Double difference;
+    //出库数量
+    private Double outboundNumber;
+    //审定数量
+    private Double authorizedNumber;
+    //平均价单价
+    private Double price;
+    //单位
+    private String unit;
+    //物料小类
+    private String materialSmall;
+    //物料中类
+    private String materialMid;
+    //物料大类
+    private String materialBig;
+    //是否完成领退料
+    private String isBack;
+    //原因类型
+    private String status;
+    //备注说明
+    private String info;
+
+    public String getIsBack() {
+        return isBack;
+    }
+
+    public void setIsBack(String isBack) {
+        this.isBack = isBack;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getInforId() {
+        return inforId;
+    }
+
+    public void setInforId(String inforId) {
+        this.inforId = inforId;
+    }
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName;
+    }
+
+    public Double getOutboundAmount() {
+        return outboundAmount;
+    }
+
+    public void setOutboundAmount(Double outboundAmount) {
+        this.outboundAmount = outboundAmount;
+    }
+
+    public Double getAuthorizedAmount() {
+        return authorizedAmount;
+    }
+
+    public void setAuthorizedAmount(Double authorizedAmount) {
+        this.authorizedAmount = authorizedAmount;
+    }
+
+    public Double getDifference() {
+        return difference;
+    }
+
+    public void setDifference(Double difference) {
+        this.difference = difference;
+    }
+
+    public Double getOutboundNumber() {
+        return outboundNumber;
+    }
+
+    public void setOutboundNumber(Double outboundNumber) {
+        this.outboundNumber = outboundNumber;
+    }
+
+    public Double getAuthorizedNumber() {
+        return authorizedNumber;
+    }
+
+    public void setAuthorizedNumber(Double authorizedNumber) {
+        this.authorizedNumber = authorizedNumber;
+    }
+
+    public Double getPrice() {
+        return price;
+    }
+
+    public void setPrice(Double price) {
+        this.price = price;
+    }
+
+    public String getUnit() {
+        return unit;
+    }
+
+    public void setUnit(String unit) {
+        this.unit = unit;
+    }
+
+    public String getMaterialSmall() {
+        return materialSmall;
+    }
+
+    public void setMaterialSmall(String materialSmall) {
+        this.materialSmall = materialSmall;
+    }
+
+    public String getMaterialMid() {
+        return materialMid;
+    }
+
+    public void setMaterialMid(String materialMid) {
+        this.materialMid = materialMid;
+    }
+
+    public String getMaterialBig() {
+        return materialBig;
+    }
+
+    public void setMaterialBig(String materialBig) {
+        this.materialBig = materialBig;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getInfo() {
+        return info;
+    }
+
+    public void setInfo(String info) {
+        this.info = info;
+    }
+}

+ 19 - 0
src/main/java/com/jeeplus/modules/test/information/material/mapper/MaterialMapper.java

@@ -0,0 +1,19 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.test.information.material.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.test.information.entity.Information;
+import com.jeeplus.modules.test.information.material.entity.Material;
+
+/**
+ * 项目管理MAPPER接口
+ * @author
+ * @version
+ */
+@MyBatisMapper
+public interface MaterialMapper extends BaseMapper<Material> {
+    Material findByMaterialId(Material material);
+}

+ 139 - 0
src/main/java/com/jeeplus/modules/test/information/material/mapper/xml/MaterialMapper.xml

@@ -0,0 +1,139 @@
+<?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.test.information.material.mapper.MaterialMapper">
+    
+	<sql id="materialColumns">
+		project_id,
+		infor_id,
+		material_name,
+		outbound_amount,
+		authorized_amount,
+		difference,
+		outbound_number,
+		authorized_number,
+		price,
+		unit,
+		material_small,
+		material_mid,
+		material_big,
+		isBack,
+		status,
+		info
+	</sql>
+
+	<select id="findByMaterialId" resultType="com.jeeplus.modules.test.information.material.entity.Material">
+		SELECT
+		<include refid="materialColumns"/>
+		FROM material_information
+		where project_Id = #{projectId} and infor_id = #{inforId} and material_name = #{materialName}
+	</select>
+	
+	<select id="findList" resultType="Material" >
+		SELECT 
+			<include refid="materialColumns"/>
+		FROM material_information
+		<where>
+			1 = 1
+			<if test="projectId != null and projectId != ''">
+				AND project_id = #{projectId}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="Material" >
+		SELECT 
+			<include refid="materialColumns"/>
+		FROM material_information
+		<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 material_information(
+			id,
+			project_id,
+			infor_id,
+			material_name,
+			outbound_amount,
+			authorized_amount,
+			difference,
+			outbound_number,
+			authorized_number,
+			price,
+			unit,
+			material_small,
+			material_mid,
+			material_big,
+			isBack,
+			status,
+			info,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			del_flag
+		) VALUES (
+			#{id},
+			#{projectId},
+			#{inforId},
+			#{materialName},
+			#{outboundAmount},
+			#{authorizedAmount},
+			#{difference},
+			#{outboundNumber},
+			#{authorizedNumber},
+			#{price},
+			#{unit},
+			#{materialSmall},
+			#{materialMid},
+			#{materialBig},
+			#{isBack},
+			#{status},
+			#{info},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{delFlag}
+		)on duplicate key update
+			id = #{id},
+			project_Id = #{projectId},
+			infor_id = #{infor_id},
+			material_name = #{material_name},
+			outbound_amount = #{outbound_amount},
+			authorized_amount = #{authorized_amount},
+			difference = #{difference},
+			authorized_number = #{authorized_number},
+			price = #{price},
+			unit = #{unit},
+			material_small = #{material_small},
+			material_mid = #{material_mid},
+			isBack = #{isBack},
+			status = #{status},
+			info = #{info},
+			create_by = #{createBy.id},
+			create_date = #{createDate},
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			del_flag = #{delFlag}
+	</insert>
+
+	
+
+	
+
+</mapper>

+ 52 - 0
src/main/java/com/jeeplus/modules/test/information/material/service/MaterialService.java

@@ -0,0 +1,52 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.test.information.material.service;
+
+import java.util.List;
+
+import com.jeeplus.modules.test.information.entity.Information;
+import com.jeeplus.modules.test.information.mapper.InformationMapper;
+import com.jeeplus.modules.test.information.material.entity.Material;
+import com.jeeplus.modules.test.information.material.mapper.MaterialMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+
+/**
+ * 项目管理Service
+ * @author
+ * @version
+ */
+@Service
+@Transactional(readOnly = true)
+public class MaterialService extends CrudService<MaterialMapper, Material> {
+
+	@Autowired
+	private MaterialMapper materialMapper;
+
+	public Material get(String id) {
+		Material material = super.get(id);
+		return material;
+	}
+
+	public List<Material> findList(Material material) {
+		return super.findList(material);
+	}
+
+	public Page<Material> findPage(Page<Material> page, Material entity) {
+		return super.findPage(page, entity);
+	}
+
+	@Transactional(readOnly = false)
+	public void save(Material entity) {
+		super.save(entity);
+	}
+
+	public Material findByMaterialId(Material material){
+		return materialMapper.findByMaterialId(material);
+	}
+}

+ 138 - 0
src/main/java/com/jeeplus/modules/test/information/material/web/MaterialController.java

@@ -0,0 +1,138 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.test.information.material.web;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+
+import com.jeeplus.modules.test.information.entity.Information;
+import com.jeeplus.modules.test.information.material.entity.Material;
+import com.jeeplus.modules.test.information.material.service.MaterialService;
+import com.jeeplus.modules.test.information.service.InformationService;
+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 com.google.common.collect.Lists;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataMain1;
+
+/**
+ * 物料详情Controller
+ * @author
+ * @version
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/test/information/material")
+public class MaterialController extends BaseController {
+
+	@Autowired
+	private MaterialService materialService;
+	
+	@ModelAttribute
+	public Material get(@RequestParam(required=false) String id) {
+		Material entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = materialService.get(id);
+		}
+		if (entity == null){
+			entity = new Material();
+		}
+		return entity;
+	}
+	
+	/**
+	 * 物料详情列表页
+	 */
+	//@RequiresPermissions("test:information:information:list")
+	@RequestMapping(value = {"list", ""})
+	public String list(Material material, Model model) {
+		model.addAttribute("materialList", material);
+		return "modules/test/information/material/materialList";
+	}
+
+
+	/**
+	 * 物料详情列表数据
+	 */
+	@ResponseBody
+	//@RequiresPermissions("test:onetomany:dialog:testDataMain1:list")
+	@RequestMapping(value = "data")
+	public Map<String, Object> data(Material material, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<Material> page = materialService.findPage(new Page<Material>(request, response), material);
+		return getBootstrapData(page);
+	}
+
+	@RequestMapping(value = "form")
+	public String form(Information information, Model model) {
+		model.addAttribute("Information", information);
+		return "modules/test/information/material/materialForm";
+	}
+/*
+	*/
+/**
+	 * 导出excel文件
+	 *//*
+
+	@ResponseBody
+	//@RequiresPermissions("test:onetomany:dialog:testDataMain1:export")
+    @RequestMapping(value = "export")
+    public AjaxJson exportFile(Material material, HttpServletRequest request, HttpServletResponse response) {
+		AjaxJson j = new AjaxJson();
+		try {
+            String fileName = "票务代理"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<Material> page = materialService.findPage(new Page<Material>(request, response, -1), material);
+    		new ExportExcel("票务代理", TestDataMain1.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
+	@RequiresPermissions("test:onetomany:dialog:testDataMain1:import")
+    @RequestMapping(value = "import/template")
+     public AjaxJson importFileTemplate(HttpServletResponse response) {
+		AjaxJson j = new AjaxJson();
+		try {
+            String fileName = "票务代理数据导入模板.xlsx";
+    		List<TestDataMain1> list = Lists.newArrayList(); 
+    		new ExportExcel("票务代理数据", TestDataMain1.class, 1).setDataList(list).write(response, fileName).dispose();
+    		return null;
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg( "导入模板下载失败!失败信息:"+e.getMessage());
+		}
+		return j;
+    }*/
+	
+
+}

+ 74 - 0
src/main/java/com/jeeplus/modules/test/information/service/InformationService.java

@@ -0,0 +1,74 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.test.information.service;
+
+import java.util.List;
+
+import com.jeeplus.modules.test.information.entity.Information;
+import com.jeeplus.modules.test.information.mapper.InformationMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataMain1;
+import com.jeeplus.modules.test.onetomany.dialog.mapper.TestDataMain1Mapper;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild11;
+import com.jeeplus.modules.test.onetomany.dialog.mapper.TestDataChild11Mapper;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild12;
+import com.jeeplus.modules.test.onetomany.dialog.mapper.TestDataChild12Mapper;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataChild13;
+import com.jeeplus.modules.test.onetomany.dialog.mapper.TestDataChild13Mapper;
+
+import javax.annotation.Resource;
+
+/**
+ * 项目管理Service
+ * @author
+ * @version
+ */
+@Service
+@Transactional(readOnly = true)
+public class InformationService extends CrudService<InformationMapper, Information> {
+
+	@Autowired
+	private InformationMapper informationMapper;
+
+	public Information get(String id) {
+		Information information = super.get(id);
+		return information;
+	}
+
+	public List<Information> findList(Information information) {
+		return super.findList(information);
+	}
+
+	public List<Information> findAllList(Information entity) {
+		return super.findAllList(entity);
+	}
+
+	public Page<Information> findPage(Page<Information> page, Information entity) {
+		return super.findPage(page, entity);
+	}
+
+	@Transactional(readOnly = false)
+	public void save(Information entity) {
+		super.save(entity);
+	}
+
+	public  List<Information> findAllInformationList() {
+		return informationMapper.findAllInformationList();
+	}
+
+	@Transactional(readOnly = false)
+	public int updateInformationDate(Information information) {
+		return informationMapper.updateInformationDate(information);
+	}
+
+	public Information findInformationByID(Information information) {
+		return informationMapper.findInformationByID(information);
+	}
+}

+ 258 - 0
src/main/java/com/jeeplus/modules/test/information/web/InformationController.java

@@ -0,0 +1,258 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.test.information.web;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+
+import com.jeeplus.modules.test.information.entity.Information;
+import com.jeeplus.modules.test.information.material.entity.Material;
+import com.jeeplus.modules.test.information.material.service.MaterialService;
+import com.jeeplus.modules.test.information.service.InformationService;
+import com.sun.tools.javac.util.Convert;
+import io.swagger.models.auth.In;
+import net.sourceforge.jtds.jdbc.DateTime;
+import org.apache.poi.ss.usermodel.Row;
+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.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.modules.test.onetomany.dialog.entity.TestDataMain1;
+import com.jeeplus.modules.test.onetomany.dialog.service.TestDataMain1Service;
+
+/**
+ * 项目管理列表Controller
+ * @author
+ * @version
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/test/information/information")
+public class InformationController extends BaseController {
+
+	@Autowired
+	private InformationService informationService;
+
+	@Autowired
+	private MaterialService materialService;
+	
+	@ModelAttribute
+	public Information get(@RequestParam(required=false) String id) {
+		Information entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = informationService.get(id);
+		}
+		if (entity == null){
+			entity = new Information();
+		}
+		return entity;
+	}
+	
+	/**
+	 * 项目管理列表页
+	 */
+	//@RequiresPermissions("test:information:information:list")
+	@RequestMapping(value = {"list", ""})
+	public String list(Information information, Model model) {
+		model.addAttribute("informationList", information);
+		return "modules/test/information/informationList";
+	}
+	
+		/**
+	 * 项目管理列表数据
+	 */
+	@ResponseBody
+	//@RequiresPermissions("test:onetomany:dialog:testDataMain1:list")
+	@RequestMapping(value = "data")
+	public Map<String, Object> data(Information information, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<Information> page = informationService.findPage(new Page<Information>(request, response), information);
+		return getBootstrapData(page);
+	}
+
+	@RequestMapping(value = "form")
+	public String form(Information information, Model model) {
+		model.addAttribute("Information", information);
+		return "modules/test/information/informationForm";
+	}
+
+
+
+
+	/**
+	 * 导入欠供物资Excel数据
+	 */
+	//@RequiresPermissions("test:onetomany:dialog:information:import")
+	@ResponseBody
+    @RequestMapping(value = "import")
+   	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
+		AjaxJson j = new AjaxJson();
+		try {
+			int successNum = 0;
+			int failureNum = 0;
+			int inforNum = 0;
+			StringBuilder failureMsg = new StringBuilder();
+			ImportExcel ei = new ImportExcel(file, 1, 0);
+//			List<Information> list = ei.getDataList(Information.class);
+			int lastDataRowNum = ei.getLastDataRowNum();
+			for (int i = 1; i < lastDataRowNum; i++) {
+				try {
+					Row row = ei.getRow(i);
+					Object projectId = ei.getCellValue(row, 1);
+					Object projectName = ei.getCellValue(row, 2);
+					Object inforId = ei.getCellValue(row, 3);
+					Object materialName = ei.getCellValue(row, 4);
+					Object outboundAmount = ei.getCellValue(row, 5);
+					Object authorizedAmount = ei.getCellValue(row, 6);
+					Object difference = ei.getCellValue(row, 7);
+					Object outboundNumber = ei.getCellValue(row, 8);
+					Object authorizedNumber = ei.getCellValue(row, 9);
+					Object price = ei.getCellValue(row, 11);
+					Object unit = ei.getCellValue(row, 12);
+					Object materialSmall = ei.getCellValue(row, 13);
+					Object materialMid = ei.getCellValue(row, 14);
+					Object materialBig = ei.getCellValue(row, 15);
+					Object Flag = ei.getCellValue(row, 10);
+					Object department = ei.getCellValue(row, 16);
+					Object secondUnits = ei.getCellValue(row, 17);
+					Object firstUnits = ei.getCellValue(row, 18);
+					String isBack = "";
+					if (Flag.equals("0")) {
+						isBack = "是";
+					} else {
+						isBack = "否";
+					}
+
+					if (outboundAmount.equals("")) {
+						outboundAmount = "0.0";
+					}
+					if (authorizedAmount.equals("")) {
+						authorizedAmount = "0.0";
+					}
+					if (difference.equals("")) {
+						difference = "0.0";
+					}
+					if (outboundNumber.equals("")) {
+						outboundNumber = "0.0";
+					}
+					if (authorizedNumber.equals("")) {
+						authorizedNumber = "0.0";
+					}
+					if (price.equals("")) {
+						price = "0.0";
+					}
+
+
+					Material material = new Material();
+					material.setInforId(inforId.toString());
+					material.setProjectId(projectId.toString());
+					material.setMaterialName(materialName.toString());
+					material.setOutboundAmount(Double.parseDouble(outboundAmount.toString()));
+					material.setAuthorizedAmount(Double.parseDouble(authorizedAmount.toString()));;
+					material.setDifference(Double.parseDouble(difference.toString()));
+					material.setOutboundNumber(Double.parseDouble(outboundNumber.toString()));
+					material.setAuthorizedNumber(Double.parseDouble(authorizedNumber.toString()));
+					material.setPrice(Double.parseDouble(price.toString()));
+					material.setUnit(unit.toString());
+					material.setMaterialSmall(materialSmall.toString());
+					material.setMaterialMid(materialMid.toString());
+					material.setMaterialBig(materialBig.toString());
+					material.setIsBack(isBack);
+					materialService.save(material);
+					inforNum++;
+						Information information2 = new Information();
+						information2.setProjectId(projectId.toString());
+						information2.setProjectName(projectName.toString());
+						information2.setDepartment(department.toString());
+						information2.setSecondUnits(secondUnits.toString());
+						information2.setFirstUnits(firstUnits.toString());
+						informationService.save(information2);
+						successNum++;
+				} catch(ConstraintViolationException ex){
+					failureNum++;
+				}catch (Exception ex) {
+					failureNum++;
+				}
+			}
+			if (failureNum>0){
+				failureMsg.insert(0, ",失败 "+failureNum+" 项目管理记录。");
+			}
+			j.setMsg( "已成功导入 "+successNum+" 项目管理记录"+failureMsg);
+			j.setMsg( "已成功导入 "+inforNum+" 项目管理记录"+failureMsg);
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("导入项目管理信息失败!失败信息:"+e.getMessage());
+		}
+		return j;
+    }
+
+	/**
+	 *	导入综合信息Excel数据
+	 * */
+	@ResponseBody
+	@RequestMapping(value = "importCom")
+	public AjaxJson importFileCom(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
+		AjaxJson j = new AjaxJson();
+		try {
+			int successNum = 0;
+			int failureNum = 0;
+			StringBuilder failureMsg = new StringBuilder();
+			ImportExcel ei = new ImportExcel(file, 1, 0);
+			int lastDataRowNum = ei.getLastDataRowNum();
+			for (int i = 2; i < lastDataRowNum; i++) {
+				try {
+					Row row = ei.getRow(i);
+					Object projectId = ei.getCellValue(row, 1);
+					Object projectName = ei.getCellValue(row, 2);
+					Object appDate = ei.getCellValue(row, 44);
+						Information information2 = new Information();
+						information2.setProjectId(projectId.toString());
+						information2.setProjectName(projectName.toString());
+						SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+						Date parse = simpleDateFormat.parse(appDate.toString());
+						simpleDateFormat.format(parse);
+						information2.setApprovalDate(parse);
+						informationService.updateInformationDate(information2);
+						successNum++;
+				} catch(ConstraintViolationException ex){
+					failureNum++;
+				}catch (Exception ex) {
+					failureNum++;
+				}
+			}
+			if (failureNum>0){
+				failureMsg.insert(0, ",失败 "+failureNum+" 审定日期记录。");
+			}
+			j.setMsg( "已成功导入 "+successNum+" 审定日期记录"+failureMsg);
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("导入项审定日期失败!失败信息:"+e.getMessage());
+		}
+		return j;
+	}
+
+
+
+}

+ 64 - 0
src/main/webapp/webpage/modules/test/information/informationForm.jsp

@@ -0,0 +1,64 @@
+<%@ 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"
+		    });
+		});
+	</script>
+</head>
+<body class="bg-white">
+		<form:form id="inputForm" modelAttribute="information" 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="projectId" htmlEscape="false" cssClass="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>项目名称:</label></td>
+					<td class="width-35">
+						<form:input path="projectName" htmlEscape="false" cssClass="form-control"/>
+					</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="department" htmlEscape="false" cssClass="form-control"/>
+					</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="secondUnits" htmlEscape="false" cssClass="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>一级单位:</label></td>
+					<td class="width-35">
+						<form:input path="firstUnits" htmlEscape="false" cssClass="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">操作</label></td>
+					<td class="width-35">
+						<input type="button" value="查看" width="100" height="20">
+<%--						<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:edit">
+							<button id="view" class="btn btn-default" disabled onclick="view()">
+								<i class="fa fa-search-plus"></i> 查看
+							</button>
+						</shiro:hasPermission>--%>
+					</td>
+					<td class="width-15 active"></td>
+		   			<td class="width-35" ></td>
+		  		</tr>
+		 	</tbody>
+		</table>
+		</form:form>
+</body>
+</html>

+ 226 - 0
src/main/webapp/webpage/modules/test/information/informationList.js

@@ -0,0 +1,226 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+
+$(document).ready(function() {
+
+	window.operateEvents = {
+		'click #TableView': function (e, value, row, index) {
+			jp.openViewDialog('查看', "${ctx}/test/information/material?projectId="+row.projectId, '1000px', '800px');
+		}
+	};
+
+	$('#informationTable').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: 10,
+               //可供选择的每页的行数(*)
+               pageList: [10, 25, 50, 100],
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
+               url: "${ctx}/test/information/information/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',
+               onClickRow: function(row, $el){
+               },
+               	onShowSearch: function () {
+			$("#search-collapse").slideToggle();
+		},
+               columns: [{
+		        checkbox: true
+		    }
+			,{
+		        field: 'projectId',
+		        title: '项目定义号',
+		        sortable: true,
+		        sortName: 'projectId'
+		    }
+			,{
+		        field: 'projectName',
+		        title: '项目名称',
+		        sortable: true,
+		        sortName: 'projectName'
+		    }
+			,{
+		        field: 'department',
+		        title: '送审部门',
+		        sortable: true,
+		        sortName: 'department'
+		    }
+			,{
+		        field: 'approvalDate',
+		        title: '审定日期',
+		        sortable: true,
+		        sortName: 'approvalDate'
+		    }
+			,{
+		        field: 'secondUnits',
+		        title: '二级单位',
+		        sortable: true,
+		        sortName: 'secondUnits'
+		    }
+			,{
+		        field: 'firstUnits',
+		        title: '一级单位',
+		        sortable: true,
+		        sortName: 'firstUnits'
+		    },{
+					   field: 'operate',
+					   title: '操作',
+					   width: '80px',
+					   events: operateEvents,
+					   formatter: operateFormatter
+				   }
+		     ]
+		});
+
+	function operateFormatter(value, row, index) {
+		return [
+			'<input id="TableView" type="button" value="查看" class="btn btn-default">',
+		].join('');
+	}
+
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+		  $('#informationTable').bootstrapTable("toggleView");
+		}
+
+	  $('#informationTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+                'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', ! $('#informationTable').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#informationTable').bootstrapTable('getSelections').length!=1);
+        });
+
+	  	$("#btnInformation").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}/test/information/information/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);
+				}
+			})
+		})
+
+	$("#btnCom").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}/test/information/information/importCom', 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);
+			}
+		})
+	})
+
+	  $("#search").click("click", function() {// 绑定查询按扭
+		  $('#informationTable').bootstrapTable('refresh');
+		});
+
+	 $("#reset").click("click", function() {// 绑定查询按扭
+		  $("#searchForm  input").val("");
+		  $("#searchForm  select").val("");
+		  $('#informationTable').bootstrapTable('refresh');
+		});
+	});
+
+  function getIdSelections() {
+        return $.map($("#informationTable").bootstrapTable('getSelections'), function (row) {
+            return row.id
+        });
+    }
+
+
+
+    //刷新列表
+  function refresh() {
+      $('#informationTable').bootstrapTable('refresh');
+  }
+
+
+ function view(id){//没有权限时,不显示确定按钮
+      if(id == undefined){
+             id = getIdSelections();
+      }
+        jp.openViewDialog('查看票务代理', "${ctx}/test/information/information/form?id=" + id, '800px', '500px');
+ }
+
+
+	function addRow(list, idx, tpl, row){
+		$(list).append(Mustache.render(tpl, {
+			idx: idx, delBtn: true, row: row
+		}));
+	}
+
+</script>

+ 94 - 0
src/main/webapp/webpage/modules/test/information/informationList.jsp

@@ -0,0 +1,94 @@
+<%@ 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="informationList.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="information" 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="projectId" 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="projectName" htmlEscape="false" maxlength="100"  class=" form-control"/>
+			</div>
+			 <div class="col-xs-12 col-sm-6 col-md-4">
+				<div class="form-group">
+					<label class="label-item single-overflow pull-left" title="送审部门:">&nbsp;送审部门:</label>
+					<form:input path="department" htmlEscape="false" maxlength="100"  class=" form-control"/>
+				</div>
+			</div>
+			 <div class="col-xs-12 col-sm-6 col-md-4">
+				 <div class="form-group">
+					<label class="label-item single-overflow pull-left" title="审定日期:">&nbsp;一级单位:</label>
+					 <form:input path="firstUnits" htmlEscape="false" maxlength="100"  class=" form-control"/>
+				</div>
+			</div>
+				<div class="col-xs-12 col-sm-6 col-md-4">
+					<div class="form-group">
+						<label class="label-item single-overflow pull-left" title="审定日期:">&nbsp;二级单位:</label>
+						<form:input path="secondUnits" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+				</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="test:onetomany:dialog:testDataMain1:add">
+				<button id="btnInformation" class="btn btn-info">
+					<i class="fa fa-folder-open-o"></i> 导入欠供物资
+				</button>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:add">
+			    <button id="btnCom" class="btn btn-info">
+	            	<i class="fa fa-folder-open-o"></i> 导入综合信息表
+	        	</button>
+			</shiro:hasPermission>
+		    </div>
+		
+	<!-- 表格 -->
+	<table id="informationTable"   data-toolbar="#toolbar"></table>
+
+    <!-- context menu -->
+    <ul id="context-menu" class="dropdown-menu">
+    	<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:view">
+        <li data-item="view"><a>查看</a></li>
+        </shiro:hasPermission>
+    	<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:edit">
+        <li data-item="edit"><a>编辑</a></li>
+        </shiro:hasPermission>
+        <shiro:hasPermission name="test:onetomany:dialog:testDataMain1:del">
+        <li data-item="delete"><a>删除</a></li>
+        </shiro:hasPermission>
+        <li data-item="action1"><a>取消</a></li>
+    </ul>  
+	</div>
+	</div>
+	</div>
+</body>
+</html>

+ 64 - 0
src/main/webapp/webpage/modules/test/information/material/materialForm.jsp

@@ -0,0 +1,64 @@
+<%@ 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"
+		    });
+		});
+	</script>
+</head>
+<body class="bg-white">
+		<form:form id="inputForm" modelAttribute="material" 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>1:</label></td>
+					<td class="width-35">
+						<form:input path="projectId" htmlEscape="false" cssClass="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>2:</label></td>
+					<td class="width-35">
+						<form:input path="projectName" htmlEscape="false" cssClass="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>3:</label></td>
+					<td class="width-35">
+						<form:input path="department" htmlEscape="false" cssClass="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>4:</label></td>
+					<td class="width-35">
+						<form:input path="secondUnits" htmlEscape="false" cssClass="form-control"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>5:</label></td>
+					<td class="width-35">
+						<form:input path="firstUnits" htmlEscape="false" cssClass="form-control"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">操作</label></td>
+					<td class="width-35">
+						<input type="button" value="查看" width="100" height="20">
+<%--						<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:edit">
+							<button id="view" class="btn btn-default" disabled onclick="view()">
+								<i class="fa fa-search-plus"></i> 查看
+							</button>
+						</shiro:hasPermission>--%>
+					</td>
+					<td class="width-15 active"></td>
+		   			<td class="width-35" ></td>
+		  		</tr>
+		 	</tbody>
+		</table>
+		</form:form>
+</body>
+</html>

+ 263 - 0
src/main/webapp/webpage/modules/test/information/material/materialList.js

@@ -0,0 +1,263 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+
+$(document).ready(function() {
+
+	window.operateEvents = {
+		'click #TableView': function (e, value, row, index) {
+			jp.openViewDialog('查看票务代理', "${ctx}/test/information/Material/list?projectId=" + row.projectId, '1000px', '800px');
+		}
+	};
+
+	$('#informationTable').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: 10,
+               //可供选择的每页的行数(*)
+               pageList: [10, 25, 50, 100],
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
+               url: "${ctx}/test/information/material/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',
+               onClickRow: function(row, $el){
+               },
+               	onShowSearch: function () {
+			$("#search-collapse").slideToggle();
+		},
+               columns: [{
+		        field: 'inforId',
+		        title: '物料编号',
+		        sortable: true,
+		        sortName: 'inforId'
+		    }
+			,{
+		        field: 'materialName',
+		        title: '物料描述',
+		        sortable: true,
+		        sortName: 'materialName'
+		    }
+			,{
+		        field: 'outboundAmount',
+		        title: '出库金额',
+		        sortable: true,
+		        sortName: 'outboundAmount'
+		    }
+			,{
+		        field: 'authorizedAmount',
+		        title: '审定金额(元)',
+		        sortable: true,
+		        sortName: 'authorizedAmount'
+		    }
+			,{
+		        field: 'difference',
+		        title: '差额',
+		        sortable: true,
+		        sortName: 'difference'
+		    }
+			,{
+		        field: 'outboundNumber',
+		        title: '出库数量',
+		        sortable: true,
+		        sortName: 'outboundNumber'
+		    },{
+			   field: 'authorizedNumber',
+			   title: '审定数量',
+			   sortable: true,
+			   sortName: 'authorizedNumber'
+		   },{
+			   field: 'price',
+			   title: '平均价单价',
+			   sortable: true,
+			   sortName: 'price'
+		   },{
+			   field: 'unit',
+			   title: '单位',
+			   sortable: true,
+			   sortName: 'unit'
+		   },{
+			   field: 'materialSmall',
+			   title: '物料小类',
+			   sortable: true,
+			   sortName: 'materialSmall'
+		   },{
+			   field: 'materialMid',
+			   title: '物料中类',
+			   sortable: true,
+			   sortName: 'materialMid'
+		   },{
+			   field: 'materialBig',
+			   title: '物料大类',
+			   sortable: true,
+			   sortName: 'materialBig'
+		   },{
+			   field: 'isBack',
+			   title: '是否完成领退料',
+			   sortable: true,
+			   sortName: 'isBack'
+		   },{
+			   field: 'status',
+			   title: '原因类型',
+			   sortable: true,
+			   sortName: 'status'
+		   },{
+			   field: 'operate',
+			   title: '操作',
+			   width: '80px',
+			   events: operateEvents,
+			   formatter: operateFormatter
+		   }
+		     ]
+		});
+
+	function operateFormatter(value, row, index) {
+		return [
+			'<input id="TableView" type="button" value="调整" class="btn btn-default">',
+		].join('');
+	}
+
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+		  $('#informationTable').bootstrapTable("toggleView");
+		}
+
+	  $('#informationTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+                'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', ! $('#informationTable').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#informationTable').bootstrapTable('getSelections').length!=1);
+        });
+
+	  	$("#btnInformation").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}/test/information/information/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);
+				}
+			})
+		})
+
+	$("#btnCom").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}/test/information/information/importCom', 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);
+			}
+		})
+	})
+
+	  $("#search").click("click", function() {// 绑定查询按扭
+		  $('#informationTable').bootstrapTable('refresh');
+		});
+
+	 $("#reset").click("click", function() {// 绑定查询按扭
+		  $("#searchForm  input").val("");
+		  $("#searchForm  select").val("");
+		  $('#informationTable').bootstrapTable('refresh');
+		});
+	});
+
+  function getIdSelections() {
+        return $.map($("#informationTable").bootstrapTable('getSelections'), function (row) {
+            return row.id
+        });
+    }
+
+
+
+    //刷新列表
+  function refresh() {
+      $('#informationTable').bootstrapTable('refresh');
+  }
+
+
+ function view(id){//没有权限时,不显示确定按钮
+      if(id == undefined){
+             id = getIdSelections();
+      }
+        jp.openViewDialog('查看票务代理', "${ctx}/test/information/information/form?id=" + id, '800px', '500px');
+ }
+
+
+	function addRow(list, idx, tpl, row){
+		$(list).append(Mustache.render(tpl, {
+			idx: idx, delBtn: true, row: row
+		}));
+	}
+
+</script>

+ 94 - 0
src/main/webapp/webpage/modules/test/information/material/materialList.jsp

@@ -0,0 +1,94 @@
+<%@ 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="materialList.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="material" 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="projectId" 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="projectName" htmlEscape="false" maxlength="100"  class=" form-control"/>
+			</div>
+			 <div class="col-xs-12 col-sm-6 col-md-4">
+				<div class="form-group">
+					<label class="label-item single-overflow pull-left" title="送审部门:">&nbsp;送审部门:</label>
+					<form:input path="department" htmlEscape="false" maxlength="100"  class=" form-control"/>
+				</div>
+			</div>
+			 <div class="col-xs-12 col-sm-6 col-md-4">
+				 <div class="form-group">
+					<label class="label-item single-overflow pull-left" title="审定日期:">&nbsp;一级单位:</label>
+					 <form:input path="firstUnits" htmlEscape="false" maxlength="100"  class=" form-control"/>
+				</div>
+			</div>
+				<div class="col-xs-12 col-sm-6 col-md-4">
+					<div class="form-group">
+						<label class="label-item single-overflow pull-left" title="审定日期:">&nbsp;二级单位:</label>
+						<form:input path="secondUnits" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+				</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="test:onetomany:dialog:materialList:add">
+				<button id="btnInformation" class="btn btn-info">
+					<i class="fa fa-folder-open-o"></i> 清单导出
+				</button>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="test:onetomany:dialog:materialList:add">
+			    <button id="" class="btn btn-info">
+	            	<i class="fa fa-folder-open-o"></i> 导出说明word
+	        	</button>
+			</shiro:hasPermission>
+		    </div>
+		
+	<!-- 表格 -->
+	<table id="informationTable"   data-toolbar="#toolbar"></table>
+
+    <!-- context menu -->
+    <ul id="context-menu" class="dropdown-menu">
+    	<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:view">
+        <li data-item="view"><a>查看</a></li>
+        </shiro:hasPermission>
+    	<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:edit">
+        <li data-item="edit"><a>编辑</a></li>
+        </shiro:hasPermission>
+        <shiro:hasPermission name="test:onetomany:dialog:testDataMain1:del">
+        <li data-item="delete"><a>删除</a></li>
+        </shiro:hasPermission>
+        <li data-item="action1"><a>取消</a></li>
+    </ul>  
+	</div>
+	</div>
+	</div>
+</body>
+</html>