|
|
@@ -624,13 +624,20 @@ func (this *ConverseService) sampleRKSuccessDBModify(idsStr string, parentId int
|
|
|
sql := "UPDATE " + TABLE_SAMPLE + " a SET Capacity = (SELECT Capacity from " + TABLE_APPLY_DETAIL + " b where b.BarCode = '" + one.BarCode + "' and b.ParentId = '" + strconv.Itoa(parentId) + "' ) Where barcode = '" + one.BarCode + "'"
|
|
|
_, err = this.DBE.Exec(sql)
|
|
|
}
|
|
|
+
|
|
|
+ timeNow := gconv.String(gtime.Now())
|
|
|
+
|
|
|
updatesql := "UPDATE " + TABLE_APPLY_DETAIL + " SET IsLocked = '" + STATUS_UNLOCK + "', taskstatus = '" + strconv.Itoa(SUCCESS) + "' WHERE barcode IN (" + idsStr + ")" + " AND parentid = '" + strconv.Itoa(parentId) + "'"
|
|
|
// 更新样本状态解锁,原盒子id置为0
|
|
|
- updatesql2 := "UPDATE " + TABLE_SAMPLE + " SET IsLocked = '" + STATUS_UNLOCK + "', IState = '" + RK_PASS + "', ExecutionTime= '" + gconv.String(gtime.Now()) + "',SourceBoxId = 0 WHERE barcode IN (" + idsStr + ")"
|
|
|
+ updatesql2 := "UPDATE " + TABLE_SAMPLE + " SET IsLocked = '" + STATUS_UNLOCK + "', IState = '" + RK_PASS + "', ExecutionTime= '" + timeNow + "',SourceBoxId = 0 WHERE barcode IN (" + idsStr + ")"
|
|
|
+ // todo
|
|
|
+ // 更新日志执行完成时间
|
|
|
+ updatesql3 := " update bank_sample_log set Operationtime = '" + timeNow + "' where barcode IN (" + idsStr + ") and Function = '执行入库'"
|
|
|
|
|
|
//更新每个样本的孔位信息
|
|
|
_, err = this.DBE.Exec(updatesql)
|
|
|
_, err = this.DBE.Exec(updatesql2)
|
|
|
+ _, err = this.DBE.Exec(updatesql3)
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
@@ -654,14 +661,21 @@ func (this *ConverseService) sampleCKSuccessDBModify(idsStr string, parentId int
|
|
|
done = append(done, one.BarCode)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ nowTime := gconv.String(gtime.Now())
|
|
|
// 基点出库取出待放回, 清空样本位置信息, 但是状态保留为 取出待放回
|
|
|
// sql := "UPDATE " + TABLE_SAMPLE + " SET istate = '" + CK_PASS_ONHOLD + "', islocked = '" + STATUS_UNLOCK + "' WHERE barcode IN ('" + strings.Join(onHold, "','") + "')"
|
|
|
- sql := "UPDATE " + TABLE_SAMPLE + " SET istate = '" + CK_PASS_ONHOLD + "', islocked = '" + STATUS_UNLOCK + "',equipmentid = '0', shelfid = '0',boxid= '0', position = '', positioninfo = '', OutboundTime= '" + gconv.String(gtime.Now()) + "' WHERE barcode IN ('" + strings.Join(onHold, "','") + "')"
|
|
|
- sql2 := "UPDATE " + TABLE_SAMPLE + " SET istate = '" + CK_PASS_DONE + "', islocked = '" + STATUS_UNLOCK + "', equipmentid = '0', shelfid = '0',boxid= '0', position = '', positioninfo = '', OutboundTime= '" + gconv.String(gtime.Now()) + "' WHERE barcode IN ('" + strings.Join(done, "','") + "')"
|
|
|
+ sql := "UPDATE " + TABLE_SAMPLE + " SET istate = '" + CK_PASS_ONHOLD + "', islocked = '" + STATUS_UNLOCK + "',equipmentid = '0', shelfid = '0',boxid= '0', position = '', positioninfo = '', OutboundTime= '" + nowTime + "' WHERE barcode IN ('" + strings.Join(onHold, "','") + "')"
|
|
|
+ sql2 := "UPDATE " + TABLE_SAMPLE + " SET istate = '" + CK_PASS_DONE + "', islocked = '" + STATUS_UNLOCK + "', equipmentid = '0', shelfid = '0',boxid= '0', position = '', positioninfo = '', OutboundTime= '" + nowTime + "' WHERE barcode IN ('" + strings.Join(done, "','") + "')"
|
|
|
sql3 := "UPDATE " + TABLE_APPLY_DETAIL + " SET IsLocked = '" + STATUS_UNLOCK + "', taskstatus = '" + strconv.Itoa(SUCCESS) + "' WHERE barcode IN (" + idsStr + ")" + " AND parentid = '" + strconv.Itoa(parentId) + "'"
|
|
|
+ //todo
|
|
|
+ sql4 := " update bank_sample_log set Operationtime = '" + nowTime + "' where barcode IN (" + idsStr + ") and Function in( '出库单执行','销毁单执行' )"
|
|
|
+
|
|
|
_, err = this.DBE.Exec(sql)
|
|
|
_, err = this.DBE.Exec(sql2)
|
|
|
_, err = this.DBE.Exec(sql3)
|
|
|
+ _, err = this.DBE.Exec(sql4)
|
|
|
+
|
|
|
return err
|
|
|
}
|
|
|
|