Browse Source

提交发货修改

1021934019@qq.com 4 years ago
parent
commit
c09ca4dd9e

+ 3 - 1
blade-service-api/blade-check-api/src/main/java/org/springblade/check/entity/AuditPaths.java

@@ -20,6 +20,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import java.time.LocalDateTime;
 import java.io.Serializable;
+import java.util.Date;
+
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import io.swagger.annotations.ApiModel;
@@ -63,7 +65,7 @@ public class AuditPaths implements Serializable {
 	* 维护时间
 	*/
 		@ApiModelProperty(value = "维护时间")
-		private LocalDateTime opDate;
+		private Date opDate;
 	/**
 	* 承包单位id
 	*/

+ 7 - 7
blade-service-api/blade-check-api/src/main/java/org/springblade/check/entity/AuditProecess.java

@@ -66,22 +66,22 @@ public class AuditProecess implements Serializable {
 	/**
 	* 请核人ID
 	*/
-		@ApiModelProperty(value = "请人ID")
+		@ApiModelProperty(value = "请人ID")
 		private Long sendUserId;
 	/**
 	* 请核人姓名
 	*/
-		@ApiModelProperty(value = "请人姓名")
+		@ApiModelProperty(value = "请人姓名")
 		private String sendName;
 	/**
 	* 请核时间
 	*/
-		@ApiModelProperty(value = "请时间")
+		@ApiModelProperty(value = "请时间")
 		private Date sendTime;
 	/**
 	* 请核备注
 	*/
-		@ApiModelProperty(value = "请核备注")
+		@ApiModelProperty(value = "备注")
 		private String sendMsg;
 	/**
 	* 审核人ID
@@ -92,12 +92,12 @@ public class AuditProecess implements Serializable {
 	* 审核通过时间
 	*/
 		@ApiModelProperty(value = "审核通过时间")
-		private LocalDateTime auditItem;
+		private Date auditItem;
 	/**
 	* 审核时间
 	*/
 		@ApiModelProperty(value = "审核时间")
-		private LocalDateTime auditOpTime;
+		private Date auditOpTime;
 	/**
 	* 审核意见
 	*/
@@ -112,7 +112,7 @@ public class AuditProecess implements Serializable {
 	* 业务日期
 	*/
 		@ApiModelProperty(value = "业务日期")
-		private LocalDateTime billTime;
+		private Date billTime;
 	/**
 	* 存储对应审批字段
 	*/

+ 24 - 0
blade-service-api/blade-check-api/src/main/java/org/springblade/check/vo/AuditOrderVO.java

@@ -0,0 +1,24 @@
+package org.springblade.check.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.check.entity.AuditProecess;
+
+import java.util.Date;
+
+@Data
+@ApiModel(value = "AuditItemsVO对象", description = "用户审批列表返回对象")
+@EqualsAndHashCode(callSuper = true)
+public class AuditOrderVO extends AuditProecess
+{
+	 @ApiModelProperty(value = "订单号")
+ 	 private String orderNo;
+
+	 @ApiModelProperty(value = "供应商名称")
+ 	 private String corpsName;
+
+	 @ApiModelProperty(value = "订单日期")
+ 	 private Date orderDate;
+}

+ 4 - 0
blade-service-api/blade-deliver-goods-api/src/main/java/org/springblade/deliver/goods/entity/Delivery.java

@@ -351,4 +351,8 @@ public class Delivery implements Serializable {
 	 */
 	@ApiModelProperty(value = "码单重量")
 	private BigDecimal billWeight;
+
+	private String storageList;
+
+	private String creditList;
 }

+ 2 - 0
blade-service-api/blade-deliver-goods-api/src/main/java/org/springblade/deliver/goods/entity/DeliveryItems.java

@@ -286,5 +286,7 @@ public class DeliveryItems implements Serializable {
 		@ApiModelProperty(value = "汇率")
     	private BigDecimal exRate;
 
+		private String cntrNoList;
+
 
 }

+ 1 - 1
blade-service/blade-check/src/main/java/org/springblade/check/controller/AuditItemsController.java

@@ -43,7 +43,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 @RestController
 @AllArgsConstructor
 @RequestMapping("/audititems")
-@Api(value = "审批流任务明细", tags = "审批流任务明细接口")
+/*@Api(value = "审批流任务明细", tags = "审批流任务明细接口")*/
 public class AuditItemsController extends BladeController {
 
 	private final IAuditItemsService auditItemsService;

+ 1 - 1
blade-service/blade-check/src/main/java/org/springblade/check/controller/AuditItemsUsersController.java

@@ -43,7 +43,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 @RestController
 @AllArgsConstructor
 @RequestMapping("/audititemsusers")
-@Api(value = "审批流任务明细用户表", tags = "审批流任务明细用户表接口")
+/*@Api(value = "审批流任务明细用户表", tags = "审批流任务明细用户表接口")*/
 public class AuditItemsUsersController extends BladeController {
 
 	private final IAuditItemsUsersService auditItemsUsersService;

+ 52 - 5
blade-service/blade-check/src/main/java/org/springblade/check/controller/AuditProecessController.java

@@ -17,6 +17,7 @@
 package org.springblade.check.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.BeanUtils;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import org.springblade.check.dto.AuditProecessDTO;
 import io.swagger.annotations.Api;
@@ -26,14 +27,25 @@ import lombok.AllArgsConstructor;
 
 import org.springblade.check.entity.AuditProecess;
 import org.springblade.check.service.IAuditProecessService;
+import org.springblade.check.vo.AuditOrderVO;
+import org.springblade.check.vo.AuditProecessVO;
+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.AuthUtil;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.purchase.sales.entity.Order;
+import org.springblade.purchase.sales.feign.IOrderDescClient;
+import org.springblade.system.user.feign.IUserClient;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.core.boot.ctrl.BladeController;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
 /**
  * 审批流记录 控制器
  *
@@ -43,23 +55,58 @@ import org.springblade.core.boot.ctrl.BladeController;
 @RestController
 @AllArgsConstructor
 @RequestMapping("/auditproecess")
-@Api(value = "审批流记录", tags = "审批流记录接口")
+@Api(value = "用户审批", tags = "审批流记录接口")
 public class AuditProecessController extends BladeController {
 
 	private final IAuditProecessService auditProecessService;
 
+	private final IOrderDescClient orderDescClient;
+
+	private final ICorpsDescClient corpsDescClient;
+
 	/**
 	 * 分页 审批流记录
 	 */
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "列表-审批记录", notes = "传入auditProecess")
-	public R<IPage<AuditProecess>> list(AuditProecess auditProecess, Query query) {
+	@ApiOperation(value = "列表-用户审批记录", notes = "传入auditProecess")
+	public R list(AuditProecess auditProecess, Query query) {
 		LambdaQueryWrapper<AuditProecess> lambdaQueryWrapper=new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.like(AuditProecess::getAuditUserId, String.valueOf(AuthUtil.getUserId()));
 		lambdaQueryWrapper.eq(AuditProecess::getAuditStatus, "S");
-		IPage<AuditProecess> pages = auditProecessService.page(Condition.getPage(query), lambdaQueryWrapper);
-		return R.data(pages);
+		IPage pages = auditProecessService.page(Condition.getPage(query), lambdaQueryWrapper);
+		List<AuditProecess> auditProecessList = pages.getRecords();
+		if(CollectionUtils.isNotEmpty(auditProecessList))
+		{
+			List<AuditOrderVO> auditOrderVOS=new ArrayList<>();
+			auditProecessList.forEach(e->{
+				AuditOrderVO auditOrderVO=new AuditOrderVO();
+				BeanUtil.copyProperties(e,auditOrderVO);
+				if(e.getBillId()!=null)
+				{
+					Order order = orderDescClient.getById(e.getBillId());
+					if(order!=null)
+					{
+						auditOrderVO.setOrderDate(order.getCreateTime());
+						auditOrderVO.setOrderNo(order.getOrderNo());
+						if(order.getCorpId()!=null)
+						{
+							auditOrderVO.setCorpsName(corpsDescClient.getCorpMessage(order.getCorpId()).getData().getCname());
+						}
+
+					}
+				}
+				auditOrderVOS.add(auditOrderVO);
+
+			});
+
+			pages.setRecords(auditOrderVOS);
+			return R.data(pages);
+		}
+		else
+		{
+			return R.data(Collections.EMPTY_LIST);
+		}
 	}
 
 	@PostMapping("createFinanceProcess")

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

@@ -230,7 +230,7 @@ public class DeliveryController extends BladeController {
 		return R.status(deliveryService.removeByIds(Func.toLongList(ids)));
 	}
 
-	@PostMapping("")
+	@PostMapping("comfire")
 	@ApiOperationSupport(order = 3)
 	@ApiOperation(value = "确认收货", notes = "确认收货")
 	public R comfire(@RequestBody Delivery delivery)

+ 2 - 2
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/service/impl/DeliveryItemsServiceImpl.java

@@ -158,13 +158,13 @@ public class DeliveryItemsServiceImpl extends ServiceImpl<DeliveryItemsMapper, D
 			// todo 更新订单明细中发货数量  采购和销售可能需要调不同接口
 			R actualQuantity = orderItemsClient.updateActualQuantity(deliveryItems.getSrcId(), deliveryItems.getActualQuantity(),delivery.getDeliveryType());
 			if (!actualQuantity.isSuccess()){
-				throw new RuntimeException("更新订单发货数量出错," + actualQuantity.getMsg());
+				throw new RuntimeException("更新订单发货数量出错");
 			}
 			// todo 出口贸易确认发货修改发票重量
 			if (delivery.getTradeType().equals(OrderTypeEnum.IMPORT.getType())){
 				R actualWeight = orderItemsClient.updateActualWeight(deliveryItems.getSrcId(), deliveryItems.getInvoiceWeight(), delivery.getDeliveryType());
 				if (!actualWeight.isSuccess()){
-					throw new RuntimeException("更新订单发票重量出错," + actualQuantity.getMsg());
+					throw new RuntimeException("更新订单发票重量出错");
 				}
 			}
 			//更新发货明细库存字段