|
|
@@ -33,9 +33,8 @@ public class SyncProductWIPTask {
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
|
|
|
- @Scheduled(cron = "0 * 0/5 * * ?")
|
|
|
+ @Scheduled(cron = "0 0/1 * * * ?")
|
|
|
public void SyncProductWIP() {
|
|
|
- System.out.println("13434");
|
|
|
X5JsonHttpClient x5JsonHttpClient = new X5JsonHttpClient(configuration.getX5appid(),configuration.getX5appkey(),configuration.getX5ProductWIPUrl());
|
|
|
Map<String,Object> data = new HashMap<>();
|
|
|
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
@@ -43,8 +42,10 @@ public class SyncProductWIPTask {
|
|
|
System.out.println("format:"+format);
|
|
|
data.put("request_time",format);
|
|
|
List<Map<String,Object>> list = new ArrayList<>();
|
|
|
- String Sql="select * from (select rownum rn, A.* from (select ct_code,CUSTOMTABLEDETAIL.* from CUSTOMTABLE left join CUSTOMTABLEDETAIL on ct_id=cd_ctid " +
|
|
|
- " where ct_caller='XiaoMiProductWIP' order by cd_detno) A) where rn<=2 and rn>=1";
|
|
|
+ String Sql="select * from (select rownum rn,to_char(cd_date_1,'yyyy-mm-dd hh24:mi:ss') cd_date_ywfs, A.* from (select ct_code,CUSTOMTABLEDETAIL.* from CUSTOMTABLE left join CUSTOMTABLEDETAIL on ct_id=cd_ctid " +
|
|
|
+ " where ct_caller='XiaoMiProductWIP' and ct_id= " +
|
|
|
+ " (select ct_id from (select ct_id from CUSTOMTABLE where ct_caller='XiaoMiProductWIP' and ct_statuscode='AUDITED' and nvl(ct_confirmstatus, ' ')<>'已上传' order by ct_id desc) where rownum=1)" +
|
|
|
+ " order by cd_detno) A) where rn<=1000";
|
|
|
SqlRowList rs = baseDao.queryForRowSet(Sql);
|
|
|
while (rs.next()){
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
@@ -55,8 +56,8 @@ public class SyncProductWIPTask {
|
|
|
map.put("site_name",rs.getGeneralString("cd_varchar50_4"));
|
|
|
map.put("wip_num",rs.getInt("cd_number_1"));
|
|
|
map.put("project_name",rs.getGeneralString("cd_varchar50_5"));
|
|
|
- map.put("product_code",rs.getGeneralDouble("cd_varchar50_6"));
|
|
|
- map.put("fact_date",rs.getGeneralString("cd_varchar50_7"));
|
|
|
+ map.put("product_code",rs.getGeneralString("cd_varchar50_6"));
|
|
|
+ map.put("fact_date",rs.getGeneralString("cd_date_ywfs"));
|
|
|
map.put("cd_id",rs.getGeneralInt("cd_id"));
|
|
|
list.add(map);
|
|
|
}
|