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 {
|
type DefectInfo struct {
|
||||||
USN string
|
USN string
|
||||||
PartNO string
|
PartNO string
|
||||||
|
MfgMO string
|
||||||
SKU string
|
SKU string
|
||||||
Line string
|
Line string
|
||||||
Location string
|
Location string
|
||||||
@ -490,7 +491,7 @@ func (e *EWS) GetDefectReport(cfg cnf.Cfg, logger *log.Logger, host string, addr
|
|||||||
di := new(DefectInfo)
|
di := new(DefectInfo)
|
||||||
defect := ""
|
defect := ""
|
||||||
rows, err := dbo.Query(
|
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
|
FROM v_ngreport
|
||||||
ORDER BY diffmins ASC;`)
|
ORDER BY diffmins ASC;`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -506,6 +507,7 @@ func (e *EWS) GetDefectReport(cfg cnf.Cfg, logger *log.Logger, host string, addr
|
|||||||
err := rows.Scan(
|
err := rows.Scan(
|
||||||
&di.USN,
|
&di.USN,
|
||||||
&di.PartNO,
|
&di.PartNO,
|
||||||
|
&di.MfgMO,
|
||||||
&di.SKU,
|
&di.SKU,
|
||||||
&di.Line,
|
&di.Line,
|
||||||
&di.Location,
|
&di.Location,
|
||||||
@ -520,8 +522,8 @@ func (e *EWS) GetDefectReport(cfg cnf.Cfg, logger *log.Logger, host string, addr
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
break
|
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`,
|
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.SKU, di.Line, di.Location, di.Item, di.Status, di.Message, di.FirstAck, di.LastAck, di.LastChg, di.DiffMins, "\r\n")
|
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
|
defect = defect + temp
|
||||||
num += 1
|
num += 1
|
||||||
}
|
}
|
||||||
@ -566,7 +568,7 @@ func (e *EWS) GetOfflineReport(cfg cnf.Cfg, logger *log.Logger, host string, add
|
|||||||
di := new(DefectInfo)
|
di := new(DefectInfo)
|
||||||
offline := ""
|
offline := ""
|
||||||
rows, err := dbo.Query(
|
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
|
FROM v_offline
|
||||||
ORDER BY diffmins DESC;`)
|
ORDER BY diffmins DESC;`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -582,6 +584,7 @@ func (e *EWS) GetOfflineReport(cfg cnf.Cfg, logger *log.Logger, host string, add
|
|||||||
err := rows.Scan(
|
err := rows.Scan(
|
||||||
&di.USN,
|
&di.USN,
|
||||||
&di.PartNO,
|
&di.PartNO,
|
||||||
|
&di.MfgMO,
|
||||||
&di.SKU,
|
&di.SKU,
|
||||||
&di.Line,
|
&di.Line,
|
||||||
&di.Location,
|
&di.Location,
|
||||||
@ -596,8 +599,8 @@ func (e *EWS) GetOfflineReport(cfg cnf.Cfg, logger *log.Logger, host string, add
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
break
|
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`,
|
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.SKU, di.Line, di.Location, di.Item, di.Status, di.Message, di.FirstAck, di.LastAck, di.LastChg, di.DiffMins, "\r\n")
|
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
|
offline = offline + temp
|
||||||
num += 1
|
num += 1
|
||||||
}
|
}
|
||||||
@ -693,7 +696,7 @@ func (e *EWS) TemplateUutInfo(loc, locTime, misc, last, bkup string) string {
|
|||||||
<br/>
|
<br/>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Part NO.</th>
|
<th>PartNO.</th>
|
||||||
<th>MO</th>
|
<th>MO</th>
|
||||||
<th>SKU</th>
|
<th>SKU</th>
|
||||||
<th>First Ack</th>
|
<th>First Ack</th>
|
||||||
@ -769,7 +772,8 @@ func (e *EWS) TemplateDefectInfo(src string) string {
|
|||||||
<tr>
|
<tr>
|
||||||
<th>NO.</th>
|
<th>NO.</th>
|
||||||
<th>USN</th>
|
<th>USN</th>
|
||||||
<th>Part NO.</th>
|
<th>PartNO.</th>
|
||||||
|
<th>MO</th>
|
||||||
<th>SKU</th>
|
<th>SKU</th>
|
||||||
<th>Line</th>
|
<th>Line</th>
|
||||||
<th>Location</th>
|
<th>Location</th>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user