Browse Source

基点设备交互接口优化

luchm 5 years ago
parent
commit
15c7854fa0

+ 1 - 1
src/dashoo.cn/genepoint_srv/business/converseService/converseService.go

@@ -599,7 +599,7 @@ func (this *ConverseService) ModifySampleStatusByApplyMainInfo(entryNo string, r
 		//lite设备 部分管子出库
 		taskType = "tube_retrieving"
 		operaIds, abnormalIds = this.getOperaSampleIdsStr(applyMain.ApplyType, applyMain.Id, resp, entity)
-	} else if applyMain.ApplyType == TASK_TUBE_RETREIVING && resp == "rack_retrieving" && entity.Data.Is_end {
+	} else if applyMain.ApplyType == TASK_TUBE_RETREIVING &&  strings.Contains(resp, "_retrieving") /*resp == "rack_retrieving"*/ /*&& entity.Data.Is_end*/ {
 		//lite设备 整盒出库
 		taskType = "tube_retrieving"
 		operaIds, abnormalIds = this.getAllSampleIdsFromResEntity(entity)

+ 6 - 4
src/dashoo.cn/genepoint_srv/controllers/converse/converse.go

@@ -154,10 +154,6 @@ func (this *ConverseController) HandleMessage(n int, message []byte) {
 		if taskType == "end" || taskType == "abnormal_end" {
 			log.Println(">>>>>>>>>>任务[" + taskId + "]结束(" + taskType + ")处理(是否全部结束:" + utils.ToStr(isEnd) + ")>>>>>>>>>>")
 
-			// 所有入库单下子任务已完成,根据样本申请状态(有一个不为成功则更新为失败状态)更新申请单,任务状态
-			if isEnd {
-				err = this.StatusModifyWithDetail(taskId)
-			}
 			//若非正常结束,保存异常信息
 			if taskType == "abnormal_end" {
 				this.SaveExcepMsg(res, taskId)
@@ -165,6 +161,12 @@ func (this *ConverseController) HandleMessage(n int, message []byte) {
 			//处理任务下申请
 			svc := GetConverseService(utils.DBE)
 			svc.ModifySampleStatusByApplyMainInfo(taskId, resp, res)
+
+			// 所有入库单下子任务已完成,根据样本申请状态(有一个不为成功则更新为失败状态)更新申请单,任务状态
+			if isEnd {
+				err = this.StatusModifyWithDetail(taskId)
+			}
+
 			//this.SampleAllStatusModify(res,SUCCESS)
 		} else if taskType == "task_activate" {
 			log.Println(">>>>>>>>>>任务[" + taskId + "]激活>>>>>>>>>>")