Commit 4fb558e0 by 陈浩建

学校批量导入导出

parent 939534f8
......@@ -53,6 +53,11 @@ public class School implements Serializable {
*/
@TableField("service_qrcode" )
private String serviceQrcode;
/**
* 揽装人
*/
@TableField("lz_user" )
private String lzUser;
/**
* 揽装工号
......
......@@ -56,4 +56,13 @@ public interface SchoolMapper extends BaseMapper<School> {
" LEFT JOIN hhr_school s ON s.`id`=us.`school_id`" +
" WHERE u.id=#{id}")
Map<String, Object> querySchoolById(@Param("id") String id);
Map<String, Object> querySchoolMap(@Param("subName") String subName,@Param("schoolName") String schoolName);
int insertSchoolMap(Map<String,Object> map);
int updateSchoolMap(Map<String,Object> map);
int insertNetworkInfo(Map<String,Object> map);
}
<?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.winsun.mapper.SchoolMapper">
<select id="querySchoolMap" parameterType="String" resultType="HashMap">
select * from hhr_school where sub_name = #{subName} and school_name = #{schoolName}
</select>
<insert id="insertSchoolMap">
INSERT INTO hhr_school
(sub_name,school_name,status,lz_user,lzgh,network_code,network_name,app_id,app_key)
VALUES (#{a},#{b},0,#{c},#{d},#{e},#{f},#{g},#{h})
</insert>
<update id="updateSchoolMap">
update hhr_school set
<if test="c != null and c != ''">
lz_user = #{c},
</if>
<if test="d != null and d != ''">
lzgh = #{d},
</if>
<if test="e != null and e != ''">
network_code = #{e},
</if>
<if test="f != null and f != ''">
network_name = #{f},
</if>
<if test="g != null and g != ''">
app_id = #{g},
</if>
<if test="h != null and h != ''">
app_key = #{h},
</if>
sub_name = #{a},school_name = #{b}
where
sub_name = #{a}
and
school_name = #{b}
</update>
<insert id="insertNetworkInfo">
INSERT INTO hhr_network_info (area_name,school_name,network_code,network_name)
VALUES (#{a},#{b},#{e},#{f})
</insert>
</mapper>
\ No newline at end of file
......@@ -527,4 +527,20 @@ public class ExcelDealUtils {
return resultMap;
}
// 管理导出excel表头
public static Map<String, Object> schoolExcel(String sheetName){
Map<String, Object> headMap = new LinkedHashMap<String, Object>();
headMap.put("所属县分(必填)", "subName");
headMap.put("校园名称(必填)", "schoolName");
headMap.put("揽装人", "lzUser");
headMap.put("揽装工号", "lzgh");
headMap.put("网点编码", "networkCode");
headMap.put("网点名称", "networkName");
headMap.put("终端编码", "appId");
headMap.put("终端密匙", "appKey");
Map<String, Object> resultMap = dealHeadMap(headMap);
resultMap.put("sheetName", sheetName);
return resultMap;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment