Explorar o código

Merge branch 'dev' of http://git.echepei.com/lazhaoqian/bladex into dev

1021934019@qq.com %!s(int64=4) %!d(string=hai) anos
pai
achega
ef042afd29
Modificáronse 16 ficheiros con 625 adicións e 22 borrados
  1. 5 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/GoodsDesc.java
  2. 125 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/GoodsSpecification.java
  3. 36 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/vo/GoodsSpecificationVO.java
  4. 34 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/vo/OrderVO.java
  5. 11 0
      blade-service/blade-client/src/main/java/org/springblade/client/goods/controller/GoodsDescController.java
  6. 126 0
      blade-service/blade-client/src/main/java/org/springblade/client/goods/controller/GoodsSpecificationController.java
  7. 3 4
      blade-service/blade-client/src/main/java/org/springblade/client/goods/mapper/GoodsDescMapper.xml
  8. 42 0
      blade-service/blade-client/src/main/java/org/springblade/client/goods/mapper/GoodsSpecificationMapper.java
  9. 29 0
      blade-service/blade-client/src/main/java/org/springblade/client/goods/mapper/GoodsSpecificationMapper.xml
  10. 41 0
      blade-service/blade-client/src/main/java/org/springblade/client/goods/service/IGoodsSpecificationService.java
  11. 34 3
      blade-service/blade-client/src/main/java/org/springblade/client/goods/service/impl/GoodsDescServiceImpl.java
  12. 41 0
      blade-service/blade-client/src/main/java/org/springblade/client/goods/service/impl/GoodsSpecificationServiceImpl.java
  13. 26 5
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/controller/DeliveryController.java
  14. 24 5
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/controller/ExportDeliveryController.java
  15. 24 5
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/controller/ImportDeliveryController.java
  16. 24 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderMapper.xml

+ 5 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/GoodsDesc.java

@@ -158,6 +158,11 @@ public class GoodsDesc implements Serializable {
 
 	@TableField(exist = false)
 	private List<GoodsFiles> filesList;
+	/**
+	 * 商品规格明细表
+	 */
+	@TableField(exist = false)
+	private List<GoodsSpecification> goodsSpecificationList;
 
 	/**
 	 * 规格尺寸1

+ 125 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/GoodsSpecification.java

@@ -0,0 +1,125 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 商品规格明细表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-09
+ */
+@Data
+@TableName("basic_goods_specification")
+@ApiModel(value = "GoodsSpecification对象", description = "商品规格明细表")
+public class GoodsSpecification implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	 * 主表id
+	 */
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 名称
+	*/
+		@ApiModelProperty(value = "名称")
+		private String cname;
+	/**
+	* 材质
+	*/
+		@ApiModelProperty(value = "材质")
+		private String texture;
+	/**
+	* 颜色
+	*/
+		@ApiModelProperty(value = "颜色")
+		private String colour;
+	/**
+	* 描述
+	*/
+		@ApiModelProperty(value = "描述")
+		private String describe;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	 * 租户ID
+	 */
+		@ApiModelProperty(value = "租户ID")
+		private String tenantId;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private Date createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private Date updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@TableLogic
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+
+
+}

+ 36 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/vo/GoodsSpecificationVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.vo;
+
+import org.springblade.client.entity.GoodsSpecification;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 商品规格明细表视图实体类
+ *
+ * @author BladeX
+ * @since 2021-11-09
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GoodsSpecificationVO对象", description = "商品规格明细表")
+public class GoodsSpecificationVO extends GoodsSpecification {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/vo/OrderVO.java

@@ -22,6 +22,8 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import io.swagger.annotations.ApiModel;
 
+import java.util.List;
+
 /**
  * 销售或采购订单表视图实体类
  *
@@ -38,5 +40,37 @@ public class OrderVO extends Order {
 	 */
 	@ApiModelProperty(value = "列表客户中文名")
 	private String corpsName;
+	/**
+	 * 要求发货时间开始
+	 */
+	private String deliveryStartDate;
+	/**
+	 * 要求发货时间结束
+	 */
+	private String deliveryEndDate;
+	/**
+	 * 要求到货日期开始
+	 */
+	private String arrivalStartDate;
+	/**
+	 * 要求到货日期结束
+	 */
+	private String arrivalEndDate;
+	/**
+	 * 合同日期开始
+	 */
+	private String contractStartDate;
+	/**
+	 * 合同日期结束
+	 */
+	private String contractEndDate;
+	/**
+	 * 订单日期开始
+	 */
+	private String orderStartDate;
+	/**
+	 * 订单日期结束
+	 */
+	private String orderEndDate;
 
 }

