|
|
@@ -32,16 +32,18 @@ public class SyncProductStockTask {
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
|
|
|
- //@Scheduled(cron = "0 0/2 * * * ?")
|
|
|
- @Scheduled(cron = "0 0 2,8,14,20 * * ?")
|
|
|
+ @Scheduled(cron = "0 0/2 * * * ?")
|
|
|
+ //@Scheduled(cron = "0 0 2,8,14,15,20 * * ?")
|
|
|
public void SyncProductStock() {
|
|
|
SqlRowList rs2 = baseDao.queryForRowSet("select TO_CHAR(SYSDATE,'HH24') v_hour,TO_CHAR(SYSDATE,'MI') v_mi from dual");
|
|
|
while(rs2.next()) {
|
|
|
+ baseDao.execute("update CUSTOMTABLE set ct_varchar50_11=to_char(sysdate,'yyyy-mm-dd HH24:mi:ss') where ct_id=1033910");
|
|
|
String V_HOUR = rs2.getGeneralString("v_hour");
|
|
|
String V_MI = rs2.getGeneralString("v_mi");
|
|
|
- if (("08".equals(V_HOUR) || "20".equals(V_HOUR) || "02".equals(V_HOUR) || "14".equals(V_HOUR) )
|
|
|
+ if (("08".equals(V_HOUR) || "20".equals(V_HOUR) || "02".equals(V_HOUR) || "14".equals(V_HOUR) || "15".equals(V_HOUR) )
|
|
|
// && ("00".equals(V_MI) )
|
|
|
) {
|
|
|
+ baseDao.execute("update CUSTOMTABLE set ct_varchar50_12=to_char(sysdate,'yyyy-mm-dd HH24:mi:ss') where ct_id=1033910");
|
|
|
X5JsonHttpClient x5JsonHttpClient = new X5JsonHttpClient(configuration.getX5appid(), configuration.getX5appkey(), configuration.getX5ProductStockUrl());
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
@@ -55,6 +57,7 @@ public class SyncProductStockTask {
|
|
|
"and ct_statuscode='AUDITED' order by ct_id desc) where rownum=1)" +
|
|
|
" order by cd_detno) A) where rn<=1000";
|
|
|
SqlRowList rs = baseDao.queryForRowSet(Sql);
|
|
|
+ baseDao.execute("update CUSTOMTABLE set ct_varchar50_15=to_char(sysdate,'yyyy-mm-dd HH24:mi:ss') where ct_id=1033910");
|
|
|
while (rs.next()) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("factory_code", configuration.getX5vendercode());
|
|
|
@@ -71,6 +74,7 @@ public class SyncProductStockTask {
|
|
|
}
|
|
|
data.put("data", list);
|
|
|
if (list.size() > 0) {
|
|
|
+ baseDao.execute("update CUSTOMTABLE set ct_varchar50_16=to_char(sysdate,'yyyy-mm-dd HH24:mi:ss') where ct_id=1033910");
|
|
|
x5JsonHttpClient.post(data, configuration, baseDao, "ProductStock");
|
|
|
}
|
|
|
}
|