浏览代码

项目概预算信息管理
项目甲供材管理
费用检查
财务检查

[user3] 4 年之前
父节点
当前提交
ff506717bd
共有 20 个文件被更改,包括 2493 次插入83 次删除
  1. 160 0
      src/main/java/com/jeeplus/modules/sg/financial/settlement/entity/DonorMaterial.java
  2. 75 0
      src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/DonorMaterialMapper.java
  3. 6 0
      src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/ProjectBudgetMapper.java
  4. 3 0
      src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/xml/CostCheckMapper.xml
  5. 235 0
      src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/xml/DonorMaterialMapper.xml
  6. 43 1
      src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/xml/ProjectBudgetMapper.xml
  7. 273 0
      src/main/java/com/jeeplus/modules/sg/financial/settlement/service/DonorMaterialService.java
  8. 7 41
      src/main/java/com/jeeplus/modules/sg/financial/settlement/service/ProjectBudgetService.java
  9. 64 22
      src/main/java/com/jeeplus/modules/sg/financial/settlement/web/CostCheckController.java
  10. 378 0
      src/main/java/com/jeeplus/modules/sg/financial/settlement/web/DonorMaterialController.java
  11. 36 0
      src/main/java/com/jeeplus/modules/sg/financial/settlement/web/ProjectBudgetController.java
  12. 163 0
      src/main/resources/freemarker/costCheck.ftl
  13. 165 0
      src/main/resources/freemarker/finance.ftl
  14. 3 1
      src/main/webapp/webpage/modules/sg/financial/settlement/costCheckList.js
  15. 271 0
      src/main/webapp/webpage/modules/sg/financial/settlement/donorMaterialList.js
  16. 84 0
      src/main/webapp/webpage/modules/sg/financial/settlement/donorMaterialList.jsp
  17. 207 0
      src/main/webapp/webpage/modules/sg/financial/settlement/donorMore.jsp
  18. 241 0
      src/main/webapp/webpage/modules/sg/financial/settlement/financeList.js
  19. 78 0
      src/main/webapp/webpage/modules/sg/financial/settlement/financeList.jsp
  20. 1 18
      src/main/webapp/webpage/modules/sg/managementcenter/materialinfo/importmore.jsp

+ 160 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/entity/DonorMaterial.java

@@ -0,0 +1,160 @@
+package com.jeeplus.modules.sg.financial.settlement.entity;
+
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.core.persistence.DataEntity;
+
+/**
+ * 财务项目费用检查实体类
+ * @author user3
+ * @date 2020-11-25
+ * */
+public class DonorMaterial extends DataEntity<DonorMaterial> {
+    /**
+     * 项目编码
+     * */
+    private String projectId;
+    /**
+     * 项目名称
+     * */
+    private String projectName;
+    /**
+     * 物料类别
+     * */
+    private String materialType;
+    /**
+     * 物料编码
+     * */
+    private String materialCode;
+    /**
+     * 材料名称
+     * */
+    private String materialName;
+    /**
+     * 物料描述
+     * */
+    private String materialDescribe;
+    /**
+     * 单位
+     * */
+    private String unit;
+    /**
+     * 审定数量
+     * */
+    private Double examinedNum;
+    /**
+     * erp数量
+     * */
+    private Double erpNum;
+    /**
+     * 差额
+     */
+    private Double erpDifferent;
+    /**
+     * 查询用id集合
+     * */
+    private String[] projectIds;
+
+    @ExcelField(title="项目编号", align=2, sort=2)
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    @ExcelField(title="项目名称", align=2, sort=1)
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    @ExcelField(title="物料类别", align=2, sort=3)
+    public String getMaterialType() {
+        return materialType;
+    }
+
+    public void setMaterialType(String materialType) {
+        this.materialType = materialType;
+    }
+
+    @ExcelField(title="物料编码", align=2, sort=4)
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+
+    @ExcelField(title="材料名称", align=2, sort=5)
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName;
+    }
+
+    @ExcelField(title="物料描述", align=2, sort=6)
+    public String getMaterialDescribe() {
+        return materialDescribe;
+    }
+
+    public void setMaterialDescribe(String materialDescribe) {
+        this.materialDescribe = materialDescribe;
+    }
+
+    @ExcelField(title="单位", align=2, sort=7)
+    public String getUnit() {
+        return unit;
+    }
+
+    public void setUnit(String unit) {
+        this.unit = unit;
+    }
+
+    @ExcelField(title="审定数量", align=2, sort=8)
+    public Double getExaminedNum() {
+        return examinedNum;
+    }
+
+    public void setExaminedNum(Double examinedNum) {
+        this.examinedNum = examinedNum;
+    }
+
+    @ExcelField(title="ERP数量", align=2, sort=9)
+    public Double getErpNum() {
+        return erpNum;
+    }
+
+    public void setErpNum(Double erpNum) {
+        this.erpNum = erpNum;
+    }
+
+    @ExcelField(title="差额", align=2, sort=10)
+    public Double getErpDifferent() {
+        return erpDifferent;
+    }
+
+    public void setErpDifferent(Double erpDifferent) {
+        this.erpDifferent = erpDifferent;
+    }
+
+    public String[] getProjectIds() {
+        return projectIds;
+    }
+
+    public void setProjectIds(String[] projectIds) {
+        this.projectIds = projectIds;
+    }
+
+    @Override
+    @ExcelField(title="备注", align=2, sort=11)
+    public String getRemarks() {
+        return super.getRemarks();
+    }
+}

+ 75 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/DonorMaterialMapper.java

@@ -0,0 +1,75 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.financial.settlement.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.sg.financial.settlement.entity.CostCheck;
+import com.jeeplus.modules.sg.financial.settlement.entity.DonorMaterial;
+import com.jeeplus.modules.sg.financial.settlement.entity.ProjectBudget;
+import com.jeeplus.modules.sg.managementcenter.materialproject.entity.MaterialProject;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author user3
+ * @date 2020-11-24
+ * 财费用检查表mapper
+ * */
+@MyBatisMapper
+public interface DonorMaterialMapper extends BaseMapper<DonorMaterial> {
+    /**
+     * 项目甲供材(批量导入插入)
+     * @param list 导入参数
+     * @return 成功导入的条数
+     * */
+    int insertList(@Param("list") List<DonorMaterial> list);
+    /*
+
+    *//**
+     * 费用检查信息(批量导入更新)
+     * @param list 导入参数
+     * @return 成功导入的条数
+     * *//*
+    int updateList(@Param("list") List<DonorMaterial> list);*/
+
+
+
+    /**
+     * 通过项目编号查询所有项目存在的信息返回,判断是否存在
+     * @param list 存在查询用projectId
+     * @return 存在的项目编号
+     * */
+    List<DonorMaterial> findByList(@Param("list") List<DonorMaterial> list);
+
+    /**
+     * 通过项目编号查询项目是否存在
+     * @param projectId 项目编号
+     * @return 甲供材信息
+     * */
+    int findByProjectId(String projectId);
+
+    /**
+     * 通过项目编号删除同一项目下的甲供信息
+     * @param projectId 项目编号
+     * @return 成功删除的条数
+     * */
+    int delByProjectId(String projectId);
+
+    /**
+     * 通过项目甲供材项目id修改该项目的甲供材信息
+     * @param donorMaterial id及备注
+     * @return 更新成功的条数
+     * */
+    int updateRemarks(DonorMaterial donorMaterial);
+
+    /**
+     * 查找甲供物资超欠供说明
+     * @return 甲供超欠供说明
+     */
+    List<DonorMaterial> findALLRemarks(DonorMaterial donorMaterial);
+
+
+}

+ 6 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/ProjectBudgetMapper.java

@@ -39,4 +39,10 @@ public interface ProjectBudgetMapper extends BaseMapper<ProjectBudget> {
 	List<ProjectBudget> findAllProjectId();
 
 
+	/**
+	 * 财务检查基础数据,可以通过projectId,projectName查询
+	 * @param projectBudget 查询条件
+	 * @return 财务检查数据
+	 */
+	List<ProjectBudget> findFinancialInspection(ProjectBudget projectBudget);
 }

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

@@ -14,10 +14,13 @@
 		a.project_name AS "projectName",
 		a.construction_amount_due AS "constructionAmountDue",
 		a.construction_amount_paid AS "constructionAmountPaid",
+		(a.construction_amount_due - a.construction_amount_paid) AS "constructionCostDifference",
 		a.design_amount_due AS "designAmountDue",
 		a.design_amount_paid AS "designAmountPaid",
+		(a.design_amount_due - a.design_amount_paid) AS "designCostDifference",
 		a.supervisor_amount_due AS "supervisorAmountDue",
 		a.supervisor_amount_paid AS "supervisorAmountPaid",
+		(a.supervisor_amount_due - a.supervisor_amount_paid) AS "supervisorDifference",
 		a.construction_underpayment AS "constructionUnderPayment",
 		a.design_underpayment AS "designUnderPayment",
 		a.supervisor_underpayment AS "supervisorUnderPayment"

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

