Browse Source

Merge branch 'dev' into pre-production

newStockUp
pref_mail@163.com 1 year ago
parent
commit
743e619692
  1. 11
      blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
  2. 3
      blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java
  3. 3
      blade-biz-common/src/main/java/org/springblade/common/utils/FileUtil.java
  4. 4
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesOvertimeFineEntity.java
  5. 10
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java
  6. 12
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesWorkOrderVO.java
  7. 40
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  8. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java
  9. 53
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java
  10. 8
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.java
  11. 8
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  12. 20
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
  13. 156
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  14. 11
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/wrapper/AftersalesWorkOrderWrapper.java
  15. 152
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  16. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  17. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  18. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  19. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

11
blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java

@ -18,7 +18,7 @@ public class DictBizConstant {
public static final String ORDER_STOCKUP_STATUS = "order_stockup_status";//订单备货状态
public static final String ORDER_RESERVATION_STATUS = "order_reservation_status";//订单预约状态
public static final String RESERVATION_STATUS = "reservation_status";//预约状态
public static final String WORK_ORDER_STATUS = "work_order_status";//异常工单状态
public static final String ORDER_PACKAGE_STATUS = "order_package_status";//配送包件状态
@ -119,4 +119,13 @@ public class DictBizConstant {
public static final String OPEN_ORDER_URGENCY = "open_order_urgency";
public static final String OPEN_ORDER_RECEIPT = "open_order_receipt";
public static final String OPEN_ORDER_TRANSPORT_TYPE = "open_order_transport_type";
/* 异常工单状态 */
public static final String PC_WORK_ORDER = "pc_work_order"; //PC工单异常类型
public static final String PC_DISCOVERY_NODE = "pc_discovery_node"; //PC发现环节
public static final String PDA_LINK_LNITIATION = "pda_link_lnitiation"; //PDA环节发起
public static final String RESULT_HANDLING = "result_handling"; //异常处理结果
public static final String PAYMENT_METHOD = "payment_method"; //赔付支付方式
public static final String WORK_ORDER_STATUS = "work_order_status";//异常工单状态
}

3
blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java

@ -6,7 +6,8 @@ public enum WorkOrderStatusConstant {
yichuli("已处理","30"),
chulizhong("处理中","20"),
daishenhe("待审核","40"),
yishenhe("已审核","50");
yishenhe("已审核","50"),
chaoshiweichuli("超时未处理","60");
/**

3
blade-biz-common/src/main/java/org/springblade/common/utils/FileUtil.java

@ -38,9 +38,6 @@ public class FileUtil extends TimerTask {
this.LocalTempFiles = list;
}
public static File checkZipFile(String reservationCode) {
return new File(zipPavePath+".zip");
}
/**

4
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesOvertimeFineEntity.java

@ -66,7 +66,7 @@ public class AftersalesOvertimeFineEntity extends TenantEntity {
* 异常工单ID
*/
@ApiModelProperty(value = "异常工单ID")
private String workOrderId;
private Long workOrderId;
/**
* 金额
*/
@ -76,7 +76,7 @@ public class AftersalesOvertimeFineEntity extends TenantEntity {
* 超时时间
*/
@ApiModelProperty(value = "超时时间")
private Date timeout;
private String timeout;
/**
* 仓库ID
*/

10
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java

@ -67,6 +67,16 @@ public class AftersalesWorkOrderEntity extends TenantEntity {
*/
@ApiModelProperty(value = "工单异常类型;货损,少货,窜货,加急,其他")
private String workOrderType;
/**
* 全部责任人
*/
@ApiModelProperty(value = "全部责任人")
private String responsiblePerson;
/**
* 全部处理人
*/
@ApiModelProperty(value = "全部处理人")
private String processedBy;
/**
* 发起工单标识;PDAPC
*/

12
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesWorkOrderVO.java

@ -31,5 +31,17 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class AftersalesWorkOrderVO extends AftersalesWorkOrderEntity {
private static final long serialVersionUID = 1L;
/**
* 工单名称
*/
private String workOrderTypeName;
/**
* 提货名称
*/
private String discoveryNodeName;
}

40
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -34,7 +34,6 @@ 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.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
@ -44,10 +43,8 @@ import com.logpm.aftersales.service.IAftersalesWorkOrderService;
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.Calendar;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
@ -98,7 +95,7 @@ public class AftersalesWorkOrderController extends BladeController {
*/
@GetMapping("/listOwn")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入aftersalesWorkOrder")
@ApiOperation(value = "查询异常完整数据集合", notes = "传入aftersalesWorkOrder")
public R<IPage<AftersalesWorkOrderVO>> getListOwn(@ApiIgnore @RequestParam Map<String, Object> aftersalesWorkOrder, Query query) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNotNull(myCurrentWarehouse)){
@ -108,6 +105,30 @@ public class AftersalesWorkOrderController extends BladeController {
return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages));
}
/**
* 客服异常工单 查询处理超时的数据
*/
@GetMapping("/isItTimeout")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "查询处理超时的数据", notes = "传入aftersalesWorkOrder")
public void getIsItTimeout() {
aftersalesWorkOrderService.getIsItTimeout();
}
/**
* 客服异常工单 申述完结工单
*/
@PostMapping("/appealWorkOrder")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "申述完结工单", notes = "传入aftersalesWorkOrder")
public R getAppealWorkOrder(@RequestBody AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
R r = aftersalesWorkOrderService.getAppealWorkOrder(aftersalesWorkOrderDTO);
return R.success("提交成功!");
}
/**
* 客服异常工单 自定义分页
*/
@ -198,13 +219,10 @@ public class AftersalesWorkOrderController extends BladeController {
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入aftersalesWorkOrder")
public void exportAftersalesWorkOrder(@ApiIgnore @RequestParam Map<String, Object> aftersalesWorkOrder, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<AftersalesWorkOrderEntity> queryWrapper = Condition.getQueryWrapper(aftersalesWorkOrder, AftersalesWorkOrderEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(AftersalesWorkOrder::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(AftersalesWorkOrderEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<AftersalesWorkOrderExcel> list = aftersalesWorkOrderService.exportAftersalesWorkOrder(queryWrapper);
ExcelUtil.export(response, "客服异常工单数据" + DateUtil.time(), "客服异常工单数据表", list, AftersalesWorkOrderExcel.class);
List<AftersalesWorkOrderExcel> list = aftersalesWorkOrderService.exportAftersalesWorkOrder(aftersalesWorkOrder);
ExcelUtil.export(response, "异常工单数据" + DateUtil.time(), "异常工单数据", list, AftersalesWorkOrderExcel.class);
}
}

5
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java

@ -67,5 +67,10 @@ public class AftersalesWorkOrderDTO extends AftersalesWorkOrderEntity {
*/
private List<AftersalesCompletionRecordEntity> completionRecordEntities;
/**
* 申述ID
*/
private List<String> appealList;
}

53
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java

@ -41,66 +41,25 @@ public class AftersalesWorkOrderExcel 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 String workOrderType;
@ExcelProperty("工单异常类型")
private String workOrderTypeName;
/**
* 发起工单标识;PDAPC
*/
@ColumnWidth(20)
@ExcelProperty("发起工单标识;PDA,PC")
@ExcelProperty("发起工单标识")
private String initiationIdentification;
/**
* 发现节点;提货发货干线库内配送其他签收PC安装PC
*/
@ColumnWidth(20)
@ExcelProperty("发现节点;提货,发货,干线,库内,配送,其他,签收(PC),安装(PC)")
private String discoveryNode;
@ExcelProperty("发现节点")
private String discoveryNodeName;
/**
* 异常工单号
*/

8
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.java

@ -59,4 +59,12 @@ public interface AftersalesWorkOrderMapper extends BaseMapper<AftersalesWorkOrde
* @return
*/
IPage<AftersalesWorkOrderVO> getPendingWorkOrder(IPage<Object> page,@Param("param") AftersalesWorkOrderDTO aftersalesWorkOrder);
/**
* 查询完整的异常工单信息
* @param page
* @param workOrderEntity
* @return
*/
IPage<AftersalesWorkOrderEntity> pageListOwn(IPage<Object> page,@Param("param") AftersalesWorkOrderEntity workOrderEntity);
}

8
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -49,8 +49,14 @@
<result column="entry_time" property="entryTime"/>
<result column="operator" property="operator"/>
</resultMap>
<!--查询完整的异常工单信息-->
<select id="pageListOwn" resultType="com.logpm.aftersales.entity.AftersalesWorkOrderEntity">
select lawo.work_order_type,lawo.discovery_node,lawo.work_order_number,lawo.waybill_number,lawo.order_code,lawo.train_number,lawo.first,
lawo.secondary,lawo.vehicle_route,lawo.deliver_goods_time,lawo.discovery_time,lawo.warehousing_time,lawo.waybill_mall,lawo.remarks,lawo.delivery_time,
lawo.delivery_driver,lawo.work_order_status,lawo.problem_description,lawo.responsible_person,lawo.processed_by
from logpm_aftersales_work_order lawo
</select>
<select id="selectAftersalesWorkOrderPage" resultMap="aftersalesWorkOrderResultMap">
select * from logpm_aftersales_work_order where is_deleted = 0
</select>

20
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java

@ -16,13 +16,14 @@
*/
package com.logpm.aftersales.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import java.util.List;
import java.util.Map;
@ -46,10 +47,9 @@ public interface IAftersalesWorkOrderService extends BaseService<AftersalesWorkO
/**
* 导出数据
*
* @param queryWrapper
* @return
* @param objectMap@return
*/
List<AftersalesWorkOrderExcel> exportAftersalesWorkOrder(Wrapper<AftersalesWorkOrderEntity> queryWrapper);
List<AftersalesWorkOrderExcel> exportAftersalesWorkOrder(Map<String,Object> objectMap);
/**
* 工单添加和修改
@ -81,4 +81,16 @@ public interface IAftersalesWorkOrderService extends BaseService<AftersalesWorkO
* @return
*/
IPage<AftersalesWorkOrderEntity> pageListOwn(Map<String, Object> aftersalesWorkOrder, IPage<Object> page);
/**
* 查询订单超时是否超时未处理
*/
void getIsItTimeout();
/**
* 提交工单申述
* @param aftersalesWorkOrderDTO
* @return
*/
R getAppealWorkOrder(AftersalesWorkOrderDTO aftersalesWorkOrderDTO);
}

156
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -17,12 +17,12 @@
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.AftersalesAbnormalPackageEntity;
import com.logpm.aftersales.entity.AftersalesDecreaseImageEntity;
import com.logpm.aftersales.entity.AftersalesProcessorEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.entity.*;
import com.logpm.aftersales.service.*;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
@ -31,22 +31,32 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.system.cache.DictBizCache;
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 org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.time.Duration;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 客服异常工单 服务实现类
@ -64,6 +74,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
private final IAftersalesProcessorService aftersalesProcessorService;
private final IAftersalesCompletionRecordService completionRecordService;
private final IAftersalesCompletionRecipientService completionRecipientService;
private final IAftersalesOvertimeFineService aftersalesOvertimeFineService;
private final IBasicdataWarehouseClient warehouseClient;
@ -75,11 +86,30 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
@Override
public List<AftersalesWorkOrderExcel> exportAftersalesWorkOrder(Wrapper<AftersalesWorkOrderEntity> queryWrapper) {
List<AftersalesWorkOrderExcel> aftersalesWorkOrderList = baseMapper.exportAftersalesWorkOrder(queryWrapper);
//aftersalesWorkOrderList.forEach(aftersalesWorkOrder -> {
// aftersalesWorkOrder.setTypeName(DictCache.getValue(DictEnum.YES_NO, AftersalesWorkOrder.getType()));
//});
public List<AftersalesWorkOrderExcel> exportAftersalesWorkOrder(Map<String, Object> objectMap) {
List<AftersalesWorkOrderExcel> aftersalesWorkOrderList = new ArrayList<>();
QueryWrapper<AftersalesWorkOrderEntity> queryWrapper = Condition.getQueryWrapper(objectMap, AftersalesWorkOrderEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(AftersalesWorkOrder::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(AftersalesWorkOrderEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<AftersalesWorkOrderEntity> aftersalesWorkOrderEntities = baseMapper.selectList(queryWrapper);
aftersalesWorkOrderEntities.forEach(i -> {
// aftersalesWorkOrder.setTypeName(DictCache.getValue(DictEnum.YES_NO, AftersalesWorkOrder.getType()));
AftersalesWorkOrderExcel aftersalesWorkOrderExcel = new AftersalesWorkOrderExcel();
BeanUtil.copyProperties(i,aftersalesWorkOrderExcel);
aftersalesWorkOrderList.add(aftersalesWorkOrderExcel);
aftersalesWorkOrderExcel.setWorkOrderTypeName(DictBizCache.getValue(DictBizConstant.PC_WORK_ORDER,i.getWorkOrderStatus()));
if("PC".equals(aftersalesWorkOrderExcel.getInitiationIdentification())){
//PC
aftersalesWorkOrderExcel.setDiscoveryNodeName(DictBizCache.getValue(DictBizConstant.PC_DISCOVERY_NODE,i.getDiscoveryNode()));
}else{
//PDA
aftersalesWorkOrderExcel.setDiscoveryNodeName(DictBizCache.getValue(DictBizConstant.PDA_LINK_LNITIATION,i.getDiscoveryNode()));
}
});
return aftersalesWorkOrderList;
}
@ -124,6 +154,20 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId());
aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.daichuli.getValue());
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())){
aftersalesWorkOrder.getProcessorEntityList().stream().collect(Collectors.groupingBy(AftersalesProcessorEntity::getTypesOf))
.forEach((k,v) ->{
if("1".equals(k)){
//责任人
String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(","));
aftersalesWorkOrder.setResponsiblePerson(collect);
}else{
String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(","));
aftersalesWorkOrder.setProcessedBy(collect);
}
});
}
baseMapper.insert(aftersalesWorkOrder);
@ -140,6 +184,21 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
AftersalesProcessorEntity processorEntity = new AftersalesProcessorEntity();
processorEntity.setId(i);
processorEntity.setConditions("3");
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())){
aftersalesWorkOrder.getProcessorEntityList().stream().collect(Collectors.groupingBy(AftersalesProcessorEntity::getTypesOf))
.forEach((k,v) ->{
if("1".equals(k)){
//责任人
String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(","));
aftersalesWorkOrder.setResponsiblePerson(collect);
}else{
String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(","));
aftersalesWorkOrder.setProcessedBy(collect);
}
});
}
list.add(processorEntity);
});
if(!list.isEmpty()){
@ -253,6 +312,83 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
*/
@Override
public IPage<AftersalesWorkOrderEntity> pageListOwn(Map<String, Object> aftersalesWorkOrder, IPage<Object> page) {
AftersalesWorkOrderEntity workOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderEntity.class);
return baseMapper.pageListOwn(page,workOrderEntity);
}
/**
* 查询工单超时未处理并添加超时记录
*/
@Override
public void getIsItTimeout() {
List<AftersalesWorkOrderEntity> aftersalesWorkOrderEntities = baseMapper.selectList(Wrappers.<AftersalesWorkOrderEntity>query().lambda()
.eq(AftersalesWorkOrderEntity::getWorkOrderStatus, WorkOrderStatusConstant.daichuli.getValue())
.eq(AftersalesWorkOrderEntity::getIsDeleted,0)
);
if(!aftersalesWorkOrderEntities.isEmpty()){
List<AftersalesWorkOrderEntity> collect = aftersalesWorkOrderEntities.stream().filter(i -> {
// 获取当前时间
LocalDateTime now = LocalDateTime.now();
// 获取48小时前的时间
LocalDateTime before48Hours = now.minusHours(48);
// 获取48小时前的时间戳(秒数)
long timestamp = before48Hours.toEpochSecond(ZoneOffset.ofHours(8));
long l = i.getCreateTime().getTime() / 1000;
long l1 = timestamp - l;
if (l1 > 0) {
//以超时
return true;
} else {
return false;
}
}).collect(Collectors.toList());
if(!collect.isEmpty()){
collect.forEach(i ->{
//处理超时数据
AftersalesWorkOrderEntity aftersalesWorkOrder = new AftersalesWorkOrderVO();
aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.chaoshiweichuli.getValue());
aftersalesWorkOrder.setId(i.getId());
baseMapper.updateById(aftersalesWorkOrder);
// 假设有两个时间戳(秒数)
long timestamp1 = new Date().getTime() / 1000; // 现在时间
long timestamp2 = i.getCreateTime().getTime() / 1000; // 创建时间
// 将时间戳转换为Instant对象
Instant instant1 = Instant.ofEpochSecond(timestamp1);
Instant instant2 = Instant.ofEpochSecond(timestamp2);
// 计算两个时间戳之间的小时差
Duration duration = Duration.between(instant1, instant2);
long hours = duration.toHours();
//添加超时记录
AftersalesOvertimeFineEntity overtimeFineEntity = new AftersalesOvertimeFineEntity();
overtimeFineEntity.setWorkOrderId(i.getId());
overtimeFineEntity.setMoney(BigDecimal.valueOf(20));
overtimeFineEntity.setTimeout(String.valueOf(hours));
aftersalesOvertimeFineService.save(overtimeFineEntity);
});
}
}
}
/**
* 提交申述工单异常
* @param aftersalesWorkOrderDTO
* @return
*/
@Override
public R getAppealWorkOrder(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
return null;
}

