add mfg order number to defect/offline table
This commit is contained in:
parent
56d2abb9cb
commit
f88610c51b
BIN
APIServer.exe
BIN
APIServer.exe
Binary file not shown.
20
ews/ews.go
20
ews/ews.go
@ -34,6 +34,7 @@ type UutInfo struct {
|
||||
type DefectInfo struct {
|
||||
USN string
|
||||
PartNO string
|
||||
MfgMO string
|
||||
SKU string
|
||||
Line string
|
||||
Location string
|
||||
@ -490,7 +491,7 @@ func (e *EWS) GetDefectReport(cfg cnf.Cfg, logger *log.Logger, host string, addr
|
||||
di := new(DefectInfo)
|
||||
defect := ""
|
||||
rows, err := dbo.Query(
|
||||
`SELECT usn,partno,sku,line,location,item,status,message,first_ack,last_ack,last_change,diffmins
|
||||
`SELECT usn,partno,mo,sku,line,location,item,status,message,first_ack,last_ack,last_change,diffmins
|
||||
FROM v_ngreport
|
||||
ORDER BY diffmins ASC;`)
|
||||
if err != nil {
|
||||
@ -506,6 +507,7 @@ func (e *EWS) GetDefectReport(cfg cnf.Cfg, logger *log.Logger, host string, addr
|
||||
err := rows.Scan(
|
||||
&di.USN,
|
||||
&di.PartNO,
|
||||
&di.MfgMO,
|
||||
&di.SKU,
|
||||
&di.Line,
|
||||
&di.Location,
|
||||
@ -520,8 +522,8 @@ func (e *EWS) GetDefectReport(cfg cnf.Cfg, logger *log.Logger, host string, addr
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
temp := fmt.Sprintf(`<tr><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>%s`,
|
||||
num, di.USN, di.PartNO, di.SKU, di.Line, di.Location, di.Item, di.Status, di.Message, di.FirstAck, di.LastAck, di.LastChg, di.DiffMins, "\r\n")
|
||||
temp := fmt.Sprintf(`<tr><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>%s`,
|
||||
num, di.USN, di.PartNO, di.MfgMO, di.SKU, di.Line, di.Location, di.Item, di.Status, di.Message, di.FirstAck, di.LastAck, di.LastChg, di.DiffMins, "\r\n")
|
||||
defect = defect + temp
|
||||
num += 1
|
||||
}
|
||||
@ -566,7 +568,7 @@ func (e *EWS) GetOfflineReport(cfg cnf.Cfg, logger *log.Logger, host string, add
|
||||
di := new(DefectInfo)
|
||||
offline := ""
|
||||
rows, err := dbo.Query(
|
||||
`SELECT usn,partno,sku,line,location,item,status,message,first_ack,last_ack,last_change,diffmins
|
||||
`SELECT usn,partno,mo,sku,line,location,item,status,message,first_ack,last_ack,last_change,diffmins
|
||||
FROM v_offline
|
||||
ORDER BY diffmins DESC;`)
|
||||
if err != nil {
|
||||
@ -582,6 +584,7 @@ func (e *EWS) GetOfflineReport(cfg cnf.Cfg, logger *log.Logger, host string, add
|
||||
err := rows.Scan(
|
||||
&di.USN,
|
||||
&di.PartNO,
|
||||
&di.MfgMO,
|
||||
&di.SKU,
|
||||
&di.Line,
|
||||
&di.Location,
|
||||
@ -596,8 +599,8 @@ func (e *EWS) GetOfflineReport(cfg cnf.Cfg, logger *log.Logger, host string, add
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
temp := fmt.Sprintf(`<tr><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>%s`,
|
||||
num, di.USN, di.PartNO, di.SKU, di.Line, di.Location, di.Item, di.Status, di.Message, di.FirstAck, di.LastAck, di.LastChg, di.DiffMins, "\r\n")
|
||||
temp := fmt.Sprintf(`<tr><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>%s`,
|
||||
num, di.USN, di.PartNO, di.MfgMO, di.SKU, di.Line, di.Location, di.Item, di.Status, di.Message, di.FirstAck, di.LastAck, di.LastChg, di.DiffMins, "\r\n")
|
||||
offline = offline + temp
|
||||
num += 1
|
||||
}
|
||||
@ -693,7 +696,7 @@ func (e *EWS) TemplateUutInfo(loc, locTime, misc, last, bkup string) string {
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Part NO.</th>
|
||||
<th>PartNO.</th>
|
||||
<th>MO</th>
|
||||
<th>SKU</th>
|
||||
<th>First Ack</th>
|
||||
@ -769,7 +772,8 @@ func (e *EWS) TemplateDefectInfo(src string) string {
|
||||
<tr>
|
||||
<th>NO.</th>
|
||||
<th>USN</th>
|
||||
<th>Part NO.</th>
|
||||
<th>PartNO.</th>
|
||||
<th>MO</th>
|
||||
<th>SKU</th>
|
||||
<th>Line</th>
|
||||
<th>Location</th>
|
||||
|
Loading…
x
Reference in New Issue
Block a user