wip
This commit is contained in:
commit
cf9ea20a62
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
vendor
|
9
cmd/main.go
Normal file
9
cmd/main.go
Normal file
@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import "git.espin.casa/albert/cml04-gdm-int/internal/app"
|
||||
|
||||
func main() {
|
||||
if err := app.Run(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
22
go.mod
Normal file
22
go.mod
Normal file
@ -0,0 +1,22 @@
|
||||
module git.espin.casa/albert/cml04-gdm-int
|
||||
|
||||
go 1.22.0
|
||||
|
||||
require (
|
||||
git.espin.casa/albert/logger v0.0.0-20240221100041-dc3cb01119a3
|
||||
github.com/microsoft/go-mssqldb v1.6.0
|
||||
google.golang.org/grpc v1.61.1
|
||||
google.golang.org/protobuf v1.32.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
|
||||
github.com/golang-sql/sqlexp v0.1.0 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
golang.org/x/crypto v0.15.0 // indirect
|
||||
golang.org/x/net v0.18.0 // indirect
|
||||
golang.org/x/sys v0.14.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
||||
)
|
67
go.sum
Normal file
67
go.sum
Normal file
@ -0,0 +1,67 @@
|
||||
git.espin.casa/albert/logger v0.0.0-20240221100041-dc3cb01119a3 h1:HUEESn4o8sVXAUJWGJAATeitiNRxVzzwBU8RiIW4Wzc=
|
||||
git.espin.casa/albert/logger v0.0.0-20240221100041-dc3cb01119a3/go.mod h1:P1yAUiotJurq7j/wZt6Cnel17HChplkz0E40WD8a5to=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.0 h1:yfJe15aSwEQ6Oo6J+gdfdulPNoZ3TEhmbhLIoxZcA+U=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.0/go.mod h1:Q28U+75mpCaSCDowNEmhIo/rmgdkqmkmzI7N6TGR4UY=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v0.8.0 h1:T028gtTPiYt/RMUfs8nVsAL7FDQrfLlrm/NnRG/zcC4=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v0.8.0/go.mod h1:cw4zVQgBby0Z5f2v0itn6se2dDP17nTjbZFXW5uPyHA=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0 h1:HCc0+LpPfpCKs6LGGLAhwBARt9632unrVcI6i8s/8os=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE=
|
||||
github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
|
||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
|
||||
github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
|
||||
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/microsoft/go-mssqldb v1.6.0 h1:mM3gYdVwEPFrlg/Dvr2DNVEgYFG7L42l+dGc67NNNpc=
|
||||
github.com/microsoft/go-mssqldb v1.6.0/go.mod h1:00mDtPbeQCRGC1HwOOR5K/gr30P1NcEG0vx6Kbv2aJU=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA=
|
||||
golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g=
|
||||
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
|
||||
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
|
||||
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA=
|
||||
google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY=
|
||||
google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
|
||||
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
96
internal/app/app.go
Normal file
96
internal/app/app.go
Normal file
@ -0,0 +1,96 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"net"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"git.espin.casa/albert/cml04-gdm-int/internal/logging"
|
||||
"git.espin.casa/albert/cml04-gdm-int/internal/rspdb"
|
||||
"git.espin.casa/albert/cml04-gdm-int/internal/server"
|
||||
"git.espin.casa/albert/cml04-gdm-int/internal/service"
|
||||
"git.espin.casa/albert/cml04-gdm-int/pkg/api"
|
||||
"git.espin.casa/albert/logger"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/reflection"
|
||||
)
|
||||
|
||||
const (
|
||||
NSQTopic string = "RSMIN"
|
||||
)
|
||||
|
||||
func Run() error {
|
||||
// flags
|
||||
restAddress := flag.String("rest-addr", "0.0.0.0:3333", "http port")
|
||||
logLevel := flag.String("level", "debug", "Log level")
|
||||
flag.Parse()
|
||||
// setup logger
|
||||
log := logger.New(os.Stdout, *logLevel)
|
||||
// log fields
|
||||
logFields := logger.LogFields{
|
||||
"log_level": *logLevel,
|
||||
"rest_address": *restAddress,
|
||||
}
|
||||
// create roll shop db
|
||||
rollShopDB, err := rspdb.NewRspDB(rspdb.RspDBDefaultConfig())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer rollShopDB.Close()
|
||||
// create service
|
||||
svc := service.NewService(rollShopDB)
|
||||
// create logging service
|
||||
svc = logging.NewLoggingService(log, svc)
|
||||
// create rest server
|
||||
server := server.NewServer(svc)
|
||||
// start service
|
||||
s := grpc.NewServer()
|
||||
// register service
|
||||
api.RegisterRollDataServiceServer(s, server)
|
||||
// reflection
|
||||
reflection.Register(s)
|
||||
// start server
|
||||
// create grpc server
|
||||
lis, err := net.Listen("tcp", *restAddress)
|
||||
if err != nil {
|
||||
log.Error("failed to listen", err, logFields)
|
||||
return err
|
||||
}
|
||||
// start service server
|
||||
go func() {
|
||||
if err := s.Serve(lis); err != nil {
|
||||
log.Error("failed to serve gRPC", err, logFields)
|
||||
return
|
||||
}
|
||||
}()
|
||||
// info banner
|
||||
log.Info("started cml04-gdm-int service", logFields)
|
||||
// wait signal to finish
|
||||
signal := WaitSignal()
|
||||
log.Info("signal received", logFields.Add(logger.LogFields.Add(logFields, logger.LogFields{
|
||||
"signal": signal,
|
||||
})))
|
||||
// stop grpc service
|
||||
s.GracefulStop()
|
||||
return nil
|
||||
}
|
||||
|
||||
// WaitSignal catching exit signal
|
||||
func WaitSignal() os.Signal {
|
||||
ch := make(chan os.Signal, 2)
|
||||
signal.Notify(
|
||||
ch,
|
||||
syscall.SIGINT,
|
||||
syscall.SIGQUIT,
|
||||
syscall.SIGTERM,
|
||||
)
|
||||
for {
|
||||
sig := <-ch
|
||||
switch sig {
|
||||
case syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM:
|
||||
return sig
|
||||
}
|
||||
}
|
||||
}
|
26
internal/helpers/helper.go
Normal file
26
internal/helpers/helper.go
Normal file
@ -0,0 +1,26 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"time"
|
||||
)
|
||||
|
||||
func CleanString(input string) string {
|
||||
return regexp.MustCompile("[^a-zA-Z0-9]+").ReplaceAllString(input, "")
|
||||
}
|
||||
|
||||
func HeaderTimeStamp(t time.Time) [8]int16 {
|
||||
year := t.Year() % 100
|
||||
|
||||
timeStamp := [8]int16{
|
||||
int16(20),
|
||||
int16(year),
|
||||
int16(t.Month()),
|
||||
int16(t.Day()),
|
||||
int16(t.Hour()),
|
||||
int16(t.Minute()),
|
||||
int16(t.Second()),
|
||||
int16(t.Nanosecond() / 1e6),
|
||||
}
|
||||
return timeStamp
|
||||
}
|
40
internal/helpers/helper_test.go
Normal file
40
internal/helpers/helper_test.go
Normal file
@ -0,0 +1,40 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestCleanString(t *testing.T) {
|
||||
tests := []struct {
|
||||
input string
|
||||
expected string
|
||||
}{
|
||||
{"hello123", "hello123"},
|
||||
{"_hello_123_", "hello123"},
|
||||
{"!@#$%^hello&*()123", "hello123"},
|
||||
{"", ""},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
result := CleanString(test.input)
|
||||
if result != test.expected {
|
||||
t.Errorf("Input: %s, Expected: %s, Got: %s", test.input, test.expected, result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestHeaderTimeStamp(t *testing.T) {
|
||||
// Stub the current time for testing purposes
|
||||
// Fixed time for consistent results
|
||||
now := time.Date(2024, 2, 20, 12, 30, 45, 0, time.UTC)
|
||||
expectedTimeStamp := [8]int16{20, 24, 2, 20, 12, 30, 45, 0}
|
||||
|
||||
result := HeaderTimeStamp(now)
|
||||
|
||||
for i, v := range result {
|
||||
if v != expectedTimeStamp[i] {
|
||||
t.Errorf("Expected: %d, Got: %d", expectedTimeStamp[i], v)
|
||||
}
|
||||
}
|
||||
}
|
87
internal/logging/logging.go
Normal file
87
internal/logging/logging.go
Normal file
@ -0,0 +1,87 @@
|
||||
package logging
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.espin.casa/albert/cml04-gdm-int/internal/service"
|
||||
"git.espin.casa/albert/cml04-gdm-int/pkg/api"
|
||||
"git.espin.casa/albert/logger"
|
||||
)
|
||||
|
||||
type Logging struct {
|
||||
log logger.LoggerAdapter
|
||||
next service.IService
|
||||
}
|
||||
|
||||
// BdRollData implements service.IService.
|
||||
func (svc *Logging) BdRollData(ctx context.Context, req *api.BdRollDataReq) (res *api.BdRollDataRes, err error) {
|
||||
defer func(start time.Time) {
|
||||
logFields := logger.LogFields{
|
||||
"took": time.Since(start),
|
||||
"sender": req.GetSender(),
|
||||
"roll_id": req.GetRollId(),
|
||||
}
|
||||
if err != nil {
|
||||
svc.log.Error("Break Down Roll Data failed", err, logFields)
|
||||
} else {
|
||||
svc.log.Info("Break Down Roll Data success", logFields)
|
||||
}
|
||||
}(time.Now())
|
||||
return svc.next.BdRollData(ctx, req)
|
||||
}
|
||||
|
||||
// EdRollData implements service.IService.
|
||||
func (svc *Logging) EdRollData(ctx context.Context, req *api.EdRollDataReq) (res *api.EdRollDataRes, err error) {
|
||||
defer func(start time.Time) {
|
||||
logFields := logger.LogFields{
|
||||
"took": time.Since(start),
|
||||
"sender": req.GetSender(),
|
||||
"roll_id": req.GetRollId(),
|
||||
}
|
||||
if err != nil {
|
||||
svc.log.Error("Edge Roll Data failed", err, logFields)
|
||||
} else {
|
||||
svc.log.Info("Edge Roll Data success", logFields)
|
||||
}
|
||||
}(time.Now())
|
||||
return svc.next.EdRollData(ctx, req)
|
||||
}
|
||||
|
||||
// UfRollData implements service.IService.
|
||||
func (svc *Logging) UfRollData(ctx context.Context, req *api.UfRollDataReq) (res *api.UfRollDataRes, err error) {
|
||||
defer func(start time.Time) {
|
||||
logFields := logger.LogFields{
|
||||
"took": time.Since(start),
|
||||
"sender": req.GetSender(),
|
||||
"roll_id": req.GetRollId(),
|
||||
}
|
||||
if err != nil {
|
||||
svc.log.Error("Universal Finishing Roll Data failed", err, logFields)
|
||||
} else {
|
||||
svc.log.Info("Universal Finishing Roll Data success", logFields)
|
||||
}
|
||||
}(time.Now())
|
||||
return svc.next.UfRollData(ctx, req)
|
||||
}
|
||||
|
||||
// UrRollData implements service.IService.
|
||||
func (svc *Logging) UrRollData(ctx context.Context, req *api.UrRollDataReq) (res *api.UrRollDataRes, err error) {
|
||||
defer func(start time.Time) {
|
||||
logFields := logger.LogFields{
|
||||
"took": time.Since(start),
|
||||
"sender": req.GetSender(),
|
||||
"roll_id": req.GetRollId(),
|
||||
}
|
||||
if err != nil {
|
||||
svc.log.Error("Universal Rolling Roll Data failed", err, logFields)
|
||||
} else {
|
||||
svc.log.Info("Universal Rolling Roll Data success", logFields)
|
||||
}
|
||||
}(time.Now())
|
||||
return svc.next.UrRollData(ctx, req)
|
||||
}
|
||||
|
||||
func NewLoggingService(log logger.LoggerAdapter, next service.IService) service.IService {
|
||||
return &Logging{log, next}
|
||||
}
|
703
internal/rspdb/rspdb.go
Normal file
703
internal/rspdb/rspdb.go
Normal file
@ -0,0 +1,703 @@
|
||||
package rspdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"git.espin.casa/albert/cml04-gdm-int/pkg/api"
|
||||
_ "github.com/microsoft/go-mssqldb"
|
||||
)
|
||||
|
||||
var (
|
||||
BreakDownRollDataQuery string = `SELECT BD_ROLL_SET_DATE, BD_ROLL_SET_ID, BD_TOP_ROLL_NUMBER, BD_BOT_ROLL_NUMBER, BD_ROLL_MATERIAL, BD_ROLL_INSTALL_POS, BD_ROLL_SET_TYPE, BD_ROLL_DIAM_NOM_ACT_TOP, BD_ROLL_DIAM_NOM_ACT_BOT, BD_ROLL_NOMINAL_GAP, BD_ROLL_GROOVES, BD_ROLL_GROOVE_WIDTH0, BD_ROLL_GROOVE_WIDTH1, BD_ROLL_GROOVE_WIDTH2, BD_ROLL_GROOVE_WIDTH3, BD_ROLL_GROOVE_WIDTH4, BD_ROLL_GROOVE_WIDTH5, BD_ROLL_GROOVE_WIDTH6, BD_ROLL_GROOVE_WIDTH7, BD_ROLL_GROOVE_WIDTH8, BD_ROLL_GROOVE_WIDTH9, BD_ROLL_GROOVE_STIFFNESS_TOP0, BD_ROLL_GROOVE_STIFFNESS_TOP1, BD_ROLL_GROOVE_STIFFNESS_TOP2, BD_ROLL_GROOVE_STIFFNESS_TOP3, BD_ROLL_GROOVE_STIFFNESS_TOP4, BD_ROLL_GROOVE_STIFFNESS_TOP5, BD_ROLL_GROOVE_STIFFNESS_TOP6, BD_ROLL_GROOVE_STIFFNESS_TOP7, BD_ROLL_GROOVE_STIFFNESS_TOP8, BD_ROLL_GROOVE_STIFFNESS_TOP9, BD_ROLL_GROOVE_STIFFNESS_BOT0, BD_ROLL_GROOVE_STIFFNESS_BOT1, BD_ROLL_GROOVE_STIFFNESS_BOT2, BD_ROLL_GROOVE_STIFFNESS_BOT3, BD_ROLL_GROOVE_STIFFNESS_BOT4, BD_ROLL_GROOVE_STIFFNESS_BOT5, BD_ROLL_GROOVE_STIFFNESS_BOT6, BD_ROLL_GROOVE_STIFFNESS_BOT7, BD_ROLL_GROOVE_STIFFNESS_BOT8, BD_ROLL_GROOVE_STIFFNESS_BOT9, BD_ROLL_GROOVE_POS0, BD_ROLL_GROOVE_POS1, BD_ROLL_GROOVE_POS2, BD_ROLL_GROOVE_POS3, BD_ROLL_GROOVE_POS4, BD_ROLL_GROOVE_POS5, BD_ROLL_GROOVE_POS6, BD_ROLL_GROOVE_POS7, BD_ROLL_GROOVE_POS8, BD_ROLL_GROOVE_POS9, BD_ROLL_GROOVE_SHARP0, BD_ROLL_GROOVE_SHARP1, BD_ROLL_GROOVE_SHARP2, BD_ROLL_GROOVE_SHARP3, BD_ROLL_GROOVE_SHARP4, BD_ROLL_GROOVE_SHARP5, BD_ROLL_GROOVE_SHARP6, BD_ROLL_GROOVE_SHARP7, BD_ROLL_GROOVE_SHARP8, BD_ROLL_GROOVE_SHARP9, BD_ROLL_GROOVE_DEPTH0, BD_ROLL_GROOVE_DEPTH1, BD_ROLL_GROOVE_DEPTH2, BD_ROLL_GROOVE_DEPTH3, BD_ROLL_GROOVE_DEPTH4, BD_ROLL_GROOVE_DEPTH5, BD_ROLL_GROOVE_DEPTH6, BD_ROLL_GROOVE_DEPTH7, BD_ROLL_GROOVE_DEPTH8, BD_ROLL_GROOVE_DEPTH9, BD_ROLL_ASSEMBLY_STATUS, BD_NO_OF_FIN_SEC, BD_INIT_SEC0, BD_INIT_SEC1, BD_INIT_SEC2, BD_INIT_SEC3, BD_INIT_SEC4, BD_FIN_SEC0, BD_FIN_SEC1, BD_FIN_SEC2, BD_FIN_SEC3, BD_FIN_SEC4, BD_ROLL_ACTUAL_SHIMPS_TOP, BD_ROLL_ACTUAL_SHIMPS_BOT, BD_TONNAGE_ACCUM0, BD_TONNAGE_ACCUM1, BD_TONNAGE_ACCUM2, BD_TONNAGE_ACCUM3, BD_TONNAGE_ACCUM4, BD_TONNAGE_ACCUM5, BD_TONNAGE_ACCUM6, BD_TONNAGE_ACCUM7, BD_TONNAGE_ACCUM8, BD_TONNAGE_ACCUM9, BD_ROLL_ID, BD_DEL_FLAG, BD_ROLL_SET_ID_OLD, BD_FIN_SEC5, BD_FIN_SEC6, BD_FIN_SEC7, BD_FIN_SEC8, BD_FIN_SEC9, BD_FIN_SEC10, BD_FIN_SEC11, BD_FIN_SEC12, BD_FIN_SEC13, BD_FIN_SEC14, BD_FIN_SEC15, BD_FIN_SEC16, BD_FIN_SEC17, BD_FIN_SEC18, BD_FIN_SEC19, OLD_FLAG, ALTURA_BARRON_SALIDA, ALTURA_BARRON_ENTRADA, FAMILIA, CORRECCION, ESTADO_REGISTRO, FECHA_REGISTRO, FECHA_ENVIO
|
||||
FROM gdm_rspid_BD WHERE BD_ROLL_ID = '%s'`
|
||||
UniversalRoughingDataQuery string = `SELECT UR_ROLL_SET_DATE, UR_ROLL_SET_ID, UR_ROLL_SET_ID_HROLLS, UR_HTO_ROLL_NUMBER, UR_HBO_ROLL_NUMBER, UR_ROLL_INSTALL_POS, UR_ROLL_SET_TYPE, UR_TONNAGE_ACCUM0, UR_TONNAGE_ACCUM1, UR_TONNAGE_ACCUM2, UR_TONNAGE_ACCUM3, UR_TONNAGE_ACCUM4, UR_TONNAGE_ACCUM5, UR_TONNAGE_ACCUM6, UR_TONNAGE_ACCUM7, UR_TONNAGE_ACCUM8, UR_TONNAGE_ACCUM9, UR_CHANGE_SLEEVE_LENGTH, UR_CHANGE_SLEEVE_DEPTH, UR_ROLL_ASSEMBLY_STATUS, UR_NO_OF_FIN_SEC, UR_INIT_SEC0, UR_INIT_SEC1, UR_INIT_SEC2, UR_INIT_SEC3, UR_INIT_SEC4, UR_FIN_SEC0, UR_FIN_SEC1, UR_FIN_SEC2, UR_FIN_SEC3, UR_FIN_SEC4, UR_ROLL_MATERIAL_H, UR_ROLL_DIAM_ACT_HBO, UR_ROLL_DIAM_ACT_HTP, UR_H_NOMGAP, UR_ACTUAL_SHIMPS_HBO, UR_ACTUAL_SHIMPS_HTP, UR_ROLL_BARREL_WIDTH_HBO, UR_ROLL_BARREL_WIDTH_HTP, UR_ROLL_CHAM_WIDTH_HBO, UR_ROLL_CHAM_WIDTH_HTP, UR_ROLL_ANGLE_HBO, UR_ROLL_ANGLE_HTB, UR_ROLL_SET_ID_VROLLS, UR_VDS_ROLL_NUMBER, UR_VOS_ROLL_NUMBER, UR_ROLL_MATERIAL_V, UR_ROLL_DIAM_ACT_VDS, UR_ROLL_DIAM_ACT_VOS, UR_ROLL_ANGLE_VDS, UR_ROLL_ANGLE_VOS, UR_PASSLINE_OFFSET, UR_ACTUAL_SHIMPS_VDS_1, UR_ACTUAL_SHIMPS_VDS_2, UR_ACTUAL_SHIMPS_VOS_1, UR_ACTUAL_SHIMPS_VOS_2, UR_PIN_V_CHOCK, UR_ROLL_GROOVES, UR_ROLL_GROOVE_WIDTH0, UR_ROLL_GROOVE_WIDTH1, UR_ROLL_GROOVE_WIDTH2, UR_ROLL_GROOVE_WIDTH3, UR_ROLL_GROOVE_WIDTH4, UR_ROLL_GROOVE_WIDTH5, UR_ROLL_GROOVE_WIDTH6, UR_ROLL_GROOVE_WIDTH7, UR_ROLL_GROOVE_WIDTH8, UR_ROLL_GROOVE_WIDTH9, UR_ROLL_GROOVE_STIFFNESS_TOP0, UR_ROLL_GROOVE_STIFFNESS_TOP1, UR_ROLL_GROOVE_STIFFNESS_TOP2, UR_ROLL_GROOVE_STIFFNESS_TOP3, UR_ROLL_GROOVE_STIFFNESS_TOP4, UR_ROLL_GROOVE_STIFFNESS_TOP5, UR_ROLL_GROOVE_STIFFNESS_TOP6, UR_ROLL_GROOVE_STIFFNESS_TOP7, UR_ROLL_GROOVE_STIFFNESS_TOP8, UR_ROLL_GROOVE_STIFFNESS_TOP9, UR_ROLL_GROOVE_STIFFNESS_BOT0, UR_ROLL_GROOVE_STIFFNESS_BOT1, UR_ROLL_GROOVE_STIFFNESS_BOT2, UR_ROLL_GROOVE_STIFFNESS_BOT3, UR_ROLL_GROOVE_STIFFNESS_BOT4, UR_ROLL_GROOVE_STIFFNESS_BOT5, UR_ROLL_GROOVE_STIFFNESS_BOT6, UR_ROLL_GROOVE_STIFFNESS_BOT7, UR_ROLL_GROOVE_STIFFNESS_BOT8, UR_ROLL_GROOVE_STIFFNESS_BOT9, UR_ROLL_GROOVE_POS0, UR_ROLL_GROOVE_POS1, UR_ROLL_GROOVE_POS2, UR_ROLL_GROOVE_POS3, UR_ROLL_GROOVE_POS4, UR_ROLL_GROOVE_POS5, UR_ROLL_GROOVE_POS6, UR_ROLL_GROOVE_POS7, UR_ROLL_GROOVE_POS8, UR_ROLL_GROOVE_POS9, UR_ROLL_GROOVE_SHARP0, UR_ROLL_GROOVE_SHARP1, UR_ROLL_GROOVE_SHARP2, UR_ROLL_GROOVE_SHARP3, UR_ROLL_GROOVE_SHARP4, UR_ROLL_GROOVE_SHARP5, UR_ROLL_GROOVE_SHARP6, UR_ROLL_GROOVE_SHARP7, UR_ROLL_GROOVE_SHARP8, UR_ROLL_GROOVE_SHARP9,ISNULL(UR_ROLL_THRUST_PLATE,0), UR_ROLL_ID, UR_DEL_FLAG, UR_ROLL_SET_ID_OLD, TOP_SHAFT_UR, BOT_SHAFT_UR, UR_FIN_SEC5, UR_FIN_SEC6, UR_FIN_SEC7, UR_FIN_SEC8, UR_FIN_SEC9, UR_FIN_SEC10, UR_FIN_SEC11, UR_FIN_SEC12, UR_FIN_SEC13, UR_FIN_SEC14, UR_FIN_SEC15, UR_FIN_SEC16, UR_FIN_SEC17, UR_FIN_SEC18, UR_FIN_SEC19, OLD_FLAG, ISNULL(AMPUESA_CORTA,0), ESTADO_REGISTRO, FECHA_REGISTRO, FECHA_ENVIO
|
||||
FROM gdm_rspid_UR WHERE UR_ROLL_ID = '%s'`
|
||||
EdgerDataQuery string = `SELECT ED_ROLL_SET_DATE, ED_ROLL_SET_ID, ED_TOP_ROLL_NUMBER, ED_BOT_ROLL_NUMBER, ED_ROLL_MATERIAL, ED_ROLL_INSTALL_POS, ED_ROLL_SET_TYPE, ED_ROLL_DIAM_NOM_HTP, ED_ROLL_DIAM_NOM_HBO, ED_ROLL_NOMINAL_GAP, ED_ROLL_ASSEMBLY_STATUS, ED_NO_OF_FIN_SEC, ED_INIT_SEC0, ED_INIT_SEC1, ED_INIT_SEC2, ED_INIT_SEC3, ED_INIT_SEC4, ED_FIN_SEC0, ED_FIN_SEC1, ED_FIN_SEC2, ED_FIN_SEC3, ED_FIN_SEC4, ED_ROLL_NO_OF_GROOVES, ED_ROLL_GROOVE_STIFF_TOP0, ED_ROLL_GROOVE_STIFF_TOP1, ED_ROLL_GROOVE_STIFF_TOP2, ED_ROLL_GROOVE_STIFF_TOP3, ED_ROLL_GROOVE_STIFF_TOP4, ED_ROLL_GROOVE_STIFF_TOP5, ED_ROLL_GROOVE_STIFF_TOP6, ED_ROLL_GROOVE_STIFF_TOP7, ED_ROLL_GROOVE_STIFF_TOP8, ED_ROLL_GROOVE_STIFF_TOP9, ED_ROLL_GROOVE_STIFF_BOT0, ED_ROLL_GROOVE_STIFF_BOT1, ED_ROLL_GROOVE_STIFF_BOT2, ED_ROLL_GROOVE_STIFF_BOT3, ED_ROLL_GROOVE_STIFF_BOT4, ED_ROLL_GROOVE_STIFF_BOT5, ED_ROLL_GROOVE_STIFF_BOT6, ED_ROLL_GROOVE_STIFF_BOT7, ED_ROLL_GROOVE_STIFF_BOT8, ED_ROLL_GROOVE_STIFF_BOT9, ED_ROLL_GROOVE_POS0, ED_ROLL_GROOVE_POS1, ED_ROLL_GROOVE_POS2, ED_ROLL_GROOVE_POS3, ED_ROLL_GROOVE_POS4, ED_ROLL_GROOVE_POS5, ED_ROLL_GROOVE_POS6, ED_ROLL_GROOVE_POS7, ED_ROLL_GROOVE_POS8, ED_ROLL_GROOVE_POS9, ED_ACTUAL_SHIMPS_HBO, ED_ACTUAL_SHIMPS_HTP, ED_CHANGE_SLEEVE_LENGTH, ED_CHANGE_SLEEVE_DEPTH, ED_TONNAGE_ACCUM0, ED_TONNAGE_ACCUM1, ED_TONNAGE_ACCUM2, ED_TONNAGE_ACCUM3, ED_TONNAGE_ACCUM4, ED_TONNAGE_ACCUM5, ED_TONNAGE_ACCUM6, ED_TONNAGE_ACCUM7, ED_TONNAGE_ACCUM8, ED_TONNAGE_ACCUM9, ED_ROLL_FLANGE_DIAM_TOP0, ED_ROLL_FLANGE_DIAM_TOP1, ED_ROLL_FLANGE_DIAM_TOP2, ED_ROLL_FLANGE_DIAM_TOP3, ED_ROLL_FLANGE_DIAM_TOP4, ED_ROLL_FLANGE_DIAM_TOP5, ED_ROLL_FLANGE_DIAM_TOP6, ED_ROLL_FLANGE_DIAM_TOP7, ED_ROLL_FLANGE_DIAM_TOP8, ED_ROLL_FLANGE_DIAM_TOP9, ED_ROLL_FLANGE_DIAM_BOT0, ED_ROLL_FLANGE_DIAM_BOT1, ED_ROLL_FLANGE_DIAM_BOT2, ED_ROLL_FLANGE_DIAM_BOT3, ED_ROLL_FLANGE_DIAM_BOT4, ED_ROLL_FLANGE_DIAM_BOT5, ED_ROLL_FLANGE_DIAM_BOT6, ED_ROLL_FLANGE_DIAM_BOT7, ED_ROLL_FLANGE_DIAM_BOT8, ED_ROLL_FLANGE_DIAM_BOT9, ED_ROLL_WEB_DIAM_TOP0, ED_ROLL_WEB_DIAM_TOP1, ED_ROLL_WEB_DIAM_TOP2, ED_ROLL_WEB_DIAM_TOP3, ED_ROLL_WEB_DIAM_TOP4, ED_ROLL_WEB_DIAM_TOP5, ED_ROLL_WEB_DIAM_TOP6, ED_ROLL_WEB_DIAM_TOP7, ED_ROLL_WEB_DIAM_TOP8, ED_ROLL_WEB_DIAM_TOP9, ED_ROLL_WEB_DIAM_BOT0, ED_ROLL_WEB_DIAM_BOT1, ED_ROLL_WEB_DIAM_BOT2, ED_ROLL_WEB_DIAM_BOT3, ED_ROLL_WEB_DIAM_BOT4, ED_ROLL_WEB_DIAM_BOT5, ED_ROLL_WEB_DIAM_BOT6, ED_ROLL_WEB_DIAM_BOT7, ED_ROLL_WEB_DIAM_BOT8, ED_ROLL_WEB_DIAM_BOT9, ED_ROLL_CHAM_WIDTH_TOP0, ED_ROLL_CHAM_WIDTH_TOP1, ED_ROLL_CHAM_WIDTH_TOP2, ED_ROLL_CHAM_WIDTH_TOP3, ED_ROLL_CHAM_WIDTH_TOP4, ED_ROLL_CHAM_WIDTH_TOP5, ED_ROLL_CHAM_WIDTH_TOP6, ED_ROLL_CHAM_WIDTH_TOP7, ED_ROLL_CHAM_WIDTH_TOP8, ED_ROLL_CHAM_WIDTH_TOP9, ED_ROLL_CHAM_WIDTH_BOT0, ED_ROLL_CHAM_WIDTH_BOT1, ED_ROLL_CHAM_WIDTH_BOT2, ED_ROLL_CHAM_WIDTH_BOT3, ED_ROLL_CHAM_WIDTH_BOT4, ED_ROLL_CHAM_WIDTH_BOT5, ED_ROLL_CHAM_WIDTH_BOT6, ED_ROLL_CHAM_WIDTH_BOT7, ED_ROLL_CHAM_WIDTH_BOT8, ED_ROLL_CHAM_WIDTH_BOT9, ED_ROLL_ANGLE_FLANGE_FACE0, ED_ROLL_ANGLE_FLANGE_FACE1, ED_ROLL_ANGLE_FLANGE_FACE2, ED_ROLL_ANGLE_FLANGE_FACE3, ED_ROLL_ANGLE_FLANGE_FACE4, ED_ROLL_ANGLE_FLANGE_FACE5, ED_ROLL_ANGLE_FLANGE_FACE6, ED_ROLL_ANGLE_FLANGE_FACE7, ED_ROLL_ANGLE_FLANGE_FACE8, ED_ROLL_ANGLE_FLANGE_FACE9, ED_ROLL_ROOT_RADIUS0, ED_ROLL_ROOT_RADIUS1, ED_ROLL_ROOT_RADIUS2, ED_ROLL_ROOT_RADIUS3, ED_ROLL_ROOT_RADIUS4, ED_ROLL_ROOT_RADIUS5, ED_ROLL_ROOT_RADIUS6, ED_ROLL_ROOT_RADIUS7, ED_ROLL_ROOT_RADIUS8, ED_ROLL_ROOT_RADIUS9, ED_PASSLINE_OFFSET, ED_D_ROLL_GROOVE_SHARP0, ED_D_ROLL_GROOVE_SHARP1, ED_D_ROLL_GROOVE_SHARP2, ED_D_ROLL_GROOVE_SHARP3, ED_D_ROLL_GROOVE_SHARP4, ED_D_ROLL_GROOVE_SHARP5, ED_D_ROLL_GROOVE_SHARP6, ED_D_ROLL_GROOVE_SHARP7, ED_D_ROLL_GROOVE_SHARP8, ED_D_ROLL_GROOVE_SHARP9, ED_D_ROLL_GROOVE_WIDTH0, ED_D_ROLL_GROOVE_WIDTH1, ED_D_ROLL_GROOVE_WIDTH2, ED_D_ROLL_GROOVE_WIDTH3, ED_D_ROLL_GROOVE_WIDTH4, ED_D_ROLL_GROOVE_WIDTH5, ED_D_ROLL_GROOVE_WIDTH6, ED_D_ROLL_GROOVE_WIDTH7, ED_D_ROLL_GROOVE_WIDTH8, ED_D_ROLL_GROOVE_WIDTH9, ED_ROLL_ID, ED_DEL_FLAG, ED_ROLL_SET_ID_OLD, ED_FIN_SEC5, ED_FIN_SEC6, ED_FIN_SEC7, ED_FIN_SEC8, ED_FIN_SEC9, ED_FIN_SEC10, ED_FIN_SEC11, ED_FIN_SEC12, ED_FIN_SEC13, ED_FIN_SEC14, ED_FIN_SEC15, ED_FIN_SEC16, ED_FIN_SEC17, ED_FIN_SEC18, ED_FIN_SEC19, OLD_FLAG, ESTADO_REGISTRO, FECHA_REGISTRO, FECHA_ENVIO
|
||||
FROM gdm_rspid_EDG WHERE ED_ROLL_ID = '%s'`
|
||||
UniversalFinishingDataQuery string = `SELECT UF_ROLL_SET_DATE, UF_ROLL_SET_ID, UF_ROLL_SET_ID_HROLLS, UF_HTO_ROLL_NUMBER, UF_HBO_ROLL_NUMBER, UF_ROLL_INSTALL_POS, UF_ROLL_SET_TYPE, UF_TONNAGE_ACCUM0, UF_TONNAGE_ACCUM1, UF_TONNAGE_ACCUM2, UF_TONNAGE_ACCUM3, UF_TONNAGE_ACCUM4, UF_TONNAGE_ACCUM5, UF_TONNAGE_ACCUM6, UF_TONNAGE_ACCUM7, UF_TONNAGE_ACCUM8, UF_TONNAGE_ACCUM9, UF_CHANGE_SLEEVE_LENGTH, UF_CHANGE_SLEEVE_DEPTH, UF_ROLL_ASSEMBLY_STATUS, UF_NO_OF_FIN_SEC, UF_INIT_SEC0, UF_INIT_SEC1, UF_INIT_SEC2, UF_INIT_SEC3, UF_INIT_SEC4, UF_FIN_SEC0, UF_FIN_SEC1, UF_FIN_SEC2, UF_FIN_SEC3, UF_FIN_SEC4, UF_ROLL_MATERIAL_H, UF_ROLL_DIAM_ACT_HBO, UF_ROLL_DIAM_ACT_HTP, UF_H_NOMGAP, UF_ACTUAL_SHIMPS_HBO, UF_ACTUAL_SHIMPS_HTP, UF_ROLL_BARREL_WIDTH_HBO, UF_ROLL_BARREL_WIDTH_HTP, UF_ROLL_CHAM_WIDTH_HBO, UF_ROLL_CHAM_WIDTH_HTP, UF_ROLL_ANGLE_HBO, UF_ROLL_ANGLE_HTB, UF_ROLL_SET_ID_VROLLS, UF_VDS_ROLL_NUMBER, UF_VOS_ROLL_NUMBER, UF_ROLL_MATERIAL_V, UF_ROLL_DIAM_ACT_VDS, UF_ROLL_DIAM_ACT_VOS, UF_ROLL_ANGLE_VDS, UF_ROLL_ANGLE_VOS, UF_PASSLINE_OFFSET, UF_ACTUAL_SHIMPS_VDS_1, UF_ACTUAL_SHIMPS_VDS_2, UF_ACTUAL_SHIMPS_VOS_1, UF_ACTUAL_SHIMPS_VOS_2, UF_PIN_V_CHOCK, UF_ROLL_GROOVES, UF_ROLL_GROOVE_WIDTH0, UF_ROLL_GROOVE_WIDTH1, UF_ROLL_GROOVE_WIDTH2, UF_ROLL_GROOVE_WIDTH3, UF_ROLL_GROOVE_WIDTH4, UF_ROLL_GROOVE_WIDTH5, UF_ROLL_GROOVE_WIDTH6, UF_ROLL_GROOVE_WIDTH7, UF_ROLL_GROOVE_WIDTH8, UF_ROLL_GROOVE_WIDTH9, UF_ROLL_GROOVE_STIFFNESS_TOP0, UF_ROLL_GROOVE_STIFFNESS_TOP1, UF_ROLL_GROOVE_STIFFNESS_TOP2, UF_ROLL_GROOVE_STIFFNESS_TOP3, UF_ROLL_GROOVE_STIFFNESS_TOP4, UF_ROLL_GROOVE_STIFFNESS_TOP5, UF_ROLL_GROOVE_STIFFNESS_TOP6, UF_ROLL_GROOVE_STIFFNESS_TOP7, UF_ROLL_GROOVE_STIFFNESS_TOP8, UF_ROLL_GROOVE_STIFFNESS_TOP9, UF_ROLL_GROOVE_STIFFNESS_BOT0, UF_ROLL_GROOVE_STIFFNESS_BOT1, UF_ROLL_GROOVE_STIFFNESS_BOT2, UF_ROLL_GROOVE_STIFFNESS_BOT3, UF_ROLL_GROOVE_STIFFNESS_BOT4, UF_ROLL_GROOVE_STIFFNESS_BOT5, UF_ROLL_GROOVE_STIFFNESS_BOT6, UF_ROLL_GROOVE_STIFFNESS_BOT7, UF_ROLL_GROOVE_STIFFNESS_BOT8, UF_ROLL_GROOVE_STIFFNESS_BOT9, UF_ROLL_GROOVE_POS0, UF_ROLL_GROOVE_POS1, UF_ROLL_GROOVE_POS2, UF_ROLL_GROOVE_POS3, UF_ROLL_GROOVE_POS4, UF_ROLL_GROOVE_POS5, UF_ROLL_GROOVE_POS6, UF_ROLL_GROOVE_POS7, UF_ROLL_GROOVE_POS8, UF_ROLL_GROOVE_POS9, UF_ROLL_GROOVE_SHARP0, UF_ROLL_GROOVE_SHARP1, UF_ROLL_GROOVE_SHARP2, UF_ROLL_GROOVE_SHARP3, UF_ROLL_GROOVE_SHARP4, UF_ROLL_GROOVE_SHARP5, UF_ROLL_GROOVE_SHARP6, UF_ROLL_GROOVE_SHARP7, UF_ROLL_GROOVE_SHARP8, UF_ROLL_GROOVE_SHARP9,ISNULL(UF_ROLL_THRUST_PLATE,0), UF_ROLL_ID, UF_DEL_FLAG, UF_ROLL_SET_ID_OLD, TOP_SHAFT_UF, BOT_SHAFT_UF, UF_FIN_SEC5, UF_FIN_SEC6, UF_FIN_SEC7, UF_FIN_SEC8, UF_FIN_SEC9, UF_FIN_SEC10, UF_FIN_SEC11, UF_FIN_SEC12, UF_FIN_SEC13, UF_FIN_SEC14, UF_FIN_SEC15, UF_FIN_SEC16, UF_FIN_SEC17, UF_FIN_SEC18, UF_FIN_SEC19, OLD_FLAG, ISNULL(AMPUESA_CORTA,0), ESTADO_REGISTRO, FECHA_REGISTRO, FECHA_ENVIO
|
||||
FROM gdm_rspid_UF WHERE UF_ROLL_ID = '%s'`
|
||||
)
|
||||
|
||||
type RspDB struct {
|
||||
conn *sql.DB
|
||||
}
|
||||
|
||||
type RspDBConfig struct {
|
||||
Host string
|
||||
Port int
|
||||
User string
|
||||
Pwd string
|
||||
Dbname string
|
||||
}
|
||||
|
||||
func RspDBDefaultConfig() *RspDBConfig {
|
||||
return &RspDBConfig{
|
||||
Host: "10.6.4.113",
|
||||
Port: 1433,
|
||||
User: "sa",
|
||||
Pwd: "mapex@123",
|
||||
Dbname: "mapexbp_celsa4",
|
||||
}
|
||||
}
|
||||
|
||||
func (r *RspDB) Close() error {
|
||||
return r.conn.Close()
|
||||
}
|
||||
|
||||
func (r *RspDB) GetBreakDownRollData(ctx context.Context, bdRollId string) (*api.BdRollData, error) {
|
||||
// data rolling var holder
|
||||
bdData := &api.BdRollData{}
|
||||
// create sql statement
|
||||
query := fmt.Sprintf(BreakDownRollDataQuery, bdRollId)
|
||||
// execute sql
|
||||
row := r.conn.QueryRowContext(ctx, query)
|
||||
if row.Err() != nil {
|
||||
return nil, row.Err()
|
||||
}
|
||||
if err := row.Scan(
|
||||
&bdData.BdRollSetDate,
|
||||
&bdData.BdRollSetId,
|
||||
&bdData.BdTopRollNumber,
|
||||
&bdData.BdBotRollNumber,
|
||||
&bdData.BdRollMaterial,
|
||||
&bdData.BdRollInstallPos,
|
||||
&bdData.BdRollSetType,
|
||||
&bdData.BdRollDiamNomActTop,
|
||||
&bdData.BdRollDiamNomActBot,
|
||||
&bdData.BdRollNominalGap,
|
||||
&bdData.BdRollGrooves,
|
||||
&bdData.BdRollGrooveWidth0,
|
||||
&bdData.BdRollGrooveWidth1,
|
||||
&bdData.BdRollGrooveWidth2,
|
||||
&bdData.BdRollGrooveWidth3,
|
||||
&bdData.BdRollGrooveWidth4,
|
||||
&bdData.BdRollGrooveWidth5,
|
||||
&bdData.BdRollGrooveWidth6,
|
||||
&bdData.BdRollGrooveWidth7,
|
||||
&bdData.BdRollGrooveWidth8,
|
||||
&bdData.BdRollGrooveWidth9,
|
||||
&bdData.BdRollGrooveStiffnessTop0,
|
||||
&bdData.BdRollGrooveStiffnessTop1,
|
||||
&bdData.BdRollGrooveStiffnessTop2,
|
||||
&bdData.BdRollGrooveStiffnessTop3,
|
||||
&bdData.BdRollGrooveStiffnessTop4,
|
||||
&bdData.BdRollGrooveStiffnessTop5,
|
||||
&bdData.BdRollGrooveStiffnessTop6,
|
||||
&bdData.BdRollGrooveStiffnessTop7,
|
||||
&bdData.BdRollGrooveStiffnessTop8,
|
||||
&bdData.BdRollGrooveStiffnessTop9,
|
||||
&bdData.BdRollGrooveStiffnessBot0,
|
||||
&bdData.BdRollGrooveStiffnessBot1,
|
||||
&bdData.BdRollGrooveStiffnessBot2,
|
||||
&bdData.BdRollGrooveStiffnessBot3,
|
||||
&bdData.BdRollGrooveStiffnessBot4,
|
||||
&bdData.BdRollGrooveStiffnessBot5,
|
||||
&bdData.BdRollGrooveStiffnessBot6,
|
||||
&bdData.BdRollGrooveStiffnessBot7,
|
||||
&bdData.BdRollGrooveStiffnessBot8,
|
||||
&bdData.BdRollGrooveStiffnessBot9,
|
||||
&bdData.BdRollGroovePos0,
|
||||
&bdData.BdRollGroovePos1,
|
||||
&bdData.BdRollGroovePos2,
|
||||
&bdData.BdRollGroovePos3,
|
||||
&bdData.BdRollGroovePos4,
|
||||
&bdData.BdRollGroovePos5,
|
||||
&bdData.BdRollGroovePos6,
|
||||
&bdData.BdRollGroovePos7,
|
||||
&bdData.BdRollGroovePos8,
|
||||
&bdData.BdRollGroovePos9,
|
||||
&bdData.BdRollGrooveSharp0,
|
||||
&bdData.BdRollGrooveSharp1,
|
||||
&bdData.BdRollGrooveSharp2,
|
||||
&bdData.BdRollGrooveSharp3,
|
||||
&bdData.BdRollGrooveSharp4,
|
||||
&bdData.BdRollGrooveSharp5,
|
||||
&bdData.BdRollGrooveSharp6,
|
||||
&bdData.BdRollGrooveSharp7,
|
||||
&bdData.BdRollGrooveSharp8,
|
||||
&bdData.BdRollGrooveSharp9,
|
||||
&bdData.BdRollGrooveDepth0,
|
||||
&bdData.BdRollGrooveDepth1,
|
||||
&bdData.BdRollGrooveDepth2,
|
||||
&bdData.BdRollGrooveDepth3,
|
||||
&bdData.BdRollGrooveDepth4,
|
||||
&bdData.BdRollGrooveDepth5,
|
||||
&bdData.BdRollGrooveDepth6,
|
||||
&bdData.BdRollGrooveDepth7,
|
||||
&bdData.BdRollGrooveDepth8,
|
||||
&bdData.BdRollGrooveDepth9,
|
||||
&bdData.BdRollAssemblyStatus,
|
||||
&bdData.BdNoOfFinSec,
|
||||
&bdData.BdInitSec0,
|
||||
&bdData.BdInitSec1,
|
||||
&bdData.BdInitSec2,
|
||||
&bdData.BdInitSec3,
|
||||
&bdData.BdInitSec4,
|
||||
&bdData.BdFinSec0,
|
||||
&bdData.BdFinSec1,
|
||||
&bdData.BdFinSec2,
|
||||
&bdData.BdFinSec3,
|
||||
&bdData.BdFinSec4,
|
||||
&bdData.BdRollActualShimpsTop,
|
||||
&bdData.BdRollActualShimpsBot,
|
||||
&bdData.BdTonnageAccum0,
|
||||
&bdData.BdTonnageAccum1,
|
||||
&bdData.BdTonnageAccum2,
|
||||
&bdData.BdTonnageAccum3,
|
||||
&bdData.BdTonnageAccum4,
|
||||
&bdData.BdTonnageAccum5,
|
||||
&bdData.BdTonnageAccum6,
|
||||
&bdData.BdTonnageAccum7,
|
||||
&bdData.BdTonnageAccum8,
|
||||
&bdData.BdTonnageAccum9,
|
||||
&bdData.BdRollId,
|
||||
&bdData.BdDelFlag,
|
||||
&bdData.BdRollSetIdOld,
|
||||
&bdData.BdFinSec5,
|
||||
&bdData.BdFinSec6,
|
||||
&bdData.BdFinSec7,
|
||||
&bdData.BdFinSec8,
|
||||
&bdData.BdFinSec9,
|
||||
&bdData.BdFinSec10,
|
||||
&bdData.BdFinSec11,
|
||||
&bdData.BdFinSec12,
|
||||
&bdData.BdFinSec13,
|
||||
&bdData.BdFinSec14,
|
||||
&bdData.BdFinSec15,
|
||||
&bdData.BdFinSec16,
|
||||
&bdData.BdFinSec17,
|
||||
&bdData.BdFinSec18,
|
||||
&bdData.BdFinSec19,
|
||||
&bdData.OldFlag,
|
||||
&bdData.AlturaBarronSalida,
|
||||
&bdData.AlturaBarronEntrada,
|
||||
&bdData.Familia,
|
||||
&bdData.Correccion,
|
||||
&bdData.EstadoRegistro,
|
||||
&bdData.FechaRegistro,
|
||||
&bdData.FechaEnvio); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return bdData, nil
|
||||
}
|
||||
|
||||
func (r *RspDB) GetUniversalRoughingRollData(ctx context.Context, urRollId string) (*api.UrRollData, error) {
|
||||
// data rolling var holder
|
||||
urData := &api.UrRollData{}
|
||||
// create sql statement
|
||||
sql := fmt.Sprintf(UniversalRoughingDataQuery, urRollId)
|
||||
// execute query
|
||||
row := r.conn.QueryRowContext(ctx, sql)
|
||||
if row.Err() != nil {
|
||||
return nil, row.Err()
|
||||
}
|
||||
// scan over row data
|
||||
if err := row.Scan(
|
||||
&urData.UrRollSetDate,
|
||||
&urData.UrRollSetId,
|
||||
&urData.UrRollSetIdHrolls,
|
||||
&urData.UrHtoRollNumber,
|
||||
&urData.UrHboRollNumber,
|
||||
&urData.UrRollInstallPos,
|
||||
&urData.UrRollSetType,
|
||||
&urData.UrTonnageAccum0,
|
||||
&urData.UrTonnageAccum1,
|
||||
&urData.UrTonnageAccum2,
|
||||
&urData.UrTonnageAccum3,
|
||||
&urData.UrTonnageAccum4,
|
||||
&urData.UrTonnageAccum5,
|
||||
&urData.UrTonnageAccum6,
|
||||
&urData.UrTonnageAccum7,
|
||||
&urData.UrTonnageAccum8,
|
||||
&urData.UrTonnageAccum9,
|
||||
&urData.UrChangeSleeveLength,
|
||||
&urData.UrChangeSleeveDepth,
|
||||
&urData.UrRollAssemblyStatus,
|
||||
&urData.UrNoOfFinSec,
|
||||
&urData.UrInitSec0,
|
||||
&urData.UrInitSec1,
|
||||
&urData.UrInitSec2,
|
||||
&urData.UrInitSec3,
|
||||
&urData.UrInitSec4,
|
||||
&urData.UrFinSec0,
|
||||
&urData.UrFinSec1,
|
||||
&urData.UrFinSec2,
|
||||
&urData.UrFinSec3,
|
||||
&urData.UrFinSec4,
|
||||
&urData.UrRollMaterialH,
|
||||
&urData.UrRollDiamActHbo,
|
||||
&urData.UrRollDiamActHtp,
|
||||
&urData.UrHNomgap,
|
||||
&urData.UrActualShimpsHbo,
|
||||
&urData.UrActualShimpsHtp,
|
||||
&urData.UrRollBarrelWidthHbo,
|
||||
&urData.UrRollBarrelWidthHtp,
|
||||
&urData.UrRollChamWidthHbo,
|
||||
&urData.UrRollChamWidthHtp,
|
||||
&urData.UrRollAngleHbo,
|
||||
&urData.UrRollAngleHtb,
|
||||
&urData.UrRollSetIdVrolls,
|
||||
&urData.UrVdsRollNumber,
|
||||
&urData.UrVosRollNumber,
|
||||
&urData.UrRollMaterialV,
|
||||
&urData.UrRollDiamActVds,
|
||||
&urData.UrRollDiamActVos,
|
||||
&urData.UrRollAngleVds,
|
||||
&urData.UrRollAngleVos,
|
||||
&urData.UrPasslineOffset,
|
||||
&urData.UrActualShimpsVds_1,
|
||||
&urData.UrActualShimpsVds_2,
|
||||
&urData.UrActualShimpsVos_1,
|
||||
&urData.UrActualShimpsVos_2,
|
||||
&urData.UrPinVChock,
|
||||
&urData.UrRollGrooves,
|
||||
&urData.UrRollGrooveWidth0,
|
||||
&urData.UrRollGrooveWidth1,
|
||||
&urData.UrRollGrooveWidth2,
|
||||
&urData.UrRollGrooveWidth3,
|
||||
&urData.UrRollGrooveWidth4,
|
||||
&urData.UrRollGrooveWidth5,
|
||||
&urData.UrRollGrooveWidth6,
|
||||
&urData.UrRollGrooveWidth7,
|
||||
&urData.UrRollGrooveWidth8,
|
||||
&urData.UrRollGrooveWidth9,
|
||||
&urData.UrRollGrooveStiffnessTop0,
|
||||
&urData.UrRollGrooveStiffnessTop1,
|
||||
&urData.UrRollGrooveStiffnessTop2,
|
||||
&urData.UrRollGrooveStiffnessTop3,
|
||||
&urData.UrRollGrooveStiffnessTop4,
|
||||
&urData.UrRollGrooveStiffnessTop5,
|
||||
&urData.UrRollGrooveStiffnessTop6,
|
||||
&urData.UrRollGrooveStiffnessTop7,
|
||||
&urData.UrRollGrooveStiffnessTop8,
|
||||
&urData.UrRollGrooveStiffnessTop9,
|
||||
&urData.UrRollGrooveStiffnessBot0,
|
||||
&urData.UrRollGrooveStiffnessBot1,
|
||||
&urData.UrRollGrooveStiffnessBot2,
|
||||
&urData.UrRollGrooveStiffnessBot3,
|
||||
&urData.UrRollGrooveStiffnessBot4,
|
||||
&urData.UrRollGrooveStiffnessBot5,
|
||||
&urData.UrRollGrooveStiffnessBot6,
|
||||
&urData.UrRollGrooveStiffnessBot7,
|
||||
&urData.UrRollGrooveStiffnessBot8,
|
||||
&urData.UrRollGrooveStiffnessBot9,
|
||||
&urData.UrRollGroovePos0,
|
||||
&urData.UrRollGroovePos1,
|
||||
&urData.UrRollGroovePos2,
|
||||
&urData.UrRollGroovePos3,
|
||||
&urData.UrRollGroovePos4,
|
||||
&urData.UrRollGroovePos5,
|
||||
&urData.UrRollGroovePos6,
|
||||
&urData.UrRollGroovePos7,
|
||||
&urData.UrRollGroovePos8,
|
||||
&urData.UrRollGroovePos9,
|
||||
&urData.UrRollGrooveSharp0,
|
||||
&urData.UrRollGrooveSharp1,
|
||||
&urData.UrRollGrooveSharp2,
|
||||
&urData.UrRollGrooveSharp3,
|
||||
&urData.UrRollGrooveSharp4,
|
||||
&urData.UrRollGrooveSharp5,
|
||||
&urData.UrRollGrooveSharp6,
|
||||
&urData.UrRollGrooveSharp7,
|
||||
&urData.UrRollGrooveSharp8,
|
||||
&urData.UrRollGrooveSharp9,
|
||||
&urData.UrRollThrustPlate,
|
||||
&urData.UrRollId,
|
||||
&urData.UrDelFlag,
|
||||
&urData.UrRollSetIdOld,
|
||||
&urData.TopShaftUr,
|
||||
&urData.BotShaftUr,
|
||||
&urData.UrFinSec5,
|
||||
&urData.UrFinSec6,
|
||||
&urData.UrFinSec7,
|
||||
&urData.UrFinSec8,
|
||||
&urData.UrFinSec9,
|
||||
&urData.UrFinSec10,
|
||||
&urData.UrFinSec11,
|
||||
&urData.UrFinSec12,
|
||||
&urData.UrFinSec13,
|
||||
&urData.UrFinSec14,
|
||||
&urData.UrFinSec15,
|
||||
&urData.UrFinSec16,
|
||||
&urData.UrFinSec17,
|
||||
&urData.UrFinSec18,
|
||||
&urData.UrFinSec19,
|
||||
&urData.OldFlag,
|
||||
&urData.AmpuesaCorta,
|
||||
&urData.EstadoRegistro,
|
||||
&urData.FechaRegistro,
|
||||
&urData.FechaEnvio); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return urData, nil
|
||||
}
|
||||
|
||||
func (r *RspDB) GetEdgerRollData(ctx context.Context, edRollId string) (*api.EdRollData, error) {
|
||||
// data rolling var holder
|
||||
edData := &api.EdRollData{}
|
||||
// create sql statement
|
||||
sql := fmt.Sprintf(EdgerDataQuery, edRollId)
|
||||
// execute query
|
||||
row := r.conn.QueryRowContext(ctx, sql)
|
||||
if row.Err() != nil {
|
||||
return nil, row.Err()
|
||||
}
|
||||
// scan over row data
|
||||
if err := row.Scan(
|
||||
&edData.EdRollSetDate,
|
||||
&edData.EdRollSetId,
|
||||
&edData.EdTopRollNumber,
|
||||
&edData.EdBotRollNumber,
|
||||
&edData.EdRollMaterial,
|
||||
&edData.EdRollInstallPos,
|
||||
&edData.EdRollSetType,
|
||||
&edData.EdRollDiamNomHtp,
|
||||
&edData.EdRollDiamNomHbo,
|
||||
&edData.EdRollNominalGap,
|
||||
&edData.EdRollAssemblyStatus,
|
||||
&edData.EdNoOfFinSec,
|
||||
&edData.EdInitSec0,
|
||||
&edData.EdInitSec1,
|
||||
&edData.EdInitSec2,
|
||||
&edData.EdInitSec3,
|
||||
&edData.EdInitSec4,
|
||||
&edData.EdFinSec0,
|
||||
&edData.EdFinSec1,
|
||||
&edData.EdFinSec2,
|
||||
&edData.EdFinSec3,
|
||||
&edData.EdFinSec4,
|
||||
&edData.EdRollNoOfGrooves,
|
||||
&edData.EdRollGrooveStiffTop0,
|
||||
&edData.EdRollGrooveStiffTop1,
|
||||
&edData.EdRollGrooveStiffTop2,
|
||||
&edData.EdRollGrooveStiffTop3,
|
||||
&edData.EdRollGrooveStiffTop4,
|
||||
&edData.EdRollGrooveStiffTop5,
|
||||
&edData.EdRollGrooveStiffTop6,
|
||||
&edData.EdRollGrooveStiffTop7,
|
||||
&edData.EdRollGrooveStiffTop8,
|
||||
&edData.EdRollGrooveStiffTop9,
|
||||
&edData.EdRollGrooveStiffBot0,
|
||||
&edData.EdRollGrooveStiffBot1,
|
||||
&edData.EdRollGrooveStiffBot2,
|
||||
&edData.EdRollGrooveStiffBot3,
|
||||
&edData.EdRollGrooveStiffBot4,
|
||||
&edData.EdRollGrooveStiffBot5,
|
||||
&edData.EdRollGrooveStiffBot6,
|
||||
&edData.EdRollGrooveStiffBot7,
|
||||
&edData.EdRollGrooveStiffBot8,
|
||||
&edData.EdRollGrooveStiffBot9,
|
||||
&edData.EdRollGroovePos0,
|
||||
&edData.EdRollGroovePos1,
|
||||
&edData.EdRollGroovePos2,
|
||||
&edData.EdRollGroovePos3,
|
||||
&edData.EdRollGroovePos4,
|
||||
&edData.EdRollGroovePos5,
|
||||
&edData.EdRollGroovePos6,
|
||||
&edData.EdRollGroovePos7,
|
||||
&edData.EdRollGroovePos8,
|
||||
&edData.EdRollGroovePos9,
|
||||
&edData.EdActualShimpsHbo,
|
||||
&edData.EdActualShimpsHtp,
|
||||
&edData.EdChangeSleeveLength,
|
||||
&edData.EdChangeSleeveDepth,
|
||||
&edData.EdTonnageAccum0,
|
||||
&edData.EdTonnageAccum1,
|
||||
&edData.EdTonnageAccum2,
|
||||
&edData.EdTonnageAccum3,
|
||||
&edData.EdTonnageAccum4,
|
||||
&edData.EdTonnageAccum5,
|
||||
&edData.EdTonnageAccum6,
|
||||
&edData.EdTonnageAccum7,
|
||||
&edData.EdTonnageAccum8,
|
||||
&edData.EdTonnageAccum9,
|
||||
&edData.EdRollFlangeDiamTop0,
|
||||
&edData.EdRollFlangeDiamTop1,
|
||||
&edData.EdRollFlangeDiamTop2,
|
||||
&edData.EdRollFlangeDiamTop3,
|
||||
&edData.EdRollFlangeDiamTop4,
|
||||
&edData.EdRollFlangeDiamTop5,
|
||||
&edData.EdRollFlangeDiamTop6,
|
||||
&edData.EdRollFlangeDiamTop7,
|
||||
&edData.EdRollFlangeDiamTop8,
|
||||
&edData.EdRollFlangeDiamTop9,
|
||||
&edData.EdRollFlangeDiamBot0,
|
||||
&edData.EdRollFlangeDiamBot1,
|
||||
&edData.EdRollFlangeDiamBot2,
|
||||
&edData.EdRollFlangeDiamBot3,
|
||||
&edData.EdRollFlangeDiamBot4,
|
||||
&edData.EdRollFlangeDiamBot5,
|
||||
&edData.EdRollFlangeDiamBot6,
|
||||
&edData.EdRollFlangeDiamBot7,
|
||||
&edData.EdRollFlangeDiamBot8,
|
||||
&edData.EdRollFlangeDiamBot9,
|
||||
&edData.EdRollWebDiamTop0,
|
||||
&edData.EdRollWebDiamTop1,
|
||||
&edData.EdRollWebDiamTop2,
|
||||
&edData.EdRollWebDiamTop3,
|
||||
&edData.EdRollWebDiamTop4,
|
||||
&edData.EdRollWebDiamTop5,
|
||||
&edData.EdRollWebDiamTop6,
|
||||
&edData.EdRollWebDiamTop7,
|
||||
&edData.EdRollWebDiamTop8,
|
||||
&edData.EdRollWebDiamTop9,
|
||||
&edData.EdRollWebDiamBot0,
|
||||
&edData.EdRollWebDiamBot1,
|
||||
&edData.EdRollWebDiamBot2,
|
||||
&edData.EdRollWebDiamBot3,
|
||||
&edData.EdRollWebDiamBot4,
|
||||
&edData.EdRollWebDiamBot5,
|
||||
&edData.EdRollWebDiamBot6,
|
||||
&edData.EdRollWebDiamBot7,
|
||||
&edData.EdRollWebDiamBot8,
|
||||
&edData.EdRollWebDiamBot9,
|
||||
&edData.EdRollChamWidthTop0,
|
||||
&edData.EdRollChamWidthTop1,
|
||||
&edData.EdRollChamWidthTop2,
|
||||
&edData.EdRollChamWidthTop3,
|
||||
&edData.EdRollChamWidthTop4,
|
||||
&edData.EdRollChamWidthTop5,
|
||||
&edData.EdRollChamWidthTop6,
|
||||
&edData.EdRollChamWidthTop7,
|
||||
&edData.EdRollChamWidthTop8,
|
||||
&edData.EdRollChamWidthTop9,
|
||||
&edData.EdRollChamWidthBot0,
|
||||
&edData.EdRollChamWidthBot1,
|
||||
&edData.EdRollChamWidthBot2,
|
||||
&edData.EdRollChamWidthBot3,
|
||||
&edData.EdRollChamWidthBot4,
|
||||
&edData.EdRollChamWidthBot5,
|
||||
&edData.EdRollChamWidthBot6,
|
||||
&edData.EdRollChamWidthBot7,
|
||||
&edData.EdRollChamWidthBot8,
|
||||
&edData.EdRollChamWidthBot9,
|
||||
&edData.EdRollAngleFlangeFace0,
|
||||
&edData.EdRollAngleFlangeFace1,
|
||||
&edData.EdRollAngleFlangeFace2,
|
||||
&edData.EdRollAngleFlangeFace3,
|
||||
&edData.EdRollAngleFlangeFace4,
|
||||
&edData.EdRollAngleFlangeFace5,
|
||||
&edData.EdRollAngleFlangeFace6,
|
||||
&edData.EdRollAngleFlangeFace7,
|
||||
&edData.EdRollAngleFlangeFace8,
|
||||
&edData.EdRollAngleFlangeFace9,
|
||||
&edData.EdRollRootRadius0,
|
||||
&edData.EdRollRootRadius1,
|
||||
&edData.EdRollRootRadius2,
|
||||
&edData.EdRollRootRadius3,
|
||||
&edData.EdRollRootRadius4,
|
||||
&edData.EdRollRootRadius5,
|
||||
&edData.EdRollRootRadius6,
|
||||
&edData.EdRollRootRadius7,
|
||||
&edData.EdRollRootRadius8,
|
||||
&edData.EdRollRootRadius9,
|
||||
&edData.EdPasslineOffset,
|
||||
&edData.EdDRollGrooveSharp0,
|
||||
&edData.EdDRollGrooveSharp1,
|
||||
&edData.EdDRollGrooveSharp2,
|
||||
&edData.EdDRollGrooveSharp3,
|
||||
&edData.EdDRollGrooveSharp4,
|
||||
&edData.EdDRollGrooveSharp5,
|
||||
&edData.EdDRollGrooveSharp6,
|
||||
&edData.EdDRollGrooveSharp7,
|
||||
&edData.EdDRollGrooveSharp8,
|
||||
&edData.EdDRollGrooveSharp9,
|
||||
&edData.EdDRollGrooveWidth0,
|
||||
&edData.EdDRollGrooveWidth1,
|
||||
&edData.EdDRollGrooveWidth2,
|
||||
&edData.EdDRollGrooveWidth3,
|
||||
&edData.EdDRollGrooveWidth4,
|
||||
&edData.EdDRollGrooveWidth5,
|
||||
&edData.EdDRollGrooveWidth6,
|
||||
&edData.EdDRollGrooveWidth7,
|
||||
&edData.EdDRollGrooveWidth8,
|
||||
&edData.EdDRollGrooveWidth9,
|
||||
&edData.EdRollId,
|
||||
&edData.EdDelFlag,
|
||||
&edData.EdRollSetIdOld,
|
||||
&edData.EdFinSec5,
|
||||
&edData.EdFinSec6,
|
||||
&edData.EdFinSec7,
|
||||
&edData.EdFinSec8,
|
||||
&edData.EdFinSec9,
|
||||
&edData.EdFinSec10,
|
||||
&edData.EdFinSec11,
|
||||
&edData.EdFinSec12,
|
||||
&edData.EdFinSec13,
|
||||
&edData.EdFinSec14,
|
||||
&edData.EdFinSec15,
|
||||
&edData.EdFinSec16,
|
||||
&edData.EdFinSec17,
|
||||
&edData.EdFinSec18,
|
||||
&edData.EdFinSec19,
|
||||
&edData.OldFlag,
|
||||
&edData.EstadoRegistro,
|
||||
&edData.FechaRegistro,
|
||||
&edData.FechaEnvio); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return edData, nil
|
||||
}
|
||||
|
||||
func (r *RspDB) GetUniversalFinishingRollData(ctx context.Context, ufRollId string) (*api.UfRollData, error) {
|
||||
// data rolling var holder
|
||||
ufData := &api.UfRollData{}
|
||||
// create sql statement
|
||||
sql := fmt.Sprintf(UniversalFinishingDataQuery, ufRollId)
|
||||
// execute query
|
||||
row := r.conn.QueryRowContext(ctx, sql)
|
||||
if row.Err() != nil {
|
||||
return nil, row.Err()
|
||||
}
|
||||
// scan over row data
|
||||
if err := row.Scan(
|
||||
&ufData.UfRollSetDate,
|
||||
&ufData.UfRollSetId,
|
||||
&ufData.UfRollSetIdHrolls,
|
||||
&ufData.UfHtoRollNumber,
|
||||
&ufData.UfHboRollNumber,
|
||||
&ufData.UfRollInstallPos,
|
||||
&ufData.UfRollSetType,
|
||||
&ufData.UfTonnageAccum0,
|
||||
&ufData.UfTonnageAccum1,
|
||||
&ufData.UfTonnageAccum2,
|
||||
&ufData.UfTonnageAccum3,
|
||||
&ufData.UfTonnageAccum4,
|
||||
&ufData.UfTonnageAccum5,
|
||||
&ufData.UfTonnageAccum6,
|
||||
&ufData.UfTonnageAccum7,
|
||||
&ufData.UfTonnageAccum8,
|
||||
&ufData.UfTonnageAccum9,
|
||||
&ufData.UfChangeSleeveLength,
|
||||
&ufData.UfChangeSleeveDepth,
|
||||
&ufData.UfRollAssemblyStatus,
|
||||
&ufData.UfNoOfFinSec,
|
||||
&ufData.UfInitSec0,
|
||||
&ufData.UfInitSec1,
|
||||
&ufData.UfInitSec2,
|
||||
&ufData.UfInitSec3,
|
||||
&ufData.UfInitSec4,
|
||||
&ufData.UfFinSec0,
|
||||
&ufData.UfFinSec1,
|
||||
&ufData.UfFinSec2,
|
||||
&ufData.UfFinSec3,
|
||||
&ufData.UfFinSec4,
|
||||
&ufData.UfRollMaterialH,
|
||||
&ufData.UfRollDiamActHbo,
|
||||
&ufData.UfRollDiamActHtp,
|
||||
&ufData.UfHNomgap,
|
||||
&ufData.UfActualShimpsHbo,
|
||||
&ufData.UfActualShimpsHtp,
|
||||
&ufData.UfRollBarrelWidthHbo,
|
||||
&ufData.UfRollBarrelWidthHtp,
|
||||
&ufData.UfRollChamWidthHbo,
|
||||
&ufData.UfRollChamWidthHtp,
|
||||
&ufData.UfRollAngleHbo,
|
||||
&ufData.UfRollAngleHtb,
|
||||
&ufData.UfRollSetIdVrolls,
|
||||
&ufData.UfVdsRollNumber,
|
||||
&ufData.UfVosRollNumber,
|
||||
&ufData.UfRollMaterialV,
|
||||
&ufData.UfRollDiamActVds,
|
||||
&ufData.UfRollDiamActVos,
|
||||
&ufData.UfRollAngleVds,
|
||||
&ufData.UfRollAngleVos,
|
||||
&ufData.UfPasslineOffset,
|
||||
&ufData.UfActualShimpsVds_1,
|
||||
&ufData.UfActualShimpsVds_2,
|
||||
&ufData.UfActualShimpsVos_1,
|
||||
&ufData.UfActualShimpsVos_2,
|
||||
&ufData.UfPinVChock,
|
||||
&ufData.UfRollGrooves,
|
||||
&ufData.UfRollGrooveWidth0,
|
||||
&ufData.UfRollGrooveWidth1,
|
||||
&ufData.UfRollGrooveWidth2,
|
||||
&ufData.UfRollGrooveWidth3,
|
||||
&ufData.UfRollGrooveWidth4,
|
||||
&ufData.UfRollGrooveWidth5,
|
||||
&ufData.UfRollGrooveWidth6,
|
||||
&ufData.UfRollGrooveWidth7,
|
||||
&ufData.UfRollGrooveWidth8,
|
||||
&ufData.UfRollGrooveWidth9,
|
||||
&ufData.UfRollGrooveStiffnessTop0,
|
||||
&ufData.UfRollGrooveStiffnessTop1,
|
||||
&ufData.UfRollGrooveStiffnessTop2,
|
||||
&ufData.UfRollGrooveStiffnessTop3,
|
||||
&ufData.UfRollGrooveStiffnessTop4,
|
||||
&ufData.UfRollGrooveStiffnessTop5,
|
||||
&ufData.UfRollGrooveStiffnessTop6,
|
||||
&ufData.UfRollGrooveStiffnessTop7,
|
||||
&ufData.UfRollGrooveStiffnessTop8,
|
||||
&ufData.UfRollGrooveStiffnessTop9,
|
||||
&ufData.UfRollGrooveStiffnessBot0,
|
||||
&ufData.UfRollGrooveStiffnessBot1,
|
||||
&ufData.UfRollGrooveStiffnessBot2,
|
||||
&ufData.UfRollGrooveStiffnessBot3,
|
||||
&ufData.UfRollGrooveStiffnessBot4,
|
||||
&ufData.UfRollGrooveStiffnessBot5,
|
||||
&ufData.UfRollGrooveStiffnessBot6,
|
||||
&ufData.UfRollGrooveStiffnessBot7,
|
||||
&ufData.UfRollGrooveStiffnessBot8,
|
||||
&ufData.UfRollGrooveStiffnessBot9,
|
||||
&ufData.UfRollGroovePos0,
|
||||
&ufData.UfRollGroovePos1,
|
||||
&ufData.UfRollGroovePos2,
|
||||
&ufData.UfRollGroovePos3,
|
||||
&ufData.UfRollGroovePos4,
|
||||
&ufData.UfRollGroovePos5,
|
||||
&ufData.UfRollGroovePos6,
|
||||
&ufData.UfRollGroovePos7,
|
||||
&ufData.UfRollGroovePos8,
|
||||
&ufData.UfRollGroovePos9,
|
||||
&ufData.UfRollGrooveSharp0,
|
||||
&ufData.UfRollGrooveSharp1,
|
||||
&ufData.UfRollGrooveSharp2,
|
||||
&ufData.UfRollGrooveSharp3,
|
||||
&ufData.UfRollGrooveSharp4,
|
||||
&ufData.UfRollGrooveSharp5,
|
||||
&ufData.UfRollGrooveSharp6,
|
||||
&ufData.UfRollGrooveSharp7,
|
||||
&ufData.UfRollGrooveSharp8,
|
||||
&ufData.UfRollGrooveSharp9,
|
||||
&ufData.UfRollThrustPlate,
|
||||
&ufData.UfRollId,
|
||||
&ufData.UfDelFlag,
|
||||
&ufData.UfRollSetIdOld,
|
||||
&ufData.TopShaftUf,
|
||||
&ufData.BotShaftUf,
|
||||
&ufData.UfFinSec5,
|
||||
&ufData.UfFinSec6,
|
||||
&ufData.UfFinSec7,
|
||||
&ufData.UfFinSec8,
|
||||
&ufData.UfFinSec9,
|
||||
&ufData.UfFinSec10,
|
||||
&ufData.UfFinSec11,
|
||||
&ufData.UfFinSec12,
|
||||
&ufData.UfFinSec13,
|
||||
&ufData.UfFinSec14,
|
||||
&ufData.UfFinSec15,
|
||||
&ufData.UfFinSec16,
|
||||
&ufData.UfFinSec17,
|
||||
&ufData.UfFinSec18,
|
||||
&ufData.UfFinSec19,
|
||||
&ufData.OldFlag,
|
||||
&ufData.AmpuesaCorta,
|
||||
&ufData.EstadoRegistro,
|
||||
&ufData.FechaRegistro,
|
||||
&ufData.FechaEnvio); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return ufData, nil
|
||||
}
|
||||
|
||||
func NewRspDB(cfg *RspDBConfig) (*RspDB, error) {
|
||||
connString := fmt.Sprintf("server=%s;user id=%s;password=%s;port=%d;database=%s", cfg.Host, cfg.User, cfg.Pwd, cfg.Port, cfg.Dbname)
|
||||
conn, err := sql.Open("mssql", connString)
|
||||
return &RspDB{
|
||||
conn: conn,
|
||||
}, err
|
||||
}
|
33
internal/server/server.go
Normal file
33
internal/server/server.go
Normal file
@ -0,0 +1,33 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.espin.casa/albert/cml04-gdm-int/internal/service"
|
||||
"git.espin.casa/albert/cml04-gdm-int/pkg/api"
|
||||
)
|
||||
|
||||
type server struct {
|
||||
api.UnimplementedRollDataServiceServer
|
||||
svc service.IService
|
||||
}
|
||||
|
||||
func (s server) BdRollData(ctx context.Context, req *api.BdRollDataReq) (res *api.BdRollDataRes, err error) {
|
||||
return s.svc.BdRollData(ctx, req)
|
||||
}
|
||||
|
||||
func (s server) EdRollData(ctx context.Context, req *api.EdRollDataReq) (res *api.EdRollDataRes, err error) {
|
||||
return s.svc.EdRollData(ctx, req)
|
||||
}
|
||||
|
||||
func (s server) UfRollData(ctx context.Context, req *api.UfRollDataReq) (res *api.UfRollDataRes, err error) {
|
||||
return s.svc.UfRollData(ctx, req)
|
||||
}
|
||||
|
||||
func (s server) UrRollData(ctx context.Context, req *api.UrRollDataReq) (res *api.UrRollDataRes, err error) {
|
||||
return s.svc.UrRollData(ctx, req)
|
||||
}
|
||||
|
||||
func NewServer(svc service.IService) *server {
|
||||
return &server{svc: svc}
|
||||
}
|
86
internal/service/service.go
Normal file
86
internal/service/service.go
Normal file
@ -0,0 +1,86 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.espin.casa/albert/cml04-gdm-int/internal/rspdb"
|
||||
"git.espin.casa/albert/cml04-gdm-int/pkg/api"
|
||||
)
|
||||
|
||||
type IService interface {
|
||||
BdRollData(ctx context.Context, req *api.BdRollDataReq) (res *api.BdRollDataRes, err error)
|
||||
UrRollData(ctx context.Context, req *api.UrRollDataReq) (res *api.UrRollDataRes, err error)
|
||||
EdRollData(ctx context.Context, req *api.EdRollDataReq) (res *api.EdRollDataRes, err error)
|
||||
UfRollData(ctx context.Context, req *api.UfRollDataReq) (res *api.UfRollDataRes, err error)
|
||||
}
|
||||
|
||||
type service struct {
|
||||
db *rspdb.RspDB
|
||||
}
|
||||
|
||||
// BdRollData implements IService.
|
||||
func (s *service) BdRollData(ctx context.Context, req *api.BdRollDataReq) (res *api.BdRollDataRes, err error) {
|
||||
// gets break down roll data from database
|
||||
bdData, err := s.db.GetBreakDownRollData(ctx, req.GetRollId())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// response
|
||||
return &api.BdRollDataRes{
|
||||
Msg: "data for bd success",
|
||||
RollData: bdData,
|
||||
TimeStamp: time.Now().UTC().Format(time.RFC3339),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// EdRollData implements IService.
|
||||
func (s *service) EdRollData(ctx context.Context, req *api.EdRollDataReq) (res *api.EdRollDataRes, err error) {
|
||||
// gets edger roll data from database
|
||||
edgerData, err := s.db.GetEdgerRollData(ctx, req.GetRollId())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// response
|
||||
return &api.EdRollDataRes{
|
||||
Msg: "data for ed success",
|
||||
RollData: edgerData,
|
||||
TimeStamp: time.Now().UTC().Format(time.RFC3339),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// UfRollData implements IService.
|
||||
func (s *service) UfRollData(ctx context.Context, req *api.UfRollDataReq) (res *api.UfRollDataRes, err error) {
|
||||
// gets universal finishing roll data from database
|
||||
ufData, err := s.db.GetUniversalFinishingRollData(ctx, req.GetRollId())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// response
|
||||
return &api.UfRollDataRes{
|
||||
Msg: "data for uf success",
|
||||
RollData: ufData,
|
||||
TimeStamp: time.Now().UTC().Format(time.RFC3339),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// UrRollData implements IService.
|
||||
func (s *service) UrRollData(ctx context.Context, req *api.UrRollDataReq) (res *api.UrRollDataRes, err error) {
|
||||
// gets universal roll data from database
|
||||
ufData, err := s.db.GetUniversalRoughingRollData(ctx, req.GetRollId())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// response
|
||||
return &api.UrRollDataRes{
|
||||
Msg: "data for ur success",
|
||||
RollData: ufData,
|
||||
TimeStamp: time.Now().UTC().Format(time.RFC3339),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func NewService(db *rspdb.RspDB) IService {
|
||||
return &service{
|
||||
db: db,
|
||||
}
|
||||
}
|
7340
pkg/api/api.pb.go
Normal file
7340
pkg/api/api.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
654
pkg/api/api.proto
Normal file
654
pkg/api/api.proto
Normal file
@ -0,0 +1,654 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package api;
|
||||
|
||||
option go_package = "git.espin.casa/albert/cml04-gdm-int6464/pkg/api;api";
|
||||
|
||||
service RollDataService {
|
||||
rpc BdRollData(BdRollDataReq) returns (BdRollDataRes);
|
||||
rpc UrRollData(UrRollDataReq) returns (UrRollDataRes);
|
||||
rpc EdRollData(EdRollDataReq) returns (EdRollDataRes);
|
||||
rpc UfRollData(UfRollDataReq) returns (UfRollDataRes);
|
||||
}
|
||||
|
||||
|
||||
message BdRollDataReq {
|
||||
string sender = 1;
|
||||
string roll_id = 2;
|
||||
string time_stamp = 100;
|
||||
}
|
||||
|
||||
message BdRollDataRes {
|
||||
string msg = 1;
|
||||
BdRollData roll_data = 2;
|
||||
string time_stamp = 100;
|
||||
}
|
||||
|
||||
message UrRollDataReq {
|
||||
string sender = 1;
|
||||
string roll_id = 2;
|
||||
string time_stamp = 100;
|
||||
}
|
||||
|
||||
message UrRollDataRes {
|
||||
string msg = 1;
|
||||
UrRollData roll_data = 2;
|
||||
string time_stamp = 100;
|
||||
}
|
||||
|
||||
message EdRollDataReq {
|
||||
string sender = 1;
|
||||
string roll_id = 2;
|
||||
string time_stamp = 100;
|
||||
}
|
||||
|
||||
message EdRollDataRes {
|
||||
string msg = 1;
|
||||
EdRollData roll_data = 2;
|
||||
string time_stamp = 100;
|
||||
}
|
||||
|
||||
message UfRollDataReq {
|
||||
string sender = 1;
|
||||
string roll_id = 2;
|
||||
string time_stamp = 100;
|
||||
}
|
||||
|
||||
message UfRollDataRes {
|
||||
string msg = 1;
|
||||
UfRollData roll_data = 2;
|
||||
string time_stamp = 100;
|
||||
}
|
||||
|
||||
message BdRollData {
|
||||
string bd_roll_set_date = 1;
|
||||
string bd_roll_set_id = 2;
|
||||
string bd_top_roll_number = 3;
|
||||
string bd_bot_roll_number = 4;
|
||||
string bd_roll_material = 5;
|
||||
int64 bd_roll_install_pos = 6;
|
||||
int64 bd_roll_set_type = 7;
|
||||
double bd_roll_diam_nom_act_top = 8;
|
||||
double bd_roll_diam_nom_act_bot = 9;
|
||||
double bd_roll_nominal_gap = 10;
|
||||
int64 bd_roll_grooves = 11;
|
||||
double bd_roll_groove_width0 = 12;
|
||||
double bd_roll_groove_width1 = 13;
|
||||
double bd_roll_groove_width2 = 14;
|
||||
double bd_roll_groove_width3 = 15;
|
||||
double bd_roll_groove_width4 = 16;
|
||||
double bd_roll_groove_width5 = 17;
|
||||
double bd_roll_groove_width6 = 18;
|
||||
double bd_roll_groove_width7 = 19;
|
||||
double bd_roll_groove_width8 = 20;
|
||||
double bd_roll_groove_width9 = 21;
|
||||
double bd_roll_groove_stiffness_top0 = 22;
|
||||
double bd_roll_groove_stiffness_top1 = 23;
|
||||
double bd_roll_groove_stiffness_top2 = 24;
|
||||
double bd_roll_groove_stiffness_top3 = 25;
|
||||
double bd_roll_groove_stiffness_top4 = 26;
|
||||
double bd_roll_groove_stiffness_top5 = 27;
|
||||
double bd_roll_groove_stiffness_top6 = 28;
|
||||
double bd_roll_groove_stiffness_top7 = 29;
|
||||
double bd_roll_groove_stiffness_top8 = 30;
|
||||
double bd_roll_groove_stiffness_top9 = 31;
|
||||
double bd_roll_groove_stiffness_bot0 = 32;
|
||||
double bd_roll_groove_stiffness_bot1 = 33;
|
||||
double bd_roll_groove_stiffness_bot2 = 34;
|
||||
double bd_roll_groove_stiffness_bot3 = 35;
|
||||
double bd_roll_groove_stiffness_bot4 = 36;
|
||||
double bd_roll_groove_stiffness_bot5 = 37;
|
||||
double bd_roll_groove_stiffness_bot6 = 38;
|
||||
double bd_roll_groove_stiffness_bot7 = 39;
|
||||
double bd_roll_groove_stiffness_bot8 = 40;
|
||||
double bd_roll_groove_stiffness_bot9 = 41;
|
||||
double bd_roll_groove_pos0 = 42;
|
||||
double bd_roll_groove_pos1 = 43;
|
||||
double bd_roll_groove_pos2 = 44;
|
||||
double bd_roll_groove_pos3 = 45;
|
||||
double bd_roll_groove_pos4 = 46;
|
||||
double bd_roll_groove_pos5 = 47;
|
||||
double bd_roll_groove_pos6 = 48;
|
||||
double bd_roll_groove_pos7 = 49;
|
||||
double bd_roll_groove_pos8 = 50;
|
||||
double bd_roll_groove_pos9 = 51;
|
||||
int64 bd_roll_groove_sharp0 = 52;
|
||||
int64 bd_roll_groove_sharp1 = 53;
|
||||
int64 bd_roll_groove_sharp2 = 54;
|
||||
int64 bd_roll_groove_sharp3 = 55;
|
||||
int64 bd_roll_groove_sharp4 = 56;
|
||||
int64 bd_roll_groove_sharp5 = 57;
|
||||
int64 bd_roll_groove_sharp6 = 58;
|
||||
int64 bd_roll_groove_sharp7 = 59;
|
||||
int64 bd_roll_groove_sharp8 = 60;
|
||||
int64 bd_roll_groove_sharp9 = 61;
|
||||
double bd_roll_groove_depth0 = 62;
|
||||
double bd_roll_groove_depth1 = 63;
|
||||
double bd_roll_groove_depth2 = 64;
|
||||
double bd_roll_groove_depth3 = 65;
|
||||
double bd_roll_groove_depth4 = 66;
|
||||
double bd_roll_groove_depth5 = 67;
|
||||
double bd_roll_groove_depth6 = 68;
|
||||
double bd_roll_groove_depth7 = 69;
|
||||
double bd_roll_groove_depth8 = 70;
|
||||
double bd_roll_groove_depth9 = 71;
|
||||
int64 bd_roll_assembly_status = 72;
|
||||
int64 bd_no_of_fin_sec = 73;
|
||||
string bd_init_sec0 = 74;
|
||||
string bd_init_sec1 = 75;
|
||||
string bd_init_sec2 = 76;
|
||||
string bd_init_sec3 = 77;
|
||||
string bd_init_sec4 = 78;
|
||||
string bd_fin_sec0 = 79;
|
||||
string bd_fin_sec1 = 80;
|
||||
string bd_fin_sec2 = 81;
|
||||
string bd_fin_sec3 = 82;
|
||||
string bd_fin_sec4 = 83;
|
||||
double bd_roll_actual_shimps_top = 84;
|
||||
double bd_roll_actual_shimps_bot = 85;
|
||||
double bd_tonnage_accum0 = 86;
|
||||
double bd_tonnage_accum1 = 87;
|
||||
double bd_tonnage_accum2 = 88;
|
||||
double bd_tonnage_accum3 = 89;
|
||||
double bd_tonnage_accum4 = 90;
|
||||
double bd_tonnage_accum5 = 91;
|
||||
double bd_tonnage_accum6 = 92;
|
||||
double bd_tonnage_accum7 = 93;
|
||||
double bd_tonnage_accum8 = 94;
|
||||
double bd_tonnage_accum9 = 95;
|
||||
string bd_roll_id = 96;
|
||||
bool bd_del_flag = 97;
|
||||
string bd_roll_set_id_old = 98;
|
||||
string bd_fin_sec5 = 99;
|
||||
string bd_fin_sec6 = 100;
|
||||
string bd_fin_sec7 = 101;
|
||||
string bd_fin_sec8 = 102;
|
||||
string bd_fin_sec9 = 103;
|
||||
string bd_fin_sec10 = 104;
|
||||
string bd_fin_sec11 = 105;
|
||||
string bd_fin_sec12 = 106;
|
||||
string bd_fin_sec13 = 107;
|
||||
string bd_fin_sec14 = 108;
|
||||
string bd_fin_sec15 = 109;
|
||||
string bd_fin_sec16 = 110;
|
||||
string bd_fin_sec17 = 111;
|
||||
string bd_fin_sec18 = 112;
|
||||
string bd_fin_sec19 = 113;
|
||||
bool old_flag = 114;
|
||||
double altura_barron_salida = 115;
|
||||
double altura_barron_entrada = 116;
|
||||
string familia = 117;
|
||||
bool correccion = 118;
|
||||
bool estado_registro = 119;
|
||||
string fecha_registro = 120;
|
||||
string fecha_envio = 121;
|
||||
}
|
||||
|
||||
message UrRollData {
|
||||
string ur_roll_set_date = 1;
|
||||
string ur_roll_set_id = 2;
|
||||
string ur_roll_set_id_hrolls = 3;
|
||||
string ur_hto_roll_number = 4;
|
||||
string ur_hbo_roll_number = 5;
|
||||
int64 ur_roll_install_pos = 6;
|
||||
int64 ur_roll_set_type = 7;
|
||||
double ur_tonnage_accum0 = 8;
|
||||
double ur_tonnage_accum1 = 9;
|
||||
double ur_tonnage_accum2 = 10;
|
||||
double ur_tonnage_accum3 = 11;
|
||||
double ur_tonnage_accum4 = 12;
|
||||
double ur_tonnage_accum5 = 13;
|
||||
double ur_tonnage_accum6 = 14;
|
||||
double ur_tonnage_accum7 = 15;
|
||||
double ur_tonnage_accum8 = 16;
|
||||
double ur_tonnage_accum9 = 17;
|
||||
double ur_change_sleeve_length = 18;
|
||||
double ur_change_sleeve_depth = 19;
|
||||
int64 ur_roll_assembly_status = 20;
|
||||
int64 ur_no_of_fin_sec = 21;
|
||||
string ur_init_sec0 = 22;
|
||||
string ur_init_sec1 = 23;
|
||||
string ur_init_sec2 = 24;
|
||||
string ur_init_sec3 = 25;
|
||||
string ur_init_sec4 = 26;
|
||||
string ur_fin_sec0 = 27;
|
||||
string ur_fin_sec1 = 28;
|
||||
string ur_fin_sec2 = 29;
|
||||
string ur_fin_sec3 = 30;
|
||||
string ur_fin_sec4 = 31;
|
||||
string ur_roll_material_h = 32;
|
||||
double ur_roll_diam_act_hbo = 33;
|
||||
double ur_roll_diam_act_htp = 34;
|
||||
double ur_h_nomgap = 35;
|
||||
double ur_actual_shimps_hbo = 36;
|
||||
double ur_actual_shimps_htp = 37;
|
||||
double ur_roll_barrel_width_hbo = 38;
|
||||
double ur_roll_barrel_width_htp = 39;
|
||||
double ur_roll_cham_width_hbo = 40;
|
||||
double ur_roll_cham_width_htp = 41;
|
||||
double ur_roll_angle_hbo = 42;
|
||||
double ur_roll_angle_htb = 43;
|
||||
string ur_roll_set_id_vrolls = 44;
|
||||
string ur_vds_roll_number = 45;
|
||||
string ur_vos_roll_number = 46;
|
||||
string ur_roll_material_v = 47;
|
||||
double ur_roll_diam_act_vds = 48;
|
||||
double ur_roll_diam_act_vos = 49;
|
||||
double ur_roll_angle_vds = 50;
|
||||
double ur_roll_angle_vos = 51;
|
||||
double ur_passline_offset = 52;
|
||||
double ur_actual_shimps_vds_1 = 53;
|
||||
double ur_actual_shimps_vds_2 = 54;
|
||||
double ur_actual_shimps_vos_1 = 55;
|
||||
double ur_actual_shimps_vos_2 = 56;
|
||||
double ur_pin_v_chock = 57;
|
||||
int64 ur_roll_grooves = 58;
|
||||
double ur_roll_groove_width0 = 59;
|
||||
double ur_roll_groove_width1 = 60;
|
||||
double ur_roll_groove_width2 = 61;
|
||||
double ur_roll_groove_width3 = 62;
|
||||
double ur_roll_groove_width4 = 63;
|
||||
double ur_roll_groove_width5 = 64;
|
||||
double ur_roll_groove_width6 = 65;
|
||||
double ur_roll_groove_width7 = 66;
|
||||
double ur_roll_groove_width8 = 67;
|
||||
double ur_roll_groove_width9 = 68;
|
||||
double ur_roll_groove_stiffness_top0 = 69;
|
||||
double ur_roll_groove_stiffness_top1 = 70;
|
||||
double ur_roll_groove_stiffness_top2 = 71;
|
||||
double ur_roll_groove_stiffness_top3 = 72;
|
||||
double ur_roll_groove_stiffness_top4 = 73;
|
||||
double ur_roll_groove_stiffness_top5 = 74;
|
||||
double ur_roll_groove_stiffness_top6 = 75;
|
||||
double ur_roll_groove_stiffness_top7 = 76;
|
||||
double ur_roll_groove_stiffness_top8 = 77;
|
||||
double ur_roll_groove_stiffness_top9 = 78;
|
||||
double ur_roll_groove_stiffness_bot0 = 79;
|
||||
double ur_roll_groove_stiffness_bot1 = 80;
|
||||
double ur_roll_groove_stiffness_bot2 = 81;
|
||||
double ur_roll_groove_stiffness_bot3 = 82;
|
||||
double ur_roll_groove_stiffness_bot4 = 83;
|
||||
double ur_roll_groove_stiffness_bot5 = 84;
|
||||
double ur_roll_groove_stiffness_bot6 = 85;
|
||||
double ur_roll_groove_stiffness_bot7 = 86;
|
||||
double ur_roll_groove_stiffness_bot8 = 87;
|
||||
double ur_roll_groove_stiffness_bot9 = 88;
|
||||
double ur_roll_groove_pos0 = 89;
|
||||
double ur_roll_groove_pos1 = 90;
|
||||
double ur_roll_groove_pos2 = 91;
|
||||
double ur_roll_groove_pos3 = 92;
|
||||
double ur_roll_groove_pos4 = 93;
|
||||
double ur_roll_groove_pos5 = 94;
|
||||
double ur_roll_groove_pos6 = 95;
|
||||
double ur_roll_groove_pos7 = 96;
|
||||
double ur_roll_groove_pos8 = 97;
|
||||
double ur_roll_groove_pos9 = 98;
|
||||
int64 ur_roll_groove_sharp0 = 99;
|
||||
int64 ur_roll_groove_sharp1 = 100;
|
||||
int64 ur_roll_groove_sharp2 = 101;
|
||||
int64 ur_roll_groove_sharp3 = 102;
|
||||
int64 ur_roll_groove_sharp4 = 103;
|
||||
int64 ur_roll_groove_sharp5 = 104;
|
||||
int64 ur_roll_groove_sharp6 = 105;
|
||||
int64 ur_roll_groove_sharp7 = 106;
|
||||
int64 ur_roll_groove_sharp8 = 107;
|
||||
int64 ur_roll_groove_sharp9 = 108;
|
||||
double ur_roll_thrust_plate = 109;
|
||||
string ur_roll_id = 110;
|
||||
bool ur_del_flag = 111;
|
||||
string ur_roll_set_id_old = 112;
|
||||
string top_shaft_ur = 113;
|
||||
string bot_shaft_ur = 114;
|
||||
string ur_fin_sec5 = 115;
|
||||
string ur_fin_sec6 = 116;
|
||||
string ur_fin_sec7 = 117;
|
||||
string ur_fin_sec8 = 118;
|
||||
string ur_fin_sec9 = 119;
|
||||
string ur_fin_sec10 = 120;
|
||||
string ur_fin_sec11 = 121;
|
||||
string ur_fin_sec12 = 122;
|
||||
string ur_fin_sec13 = 123;
|
||||
string ur_fin_sec14 = 124;
|
||||
string ur_fin_sec15 = 125;
|
||||
string ur_fin_sec16 = 126;
|
||||
string ur_fin_sec17 = 127;
|
||||
string ur_fin_sec18 = 128;
|
||||
string ur_fin_sec19 = 129;
|
||||
bool old_flag = 130;
|
||||
int64 ampuesa_corta = 131;
|
||||
bool estado_registro = 132;
|
||||
string fecha_registro = 133;
|
||||
string fecha_envio = 134;
|
||||
}
|
||||
|
||||
message EdRollData {
|
||||
string ed_roll_set_date = 1;
|
||||
string ed_roll_set_id = 2;
|
||||
string ed_top_roll_number = 3;
|
||||
string ed_bot_roll_number = 4;
|
||||
string ed_roll_material = 5;
|
||||
int64 ed_roll_install_pos = 6;
|
||||
int64 ed_roll_set_type = 7;
|
||||
double ed_roll_diam_nom_htp = 8;
|
||||
double ed_roll_diam_nom_hbo = 9;
|
||||
double ed_roll_nominal_gap = 10;
|
||||
int64 ed_roll_assembly_status = 11;
|
||||
int64 ed_no_of_fin_sec = 12;
|
||||
string ed_init_sec0 = 13;
|
||||
string ed_init_sec1 = 14;
|
||||
string ed_init_sec2 = 15;
|
||||
string ed_init_sec3 = 16;
|
||||
string ed_init_sec4 = 17;
|
||||
string ed_fin_sec0 = 18;
|
||||
string ed_fin_sec1 = 19;
|
||||
string ed_fin_sec2 = 20;
|
||||
string ed_fin_sec3 = 21;
|
||||
string ed_fin_sec4 = 22;
|
||||
int64 ed_roll_no_of_grooves = 23;
|
||||
double ed_roll_groove_stiff_top0 = 24;
|
||||
double ed_roll_groove_stiff_top1 = 25;
|
||||
double ed_roll_groove_stiff_top2 = 26;
|
||||
double ed_roll_groove_stiff_top3 = 27;
|
||||
double ed_roll_groove_stiff_top4 = 28;
|
||||
double ed_roll_groove_stiff_top5 = 29;
|
||||
double ed_roll_groove_stiff_top6 = 30;
|
||||
double ed_roll_groove_stiff_top7 = 31;
|
||||
double ed_roll_groove_stiff_top8 = 32;
|
||||
double ed_roll_groove_stiff_top9 = 33;
|
||||
double ed_roll_groove_stiff_bot0 = 34;
|
||||
double ed_roll_groove_stiff_bot1 = 35;
|
||||
double ed_roll_groove_stiff_bot2 = 36;
|
||||
double ed_roll_groove_stiff_bot3 = 37;
|
||||
double ed_roll_groove_stiff_bot4 = 38;
|
||||
double ed_roll_groove_stiff_bot5 = 39;
|
||||
double ed_roll_groove_stiff_bot6 = 40;
|
||||
double ed_roll_groove_stiff_bot7 = 41;
|
||||
double ed_roll_groove_stiff_bot8 = 42;
|
||||
double ed_roll_groove_stiff_bot9 = 43;
|
||||
double ed_roll_groove_pos0 = 44;
|
||||
double ed_roll_groove_pos1 = 45;
|
||||
double ed_roll_groove_pos2 = 46;
|
||||
double ed_roll_groove_pos3 = 47;
|
||||
double ed_roll_groove_pos4 = 48;
|
||||
double ed_roll_groove_pos5 = 49;
|
||||
double ed_roll_groove_pos6 = 50;
|
||||
double ed_roll_groove_pos7 = 51;
|
||||
double ed_roll_groove_pos8 = 52;
|
||||
double ed_roll_groove_pos9 = 53;
|
||||
double ed_actual_shimps_hbo = 54;
|
||||
double ed_actual_shimps_htp = 55;
|
||||
double ed_change_sleeve_length = 56;
|
||||
double ed_change_sleeve_depth = 57;
|
||||
double ed_tonnage_accum0 = 58;
|
||||
double ed_tonnage_accum1 = 59;
|
||||
double ed_tonnage_accum2 = 60;
|
||||
double ed_tonnage_accum3 = 61;
|
||||
double ed_tonnage_accum4 = 62;
|
||||
double ed_tonnage_accum5 = 63;
|
||||
double ed_tonnage_accum6 = 64;
|
||||
double ed_tonnage_accum7 = 65;
|
||||
double ed_tonnage_accum8 = 66;
|
||||
double ed_tonnage_accum9 = 67;
|
||||
double ed_roll_flange_diam_top0 = 68;
|
||||
double ed_roll_flange_diam_top1 = 69;
|
||||
double ed_roll_flange_diam_top2 = 70;
|
||||
double ed_roll_flange_diam_top3 = 71;
|
||||
double ed_roll_flange_diam_top4 = 72;
|
||||
double ed_roll_flange_diam_top5 = 73;
|
||||
double ed_roll_flange_diam_top6 = 74;
|
||||
double ed_roll_flange_diam_top7 = 75;
|
||||
double ed_roll_flange_diam_top8 = 76;
|
||||
double ed_roll_flange_diam_top9 = 77;
|
||||
double ed_roll_flange_diam_bot0 = 78;
|
||||
double ed_roll_flange_diam_bot1 = 79;
|
||||
double ed_roll_flange_diam_bot2 = 80;
|
||||
double ed_roll_flange_diam_bot3 = 81;
|
||||
double ed_roll_flange_diam_bot4 = 82;
|
||||
double ed_roll_flange_diam_bot5 = 83;
|
||||
double ed_roll_flange_diam_bot6 = 84;
|
||||
double ed_roll_flange_diam_bot7 = 85;
|
||||
double ed_roll_flange_diam_bot8 = 86;
|
||||
double ed_roll_flange_diam_bot9 = 87;
|
||||
double ed_roll_web_diam_top0 = 88;
|
||||
double ed_roll_web_diam_top1 = 89;
|
||||
double ed_roll_web_diam_top2 = 90;
|
||||
double ed_roll_web_diam_top3 = 91;
|
||||
double ed_roll_web_diam_top4 = 92;
|
||||
double ed_roll_web_diam_top5 = 93;
|
||||
double ed_roll_web_diam_top6 = 94;
|
||||
double ed_roll_web_diam_top7 = 95;
|
||||
double ed_roll_web_diam_top8 = 96;
|
||||
double ed_roll_web_diam_top9 = 97;
|
||||
double ed_roll_web_diam_bot0 = 98;
|
||||
double ed_roll_web_diam_bot1 = 99;
|
||||
double ed_roll_web_diam_bot2 = 100;
|
||||
double ed_roll_web_diam_bot3 = 101;
|
||||
double ed_roll_web_diam_bot4 = 102;
|
||||
double ed_roll_web_diam_bot5 = 103;
|
||||
double ed_roll_web_diam_bot6 = 104;
|
||||
double ed_roll_web_diam_bot7 = 105;
|
||||
double ed_roll_web_diam_bot8 = 106;
|
||||
double ed_roll_web_diam_bot9 = 107;
|
||||
double ed_roll_cham_width_top0 = 108;
|
||||
double ed_roll_cham_width_top1 = 109;
|
||||
double ed_roll_cham_width_top2 = 110;
|
||||
double ed_roll_cham_width_top3 = 111;
|
||||
double ed_roll_cham_width_top4 = 112;
|
||||
double ed_roll_cham_width_top5 = 113;
|
||||
double ed_roll_cham_width_top6 = 114;
|
||||
double ed_roll_cham_width_top7 = 115;
|
||||
double ed_roll_cham_width_top8 = 116;
|
||||
double ed_roll_cham_width_top9 = 117;
|
||||
double ed_roll_cham_width_bot0 = 118;
|
||||
double ed_roll_cham_width_bot1 = 119;
|
||||
double ed_roll_cham_width_bot2 = 120;
|
||||
double ed_roll_cham_width_bot3 = 121;
|
||||
double ed_roll_cham_width_bot4 = 122;
|
||||
double ed_roll_cham_width_bot5 = 123;
|
||||
double ed_roll_cham_width_bot6 = 124;
|
||||
double ed_roll_cham_width_bot7 = 125;
|
||||
double ed_roll_cham_width_bot8 = 126;
|
||||
double ed_roll_cham_width_bot9 = 127;
|
||||
double ed_roll_angle_flange_face0 = 128;
|
||||
double ed_roll_angle_flange_face1 = 129;
|
||||
double ed_roll_angle_flange_face2 = 130;
|
||||
double ed_roll_angle_flange_face3 = 131;
|
||||
double ed_roll_angle_flange_face4 = 132;
|
||||
double ed_roll_angle_flange_face5 = 133;
|
||||
double ed_roll_angle_flange_face6 = 134;
|
||||
double ed_roll_angle_flange_face7 = 135;
|
||||
double ed_roll_angle_flange_face8 = 136;
|
||||
double ed_roll_angle_flange_face9 = 137;
|
||||
double ed_roll_root_radius0 = 138;
|
||||
double ed_roll_root_radius1 = 139;
|
||||
double ed_roll_root_radius2 = 140;
|
||||
double ed_roll_root_radius3 = 141;
|
||||
double ed_roll_root_radius4 = 142;
|
||||
double ed_roll_root_radius5 = 143;
|
||||
double ed_roll_root_radius6 = 144;
|
||||
double ed_roll_root_radius7 = 145;
|
||||
double ed_roll_root_radius8 = 146;
|
||||
double ed_roll_root_radius9 = 147;
|
||||
double ed_passline_offset = 148;
|
||||
int64 ed_d_roll_groove_sharp0 = 149;
|
||||
int64 ed_d_roll_groove_sharp1 = 150;
|
||||
int64 ed_d_roll_groove_sharp2 = 151;
|
||||
int64 ed_d_roll_groove_sharp3 = 152;
|
||||
int64 ed_d_roll_groove_sharp4 = 153;
|
||||
int64 ed_d_roll_groove_sharp5 = 154;
|
||||
int64 ed_d_roll_groove_sharp6 = 155;
|
||||
int64 ed_d_roll_groove_sharp7 = 156;
|
||||
int64 ed_d_roll_groove_sharp8 = 157;
|
||||
int64 ed_d_roll_groove_sharp9 = 158;
|
||||
double ed_d_roll_groove_width0 = 159;
|
||||
double ed_d_roll_groove_width1 = 160;
|
||||
double ed_d_roll_groove_width2 = 161;
|
||||
double ed_d_roll_groove_width3 = 162;
|
||||
double ed_d_roll_groove_width4 = 163;
|
||||
double ed_d_roll_groove_width5 = 164;
|
||||
double ed_d_roll_groove_width6 = 165;
|
||||
double ed_d_roll_groove_width7 = 166;
|
||||
double ed_d_roll_groove_width8 = 167;
|
||||
double ed_d_roll_groove_width9 = 168;
|
||||
string ed_roll_id = 169;
|
||||
bool ed_del_flag = 170;
|
||||
string ed_roll_set_id_old = 171;
|
||||
string ed_fin_sec5 = 172;
|
||||
string ed_fin_sec6 = 173;
|
||||
string ed_fin_sec7 = 174;
|
||||
string ed_fin_sec8 = 175;
|
||||
string ed_fin_sec9 = 176;
|
||||
string ed_fin_sec10 = 177;
|
||||
string ed_fin_sec11 = 178;
|
||||
string ed_fin_sec12 = 179;
|
||||
string ed_fin_sec13 = 180;
|
||||
string ed_fin_sec14 = 181;
|
||||
string ed_fin_sec15 = 182;
|
||||
string ed_fin_sec16 = 183;
|
||||
string ed_fin_sec17 = 184;
|
||||
string ed_fin_sec18 = 185;
|
||||
string ed_fin_sec19 = 186;
|
||||
bool old_flag = 187;
|
||||
bool estado_registro = 188;
|
||||
string fecha_registro = 189;
|
||||
string fecha_envio = 190;
|
||||
}
|
||||
|
||||
|
||||
|
||||
message UfRollData {
|
||||
string uf_roll_set_date = 1;
|
||||
string uf_roll_set_id = 2;
|
||||
string uf_roll_set_id_hrolls = 3;
|
||||
string uf_hto_roll_number = 4;
|
||||
string uf_hbo_roll_number = 5;
|
||||
int64 uf_roll_install_pos = 6;
|
||||
int64 uf_roll_set_type = 7;
|
||||
double uf_tonnage_accum0 = 8;
|
||||
double uf_tonnage_accum1 = 9;
|
||||
double uf_tonnage_accum2 = 10;
|
||||
double uf_tonnage_accum3 = 11;
|
||||
double uf_tonnage_accum4 = 12;
|
||||
double uf_tonnage_accum5 = 13;
|
||||
double uf_tonnage_accum6 = 14;
|
||||
double uf_tonnage_accum7 = 15;
|
||||
double uf_tonnage_accum8 = 16;
|
||||
double uf_tonnage_accum9 = 17;
|
||||
double uf_change_sleeve_length = 18;
|
||||
double uf_change_sleeve_depth = 19;
|
||||
int64 uf_roll_assembly_status = 20;
|
||||
int64 uf_no_of_fin_sec = 21;
|
||||
string uf_init_sec0 = 22;
|
||||
string uf_init_sec1 = 23;
|
||||
string uf_init_sec2 = 24;
|
||||
string uf_init_sec3 = 25;
|
||||
string uf_init_sec4 = 26;
|
||||
string uf_fin_sec0 = 27;
|
||||
string uf_fin_sec1 = 28;
|
||||
string uf_fin_sec2 = 29;
|
||||
string uf_fin_sec3 = 30;
|
||||
string uf_fin_sec4 = 31;
|
||||
string uf_roll_material_h = 32;
|
||||
double uf_roll_diam_act_hbo = 33;
|
||||
double uf_roll_diam_act_htp = 34;
|
||||
double uf_h_nomgap = 35;
|
||||
double uf_actual_shimps_hbo = 36;
|
||||
double uf_actual_shimps_htp = 37;
|
||||
double uf_roll_barrel_width_hbo = 38;
|
||||
double uf_roll_barrel_width_htp = 39;
|
||||
double uf_roll_cham_width_hbo = 40;
|
||||
double uf_roll_cham_width_htp = 41;
|
||||
double uf_roll_angle_hbo = 42;
|
||||
double uf_roll_angle_htb = 43;
|
||||
string uf_roll_set_id_vrolls = 44;
|
||||
string uf_vds_roll_number = 45;
|
||||
string uf_vos_roll_number = 46;
|
||||
string uf_roll_material_v = 47;
|
||||
double uf_roll_diam_act_vds = 48;
|
||||
double uf_roll_diam_act_vos = 49;
|
||||
double uf_roll_angle_vds = 50;
|
||||
double uf_roll_angle_vos = 51;
|
||||
double uf_passline_offset = 52;
|
||||
double uf_actual_shimps_vds_1 = 53;
|
||||
double uf_actual_shimps_vds_2 = 54;
|
||||
double uf_actual_shimps_vos_1 = 55;
|
||||
double uf_actual_shimps_vos_2 = 56;
|
||||
double uf_pin_v_chock = 57;
|
||||
int64 uf_roll_grooves = 58;
|
||||
double uf_roll_groove_width0 = 59;
|
||||
double uf_roll_groove_width1 = 60;
|
||||
double uf_roll_groove_width2 = 61;
|
||||
double uf_roll_groove_width3 = 62;
|
||||
double uf_roll_groove_width4 = 63;
|
||||
double uf_roll_groove_width5 = 64;
|
||||
double uf_roll_groove_width6 = 65;
|
||||
double uf_roll_groove_width7 = 66;
|
||||
double uf_roll_groove_width8 = 67;
|
||||
double uf_roll_groove_width9 = 68;
|
||||
double uf_roll_groove_stiffness_top0 = 69;
|
||||
double uf_roll_groove_stiffness_top1 = 70;
|
||||
double uf_roll_groove_stiffness_top2 = 71;
|
||||
double uf_roll_groove_stiffness_top3 = 72;
|
||||
double uf_roll_groove_stiffness_top4 = 73;
|
||||
double uf_roll_groove_stiffness_top5 = 74;
|
||||
double uf_roll_groove_stiffness_top6 = 75;
|
||||
double uf_roll_groove_stiffness_top7 = 76;
|
||||
double uf_roll_groove_stiffness_top8 = 77;
|
||||
double uf_roll_groove_stiffness_top9 = 78;
|
||||
double uf_roll_groove_stiffness_bot0 = 79;
|
||||
double uf_roll_groove_stiffness_bot1 = 80;
|
||||
double uf_roll_groove_stiffness_bot2 = 81;
|
||||
double uf_roll_groove_stiffness_bot3 = 82;
|
||||
double uf_roll_groove_stiffness_bot4 = 83;
|
||||
double uf_roll_groove_stiffness_bot5 = 84;
|
||||
double uf_roll_groove_stiffness_bot6 = 85;
|
||||
double uf_roll_groove_stiffness_bot7 = 86;
|
||||
double uf_roll_groove_stiffness_bot8 = 87;
|
||||
double uf_roll_groove_stiffness_bot9 = 88;
|
||||
double uf_roll_groove_pos0 = 89;
|
||||
double uf_roll_groove_pos1 = 90;
|
||||
double uf_roll_groove_pos2 = 91;
|
||||
double uf_roll_groove_pos3 = 92;
|
||||
double uf_roll_groove_pos4 = 93;
|
||||
double uf_roll_groove_pos5 = 94;
|
||||
double uf_roll_groove_pos6 = 95;
|
||||
double uf_roll_groove_pos7 = 96;
|
||||
double uf_roll_groove_pos8 = 97;
|
||||
double uf_roll_groove_pos9 = 98;
|
||||
int64 uf_roll_groove_sharp0 = 99;
|
||||
int64 uf_roll_groove_sharp1 = 100;
|
||||
int64 uf_roll_groove_sharp2 = 101;
|
||||
int64 uf_roll_groove_sharp3 = 102;
|
||||
int64 uf_roll_groove_sharp4 = 103;
|
||||
int64 uf_roll_groove_sharp5 = 104;
|
||||
int64 uf_roll_groove_sharp6 = 105;
|
||||
int64 uf_roll_groove_sharp7 = 106;
|
||||
int64 uf_roll_groove_sharp8 = 107;
|
||||
int64 uf_roll_groove_sharp9 = 108;
|
||||
double uf_roll_thrust_plate = 109;
|
||||
string uf_roll_id = 110;
|
||||
bool uf_del_flag = 111;
|
||||
string uf_roll_set_id_old = 112;
|
||||
string top_shaft_uf = 113;
|
||||
string bot_shaft_uf = 114;
|
||||
string uf_fin_sec5 = 115;
|
||||
string uf_fin_sec6 = 116;
|
||||
string uf_fin_sec7 = 117;
|
||||
string uf_fin_sec8 = 118;
|
||||
string uf_fin_sec9 = 119;
|
||||
string uf_fin_sec10 = 120;
|
||||
string uf_fin_sec11 = 121;
|
||||
string uf_fin_sec12 = 122;
|
||||
string uf_fin_sec13 = 123;
|
||||
string uf_fin_sec14 = 124;
|
||||
string uf_fin_sec15 = 125;
|
||||
string uf_fin_sec16 = 126;
|
||||
string uf_fin_sec17 = 127;
|
||||
string uf_fin_sec18 = 128;
|
||||
string uf_fin_sec19 = 129;
|
||||
bool old_flag = 130;
|
||||
int64 ampuesa_corta = 131;
|
||||
bool estado_registro = 132;
|
||||
string fecha_registro = 133;
|
||||
string fecha_envio = 134;
|
||||
}
|
220
pkg/api/api_grpc.pb.go
Normal file
220
pkg/api/api_grpc.pb.go
Normal file
@ -0,0 +1,220 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.23.2
|
||||
// source: api.proto
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
RollDataService_BdRollData_FullMethodName = "/api.RollDataService/BdRollData"
|
||||
RollDataService_UrRollData_FullMethodName = "/api.RollDataService/UrRollData"
|
||||
RollDataService_EdRollData_FullMethodName = "/api.RollDataService/EdRollData"
|
||||
RollDataService_UfRollData_FullMethodName = "/api.RollDataService/UfRollData"
|
||||
)
|
||||
|
||||
// RollDataServiceClient is the client API for RollDataService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type RollDataServiceClient interface {
|
||||
BdRollData(ctx context.Context, in *BdRollDataReq, opts ...grpc.CallOption) (*BdRollDataRes, error)
|
||||
UrRollData(ctx context.Context, in *UrRollDataReq, opts ...grpc.CallOption) (*UrRollDataRes, error)
|
||||
EdRollData(ctx context.Context, in *EdRollDataReq, opts ...grpc.CallOption) (*EdRollDataRes, error)
|
||||
UfRollData(ctx context.Context, in *UfRollDataReq, opts ...grpc.CallOption) (*UfRollDataRes, error)
|
||||
}
|
||||
|
||||
type rollDataServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRollDataServiceClient(cc grpc.ClientConnInterface) RollDataServiceClient {
|
||||
return &rollDataServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *rollDataServiceClient) BdRollData(ctx context.Context, in *BdRollDataReq, opts ...grpc.CallOption) (*BdRollDataRes, error) {
|
||||
out := new(BdRollDataRes)
|
||||
err := c.cc.Invoke(ctx, RollDataService_BdRollData_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *rollDataServiceClient) UrRollData(ctx context.Context, in *UrRollDataReq, opts ...grpc.CallOption) (*UrRollDataRes, error) {
|
||||
out := new(UrRollDataRes)
|
||||
err := c.cc.Invoke(ctx, RollDataService_UrRollData_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *rollDataServiceClient) EdRollData(ctx context.Context, in *EdRollDataReq, opts ...grpc.CallOption) (*EdRollDataRes, error) {
|
||||
out := new(EdRollDataRes)
|
||||
err := c.cc.Invoke(ctx, RollDataService_EdRollData_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *rollDataServiceClient) UfRollData(ctx context.Context, in *UfRollDataReq, opts ...grpc.CallOption) (*UfRollDataRes, error) {
|
||||
out := new(UfRollDataRes)
|
||||
err := c.cc.Invoke(ctx, RollDataService_UfRollData_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RollDataServiceServer is the server API for RollDataService service.
|
||||
// All implementations must embed UnimplementedRollDataServiceServer
|
||||
// for forward compatibility
|
||||
type RollDataServiceServer interface {
|
||||
BdRollData(context.Context, *BdRollDataReq) (*BdRollDataRes, error)
|
||||
UrRollData(context.Context, *UrRollDataReq) (*UrRollDataRes, error)
|
||||
EdRollData(context.Context, *EdRollDataReq) (*EdRollDataRes, error)
|
||||
UfRollData(context.Context, *UfRollDataReq) (*UfRollDataRes, error)
|
||||
mustEmbedUnimplementedRollDataServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedRollDataServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedRollDataServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedRollDataServiceServer) BdRollData(context.Context, *BdRollDataReq) (*BdRollDataRes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BdRollData not implemented")
|
||||
}
|
||||
func (UnimplementedRollDataServiceServer) UrRollData(context.Context, *UrRollDataReq) (*UrRollDataRes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UrRollData not implemented")
|
||||
}
|
||||
func (UnimplementedRollDataServiceServer) EdRollData(context.Context, *EdRollDataReq) (*EdRollDataRes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method EdRollData not implemented")
|
||||
}
|
||||
func (UnimplementedRollDataServiceServer) UfRollData(context.Context, *UfRollDataReq) (*UfRollDataRes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UfRollData not implemented")
|
||||
}
|
||||
func (UnimplementedRollDataServiceServer) mustEmbedUnimplementedRollDataServiceServer() {}
|
||||
|
||||
// UnsafeRollDataServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RollDataServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeRollDataServiceServer interface {
|
||||
mustEmbedUnimplementedRollDataServiceServer()
|
||||
}
|
||||
|
||||
func RegisterRollDataServiceServer(s grpc.ServiceRegistrar, srv RollDataServiceServer) {
|
||||
s.RegisterService(&RollDataService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _RollDataService_BdRollData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BdRollDataReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RollDataServiceServer).BdRollData(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RollDataService_BdRollData_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RollDataServiceServer).BdRollData(ctx, req.(*BdRollDataReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RollDataService_UrRollData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UrRollDataReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RollDataServiceServer).UrRollData(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RollDataService_UrRollData_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RollDataServiceServer).UrRollData(ctx, req.(*UrRollDataReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RollDataService_EdRollData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EdRollDataReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RollDataServiceServer).EdRollData(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RollDataService_EdRollData_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RollDataServiceServer).EdRollData(ctx, req.(*EdRollDataReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RollDataService_UfRollData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UfRollDataReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RollDataServiceServer).UfRollData(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RollDataService_UfRollData_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RollDataServiceServer).UfRollData(ctx, req.(*UfRollDataReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// RollDataService_ServiceDesc is the grpc.ServiceDesc for RollDataService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var RollDataService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "api.RollDataService",
|
||||
HandlerType: (*RollDataServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "BdRollData",
|
||||
Handler: _RollDataService_BdRollData_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UrRollData",
|
||||
Handler: _RollDataService_UrRollData_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "EdRollData",
|
||||
Handler: _RollDataService_EdRollData_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UfRollData",
|
||||
Handler: _RollDataService_UfRollData_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api.proto",
|
||||
}
|
3
pkg/api/generate.go
Normal file
3
pkg/api/generate.go
Normal file
@ -0,0 +1,3 @@
|
||||
package api
|
||||
|
||||
//go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative api.proto
|
15
pkg/api/service.go
Normal file
15
pkg/api/service.go
Normal file
@ -0,0 +1,15 @@
|
||||
package api
|
||||
|
||||
type RollDataID string
|
||||
|
||||
type RollDataReq struct {
|
||||
Sender string
|
||||
ID RollDataID
|
||||
TimeStamp string
|
||||
}
|
||||
|
||||
type RollDataRes struct {
|
||||
ID RollDataID
|
||||
TimeStamp string
|
||||
RollData any
|
||||
}
|
Loading…
Reference in New Issue
Block a user