|
|
@ -3,6 +3,7 @@ package org.nl.wms.pdm.workorder.service.impl; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import cn.hutool.core.util.IdUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.http.HttpStatus; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
@ -10,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import lombok.SneakyThrows; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.nl.common.domain.query.PageQuery; |
|
|
|
import org.nl.common.exception.BadRequestException; |
|
|
@ -35,6 +37,7 @@ import org.nl.wms.sch.point.service.dao.SchBasePoint; |
|
|
|
import org.nl.wms.sch.task_manage.GeneralDefinition; |
|
|
|
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum; |
|
|
|
import org.nl.wms.sch.task_manage.enums.WorkOrderStatusEnum; |
|
|
|
import org.nl.wms.util.CommonUtils; |
|
|
|
import org.nl.wms.util.TaskUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -77,18 +80,21 @@ public class PdmBdWorkorderServiceImpl extends ServiceImpl<PdmBdWorkorderMapper, |
|
|
|
return pages; |
|
|
|
} |
|
|
|
|
|
|
|
@SneakyThrows |
|
|
|
@Override |
|
|
|
public void create(PdmBdWorkorder entity) { |
|
|
|
String currentUserId = SecurityUtils.getCurrentUserId(); |
|
|
|
String nickName = SecurityUtils.getCurrentNickName(); |
|
|
|
String now = DateUtil.now(); |
|
|
|
|
|
|
|
String today = DateUtil.format(DateUtil.date(), "yyyyMMdd"); |
|
|
|
// 点位编码和点位名称为父点位
|
|
|
|
entity.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextIdStr()); |
|
|
|
entity.setWorkorder_code(CodeUtil.getNewCode("PDM_SHIFTORDER")); |
|
|
|
entity.setCreate_id(currentUserId); |
|
|
|
entity.setCreate_name(nickName); |
|
|
|
entity.setCreate_time(now); |
|
|
|
entity.setTeam(CommonUtils.getDayShift()); |
|
|
|
entity.setProduce_date(today); |
|
|
|
entity.setUpdate_id(currentUserId); |
|
|
|
entity.setUpdate_name(nickName); |
|
|
|
entity.setUpdate_time(now); |
|
|
|