Kaynağa Gözat

fix(bug): 添加冻融次数记录
1. 添加冻融次数记录

luchm 3 yıl önce
ebeveyn
işleme
95d2148658

+ 8 - 72
src/dashoo.cn/genepoint_srv/business/converseService/converseService.go

@@ -149,16 +149,7 @@ func (this *ConverseService) GetNewTaskBasic() []Sample_Storage_Task {
 	if err != nil {
 		log.Println(err)
 	}
-	//if len(resultsSlice) > 0 {
-	//	results := resultsSlice[0]
-	//	for _, value := range results {
-	//		count64, _ = strconv.ParseInt(string(value), 10, 64)
-	//		//LogError(err)
-	//		break
-	//	}
-	//}
-	//intSTr := strconv.FormatInt(count64,10)
-	//count,_ := strconv.Atoi(intSTr)
+
 
 	return tasks
 }
@@ -513,16 +504,6 @@ func (this *ConverseService) StatusModifyWithDetail(task_id string,res ResponseE
 
 
 
-
-
-
-
-
-
-
-
-
-
 //修改任务表状态码
 func (this *ConverseService) TaskStatusModify(statusCode int, task_id string) error {
 	sql := "UPDATE " + TABLE_TAST + " SET statuscode = '" + strconv.Itoa(statusCode) + "'   WHERE task_id = '" + task_id + "'"
@@ -562,31 +543,7 @@ func (this *ConverseService) SampleApplyDetailStatusModify(statusCode int, entry
 	return err
 }
 
-////批量更新全部成功或失败的任务样本状态
-//func (this *ConverseService)SampleApplyDetailStatusBatchModify(statusCode int , entryNo string) error {
-//
-//	//获取出入库单Id
-//	getId := "SELECT id FROM " + TABLE_SAMPLE_APPLY + " WHERE entryno = '" + entryNo + "'"
-//	var idList []Id
-//	err := this.DBE.SQL(getId).Find(&idList)
-//	//批量更新全部成功或失败的任务样本状态
-//	sql:= "UPDATE " + TABLE_APPLY_DETAIL + " SET taskstatus = '" + strconv.Itoa(statusCode) + "' WHERE parentid = '" + strconv.Itoa(idList[0].Id) + "'"
-//	_,err = this.DBE.Exec(sql)
-//
-//	return  err
-//}
-
-//修改全部样本执行成功状态
-//func (this *ConverseService)ModifySampleALLSuccessStatus(res ResponseEntity){
-//	tubeIds := handleSingleList(res.Data.Actual_data)
-//	this.handleSampleSuccess(tubeIds, res.Response)
-//}
 
-//修改全部样本执行失败状态
-//func (this *ConverseService)ModifySampleALLFailedStatus(res ResponseEntity){
-//	tubeIds := handleSingleList(res.Data.Actual_data)
-//	this.handleSampleFailed(tubeIds, res.Response)
-//}
 
 //任务执行驳回, 修改全部样本失败状态
 func (this *ConverseService) ModifySampleAllRejectStatus(res ResponseEntity) error {
@@ -600,30 +557,6 @@ func (this *ConverseService) ModifySampleAllRejectStatus(res ResponseEntity) err
 	return err
 }
 
-//修改部分样本执行成功部分样本执行失败状态
-//func (this *ConverseService)SampleApplyDetailStatusPartsModify(res ResponseEntity){
-//
-//	tubeIds := handleSingleList(res.Data.Actual_data)
-//	this.handleSampleSuccess(tubeIds, res.Response)
-//	tubeIds = handleSingleList(res.Data.Abnormal_data.Tubes)
-//	this.handleSampleFailed(tubeIds, res.Response)
-//
-//}
-
-//处理single切片
-//func handleSingleList(singles []Single) string{
-//	var tubeIds []string
-//	for _, data := range singles {
-//		for _, tube := range data.Tubes {
-//			if tube.Oper == true {
-//				tubeIds = append(tubeIds,tube.Id)
-//			}
-//		}
-//	}
-//	//id拼接成","隔开的字符串
-//	  idStr := "'" + strings.Join(tubeIds,"','") + "'"
-//	return idStr
-//}
 
 //修改样本失败状态
 
@@ -681,14 +614,15 @@ func (this *ConverseService) sampleCKSuccessDBModify(idsStr string, parentId int
 	// add by 徐春林 20211224 添加主单Id 作为条件
 	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  from "+TABLE_APPLY_DETAIL+" b where b.BarCode = '"+one.BarCode+"' and b.ParentId = '"+ strconv.Itoa(parentId)+"' ) Where barcode = '"+one.BarCode+"'"
+		// add by   记录冻融次数
+		//beforeSql := "UPDATE "+TABLE_SAMPLE+" a SET a.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 a.FreezingNum = (a.FreezingNum +1 )    Where barcode = '"+one.BarCode+"'"
 		_,err =this.DBE.Exec(beforeSql)
 		if strconv.Itoa(one.RecoveryId) == CK_PASS_ONHOLD {
-			// 查询样本出库详情, 更新 样本冻融次数信息
+			// 查询样本出库详情, 更新 取出帶放回
 			onHold = append(onHold, one.BarCode)
 		} else if strconv.Itoa(one.RecoveryId) == CK_PASS_DONE {
-			// 查询样本出库详情, 更新 样本冻融次数信息
+			// 查询样本出库详情, 更新 取出归档
 			done = append(done, one.BarCode)
 		}
 	}
@@ -1042,6 +976,8 @@ func (this *ConverseService) UpdatePosition(rack_id string, tubes []Tube, entity
 
 
 		this.UpdateDetail(id, entity, parentId, rack_id)
+		//卢传敏  新增更新盒子位置信息操作,因为新的业务处理,冻存管必须放在冻存盒中才能入库
+		this.UpdateBoxInfo(entity,parentId)
 	}
 }