|
@@ -24,9 +24,10 @@ public class DRPWarrantycardCheck extends ServiceController {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void serviceRun() throws YosException {
|
|
public void serviceRun() throws YosException {
|
|
|
|
|
+ Rows drpWarrantycardRows = new Rows();
|
|
|
try {
|
|
try {
|
|
|
SQLDump sqlDump = new SQLDump();
|
|
SQLDump sqlDump = new SQLDump();
|
|
|
- Rows drpWarrantycardRows = dbConnect.runSqlQuery("select * from mddrp.twarrantycard where eordermatchflag=0 limit 2000");
|
|
|
|
|
|
|
+ drpWarrantycardRows = dbConnect.runSqlQuery("select * from mddrp.twarrantycard where eordermatchflag=0 limit 2000");
|
|
|
if (drpWarrantycardRows.isNotEmpty()) {
|
|
if (drpWarrantycardRows.isNotEmpty()) {
|
|
|
RowsMap warrantycardRowsMap = SQLFactory.createQuerySQL(dbConnect, "sa_warrantycard", "cardno", "sa_customersid").setWhere("cardno", drpWarrantycardRows.toArrayList("fbillnum")).query().toRowsMap("cardno");
|
|
RowsMap warrantycardRowsMap = SQLFactory.createQuerySQL(dbConnect, "sa_warrantycard", "cardno", "sa_customersid").setWhere("cardno", drpWarrantycardRows.toArrayList("fbillnum")).query().toRowsMap("cardno");
|
|
|
RowsMap itemRowsMap = SQLFactory.createQuerySQL(dbConnect, "plm_item", "itemno", "itemid").setWhere("itemno", drpWarrantycardRows.toArrayList("fitemno")).query().toRowsMap("itemno");
|
|
RowsMap itemRowsMap = SQLFactory.createQuerySQL(dbConnect, "plm_item", "itemno", "itemid").setWhere("itemno", drpWarrantycardRows.toArrayList("fitemno")).query().toRowsMap("itemno");
|
|
@@ -114,6 +115,11 @@ public class DRPWarrantycardCheck extends ServiceController {
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
logger.error(e);
|
|
logger.error(e);
|
|
|
|
|
+ SQLDump sqlDump = new SQLDump();
|
|
|
|
|
+ for (Row row : drpWarrantycardRows) {
|
|
|
|
|
+ sqlDump.add("update mddrp.twarrantycard set eordermatchflag=-1 where twarrantycardid=" + row.getLong("twarrantycardid"));
|
|
|
|
|
+ }
|
|
|
|
|
+ sqlDump.commit();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|