开票登记组织=申请付款组织,提交审核优化
This commit is contained in:
parent
3366517e7a
commit
9568d453a3
|
@ -15,6 +15,7 @@ import kd.bos.cache.CacheFactory;
|
|||
import kd.bos.cache.TempFileCache;
|
||||
import kd.bos.coderule.api.CodeRuleInfo;
|
||||
import kd.bos.context.RequestContext;
|
||||
import kd.bos.dataentity.OperateOption;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.dataentity.resource.ResManager;
|
||||
|
@ -332,12 +333,13 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
|||
JSONArray resultList = saveCheckJson.getJSONArray("resultList");
|
||||
JSONObject result = resultList.getJSONObject(0);//保存返回结果
|
||||
String pi_key = result.getString("pi_key");//发票结果key
|
||||
|
||||
//生成发票登记表单
|
||||
DynamicObject recon_invoicebill = BusinessDataServiceHelper.newDynamicObject("recon_invoicebill");
|
||||
// DynamicObject recon_invoicebill1 = BusinessDataServiceHelper.loadSingle("2031274535679975424", "recon_invoicebill");
|
||||
recon_invoicebill.set("billstatus","A");//单据状态
|
||||
//所属组织
|
||||
//DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter[]{new QFilter("number", QCP.equals, "dobe")});
|
||||
long rootOrgId = OrgUnitServiceHelper.getRootOrgId();
|
||||
//long rootOrgId = OrgUnitServiceHelper.getRootOrgId();
|
||||
long rootOrgId = dataEntity.getLong("org.id");
|
||||
DynamicObject org = BusinessDataServiceHelper.loadSingle(rootOrgId, "bos_org");
|
||||
if (null != org) {
|
||||
recon_invoicebill.set("org",org);
|
||||
|
@ -419,18 +421,26 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
|||
invoiceentr.set("entry_content",description);//项目名称
|
||||
invoiceentr.set("entry_notaxamt",qeug_amount);
|
||||
}
|
||||
OperationResult operationResult = OperationServiceHelper.executeOperate("save", "recon_invoicebill", new DynamicObject[]{recon_invoicebill});
|
||||
if (!operationResult.isSuccess()){
|
||||
logger.error(operationResult.getMessage());
|
||||
}
|
||||
OperationResult operationResult1 = OperationServiceHelper.executeOperate("submit", "recon_invoicebill", new DynamicObject[]{recon_invoicebill});
|
||||
|
||||
//保存
|
||||
OperateOption operateOption1 = OperateOption.create();
|
||||
OperationResult operationResult1 = OperationServiceHelper.executeOperate("save", "recon_invoicebill", new DynamicObject[]{recon_invoicebill}, operateOption1);
|
||||
if (!operationResult1.isSuccess()){
|
||||
logger.error(operationResult1.getMessage());
|
||||
}
|
||||
OperationResult operationResult2 = OperationServiceHelper.executeOperate("audit", "recon_invoicebill", new DynamicObject[]{recon_invoicebill});
|
||||
//提交
|
||||
OperateOption operateOption2 = OperateOption.create();
|
||||
OperationResult operationResult2 = OperationServiceHelper.executeOperate("submit", "recon_invoicebill", new DynamicObject[]{recon_invoicebill}, operateOption2);
|
||||
if (!operationResult2.isSuccess()){
|
||||
logger.error(operationResult2.getMessage());
|
||||
}
|
||||
//审核
|
||||
OperateOption operateOption3 = OperateOption.create();
|
||||
OperationResult operationResult3 = OperationServiceHelper.executeOperate("audit", "recon_invoicebill", new DynamicObject[]{recon_invoicebill}, operateOption3);
|
||||
if (!operationResult3.isSuccess()){
|
||||
logger.error(operationResult3.getMessage());
|
||||
}
|
||||
|
||||
//todo:添加发票信息分录
|
||||
DynamicObject dynamicObject = invoiceentry.addNew();//新增分录行
|
||||
//todo:模仿标品新增字段,为接口返回数据反写分录做准备
|
||||
|
@ -462,7 +472,7 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
|||
this.getView().showTipNotification("请先选择用款单位!");
|
||||
}
|
||||
break;
|
||||
//发票验真验重
|
||||
//关联发票
|
||||
case "qeug_refinvoice":
|
||||
//todo: 关联发票二开接口
|
||||
switch (billtype){
|
||||
|
|
Loading…
Reference in New Issue