Browse Source

修改司机签收图片

training
caoyizhong 2 years ago
parent
commit
ff8d350038
  1. 85
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignPrintEntity.java
  2. 49
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionSignPrintClient.java
  3. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignPrintVO.java
  4. 20
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListAllocationVO.java
  5. 27
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java
  6. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignPrintController.java
  7. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockListController.java
  8. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignPrintDTO.java
  9. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforDTO.java
  10. 111
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignPrintExcel.java
  11. 53
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionSignPrintClient.java
  12. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignPrintMapper.java
  13. 37
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignPrintMapper.xml
  14. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java
  15. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  16. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignPrintService.java
  17. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  18. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
  19. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignPrintServiceImpl.java
  20. 59
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  21. 79
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  22. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

85
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignPrintEntity.java

@ -0,0 +1,85 @@
/*
* 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 com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 签收图片 实体类
*
* @author cyz
* @since 2023-09-28
*/
@Data
@TableName("logpm_distribution_sign_print")
@ApiModel(value = "DistributionSignPrint对象", description = "签收图片")
@EqualsAndHashCode(callSuper = true)
public class DistributionSignPrintEntity extends TenantEntity {
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 类型
*/
@ApiModelProperty(value = "类型")
private String type;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
private String name;
/**
* 路径
*/
@ApiModelProperty(value = "路径")
private String urlRoute;
/**
* 预约id
*/
@ApiModelProperty(value = "预约id")
private Long reservationId;
}

49
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionSignPrintClient.java

@ -0,0 +1,49 @@
/*
* 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 com.logpm.distribution.feign;
import org.springblade.core.mp.support.BladePage;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 签收图片 Feign接口类
*
* @author cyz
* @since 2023-09-28
*/
@FeignClient(
value = "blade-distributionSignPrint"
)
public interface IDistributionSignPrintClient {
String API_PREFIX = "/client";
String TOP = API_PREFIX + "/top";
/**
* 获取签收图片列表
*
* @param current 页号
* @param size 页数
* @return BladePage
*/
@GetMapping(TOP)
BladePage<DistributionSignPrintEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
}

35
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignPrintVO.java

@ -0,0 +1,35 @@
/*
* 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 com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 签收图片 视图实体类
*
* @author cyz
* @since 2023-09-28
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionSignPrintVO extends DistributionSignPrintEntity {
private static final long serialVersionUID = 1L;
}

20
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListAllocationVO.java

@ -0,0 +1,20 @@
package com.logpm.distribution.vo;
import lombok.Data;
import java.util.Date;
@Data
public class DistributionStockListAllocationVO {
private String allocationTitle; // 货位
private String marketName; //商场名称
private Integer num; //托盘数量
private Date createTime; // 上架时间
private String cargoUnit; // 单位
private Boolean unpack; // 是否拆包
private Integer quantityStock; // 在库数量
private Integer unpackingQuantity; // 拆包数量
private String descriptionGoods; // 物料名称
}

27
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java

@ -7,6 +7,7 @@ import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.DistrilbutionAppsignforDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.service.IDistributionReservationService;
@ -26,6 +27,7 @@ import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -192,17 +194,28 @@ public class DistributionSignforAppController {
@ApiOperation(value = "回显照片", notes = "回显照片")
public R prices(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
if(ObjectUtil.isNotEmpty(distributionSignfor.getReservationId())){
DistributionSignforEntity one = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda()
.eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId())
);
Map<String,Object> map = new HashMap<>();
map.put("deliverySignPictures",one.getDeliverySignPictures()); //司机签收图片
map.put("driverRemarks",one.getDriverRemarks()); //driverRemarks
return R.data(map);
Map<String, List<DistributionSignPrintEntity>> one = distributionSignforService.prices(distributionSignfor);
// Map<String,Object> map = new HashMap<>();
// map.put("deliverySignPictures",one.getDeliverySignPictures()); //司机签收图片
// map.put("driverRemarks",one.getDriverRemarks()); //driverRemarks
return R.data(one);
}else {
return R.fail(3002,"参数不能为空不对!!");
}
}
/**
* 签收管理 修改签收照片信息
*/
@PostMapping("/updatePicture")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "修改签收照片信息", notes = "修改签收照片信息")
public R updatePicture(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
if(ObjectUtil.isNotEmpty(distributionSignfor.getReservationId())){
return R.data(distributionSignforService.updatePicture(distributionSignfor));
}else {
return R.fail(3002,"参数不能为空不对!!");
}
}
}

