|
@@ -12,8 +12,7 @@ import com.awspaas.user.apps.donenow_ivt.constant.IVTConstant;
|
|
|
import com.awspaas.user.apps.donenow_ivt.utils.BigDecimalUtil;
|
|
import com.awspaas.user.apps.donenow_ivt.utils.BigDecimalUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
-import java.util.Date;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
|
|
public class DoWorkThread extends Thread {
|
|
public class DoWorkThread extends Thread {
|
|
|
private ProcessExecutionContext process;
|
|
private ProcessExecutionContext process;
|
|
@@ -223,7 +222,7 @@ public class DoWorkThread extends Thread {
|
|
|
|
|
|
|
|
|
|
|
|
|
//更改采购项状态为全部接收、部门接收、已提交
|
|
//更改采购项状态为全部接收、部门接收、已提交
|
|
|
- String orderBindId = DBSql.getString("SELECT BINDID FROM " + IVTConstant.BO_EU_DNIVT_ORDER_PRODUCT + " WHERE ID='" + list.get(0).getString("ORDER_PRODUCT_ID") + "')");
|
|
|
|
|
|
|
+ String orderBindId = DBSql.getString("SELECT BINDID FROM " + IVTConstant.BO_EU_DNIVT_ORDER_PRODUCT + " WHERE ID='" + list.get(0).getString("ORDER_PRODUCT_ID") + "'");
|
|
|
List<BO> orderProductList = SDK.getBOAPI().query(IVTConstant.BO_EU_DNIVT_ORDER_PRODUCT).bindId(orderBindId).list();
|
|
List<BO> orderProductList = SDK.getBOAPI().query(IVTConstant.BO_EU_DNIVT_ORDER_PRODUCT).bindId(orderBindId).list();
|
|
|
int count = 0;
|
|
int count = 0;
|
|
|
for (BO bo : orderProductList) {
|
|
for (BO bo : orderProductList) {
|
|
@@ -234,7 +233,13 @@ public class DoWorkThread extends Thread {
|
|
|
int QUANTITY = Integer.valueOf(BigDecimalUtil.isNull(bo.getString("QUANTITY"))).intValue();
|
|
int QUANTITY = Integer.valueOf(BigDecimalUtil.isNull(bo.getString("QUANTITY"))).intValue();
|
|
|
if (QUANTITY_RECEIVED == QUANTITY) {
|
|
if (QUANTITY_RECEIVED == QUANTITY) {
|
|
|
count++;
|
|
count++;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (count == orderProductList.size() && count > 0) {
|
|
|
|
|
+ //全部接收
|
|
|
|
|
+ DBSql.update("UPDATE " + IVTConstant.BO_EU_DNIVT_ORDER + " SET STATUS_ID=" + IVTConstant.STATUS_2150 + " WHERE BINDID='" + orderBindId + "'");
|
|
|
|
|
|
|
|
|
|
+ for (BO bo : orderProductList) {
|
|
|
//采购项全部接收后,更改关联合同产品的状态
|
|
//采购项全部接收后,更改关联合同产品的状态
|
|
|
BO contractProductBo = SDK.getBOAPI().get(IVTConstant.BO_EU_DNCTT_CONTRACT_COST, bo.getString("CONTRACT_COST_ID"));
|
|
BO contractProductBo = SDK.getBOAPI().get(IVTConstant.BO_EU_DNCTT_CONTRACT_COST, bo.getString("CONTRACT_COST_ID"));
|
|
|
contractProductBo.set("STATUS_ID", IVTConstant.STATUS_1236);//待配送
|
|
contractProductBo.set("STATUS_ID", IVTConstant.STATUS_1236);//待配送
|
|
@@ -254,12 +259,8 @@ public class DoWorkThread extends Thread {
|
|
|
}
|
|
}
|
|
|
SDK.getBOAPI().update(IVTConstant.BO_EU_DNCTT_CONTRACT_COST_PRODUCT, costProduct);
|
|
SDK.getBOAPI().update(IVTConstant.BO_EU_DNCTT_CONTRACT_COST_PRODUCT, costProduct);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- if (count == orderProductList.size() && count > 0) {
|
|
|
|
|
- DBSql.update("UPDATE " + IVTConstant.BO_EU_DNIVT_ORDER + " SET STATUS_ID=" + IVTConstant.STATUS_2150 + " WHERE BINDID='" + orderBindId + "'");
|
|
|
|
|
|
|
+
|
|
|
} else if (count > 0) {
|
|
} else if (count > 0) {
|
|
|
DBSql.update("UPDATE " + IVTConstant.BO_EU_DNIVT_ORDER + " SET STATUS_ID=" + IVTConstant.STATUS_2149 + " WHERE BINDID='" + orderBindId + "'");
|
|
DBSql.update("UPDATE " + IVTConstant.BO_EU_DNIVT_ORDER + " SET STATUS_ID=" + IVTConstant.STATUS_2149 + " WHERE BINDID='" + orderBindId + "'");
|
|
|
} else {
|
|
} else {
|