|
|
@@ -689,7 +689,7 @@ func (this *ConverseService) UpdateBoxInfo(entity ResponseEntity) (err error) {
|
|
|
|
|
|
// 更新盒所在的冻存架的信息 计算位置信息,并更新
|
|
|
// 临时处理逻辑,默认 pos 为 盒子的 XStation
|
|
|
- _, err = this.DBE.Exec("update bank_box set XStation ='" + utils.ToStr(Pos) + "',YStation =1 ,EquipmentId ='" + com.ToStr(shelf.EquipmentId) + "',shelfId =" + utils.ToStr(shelf.Id) + " where Barcode ='" + boxBarcode + "' ")
|
|
|
+ _, err = this.DBE.Exec("update bank_box set XStation ='" + utils.ToStr(Pos) + "',YStation =1 ,EquipmentId ='" + com.ToStr(shelf.EquipmentId) + "',shelfId =" + utils.ToStr(shelf.Id) + ",IsLocked = 0 where Barcode ='" + boxBarcode + "' ")
|
|
|
// 更新 当前冰箱冻存盒容量 信息
|
|
|
_, err = this.DBE.Exec(" update bank_currboxcapacity set `A" + utils.ToStr(Pos) + "`= -1 where shelfId =" + utils.ToStr(shelf.Id) + "")
|
|
|
|
|
|
@@ -726,7 +726,7 @@ func (this *ConverseService) UpdateBoxInfoCK(entity ResponseEntity) (err error)
|
|
|
|
|
|
// 更新盒所在的冻存架的信息 计算位置信息,并更新
|
|
|
// 临时处理逻辑,默认 pos 为 盒子的 XStation
|
|
|
- _, err = this.DBE.Exec("update bank_box set EquipmentId=null,shelfId=null,XStation =null,YStation =null where Barcode ='" + boxBarcode + "' ")
|
|
|
+ _, err = this.DBE.Exec("update bank_box set EquipmentId=null,shelfId=null,XStation =null,YStation =null,IsLocked = 0 where Barcode ='" + boxBarcode + "' ")
|
|
|
// 更新 当前冰箱冻存盒容量 信息
|
|
|
_, err = this.DBE.Exec(" update bank_currboxcapacity set `A" + utils.ToStr(Pos) + "`= -2 where shelfId =" + utils.ToStr(shelf.Id) + "")
|
|
|
|
|
|
@@ -735,6 +735,24 @@ func (this *ConverseService) UpdateBoxInfoCK(entity ResponseEntity) (err error)
|
|
|
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * @Author 徐春林
|
|
|
+ * @Description // 盒任务执行失败 , 更新 盒锁定状态为 解锁
|
|
|
+ * @Date 19:17 2021/3/22
|
|
|
+ * @Param
|
|
|
+ * @return
|
|
|
+ **/
|
|
|
+func (this *ConverseService) UpdateBoxIsLocked(taskId string) (err error) {
|
|
|
+ var task Sample_Storage_Task
|
|
|
+
|
|
|
+ sql := "SELECT id FROM " + TABLE_TAST + " WHERE taskId = '" + taskId + "'"
|
|
|
+
|
|
|
+ err = this.DBE.SQL(sql).Find(&task)
|
|
|
+
|
|
|
+ _, err = this.DBE.Exec("update bank_box set IsLocked = 0 where BoxBarcode ='" + task.BoxId + "' ")
|
|
|
+ return err
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
修改detail 信息
|
|
|
*/
|