diff --git a/wms-biz/README.md b/wms-biz/README.md new file mode 100644 index 0000000..45bde7d --- /dev/null +++ b/wms-biz/README.md @@ -0,0 +1,34 @@ + +## 商享通WMS项目结构 +### 一、目录说明 +``` +wms-biz -- 根项目 + ├─ src -- 微服务的基础设施中心 + ├─ main + ├─ java + ├─ com.yxt.wms + ├─ apiadmin -- pc端后台接口路径 + ├─ aggregation -- 多表或功能的聚合服务接口 + ├─ apiwx -- 微信端接口路径 + ├─ biz -- 服务类目录,一个表一个服务 + ├─ aggregation -- 多表组合或功能的聚合服务类 + ├─ goods -- 商品 + ├─ inventory -- 库存 + ├─ supplier -- 供应商 + ├─ user -- 用户 + ├─ warehouseout -- 出库 + ├─ warehousereceipt -- 入库 + ├─ warehouseset -- 仓库设置 + ├─ config -- + ├─ feign -- + ├─ utils -- + ├─ resources -- + +``` +### 二、项目用到的组件 +``` +1、nacos +2、redis +3、mysql +4、gateway +``` \ No newline at end of file diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/Goods.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/Goods.java new file mode 100644 index 0000000..06eb00b --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/Goods.java @@ -0,0 +1,32 @@ +package com.yxt.wms.biz.aggregation.goods; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class Goods extends BaseEntity { + private String goodsCode;//商品代码 + private String barCode;//条形码 + private String goodsName;//商品名称 + private String subTitle;//商品名称 + private String goodsPY;//拼音缩写 + private String goodsShortName;//商品简称 + private String goodsTypeSid;//商品分类sid + private String brandSid;//品牌sid + private String manufacturerSid;//厂家sid + private String goodsUnitSid;//商品单位sid + private String goodsUnitName;//商品单位名称 + private String taxRate;//税率 + private String shelfLife;//保质期天 + private String nationalStandardCode;//国标码 + private String sortNo;//排序 + private String externalCode;//外部编码 + private String factoryCode;//厂家货号 + private String isListed;//是否上架 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsDto.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsDto.java new file mode 100644 index 0000000..6fd8b0f --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsDto.java @@ -0,0 +1,45 @@ +package com.yxt.wms.biz.aggregation.goods; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; + +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class GoodsDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsCode;//商品代码 + private String barCode;//条形码 + private String goodsName;//商品名称 + private String subTitle;//副标题 + private String goodsPY;//拼音缩写 + private String goodsShortName;//商品简称 + private String goodsTypeSid;//商品分类sid + private String brandSid;//品牌sid + private String manufacturerSid;//厂家sid + private String goodsUnitSid;//商品单位sid + private String goodsUnitName;//商品单位名称 + private String taxRate;//税率 + private String shelfLife;//保质期天 + private String nationalStandardCode;//国标码 + private String sortNo;//排序 + private String externalCode;//外部编码 + private String factoryCode;//厂家货号 + private String isListed;//是否上架 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + + +} diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsMapper.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsMapper.java new file mode 100644 index 0000000..76c2cfe --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsMapper.java @@ -0,0 +1,19 @@ +package com.yxt.wms.biz.aggregation.goods; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface GoodsMapper extends BaseMapper { + + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + GoodsVo initialization(@Param("sid")String sid); +} diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsMapper.xml b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsMapper.xml new file mode 100644 index 0000000..4280837 --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + \ No newline at end of file diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsQuery.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsQuery.java new file mode 100644 index 0000000..2cd9cd2 --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsQuery.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.aggregation.goods; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class GoodsQuery implements Query { + private String name; +} diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsService.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsService.java new file mode 100644 index 0000000..bb2c4b0 --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsService.java @@ -0,0 +1,371 @@ +package com.yxt.wms.biz.aggregation.goods; + +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.func.basegoodsspu.BaseGoodsSpuVo; +import com.yxt.wms.feign.base.basebrandinfo.BaseBrandInfoFeign; +import com.yxt.wms.feign.base.basegoodsspu.BaseGoodsSpuFeign; +import com.yxt.wms.feign.base.basegoodstype.BaseGoodsTypeFeign; +import com.yxt.wms.feign.base.basegoodsunit.BaseGoodsUnitFeign; +import com.yxt.wms.feign.base.basemanufacturer.BaseManufacturerFeign; +import com.yxt.wms.utils.ExcelUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.net.URLEncoder; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class GoodsService extends MybatisBaseService { + // @Autowired +// private FileUploadComponent fileUploadComponent; + @Autowired + BaseGoodsTypeFeign baseGoodsTypeFeign; + @Autowired + BaseBrandInfoFeign baseBrandInfoFeign; + @Autowired + BaseManufacturerFeign baseManufacturerFeign; + @Autowired + BaseGoodsUnitFeign baseGoodsUnitFeign; + @Value("${image.upload.path:http://127.0.0.1:8080/upload/}") + String path; + @Autowired + BaseGoodsSpuFeign baseGoodsSpuFeign; + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + return baseGoodsSpuFeign.listPage(pq); + } + + @Transactional + public ResultBean saveOrUpdate(GoodsDto dto) { + ResultBean rb = ResultBean.fireFail(); + return baseGoodsSpuFeign.saveOrUpdate(dto); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + return baseGoodsSpuFeign.initialization(sid); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + Goods wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + baseMapper.deleteById(wmsGoods.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + return baseGoodsSpuFeign.updateIsEnable(sid, isEnable); + } + + public void download(HttpServletRequest request, HttpServletResponse response) { + + // 指定要下载的文件路径 + String filePath = path + "商品导入模板.xls"; + String fileName = new File(filePath).getName(); + String encodedFileName = null; + try { + encodedFileName = URLEncoder.encode(fileName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + // 设置响应头信息 + response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedFileName + "\""); + // 获取文件名 + response.setContentType("application/octet-stream"); + // 读取文件并将其写入响应输出流 + try (InputStream in = new FileInputStream(filePath); + OutputStream out = response.getOutputStream()) { + byte[] buffer = new byte[4096]; + int bytesRead; + while ((bytesRead = in.read(buffer)) != -1) { + out.write(buffer, 0, bytesRead); + } + } catch (FileNotFoundException e) { + throw new RuntimeException(e); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +// +// public ResultBean importExcel(MultipartFile file) throws IOException { +//// return baseGoodsSpuFeign.importExcel(file); +// ResultBean rb=new ResultBean().fail(); +// //檢查excel +// ExcelUtil.checkFile(file); +// //解析excel +// List list = ExcelUtil.readExcel(file); +// if (!list.isEmpty()) { +// List tt = new ArrayList(); +// List tt1 = new ArrayList(); +// for (int i = 0; i < list.size(); i++) { +// GoodsDto dto =new GoodsDto(); +// String taxRate = StringUtils.isEmpty(list.get(i)[10]) ? null : list.get(i)[10]; +// if(StringUtils.isNotBlank(taxRate)){ +// if(!taxRate.contains(".")){ +// return rb.setMsg("第" + (i + 1) + "行税率格式不正确!"); +// } +// if(taxRate.length()>4){ +// return rb.setMsg("第" + (i + 1) + "行税率长度不正确!"); +// } +// } +// +// dto = this.packaging(list.get(i),dto); +// if (null == dto) { +// return rb.setMsg("导入失败,第" + (i + 1) + "行数据错误!"); +// } else { +// tt.add(dto); +// } +// } +// tt1=a(tt); +// for (GoodsDto goodsDto : tt1) { +// String goodsTypeSid = StringUtils.isEmpty(goodsDto.getGoodsTypeSid()) ? null : goodsDto.getGoodsTypeSid(); +// if (StringUtils.isNotBlank(goodsTypeSid)) { +// GoodsType baseGoodsType = baseGoodsTypeFeign.getTypeByName(goodsTypeSid).getData(); +// if (null != baseGoodsType) { +// goodsDto.setGoodsTypeSid(baseGoodsType.getSid()); +// } else { +// return rb.setMsg("商品分类:" + goodsTypeSid + "不存在,请先添加"); +// } +// } +// +// String brandSid = StringUtils.isEmpty(goodsDto.getBrandSid()) ? null : goodsDto.getBrandSid(); +// if (StringUtils.isNotBlank(brandSid)) { +// BaseBrandInfo brand = baseBrandInfoFeign.getBrandByName(brandSid).getData(); +// if (null != brand) { +// goodsDto.setBrandSid(brand.getSid()); +// } else { +// return rb.setMsg("商品品牌:" + brandSid + "不存在,请先添加"); +// } +// } +// +// String manufacturerSid = StringUtils.isEmpty(goodsDto.getManufacturerSid()) ? null : goodsDto.getManufacturerSid(); +// if (StringUtils.isNotBlank(manufacturerSid)) { +// BaseManufacturer baseManufacturer = baseManufacturerFeign.getManufacturerByName(manufacturerSid).getData(); +// if (null != baseManufacturer) { +// goodsDto.setManufacturerSid(baseManufacturer.getSid()); +// } else { +// return rb.setMsg("商品厂家:" + manufacturerSid + "不存在,请先添加"); +// } +// } +// +// String goodsUnitSid = StringUtils.isEmpty(goodsDto.getGoodsUnitName()) ? null : goodsDto.getGoodsUnitName(); +// if (StringUtils.isNotBlank(goodsUnitSid)) { +// BaseGoodsUnit baseGoodsUnit = baseGoodsUnitFeign.getUnitByName(goodsUnitSid).getData(); +// if (null != baseGoodsUnit) { +// goodsDto.setGoodsUnitSid(baseGoodsUnit.getSid()); +// } else { +// return rb.setMsg("商品单位:" + goodsUnitSid + "不存在,请先添加"); +// } +// } +// } +// baseGoodsSpuFeign.batchSave(tt1); +// return rb.success().setMsg("导入成功"); +// +// } else { +// return rb.setMsg("导入文件没有有效数据"); +// } +// } +// +// public List a(List dtos) { +// ResultBean rb=new ResultBean().fail(); +// List spus = new ArrayList<>();//spu list +// int goodsCode =dtos.stream().filter(b->StringUtils.isEmpty(b.getGoodsCode())).collect(Collectors.toList()).size(); +// if(goodsCode==0){ +// spus = dtos.stream().filter(distinctByKey(GoodsDto::getGoodsCode)).collect(Collectors.toList()); +// }else{ +// spus = dtos.stream().filter(distinctByKey(GoodsDto::getGoodsName)).collect(Collectors.toList()); +// } +// for (GoodsDto goodsDto : spus) { +// BaseGoodsSpuDetailDto spuDetail = new BaseGoodsSpuDetailDto(); +// List skus = new ArrayList<>(); +// String sid = UUID.randomUUID().toString(); +// goodsDto.setSid(sid); +// List dtos1=new ArrayList<>(); +// if(goodsCode==0){ +// dtos1 = dtos.stream().filter(d -> d.getGoodsCode().equals(goodsDto.getGoodsCode())).collect(Collectors.toList()); +// }else{ +// dtos1 = dtos.stream().filter(d -> d.getGoodsName().equals(goodsDto.getGoodsName())).collect(Collectors.toList()); +// } +// spuDetail.setGoodsExplain(dtos1.get(0).getBaseGoodsSpuDetail().getGoodsExplain()); +// spuDetail.setGoodsDescription(dtos1.get(0).getBaseGoodsSpuDetail().getGoodsDescription()); +// spuDetail.setSid(UUID.randomUUID().toString()); +// spuDetail.setGoodSpuSid(goodsDto.getSid()); +// for (GoodsDto dto : dtos1) { +// BaseGoodsSkuDto sku = new BaseGoodsSkuDto(); +// String skuSid = UUID.randomUUID().toString(); +// sku.setGoodsSkuCode(dto.getBaseGoodsSkus().get(0).getGoodsSkuCode()); +// sku.setTitle(dto.getBaseGoodsSkus().get(0).getTitle()); +// sku.setExternalCode(dto.getBaseGoodsSkus().get(0).getExternalCode()); +// sku.setGoodsSpuSid(sid); +// sku.setSid(skuSid); +// BaseGoodsSkuExtendDto skuExtend = new BaseGoodsSkuExtendDto(); +// skuExtend.setSid(UUID.randomUUID().toString()); +// skuExtend.setGoodsSkuSid(skuSid); +// skuExtend.setSortNo("1"); +// skuExtend.setFinalPurchasePrice(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getFinalPurchasePrice()); +// skuExtend.setSafetyStockDays(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getSafetyStockDays()); +// skuExtend.setIsOriginalFactory(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getIsOriginalFactory()); +// skuExtend.setIsInventoryAlert(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getIsInventoryAlert()); +// skuExtend.setInventoryAlertUpperLimit(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getInventoryAlertUpperLimit()); +// skuExtend.setInventoryAlertLowerLimit(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getInventoryAlertLowerLimit()); +// skuExtend.setCostPrice(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getCostPrice()); +// skuExtend.setTagPrice(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getTagPrice()); +// skuExtend.setSalesPrice(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getSalesPrice()); +// skuExtend.setStandardPurchasePrice(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getStandardPurchasePrice()); +// skuExtend.setAgencyPrice(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getAgencyPrice()); +// skuExtend.setDiscount(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getDiscount()); +// skuExtend.setMinimumSalesPrice(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getMinimumSalesPrice()); +// skuExtend.setIsLockingSalesPrice(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getIsLockingSalesPrice()); +// skuExtend.setIsIntegralExchange(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getIsIntegralExchange()); +// skuExtend.setIntegralAmount(dto.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getIntegralAmount()); +// sku.setBaseGoodsSkuExtend(skuExtend); +// skus.add(sku); +// } +// goodsDto.setBaseGoodsSkus(skus); +// goodsDto.setBaseGoodsSpuDetail(spuDetail); +// } +// return spus; +// } + + private static Predicate distinctByKey(Function keyExtractor) { + Set seen = ConcurrentHashMap.newKeySet(); + return t -> seen.add(keyExtractor.apply(t)); + } + +// private GoodsDto packaging(String[] arr, GoodsDto goodsDto) { +// Map result = new HashMap<>(); +// //0四电名称1四电类别2规格3数量4单价5总价6单位7备注 +//// BaseGoodsSpuDto baseGoodsSpuDto =null; +// try { +// String goodsCode = StringUtils.isEmpty(arr[0]) ? "" : arr[0];// +// String barCode = StringUtils.isEmpty(arr[1]) ? "" : arr[1];// +// String goodsName = StringUtils.isEmpty(arr[2]) ? "" : arr[2];// +// String subTitle = StringUtils.isEmpty(arr[3]) ? "" : arr[3]; +// String goodsPY = StringUtils.isEmpty(arr[4]) ? "": arr[4]; +// String goodsShortName = StringUtils.isEmpty(arr[5]) ? "" :arr[5]; +// String goodsTypeSid = StringUtils.isEmpty(arr[6]) ? "" : arr[6]; +// String brandSid = StringUtils.isEmpty(arr[7]) ? "" : arr[7]; +// String manufacturerSid = StringUtils.isEmpty(arr[8]) ? "" : arr[8]; +//// String goodsUnitSid = StringUtils.isEmpty(arr[9]) ? null : arr[9]; +// String goodsUnitName = StringUtils.isEmpty(arr[9]) ? "" : arr[9]; +// String taxRate = StringUtils.isEmpty(arr[10]) ? "0" : arr[10]; +// String shelfLife = StringUtils.isEmpty(arr[11]) ? "0" : arr[11]; +// String nationalStandardCode = StringUtils.isEmpty(arr[12]) ? "" : arr[12]; +// String externalCode = StringUtils.isEmpty(arr[13]) ? "" : arr[13]; +// String factoryCode = StringUtils.isEmpty(arr[14]) ? "" : arr[14]; +// String isListed = (StringUtils.isEmpty(arr[15]) ? "1" : arr[15].equals("是")? "1":"2"); +// String useOrgSid = StringUtils.isEmpty(arr[16]) ? "" : arr[16]; +// String createOrgSid = StringUtils.isEmpty(arr[17]) ? "" : arr[17]; +// +//// String goodSpuSid = StringUtils.isEmpty(arr[19]) ? null : arr[19]; +// String goodsExplain = StringUtils.isEmpty(arr[18]) ? "" : arr[18]; +// String goodsDescription = StringUtils.isEmpty(arr[19]) ? "" : arr[19]; +// +// String goodsSkuSid = ""; +// String goodsSkuCode = StringUtils.isEmpty(arr[20]) ? "" : arr[20]; +// String title = StringUtils.isEmpty(arr[21]) ? "" : arr[21]; +// String skuExternalCode = StringUtils.isEmpty(arr[22]) ? "" : arr[22]; +// +// String finalPurchasePrice = StringUtils.isEmpty(arr[23]) ? "" : arr[23]; +// String safetyStockDays = StringUtils.isEmpty(arr[24]) ? "" : arr[24]; +// String isOriginalFactory = (StringUtils.isEmpty(arr[25]) ? "1" : arr[25].equals("是")? "1":"2"); +// String isInventoryAlert = (StringUtils.isEmpty(arr[26]) ? "1" : arr[26].equals("是")? "1":"2"); +// String inventoryAlertUpperLimit = StringUtils.isEmpty(arr[27]) ? "0" : arr[27]; +// String inventoryAlertLowerLimit = StringUtils.isEmpty(arr[28]) ? "0" : arr[28]; +// String costPrice = StringUtils.isEmpty(arr[29]) ? "0" : arr[29]; +// String tagPrice = StringUtils.isEmpty(arr[30]) ? "0" : arr[30]; +// String salesPrice = StringUtils.isEmpty(arr[31]) ? "0" : arr[31]; +// String standardPurchasePrice = StringUtils.isEmpty(arr[32]) ? "0" : arr[32]; +// String agencyPrice = StringUtils.isEmpty(arr[33]) ? "0" : arr[33]; +// String discount = StringUtils.isEmpty(arr[34]) ? "0" : arr[34]; +// String minimumSalesPrice = StringUtils.isEmpty(arr[35]) ? "0" : arr[35]; +// String isLockingSalesPrice = (StringUtils.isEmpty(arr[36]) ? "1" : arr[36].equals("是")? "1":"2"); +// String isIntegralExchange = (StringUtils.isEmpty(arr[37]) ? "1" : arr[37].equals("是")? "1":"2"); +// String integralAmount = StringUtils.isEmpty(arr[38]) ? "0" : arr[38]; +// +// //excel表中物资类别保存的是分类编号,插入数据库时 根据分类编号查询基础数据中 物资类别表的id +// +// goodsDto.setSortNo("1"); +// goodsDto.setGoodsCode(goodsCode); +// goodsDto.setBarCode(barCode);//物资类别 保存物资类别表id +// goodsDto.setGoodsName(goodsName); +// goodsDto.setSubTitle(subTitle); +// goodsDto.setGoodsPY(goodsPY); +// goodsDto.setGoodsShortName(goodsShortName); +// +// goodsDto.setGoodsTypeSid(goodsTypeSid); +// goodsDto.setBrandSid(brandSid); +// goodsDto.setManufacturerSid(manufacturerSid); +//// baseGoodsSpuDto.setGoodsUnitSid(goodsUnitSid); +// goodsDto.setGoodsUnitName(goodsUnitName); +// goodsDto.setTaxRate(taxRate); +// goodsDto.setShelfLife(shelfLife); +// goodsDto.setNationalStandardCode(nationalStandardCode); +// goodsDto.setExternalCode(externalCode); +// goodsDto.setFactoryCode(factoryCode); +// goodsDto.setIsListed(isListed); +// goodsDto.setUseOrgSid(useOrgSid); +// goodsDto.setCreateOrgSid(createOrgSid); +// BaseGoodsSpuDetailDto dto=new BaseGoodsSpuDetailDto(); +// dto.setGoodsExplain(goodsExplain); +// dto.setGoodsDescription(goodsDescription); +// goodsDto.setBaseGoodsSpuDetail(dto); +// List dtos=new ArrayList<>(); +// BaseGoodsSkuDto dto1=new BaseGoodsSkuDto(); +// dto1.setGoodsSkuCode(goodsSkuCode); +// dto1.setTitle(title); +// dto1.setExternalCode(skuExternalCode); +// BaseGoodsSkuExtendDto dto2=new BaseGoodsSkuExtendDto(); +// dto2.setSortNo("1"); +// dto2.setFinalPurchasePrice(finalPurchasePrice); +// dto2.setSafetyStockDays(safetyStockDays); +// dto2.setIsOriginalFactory(isOriginalFactory); +// dto2.setIsInventoryAlert(isInventoryAlert); +// dto2.setInventoryAlertUpperLimit(inventoryAlertUpperLimit); +// dto2.setInventoryAlertLowerLimit(inventoryAlertLowerLimit); +// dto2.setCostPrice(costPrice); +// dto2.setTagPrice(tagPrice); +// dto2.setSalesPrice(salesPrice); +// dto2.setStandardPurchasePrice(standardPurchasePrice); +// dto2.setAgencyPrice(agencyPrice); +// dto2.setDiscount(discount); +// dto2.setMinimumSalesPrice(minimumSalesPrice); +// dto2.setIsLockingSalesPrice(isLockingSalesPrice); +// dto2.setIsIntegralExchange(isIntegralExchange); +// dto2.setIntegralAmount(integralAmount); +// dto1.setBaseGoodsSkuExtend(dto2); +// dtos.add(dto1); +// goodsDto.setBaseGoodsSkus(dtos); +// +// } catch (Exception e) { +// e.printStackTrace(); +// return null; +// } +// return goodsDto; +// } + +} diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsVo.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsVo.java new file mode 100644 index 0000000..c2f1746 --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/goods/GoodsVo.java @@ -0,0 +1,47 @@ +package com.yxt.wms.biz.aggregation.goods; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class GoodsVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodsCode;//商品代码 + private String barCode;//条形码 + private String goodsName;//商品名称 + private String subTitle;//商品名称 + private String goodsPY;//拼音缩写 + private String goodsShortName;//商品简称 + private String goodsTypeSid;//商品分类sid + private String brandSid;//品牌sid + private String manufacturerSid;//厂家sid + private String goodsUnitSid;//商品单位sid + private String goodsUnitName;//商品单位名称 + private String taxRate;//税率 + private String shelfLife;//保质期天 + private String nationalStandardCode;//国标码 + private String sortNo;//排序 + private String externalCode;//外部编码 + private String factoryCode;//厂家货号 + private String isListed;//是否上架 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfo.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfo.java new file mode 100644 index 0000000..c7f9bda --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfo.java @@ -0,0 +1,112 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.aggregation.supplier; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfo.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfo
+ * Description: 供应商信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息", description = "供应商信息") +@TableName("base_supplier_info") +public class SupplierInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("编码") + private String supplierCode; // 编码 + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("供应商名称拼音") + private String supplierPY; // 供应商名称拼音 + @ApiModelProperty("供应商类型sid") + private String supplierTypeSid; // 供应商类型sid + @ApiModelProperty("供应商类型") + private String supplierTypeName; // 供应商类型 + @ApiModelProperty("省sid") + private String provinceSid; // 省sid + @ApiModelProperty("province") + private String province; // + @ApiModelProperty("市sid") + private String citySid; // 市sid + @ApiModelProperty("city") + private String city; // + @ApiModelProperty("收货县区sid") + private String countySid; // 收货县区sid + @ApiModelProperty("county") + private String county; // + @ApiModelProperty("详细地址") + private String address; // 详细地址 + @ApiModelProperty("手机") + private String contactMobile; // 手机 + @ApiModelProperty("电话") + private String contactTelePhone; // 电话 + @ApiModelProperty("联系人") + private String contactName; // 联系人 + @ApiModelProperty("传真") + private String fax; // 传真 + @ApiModelProperty("邮编") + private String zipCode; // 邮编 + @ApiModelProperty("电子邮件") + private String email; // 电子邮件 + @ApiModelProperty("网址") + private String website; // 网址 + @ApiModelProperty("开票公司名称") + private String billingCompanyName; // 开票公司名称 + @ApiModelProperty("税号") + private String registNum; // 税号 + @ApiModelProperty("法人") + private String legalName; // 法人 + @ApiModelProperty("采购员") + private String purchaser; // 采购员 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("开票类型key") + private String billingTypeKey; // 开票类型key + @ApiModelProperty("开票类型value") + private String billingTypeValue; // 开票类型value + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoChoice.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoChoice.java new file mode 100644 index 0000000..a226445 --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoChoice.java @@ -0,0 +1,54 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.aggregation.supplier; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoVo.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoVo
+ * Description: 供应商信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 视图数据对象", description = "供应商信息 视图数据对象") +public class SupplierInfoChoice implements Vo { + + private String sid; + @ApiModelProperty("供应商名称") + private String supplierName; +} diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoDetailsVo.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoDetailsVo.java new file mode 100644 index 0000000..0458089 --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoDetailsVo.java @@ -0,0 +1,113 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.aggregation.supplier; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoVo.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoVo
+ * Description: 供应商信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 视图数据详情", description = "供应商信息 视图数据详情") +public class SupplierInfoDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("编码") + private String supplierCode; // 编码 + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("供应商名称拼音") + private String supplierPY; // 供应商名称拼音 + @ApiModelProperty("供应商类型sid") + private String supplierTypeSid; // 供应商类型sid + @ApiModelProperty("供应商类型") + private String supplierTypeName; // 供应商类型 + @ApiModelProperty("省sid") + private String provinceSid; // 省sid + @ApiModelProperty("province") + private String province; // + @ApiModelProperty("市sid") + private String citySid; // 市sid + @ApiModelProperty("city") + private String city; // + @ApiModelProperty("收货县区sid") + private String countySid; // 收货县区sid + @ApiModelProperty("county") + private String county; // + @ApiModelProperty("详细地址") + private String address; // 详细地址 + @ApiModelProperty("手机") + private String contactMobile; // 手机 + @ApiModelProperty("电话") + private String contactTelePhone; // 电话 + @ApiModelProperty("联系人") + private String contactName; // 联系人 + @ApiModelProperty("传真") + private String fax; // 传真 + @ApiModelProperty("邮编") + private String zipCode; // 邮编 + @ApiModelProperty("电子邮件") + private String email; // 电子邮件 + @ApiModelProperty("网址") + private String website; // 网址 + @ApiModelProperty("开票公司名称") + private String billingCompanyName; // 开票公司名称 + @ApiModelProperty("税号") + private String registNum; // 税号 + @ApiModelProperty("法人") + private String legalName; // 法人 + @ApiModelProperty("采购员") + private String purchaser; // 采购员 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("开票类型key") + private String billingTypeKey; // 开票类型key + @ApiModelProperty("开票类型value") + private String billingTypeValue; // 开票类型value + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid +} \ No newline at end of file diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoDto.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoDto.java new file mode 100644 index 0000000..e604552 --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoDto.java @@ -0,0 +1,113 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.aggregation.supplier; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoDto.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoDto
+ * Description: 供应商信息 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 数据传输对象", description = "供应商信息 数据传输对象") +public class SupplierInfoDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("编码") + private String supplierCode; // 编码 + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("供应商名称拼音") + private String supplierPY; // 供应商名称拼音 + @ApiModelProperty("供应商类型sid") + private String supplierTypeSid; // 供应商类型sid + @ApiModelProperty("供应商类型") + private String supplierTypeName; // 供应商类型 + @ApiModelProperty("省sid") + private String provinceSid; // 省sid + @ApiModelProperty("province") + private String province; // + @ApiModelProperty("市sid") + private String citySid; // 市sid + @ApiModelProperty("city") + private String city; // + @ApiModelProperty("收货县区sid") + private String countySid; // 收货县区sid + @ApiModelProperty("county") + private String county; // + @ApiModelProperty("详细地址") + private String address; // 详细地址 + @ApiModelProperty("手机") + private String contactMobile; // 手机 + @ApiModelProperty("电话") + private String contactTelePhone; // 电话 + @ApiModelProperty("联系人") + private String contactName; // 联系人 + @ApiModelProperty("传真") + private String fax; // 传真 + @ApiModelProperty("邮编") + private String zipCode; // 邮编 + @ApiModelProperty("电子邮件") + private String email; // 电子邮件 + @ApiModelProperty("网址") + private String website; // 网址 + @ApiModelProperty("开票公司名称") + private String billingCompanyName; // 开票公司名称 + @ApiModelProperty("税号") + private String registNum; // 税号 + @ApiModelProperty("法人") + private String legalName; // 法人 + @ApiModelProperty("采购员") + private String purchaser; // 采购员 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("开票类型key") + private String billingTypeKey; // 开票类型key + @ApiModelProperty("开票类型value") + private String billingTypeValue; // 开票类型value + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid +} \ No newline at end of file diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoMapper.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoMapper.java new file mode 100644 index 0000000..c498292 --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoMapper.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.aggregation.supplier; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierInfoMapper.java
+ * Class: com.yxt.anrui.as.biz.basesupplierinfo.BaseSupplierInfoMapper
+ * Description: 供应商信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SupplierInfoMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from base_supplier_info") + List selectListVo(); + + @Update("update base_supplier_info set isDelete = '1' where sid = #{sid}") + int updateBySidIsDelete(String sid); + + @Select("select * from base_supplier_info") + List choiceSupplierInfo(String createOrgSid); +} \ No newline at end of file diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoMapper.xml b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoMapper.xml new file mode 100644 index 0000000..f47299d --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoQuery.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoQuery.java new file mode 100644 index 0000000..25c951b --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoQuery.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.aggregation.supplier; + + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoQuery.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoQuery
+ * Description: 供应商信息 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 查询条件", description = "供应商信息 查询条件") +public class SupplierInfoQuery implements Query { + + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商类型") + private String supplierTypeName; + @ApiModelProperty("电话") + private String contactTelePhone; + @ApiModelProperty("联系人") + private String contactName; + + @ApiModelProperty("其他查询条件") + private String otherQuery; +} diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoService.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoService.java new file mode 100644 index 0000000..8a42346 --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoService.java @@ -0,0 +1,85 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.aggregation.supplier; + +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.func.basesupplierinfo.BaseSupplierInfoChoice; +import com.yxt.wms.biz.func.basesupplierinfo.BaseSupplierInfoDetailsVo; +import com.yxt.wms.biz.func.basesupplierinfo.BaseSupplierInfoVo; +import com.yxt.wms.feign.base.basesupplierinfo.BaseSupplierInfoFeign; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierInfoService.java
+ * Class: com.yxt.anrui.as.biz.basesupplierinfo.BaseSupplierInfoService
+ * Description: 供应商信息 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SupplierInfoService extends MybatisBaseService { + + @Autowired + BaseSupplierInfoFeign baseSupplierInfoFeign; + + public ResultBean> listPageVo(PagerQuery pq) { + SupplierInfoQuery query = pq.getParams(); + return baseSupplierInfoFeign.listPage(pq); + } + + public ResultBean saveOrUpdateDto(SupplierInfoDto dto){ + return baseSupplierInfoFeign.save(dto); + } + + public ResultBean fetchDetailsVoBySid(String sid){ + return baseSupplierInfoFeign.fetchDetailsBySid(sid); + } + + public void delAll(String[] sids) { + for (String sid : sids) { + //删除厂商基础信息 + int count = baseMapper.updateBySidIsDelete(sid); + //删除厂商开户行信息 +// int i = baseSupplierBankService.deleteBySupplierSid(sid); + } + } + + public ResultBean> choiceSupplierInfo(String createOrgSid) { + return baseSupplierInfoFeign.choiceSupplierInfo(createOrgSid); + } +} \ No newline at end of file diff --git a/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoVo.java b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoVo.java new file mode 100644 index 0000000..fa7f3a7 --- /dev/null +++ b/wms-biz/src/main/java/com/yxt/wms/biz/aggregation/supplier/SupplierInfoVo.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.aggregation.supplier; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoVo.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoVo
+ * Description: 供应商信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 视图数据对象", description = "供应商信息 视图数据对象") +public class SupplierInfoVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商类型") + private String supplierTypeName; + @ApiModelProperty("详细地址") + private String address; + @ApiModelProperty("电话") + private String contactTelePhone; + @ApiModelProperty("联系人") + private String contactName; + @ApiModelProperty("手机") + private String contactMobile; +} diff --git a/wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodsspu/BaseGoodsSpuFeign.java b/wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodsspu/BaseGoodsSpuFeign.java index c78d3b2..4916f33 100644 --- a/wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodsspu/BaseGoodsSpuFeign.java +++ b/wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodsspu/BaseGoodsSpuFeign.java @@ -3,8 +3,9 @@ package com.yxt.wms.feign.base.basegoodsspu; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.aggregation.goods.GoodsDto; +import com.yxt.wms.biz.aggregation.goods.GoodsQuery; import com.yxt.wms.biz.func.basegoodsspu.BaseGoodsSpuDto; -import com.yxt.wms.biz.func.basegoodsspu.BaseGoodsSpuQuery; import com.yxt.wms.biz.func.basegoodsspu.BaseGoodsSpuVo; import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; @@ -30,11 +31,11 @@ public interface BaseGoodsSpuFeign { @ApiOperation("分页列表") @PostMapping("/listPage") - public ResultBean> listPage(@RequestBody PagerQuery pq); + public ResultBean> listPage(@RequestBody PagerQuery pq); @ApiOperation("保存修改") @PostMapping("/saveOrUpdate") - public ResultBean saveOrUpdate(@RequestBody BaseGoodsSpuDto dto); + public ResultBean saveOrUpdate(@RequestBody GoodsDto dto); @ApiOperation("初始化") @GetMapping("/initialization/{sid}") diff --git a/wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodsspu/BaseGoodsSpuFeignFallback.java b/wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodsspu/BaseGoodsSpuFeignFallback.java index 9193487..dd62794 100644 --- a/wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodsspu/BaseGoodsSpuFeignFallback.java +++ b/wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodsspu/BaseGoodsSpuFeignFallback.java @@ -3,8 +3,9 @@ package com.yxt.wms.feign.base.basegoodsspu; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.aggregation.goods.GoodsDto; +import com.yxt.wms.biz.aggregation.goods.GoodsQuery; import com.yxt.wms.biz.func.basegoodsspu.BaseGoodsSpuDto; -import com.yxt.wms.biz.func.basegoodsspu.BaseGoodsSpuQuery; import com.yxt.wms.biz.func.basegoodsspu.BaseGoodsSpuVo; import org.springframework.stereotype.Component; import org.springframework.web.multipart.MultipartFile; @@ -21,12 +22,12 @@ import java.util.List; public class BaseGoodsSpuFeignFallback implements BaseGoodsSpuFeign { @Override - public ResultBean> listPage(PagerQuery pq) { + public ResultBean> listPage(PagerQuery pq) { return null; } @Override - public ResultBean saveOrUpdate(BaseGoodsSpuDto dto) { + public ResultBean saveOrUpdate(GoodsDto dto) { return null; } diff --git a/wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeign.java b/wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeign.java index 8446df6..c465ea4 100644 --- a/wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeign.java +++ b/wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeign.java @@ -3,6 +3,8 @@ package com.yxt.wms.feign.base.basesupplierinfo; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.aggregation.supplier.SupplierInfoDto; +import com.yxt.wms.biz.aggregation.supplier.SupplierInfoQuery; import com.yxt.wms.biz.func.basesupplierinfo.*; import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; @@ -28,11 +30,11 @@ public interface BaseSupplierInfoFeign { @ApiOperation("根据条件分页查询数据的列表") @PostMapping("/listPage") - public ResultBean> listPage(@RequestBody PagerQuery pq); + public ResultBean> listPage(@RequestBody PagerQuery pq); @ApiOperation("新增或修改") @PostMapping("/save") - public ResultBean save(@RequestBody BaseSupplierInfoDto dto); + public ResultBean save(@RequestBody SupplierInfoDto dto); @ApiOperation("根据sid批量删除") @DeleteMapping("/delBySids") diff --git a/wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeignFallback.java b/wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeignFallback.java index eac4a0e..c36089a 100644 --- a/wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeignFallback.java +++ b/wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeignFallback.java @@ -3,6 +3,8 @@ package com.yxt.wms.feign.base.basesupplierinfo; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.aggregation.supplier.SupplierInfoDto; +import com.yxt.wms.biz.aggregation.supplier.SupplierInfoQuery; import com.yxt.wms.biz.func.basesupplierinfo.*; import org.springframework.stereotype.Component; @@ -22,12 +24,12 @@ public class BaseSupplierInfoFeignFallback implements BaseSupplierInfoFeign { } @Override - public ResultBean> listPage(PagerQuery pq) { + public ResultBean> listPage(PagerQuery pq) { return null; } @Override - public ResultBean save(BaseSupplierInfoDto dto) { + public ResultBean save(SupplierInfoDto dto) { return null; }