This commit is contained in:
58261 2018-09-26 10:02:17 +08:00
commit c072570f84
39 changed files with 937 additions and 296 deletions

View File

@ -1,6 +1,10 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@page import="com.tenwa.reckon.util.TbBeanTools"%>
<%@page import="com.tenwa.reckon.bean.TabCalBean"%>
<%@page import="com.amarsoft.are.jbo.BizObject"%>
<%@page import="com.amarsoft.are.jbo.JBOException"%>
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
<%@page import="jbo.prd.BUSINESS_TYPE"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
String flowunid=CurPage.getParameter("flowunid");//Á÷³Ì±àºÅ
BizObject flow=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT","flow_unid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
@ -19,6 +23,10 @@
String taskno=CurPage.getParameter("TaskNo");
String ishistory=CurPage.getParameter("IsHistory");
String nodeNo=CurPage.getParameter("NodeNo");
//判断是传统还是汽车业务
BizObject bo = JBOFactory.createBizObjectQuery(BUSINESS_TYPE.CLASS_NAME,"typeno=:productID")
.setParameter("productID", productId).getSingleResult(false);
String productType = (bo==null)?"":bo.getAttribute("attribute2").getString();
ASObjectModel doTemp = new ASObjectModel("LCFundPlanTemp");
doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'");
if(null!=ishistory&&ishistory.equals("true")){
@ -100,7 +108,14 @@
var param="FlowUnid=<%=flowunid%>&calType=<%=calType%>&plannumber=<%=plannumber%>&ProductId=<%=productId%>";
window.parent.parent.ischeck=false;
ischeck=false;
window.parent.parent.AsControl.OpenView("/Accounting/LoanSimulation/LoanBasicInfo.jsp",param, "_self");
var url="";
debugger;
if("<%=productType%>"=="car_product"){
url="/Accounting/LoanSimulation/LoanBasicInfo.jsp";
}else {
url="/Accounting/LoanSimulation/LoanBasicInfoBusiness.jsp";
}
window.parent.parent.AsControl.OpenView(url,param, "_self");
}
var ischeck=true;
function checkModified(){

View File

@ -706,8 +706,10 @@ function changeSettleMethod2(){
function changeRateType(){
var a={};
a["fixed"]={"fixed":1,"add":1};
a["base"]={"fixed":1,"add":1};
//a["fixed"]={"fixed":1,"add":1};
//a["base"]={"fixed":1,"add":1};
a["fixed"]={"fixed":1,"calculation":1,"add":1};
a["base"]={"fixed":1,"calculation":1,"add":1};
a["proportion"]={"fixed":1,"calculation":1,"add":1};
a["add"]={"fixed":1,"calculation":1,"add":1};

View File

@ -40,13 +40,19 @@
var docList="<%=docList%>";
myleft.width=1;
if("SingleRow"=="<%=type%>"){
if("FundPaymentCarFlow"=="<%=sFlowNo%>"||"BusinessApplyFlow"=="<%=sFlowNo%>"||"MortgageFileFlow"=="<%=sFlowNo%>"||"ProjectCreditFlow"=="<%=sFlowNo%>"||"ContractSupportFlow"=="<%=sFlowNo%>"||"ProjectRecreditFlow"=="<%=sFlowNo%>"||"ProjectSupportFlow"=="<%=sFlowNo%>"||"ProjectApprovalFlow"=="<%=sFlowNo%>"||"FundPaymentFlow"=="<%=sFlowNo%>"||"ProjectCancelFlow"=="<%=sFlowNo%>"){
if("FundPaymentCarFlow"=="<%=sFlowNo%>"||"BusinessApplyFlow"=="<%=sFlowNo%>"||"MortgageFileFlow"=="<%=sFlowNo%>"||"ContractSupportFlow"=="<%=sFlowNo%>"||"ProjectSupportFlow"=="<%=sFlowNo%>"||"ProjectApprovalFlow"=="<%=sFlowNo%>"||"FundPaymentFlow"=="<%=sFlowNo%>"||"ProjectCancelFlow"=="<%=sFlowNo%>"){
AsControl.OpenView("/Tenwa/Comm/DocList/PayDocList.jsp","docList="+docList,"right","");
}else if("ProjectCreditFlow"=="<%=sFlowNo%>"||"ContractApprovalFlow"=="<%=sFlowNo%>"||"ProjectRecreditFlow"=="<%=sFlowNo%>"){
AsControl.OpenView("/Tenwa/Comm/DocList/PayDocListTradition.jsp","docList="+docList,"right","");
}else{
AsControl.OpenView("/Tenwa/Comm/DocList/BussinessApproveDocList.jsp","docList="+docList,"right","");
}
}else{
AsControl.OpenView("/Tenwa/Comm/DocList/CustomerDocTab.jsp","docList="+docList,"right","");
if("ContractApprovalFlow"=="<%=sFlowNo%>"||"ContractChangeFlow"=="<%=sFlowNo%>"||"ProjectChangeFlow"=="<%=sFlowNo%>"){
AsControl.OpenView("/Tenwa/Comm/DocList/PayDocListTradition.jsp","docList="+docList,"right","");
}else{
AsControl.OpenView("/Tenwa/Comm/DocList/CustomerDocTab.jsp","docList="+docList,"right","");
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -41,7 +41,9 @@
if(s.length()>0){
s=s.substring(0, s.length()-1);
}
if("ProjectCreditFlow".equals(sObjectType)){
sTempletNo = "FlowPayDocList" ;
}
String compClientID = request.getParameter("CompClientID");
if("ProjectRecreditFlow".equals(sObjectType)){
sTempletNo = "FlowPayDocList" ;
@ -207,8 +209,8 @@ function upload(id){
var sUrl="/Tenwa/Comm/DocList/DocListInfoNew.jsp";
AsDialog.PopView(sUrl,param,"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
var str=RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","updateBussinessCheck","library_id="+id+",BussinessCheck=DocCheck_0");
//reloadSelf();
location.reload();
reloadSelf();
// location.reload();
heping();
},"ÉÏ´«¸½¼þ");
}

View File

@ -0,0 +1,227 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_simplelist.jspf"%>
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
<%
/*
Author: undefined 2016-09-01
Content:
History Log:
*/
String flowunid=CurPage.getParameter("FlowUnid");
String CustomerType=CurPage.getParameter("CustomerType");
String carAttributes=CurPage.getParameter("carAttributes");//获取车类型
if(flowunid==""||flowunid==null){
flowunid="flowunid";
}
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);//流程对象
String sObjectType = CurPage.getParameter("FlowNo");//流程类型
String ishistory=CurPage.getParameter("IsHistory");
String nodeNo=CurPage.getParameter("NodeNo");
String RightType= CurPage.getParameter("RightType");
String username=CurUser.getUserName();
String sTempletNo=CurPage.getParameter("TempletNo");
String phaseNo = CurPage.getParameter("PhaseNo");
String apply = CurPage.getParameter("ApplyType");
if(sTempletNo==null){
sTempletNo="FlowPayDocList";
}
String docClassItemno="013";
String[] itemnos=docClassItemno.split(",");
String s="";
for(int i=0;i<itemnos.length;i++){
s+="'"+itemnos[i]+"',";
}
if(s.length()>0){
s=s.substring(0, s.length()-1);
}
String compClientID = request.getParameter("CompClientID");
if("ProjectRecreditFlow".equals(sObjectType)){
sTempletNo = "FlowPayDocList" ;
}
Map<String,String> docParam=new HashMap<String,String>();
Map<String,String> other=new HashMap<String,String>();
other.put("carAttributes", carAttributes);
other.put("CustomerType", CustomerType);
docParam.put("ObjectType",sObjectType);
docParam.put("proj_id", flow.getAttribute("proj_id").getString());
docParam.put("contract_id", flow.getAttribute("contract_id").getString());
docParam.put("flow_unid", flowunid);
docParam.put("inputtime", StringFunction.getTodayNow());
docParam.put("inputuserid", CurPage.getUserId());
docParam.put("inputorgid", CurPage.getUser().getOrgID());
//判断是否存在,不存在就从配置表倒到临时表
DocListInitAction.initDocList(docParam,other,docClassItemno,CurConfig);
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
String otherWhere=DocListInitAction.getFlowWhere(flow,"","rela");
doTemp.appendJboWhere(otherWhere);
doTemp.appendJboWhere(" and O.doc_Class_Itemno in ("+s+")");
doTemp.setLockCount(2);
if("ContractSupportApply".equals(apply)&&"0010".equals(phaseNo)){
RightType = "false";
}
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
doTemp.setVisible("operation", false);
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "0";
dwTemp.setPageSize(500);
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "1";//只读模式
RightType="ReadOnly";
isShowButton=false;
}else{
isShowButton=true;
}
dwTemp.genHTMLObjectWindow(flowunid);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
sButtons=new String[][]{
{"true","","Button","保存","保存所有修改","saveRecord()","","","",""},
};
%>
<script type="text/javascript">
var rowSpan="One_Classify";
</script>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
window.onload=function(){
var RowCount = getRowCount(0);
for(var i=0;i<RowCount;i++){
if($("#INPUT_myiframe0_Doc_Nature_"+i+"_2").text()=="必备"){
$("#INPUT_myiframe0_Doc_Nature_"+i+"_2").attr("style","color:red");
}
}
heping();
$("#DWTD").width( document.body.offsetWidth - 10);
$("#DWTD").width( document.body.offsetHeight - 20);
document.getElementById('DWTD').innerHTML = '<div style="width:'+(document.body.offsetWidth - 10)+'px;height:'+(document.body.offsetHeight - 40)+'px;overflow: scroll;">'+document.getElementById('DWTD').innerHTML+'</div>';
}
function heping(){
$("#TR_Right_myiframe0_0").attr("class","color_zebra1");
huanhang("Doc_Name");
}
function huanhang(col){
var tab=document.getElementById("myiframe0");
var a= getColIndex(0,col);
for(var i=0;i<tab.rows.length-1;i++){
$("#INPUT_myiframe0_"+col+"_"+i+"_"+a).parent().attr("style","white-space: pre-wrap;");
}
}
function selectFile(){
objectinfo={};
objectinfo.title="附件一览"
AsControl.OpenTab("/Tenwa/Comm/Document/LBDocumentList.jsp","ObjectNo=20170427000001",objectinfo);
}
function saveRecord(){
as_save("myiframe0","heping()");
location.reload();
}
//在加载完表格后调用
function afterSearch(){
var sRightType="<%=RightType%>";
var sObjectType="<%=sObjectType%>";//该流程类型
var isReview="<%=CurPage.getParameter("isReview")%>";
var username="<%=username%>";
for(var i=0;i<getRowCount(0);i++){
if(getObj(0,i,"operation")!=null&&getObj(0,i,"operation")!="null"){
getObj(0,i,"operation").innerHTML='<a class="box" onclick="upload(\''+getItemValue(0,i,"id")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">上传</font></a>';
}
var filelist=getObj(0,i,"filelist").innerHTML;
var obj=eval('('+filelist+')');
var html="";
for(var file in obj){
html+='<a onclick=downloadFile(\''+obj[file]['id']+'\')><font color="blue">'+obj[file]['filename']+'</font></a>';
html+='【上传时间:'+obj[file]['inputtime']+'】';
html+='【上传人:'+obj[file]['inputuser']+'】';
// html+='【大小:'+Math.floor(obj[file]['FileSize']/1024*100)/100+'kb】<a class="btn_icon_detail" onclick="editOffice(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\',\''+sRightType+'\')">&nbsp;</a> ';
if(isReview!="true"&&sRightType!="ReadOnly"&&(sObjectType==obj[file]['objecttype'])&&username==obj[file]['inputuser']){
html+='<a class="btn_icon btn_icon_close" onclick="deleteFile(\''+obj[file]['id']+'\');">&nbsp;</a>';
}
if(obj[file]['image']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showImage(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
if(obj[file]['word']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showWord(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
if(obj[file]['pdf']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showPDF(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
html+='</br>';
}
getObj(0,i,"filelist").innerHTML=html;
getObj(0,i,"filelist").style["white-space"]="pre-wrap";
};
}
function showPDF(id,name){
var sUrl="/Tenwa/Comm/DocList/showPDF.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
function showWord(id,name){
var sUrl="/Tenwa/Comm/DocList/showWord.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
function showImage(id,name){
var sUrl="/Tenwa/Comm/DocList/showImage.jsp";
var param="attrid="+id;
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;",function(message){
},name);
}
function editOffice(id,filename){
var filetype=filename.substr(filename.indexOf(".")+1);
var status=2;
AsDialog.PopView("/Tenwa/Core/OfficeTemplate/OnlineOperation/online/editOfficeOnLine.jsp","filetype="+filetype+"&status="+status+"&id="+id+"&CompClientID=<%=compClientID%>","dialogWidth=1024px;dialogHeight=1000px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") {
return;
}else if(sPhaseInfo == "Success" || sPhaseInfo == "success"){
alert("提交成功!");
reloadSelf();
}else{
alert("提交失败!");
}
},"编辑文档");
}
function upload(id){
//saveRecord();
var param="Library_id="+id + "&ObjectType=<%=sObjectType%>";
var sUrl="/Tenwa/Comm/DocList/DocListInfoNew.jsp";
AsDialog.PopView(sUrl,param,"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
var str=RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","updateBussinessCheck","library_id="+id+",BussinessCheck=DocCheck_0");
reloadSelf();
// location.reload();
heping();
},"上传附件");
}
function downloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
}
function deleteFile(id){
var sParams="attId="+id+",BussinessCheck=DocCheck_2";
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","deleteAttr",sParams);
reloadSelf();
heping();
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,202 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_simplelist.jspf"%>
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
<%
/*
Author: undefined 2016-09-01
Content: 固定带出项目立项的资料清单列表页面如要根据流程动态生成资料请用DocListMain.jsp
History Log:
*/
String ProjectId=CurPage.getParameter("ProjectId");
String flowunid=CurPage.getParameter("FlowUnid");
String CustomerType=CurPage.getParameter("CustomerType");
String carAttributes=CurPage.getParameter("carAttributes");//获取车类型
if(flowunid==""||flowunid==null){
flowunid="flowunid";
}
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);//流程对象
String sObjectType = CurPage.getParameter("FlowNo");//流程类型
String ishistory=CurPage.getParameter("IsHistory");
String nodeNo=CurPage.getParameter("NodeNo");
String RightType= CurPage.getParameter("RightType");
String username=CurUser.getUserName();
String sTempletNo=CurPage.getParameter("TempletNo");
String phaseNo = CurPage.getParameter("PhaseNo");
String apply = CurPage.getParameter("ApplyType");
if(sTempletNo==null){
sTempletNo="FlowPayDocList";
}
String compClientID = request.getParameter("CompClientID");
if("ProjectRecreditFlow".equals(sObjectType)){
sTempletNo = "FlowPayDocList" ;
}
if("ProjectCreditFlow".equals(sObjectType)){
sTempletNo = "FlowPayDocList" ;
}
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.appendJboWhere(" and rela.proj_id = '"+ProjectId+"' and rela.objecttype = 'ProjectApprovalFlow' ");
doTemp.setLockCount(2);
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
doTemp.setVisible("operation", false);
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "0";
dwTemp.setPageSize(500);
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "1";//只读模式
RightType="ReadOnly";
isShowButton=false;
}else{
isShowButton=true;
}
dwTemp.genHTMLObjectWindow(flowunid);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
sButtons=new String[][]{
{"true","","Button","保存","保存所有修改","saveRecord()","","","",""},
};
%>
<script type="text/javascript">
var rowSpan="One_Classify";
</script>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
window.onload=function(){
var RowCount = getRowCount(0);
for(var i=0;i<RowCount;i++){
if($("#INPUT_myiframe0_Doc_Nature_"+i+"_2").text()=="必备"){
$("#INPUT_myiframe0_Doc_Nature_"+i+"_2").attr("style","color:red");
}
}
heping();
$("#DWTD").width( document.body.offsetWidth - 10);
$("#DWTD").width( document.body.offsetHeight - 20);
document.getElementById('DWTD').innerHTML = '<div style="width:'+(document.body.offsetWidth - 10)+'px;height:'+(document.body.offsetHeight - 40)+'px;overflow: scroll;">'+document.getElementById('DWTD').innerHTML+'</div>';
}
function heping(){
$("#TR_Right_myiframe0_0").attr("class","color_zebra1");
huanhang("Doc_Name");
}
function huanhang(col){
var tab=document.getElementById("myiframe0");
var a= getColIndex(0,col);
for(var i=0;i<tab.rows.length-1;i++){
$("#INPUT_myiframe0_"+col+"_"+i+"_"+a).parent().attr("style","white-space: pre-wrap;");
}
}
function selectFile(){
objectinfo={};
objectinfo.title="附件一览"
AsControl.OpenTab("/Tenwa/Comm/Document/LBDocumentList.jsp","ObjectNo=20170427000001",objectinfo);
}
function saveRecord(){
as_save("myiframe0","heping()");
location.reload();
}
//在加载完表格后调用
function afterSearch(){
var sRightType="<%=RightType%>";
var sObjectType="<%=sObjectType%>";//该流程类型
var isReview="<%=CurPage.getParameter("isReview")%>";
var username="<%=username%>";
for(var i=0;i<getRowCount(0);i++){
if(getObj(0,i,"operation")!=null&&getObj(0,i,"operation")!="null"){
getObj(0,i,"operation").innerHTML='<a class="box" onclick="upload(\''+getItemValue(0,i,"id")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">上传</font></a>';
}
var filelist=getObj(0,i,"filelist").innerHTML;
var obj=eval('('+filelist+')');
var html="";
for(var file in obj){
html+='<a onclick=downloadFile(\''+obj[file]['id']+'\')><font color="blue">'+obj[file]['filename']+'</font></a>';
html+='【上传时间:'+obj[file]['inputtime']+'】';
html+='【上传人:'+obj[file]['inputuser']+'】';
// html+='【大小:'+Math.floor(obj[file]['FileSize']/1024*100)/100+'kb】<a class="btn_icon_detail" onclick="editOffice(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\',\''+sRightType+'\')">&nbsp;</a> ';
if(isReview!="true"&&sRightType!="ReadOnly"&&(sObjectType==obj[file]['objecttype'])&&username==obj[file]['inputuser']){
html+='<a class="btn_icon btn_icon_close" onclick="deleteFile(\''+obj[file]['id']+'\');">&nbsp;</a>';
}
if(obj[file]['image']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showImage(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
if(obj[file]['word']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showWord(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
if(obj[file]['pdf']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showPDF(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
html+='</br>';
}
getObj(0,i,"filelist").innerHTML=html;
getObj(0,i,"filelist").style["white-space"]="pre-wrap";
};
}
function showPDF(id,name){
var sUrl="/Tenwa/Comm/DocList/showPDF.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
function showWord(id,name){
var sUrl="/Tenwa/Comm/DocList/showWord.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
function showImage(id,name){
var sUrl="/Tenwa/Comm/DocList/showImage.jsp";
var param="attrid="+id;
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;",function(message){
},name);
}
function editOffice(id,filename){
var filetype=filename.substr(filename.indexOf(".")+1);
var status=2;
AsDialog.PopView("/Tenwa/Core/OfficeTemplate/OnlineOperation/online/editOfficeOnLine.jsp","filetype="+filetype+"&status="+status+"&id="+id+"&CompClientID=<%=compClientID%>","dialogWidth=1024px;dialogHeight=1000px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") {
return;
}else if(sPhaseInfo == "Success" || sPhaseInfo == "success"){
alert("提交成功!");
reloadSelf();
}else{
alert("提交失败!");
}
},"编辑文档");
}
function upload(id){
//saveRecord();
var param="Library_id="+id + "&ObjectType=<%=sObjectType%>";
var sUrl="/Tenwa/Comm/DocList/DocListInfoNew.jsp";
AsDialog.PopView(sUrl,param,"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
var str=RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","updateBussinessCheck","library_id="+id+",BussinessCheck=DocCheck_0");
reloadSelf();
// location.reload();
heping();
},"上传附件");
}
function downloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
}
function deleteFile(id){
var sParams="attId="+id+",BussinessCheck=DocCheck_2";
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","deleteAttr",sParams);
reloadSelf();
heping();
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -173,7 +173,7 @@
return o.submit();
}
function CheckStr(str){
var s="jpg,jpeg,png,pdf,doc,docx,xls,xlsx";
var s="jpg,jpeg,png,pdf,doc,docx,xls,xlsx,rar,zip";
var flag="false";
var s2=s.split(",");
for(var i=0;i<s2.length;i++){

View File

@ -19,7 +19,6 @@
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
{"true","","Button","查询","查询","selectInvoice()","","","","",""},
{"true","","Button","批量下载","批量下载","lotdown()","","","","btn_icon_transfer",""},
{"true","","Button","打印发票","打印发票","printInvoice()","","","","",""},
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
@ -99,31 +98,7 @@
}
AsControl.OpenView(sUrl,'invoice_confirm_id=' +sPara ,'_self','');
}
function printInvoice(){
var sid = getItemValueArray(0,"sid");
if(typeof(sid) == "undefined" || sid.length == 0 )
{
alert("请选择查询数据!");
return;
}
//alert(sid);
var sids = "";
for(var i = 0;i < sid.length; i++){
sids += sid[i] +"@";
}
sids = sids.substr(0,sids.length-1);
//alert(sids);
spara = "sid="+sids+",CurUserID=<%=CurUser.getUserID()%>";
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.apzl.invoicemanager.rentplaninvoice.rentPlanInvoiceManager","printInvoice",spara);
alert(returnValue);
reloadSelf();
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -10,11 +10,11 @@
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
var customerid=sReturn[0];
var customername=sReturn[1];
var contract_id=sReturn[2];
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
sParams =sParams+",ProjectName=客户"+customername+"租后巡视,FlowKey="+customername+",CustomerId="+customerid;
sParams =sParams+",ProjectName=客户"+customername+"租后巡视,FlowKey="+customername+",CustomerId="+customerid+",ContractId="+contract_id;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.afterleasing.afterleasingvisit.AfterLeasingVisitStartAction","initFLow",sParams);
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return;
var sReturnInfos=sReturnInfo.split("@");

View File

@ -86,8 +86,8 @@
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%>
<%
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"},
{"true","All","Button","生成电子章","盖公司电子章","stamp()","","","",""},
{"true","All","Button","生成产权转移单","生成产权转移单","saveRecord()","","","","btn_icon_save"},
{"true","All","Button","公司盖章","盖公司电子章","stamp()","","","",""},
};
sButtonPosition = "north";
%>

View File

@ -78,7 +78,7 @@
return o.submit();
}
function CheckStr(str){
var s="jpg,jpeg,png,pdf,doc,docx,xls,xlsx,txt";
var s="jpg,jpeg,png,pdf,doc,docx,xls,xlsx,txt,rar,zip";
var flag="false";
var s2=s.split(",");
for(var i=0;i<s2.length;i++){

View File

@ -159,7 +159,7 @@
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
}
function upload(){
deleteFile();
// deleteFile();
var sparam="FlowUnid=<%=flowunid%>"+",ProjId=<%=projid%>"+",DocType=001,OneClassify=001003,DocName=尽职调查报告";
var library_id=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateContractOfficeAction","NewCreditLibraryId",sparam);

View File

@ -158,7 +158,7 @@
}
function upload(){
deleteFile();
// deleteFile();
var sparam="FlowUnid=<%=flowunid%>"+",ProjId=<%=projid%>"+",DocType=001,OneClassify=001003,DocName=风控报告";
var library_id=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateContractOfficeAction","NewCreditLibraryId",sparam);

View File

@ -5,7 +5,7 @@
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
function newApply()
{
AsDialog.OpenSelector("SelectPaymentForFiveGrade","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
AsDialog.OpenSelector("SelectPaymentForFiveGrade","businessType,1","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){
//alert(getHtmlMessage('1'));//请选择一条信息!
return;

View File

@ -0,0 +1,40 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Tenwa/Core/FlowManager/BaseFlowList/BaseFlowApplyListStart.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=自定义函数;]~*/%>
<script type="text/javascript">
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
function newApply()
{
AsDialog.OpenSelector("SelectPaymentForFiveGrade","businessType,2","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
var contract_id = sReturn[0];
var project_id = sReturn[1];
var product_id = sReturn[2];
var contract_number = sReturn[3];
var payment_number = sReturn[4];
var project_name= sReturn[5];
var customer_id = sReturn[6];
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
sParams =sParams+",ProductId="+product_id+",ProjectId="+project_id+",ContractId="+contract_id+",ProjectName="+project_name+",FlowKey="+payment_number+",PaymentNumber="+payment_number+",ContractNumber="+contract_number+",CustomerId="+customer_id;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams);
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return;
var sReturnInfos=sReturnInfo.split("@");
if(sReturnInfos[0]=="success")
{
var objectNo=sReturnInfos[1];
FlowFunction.openStartFlowPage(objectNo);
}
else
{
var mes=sReturnInfos[1];
alert(mes);
}
reloadSelf();
},"请选择投放");
}
</script>
<%@ include file="/Tenwa/Core/FlowManager/BaseFlowList/BaseFlowApplyListEnd.jspf"%>

View File

@ -35,9 +35,9 @@
})
function setCheckBoxEvent(){
if($("#DW_CheckAll_myiframe0")){
/* if($("#DW_CheckAll_myiframe0")){
$("#DW_CheckAll_myiframe0").hide();
}
} */
var checkInput = $("input[name='check_S_myiframe0']");
for(var i=0;i<checkInput.length;i++){
$(checkInput[i]).attr("onclick","checkInputData("+i+")");

View File

@ -73,6 +73,10 @@
setItemNoRequired(0,i,"ACCOUNT");
setItemNoRequired(0,i,"ACC_NUMBER");
}
if("" == getItemValue(0,i,"ACCOUNTING_DATE")){
var date = new Date().getFullYear()+"/"+(new Date().getMonth()+1)+"/"+new Date().getDate();
document.getElementById('INPUT_myiframe0_ACCOUNTING_DATE_'+i+'_6').value=date;
}
}
}
}

View File

@ -22,9 +22,9 @@
ado.setHtmlEvent("MEMO", "onmouseover", "showMemo");
ado.setHtmlEvent("MEMO", "onmouseout", "hideMemo");
ado.setHtmlEvent("MEMO", "onkeyup", "synchMemo");
if("0020".equals(phaseNo)){
/* if("0020".equals(phaseNo)){
ado.setRequired("ACCOUNTING_DATE", true);
}
} */
//ado.setHtmlEvent("FACT_MONEY", "onchange", "checkEquipAmtMoney");
dwTemp.genHTMLObjectWindow(flowunid);

View File

@ -29,7 +29,7 @@
dwTemp.Style = "1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1";
dwTemp.setPageSize(50);
// dwTemp.genHTMLObjectWindow(docname+","+contract_id);
dwTemp.genHTMLObjectWindow(flowunid);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
@ -120,7 +120,7 @@
tempParam["OBJECTTYPE"]="AdjustmentNotice";
tempParam["FLOW_UNID"]="<%=flowunid%>";
tempParam["PROJ_ID"]="<%=projid%>";
tempParam["contract_id"]="<%=contract_id%>";
tempParam["CONTRACT_ID"]=getItemValue(0,getRow(),"ID");
//生成模板固定参数
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
@ -131,10 +131,10 @@
if(sparam.length>0){sparam+=",";}
sparam+=key+"="+param[key];
}
// var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","plan_number="+plan_number+",plan_list="+plan_list);
// var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","Tdeletequtation","plan_number="+getItemValue(0,getRow(),"ID"));
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
//word转pdf
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","wordToPdfAnnex","FlowUnid=<%=flowunid%>,PLAN_LIST=AdjustmentNotice");
<%-- var id = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","wordToPdfAnnex","FlowUnid=<%=flowunid%>,PLAN_LIST=AdjustmentNotice"); --%>
reloadSelf();

File diff suppressed because one or more lines are too long

View File

@ -3754,5 +3754,27 @@
</managerProperties>
</manager>
</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="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"/>
<attribute name="UPDATEUSERID" label="UPDATEUSERID" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="UPDATEORGID" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="UPDATETIME" type="STRING" length="32"/>
<attribute name="invoice_type" label="invoice_type" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="li_invoice_print_result" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -117,7 +117,11 @@ public class CashFlowExecutor {
sql +=" select fundplan.plan_date,if(fundplan.pay_type='pay_type_in',fundplan.plan_money,0)flowin, ";
sql +=" if(fundplan.pay_type='pay_type_in',concat(tdd.itemname,':',format(fundplan.plan_money,2)),''), " ;
sql +=" if(fundplan.pay_type='pay_type_out',fundplan.plan_money,0)flowout, " ;
sql +=" if(fundplan.pay_type='pay_type_out',concat(tdd.itemname,':',format(fundplan.plan_money,2)),'')flowoutdetail, " ;
if("business_product".equals(tcb.getProductType())) {
sql +=" if(fundplan.pay_type='pay_type_out',concat(if(tdd.itemno = 'feetype10','É豸¿î',tdd.itemname),':',format(fundplan.plan_money,2)),'')flowoutdetail, " ;
} else {
sql +=" if(fundplan.pay_type='pay_type_out',concat(tdd.itemname,':',format(fundplan.plan_money,2)),'')flowoutdetail, " ;
}
sql +=" if(fundplan.pay_type='pay_type_in',fundplan.plan_money,-fundplan.plan_money) cleanfow " ;
sql +=" from "+Tools.getTable(tcb.getFundFundPlan_tb())+" fundplan " ;
sql +=" left join code_library tdd on fundplan.fee_type = tdd.itemno " ;
@ -143,7 +147,11 @@ public class CashFlowExecutor {
sql +=" select fundplan.plan_date,case when fundplan.pay_type='pay_type_in'then fundplan.plan_money else 0 end flowin, ";
sql +=" case when fundplan.pay_type='pay_type_in'then concat(concat(tdd.itemname,':'),to_char(fundplan.plan_money,'FM9,999,999,999,999,999,999,999,990.00')) else ''end, " ;
sql +=" case when fundplan.pay_type='pay_type_out'then fundplan.plan_money else 0 end flowout, " ;
sql +=" case when fundplan.pay_type='pay_type_out' then tdd.itemname||':'||to_char(fundplan.plan_money,'FM9,999,999,999,999,999,999,999,990.00') else ''end flowoutdetail, " ;
if("business_product".equals(tcb.getProductType())) {
sql +=" case when fundplan.pay_type='pay_type_out' then (case then tdd.itemno = 'feetype10' then 'É豸¿î' else tdd.itemname end) ||':'||to_char(fundplan.plan_money,'FM9,999,999,999,999,999,999,999,990.00') else ''end flowoutdetail, " ;
} else {
sql +=" case when fundplan.pay_type='pay_type_out' then tdd.itemname||':'||to_char(fundplan.plan_money,'FM9,999,999,999,999,999,999,999,990.00') else ''end flowoutdetail, " ;
}
sql +=" case when fundplan.pay_type='pay_type_in' then fundplan.plan_money else -fundplan.plan_money end cleanfow " ;
sql +=" from "+Tools.getTable(tcb.getFundFundPlan_tb())+" fundplan " ;
sql +=" left join code_library tdd on fundplan.fee_type = tdd.itemno " ;

View File

@ -156,11 +156,7 @@ public class FundFundPlanExecutor {
Map<String,String> cleanLeaseMoney = new HashMap<String,String>();
cleanLeaseMoney.put("CostType01", "pay_type_out");
cleanLeaseMoney.put("CostType02", "PaymentTime1");
if(!"business_product".equals(tcb.getProductType())) {
map.put("CLEAN_LEASE_MONEY", cleanLeaseMoney);
} else {
map.put("EQUIP_AMT", cleanLeaseMoney);
}
map.put("CLEAN_LEASE_MONEY", cleanLeaseMoney);
String custid="";
if("quoted_price".equals(tcb.getCalType())){
custid=tcb.getDocId();
@ -192,7 +188,15 @@ public class FundFundPlanExecutor {
}
//ȡֵ
BigDecimal temp =new BigDecimal(con.getAttribute(key).getDouble());
BigDecimal temp = null;
if("business_product".equals(tcb.getProductType())
&& "CLEAN_LEASE_MONEY".equals(key)) {
temp = new BigDecimal(con.getAttribute("EQUIP_AMT").getDouble());
} else {
temp = new BigDecimal(con.getAttribute(key).getDouble());
}
Item item = null;
for(Item it : items) {
if(key.equals(it.getRelativeCode())) {

View File

@ -23,6 +23,9 @@ import jbo.sys.USER_TASK_INFO;
import org.apache.commons.lang.StringUtils;
import com.amarsoft.amarscript.Any;
import com.amarsoft.amarscript.ELContext;
import com.amarsoft.amarscript.Expression;
import com.amarsoft.app.lc.util.DateAssistant;
import com.amarsoft.are.ARE;
import com.amarsoft.are.jbo.BizObject;
@ -492,6 +495,36 @@ public class FlowAction {
"select O.flowno,O.phaseno,O.objecttype,O.objectno,O.userid,O.orgid from O where serialNo=:serialNo ")
.setParameter("serialNo", taskNo).getSingleResult(false);
String objectNo = ft.getAttribute("objectno").getString();
BizObject boFBO = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME, tx)
.createQuery("flow_unid = '" + objectNo + "'").getSingleResult(false);
String fixedFlowParam = boFBO.getAttribute("FixedFlowParam").getString();
JSONObject jsonFixedFlowParam = JSONDecoder.decode(fixedFlowParam.replaceAll("@", ","));
Map<String, String> scriptMap = FileOperatorUtil.getJsonObjectToMap(jsonFixedFlowParam);
scriptMap.put("ObjectNo", objectNo);
BizObjectManager bm1 = JBOFactory.getFactory().getManager(FLOW_MODEL.CLASS_NAME);
BizObjectQuery bq1 = bm1
.createQuery(
"SELECT o.BACKSCRIPT FROM O where O.flowno=:flowno and O.phaseno='" + ft.getAttribute("phaseno").getString() + "'")
.setParameter("flowno", ft.getAttribute("flowno").getString());
BizObject stepConfig = bq1.getSingleResult(false);
String strScript = stepConfig.getAttribute("BACKSCRIPT").getString();
if (null != strScript && strScript.length() > 5) {
ELContext context = new ELContext();
context.setJBOTransaction(tx);
for (String key : scriptMap.keySet()) {
context.defineVarible("#" + key, scriptMap.get(key));
}
context.defineBean("flowBussinessObject", boFBO);
Any returnData = Expression.getExpressionValue(strScript, context);
}
//´¦ÀíÈÎÎñ³Ø
BizObjectManager utdbom = JBOFactory.getBizObjectManager(USER_TASK_DATA.CLASS_NAME, tx);
BizObjectManager utibom = JBOFactory.getBizObjectManager(USER_TASK_INFO.CLASS_NAME, tx);

View File

@ -1,5 +1,6 @@
package com.amarsoft.app.lc.workflow.action;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -613,7 +614,11 @@ public class GetFlowAction {
param.put("Assignfinish", bo.getAttribute("Assignfinish").getString());
param.put("AssignSubmittype", bo.getAttribute("Assignsubmittype").getString());
param.put("EndTime", bo.getAttribute("endtime").getString());
param.put("RoleId", curPage.getUser().hasRole("401")?"401":"");
String roleId = curPage.getUser().hasRole("401")?"401":"";//汽车业务申请
if("".equals(roleId)){//传统项目信审
roleId = curPage.getUser().hasRole("800R00000027")?"800R00000027":curPage.getUser().hasRole("800R00000035")?"800R00000035":"";
}
param.put("RoleId",roleId);
param.put("flowstate", bo.getAttribute("flowstate").getString());
return param;
}

View File

@ -289,4 +289,29 @@ public class ColRelativeInfo {
tx.commit();
return result == null ? "" : result;
}
public static String getRealFeeName(String feeType, String flowunid) throws Exception {
String returnString = "";
if("feetype10".equals(feeType)) {
JBOTransaction tx = null;
Transaction tran = null;
try {
tx = JBOFactory.createJBOTransaction();
tran = Transaction.createTransaction(tx);
String attr = tran.getString(new SqlObject("select b.attribute2 from flow_bussiness_object a,business_type b where a.productid = b.typeno and a.flow_unid = '" + flowunid + "'"));
if(attr != null && "business_product".equals(attr)) {
returnString = "É豸¿î";
}
} catch(Exception e) {
e.printStackTrace();
tx.rollback();
} finally {
if(tx != null) tx.commit();
}
} else {
returnString = CodeManager.getItemName("FeeType", feeType);
}
return returnString;
}
}

View File

@ -63,5 +63,29 @@ public class RentNotinyDeleteAction {
}
}
}
//¸ù¾Ýǰ̨²ÎÊýÉú³ÉÎĵµ
public void Tdeletequtation(JBOTransaction tx) throws Exception{
BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME);
BizObject DOCRELATIVE=bom.createQuery("CONTRACT_ID=:contractid and OBJECTTYPE='AdjustmentNotice' ").setParameter("contractid",plan_number).getSingleResult(false);
if(DOCRELATIVE!=null){
String DOCRELATIVEid=DOCRELATIVE.getAttribute("id").toString();
BizObjectManager bom1=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME);
String DOCLIBRARYid=bom1.createQuery("relative_id=:relative_id").setParameter("relative_id", DOCRELATIVEid).getSingleResult(false).getAttribute("id").toString();
BizObjectManager bom2=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCATTRIBUTE.CLASS_NAME);
String DOCATTRIBUTEid=bom2.createQuery("library_id=:library_id").setParameter("library_id", DOCLIBRARYid).getSingleResult(false).getAttribute("id").toString();
Map<String,String> condtion= new HashMap<String,String>();
condtion.put("id", DOCRELATIVEid);
DataOperatorUtil.deleteJBOByCondtion(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME, condtion, tx);
condtion.clear();
condtion.put("id", DOCLIBRARYid);
DataOperatorUtil.deleteJBOByCondtion(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME, condtion, tx);
condtion.clear();
condtion.put("id", DOCATTRIBUTEid);
DataOperatorUtil.deleteJBOByCondtion(jbo.app.tenwa.doc.LB_DOCATTRIBUTE.CLASS_NAME, condtion, tx);
}
}
}

View File

@ -0,0 +1,27 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMethodSettle;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherToBeforeOnhire;
/**
* 汽车类传统/传统--起租前生成财务凭证
* @author xiezhiwen
*/
public class ContractBeforeOnhireToVoucher extends BaseBussiness {
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String FlowUnid=this.getAttribute("FlowUnid").toString();
CreateVoucherToBeforeOnhire cvbo=new CreateVoucherToBeforeOnhire();
// 传统
cvbo.CreateVoucher(FlowUnid, "PZ2018092500000156","feetype2"); // 收到客户保证金--回租
cvbo.CreateVoucher(FlowUnid, "PZ2018092500000157","feetype1"); // 收到客户手续费--回租
cvbo.CreateVoucher(FlowUnid, "PZ2018092500000158","feetype5"); // 收到客户预付款(首付)--回租
// 汽车类传统
cvbo.CreateVoucher(FlowUnid, "PZ2018092500000192","feetype2"); // 收到客户记录保证金--回租
cvbo.CreateVoucher(FlowUnid, "PZ2018092500000193","feetype1"); // 收到客户手续费--回租
cvbo.CreateVoucher(FlowUnid, "PZ2018092500000194","feetype5"); // 收到客户预付款(首付)--回租
cvbo.CreateVoucher(FlowUnid, "PZ2018092500000195","feetype24");// 记录GPS安装服务费不参融--回租
return "true";
}
}

View File

@ -0,0 +1,152 @@
package com.tenwa.voucher.CreateVoucherProcess;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.voucher.LV_VOUCHER_CONFIG;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl;
public class CreateVoucherToBeforeOnhire extends BaseBussiness {
public String CreateVoucher(String FlowUnid, String VOUCHERNO, String FeeType) throws Exception {
Transaction Sqlca = null;
Map<String, String> map = new HashMap<String, String>();
Map<String, String> param = new HashMap<String, String>();
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
String MONEY = null;
String MONEYNOTAX = null;
String MONEYTAX = null;
String ACCOUNT_DATE = null;
String FACT_DATE = null;
String CONTRACT_ID = null;
String CONTRACT_NUMBER = null;
String PROJECT_NAME = null;
String leas_form = null;
String DISTRIBUTOR_ID = null;
String DISTRIBUTOR_NAME = null;
String CARID = null;
String CARMODEL = null;
String CUSTID = null;
String CUSTNAME = null;
String CUSTOMERTYPE = null;
String BUSINESSTYPE = null;
String ACC_NUM = null;
String tax_type="";
String sql = "";
param.clear();
map.put("FlowUnid", FlowUnid);
map.put("FEE_TYPE", FeeType);
String fee_type="";
if("feetype24".equals(fee_type)) {
tax_type="GPS";
}else {
tax_type="本金";
}
// 传统
if("PZ2018092500000156".equals(VOUCHERNO) || "PZ2018092500000157".equals(VOUCHERNO) || "PZ2018092500000158".equals(VOUCHERNO)) {
sql = "SELECT LFIT.FACT_MONEY AS MONEY,ROUND(LFIT.FACT_MONEY / getTax (LCI.LEAS_FORM,'"+tax_type+"',LCI.INPUTTIME),2) AS MONEYNOTAX,(LFIT.FACT_MONEY - ROUND(LFIT.FACT_MONEY / getTax (LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2)) AS MONEYTAX,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS FACT_DATE,LFIT.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 FROM LC_FUND_INCOME_TEMP LFIT LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID = LCI.ID 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 LEFT JOIN LC_CALC_CONDITION LCCT ON LCCT.CONTRACT_ID = LCI.ID WHERE LFIT.FEE_TYPE = :FEE_TYPE AND LCI.BUSINESSTYPE='2' AND LFIT.FLOWUNID = :FLOWUNID ";
}else {// 汽车类传统
sql = "SELECT LFIT.FACT_MONEY AS MONEY,ROUND(LFIT.FACT_MONEY / getTax (LCI.LEAS_FORM,'"+tax_type+"',LCI.INPUTTIME),2) AS MONEYNOTAX,(LFIT.FACT_MONEY - ROUND(LFIT.FACT_MONEY / getTax (LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2)) AS MONEYTAX,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS FACT_DATE,LFIT.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 FROM LC_FUND_INCOME_TEMP LFIT LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID = LCI.ID 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 LEFT JOIN LC_CALC_CONDITION LCCT ON LCCT.CONTRACT_ID = LCI.ID WHERE LFIT.FEE_TYPE = :FEE_TYPE AND LCI.BUSINESSTYPE='3' AND LFIT.FLOWUNID = :FLOWUNID ";
}
if("feetype24".equals(fee_type)) {
sql +=" AND LCCT.GPS_FEE_FINA='finatype01'";
}
// 查询sql, 将结果集封装到list集合中
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql(Sqlca, sql, map);
CreateVoucherServiceImpl vs = new CreateVoucherServiceImpl();
String VOUCHER_TYPE = "1";// 凭证分类 金蝶
String userid = "admin";
//遍历获取结果集, 将结果写入map中
for (int i = 0; i < dataList.size(); i++) {
MONEY = dataList.get(i).get("MONEY").toString();
if ("".equals(MONEY)||MONEY == null)MONEY = "0.00";
double mon = Double.parseDouble(MONEY);
// 判断有金额, 封装值到map中
if (Math.abs(mon) > 0) {
MONEYNOTAX = dataList.get(i).get("MONEYNOTAX").toString();
MONEYTAX = dataList.get(i).get("MONEYTAX").toString();
ACCOUNT_DATE = dataList.get(i).get("ACCOUNT_DATE").toString();
FACT_DATE = dataList.get(i).get("FACT_DATE").toString();
CONTRACT_ID = dataList.get(i).get("CONTRACT_ID").toString();
CONTRACT_NUMBER = dataList.get(i).get("CONTRACT_NUMBER").toString();
PROJECT_NAME = dataList.get(i).get("PROJECT_NAME").toString();
leas_form = dataList.get(i).get("LEAS_FORM").toString();
DISTRIBUTOR_ID = dataList.get(i).get("DISTRIBUTOR_ID");
DISTRIBUTOR_NAME = dataList.get(i).get("DISTRIBUTOR_NAME");
CARID = dataList.get(i).get("CARID");
CARMODEL = dataList.get(i).get("MODEL");
CUSTID = dataList.get(i).get("CUSTOMERID");
CUSTNAME = dataList.get(i).get("CUSTOMERNAME");
CUSTOMERTYPE = dataList.get(i).get("CUSTOMERTYPE");
BUSINESSTYPE = dataList.get(i).get("BUSINESSTYPE");
ACC_NUM = dataList.get(i).get("ACC_NUMBER");
param.put("FACT_MONEY", MONEY);
param.put("INTERESTNOTAX", MONEYNOTAX);
param.put("TAX", MONEYTAX);
param.put("ACCOUNT_DATE", ACCOUNT_DATE);
param.put("FACT_DATE", FACT_DATE);
param.put("CONTRACT_ID", CONTRACT_ID);
param.put("CONTRACT_NUMBER", CONTRACT_NUMBER);
param.put("PROJECT_NAME", PROJECT_NAME);
param.put("LEAS_FORM", leas_form);
param.put("DISTRIBUTOR_ID", DISTRIBUTOR_ID);
param.put("DISTRIBUTOR_NAME", DISTRIBUTOR_NAME);
param.put("CARID", CARID);
param.put("CARMODEL", CARMODEL);
param.put("CUSTID", CUSTID);
param.put("CUSTNAME", CUSTNAME);
param.put("CUSTOMERTYPE", CUSTOMERTYPE);
param.put("BUSINESSTYPE", BUSINESSTYPE);
param.put("ACC_NUMBER", ACC_NUM);
// 传统类型
if("2".equals(BUSINESSTYPE)){
// 融资租赁资产
param.put("LEASFORMASSET", "02/03/05/06");
// 部门,业务二部
param.put("DEPT", "02");
// 传统融资租赁收入
param.put("LEASINCOMEFORM", "06");
}else if("3".equals(BUSINESSTYPE)){
// 融资租赁资产
param.put("LEASFORMASSET", "04");
// 部门,业务二部
param.put("DEPT", "02");
// 汽车类传统融资租赁收入
param.put("LEASINCOMEFORM", "05");
}
// param.put("FUNDTYPE", ""); // 主营类型
param.put("BUSINESSTYPE", "06");
param.put("FlowUnid", FlowUnid);
map.clear();
map.put("PROJ_TYPE", leas_form);
map.put("VOUCHER_NO", VOUCHERNO);
// 根据map中的参数, 查询LV_VOUCHER_CONFIG表数据
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(), leas_form, VOUCHER_TYPE, userid, param,Sqlca);
}
}
}
if (Sqlca != null) {
Sqlca.commit();
}
String sMessage = "true";
return sMessage;
}
}

