上海大数据中心

dev
ic_excellent 2023-07-20 15:52:43 +08:00
parent fe37d194a3
commit 098c568713
5 changed files with 47 additions and 7 deletions

View File

@ -44,7 +44,7 @@ public class ReportService {
String endDate = Util.null2String(param.get("endDate")); String endDate = Util.null2String(param.get("endDate"));
//航班车次 //航班车次
String flightAndTrain = Util.null2String(param.get("flightAndTrain")); String flightAndTrain = Util.null2String(param.get("flightAndTrain"));
String whereSql = ""; String whereSql = " and (frhsz = 0 or frhsz is null) ";
if(!"".equals(beginDate) && !"".equals(endDate)){ if(!"".equals(beginDate) && !"".equals(endDate)){
whereSql += " and (dlsk1 between #{param.beginDate} and #{param.endDate} )"; whereSql += " and (dlsk1 between #{param.beginDate} and #{param.endDate} )";
}else { }else {

View File

@ -27,6 +27,9 @@ public class SyncAccountInfoFromSapJob extends BaseCronJob {
private final static String JobName = " SyncAccountInfoFromSapJob "; private final static String JobName = " SyncAccountInfoFromSapJob ";
/** 模块id */
private String modelId;
private String interfaceName; private String interfaceName;
private String theNearPeriod; private String theNearPeriod;
@ -122,7 +125,7 @@ public class SyncAccountInfoFromSapJob extends BaseCronJob {
periodBalance.setEvCurrency(Util.null2String(balanceResponse.getString("EvCurrency"))); periodBalance.setEvCurrency(Util.null2String(balanceResponse.getString("EvCurrency")));
periodBalance.setGlAccount(glAccount); periodBalance.setGlAccount(glAccount);
periodBalance.save(periodBalance, 52, "uf_period_balance"); periodBalance.save(periodBalance, Util.getIntValue(this.modelId), "uf_period_balance");
// String result = ""; // String result = "";
//// String url = "http://127.0.0.1/uapws/service/nc65to63projectsysplugin";//这是接口地址,注意去掉.wsdl否则会报错 //// String url = "http://127.0.0.1/uapws/service/nc65to63projectsysplugin";//这是接口地址,注意去掉.wsdl否则会报错

View File

@ -32,8 +32,19 @@ public class SyncAccountStatementJob extends BaseCronJob {
private String interfaceName; private String interfaceName;
/** 模块id */
private String modelId;
private final static String JobName = " SyncAccountStatementJob "; private final static String JobName = " SyncAccountStatementJob ";
public String getModelId() {
return modelId;
}
public void setModelId(String modelId) {
this.modelId = modelId;
}
public String getInterfaceName() { public String getInterfaceName() {
return interfaceName; return interfaceName;
} }
@ -253,7 +264,7 @@ public class SyncAccountStatementJob extends BaseCronJob {
} }
} }
} }
dayBalance.save(dayBalance, 50, "uf_bank_day_balance"); dayBalance.save(dayBalance, Util.getIntValue(this.modelId), "uf_bank_day_balance");
logger.writeLog(JobName + " result dayBalance: " + dayBalance.toString()); logger.writeLog(JobName + " result dayBalance: " + dayBalance.toString());
} }
} }

View File

@ -9,6 +9,8 @@ import org.dom4j.DocumentHelper;
import org.dom4j.Element; import org.dom4j.Element;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.BaseBean; import weaver.general.BaseBean;
import weaver.general.Time;
import weaver.general.TimeUtil;
import weaver.general.Util; import weaver.general.Util;
import weaver.interfaces.schedule.BaseCronJob; import weaver.interfaces.schedule.BaseCronJob;
import java.io.File; import java.io.File;
@ -29,6 +31,9 @@ public class SyncAccountTradeInfoJob extends BaseCronJob {
BaseBean logger = new BaseBean(); BaseBean logger = new BaseBean();
/** 模块id */
private String modelId;
private String interfaceName; private String interfaceName;
/** 同步开始日期 */ /** 同步开始日期 */
@ -125,9 +130,13 @@ public class SyncAccountTradeInfoJob extends BaseCronJob {
xmlParams.put("actacn", actacn); xmlParams.put("actacn", actacn);
//xmlParams.put("from", "20220919"); //xmlParams.put("from", "20220919");
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, -1); cal.add(Calendar.DAY_OF_MONTH, -1);
String from = !"".equals(Util.null2String(this.fromDate)) ? this.fromDate : ZennerUtil.parseToDateString(cal.getTime(), ZennerUtil.formatYYYYMMDD_NoSplit); String to = !"".equals(Util.null2String(this.fromDate)) ? this.fromDate : ZennerUtil.parseToDateString(cal.getTime(), ZennerUtil.formatYYYYMMDD_NoSplit);
String to = !"".equals(Util.null2String(this.toDate)) ? this.toDate : ZennerUtil.parseToDateString(new Date(), ZennerUtil.formatYYYYMMDD_NoSplit); cal.add(Calendar.DAY_OF_MONTH,-1);
String from = !"".equals(Util.null2String(this.toDate))
? this.toDate
: ZennerUtil.parseToDateString(cal.getTime(), ZennerUtil.formatYYYYMMDD_NoSplit);
//String to = !"".equals(Util.null2String(this.toDate)) ? this.toDate : ZennerUtil.parseToDateString(new Date(), ZennerUtil.formatYYYYMMDD_NoSplit);
xmlParams.put("from", from); xmlParams.put("from", from);
xmlParams.put("to", to); xmlParams.put("to", to);
xmlParams.put("amountFrom", "1"); xmlParams.put("amountFrom", "1");
@ -354,7 +363,7 @@ public class SyncAccountTradeInfoJob extends BaseCronJob {
logger.writeLog(JobName + " result tradeInfoList size: " + tradeInfoList.size()); logger.writeLog(JobName + " result tradeInfoList size: " + tradeInfoList.size());
for (TradeInfo tradeInfo : tradeInfoList){ for (TradeInfo tradeInfo : tradeInfoList){
if (!"".equals(tradeInfo.getIbknum())){ if (!"".equals(tradeInfo.getIbknum())){
tradeInfo.save(tradeInfo, 51, "uf_bank_trade_info"); tradeInfo.save(tradeInfo, Util.getIntValue(this.modelId), "uf_bank_trade_info");
} }
} }

View File

@ -122,11 +122,28 @@ public class NormalTest extends BaseTest {
examineSchedule.runCode(); examineSchedule.runCode();
} }
@Test
public void testDatea(){
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH,-1);
// 获取修改后的日期并赋值给 from
String to = new SimpleDateFormat("yyyyMMdd").format(cal.getTime());
// 将日期减一天
cal.add(Calendar.DAY_OF_MONTH, -1);
// 获取修改后的日期并赋值给 to
String from = new SimpleDateFormat("yyyyMMdd").format(cal.getTime());
System.out.println("From: " + from);
System.out.println("To: " + to);
}
@Test @Test
public void testResponseSync(){ public void testResponseSync(){
ParseTest parseTest = new ParseTest(); ParseTest parseTest = new ParseTest();
Map<String, Object> resultData = parseTest.getResultData(); Map<String, Object> resultData = parseTest.getResultData();
System.out.println(JSON.toJSONString(resultData)); System.out.println(JSON.toJSONString(resultData));
//ResponseMappingDeal responseMappingDeal = new ResponseMappingDeal(); //ResponseMappingDeal responseMappingDeal = new ResponseMappingDeal();
//responseMappingDeal.doResponseSync("test1",resultData); //responseMappingDeal.doResponseSync("test1",resultData);
} }