parent
5662240c16
commit
08cc2abbd0
|
|
@ -102,6 +102,7 @@ public class WMSPurInController {
|
|||
if(VoucherType==null){
|
||||
errormsg = "传入参数 VoucherType 为无效值";
|
||||
resultExt = ApiResultExt.errorRetrun(entityType, errormsg, error, resultExt);
|
||||
return CustomApiResult.success(resultExt);
|
||||
}
|
||||
switch (VoucherType) {
|
||||
case "pm_receiptnotice":
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ public class WMSSaleOutController {
|
|||
if(VoucherType==null){
|
||||
errormsg = "传入参数 VoucherType 为无效值";
|
||||
resultExt = ApiResultExt.errorRetrun(entityType, errormsg, error, resultExt);
|
||||
return CustomApiResult.success(resultExt);
|
||||
}
|
||||
switch (VoucherType) {
|
||||
case "sm_delivernotice":
|
||||
|
|
|
|||
|
|
@ -490,9 +490,15 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
model.setValue("tqq9_hsxfsysl_gz", taxrate);//含税现返使用税率
|
||||
}
|
||||
JSONObject org = entry.getJSONObject("tqq9_org");
|
||||
String number = org.getString("number");
|
||||
DynamicObject tqq9_org = BusinessDataServiceHelper.loadSingle(org.getLong("id"), "bos_org");//组织
|
||||
JSONObject material = entry.getJSONObject("tqq9_material");//物料
|
||||
DynamicObject tqq9_material = BusinessDataServiceHelper.loadSingle(material.getLong("id"), "bd_material");//物料
|
||||
DynamicObject taxrate1 = tqq9_material.getDynamicObject("taxrate");
|
||||
BigDecimal taxrate2=null;
|
||||
if(taxrate1!=null){
|
||||
taxrate2 = taxrate1.getBigDecimal("taxrate");
|
||||
}
|
||||
DynamicObject materialpurchaseinfo = BusinessDataServiceHelper.loadSingle("bd_materialpurchaseinfo", new QFilter[]{new QFilter("masterid", QCP.equals, tqq9_material.getLong("id"))});//物料采购信息
|
||||
BigDecimal tqq9_saledates = entry.getBigDecimal("tqq9_saledates");
|
||||
model.setValue("material", materialpurchaseinfo, i);//物料
|
||||
|
|
@ -518,6 +524,23 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
model.setValue("entrypurdept", LCJT, i);//采购部门
|
||||
model.setValue("entryoperatorgroup", tqq9_org, i);//采购组
|
||||
model.setValue("tqq9_expectsaletime", tqq9_saledates, i);//预计销售时间(月)
|
||||
model.setValue("tqq9_expectsaletime", tqq9_saledates, i);//预计销售时间(月)
|
||||
model.setValue("taxrateid", taxrate1, i);//税率
|
||||
model.setValue("taxrate", taxrate2, i);//税率(%)
|
||||
if(StringUtils.equals("SHLC",number)){
|
||||
BigDecimal tqq9_xsyj1 = tqq9_material.getBigDecimal("tqq9_xsyj1");
|
||||
BigDecimal multiply = tqq9_xsyj1.multiply(new BigDecimal(0.83));
|
||||
model.setValue("tqq9_dis83price", multiply, i);//商城83折销售价
|
||||
}else if(StringUtils.equals("BJLC",number)){
|
||||
BigDecimal tqq9_amountfield1 = tqq9_material.getBigDecimal("tqq9_amountfield1");
|
||||
BigDecimal multiply = tqq9_amountfield1.multiply(new BigDecimal(0.83));
|
||||
model.setValue("tqq9_dis83price", multiply, i);//商城83折销售价
|
||||
}else if(StringUtils.equals("GZLC",number)){
|
||||
BigDecimal tqq9_amountfield4 = tqq9_material.getBigDecimal("tqq9_amountfield4");
|
||||
BigDecimal multiply = tqq9_amountfield4.multiply(new BigDecimal(0.83));
|
||||
model.setValue("tqq9_dis83price", multiply, i);//商城83折销售价
|
||||
}
|
||||
model.setValue("taxrate", taxrate2, i);//税率(%)
|
||||
if (StringUtils.equals(tqq9_org.getString("number"), "SHLC")) {
|
||||
model.setValue("tqq9_zgcgxj", tqq9_material.getBigDecimal("tqq9_maxprice_sh"), i);//最高采购限价
|
||||
model.setValue("priceandtax", tqq9_material.getBigDecimal("tqq9_maxprice_sh"), i);//含税单价
|
||||
|
|
|
|||
|
|
@ -270,6 +270,12 @@ public class PurorderEntryIntroPaybillPlugin extends AbstractBillPlugIn imple
|
|||
}
|
||||
JSONObject material = entry.getJSONObject("tqq9_material");//物料
|
||||
DynamicObject tqq9_material = BusinessDataServiceHelper.loadSingle(material.getLong("id"), "bd_material");//物料
|
||||
DynamicObject taxrate1 = tqq9_material.getDynamicObject("taxrate");
|
||||
BigDecimal taxrate2=null;
|
||||
if(taxrate1!=null){
|
||||
taxrate2 = taxrate1.getBigDecimal("taxrate");
|
||||
}
|
||||
String number = org.getString("number");
|
||||
DynamicObject materialpurchaseinfo = BusinessDataServiceHelper.loadSingle("bd_materialpurchaseinfo", new QFilter[]{new QFilter("masterid", QCP.equals, tqq9_material.getLong("id"))});//物料采购信息
|
||||
BigDecimal tqq9_saledates = entry.getBigDecimal("tqq9_saledates");
|
||||
model.setValue("material", materialpurchaseinfo, i);//物料
|
||||
|
|
@ -293,7 +299,22 @@ public class PurorderEntryIntroPaybillPlugin extends AbstractBillPlugIn imple
|
|||
model.setValue("discounttype", "C", i);//折扣方式
|
||||
model.setValue("tqq9_expectsaletime", tqq9_saledates, i);//预计销售时间(月)
|
||||
model.setValue("ownertype", "bos_org",i);//货主类型
|
||||
model.setValue("owner", org,i);//货主类型
|
||||
model.setValue("owner", org,i);//货主
|
||||
model.setValue("taxrateid", taxrate1, i);//税率
|
||||
model.setValue("taxrate", taxrate2, i);//税率(%)
|
||||
if(StringUtils.equals("SHLC",number)){
|
||||
BigDecimal tqq9_xsyj1 = tqq9_material.getBigDecimal("tqq9_xsyj1");
|
||||
BigDecimal multiply = tqq9_xsyj1.multiply(new BigDecimal(0.83));
|
||||
model.setValue("tqq9_dis83price", multiply, i);//商城83折销售价
|
||||
}else if(StringUtils.equals("BJLC",number)){
|
||||
BigDecimal tqq9_amountfield1 = tqq9_material.getBigDecimal("tqq9_amountfield1");
|
||||
BigDecimal multiply = tqq9_amountfield1.multiply(new BigDecimal(0.83));
|
||||
model.setValue("tqq9_dis83price", multiply, i);//商城83折销售价
|
||||
}else if(StringUtils.equals("GZLC",number)){
|
||||
BigDecimal tqq9_amountfield4 = tqq9_material.getBigDecimal("tqq9_amountfield4");
|
||||
BigDecimal multiply = tqq9_amountfield4.multiply(new BigDecimal(0.83));
|
||||
model.setValue("tqq9_dis83price", multiply, i);//商城83折销售价
|
||||
}
|
||||
if (StringUtils.equals(org.getString("number"), "SHLC")) {
|
||||
model.setValue("tqq9_zgcgxj", tqq9_material.getBigDecimal("tqq9_maxprice_sh"), i);//最高采购限价
|
||||
model.setValue("priceandtax", tqq9_material.getBigDecimal("tqq9_maxprice_sh"), i);//含税单价
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import kd.sdk.plugin.Plugin;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -203,7 +204,9 @@ public class PurOrderPushPurRefundConverPlugin extends AbstractConvertPlugIn imp
|
|||
for (Map.Entry<String, BigDecimal> entrySet : map.entrySet()) {
|
||||
String id = entrySet.getKey();
|
||||
BigDecimal qty1 = entrySet.getValue();
|
||||
for (DynamicObject dynamicObject1 : dynamicObjectCollection) {
|
||||
ListIterator<DynamicObject> iterator = dynamicObjectCollection.listIterator();
|
||||
while (iterator.hasNext()) {
|
||||
DynamicObject dynamicObject1 = iterator.next();
|
||||
String inwarebillentryid = dynamicObject1.getString("tqq9_inwarebillentryid");
|
||||
if (StringUtils.equals(inwarebillentryid, id)) {
|
||||
BigDecimal qty2 = dynamicObject1.getBigDecimal("qty");
|
||||
|
|
@ -214,14 +217,12 @@ public class PurOrderPushPurRefundConverPlugin extends AbstractConvertPlugIn imp
|
|||
dynamicObject1.set("qty", add);
|
||||
dynamicObject1.set("baseqty", add);
|
||||
} else if (add.compareTo(BigDecimal.ZERO) == 0) {
|
||||
dynamicObjectCollection.remove(dynamicObject1);
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ public class ReturnStockSyncNotifierPlugin extends AbstractOperationServicePlugI
|
|||
OperateOption option = this.getOption();
|
||||
Boolean isSuccess = true;
|
||||
StringBuilder errorMsg = new StringBuilder();
|
||||
int index=0;
|
||||
for (DynamicObject entry : billentry) {
|
||||
String mainbillnumber = entry.getString("mainbillnumber");//核心单据编号
|
||||
String mainbillentryid = entry.getString("mainbillentryid");//核心单据行id
|
||||
|
|
@ -72,12 +73,11 @@ public class ReturnStockSyncNotifierPlugin extends AbstractOperationServicePlugI
|
|||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("qty",qty);
|
||||
long timestamp = LocalDateTime.now().toEpochSecond(ZoneOffset.UTC);
|
||||
jsonObject.put("timestamp",timestamp);
|
||||
jsonObject.put("timestamp",index);
|
||||
param.computeIfAbsent(id, k -> new HashSet<>()).add(jsonObject);
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
String rule = BotpParamUtils.getBotpRuleId(PURORDER, RECEIPTNOTICE, "采购订单_收货通知单_转换规则_扩展");
|
||||
PushArgs pushArgs = BotpParamUtils.getPushArgs(PURORDER, RECEIPTNOTICE, PURORDER_ENTRY, param, entitypkMap, rule);
|
||||
|
|
|
|||
Loading…
Reference in New Issue