150
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignPrintController.java

@ -0,0 +1,150 @@
/*
* 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 com.logpm.distribution.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.core.secure.BladeUser;
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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import com.logpm.distribution.vo.DistributionSignPrintVO;
import com.logpm.distribution.excel.DistributionSignPrintExcel;
import com.logpm.distribution.service.IDistributionSignPrintService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
* 签收图片 控制器
*
* @author cyz
* @since 2023-09-28
*/
@RestController
@AllArgsConstructor
@RequestMapping("/distributionSignPrint")
@Api(value = "签收图片", tags = "签收图片接口")
public class DistributionSignPrintController extends BladeController {
private final IDistributionSignPrintService distributionSignPrintService;
/**
* 签收图片 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入distributionSignPrint")
public R<DistributionSignPrintEntity> detail(DistributionSignPrintEntity distributionSignPrint) {
DistributionSignPrintEntity detail = distributionSignPrintService.getOne(Condition.getQueryWrapper(distributionSignPrint));
return R.data(detail);
}
/**
* 签收图片 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionSignPrint")
public R<IPage<DistributionSignPrintEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distributionSignPrint, Query query) {
IPage<DistributionSignPrintEntity> pages = distributionSignPrintService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionSignPrint, DistributionSignPrintEntity.class));
return R.data(pages);
}
/**
* 签收图片 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入distributionSignPrint")
public R<IPage<DistributionSignPrintVO>> page(DistributionSignPrintVO distributionSignPrint, Query query) {
IPage<DistributionSignPrintVO> pages = distributionSignPrintService.selectDistributionSignPrintPage(Condition.getPage(query), distributionSignPrint);
return R.data(pages);
}
/**
* 签收图片 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入distributionSignPrint")
public R save(@Valid @RequestBody DistributionSignPrintEntity distributionSignPrint) {
return R.status(distributionSignPrintService.save(distributionSignPrint));
}
/**
* 签收图片 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionSignPrint")
public R update(@Valid @RequestBody DistributionSignPrintEntity distributionSignPrint) {
return R.status(distributionSignPrintService.updateById(distributionSignPrint));
}
/**
* 签收图片 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入distributionSignPrint")
public R submit(@Valid @RequestBody DistributionSignPrintEntity distributionSignPrint) {
return R.status(distributionSignPrintService.saveOrUpdate(distributionSignPrint));
}
/**
* 签收图片 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(distributionSignPrintService.deleteLogic(Func.toLongList(ids)));
}
/**
* 导出数据
*/
@GetMapping("/export-distributionSignPrint")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionSignPrint")
public void exportDistributionSignPrint(@ApiIgnore @RequestParam Map<String, Object> distributionSignPrint, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<DistributionSignPrintEntity> queryWrapper = Condition.getQueryWrapper(distributionSignPrint, DistributionSignPrintEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(DistributionSignPrint::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(DistributionSignPrintEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<DistributionSignPrintExcel> list = distributionSignPrintService.exportDistributionSignPrint(queryWrapper);
ExcelUtil.export(response, "签收图片数据" + DateUtil.time(), "签收图片数据表", list, DistributionSignPrintExcel.class);
}
}

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockListController.java

@ -25,6 +25,7 @@ import com.logpm.distribution.excel.DistributionStockListExcel;
import com.logpm.distribution.excel.StockListImporter;
import com.logpm.distribution.service.IDistributionStockListService;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockListAllocationVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -83,6 +84,17 @@ public class DistributionStockListController extends BladeController {
return R.data(pages);
}
/**
* 库存品管理 分页货位查询
*/
@GetMapping("/listAllocation")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionStockList")
public R<IPage<DistributionStockListAllocationVO>> listAllocation(@ApiIgnore @RequestParam Map<String, Object> distributionStockList, Query query) {
IPage<DistributionStockListAllocationVO> pages = distributionStockListService.listAllocation(Condition.getPage(query), distributionStockList);
return R.data(pages);
}
/**
* 库存品管理 分页自己
*/

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignPrintDTO.java

@ -0,0 +1,34 @@
/*
* 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 com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 签收图片 数据传输对象实体类
*
* @author cyz
* @since 2023-09-28
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionSignPrintDTO extends DistributionSignPrintEntity {
private static final long serialVersionUID = 1L;
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforDTO.java

@ -21,6 +21,9 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
import java.util.Map;
/**
* 签收管理 数据传输对象实体类
*
@ -49,4 +52,9 @@ public class DistributionSignforDTO extends DistributionSignforEntity {
*/
@ApiModelProperty(value = "离线数据Json")
private String offlineJson;
/**
* 签收图片类型集合
*/
Map<String, List<DistributionSignPrintDTO>> map;
}

111
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignPrintExcel.java

@ -0,0 +1,111 @@
/*
* 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 com.logpm.distribution.excel;
import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import java.io.Serializable;
/**
* 签收图片 Excel实体类
*
* @author cyz
* @since 2023-09-28
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class DistributionSignPrintExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 租户号
*/
@ColumnWidth(20)
@ExcelProperty("租户号")
private String tenantId;
/**
* 是否已删除
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Integer isDeleted;
/**
* 预留1
*/
@ColumnWidth(20)
@ExcelProperty("预留1")
private String reserve1;
/**
* 预留2
*/
@ColumnWidth(20)
@ExcelProperty("预留2")
private String reserve2;
/**
* 预留3
*/
@ColumnWidth(20)
@ExcelProperty("预留3")
private String reserve3;
/**
* 预留4
*/
@ColumnWidth(20)
@ExcelProperty("预留4")
private String reserve4;
/**
* 预留5
*/
@ColumnWidth(20)
@ExcelProperty("预留5")
private String reserve5;
/**
* 类型
*/
@ColumnWidth(20)
@ExcelProperty("类型")
private Integer type;
/**
* 名称
*/
@ColumnWidth(20)
@ExcelProperty("名称")
private String name;
/**
* 路径
*/
@ColumnWidth(20)
@ExcelProperty("路径")
private String urlRoute;
/**
* 预约id
*/
@ColumnWidth(20)
@ExcelProperty("预约id")
private String reservationId;
}

53
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionSignPrintClient.java

@ -0,0 +1,53 @@
/*
* 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 com.logpm.distribution.feign;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import com.logpm.distribution.service.IDistributionSignPrintService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
/**
* 签收图片 Feign实现类
*
* @author cyz
* @since 2023-09-28
*/
@ApiIgnore()
@RestController
@AllArgsConstructor
public class DistributionSignPrintClient implements IDistributionSignPrintClient {
private final IDistributionSignPrintService distributionSignPrintService;
@Override
@GetMapping(TOP)
public BladePage<DistributionSignPrintEntity> top(Integer current, Integer size) {
Query query = new Query();
query.setCurrent(current);
query.setSize(size);
IPage<DistributionSignPrintEntity> page = distributionSignPrintService.page(Condition.getPage(query));
return BladePage.of(page);
}
}

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignPrintMapper.java

@ -0,0 +1,54 @@
/*
* 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 com.logpm.distribution.mapper;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import com.logpm.distribution.vo.DistributionSignPrintVO;
import com.logpm.distribution.excel.DistributionSignPrintExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 签收图片 Mapper 接口
*
* @author cyz
* @since 2023-09-28
*/
public interface DistributionSignPrintMapper extends BaseMapper<DistributionSignPrintEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionSignPrint
* @return
*/
List<DistributionSignPrintVO> selectDistributionSignPrintPage(IPage page, DistributionSignPrintVO distributionSignPrint);
/**
* 获取导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionSignPrintExcel> exportDistributionSignPrint(@Param("ew") Wrapper<DistributionSignPrintEntity> queryWrapper);
}

37
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignPrintMapper.xml

@ -0,0 +1,37 @@
<?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.logpm.distribution.mapper.DistributionSignPrintMapper">
<!-- 通用查询映射结果 -->
<resultMap id="distributionSignPrintResultMap" type="com.logpm.distribution.entity.DistributionSignPrintEntity">
<result column="tenant_id" property="tenantId"/>
<result column="create_user" property="createUser"/>
<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"/>
<result column="create_dept" property="createDept"/>
<result column="id" property="id"/>
<result column="reserve1" property="reserve1"/>
<result column="reserve2" property="reserve2"/>
<result column="reserve3" property="reserve3"/>
<result column="reserve4" property="reserve4"/>
<result column="reserve5" property="reserve5"/>
<result column="type" property="type"/>
<result column="name" property="name"/>
<result column="url_route" property="urlRoute"/>
<result column="reservation_id" property="reservationId"/>
</resultMap>
<select id="selectDistributionSignPrintPage" resultMap="distributionSignPrintResultMap">
select * from logpm_distribution_sign_print where is_deleted = 0
</select>
<select id="exportDistributionSignPrint" resultType="com.logpm.distribution.excel.DistributionSignPrintExcel">
SELECT * FROM logpm_distribution_sign_print ${ew.customSqlSegment}
</select>
</mapper>

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java

@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.excel.DistributionStockListExcel;
import com.logpm.distribution.vo.DistributionStockListAllocationVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.DistributionStockupStockListInfoVO;
import com.logpm.distribution.vo.StockListInfoListVO;
@ -85,4 +86,12 @@ public interface DistributionStockListMapper extends BaseMapper<DistributionStoc
List<DistributionStockListEntity> getListByMarketIdAndMaterialName(@Param("marketId") Long marketId, @Param("materialName") String materialName, @Param("warehouseId") Long warehouseId);
/**
*
* @param page
* @param distributionStockListEntity
* @return
*/
IPage<DistributionStockListAllocationVO> listAllocation(IPage<Object> page, @Param("param") DistributionStockListEntity distributionStockListEntity);
}

15
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml

@ -347,5 +347,20 @@
and ldsl.market_id = #{marketId}
and ldsl.warehouse_id = #{warehouseId}
</select>
<select id="listAllocation" resultType="com.logpm.distribution.vo.DistributionStockListAllocationVO">
select lwug.allocation_title allocationTitle,ldsi.market_name marketName,lwug.num,lwug.create_time createTime,ldsi.cargo_unit cargoUnit,
ldsi.unpack,ldsi.quantity_stock quantityStock,ldsi.unpacking_quantity unpackingQuantity,ldsi.description_goods descriptionGoods
from logpm_distribution_stock_list ldsi
LEFT JOIN logpm_warehouse_updown_goods lwug on ldsi.material_id = lwug.association_id and ldsi.incoming_batch = lwug.incoming_batch
and ldsi.market_id = lwug.market_id and lwug.association_type = '4' and lwug.warehouse_id = ldsi.warehouse_id
<where>
<if test="param.materialId != null and param.materialId != '' "> and ldsi.material_id = #{param.materialId}</if>
<if test="param.marketId != null and param.marketId != '' "> and ldsi.market_id = #{param.marketId}</if>
<if test="param.warehouseId != null and param.warehouseId != '' "> and ldsi.warehouse_id = #{param.warehouseId}</if>
<if test="param.storeId != null and param.storeId != '' ">and ldsi.store_id = #{param.storeId} </if>
</where>
</select>
</mapper>

