|
|
|
|
@ -3,9 +3,11 @@ package org.springblade.desk.produce.service.impl; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import jakarta.servlet.http.HttpServletRequest; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.springblade.common.exception.BusinessException; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
@ -20,6 +22,9 @@ import org.springblade.desk.device.pojo.entity.RackSetEntity; |
|
|
|
|
import org.springblade.desk.device.service.IEquipmentService; |
|
|
|
|
import org.springblade.desk.device.service.IFeiBaSetService; |
|
|
|
|
import org.springblade.desk.device.service.IRackSetService; |
|
|
|
|
import org.springblade.desk.energy.pojo.entity.BsEpciuPatrolInspectionEntity; |
|
|
|
|
import org.springblade.desk.energy.pojo.entity.BsSafePatrolInspectionEntity; |
|
|
|
|
import org.springblade.desk.energy.service.IBsEpciuPatrolInspectionService; |
|
|
|
|
import org.springblade.desk.order.pojo.entity.YieldOrder; |
|
|
|
|
import org.springblade.desk.order.service.IYieldOrderService; |
|
|
|
|
import org.springblade.desk.produce.mapper.WorkPlanMapper; |
|
|
|
|
@ -36,9 +41,7 @@ import org.springblade.scheduling.pojo.entity.CraftAbilityEntity; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -85,6 +88,8 @@ public class PdaLoadServiceImpl extends BaseServiceImpl<WorkPlanMapper, WorkPlan |
|
|
|
|
|
|
|
|
|
private final IWorkCenterService workCenterService; |
|
|
|
|
|
|
|
|
|
private final IBsEpciuPatrolInspectionService bsEpciuPatrolInspectionService; |
|
|
|
|
|
|
|
|
|
// @Value("${request.device.prefixId}")
|
|
|
|
|
private String prefixId; |
|
|
|
|
|
|
|
|
|
@ -426,4 +431,27 @@ public class PdaLoadServiceImpl extends BaseServiceImpl<WorkPlanMapper, WorkPlan |
|
|
|
|
} |
|
|
|
|
return workOrder; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Object getInspectionByEcCode(String code,Boolean flag, HttpServletRequest request) { |
|
|
|
|
Long userId = AuthUtil.getUserId(); |
|
|
|
|
if (StringUtils.isBlank(code) || flag == null) { |
|
|
|
|
throw new RuntimeException("pda.dataFormat.incorrect", null); |
|
|
|
|
} |
|
|
|
|
List<BsEpciuPatrolInspectionEntity> piList = bsEpciuPatrolInspectionService.ListPi(code, userId); |
|
|
|
|
piList = piList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> |
|
|
|
|
new TreeSet<>(Comparator.comparing(BsEpciuPatrolInspectionEntity::getEpcId))), ArrayList::new)); |
|
|
|
|
if (piList == null || piList.size() == 0) { |
|
|
|
|
if (flag) { |
|
|
|
|
throw new RuntimeException("product.noPatrolCheckTask", null); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return piList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void saveByInspection(JSONObject data, boolean b) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|