| | |
| | | package com.qianwen.smartman.modules.andon.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import java.lang.invoke.SerializedLambda; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | |
| | | import java.util.Map; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.qianwen.smartman.common.cache.RegionCache; |
| | | import com.qianwen.smartman.common.constant.NotifyConstant; |
| | | import com.qianwen.smartman.common.utils.AbstractSqlAdapter; |
| | | import com.qianwen.smartman.common.utils.Lambda; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.qianwen.core.log.exception.ServiceException; |
| | | import com.qianwen.core.mp.base.BaseServiceImpl; |
| | | import com.qianwen.core.mp.support.Condition; |
| | | import com.qianwen.core.mp.support.Query; |
| | | import com.qianwen.core.tool.utils.DateUtil; |
| | | import com.qianwen.core.tool.utils.Func; |
| | | import com.qianwen.smartman.common.constant.NotifyConstant; |
| | | import com.qianwen.smartman.common.utils.AbstractSqlAdapter; |
| | | import com.qianwen.smartman.common.utils.Lambda; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import com.qianwen.smartman.modules.andon.convert.AndonRecordConvert; |
| | | import com.qianwen.smartman.modules.andon.convert.AndonRecordReasonConvert; |
| | | import com.qianwen.smartman.modules.andon.entity.AndonRecord; |
| | |
| | | import com.qianwen.smartman.modules.notify.business.BusinessSend; |
| | | import com.qianwen.smartman.modules.notify.business.BusinessSendFactory; |
| | | import com.qianwen.smartman.modules.notify.dto.NotifyBusinessSendDTO; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | @Service |
| | | /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/andon/service/impl/AndonRecordServiceImpl.class */ |
| | | public class AndonRecordServiceImpl extends BaseServiceImpl<AndonRecordMapper, AndonRecord> implements IAndonRecordService { |
| | | private static final Logger log = LoggerFactory.getLogger(AndonRecordServiceImpl.class); |
| | | private final IAndonRecordReasonService recordReasonService; |
| | |
| | | this.businessSendFactory = businessSendFactory; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | public IPage<AndonRecordVO> pageReceiveList(AndonRecordSearchVO andonRecordSearchVO, Query query) { |
| | | |
| | | List<AndonRecordReason> list = this.recordReasonService.list(); |
| | |
| | | */ |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | public AndonReceiveRecordVO receiveRecordDetail(String id) { |
| | | AndonRecord andonRecord = (AndonRecord)getById(id); |
| | | if (Func.isEmpty(andonRecord)) |
| | |
| | | return andonReceiveRecordVO; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Boolean batchReceiveAndonRecord(List<Long> ids) { |
| | | List<Integer> invalidAndonStatus = Arrays.asList(new Integer[] { AndonRecordStatusEnum.RECEIVED.getCode(), AndonRecordStatusEnum.FINISH.getCode() }); |
| | |
| | | } |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Boolean delReceiveAndonRecord(String id) { |
| | | AndonRecord andonRecord = (AndonRecord) getById(id); |
| | |
| | | } |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public AndonReceiveRecordVO editReceiveRecord(AndonReceiveEditRecordVO andonReceiveEditRecordVO) { |
| | | Long recordId = andonReceiveEditRecordVO.getId(); |
| | |
| | | businessSend.saveState(andonMessageSendVO, notifyBusinessSend); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Boolean toBeOrReceivedAndonRecord(AndonFinishRecordVO andonFinishRecordVO) { |
| | | String id = andonFinishRecordVO.getId(); |
| | |
| | | return Boolean.valueOf(updateById(andonRecord)); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Boolean initiateAndonCall(AndonReceiveRecordVO andonReceiveRecordVO) { |
| | | boolean isSamePeople = andonReceiveRecordVO.getCallEmpId().equals(andonReceiveRecordVO.getHandEmpId()); |
| | |
| | | */ |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | public List<HmiAndonVO> hmiWorkstationLoginAndon(String workstationId) { |
| | | List<AndonRecord> andonRecordList = checkWorkstationAndonType(Long.valueOf(Func.toLong(workstationId)), null); |
| | | if (andonRecordList != null) { |
| | |
| | | */ |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | public AndonStatisticalCardVO queryCard(List<Long> workstations, Date startTime, Date endTime) { |
| | | return ((AndonRecordMapper) this.baseMapper).queryCard(workstations, DateUtil.formatDateTime(startTime), DateUtil.formatDateTime(endTime)); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | public IPage<AndonTableStatisticalVO> getTableAndon(Query query, Date startTime, Date endTime, List<Long> workstationIds) { |
| | | return ((AndonRecordMapper) this.baseMapper).getTableAndon(Condition.getPage(query), DateUtil.formatDateTime(startTime), DateUtil.formatDateTime(endTime), workstationIds); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.andon.service.IAndonRecordService |
| | | |
| | | public List<AndonRecord> queryCallTime(Date startTime, Date endTime, List<Long> workstationIds) { |
| | | QueryWrapper<AndonRecord> wrapper = AbstractSqlAdapter.dateBetweenAdapter(Lambda.getName(AndonRecord::getCallTime), startTime, endTime); |
| | | wrapper.in(Lambda.getName(AndonRecord::getWorkstationId), workstationIds) |