@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.sg.financial.settlement.mapper.DonorMaterialMapper">
+    
+	<sql id="infoColumns">
+		a.id as "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.project_id AS "projectId",
+		a.project_name AS "projectName",
+		a.material_type AS "materialType",
+		a.material_code AS "materialCode",
+		a.material_name AS "materialName",
+		a.materail_describe AS "materialDescribe",
+		a.unit AS "unit",
+		a.examined_num AS "examinedNum",
+		a.erp_num AS "erpNum",
+		(a.examined_num - a.erp_num) AS "erpDifferent"
+	</sql>
+
+    
+	<select id="get" resultType="DonorMaterial" >
+		SELECT 
+			<include refid="infoColumns"/>
+		FROM finance_project_donor_material a
+		WHERE a.project_id = #{id}
+	</select>
+	
+	<select id="findList" resultType="DonorMaterial" >
+		SELECT 
+			<include refid="infoColumns"/>
+		FROM finance_project_donor_material a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+			<if test="projectIds != null ">
+				AND a.project_id in
+                <foreach collection="projectIds" index="index" item="item" open="(" separator="," close=")">
+                #{item}
+                </foreach>
+			</if>
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id = #{projectId}
+			</if>
+			<if test="projectName !=null and projectName != ''">
+				and a.project_name like CONCAT(CONCAT('%',#{projectName},'%'))
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="DonorMaterial" >
+		SELECT 
+			<include refid="infoColumns"/>
+		FROM finance_project_donor_material a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert">
+		INSERT INTO finance_project_donor_material(
+		    id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			project_name,
+			project_id
+		) VALUES (
+		    #{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{projectName},
+			#{projectId}
+		)
+	</insert>
+	<insert id="insertList">
+		INSERT INTO finance_project_donor_material(
+		id,
+		create_by,
+		create_date,
+		update_by,
+		update_date,
+		remarks,
+		del_flag,
+		project_name,
+		project_id,
+		material_type,
+		material_code,
+		material_name,
+		materail_describe,
+		unit,
+		examined_num,
+		erp_num
+		) VALUES
+		<foreach collection="list" item="item" index="index" separator="," >
+			(
+			#{item.id},
+			#{item.createBy.id},
+			#{item.createDate},
+			#{item.updateBy.id},
+			#{item.updateDate},
+			#{item.remarks},
+			#{item.delFlag},
+			#{item.projectName},
+			#{item.projectId},
+			#{item.materialType},
+			#{item.materialCode},
+			#{item.materialName},
+			#{item.materialDescribe},
+			#{item.unit},
+			#{item.examinedNum},
+			#{item.erpNum}
+			)
+		</foreach>
+	</insert>
+
+
+	<update id="update">
+		UPDATE finance_project_donor_material SET
+			project_id = #{projectId}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<delete id="delete">
+		DELETE FROM finance_project_donor_material
+		WHERE project_id = #{projectId}
+	</delete>
+
+
+
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE finance_project_donor_material SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE project_id = #{id}
+	</update>
+
+
+
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="TestNote" statementType="STATEMENT">
+		select * FROM finance_project_donor_material  where ${propertyName} = '${value}'
+	</select>
+
+	<select id="findAllProjectId" resultType="com.jeeplus.modules.sg.financial.settlement.entity.CostCheck">
+		select project_id
+		from finance_project_donor_material;
+	</select>
+	<select id="findByList" resultType="com.jeeplus.modules.sg.financial.settlement.entity.DonorMaterial">
+		SELECT
+		a.project_id
+		FROM finance_project_donor_material a
+		<where>
+			a.project_id in
+			<foreach collection="list" item="item" open="(" close=")" separator=",">
+				#{item.projectId}
+			</foreach>
+		</where>
+		group by a.project_id
+	</select>
+	<select id="findByProjectId" resultType="java.lang.Integer">
+		SELECT
+			count(a.project_id) as projectId
+		FROM finance_project_donor_material a
+		where a.project_id = #{projectId}
+	</select>
+
+
+	<delete id="delByProjectId">
+		delete
+		from finance_project_donor_material
+		where project_id = #{projectId}
+	</delete>
+
+
+	<update id="updateRemarks">
+		update finance_project_donor_material
+		set remarks = #{remarks}
+		where id = #{id}
+	</update>
+
+	<select id="findALLRemarks" resultType="com.jeeplus.modules.sg.financial.settlement.entity.DonorMaterial">
+		select project_id,
+		       project_name,
+		       material_code,
+		       material_name,
+		       remarks
+		from finance_project_donor_material
+		<where>
+			remarks is not null
+			<if test="projectIds != null ">
+				AND project_id in
+				<foreach collection="projectIds" index="index" item="item" open="(" separator="," close=")">
+					#{item}
+				</foreach>
+			</if>
+			<if test="projectId != null and projectId != ''">
+				AND project_id = #{projectId}
+			</if>
+			<if test="projectName !=null and projectName != ''">
+				and project_name like CONCAT(CONCAT('%',#{projectName},'%'))
+			</if>
+		</where>
+	</select>
+</mapper>

+ 43 - 1
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/xml/ProjectBudgetMapper.xml

@@ -318,5 +318,47 @@
 	<select id="findUniqueByProperty" resultType="TestNote" statementType="STATEMENT">
 		select * FROM finance_project_budget  where ${propertyName} = '${value}'
 	</select>
-
+	
+	<select id="findFinancialInspection" resultType="com.jeeplus.modules.sg.financial.settlement.entity.ProjectBudget">
+		select
+		project_id,
+		project_name,
+		(IF(project_type = 0, '成本项目', '资本项目'))project_type,
+		(CASE total_investment
+		WHEN total_investment is null THEN '未填写'
+		WHEN total_investment='' THEN '未填写'
+		ELSE '已填写' END)total_investment,
+		(CASE construction_cost_check
+		WHEN 0 THEN '未检查'
+		WHEN 1 THEN '通过'
+		ELSE '未通过' END)construction_cost_check,
+		(CASE design_cost_check
+		WHEN 0 THEN '未检查'
+		WHEN 1 THEN '通过'
+		ELSE '未通过' END)design_cost_check,
+		(CASE donor_material_check
+		WHEN 0 THEN '未检查'
+		WHEN 1 THEN '通过'
+		ELSE '未通过' END)donor_material_check,
+		(CASE supervisor_cost_check
+		WHEN 0 THEN '未检查'
+		WHEN 1 THEN '通过'
+		ELSE '未通过' END)supervisor_cost_check
+		from finance_project_budget
+		<where>
+			${dataScope}
+			<if test="projectIds != null ">
+				AND project_id in
+				<foreach collection="projectIds" index="index" item="item" open="(" separator="," close=")">
+					#{item}
+				</foreach>
+			</if>
+			<if test="projectId != null and projectId != ''">
+				AND project_id = #{projectId}
+			</if>
+			<if test="projectName !=null and projectName != ''">
+				and project_name like CONCAT(CONCAT('%',#{projectName},'%'))
+			</if>
+		</where>
+	</select>
 </mapper>

+ 273 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/service/DonorMaterialService.java

@@ -0,0 +1,273 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.financial.settlement.service;
+
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.sg.financial.settlement.entity.CostCheck;
+import com.jeeplus.modules.sg.financial.settlement.entity.DonorMaterial;
+import com.jeeplus.modules.sg.financial.settlement.entity.ProjectBudget;
+import com.jeeplus.modules.sg.financial.settlement.mapper.CostCheckMapper;
+import com.jeeplus.modules.sg.financial.settlement.mapper.DonorMaterialMapper;
+import com.jeeplus.modules.sg.managementcenter.materialinfo.entity.MaterialInfo;
+import com.jeeplus.modules.sg.managementcenter.materialinfo.util.MaterialInfoUtil;
+import com.jeeplus.modules.sg.managementcenter.materialproject.entity.MaterialProject;
+import org.apache.ibatis.annotations.Param;
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.RichTextString;
+import org.apache.poi.ss.usermodel.Row;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * 费用检查表Service
+ *
+ * @author user3
+ * @date 2020-11-27
+ */
+@Service
+@Transactional(readOnly = true)
+public class DonorMaterialService extends CrudService<DonorMaterialMapper, DonorMaterial> {
+
+    @Autowired
+    private DonorMaterialMapper donorMaterialMapper;
+
+    public static Map<String, CellStyle> styles;
+
+    @Override
+    public DonorMaterial get(String id) {
+        return super.get(id);
+    }
+
+    @Override
+    public List<DonorMaterial> findList(DonorMaterial donorMaterial) {
+        return super.findList(donorMaterial);
+    }
+
+
+    @Override
+    public Page<DonorMaterial> findPage(Page<DonorMaterial> page, DonorMaterial donorMaterial) {
+        return super.findPage(page, donorMaterial);
+    }
+
+    @Override
+    @Transactional(readOnly = false)
+    public void save(DonorMaterial donorMaterial) {
+        super.save(donorMaterial);
+    }
+
+    @Override
+    @Transactional(readOnly = false)
+    public void delete(DonorMaterial donorMaterial) {
+        super.delete(donorMaterial);
+    }
+
+    @Transactional(readOnly = false)
+    public String insertList(@Param("list") List<DonorMaterial> list) {
+        String str = "";
+        for (DonorMaterial d :
+                list) {
+            d.preInsert();
+        }
+        int i = donorMaterialMapper.insertList(list);
+        //插入
+        str += "概预算信息插入" + list.size() + "条-";
+        return str;
+    }
+
+    /**
+     * 在年度物资上报统计表中保存项目信息,在年度上报明细表中保存物资信息
+     */
+    @Transactional(readOnly = false)
+    public void saveData(MultipartFile file) throws IOException, InvalidFormatException {
+        try {
+            ImportExcel module = new ImportExcel(file, 1, "预算封面");
+            Row row = module.getRow(1);
+            Object obj = module.getCellValue(row, 2);
+            Row nameRow = module.getRow(2);
+            Object nameObj = module.getCellValue(nameRow, 2);
+            if (obj == null) {
+                throw new RuntimeException("找不到项目编号!");
+            }
+            String projectId = ((String) obj).trim();
+            String projectName = ((String) nameObj).trim();
+            int project = donorMaterialMapper.findByProjectId(projectId);
+            if (project > 0) {
+                donorMaterialMapper.delByProjectId(projectId);
+            }
+            //保存
+            ImportExcel pick = new ImportExcel(file, 6, "甲供材超(欠)供分析表");
+            //获取领料清单数据
+            List<DonorMaterial> donorMaterials = getData(pick, projectId, projectName);
+            insertList(donorMaterials);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 根据项目编号查询所有已经存在的项目甲供材信息
+     */
+    public List<DonorMaterial> findByList(List<DonorMaterial> list) {
+        return donorMaterialMapper.findByList(list);
+    }
+
+    /**
+     * excel文件数据读取
+     */
+    private List<DonorMaterial> getData(ImportExcel importExcel, String projectId, String projectName) throws ParseException {
+        int lastRow = importExcel.getLastDataRowNum();
+        List<DonorMaterial> list = new ArrayList<>();
+        DonorMaterial donorMaterial;
+        double aDouble;
+        for (int i = 6; i < lastRow; i++) {
+            donorMaterial = new DonorMaterial();
+            Row row = importExcel.getRow(i);
+            if (null != row) {
+                String cellOne = this.getCellValue(row.getCell(1));
+                String cellTwo = this.getCellValue(row.getCell(2));
+                if (!"".equals(cellOne) && !"".equals(cellTwo)) {
+                    if ("0".equals(cellOne)) {
+                        cellOne = "";
+                    }
+                    donorMaterial.setProjectName(projectName);
+                    donorMaterial.setProjectId(projectId);
+                    donorMaterial.setMaterialType(cellOne);
+                    donorMaterial.setMaterialCode(cellTwo);
+                    String cellThree = this.getCellValue(row.getCell(3));
+                    String cellFour = this.getCellValue(row.getCell(4));
+                    String cellFive = this.getCellValue(row.getCell(5));
+                    String cellSix = this.getCellValue(row.getCell(13));
+                    if (null == cellSix) {
+                        aDouble = 0.0;
+                    } else {
+                        aDouble = getDouble(cellSix);
+                    }
+                    donorMaterial.setMaterialName(cellThree);
+                    donorMaterial.setMaterialDescribe(cellFour);
+                    donorMaterial.setUnit(cellFive);
+                    donorMaterial.setExaminedNum(aDouble);
+                    list.add(donorMaterial);
+                }
+            }
+        }
+        return list;
+    }
+
+    /**
+     * 获取excel double类型的值
+     */
+    private double getDouble(String myDouble) {
+        double d = 0.00;
+        if (!"".equals(myDouble)) {
+            d = Double.parseDouble(myDouble);
+        }
+        return d;
+    }
+
+    /**
+     * 获取excel double类型的值(折扣比率值,不能小于1.0)
+     */
+    private double getDisCount(ImportExcel importExcel, Row row, int col) {
+        double d = 1.00;
+        Object o = importExcel.getCellValue(row, col);
+        if (!o.equals("")) {
+            d = Double.parseDouble(o.toString());
+        }
+        return d;
+    }
+
+    /**
+     * 获取excel date类型的值
+     */
+    private Date getDate(ImportExcel importExcel, Row row, int col) throws ParseException {
+        Date d = null;
+        Object o = importExcel.getCellValue(row, col);
+        if (!o.equals("")) {
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+            d = simpleDateFormat.parse(o.toString());
+        }
+        return d;
+    }
+
+    /**
+     * 获取excel String类型的值
+     */
+    private String getString(ImportExcel importExcel, Row row, int col) throws ParseException {
+        String str = "";
+        Object o = importExcel.getCellValue(row, col);
+        if (null != o && !"".equals(o)) {
+            str = String.valueOf(o);
+        }
+        return str;
+    }
+
+
+    public String getCellValue(Cell cell) {
+        String value = null;
+        if (cell != null) {
+            switch (cell.getCellType()) {
+                case Cell.CELL_TYPE_FORMULA:
+                    // cell.getCellFormula();
+                    try {
+                        value = String.valueOf(cell.getStringCellValue());
+                    } catch (IllegalStateException e) {
+                        cell.setCellType(Cell.CELL_TYPE_STRING);
+                        value = String.valueOf(cell.getStringCellValue());
+                    } catch (NullPointerException e) {
+                        value = "";
+                    }
+                    break;
+                case Cell.CELL_TYPE_NUMERIC:
+                    value = String.valueOf(cell.getNumericCellValue());
+                    break;
+                case Cell.CELL_TYPE_STRING:
+                    value = String.valueOf(cell.getRichStringCellValue());
+                    break;
+            }
+        }
+        return value;
+    }
+
+    public boolean isNumeric(String str) {
+        Pattern pattern = Pattern.compile("[0-9]*");
+        Matcher isNum = pattern.matcher(str);
+        if (!isNum.matches()) {
+            return false;
+        }
+        return true;
+    }
+
+    @Transactional(readOnly = false)
+    public void updateRemarks(DonorMaterial donorMaterial) {
+        donorMaterialMapper.updateRemarks(donorMaterial);
+    }
+
+    /***
+     * 查询所有甲供欠供说明
+     * */
+    public List<DonorMaterial> findALLRemarks(DonorMaterial donorMaterial){
+        return donorMaterialMapper.findALLRemarks(donorMaterial);
+    }
+
+    /*
+    * FINANCIAL INSPECTION
+    * financialInspection
+    * */
+}

+ 7 - 41
src/main/java/com/jeeplus/modules/sg/financial/settlement/service/ProjectBudgetService.java

@@ -57,6 +57,13 @@ public class ProjectBudgetService extends CrudService<ProjectBudgetMapper, Proje
 		return super.findPage(page, projectBudget);
 	}
 
+	public Page<ProjectBudget> findFinancePage(Page<ProjectBudget> page,ProjectBudget projectBudget) {
+		dataRuleFilter(projectBudget);
+		projectBudget.setPage(page);
+		page.setList(projectBudgetMapper.findFinancialInspection(projectBudget));
+		return page;
+	}
+
 	@Transactional(readOnly = false)
 	public void update(ProjectBudget projectBudget) {
 		projectBudgetMapper.update(projectBudget);
@@ -116,7 +123,6 @@ public class ProjectBudgetService extends CrudService<ProjectBudgetMapper, Proje
 				insertList.add(b);
 			}
 		}
-
 		//插入
 		if (insertList.size() > 0) {
 			projectBudgetMapper.insertList(insertList);
@@ -136,46 +142,6 @@ public class ProjectBudgetService extends CrudService<ProjectBudgetMapper, Proje
 		super.delete(projectBudget);
 	}
 
-/*
-	public void export(ProjectBudget projectBudget , HttpServletResponse response){
-		InputStream inputStream = null;
-		XSSFWorkbook workbook = null;
-		try {
-			String path = (getSispPath() + "excelmodel/maintainDataExport.xlsx");
-			List<ProjectBudget> dataList = projectBudgetMapper.findList(projectBudget);
-//			String path = "D:/IDEA workspace/sg_audit/target/classes/freemarker/excelmodel/maintainDataExport.xlsx";
-			File file = new File(path);
-			inputStream = new FileInputStream(file);// 将excel文件转为输入流
-			workbook = new XSSFWorkbook(inputStream);// 创建个workbook
-			styles = createStyles(workbook);  //创建样式
-			int rowNum = 3;
-			Sheet sheet = workbook.getSheetAt(0);
-			for (Iterator<ProjectBudget> it = dataList.iterator(); it.hasNext(); ) {
-				ProjectBudget data = it.next();
-				if (data == null) {
-					continue;
-				}
-				//输出行数据
-				Row row = sheet.createRow(rowNum++);
-				convertDataToRow(data, row);
-			}
-			String st = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss");
-			String str = URLEncoder.encode("概预算基本信息"+st+".xlsx", "UTF8");
-			OutputStream outputStream = response.getOutputStream();
-			response.reset();
-			response.setHeader("Content-Disposition", "attachment;filename="+str);
-			response.setContentType("application/vnd.ms-excel;charset=UTF-8");
-			workbook.write(outputStream);
-			outputStream.flush();
-			outputStream.close();
-		} catch (Exception e) {
-			e.printStackTrace();
-		} finally {
-		}
-	}
-*/
-
-
 	public void exportHeard( HttpServletResponse response){
 		InputStream inputStream = null;
 		XSSFWorkbook workbook = null;

+ 64 - 22
src/main/java/com/jeeplus/modules/sg/financial/settlement/web/CostCheckController.java

@@ -8,10 +8,15 @@ import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.utils.excel.ImportExcel;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.web.BaseController;
+import com.jeeplus.modules.sg.audit.information.utils.FreemarkerUtil;
+import com.jeeplus.modules.sg.audit.information.utils.ResponseUtil;
 import com.jeeplus.modules.sg.financial.settlement.entity.CostCheck;
 import com.jeeplus.modules.sg.financial.settlement.entity.ProjectBudget;
 import com.jeeplus.modules.sg.financial.settlement.service.CostCheckService;
 import com.jeeplus.modules.sg.financial.settlement.service.ProjectBudgetService;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import freemarker.template.Configuration;
+import freemarker.template.Template;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -27,13 +32,12 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
+import java.io.File;
+import java.io.IOException;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 概预算基本信息维护
@@ -145,28 +149,69 @@ public class CostCheckController extends BaseController {
 
 /**
 	 * 导出excel文件
-	 *//*
+	 */
 
 	@ResponseBody
 	@RequiresPermissions("cost:check:export")
     @RequestMapping(value = "export")
-    public AjaxJson exportFile(ProjectBudget ProjectBudget, HttpServletRequest request, HttpServletResponse response) {
-		AjaxJson j = new AjaxJson();
+    public void exportFile(CostCheck costCheck, HttpServletRequest request, HttpServletResponse response) {
+		Template template = null;
+		response.setContentType("text/text;charset=utf-8");
+		response.setCharacterEncoding("UTF-8");
+		File path = new File(this.getClass().getResource("/").getPath() + "/freemarker");
+		Configuration cfg = new Configuration();
 		try {
-//            String fileName = DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
-//            Page<ProjectBudget> page = projectBudgetService.findPage(new Page<ProjectBudget>(request, response, -1), ProjectBudget);
-//    		new ExportExcel(null, ProjectBudget.class).setDataList(page.getList()).write(response, fileName).dispose();
-			projectBudgetService.export(ProjectBudget,response);
-    		j.setSuccess(true);
-    		j.setMsg("导出成功!");
-    		return j;
-		} catch (Exception e) {
-			j.setSuccess(false);
-			j.setMsg("导出失败!失败信息:"+e.getMessage());
+			cfg.setDefaultEncoding("UTF-8");
+			//配置cfg对象
+			cfg.setDirectoryForTemplateLoading(path);
+			//            根据模板名称获取Template对象
+			template = cfg.getTemplate("costCheck.ftl");
+		} catch (IOException e) {
+			e.printStackTrace();
 		}
-			return j;
+		Map<String, Object> data = new HashMap<>();
+		String st = "";
+		String projectId = costCheck.getProjectId();
+		if(StringUtils.isNotBlank(projectId)){
+			st = projectId;
+		}
+//		对查询的id进行处理,若只有一个id设置projectId模糊匹配,若有多个设置projectIds精准匹配
+		if(StringUtils.isNotBlank(st)){
+			String[] sts = st.split("\\s+");
+			if(sts.length == 1){
+				costCheck.setProjectId(sts[0]);
+			}else {
+				costCheck.setProjectIds(sts);
+				costCheck.setProjectId(null);
+			}
+		}
+		List<CostCheck> list = costCheckService.findList(costCheck);
+		for (CostCheck c :
+				list) {
+			String conPay = DictUtils.getDictLabel(c.getConstructionUnderPayment(), "finance_underpayment", "");
+			String desPay = DictUtils.getDictLabel(c.getDesignUnderPayment(), "finance_underpayment", "");
+			String supPay = DictUtils.getDictLabel(c.getSupervisorUnderPayment(), "finance_underpayment", "");
+			if ("请选择".equals(conPay)) {
+				c.setConstructionUnderPayment("");
+			}else {
+				c.setConstructionUnderPayment(conPay);
+			}
+			if ("请选择".equals(desPay)) {
+				c.setDesignUnderPayment("");
+			}else {
+				c.setDesignUnderPayment(desPay);
+			}
+			if ("请选择".equals(supPay)) {
+				c.setSupervisorUnderPayment("");
+			}else {
+				c.setSupervisorUnderPayment(supPay);
+			}
+		}
+		data.put("list", list);
+		File docFile = new File(path + "\\费用检查表.xls");
+		FreemarkerUtil.generateFile(data, template, docFile);
+		ResponseUtil.docResponse("费用检查表.xls", docFile, response);
     }
-*/
 
 	/**
 	 * 导入Excel数据
@@ -265,7 +310,6 @@ public class CostCheckController extends BaseController {
 	 * 修改施工费允许少付
 	 * */
 	@ResponseBody
-	@RequiresPermissions(value={"cost:check:edit"},logical=Logical.OR)
 	@RequestMapping(value = "updateDes")
 	public AjaxJson updateDes(CostCheck costCheck, Model model) throws Exception{
 		AjaxJson j = new AjaxJson();
@@ -279,7 +323,6 @@ public class CostCheckController extends BaseController {
 	 * 修改设计费允许少付
 	 * */
 	@ResponseBody
-	@RequiresPermissions(value={"cost:check:edit"},logical=Logical.OR)
 	@RequestMapping(value = "updateCon")
 	public AjaxJson updateCon(CostCheck costCheck, Model model) throws Exception{
 		AjaxJson j = new AjaxJson();
@@ -293,7 +336,6 @@ public class CostCheckController extends BaseController {
 	 * 修改监理费允许少付
 	 * */
 	@ResponseBody
-	@RequiresPermissions(value={"cost:check:edit"},logical=Logical.OR)
 	@RequestMapping(value = "updateSup")
 	public AjaxJson updateSup(CostCheck costCheck, Model model) throws Exception{
 		AjaxJson j = new AjaxJson();

+ 378 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/web/DonorMaterialController.java

@@ -0,0 +1,378 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.financial.settlement.web;
+
+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.sg.audit.information.entity.Information;
+import com.jeeplus.modules.sg.audit.information.entity.OutInformation;
+import com.jeeplus.modules.sg.audit.information.utils.FreemarkerUtil;
+import com.jeeplus.modules.sg.audit.information.utils.RandomUtil;
+import com.jeeplus.modules.sg.audit.information.utils.ResponseUtil;
+import com.jeeplus.modules.sg.audit.material.entity.Material;
+import com.jeeplus.modules.sg.financial.settlement.entity.CostCheck;
+import com.jeeplus.modules.sg.financial.settlement.entity.DonorMaterial;
+import com.jeeplus.modules.sg.financial.settlement.service.CostCheckService;
+import com.jeeplus.modules.sg.financial.settlement.service.DonorMaterialService;
+import com.jeeplus.modules.sg.managementcenter.materialproject.entity.MaterialProject;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+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.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.*;
+import java.math.BigDecimal;
+import java.net.URLDecoder;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * 概预算基本信息维护
+ *
+ * @author user3
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/donor/material")
+public class DonorMaterialController extends BaseController {
+
+    @Autowired
+    private DonorMaterialService donorMaterialService;
+
+    @ModelAttribute
+    public DonorMaterial get(@RequestParam(required = false) String id) {
+        DonorMaterial entity = null;
+        if (StringUtils.isNotBlank(id)) {
+            entity = donorMaterialService.get(id);
+        }
+        if (entity == null) {
+            entity = new DonorMaterial();
+        }
+        return entity;
+    }
+
+    /**
+     * 列表页面
+     */
+    @RequiresPermissions("donor:material:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(DonorMaterial donorMaterial, Model model) {
+        model.addAttribute("donorMaterial", donorMaterial);
+        return "modules/sg/financial/settlement/donorMaterialList";
+    }
+
+
+    /**
+     * 列表数据
+     */
+    @ResponseBody
+    @RequiresPermissions("donor:material:list")
+    @RequestMapping(value = "data")
+    public Map<String, Object> data(DonorMaterial donorMaterial, HttpServletRequest request, HttpServletResponse response, Model model, HttpSession session) {
+        String st = "";
+        String projectId = donorMaterial.getProjectId();
+        if (StringUtils.isNotBlank(projectId)) {
+            st = projectId;
+        }
+//		对查询的id进行处理,若只有一个id设置projectId模糊匹配,若有多个设置projectIds精准匹配
+        if (StringUtils.isNotBlank(st)) {
+            String[] sts = st.split("\\s+");
+            if (sts.length == 1) {
+                donorMaterial.setProjectId(sts[0]);
+            } else {
+                donorMaterial.setProjectIds(sts);
+                donorMaterial.setProjectId(null);
+            }
+        }
+        Page<DonorMaterial> page = donorMaterialService.findPage(new Page<DonorMaterial>(request, response), donorMaterial);
+        return getBootstrapData(page);
+    }
+
+
+    /**
+     * 查看,增加,编辑表单页面
+     */
+    @RequiresPermissions(value = {"donor:material:view", "donor:material:add", "donor:material:edit"}, logical = Logical.OR)
+    @RequestMapping(value = "form")
+    public String form(DonorMaterial donorMaterial, Model model) {
+        model.addAttribute("donorMaterial", donorMaterial);
+        return "modules/sg/financial/settlement/donorMaterialForm";
+    }
+
+    /**
+     * 保存
+     */
+    @ResponseBody
+    @RequiresPermissions(value = {"donor:material:add", "donor:material:edit"}, logical = Logical.OR)
+    @RequestMapping(value = "save")
+    public AjaxJson save(DonorMaterial donorMaterial, Model model) throws Exception {
+        AjaxJson j = new AjaxJson();
+        /**
+         * 后台hibernate-validation插件校验
+         */
+        String errMsg = beanValidator(donorMaterial);
+        if (StringUtils.isNotBlank(errMsg)) {
+            j.setSuccess(false);
+            j.setMsg(errMsg);
+            return j;
+        }
+        //新增或编辑表单保存
+        donorMaterialService.save(donorMaterial);
+        j.setSuccess(true);
+        j.setMsg("保存成功");
+        return j;
+    }
+
+    /**
+     * 删除
+     */
+    @ResponseBody
+    @RequiresPermissions("donor:material:del")
+    @RequestMapping(value = "delete")
+    public AjaxJson delete(DonorMaterial donorMaterial) {
+        AjaxJson j = new AjaxJson();
+        donorMaterialService.delete(donorMaterial);
+        j.setMsg("删除成功");
+        return j;
+    }
+
+
+    /**
+     * 导出excel文件
+     */
+    @ResponseBody
+    @RequiresPermissions("donor:material:export")
+    @RequestMapping(value = "export")
+    public AjaxJson exportFile(DonorMaterial donorMaterial, HttpServletRequest request, HttpServletResponse response) {
+        AjaxJson j = new AjaxJson();
+        try {
+            String st = "";
+            String projectId = donorMaterial.getProjectId();
+            if (StringUtils.isNotBlank(projectId)) {
+                st = projectId;
+            }
+            //对查询的id进行处理,若只有一个id设置projectId模糊匹配,若有多个设置projectIds精准匹配
+            if (StringUtils.isNotBlank(st)) {
+                String[] sts = st.split("\\s+");
+                if (sts.length == 1) {
+                    donorMaterial.setProjectId(sts[0]);
+                } else {
+                    donorMaterial.setProjectIds(sts);
+                    donorMaterial.setProjectId(null);
+                }
+            }
+            String fileName = "导出项目甲供材清单" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
+            List<DonorMaterial> list = donorMaterialService.findList(donorMaterial);
+            new ExportExcel("导出项目甲供材清单", DonorMaterial.class).setDataList(list).write(response, fileName).dispose();
+            j.setSuccess(true);
+            j.setMsg("导出成功!");
+            return j;
+        } catch (Exception e) {
+            j.setSuccess(false);
+            j.setMsg("导出项目甲供材清单!失败信息:" + e.getMessage());
+        }
+        return j;
+    }
+
+    /**
+     * 导入Excel数据
+     */
+    @ResponseBody
+    @RequiresPermissions("donor:material: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, 2, "送审单");
+            List<DonorMaterial> list = getData(ei);
+            //保存费用检查信息
+            String b = donorMaterialService.insertList(list);
+            j.setMsg("导入成功" + b);
+        } catch (Exception e) {
+            j.setSuccess(false);
+            j.setMsg("导入失败!失败信息:" + e.getMessage());
+        }
+        return j;
+    }
+
+    /**
+     * excel文件数据读取
+     */
+    private List<DonorMaterial> getData(ImportExcel importExcel) throws ParseException {
+        int lastRow = importExcel.getLastDataRowNum();
+        List<DonorMaterial> list = new ArrayList<>();
+        DonorMaterial donorMaterial;
+        for (int i = 2; i < lastRow; i++) {
+            donorMaterial = new DonorMaterial();
+            Row row = importExcel.getRow(i);
+            String projectId = (String) importExcel.getCellValue(row, 1);
+            if (StringUtils.isNotBlank(projectId)) {
+                donorMaterial.setProjectId(projectId);
+                list.add(donorMaterial);
+            }
+        }
+        return list;
+    }
+
+    /**
+     * 项目甲供材管理 多文件导入页面
+     */
+    @RequestMapping(value = "/importMore/Form")
+    public String importMoreForm(Model model) {
+        return "modules/sg/financial/settlement/donorMore";
+    }
+
+    /**
+     * 项目甲供材 多文件导入验证
+     * 若项目甲供材中已经存在某些项目,则返回消息由操作者选择是否进行覆盖,否则直接导入甲供材明细
+     */
+    @ResponseBody
+    @RequestMapping(value = "importValidations")
+    public AjaxJson importValidations(@RequestParam("file") MultipartFile[] file) {
+        AjaxJson j = new AjaxJson();
+        List<DonorMaterial> list = new ArrayList<>();
+        try {
+            //获取项目名称列表
+            for (int i = 0; i < file.length; i++) {
+                ImportExcel module = new ImportExcel(file[i], 1, "预算封面");
+                Row row = module.getRow(1);
+                Object obj = module.getCellValue(row, 2);
+                if (obj == null) {
+                    throw new RuntimeException("找不到项目编号!");
+                }
+                String projectId = ((String) obj).trim();
+                DonorMaterial project = new DonorMaterial();
+                project.setProjectId(projectId);
+                list.add(project);
+            }
+            List<DonorMaterial> projects = donorMaterialService.findByList(list);
+            //判断是否有已存在项目
+            if (projects != null && projects.size() > 0) {
+                StringBuilder stringBuilder = new StringBuilder();
+                for (DonorMaterial donorMaterial : projects) {
+                    stringBuilder.append(donorMaterial.getProjectId() + ",");
+                }
+                j.setMsg(stringBuilder.toString());
+                j.setSuccess(true);
+            } else {
+                for (int k = 0; k < file.length; k++) {
+                    donorMaterialService.saveData(file[k]);
+                }
+                j.setSuccess(true);
+                j.setErrorCode("0");
+                j.setMsg("导入成功");
+            }
+        } catch (Exception e) {
+            j.setSuccess(true);
+            j.setMsg("导入失败!失败信息:" + e.getMessage());
+        }
+        return j;
+    }
+
+    /**
+     * 甲供材文件导入覆盖后方法
+     */
+    @ResponseBody
+    @RequiresPermissions("donor:material:import")
+    @RequestMapping(value = "imports")
+    public AjaxJson importFile(@RequestParam("file") MultipartFile[] file, HttpServletResponse response, HttpServletRequest request) {
+        AjaxJson j = new AjaxJson();
+        try {
+            for (int i = 0; i < file.length; i++) {
+                donorMaterialService.saveData(file[i]);
+            }
+            j.setMsg("导入成功");
+        } catch (Exception e) {
+            j.setSuccess(false);
+            j.setMsg("导入失败!失败信息:" + e.getMessage());
+        }
+        return j;
+    }
+
+    /**
+     * 项目甲供材修改甲供材信息备注
+     */
+    @ResponseBody
+    @RequestMapping(value = "updateRemarks")
+    public AjaxJson updateRemarks(DonorMaterial donorMaterial, Model model) throws Exception {
+        AjaxJson j = new AjaxJson();
+        donorMaterialService.updateRemarks(donorMaterial);
+        j.setSuccess(true);
+        j.setMsg("保存成功");
+        return j;
+    }
+
+    @ResponseBody
+    @RequiresPermissions("modules:sg:information:information:export")
+    @RequestMapping(value = "exportInformation")
+    public void exportInformation(DonorMaterial donorMaterial, HttpServletRequest request, HttpServletResponse response) {
+        StringBuilder stringBuilder = new StringBuilder();
+        Template template = null;
+        File path = new File(this.getClass().getResource("/").getPath() + "/freemarker");
+        Configuration cfg = new Configuration();
+        try {
+            cfg.setDefaultEncoding("UTF-8");
+            //配置cfg对象
+            cfg.setDirectoryForTemplateLoading(path);
+//            根据模板名称获取Template对象
+            template = cfg.getTemplate("甲供物资超欠供说明.ftl");
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        Map<String, Object> data = new HashMap<>();
+        String st = "";
+        String projectId = donorMaterial.getProjectId();
+        if (StringUtils.isNotBlank(projectId)) {
+            st = projectId;
+        }
+        //对查询的id进行处理,若只有一个id设置projectId模糊匹配,若有多个设置projectIds精准匹配
+        if (StringUtils.isNotBlank(st)) {
+            String[] sts = st.split("\\s+");
+            if (sts.length == 1) {
+                donorMaterial.setProjectId(sts[0]);
+            } else {
+                donorMaterial.setProjectIds(sts);
+                donorMaterial.setProjectId(null);
+            }
+        }
+        List<DonorMaterial> list = donorMaterialService.findALLRemarks(donorMaterial);
+        for (int i = 0; i < list.size(); i++) {
+            stringBuilder.append(i + 1 + "." + list.get(i).getProjectName()
+                    + "(" + list.get(i).getProjectId() + ")"
+                    + ";物料编码:"
+                    + list.get(i).getMaterialCode()
+                    + ";物料名称:"
+                    + list.get(i).getMaterialName()
+                    + ";欠供说明:"
+                    + list.get(i).getRemarks()
+            );
+            stringBuilder.append("<w:br />");
+        }
+        data.put("mb", stringBuilder);
+        File docFile = new File(path + "\\甲供物资超欠供说明.doc");
+        FreemarkerUtil.generateFile(data, template, docFile);
+        ResponseUtil.docResponse("甲供物资超欠供说明.doc", docFile, response);
+    }
+
+
+
+}

+ 36 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/web/ProjectBudgetController.java

@@ -106,6 +106,42 @@ public class ProjectBudgetController extends BaseController {
 
 
 	/**
+	 * 财务检查列表页面
+	 */
+	@RequiresPermissions("finance:budget:list")
+	@RequestMapping(value = "financeList")
+	public String financeList(ProjectBudget projectBudget, Model model) {
+		model.addAttribute("projectBudget", projectBudget);
+		return "modules/sg/financial/settlement/financeList";
+	}
+
+	/**
+	 * 财务检查列表数据
+	 */
+	@ResponseBody
+	@RequiresPermissions("finance:budget:list")
+	@RequestMapping(value = "financeData")
+	public Map<String, Object> FinanceData(ProjectBudget projectBudget, HttpServletRequest request, HttpServletResponse response, Model model,HttpSession session) {
+		String st = "";
+		String projectId = projectBudget.getProjectId();
+		if(StringUtils.isNotBlank(projectId)){
+			st = projectId;
+		}
+//		对查询的id进行处理,若只有一个id设置projectId模糊匹配,若有多个设置projectIds精准匹配
+		if(StringUtils.isNotBlank(st)){
+			String[] sts = st.split("\\s+");
+			if(sts.length == 1){
+				projectBudget.setProjectId(sts[0]);
+			}else {
+				projectBudget.setProjectIds(sts);
+				projectBudget.setProjectId(null);
+			}
+		}
+		Page<ProjectBudget> page = projectBudgetService.findFinancePage(new Page<ProjectBudget>(request, response), projectBudget);
+		return getBootstrapData(page);
+	}
+
+	/**
 	 * 查看,增加,编辑表单页面
 	 */
 	@RequiresPermissions(value={"finance:budget:view","finance:budget:add","finance:budget:edit"},logical=Logical.OR)

+ 163 - 0
src/main/resources/freemarker/costCheck.ftl

@@ -0,0 +1,163 @@
+<?xml version="1.0"?>
+<?mso-application progid="Excel.Sheet"?>
+<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
+ xmlns:o="urn:schemas-microsoft-com:office:office"
+ xmlns:x="urn:schemas-microsoft-com:office:excel"
+ xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
+ xmlns:html="http://www.w3.org/TR/REC-html40">
+ <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
+  <Author>enford</Author>
+  <LastAuthor>enford</LastAuthor>
+  <Created>2020-11-25T09:41:54Z</Created>
+  <Version>14.00</Version>
+ </DocumentProperties>
+ <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
+  <AllowPNG/>
+ </OfficeDocumentSettings>
+ <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
+  <WindowHeight>8070</WindowHeight>
+  <WindowWidth>18315</WindowWidth>
+  <WindowTopX>360</WindowTopX>
+  <WindowTopY>30</WindowTopY>
+  <ProtectStructure>False</ProtectStructure>
+  <ProtectWindows>False</ProtectWindows>
+ </ExcelWorkbook>
+ <Styles>
+  <Style ss:ID="Default" ss:Name="Normal">
+   <Alignment ss:Vertical="Center"/>
+   <Borders/>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+   <Interior/>
+   <NumberFormat/>
+   <Protection/>
+  </Style>
+  <Style ss:ID="m143158824">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="m143158844">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s62">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s66">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s68">
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s69">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s70">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s71">
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+ </Styles>
+ <Worksheet ss:Name="费用检查">
+  <Table ss:ExpandedColumnCount="14" ss:ExpandedRowCount="3" x:FullColumns="1"
+   x:FullRows="1" ss:StyleID="s68" ss:DefaultColumnWidth="54"
+   ss:DefaultRowHeight="13.5">
+   <Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="52.5"/>
+   <Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="77.25"/>
+   <Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="52.5"/>
+   <Row>
+    <Cell ss:MergeDown="1" ss:StyleID="s62"><Data ss:Type="String">项目名称</Data></Cell>
+    <Cell ss:MergeDown="1" ss:StyleID="s62"><Data ss:Type="String">项目定义编码</Data></Cell>
+    <Cell ss:MergeAcross="3" ss:StyleID="m143158824"><Data ss:Type="String">施工费</Data></Cell>
+    <Cell ss:MergeAcross="3" ss:StyleID="m143158844"><Data ss:Type="String">设计费</Data></Cell>
+    <Cell ss:MergeAcross="3" ss:StyleID="s66"><Data ss:Type="String">监理费</Data></Cell>
+   </Row>
+   <Row ss:StyleID="s70">
+    <Cell ss:Index="3" ss:StyleID="s69"><Data ss:Type="String">应付金额</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">实付金额</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">差异</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">备注</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">应付金额</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">实付金额</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">差异</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">备注</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">应付金额</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">实付金额</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">差异</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">备注</Data></Cell>
+   </Row>
+   <#list list as item>
+   <Row>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">${item.projectName!""}</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">${item.projectId!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.constructionAmountDue!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.constructionAmountPaid!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.constructionCostDifference!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.constructionUnderPayment!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.designAmountDue!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.designAmountPaid!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.designCostDifference!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.designUnderPayment!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.supervisorAmountDue!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.supervisorAmountPaid!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.supervisorDifference!""}</Data></Cell>
+    <Cell ss:StyleID="s71"><Data ss:Type="String">${item.supervisorUnderPayment!""}</Data></Cell>
+   </Row>
+   </#list>
+  </Table>
+  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
+   <PageSetup>
+    <Header x:Margin="0.3"/>
+    <Footer x:Margin="0.3"/>
+    <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
+   </PageSetup>
+   <Selected/>
+   <Panes>
+    <Pane>
+     <Number>3</Number>
+     <ActiveRow>11</ActiveRow>
+     <ActiveCol>6</ActiveCol>
+    </Pane>
+   </Panes>
+   <ProtectObjects>False</ProtectObjects>
+   <ProtectScenarios>False</ProtectScenarios>
+  </WorksheetOptions>
+ </Worksheet>
+</Workbook>

+ 165 - 0
src/main/resources/freemarker/finance.ftl

@@ -0,0 +1,165 @@
+<?xml version="1.0"?>
+<?mso-application progid="Excel.Sheet"?>
+<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
+ xmlns:o="urn:schemas-microsoft-com:office:office"
+ xmlns:x="urn:schemas-microsoft-com:office:excel"
+ xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
+ xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
+ xmlns:html="http://www.w3.org/TR/REC-html40">
+ <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
+  <Author>enford</Author>
+  <LastAuthor>enford</LastAuthor>
+  <Created>2020-11-27T09:27:12Z</Created>
+  <LastSaved>2020-11-27T09:43:13Z</LastSaved>
+  <Version>14.00</Version>
+ </DocumentProperties>
+ <CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
+  <KSOProductBuildVer dt:dt="string">2052-11.1.0.10132</KSOProductBuildVer>
+ </CustomDocumentProperties>
+ <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
+  <AllowPNG/>
+ </OfficeDocumentSettings>
+ <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
+  <WindowHeight>12540</WindowHeight>
+  <WindowWidth>28800</WindowWidth>
+  <WindowTopX>0</WindowTopX>
+  <WindowTopY>0</WindowTopY>
+  <ProtectStructure>False</ProtectStructure>
+  <ProtectWindows>False</ProtectWindows>
+ </ExcelWorkbook>
+ <Styles>
+  <Style ss:ID="Default" ss:Name="Normal">
+   <Alignment ss:Vertical="Center"/>
+   <Borders/>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+   <Interior/>
+   <NumberFormat/>
+   <Protection/>
+  </Style>
+  <Style ss:ID="m210722876">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="m210722896">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="m210722916">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s64">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s65">
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s66">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s69">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s70">
+   <Alignment ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+ </Styles>
+ <Worksheet ss:Name="配网项目竣工后财务检查">
+  <Table ss:ExpandedColumnCount="8" ss:ExpandedRowCount="3" x:FullColumns="1"
+   x:FullRows="1" ss:StyleID="s65" ss:DefaultColumnWidth="54"
+   ss:DefaultRowHeight="13.5">
+   <Column ss:StyleID="s64" ss:AutoFitWidth="0" ss:Width="57"/>
+   <Column ss:StyleID="s64" ss:AutoFitWidth="0" ss:Width="83.25"/>
+   <Column ss:StyleID="s64" ss:AutoFitWidth="0" ss:Width="141.75"/>
+   <Column ss:StyleID="s64" ss:AutoFitWidth="0" ss:Width="71.25"/>
+   <Column ss:StyleID="s64" ss:AutoFitWidth="0" ss:Width="69.75"/>
+   <Column ss:StyleID="s64" ss:AutoFitWidth="0" ss:Width="67.5" ss:Span="2"/>
+   <Row>
+    <Cell ss:MergeDown="1" ss:StyleID="s66"><Data ss:Type="String">项目名称</Data></Cell>
+    <Cell ss:MergeDown="1" ss:StyleID="s66"><Data ss:Type="String">项目定义编码</Data></Cell>
+    <Cell ss:MergeDown="1" ss:StyleID="m210722876"><Data ss:Type="String">项目类型</Data></Cell>
+    <Cell ss:MergeDown="1" ss:StyleID="m210722896"><Data ss:Type="String">概预算信息</Data></Cell>
+    <Cell ss:MergeDown="1" ss:StyleID="m210722916"><Data ss:Type="String">甲供领退料</Data></Cell>
+    <Cell ss:MergeAcross="2" ss:StyleID="s66"><Data ss:Type="String">费用检查</Data></Cell>
+   </Row>
+   <Row>
+    <Cell ss:Index="6" ss:StyleID="s66"><Data ss:Type="String">施工费</Data></Cell>
+    <Cell ss:StyleID="s66"><Data ss:Type="String">设计费</Data></Cell>
+    <Cell ss:StyleID="s66"><Data ss:Type="String">监理费</Data></Cell>
+   </Row>
+   <Row ss:Height="40.5">
+    <Cell ss:StyleID="s66"><Data ss:Type="String">${item.projectName!""}</Data></Cell>
+    <Cell ss:StyleID="s66"><Data ss:Type="String">${item.projectId!""}</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">${item.projectType!""}</Data></Cell>
+    <Cell ss:StyleID="s69"><Data ss:Type="String">${item.totalInvestment!""}</Data></Cell>
+    <Cell ss:StyleID="s70"><Data ss:Type="String">${item.donorMaterialCheck!""}</Data></Cell>
+    <Cell ss:StyleID="s70"><Data ss:Type="String">${item.constructionCostCheck!""}</Data></Cell>
+    <Cell ss:StyleID="s70"><Data ss:Type="String">${item.designCostCheck!""}</Data></Cell>
+    <Cell ss:StyleID="s70"><Data ss:Type="String">${item.supervisorCostCheck!""}</Data></Cell>
+   </Row>
+  </Table>
+  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
+   <PageSetup>
+    <Header x:Margin="0.3"/>
+    <Footer x:Margin="0.3"/>
+    <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
+   </PageSetup>
+   <Print>
+    <ValidPrinterInfo/>
+    <PaperSizeIndex>9</PaperSizeIndex>
+    <HorizontalResolution>600</HorizontalResolution>
+    <VerticalResolution>600</VerticalResolution>
+   </Print>
+   <Selected/>
+   <Panes>
+    <Pane>
+     <Number>3</Number>
+     <ActiveRow>7</ActiveRow>
+     <ActiveCol>3</ActiveCol>
+    </Pane>
+   </Panes>
+   <ProtectObjects>False</ProtectObjects>
+   <ProtectScenarios>False</ProtectScenarios>
+  </WorksheetOptions>
+ </Worksheet>
+</Workbook>

+ 3 - 1
src/main/webapp/webpage/modules/sg/financial/settlement/costCheckList.js

@@ -295,7 +295,9 @@
 
 
         $("#export").click(function () {//导出Excel文件
-            jp.downloadFile('${ctx}/sg/settlement/export');
+            let projectId = $('#projectId').val();
+            let projectName = $('#projectName').val();
+            jp.downloadFile('${ctx}/cost/check/export?projectId=' + projectId + '&projectName=' + projectName);
         });
 
         $("#search").click("click", function () {// 绑定查询按扭

+ 271 - 0
src/main/webapp/webpage/modules/sg/financial/settlement/donorMaterialList.js

@@ -0,0 +1,271 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+    $(document).ready(function () {
+        //定义方法---在bootstrap数据循环中使用,必须定义在bootstrapTable之前
+        window.operateEvents = {
+            'blur .operate': function (e, value, row, index) {
+                let val1 = $('#operate'+ index).val();
+                jp.confirm('确认修改项目甲供材备注吗?', function () {
+                    jp.loading();
+                    jp.get("${ctx}/donor/material/updateRemarks?id=" + row.id + "&remarks=" + val1, function (data) {
+                        if (data.success) {
+                            $('#dataTable').bootstrapTable('refresh');
+                            jp.success(data.msg);
+                        } else {
+                            jp.error(data.msg);
+                        }
+                    });
+                },function () {
+                    $('#dataTable').bootstrapTable('refresh');
+                })
+            }
+        };
+        $('#dataTable').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}/donor/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',
+            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}/sg/settlement/delete?id=" + row.projectId, function (data) {
+                            if (data.success) {
+                                $('#dataTable').bootstrapTable('refresh');
+                                jp.success(data.msg);
+                            } else {
+                                jp.error(data.msg);
+                            }
+                        })
+
+                    });
+
+                }
+            },
+            onClickRow: function (row, $el) {
+            },
+            onShowSearch: function () {
+                $("#search-collapse").slideToggle();
+            },
+            columns: [
+                {
+                    field: 'projectId',
+                    width: '150px',
+                    title: '项目编码'
+                }
+                ,{
+                    field: 'projectName',
+                    width: '200px',
+                    title: '项目名称'
+                }
+                ,{
+                    field: 'materialType',
+                    width: '130px',
+                    title: '物料类别'
+                }
+                ,{
+                    field: 'materialCode',
+                    width: '130px',
+                    title: '物料编码'
+                }
+                ,{
+                    field: 'materialName',
+                    width: '130px',
+                    title: '材料名称'
+                }
+                ,{
+                    field: 'materialDescribe',
+                    width: '130px',
+                    title: '物料描述'
+                }
+                ,{
+                    field: 'unit',
+                    width: '130px',
+                    title: '单位'
+                }
+                ,{
+                    field: 'examinedNum',
+                    width: '130px',
+                    title: '审定数量',
+                }
+                ,{
+                    field: 'erpNum',
+                    width: '130px',
+                    title: 'erp数量'
+                }
+                ,{
+                    field: 'erpDifferent',
+                    width: '130px',
+                    title: '差额'
+                },{
+                    field: 'remarks',
+                    title: '备注',
+                    width: '130px',
+                    events: operateEvents,
+                    formatter: function (value,row,index) {
+                        let option
+                        option = '<input id="operate'+index+'" type="input" value="' + (row.remarks==undefined?"":row.remarks) +'" class="form-control operate">'
+                        return option
+                    }
+                }
+            ]
+    });
+
+
+        if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端
+            $('#dataTable').bootstrapTable("toggleView");
+        }
+
+        $('#dataTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+            'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', !$('#dataTable').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#dataTable').bootstrapTable('getSelections').length != 1);
+        });
+
+        $("#btnImport").click(function(){
+            jp.open({
+                type: 2,
+                area: [800, 400],
+                auto: true,
+                title:"导入数据",
+                content: "${ctx}/donor/material/importMore/Form" ,
+                btn: ['确定', '关闭'],
+                btn1: function(index, layero){
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    iframeWin.contentWindow.importExcel('${ctx}/donor/material/importValidations', function (data) {
+                        if(data.success){
+                            jp.success(data.msg);
+                            refresh();
+                        }else{
+                            jp.error(data.msg);
+                        }
+                        jp.close(index);
+                    });//调用保存事件
+                    return false;
+                },
+                btn2: function(index){
+                    jp.close(index);
+                }
+            });
+        })
+
+
+        $("#export").click(function () {//导出Excel文件
+            let projectId = $('#projectId').val();
+            let projectName = $('#projectName').val();
+            jp.downloadFile('${ctx}/donor/material/export?projectId=' + projectId + '&projectName=' + projectName);
+        });
+
+        //导出说明word
+        $("#exportDoc").click(function(){
+            let projectId = $('#projectId').val();
+            let projectName = $('#projectName').val();
+            jp.downloadFile('${ctx}/donor/material/exportInformation?projectId='+projectId+'&projectName='+projectName);
+        });
+
+        // 绑定查询按扭
+        $("#search").click("click", function () {
+            $('#dataTable').bootstrapTable('refresh');
+        });
+
+        // 绑定查询按扭
+        $("#reset").click("click", function () {
+            $("#searchForm  input").val("");
+            $("#searchForm  select").val("");
+            $("#searchForm  .select-item").html("");
+            $('#dataTable').bootstrapTable('refresh');
+        });
+    });
+
+function getIdSelections() {
+    return $.map($("#dataTable").bootstrapTable('getSelections'), function (row) {
+        return row.projectId
+    });
+}
+
+
+
+function deleteAll() {
+    jp.confirm('确认要删除该数据记录吗?', function () {
+        jp.loading();
+        jp.get("${ctx}/sg/settlement/deleteAll?ids=" + getIdSelections(), function (data) {
+            if (data.success) {
+                $('#dataTable').bootstrapTable('refresh');
+                jp.success(data.msg);
+            } else {
+                jp.error(data.msg);
+            }
+        })
+
+    })
+}
+
+//刷新列表
+function refresh() {
+    $('#dataTable').bootstrapTable('refresh');
+}
+
+function edit(id) {//没有权限时,不显示确定按钮
+    if (id == undefined) {
+        id = getIdSelections();
+    }
+    jp.openSaveDialog('编辑', "${ctx}/sg/settlement/form?id=" + id, '800px', '500px');
+}
+
+function view(id) {//没有权限时,不显示确定按钮
+    if (id == undefined) {
+        id = getIdSelections();
+    }
+    jp.openViewDialog('查看', "${ctx}/sg/settlement/form?id=" + id, '800px', '500px');
+}
+</script>

+ 84 - 0
src/main/webapp/webpage/modules/sg/financial/settlement/donorMaterialList.jsp

@@ -0,0 +1,84 @@
+<%@ 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="donorMaterialList.js" %>
+    <script src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table-resizable.js"></script>
+    <script src="${ctxStatic}/plugin/bootstrapTable/colResizable-1.6.js"></script>
+</head>
+<style>
+    .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>
+<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="donorMaterial"
+                               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="64" 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="64" class=" form-control"/>
+                        </div>
+                        <div class="col-xs-12 col-sm-6 col-md-4">
+                            <div style="margin-top:26px">
+                                <a id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i
+                                        class="fa fa-search"></i> 查询</a>
+                                <a id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i
+                                        class="fa fa-refresh"></i> 重置</a>
+                            </div>
+                        </div>
+                    </form:form>
+                </div>
+            </div>
+
+            <!-- 工具栏 -->
+            <div id="toolbar">
+                <shiro:hasPermission name="donor:material:import">
+                    <button id="btnImport" class="btn btn-info">
+                        <i class="fa fa-file-excel-o"></i> 多文件导入
+                    </button>
+                </shiro:hasPermission>
+                <shiro:hasPermission name="donor:material:export">
+                    <button id="export" class="btn btn-warning">
+                        <i class="fa fa-file-excel-o"></i> 导出
+                    </button>
+                </shiro:hasPermission>
+                <shiro:hasPermission name="donor:material:export">
+                    <button id="exportDoc" class="btn btn-warning">
+                        <i class="fa fa-file-excel-o"></i> 导出欠供说明
+                    </button>
+                </shiro:hasPermission>
+            </div>
+
+            <!-- 表格 -->
+            <table id="dataTable" style="table-layout:fixed" data-toolbar="#toolbar"></table>
+        </div>
+    </div>
+</div>
+</body>
+</html>

+ 207 - 0
src/main/webapp/webpage/modules/sg/financial/settlement/donorMore.jsp

@@ -0,0 +1,207 @@
+<%@ page contentType="text/html;charset=UTF-8"%>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<link rel="stylesheet" href="${ctxStatic}/plugin/layui/dist/css/layui.css">
+<script src="${pageContext.request.contextPath}/act/rest/js/common/jquery-1.8.3.js"></script>
+<script src="${ctxStatic}/plugin/layui/dist/layui.js"></script>
+<script src="${ctxStatic}/common/js/jeeplus.js"></script>
+
+<html>
+<head>
+    <title>添加</title>
+    <meta http-equiv=Content-Type content=“text/html;charset=utf-8″>
+    <meta http-equiv=X-UA-Compatible content=IE=EmulateIE7>
+    <meta name="renderer" content="webkit">
+    <style>
+        .layui-input{ height: 28px;margin-top: 6px;line-height: 28px}
+        .layui-table-view .layui-table {width:100%}
+        .myselect{border: none;padding: 5px 7px;min-height: 20px;color: #666666;line-height: 20px}
+        .mydiv{padding: 5px 7px;min-height: 20px;border: whitesmoke;line-height: 20px}
+        .mydiv:empty:before{content: attr(placeholder);color:#999999;}
+        .mydiv:focus:before{content:none}
+        .layui-table-tips-main{display:none}
+        .layui-table-tips-c{display:none}
+    </style>
+</head>
+<body style="height: 100%;line-height: 100%">
+<div style="padding: 10px;">
+    <div class="layui-main-bgc">
+        <div class="layui-row layui-col-space15">
+            <div class="layui-col-md12">
+                <div class="layui-card">
+                        <div class="layui-card-body" style="margin-top: 2px;">
+                            <div class="layui-upload">
+                                <button type="button" class="layui-btn layui-btn-normal" id="add_List">添加文件</button>
+                                <div class="layui-upload-list">
+                                        <table class="layui-table" id="mytable">
+                                        <thead>
+                                        <tr>
+                                            <th width="45%">*文件名称</th>
+                                            <th width="22%" style="text-align: center">操作</th>
+                                        </tr></thead>
+                                        <tbody id="tbody_List">
+                                        </tbody>
+                                    </table>
+                                </div>
+                        </div>
+                    </div>
+                </div>
+             </div>
+        </div>
+    </div>
+</div>
+</body>
+<script type="text/javascript">
+    /*//定义存放文件数组*/
+    var arrayFile=[];
+    /*加载layui文件上传*/
+    layui.use('upload', function(){
+        var $ = layui.jquery
+            ,upload = layui.upload;
+        //多文件列表示例
+        var tbodyListView = $('#tbody_List')
+            ,uploadListIns = upload.render({
+            elem: '#add_List'
+            ,accept: 'file'
+            ,exts:'xls|xlsx'
+            ,multiple: true
+            ,auto: false
+            ,choose: function(obj){
+                // var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
+                //读取本地文件
+                obj.preview(function(index, file, result){
+                    //添加 id 到数组
+                    arrayFile.push(index);
+                    //添加文件到数组
+                    arrayFile.push(file);
+                    //拼接生成表格
+                    var tr = $(['<tr id='+index+'>'
+                        ,'<td hidden><div class="td_id">'+index+'</div></td>'
+                        ,'<td readonly="readonly"><input id="myDiv" type="textarea" style="width: 100%" contenteditable="true" readonly="true" disabled="true" class="mydiv1 mydiv" placeholder="请输入项目名称" value="'+file.name.split(".")[0]+'"></input></td>'
+                        // ,'<td>'
+                        // ,' <select name="type" class="myselect"><option value="">请选择项目类型</option><option value="1">架空线路工程</option><option value="2">电缆工程</option><option value="3">变电站工程</option></select>'
+                        // ,'<td><div contenteditable="true" class="mydiv2 mydiv" placeholder="请输入项目编号"></div></td>'
+                        // ,'<td><div contenteditable="true" class="mydiv3 mydiv" placeholder="请输入供应商"></div></td>'
+                        ,'<td style="text-align: center">'
+                        ,'<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
+                        ,'</td>'
+                        ,'</tr>'].join(''));
+                    //删除
+                    tr.find('.demo-delete').on('click', function(){
+                        // delete files[index]; //删除对应的文件
+                        tr.remove();//删除tr
+                        //清空input file当中已经存在文件
+                        uploadListIns.config.elem.next()[0].value = '';
+                    });
+
+                    tbodyListView.append(tr);
+                    //清空input file当中已经存在文件
+                    uploadListIns.config.elem.next()[0].value = '';
+                });
+            }
+        });
+    });
+
+    function importExcel(url, fn) {
+        var formdata = new FormData();
+        // 获取表格id的值
+        var file = $(":file").val;
+        //获取输入的项目名称
+        var div1 =  $(".mydiv1");
+        console.log(div1);
+        //判断列表中项目名称是否为空
+        if (div1.length<=0){
+            layer.msg("请选择文件",{icon: 3,offset:['40%','40%']});
+            return false;
+        }
+        //存储列表中 输入项目名称的值
+        var divvalue=[];
+        //存储列表中 输入项目名称的值
+        var div_val=[];
+        //循环获取当前项目列表的项目名称
+        for (var i = 0; i < div1.length; i++) {
+            //存放到集合当中
+            divvalue[i]=div1[i].defaultValue;
+            console.log('div1[i].defaultValue');
+            console.log(div1[i].defaultValue);
+            div_val[i]=div1[i].defaultValue;
+        }
+        //判断项目名称是否重复
+        for (var i = 0; i < divvalue.length; i++) {
+            if(div_val[i] === divvalue[i+1]){
+                layer.msg("选择文件重复",{icon: 5,offset:['40%','40%']});
+                throw SyntaxError;
+            }
+        }
+        //根据id获取对象文件传入后台
+        for (var j = 0; j < arrayFile.length; j++) {
+            //追加文件到表单当中
+            formdata.append("file",arrayFile[j+1]);
+        }
+        jp.loading('  正在导入,请稍等...');
+        $.ajax({
+            type: "POST",
+            enctype: 'multipart/form-data',
+            url: url,
+            data: formdata,
+            processData: false, //prevent jQuery from automatically transforming the data into a query string
+            contentType: false,
+            cache: false,
+            timeout: 600000,
+            success: function (result) {
+                if(result.success && result.errorCode === '-1'){
+                    jp.confirm('项目'+result.msg+'已存在,确定覆盖嘛?', function(){
+                        jp.loading('  正在导入,请稍等...');
+                        $.ajax({
+                            type: "POST",
+                            enctype: 'multipart/form-data',
+                            url: '${ctx}/donor/material/imports',
+                            data: formdata,
+                            processData: false, //prevent jQuery from automatically transforming the data into a query string
+                            contentType: false,
+                            cache: false,
+                            timeout: 600000,
+                            success: function (result) {
+                                fn(result);
+                            }
+                        })
+                    });
+                }else if((result.success && result.errorCode === '0')){
+                    fn(result)
+                }
+            },
+            error:function(xhr, textStatus){
+                if(xhr.status == 0){
+                    jp.info("连接失败,请检查网络!")
+                }else if(xhr.status == 404){
+                    var errDetail ="<font color='red'>404,请求地址不存在!</font>";
+                    top.layer.alert(errDetail , {
+                        icon: 2,
+                        area:['auto','auto'],
+                        title:"请求出错"
+                    })
+                }else if(xhr.status && xhr.responseText){
+                    var errDetail ="<font color='red'>"+ xhr.responseText.replace(/[\r\n]/g,"<br>").replace(/[\r]/g,"<br>").replace(/[\n]/g,"<br>")+"</font>";
+                    top.layer.alert(errDetail , {
+                        icon: 2,
+                        area:['80%','70%'],
+                        title:xhr.status+"错误"
+                    })
+                }else{
+                    var errDetail =xhr.responseText=="<font color='red'>未知错误!</font>";
+                    top.layer.alert(errDetail , {
+                        icon: 2,
+                        area:['auto','auto'],
+                        title:"真悲剧,后台抛出异常了"
+                    })
+                }
+            }
+        })
+    }
+</script>
+<script>
+    layui.use('form',function () {
+        var  form = layui.form;
+        form.render();
+    })
+</script>
+</html>

+ 241 - 0
src/main/webapp/webpage/modules/sg/financial/settlement/financeList.js

@@ -0,0 +1,241 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+    $(document).ready(function () {
+        $('#dataTable').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}/finance/budget/financeData",
+            //默认值为 '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}/sg/settlement/delete?id=" + row.projectId, function (data) {
+                            if (data.success) {
+                                $('#dataTable').bootstrapTable('refresh');
+                                jp.success(data.msg);
+                            } else {
+                                jp.error(data.msg);
+                            }
+                        })
+
+                    });
+
+                }
+            },
+            onClickRow: function (row, $el) {
+            },
+            onShowSearch: function () {
+                $("#search-collapse").slideToggle();
+            },
+            columns: [[
+                {
+                    field: 'projectId',
+                    title: '项目编号',
+                    valign:"middle",
+                    align:"center",
+                    rowspan: 2
+                }
+                ,{
+                    field: 'projectName',
+                    title: '项目名称',
+                    valign:"middle",
+                    align:"center",
+                    rowspan: 2
+                }
+                ,{
+                    field: 'projectType',
+                    title: '项目类型',
+                    valign:"middle",
+                    align:"center",
+                    rowspan: 2
+                }
+                ,{
+                    field: 'totalInvestment',
+                    title: '概预算信息',
+                    valign:"middle",
+                    align:"center",
+                    rowspan: 2
+                }
+                ,{
+                    field: 'donorMaterialCheck',
+                    title: '甲供材领退料检查',
+                    valign:"middle",
+                    align:"center",
+                    rowspan: 2
+                },{
+                    title: '费用检查',
+                    valign:"middle",
+                    align:"center",
+                    colspan: 3,
+                    rowspan: 1
+                }
+            ],[
+                {
+                    field: 'constructionCostCheck',
+                    valign:"middle",
+                    align:"center",
+                    title: '施工费检查'
+                }
+                ,{
+                    field: 'designCostCheck',
+                    valign:"middle",
+                    align:"center",
+                    title: '设计费检查',
+                },{
+                    field: 'supervisorCostCheck',
+                    valign:"middle",
+                    align:"center",
+                    title: '监理费检查',
+                }
+            ]]
+    });
+
+        if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端
+            $('#dataTable').bootstrapTable("toggleView");
+        }
+
+        $('#dataTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+            'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', !$('#dataTable').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#dataTable').bootstrapTable('getSelections').length != 1);
+        });
+
+        $("#btnImport").click(function () {
+            jp.open({
+                type: 2,
+                area: [500, 200],
+                auto: true,
+                title: "导入数据",
+                content: "${ctx}/tag/importExcel",
+                btn: ['确定', '关闭'],
+                btn1: function (index, layero) {
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    iframeWin.contentWindow.importExcel('${ctx}/finance/budget/import', function (data) {
+                        if (data.success) {
+                            jp.success(data.msg);
+                            refresh();
+                        } else {
+                            jp.error(data.msg);
+                        }
+                        jp.close(index);
+                    });//调用保存事件
+                    return false;
+                },
+
+                btn2: function (index) {
+                    jp.close(index);
+                }
+            });
+        });
+
+
+        $("#export").click(function () {//导出Excel文件
+            let projectId = $('#projectId').val();
+            let projectName = $('#projectName').val();
+            jp.downloadFile('${ctx}/finance/budget/exportFinanceExcel?projectId=' + projectId + '&projectName=' + projectName);
+        });
+
+        $("#search").click("click", function () {// 绑定查询按扭
+            $('#dataTable').bootstrapTable('refresh');
+        });
+
+        $("#reset").click("click", function () {// 绑定查询按扭
+            $("#searchForm  input").val("");
+            $("#searchForm  select").val("");
+            $("#searchForm  .select-item").html("");
+            $('#dataTable').bootstrapTable('refresh');
+        });
+
+    });
+
+function getIdSelections() {
+    return $.map($("#dataTable").bootstrapTable('getSelections'), function (row) {
+        return row.projectId
+    });
+}
+
+function deleteAll() {
+    jp.confirm('确认要删除该数据记录吗?', function () {
+        jp.loading();
+        jp.get("${ctx}/finance/budget/deleteAll?ids=" + getIdSelections(), function (data) {
+            if (data.success) {
+                $('#dataTable').bootstrapTable('refresh');
+                jp.success(data.msg);
+            } else {
+                jp.error(data.msg);
+            }
+        })
+
+    })
+}
+
+//刷新列表
+function refresh() {
+    $('#dataTable').bootstrapTable('refresh');
+}
+
+function edit(id) {//没有权限时,不显示确定按钮
+    if (id == undefined) {
+        id = getIdSelections();
+    }
+    jp.openSaveDialog('编辑', "${ctx}/finance/budget/form?id=" + id, '800px', '500px');
+}
+
+function view(id) {//没有权限时,不显示确定按钮
+    if (id == undefined) {
+        id = getIdSelections();
+    }
+    jp.openViewDialog('查看', "${ctx}/finance/budget/form?id=" + id, '800px', '500px');
+}
+</script>

