Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

赵芳群 2 лет назад
Родитель
Сommit
1d4350f0bc

+ 174 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/onPassageMaterials/service/OnPassageMaterialsService.java

@@ -4,11 +4,22 @@
 package com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.service;
 
 import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.entity.MaterialInformation;
 import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.entity.OnPassageMaterials;
 import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.mapper.OnPassageMaterialsMapper;
+import com.jeeplus.modules.sg.balancedlibrary.reportPerson.entity.ReportPerson;
+import com.jeeplus.modules.sg.balancedlibrary.reportPerson.mapper.ReportPersonMapper;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
 
 /**
  * 在途物资Service
@@ -19,5 +30,168 @@ import org.springframework.transaction.annotation.Transactional;
 @Transactional(readOnly = true)
 public class OnPassageMaterialsService extends CrudService<OnPassageMaterialsMapper, OnPassageMaterials> {
 
+    @Autowired
+    private ReportPersonMapper reportPersonMapper;
+
+    public void comparativeData(List<OnPassageMaterials> onPassageMaterialsList, List<MaterialInformation> materialInformationList){
+        List<String> goHeavy = new ArrayList<>();
+        //物料编码 计划编制人相同
+        List<OnPassageMaterials> sameList = new ArrayList<>();
+        //计划编制人为空
+        List<OnPassageMaterials> isEmptyList = new ArrayList<>();
+        //统计物料编码 部门
+        Map<String, String> materialCountMap = new HashMap<>();
+        //统计物料编码 计划编制人相同合同数量
+        Map<String, BigDecimal> sameMap = new HashMap<>();
+        //统计计划编制人为空合同数量
+        Map<String, BigDecimal> isEmptyMap = new HashMap<>();
+        //在途物资表J列
+        Map<String, BigDecimal> JMap = new HashMap<>();
+        //项目物资需求表H列
+        Map<String, BigDecimal> HMap = new HashMap<>();
+
+        //从数据库中索取所有部门及提报人
+        Map<String, List<ReportPerson>> reportPersonMap = getReportPerson();
+        /**************************************************************************/
+        //循环比较找出 计划编制人为空添加isEmptyMap 根据计划编制人找出所在部门 物料编码-部门为去重条件
+        onPassageMaterialsList.forEach(opm -> {
+            String key = "";
+            if (!opm.getPlanner().isEmpty()) {
+                //计划编制人不为空存放
+                String temp = opm.getMaterialCode() + "-" + opm.getPlanner();
+                //去重 物料编码-计划编制人
+                if(!goHeavy.contains(temp)){
+                    goHeavy.add(temp);
+                    sameList.add(opm);
+                }
+                String reportPersonOfDepartment = getReportPersonOfDepartment(reportPersonMap, opm.getPlanner());
+                if (reportPersonOfDepartment!=null) {
+                    key = opm.getMaterialCode() + "-" + reportPersonOfDepartment;
+                } else {
+                    key = opm.getMaterialCode()/* + "-"*/;
+                }
+
+                dataCount(sameMap, sameList, key);
+            } else {
+                //提报人为空
+                /*key = opm.getMaterialCode();
+                isEmptyList.add(opm);
+                dataCount(isEmptyMap, isEmptyList, key);*/
+            }
+        });
+
+
+        materialInformationList.forEach(m -> {
+            String key = "";
+            if(!m.getReportingDepartment().isEmpty()){
+                key = m.getMaterialCode() + "-" + m.getReportingDepartment();
+            }else{
+                key = m.getMaterialCode();
+            }
+            //如果有相同的去重不加
+            if (materialCountMap.containsKey(key)) {
+					/*BigDecimal temp = new BigDecimal(String.valueOf(materialCountMap.get(key)));
+					temp = new BigDecimal(m.getTotal()).add(temp);
+					materialCountMap.put(key, temp);*/
+            } else {
+                materialCountMap.put(key, m.getTotal());
+            }
+        });
+
+        materialCountMap.forEach((k, v) -> {
+            String[] split = k.split("-");
+            //如果有该部门则增加
+            if(split.length==2){
+                if (HMap.containsKey(split[1])) {
+                    BigDecimal temp = new BigDecimal(v).add(HMap.get(split[1]));
+                    HMap.put(split[1], temp);
+                } else {
+                    HMap.put(split[1], new BigDecimal(v));
+                }
+            }
+
+        });
+
+        sameMap.forEach((k, v) -> {
+            String[] split = k.split("-");
+            //如果有该部门则增加
+            if(split.length==2){
+                if (JMap.containsKey(split[1])) {
+                    BigDecimal temp = v.add(JMap.get(split[1]));
+                    JMap.put(split[1], temp);
+                } else {
+                    JMap.put(split[1], v);
+                }
+            }
+        });
+
+
+
+        /******************两表比较*******************/
+
+        HMap.forEach((k, v) -> {
+            if (JMap.containsKey(k)) {
+                if (JMap.get(k).compareTo(v) >= 0) {
+                    materialInformationList.forEach(m -> {
+                        if (m.getReportingDepartment().equals(k)) {
+                            m.setRemarkText("在途已有" + JMap.get(k) + "单位,请核实本次需求");
+                        }
+                    });
+                }
+            }
+        });
+    }
+
+    private void dataCount(Map<String, BigDecimal> map, List<OnPassageMaterials> list, String key) {
+        list.forEach(l -> {
+            //如果有相同就不加去重
+            if (map.containsKey(key)) {
+                BigDecimal temp = new BigDecimal(String.valueOf(map.get(key)));
+                temp = new BigDecimal(l.getContractCount()).add(temp);
+                map.put(key, temp);
+
+            } else {
+                map.put(key, new BigDecimal(l.getContractCount()));
+            }
+        });
+    }
+
+    /**
+     * 查询数据库获取对应的部门及部门下的人
+     * @return
+     */
+    private Map<String,List<ReportPerson>> getReportPerson(){
+        Map<String,List<ReportPerson>> map = new HashMap<>();
+        /*List<String> department = reportPersonMapper.findDepartment();
+        department.forEach(l->{
+            map.put(l,reportPersonMapper.findDepartmentOfPerson(l));
+        });*/
+        List<ReportPerson> departmentGroupByPerson = reportPersonMapper.findDepartmentGroupByPerson();
+        departmentGroupByPerson.forEach(l->{
+            if(map.containsKey(l.getReportDepartment())){
+                map.get(l.getReportDepartment()).add(l);
+            }else{
+                List<ReportPerson> reportPeople = new ArrayList<>();
+                reportPeople.add(l);
+                map.put(l.getReportDepartment(),reportPeople);
+            }
+        });
+        return map;
+    }
+
+    /**
+     * 获取提报人部门
+     */
+    private String getReportPersonOfDepartment(Map<String, List<ReportPerson>> reportPerson,String name){
+        AtomicReference<String> departmentName = new AtomicReference<>();
+        reportPerson.forEach((k,v)->{
+            v.forEach(l->{
+                if(l.getReportPerson().equals(name)){
+                    departmentName.set(k);
+                }
+            });
+        });
+        return departmentName.get();
+    }
 
 }

