Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
27bbd0ea23
|
|
@ -69,13 +69,14 @@ public class PurRefundApplyFormPlugin extends AbstractBillPlugIn implements Befo
|
||||||
addNew.set("tqq9_licenseno_ydth", dynamicObject.get("tqq9_licenseno"));
|
addNew.set("tqq9_licenseno_ydth", dynamicObject.get("tqq9_licenseno"));
|
||||||
addNew.set("tqq9_priceandtax_ydth", dynamicObject.get("priceandtax"));
|
addNew.set("tqq9_priceandtax_ydth", dynamicObject.get("priceandtax"));
|
||||||
//addNew.set("tqq9_amountandtax_ydth", dynamicObject.get("amountandtax"));
|
//addNew.set("tqq9_amountandtax_ydth", dynamicObject.get("amountandtax"));
|
||||||
|
|
||||||
addNew.set("tqq9_ph_ydth", dynamicObject.get("tqq9_ph"));
|
addNew.set("tqq9_ph_ydth", dynamicObject.get("tqq9_ph"));
|
||||||
addNew.set("tqq9_productdate_ydth", dynamicObject.get("tqq9_productdate"));
|
addNew.set("tqq9_productdate_ydth", dynamicObject.get("tqq9_productdate"));
|
||||||
addNew.set("tqq9_expiredate_ydth", dynamicObject.get("tqq9_expiredate"));
|
addNew.set("tqq9_expiredate_ydth", dynamicObject.get("tqq9_expiredate"));
|
||||||
addNew.set("tqq9_cgthflid", dynamicObject.get("id"));
|
addNew.set("tqq9_cgthflid", dynamicObject.get("id"));
|
||||||
addNew.set("tqq9_price_ydth", dynamicObject.get("price"));
|
addNew.set("tqq9_price_ydth", dynamicObject.get("price"));
|
||||||
addNew.set("tqq9_taxrateid_ydth", dynamicObject.get("taxrateid"));
|
addNew.set("tqq9_taxrateid_ydth", dynamicObject.get("taxrateid"));
|
||||||
|
addNew.set("tqq9_taxrate_ydth", dynamicObject.get("taxrate"));
|
||||||
this.getModel().updateEntryCache(tqq9_entryentity);
|
this.getModel().updateEntryCache(tqq9_entryentity);
|
||||||
this.getView().updateView("tqq9_entryentity");
|
this.getView().updateView("tqq9_entryentity");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ public class PurOrderUnReversePayBillPlugin extends AbstractOperationServicePlug
|
||||||
paybill.set("unsettleamount", unsettleamount);//未结算金额
|
paybill.set("unsettleamount", unsettleamount);//未结算金额
|
||||||
paybill.set("unsettleamountbase", unsettleamountbase);//未结算金额(本位币)
|
paybill.set("unsettleamountbase", unsettleamountbase);//未结算金额(本位币)
|
||||||
paybill.set("entry", entries);
|
paybill.set("entry", entries);
|
||||||
SaveServiceHelper.save(new DynamicObject[]{paybill});// }
|
SaveServiceHelper.save(new DynamicObject[]{paybill});//
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
package tqq9.lc123.cloud.app.plugin.operate.im;
|
package tqq9.lc123.cloud.app.plugin.operate.im;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import kd.bos.dataentity.OperateOption;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
import kd.bos.entity.botp.runtime.ConvertOperationResult;
|
import kd.bos.entity.botp.runtime.ConvertOperationResult;
|
||||||
import kd.bos.entity.botp.runtime.PushArgs;
|
import kd.bos.entity.botp.runtime.PushArgs;
|
||||||
import kd.bos.entity.botp.runtime.SourceBillReport;
|
import kd.bos.entity.botp.runtime.SourceBillReport;
|
||||||
|
import kd.bos.entity.operate.result.OperationResult;
|
||||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||||
|
|
@ -15,8 +17,10 @@ import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import kd.bos.servicehelper.botp.ConvertServiceHelper;
|
import kd.bos.servicehelper.botp.ConvertServiceHelper;
|
||||||
|
import kd.bos.servicehelper.operation.OperationServiceHelper;
|
||||||
import kd.bos.util.StringUtils;
|
import kd.bos.util.StringUtils;
|
||||||
import kd.sdk.plugin.Plugin;
|
import kd.sdk.plugin.Plugin;
|
||||||
|
import tqq9.lc123.cloud.app.api.utils.Constants;
|
||||||
import tqq9.lc123.cloud.app.plugin.utils.BotpParamUtils;
|
import tqq9.lc123.cloud.app.plugin.utils.BotpParamUtils;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -149,6 +153,38 @@ public class OtherInYdthPlugin extends AbstractOperationServicePlugIn implements
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取下推单据id准备提交审核操作
|
||||||
|
Set<Object> targetBillIds = pushResult.getTargetBillIds();
|
||||||
|
DynamicObject[] load = new DynamicObject[targetBillIds.size()];
|
||||||
|
Iterator<Object> iterator = targetBillIds.iterator();
|
||||||
|
for (int i = 0; iterator.hasNext(); i++) {
|
||||||
|
Object next = iterator.next();
|
||||||
|
DynamicObject dynamicObject1 = BusinessDataServiceHelper.loadSingle(IM_PURINBILL, new QFilter[]{new QFilter("id", QCP.equals, next)});
|
||||||
|
load[i] = dynamicObject1;
|
||||||
|
}
|
||||||
|
//开始提交
|
||||||
|
OperateOption operateOption = OperateOption.create();
|
||||||
|
OperationResult sumbitResult = OperationServiceHelper.executeOperate(Constants.TYPE_SUBMIT, IM_PURINBILL, load, operateOption);
|
||||||
|
if (!sumbitResult.isSuccess()) {
|
||||||
|
if (Objects.nonNull(sumbitResult.getAllErrorOrValidateInfo())) {
|
||||||
|
logger.info("采购入库单提交失败: " + sumbitResult.getAllErrorOrValidateInfo().toString());
|
||||||
|
}
|
||||||
|
OperationResult deleteResult = OperationServiceHelper.executeOperate(Constants.TYPE_DELETE, IM_PURINBILL, load, operateOption);
|
||||||
|
} else {
|
||||||
|
//开始审核
|
||||||
|
OperationResult auditResult = OperationServiceHelper.executeOperate(Constants.TYPE_AUDIT, IM_PURINBILL, load, operateOption);
|
||||||
|
if (!auditResult.isSuccess()) {
|
||||||
|
if (Objects.nonNull(auditResult.getAllErrorOrValidateInfo())) {
|
||||||
|
logger.info("采购入库单审核失败: " + auditResult.getAllErrorOrValidateInfo().toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
OperationResult unsubmitResult = OperationServiceHelper.executeOperate(Constants.TYPE_UNSUBMIT, IM_PURINBILL, load, operateOption);
|
||||||
|
OperationResult deleteResult = OperationServiceHelper.executeOperate(Constants.TYPE_DELETE, IM_PURINBILL, load, operateOption);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,7 @@ public class SaleOutBillConvertPlugin extends AbstractConvertPlugIn implements P
|
||||||
// 处理第一次逻辑
|
// 处理第一次逻辑
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
// 第一次直接赋值
|
// 第一次直接赋值
|
||||||
|
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
||||||
entry.set("qty", quantity);
|
entry.set("qty", quantity);
|
||||||
entry.set("baseqty", quantity);
|
entry.set("baseqty", quantity);
|
||||||
entry.set("tqq9_goods", tqq9_goodspackage);
|
entry.set("tqq9_goods", tqq9_goodspackage);
|
||||||
|
|
@ -128,6 +129,18 @@ public class SaleOutBillConvertPlugin extends AbstractConvertPlugIn implements P
|
||||||
entry.set("tqq9_scs", tqq9_proxyandfactory);
|
entry.set("tqq9_scs", tqq9_proxyandfactory);
|
||||||
DynamicObjectCollection billentry_lk = entry.getDynamicObjectCollection("billentry_lk");
|
DynamicObjectCollection billentry_lk = entry.getDynamicObjectCollection("billentry_lk");
|
||||||
billentry_lk.clear();
|
billentry_lk.clear();
|
||||||
|
BigDecimal amount = entry.getBigDecimal("amount");//金额
|
||||||
|
BigDecimal taxamount = entry.getBigDecimal("taxamount");//税额
|
||||||
|
BigDecimal amountandtax = entry.getBigDecimal("amountandtax");//税额
|
||||||
|
amount=amount.multiply(quantity).divide(qty);
|
||||||
|
taxamount=taxamount.multiply(quantity).divide(qty);
|
||||||
|
amountandtax=amountandtax.multiply(quantity).divide(qty);
|
||||||
|
entry.set("amount", amount);
|
||||||
|
entry.set("curamount", amount);
|
||||||
|
entry.set("taxamount", taxamount);
|
||||||
|
entry.set("curtaxamount", taxamount);
|
||||||
|
entry.set("amountandtax", amountandtax);
|
||||||
|
entry.set("curamountandtax", amountandtax);
|
||||||
} else {
|
} else {
|
||||||
DataEntityPropertyCollection properties = entry.getDataEntityType().getProperties();
|
DataEntityPropertyCollection properties = entry.getDataEntityType().getProperties();
|
||||||
// 后续循环复制entry并赋值
|
// 后续循环复制entry并赋值
|
||||||
|
|
@ -135,6 +148,7 @@ public class SaleOutBillConvertPlugin extends AbstractConvertPlugIn implements P
|
||||||
for (IDataEntityProperty property : properties) {
|
for (IDataEntityProperty property : properties) {
|
||||||
newEntry.set(property.getName(), entry.get(property.getName()));
|
newEntry.set(property.getName(), entry.get(property.getName()));
|
||||||
}
|
}
|
||||||
|
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
||||||
newEntry.set("qty", quantity);
|
newEntry.set("qty", quantity);
|
||||||
newEntry.set("baseqty", quantity);
|
newEntry.set("baseqty", quantity);
|
||||||
newEntry.set("tqq9_goods", tqq9_goodspackage);
|
newEntry.set("tqq9_goods", tqq9_goodspackage);
|
||||||
|
|
@ -150,6 +164,18 @@ public class SaleOutBillConvertPlugin extends AbstractConvertPlugIn implements P
|
||||||
newEntry.set("tqq9_scs", tqq9_proxyandfactory);
|
newEntry.set("tqq9_scs", tqq9_proxyandfactory);
|
||||||
DynamicObjectCollection billentry_lk = newEntry.getDynamicObjectCollection("billentry_lk");
|
DynamicObjectCollection billentry_lk = newEntry.getDynamicObjectCollection("billentry_lk");
|
||||||
billentry_lk.clear();
|
billentry_lk.clear();
|
||||||
|
BigDecimal amount = entry.getBigDecimal("amount");//金额
|
||||||
|
BigDecimal taxamount = entry.getBigDecimal("taxamount");//税额
|
||||||
|
BigDecimal amountandtax = entry.getBigDecimal("amountandtax");//税额
|
||||||
|
amount=amount.multiply(quantity).divide(qty);
|
||||||
|
taxamount=taxamount.multiply(quantity).divide(qty);
|
||||||
|
amountandtax=amountandtax.multiply(quantity).divide(qty);
|
||||||
|
entry.set("amount", amount);
|
||||||
|
entry.set("curamount", amount);
|
||||||
|
entry.set("taxamount", taxamount);
|
||||||
|
entry.set("curtaxamount", taxamount);
|
||||||
|
entry.set("amountandtax", amountandtax);
|
||||||
|
entry.set("curamountandtax", amountandtax);
|
||||||
// 处理完新entry后的逻辑(比如加入集合或其他操作)
|
// 处理完新entry后的逻辑(比如加入集合或其他操作)
|
||||||
iterator.add(newEntry);
|
iterator.add(newEntry);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@ public class YdthPurInConvertPlugin extends AbstractConvertPlugIn implements Plu
|
||||||
entry.set("remainjoinpricebaseqty", qty);//剩余应付基本数量
|
entry.set("remainjoinpricebaseqty", qty);//剩余应付基本数量
|
||||||
entry.set("unverifyqty", qty); //未核销数量
|
entry.set("unverifyqty", qty); //未核销数量
|
||||||
entry.set("unverifybaseqty", qty); //未核销基本数量
|
entry.set("unverifybaseqty", qty); //未核销基本数量
|
||||||
|
entry.set("baseqty",qty);//基本数量-反写规则用到
|
||||||
entry.set("taxrateid", bd_taxrate);//税率
|
entry.set("taxrateid", bd_taxrate);//税率
|
||||||
entry.set("price", tqq9_price_ydth);//不含税单价
|
entry.set("price", tqq9_price_ydth);//不含税单价
|
||||||
entry.set("taxamount", tqq9_taxamount_ydth);//税额
|
entry.set("taxamount", tqq9_taxamount_ydth);//税额
|
||||||
|
|
@ -240,7 +240,7 @@ public class YdthPurInConvertPlugin extends AbstractConvertPlugIn implements Plu
|
||||||
newEntry.set("remainjoinpricebaseqty", qty);//剩余应付基本数量
|
newEntry.set("remainjoinpricebaseqty", qty);//剩余应付基本数量
|
||||||
newEntry.set("unverifyqty", qty); //未核销数量
|
newEntry.set("unverifyqty", qty); //未核销数量
|
||||||
newEntry.set("unverifybaseqty", qty); //未核销基本数量
|
newEntry.set("unverifybaseqty", qty); //未核销基本数量
|
||||||
|
newEntry.set("baseqty",qty);//基本数量-反写规则用到
|
||||||
newEntry.set("taxrateid", bd_taxrate);//税率
|
newEntry.set("taxrateid", bd_taxrate);//税率
|
||||||
newEntry.set("price", tqq9_price_ydth);//不含税单价
|
newEntry.set("price", tqq9_price_ydth);//不含税单价
|
||||||
newEntry.set("taxamount", tqq9_taxamount_ydth);//税额
|
newEntry.set("taxamount", tqq9_taxamount_ydth);//税额
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue