21 changed files with 1288 additions and 10 deletions
@ -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 |
|||
``` |
@ -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
|
|||
} |
@ -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
|
|||
|
|||
|
|||
} |
@ -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<Goods> { |
|||
|
|||
IPage<GoodsVo> listPage(IPage<Goods> page, @Param(Constants.WRAPPER) QueryWrapper<Goods> qw); |
|||
GoodsVo initialization(@Param("sid")String sid); |
|||
} |
@ -0,0 +1,27 @@ |
|||
<?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.yxt.wms.biz.basegoodsspu.BaseGoodsSpuMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
|
|||
<select id="listPage" resultType="com.yxt.wms.biz.basegoodsspu.BaseGoodsSpuVo"> |
|||
select |
|||
s.*,a.goodsTypeName as typeName,b.brandName as brandName,c.manufacturerName as manufacturerName |
|||
from base_goods_spu s |
|||
left join base_goods_type a on a.sid=s.goodsTypeSid |
|||
left join base_brand_info b on b.sid=s.brandSid |
|||
left join base_manufacturer c on c.sid=s.manufacturerSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="initialization" resultType="com.yxt.wms.biz.basegoodsspu.BaseGoodsSpuVo"> |
|||
select |
|||
s.*,a.goodsTypeName as typeName,b.brandName as brandName,c.manufacturerName as manufacturerName |
|||
from base_goods_spu s |
|||
left join base_goods_type a on a.sid=s.goodsTypeSid |
|||
left join base_brand_info b on b.sid=s.brandSid |
|||
left join base_manufacturer c on c.sid=s.manufacturerSid |
|||
where s.sid=#{sid} |
|||
</select> |
|||
</mapper> |
@ -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; |
|||
} |
@ -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<GoodsMapper, Goods> { |
|||
// @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<PagerVo<BaseGoodsSpuVo>> listPage(PagerQuery<GoodsQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
return baseGoodsSpuFeign.listPage(pq); |
|||
} |
|||
|
|||
@Transactional |
|||
public ResultBean<String> saveOrUpdate(GoodsDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
return baseGoodsSpuFeign.saveOrUpdate(dto); |
|||
} |
|||
|
|||
public ResultBean<BaseGoodsSpuVo> 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<String[]> list = ExcelUtil.readExcel(file);
|
|||
// if (!list.isEmpty()) {
|
|||
// List tt = new ArrayList();
|
|||
// List<GoodsDto> 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<GoodsDto> a(List<GoodsDto> dtos) {
|
|||
// ResultBean rb=new ResultBean().fail();
|
|||
// List<GoodsDto> 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<BaseGoodsSkuDto> skus = new ArrayList<>();
|
|||
// String sid = UUID.randomUUID().toString();
|
|||
// goodsDto.setSid(sid);
|
|||
// List<GoodsDto> 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 <T> Predicate<T> distinctByKey(Function<? super T, ?> keyExtractor) { |
|||
Set<Object> seen = ConcurrentHashMap.newKeySet(); |
|||
return t -> seen.add(keyExtractor.apply(t)); |
|||
} |
|||
|
|||
// private GoodsDto packaging(String[] arr, GoodsDto goodsDto) {
|
|||
// Map<String, Object> 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<BaseGoodsSkuDto> 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;
|
|||
// }
|
|||
|
|||
} |
@ -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
|
|||
} |
@ -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(供应商管理) <br/> |
|||
* File: BaseSupplierInfo.java <br/> |
|||
* Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfo <br/> |
|||
* Description: 供应商信息. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-03-18 13:33:13 <br/> |
|||
* |
|||
* @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
|
|||
|
|||
} |
@ -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(供应商管理) <br/> |
|||
* File: BaseSupplierInfoVo.java <br/> |
|||
* Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoVo <br/> |
|||
* Description: 供应商信息 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-03-18 13:33:13 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "供应商信息 视图数据对象", description = "供应商信息 视图数据对象") |
|||
public class SupplierInfoChoice implements Vo { |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("供应商名称") |
|||
private String supplierName; |
|||
} |
@ -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(供应商管理) <br/> |
|||
* File: BaseSupplierInfoVo.java <br/> |
|||
* Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoVo <br/> |
|||
* Description: 供应商信息 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-03-18 13:33:13 <br/> |
|||
* |
|||
* @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
|
|||
} |
@ -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(供应商管理) <br/> |
|||
* File: BaseSupplierInfoDto.java <br/> |
|||
* Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoDto <br/> |
|||
* Description: 供应商信息 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-03-18 13:33:13 <br/> |
|||
* |
|||
* @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
|
|||
} |
@ -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(仓储基础信息供应商) <br/> |
|||
* File: BaseSupplierInfoMapper.java <br/> |
|||
* Class: com.yxt.anrui.as.biz.basesupplierinfo.BaseSupplierInfoMapper <br/> |
|||
* Description: 供应商信息. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-03-13 16:51:56 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface SupplierInfoMapper extends BaseMapper<SupplierInfo> { |
|||
|
|||
IPage<SupplierInfoVo> selectPageVo(IPage<SupplierInfo> page, @Param(Constants.WRAPPER) Wrapper<SupplierInfo> qw); |
|||
|
|||
List<SupplierInfoVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<SupplierInfo> qw); |
|||
|
|||
@Select("select * from base_supplier_info") |
|||
List<SupplierInfoVo> selectListVo(); |
|||
|
|||
@Update("update base_supplier_info set isDelete = '1' where sid = #{sid}") |
|||
int updateBySidIsDelete(String sid); |
|||
|
|||
@Select("select * from base_supplier_info") |
|||
List<SupplierInfoChoice> choiceSupplierInfo(String createOrgSid); |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?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.yxt.wms.biz.basesupplierinfo.BaseSupplierInfoMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.wms.biz.basesupplierinfo.BaseSupplierInfoVo"> |
|||
SELECT * FROM base_supplier_info <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.wms.biz.basesupplierinfo.BaseSupplierInfoVo"> |
|||
SELECT * FROM base_supplier_info <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
</mapper> |
@ -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(供应商管理) <br/> |
|||
* File: BaseSupplierInfoQuery.java <br/> |
|||
* Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoQuery <br/> |
|||
* Description: 供应商信息 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-03-18 13:33:13 <br/> |
|||
* |
|||
* @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; |
|||
} |
@ -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(仓储基础信息供应商) <br/> |
|||
* File: BaseSupplierInfoService.java <br/> |
|||
* Class: com.yxt.anrui.as.biz.basesupplierinfo.BaseSupplierInfoService <br/> |
|||
* Description: 供应商信息 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-03-13 16:51:56 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class SupplierInfoService extends MybatisBaseService<SupplierInfoMapper, SupplierInfo> { |
|||
|
|||
@Autowired |
|||
BaseSupplierInfoFeign baseSupplierInfoFeign; |
|||
|
|||
public ResultBean<PagerVo<BaseSupplierInfoVo>> listPageVo(PagerQuery<SupplierInfoQuery> pq) { |
|||
SupplierInfoQuery query = pq.getParams(); |
|||
return baseSupplierInfoFeign.listPage(pq); |
|||
} |
|||
|
|||
public ResultBean saveOrUpdateDto(SupplierInfoDto dto){ |
|||
return baseSupplierInfoFeign.save(dto); |
|||
} |
|||
|
|||
public ResultBean<BaseSupplierInfoDetailsVo> 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<List<BaseSupplierInfoChoice>> choiceSupplierInfo(String createOrgSid) { |
|||
return baseSupplierInfoFeign.choiceSupplierInfo(createOrgSid); |
|||
} |
|||
} |
@ -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(供应商管理) <br/> |
|||
* File: BaseSupplierInfoVo.java <br/> |
|||
* Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoVo <br/> |
|||
* Description: 供应商信息 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-03-18 13:33:13 <br/> |
|||
* |
|||
* @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; |
|||
} |
Loading…
Reference in new issue