Commit f6d8a91d by wangchunyang

增加查询方法,调整字段

parent cf92fc7a
package com.scpyun.platform.jilinsscgsdp.bean.entity; package com.scpyun.platform.jilinsscgsdp.bean.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
@Data
public class MaterialImp { public class MaterialImp {
private String category_Code; private String category_Code;
@ExcelProperty(value = "分类名称", index = 0)
private String category_Name; private String category_Name;
@ExcelProperty(value = "用品编码", index = 1)
private String material_code; private String material_code;
@ExcelProperty(value = "用品名称", index = 2)
private String material_name; private String material_name;
@ExcelProperty(value = "规格", index = 3)
private String material_spec; private String material_spec;
@ExcelProperty(value = "单位", index = 4)
private String unit; private String unit;
@ExcelProperty(value = "单价", index = 5)
private Double unit_price; private Double unit_price;
@ExcelProperty(value = "存储位置", index = 6)
private String storage_location; private String storage_location;
@ExcelProperty(value = "最低库存", index = 7)
private Double min_stock; private Double min_stock;
@ExcelProperty(value = "最高库存", index = 8)
private Double max_stock; private Double max_stock;
@ExcelProperty(value = "可领用", index = 9)
private Integer can_borrow; private Integer can_borrow;
@ExcelProperty(value = "描述", index = 10)
private String material_desc; private String material_desc;
public String getCategory_Code() { return category_Code; }
public void setCategory_Code(String category_Code) { this.category_Code = category_Code; }
public String getCategory_Name() { return category_Name; }
public void setCategory_Name(String category_Name) { this.category_Name = category_Name; }
public String getMaterial_code() { return material_code; }
public void setMaterial_code(String material_code) { this.material_code = material_code; }
public String getMaterial_name() { return material_name; }
public void setMaterial_name(String material_name) { this.material_name = material_name; }
public String getMaterial_spec() { return material_spec; }
public void setMaterial_spec(String material_spec) { this.material_spec = material_spec; }
public String getUnit() { return unit; }
public void setUnit(String unit) { this.unit = unit; }
public Double getUnit_price() { return unit_price; }
public void setUnit_price(Double unit_price) { this.unit_price = unit_price; }
public String getStorage_location() { return storage_location; }
public void setStorage_location(String storage_location) { this.storage_location = storage_location; }
public Double getMin_stock() { return min_stock; }
public void setMin_stock(Double min_stock) { this.min_stock = min_stock; }
public Double getMax_stock() { return max_stock; }
public void setMax_stock(Double max_stock) { this.max_stock = max_stock; }
public Integer getCan_borrow() { return can_borrow; }
public void setCan_borrow(Integer can_borrow) { this.can_borrow = can_borrow; }
public String getMaterial_desc() { return material_desc; }
public void setMaterial_desc(String material_desc) { this.material_desc = material_desc; }
} }
...@@ -31,6 +31,8 @@ public class MaterialFileListener extends AnalysisEventListener<MaterialImp> { ...@@ -31,6 +31,8 @@ public class MaterialFileListener extends AnalysisEventListener<MaterialImp> {
this.commonService = commonService; this.commonService = commonService;
this.namespace = namespace; this.namespace = namespace;
this.param = param; this.param = param;
//获取所有办公用品分类信息
//获取所有办公用品信息,后续根据办公用品编码来判断更新或插入
} }
@Override @Override
......
...@@ -38,6 +38,42 @@ ...@@ -38,6 +38,42 @@
ORDER BY order_no ASC, create_time DESC ORDER BY order_no ASC, create_time DESC
</select> </select>
<!-- 查询列表 -->
<select id="findList" parameterType="map" resultType="map">
SELECT
id,
type_code,
type_name,
remark,
base_days,
max_days_per_year,
allow_half_day,
allow_hourly,
require_attachment,
attachment_types,
attachment_desc,
need_approval,
approval_flow_id,
status,
is_used,
create_by,
create_time,
update_by,
update_time,
order_no
FROM jl_key_dm_leave_type
<where>
AND is_used = 1
<if test="type_name != null and type_name != ''">
AND type_name LIKE CONCAT('%', #{type_name}, '%')
</if>
<if test="type_code != null and type_code != ''">
AND type_code LIKE CONCAT('%', #{type_code}, '%')
</if>
</where>
ORDER BY order_no ASC, create_time DESC
</select>
<!-- 新增 --> <!-- 新增 -->
<insert id="insert" parameterType="map"> <insert id="insert" parameterType="map">
INSERT INTO jl_key_dm_leave_type( INSERT INTO jl_key_dm_leave_type(
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
<!-- 查询列表 --> <!-- 查询列表 -->
<select id="selectList" parameterType="page" resultType="map"> <select id="selectList" parameterType="page" resultType="map">
SELECT SELECT
Id, id,
category_Code, category_code,
category_Name, category_name,
parent_Id, parent_id,
level, level,
full_Path, full_path,
remark, remark,
status, status,
is_used, is_used,
...@@ -22,11 +22,41 @@ ...@@ -22,11 +22,41 @@
FROM jl_key_dm_material_category FROM jl_key_dm_material_category
<where> <where>
AND is_used = 1 AND is_used = 1
<if test="params.category_Name != null and params.category_Name != ''"> <if test="params.category_name != null and params.category_name != ''">
AND category_Name LIKE CONCAT('%', #{params.category_Name}, '%') AND category_name LIKE CONCAT('%', #{params.category_name}, '%')
</if>
<if test="params.category_code != null and params.category_code != ''">
AND category_code LIKE CONCAT('%', #{params.category_code}, '%')
</if>
</where>
ORDER BY order_no ASC, create_time DESC
</select>
<!-- 查询列表 -->
<select id="findList" parameterType="map" resultType="map">
SELECT
id,
category_code,
category_name,
parent_id,
level,
full_path,
remark,
status,
is_used,
create_by,
create_time,
update_by,
update_time,
order_no
FROM jl_key_dm_material_category
<where>
AND is_used = 1
<if test="category_name != null and category_name != ''">
AND category_name LIKE CONCAT('%', #{category_name}, '%')
</if> </if>
<if test="params.category_Code != null and params.category_Code != ''"> <if test="category_code != null and category_code != ''">
AND category_Code LIKE CONCAT('%', #{params.category_Code}, '%') AND category_code LIKE CONCAT('%', #{category_code}, '%')
</if> </if>
</where> </where>
ORDER BY order_no ASC, create_time DESC ORDER BY order_no ASC, create_time DESC
...@@ -36,11 +66,11 @@ ...@@ -36,11 +66,11 @@
<insert id="insert" parameterType="map"> <insert id="insert" parameterType="map">
INSERT INTO jl_key_dm_material_category( INSERT INTO jl_key_dm_material_category(
id, id,
category_Code, category_code,
category_Name, category_name,
parent_Id, parent_id,
level, level,
full_Path, full_path,
remark, remark,
status, status,
is_used, is_used,
...@@ -49,11 +79,11 @@ ...@@ -49,11 +79,11 @@
order_no order_no
) VALUES ( ) VALUES (
#{id}, #{id},
#{category_Code}, #{category_code},
#{category_Name}, #{category_name},
COALESCE(#{parent_Id}, 0), COALESCE(#{parent_id}, 0),
COALESCE(#{level}, 1), COALESCE(#{level}, 1),
#{full_Path}, #{full_path},
#{remark}, #{remark},
COALESCE(#{status}, 1), COALESCE(#{status}, 1),
1, 1,
...@@ -67,11 +97,11 @@ ...@@ -67,11 +97,11 @@
<update id="update" parameterType="map"> <update id="update" parameterType="map">
UPDATE jl_key_dm_material_category UPDATE jl_key_dm_material_category
SET SET
category_Code = #{category_Code}, category_code = #{category_code},
category_Name = #{category_Name}, category_name = #{category_name},
parent_Id = #{parent_Id}, parent_id = #{parent_id},
level = #{level}, level = #{level},
full_Path = #{full_Path}, full_path = #{full_path},
remark = #{remark}, remark = #{remark},
status = #{status}, status = #{status},
order_no = #{order_no}, order_no = #{order_no},
......
...@@ -24,6 +24,28 @@ ...@@ -24,6 +24,28 @@
ORDER BY order_no ASC, create_time DESC ORDER BY order_no ASC, create_time DESC
</select> </select>
<!-- 查询列表 -->
<select id="findList" parameterType="map" resultType="map">
SELECT
id,
catgory_name,
remark,
is_used,
create_by,
create_time,
update_by,
update_time,
order_no
FROM jl_key_dm_user_catgory
<where>
AND is_used = 1
<if test="catgory_name != null and catgory_name != ''">
AND catgory_name LIKE CONCAT('%', #{catgory_name}, '%')
</if>
</where>
ORDER BY order_no ASC, create_time DESC
</select>
<!-- 新增 --> <!-- 新增 -->
<insert id="insert" parameterType="map"> <insert id="insert" parameterType="map">
INSERT INTO jl_key_dm_user_catgory( INSERT INTO jl_key_dm_user_catgory(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论