|
@@ -35,20 +35,20 @@ public class PurContractHaveNotJGSDTask extends AbstractTask {
|
|
|
@Override
|
|
|
public void execute(RequestContext requestContext, Map<String, Object> map) throws KDException {
|
|
|
//1、从销售合同变跟单中查询所有已审核&变更原因=A:价格审定,获取所有
|
|
|
- Set<Object> xshtids = new HashSet<>();
|
|
|
+ Set<Object> xshtbillnos = new HashSet<>();
|
|
|
QFilter qxsbg = new QFilter("billstatus", QCP.equals, "C");
|
|
|
qxsbg.and("nckd_combofield",QCP.equals,"A");
|
|
|
- DynamicObject collections[] = BusinessDataServiceHelper.load("conm_xsalcontract","id", qxsbg.toArray());
|
|
|
+ DynamicObject collections[] = BusinessDataServiceHelper.load("conm_xsalcontract","billno", qxsbg.toArray());
|
|
|
for (DynamicObject saleData : collections) {
|
|
|
- Object id = saleData.get("id");
|
|
|
- xshtids.add(id);
|
|
|
+ Object billno = saleData.get("billno");
|
|
|
+ xshtbillnos.add(billno);
|
|
|
}
|
|
|
|
|
|
- if (!xshtids.isEmpty()) {
|
|
|
+ if (!xshtbillnos.isEmpty()) {
|
|
|
Map<String,String> xsht2cghtbillno = new HashMap<>();
|
|
|
Map<String,Set<String>> xsht2cght = new HashMap<>();
|
|
|
QFilter qcght = new QFilter("billstatus", QCP.equals, "C");
|
|
|
- qcght.and("nckd_refbillfield", QCP.in, xshtids);
|
|
|
+ qcght.and("nckd_refbillfield.billno", QCP.in, xshtbillnos);
|
|
|
List<String> cghtbillnos = new ArrayList<>();
|
|
|
DynamicObjectCollection cghts = QueryServiceHelper.query("conm_purcontract","id,billno,nckd_refbillfield", qcght.toArray(), "");
|
|
|
for(DynamicObject cght : cghts) {
|