凭证相关问题表问题修复

This commit is contained in:
xiezhiwen 2018-09-11 14:21:20 +08:00
parent c92b611177
commit 8c6765651d
5 changed files with 20 additions and 12 deletions

View File

@ -34,12 +34,12 @@
// 凭证NC接口生成xml文件
function NCInterface(){
alert("传输开始");
   //$.post('http://172.16.0.19/com.tenwa.voucher.serviceImp.VoucherSysJointNCServiceImpl/sendVoucherData' , function (text, status) { alert(text); });
var mes = RunJavaMethodTrans("com.tenwa.voucher.serviceImp.VoucherSysJointNCServiceImpl","sendVoucherData","");
alert("传输成功");
}
function synVoucherCode(){
var ids=getItemValue(0,'f3')+"";
if(ids==""){
layer.alert("请先选择凭证信息!",{icon:7},function(index){

View File

@ -55,7 +55,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
//String FlowUnid=this.getAttribute("FlowUnid").toString();
//String VOUCHERNO="PZ2018071000000005";
//String VOUCHERNO=this.getAttribute("VoucherNo").toString();
if("PZ2018080300000069".equals(VOUCHERNO)||"PZ2018071000000005".equals(VOUCHERNO)) {
if("PZ2018080300000069".equals(VOUCHERNO)||"PZ2018071100000010".equals(VOUCHERNO)) {
sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.HANDLING_CHARGE_MONEY,LCCT.CLEAN_LEASE_MONEY,IFNULL(LCCT.CAUTION_MONEY,0)AS CAUTION_MONEY,LCCT.INSURANCE_PREMIUM,LCCT.PURCHASE_TAX,LCCT.INCIDENTAL,LCCT.GPS_FEE as GPS_FEE_FINANCE,LCCT.TABLEWARE_FEE,LRPT.INTEREST,LRPT.INTERESTNOTAX,LRPT.TAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CUSTOMER_NUM AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,lfit.ACC_NUMBER,LCCT.GPS_FEE_FINA FROM LC_CALC_CONDITION LCCT inner join (SELECT contract_id,FLOWUNID,min(ACC_NUMBER) ACC_NUMBER FROM lc_fund_income_temp WHERE fee_type='feetype10' GROUP BY contract_id,FLOWUNID) lfit on lfit.contract_id=lcct.contract_id LEFT JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LCCT.CONTRACT_ID LEFT JOIN (SELECT FLOWUNID,SUM(INTEREST) AS INTEREST,SUM(ROUND((INTEREST/1.16),2)) AS INTERESTNOTAX,SUM(INTEREST-ROUND((INTEREST/1.16),2)) AS TAX FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.FLOWUNID=LCCT.FLOWUNID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE lfit.FLOWUNID=:FLOWUNID";
}else {
sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.HANDLING_CHARGE_MONEY,LCCT.CLEAN_LEASE_MONEY,IFNULL(LCCT.CAUTION_MONEY,0)AS CAUTION_MONEY,LCCT.INSURANCE_PREMIUM,LCCT.PURCHASE_TAX,LCCT.INCIDENTAL,LCCT.GPS_FEE as GPS_FEE_FINANCE,LCCT.TABLEWARE_FEE,LRPT.INTEREST,LRPT.INTERESTNOTAX,LRPT.TAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CUSTOMER_NUM AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,lfit.ACC_NUMBER,LCCT.GPS_FEE_FINA FROM LC_CALC_CONDITION LCCT inner join (SELECT contract_id,FLOWUNID,min(ACC_NUMBER) ACC_NUMBER FROM lc_fund_income_temp WHERE fee_type='feetype10' GROUP BY contract_id,FLOWUNID) lfit on lfit.contract_id=lcct.contract_id LEFT JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LCCT.CONTRACT_ID LEFT JOIN (SELECT FLOWUNID,SUM(INTEREST) AS INTEREST,SUM(ROUND((INTEREST/1.06),2)) AS INTERESTNOTAX,SUM(INTEREST-ROUND((INTEREST/1.06),2)) AS TAX FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.FLOWUNID=LCCT.FLOWUNID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE lfit.FLOWUNID=:FLOWUNID";

View File

@ -301,7 +301,10 @@ public class CreateVoucherServiceImpl {
if("PZ2018071000000006".equals(VOUCHERNO) || "PZ2018080300000071".equals(VOUCHERNO) || "PZ2018071100000010".equals(VOUCHERNO) || "PZ2018080300000074".equals(VOUCHERNO)) {
subData.put("CUSTID",dataTemp.get("DISTRIBUTOR_ID"));//经销商id
subData.put("CUSTNAME",dataTemp.get("DISTRIBUTOR_NAME"));//经销商名称
}else if("PZ2018072100000037".equals(VOUCHERNO)||"PZ2018080400000091".equals(VOUCHERNO)){
}else if("PZ2018082600000149".equals(VOUCHERNO) || "PZ2018082600000150".equals(VOUCHERNO) || "PZ2018070900000003".equals(VOUCHERNO) || "PZ2018080200000065".equals(VOUCHERNO)) {
subData.put("CUSTID",dataTemp.get("DISTRIBUTOR_ID"));//¾­ÏúÉÌid
subData.put("CUSTNAME",dataTemp.get("DISTRIBUTOR_NAME"));//¾­ÏúÉÌÃû³Æ
}else if("PZ2018072100000037".equals(VOUCHERNO)||"PZ2018080400000091".equals(VOUCHERNO) || "PZ2018072100000038".equals(VOUCHERNO)||"PZ2018080400000092".equals(VOUCHERNO)){
subData.put("CUSTID","0203440110");//经销商id
subData.put("CUSTNAME","业务系统待查客户");//经销商名称
}else {
@ -313,7 +316,10 @@ public class CreateVoucherServiceImpl {
subData.put("F8",dataTemp.get("MONEY"));//贷方金额
subData.put("ENTRYDC", "-1");
//凭证信息像是经销商名称
if("PZ2018071000000006".equals(VOUCHERNO) || "PZ2018080300000071".equals(VOUCHERNO) || "PZ2018071100000010".equals(VOUCHERNO) || "PZ2018080300000074".equals(VOUCHERNO) || "PZ2018082600000149".equals(VOUCHERNO) || "PZ2018082600000150".equals(VOUCHERNO)) {
if("PZ2018071000000006".equals(VOUCHERNO) || "PZ2018080300000071".equals(VOUCHERNO) || "PZ2018071100000010".equals(VOUCHERNO) || "PZ2018080300000074".equals(VOUCHERNO)) {
subData.put("CUSTID",dataTemp.get("DISTRIBUTOR_ID"));//¾­ÏúÉÌid
subData.put("CUSTNAME",dataTemp.get("DISTRIBUTOR_NAME"));//¾­ÏúÉÌÃû³Æ
}else if("PZ2018070900000003".equals(VOUCHERNO) || "PZ2018080200000065".equals(VOUCHERNO)) {
subData.put("CUSTID",dataTemp.get("DISTRIBUTOR_ID"));//经销商id
subData.put("CUSTNAME",dataTemp.get("DISTRIBUTOR_NAME"));//经销商名称
}else if("PZ2018081600000120".equals(VOUCHERNO)){

View File

@ -140,7 +140,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService {
Element year = voucherHead.addElement("year");// 会计年度/非空
year.setText(ACC_YEAR);
Element pk_system = voucherHead.addElement("pk_system");// 来源系统/非空
pk_system.setText(own.getAttribute("OWN_NAME").getString());//----------------------------------------
pk_system.setText(own.getAttribute("OWN_NAME").getString()==null?"":own.getAttribute("OWN_NAME").getString());//----------------------------------------
Element voucherkind = voucherHead.addElement("voucherkind");// 凭证类型值/非空
voucherkind.setText("0");
Element pk_accountingbook = voucherHead.addElement("pk_accountingbook");// 核算核算账簿/非空
@ -817,9 +817,9 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService {
Element item1 = suplinkman.addElement("item");// 编码,最大长度为64,类型为:String
Element linkmanvo = item1.addElement("linkmanvo");
Element code2 = linkmanvo.addElement("code"); // 编码,最大长度为64,类型为:String
code2.setText("");
code2.setText(DISTRIBUTOR_CODING);
Element name2 = linkmanvo.addElement("name"); // 名称,最大长度为64,类型为:String
name2.setText("");
name2.setText(DISTRIBUTOR_NAME);
Element sex = linkmanvo.addElement("sex"); // 性别,最大长度为64,类型为:Integer
sex.setText("");
Element vjob2 = linkmanvo.addElement("vjob"); // 职位,最大长度为64,类型为:String
@ -839,7 +839,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService {
Element address = linkmanvo.addElement("address"); // 住址,最大长度为64,类型为:String
address.setText("");
Element postcode = linkmanvo.addElement("postcode"); // 邮编,最大长度为64,类型为:String
postcode.setText("");
postcode.setText(POSTCODE);
Element memo2 = linkmanvo.addElement("memo"); // 其它,最大长度为64,类型为:String
memo2.setText("");
Element pk_linkman = item1.addElement("pk_linkman");// 联系人,最大长度为20,类型为:String
@ -944,11 +944,11 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService {
Element shortname = billhead.addElement("shortname");// 简称,最大长度为200,类型为:String
shortname.setText(contract_name);
Element mnecode = billhead.addElement("mnecode");// 助记码,最大长度为50,类型为:String
mnecode.setText("助记码,最大长度为50,类型为:String");
mnecode.setText("");
Element pid = billhead.addElement("pid");// 上级档案,最大长度为20,类型为:String
pid.setText("上级档案,最大长度为20,类型为:String");
pid.setText("");
Element memo = billhead.addElement("memo");// 备注,最大长度为200,类型为:String
memo.setText("备注,最大长度为200,类型为:String");
memo.setText("");
}
String URL="D:\\voucher\\"+"APleasing_"+(i+1)+"_Defdoc_"+year_month_day+".xml";
file=new File(URL);

View File

@ -15,6 +15,7 @@ import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.ASResultSet;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
@ -182,7 +183,8 @@ public class EbankUse {
String SUMMARY = this.getSUMMARY();
// 执行确认收入时, 可核销金额转入非业务金额
String sql2 = "UPDATE LC_EBANK SET NOWITH_MONEY=(NOWITH_MONEY+MAYOPE_MONEY),MAYOPE_MONEY='0.00',SUMMARY=CONCAT_WS(',',SUMMARY,'"+ SUMMARY + "') WHERE ID='" + ID + "'";
Sqlca.executeSQL(sql2);
SqlObject sql3= new SqlObject(sql2);
Sqlca.executeSQL(sql3);
if (Sqlca != null) {
Sqlca.commit();
}