|
@@ -9,6 +9,7 @@ import java.util.HashMap;
|
|
|
|
|
|
|
|
public class DRPWarrantycardCheck extends ServiceController {
|
|
public class DRPWarrantycardCheck extends ServiceController {
|
|
|
private static HashMap<String, Long> agentsnumMapping = new HashMap<>();
|
|
private static HashMap<String, Long> agentsnumMapping = new HashMap<>();
|
|
|
|
|
+ private static long minid = -12170623L;
|
|
|
|
|
|
|
|
static {
|
|
static {
|
|
|
try {
|
|
try {
|
|
@@ -44,8 +45,10 @@ public class DRPWarrantycardCheck extends ServiceController {
|
|
|
sqlDump.add("update sa_customers set sa_agentsid_to=" + agentsnumMapping.getOrDefault(ftoagentnum, 0L) + " where sa_customersid='" + warrantycardRowsMap.get(fbillnum).get(0).getLong("sa_customersid") + "'");
|
|
sqlDump.add("update sa_customers set sa_agentsid_to=" + agentsnumMapping.getOrDefault(ftoagentnum, 0L) + " where sa_customersid='" + warrantycardRowsMap.get(fbillnum).get(0).getLong("sa_customersid") + "'");
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ minid = minid - 1;
|
|
|
String fagentnum = drpWarrantycardRow.getString("fagentnum");
|
|
String fagentnum = drpWarrantycardRow.getString("fagentnum");
|
|
|
InsertSQL customersInsert = SQLFactory.createInsertSQL(dbConnect, "sa_customers");
|
|
InsertSQL customersInsert = SQLFactory.createInsertSQL(dbConnect, "sa_customers");
|
|
|
|
|
+ customersInsert.setValue("sa_customersid", minid);
|
|
|
customersInsert.setValue("datastatus", 0);
|
|
customersInsert.setValue("datastatus", 0);
|
|
|
customersInsert.setValue("tradingstatus", "已成交");
|
|
customersInsert.setValue("tradingstatus", "已成交");
|
|
|
customersInsert.setValue("siteid", "MD");
|
|
customersInsert.setValue("siteid", "MD");
|
|
@@ -93,7 +96,7 @@ public class DRPWarrantycardCheck extends ServiceController {
|
|
|
if (!drpWarrantycardRow.getString("fbegdate").isEmpty()) {
|
|
if (!drpWarrantycardRow.getString("fbegdate").isEmpty()) {
|
|
|
warrantycardInsert.setValue("begdate", drpWarrantycardRow.getString("fbegdate"));
|
|
warrantycardInsert.setValue("begdate", drpWarrantycardRow.getString("fbegdate"));
|
|
|
}
|
|
}
|
|
|
- warrantycardInsert.setValue("sa_customersid", customersInsert.getUniqueid());
|
|
|
|
|
|
|
+ warrantycardInsert.setValue("sa_customersid", minid);
|
|
|
warrantycardInsert.setValue("cardno", fbillnum);
|
|
warrantycardInsert.setValue("cardno", fbillnum);
|
|
|
warrantycardInsert.setValue("createby", drpWarrantycardRow.getString("createby"));
|
|
warrantycardInsert.setValue("createby", drpWarrantycardRow.getString("createby"));
|
|
|
if (!drpWarrantycardRow.getString("createdate").isEmpty()) {
|
|
if (!drpWarrantycardRow.getString("createdate").isEmpty()) {
|