diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/WareHouseController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/WareHouseController.java index 84be66a..88604ed 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/WareHouseController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/WareHouseController.java @@ -12,6 +12,7 @@ import com.glxp.sale.admin.entity.info.CompanyEntity; import com.glxp.sale.admin.entity.inout.ErpOrderEntity; import com.glxp.sale.admin.entity.inout.OrderEntity; import com.glxp.sale.admin.entity.inout.WarehouseEntity; +import com.glxp.sale.admin.entity.inout.WarehouseUserEntity; import com.glxp.sale.admin.entity.udid.UdiEntity; import com.glxp.sale.admin.exception.JsonException; import com.glxp.sale.admin.req.inout.*; @@ -21,10 +22,7 @@ import com.glxp.sale.admin.service.auth.AuthAdminService; import com.glxp.sale.admin.service.basic.BasicUnitMaintainService; import com.glxp.sale.admin.service.basic.BussinessTypeService; import com.glxp.sale.admin.service.info.CompanyService; -import com.glxp.sale.admin.service.inout.CodesService; -import com.glxp.sale.admin.service.inout.CodesTempService; -import com.glxp.sale.admin.service.inout.MyErpOrderService; -import com.glxp.sale.admin.service.inout.OrderService; +import com.glxp.sale.admin.service.inout.*; import com.glxp.sale.admin.thread.IoTransInoutService; import com.glxp.sale.admin.util.CustomUtil; import com.glxp.sale.admin.util.FilterUdiUtils; @@ -69,6 +67,10 @@ public class WareHouseController { BasicUnitMaintainService basicUnitMaintainService; @Resource private AuthLicenseDao authLicenseDao; + @Resource + private WarehouseUserService warehouseUserService; + @Resource + private WarehouseBussinessTypeService warehouseBussinessTypeService; @AuthRuleAnnotation("") @GetMapping("admin/warehouse/inout/list") @@ -455,4 +457,20 @@ public class WareHouseController { AuthLicense authAdmin = authLicenseDao.get(userId); return authAdmin.getCustomerId(); } + + + /** + * 根据仓位码获取关联用户数据 + * @param code + * @return + */ + @AuthRuleAnnotation("") + @GetMapping("/admin/warehouse/inout/warehouseUserList") + private BaseResponse getWarehouseUserList(String code) { + if (StringUtils.isBlank(code)) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + } + List warehouseUserEntities = warehouseUserService.getWarehouseUserList(code); + return ResultVOUtils.success(); + } } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/dao/inout/WarehouseBussinessTypeDao.java b/api-admin/src/main/java/com/glxp/sale/admin/dao/inout/WarehouseBussinessTypeDao.java new file mode 100644 index 0000000..04c01b1 --- /dev/null +++ b/api-admin/src/main/java/com/glxp/sale/admin/dao/inout/WarehouseBussinessTypeDao.java @@ -0,0 +1,30 @@ +package com.glxp.sale.admin.dao.inout; + +import com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface WarehouseBussinessTypeDao { + int deleteByPrimaryKey(Integer id); + + int insert(WarehouseBussinessTypeEntity record); + + int insertOrUpdate(WarehouseBussinessTypeEntity record); + + int insertOrUpdateSelective(WarehouseBussinessTypeEntity record); + + int insertSelective(WarehouseBussinessTypeEntity record); + + WarehouseBussinessTypeEntity selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(WarehouseBussinessTypeEntity record); + + int updateByPrimaryKey(WarehouseBussinessTypeEntity record); + + int updateBatch(List list); + + int updateBatchSelective(List list); + + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/api-admin/src/main/java/com/glxp/sale/admin/dao/inout/WarehouseUserDao.java b/api-admin/src/main/java/com/glxp/sale/admin/dao/inout/WarehouseUserDao.java new file mode 100644 index 0000000..de3d933 --- /dev/null +++ b/api-admin/src/main/java/com/glxp/sale/admin/dao/inout/WarehouseUserDao.java @@ -0,0 +1,32 @@ +package com.glxp.sale.admin.dao.inout; + +import com.glxp.sale.admin.entity.inout.WarehouseUserEntity; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface WarehouseUserDao { + int deleteByPrimaryKey(Integer id); + + int insert(WarehouseUserEntity record); + + int insertOrUpdate(WarehouseUserEntity record); + + int insertOrUpdateSelective(WarehouseUserEntity record); + + int insertSelective(WarehouseUserEntity record); + + WarehouseUserEntity selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(WarehouseUserEntity record); + + int updateByPrimaryKey(WarehouseUserEntity record); + + int updateBatch(List list); + + int updateBatchSelective(List list); + + int batchInsert(@Param("list") List list); + + List selectWarehouseUserListByCode(@Param("code") String code); +} \ No newline at end of file diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/inout/WarehouseBussinessTypeEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/inout/WarehouseBussinessTypeEntity.java new file mode 100644 index 0000000..ae961c7 --- /dev/null +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/inout/WarehouseBussinessTypeEntity.java @@ -0,0 +1,29 @@ +package com.glxp.sale.admin.entity.inout; + +import lombok.Data; + +/** + * 仓库字典-单据类型关联表 + */ +@Data +public class WarehouseBussinessTypeEntity { + /** + * id + */ + private Integer id; + + /** + * 仓位码 + */ + private String code; + + /** + * 业务类型 + */ + private String action; + + /** + * 业务名称 + */ + private String name; +} \ No newline at end of file diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/inout/WarehouseUserEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/inout/WarehouseUserEntity.java new file mode 100644 index 0000000..e068ad8 --- /dev/null +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/inout/WarehouseUserEntity.java @@ -0,0 +1,29 @@ +package com.glxp.sale.admin.entity.inout; + +import lombok.Data; + +/** + * 仓库字典-用户关联表 + */ +@Data +public class WarehouseUserEntity { + /** + * id + */ + private Integer id; + + /** + * 仓位码 + */ + private String code; + + /** + * 用户id + */ + private Long userid; + + /** + * 用户名/登录账号 + */ + private String username; +} \ No newline at end of file diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/inout/WarehouseBussinessTypeService.java b/api-admin/src/main/java/com/glxp/sale/admin/service/inout/WarehouseBussinessTypeService.java new file mode 100644 index 0000000..eb4d355 --- /dev/null +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/inout/WarehouseBussinessTypeService.java @@ -0,0 +1,4 @@ +package com.glxp.sale.admin.service.inout; + +public interface WarehouseBussinessTypeService { +} diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/inout/WarehouseUserService.java b/api-admin/src/main/java/com/glxp/sale/admin/service/inout/WarehouseUserService.java new file mode 100644 index 0000000..9b0ea68 --- /dev/null +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/inout/WarehouseUserService.java @@ -0,0 +1,16 @@ +package com.glxp.sale.admin.service.inout; + +import com.glxp.sale.admin.entity.inout.WarehouseUserEntity; + +import java.util.List; + +public interface WarehouseUserService { + + /** + * 查询仓库信息关联的用户数据 + * + * @param code 仓位码 + * @return + */ + List getWarehouseUserList(String code); +} diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/inout/impl/WarehouseBussinessTypeServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/service/inout/impl/WarehouseBussinessTypeServiceImpl.java new file mode 100644 index 0000000..2c5d9dc --- /dev/null +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/inout/impl/WarehouseBussinessTypeServiceImpl.java @@ -0,0 +1,17 @@ +package com.glxp.sale.admin.service.inout.impl; + +import com.glxp.sale.admin.dao.inout.WarehouseBussinessTypeDao; +import com.glxp.sale.admin.service.inout.WarehouseBussinessTypeService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +@Slf4j +@Service +public class WarehouseBussinessTypeServiceImpl implements WarehouseBussinessTypeService { + + @Resource + private WarehouseBussinessTypeDao warehouseBussinessTypeDao; + +} diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/inout/impl/WarehouseUserServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/service/inout/impl/WarehouseUserServiceImpl.java new file mode 100644 index 0000000..182692f --- /dev/null +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/inout/impl/WarehouseUserServiceImpl.java @@ -0,0 +1,24 @@ +package com.glxp.sale.admin.service.inout.impl; + +import com.glxp.sale.admin.dao.inout.WarehouseUserDao; +import com.glxp.sale.admin.entity.inout.WarehouseUserEntity; +import com.glxp.sale.admin.service.inout.WarehouseUserService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Slf4j +@Service +public class WarehouseUserServiceImpl implements WarehouseUserService { + + + @Resource + private WarehouseUserDao warehouseUserDao; + + @Override + public List getWarehouseUserList(String code) { + return warehouseUserDao.selectWarehouseUserListByCode(code); + } +} diff --git a/api-admin/src/main/resources/mybatis/mapper/inout/WarehouseBussinessTypeDao.xml b/api-admin/src/main/resources/mybatis/mapper/inout/WarehouseBussinessTypeDao.xml new file mode 100644 index 0000000..97c5751 --- /dev/null +++ b/api-admin/src/main/resources/mybatis/mapper/inout/WarehouseBussinessTypeDao.xml @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + id, code, `action`, `name` + + + + + delete from inv_warehouse_bussiness_type + where id = #{id,jdbcType=INTEGER} + + + + insert into inv_warehouse_bussiness_type (code, `action`, `name` + ) + values (#{code,jdbcType=VARCHAR}, #{action,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR} + ) + + + + insert into inv_warehouse_bussiness_type + + + code, + + + `action`, + + + `name`, + + + + + #{code,jdbcType=VARCHAR}, + + + #{action,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + + + + update inv_warehouse_bussiness_type + + + code = #{code,jdbcType=VARCHAR}, + + + `action` = #{action,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + update inv_warehouse_bussiness_type + set code = #{code,jdbcType=VARCHAR}, + `action` = #{action,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + update inv_warehouse_bussiness_type + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.action,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.name,jdbcType=VARCHAR} + + + + where id in + + #{item.id,jdbcType=INTEGER} + + + + + update inv_warehouse_bussiness_type + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.action,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.name,jdbcType=VARCHAR} + + + + + where id in + + #{item.id,jdbcType=INTEGER} + + + + + insert into inv_warehouse_bussiness_type + (code, `action`, `name`) + values + + (#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR} + ) + + + + + insert into inv_warehouse_bussiness_type + + + id, + + code, + `action`, + `name`, + + values + + + #{id,jdbcType=INTEGER}, + + #{code,jdbcType=VARCHAR}, + #{action,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + code = #{code,jdbcType=VARCHAR}, + `action` = #{action,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + + + + + insert into inv_warehouse_bussiness_type + + + id, + + + code, + + + `action`, + + + `name`, + + + values + + + #{id,jdbcType=INTEGER}, + + + #{code,jdbcType=VARCHAR}, + + + #{action,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + + code = #{code,jdbcType=VARCHAR}, + + + `action` = #{action,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + + \ No newline at end of file diff --git a/api-admin/src/main/resources/mybatis/mapper/inout/WarehouseUserDao.xml b/api-admin/src/main/resources/mybatis/mapper/inout/WarehouseUserDao.xml new file mode 100644 index 0000000..178bf34 --- /dev/null +++ b/api-admin/src/main/resources/mybatis/mapper/inout/WarehouseUserDao.xml @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + id, code, userId, userName + + + + + delete from inv_warehouse_user + where id = #{id,jdbcType=INTEGER} + + + + insert into inv_warehouse_user (code, userId, userName + ) + values (#{code,jdbcType=VARCHAR}, #{userid,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR} + ) + + + + insert into inv_warehouse_user + + + code, + + + userId, + + + userName, + + + + + #{code,jdbcType=VARCHAR}, + + + #{userid,jdbcType=BIGINT}, + + + #{username,jdbcType=VARCHAR}, + + + + + + update inv_warehouse_user + + + code = #{code,jdbcType=VARCHAR}, + + + userId = #{userid,jdbcType=BIGINT}, + + + userName = #{username,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + update inv_warehouse_user + set code = #{code,jdbcType=VARCHAR}, + userId = #{userid,jdbcType=BIGINT}, + userName = #{username,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + update inv_warehouse_user + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.userid,jdbcType=BIGINT} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.username,jdbcType=VARCHAR} + + + + where id in + + #{item.id,jdbcType=INTEGER} + + + + + update inv_warehouse_user + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.userid,jdbcType=BIGINT} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.username,jdbcType=VARCHAR} + + + + + where id in + + #{item.id,jdbcType=INTEGER} + + + + + insert into inv_warehouse_user + (code, userId, userName) + values + + (#{item.code,jdbcType=VARCHAR}, #{item.userid,jdbcType=BIGINT}, #{item.username,jdbcType=VARCHAR} + ) + + + + + insert into inv_warehouse_user + + + id, + + code, + userId, + userName, + + values + + + #{id,jdbcType=INTEGER}, + + #{code,jdbcType=VARCHAR}, + #{userid,jdbcType=BIGINT}, + #{username,jdbcType=VARCHAR}, + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + code = #{code,jdbcType=VARCHAR}, + userId = #{userid,jdbcType=BIGINT}, + userName = #{username,jdbcType=VARCHAR}, + + + + + insert into inv_warehouse_user + + + id, + + + code, + + + userId, + + + userName, + + + values + + + #{id,jdbcType=INTEGER}, + + + #{code,jdbcType=VARCHAR}, + + + #{userid,jdbcType=BIGINT}, + + + #{username,jdbcType=VARCHAR}, + + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + + code = #{code,jdbcType=VARCHAR}, + + + userId = #{userid,jdbcType=BIGINT}, + + + userName = #{username,jdbcType=VARCHAR}, + + + + + + \ No newline at end of file