| | |
| | | package com.jcdm.main.da.passingStationCollection.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.common.utils.StringUtils; |
| | |
| | | @Override |
| | | public void insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection) { |
| | | Long[] conditions = daPassingStationCollection.getIds(); |
| | | String sfcCode = ""; |
| | | List<RmRepairRecord> save = new ArrayList<>(); |
| | | |
| | | for (int i = 0; i < conditions.length; i++) { |
| | | DaPassingStationCollection result = daPassingStationCollectionMapper.selectDaPassingStationCollectionById(conditions[i]); |
| | | RmRepairRecord rmRepairRecord = new RmRepairRecord(); |
| | | rmRepairRecord.setBoxCode(result.getSfcCode()); |
| | | rmRepairRecord.setProcessesCode(result.getLocationCode()); |
| | | rmRepairRecord.setOriginalResult(result.getOutRsSign()); |
| | | rmRepairRecordMapper.insertRmRepairRecord(rmRepairRecord); |
| | | if (i==0){ |
| | | if (ObjectUtil.isNotEmpty(result)){ |
| | | sfcCode = result.getSfcCode(); |
| | | rmRepairRecordMapper.deleteRmRepairRecordByCode(sfcCode); |
| | | } |
| | | } |
| | | if (ObjectUtil.isNotEmpty(result)){ |
| | | RmRepairRecord rmRepairRecord = new RmRepairRecord(); |
| | | rmRepairRecord.setBoxCode(result.getSfcCode()); |
| | | rmRepairRecord.setProcessesCode(result.getLocationCode()); |
| | | rmRepairRecord.setOriginalResult(result.getOutRsSign()); |
| | | rmRepairRecord.setCreateTime(new Date()); |
| | | rmRepairRecordMapper.insertRmRepairRecord(rmRepairRecord); |
| | | daPassingStationCollectionMapper.deleteDaPassingStationCollectionById(result.getId()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | @Override |
| | | public String SelectSN(String SNcode,String node) { |