Browse Source

Merge branch 'dev' into pre-production

single_db
pref_mail@163.com 1 year ago
parent
commit
3308dd2d59
  1. 8
      blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
  2. 1
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java
  3. 14
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java
  4. 19
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAppealController.java
  5. 20
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  6. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesAppealDTO.java
  7. 14
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java
  8. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml
  9. 17
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  10. 8
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
  11. 79
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  12. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataVehicleController.java
  13. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
  14. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.java
  15. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.xml
  16. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataVehicleService.java
  17. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java
  18. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  19. 146
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionStockArticleExcel.java
  20. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  21. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  22. 2
      blade-service/logpm-factory/src/main/resources/application-dev.yml
  23. 129
      blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java

8
blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java

@ -41,10 +41,10 @@ public class LauncherServiceImpl implements LauncherService {
PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile)); PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile));
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.username","nacos"); // PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.username","nacos");
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.password","Nacos123123"); // PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.password","Nacos123123");
PropsUtil.setProperty(props, "spring.cloud.nacos.config.username","nacos"); // PropsUtil.setProperty(props, "spring.cloud.nacos.config.username","nacos");
PropsUtil.setProperty(props, "spring.cloud.nacos.config.password","Nacos123123"); // PropsUtil.setProperty(props, "spring.cloud.nacos.config.password","Nacos123123");
PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile)); PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));

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

@ -267,7 +267,6 @@ public class AftersalesWorkOrderEntity extends TenantEntity {
* 仲裁原因 * 仲裁原因
*/ */
@ApiModelProperty(value = "仲裁原因") @ApiModelProperty(value = "仲裁原因")
@TableField(exist = false)
private String reasonArbitration; private String reasonArbitration;
/** /**

14
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java

@ -450,5 +450,17 @@ public class DistributionStockArticleEntity extends TenantEntity {
@ApiModelProperty(value = "配载件数") @ApiModelProperty(value = "配载件数")
private Integer carsLoadNum; private Integer carsLoadNum;
/**
* 未入库数量
*/
@TableField(exist = false)
private Integer unreceivedQuantity;
/**
* 创建用户id和时间
*/
@TableField(exist = false)
private Long createUser;
@TableField(exist = false)
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
private Date createTime;
} }

19
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAppealController.java

