|
|
|
@ -17,15 +17,22 @@
|
|
|
|
|
package com.logpm.aftersales.service.impl; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
|
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO; |
|
|
|
|
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity; |
|
|
|
|
import com.logpm.aftersales.service.IAftersalesAbnormalPackageService; |
|
|
|
|
import com.logpm.aftersales.vo.AftersalesWorkOrderVO; |
|
|
|
|
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel; |
|
|
|
|
import com.logpm.aftersales.mapper.AftersalesWorkOrderMapper; |
|
|
|
|
import com.logpm.aftersales.service.IAftersalesWorkOrderService; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
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.util.List; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -35,8 +42,13 @@ import java.util.List;
|
|
|
|
|
* @since 2023-11-17 |
|
|
|
|
*/ |
|
|
|
|
@Service |
|
|
|
|
@Slf4j |
|
|
|
|
@AllArgsConstructor |
|
|
|
|
public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWorkOrderMapper, AftersalesWorkOrderEntity> implements IAftersalesWorkOrderService { |
|
|
|
|
|
|
|
|
|
private final IAftersalesAbnormalPackageService aftersalesAbnormalPackageService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<AftersalesWorkOrderVO> selectAftersalesWorkOrderPage(IPage<AftersalesWorkOrderVO> page, AftersalesWorkOrderVO aftersalesWorkOrder) { |
|
|
|
|
return page.setRecords(baseMapper.selectAftersalesWorkOrderPage(page, aftersalesWorkOrder)); |
|
|
|
@ -58,9 +70,29 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
|
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public boolean saveOrUpdateOwn(AftersalesWorkOrderEntity aftersalesWorkOrder) { |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public boolean saveOrUpdateOwn(AftersalesWorkOrderDTO aftersalesWorkOrder) { |
|
|
|
|
|
|
|
|
|
if(ObjectUtils.isNull(aftersalesWorkOrder.getId())){ |
|
|
|
|
//新增
|
|
|
|
|
aftersalesWorkOrder.setInitiationIdentification("PDA"); |
|
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getPackageEntityList())){ |
|
|
|
|
//包件信息
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getDecreaseImageEntityList())){ |
|
|
|
|
//货损图片
|
|
|
|
|
} |
|
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())){ |
|
|
|
|
//责任方 处理方
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return baseMapper.insert(aftersalesWorkOrder) > 0 ? true : false; |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|