Explorar o código

fix(bug): 修复位置更新错误的问题

luchm %!s(int64=3) %!d(string=hai) anos
pai
achega
4fbab3eb54

+ 4 - 2
src/dashoo.cn/genepoint_srv/business/converseService/converseService.go

@@ -637,7 +637,7 @@ func (this *ConverseService) sampleCKSuccessDBModify(idsStr string, parentId int
 	err := this.DBE.Where("barcode IN (" + idsStr + ")   and ParentId = '" + strconv.Itoa(parentId)+"'").Find(&list)
 	for _, one := range list {
 		// add by 徐春林
-		beforeSql := "UPDATE "+TABLE_SAMPLE+" a SET FreezingNum = (SELECT FreezingNum from "+TABLE_APPLY_DETAIL+" b where b.BarCode = '"+one.BarCode+"' and b.ParentId = '"+ strconv.Itoa(parentId)+"' ) Where barcode = '"+one.BarCode+"'"
+		beforeSql := "UPDATE "+TABLE_SAMPLE+" a SET  from "+TABLE_APPLY_DETAIL+" b where b.BarCode = '"+one.BarCode+"' and b.ParentId = '"+ strconv.Itoa(parentId)+"' ) Where barcode = '"+one.BarCode+"'"
 		_,err =this.DBE.Exec(beforeSql)
 		if strconv.Itoa(one.RecoveryId) == CK_PASS_ONHOLD {
 			// 查询样本出库详情, 更新 样本冻融次数信息
@@ -997,7 +997,9 @@ func (this *ConverseService) UpdatePosition(rack_id string, tubes []Tube, entity
 		position := equipmentInfo.Code + "-" + utils.NumberToLetter(shelf.YStation) + utils.ToStr(shelf.XStation) + "-" +
 			"" + utils.NumberToLetter(box.YStation) + utils.ToStr(box.XStation) + "-" + utils.NumberToLetter(box_x) + utils.ToStr(box_y)
 		sql = "update bank_sample set BoxId = '" + utils.ToStr(box.Id) + "',Position = '" + utils.ToStr(box_y) + ";" +
-			"" + utils.ToStr(box_x) + "',PositionInfo = '"+position+"'  , unit =  '"+  utils.ToStr( entity.Data.Actual_data[i].Target.Unit)+"'   where barcode ='" + id + "' "
+			"" + utils.ToStr(box_x) + "',PositionInfo = '"+position+"'  " +
+			// " , unit =  '"+  utils.ToStr( entity.Data.Actual_data[i].Target.Unit)+"'" +
+			"    where barcode ='" + id + "' "
 		//执行sql 更新位置和坐标信息
 		this.DBE.Exec(sql)