@ -70,7 +70,6 @@ import javax.servlet.http.HttpServletResponse;
public class AftersalesAppealController extends BladeController { public class AftersalesAppealController extends BladeController {
private final IAftersalesAppealService aftersalesAppealService; private final IAftersalesAppealService aftersalesAppealService;
private final IAftersalesWorkOrderService aftersalesWorkOrderService;
/** /**
* 异常工单申述表 详情 * 异常工单申述表 详情
@ -147,14 +146,13 @@ public class AftersalesAppealController extends BladeController {
aftersalesAppeal.setProcessedByName(user.getUserName()); aftersalesAppeal.setProcessedByName(user.getUserName());
aftersalesAppeal.setProcessedById(user.getUserId()); aftersalesAppeal.setProcessedById(user.getUserId());
aftersalesAppeal.setProcessedDate(new Date()); aftersalesAppeal.setProcessedDate(new Date());
if(ObjectUtils.isNotNull(aftersalesAppeal.getTypesOf()) && "3".equals(aftersalesAppeal.getTypesOf())){ // if(ObjectUtils.isNotNull(aftersalesAppeal.getTypesOf()) && "3".equals(aftersalesAppeal.getTypesOf())){
//取消订单申述 // //取消订单申述
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); // AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(aftersalesAppeal.getWorkOrderId()); // workOrderEntity.setId(aftersalesAppeal.getWorkOrderId());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue()); // workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue());
aftersalesWorkOrderService.updateById(workOrderEntity); // aftersalesWorkOrderService.updateById(workOrderEntity);
} // }
return R.status(aftersalesAppealService.updateById(aftersalesAppeal)); return R.status(aftersalesAppealService.updateById(aftersalesAppeal));
} }
@ -179,6 +177,9 @@ public class AftersalesAppealController extends BladeController {
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
if(ObjectUtils.isNull(ids)){
throw new ServiceException("ids 参数不能为空!!");
}
return R.status(aftersalesAppealService.deleteLogic(Func.toLongList(ids))); return R.status(aftersalesAppealService.deleteLogic(Func.toLongList(ids)));
} }

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

@ -19,6 +19,7 @@ package com.logpm.aftersales.controller;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO; import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.AftersaleSurveyRecordEntity; import com.logpm.aftersales.entity.AftersaleSurveyRecordEntity;
import com.logpm.aftersales.entity.AftersalesAppealEntity;
import com.logpm.aftersales.entity.AftersalesSettlementEntity; import com.logpm.aftersales.entity.AftersalesSettlementEntity;
import com.logpm.aftersales.excel.AftersalesWorkOrderImporter; import com.logpm.aftersales.excel.AftersalesWorkOrderImporter;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
@ -32,6 +33,7 @@ import lombok.AllArgsConstructor;
import javax.validation.Valid; import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
@ -54,6 +56,7 @@ import org.springblade.core.excel.util.ExcelUtil;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import java.util.Date;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -333,6 +336,22 @@ public class AftersalesWorkOrderController extends BladeController {
return R.status(aftersalesWorkOrderService.updateCompletionEnd(aftersalesWorkOrder)); return R.status(aftersalesWorkOrderService.updateCompletionEnd(aftersalesWorkOrder));
} }
/**
* 异常工单申述表状态 修改
*/
@PostMapping("/updateAppeal")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入aftersalesAppeal")
public R update(@Valid @RequestBody AftersalesAppealEntity aftersalesAppeal) {
log.info("客服操作确定修改》》》》{}",aftersalesAppeal);
if(ObjectUtils.isNull(aftersalesAppeal.getId())){
throw new ServiceException("申述ID不能为空!!");
}
if(ObjectUtils.isNull(aftersalesAppeal.getWorkOrderId())){
throw new ServiceException("异常工单ID不能为空!!");
}
return R.status(aftersalesWorkOrderService.updateByIdAppel(aftersalesAppeal));
}
/** /**
* 客服异常工单 查询处理结果全部信息数据 * 客服异常工单 查询处理结果全部信息数据
@ -399,7 +418,6 @@ public class AftersalesWorkOrderController extends BladeController {
if(aftersalesWorkOrder.getAssignList().isEmpty()){ if(aftersalesWorkOrder.getAssignList().isEmpty()){
throw new ServiceException("确定工单ID不能为空!!"); throw new ServiceException("确定工单ID不能为空!!");
} }
return R.status( aftersalesWorkOrderService.updateManagerConfirmed(aftersalesWorkOrder) ); return R.status( aftersalesWorkOrderService.updateManagerConfirmed(aftersalesWorkOrder) );
} }

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

@ -57,5 +57,10 @@ public class AftersalesAppealDTO extends AftersalesAppealEntity {
* 发现节点 * 发现节点
*/ */
private String discoveryNode; private String discoveryNode;
/**
* 标识 1 仓库 2 总部客服
*/
private String identifying;
} }

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

@ -111,12 +111,14 @@ public class AftersalesWorkOrderDTO extends AftersalesWorkOrderEntity {
* 配送任务Id * 配送任务Id
*/ */
private Long deliveryId; private Long deliveryId;
/**
* 申述完结变动标识 1 申述成立
*/
private String typesOf;
/**
* 申述Id
*/
private Long appealId;
} }

6
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml

@ -55,9 +55,8 @@
logpm_aftersales_appeal laa logpm_aftersales_appeal laa
LEFT JOIN logpm_aftersales_completion_record lacr on laa.work_order_id = lacr.work_order_id LEFT JOIN logpm_aftersales_completion_record lacr on laa.work_order_id = lacr.work_order_id
LEFT JOIN logpm_aftersales_work_order lawo ON lawo.id = lacr.work_order_id LEFT JOIN logpm_aftersales_work_order lawo ON lawo.id = lacr.work_order_id
<where> <where> laa.is_deleted = 0
<if test="param.warehouseId != null and param.warehouseId != '' "> and lacr.warehouse_id = #{param.warehouseId } </if> <if test="param.warehouseId != null and param.warehouseId != '' "> and lacr.warehouse_id = #{param.warehouseId } </if>
<if test="param.appealPeopleName != null and param.appealPeopleName != ''">and laa.appeal_people_name = #{param.appealPeopleName}</if> <if test="param.appealPeopleName != null and param.appealPeopleName != ''">and laa.appeal_people_name = #{param.appealPeopleName}</if>
<if test="param.claimant != null and param.claimant != ''">and laa.claimant = #{param.claimant}</if> <if test="param.claimant != null and param.claimant != ''">and laa.claimant = #{param.claimant}</if>
<if test="param.workOrderNumber != null and param.workOrderNumber != ''">and lawo.work_order_number = #{param.workOrderNumber}</if> <if test="param.workOrderNumber != null and param.workOrderNumber != ''">and lawo.work_order_number = #{param.workOrderNumber}</if>
@ -66,7 +65,10 @@
<if test="param.workOrderType != null and param.workOrderType != ''">and lawo.work_order_type = #{param.workOrderType}</if> <if test="param.workOrderType != null and param.workOrderType != ''">and lawo.work_order_type = #{param.workOrderType}</if>
<if test="param.discoveryNode != null and param.discoveryNode != ''">and lawo.discovery_node = #{param.discoveryNode}</if> <if test="param.discoveryNode != null and param.discoveryNode != ''">and lawo.discovery_node = #{param.discoveryNode}</if>
<if test="param.typesOf != null and param.typesOf != ''">and laa.types_of = #{param.typesOf}</if> <if test="param.typesOf != null and param.typesOf != ''">and laa.types_of = #{param.typesOf}</if>
<if test="param.identifying != null and param.identifying == 1 "> and laa.types_of in ('0','1','2','3') </if>
<if test="param.identifying != null and param.identifying == 2 "> and laa.types_of in ('0','1','2') </if>
</where> </where>
Order by laa.create_time desc
</select> </select>
</mapper> </mapper>

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

