oldwine 11 mesiacov pred
rodič
commit
00e5db6376
1 zmenil súbory, kde vykonal 5 pridanie a 2 odobranie
  1. 5 2
      models/billet_trace_pusher.py

+ 5 - 2
models/billet_trace_pusher.py

@@ -187,20 +187,23 @@ class Trace_pusher:
             if self.strands[i] and self.strands[i][0] != data[0]:
                 self.logger.warning(f"{i+1}流有未经过挡板的钢坯被后坯顶出系统")
                 self.strands[i] = data
+                self.strands[i].append('')
             elif self.strands[i] and self.strands[i][0] == data[0]:
                 self.logger.info(f"{i+1}流补充了钢坯停切时间")
+                self.strands[i] = data
             elif extend:
                 self.logger.warning(f"{i+1}流对已经离开的钢坯补充停切时间,无效")
             else:
                 self.logger.info(f"{i+1}流新增钢坯存储")
                 self.strands[i] = data
+                self.strands[i].append('')
 
     def hostsend(self, i):
         ccmNo = self.current_heatData['ccmNo']
         strandNo = i[0][9]
         self.total += 1
-        self.strand[int(strandNo)] += 1
-        billetNo = self.current_heatNo + ccmNo + strandNo + '{:0>2}'.format(self.strand[int(strandNo)])
+        self.strand[int(strandNo)-1] += 1
+        billetNo = self.current_heatNo + ccmNo + strandNo + '{:0>2}'.format(self.strand[int(strandNo)-1])
         self.sender.billet_upload(self.current_heatData, billetNo, self.total, i[2], i[3], i[4], i[5])
 
         self.logger.info(f"{self.current_heatNo}炉钢坯热送:{billetNo}")