+ 11 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/controller/GoodsDescController.java

@@ -35,12 +35,14 @@ import org.springblade.client.entity.GoodsDesc;
 import org.springblade.client.entity.GoodsFiles;
 import org.springblade.client.entity.GoodsPrice;
 import org.springblade.client.entity.GoodsType;
+import org.springblade.client.entity.*;
 import org.springblade.client.goods.enums.GoodsTypeEnum;
 import org.springblade.client.goods.excel.GoodsExcel;
 import org.springblade.client.goods.excel.GoodsImport;
 import org.springblade.client.goods.service.IGoodsFilesService;
 import org.springblade.client.goods.service.IGoodsPriceService;
 import org.springblade.core.excel.util.ExcelUtil;
+import org.springblade.client.goods.service.IGoodsSpecificationService;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.AuthUtil;
@@ -76,6 +78,8 @@ public class GoodsDescController extends BladeController {
 	private IGoodsPriceService goodsPriceService;
     @Autowired
 	private IGoodsFilesService goodsFilesService;
+    @Autowired
+	private IGoodsSpecificationService goodsSpecificationService;
 	/**
 	 * 详情
 	 */
@@ -139,6 +143,12 @@ public class GoodsDescController extends BladeController {
 		LambdaQueryWrapper<GoodsFiles> filesLambdaQueryWrapper=new LambdaQueryWrapper<>();
 		filesLambdaQueryWrapper.eq(GoodsFiles::getPid,id);
 		List<GoodsFiles> filesList = goodsFilesService.list(filesLambdaQueryWrapper);
+		//查询商品规格明细
+		LambdaQueryWrapper<GoodsSpecification> specificationWrapper = new LambdaQueryWrapper<>();
+		specificationWrapper.eq(GoodsSpecification::getPid,id);
+		specificationWrapper.eq(GoodsSpecification::getIsDeleted,0);
+		specificationWrapper.eq(GoodsSpecification::getTenantId,SecureUtil.getTenantId());
+		List<GoodsSpecification> goodsSpecificationList = goodsSpecificationService.list(specificationWrapper);
 		if(!CollectionUtils.isEmpty(priceList))
 		{
 			List<GoodsPrice> sale = priceList.stream().filter(e -> e.getBillType().equals("0")).collect(Collectors.toList());
@@ -146,6 +156,7 @@ public class GoodsDescController extends BladeController {
 			goodsDesc.setSaleGoodsPrice(sale);
 			goodsDesc.setBuyGoodsPrice(buy);
 			goodsDesc.setFilesList(filesList);
+			goodsDesc.setGoodsSpecificationList(goodsSpecificationList);
 		}
 		return R.data(goodsDesc);
 	}

+ 126 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/controller/GoodsSpecificationController.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.goods.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.client.goods.service.IGoodsSpecificationService;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.client.entity.GoodsSpecification;
+import org.springblade.client.vo.GoodsSpecificationVO;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 商品规格明细表 控制器
+ *
+ * @author BladeX
+ * @since 2021-11-09
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/goodsspecification")
+@Api(value = "商品规格明细表", tags = "商品规格明细表接口")
+public class GoodsSpecificationController extends BladeController {
+
+	private final IGoodsSpecificationService goodsSpecificationService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入goodsSpecification")
+	public R<GoodsSpecification> detail(GoodsSpecification goodsSpecification) {
+		GoodsSpecification detail = goodsSpecificationService.getOne(Condition.getQueryWrapper(goodsSpecification));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 商品规格明细表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入goodsSpecification")
+	public R<IPage<GoodsSpecification>> list(GoodsSpecification goodsSpecification, Query query) {
+		IPage<GoodsSpecification> pages = goodsSpecificationService.page(Condition.getPage(query), Condition.getQueryWrapper(goodsSpecification));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 商品规格明细表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入goodsSpecification")
+	public R<IPage<GoodsSpecificationVO>> page(GoodsSpecificationVO goodsSpecification, Query query) {
+		IPage<GoodsSpecificationVO> pages = goodsSpecificationService.selectGoodsSpecificationPage(Condition.getPage(query), goodsSpecification);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 商品规格明细表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入goodsSpecification")
+	public R save(@Valid @RequestBody GoodsSpecification goodsSpecification) {
+		return R.status(goodsSpecificationService.save(goodsSpecification));
+	}
+
+	/**
+	 * 修改 商品规格明细表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入goodsSpecification")
+	public R update(@Valid @RequestBody GoodsSpecification goodsSpecification) {
+		return R.status(goodsSpecificationService.updateById(goodsSpecification));
+	}
+
+	/**
+	 * 新增或修改 商品规格明细表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入goodsSpecification")
+	public R submit(@Valid @RequestBody GoodsSpecification goodsSpecification) {
+		return R.status(goodsSpecificationService.saveOrUpdate(goodsSpecification));
+	}
+
+
+	/**
+	 * 删除 商品规格明细表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(goodsSpecificationService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 3 - 4
blade-service/blade-client/src/main/java/org/springblade/client/goods/mapper/GoodsDescMapper.xml

@@ -137,7 +137,7 @@
     <select id="selectGoodsCname" resultMap="goodsDescResultMap">
         select id,cname from basic_goods_desc where is_deleted = 0 and cname =#{cname} and tenant_id = #{tenantId}
     </select>
-    <select id="selectGoods" resultMap="goodsDescResultMap">
+    <select id="selectGoods" resultType="org.springblade.client.vo.GoodsDescVO">
         select
         bg.id,
         bg.code,
@@ -152,11 +152,10 @@
         bg.packgeunit,
         bg.url,
         CONCAT_WS(" ",bg.cname,bg.brand,bg.specs,bg.brand_item," ") AS specificationAndModel,
-        bt.goods_type_id AS goodsTypeId,
+        bg.goods_type_id AS goodsTypeId,
         ba.cname AS goodsTypeName
         from basic_goods_desc bg
-        LEFT JOIN basic_goods_type_desc bt ON bg.id = bt.goods_id AND bt.status = 0
-        LEFT JOIN basic_goods_type ba ON ba.id = bt.goods_type_id AND ba.status = 0 AND ba.is_deleted = 0
+        LEFT JOIN basic_goods_type ba ON ba.id = bg.goods_type_id AND ba.status = 0 AND ba.is_deleted = 0
         where bg.is_deleted = 0
         <if test="GoodsDesc.id!=null">
             and bg.id = #{GoodsDesc.id}

+ 42 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/mapper/GoodsSpecificationMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.goods.mapper;
+
+import org.springblade.client.entity.GoodsSpecification;
+import org.springblade.client.vo.GoodsSpecificationVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 商品规格明细表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-11-09
+ */
+public interface GoodsSpecificationMapper extends BaseMapper<GoodsSpecification> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param goodsSpecification
+	 * @return
+	 */
+	List<GoodsSpecificationVO> selectGoodsSpecificationPage(IPage page, GoodsSpecificationVO goodsSpecification);
+
+}

+ 29 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/mapper/GoodsSpecificationMapper.xml

@@ -0,0 +1,29 @@
+<?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="org.springblade.client.goods.mapper.GoodsSpecificationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="goodsSpecificationResultMap" type="org.springblade.client.entity.GoodsSpecification">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="cname" property="cname"/>
+        <result column="texture" property="texture"/>
+        <result column="colour" property="colour"/>
+        <result column="describe" property="describe"/>
+        <result column="remarks" property="remarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectGoodsSpecificationPage" resultMap="goodsSpecificationResultMap">
+        select * from basic_goods_specification where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/service/IGoodsSpecificationService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.goods.service;
+
+import org.springblade.client.entity.GoodsSpecification;
+import org.springblade.client.vo.GoodsSpecificationVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 商品规格明细表 服务类
+ *
+ * @author BladeX
+ * @since 2021-11-09
+ */
+public interface IGoodsSpecificationService extends IService<GoodsSpecification> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param goodsSpecification
+	 * @return
+	 */
+	IPage<GoodsSpecificationVO> selectGoodsSpecificationPage(IPage<GoodsSpecificationVO> page, GoodsSpecificationVO goodsSpecification);
+
+}

+ 34 - 3
blade-service/blade-client/src/main/java/org/springblade/client/goods/service/impl/GoodsDescServiceImpl.java

@@ -60,6 +60,8 @@ public class GoodsDescServiceImpl extends ServiceImpl<GoodsDescMapper, GoodsDesc
 	private GoodsTypeDescMapper goodsTypeDescMapper;
 	@Autowired
 	private GoodsFilesMapper goodsFilesMapper;
+	@Autowired
+	private GoodsSpecificationMapper goodsSpecificationMapper;
 
 
 	@Override
@@ -179,11 +181,13 @@ public class GoodsDescServiceImpl extends ServiceImpl<GoodsDescMapper, GoodsDesc
 	{
 		LambdaQueryWrapper<GoodsDesc> lambdaQueryWrapper=new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(GoodsDesc::getType,0);
+		lambdaQueryWrapper.eq(GoodsDesc::getIsDeleted,0);
 		lambdaQueryWrapper.eq(GoodsDesc::getCode,goodsDesc.getCode());
 		lambdaQueryWrapper.eq(GoodsDesc::getCname,goodsDesc.getCname());
-		int count = baseMapper.selectCount(lambdaQueryWrapper);
-		if(count>0)
-		{
+		GoodsDesc selectOne = baseMapper.selectOne(lambdaQueryWrapper);
+		if(selectOne != null && goodsDesc.getId() == null) {
+			throw new ServiceException("存在重复数据,请修改后添加");
+		}else if (selectOne != null && goodsDesc.getId() != selectOne.getId()){
 			throw new ServiceException("存在重复数据,请修改后添加");
 		}
 
@@ -228,6 +232,16 @@ public class GoodsDescServiceImpl extends ServiceImpl<GoodsDescMapper, GoodsDesc
 					 goodsFilesMapper.insert(k);
 				 });
 			 }
+			 //商品规格明细
+			if (CollectionUtils.isNotEmpty(goodsDesc.getGoodsSpecificationList())){
+				goodsDesc.getGoodsSpecificationList().forEach( f->{
+					f.setTenantId(AuthUtil.getTenantId());
+					f.setPid(goodsDesc.getId());
+					f.setCreateTime(new Date());
+					f.setCreateUser(SecureUtil.getUserId());
+					goodsSpecificationMapper.insert(f);
+				});
+			}
 
 
 
@@ -281,6 +295,23 @@ public class GoodsDescServiceImpl extends ServiceImpl<GoodsDescMapper, GoodsDesc
 					}
 				});
 			}