11
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/wrapper/AftersalesWorkOrderWrapper.java

@ -16,10 +16,13 @@
*/
package com.logpm.aftersales.wrapper;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import org.springblade.system.cache.DictBizCache;
import java.util.Objects;
/**
@ -37,6 +40,14 @@ public class AftersalesWorkOrderWrapper extends BaseEntityWrapper<AftersalesWork
@Override
public AftersalesWorkOrderVO entityVO(AftersalesWorkOrderEntity aftersalesWorkOrder) {
AftersalesWorkOrderVO aftersalesWorkOrderVO = Objects.requireNonNull(BeanUtil.copy(aftersalesWorkOrder, AftersalesWorkOrderVO.class));
aftersalesWorkOrderVO.setWorkOrderTypeName(DictBizCache.getValue(DictBizConstant.PC_WORK_ORDER,aftersalesWorkOrderVO.getWorkOrderStatus()));
if("PC".equals(aftersalesWorkOrderVO.getInitiationIdentification())){
//PC
aftersalesWorkOrderVO.setDiscoveryNodeName(DictBizCache.getValue(DictBizConstant.PC_DISCOVERY_NODE,aftersalesWorkOrderVO.getDiscoveryNode()));
}else{
//PDA
aftersalesWorkOrderVO.setDiscoveryNodeName(DictBizCache.getValue(DictBizConstant.PDA_LINK_LNITIATION,aftersalesWorkOrderVO.getDiscoveryNode()));
}
//User createUser = UserCache.getUser(aftersalesWorkOrder.getCreateUser());
//User updateUser = UserCache.getUser(aftersalesWorkOrder.getUpdateUser());

152
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -28,6 +28,7 @@ import org.springblade.common.constant.Inventory.InventorySigningStatusConstant;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant;
import org.springblade.common.constant.delivery.DeliveryStatusConstant;
import org.springblade.common.constant.loading.LoadingStatusConstant;
import org.springblade.common.constant.order.OrderReservationStatusConstant;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.order.OrderStockupStatusConstant;
@ -36,6 +37,7 @@ import org.springblade.common.constant.orderpackage.OrderPackageReservationStatu
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.reservation.*;
import org.springblade.common.constant.signing.SignforStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.utils.Func;
@ -61,6 +63,7 @@ import java.util.stream.Collectors;
public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
private final DistributionLoadscanMapper distributionLoadscanMapper;
private final DistributionLoadscaninvnMapper distributionLoadscaninvnMapper;
private final IDistributionStockArticleService distributionStockArticleService;
private final DistributionStockMapper distributionStockService;
private final DistributionStockListMapper distributionStockListMapper;
@ -457,103 +460,138 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
.ne(DisStockListDetailEntity::getStockPackageStatus, InventoryPackageStatusConstant.quxiao.getValue()));
boolean inventoryLoadingFlag = list.stream().allMatch(l -> l.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue()));
boolean inventorySigningFlag = list.stream().allMatch(l -> l.getStockSignfoStatus().equals(InventorySigningStatusConstant.yiqianshou.getValue()));
List<DistributionReservationStocklistEntity> reservationStockarticleEntityList = distributionReservationStocklistMapper.selectList(Wrappers.<DistributionReservationStocklistEntity>query().lambda()
List<DistributionReservationStocklistEntity> reservationStocklistEntityList = distributionReservationStocklistMapper.selectList(Wrappers.<DistributionReservationStocklistEntity>query().lambda()
.eq(DistributionReservationStocklistEntity::getReservationId, loadingInventoryDetail.getReservationId())
.eq(DistributionReservationStocklistEntity::getStocklistId, loadingInventoryDetail.getStockListId())
.ne(DistributionReservationStocklistEntity::getStockListStatus, ReservationInventoryStatusConstant.quxiao.getValue()));
if (reservationStockarticleEntityList.size() == 1) {
if (reservationStocklistEntityList.size() == 1) {
//修改状态
DistributionReservationStocklistEntity reservationStockarticleEntity = reservationStockarticleEntityList.get(0);
DistributionReservationStocklistEntity reservationStocklistEntity = reservationStocklistEntityList.get(0);
if (inventoryLoadingFlag) {
//查询出库存品进行全部状态的变更
reservationStockarticleEntity.setLoadingStatus(ReservationInventoryLoadingStatusConstant.yizhuangche.getValue());
reservationStocklistEntity.setLoadingStatus(ReservationInventoryLoadingStatusConstant.yizhuangche.getValue());
} else {
inventoryLoadingFlag = list.stream().allMatch(l -> l.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue()));
if (inventoryLoadingFlag) {
reservationStockarticleEntity.setLoadingStatus(ReservationInventoryLoadingStatusConstant.weizhuangche.getValue());
reservationStocklistEntity.setLoadingStatus(ReservationInventoryLoadingStatusConstant.weizhuangche.getValue());
} else {
reservationStockarticleEntity.setLoadingStatus(ReservationInventoryLoadingStatusConstant.bufenzhuangche.getValue());
reservationStocklistEntity.setLoadingStatus(ReservationInventoryLoadingStatusConstant.bufenzhuangche.getValue());
}
}
if (inventorySigningFlag) {
//查询出库存品进行全部状态的变更
reservationStockarticleEntity.setSigningStatus(ReservationInventorySigningStatusConstant.yiqianshou.getValue());
reservationStocklistEntity.setSigningStatus(ReservationInventorySigningStatusConstant.yiqianshou.getValue());
} else {
inventorySigningFlag = list.stream().allMatch(l -> l.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue()));
if (inventorySigningFlag) {
reservationStockarticleEntity.setSigningStatus(ReservationInventorySigningStatusConstant.weiqianshou.getValue());
reservationStocklistEntity.setSigningStatus(ReservationInventorySigningStatusConstant.weiqianshou.getValue());
} else {
reservationStockarticleEntity.setSigningStatus(ReservationInventorySigningStatusConstant.bufenqianshou.getValue());
reservationStocklistEntity.setSigningStatus(ReservationInventorySigningStatusConstant.bufenqianshou.getValue());
}
}
distributionReservationStocklistMapper.updateById(reservationStockarticleEntity);
distributionReservationStocklistMapper.updateById(reservationStocklistEntity);
} else {
log.error("####库存品记录错误+{" + reservationStockarticleEntityList + "}");
log.error("####库存品记录错误+{" + reservationStocklistEntityList + "}");
return;
}
}
//查询出这个预约下的包件信息和库存品信息分别进行判断是否都完成装车
List<DistributionReservationEntity> reservationEntityList = distributionDeliveryListMapper.selectReservationByDeliveryListId(deliveryId);
reservationEntityList.forEach(r -> {
//查询预约下的所有包件信息
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageListByReservationId(r.getId());
boolean reservationLoadingFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue()));
List<DistributionReservationStocklistEntity> distributionReservationStocklistEntities = distributionReservationStocklistMapper.selectList(Wrappers.<DistributionReservationStocklistEntity>query().lambda()
.eq(DistributionReservationStocklistEntity::getReservationId, r.getId())
.ne(DistributionReservationStocklistEntity::getStockListStatus, ReservationInventoryStatusConstant.quxiao.getValue()));
boolean inventoryLoadingFlag = distributionReservationStocklistEntities.stream().allMatch(i -> i.getLoadingStatus().equals(ReservationInventoryLoadingStatusConstant.yizhuangche.getValue()));
if (reservationLoadingFlag && inventoryLoadingFlag) {
int reservationTotal = r.getReservationNum() + r.getReservationStockListNum();
//查询此预约的包件装车数和库存品装车数
Integer loadingNum = 0;
Integer signNum = 0;
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanMapper.selectList(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getReservationId, r.getId())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(loadscanEntityList)){
loadingNum += loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum();
signNum += loadscanEntityList.stream().filter(l->l.getSignforState().equals(SignforStatusConstant.yiqianshou.getValue())).mapToInt(DistributionLoadscanEntity::getReceivedQuantity).sum();
}
List<DistributionLoadscaninvnEntity> loadscaninvnEntityList = distributionLoadscaninvnMapper.selectList(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
.eq(DistributionLoadscaninvnEntity::getReservationId, r.getId())
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(loadscanEntityList)){
loadingNum += loadscaninvnEntityList.stream().mapToInt(DistributionLoadscaninvnEntity::getLoadedNub).sum();
signNum += loadscaninvnEntityList.stream().filter(l->l.getSignforState().equals(SignforStatusConstant.yiqianshou.getValue())).mapToInt(DistributionLoadscaninvnEntity::getReceivedQuantity).sum();
}
if (loadingNum == reservationTotal){
r.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
} else {
reservationLoadingFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue()));
inventoryLoadingFlag = distributionReservationStocklistEntities.stream().allMatch(i -> i.getLoadingStatus().equals(ReservationInventoryLoadingStatusConstant.weizhuangche.getValue()));
if (reservationLoadingFlag && inventoryLoadingFlag) {
r.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue());
} else {
r.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue());
}
}else {
r.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue());
}
boolean inventorySigningFlag = distributionReservationStocklistEntities.stream().allMatch(i -> i.getSigningStatus().equals(ReservationInventorySigningStatusConstant.yiqianshou.getValue()));
boolean reservationSigningFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue()));
if (inventorySigningFlag && reservationSigningFlag) {
r.setSigningStatus(ReservationSigningStatusConstant.yiqianshou.getValue());
} else {
inventorySigningFlag = distributionReservationStocklistEntities.stream().allMatch(i -> !i.getSigningStatus().equals(ReservationInventorySigningStatusConstant.yiqianshou.getValue()));
reservationSigningFlag = parcelListEntities.stream().allMatch(p -> !p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue()));
if (inventorySigningFlag && reservationSigningFlag) {
r.setSigningStatus(ReservationSigningStatusConstant.daiqianshou.getValue());
} else {
r.setSigningStatus(ReservationSigningStatusConstant.bufenqianshou.getValue());
}
if (signNum == reservationTotal){
r.setSigningStatus(ReservationSigningStatusConstant.yiqianshou.getValue());
}else {
r.setSigningStatus(ReservationSigningStatusConstant.bufenqianshou.getValue());
}
// //查询预约下的所有包件信息
// List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageListByReservationId(r.getId());
// boolean reservationLoadingFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue()));
// List<DistributionReservationStocklistEntity> distributionReservationStocklistEntities = distributionReservationStocklistMapper.selectList(Wrappers.<DistributionReservationStocklistEntity>query().lambda()
// .eq(DistributionReservationStocklistEntity::getReservationId, r.getId())
// .ne(DistributionReservationStocklistEntity::getStockListStatus, ReservationInventoryStatusConstant.quxiao.getValue()));
// boolean inventoryLoadingFlag = distributionReservationStocklistEntities.stream().allMatch(i -> i.getLoadingStatus().equals(ReservationInventoryLoadingStatusConstant.yizhuangche.getValue()));
// if (reservationLoadingFlag && inventoryLoadingFlag) {
// r.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
// } else {
// reservationLoadingFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue()));
// inventoryLoadingFlag = distributionReservationStocklistEntities.stream().allMatch(i -> i.getLoadingStatus().equals(ReservationInventoryLoadingStatusConstant.weizhuangche.getValue()));
// if (reservationLoadingFlag && inventoryLoadingFlag) {
// r.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue());
// } else {
// r.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue());
// }
// }
// boolean inventorySigningFlag = distributionReservationStocklistEntities.stream().allMatch(i -> i.getSigningStatus().equals(ReservationInventorySigningStatusConstant.yiqianshou.getValue()));
// boolean reservationSigningFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue()));
// if (inventorySigningFlag && reservationSigningFlag) {
// r.setSigningStatus(ReservationSigningStatusConstant.yiqianshou.getValue());
// } else {
// inventorySigningFlag = distributionReservationStocklistEntities.stream().allMatch(i -> !i.getSigningStatus().equals(ReservationInventorySigningStatusConstant.yiqianshou.getValue()));
// reservationSigningFlag = parcelListEntities.stream().allMatch(p -> !p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue()));
// if (inventorySigningFlag && reservationSigningFlag) {
// r.setSigningStatus(ReservationSigningStatusConstant.daiqianshou.getValue());
//
// } else {
// r.setSigningStatus(ReservationSigningStatusConstant.bufenqianshou.getValue());
// }
// }
distributionReservationMapper.updateById(r);
});
List<DistributionParcelListEntity> deliveryParcelListEntityList = distributionDeliveryListMapper.selectPackageListByDeliveryListId(deliveryId);
List<DisStockListDetailEntity> detailEntities = distributionDeliveryListMapper.selectInventoryListByDeliveryListId(deliveryId);
boolean deliveryLoadingFlag = deliveryParcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
boolean deliveryInventoryLoadingFlag = detailEntities.stream().allMatch(i -> i.getStockLockingStatus().equals(ReservationInventoryLoadingStatusConstant.yizhuangche.getValue()));
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListMapper.selectOne(Wrappers.<DistributionDeliveryListEntity>query().lambda().eq(DistributionDeliveryListEntity::getId, deliveryId));
if (deliveryLoadingFlag && deliveryInventoryLoadingFlag) {
deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.yizhuangche.getValue());
} else {
deliveryLoadingFlag = deliveryParcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue()));
deliveryInventoryLoadingFlag = detailEntities.stream().allMatch(i -> i.getStockLockingStatus().equals(ReservationInventoryLoadingStatusConstant.weizhuangche.getValue()));
if (deliveryLoadingFlag && deliveryInventoryLoadingFlag) {
deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue());
} else {
deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.bunfenzhuangche.getValue());
}
Integer delivertTotal = deliveryListEntity.getDeliveryNumber();
Integer deliverySigningNum = 0 ;
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanMapper.selectList(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, deliveryListEntity.getId())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(loadscanEntityList)){
deliverySigningNum += loadscanEntityList.stream().filter(l->l.getSignforState().equals(SignforStatusConstant.yiqianshou.getValue())).mapToInt(DistributionLoadscanEntity::getReceivedQuantity).sum();
}
boolean deliveryPackageSigningFlag = deliveryParcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
boolean deliveryInventorySigningFlag = detailEntities.stream().allMatch(i -> i.getStockLockingStatus().equals(ReservationInventoryLoadingStatusConstant.yizhuangche.getValue()));
if (deliveryPackageSigningFlag && deliveryInventorySigningFlag) {
List<DistributionLoadscaninvnEntity> loadscaninvnEntityList = distributionLoadscaninvnMapper.selectList(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
.eq(DistributionLoadscaninvnEntity::getDeliveryId, deliveryListEntity.getId())
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(loadscanEntityList)){
deliverySigningNum += loadscaninvnEntityList.stream().filter(l->l.getSignforState().equals(SignforStatusConstant.yiqianshou.getValue())).mapToInt(DistributionLoadscaninvnEntity::getReceivedQuantity).sum();
}
if (deliverySigningNum == delivertTotal){
deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue());
} else {
}else {
deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.peisongzhong.getValue());
}
distributionDeliveryListMapper.updateById(deliveryListEntity);
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -1171,7 +1171,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionDeliveryListEntity.setUnloadingTeamName(stockup.getUnloaderName());
}
distributionDeliveryListEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionDeliveryListEntity.setWarehouseName(String.join(",", warehouseNames));
distributionDeliveryListEntity.setWarehouseName(myCurrentWarehouse.getName());
distributionDeliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.daipeisong.getValue());
distributionDeliveryListEntity.setCustomersNumber(reservationIds.split(",").length);
distributionDeliveryListEntity.setOrderNumber(orderNum.get());
@ -3054,7 +3054,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
mallName.add(i.getMarketName());
}
if (Func.isNotEmpty(i.getMaterialId())) {
mallId.add(i.getMaterialId());
mallId.add(i.getMarketId());
}
if (Func.isNotBlank(i.getOrderCode())) {
orderNumber.add(i.getOrderCode());

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

@ -3031,7 +3031,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isEmpty(ids)){
log.error("#########ids字段缺失:{}",ids);
}
List<File> fileList = new ArrayList<>();
List<Long> signIds = Func.toLongList(",", ids);
List<String> reservationCodes= new ArrayList<>();
List<DistributionSignforEntity> distributionSignforEntities = this.listByIds(signIds);
@ -3061,16 +3060,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//获得压缩后的文件进行前端下载数据推送
File file = FileUtil.getZipFile(fileName);
if (Func.isNotEmpty(file)){
fileList.add(file);
}
if (Func.isNotEmpty(fileList)){
byte[] buffer = new byte[1024 * 1024 * 1024];
FileInputStream fis = null;
BufferedInputStream bis = null;
try {
for (File f : fileList) {
ServletOutputStream os = res.getOutputStream();
fis = new FileInputStream(f);
fis = new FileInputStream(file);
bis = new BufferedInputStream(fis);
// res.setHeader("Content-Length", ""+file.listFiles().length);
// res.setContentType("application/zip;charset=UTF-8");
@ -3080,7 +3075,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
os.write(buffer, 0, i);
i = bis.read(buffer);
}
}
} catch (IOException e) {
log.info("Download failed!");
throw new RuntimeException(e);

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -2869,7 +2869,6 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
incomingBatches.add(warehouseUpdownGoodsEntity.getIncomingBatch());
}
}
}
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -122,6 +122,7 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
String s = "RK" + myCurrentWarehouse.getWarehouseCode() + time;
warehouseWarehousingEntry.setReceiptBatch(s);
warehouseWarehousingEntryDTO.setReceiptBatch(s);
warehouseWarehousingEntryDTO.setWarehouse(myCurrentWarehouse.getName());
}
WarehouseWarehousingEntryEntity entryEntity = new WarehouseWarehousingEntryEntity();
entryEntity.setId(warehouseWarehousingEntryDTO.getId());

Loading…
Cancel
Save