Browse Source

喜相随商品

master
wangpengfei 2 years ago
parent
commit
a7301f120b
  1. 2
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/initial/SupplierController.java
  2. 3
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/instorehouse/PurchaseController.java
  3. 8
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/product/ProductController.java
  4. 8
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/restrictedcategory/RestrictedCategoryRest.java
  5. 7
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/mapper/initial/ProductMapper.java
  6. 10
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/mapper/product/ProductMapper.java
  7. 7
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/mapper/restrictedcategory/RestrictedCategoryMapper.java
  8. 20
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/pojo/product/Product.java
  9. 2
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/pojo/restrictedcategory/RestrictedCategory.java
  10. 3
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/api/instorehouse/InStorehouseMainService.java
  11. 4
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/api/prodstock/ProdStockService.java
  12. 1
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/initial/SupplierServiceImpl.java
  13. 2
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/instorehouse/PurchaseService.java
  14. 3
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/instorehouse/PurchaseServiceImpl.java
  15. 3
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/instorehouse/PutInServiceImpl.java
  16. 2
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/outstorehouse/OutStorehouseServiceImpl.java
  17. 7
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/product/ProductService.java
  18. 63
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/product/ProductServiceImpl.java
  19. 82
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/restrictedcategory/RestrictedCategoryService.java
  20. 6
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/storehousemanage/RemoveServiceImpl.java
  21. 2
      warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/storehousemanage/ShelvesServiceImpl.java
  22. 2
      warehousing-system/project/wh-manage-xxs/src/main/resources/mappers/RestrictedBrandMapper.xml

2
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/initial/SupplierController.java

@ -1,8 +1,6 @@
package com.wh.controller.initial;
import com.wh.controller.purchasenewproduct.vo.SysResult;
import com.wh.pojo.Product;
import com.wh.pojo.ProductQuery;
import com.wh.pojo.Supplier;
import com.wh.pojo.SupplierQuery;
import com.wh.service.initial.SupplierService;

3
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/instorehouse/PurchaseController.java

@ -3,16 +3,15 @@ package com.wh.controller.instorehouse;
import com.wh.controller.purchasenewproduct.vo.PageResult;
import com.wh.controller.purchasenewproduct.vo.SysResult;
import com.wh.pojo.Product;
import com.wh.pojo.Purchase;
import com.wh.pojo.Storehouse;
import com.wh.pojo.Supplier;
import com.wh.pojo.product.Product;
import com.wh.service.instorehouse.PurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@RestController
@CrossOrigin

8
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/initial/ProductController.java → warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/product/ProductController.java

@ -1,12 +1,10 @@
package com.wh.controller.initial;
package com.wh.controller.product;
import com.wh.controller.purchasenewproduct.vo.SysResult;
import com.wh.pojo.Product;
import com.wh.pojo.ProductQuery;
import com.wh.pojo.Storehouse;
import com.wh.pojo.shstorehouse.ShStorehouseQuery;
import com.wh.pojo.shstorehouse.ShStorehouseVo;
import com.wh.service.initial.ProductService;
import com.wh.pojo.product.Product;
import com.wh.service.product.ProductService;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;

8
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/restrictedcategory/RestrictedCategoryRest.java

@ -79,7 +79,13 @@ public class RestrictedCategoryRest{
List<RestrictedCategoryVo> pv = restrictedCategoryService.categoryList();
return rb.success().setData(pv);
}
@ApiOperation("根据psid查询")
@GetMapping("/categoryListByPsid/{psid}")
public ResultBean<PagerVo<RestrictedCategoryVo>> categoryListByPsid(@PathVariable String psid) {
ResultBean rb = ResultBean.fireFail();
List<RestrictedCategoryVo> pv = restrictedCategoryService.categoryListByPsid(psid);
return rb.success().setData(pv);
}
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody RestrictedCategoryDto dto) {

7
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/mapper/initial/ProductMapper.java

@ -1,7 +0,0 @@
package com.wh.mapper.initial;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wh.pojo.Product;
public interface ProductMapper extends BaseMapper<Product> {
}

10
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/mapper/product/ProductMapper.java

@ -0,0 +1,10 @@
package com.wh.mapper.product;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wh.pojo.product.Product;
import org.apache.ibatis.annotations.Select;
public interface ProductMapper extends BaseMapper<Product> {
@Select("select max(code) as code from product where code like CONCAT('%',#{code},'%') ")
Product getMaxCode(String code);
}

7
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/mapper/restrictedcategory/RestrictedCategoryMapper.java

@ -74,7 +74,14 @@ public interface RestrictedCategoryMapper extends BaseMapper<RestrictedCategory>
RestrictedCategory selectByKeyAndSid(@Param("key") String key, @Param("sid") String sid);
List<RestrictedCategoryVo> categoryList();
@Select("select * from restricted_category where psid=#{psid}")
List<RestrictedCategoryVo> categoryListByPsid(@Param("psid")String psid);
List<RestrictedCategoryVo> selectFirstCategoryList();
List<RestrictedCategoryVo> selectChildernList(String sid);
@Select("select max(category_key) from restricted_category where psid=#{psid}")
String getCategoryByPsid(@Param("psid") String sid);
@Select("select category_key as categoryKey , grade from restricted_category where sid=#{sid}")
RestrictedCategoryVo getCategoryBySid(@Param("sid") String sid);
}