View File

@ -314,6 +314,12 @@ public class CreateVoucherServiceImpl {
}else if("PZ2018072100000037".equals(VOUCHERNO)||"PZ2018080400000091".equals(VOUCHERNO) || "PZ2018072100000038".equals(VOUCHERNO)||"PZ2018080400000092".equals(VOUCHERNO)){
subData.put("CUSTID","APZL00000000DC");//经销商id
subData.put("CUSTNAME","业务系统待查客户");//经销商名称
}else if("PZ2018092500000192".equals(VOUCHERNO)||"PZ2018092500000193".equals(VOUCHERNO) || "PZ2018092500000194".equals(VOUCHERNO)||"PZ2018092500000195".equals(VOUCHERNO)){
subData.put("CUSTID","APZL00000000DC");//经销商id
subData.put("CUSTNAME","业务系统待查客户");//经销商名称
}else if("PZ2018092500000156".equals(VOUCHERNO)||"PZ2018092500000157".equals(VOUCHERNO) || "PZ2018092500000158".equals(VOUCHERNO)){
subData.put("CUSTID","APZL00000000DC");//经销商id
subData.put("CUSTNAME","业务系统待查客户");//经销商名称
}else {
subData.put("CUSTID",dataTemp.get("CUSTID"));//客商id
subData.put("CUSTNAME",dataTemp.get("CUSTNAME"));//客商名称

View File

@ -32,7 +32,7 @@ public class InvoiceRequest {
private String url ="" ;
private String appId="" ;
private String fplxdm="026";
private String fplxdm="";
public InvoiceRequest(String fplxdm) {
this.fplxdm = fplxdm;
@ -63,7 +63,7 @@ public class InvoiceRequest {
InvoiceRequestBody body = new InvoiceRequestBody();
InvoiceRequestInput input = new InvoiceRequestInput();
input.setFplxdm(this.fplxdm);
input.setFplxdm(confirmBizObject.getAttribute("fplxdm").toString());
input.setKplx("0");
input.setTspz("00");
input.setXhdwdzdh(confirmBizObject.getAttribute("xhdwdzdh").toString());

View File

@ -125,6 +125,45 @@ public class FlowBussionAction extends CommonAction {
Any returnData = Expression.getExpressionValue(strScript, context);
}
}
public void executeFlowBackScript(JBOTransaction tx,
BizObject flowBussinessObject) throws Exception {
Item item = CodeManager.getItem("ApplyType", this.getApplyType());
String flowno = item.getAttribute2();
Map<String, String> scriptMap = new HashMap<String, String>();
scriptMap.put("ObjectNo", flowBussinessObject.getAttribute("flow_unid")
.getString());
scriptMap.put("UserID", this.getAsUser().getUserID());
scriptMap.put("UserName", this.getAsUser().getUserName());
scriptMap.put("OrgID", this.getAsUser().getOrgID());
scriptMap.put("OrgName", this.getAsUser().getOrgName());
scriptMap.put("FlowUnid", flowBussinessObject.getAttribute("flow_unid").getString());
scriptMap.put("FlowNo", flowno);
scriptMap.put("FlowName", this.getFlowName());
scriptMap.put("FlowKey", this.getFlowKey());
scriptMap.put("custname",this.getCustname());
Transaction Sqlca = null;
BizObjectManager bm1 = null;
BizObjectQuery bq1 = null;
bm1 = JBOFactory.getFactory().getManager(FLOW_MODEL.CLASS_NAME);
bq1 = bm1
.createQuery(
"SELECT o.PRESCRIPT FROM O where O.flowno=:flowno")
.setParameter("flowno", flowno);
BizObject stepConfig = bq1.getSingleResult(true);
String strScript = stepConfig.getAttribute("PRESCRIPT").getString();
if (null != strScript && strScript.length() > 5) {
ELContext context = new ELContext();
context.setJBOTransaction(tx);
for (String key : scriptMap.keySet()) {
context.defineVarible("#" + key, scriptMap.get(key));
}
context.defineBean("flowBussinessObject", flowBussinessObject);
Any returnData = Expression.getExpressionValue(strScript, context);
}
}
public void initFlowInfo() throws Exception{
BizObjectManager code = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME);
BizObjectManager cataLog = JBOFactory.getBizObjectManager(FLOW_CATALOG.CLASS_NAME);

View File

@ -871,228 +871,5 @@ public class rentPlanInvoiceManager extends BaseTable {
System.out.println("[FAIL]=>>>" + result.getMsg());
}
}
/**
* 打印发票
* @return
*/
public String printInvoice(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[] sids = this.getSid().split("@");
String sid = "";
String fpdm = "";
String fphm = "";
String invoice_confirm_id = "";
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);
fpdm = invoiceResult.getAttribute("fpdm").toString();
fphm = invoiceResult.getAttribute("fphm").toString();
} catch (JBOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
InvoiceRequestBase invoiceRequestBase = new InvoiceRequestBase();
InvoiceRequestHead invoiceRequestHead = new InvoiceRequestHead();
InvoiceRequestBody invoiceRequestBody = new InvoiceRequestBody();
InvoiceRequestInput invoiceRequestInput = new InvoiceRequestInput();
invoiceRequestHead.setAppid(appId);
invoiceRequestHead.setSid(sid);
invoiceRequestInput.setFplxdm("007");
invoiceRequestInput.setFpdm(fpdm);
invoiceRequestInput.setFphm(fphm);
invoiceRequestInput.setDylx("9");
invoiceRequestInput.setDyfs("1");
invoiceRequestInput.setDyjmc("");
invoiceRequestBody.setYylxdm("1");
invoiceRequestBody.setInput(invoiceRequestInput);
invoiceRequestBase.setHead(invoiceRequestHead);
invoiceRequestBase.setBody(invoiceRequestBody);
invoiceRequestBase.setComment("发票打印");
invoiceRequestBase.setId("FPDY");
invoiceRequestBase.setVersion("1.0");
String xml = JaxbUtil.convertToXml(invoiceRequestBase);
System.out.println(xml);
ResultPojo result = doPost(xml);
// 根据sid拿到LI_INVOICE_CONFIRM表的id(租金发票表的id和此表id都保存在LI_INVOICE_CONFIRM_Detail表中)
BizObjectManager confirmManager;
try {
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();
} catch (JBOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String id = UUID.randomUUID().toString().replaceAll("-", "");
if (result.getCode() == 0) {
InvoiceRequestBase responseBase = (InvoiceRequestBase) result.getData();
String returncode = responseBase.getBody().getReturncode();
String returnmsg = responseBase.getBody().getReturnmsg();
/*InvoiceRequestGroup invoiceRequestGroup = new InvoiceRequestGroup();
List<InvoiceRequestGroup> invoiceRequestGroupList = responseBase.getBody().getOutput().getDyfpfs().getGroupList();
for (InvoiceRequestGroup invoiceRequestGroup2 : invoiceRequestGroupList) {
fpdm =invoiceRequestGroup2.getFpdm().toString();
fphm = invoiceRequestGroup2.getFphm();
}*/
/*String pdfurl = "";
String localFile = "";
String path = "";
String localF = "";
BizObjectManager confirmResultManager = JBOFactory.getBizObjectManager(LI_INVOICE_RESULT.CLASS_NAME);
BizObject confirmResult = confirmResultManager
.createQuery("sid=:sid").setParameter("sid", sid)
.getSingleResult(false);
if (confirmResult != null) {
localF = confirmResult.getAttribute("localFile").toString();
}*/
/*if ("0".equals(returncode)) {
pdfurl = responseBase.getBody().getPdfurl();
if (confirmResult == null || "".equals(localF)
|| localF == null) {
SimpleDateFormat dateFormat = new SimpleDateFormat(
"YYYYMMdd");
String ydm = dateFormat.format(new Date());
path = File.separator + ydm.substring(0, 4)
+ File.separator + ydm.substring(4, 6)
+ File.separator + ydm.substring(6, 8);
path = path
+ File.separator
+ PasswordGenerateUtil
.getRandom(
50,
PasswordGenerateUtil.TYPE.LETTER_CAPITAL)
+ ".pdf";
localFile = INVOICE_LOCAL_PATH + path;
try {
DownloadPdfUtil.go(pdfurl, localFile);
path = SecurityUtil.encrypt(path, "invoice");
} catch (Exception e) {
e.printStackTrace();
return "下载PDF失败";
}
}
}*/
/*
if (confirmResult == null) {
BizObject confirmResultNew = confirmResultManager
.newObject();
confirmResultNew.setAttributeValue("ID", id);
confirmResultNew.setAttributeValue("sid", sid);
confirmResultNew.setAttributeValue("fplxdm", fplxdm);
confirmResultNew.setAttributeValue("fpdm", fpdm);
confirmResultNew.setAttributeValue("fphm", fphm);
confirmResultNew.setAttributeValue("kprq", kprq);
confirmResultNew.setAttributeValue("hjje", hjje);
confirmResultNew.setAttributeValue("skm", skm);
confirmResultNew.setAttributeValue("jym", jym);
confirmResultNew.setAttributeValue("pdfurl", pdfurl);
confirmResultNew.setAttributeValue("localFile", path);
confirmResultNew
.setAttributeValue("returncode", returncode);
confirmResultNew.setAttributeValue("returnmsg", returnmsg);
confirmResultManager.saveObject(confirmResultNew);
} else {
String slocalFile = confirmResult.getAttribute("localFile")
.toString();
if ("".equals(slocalFile)) {
confirmResultManager
.createQuery(
"update o set fplxdm=:fplxdm,fpdm=:fpdm,fphm=:fphm,kprq=:kprq,hjje=:hjje,skm=:skm,jym=:jym,pdfurl=:pdfurl,localFile=:localFile,returncode=:returncode,returnmsg=:returnmsg where sid=:sid ")
.setParameter("sid", sid)
.setParameter("fplxdm", fplxdm)
.setParameter("fpdm", fpdm)
.setParameter("fphm", fphm)
.setParameter("kprq", kprq)
.setParameter("hjje", hjje)
.setParameter("skm", skm)
.setParameter("jym", jym)
.setParameter("returncode", returncode)
.setParameter("returnmsg", returnmsg)
.setParameter("pdfurl", pdfurl)
.setParameter("localFile", path)
.executeUpdate();
} else {
confirmResultManager
.createQuery(
"update o set fplxdm=:fplxdm,fpdm=:fpdm,fphm=:fphm,kprq=:kprq,hjje=:hjje,skm=:skm,jym=:jym,returncode=:returncode,returnmsg=:returnmsg where sid=:sid ")
.setParameter("sid", sid)
.setParameter("fplxdm", fplxdm)
.setParameter("fpdm", fpdm)
.setParameter("fphm", fphm)
.setParameter("kprq", kprq)
.setParameter("hjje", hjje)
.setParameter("skm", skm)
.setParameter("jym", jym)
.setParameter("returncode", returncode)
.setParameter("returnmsg", returnmsg)
.executeUpdate();
}
}*/
System.out.println("[OK][returncode]=>>>" + returncode);
System.out.println("[OK][returnmsg]=>>>" + returnmsg);
if ("0".equals(returncode)) {
// System.out.println("[OK][SUCCESS]");
// 修改租金发票信息表的状态
BizObjectManager confirmDetailManager;
try {
confirmDetailManager = JBOFactory.getBizObjectManager(LI_INVOICE_CONFIRM_DETAIL.CLASS_NAME);
BizObject confirmDetail = confirmDetailManager
.createQuery(
"invoice_confirm_id=:invoice_confirm_id")
.setParameter("invoice_confirm_id",
invoice_confirm_id).getSingleResult(false);
String invoiceId = confirmDetail.getAttribute("invoice_id").toString();
BizObjectManager invoiceRentManager = JBOFactory.getBizObjectManager(LI_RENT_INVOICE_INFO.CLASS_NAME, tx);
invoiceRentManager.createQuery("update o set INVOICE_STATUS=:invoicestatus where ID=:id ")
.setParameter("id", invoiceId)
.setParameter("invoicestatus", "5").executeUpdate();
// return "开票申请成功";
} catch (JBOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
return returnmsg;
}
} else {
System.out.println("[FAIL]=>>>" + result.getMsg());
return result.getMsg();
}
}
return "打印成功!";
}
}

View File

@ -0,0 +1,45 @@
package com.tenwa.flow.fund.flowpayment;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.com.tenwa.lease.comm.LB_REPLY_IMPLEMENT_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.dict.als.cache.CodeCache;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.template.check.DefaultBussinessCheck;
/**
* 检查付款申请批复落实情况
*
*/
public class ReplyWorkableObjectCheck extends DefaultBussinessCheck {
@Override
public Object run(Transaction Sqlca) throws Exception {
String flowunid=this.getAttribute("ObjectNo").toString();
List<BizObject> bos = JBOFactory.getBizObjectManager(LB_REPLY_IMPLEMENT_TEMP.CLASS_NAME).createQuery("flowunid=:flowunid")
.setParameter("flowunid", flowunid).getResultList(false);
int mun = 0;
for (BizObject bo : bos) {
if("implement_condition02".equals(bo.getAttribute("REPLY_IMPLEMENT").getString())){
mun++;
}
}
if(bos.size()==0){
putMsg("没有批复落实项");
setPass(true);
}else if(bos.size() == mun){
putMsg("批复已落实!");
setPass(true);
}else{
putMsg("批复未落实!");
setPass(false);
}
return null;
}
}

View File

@ -17,7 +17,7 @@ import com.tenwa.flow.baseBussion.BaseBussiness;
public class DeleteDiscountOccupy extends BaseBussiness {
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
//this.initBussinessParam(Sqlca);
String projectId=this.getAttribute("ProjectId").toString();
BizObjectManager ldoManage = JBOFactory.getBizObjectManager(LB_DISCOUNT_OCCUPY.CLASS_NAME,Sqlca);
BizObject ldo = ldoManage.createQuery("project_id=:projectid").setParameter("projectid", projectId).getSingleResult(true);

View File

@ -27,6 +27,7 @@ public class InsertDiscountOccupy extends BaseBussiness {
String curUserID=this.getAttribute("CurUserID").toString();
String flowUnid=this.getAttribute("FlowUnid").toString();
String productId=this.getAttribute("ProductId").toString();
String projectId=this.getAttribute("ProjectId").toString();
Map<String, String> discount = ProductParamUtil.getProductComponentAllParameters(productId, "PRD0315", "DISCOUNT");
if(!discount.isEmpty() && !"".equals(discount.get("DISCOUNT_ALL")) && !"".equals(discount.get("CostType08"))) {
synchronized (this) {
@ -37,7 +38,7 @@ public class InsertDiscountOccupy extends BaseBussiness {
if("0".equals(result)) {
ASUser user = ASUser.getUser(curUserID, tran);
tran.executeSQL(new SqlObject("insert into lb_discount_occupy(id, product_id, flowunid, project_id, discount, inputuserid, inputorgid, inputtime) "
+ " values (replace(uuid(),'-',''), '" + productId + "', '" + flowUnid + "', '" + uuid.replaceAll("-", "") + "',"
+ " values (replace(uuid(),'-',''), '" + productId + "', '" + flowUnid + "', '" + projectId + "',"
+ " " + discountValue + ", '" + curUserID + "', '" + user.getOrgID() + "', replace(now(),'-','/'))"));
} else {
throw new BusinessException("²úÆ·¶î¶ÈÒÑÓÃÍê");