|
|
@@ -48,16 +48,17 @@ public class SyncProductStockTask {
|
|
|
String format = sf.format(new Date());
|
|
|
data.put("request_time", format);
|
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
|
- String Sql = "select * from (select rownum rn, A.* from (select ct_id,ct_code,CUSTOMTABLEDETAIL.* from CUSTOMTABLE left join CUSTOMTABLEDETAIL on ct_id=cd_ctid " +
|
|
|
+ String Sql = "select * from (select rownum rn, A.* from (select pr_brand,ct_id,ct_code,CUSTOMTABLEDETAIL.* from CUSTOMTABLE left join CUSTOMTABLEDETAIL on ct_id=cd_ctid left join product on pr_code = cd_varchar50_1 " +
|
|
|
" where ct_caller='XiaoMiProduct' and ct_id= " +
|
|
|
" (select ct_id from (select ct_id from CUSTOMTABLE where ct_caller='XiaoMiProduct' " +
|
|
|
//"and trunc(ct_recorddate)=trunc(sysdate) " +
|
|
|
- "and ct_statuscode='AUDITED' and nvl(CT_SENDSTATUS,' ')<>'已上传' order by ct_id ) where rownum=1)" +
|
|
|
+ "and ct_statuscode='AUDITED' and nvl(CT_SENDSTATUS,' ')<>'已上传' order by ct_id ) where rownum=1) " +
|
|
|
+ " and PR_BRAND in ('NEXPERIA','VANCHIP') " +
|
|
|
" order by cd_detno) A) where rn<=1000";
|
|
|
SqlRowList rs = baseDao.queryForRowSet(Sql);
|
|
|
while (rs.next()) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("factory_code", configuration.getX5vendercode());
|
|
|
+ map.put("factory_code", "VANCHIP".equals(rs.getGeneralString("pr_brand")) ? configuration.getX5vendercode() : configuration.getX5vendercodeSZ());
|
|
|
map.put("component_code", rs.getGeneralString("cd_varchar50_3"));
|
|
|
map.put("product_code", rs.getGeneralString("cd_varchar50_2"));
|
|
|
map.put("product_desc", rs.getGeneralString("cd_varchar200_1"));
|