52
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignPrintService.java

@ -0,0 +1,52 @@
/*
* 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 com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import com.logpm.distribution.vo.DistributionSignPrintVO;
import com.logpm.distribution.excel.DistributionSignPrintExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* 签收图片 服务类
*
* @author cyz
* @since 2023-09-28
*/
public interface IDistributionSignPrintService extends BaseService<DistributionSignPrintEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionSignPrint
* @return
*/
IPage<DistributionSignPrintVO> selectDistributionSignPrintPage(IPage<DistributionSignPrintVO> page, DistributionSignPrintVO distributionSignPrint);
/**
* 导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionSignPrintExcel> exportDistributionSignPrint(Wrapper<DistributionSignPrintEntity> queryWrapper);
}

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java

@ -20,10 +20,10 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.bean.Resp;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionAddvalueDTO;
import com.logpm.distribution.dto.DistributionReservationStocklistDTO;
import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.DistrilbutionAppsignforDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.excel.DistributionSignforExcel;
import com.logpm.distribution.vo.*;
@ -35,6 +35,7 @@ import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import java.util.List;
import java.util.Map;
/**
* 签收管理 服务类
@ -83,7 +84,7 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
/**
*App- 签收管理 司机签收
*/
R signforack(DistributionSignforEntity distributionSignfor);
R signforack(DistributionSignforDTO distributionSignfor);
/**
* 签收管理 用户不在配送单签收
*/
@ -151,4 +152,19 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
* @return
*/
R getAddvalueInfoList(DistributionAddvalueDTO distributionAddvalueDTO);
/**
* 回显图片
* @param distributionSignfor
* @return
*/
Map<String, List<DistributionSignPrintEntity>> prices(DistributionSignforDTO distributionSignfor);
/**
* 修改签收图片
*
* @param distributionSignfor
* @return
*/
Boolean updatePicture(DistributionSignforDTO distributionSignfor);
}

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java