+ 78 - 0
src/main/webapp/webpage/modules/sg/financial/settlement/financeList.jsp

@@ -0,0 +1,78 @@
+<%@ 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="financeList.js" %>
+    <script src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table-resizable.js"></script>
+    <script src="${ctxStatic}/plugin/bootstrapTable/colResizable-1.6.js"></script>
+</head>
+<style>
+    .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>
+<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="projectBudget"
+                               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="64" 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="64" class=" form-control"/>
+                        </div>
+                        <div class="col-xs-12 col-sm-6 col-md-4">
+                            <div style="margin-top:26px">
+                                <a id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i
+                                        class="fa fa-search"></i> 查询</a>
+                                <a id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i
+                                        class="fa fa-refresh"></i> 重置</a>
+                            </div>
+                        </div>
+                    </form:form>
+                </div>
+            </div>
+
+            <!-- 工具栏 -->
+            <div id="toolbar">
+                <shiro:hasPermission name="finance:budget:import">
+                    <button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入ERP</button>
+                </shiro:hasPermission>
+                <shiro:hasPermission name="finance:budget:export">
+                    <button id="export" class="btn btn-warning">
+                        <i class="fa fa-file-excel-o"></i> 导出
+                    </button>
+                </shiro:hasPermission>
+            </div>
+
+            <!-- 表格 -->
+            <table id="dataTable" style="table-layout:fixed" data-toolbar="#toolbar"></table>
+        </div>
+    </div>
+</div>
+</body>
+</html>

