1
This commit is contained in:
parent
ac25a0cac8
commit
9562c149d3
@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.common.*;
|
||||
import cn.iocoder.yudao.framework.common.util.number.MoneyUtils;
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.base.entity.RepairWorker;
|
||||
import cn.iocoder.yudao.module.base.service.RepairRecordsService;
|
||||
@ -247,9 +248,16 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
// 新增主表
|
||||
baseMapper.insert(ticketsRespVO);
|
||||
|
||||
//获取当前登录用户
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
// 新增子表
|
||||
itemList.forEach(item -> {
|
||||
item.setTicketId(ticketsRespVO.getId());
|
||||
if(null==item.getSaleId()){
|
||||
//默认销售人员是当前用户
|
||||
item.setSaleId(loginUser.getId());
|
||||
item.setSaleName(loginUser.getInfo().get("nickname"));
|
||||
}
|
||||
if ("01".equals(item.getItemType())) {
|
||||
//维修项目,初始状态,待派工
|
||||
item.setItemStatus(TicketsItemStatusEnum.WAITING_WORK.getCode());
|
||||
|
Loading…
Reference in New Issue
Block a user