@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.excel.DistributionStockListExcel;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.DistributionStockupStockListInfoVO;
import com.logpm.distribution.vo.StockListInfoListVO;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.StockMallVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
@ -134,6 +131,13 @@ public interface IDistributionStockListService extends BaseService<DistributionS
List<DistributionStockListEntity> getListByMarketIdAndMaterialName(Long marketId, String materialName, Long warehouseId);
/**
* @param page
* @param distributionStockList
* @return
*/
IPage<DistributionStockListAllocationVO> listAllocation(IPage<Object> page, Map<String, Object> distributionStockList);
// /**
// * 查询库存品详情

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignPrintServiceImpl.java

@ -0,0 +1,54 @@
/*
* 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 com.logpm.distribution.service.impl;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import com.logpm.distribution.vo.DistributionSignPrintVO;
import com.logpm.distribution.excel.DistributionSignPrintExcel;
import com.logpm.distribution.mapper.DistributionSignPrintMapper;
import com.logpm.distribution.service.IDistributionSignPrintService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
* 签收图片 服务实现类
*
* @author cyz
* @since 2023-09-28
*/
@Service
public class DistributionSignPrintServiceImpl extends BaseServiceImpl<DistributionSignPrintMapper, DistributionSignPrintEntity> implements IDistributionSignPrintService {
@Override
public IPage<DistributionSignPrintVO> selectDistributionSignPrintPage(IPage<DistributionSignPrintVO> page, DistributionSignPrintVO distributionSignPrint) {
return page.setRecords(baseMapper.selectDistributionSignPrintPage(page, distributionSignPrint));
}
@Override
public List<DistributionSignPrintExcel> exportDistributionSignPrint(Wrapper<DistributionSignPrintEntity> queryWrapper) {
List<DistributionSignPrintExcel> distributionSignPrintList = baseMapper.exportDistributionSignPrint(queryWrapper);
//distributionSignPrintList.forEach(distributionSignPrint -> {
// distributionSignPrint.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionSignPrint.getType()));
//});
return distributionSignPrintList;
}
}

