|
|
@ -8,12 +8,16 @@ import com.ruoyi.common.utils.ShiroUtils; |
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import com.ruoyi.process.general.service.IProcessService; |
|
|
|
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; |
|
|
|
import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO; |
|
|
|
import com.ruoyi.system.domain.SysAttach; |
|
|
|
import com.ruoyi.system.domain.SysMakeOrder; |
|
|
|
import com.ruoyi.system.mapper.SysAttachMapper; |
|
|
|
import com.ruoyi.system.mapper.SysMakeOrderMapper; |
|
|
|
import com.ruoyi.system.mapper.SysUserMapper; |
|
|
|
import com.ruoyi.system.service.ISysAttachFileService; |
|
|
|
import com.ruoyi.system.service.ISysAttachService; |
|
|
|
import com.ruoyi.system.service.ISysRoleService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.activiti.engine.TaskService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -29,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
* @author 刘晓旭 |
|
|
|
* @date 2024-04-24 |
|
|
|
*/ |
|
|
|
@Slf4j |
|
|
|
@Service |
|
|
|
public class AftersalesOrderServiceImpl implements IAftersalesOrderService |
|
|
|
{ |
|
|
@ -41,6 +46,8 @@ public class AftersalesOrderServiceImpl implements IAftersalesOrderService |
|
|
|
@Autowired |
|
|
|
private ISysAttachFileService attachFileService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SysMakeOrderMapper sysMakeOrderMapper; |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询售后单 |
|
|
@ -64,7 +71,8 @@ public class AftersalesOrderServiceImpl implements IAftersalesOrderService |
|
|
|
public AftersalesOrder selectAftersalesOrderWithAttachById(Long aftersalesOrderId) |
|
|
|
{ |
|
|
|
AftersalesOrder aftersalesOrder = aftersalesOrderMapper.selectAftersalesOrderWithAttachById(aftersalesOrderId); |
|
|
|
String startDate = aftersalesOrder.getStartDate(); |
|
|
|
|
|
|
|
Date startDate = aftersalesOrder.getStartDate(); |
|
|
|
aftersalesOrder.setStartDate(startDate); |
|
|
|
return aftersalesOrder; |
|
|
|
} |
|
|
@ -193,4 +201,38 @@ public class AftersalesOrderServiceImpl implements IAftersalesOrderService |
|
|
|
return aftersalesOrderMapper.restoreAftersalesOrderById(aftersalesOrderId); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 销售售后通知单 审核后生成售后单 |
|
|
|
* */ |
|
|
|
@Override |
|
|
|
public void generateAftersalesOrderBySalesAftersalesNotice(SalesAftersalesNoticeVO tempSalesAftersalesNoticeVO) { |
|
|
|
|
|
|
|
|
|
|
|
AftersalesOrder aftersalesOrder = new AftersalesOrder(); |
|
|
|
String salesOrderCode = tempSalesAftersalesNoticeVO.getSalesOrderCode(); |
|
|
|
SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode); |
|
|
|
|
|
|
|
if (sysMakeOrder == null){ |
|
|
|
log.warn("与生产单号关联的销售单号为空:{}",salesOrderCode); |
|
|
|
} |
|
|
|
aftersalesOrder.setAftersalesOrderCode(tempSalesAftersalesNoticeVO.getAftersalesNoticeCode()); |
|
|
|
aftersalesOrder.setSalesOrderCode(salesOrderCode); |
|
|
|
aftersalesOrder.setMakeNo(sysMakeOrder.getMakeNo()); |
|
|
|
aftersalesOrder.setBusinessName(tempSalesAftersalesNoticeVO.getBusinessMembers()); |
|
|
|
aftersalesOrder.setAftersalesName(tempSalesAftersalesNoticeVO.getApplyUser()); |
|
|
|
aftersalesOrder.setAftersalesStatus(tempSalesAftersalesNoticeVO.getAftersalesStatus()); |
|
|
|
aftersalesOrder.setCustomerId(tempSalesAftersalesNoticeVO.getEnterpriseCode()); |
|
|
|
aftersalesOrder.setCustomerName(tempSalesAftersalesNoticeVO.getEnterpriseName()); |
|
|
|
aftersalesOrder.setMaterialSum(tempSalesAftersalesNoticeVO.getMaterialSum()); |
|
|
|
aftersalesOrder.setEnterpriseSum(tempSalesAftersalesNoticeVO.getEnterpriseSum()); |
|
|
|
aftersalesOrder.setStartDate(tempSalesAftersalesNoticeVO.getStartTime()); |
|
|
|
aftersalesOrder.setDeliveryName(tempSalesAftersalesNoticeVO.getCustomerContact()); |
|
|
|
aftersalesOrder.setDeliveryNumber(tempSalesAftersalesNoticeVO.getContactNumber()); |
|
|
|
aftersalesOrder.setCompanyAddress(tempSalesAftersalesNoticeVO.getCompanyAddress()); |
|
|
|
aftersalesOrder.setCreateBy(tempSalesAftersalesNoticeVO.getCreateBy()); |
|
|
|
aftersalesOrder.setCreateTime(tempSalesAftersalesNoticeVO.getCreateTime()); |
|
|
|
aftersalesOrderMapper.insertAftersalesOrder(aftersalesOrder); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|