凭证相关
This commit is contained in:
parent
501d1b89ba
commit
cc93cf91df
@ -26,6 +26,9 @@
|
||||
{"false","","Button","废弃","废弃","abandon()","","","","btn_icon_delete",""},
|
||||
{"true","","Button","导入Excel","导入Excel","importExcel()","","","","btn_icon_import",""},
|
||||
{"true","","Button","网银模版下载","网银模版下载","ebankDownload()","","","","btn_icon_down",""},
|
||||
{"true","","Button","确认收入","确认收入","confirmIncome()","","","","btn_icon_valid",""},
|
||||
{"true","","Button","确认退回","确认退回","confirmpayback()","","","","btn_icon_valid",""},
|
||||
|
||||
/* {"true","","Button","导入Excel-平安","导入Excel-平安","importPAExcel()","","","","btn_icon_import",""},
|
||||
{"true","","Button","导入Excel-光大","导入Excel-光大","importCEBExcel()","","","","btn_icon_import",""},
|
||||
{"true","","Button","光大网银模版下载","光大网银模版下载","ebankCEBDownload()","","","","btn_icon_down",""}, */
|
||||
@ -84,8 +87,11 @@
|
||||
importCondition["inputorgid"]="<%=department%>";
|
||||
var sparam=JSON.stringify(importCondition).replace(/,/g,"@");//生成模板的参数据
|
||||
AsDialog.PopView("/Tenwa/Core/OfficeTemplate/TemplateManager/BFTemplateTest/uploadExcel.jsp","importparam="+sparam,
|
||||
{width:"320px",height:"40px",title:"上传网银Excel"},function(){reloadSelf();});
|
||||
{width:"320px",height:"40px",title:"上传网银Excel"},function(){
|
||||
importExcelNew();
|
||||
reloadSelf();});
|
||||
|
||||
|
||||
}
|
||||
function importPAExcel(){
|
||||
var importCondition={};//导入配置
|
||||
@ -142,5 +148,22 @@
|
||||
}
|
||||
AsControl.OpenView(sUrl,'id=' +sPara ,'_self','');
|
||||
}
|
||||
function importExcelNew(){
|
||||
|
||||
var res=RunJavaMethodTrans("com.tenwa.lease.app.ebank.EbankUse","createEbankVoucher","");
|
||||
|
||||
}
|
||||
function confirmIncome(){
|
||||
var sPara = getItemValue(0,getRow(0),'id');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
var res=RunJavaMethodTrans("com.tenwa.lease.app.ebank.EbankUse","createLeftEbankIncomeVoucher","ebdataid="+ebdataid);
|
||||
|
||||
}
|
||||
function confirmpayback(){
|
||||
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -58,6 +58,7 @@ public class VoucherToV8Impl implements VoucherService {
|
||||
*/
|
||||
private static final String Receive_Dealer_Margin="回款-收到经销商保证金";
|
||||
private static final String Return_Dealer_Margin="放款-退回经销商保证金";
|
||||
private static final String ebank_income="»Ø¿î-ÒøÐдæ¿îתԤÊÕ";
|
||||
|
||||
public String saveMessage(List<Map<String,String>> list,Map<String,String> param,BizObject user,JBOTransaction tx) throws Exception{
|
||||
try{
|
||||
@ -88,12 +89,14 @@ public class VoucherToV8Impl implements VoucherService {
|
||||
String contracid=list.get(i).get("CONTRACT_ID");//合同号
|
||||
String modularNumber=param.get("MODULAR_NUMBER");//凭证编号
|
||||
//网银导入、代收租金 的凭证不需要合同号
|
||||
if(!Return_Dealer_Margin.equals(modularNumber)&&!Receive_Dealer_Margin.equals(modularNumber)&&!moduleName_value.equals(modularNumber) && !SPECIAL_MODULENAME.equals(modularNumber) && Tools.isNullOrEmpty(contracid)){
|
||||
if(!Return_Dealer_Margin.equals(modularNumber)&&!Receive_Dealer_Margin.equals(modularNumber)&&!moduleName_value.equals(modularNumber)
|
||||
&& !SPECIAL_MODULENAME.equals(modularNumber) && !ebank_income.equals(modularNumber)&& Tools.isNullOrEmpty(contracid)
|
||||
){
|
||||
log.error("合同号为空,无法构建对应的凭证信息!");
|
||||
return null;
|
||||
}
|
||||
//检查合同ID是否是正确的
|
||||
if(!Return_Dealer_Margin.equals(modularNumber)&&!Receive_Dealer_Margin.equals(modularNumber)&&!moduleName_value.equals(modularNumber) && !SPECIAL_MODULENAME.equals(modularNumber)){
|
||||
if(!Return_Dealer_Margin.equals(modularNumber)&&!Receive_Dealer_Margin.equals(modularNumber)&& !ebank_income.equals(modularNumber)&&!moduleName_value.equals(modularNumber) && !SPECIAL_MODULENAME.equals(modularNumber)){
|
||||
BizObject contract=JBOFactory.createBizObjectQuery(LB_CONTRACT_INFO.CLASS_NAME, "id=:id").setParameter("id", contracid).getSingleResult(false);
|
||||
if(contract==null){
|
||||
message = message + "合同信息为空!";
|
||||
|
||||
@ -1,16 +1,23 @@
|
||||
package com.tenwa.lease.app.ebank;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_EBANK;
|
||||
import jbo.app.tenwa.calc.LC_EBANK_PROCESS;
|
||||
import jbo.app.tenwa.calc.LC_EBANK_TEMP;
|
||||
import jbo.voucher.LV_VOUCHER_CONFIG;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.BizObjectQuery;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl;
|
||||
|
||||
public class EbankUse {
|
||||
private String ebdataid;
|
||||
@ -46,4 +53,48 @@ public class EbankUse {
|
||||
ebankbom.createQuery(sql).setParameter("invalid", "Y").setParameter("id", this.getEbdataid()).executeUpdate();
|
||||
return "success";
|
||||
}
|
||||
|
||||
public void createEbankVoucher(JBOTransaction tx) throws Exception{
|
||||
Transaction Sqlca =null;
|
||||
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
|
||||
String voucherNo="PZ2018081600000120";
|
||||
Map<String,String> param=new HashMap<String, String>();
|
||||
BizObjectManager ebankbom=JBOFactory.getBizObjectManager(LC_EBANK.CLASS_NAME);
|
||||
tx.join(ebankbom);
|
||||
String fact_money="";
|
||||
String fact_date="";
|
||||
String ownnumber="";
|
||||
List<BizObject> bolist=ebankbom.createQuery("DEBIT_MONEY IS NULL").getResultList(true);
|
||||
CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl();
|
||||
String VOUCHER_TYPE="1";// ƾ֤·ÖÀà ½ðµû
|
||||
String userid ="admin";
|
||||
for(BizObject bo:bolist){
|
||||
fact_money=bo.getAttribute("fact_money").getString();
|
||||
fact_date=bo.getAttribute("fact_date").getString();
|
||||
ownnumber=bo.getAttribute("ownacc_number").getString();
|
||||
|
||||
param.put("FACT_MONEY",fact_money);
|
||||
param.put("ACCOUNT_DATE",fact_date);
|
||||
param.put("FACT_DATE",fact_date);
|
||||
param.put("ACC_NUMBER",ownnumber);
|
||||
|
||||
Map<String,String> map=new HashMap<String, String>();
|
||||
map.put("PROJ_TYPE", "02");
|
||||
map.put("VOUCHER_NO", voucherNo);
|
||||
BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca);
|
||||
if(vouch!=null){
|
||||
vs.createVoucher(vouch.getAttribute("MODULAR_NUMBER").getString(), vouch.getAttribute("OWNED_COMPANY").getString(), "02", VOUCHER_TYPE, userid,param, Sqlca);
|
||||
}
|
||||
bo.setAttributeValue("DEBIT_MONEY",fact_money);
|
||||
ebankbom.saveObject(bo);
|
||||
}
|
||||
Sqlca.commit();
|
||||
}
|
||||
|
||||
public void createLeftEbankIncomeVoucher(JBOTransaction tx) throws Exception{
|
||||
BizObjectManager ebankbom=JBOFactory.getBizObjectManager(LC_EBANK.CLASS_NAME);
|
||||
tx.join(ebankbom);
|
||||
BizObject bo=ebankbom.createQuery("id=:id").setParameter("id", this.getEbdataid()).getSingleResult(true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user