Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into zhouzebei
This commit is contained in:
commit
b1357298c3
@ -15,6 +15,7 @@
|
||||
String ProductId = CurPage.getParameter("ProductId");
|
||||
String sRightType= CurPage.getParameter("RightType");
|
||||
String taskno = CurPage.getParameter("TaskNo");
|
||||
String flowNo = CurPage.getParameter("FlowNo");
|
||||
String settleMethod="";
|
||||
String rentOrRate="";
|
||||
BizObject condition=null;
|
||||
@ -76,8 +77,13 @@
|
||||
dwTemp.setAttr("spanWidth","107");
|
||||
dwTemp.genHTMLObjectWindow(flowunid);
|
||||
String compClientID = request.getParameter("CompClientID");
|
||||
|
||||
dwTemp.replaceColumn("pay_condition", "<iframe type='iframe' id='pay_condition' name=\"pay_condition\" width=\"100%\" height=\"500px\" frameborder=\"0\" src=\""+sWebRootPath+"/Accounting/LoanSimulation_change/LoanBasicInfo.jsp?CompClientID="+compClientID+"&flowunid="+flowunid+"&plannumber="+plannumber+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+sRightType+"&calType="+calType+"&TaskNo="+taskno+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
String url="";
|
||||
if("ContractOnhireCarChangeFlow".equals(flowNo)){
|
||||
url="/Accounting/LoanSimulation_change/LoanBasicInfo.jsp";
|
||||
}else{
|
||||
url="/Accounting/LoanSimulation_change/LoanBasicInfoBusiness.jsp";
|
||||
}
|
||||
dwTemp.replaceColumn("pay_condition", "<iframe type='iframe' id='pay_condition' name=\"pay_condition\" width=\"100%\" height=\"500px\" frameborder=\"0\" src=\""+sWebRootPath+url+"?CompClientID="+compClientID+"&flowunid="+flowunid+"&plannumber="+plannumber+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+sRightType+"&calType="+calType+"&TaskNo="+taskno+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
String sButtons[][] = {
|
||||
{"true","","Button","租金变更","租金变更","saveRecord()","","","","btn_icon_rentchange"},
|
||||
{"true","","Button","变更撤销","变更撤销","cancelChange()","","","","btn_icon_delete"}
|
||||
@ -120,10 +126,10 @@ $(function(){
|
||||
//保存数据
|
||||
function saveRecord(sPostEvents)
|
||||
{
|
||||
if(!cheackFinalPayment()){
|
||||
/* if(!cheackFinalPayment()){
|
||||
AsDebug.alert("提示","只有尾款的的项目并且大于还租次数才能展期变更!");
|
||||
return;
|
||||
}
|
||||
} */
|
||||
//检查是否进行过变更
|
||||
as_save("myiframe0","run()");
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -28,12 +28,12 @@
|
||||
String sButtons[][] =null;
|
||||
|
||||
sButtons=new String[][] {
|
||||
{"false","","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"false","","Button","修改","修改","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"false","","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
|
||||
{"false","","Button","更新现金流","更新现金流","updateFlow()","","","","btn_icon_detail",""},
|
||||
{"false","","Button","导入租金计划","导入租金计划","importRentPlan()","","","","btn_icon_detail",""},
|
||||
{"false","","Button","模板下载","模板下载","downloadTemplate()","","","","btn_icon_set",""},
|
||||
{"true","","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
|
||||
{"true","","Button","更新现金流","更新现金流","updateFlow()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","导入租金计划","导入租金计划","importRentPlan()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","模板下载","模板下载","downloadTemplate()","","","","btn_icon_set",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-09-27
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("InvoicePrintResultList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.MultiSelect = true; //多选
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
//{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","打印","打印","print()","","","","",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function print(){
|
||||
var newSid = getItemValueArray(0,"new_sid");
|
||||
if(typeof(newSid) == "undefined" || newSid.length == 0 )
|
||||
{
|
||||
alert("请选择打印数据!");
|
||||
return;
|
||||
}
|
||||
alert(newSid);
|
||||
|
||||
var newSids = "";
|
||||
for(var i = 0;i < newSid.length; i++){
|
||||
|
||||
newSids += newSid[i] +"@";
|
||||
|
||||
}
|
||||
|
||||
newSids = newSids.substr(0,newSids.length-1);
|
||||
//alert(newSids);
|
||||
spara = "newSids="+newSids+",CurUserID=<%=CurUser.getUserID()%>";
|
||||
|
||||
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.apzl.invoicemanager.rentplaninvoice.rentPlanInvoiceDirectManager","print",spara);
|
||||
|
||||
alert(returnValue);
|
||||
reloadSelf();
|
||||
}
|
||||
|
||||
function newRecord(){
|
||||
var sUrl = "";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "";
|
||||
var sPara = getItemValue(0,getRow(0),'SerialNo');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'SerialNo=' +sPara ,'_self','');
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -18,8 +18,8 @@
|
||||
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","查询","查询","selectInvoice()","","","","",""},
|
||||
{"true","","Button","打印发票","打印发票","printInvoice()","","","","",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
{"true","","Button","发票打印申请","发票打印申请","printInvoice()","","","","",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -3756,11 +3756,13 @@
|
||||
</class>
|
||||
<class name="LI_INVOICE_PRINT_RESULT" label="" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="fpdm" label="发票代码" type="STRING" length="8"/>
|
||||
<attribute name="fphm" label="发票号码" type="STRING" length="12"/>
|
||||
<attribute name="returncode" label="返回代码" type="STRING" length="50"/>
|
||||
<attribute name="returnmsg" label="返回信息" type="STRING" length="11"/>
|
||||
<attribute name="ID" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="ghdwmc" label="购货单位名称" type="STRING" length="32"/>
|
||||
<attribute name="new_sid" label="新sid" type="STRING" length="100"/>
|
||||
<attribute name="fpdm" label="发票代码" type="STRING" length="10"/>
|
||||
<attribute name="fphm" label="发票号码" type="STRING" length="8"/>
|
||||
<attribute name="returncode" label="返回代码" type="STRING" length="8"/>
|
||||
<attribute name="returnmsg" label="返回信息" type="STRING" length="256"/>
|
||||
<attribute name="INPUTUSERID" label="INPUTUSERID" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORGID" label="INPUTORGID" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="INPUTTIME" type="STRING" length="32"/>
|
||||
|
||||
@ -25,6 +25,7 @@ import jbo.app.tenwa.calc.LC_RENT_INCOME;
|
||||
import jbo.app.tenwa.calc.LC_RENT_PLAN;
|
||||
import jbo.app.tenwa.calc.LI_INVOICE_CONFIRM;
|
||||
import jbo.app.tenwa.calc.LI_INVOICE_CONFIRM_DETAIL;
|
||||
import jbo.app.tenwa.calc.LI_INVOICE_PRINT_RESULT;
|
||||
import jbo.app.tenwa.calc.LI_INVOICE_RESULT;
|
||||
import jbo.app.tenwa.calc.VI_INVOICE_RENT_INCOME_CONFIRM;
|
||||
import jbo.app.tenwa.calc.VI_INVOICE_RENT_PLAN_CONFIRM;
|
||||
@ -69,7 +70,15 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
private String ids;
|
||||
private String moneyTypes;
|
||||
private String sid;
|
||||
private String newSids;
|
||||
|
||||
|
||||
public String getNewSids() {
|
||||
return newSids;
|
||||
}
|
||||
public void setNewSids(String newSids) {
|
||||
this.newSids = newSids;
|
||||
}
|
||||
public String getPlanIds() {
|
||||
return planIds;
|
||||
}
|
||||
@ -317,8 +326,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
confirmDetailBizObject.setAttributeValue("slbs", "");
|
||||
confirmDetailBizObject.setAttributeValue("zzstsgl", "");
|
||||
|
||||
confirmDetailBizObject = this
|
||||
.initTabeUserInfo(confirmDetailBizObject);
|
||||
confirmDetailBizObject = this.initTabeUserInfo(confirmDetailBizObject);
|
||||
confirmDetailManager.saveObject(confirmDetailBizObject);
|
||||
|
||||
confirmDetailList.add(confirmDetailBizObject);
|
||||
@ -388,7 +396,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
PasswordGenerateUtil.getRandom(64,
|
||||
PasswordGenerateUtil.TYPE.LETTER_CAPITAL));
|
||||
confirmBizObject.setAttributeValue("yylxdm", "1");
|
||||
confirmBizObject.setAttributeValue("fplxdm", "007");
|
||||
confirmBizObject.setAttributeValue("fplxdm", "004");
|
||||
confirmBizObject.setAttributeValue("kplx", "0");
|
||||
confirmBizObject.setAttributeValue("tspz", "00");
|
||||
confirmBizObject.setAttributeValue("xhdwdzdh", xhdwdzdh);
|
||||
@ -425,8 +433,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
|
||||
InvoiceRequest invoiceRequest = new InvoiceRequest();
|
||||
|
||||
ResultPojo result = invoiceRequest.send(confirmBizObject,
|
||||
confirmDetailList);
|
||||
ResultPojo result = invoiceRequest.send(confirmBizObject,confirmDetailList);
|
||||
if (result.getCode() == 0) {
|
||||
InvoiceRequestBase responseBase = (InvoiceRequestBase) result.getData();
|
||||
String returncode = responseBase.getBody().getReturncode();
|
||||
@ -438,18 +445,9 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
System.out.println("[OK][SUCCESS]");
|
||||
for (BizObject confirmDetailBizObject : confirmDetailList) {
|
||||
String invoiceId = confirmDetailBizObject.getAttribute("invoice_id").toString();
|
||||
// String invoice_type =
|
||||
// confirmDetailBizObject.getAttribute("invoice_type").toString();
|
||||
/**
|
||||
*
|
||||
invoiceRentManager.createQuery(
|
||||
* "update o set INVOICE_STATUS=:invoicestatus where ID=:id "
|
||||
* ).setParameter("id",invoiceId).setParameter(
|
||||
* "invoicestatus","3").executeUpdate();
|
||||
*/
|
||||
|
||||
invoiceRentManager.createQuery("update o set INVOICE_STATUS=:invoicestatus where ID=:id ")
|
||||
.setParameter("id",invoiceId).setParameter("invoicestatus","3").executeUpdate();
|
||||
}
|
||||
// return "开票申请成功";
|
||||
} else {
|
||||
return returnmsg;
|
||||
}
|
||||
@ -463,7 +461,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
}
|
||||
// ===================================================
|
||||
}
|
||||
return "开票成功";
|
||||
return "开票确认成功";
|
||||
}
|
||||
/**
|
||||
* 退回申请开票
|
||||
@ -750,7 +748,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 打印发票
|
||||
* 直租租金打印发票申请
|
||||
* @return
|
||||
*/
|
||||
public String printInvoice(JBOTransaction tx){
|
||||
@ -768,13 +766,16 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
String sid = "";
|
||||
String fpdm = "";
|
||||
String fphm = "";
|
||||
String newSid ="";
|
||||
String invoice_confirm_id = "";
|
||||
String ghdwmc = "";
|
||||
for (int i = 0; i < sids.length; i++) {
|
||||
sid = sids[i];
|
||||
|
||||
BizObject invoiceResult;
|
||||
try {
|
||||
invoiceResult = JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LI_INVOICE_RESULT", "sid=:sid").setParameter("sid", sid).getSingleResult(false);
|
||||
|
||||
if(invoiceResult==null){
|
||||
return "请选择已查询的发票!";
|
||||
}else{
|
||||
@ -785,7 +786,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
newSid = PasswordGenerateUtil.getRandom(64,PasswordGenerateUtil.TYPE.LETTER_CAPITAL);
|
||||
|
||||
InvoiceRequestBase invoiceRequestBase = new InvoiceRequestBase();
|
||||
InvoiceRequestHead invoiceRequestHead = new InvoiceRequestHead();
|
||||
@ -793,9 +794,9 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
InvoiceRequestInput invoiceRequestInput = new InvoiceRequestInput();
|
||||
|
||||
invoiceRequestHead.setAppid(appId);
|
||||
invoiceRequestHead.setSid(PasswordGenerateUtil.getRandom(64,PasswordGenerateUtil.TYPE.LETTER_CAPITAL));
|
||||
invoiceRequestHead.setSid(newSid);
|
||||
|
||||
invoiceRequestInput.setFplxdm("007");
|
||||
invoiceRequestInput.setFplxdm("004");
|
||||
invoiceRequestInput.setFpdm(fpdm);
|
||||
invoiceRequestInput.setFphm(fphm);
|
||||
invoiceRequestInput.setDylx("9");
|
||||
@ -820,6 +821,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
confirmManager = JBOFactory.getBizObjectManager(LI_INVOICE_CONFIRM.CLASS_NAME);
|
||||
BizObject confirm = confirmManager.createQuery("sid=:sid").setParameter("sid", sid).getSingleResult(false);
|
||||
invoice_confirm_id = confirm.getAttribute("id").toString();
|
||||
ghdwmc = confirm.getAttribute("ghdwmc").toString();//购货单位名称
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -833,10 +835,27 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
System.out.println("[OK][returncode]=>>>" + returncode);
|
||||
System.out.println("[OK][returnmsg]=>>>" + returnmsg);
|
||||
if ("0".equals(returncode)) {
|
||||
// System.out.println("[OK][SUCCESS]");
|
||||
// 修改租金发票信息表的状态
|
||||
BizObjectManager confirmDetailManager;
|
||||
BizObjectManager invoicePrintResultManager;
|
||||
try {
|
||||
//发票打印请求成功,将数据插入到li_invoice_print_result
|
||||
invoicePrintResultManager = JBOFactory.getBizObjectManager(LI_INVOICE_PRINT_RESULT.CLASS_NAME, tx);
|
||||
BizObject invoicePrintResult = invoicePrintResultManager.newObject();
|
||||
invoicePrintResult.setAttributeValue("ID", id);
|
||||
invoicePrintResult.setAttributeValue("fpdm", fpdm);
|
||||
invoicePrintResult.setAttributeValue("fphm", fphm);
|
||||
invoicePrintResult.setAttributeValue("ghdwmc", ghdwmc);
|
||||
invoicePrintResult.setAttributeValue("new_sid", newSid);
|
||||
try {
|
||||
invoicePrintResult = this.initTabeUserInfo(invoicePrintResult);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
invoicePrintResultManager.saveObject(invoicePrintResult);
|
||||
|
||||
|
||||
//获取li_rent_invoice_info的id并修改其状态
|
||||
confirmDetailManager = JBOFactory.getBizObjectManager(LI_INVOICE_CONFIRM_DETAIL.CLASS_NAME);
|
||||
BizObject confirmDetail = confirmDetailManager.createQuery("invoice_confirm_id=:invoice_confirm_id")
|
||||
@ -848,9 +867,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
.setParameter("id", invoiceId)
|
||||
.setParameter("invoicestatus", "5").executeUpdate();
|
||||
|
||||
// return "开票申请成功";
|
||||
} catch (JBOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
@ -863,5 +880,72 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
|
||||
}
|
||||
return "打印请求成功!";
|
||||
}
|
||||
|
||||
public String print(JBOTransaction tx){
|
||||
Configure config = Configure.getInstance();
|
||||
String appId = "";
|
||||
try {
|
||||
//获取配置文件中appid
|
||||
appId = config.getConfigure("INVOICE_APPID");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "a3web->[INVOICE_LOCAL_PATH]不存在";
|
||||
}
|
||||
|
||||
String[] newSids = this.newSids.split("@");
|
||||
String newSid ="";
|
||||
//String invoice_confirm_id = "";
|
||||
//循环遍历选中的sid
|
||||
for (int i = 0; i < newSids.length; i++) {
|
||||
newSid = newSids[i];
|
||||
//拼xml
|
||||
InvoiceRequestBase invoiceRequestBase = new InvoiceRequestBase();
|
||||
InvoiceRequestHead invoiceRequestHead = new InvoiceRequestHead();
|
||||
|
||||
invoiceRequestHead.setAppid(appId);
|
||||
invoiceRequestHead.setSid(newSid);
|
||||
|
||||
invoiceRequestBase.setHead(invoiceRequestHead);
|
||||
invoiceRequestBase.setComment("查询结果");
|
||||
invoiceRequestBase.setId("CXJG");
|
||||
invoiceRequestBase.setVersion("1.0");
|
||||
|
||||
String xml = JaxbUtil.convertToXml(invoiceRequestBase);
|
||||
System.out.println(xml);
|
||||
ResultPojo result = doPostPrint(xml);
|
||||
|
||||
//获取返回的xml结果
|
||||
if (result.getCode() == 0) {
|
||||
InvoiceRequestBase responseBase = (InvoiceRequestBase) result.getData();
|
||||
String returncode = responseBase.getBody().getReturncode();
|
||||
String returnmsg = responseBase.getBody().getReturnmsg();
|
||||
|
||||
System.out.println("[OK][returncode]=>>>" + returncode);
|
||||
System.out.println("[OK][returnmsg]=>>>" + returnmsg);
|
||||
if ("0".equals(returncode)) {
|
||||
BizObjectManager invoicePrintResultManager;
|
||||
try {
|
||||
//发票打印请求成功,更新数据插入到li_invoice_print_result
|
||||
invoicePrintResultManager = JBOFactory.getBizObjectManager(LI_INVOICE_PRINT_RESULT.CLASS_NAME, tx);
|
||||
|
||||
invoicePrintResultManager.createQuery("update O set returncode=:returncode,returnmsg=:returnmsg where new_sid=:new_sid")
|
||||
.setParameter("returncode", returncode).setParameter("returnmsg", returnmsg)
|
||||
.setParameter("new_sid", newSid).executeUpdate();
|
||||
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
return returnmsg;
|
||||
}
|
||||
} else {
|
||||
System.out.println("[FAIL]=>>>" + result.getMsg());
|
||||
return result.getMsg();
|
||||
}
|
||||
}
|
||||
return "打印成功!";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user