@ -81,10 +81,8 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test="param.overTime != null and param.overTime != '' ">and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if> <if test="param.overTime != null and param.overTime != '' ">and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test="param.waybillMall != null and param.waybillMall != '' ">and lawo.waybill_mall = #{param.waybillMall } </if> <if test="param.waybillMall != null and param.waybillMall != '' ">and lawo.waybill_mall = #{param.waybillMall } </if>
<if test="param.deliveryDriver != null and param.deliveryDriver != '' ">and lawo.delivery_driver = #{param.deliveryDriver } </if> <if test="param.deliveryDriver != null and param.deliveryDriver != '' ">and lawo.delivery_driver = #{param.deliveryDriver } </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != '' ">and lawo.work_order_status in( #{param.workOrderStatus }) </if> <if test="param.customerServiceState != null and param.customerServiceState == 30 "> and lawo.work_order_status in ('30','40') </if>
<if test="param.customerServiceState != null and param.customerServiceState != '' "> and lawo.work_order_status in ('30','40') </if>
<if test="param.handleStatus!= null and param.handleStatus == 30">and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} </if>
<if test="param.handleStatus!= null and param.handleStatus == 20 ">or lawo.work_order_status in (80,100) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} </if>
<if test="param.customerServiceId != null and param.customerServiceId != '' ">and lawo.customer_service_id = #{param.customerServiceId } </if> <if test="param.customerServiceId != null and param.customerServiceId != '' ">and lawo.customer_service_id = #{param.customerServiceId } </if>
<if test="param.customerServiceName != null and param.customerServiceName != '' ">and lawo.customer_service_name = #{param.customerServiceName } </if> <if test="param.customerServiceName != null and param.customerServiceName != '' ">and lawo.customer_service_name = #{param.customerServiceName } </if>
<if test="param.waybillMallId != null and param.waybillMallId != '' ">and lawo.waybill_mall_id = #{param.waybillMallId } </if> <if test="param.waybillMallId != null and param.waybillMallId != '' ">and lawo.waybill_mall_id = #{param.waybillMallId } </if>
@ -98,9 +96,18 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test="param.processedBy != null and param.processedBy != '' ">and lawo.processed_by = #{param.processedBy} </if> <if test="param.processedBy != null and param.processedBy != '' ">and lawo.processed_by = #{param.processedBy} </if>
<if test="param.investigationProcess != null and param.investigationProcess != '' ">and lawo.investigation_process = #{param.investigationProcess } </if> <if test="param.investigationProcess != null and param.investigationProcess != '' ">and lawo.investigation_process = #{param.investigationProcess } </if>
<if test="param.relatedWorkOrdersId != null and param.relatedWorkOrdersId != '' ">and lawo.related_work_orders_id = #{param.relatedWorkOrdersId } </if> <if test="param.relatedWorkOrdersId != null and param.relatedWorkOrdersId != '' ">and lawo.related_work_orders_id = #{param.relatedWorkOrdersId } </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.customerServiceState == 10 ">and lawo.work_order_status in( #{param.workOrderStatus }) </if>
<if test="param.customerIdentification != null and param.customerIdentification == 1 "> <if test="param.customerIdentification != null and param.customerIdentification == 1 ">
and lawo.work_order_status in ('10','20','30','40','50','60','70','80','90') and lawo.work_order_status IN ( '10', '20', '21', '30', '40', '50', '60', '70', '80', '90' ,'100','110')
</if> </if>
<if test="param.handleStatus!= null and param.handleStatus == 30">and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} </if>
<if test="param.handleStatus!= null and param.handleStatus == 10 ">and lawo.warehouse_id = #{param.warehouseId} </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.customerServiceState == null ">and lawo.work_order_status in( #{param.workOrderStatus }) </if>
or 1 = 1
<if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.customerServiceState == null "> and lawo.work_order_status in ( #{param.workOrderStatus }) and lap.types_of = '2' and lap.business_id = #{param.warehouseId} </if>
<if test="param.handleStatus!= null and param.handleStatus == 10 ">and lap.types_of = '2' and lap.business_id = #{param.warehouseId} </if>
<if test="param.handleStatus!= null and param.handleStatus == 30">and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} </if>
<if test="param.handleStatus!= null and param.handleStatus == 20 ">and lawo.work_order_status in (80,100) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} </if>
ORDER BY lawo.create_time DESC ORDER BY lawo.create_time DESC
</where> </where>

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

