|
|
@ -2,9 +2,11 @@ package com.ruoyi.quartz.task.odoo;
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.ruoyi.common.enums.TableRelationTypeEnum;
|
|
|
|
import com.ruoyi.common.enums.TableRelationTypeEnum;
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
@ -28,20 +30,29 @@ public class AccountMoveLineJob extends OdooAbstrackob {
|
|
|
|
return "account.move.line";
|
|
|
|
return "account.move.line";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
|
|
super.execute();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected List getQueryConditionList() {
|
|
|
|
protected List getQueryConditionList() {
|
|
|
|
|
|
|
|
String date = DateUtils.ldt2str(LocalDateTime.now(), DateUtils.YYYY_MM_DD);
|
|
|
|
return Arrays.asList(Arrays.asList(
|
|
|
|
return Arrays.asList(Arrays.asList(
|
|
|
|
Arrays.asList("parent_state", "=", "posted"),
|
|
|
|
Arrays.asList("parent_state", "=", "posted")
|
|
|
|
Arrays.asList("account_id", "=", 1018)
|
|
|
|
, Arrays.asList("account_id", "=", 1018)
|
|
|
|
// asList("Date", ">", 2022-01-01)
|
|
|
|
// ,Arrays.asList("Date", ">", 2023-07-27)
|
|
|
|
));
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected Map<String, List<String>> getQueryFieldMap() {
|
|
|
|
protected Map<String, List<String>> getQueryFieldMap() {
|
|
|
|
|
|
|
|
// return new HashMap() {{
|
|
|
|
|
|
|
|
// put("fields", Arrays.asList("id","partner_id.name", "date", "product_id.default_code"
|
|
|
|
|
|
|
|
// , "quantity", "unit_price", "company_id.display_name","product_id.categ_id.name"));
|
|
|
|
|
|
|
|
// }};
|
|
|
|
return new HashMap() {{
|
|
|
|
return new HashMap() {{
|
|
|
|
put("fields", Arrays.asList("id","partner_id.name", "date", "product_id.default_code"
|
|
|
|
put("fields", Arrays.asList("id", "date", "quantity"));
|
|
|
|
, "quantity", "unit_price", "company_id.display_name","product_id.categ_id.name"));
|
|
|
|
|
|
|
|
}};
|
|
|
|
}};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|