-// boolean result = op.getOption().tryGetVariableValue("cancellation", new RefObject());
-// if (!result) {
-// list = (BillList)this.getView().getControl("billlistap");
-// lstCollection = list.getSelectedRows();
-// args.cancel = true;
-// if (CasHelper.getSelectedRowSize(lstCollection) > 1) {
-// this.getView().showTipNotification(ResManager.loadKDString("作废仅支持对单张单据处理,请修改选择范围。", "PaymentBillList_8", "fi-cas-formplugin", new Object[0]));
-// return;
-// }
-//
-// this.getView().showConfirm(ResManager.loadKDString("作废选中记录后,将无法恢复,确认要作废该记录吗?", "PaymentBillList_9", "fi-cas-formplugin", new Object[0]), MessageBoxOptions.OKCancel, new ConfirmCallBackListener("cancellation", this));
-// }
-// } else {
-// DynamicObject settletype;
-// String payConfirm;
-// if ("endorse".equals(key)) {
-// list = (BillList)this.getView().getControl("billlistap");
-// selectedRows = list.getSelectedRows();
-// if (CasHelper.getSelectedRowSize(selectedRows) > 1) {
-// this.getView().showTipNotification(ResManager.loadKDString("背书仅支持对单张单据处理,请修改选择范围。", "PaymentBillList_20", "fi-cas-formplugin", new Object[0]));
-// args.cancel = true;
-// return;
-// }
-//
-// if (selectedRows.size() == 1) {
-// DynamicObject info = BusinessDataServiceHelper.loadSingle(selectedRows.get(0).getPrimaryKeyValue(), "nckd_cas_apbill_xz");
-// if (null != accountBank && AccountBankHelper.isClosed(accountBank.getLong("id"))) {
-// throw new KDBizException(String.format(ResManager.loadKDString("账户%s当前状态为已销户,暂无法进行业务处理。", "PaymentErrorCode_47", "fi-cas-business", new Object[0]), accountBank.getString("number")));
-// }
-//
-// if (accountBank != null && PayBillCrossHelper.isIfmBankAcc(accountBank)) {
-// throw new KDBizException(ResManager.loadKDString("内部账户请选择内部结算付款。", "PaymentErrorCode_48", "fi-cas-business", new Object[0]));
-// }
-// }
-// }
-// }
-// } else if ("submit".equals(key)) {
-// list = (BillList)this.getControl("billlistap");
-// if (payBill.getBoolean("isdiffcur") && cs1046.contains(SysParamCs1046Enum.DIFF.getValue()) && selectRowsPks.size() > 1) {
-// throw new KDBizException(ResManager.loadKDString("存在异币别需要确认付款的单据,不能批量确认付款。", "PaymentBillList_26", "fi-cas-formplugin", new Object[0]));
-// }
-//
-// Long dpcurrencyId = payBill.getDynamicObject("dpcurrency").getLong("id");
-// if (preDpCurrencyId == 0L) {
-// preDpCurrencyId = dpcurrencyId;
-// } else if (!preDpCurrencyId.equals(dpcurrencyId)) {
-// isSameDpCurrency = false;
-// }
-//
-// Long basecurrencyId = payBill.getDynamicObject("basecurrency").getLong("id");
-// if (preBasecurrencyId == 0L) {
-// preBasecurrencyId = basecurrencyId;
-// } else if (!preBasecurrencyId.equals(basecurrencyId)) {
-// isSameCurrency = false;
-// }
-//
-// if (!basecurrencyId.equals(dpcurrencyId)) {
-// isForeignCurrency = true;
-// }
-// }
-// }
-//
-// if (!isSameParam) {
-// throw new KDBizException(ResManager.loadKDString("所选单据存在多个付款资金组织系统参数“允许确认付款环节更新/补充信息”选项不一致,不能批量确认付款,请重新选择。", "PaymentBillList_34", "fi-cas-formplugin", new Object[0]));
-// if (cs1047.contains(SysParamCs1046Enum.FOREIGN.getValue()) && (!isSameDpCurrency || !isSameCurrency)) {
-// throw new KDBizException(ResManager.loadKDString("开启了系统参数确认付款环节更新外币业务的付款汇率,但所选存在付款币别、业务主币别不一致的单据,不能批量确认付款,请重新选择。", "PaymentBillList_35", "fi-cas-formplugin", new Object[0]));
-// }
-//
-// Object pk;
-// if (selectRowsPks.size() > 1) {
-// if (isForeignCurrency && cs1047.contains(SysParamCs1046Enum.FOREIGN.getValue())) {
-// boolean result = op.getOption().tryGetVariableValue("cancellation", new RefObject());
-// if (!result) {
-// list = (BillList)this.getView().getControl("billlistap");
-// lstCollection = list.getSelectedRows();
-// args.cancel = true;
-// if (CasHelper.getSelectedRowSize(lstCollection) > 1) {
-// this.getView().showTipNotification(ResManager.loadKDString("作废仅支持对单张单据处理,请修改选择范围。", "PaymentBillList_8", "fi-cas-formplugin", new Object[0]));
-// return;
-// }
-//
-// this.getView().showConfirm(ResManager.loadKDString("作废选中记录后,将无法恢复,确认要作废该记录吗?", "PaymentBillList_9", "fi-cas-formplugin", new Object[0]), MessageBoxOptions.OKCancel, new ConfirmCallBackListener("cancellation", this));
-// }
-// } else {
-// DynamicObject settletype;
-// String payConfirm;
-// if ("endorse".equals(key)) {
-// list = (BillList)this.getView().getControl("billlistap");
-// selectedRows = list.getSelectedRows();
-// if (CasHelper.getSelectedRowSize(selectedRows) > 1) {
-// this.getView().showTipNotification(ResManager.loadKDString("背书仅支持对单张单据处理,请修改选择范围。", "PaymentBillList_20", "fi-cas-formplugin", new Object[0]));
-// args.cancel = true;
-// return;
-// }
-//
-// if (selectedRows.size() == 1) {
-// DynamicObject info = BusinessDataServiceHelper.loadSingle(selectedRows.get(0).getPrimaryKeyValue(), "nckd_cas_arbill");
-// if (null != accountBank && AccountBankHelper.isClosed(accountBank.getLong("id"))) {
-// throw new KDBizException(String.format(ResManager.loadKDString("账户%s当前状态为已销户,暂无法进行业务处理。", "PaymentErrorCode_47", "fi-cas-business", new Object[0]), accountBank.getString("number")));
-// }
-//
-// if (accountBank != null && PayBillCrossHelper.isIfmBankAcc(accountBank)) {
-// throw new KDBizException(ResManager.loadKDString("内部账户请选择内部结算付款。", "PaymentErrorCode_48", "fi-cas-business", new Object[0]));
-// }
-// }
-// }
-// }
-// } else if ("submit".equals(key)) {
-// list = (BillList)this.getControl("billlistap");
-// if (payBill.getBoolean("isdiffcur") && cs1046.contains(SysParamCs1046Enum.DIFF.getValue()) && selectRowsPks.size() > 1) {
-// throw new KDBizException(ResManager.loadKDString("存在异币别需要确认付款的单据,不能批量确认付款。", "PaymentBillList_26", "fi-cas-formplugin", new Object[0]));
-// }
-//
-// Long dpcurrencyId = payBill.getDynamicObject("dpcurrency").getLong("id");
-// if (preDpCurrencyId == 0L) {
-// preDpCurrencyId = dpcurrencyId;
-// } else if (!preDpCurrencyId.equals(dpcurrencyId)) {
-// isSameDpCurrency = false;
-// }
-//
-// Long basecurrencyId = payBill.getDynamicObject("basecurrency").getLong("id");
-// if (preBasecurrencyId == 0L) {
-// preBasecurrencyId = basecurrencyId;
-// } else if (!preBasecurrencyId.equals(basecurrencyId)) {
-// isSameCurrency = false;
-// }
-//
-// if (!basecurrencyId.equals(dpcurrencyId)) {
-// isForeignCurrency = true;
-// }
-// }
-// }
-//
-// if (!isSameParam) {
-// throw new KDBizException(ResManager.loadKDString("所选单据存在多个付款资金组织系统参数“允许确认付款环节更新/补充信息”选项不一致,不能批量确认付款,请重新选择。", "PaymentBillList_34", "fi-cas-formplugin", new Object[0]));
-// if (cs1047.contains(SysParamCs1046Enum.FOREIGN.getValue()) && (!isSameDpCurrency || !isSameCurrency)) {
-// throw new KDBizException(ResManager.loadKDString("开启了系统参数确认付款环节更新外币业务的付款汇率,但所选存在付款币别、业务主币别不一致的单据,不能批量确认付款,请重新选择。", "PaymentBillList_35", "fi-cas-formplugin", new Object[0]));
-// }
-//
-// Object pk;
-// if (selectRowsPks.size() > 1) {
-// if (isForeignCurrency && cs1047.contains(SysParamCs1046Enum.FOREIGN.getValue())) {
- SaveServiceHelper.save(inventoryTask.getDataEntityType(), new DynamicObject[]{inventoryTask});
- FaOperateLogUtil.addLog("fa_inventory_task", (Long)assetUnitId, ResManager.loadKDString("生成盘点记录", "FaInventoryTaskList_19", "fi-fa-formplugin", new Object[0]), String.format(ResManager.loadKDString("%s生成盘点记录成功。", "FaInventoryTaskList_21", "fi-fa-formplugin", new Object[0]), unitName));
- } catch (Exception var32) {
- FaOperateLogUtil.addLog("fa_inventory_task", (Long)assetUnitId, ResManager.loadKDString("生成盘点记录", "FaInventoryTaskList_19", "fi-fa-formplugin", new Object[0]), String.format(ResManager.loadKDString("%1$s生成盘点记录事务失败,联系管理员查看日志:%2$s。", "FaInventoryTaskList_22", "fi-fa-formplugin", new Object[0]), unitName, var32.getMessage()));
- throw new KDBizException(String.format(ResManager.loadKDString("%1$s生成盘点记录事务失败,联系管理员查看日志:%2$s。", "FaInventoryTaskList_22", "fi-fa-formplugin", new Object[0]), unitName, var32.getMessage()));
- }
- }
- }
-
- if (notRightStatus.length() > 0) {
- int unSuccess = notRightStatus.toString().split(" ").length;
- int success = selectedRows.size() - unSuccess;
- this.getView().showTipNotification(String.format(ResManager.loadKDString("成功%1$d条,失败%2$d条,其中[%3$s]生成失败,任务状态不是已下达。", "FaInventoryTaskList_23", "fi-fa-formplugin", new Object[0]), success, unSuccess, notRightStatus));
- } else {
- this.getView().showSuccessNotification(ResManager.loadKDString("生成盘点记录成功。", "FaInventoryTaskList_24", "fi-fa-formplugin", new Object[0]));
- }
-
- this.getView().invokeOperation("refresh");
- return;
- }
- }
- }
- }
- }
- }
-
- private int isSchemeClose(ListSelectedRowCollection selectedRows) {
- List<ComboItem> comboItemsStatus = new ArrayList();
- ComboItem a = new ComboItem(new LocaleString(ResManager.loadKDString("未下达", "FaInventoryTaskList_37", "fi-fa-formplugin", new Object[0])), BillStatus.A.toString());
- ComboItem b = new ComboItem(new LocaleString(ResManager.loadKDString("已下达", "FaInventoryTaskList_38", "fi-fa-formplugin", new Object[0])), BillStatus.B.toString());
- ComboItem c = new ComboItem(new LocaleString(ResManager.loadKDString("已生成", "FaInventoryTaskList_39", "fi-fa-formplugin", new Object[0])), "C");
+// SaveServiceHelper.save(inventoryTask.getDataEntityType(), new DynamicObject[]{inventoryTask});
+// FaOperateLogUtil.addLog("fa_inventory_task", (Long)assetUnitId, ResManager.loadKDString("生成盘点记录", "FaInventoryTaskList_19", "fi-fa-formplugin", new Object[0]), String.format(ResManager.loadKDString("%s生成盘点记录成功。", "FaInventoryTaskList_21", "fi-fa-formplugin", new Object[0]), unitName));
+// } catch (Exception var32) {
+// FaOperateLogUtil.addLog("fa_inventory_task", (Long)assetUnitId, ResManager.loadKDString("生成盘点记录", "FaInventoryTaskList_19", "fi-fa-formplugin", new Object[0]), String.format(ResManager.loadKDString("%1$s生成盘点记录事务失败,联系管理员查看日志:%2$s。", "FaInventoryTaskList_22", "fi-fa-formplugin", new Object[0]), unitName, var32.getMessage()));
+// throw new KDBizException(String.format(ResManager.loadKDString("%1$s生成盘点记录事务失败,联系管理员查看日志:%2$s。", "FaInventoryTaskList_22", "fi-fa-formplugin", new Object[0]), unitName, var32.getMessage()));
+// }
+// }
+// }
+//
+// if (notRightStatus.length() > 0) {
+// int unSuccess = notRightStatus.toString().split(" ").length;
+// int success = selectedRows.size() - unSuccess;
+// this.getView().showTipNotification(String.format(ResManager.loadKDString("成功%1$d条,失败%2$d条,其中[%3$s]生成失败,任务状态不是已下达。", "FaInventoryTaskList_23", "fi-fa-formplugin", new Object[0]), success, unSuccess, notRightStatus));
+// } else {
+// this.getView().showSuccessNotification(ResManager.loadKDString("生成盘点记录成功。", "FaInventoryTaskList_24", "fi-fa-formplugin", new Object[0]));
+// }
+//
+// this.getView().invokeOperation("refresh");
+// return;
+// }
+// }
+// }
+// }
+// }
+// }
+//
+// private int isSchemeClose(ListSelectedRowCollection selectedRows) {
+// List<ComboItem> comboItemsStatus = new ArrayList();
+// ComboItem a = new ComboItem(new LocaleString(ResManager.loadKDString("未下达", "FaInventoryTaskList_37", "fi-fa-formplugin", new Object[0])), BillStatus.A.toString());
+// ComboItem b = new ComboItem(new LocaleString(ResManager.loadKDString("已下达", "FaInventoryTaskList_38", "fi-fa-formplugin", new Object[0])), BillStatus.B.toString());
+// ComboItem c = new ComboItem(new LocaleString(ResManager.loadKDString("已生成", "FaInventoryTaskList_39", "fi-fa-formplugin", new Object[0])), "C");
- if (StringUtils.isEmpty(filterMsg) && !StringUtils.isEmpty(msg)) {
- filterMsg.append(ResManager.loadKDString("严重警示:", "FpzsMainPlugin_159", "imc-rim-formplugin", new Object[0])).append("\r\n\t");
- filterMsg.append(msg);
- } else if (!StringUtils.isEmpty(filterMsg) && !StringUtils.isEmpty(msg)) {
- filterMsg.append("\r\n\t").append(msg);
- }
- } else if ("1".equals(showAttachUpload)) {
- if (StringUtils.isEmpty(redMsg) && !StringUtils.isEmpty(msg)) {
- redMsg.append(ResManager.loadKDString("中度警示:", "FpzsMainPlugin_160", "imc-rim-formplugin", new Object[0])).append("\r\n\t");
- redMsg.append(msg);
- } else if (!StringUtils.isEmpty(redMsg) && !StringUtils.isEmpty(msg)) {
- redMsg.append("\r\n\t").append(msg);
- }
- } else if ("2".equals(showAttachUpload)) {
- if (StringUtils.isEmpty(yellowMsg) && !StringUtils.isEmpty(msg)) {
- yellowMsg.append(ResManager.loadKDString("轻度提醒:", "FpzsMainPlugin_161", "imc-rim-formplugin", new Object[0])).append("\r\n\t");
- yellowMsg.append(msg);
- } else if (!StringUtils.isEmpty(yellowMsg) && !StringUtils.isEmpty(msg)) {
- yellowMsg.append("\r\n\t").append(msg);
- }
- }
- }
- }
- }
-
- StringBuilder allMsg = new StringBuilder();
- if (!StringUtils.isEmpty(filterMsg)) {
- if (!StringUtils.isEmpty(allMsg)) {
- allMsg.append("\r\n");
- }
-
- allMsg.append(filterMsg);
- }
-
- if (!StringUtils.isEmpty(redMsg)) {
- if (!StringUtils.isEmpty(allMsg)) {
- allMsg.append("\r\n");
- }
-
- allMsg.append(redMsg);
- }
-
- if (!StringUtils.isEmpty(yellowMsg)) {
- if (!StringUtils.isEmpty(allMsg)) {
- allMsg.append("\r\n");
- }
-
- allMsg.append(yellowMsg);
- }
-
- if ("0".equals(level)) {
- if (isFilter) {
- if (StringUtils.isEmpty(allMsg) && !StringUtils.isEmpty(verifyResultHtml) && verifyResultHtml.contains(ResManager.loadKDString("发票必要字段缺失", "FpzsMainPlugin_141", "imc-rim-formplugin", new Object[0]))) {
- allMsg.append(ResManager.loadKDString("严重警示:", "FpzsMainPlugin_159", "imc-rim-formplugin", new Object[0])).append("\r\n\t").append(ResManager.loadKDString("发票必要字段缺失,请编辑补全", "FpzsMainPlugin_142", "imc-rim-formplugin", new Object[0])).append("\r\n\t");
- if (StringUtils.isNotEmpty(scannerProcessRepeat) && "true".equals(scannerProcessRepeat)) {
- this.getView().showSuccessNotification(ResManager.loadKDString("发票已存在列表", "FpzsMainPlugin_137", "imc-rim-formplugin", new Object[0]));
- CacheHelper.remove(repeatFlag);
- }
- } else {
- String[] content = new String[]{String.format(ResManager.loadKDString("待处理文件剩余%1$s个", "FpzsMainPlugin_156", "imc-rim-formplugin", new Object[0]), waiting), String.format(ResManager.loadKDString("正在处理中(%1$s/%2$s)", "FpzsMainPlugin_157", "imc-rim-formplugin", new Object[0]), total - waiting, total)};
- service.show(dialogId, content, 1000);
- }
-
- JSONObject data = FpzsMainService.getInvoiceDataCache(pageId);