- [x] SAP生成付款申请(二级部门,外部系统单号)
- [x] SAP动态表单新增过滤条件:多选:原因码,文本:单据号
- [x] 优化排程合并提示
- [ ] 字段解锁(代码)_付款单(排程下查)
- [x] 优化收款变更(源头认领通知单),红蓝字逻辑失败
- [x] 收款单,变更过滤(业务大类小类,根据收款类型)
s
This commit is contained in:
weiyunlong 2025-05-15 18:30:29 +08:00
parent bd25a6510b
commit 5232a4b1ac
5 changed files with 90 additions and 6 deletions

View File

@ -60,7 +60,7 @@ public class ClaimFormPlugin extends AbstractFormPlugin implements Plugin , Befo
break;
case "shjh_bizbig":
//业务大类根据收款类型过滤
//非认领单,取消逻辑
//非认领单,收款单,取消逻辑
if (!"cas_claimbill".equals(entityId)){
return;
}
@ -100,6 +100,48 @@ public class ClaimFormPlugin extends AbstractFormPlugin implements Plugin , Befo
ListShowParameter listShowParameter1 = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
listShowParameter1.getListFilterParameter().setFilter(q2);
break;
case "shjh_bizebig":
//业务大类根据收款类型过滤
//非收款单,取消逻辑
if (!"cas_recbill".equals(entityId) && !"cas_recbill_change".equals(entityId)){
return;
}
QFilter qq2 = null;
DynamicObject recpaytypee = this.getModel().getDataEntity().getDynamicObject("receivingtype");
if (null != recpaytypee) {
/**
* 销售回款应收业务大类02开头
* 退预付款应付业务03开头
* 员工还款费用业务05开头
* 总账业务01开头
* 资金业务04开头
*/
switch (recpaytypee.getString("number")){
case "100":
case "JH002":
qq2 = new QFilter("number", QCP.like, "02%");
break;
case "103":
case "JH003":
qq2 = new QFilter("number", QCP.like, "03%");
break;
case "109":
case "JH005":
qq2 = new QFilter("number", QCP.like, "05%");
break;
case "JH001":
qq2 = new QFilter("number", QCP.like, "01%");
break;
case "JH004":
qq2 = new QFilter("number", QCP.like, "04%");
break;
default:
break;
}
}
ListShowParameter listShowParameter11 = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
listShowParameter11.getListFilterParameter().setFilter(qq2);
break;
default:
break;
}
@ -122,6 +164,10 @@ public class ClaimFormPlugin extends AbstractFormPlugin implements Plugin , Befo
case "recpaytype":
this.getView().getModel().setValue("shjh_bizbig", null);
break;
//收款单_收款类型
case "receivingtype":
this.getView().getModel().setValue("shjh_bizebig", null);
break;
default:
break;
}

View File

@ -105,7 +105,7 @@ public class SappzFormPlugin extends AbstractFormPlugin {
// 添加单据号过滤条件
if (StringUtils.isNotEmpty(shjh_djh)) {
addFilterCondition(IT_LIST, "UUID", shjh_djh, shjh_djh);
addFilterCondition(IT_LIST, "XBLNR", shjh_djh, shjh_djh);
}
DynamicObjectCollection shjhEntryentity = this.getModel().getEntryEntity("shjh_entryentity");
shjhEntryentity.clear();

View File

@ -0,0 +1,23 @@
package shjh.jhzj7.fi.fi.plugin.form;
import kd.bos.form.ClientProperties;
import kd.bos.form.plugin.AbstractFormPlugin;
import java.util.EventObject;
import java.util.HashMap;
import java.util.Map;
public class TextFieldDemo extends AbstractFormPlugin {
/**
* 插件修改元数据
* @param e
*/
@Override
public void afterBindData(EventObject e) {
Map<String, Object> ctlMap = new HashMap<>();
ctlMap.put(ClientProperties.Editable, true);
this.getView().updateControlMetadata("settletype", ctlMap);
}
}

View File

@ -49,8 +49,7 @@ public class RecBillSaveOperation extends AbstractOperationServicePlugIn impleme
//若源单为收款处理 认领通知单,清空单据头.是否已推送SAP;单据头.SAP凭证号;单据头.SAP会计年度任保留方便后续推红冲凭证 cas_recbill
String sourcebilltype = bill.getString("sourcebilltype");
if ("cas_recbill".equals(sourcebilltype) || "cas_claimcenterbill".equals(sourcebilltype) ||
"收款单".equals(sourcebilltype) || "认领通知单".equals(sourcebilltype)) {
if ("cas_recbill".equals(sourcebilltype) ||"收款单".equals(sourcebilltype) ) {
long sourcebillid = bill.getLong("sourcebillid");
QFilter q1 = new QFilter("id", QCP.equals, sourcebillid);
DynamicObject[] load = BusinessDataServiceHelper.load("cas_recbill",
@ -64,6 +63,22 @@ public class RecBillSaveOperation extends AbstractOperationServicePlugIn impleme
}
}
}
if ("cas_claimcenterbill".equals(sourcebilltype) ||"认领通知单".equals(sourcebilltype)) {
long sourcebillid = bill.getLong("sourcebillid");
QFilter q1 = new QFilter("sourcebillid", QCP.equals, sourcebillid);
QFilter q2 = new QFilter("actrecamt", QCP.less_than, 0);
DynamicObject[] load = BusinessDataServiceHelper.load("cas_recbill",
"id,billno,shjh_vouchernum,shjh_sapfiscalyear,shjh_ispushsap,shjh_issourceblue", (q1.and(q2)).toArray());
for (DynamicObject dynamicObject : load) {
boolean shjhIssourceblue = dynamicObject.getBoolean("shjh_issourceblue");
if (!shjhIssourceblue) {
dynamicObject.set("shjh_ispushsap", false);
dynamicObject.set("shjh_issourceblue", true);
SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
}
}
}
}
}

View File

@ -156,8 +156,8 @@ public class SchedulebillMergeOperation extends AbstractOperationServicePlugIn i
// this.getOperationResult().setShowMessage(true);
OperateErrorInfo operateErrorInfo = new OperateErrorInfo();
operateErrorInfo.setMessage("合并数:" + size + " 合并的批次号:" + sb);
operateErrorInfo.setErrorLevel(ErrorLevel.FatalError.name());
operateErrorInfo.setMessage("合并数:" + size + "\n 合并的批次号:" + sb);
operateErrorInfo.setErrorLevel(ErrorLevel.Error.name());
// operateErrorInfo.setPkValue(bill.getPkValue());
this.operationResult.addErrorInfo(operateErrorInfo);
return;