20
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/pojo/Product.java → warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/pojo/product/Product.java

@ -1,6 +1,7 @@
package com.wh.pojo;
package com.wh.pojo.product;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -23,4 +24,21 @@ public class Product {
private Integer effectiveDays; //有效天数
private String warehouse; //所属仓库
private String remarks; //备注
private String brandSid; //品牌
private String code;//商品编码
private String categorySid;//品类三级品类
@TableField(exist = false)
private String categorySidY;//一级品类
@TableField(exist = false)
private String categorySidR;//二级品类
@TableField(exist = false)
private String category;
@TableField(exist = false)
private String categoryY;
@TableField(exist = false)
private String categoryR;
@TableField(exist = false)
private String brand;
}

2
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/pojo/restrictedcategory/RestrictedCategory.java

@ -25,6 +25,7 @@
*********************************************************/
package com.wh.pojo.restrictedcategory;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.domain.BaseEntity;
@ -86,6 +87,7 @@ public class RestrictedCategory {
@ApiModelProperty("监管品类")
private String categorys;
@TableField(value = "category_key")
@ApiModelProperty("监管品类Key")
private String category_key;
private String psid;

3
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/api/instorehouse/InStorehouseMainService.java

@ -11,6 +11,7 @@ import com.wh.mapper.api.instorehouse.InStorehouseMainMapper;
import com.wh.mapper.initial.LocationMapper;
import com.wh.pojo.*;
import com.wh.pojo.api.*;
import com.wh.pojo.product.Product;
import com.wh.pojo.purchasenew.Purchasenew;
import com.wh.pojo.purchasenew.PurchasenewDto;
import com.wh.pojo.purchasenewproduct.PurchasenewProduct;
@ -18,7 +19,7 @@ import com.wh.pojo.purchasenewproduct.PurchasenewProductDto;
import com.wh.pojo.purchasenewproduct.PurchasenewProductVo;
import com.wh.service.api.prodstock.ProdStockService;
import com.wh.service.initial.LocationService;
import com.wh.service.initial.ProductService;
import com.wh.service.product.ProductService;
import com.wh.service.purchasenew.PurchasenewService;
import com.wh.service.purchasenewproduct.PurchasenewProductService;
import com.yxt.common.base.service.MybatisBaseService;

4
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/api/prodstock/ProdStockService.java

@ -4,9 +4,9 @@ package com.wh.service.api.prodstock;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wh.mapper.api.prodstock.ProdStockMapper;
import com.wh.pojo.Product;
import com.wh.pojo.api.*;
import com.wh.service.initial.ProductService;
import com.wh.pojo.product.Product;
import com.wh.service.product.ProductService;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;

1
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/initial/SupplierServiceImpl.java

@ -4,7 +4,6 @@ import com.wh.controller.purchasenewproduct.vo.PageResult;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wh.mapper.initial.SupplierMapper;
import com.wh.pojo.Product;
import com.wh.pojo.Supplier;
import com.wh.pojo.SupplierQuery;
import com.yxt.common.core.query.PagerQuery;

2
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/instorehouse/PurchaseService.java

@ -1,10 +1,10 @@
package com.wh.service.instorehouse;
import com.wh.controller.purchasenewproduct.vo.PageResult;
import com.wh.pojo.Product;
import com.wh.pojo.Purchase;
import com.wh.pojo.Storehouse;
import com.wh.pojo.Supplier;
import com.wh.pojo.product.Product;
import java.util.List;

3
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/instorehouse/PurchaseServiceImpl.java

@ -3,11 +3,12 @@ package com.wh.service.instorehouse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wh.controller.purchasenewproduct.vo.PageResult;
import com.wh.mapper.initial.ProductMapper;
import com.wh.mapper.initial.StorehouseMapper;
import com.wh.mapper.initial.SupplierMapper;
import com.wh.mapper.instorehouse.PurchaseMapper;
import com.wh.mapper.product.ProductMapper;
import com.wh.pojo.*;
import com.wh.pojo.product.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

3
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/instorehouse/PutInServiceImpl.java

@ -7,14 +7,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wh.api.Api;
import com.wh.controller.purchasenewproduct.vo.PageResult;
import com.wh.mapper.initial.LocationMapper;
import com.wh.mapper.initial.ProductMapper;
import com.wh.mapper.instorehouse.PurchaseMapper;
import com.wh.mapper.instorehouse.PutInMapper;
import com.wh.mapper.instorehouse.ReceivingMapper;
import com.wh.mapper.product.ProductMapper;
import com.wh.mapper.stock.StockMapper;
import com.wh.mapper.storehousemanage.RemoveMapper;
import com.wh.pojo.*;
import com.wh.pojo.product.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

2
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/outstorehouse/OutStorehouseServiceImpl.java

@ -4,9 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wh.api.Api;
import com.wh.controller.purchasenewproduct.vo.PageResult;
import com.wh.mapper.initial.ProductMapper;
import com.wh.mapper.outstorehouse.OutStorehouseMapper;
import com.wh.mapper.outstorehouse.PickingMapper;
import com.wh.mapper.product.ProductMapper;
import com.wh.mapper.stock.StockMapper;
import com.wh.pojo.*;
import org.springframework.beans.factory.annotation.Autowired;

7
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/initial/ProductService.java → warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/product/ProductService.java

@ -1,14 +1,11 @@
package com.wh.service.initial;
package com.wh.service.product;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wh.pojo.Product;
import com.wh.pojo.ProductQuery;
import com.wh.pojo.Storehouse;
import com.wh.pojo.shstorehouse.ShStorehouseVo;
import com.wh.pojo.product.Product;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.util.StringUtils;
import java.util.List;

63
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/initial/ProductServiceImpl.java → warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/product/ProductServiceImpl.java

@ -1,13 +1,18 @@
package com.wh.service.initial;
package com.wh.service.product;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wh.mapper.initial.ProductMapper;
import com.wh.mapper.initial.StorehouseMapper;
import com.wh.pojo.Product;
import com.wh.mapper.product.ProductMapper;
import com.wh.mapper.restrictedbrand.RestrictedBrandMapper;
import com.wh.mapper.restrictedcategory.RestrictedCategoryMapper;
import com.wh.pojo.ProductQuery;
import com.wh.pojo.Storehouse;
import com.wh.pojo.shstorehouse.ShStorehouseVo;
import com.wh.pojo.product.Product;
import com.wh.pojo.restrictedbrand.RestrictedBrand;
import com.wh.pojo.restrictedcategory.RestrictedCategory;
import com.wh.pojo.restrictedcategory.RestrictedCategoryVo;
import com.wh.service.restrictedcategory.RestrictedCategoryService;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
@ -20,13 +25,17 @@ import java.util.List;
import java.util.Map;
@Service
public class ProductServiceImpl implements ProductService{
public class ProductServiceImpl implements ProductService {
@Autowired
private StorehouseMapper storehouseMapper;
@Autowired
private ProductMapper productMapper;
@Autowired
private RestrictedCategoryMapper restrictedCategoryMapper;
@Autowired
private RestrictedBrandMapper restrictedBrandMapper;
@Override
public PagerVo<Product> getProductList(PagerQuery<ProductQuery> pq) {
@ -38,6 +47,29 @@ public class ProductServiceImpl implements ProductService{
}
productPage = productMapper.selectPage(productPage,queryWrapper);
Integer integer = productMapper.selectCount(queryWrapper);
for(Product p:productPage.getRecords()){
//三级品类
RestrictedCategory restrictedCategory=restrictedCategoryMapper.selectOne(new QueryWrapper<RestrictedCategory>().eq("sid",p.getCategorySid()));
RestrictedBrand restrictedBrand=restrictedBrandMapper.selectOne(new QueryWrapper<RestrictedBrand>().eq("sid",p.getBrandSid()));
if(null!=restrictedBrand){
p.setBrand(restrictedBrand.getName());
}
if(null!=restrictedCategory){
//二级品类
RestrictedCategory restrictedCategoryR=restrictedCategoryMapper.selectOne(new QueryWrapper<RestrictedCategory>().eq("sid",restrictedCategory.getPsid()));
//一级品类
RestrictedCategory restrictedCategoryY=restrictedCategoryMapper.selectOne(new QueryWrapper<RestrictedCategory>().eq("sid",restrictedCategoryR.getPsid()));
p.setCategory(restrictedCategory.getCategorys());
p.setCategoryR(restrictedCategoryR.getCategorys());
p.setCategorySidR(restrictedCategoryR.getSid());
p.setCategoryY(restrictedCategoryY.getCategorys());
p.setCategorySidY(restrictedCategoryY.getSid());
}
}
// PageResult pageResult=new PageResult();
// pageResult.setTotal((long) productPage.getRecords().size()).setRows(productPage.getRecords());
PagerVo<Product> pv=new PagerVo<>();
@ -70,10 +102,27 @@ public class ProductServiceImpl implements ProductService{
return getProductListByNameAndCode(null,code);
}
@Override
public void addProduct(Product product) {
public synchronized void addProduct(Product product) {
String code =this.code(product.getCategorySid());
product.setCode(code);
productMapper.insert(product);
}
public String code (String categorySid) {
String code="";
RestrictedCategoryVo restrictedCategory=restrictedCategoryMapper.getCategoryBySid(categorySid);
Product product=productMapper.getMaxCode(restrictedCategory.getCategoryKey());
if(null==product){
code=restrictedCategory.getCategoryKey()+"0001";
}else{
//0101010001
String key="";
for(int i=String.valueOf(Integer.valueOf(product.getCode().substring(6))+1).length();i<4;i++){
key=key+"0";
}
code=restrictedCategory.getCategoryKey()+key+String.valueOf(Integer.valueOf(product.getCode().substring(6))+1);
}
return code;
}
@Override
public void updataProduct(Product product) {
productMapper.updateById(product);

82
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/restrictedcategory/RestrictedCategoryService.java

@ -31,6 +31,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wh.mapper.restrictedcategory.RestrictedCategoryMapper;
import com.wh.pojo.product.Product;
import com.wh.pojo.restrictedcategory.*;
import com.wh.service.restrictedbrand.RestrictedBrandService;
import com.yxt.common.base.service.MybatisBaseService;
@ -107,45 +108,74 @@ public class RestrictedCategoryService extends MybatisBaseService<RestrictedCate
return pagging;
}
public List<RestrictedCategoryVo> categoryListByPsid(String psid) {
List<RestrictedCategoryVo> pagging = baseMapper.categoryListByPsid(psid);
return pagging;
}
public ResultBean saveOrUpdateDto(RestrictedCategoryDto dto) {
ResultBean rb = ResultBean.fireFail();
String sid = dto.getSid();
String id = dto.getId();
String key = dto.getCategory_key();
if (StringUtils.isBlank(sid)) {
RestrictedCategory restrictedCategory = baseMapper.selectByKey(key);
//查询key是否重复
if (restrictedCategory != null) {
return rb.setMsg("该类别编码已存在");
}
RestrictedCategory restrictedCategory1 =new RestrictedCategory();
if(StringUtils.isNotBlank(dto.getPsid())){
if(dto.getPsid().equals("0")){
RestrictedCategory restrictedCategory1 = new RestrictedCategory();
if (StringUtils.isNotBlank(dto.getPsid())) {
if (dto.getPsid().equals("0")) {
dto.setGrade(String.valueOf(1));
}else {
restrictedCategory1= baseMapper.selectOne(new QueryWrapper<RestrictedCategory>().eq("sid",dto.getPsid()));
dto.setGrade(String.valueOf(Integer.valueOf(restrictedCategory1.getGrade())+1));
} else {
restrictedCategory1 = baseMapper.selectOne(new QueryWrapper<RestrictedCategory>().eq("sid", dto.getPsid()));
dto.setGrade(String.valueOf(Integer.valueOf(restrictedCategory1.getGrade()) + 1));
}
}
restrictedCategory = new RestrictedCategory();
RestrictedCategory restrictedCategory = new RestrictedCategory();
BeanUtil.copyProperties(dto, restrictedCategory, "sid");
String code = code(dto);
restrictedCategory.setCategory_key(code);
baseMapper.insert(restrictedCategory);
} else {
RestrictedCategory restrictedCategory = fetchByCode(sid);
// if (restrictedCategory == null) {
// return rb.setMsg("该类别不存在");
// }
//查询该key是否存在
// RestrictedCategory restrictedCategorys = baseMapper.selectByKeyAndSid(key, sid);
// if (restrictedCategorys != null) {
// return rb.setMsg("该类别编码已存在");
// }
BeanUtil.copyProperties(dto, restrictedCategory, "sid");
baseMapper.update(restrictedCategory,new QueryWrapper<RestrictedCategory>().eq("sid",dto.getSid()));
baseMapper.update(restrictedCategory, new QueryWrapper<RestrictedCategory>().eq("sid", dto.getSid()));
}
return rb.success();
}
public String code(RestrictedCategoryDto dto) {
String code = "";
String key = baseMapper.getCategoryByPsid(dto.getPsid());
RestrictedCategoryVo restrictedCategory1 = baseMapper.getCategoryBySid(dto.getPsid());
if (StringUtils.isBlank(key)) {
key = restrictedCategory1.getCategoryKey();
}
//上级品类
// RestrictedCategory restrictedCategory1= baseMapper.selectOne(new QueryWrapper<RestrictedCategory>().eq("sid",dto.getPsid()));
if (restrictedCategory1.getGrade().equals("0")) {
//010000
if (String.valueOf(Integer.valueOf(key.substring(0, 2)) + 1).length() == 1) {
code = "0" + String.valueOf(Integer.valueOf(key.substring(0, 2)) + 1) + "0000";
} else {
code = String.valueOf(Integer.valueOf(key.substring(0, 2)) + 1) + "0000";
}
} else if (restrictedCategory1.getGrade().equals("1")) {
//010100
if (String.valueOf(Integer.valueOf(key.substring(2, 4)) + 1).length() == 1) {
code = key.substring(0, 2) + "0" + String.valueOf(Integer.valueOf(key.substring(2, 4)) + 1) + "00";
} else {
code = key.substring(0, 2) + String.valueOf(Integer.valueOf(key.substring(2, 4)) + 1) + "00";
}
} else if (restrictedCategory1.getGrade().equals("2")) {
//010101
// code=String.valueOf(Integer.valueOf(key.substring(4,6))+1);
if (String.valueOf(Integer.valueOf(key.substring(4, 6)) + 1).length() == 1) {
code = key.substring(0, 4) + "0" + String.valueOf(Integer.valueOf(key.substring(4, 6)) + 1);
} else {
code = key.substring(0, 4) + String.valueOf(Integer.valueOf(key.substring(4, 6)) + 1);
}
}
return code;
}
public RestrictedCategoryDetailsVo fetchDetailsVoBySid(String id) {
RestrictedCategory entity = getRestById(id);
RestrictedCategoryDetailsVo vo = new RestrictedCategoryDetailsVo();
@ -270,11 +300,11 @@ public class RestrictedCategoryService extends MybatisBaseService<RestrictedCate
public void getChildList(List<RestrictedCategoryVo> list) {
list.forEach(str -> {
String sid = str.getSid();
String pName=str.getCategorys();
String pName = str.getCategorys();
List<RestrictedCategoryVo> listChildren = baseMapper.selectChildernList(sid);
listChildren.forEach(i->{
listChildren.forEach(i -> {
i.setPName(pName);
if(i.getGrade().equals("3")){
if (i.getGrade().equals("3")) {
i.setIsEnd("1");
}
});

6
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/storehousemanage/RemoveServiceImpl.java

@ -5,14 +5,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wh.api.Api;
import com.wh.controller.purchasenewproduct.vo.PageResult;
import com.wh.mapper.initial.LocationMapper;
import com.wh.mapper.initial.ProductMapper;
import com.wh.mapper.product.ProductMapper;
import com.wh.mapper.stock.StockMapper;
import com.wh.mapper.storehousemanage.RemoveMapper;
import com.wh.pojo.Location;
import com.wh.pojo.Product;
import com.wh.pojo.Remove;
import com.wh.pojo.Stock;
import net.sf.jsqlparser.statement.select.Select;
import com.wh.pojo.product.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

2
warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/storehousemanage/ShelvesServiceImpl.java

@ -6,10 +6,10 @@ import com.wh.api.Api;
import com.wh.controller.purchasenewproduct.vo.PageResult;
import com.wh.controller.purchasenewproduct.vo.QueryInfo;
import com.wh.mapper.initial.LocationMapper;
import com.wh.mapper.initial.ProductMapper;
import com.wh.mapper.instorehouse.PurchaseMapper;
import com.wh.mapper.instorehouse.PutInMapper;
import com.wh.mapper.instorehouse.ReceivingMapper;
import com.wh.mapper.product.ProductMapper;
import com.wh.mapper.stock.StockMapper;
import com.wh.mapper.storehousemanage.ShelvesMapper;
import com.wh.pojo.*;

2
warehousing-system/project/wh-manage-xxs/src/main/resources/mappers/RestrictedBrandMapper.xml

@ -32,7 +32,7 @@
where code = #{code}
</select>
<select id="brandList" resultType="com.wh.pojo.restrictedbrand.RestrictedBrandVo">
select name as dictValue, code as dictKey
select sid as sid , name as dictValue, code as dictKey
from restricted_brand
</select>

Loading…
Cancel
Save