提交 | 用户 | 时间
|
7c651d
|
1 |
package com.jcdm.main.da.passingStationCollection.service.impl; |
YY |
2 |
|
|
3 |
import com.jcdm.common.utils.DateUtils; |
d3409e
|
4 |
//import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; |
懒 |
5 |
//import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper; |
|
6 |
//import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; |
7c651d
|
7 |
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
YY |
8 |
import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper; |
|
9 |
import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService; |
d3409e
|
10 |
import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord; |
懒 |
11 |
import com.jcdm.main.rm.repairRecord.mapper.RmRepairRecordMapper; |
7c651d
|
12 |
import org.springframework.beans.factory.annotation.Autowired; |
YY |
13 |
import org.springframework.stereotype.Service; |
d3409e
|
14 |
|
懒 |
15 |
import java.time.LocalDate; |
|
16 |
import java.time.LocalDateTime; |
|
17 |
import java.time.format.DateTimeFormatter; |
|
18 |
import java.util.List; |
7c651d
|
19 |
|
YY |
20 |
/** |
|
21 |
* 产品过站采集Service业务层处理 |
|
22 |
* |
|
23 |
* @author yyt |
|
24 |
* @date 2023-12-12 |
|
25 |
*/ |
|
26 |
@Service |
|
27 |
public class DaPassingStationCollectionServiceImpl implements IDaPassingStationCollectionService |
|
28 |
{ |
|
29 |
@Autowired |
|
30 |
private DaPassingStationCollectionMapper daPassingStationCollectionMapper; |
d3409e
|
31 |
|
懒 |
32 |
@Autowired |
|
33 |
private RmRepairRecordMapper rmRepairRecordMapper; |
|
34 |
|
|
35 |
// @Autowired |
|
36 |
// private BsOrderSchedulingMapper bsOrderSchedulingMapper; |
|
37 |
// |
|
38 |
// @Autowired |
|
39 |
// private IBsOrderSchedulingService bsOrderSchedulingService; |
7c651d
|
40 |
|
YY |
41 |
/** |
|
42 |
* 查询产品过站采集 |
|
43 |
* |
|
44 |
* @param id 产品过站采集主键 |
|
45 |
* @return 产品过站采集 |
|
46 |
*/ |
|
47 |
@Override |
|
48 |
public DaPassingStationCollection selectDaPassingStationCollectionById(Long id) |
|
49 |
{ |
|
50 |
return daPassingStationCollectionMapper.selectDaPassingStationCollectionById(id); |
|
51 |
} |
|
52 |
|
|
53 |
/** |
|
54 |
* 查询产品过站采集列表 |
|
55 |
* |
|
56 |
* @param daPassingStationCollection 产品过站采集 |
|
57 |
* @return 产品过站采集 |
|
58 |
*/ |
|
59 |
@Override |
|
60 |
public List<DaPassingStationCollection> selectDaPassingStationCollectionList(DaPassingStationCollection daPassingStationCollection) |
|
61 |
{ |
|
62 |
return daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection); |
|
63 |
} |
d3409e
|
64 |
|
懒 |
65 |
// /** |
|
66 |
// * 获取首页单日累计量产数据 |
|
67 |
// * @param fieldName bs |
|
68 |
// * @return list |
|
69 |
// */ |
|
70 |
// @Override |
|
71 |
// public Integer getProduceNumToday(String fieldName) { |
|
72 |
// |
|
73 |
// BsOrderScheduling bsOrderScheduling = new BsOrderScheduling(); |
|
74 |
// bsOrderScheduling.setQueryField(fieldName); |
|
75 |
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
|
76 |
// LocalDateTime startTime = LocalDate.now().atStartOfDay(); |
|
77 |
// LocalDateTime endTime = LocalDate.now().plusDays(1).atStartOfDay(); |
|
78 |
// String s1 = startTime.format(formatter); |
|
79 |
// String s2 = endTime.format(formatter); |
|
80 |
// bsOrderScheduling.setStartTime(s1); |
|
81 |
// bsOrderScheduling.setEndTime(s2); |
|
82 |
// return bsOrderSchedulingMapper.getProduceNumToday(bsOrderScheduling); |
|
83 |
// } |
7c651d
|
84 |
|
YY |
85 |
/** |
|
86 |
* 新增产品过站采集 |
|
87 |
* |
|
88 |
* @param daPassingStationCollection 产品过站采集 |
|
89 |
* @return 结果 |
|
90 |
*/ |
|
91 |
@Override |
|
92 |
public int insertDaPassingStationCollection(DaPassingStationCollection daPassingStationCollection) |
|
93 |
{ |
|
94 |
daPassingStationCollection.setCreateTime(DateUtils.getNowDate()); |
|
95 |
return daPassingStationCollectionMapper.insertDaPassingStationCollection(daPassingStationCollection); |
|
96 |
} |
|
97 |
|
|
98 |
/** |
|
99 |
* 修改产品过站采集 |
|
100 |
* |
|
101 |
* @param daPassingStationCollection 产品过站采集 |
|
102 |
* @return 结果 |
|
103 |
*/ |
|
104 |
@Override |
|
105 |
public int updateDaPassingStationCollection(DaPassingStationCollection daPassingStationCollection) |
|
106 |
{ |
|
107 |
daPassingStationCollection.setUpdateTime(DateUtils.getNowDate()); |
|
108 |
return daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollection); |
|
109 |
} |
|
110 |
|
|
111 |
/** |
|
112 |
* 批量删除产品过站采集 |
|
113 |
* |
|
114 |
* @param ids 需要删除的产品过站采集主键 |
|
115 |
* @return 结果 |
|
116 |
*/ |
|
117 |
@Override |
|
118 |
public int deleteDaPassingStationCollectionByIds(Long[] ids) |
|
119 |
{ |
|
120 |
return daPassingStationCollectionMapper.deleteDaPassingStationCollectionByIds(ids); |
|
121 |
} |
|
122 |
|
|
123 |
/** |
|
124 |
* 删除产品过站采集信息 |
|
125 |
* |
|
126 |
* @param id 产品过站采集主键 |
|
127 |
* @return 结果 |
|
128 |
*/ |
|
129 |
@Override |
|
130 |
public int deleteDaPassingStationCollectionById(Long id) |
|
131 |
{ |
|
132 |
return daPassingStationCollectionMapper.deleteDaPassingStationCollectionById(id); |
|
133 |
} |
d3409e
|
134 |
|
懒 |
135 |
@Override |
|
136 |
public void insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection) { |
|
137 |
Long[] conditions = daPassingStationCollection.getIds(); |
|
138 |
for (int i = 0; i < conditions.length; i++) { |
|
139 |
DaPassingStationCollection result = daPassingStationCollectionMapper.selectDaPassingStationCollectionById(conditions[i]); |
|
140 |
RmRepairRecord rmRepairRecord = new RmRepairRecord(); |
|
141 |
rmRepairRecord.setBoxCode(result.getSfcCode()); |
|
142 |
rmRepairRecord.setProcessesCode(result.getLocationCode()); |
|
143 |
rmRepairRecord.setOriginalResult(result.getOutRsSign()); |
|
144 |
rmRepairRecordMapper.insertRmRepairRecord(rmRepairRecord); |
|
145 |
} |
|
146 |
} |
7c651d
|
147 |
} |