+			//商品规格明细
+			if (CollectionUtils.isNotEmpty(goodsDesc.getGoodsSpecificationList())){
+				goodsDesc.getGoodsSpecificationList().forEach( f->{
+					if (f.getId() == null){
+						f.setTenantId(AuthUtil.getTenantId());
+						f.setPid(goodsDesc.getId());
+						f.setCreateTime(new Date());
+						f.setCreateUser(SecureUtil.getUserId());
+						goodsSpecificationMapper.insert(f);
+					}
+					else {
+						f.setUpdateTime(new Date());
+						f.setUpdateUser(SecureUtil.getUserId());
+						goodsSpecificationMapper.updateById(f);
+					}
+				});
+			}
 
 		}
 	}

+ 41 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/service/impl/GoodsSpecificationServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.goods.service.impl;
+
+import org.springblade.client.entity.GoodsSpecification;
+import org.springblade.client.goods.mapper.GoodsSpecificationMapper;
+import org.springblade.client.goods.service.IGoodsSpecificationService;
+import org.springblade.client.vo.GoodsSpecificationVO;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 商品规格明细表 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-11-09
+ */
+@Service
+public class GoodsSpecificationServiceImpl extends ServiceImpl<GoodsSpecificationMapper, GoodsSpecification> implements IGoodsSpecificationService {
+
+	@Override
+	public IPage<GoodsSpecificationVO> selectGoodsSpecificationPage(IPage<GoodsSpecificationVO> page, GoodsSpecificationVO goodsSpecification) {
+		return page.setRecords(baseMapper.selectGoodsSpecificationPage(page, goodsSpecification));
+	}
+
+}

