春风项目四线(合箱线、总装线)
yyt
2024-01-24 01cb633562174ae7390d12b85690a45997f34be7
提交 | 用户 | 时间
fd2207 1 package com.jcdm.main.da.passingStationCollection.service.impl;
2
3 import java.util.List;
4 import com.jcdm.common.utils.DateUtils;
5 import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
6 import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper;
7 import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService;
ff985a 8 import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord;
9 import com.jcdm.main.rm.repairRecord.mapper.RmRepairRecordMapper;
fd2207 10 import org.springframework.beans.factory.annotation.Autowired;
11 import org.springframework.stereotype.Service;
12
13 /**
14  * 产品过站采集Service业务层处理
15  * 
16  * @author yyt
17  * @date 2023-12-12
18  */
19 @Service
20 public class DaPassingStationCollectionServiceImpl implements IDaPassingStationCollectionService
21 {
22     @Autowired
23     private DaPassingStationCollectionMapper daPassingStationCollectionMapper;
ff985a 24
25     @Autowired
26     private RmRepairRecordMapper rmRepairRecordMapper;
fd2207 27
28     /**
29      * 查询产品过站采集
30      * 
31      * @param id 产品过站采集主键
32      * @return 产品过站采集
33      */
34     @Override
35     public DaPassingStationCollection selectDaPassingStationCollectionById(Long id)
36     {
37         return daPassingStationCollectionMapper.selectDaPassingStationCollectionById(id);
38     }
39
40     /**
41      * 查询产品过站采集列表
42      * 
43      * @param daPassingStationCollection 产品过站采集
44      * @return 产品过站采集
45      */
46     @Override
47     public List<DaPassingStationCollection> selectDaPassingStationCollectionList(DaPassingStationCollection daPassingStationCollection)
48     {
49         return daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection);
50     }
51
52     /**
53      * 新增产品过站采集
54      * 
55      * @param daPassingStationCollection 产品过站采集
56      * @return 结果
57      */
58     @Override
59     public int insertDaPassingStationCollection(DaPassingStationCollection daPassingStationCollection)
60     {
61         daPassingStationCollection.setCreateTime(DateUtils.getNowDate());
62         return daPassingStationCollectionMapper.insertDaPassingStationCollection(daPassingStationCollection);
63     }
64
65     /**
66      * 修改产品过站采集
67      * 
68      * @param daPassingStationCollection 产品过站采集
69      * @return 结果
70      */
71     @Override
72     public int updateDaPassingStationCollection(DaPassingStationCollection daPassingStationCollection)
73     {
74         daPassingStationCollection.setUpdateTime(DateUtils.getNowDate());
75         return daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollection);
76     }
77
78     /**
79      * 批量删除产品过站采集
80      * 
81      * @param ids 需要删除的产品过站采集主键
82      * @return 结果
83      */
84     @Override
85     public int deleteDaPassingStationCollectionByIds(Long[] ids)
86     {
87         return daPassingStationCollectionMapper.deleteDaPassingStationCollectionByIds(ids);
88     }
89
90     /**
91      * 删除产品过站采集信息
92      * 
93      * @param id 产品过站采集主键
94      * @return 结果
95      */
96     @Override
97     public int deleteDaPassingStationCollectionById(Long id)
98     {
99         return daPassingStationCollectionMapper.deleteDaPassingStationCollectionById(id);
100     }
ff985a 101
102     @Override
103     public void insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection) {
104         Long[] conditions = daPassingStationCollection.getIds();
105         for (int i = 0; i < conditions.length; i++) {
106             DaPassingStationCollection result = daPassingStationCollectionMapper.selectDaPassingStationCollectionById(conditions[i]);
107             RmRepairRecord rmRepairRecord = new RmRepairRecord();
108             rmRepairRecord.setBoxCode(result.getSfcCode());
109             rmRepairRecord.setProcessesCode(result.getLocationCode());
110             rmRepairRecord.setOriginalResult(result.getOutRsSign());
111             rmRepairRecordMapper.insertRmRepairRecord(rmRepairRecord);
112         }
113     }
fd2207 114 }