From 267fc7fa10c0f8c089d2be4d689fa6f33e4e77da Mon Sep 17 00:00:00 2001 From: zuowenwen Date: Thu, 28 Oct 2021 13:14:32 +0800 Subject: [PATCH] =?UTF-8?q?zww-=20=E4=BB=93=E5=BA=93=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E7=B1=BB=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/app/dao/DepartmentMapper.java | 76 ++++++++ .../modules/app/entity/DepartmentData.java | 39 +++++ .../modules/toolman/entity/WareHouseData.java | 38 ++++ .../resources/mapper/app/DepartmentMapper.xml | 161 +++++++++++++++++ .../mapper/toolman/WareHouseMapper.xml | 164 ++++++++++++++++++ 5 files changed, 478 insertions(+) create mode 100644 src/main/java/com/gaotao/modules/app/dao/DepartmentMapper.java create mode 100644 src/main/java/com/gaotao/modules/app/entity/DepartmentData.java create mode 100644 src/main/java/com/gaotao/modules/toolman/entity/WareHouseData.java create mode 100644 src/main/resources/mapper/app/DepartmentMapper.xml create mode 100644 src/main/resources/mapper/toolman/WareHouseMapper.xml diff --git a/src/main/java/com/gaotao/modules/app/dao/DepartmentMapper.java b/src/main/java/com/gaotao/modules/app/dao/DepartmentMapper.java new file mode 100644 index 0000000..7e51959 --- /dev/null +++ b/src/main/java/com/gaotao/modules/app/dao/DepartmentMapper.java @@ -0,0 +1,76 @@ +package com.gaotao.modules.app.dao; + +import java.util.List; + +import com.gaotao.modules.app.entity.DepartmentData; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Auther: Zuowenwen + * @Date:2021/10/27 14:03 + * @Description: //TODO 描述 + */ +@Mapper +public interface DepartmentMapper { + + /** + * @Method getDepartmentList + * @Description: 根据条件 获取部门信息 + * @author zuowenwen + * @Version 1.0 + * @param departmentData + * @return + * @throws + * @date 2021/10/27 + */ + List getDepartmentList(DepartmentData departmentData); + + /** + * @Method insertSelective + * @Description: 新增部门信息 + * @author zuowenwen + * @Version 1.0 + * @param departmentData + * @return + * @throws + * @date 2021/10/27 + */ + int insertSelective(DepartmentData departmentData); + + /** + * @Method insertList + * @Description: 批量新增部门信息 + * @author zuowenwen + * @Version 1.0 + * @param list + * @return + * @throws + * @date 2021/10/27 + */ + int insertList(@Param("list") List list); + + /** + * @Method updateDepartment + * @Description: 更改 部门信息 + * @author zuowenwen + * @Version 1.0 + * @param departmentData + * @return + * @throws + * @date 2021/10/27 + */ + int updateDepartment(DepartmentData departmentData); + + /** + * @Method deleteDepartment + * @Description: 删除 部门信息 + * @author zuowenwen + * @Version 1.0 + * @param departmentData + * @return + * @throws + * @date 2021/10/27 + */ + int deleteDepartment(DepartmentData departmentData); +} \ No newline at end of file diff --git a/src/main/java/com/gaotao/modules/app/entity/DepartmentData.java b/src/main/java/com/gaotao/modules/app/entity/DepartmentData.java new file mode 100644 index 0000000..71cff2c --- /dev/null +++ b/src/main/java/com/gaotao/modules/app/entity/DepartmentData.java @@ -0,0 +1,39 @@ +package com.gaotao.modules.app.entity; +import lombok.Data; +import java.util.Date; + +/** + * @Description + * @Author ZuoWen + * @Date 2021-10-27 + */ + +@Data +public class DepartmentData { + + + /** 主键id */ + private Integer id; + /** 工厂编号 */ + private String site; + /** 部门编码 */ + private String departmentNo; + /** 部门名称 */ + private String departmentDesc; + /** 状态 */ + private String active; + /** 创建人 */ + private String createdBy; + /** 创建时间 */ + private Date createdDate; + /** 备注 */ + private String remark; + /** 更改人 */ + private String updateBy; + /** 更改时间 */ + private Date updatedDate; + /** 是否删除 */ + private String delflag; + /** 版本号 */ + private Integer version; +} diff --git a/src/main/java/com/gaotao/modules/toolman/entity/WareHouseData.java b/src/main/java/com/gaotao/modules/toolman/entity/WareHouseData.java new file mode 100644 index 0000000..90dfcca --- /dev/null +++ b/src/main/java/com/gaotao/modules/toolman/entity/WareHouseData.java @@ -0,0 +1,38 @@ +package com.gaotao.modules.toolman.entity; + +import lombok.Data; + +/** + * @Description + * @Author ZuoWen + * @Date 2021-10-27 + */ +@Data +public class WareHouseData { + + + /** 工厂编码 */ + private String site; + /** 仓库id */ + private String wareHouseId; + /** 仓库名称 */ + private String wareHouseName; + /** 是否启用 */ + private String active; + /** 仓库类型 */ + private String wareHouseType; + /** 仓库类型 */ + private String wareHouseTypeDb; + /** 管理人 */ + private String keeper; + /** 公司编码 */ + private String companyId; + /** 是否有效 */ + private String validStock; + /** 使用库位 */ + private String useLocation; + + private String strActive; + + private Integer id; +} diff --git a/src/main/resources/mapper/app/DepartmentMapper.xml b/src/main/resources/mapper/app/DepartmentMapper.xml new file mode 100644 index 0000000..ac8b6fd --- /dev/null +++ b/src/main/resources/mapper/app/DepartmentMapper.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + id, site, department_no, department_desc, active, created_by, created_date, remark, + update_by, updated_date, delflag, version + + + + + INSERT INTO department + + id, + site, + department_no, + department_desc, + active, + created_by, + created_date, + remark, + update_by, + updated_date, + delflag, + version + + VALUES + + #{id,jdbcType=INTEGER}, + #{site,jdbcType=VARCHAR}, + #{departmentNo,jdbcType=VARCHAR}, + #{departmentDesc,jdbcType=VARCHAR}, + #{active,jdbcType=CHAR}, + #{createdBy,jdbcType=VARCHAR}, + #{createdDate,jdbcType=TIMESTAMP}, + #{remark,jdbcType=VARCHAR}, + #{updateBy,jdbcType=VARCHAR}, + #{updatedDate,jdbcType=TIMESTAMP}, + #{delflag,jdbcType=CHAR}, + #{version,jdbcType=INTEGER} + + + + + INSERT INTO department( + id, + site, + department_no, + department_desc, + active, + created_by, + created_date, + remark, + update_by, + updated_date, + delflag, + version + )VALUES + + ( + #{element.id,jdbcType=INTEGER}, + #{element.site,jdbcType=VARCHAR}, + #{element.departmentNo,jdbcType=VARCHAR}, + #{element.departmentDesc,jdbcType=VARCHAR}, + #{element.active,jdbcType=CHAR}, + #{element.createdBy,jdbcType=VARCHAR}, + #{element.createdDate,jdbcType=TIMESTAMP}, + #{element.remark,jdbcType=VARCHAR}, + #{element.updateBy,jdbcType=VARCHAR}, + #{element.updatedDate,jdbcType=TIMESTAMP}, + #{element.delflag,jdbcType=CHAR}, + #{element.version,jdbcType=INTEGER} + ) + + + + + update department + + + department_desc = #{departmentDesc,jdbcType=VARCHAR}, + + + active = #{active,jdbcType=CHAR}, + + + created_by = #{createdBy,jdbcType=VARCHAR}, + + + created_date = #{createdDate,jdbcType=TIMESTAMP}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + updated_date = #{updatedDate,jdbcType=TIMESTAMP}, + + + delflag = #{delflag,jdbcType=CHAR}, + + + version = #{version,jdbcType=INTEGER}, + + + + + and site=#{site,jdbcType=VARCHAR} + + + and id=#{id,jdbcType=INTEGER} + + + and department_no = #{departmentNo,jdbcType=VARCHAR} + + + + + + delete from department + + + and site=#{site,jdbcType=VARCHAR} + + + and id=#{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/toolman/WareHouseMapper.xml b/src/main/resources/mapper/toolman/WareHouseMapper.xml new file mode 100644 index 0000000..40354e4 --- /dev/null +++ b/src/main/resources/mapper/toolman/WareHouseMapper.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + Site, WareHouseID, WareHouseName, Active, WareHouseType, WareHouseType_DB, Keeper, + CompanyID, ValidStock, UseLocation + + + + + INSERT INTO WareHouse + + Site, + WareHouseID, + WareHouseName, + Active, + WareHouseType, + WareHouseType_DB, + Keeper, + CompanyID, + ValidStock, + UseLocation + + VALUES + + #{site,jdbcType=VARCHAR}, + #{wareHouseId,jdbcType=VARCHAR}, + #{wareHouseName,jdbcType=VARCHAR}, + #{active,jdbcType=CHAR}, + #{wareHouseType,jdbcType=VARCHAR}, + #{wareHouseTypeDb,jdbcType=VARCHAR}, + #{keeper,jdbcType=VARCHAR}, + #{companyId,jdbcType=VARCHAR}, + #{validStock,jdbcType=VARCHAR}, + #{useLocation,jdbcType=VARCHAR} + + + + + INSERT INTO WareHouse( + Site, + WareHouseID, + WareHouseName, + Active, + WareHouseType, + WareHouseType_DB, + Keeper, + CompanyID, + ValidStock, + UseLocation + )VALUES + + ( + #{element.site,jdbcType=VARCHAR}, + #{element.wareHouseId,jdbcType=VARCHAR}, + #{element.wareHouseName,jdbcType=VARCHAR}, + #{element.active,jdbcType=CHAR}, + #{element.wareHouseType,jdbcType=VARCHAR}, + #{element.wareHouseTypeDb,jdbcType=VARCHAR}, + #{element.keeper,jdbcType=VARCHAR}, + #{element.companyId,jdbcType=VARCHAR}, + #{element.validStock,jdbcType=VARCHAR}, + #{element.useLocation,jdbcType=VARCHAR} + ) + + + + + update WareHouse + + + WareHouseName = #{wareHouseName,jdbcType=VARCHAR}, + + + Active = #{active,jdbcType=VARCHAR}, + + + WareHouseType = #{wareHouseType,jdbcType=VARCHAR}, + + + WareHouseType_DB = #{wareHouseTypeDb,jdbcType=VARCHAR}, + + + Keeper = #{keeper,jdbcType=VARCHAR}, + + + CompanyID = #{companyId,jdbcType=VARCHAR}, + + + ValidStock = #{validStock,jdbcType=VARCHAR}, + + + UseLocation = #{useLocation,jdbcType=VARCHAR}, + + + + + and Site=#{site,jdbcType=VARCHAR} + + + and WareHouseID=#{wareHouseId,jdbcType=VARCHAR} + + + + + + delete from WareHouse + + + and Site=#{site,jdbcType=VARCHAR} + + + and WareHouseID=#{wareHouseId,jdbcType=VARCHAR} + + + + + + \ No newline at end of file