+ 26 - 5
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/controller/DeliveryController.java

@@ -16,6 +16,8 @@
  */
 package org.springblade.deliver.goods.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.trade.purchase.order.enums.OrderTypeEnum;
 import io.swagger.annotations.Api;
@@ -25,6 +27,8 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
 import javax.validation.Valid;
 
+import org.springblade.client.entity.CorpsDesc;
+import org.springblade.client.feign.ICorpsDescClient;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.SecureUtil;
@@ -37,6 +41,9 @@ import org.springblade.deliver.goods.vo.DeliveryVO;
 import org.springblade.deliver.goods.service.IDeliveryService;
 import org.springblade.core.boot.ctrl.BladeController;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 国内发货通知单 控制器
  *
@@ -50,6 +57,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 public class DeliveryController extends BladeController {
 
 	private final IDeliveryService deliveryService;
+	private ICorpsDescClient corpsDescClient;//获取客户信息
 
 	/**
 	 * 详情
@@ -69,11 +77,24 @@ public class DeliveryController extends BladeController {
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入delivery")
 	public R<IPage<Delivery>> list(Delivery delivery, Query query) {
-		delivery.setIsDeleted(0);
-		delivery.setTenantId(SecureUtil.getTenantId());
-		delivery.setBillType(OrderTypeEnum.SHIP.getType());
-		delivery.setTradeType(OrderTypeEnum.DOMESTIC.getType());
-		IPage<Delivery> pages = deliveryService.page(Condition.getPage(query), Condition.getQueryWrapper(delivery));
+		LambdaQueryWrapper<Delivery> lambdaQueryWrapper = new LambdaQueryWrapper();
+		lambdaQueryWrapper.eq(Delivery::getIsDeleted,0);
+		lambdaQueryWrapper.eq(Delivery::getTenantId,SecureUtil.getTenantId());
+		lambdaQueryWrapper.eq(Delivery::getBillType,OrderTypeEnum.SHIP.getType());
+		lambdaQueryWrapper.eq(Delivery::getTradeType,OrderTypeEnum.DOMESTIC.getType());
+		lambdaQueryWrapper.between(StringUtils.isNotBlank(delivery.getCreateStartTime())&&StringUtils.isNotBlank(delivery.getCreateEndTime()),Delivery::getCreateTime,delivery.getCreateStartTime(),delivery.getCreateEndTime());
+		lambdaQueryWrapper.between(StringUtils.isNotBlank(delivery.getBusinessStartDate())&&StringUtils.isNotBlank(delivery.getBusinessEndDate()),Delivery::getBusinessDate,delivery.getBusinessStartDate(),delivery.getBusinessEndDate());
+		IPage<Delivery> pages = deliveryService.page(Condition.getPage(query), lambdaQueryWrapper);
+		if (CollectionUtils.isNotEmpty(pages.getRecords())){
+			pages.getRecords().forEach(item ->{
+				if (item.getCorpId() != null){
+					R<CorpsDesc> corpMessage = corpsDescClient.getCorpMessage(item.getCorpId());
+					if (corpMessage.isSuccess() && corpMessage.getData() != null){
+						item.setCorpsName(corpMessage.getData().getCname());
+					}
+				}
+			});
+		}
 		return R.data(pages);
 	}
 	/**

+ 24 - 5
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/controller/ExportDeliveryController.java

@@ -16,13 +16,18 @@
  */
 package org.springblade.deliver.goods.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import com.trade.purchase.order.enums.OrderTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.AllArgsConstructor;
+import org.springblade.client.entity.CorpsDesc;
+import org.springblade.client.feign.ICorpsDescClient;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
@@ -49,6 +54,7 @@ import javax.validation.Valid;
 public class ExportDeliveryController extends BladeController {
 
 	private final IDeliveryService deliveryService;
+	private ICorpsDescClient corpsDescClient;//获取客户信息
 
 	/**
 	 * 详情
@@ -68,11 +74,24 @@ public class ExportDeliveryController extends BladeController {
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入delivery")
 	public R<IPage<Delivery>> list(Delivery delivery, Query query) {
-		delivery.setIsDeleted(0);
-		delivery.setTenantId(SecureUtil.getTenantId());
-		delivery.setBillType(OrderTypeEnum.SHIP.getType());
-		delivery.setTradeType(OrderTypeEnum.EXPORT.getType());
-		IPage<Delivery> pages = deliveryService.page(Condition.getPage(query), Condition.getQueryWrapper(delivery));
+		LambdaQueryWrapper<Delivery> lambdaQueryWrapper = new LambdaQueryWrapper();
+		lambdaQueryWrapper.eq(Delivery::getIsDeleted,0);
+		lambdaQueryWrapper.eq(Delivery::getTenantId,SecureUtil.getTenantId());
+		lambdaQueryWrapper.eq(Delivery::getBillType,OrderTypeEnum.SHIP.getType());
+		lambdaQueryWrapper.eq(Delivery::getTradeType,OrderTypeEnum.DOMESTIC.getType());
+		lambdaQueryWrapper.between(StringUtils.isNotBlank(delivery.getCreateStartTime())&&StringUtils.isNotBlank(delivery.getCreateEndTime()),Delivery::getCreateTime,delivery.getCreateStartTime(),delivery.getCreateEndTime());
+		lambdaQueryWrapper.between(StringUtils.isNotBlank(delivery.getBusinessStartDate())&&StringUtils.isNotBlank(delivery.getBusinessEndDate()),Delivery::getBusinessDate,delivery.getBusinessStartDate(),delivery.getBusinessEndDate());
+		IPage<Delivery> pages = deliveryService.page(Condition.getPage(query), lambdaQueryWrapper);
+		if (CollectionUtils.isNotEmpty(pages.getRecords())){
+			pages.getRecords().forEach(item ->{
+				if (item.getCorpId() != null){
+					R<CorpsDesc> corpMessage = corpsDescClient.getCorpMessage(item.getCorpId());
+					if (corpMessage.isSuccess() && corpMessage.getData() != null){
+						item.setCorpsName(corpMessage.getData().getCname());
+					}
+				}
+			});
+		}
 		return R.data(pages);
 	}
 	/**

+ 24 - 5
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/controller/ImportDeliveryController.java

@@ -16,13 +16,18 @@
  */
 package org.springblade.deliver.goods.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import com.trade.purchase.order.enums.OrderTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.AllArgsConstructor;
+import org.springblade.client.entity.CorpsDesc;
+import org.springblade.client.feign.ICorpsDescClient;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
@@ -49,6 +54,7 @@ import javax.validation.Valid;
 public class ImportDeliveryController extends BladeController {
 
 	private final IDeliveryService deliveryService;
+	private ICorpsDescClient corpsDescClient;//获取客户信息
 
 	/**
 	 * 详情
@@ -68,11 +74,24 @@ public class ImportDeliveryController extends BladeController {
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入delivery")
 	public R<IPage<Delivery>> list(Delivery delivery, Query query) {
-		delivery.setIsDeleted(0);
-		delivery.setTenantId(SecureUtil.getTenantId());
-		delivery.setBillType(OrderTypeEnum.SHIP.getType());
-		delivery.setTradeType(OrderTypeEnum.IMPORT.getType());
-		IPage<Delivery> pages = deliveryService.page(Condition.getPage(query), Condition.getQueryWrapper(delivery));
+		LambdaQueryWrapper<Delivery> lambdaQueryWrapper = new LambdaQueryWrapper();
+		lambdaQueryWrapper.eq(Delivery::getIsDeleted,0);
+		lambdaQueryWrapper.eq(Delivery::getTenantId,SecureUtil.getTenantId());
+		lambdaQueryWrapper.eq(Delivery::getBillType,OrderTypeEnum.SHIP.getType());
+		lambdaQueryWrapper.eq(Delivery::getTradeType,OrderTypeEnum.DOMESTIC.getType());
+		lambdaQueryWrapper.between(StringUtils.isNotBlank(delivery.getCreateStartTime())&&StringUtils.isNotBlank(delivery.getCreateEndTime()),Delivery::getCreateTime,delivery.getCreateStartTime(),delivery.getCreateEndTime());
+		lambdaQueryWrapper.between(StringUtils.isNotBlank(delivery.getBusinessStartDate())&&StringUtils.isNotBlank(delivery.getBusinessEndDate()),Delivery::getBusinessDate,delivery.getBusinessStartDate(),delivery.getBusinessEndDate());
+		IPage<Delivery> pages = deliveryService.page(Condition.getPage(query), lambdaQueryWrapper);
+		if (CollectionUtils.isNotEmpty(pages.getRecords())){
+			pages.getRecords().forEach(item ->{
+				if (item.getCorpId() != null){
+					R<CorpsDesc> corpMessage = corpsDescClient.getCorpMessage(item.getCorpId());
+					if (corpMessage.isSuccess() && corpMessage.getData() != null){
+						item.setCorpsName(corpMessage.getData().getCname());
+					}
+				}
+			});
+		}
 		return R.data(pages);
 	}
 	/**

+ 24 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderMapper.xml

@@ -324,6 +324,30 @@
         <if test="Order.ifShipping!=null and Order.ifShipping != ''">
             and if_shipping = #{Order.ifShipping}
         </if>
+        <if test='Order.deliveryStartDate != null and Order.deliveryStartDate != ""'>
+            and required_delivery_date &gt;= #{Order.deliveryStartDate}
+        </if>
+        <if test='Order.deliveryEndDate != null and Order.deliveryEndDate != ""'>
+            and required_delivery_date &lt;= #{Order.deliveryEndDate}
+        </if>
+        <if test='Order.arrivalStartDate != null and Order.arrivalStartDate!= ""'>
+            and required_arrival_date &gt;= #{Order.arrivalStartDate}
+        </if>
+        <if test='Order.arrivalEndDate != null and Order.arrivalEndDate!= ""'>
+            and required_arrival_date &lt;= #{Order.arrivalEndDate}
+        </if>
+        <if test='Order.contractStartDate != null and Order.contractStartDate!= ""'>
+            and required_delivery_date &gt;= #{Order.contractStartDate}
+        </if>
+        <if test='Order.contractEndDate != null and Order.contractEndDate!= ""'>
+            and required_delivery_date &lt;= #{Order.contractEndDate}
+        </if>
+        <if test='Order.orderStartDate != null and Order.orderStartDate!= ""'>
+            and busines_date &gt;= #{Order.orderStartDate}
+        </if>
+        <if test='Order.orderEndDate != null and Order.orderEndDate!= ""'>
+            and busines_date &lt;= #{Order.orderEndDate}
+        </if>
         order by id
     </select>