Compare commits
No commits in common. "fd2246ba591fba8ac6916951070fbc0dc726f2b6" and "45604cbd6dadead35d04d6e1a14018e9700d0242" have entirely different histories.
fd2246ba59
...
45604cbd6d
|
@ -15,7 +15,6 @@ 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;
|
||||
|
@ -333,13 +332,12 @@ 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");//单据状态
|
||||
//所属组织
|
||||
//long rootOrgId = OrgUnitServiceHelper.getRootOrgId();
|
||||
long rootOrgId = dataEntity.getLong("org.id");
|
||||
//DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter[]{new QFilter("number", QCP.equals, "dobe")});
|
||||
long rootOrgId = OrgUnitServiceHelper.getRootOrgId();
|
||||
DynamicObject org = BusinessDataServiceHelper.loadSingle(rootOrgId, "bos_org");
|
||||
if (null != org) {
|
||||
recon_invoicebill.set("org",org);
|
||||
|
@ -421,26 +419,18 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
|||
invoiceentr.set("entry_content",description);//项目名称
|
||||
invoiceentr.set("entry_notaxamt",qeug_amount);
|
||||
}
|
||||
|
||||
//保存
|
||||
OperateOption operateOption1 = OperateOption.create();
|
||||
OperationResult operationResult1 = OperationServiceHelper.executeOperate("save", "recon_invoicebill", new DynamicObject[]{recon_invoicebill}, operateOption1);
|
||||
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});
|
||||
if (!operationResult1.isSuccess()){
|
||||
logger.error(operationResult1.getMessage());
|
||||
}
|
||||
//提交
|
||||
OperateOption operateOption2 = OperateOption.create();
|
||||
OperationResult operationResult2 = OperationServiceHelper.executeOperate("submit", "recon_invoicebill", new DynamicObject[]{recon_invoicebill}, operateOption2);
|
||||
OperationResult operationResult2 = OperationServiceHelper.executeOperate("audit", "recon_invoicebill", new DynamicObject[]{recon_invoicebill});
|
||||
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:模仿标品新增字段,为接口返回数据反写分录做准备
|
||||
|
@ -472,7 +462,7 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
|||
this.getView().showTipNotification("请先选择用款单位!");
|
||||
}
|
||||
break;
|
||||
//关联发票
|
||||
//发票验真验重
|
||||
case "qeug_refinvoice":
|
||||
//todo: 关联发票二开接口
|
||||
switch (billtype){
|
||||
|
|
Loading…
Reference in New Issue