@ -18,6 +18,7 @@ package com.logpm.aftersales.service;
import com.logpm.aftersales.dto.AftersalesPackageScanDTO; import com.logpm.aftersales.dto.AftersalesPackageScanDTO;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO; import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.AftersalesAppealEntity;
import com.logpm.aftersales.entity.AftersalesSettlementEntity; import com.logpm.aftersales.entity.AftersalesSettlementEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity; import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO; import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
@ -265,4 +266,11 @@ public interface IAftersalesWorkOrderService extends BaseService<AftersalesWorkO
* @return * @return
*/ */
boolean updateManagerConfirmed(AftersalesWorkOrderDTO aftersalesWorkOrder); boolean updateManagerConfirmed(AftersalesWorkOrderDTO aftersalesWorkOrder);
/**
* 修改申述状态
* @param aftersalesAppeal
* @return
*/
boolean updateByIdAppel(AftersalesAppealEntity aftersalesAppeal);
} }

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

@ -30,6 +30,7 @@ import com.logpm.aftersales.dto.AftersaleSurveyRecordDTO;
import com.logpm.aftersales.dto.AftersalesPersonResponsibleDTO; import com.logpm.aftersales.dto.AftersalesPersonResponsibleDTO;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO; import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.*; import com.logpm.aftersales.entity.*;
import com.logpm.aftersales.mapper.AftersalesAppealMapper;
import com.logpm.aftersales.service.*; import com.logpm.aftersales.service.*;
import com.logpm.aftersales.vo.*; import com.logpm.aftersales.vo.*;
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel; import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
@ -57,6 +58,7 @@ import org.springblade.system.entity.DictBiz;
import org.springblade.system.entity.User; import org.springblade.system.entity.User;
import org.springblade.system.feign.ISysClient; import org.springblade.system.feign.ISysClient;
import org.springblade.system.feign.IUserSearchClient; import org.springblade.system.feign.IUserSearchClient;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -100,6 +102,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
private final IDistributionDeliveryListClient distributionDeliveryListClient; private final IDistributionDeliveryListClient distributionDeliveryListClient;
private final IAftersalesCustomerMallService aftersalesCustomerMallService; private final IAftersalesCustomerMallService aftersalesCustomerMallService;
private final AftersalesAppealMapper aftersalesAppealService;
private final ISysClient sysClient; private final ISysClient sysClient;
@ -567,14 +571,16 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
Object workOrderStatus = aftersalesWorkOrder.get("workOrderStatus"); Object workOrderStatus = aftersalesWorkOrder.get("workOrderStatus");
switch (dictValue){ switch (dictValue){
case "1": //客服经理 查询全部待处理工单 case "1": //客服经理 查询全部待处理工单
//待处理
if( ObjectUtils.isNotNull( workOrderStatus ) && "500".equals(workOrderStatus)){ if( ObjectUtils.isNotNull( workOrderStatus ) && "500".equals(workOrderStatus)){
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("customerServiceState","30"); aftersalesWorkOrder.put("customerServiceState","30");
}else{ }else if(ObjectUtils.isNotNull( workOrderStatus ) && WorkOrderStatusConstant.yiwanjei.getValue().equals(workOrderStatus)) {
aftersalesWorkOrder.put("customerServiceState","10");
}else if( ObjectUtils.isNull( workOrderStatus ) ){
aftersalesWorkOrder.put("customerIdentification", "1"); aftersalesWorkOrder.put("customerIdentification", "1");
} }
break; break;
case "2": // 营业部客服 case "2": // 营业部客服
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
@ -583,14 +589,21 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}else{ }else{
throw new ServiceException("请选择仓库!"); throw new ServiceException("请选择仓库!");
} }
//已处理
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yichuli.getValue())){ if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yichuli.getValue())){
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("handleStatus","30"); aftersalesWorkOrder.put("handleStatus","30");
} }
//已完结
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())){ if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())){
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("handleStatus","20"); aftersalesWorkOrder.put("handleStatus","20");
} }
//全部
if(ObjectUtils.isNotNull(workOrderStatus) && "1000".equals(workOrderStatus)){
aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("handleStatus","10");
}
// if( ObjectUtils.isNull(workOrderStatus)){ // if( ObjectUtils.isNull(workOrderStatus)){
// aftersalesWorkOrder.put("handleStatus","10"); // aftersalesWorkOrder.put("handleStatus","10");
// } // }
@ -1604,6 +1617,19 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
*/ */
@Override @Override
public boolean updateCompletionEnd(AftersalesWorkOrderDTO aftersalesWorkOrder) { public boolean updateCompletionEnd(AftersalesWorkOrderDTO aftersalesWorkOrder) {
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getTypesOf()) && "1".equals(aftersalesWorkOrder.getTypesOf())){
//查询是否已处理
AftersalesAppealEntity aftersalesAppealEntity1 = aftersalesAppealService.selectById(aftersalesWorkOrder.getAppealId());
if("0".equals(aftersalesAppealEntity1.getTypesOf())){
//修改申述成立
AftersalesAppealEntity aftersalesAppealEntity = new AftersalesAppealEntity();
aftersalesAppealEntity.setId(aftersalesWorkOrder.getAppealId());
aftersalesAppealEntity.setTypesOf("1");
aftersalesAppealService.updateById(aftersalesAppealEntity);
}else{
throw new ServiceException("已处理!");
}
}
//异常工单完结处理结果赔款方 //异常工单完结处理结果赔款方
if(!aftersalesWorkOrder.getCompletionRecordEntities().isEmpty()){ if(!aftersalesWorkOrder.getCompletionRecordEntities().isEmpty()){
@ -1612,7 +1638,9 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
.eq(AftersalesCompletionRecordEntity::getWorkOrderId, aftersalesWorkOrder.getId()) .eq(AftersalesCompletionRecordEntity::getWorkOrderId, aftersalesWorkOrder.getId())
); );
List<Long> collect = list.stream().map(AftersalesCompletionRecordEntity::getId).collect(Collectors.toList()); List<Long> collect = list.stream().map(AftersalesCompletionRecordEntity::getId).collect(Collectors.toList());
completionRecordService.deleteLogic(collect); if(!collect.isEmpty()){
completionRecordService.deleteLogic(collect);
}
completionRecordService.saveBatch(aftersalesWorkOrder.getCompletionRecordEntities()); completionRecordService.saveBatch(aftersalesWorkOrder.getCompletionRecordEntities());
} }
//异常工单完结处理结果受款方 //异常工单完结处理结果受款方
@ -1621,11 +1649,26 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
.eq(AftersalesCompletionRecipientEntity::getWorkOrderId, aftersalesWorkOrder.getId()) .eq(AftersalesCompletionRecipientEntity::getWorkOrderId, aftersalesWorkOrder.getId())
); );
List<Long> collect = list.stream().map(AftersalesCompletionRecipientEntity::getId).collect(Collectors.toList()); List<Long> collect = list.stream().map(AftersalesCompletionRecipientEntity::getId).collect(Collectors.toList());
completionRecipientService.deleteLogic(collect); if(!collect.isEmpty()){
completionRecipientService.deleteLogic(collect);
}
completionRecipientService.saveBatch(aftersalesWorkOrder.getCompletionRecipientEntities()); completionRecipientService.saveBatch(aftersalesWorkOrder.getCompletionRecipientEntities());
}
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getReasonArbitration())){
workOrderEntity.setId(aftersalesWorkOrder.getId());
workOrderEntity.setReasonArbitration(aftersalesWorkOrder.getReasonArbitration());
} }
return true; //修改工单状态
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getTypesOf())){
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue());
return baseMapper.updateById(workOrderEntity) > 0;
} else {
return true;
}
} }
/** /**
@ -1752,7 +1795,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
//金额大于0 //金额大于0
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue()); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue());
}else{ }else{
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue()); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.lipeijineweichu.getValue());
} }
baseMapper.updateById(workOrderEntity); baseMapper.updateById(workOrderEntity);
//修改未回复的处理方改为 6 //修改未回复的处理方改为 6
@ -1784,6 +1827,28 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
return true; return true;
} }
/**
* 修改申述状态数据
* @param aftersalesAppeal
* @return
*/
@Override
public boolean updateByIdAppel(AftersalesAppealEntity aftersalesAppeal) {
BladeUser user = AuthUtil.getUser();
aftersalesAppeal.setProcessedByName(user.getUserName());
aftersalesAppeal.setProcessedById(user.getUserId());
aftersalesAppeal.setProcessedDate(new Date());
if(ObjectUtils.isNotNull(aftersalesAppeal.getTypesOf()) && "3".equals(aftersalesAppeal.getTypesOf())){
//取消订单申述
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(aftersalesAppeal.getWorkOrderId());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue());
baseMapper.updateById(workOrderEntity);
}
return aftersalesAppealService.updateById(aftersalesAppeal) > 0;
}
/** /**
* 添加处理处理方信息 * 添加处理处理方信息
* @param aftersalesWorkOrderDTO * @param aftersalesWorkOrderDTO

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataVehicleController.java

@ -33,6 +33,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
@ -126,8 +127,12 @@ public class BasicdataVehicleController extends BladeController {
@GetMapping("/dictionary") @GetMapping("/dictionary")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "车辆信息表",notes = "传入code") @ApiOperation(value = "车辆信息表",notes = "传入code")
public R<List<BasicdataVehicleVO>> dictionary() { public R<List<BasicdataVehicleVO>> dictionary(@RequestParam(value = "vehicleNub",required = false) String vehicleNub) {
List<BasicdataVehicleVO> dictionary = basicdataVehicleService.selectBasicdataVehicleDictionary();
log.info(">>>>112 {}",vehicleNub);
List<BasicdataVehicleVO> dictionary = basicdataVehicleService.selectBasicdataVehicleDictionary(vehicleNub);
return R.data(dictionary); return R.data(dictionary);
} }

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java

@ -151,7 +151,8 @@ public class BasicdataWarehouseController extends BladeController {
@GetMapping("/listName") @GetMapping("/listName")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入warehouseWarehouse") @ApiOperation(value = "分页", notes = "传入warehouseWarehouse")
public R<List<BasicdataWarehouseEntity>> listName(String name) { public R<List<BasicdataWarehouseEntity>> listName(@RequestParam("name") String name) {
log.info(">>>>>>>>>>>>>传入warehouseWarehouse name {}",name);
List<BasicdataWarehouseEntity> pages = warehouseService.pageListName(name); List<BasicdataWarehouseEntity> pages = warehouseService.pageListName(name);
return R.data(pages); return R.data(pages);
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.java

@ -59,7 +59,7 @@ public interface BasicdataVehicleMapper extends BaseMapper<BasicdataVehicleEntit
* *
* @return * @return
*/ */
List<BasicdataVehicleVO> selectBasicdataDictionary(); List<BasicdataVehicleVO> selectBasicdataDictionary(@Param("vehicleNub") String vehicleNub);
List<BasicdataVehicleEntity> findCarListByName(@Param("carNumber") String carNumber); List<BasicdataVehicleEntity> findCarListByName(@Param("carNumber") String carNumber);
} }

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.xml

