package api

import (
	model "LAPP_LF_MOM_BACKEND/models/qm"
	"sync"
)

// 从mes回写数据时的临时结构体
type AccWorkOrderHeaderJoin struct {
	*ACCWOWORKORDERHEADER
	ScrapyNum       int
	NGNum           int
	CancelNum       int
	AccomplishedNum int
}

// screw相关
// 当前零件的 screw map
var ScrewGlobalMap ScrewMap

// 当前零件的 最新的screw
var ScrewGlobalNewest ScrewSingle

// 当前零件全部记录
var ScrewGlobalArtId ScrewPartNo

type ScrewWithData struct {
	Screw
	PicPath string `json:"PIC_PATH"`
}

type ScrewMap struct {
	Lock sync.RWMutex
	Map  map[string]map[int]ScrewWithData
}

type ScrewSingle struct {
	Lock sync.RWMutex
	Map  map[string]ScrewWithData
}

type ScrewPartNo struct {
	Lock sync.RWMutex
	Map  map[string]string
}

type ReclinerResult struct {
	ACCUNITID ACCUNITID    `json:"aCCUNITID"`
	Views     []model.View `json:"views"`
}