+ 1 - 18
src/main/webapp/webpage/modules/sg/managementcenter/materialinfo/importmore.jsp

@@ -37,17 +37,6 @@
                                         <input type="text" id="myinput" autocomplete="off" placeholder=""  class="layui-input">
                                     </div>
                                 </div>
-                                <%--<div class="layui-inline">--%>
-                                    <%--<label class="layui-form-label">*物料批次</label>--%>
-                                    <%--<div class="layui-input-inline">--%>
-                                        <%--<select name="suppliesBatch"  id="suppliesBatch">--%>
-                                            <%--<option value="">请选择</option>--%>
-                                            <%--<c:forEach var="item" items="${batch}">--%>
-                                                <%--<option value="${item.suppliesBatch}">${item.suppliesBatch}</option>--%>
-                                            <%--</c:forEach>--%>
-                                        <%--</select>--%>
-                                    <%--</div>--%>
-                                <%--</div>--%>
                             </div>
                             </form>
                             <div class="layui-upload">
@@ -57,9 +46,6 @@
                                         <thead>
                                         <tr>
                                             <th width="45%">*文件名称</th>
-                                            <%--<th width="17%">*项目类型</th>--%>
-                                            <%--<th width="25%">*结算书编号</th>--%>
-                                            <%--<th width="33%">*供应商</th>--%>
                                             <th width="22%" style="text-align: center">操作</th>
                                         </tr></thead>
                                         <tbody id="tbody_List">
@@ -67,9 +53,6 @@
                                         </tbody>
                                     </table>
                                 </div>
-                             <%--<div style="margin-top: 20px">--%>
-                                <%--<button id="mybtn" type="button" class="layui-btn" style="width: 70px;" onclick="okSubmit()">确定</button>--%>
-                            <%--</div>--%>
                         </div>
                     </div>
                 </div>
@@ -104,7 +87,7 @@
                     //拼接生成表格
                     var tr = $(['<tr id='+index+'>'
                         ,'<td hidden><div class="td_id">'+index+'</div></td>'
-                        ,'<td><div contenteditable="true" class="mydiv1 mydiv" placeholder="请输入项目名称">'+file.name.split(".")[0]+'</div></td>'
+                        ,'<td><div contenteditable="true" readonly="true" class="mydiv1 mydiv" placeholder="请输入项目名称">'+file.name.split(".")[0]+'</div></td>'
                         // ,'<td>'
                         // ,' <select name="type" class="myselect"><option value="">请选择项目类型</option><option value="1">架空线路工程</option><option value="2">电缆工程</option><option value="3">变电站工程</option></select>'
                         // ,'<td><div contenteditable="true" class="mydiv2 mydiv" placeholder="请输入项目编号"></div></td>'