59
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -54,7 +54,6 @@ import org.springblade.common.constant.reservation.ReservationInventorySigningSt
import org.springblade.common.constant.reservation.ReservationLoadingStatusConstant;
import org.springblade.common.constant.reservation.ReservationSigningStatusConstant;
import org.springblade.common.constant.signing.SignforDriverSigningStatusConstant;
import org.springblade.common.constant.signing.SignforStatusConstant;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.common.utils.GaoDeApiUtil;
import org.springblade.core.mp.base.BaseServiceImpl;
@ -69,8 +68,6 @@ import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
@ -106,6 +103,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
private final DistributionAddvalueMapper distributionAddvalueMapper;
private final IDistributionAddvalueService distributionAddvalueService;
private final IDistributionAddvaluePackageService distributionAddvaluePackageService;
private final IDistributionSignPrintService iDistributionSignPrintService;
@Override
public IPage<DistributionSignforVO> selectDistributionSignforPage(IPage<DistributionSignforVO> page, DistributionSignforVO distributionSignfor) {
@ -386,14 +384,27 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
@Override
public R signforack(DistributionSignforEntity distributionSignfor) {
public R signforack(DistributionSignforDTO distributionSignfor) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
log.info("=============签收图片数据为:{}",distributionSignfor.getMap());
if(ObjectUtils.isNotNull(distributionSignfor.getMap())){
List<DistributionSignPrintEntity> distributionSignPrintList = new ArrayList<>();
distributionSignfor.getMap().forEach((k,v)->{
v.stream().forEach(i ->{
DistributionSignPrintEntity distributionSignPrint = new DistributionSignPrintEntity();
BeanUtils.copyProperties(i,distributionSignPrint);
distributionSignPrint.setReservationId(distributionSignfor.getReservationId());
distributionSignPrintList.add(distributionSignPrint);
});
});
iDistributionSignPrintService.saveBatch(distributionSignPrintList);
}
//修改签收表司机签收数量
boolean update = this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId())
.eq(DistributionSignforEntity::getDeliveryId, distributionSignfor.getDeliveryId())
.set(DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date()))
.set(StringUtils.isNotBlank(distributionSignfor.getDeliverySignPictures()), DistributionSignforEntity::getDeliverySignPictures, distributionSignfor.getDeliverySignPictures())
// .set(StringUtils.isNotBlank(distributionSignfor.getDeliverySignPictures()), DistributionSignforEntity::getDeliverySignPictures, distributionSignfor.getDeliverySignPictures())
.set(DistributionSignforEntity::getDriverSigning, "2")
.set(StringUtils.isNotBlank(distributionSignfor.getDriverRemarks()), DistributionSignforEntity::getDriverRemarks, distributionSignfor.getDriverRemarks())
.set(StringUtils.isNotBlank(distributionSignfor.getSigneeName()), DistributionSignforEntity::getSigneeName, distributionSignfor.getSigneeName())
@ -1574,5 +1585,43 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.data(addvalueBySignfor);
}
@Override
public Map<String, List<DistributionSignPrintEntity>> prices(DistributionSignforDTO distributionSignfor) {
log.info("==========回显图片的值:{}",distributionSignfor);
List<DistributionSignPrintEntity> list = iDistributionSignPrintService.list(Wrappers.<DistributionSignPrintEntity>query().lambda()
.eq(DistributionSignPrintEntity::getReservationId, distributionSignfor.getReservationId())
.eq(DistributionSignPrintEntity::getIsDeleted, "0")
);
Map<String, List<DistributionSignPrintEntity>> collect = list.stream().collect(Collectors.groupingBy(DistributionSignPrintEntity::getType));
return collect;
}
@Override
public Boolean updatePicture(DistributionSignforDTO distributionSignfor) {
if(ObjectUtils.isNotNull(distributionSignfor.getMap())){
List<DistributionSignPrintEntity> distributionSignPrintList = new ArrayList<>();
distributionSignfor.getMap().forEach((k,v) ->{
List<DistributionSignPrintEntity> list = iDistributionSignPrintService.list(Wrappers.<DistributionSignPrintEntity>query().lambda()
.eq(DistributionSignPrintEntity::getReservationId, distributionSignfor.getReservationId())
.eq(DistributionSignPrintEntity::getType, k)
.eq(DistributionSignPrintEntity::getIsDeleted, "0")
);
//删除
iDistributionSignPrintService.deleteLogic(list.stream().map(DistributionSignPrintEntity::getId).collect(Collectors.toList()));
v.stream().forEach( i -> {
DistributionSignPrintEntity distributionSignPrint = new DistributionSignPrintEntity();
BeanUtils.copyProperties(i,distributionSignPrint);
distributionSignPrint.setReservationId(distributionSignfor.getReservationId());
distributionSignPrintList.add(distributionSignPrint);
});
});
//添加
return iDistributionSignPrintService.saveBatch(distributionSignPrintList);
}
return false;
}
}

