|
@@ -508,7 +508,7 @@ func (this *OilContractController) ImportExcel() {
|
|
|
if con1.Id > 0 {
|
|
if con1.Id > 0 {
|
|
|
con1.ContractName = sheet.Rows[i].Cells[1].String()
|
|
con1.ContractName = sheet.Rows[i].Cells[1].String()
|
|
|
con1.Amount = sheet.Rows[i].Cells[2].String()
|
|
con1.Amount = sheet.Rows[i].Cells[2].String()
|
|
|
- con1.Class = sheet.Rows[i].Cells[3].String()
|
|
|
|
|
|
|
+ con1.ClassName = sheet.Rows[i].Cells[3].String()
|
|
|
con1.ContractSonClass = sheet.Rows[i].Cells[4].String()
|
|
con1.ContractSonClass = sheet.Rows[i].Cells[4].String()
|
|
|
con1.SmallClass = sheet.Rows[i].Cells[5].String()
|
|
con1.SmallClass = sheet.Rows[i].Cells[5].String()
|
|
|
con1.SignedDate,_ = time.ParseInLocation("2006-01-02", convertToFormatDay(sheet.Rows[i].Cells[6].Value), time.Local)
|
|
con1.SignedDate,_ = time.ParseInLocation("2006-01-02", convertToFormatDay(sheet.Rows[i].Cells[6].Value), time.Local)
|
|
@@ -555,7 +555,7 @@ func (this *OilContractController) ImportExcel() {
|
|
|
con.ContractNo = sheet.Rows[i].Cells[0].String()
|
|
con.ContractNo = sheet.Rows[i].Cells[0].String()
|
|
|
con.ContractName = sheet.Rows[i].Cells[1].String()
|
|
con.ContractName = sheet.Rows[i].Cells[1].String()
|
|
|
con.Amount = sheet.Rows[i].Cells[2].String()
|
|
con.Amount = sheet.Rows[i].Cells[2].String()
|
|
|
- con.Class = sheet.Rows[i].Cells[3].String()
|
|
|
|
|
|
|
+ con.ClassName = sheet.Rows[i].Cells[3].String()
|
|
|
|
|
|
|
|
con.ContractSonClass = sheet.Rows[i].Cells[4].String()
|
|
con.ContractSonClass = sheet.Rows[i].Cells[4].String()
|
|
|
con.SmallClass = sheet.Rows[i].Cells[5].String()
|
|
con.SmallClass = sheet.Rows[i].Cells[5].String()
|
|
@@ -700,10 +700,10 @@ func (this *OilContractController) ImportUpdate() {
|
|
|
where := "1=1"
|
|
where := "1=1"
|
|
|
if Column == "ContractClass" {
|
|
if Column == "ContractClass" {
|
|
|
if Id != "" {
|
|
if Id != "" {
|
|
|
- where += " and Id = " + Id + " and ImportStatus = 0 and Class = '" + Class + "'"
|
|
|
|
|
|
|
+ where += " and Id = " + Id + " and ImportStatus = 0 and ClassName = '" + Class + "'"
|
|
|
sql = "update OilContract set SupplierName = '" + supp.SupplierName + "', " + Column + " = '" + Value + "' where " + where
|
|
sql = "update OilContract set SupplierName = '" + supp.SupplierName + "', " + Column + " = '" + Value + "' where " + where
|
|
|
} else {
|
|
} else {
|
|
|
- where += " and ImportStatus = 0 and Class = '" + Class + "' and " + Column + " = ''"
|
|
|
|
|
|
|
+ where += " and ImportStatus = 0 and ClassName = '" + Class + "' and " + Column + " = ''"
|
|
|
sql = "update OilContract set " + Column + " = '" + Value + "' where " + where
|
|
sql = "update OilContract set " + Column + " = '" + Value + "' where " + where
|
|
|
}
|
|
}
|
|
|
_, err = utils.DBE.Query(sql)
|
|
_, err = utils.DBE.Query(sql)
|