|
@@ -209,7 +209,7 @@ func (this *ConverseService) GenerateRequestEntity(taskType int, task_id ,user s
|
|
|
data.Task_id = task_id
|
|
data.Task_id = task_id
|
|
|
data.Type = "begin"
|
|
data.Type = "begin"
|
|
|
data.Operation_user = user
|
|
data.Operation_user = user
|
|
|
- data.Operation_mode = "manua"
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
entity := this.GetRequestEntity(requestName, utc, data)
|
|
entity := this.GetRequestEntity(requestName, utc, data)
|
|
|
return entity
|
|
return entity
|
|
@@ -615,7 +615,7 @@ func (this *ConverseService) ModifySampleStatusByApplyMainInfo(entryNo string, r
|
|
|
|
|
|
|
|
for _,value :=range entity.Data.Actual_data{
|
|
for _,value :=range entity.Data.Actual_data{
|
|
|
//获取报文中的 盒子信息
|
|
//获取报文中的 盒子信息
|
|
|
- var Rack_id string = value.Rack_id
|
|
|
|
|
|
|
+ var Rack_id string = value.Target.Rack_id
|
|
|
fmt.Println("冻存盒盒子编号:", Rack_id)
|
|
fmt.Println("冻存盒盒子编号:", Rack_id)
|
|
|
// 获取报文中的 位置信息和 样本编码
|
|
// 获取报文中的 位置信息和 样本编码
|
|
|
var tubes = value.Tubes
|
|
var tubes = value.Tubes
|
|
@@ -753,7 +753,7 @@ func (this *ConverseService) UpdateDetail(BarCode string, entity ResponseEntity,
|
|
|
|
|
|
|
|
|
|
|
|
|
//当 检测到数据 与当前操作盒子的数据一直时,更新 detail 和sample 信息
|
|
//当 检测到数据 与当前操作盒子的数据一直时,更新 detail 和sample 信息
|
|
|
- if entity.Data.Actual_data[i].Rack_id == rack_id{
|
|
|
|
|
|
|
+ if entity.Data.Actual_data[i].Target.Rack_id == rack_id{
|
|
|
sql := "select b.id EquipmentId,a.id,a.XStation,a.YStation from bank_shelf a left join bank_equipment b on a.EquipmentId = b.id where b.cu = '" + utils.ToStr(Cu) + "' " +
|
|
sql := "select b.id EquipmentId,a.id,a.XStation,a.YStation from bank_shelf a left join bank_equipment b on a.EquipmentId = b.id where b.cu = '" + utils.ToStr(Cu) + "' " +
|
|
|
"and a.Ltu = '" + utils.ToStr(Ltu) + "' and a.Unit ='" + utils.ToStr(Unit) + "' and a.Group ='" + utils.ToStr(Group) + "'"
|
|
"and a.Ltu = '" + utils.ToStr(Ltu) + "' and a.Unit ='" + utils.ToStr(Unit) + "' and a.Group ='" + utils.ToStr(Group) + "'"
|
|
|
this.DBE.SQL(sql).Get(&shelf)
|
|
this.DBE.SQL(sql).Get(&shelf)
|
|
@@ -776,7 +776,7 @@ func (this *ConverseService) UpdateDetail(BarCode string, entity ResponseEntity,
|
|
|
*/
|
|
*/
|
|
|
func (this *ConverseService) UpdatePosition(rack_id string, tubes []Tube, entity ResponseEntity, parentId int) {
|
|
func (this *ConverseService) UpdatePosition(rack_id string, tubes []Tube, entity ResponseEntity, parentId int) {
|
|
|
// 根据返回的报文中的盒子标识,获取盒子类型
|
|
// 根据返回的报文中的盒子标识,获取盒子类型
|
|
|
- sql := "select RowNum,ColumnNum from bank_box where Barcode ='" + rack_id + "'"
|
|
|
|
|
|
|
+ sql := "select Id,RowNum,ColumnNum from bank_box where Barcode ='" + rack_id + "'"
|
|
|
var box Box
|
|
var box Box
|
|
|
this.DBE.SQL(sql).Get(&box)
|
|
this.DBE.SQL(sql).Get(&box)
|
|
|
RowNum := box.RowNum
|
|
RowNum := box.RowNum
|
|
@@ -799,7 +799,7 @@ func (this *ConverseService) UpdatePosition(rack_id string, tubes []Tube, entity
|
|
|
|
|
|
|
|
glog.Info("管子在盒子中的位置坐标为:", box_y, ";", box_x)
|
|
glog.Info("管子在盒子中的位置坐标为:", box_y, ";", box_x)
|
|
|
var position = utils.NumberToLetter(box_x) + utils.ToStr(box_y)
|
|
var position = utils.NumberToLetter(box_x) + utils.ToStr(box_y)
|
|
|
- sql = "update bank_sample set Position = '" + utils.ToStr(box_y) + ";" + utils.ToStr(box_x) + "' ,PositionInfo = concat( REVERSE(SUBSTR(REVERSE(PositionInfo) FROM INSTR(REVERSE(PositionInfo),'-')+1)),'-" + position + "' ) where barcode ='" + id + "' "
|
|
|
|
|
|
|
+ sql = "update bank_sample set BoxId = '"+utils.ToStr(box.Id)+"',Position = '" + utils.ToStr(box_y) + ";" + utils.ToStr(box_x) + "' ,PositionInfo = concat( REVERSE(SUBSTR(REVERSE(PositionInfo) FROM INSTR(REVERSE(PositionInfo),'-')+1)),'-" + position + "' ) where barcode ='" + id + "' "
|
|
|
//执行sql 更新位置和坐标信息
|
|
//执行sql 更新位置和坐标信息
|
|
|
this.DBE.Exec(sql)
|
|
this.DBE.Exec(sql)
|
|
|
this.UpdateDetail(id, entity, parentId,rack_id)
|
|
this.UpdateDetail(id, entity, parentId,rack_id)
|