@ -176,6 +176,9 @@
</select> </select>
<select id="selectBasicdataDictionary" resultType="com.logpm.basicdata.vo.BasicdataVehicleVO"> <select id="selectBasicdataDictionary" resultType="com.logpm.basicdata.vo.BasicdataVehicleVO">
select id,vehicle_nub,vehicle_owner from logpm_basicdata_vehicle where is_deleted = 0 select id,vehicle_nub,vehicle_owner from logpm_basicdata_vehicle where is_deleted = 0
<if test="vehicleNub!=null">
and vehicle_nub like concat('%',#{vehicleNub},'%')
</if>
</select> </select>
<select id="findCarListByName" resultType="com.logpm.basicdata.entity.BasicdataVehicleEntity"> <select id="findCarListByName" resultType="com.logpm.basicdata.entity.BasicdataVehicleEntity">
select * select *

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataVehicleService.java

@ -65,7 +65,7 @@ public interface IBasicdataVehicleService extends BaseService<BasicdataVehicleEn
/** /**
* 车辆信息表 字典 * 车辆信息表 字典
*/ */
List<BasicdataVehicleVO> selectBasicdataVehicleDictionary(); List<BasicdataVehicleVO> selectBasicdataVehicleDictionary(String vehicleNub);
/** /**
* 新增关联表 * 新增关联表
*/ */

8
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java

@ -36,6 +36,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
@ -87,8 +88,11 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl<BasicdataVehicl
} }
@Override @Override
public List<BasicdataVehicleVO> selectBasicdataVehicleDictionary() { public List<BasicdataVehicleVO> selectBasicdataVehicleDictionary(String vehicleNub) {
return baseMapper.selectBasicdataDictionary(); if(StringUtil.isBlank(vehicleNub)){
vehicleNub = null;
}
return baseMapper.selectBasicdataDictionary(vehicleNub);
} }
@Override @Override

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java