79
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -148,28 +148,66 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
.in(DistributionParcelListEntity::getStockArticleId, ids.split(","))
);
if (list1.size() > 0) {
list1.forEach(i -> {
//查询包件有没有物料
List<DistributionParcelDetailsEntity> list = distributionParcelDetailsService.list(Wrappers.<DistributionParcelDetailsEntity>query().lambda()
.eq(DistributionParcelDetailsEntity::getParcelListId, i.getId())
);
if (list.size() > 0) {
//有
list.forEach(a -> {
list1.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getMaterialId))
.forEach((k ,v) ->{
int sum = v.stream().mapToInt(DistributionParcelListEntity::getQuantity).sum();
v.stream().forEach( i -> {
//查询包件有没有物料
List<DistributionParcelDetailsEntity> list = distributionParcelDetailsService.list(Wrappers.<DistributionParcelDetailsEntity>query().lambda()
.eq(DistributionParcelDetailsEntity::getParcelListId, i.getId())
);
if (list.size() > 0) {
//有
list.stream().collect(Collectors.groupingBy(DistributionParcelDetailsEntity::getEncoded))
.forEach((kk,vv) ->{
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
BeanUtil.copyProperties(vv.get(0),parcelListEntity);
parcelListEntity.setQuantity(sum);
parcelListEntity.setMaterialName(vv.get(0).getName());
parcelListEntity.setMaterialCode(vv.get(0).getEncoded());
parcelListEntity.setMaterialUnit(vv.get(0).getUnit());
// 添加库存品信息
addStockList(parcelListEntity, 1);
});
}
DistributionParcelListEntity parcelList = new DistributionParcelListEntity();
parcelList.setId(i.getId());
parcelList.setConditions(2);
distributionParcelListService.updateById(parcelList);
});
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
BeanUtil.copyProperties(i, parcelListEntity);
parcelListEntity.setMaterialName(a.getName());
parcelListEntity.setMaterialCode(a.getEncoded());
parcelListEntity.setMaterialUnit(a.getUnit());
BeanUtil.copyProperties(v.get(0),parcelListEntity);
parcelListEntity.setQuantity(sum);
// 添加库存品信息
addStockList(parcelListEntity, 1);
});
} else {
// 添加库存品信息
addStockList(i, 1);
}
});
// list1.forEach(i -> {
// //查询包件有没有物料
// List<DistributionParcelDetailsEntity> list = distributionParcelDetailsService.list(Wrappers.<DistributionParcelDetailsEntity>query().lambda()
// .eq(DistributionParcelDetailsEntity::getParcelListId, i.getId())
// );
// if (list.size() > 0) {
// //有
// list.forEach(a -> {
// DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
// BeanUtil.copyProperties(i, parcelListEntity);
// parcelListEntity.setMaterialName(a.getName());
// parcelListEntity.setMaterialCode(a.getEncoded());
// parcelListEntity.setMaterialUnit(a.getUnit());
// // 添加库存品信息
// addStockList(parcelListEntity, 1);
// });
// } else {
// // 添加库存品信息
// addStockList(i, 1);
// }
//
// });
String[] split = ids.split(",");
for (int i = 0; i < split.length; i++) {
//修改订单状态
@ -305,7 +343,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
//查询在库订单信息
DistributionStockArticleEntity distributionStockArticleEntity = baseMapper.selectById(distributionParcelList.getStockArticleId());
if (ObjectUtil.isEmpty(distributionStockArticleEntity.getMallId()) || distributionStockArticleEntity.getMallId().equals("-1")) {
if (ObjectUtil.isEmpty(distributionStockArticleEntity.getMallId()) ) {
throw new ServiceException("客户数据异常,无法转换!!");
}
DistributionStockListEntity distributionStockListEntity = new DistributionStockListEntity();
@ -320,7 +358,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
distributionStockListEntity.setCargoUnit(Optional.ofNullable(distributionParcelList.getMaterialUnit()).orElse(null)); //货物单位
distributionStockListEntity.setMallName(Optional.ofNullable(distributionStockArticleEntity.getMallName()).orElse(null)); //商场名称
distributionStockListEntity.setQuantityStock(Optional.ofNullable(distributionStockArticleEntity.getHandQuantity()).orElse(null)); //库存数量
distributionStockListEntity.setQuantityStock(Optional.ofNullable(distributionParcelList.getQuantity()).orElse(null)); //库存数量(包件数量)
distributionStockListEntity.setIncomingBatch(Optional.ofNullable(distributionStockArticleEntity.getWaybillNumber()).orElse(null)); //入库批次
distributionStockListEntity.setOutboundQuantity(0); //出库数量
@ -363,6 +401,9 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
//添加库存品记录
DistributionStockListInfoEntity distributionStockListInfo = new DistributionStockListInfoEntity();
BeanUtil.copyProperties(distributionStockListEntity,distributionStockListInfo);
distributionStockListInfo.setWarehousingTime(distributionStockArticleEntity.getWarehouseEntryTime());
// distributionStockListInfo.setLicensePlate(distributionStockArticleEntity.get); //车牌
distributionStockListInfo.setDespatch(distributionStockArticleEntity.getWaybillNumber()); //物流单号
distributionStockListInfoService.save(distributionStockListInfo);
return distributionStockArticleEntity;
}

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -37,10 +37,7 @@ import com.logpm.distribution.service.IDistributionReservationStocklistService;
import com.logpm.distribution.service.IDistributionStockListInfoService;
import com.logpm.distribution.service.IDistributionStockListService;
import com.logpm.distribution.service.IDistributionUnpackingDetailsService;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.DistributionStockupStockListInfoVO;
import com.logpm.distribution.vo.StockListInfoListVO;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.StockMallVO;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.DictBizConstant;
@ -388,6 +385,17 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
return baseMapper.getListByMarketIdAndMaterialName(marketId,materialName,warehouseId);
}
/**
* @param page
* @param distributionStockList
* @return
*/
@Override
public IPage<DistributionStockListAllocationVO> listAllocation(IPage<Object> page, Map<String, Object> distributionStockList) {
DistributionStockListEntity distributionStockListEntity = JSONObject.parseObject(JSONObject.toJSONString(distributionStockList), DistributionStockListEntity.class);
return baseMapper.listAllocation(page,distributionStockListEntity);
}
// @Override
// public R selectInventoryDetail(Map<String, Object> params, IPage<Object> page) {
// String reservationId = (String) params.get("reservationId");

Loading…
Cancel
Save