| | |
| | | import com.vincent.rsf.server.system.service.FieldsItemService; |
| | | import com.vincent.rsf.server.system.service.impl.FieldsItemServiceImpl; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @description |
| | | * @create 2025/3/3 15:38 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class ScheduleJobs { |
| | | |
| | |
| | | List<FieldsItem> fieldsList = fieldsItemService.list(new LambdaQueryWrapper<FieldsItem>().eq(FieldsItem::getUuid, orderItem.getFieldsIndex()).last("LIMIT 1")); |
| | | FieldsItem fieldsItem = fieldsList.isEmpty() ? null : fieldsList.get(0); |
| | | if (Objects.nonNull(fieldsItem)) { |
| | | throw new CoolException("票号:" + fieldsItem.getValue() + "已在收货区,不可推送相当票号数据。请联系管理员!!"); |
| | | // 票号已在收货区时跳过推送,避免定时任务反复抛错;视为已收货,由后续逻辑更新单据状态 |
| | | log.warn("票号:{} 已在收货区,跳过推送", fieldsItem.getValue()); |
| | | return; |
| | | } |
| | | } |
| | | } |