@ -135,7 +135,7 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
@Override @Override
public List<BasicdataWarehouseEntity> pageListName(String name) { public List<BasicdataWarehouseEntity> pageListName(String name) {
QueryWrapper<BasicdataWarehouseEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<BasicdataWarehouseEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(StringUtils.isNotBlank(name), BasicdataWarehouseEntity::getName, name); queryWrapper.lambda().like(StringUtils.isNotBlank(name), BasicdataWarehouseEntity::getName, name);
return baseMapper.selectList(queryWrapper); return baseMapper.selectList(queryWrapper);
} }

146
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionStockArticleExcel.java

@ -17,13 +17,17 @@
package com.logpm.distribution.excel; package com.logpm.distribution.excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight; import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight; import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@ -40,6 +44,12 @@ import java.util.Date;
public class DistributionStockArticleExcel implements Serializable { public class DistributionStockArticleExcel implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 运单号
*/
@ColumnWidth(20)
@ExcelProperty("运单号")
private String waybillNumber;
/** /**
* 服务号 * 服务号
*/ */
@ -73,8 +83,7 @@ public class DistributionStockArticleExcel implements Serializable {
/** /**
* 仓库 * 仓库
*/ */
@ColumnWidth(20) @ExcelIgnore
@ExcelProperty("仓库编码")
private String warehouseCode; private String warehouseCode;
/** /**
* 入库时间 * 入库时间
@ -82,12 +91,30 @@ public class DistributionStockArticleExcel implements Serializable {
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("入库时间") @ExcelProperty("入库时间")
private Date warehouseEntryTime; private Date warehouseEntryTime;
/**
* 最新入库时间
*/
@ColumnWidth(20)
@ExcelProperty("最新入库时间")
private Date warehouseEntryTimeEnd;
/** /**
* 在库时间 * 在库时间
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("在库时间") @ExcelProperty("在库时间")
private String storeTime; private String storeTime;
/**
* 收货单位
*/
@ColumnWidth(20)
@ExcelProperty("收货单位")
private String consigneeUnit;
/**
* 收货人
*/
@ColumnWidth(20)
@ExcelProperty("收货人")
private String consigneePerson;
/** /**
* 订单总件数 * 订单总件数
*/ */
@ -101,35 +128,105 @@ public class DistributionStockArticleExcel implements Serializable {
@ExcelProperty("在库件数") @ExcelProperty("在库件数")
private Integer handQuantity; private Integer handQuantity;
/** /**
* 是否齐套 * 未入库数量
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("是否齐套") @ExcelProperty("未入库数量")
private String completeSet; private Integer unreceivedQuantity;
/**
* 分拣件数
*/
@ColumnWidth(20)
@ExcelProperty("分拣件数")
private Integer sortingQuantity;
/**
* 配送件数
*/
@ColumnWidth(20)
@ExcelProperty("配送件数")
private Integer deliveryQuantity;
/**
* 中转件数
*/
@ColumnWidth(20)
@ExcelProperty("中转件数")
private Integer transferQuantity;
/**
* 中转件数
*/
@ColumnWidth(20)
@ExcelProperty("签收件数")
private Integer signinQuantity;
/**
* 上架状态
*/
@ColumnWidth(20)
@ExcelProperty("上架状态")
private String groundingStatusName;
/**
* 订单来源
*/
@ColumnWidth(20)
@ExcelProperty("订单来源")
private String resource;
/** /**
* 品牌 * 品牌
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("品牌") @ExcelProperty("品牌")
private String brand; private String brand;
/**
* 所在托盘
*/
@ColumnWidth(20)
@ExcelProperty("所在托盘")
private String trays;
/**
* 冻结状态
*/
@ColumnWidth(20)
@ExcelProperty("冻结状态")
private String freezeStatusName;
/**
* 订单状态
*/
@ColumnWidth(20)
@ExcelProperty("订单状态")
private String orderStatusName;
/**
* 预约状态
*/
@ColumnWidth(20)
@ExcelProperty("预约状态")
private String reservationStatusName;
/**
* 备货状态
*/
@ColumnWidth(20)
@ExcelProperty("备货状态")
private String stockupStatusName;
/**
* 是否齐套
*/
@ColumnWidth(20)
@ExcelProperty("是否齐套")
private String completeSetName;
/** /**
* 服务类型 * 服务类型
*/ */
@ExcelIgnore
private String typeService;
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("服务类型") @ExcelProperty("服务类型")
private String typeService; private String typeServerName;
/** /**
* 顾客名字 * 顾客名字
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("顾客名字") @ExcelProperty("顾客名字")
private String customerName; private String customerName;
/**
* 运单号
*/
@ColumnWidth(20)
@ExcelProperty("运单号")
private String waybillNumber;
/** /**
* 顾客电话 * 顾客电话
*/ */
@ -143,23 +240,30 @@ public class DistributionStockArticleExcel implements Serializable {
@ExcelProperty("顾客地址") @ExcelProperty("顾客地址")
private String customerAddress; private String customerAddress;
/** /**
* 收货人 * 增值服务
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("收货人") @ExcelProperty("增值服务")
private String consigneePerson; private BigDecimal fee;
/** /**
* 收货单位 * 创建人
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("收货单位") @ExcelProperty("创建人")
private String consigneeUnit; private String createUserName;
/** /**
* 订单来源 * 创建时间
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("订单来源") @ExcelProperty("创建时间")
private String resource; private Date createTime;
// /**
// * 配载件数
// */
// @ColumnWidth(20)
// @ExcelProperty("配载件数")
// private Integer carsLoadNum;
/** /**
* 类型;1 预约单 2库存单 * 类型;1 预约单 2库存单
*/ */

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -729,6 +729,7 @@
ldsa.status, ldsa.status,
ldsa.is_deleted, ldsa.is_deleted,
ldsa.create_dept, ldsa.create_dept,
ldsa.incoming_num,
ldsa.reserve1, ldsa.reserve1,
ldsa.reserve2, ldsa.reserve2,
ldsa.reserve3, ldsa.reserve3,
@ -767,7 +768,7 @@
ldsa.rate, ldsa.rate,
ldsa.advance_id, ldsa.advance_id,
ldsa.waybill_id, ldsa.waybill_id,
group_concat(DISTINCT ldpl.waybill_number) as waybillNumber, ldsa.waybill_number AS waybillNumber,
ldsa.consignee_unit, ldsa.consignee_unit,
ldsa.collect_fee, ldsa.collect_fee,
ldsa.storage_fee, ldsa.storage_fee,

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

@ -71,7 +71,9 @@ import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache; import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz; import org.springblade.system.entity.DictBiz;
import org.springblade.system.entity.User;
import org.springblade.system.feign.IDictBizClient; import org.springblade.system.feign.IDictBizClient;
import org.springblade.system.feign.IUserClient;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -125,7 +127,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
private final DistributionParcelNumberMapper distributionParcelNumberMapper; private final DistributionParcelNumberMapper distributionParcelNumberMapper;
private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient; private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient;
private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient; private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient;
private final IUserClient userClient;
@Override @Override
public IPage<DistributionStockArticleVO> selectDistributionStockArticlePage(IPage<DistributionStockArticleVO> page, DistributionStockArticleVO distributionStockArticle) { public IPage<DistributionStockArticleVO> selectDistributionStockArticlePage(IPage<DistributionStockArticleVO> page, DistributionStockArticleVO distributionStockArticle) {
@ -163,11 +165,36 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
List<DistributionStockArticleEntity> list = baseMapper.exportDistributionStockArticle(paramMap, idArr); List<DistributionStockArticleEntity> list = baseMapper.exportDistributionStockArticle(paramMap, idArr);
List<DistributionStockArticleExcel> excelList = new ArrayList<>(); List<DistributionStockArticleExcel> excelList = new ArrayList<>();
list.forEach(li -> { if (list.size()>61){
DistributionStockArticleExcel excel = new DistributionStockArticleExcel(); list.parallelStream().forEach(li -> {
BeanUtil.copyProperties(li,excel); li.setCreateUserName(userClient.userInfoById(li.getCreateUser()).getData().getName());
excelList.add(excel); DistributionStockArticleVO distributionStockArticleVO = DistributionStockArticleWrapper.build().entityVO(li);
}); DistributionStockArticleExcel excel = new DistributionStockArticleExcel();
if (distributionStockArticleVO.getTotalNumber() != null &&
distributionStockArticleVO.getIncomingNum() != null) {
distributionStockArticleVO.setUnreceivedQuantity(
distributionStockArticleVO.getTotalNumber() - distributionStockArticleVO.getIncomingNum()
);
}
BeanUtil.copyProperties(distributionStockArticleVO,excel);
excelList.add(excel);
});
}else {
list.forEach(li -> {
li.setCreateUserName(userClient.userInfoById(li.getCreateUser()).getData().getName());
DistributionStockArticleVO distributionStockArticleVO = DistributionStockArticleWrapper.build().entityVO(li);
DistributionStockArticleExcel excel = new DistributionStockArticleExcel();
if (distributionStockArticleVO.getTotalNumber() != null &&
distributionStockArticleVO.getIncomingNum() != null) {
distributionStockArticleVO.setUnreceivedQuantity(
distributionStockArticleVO.getTotalNumber() - distributionStockArticleVO.getIncomingNum()
);
}
BeanUtil.copyProperties(distributionStockArticleVO,excel);
excelList.add(excel);
});
}
return excelList; return excelList;
} }

2
blade-service/logpm-factory/src/main/resources/application-dev.yml

@ -12,7 +12,7 @@ server:
spring: spring:
#rabbitmq配置 #rabbitmq配置
rabbitmq: rabbitmq:
host: 192.168.10.100 host: 192.168.10.46
port: 5672 port: 5672
username: admin username: admin
password: admin password: admin

129
blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save