27 changed files with 695 additions and 98 deletions
@ -0,0 +1,55 @@
|
||||
package org.springblade.common.constant; |
||||
|
||||
/** |
||||
* 包件类型 |
||||
*/ |
||||
public enum PackagesTypeEnum { |
||||
|
||||
GT("GT","柜体"), |
||||
BB("BB","背板"), |
||||
BC("BC","标抽"), |
||||
WJ("WJ","五金"), |
||||
MM("MM","柜门"), |
||||
MK("MK","柜门"), |
||||
LK("LK","柜门"), |
||||
XS("XS","柜门"), |
||||
PM("PM","柜门"), |
||||
QM("QM","柜门"); |
||||
|
||||
|
||||
private String typeCode; |
||||
private String typeMes; |
||||
|
||||
PackagesTypeEnum(String typeCode, String typeMes) { |
||||
this.typeCode = typeCode; |
||||
this.typeMes = typeMes; |
||||
} |
||||
|
||||
|
||||
public String getTypeCode() { |
||||
return typeCode; |
||||
} |
||||
|
||||
public void setTypeCode(String typeCode) { |
||||
this.typeCode = typeCode; |
||||
} |
||||
|
||||
public String getTypeMes() { |
||||
return typeMes; |
||||
} |
||||
|
||||
public void setTypeMes(String typeMes) { |
||||
this.typeMes = typeMes; |
||||
} |
||||
|
||||
public static String getMes(String typeCode){ |
||||
PackagesTypeEnum[] values = PackagesTypeEnum.values(); |
||||
for(PackagesTypeEnum packagesTypeEnum:values){ |
||||
if(packagesTypeEnum.getTypeCode().equals(typeCode)){ |
||||
return packagesTypeEnum.getTypeMes(); |
||||
} |
||||
} |
||||
return "特排"; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,154 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.oldproject.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
/** |
||||
* 仓库 实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2023-05-24 |
||||
*/ |
||||
@Data |
||||
@TableName("ht_warehouse") |
||||
@ApiModel(value = "Warehouse对象", description = "仓库") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class WarehouseEntity extends TenantEntity { |
||||
|
||||
/** |
||||
* 代码 |
||||
*/ |
||||
@ApiModelProperty(value = "代码") |
||||
private String no; |
||||
/** |
||||
* 公司id |
||||
*/ |
||||
@ApiModelProperty(value = "公司id") |
||||
private Integer companyId; |
||||
/** |
||||
* 事业线 |
||||
*/ |
||||
@ApiModelProperty(value = "事业线") |
||||
private Integer businessLineId; |
||||
/** |
||||
* |
||||
*/ |
||||
@ApiModelProperty(value = "") |
||||
private Integer provinceId; |
||||
/** |
||||
* 商场id |
||||
*/ |
||||
@ApiModelProperty(value = "商场id") |
||||
private String storeId; |
||||
/** |
||||
* |
||||
*/ |
||||
@ApiModelProperty(value = "") |
||||
private Integer cityId; |
||||
/** |
||||
* |
||||
*/ |
||||
@ApiModelProperty(value = "") |
||||
private String areaId; |
||||
/** |
||||
* 仓库名称 |
||||
*/ |
||||
@ApiModelProperty(value = "仓库名称") |
||||
private String title; |
||||
/** |
||||
* 简称 |
||||
*/ |
||||
@ApiModelProperty(value = "简称") |
||||
private String shortTitle; |
||||
/** |
||||
* 单位 |
||||
*/ |
||||
@ApiModelProperty(value = "单位") |
||||
private String unit; |
||||
/** |
||||
* 仓库类型:1=基地仓,0=中心仓 |
||||
*/ |
||||
@ApiModelProperty(value = "仓库类型:1=基地仓,0=中心仓") |
||||
private Byte isBase; |
||||
/** |
||||
* 仓库地址 |
||||
*/ |
||||
@ApiModelProperty(value = "仓库地址") |
||||
private String address; |
||||
/** |
||||
* 仓库电话 |
||||
*/ |
||||
@ApiModelProperty(value = "仓库电话") |
||||
private String phone; |
||||
/** |
||||
* 仓库联系人 |
||||
*/ |
||||
@ApiModelProperty(value = "仓库联系人") |
||||
private String contactName; |
||||
/** |
||||
* 经度 |
||||
*/ |
||||
@ApiModelProperty(value = "经度") |
||||
private String lng; |
||||
/** |
||||
* 维度 |
||||
*/ |
||||
@ApiModelProperty(value = "维度") |
||||
private String lat; |
||||
/** |
||||
* 仓库备注 |
||||
*/ |
||||
@ApiModelProperty(value = "仓库备注") |
||||
private String remark; |
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private Integer administratorsId; |
||||
/** |
||||
* 删除时间 |
||||
*/ |
||||
@ApiModelProperty(value = "删除时间") |
||||
private Integer deleteTime; |
||||
/** |
||||
* 营业部收款码 |
||||
*/ |
||||
@ApiModelProperty(value = "营业部收款码") |
||||
private String paymentCode; |
||||
/** |
||||
* 打印机模板版本 |
||||
*/ |
||||
@ApiModelProperty(value = "打印机模板版本") |
||||
private Byte printVision; |
||||
/** |
||||
* 欧派仓库Token |
||||
*/ |
||||
@ApiModelProperty(value = "欧派仓库Token") |
||||
private String opaiWarehouseToken; |
||||
/** |
||||
* 欧派仓 |
||||
*/ |
||||
@ApiModelProperty(value = "欧派仓") |
||||
private String opaiWarehouse; |
||||
|
||||
} |
@ -0,0 +1,48 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.oldproject.feign; |
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
||||
/** |
||||
* 仓库 Feign接口类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2023-05-10 |
||||
*/ |
||||
@FeignClient( |
||||
value = "logpm-old-project" |
||||
) |
||||
public interface IWarehouseClient { |
||||
|
||||
String API_PREFIX = "/client"; |
||||
String TOP = API_PREFIX + "/top3"; |
||||
|
||||
// /**
|
||||
// * 获取包内产品明细列表
|
||||
// * @param current 页号
|
||||
// * @param size 页数
|
||||
// * @return BladePage
|
||||
// */
|
||||
// @GetMapping(TOP)
|
||||
// BladePage<ServiceNumEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
|
||||
|
||||
@GetMapping("/selectIdByName") |
||||
Integer selectIdByName(@RequestParam String siteName); |
||||
} |
@ -0,0 +1,34 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.oldproject.vo; |
||||
|
||||
import com.logpm.oldproject.entity.WarehouseEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* 仓库 视图实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2023-05-24 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class WarehouseVO extends WarehouseEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.logpm.factory.snm.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class GroupByPackagesDTO { |
||||
|
||||
private String packagenum; |
||||
private String lx; |
||||
private Integer total; |
||||
|
||||
} |
@ -0,0 +1,45 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.oldproject.feign; |
||||
|
||||
import com.logpm.oldproject.service.IWarehouseService; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
/** |
||||
* 仓库 Feign实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2023-05-24 |
||||
*/ |
||||
@ApiIgnore() |
||||
@RestController |
||||
@AllArgsConstructor |
||||
public class WarehouseClient implements IWarehouseClient { |
||||
|
||||
private final IWarehouseService warehouseService; |
||||
|
||||
|
||||
@Override |
||||
@GetMapping("/selectIdByName") |
||||
public Integer selectIdByName(String siteName) { |
||||
|
||||
return warehouseService.selectIdByName(siteName); |
||||
} |
||||
} |
@ -0,0 +1,44 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.oldproject.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.logpm.oldproject.entity.WarehouseEntity; |
||||
import com.logpm.oldproject.vo.WarehouseVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 仓库 Mapper 接口 |
||||
* |
||||
* @author BladeX |
||||
* @since 2023-05-24 |
||||
*/ |
||||
public interface WarehouseMapper extends BaseMapper<WarehouseEntity> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page |
||||
* @param warehouse |
||||
* @return |
||||
*/ |
||||
List<WarehouseVO> selectWarehousePage(IPage page, WarehouseVO warehouse); |
||||
|
||||
Integer selectIdByName(String siteName); |
||||
} |
@ -0,0 +1,46 @@
|
||||
<?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.logpm.oldproject.mapper.WarehouseMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="warehouseResultMap" type="com.logpm.oldproject.entity.WarehouseEntity"> |
||||
<result column="id" property="id"/> |
||||
<result column="no" property="no"/> |
||||
<result column="company_id" property="companyId"/> |
||||
<result column="business_line_id" property="businessLineId"/> |
||||
<result column="province_id" property="provinceId"/> |
||||
<result column="store_id" property="storeId"/> |
||||
<result column="city_id" property="cityId"/> |
||||
<result column="area_id" property="areaId"/> |
||||
<result column="title" property="title"/> |
||||
<result column="short_title" property="shortTitle"/> |
||||
<result column="unit" property="unit"/> |
||||
<result column="is_base" property="isBase"/> |
||||
<result column="status" property="status"/> |
||||
<result column="address" property="address"/> |
||||
<result column="phone" property="phone"/> |
||||
<result column="contact_name" property="contactName"/> |
||||
<result column="lng" property="lng"/> |
||||
<result column="lat" property="lat"/> |
||||
<result column="remark" property="remark"/> |
||||
<result column="administrators_id" property="administratorsId"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="delete_time" property="deleteTime"/> |
||||
<result column="payment_code" property="paymentCode"/> |
||||
<result column="print_vision" property="printVision"/> |
||||
<result column="opai_warehouse_token" property="opaiWarehouseToken"/> |
||||
<result column="opai_warehouse" property="opaiWarehouse"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectWarehousePage" resultMap="warehouseResultMap"> |
||||
select * from ht_warehouse where is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="selectIdByName" resultType="Integer"> |
||||
select id from ht_warehouse where short_title like concat('%',#{siteName},'%') limit 1 |
||||
</select> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,43 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.oldproject.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.logpm.oldproject.entity.WarehouseEntity; |
||||
import com.logpm.oldproject.vo.WarehouseVO; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
/** |
||||
* 仓库 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2023-05-24 |
||||
*/ |
||||
public interface IWarehouseService extends BaseService<WarehouseEntity> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page |
||||
* @param warehouse |
||||
* @return |
||||
*/ |
||||
IPage<WarehouseVO> selectWarehousePage(IPage<WarehouseVO> page, WarehouseVO warehouse); |
||||
|
||||
Integer selectIdByName(String siteName); |
||||
} |
||||
|
||||
|
@ -0,0 +1,50 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.oldproject.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.logpm.oldproject.entity.WarehouseEntity; |
||||
import com.logpm.oldproject.mapper.WarehouseMapper; |
||||
import com.logpm.oldproject.service.IWarehouseService; |
||||
import com.logpm.oldproject.vo.WarehouseVO; |
||||
import lombok.extern.log4j.Log4j2; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* 仓库 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2023-05-24 |
||||
*/ |
||||
@Log4j2 |
||||
@Service |
||||
public class WarehouseServiceImpl extends BaseServiceImpl<WarehouseMapper, WarehouseEntity> implements IWarehouseService { |
||||
|
||||
@Override |
||||
public IPage<WarehouseVO> selectWarehousePage(IPage<WarehouseVO> page, WarehouseVO warehouse) { |
||||
return page.setRecords(baseMapper.selectWarehousePage(page, warehouse)); |
||||
} |
||||
|
||||
@Override |
||||
public Integer selectIdByName(String siteName) { |
||||
log.info("##########selectIdByName: siteName="+siteName); |
||||
return baseMapper.selectIdByName(siteName); |
||||
} |
||||
|
||||
|
||||
} |
Loading…
Reference in new issue