+ 4 - 128
src/main/java/com/jeeplus/modules/sg/balancedlibrary/onPassageMaterials/web/OnPassageMaterialsController.java

@@ -4,7 +4,6 @@
 package com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.web;
 
 
-import com.fasterxml.jackson.databind.exc.InvalidFormatException;
 import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.common.utils.excel.ExportExcel;
@@ -17,6 +16,7 @@ import com.jeeplus.core.web.BaseController;
 import com.jeeplus.modules.sg.balancedlibrary.reportPerson.entity.ReportPerson;
 import com.jeeplus.modules.sg.balancedlibrary.reportPerson.mapper.ReportPersonMapper;
 import com.jeeplus.modules.sg.balancedlibrary.reportPerson.service.ReportPersonService;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -75,21 +75,7 @@ public class OnPassageMaterialsController extends BaseController {
     @PostMapping("import")
     public AjaxJson importFile(@RequestParam("file") MultipartFile[] file, HttpServletResponse response, HttpServletRequest request) {
         AjaxJson ajaxJson = new AjaxJson();
-        List<String> goHeavy = new ArrayList<>();
-        //物料编码 计划编制人相同
-        List<OnPassageMaterials> sameList = new ArrayList<>();
-        //计划编制人为空
-        List<OnPassageMaterials> isEmptyList = new ArrayList<>();
-        //统计物料编码 部门
-        Map<String, String> materialCountMap = new HashMap<>();
-        //统计物料编码 计划编制人相同合同数量
-        Map<String, BigDecimal> sameMap = new HashMap<>();
-        //统计计划编制人为空合同数量
-        Map<String, BigDecimal> isEmptyMap = new HashMap<>();
-        //在途物资表J列
-        Map<String, BigDecimal> JMap = new HashMap<>();
-        //项目物资需求表H列
-        Map<String, BigDecimal> HMap = new HashMap<>();
+
         try {
             //获取两张excel表
             ImportExcel ei = new ImportExcel(file[0], 1, 0);
@@ -97,129 +83,19 @@ public class OnPassageMaterialsController extends BaseController {
             //转换为集合
             List<OnPassageMaterials> onPassageMaterialsList = ei.getDataList(OnPassageMaterials.class);
             List<MaterialInformation> materialInformationList = ie.getDataList(MaterialInformation.class);
-            /**************************************************************************/
-            //循环比较找出 计划编制人为空添加isEmptyMap 根据计划编制人找出所在部门 物料编码-部门为去重条件
-            onPassageMaterialsList.forEach(opm -> {
-                String key = "";
-                if (!opm.getPlanner().isEmpty()) {
-                    //计划编制人不为空存放
-                    String temp = opm.getMaterialCode() + "-" + opm.getPlanner();
-                    //去重 物料编码-计划编制人
-                    if(!goHeavy.contains(temp)){
-                        goHeavy.add(temp);
-                        sameList.add(opm);
-                    }
-                    //创建提交人对象
-                    ReportPerson reportPerson = new ReportPerson();
-                    reportPerson.setReportPerson(opm.getPlanner());
-                    //根据名称查询
-                    List<ReportPerson> list = reportPersonService.findList(reportPerson);
-                    //如果不为空,出现重名情况默认取第一个
-                    if (!list.isEmpty()) {
-                        key = opm.getMaterialCode() + "-" + list.get(0).getReportDepartment();
-                    } else {
-                        key = opm.getMaterialCode()/* + "-"*/;
-                    }
-
-                    dataCount(sameMap, sameList, key);
-                } else {
-                    key = opm.getMaterialCode();
-                    isEmptyList.add(opm);
-                    dataCount(isEmptyMap, isEmptyList, key);
-                }
-            });
-            materialInformationList.forEach(m -> {
-                String key = "";
-                if(!m.getReportingDepartment().isEmpty()){
-                    key = m.getMaterialCode() + "-" + m.getReportingDepartment();
-                }else{
-                    key = m.getMaterialCode();
-                }
-                    //如果有相同的去重不加
-                    if (materialCountMap.containsKey(key)) {
-					/*BigDecimal temp = new BigDecimal(String.valueOf(materialCountMap.get(key)));
-					temp = new BigDecimal(m.getTotal()).add(temp);
-					materialCountMap.put(key, temp);*/
-                    } else {
-                        materialCountMap.put(key, m.getTotal());
-                    }
-            });
-
-            materialCountMap.forEach((k, v) -> {
-                String[] split = k.split("-");
-                //如果有该部门则增加
-                if(split.length==2){
-                    if (HMap.containsKey(split[1])) {
-                        BigDecimal temp = new BigDecimal(v).add(HMap.get(split[1]));
-                        HMap.put(split[1], temp);
-                    } else {
-                        HMap.put(split[1], new BigDecimal(v));
-                    }
-                }
-
-            });
-
-            sameMap.forEach((k, v) -> {
-                String[] split = k.split("-");
-                //如果有该部门则增加
-                if(split.length==2){
-                    if (JMap.containsKey(split[1])) {
-                        BigDecimal temp = v.add(JMap.get(split[1]));
-                        JMap.put(split[1], temp);
-                    } else {
-                        JMap.put(split[1], v);
-                    }
-                }
-            });
-
-
-
-            /******************两表比较*******************/
-
-            HMap.forEach((k, v) -> {
-                if (JMap.containsKey(k)) {
-                    if (JMap.get(k).compareTo(v) >= 0) {
-                        materialInformationList.forEach(m -> {
-                            if (m.getReportingDepartment().equals(k)) {
-                                m.setRemarkText("在途已有" + JMap.get(k) + "单位,请核实本次需求");
-                            }
-                        });
-                    }
-                }
-            });
 
+            service.comparativeData(onPassageMaterialsList,materialInformationList);
 
 
             /***********************************************/
             String fileName = "项目物资需求表" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
             new ExportExcel("", MaterialInformation.class).setDataList(materialInformationList).write(response, fileName).dispose();
 
-        } catch (InvalidFormatException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        } catch (IllegalAccessException e) {
-            e.printStackTrace();
-        } catch (InstantiationException e) {
-            e.printStackTrace();
-        } catch (org.apache.poi.openxml4j.exceptions.InvalidFormatException e) {
+        } catch (InvalidFormatException | IOException | InstantiationException | IllegalAccessException e) {
             e.printStackTrace();
         }
         return ajaxJson;
     }
 
-    private void dataCount(Map<String, BigDecimal> map, List<OnPassageMaterials> list, String key) {
-        list.forEach(l -> {
-            //如果有相同就不加去重
-            if (map.containsKey(key)) {
-				BigDecimal temp = new BigDecimal(String.valueOf(map.get(key)));
-				temp = new BigDecimal(l.getContractCount()).add(temp);
-				map.put(key, temp);
-
-            } else {
-                map.put(key, new BigDecimal(l.getContractCount()));
-            }
-        });
-    }
 
 }

+ 10 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/reportPerson/mapper/ReportPersonMapper.java

@@ -25,4 +25,14 @@ public interface ReportPersonMapper extends BaseMapper<ReportPerson> {
      * */
     void insertList(@Param("list") List<ReportPerson> list);
 
+    /**
+     *
+     * @return
+     */
+    List<String> findDepartment();
+
+    List<ReportPerson> findDepartmentOfPerson(@Param("department")String department);
+
+    List<ReportPerson> findDepartmentGroupByPerson();
+
 }

+ 84 - 69
src/main/java/com/jeeplus/modules/sg/balancedlibrary/reportPerson/mapper/xml/ReportPersonMapper.xml

@@ -1,7 +1,7 @@
 <?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.balancedlibrary.reportPerson.mapper.ReportPersonMapper">
-	<sql id="replaceColumns">
+    <sql id="replaceColumns">
 		a.id AS "id",
 -- 		a.create_by AS "createBy.id",
 -- 		a.create_date AS "createDate",
@@ -12,55 +12,70 @@
 		a.report_department AS "reportDepartment"
 	</sql>
 
-	<sql id="leftJoins">
+    <sql id="leftJoins">
 		LEFT JOIN sys_office office ON office.id = a.office_id
 		LEFT JOIN sys_user tuser ON tuser.id = a.user_id
 	</sql>
 
 
-	<select id="get" resultType="ReportPerson" >
-		SELECT
-			<include refid="replaceColumns"/>
-		FROM bla_report_person a
-		WHERE a.id = #{id}
-	</select>
+    <select id="get" resultType="ReportPerson">
+        SELECT
+        <include refid="replaceColumns"/>
+        FROM bla_report_person a
+        WHERE a.id = #{id}
+    </select>
+
+    <select id="findList" resultType="ReportPerson">
+        SELECT
+        <include refid="replaceColumns"/>
+        FROM bla_report_person a
+        <where>
+            a.del_flag = #{DEL_FLAG_NORMAL}
+            ${dataScope}
+            <if test="reportPerson != null and reportPerson != ''">
+                AND a.report_person like concat('%',#{reportPerson},'%')
+            </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="findList" resultType="ReportPerson" >
-		SELECT
-			<include refid="replaceColumns"/>
-		FROM bla_report_person a
-		<where>
-			a.del_flag = #{DEL_FLAG_NORMAL}
-			${dataScope}
-			<if test="reportPerson != null and reportPerson != ''">
-				AND a.report_person like  concat('%',#{reportPerson},'%')
-			</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 id="findAllList" resultType="ReportPerson">
+        SELECT
+        a.report_person AS "reportPerson",
+        b.label AS "reportDepartment"
+        FROM bla_report_person a
+        left join (select value,label from sys_dict_value where dict_type_id=
+        (select id from sys_dict_type where type='report_department')) b
+        on a.report_department = b.value
+        <where>
+            a.del_flag = #{DEL_FLAG_NORMAL}
+            ${dataScope}
+        </where>
+    </select>
+    <select id="findDepartment" resultType="java.lang.String">
+		SELECT `report_department` department FROM `bla_report_person` group by `report_department`
 	</select>
+    <select id="findDepartmentOfPerson"
+            resultType="com.jeeplus.modules.sg.balancedlibrary.reportPerson.entity.ReportPerson">
+        select report_person from bla_report_person
+        <where>
+            report_department=#{department}
+        </where>
 
-	<select id="findAllList" resultType="ReportPerson" >
-		SELECT
-			a.report_person AS "reportPerson",
-			b.label AS "reportDepartment"
-		FROM bla_report_person a
-		left join (select value,label from sys_dict_value where dict_type_id=
-		(select id from sys_dict_type where type='report_department')) b
-		on a.report_department = b.value
-		<where>
-			a.del_flag = #{DEL_FLAG_NORMAL}
-			${dataScope}
-		</where>
+    </select>
+    <select id="findDepartmentGroupByPerson"
+            resultType="com.jeeplus.modules.sg.balancedlibrary.reportPerson.entity.ReportPerson">
+		SELECT `report_department` reportDepartment ,`report_person` reportPerson FROM `bla_report_person` group by `report_department` , report_person
 	</select>
 
-	<insert id="insert">
+    <insert id="insert">
 		INSERT INTO bla_report_person(
 			 id,
 			 create_by,
@@ -81,32 +96,32 @@
 		    #{reportDepartment}
 		)
 	</insert>
-	<insert id="insertList">
-		replace into bla_report_person(
-			id,
-			create_by,
-			create_date,
-			update_by,
-			update_date,
-			del_flag,
-			report_person,
-			report_department
-		)VALUES
-		<foreach collection="list" item="item" index="index" separator=",">
-			(
-			#{id},
-			#{createBy.id},
-			#{createDate},
-			#{updateBy.id},
-			#{updateDate},
-			#{delFlag},
-			#{reportPerson},
-			#{reportDepartment}
-			)
-		</foreach>
-	</insert>
+    <insert id="insertList">
+        replace into bla_report_person(
+        id,
+        create_by,
+        create_date,
+        update_by,
+        update_date,
+        del_flag,
+        report_person,
+        report_department
+        )VALUES
+        <foreach collection="list" item="item" index="index" separator=",">
+            (
+            #{id},
+            #{createBy.id},
+            #{createDate},
+            #{updateBy.id},
+            #{updateDate},
+            #{delFlag},
+            #{reportPerson},
+            #{reportDepartment}
+            )
+        </foreach>
+    </insert>
 
-	<update id="update">
+    <update id="update">
 		UPDATE bla_report_person SET
 			update_by = #{updateBy.id},
 			update_date = #{updateDate},
@@ -116,14 +131,14 @@
 	</update>
 
 
-	<!--物理删除-->
-	<update id="delete">
+    <!--物理删除-->
+    <update id="delete">
 		DELETE FROM bla_report_person
 		WHERE id = #{id}
 	</update>
 
-	<!--逻辑删除-->
-	<update id="deleteByLogic">
+    <!--逻辑删除-->
+    <update id="deleteByLogic">
 		UPDATE bla_report_person SET
 			del_flag = #{DEL_FLAG_DELETE}
 		WHERE id = #{id}

+ 31 - 10
src/main/webapp/webpage/modules/sg/balancedlibrary/onPassageMaterials/onPassageMaterialsList.jsp

@@ -8,7 +8,15 @@
     <%@ include file="/webpage/include/bootstraptable.jsp" %>
     <script type="text/javascript">
 
+        function onPassageMaterialsFileChange(e) {
+            var onPassageMaterialsFile = $('#onPassageMaterials').get(0).files[0];
+            $('#onPassageMaterialsFileName').text(onPassageMaterialsFile.name);
+        }
 
+        function materialInformationFileChange(e) {
+            var materialInformationFile = $('#materialInformation').get(0).files[0];
+            $('#materialInformationFileName').text(materialInformationFile.name);
+        }
 
         function fileUpload() {
 
@@ -16,15 +24,15 @@
             var materialInformationFile = $('#materialInformation').get(0).files[0];
             var onPassageMaterialsFileName = onPassageMaterialsFile.name.split(".");
             var materialInformationFileName = materialInformationFile.name.split(".");
-            if(onPassageMaterialsFile==null||onPassageMaterialsFileName[0]!="附件4在途物资统计表"){
-                var file  = $('#onPassageMaterials');
+            if (onPassageMaterialsFile == null || onPassageMaterialsFileName[0] != "附件4在途物资统计表") {
+                var file = $('#onPassageMaterials');
                 file.after(file.clone()).val("");
                 file.remove();
                 alert("在途物资统计表为空,或文件不正确")
                 return
             }
-            if(materialInformationFile==null||materialInformationFileName[0]!="项目物资需求表"){
-                var file  = $('#materialInformation');
+            if (materialInformationFile == null || materialInformationFileName[0] != "项目物资需求表") {
+                var file = $('#materialInformation');
                 file.after(file.clone()).val("");
                 file.remove();
                 alert("项目物资需求表,或文件不正确")
@@ -84,8 +92,12 @@
         .div-btn {
             margin: 0 10px 20px 10px;
         }
-        .file-upload{
-            margin: 10px 0 0 0 ;
+
+        .file-upload {
+            margin: 10px 0 0 0;
+        }
+        .span_file_name{
+            margin-left: 10px;
         }
     </style>
 </head>
@@ -96,17 +108,27 @@
             <h3 class="panel-title">在途物资统计</h3>
         </div>
         <div class="panel-body">
+            <h5>导入文件不能超过5M,仅允许导入“xls”或“xlsx”格式文件!</h5>
         </div>
-        <input type="file" name="onPassageMaterials" id="onPassageMaterials" style="display: none;">
-        <input type="file" name="materialInformation" id="materialInformation" style="display: none;">
+        <input type="file" name="onPassageMaterials" id="onPassageMaterials" style="display: none;"
+               onchange="onPassageMaterialsFileChange(event)">
+        <input type="file" name="materialInformation" id="materialInformation" style="display: none;"
+               onchange="materialInformationFileChange(event)">
         <div class="div-btn">
             <button class="btn btn-info" onclick="onPassageMaterials.click()">
                 <i class="fa fa-folder-open-o"></i> 导入在途物资统计表
             </button>
 
-            <button class="btn btn-info" onclick="materialInformation.click()">
+            <span id="onPassageMaterialsFileName" class="span_file_name">
+                未选择文件
+            </span>
+
+            <button class="btn btn-info" onclick="materialInformation.click()" style="margin-left: 16px">
                 <i class="fa fa-folder-open-o"></i> 导入项目物资需求表
             </button>
+            <span id="materialInformationFileName" class="span_file_name">
+                未选择文件
+            </span>
 
             <div class="file-upload">
                 <button class="btn btn-primary btn-block btn-lg btn-parsley" onclick="fileUpload()">提交</button>
@@ -115,7 +137,6 @@
         </div>
 
 
-
     </div>
 </div>
 </body>