Merge branch 'develop' of git@git2.tenwa.com.cn:ApzlDev/apzl_leasing.git into yexuan

This commit is contained in:
yexuan 2018-08-06 11:19:53 +08:00
commit 98ba8a505c
111 changed files with 2185 additions and 459 deletions

View File

@ -13,7 +13,7 @@
<%@page import="com.amarsoft.are.jbo.BizObject"%>
<%@page import="com.amarsoft.are.jbo.JBOException"%>
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
<%@page import="jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
<%
@ -25,6 +25,8 @@
String nodeNo=CurPage.getParameter("NodeNo");
String RightType= CurPage.getParameter("RightType");
String calType = CurPage.getParameter("calType");
String carAttributes = CurPage.getParameter("carAttributes");
String projectId=CurPage.getParameter("ProjectId");
//判断是否为汽车业务
boolean isCarProduct = "004".equals(productId) ? false : true;
/*获取参数*/
@ -96,6 +98,7 @@
doTemp.setHtmlEvent("DEFAULTDUEDAY", "onchange", "changeLeaseAmtDate");
doTemp.setHtmlEvent("FIRST_PLAN_DATE", "onchange", "changeFistPlanDate");//第一期计划日期
doTemp.setHtmlEvent("CORPUS_RATIO", "onchange", "changeCorpusRatio");//期限内本金比例
doTemp.setHtmlEvent("EQUIP_AMT", "onchange", "changgeCompare");//车价
/*设置字段事件*/
/*设置模板属性*/
@ -132,12 +135,10 @@
Parameter p=new Parameter("plannumber",plannumber);
Vector<Parameter> v=CurPage.parameterList;
v.add(p);
/*设置页面属性*/
if(CurUser.hasRole("401")){
doTemp.setVisible("CAUTION_MONEY_METHOD",false);
}
/*设置页面属性*/
boolean flag=CurUser.hasRole("401");
if(CurUser.hasRole("401")){
doTemp.setVisible("CAUTION_MONEY_METHOD",false);
doTemp.setVisible("DISCOUNT", false);
// doTemp.setColumnAttribute("DISCOUNT","colvisible","0");
}
@ -171,7 +172,11 @@
//获取产品名称
BizObject bo = JBOFactory.createBizObjectQuery(BUSINESS_TYPE.CLASS_NAME,"typeno=:productID")
.setParameter("productID", productId).getSingleResult(false);
String productName = bo.getAttribute("typename").getString();
String productName = (bo==null)?"":bo.getAttribute("typename").getString();
//获取对应车辆指导价
BizObject bo1 = JBOFactory.createBizObjectQuery(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME,"PROJECT_ID=:projectId")
.setParameter("projectId",projectId).getSingleResult(false);
String nowTotal = (bo1==null)?"":bo1.getAttribute("NOW_TOTAL").getString();
String sButtons[][] = {
//{"true","All","Button","重置","重置","reloadSelf()","","","",""},
{"true","","Button","租金测算","租金测算","saveRecord()","","","","btn_icon_save"},
@ -185,6 +190,7 @@ var incomeNumberYear;
var adjustType;
var count = 0;
$(function(){
changgeCompare();
var productName="<%=productName%>";
setItemValue(0,0,"PRODUCT_NAME",productName);
//document.getElementById('div_my0').innerHTML = '<div style="width:1160px;overflow: scroll;">'+document.getElementById('div_my0').innerHTML+'</div>';
@ -220,6 +226,17 @@ $(function(){
}
getRatioByMoney(getObj(0, "EQUIP_AMT"));
});
function changgeCompare(){
debugger;
var nowTotal=Number("<%=nowTotal%>");
var equipAmt=Number(getItemValue(0, 0, "EQUIP_AMT"));
var flag="<%=flag%>";
if(equipAmt>nowTotal){
$("#EQUIP_AMT").css("color","red");
}else{
$("#EQUIP_AMT").css("color","none");
}
}
function isFina(){
var fundRules=calcRules["fund"];
for(var key in fundRules){

View File

@ -15,8 +15,8 @@
String orgid = CurUser.getOrgID();
String sTabStrip[][] = {
{"true", "×â½ð¼Æ»®", "/Accounting/LoanSimulation/RentPlanList.jsp",params, "", "", "false"},
{"8009012002".equals(orgid)?"true":"false", "资金计划", "/Accounting/LoanSimulation/FundPlanList.jsp",params, "", "", "false"},
{"8009012002".equals(orgid)?"true":"false", "现金流", "/Accounting/LoanSimulation/CashFlowList.jsp",params, "", "", "false"},
{"8009012002,8009001".indexOf(orgid)>-1?"true":"false", "资金计划", "/Accounting/LoanSimulation/FundPlanList.jsp",params, "", "", "false"},
{"8009012002,8009001".indexOf(orgid)>-1?"true":"false", "现金流", "/Accounting/LoanSimulation/CashFlowList.jsp",params, "", "", "false"},
};
%>
<%@ include file="/Resources/CodeParts/Tab01.jsp"%>

View File

@ -120,6 +120,10 @@ $(function(){
//保存数据
function saveRecord(sPostEvents)
{
if(!cheackFinalPayment()){
AsDebug.alert("提示","只有尾款的的项目并且大于还租次数才能展期变更!");
return;
}
//检查是否进行过变更
as_save("myiframe0","run()");
@ -130,7 +134,17 @@ function saveRecord(sPostEvents)
alert('请先撤销变更,再进行变更操作!!!');
} --%>
}
function cheackFinalPayment(){
var finalPayment=pay_condition.getItemValue(0,0,"FINAL_PAYMENT");
var incomeNumber=pay_condition.getItemValue(0,0,"INCOME_NUMBER");
var adjustList=getItemValue(0,0,"ADJUST_LIST");
var startList=getItemValue(0,0,"START_LIST");
if(parseFloat(finalPayment)>0&&parseFloat(adjustList)>parseFloat(incomeNumber)&&parseFloat(startList)==parseFloat(incomeNumber)){
return true;
}else{
return false;
}
}
function cancelChange(){
openDWDialog();
setTimeout(function(){

View File

@ -80,9 +80,9 @@ $(function(){
});
function initYearRate(){
var adjustList = parent.getItemValue(0,getRow(),"ADJUST_LIST");
var adjustList = parent.getItemValue(0,getRow(),"START_LIST");
if(!adjustList){
parent.setItemValue(0,0,"ADJUST_LIST",getItemValue(0,0,"INCOME_NUMBER"));
parent.setItemValue(0,0,"START_LIST",getItemValue(0,0,"INCOME_NUMBER"));
}
var yearRate_adjust = parent.getItemValue(0,getRow(),"YEAR_RATE");
if(!yearRate_adjust){

View File

@ -263,21 +263,20 @@
}
function doQuery(){
if(analyseterm.report_chosen.length == 0){
if($("select[name='report_chosen']")[0].length == 0){
alert("请选择要新增的主菜单!");
return;
}
var vReturn = "";
var vReportCount = analyseterm.report_chosen.length;
var vReportCount = $("select[name='report_chosen']")[0].length;
for(var i=0; i<vReportCount;i++){
var vTemp = analyseterm.report_chosen.options[i].value;
var vTemp = $("select[name='report_chosen']")[0].options[i].value;
vReturn = vReturn+vTemp+"@";
}
var sReturn = RunJavaMethodTrans("com.amarsoft.app.awe.config.role.action.ManageRoleMenuRela","addRoleMenus","RoleID=<%=sRoleID%>,RelaValues="+vReturn);
if(sReturn == "SUCCEEDED"){
alert("菜单授权成功!");
top.close();
}else{
alert("菜单授权失败!");
}
@ -285,18 +284,18 @@
}
function doDefault(){
analyseterm.report_available.options.length = 0;
analyseterm.report_chosen.length = 0;
$("select[name='report_available']")[0].options.length = 0;
$("select[name='report_chosen']")[0].length = 0;
var j = 0;
for(var i = 0; i < availableReportNameList.length; i++){
eval("analyseterm.report_available.options[" + j + "] = new Option(availableReportCaptionList[" + i + "], availableReportNameList[" + i + "])");
$("select[name='report_available']")[0].options[j] = new Option(availableReportCaptionList[i], availableReportNameList[i]);
j++;
}
j = 0;
for(var i = 0; i < selectedReportNameList.length; i++){
eval("analyseterm.report_chosen.options[" + j + "] = new Option(selectedReportCaptionList[" + i + "], selectedReportNameList[" + i + "])");
$("select[name='report_chosen']")[0].options[i] = new Option(selectedReportCaptionList[j], selectedReportNameList[j]);
j++;
}
}

View File

@ -85,7 +85,10 @@
var applyType = "<%=applyType%>";
var phasename = "<%=phasename%>";
var userID = "<%=userID%>";
$(function(){initRouteInfo();});
$(function(){
initRouteInfo();
if($("input:radio[value='1000']"))$("input:radio[value='1000']").attr("checked",true);
});
function initRouteInfo(){
//一般路由和条件路由初始化
if(routeJson.routeType=="commroute"||routeJson.routeType=="conditionroute"){
@ -112,6 +115,7 @@
actionSet.empty().show();
initFlowUserInfo(routeJson.route[0].phaseNo,0);
}
initReaderList();
}
//并行路由初始化
if(routeJson.routeType=="parallelroute"){

View File

@ -8,7 +8,7 @@
String sFlowUnid = CurPage.getParameter("FlowUnid");
String sPrevUrl = CurPage.getParameter("id");
String rightType = CurPage.getParameter("rightType");
String rightType = CurPage.getParameter("RightType");
String rightTypeS = CurPage.getParameter("distributor_id");
String DistributorNo = CurPage.getParameter("DistributorNo");
@ -36,7 +36,7 @@
String acc = Sqlca.getString("select acc_number from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1");
String acco = Sqlca.getString("select account from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1");
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
dwTemp.genHTMLObjectWindow(sFlowUnid);
dwTemp.getDataObject().setVisible("CAUTION_MONEY", true);
String sButtons[][] = {
{"ReadOnly".equals(rightType)?"false":"true","","Button","±£´æ","±£´æËùÓÐÐÞ¸Ä","save(0)","","","",""},

View File

@ -11,7 +11,7 @@ var AsDebug = {
showWindow:function() {
var d = top.dialog({
id: 'as-debug-dialog',
title: '调试工具栏['+AsDebug.getURL()+"]",
title: '<EFBFBD><EFBFBD><EFBFBD>Թ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>['+AsDebug.getURL()+"]",
onclose: function () {
AsDebug.removeWindow();
},
@ -27,8 +27,8 @@ var AsDebug = {
html+="</td></tr><tr><td>";
//html+="<span class='pageversion' ondblclick='javascript:AsDebug.displayPageName();'>"+AsDebug.getPage()+" </span>";
html+="<span class='pageversion'>"+AsDebug.getPage()+" </span>";
//html+="<span class='pageversion' ondblclick='javascript:AsDebug.displayURL();'>【"+AsDebug.getURL()+"】</span>";
html+="<span class='pageversion'>【"+AsDebug.getURL()+"】</span>";
//html+="<span class='pageversion' ondblclick='javascript:AsDebug.displayURL();'><EFBFBD><EFBFBD>"+AsDebug.getURL()+"<22><></span>";
html+="<span class='pageversion'><EFBFBD><EFBFBD>"+AsDebug.getURL()+"<22><></span>";
html+="</td></tr></table>";
d.content(html);
d.showModal();
@ -46,8 +46,8 @@ var AsDebug = {
width:width?width:"350px",
height:height?height:"50px",
skin:"ui-popup-show",
title: "" == title?"提示":title,
okValue: '确定',
title: "" == title?"<EFBFBD><EFBFBD>ʾ":title,
okValue: 'ȷ<EFBFBD><EFBFBD>',
ok:function(){
AsDebug.removeMessage();
},
@ -65,7 +65,7 @@ var AsDebug = {
width:width?width:"350px",
height:height?height:"40px",
skin:"ui-popup-show",
title: "" == title?"提示":title,
title: "" == title?"<EFBFBD><EFBFBD>ʾ":title,
onclose: function(){
AsDebug.removeMessage();
},
@ -105,28 +105,34 @@ var AsDebug = {
reloadAREService:function(serviceId){
if (typeof(serviceId) == "undefined" || serviceId.length == 0) serviceId = "JBO";
var sReturn = RunJavaMethod("com.amarsoft.app.util.ReloadServiceAction","reloadService","ServiceId="+serviceId);
if(sReturn=="SUCCESS") alert(getMessageText("AWES0017")); // 重载ARE服务成功
else alert(getMessageText("AWES0018")); // 重载ARE服务失败
if(sReturn=="SUCCESS") alert(getMessageText("AWES0017")); // <20><><EFBFBD><EFBFBD>ARE<52><45><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>
else alert(getMessageText("AWES0018")); // <20><><EFBFBD><EFBFBD>ARE<52><45><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>
},
reloadAppCalculation:function(){
if (typeof(serviceId) == "undefined" || serviceId.length == 0) serviceId = "JBO";
var sReturn = RunJavaMethod("com.amarsoft.app.util.ReloadCalculationToolAction","cleanCalculationToolData","");
if(sReturn=="SUCCESS") alert("CLEAN Calculation Tool SUCCESS");
else alert("CLEAN Calculation Tool FAIL");
},
reloadCacheAll:function(){
var sReturn = RunJavaMethod("com.amarsoft.app.util.ReloadCacheConfigAction","reloadCacheAll","");
if(sReturn=="SUCCESS") alert(getMessageText("AWES0015")); // 重载参数缓存成功!
else alert(getMessageText("AWES0016")); // 重载参数缓存失败!
if(sReturn=="SUCCESS") alert(getMessageText("AWES0015")); // <EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>
else alert(getMessageText("AWES0016")); // <EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>
},
reloadCache:function(CacheType){
var sReturn = RunJavaMethod("com.amarsoft.app.util.ReloadCacheConfigAction","reloadCache","ConfigName="+CacheType);
if(sReturn=="SUCCESS") alert(getMessageText("AWES0019")); // 刷新参数缓存成功!
else alert(getMessageText("AWES0020")); // 刷新参数缓存失败!
if(sReturn=="SUCCESS") alert(getMessageText("AWES0019")); // ˢ<EFBFBD>²<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>
else alert(getMessageText("AWES0020")); // ˢ<EFBFBD>²<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>
},
reloadFixSkins:function(){
var sReturn = AsControl.RunJsp("/AppConfig/ControlCenter/ReloadSkin.jsp","ReloadType=FixSkins");
if(sReturn=="SUCCESS") alert(getMessageText("AWES0021")); // 重载定制皮肤成功!
else alert(getMessageText("AWES0022")); // 重载定制皮肤失败!
if(sReturn=="SUCCESS") alert(getMessageText("AWES0021")); // <EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>
else alert(getMessageText("AWES0022")); // <EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>
},
reloadConfigFile:function(){
var sReturn = AsControl.RunJsp("/AppConfig/ControlCenter/ClearConfigFileCache.jsp","","");
if(sReturn=="SUCCESS") alert(getMessageText("AWES0023")); // 重载配置文件成功!
else alert(getMessageText("AWES0024")); // 重载配置文件失败!
if(sReturn=="SUCCESS") alert(getMessageText("AWES0023")); // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>
else alert(getMessageText("AWES0024")); // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>
},
openControlCenter:function() {
this.removeWindow();
@ -136,7 +142,7 @@ var AsDebug = {
var d = dialog({
height:400,
width:800,
title: '页面运行代码['+AsDebug.getURL()+"]",
title: 'ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>['+AsDebug.getURL()+"]",
content: '<textarea id=\"testSource\" style=\"width: 100%; height: 100%;\"></textarea>',
onshow: function () {
$("#testSource").text(oBody.ownerDocument.documentElement.innerHTML);
@ -191,7 +197,7 @@ var AsDebug = {
/**
*
* @param event
* @returns {Boolean} true 触发了某些事件 false 没触发事件
* @returns {Boolean} true <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ijЩ<EFBFBD>¼<EFBFBD> false û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
*/
function keydownAction(event){
if(event.altKey && event.keyCode == 49){ //alt+1
@ -207,15 +213,18 @@ function keydownAction(event){
}else if(event.altKey && event.keyCode == 52){ //alt+4
AsDebug.reloadAREService();
return true;
}else if(event.altKey && event.keyCode == 67){ //alt+c
AsDebug.reloadAppCalculation();
return true;
}else if(event.keyCode == "27"){ //esc
AsDebug.removeWindow();
return true;
}else if(event.keyCode==113 && window.as_defaultExport){//F2导出excel
as_defaultExport("F2导出");
}else if(event.keyCode==113 && window.as_defaultExport){//F2<EFBFBD><EFBFBD><EFBFBD><EFBFBD>excel
as_defaultExport("F2<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
return true;
}else if(event.keyCode==8){ // backspace
var target = $(event.target);
// 可以取到值、为可编辑的表单、不为按钮/下拉选择/勾选/只读等允许使用backspace键
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>Ϊ<EFBFBD>ɱ༭<EFBFBD>ı?<3F><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ť/<2F><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>/<2F><>ѡ<><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>backspace<63><65>
return !!target.val() && target.is(":input:enabled") && !target.is(":button,:selected,:checked,[readonly]");
}
}

View File

@ -178,7 +178,10 @@ var AsButton = {
try{
fun();
}finally{
btn.removeClass('unable');
var b = this + "";
if(b != "undefined") {
btn.removeClass('unable');
}
}
}
};

View File

@ -24,14 +24,14 @@
}
if("N".equals(isProduct)){
doc = "'004','004001'";
doTemp.setDefaultValue("DOC_TYPE", "004");
doTemp.setDefaultValue("ONE_CLASSIFY", "004");
doTemp.setDefaultValue("DOC_NAME", "004");
// doTemp.setDefaultValue("DOC_TYPE", "004");
// doTemp.setDefaultValue("ONE_CLASSIFY", "004");
// doTemp.setDefaultValue("DOC_NAME", "004");
/* doTemp.setReadOnly("ONE_CLASSIFY", true);
doTemp.setReadOnly("DOC_NAME", true); */
}
doTemp.setHtmlEvent("DOC_TYPE","onchange","cleanSelect","0");
doTemp.setHtmlEvent("one_Classify","onchange","cleanSelect","1");
// doTemp.setHtmlEvent("DOC_TYPE","onchange","cleanSelect","0");
// doTemp.setHtmlEvent("one_Classify","onchange","cleanSelect","1");
doTemp.setHtmlEvent("CUST_ID","onchange","cleanSelect","2");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
@ -61,8 +61,9 @@
setItemValue(0,0,"InputUserName","<%= CurUser.getUserName()%>");
setItemValue(0,0,"InputOrg","<%=CurUser.getOrgName()%>");
setItemValue(0,0,"InputTime","<%=StringFunction.getToday()%>");
cleanSelect(0);
$('#DOC_NAME option').removeAttr('selected');
$('#DOC_NAME option[value=a3b93ef4a257453cad72d7464f2bbf55]').attr('selected','selected');
// cleanSelect(2);
hideItem(0,"CUST_ID");
});

View File

@ -105,6 +105,7 @@
attr.setAttributeValue("InputTime",InputTime);
attr.setAttributeValue("Remark",Remark);
attr.setAttributeValue("ObjectType", ObjectType);
attr.setAttributeValue("FlowUnid", flowunid);
//得到不带路径的文件名
sFileName = StringFunction.getFileName(sFileName);

View File

@ -21,11 +21,11 @@
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newRecord(){
var sUrl = "/Tenwa/Core/Standard/LCStandardInterestInfo.jsp";
var sUrl = "/Tenwa/Core/Standard/LCStandardInterestInfo3.jsp";
AsControl.OpenView(sUrl,'option=add','_self','');
}
function viewAndEdit(){
var sUrl = "/Tenwa/Core/Standard/LCStandardInterestInfo.jsp";
var sUrl = "/Tenwa/Core/Standard/LCStandardInterestInfo3.jsp";
var sPara = getItemValue(0,getRow(0),'id');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");

View File

@ -0,0 +1,82 @@
<%@page import="com.tenwa.reckon.product.ASObjectWindowCalc"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2017-08-02
Content: 示例详情页面
History Log:
*/
String option = CurPage.getParameter("option");
//新增和修改的查询逻辑不同,需要判断
String sql = "select max(start_date),BASE_RATE_HALF,BASE_RATE_ONE,BASE_RATE_THREE,BASE_RATE_FIVE,BASE_RATE_ABOVEFIVE from LC_STANDARD_INTEREST ";
if("edit".equals(option)){
sql += "where start_date<(select start_date from LC_STANDARD_INTEREST where id='"+CurPage.getParameter("id")+"')";
}
ASResultSet rs = Sqlca.getASResultSet2(sql);
String BASE_RATE_HALF = "";
String BASE_RATE_ONE = "";
String BASE_RATE_THREE = "";
String BASE_RATE_FIVE = "";
String BASE_RATE_ABOVEFIVE = "";
if(rs.next()){
BASE_RATE_HALF = rs.getStringValue("BASE_RATE_HALF");
BASE_RATE_ONE = rs.getStringValue("BASE_RATE_ONE");
BASE_RATE_THREE = rs.getStringValue("BASE_RATE_THREE");
BASE_RATE_FIVE = rs.getStringValue("BASE_RATE_FIVE");
BASE_RATE_ABOVEFIVE = rs.getStringValue("BASE_RATE_ABOVEFIVE");
}
String sTempletNo = "LCStandardInterestInfo3";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setColTips("BASE_RATE_HALF,BASE_RATE_ONE,BASE_RATE_THREE,BASE_RATE_FIVE,BASE_RATE_ABOVEFIVE", "本次利率");
doTemp.setColTips("ADJUSTED1,ADJUSTED2,ADJUSTED3,ADJUSTED4,ADJUSTED5", "上一次利率");
doTemp.setHtmlEvent("BASE_RATE_HALF,BASE_RATE_ONE,BASE_RATE_THREE,BASE_RATE_FIVE,BASE_RATE_ABOVEFIVE", "onchange", "getRateByBase");
ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
{"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_return"}
};
sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function(){
$('.info_data_tablecommon .info_group_table').remove();//移除分组
$('td .info_mid_line').attr('width','33%');//设置列宽比
$('td .info_td_left').attr('style','width:130px;');//设置标题宽
$('#SEIZEASEAT').parent().parent().remove();//移除占位字段,但不移除占位效果
$("#div_my0").append("<span style='color:red;'>* 说明:新增第一条初始利率后(由于系统不存在上次利率默认调整幅度为0.0%),第二次及以后新增则自动带出上次利率,填写调整后,计算调整幅度。<span>");
setItemValue(0,0,'ADJUSTED1','<%=BASE_RATE_HALF%>');
setItemValue(0,0,'ADJUSTED2','<%=BASE_RATE_ONE%>');
setItemValue(0,0,'ADJUSTED3','<%=BASE_RATE_THREE%>');
setItemValue(0,0,'ADJUSTED4','<%=BASE_RATE_FIVE%>');
setItemValue(0,0,'ADJUSTED5','<%=BASE_RATE_ABOVEFIVE%>');
})
function returnList(){
var pUrl="/Tenwa/Core/Standard/CentralLCStandardInterestList.jsp";
AsControl.OpenView(pUrl, "","_self","");
}
function getRateByBase(){
//本次基准利率
var BASE_RATE_HALF=getItemValue(0,0,'BASE_RATE_HALF');
var BASE_RATE_ONE=getItemValue(0,0,'BASE_RATE_ONE');
var BASE_RATE_THREE=getItemValue(0,0,'BASE_RATE_THREE');
var BASE_RATE_FIVE=getItemValue(0,0,'BASE_RATE_FIVE');
var BASE_RATE_ABOVEFIVE=getItemValue(0,0,'BASE_RATE_ABOVEFIVE');
//上一次央行基准利率
var sBASE_RATE_HALF = "<%=BASE_RATE_HALF%>";
var sBASE_RATE_ONE = "<%=BASE_RATE_ONE%>";
var sBASE_RATE_THREE = "<%=BASE_RATE_THREE%>";
var sBASE_RATE_FIVE = "<%=BASE_RATE_FIVE%>";
var sBASE_RATE_ABOVEFIVE = "<%=BASE_RATE_ABOVEFIVE%>";
//浮动利率
setItemValue(0,0,'RATE_HALF',(parseFloat(BASE_RATE_HALF)-parseFloat(sBASE_RATE_HALF))+'');
setItemValue(0,0,'RATE_ONE',(parseFloat(BASE_RATE_ONE)-parseFloat(sBASE_RATE_ONE))+'');
setItemValue(0,0,'RATE_THREE',(parseFloat(BASE_RATE_THREE)-parseFloat(sBASE_RATE_THREE))+'');
setItemValue(0,0,'RATE_FIVE',(parseFloat(BASE_RATE_FIVE)-parseFloat(sBASE_RATE_FIVE))+'');
setItemValue(0,0,'RATE_ABOVEFIVE',(parseFloat(BASE_RATE_ABOVEFIVE)-parseFloat(sBASE_RATE_ABOVEFIVE))+'');
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -107,7 +107,7 @@
}
var jobName = getItemValue(0,getRow(),"JOB_NAME");
var triggerName = getItemValue(0,getRow(),"TRIGGER_NAME");
var result = RunJavaMethodTrans("com.tenwa.quartz.QuartzServerImpl","triggerJob","jobName="+jobName+",triggerName="+triggerName);
var result = RunJavaMethodTrans("com.tenwa.quartz.QuartzServerImpl","triggerJob","jobName="+jobName+",triggerName="+triggerName+",userId=<%=CurUser.getUserID()%>");
if(result == "SUCCESS"){
alert("成功执行!");
reloadSelf();

View File

@ -6,6 +6,14 @@
History Log:
*/
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String phaseNo = CurPage.getParameter("PhaseNo");//获取当前节点
String button = "false";
String repeal = "true";
if("0030".equals(phaseNo)){
button = "true";
repeal = "false";
}
String projid="";
String contractid="";
BizObject flow=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT","flow_unid='"+sFlowUnid+"'").getSingleResult(false);
@ -31,8 +39,9 @@
}
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","","Button","撤销","撤销","runCancel()","","","","btn_icon_delete"},
{"true","","Button","生成租金通知书","生成租金通知书","generateQuotation()","","","","btn_icon_generate"},
{repeal,"","Button","撤销","撤销","runCancel()","","","","btn_icon_delete"},
{button,"","Button","生成租金通知书","生成租金通知书","generateQuotation()","","","","btn_icon_generate"},
{button,"All","Button","公司盖章","公司盖章","stamp()","","","",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
@ -68,12 +77,16 @@
var tempParam={};
var sparam="";
//模板号
param["templateNo"]="dae79cd9de784183b91f4a50f37d8e47";
//param["templateNo"]="dae79cd9de784183b91f4a50f37d8e47";
param["templateNo"]="f9e457e99bca4614a7628b4e83cbb3e1";
//生成文件关联关系
tempParam["OBJECTTYPE"]="AdjustInterst";
tempParam["FLOW_UNID"]="<%=sFlowUnid%>";
tempParam["contract_id"]=getItemValue(0,getRow(0),"CONTID");
tempParam["CONTRACT_ID"]=getItemValue(0,getRow(0),"CONTID");
tempParam["PLAN_NUMBER"]=getItemValue(0,getRow(0),"PAYMENT_NUMBER");
tempParam["PLAN_LIST"]=getItemValue(0,getRow(0),"START_LIST");
//生成模板固定参数
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
@ -85,18 +98,44 @@
sparam+=key+"="+param[key];
}
var deleteparam="";
var sParams="flowunid=<%=sFlowUnid%>";
var sParams="flowunid=<%=sFlowUnid%>,plan_number="+getItemValue(0,getRow(0),"PAYMENT_NUMBER");
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.adjustinterest.action.AdjustInterestAction","deleteFile",sParams);
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","wordToPdfAnnex","PAYMENT_NUMBER="+getItemValue(0,getRow(0),"PAYMENT_NUMBER")+",PLAN_LIST=TX");
alert("生成成功!");
reloadSelf();
}
//公司盖章
function stamp(){
debugger;
var flie = getItemValue(0,getRow(0),"FILENAME");
if(typeof(flie)=="undefined"||flie==null||flie==""){
alert("请先生成租金通知书!");
return;
}
var PAYMENT_NUMBERS=getItemValueArray(0,"PAYMENT_NUMBER");
var PLAN_LISTS=getItemValueArray(0,"PLAN_LIST");
// for(var i=0;i<PAYMENT_NUMBERS.length;i++){
var plan_list=getItemValue(0,getRow(0),"START_LIST");//期次
var contractID = getItemValue(0,getRow(0),"CONTID");
var plan_number = getItemValue(0,getRow(0),"PAYMENT_NUMBER");
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","claimSignA","PAYMENT_NUMBER="+plan_number+",PLAN_LIST="+plan_list+",contract_id="+contractID+",flagType=adjustment");
if("success"==result){
alert("盖章成功!!!");
location.reload();
}else{
alert("盖章失败!!!");
}
// }
}
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");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -8,6 +8,7 @@
*/
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String flowName = CurPage.getParameter("FlowName");//직넋츰냔
if(sFlowUnid == null)sFlowUnid = "";
String sTempletNo = CurPage.getParameter("TempletNo");//模板号
if(sTempletNo == null) sTempletNo = "LBCarContractTemplateList";
@ -27,16 +28,24 @@
sProjId=bocl.getAttribute("proj_id").getString();
}
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
if("마운<EBA788>헝(폼났)".equals(flowName)){
doTemp.setVisible("S_filename", false);
doTemp.setVisible("operation", false);
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.MultiSelect = true;
dwTemp.Style="1";
//--<2D>零槨Grid루목--
if(!("마운<EBA788>헝(폼났)".equals(flowName))){
dwTemp.MultiSelect = true;
}
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow(sFlowUnid);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))||("마운<EBA788>헝(폼났)".equals(flowName))){
RightType="ReadOnly";
sButtons=new String[][] {
{"false","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}

View File

@ -237,8 +237,12 @@
alert("请勾选合同模板!");
return;
}
var message = RunJavaMethodTrans("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","CheckCar","templateIds="+tempids+",flowunid="+"<%=flowunid%>");
var message = RunJavaMethodTrans("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","CheckCar","contractId="+"<%=sContractId%>"+",templateIds="+tempids+",flowunid="+"<%=flowunid%>");
if(""!=message){
if("01"=="<%=customertype%>"){
alert("合同已生成,无法再次生成!");
return;
}
alert(message);
location.reload();
return;

View File

@ -22,7 +22,7 @@
//doTemp.setHtmlEvent("MOBILE", "onchange", "checkMobile");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
if(PhaseNo.equals("0020")||PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){
if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){
dwTemp.ReadOnly = "-2";//Ö»¶Áģʽ
}
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){

View File

@ -18,7 +18,7 @@
dwTemp.genHTMLObjectWindow(ContractId);
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
// {"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","·µ»Ø","·µ»ØÁбí","returnList()","","","",""}
};
sButtonPosition = "south";

View File

@ -54,7 +54,6 @@
String carAttributes=CurPage.getParameter("carAttributes");
String Leasehold=CurPage.getParameter("Leasehold");
String FlowNo=CurPage.getParameter("FlowNo");
System.out.println("======================="+carAttributes);
%>
<%/*~END~*/%>
@ -147,9 +146,26 @@
setItemRequired(0,"FRAME_NUMBER",true);
setItemRequired(0,"CAR_COLOUR",true);
setItemRequired(0,"ENGINE_NUMBER",true);
/* var falg = checkCarNumber();
if(falg){
$("#FRAME_NUMBER").css("color","red");
} */
}
});
function checkCarNumber(){
var id = getItemValue(0,getRow(0),"ID");
var framenumber = getItemValue(0,getRow(0),"FRAME_NUMBER");
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.BusinessApproveManager","checkCarNumber","phaseNo="+id+",plate_number="+framenumber);
if("EROOR"==sResult){
setErrorTips("FRAME_NUMBER","车架号已存在!");
return true;
}else{
setErrorTips("FRAME_NUMBER","");
return false;
}
}
//省市
function selectRegionCode(){
var sCity = "";
@ -177,6 +193,9 @@
/*~[Describe=保存记录;InputParam=无;OutPutParam=无;]~*/
function saveRecord(){
if(checkCarNumber()){
return;
}
var sFlowUnid = "<%=sFlowUnid%>";
setItemValue(0,getRow(),"FlowUnid",sFlowUnid);//初始化流程编号
var framNum = getItemValue(0,getRow(0),"FRAME_NUMBER").length;
@ -396,12 +415,12 @@
function checkFrameNumber(){
var vin = getItemValue(0,getRow(0),"FRAME_NUMBER");
// if (!getCheckCode(vin)){
// setErrorTips("FRAME_NUMBER","车架号格式有误!");
// return false;
// }else{
// setErrorTips("FRAME_NUMBER","");
// }
if (!getCheckCode(vin)){
setErrorTips("FRAME_NUMBER","车架号格式有误!");
return false;
}else{
setErrorTips("FRAME_NUMBER","");
}
return true;
}

View File

@ -148,10 +148,10 @@
if(falgs==false){
return;
}
var WorkTelResult = checkWorkTel();
/* var WorkTelResult = checkWorkTel();
if(WorkTelResult==false){
return;
}
} */
as_save(0,"goBack()");
}

View File

@ -76,16 +76,10 @@
setItemValue(0,getRow(),"REPURCHASE_RATIO","100");
//回购本金
setItemValue(0,getRow(),"REPURCHASE_MONEY",remaincorpus);
setItemValue(0,getRow(),"FIST_RENT",terminateInfo.fist_rent);
setItemValue(0,getRow(),"FIST_CORPUS",terminateInfo.fist_corpus);
setItemValue(0,getRow(),"HANDLING_CHARGE",Number(terminateInfo.fist_corpus*0.05).toFixed(2));
if(terminateInfo.fist_rent>0){
setItemValue(0,getRow(),"REPAYMENT_INTEREST","0");
}else{
setItemValue(0,getRow(),"REPAYMENT_INTEREST",terminateInfo.REPAYMENT_INTEREST);
}
setItemValue(0,getRow(),"FIST_CORPUS","0");
setItemValue(0,getRow(),"HANDLING_CHARGE",Number(remaincorpus*0.05).toFixed(2));
setItemValue(0,getRow(),"REPAYMENT_INTEREST","0");
setItemValue(0,getRow(),"SDNOMINAL_PRICE","0");
setItemValue(0,getRow(),"SDHANDLING_CHARGE","0");
@ -98,18 +92,32 @@
function getContractBondTotal(){
var dunrent = getItemValue(0,getRow(),"DUN_RENT");
var dunPenalty = getItemValue(0,getRow(),"DUN_PENALTY");
var corpusOverage = getItemValue(0,getRow(),"CORPUS_OVERAGE");
var fistRent = getItemValue(0,getRow(),"FIST_RENT");
var fistCorpus = getItemValue(0,getRow(),"FIST_CORPUS");
var handlingCharge = getItemValue(0,getRow(),"HANDLING_CHARGE");
var otherin = getItemValue(0,getRow(),"OTHER_IN");
var otherout = getItemValue(0,getRow(),"OTHER_OUT");
var nominalPrice=getItemValue(0,getRow(),"NOMINAL_PRICE");
var repaymentInterest=getItemValue(0,getRow(),"REPAYMENT_INTEREST");
return Number(dunrent ? dunrent : 0 ) + Number(dunPenalty ? dunPenalty : 0 ) + Number(fistRent ? fistRent : 0 )
+ Number(fistCorpus ? fistCorpus : 0 ) + Number(handlingCharge ? handlingCharge : 0 ) + Number(otherin ? otherin : 0 )
- Number(otherout ? otherout : 0 ) + Number(nominalPrice ? nominalPrice : 0 ) + Number(repaymentInterest ? repaymentInterest : 0 );
return Number(dunrent ? dunrent : 0 ) + Number(dunPenalty ? dunPenalty : 0 ) + Number(corpusOverage ? corpusOverage : 0 )
+ Number(fistRent ? fistRent : 0 ) + Number(handlingCharge ? handlingCharge : 0 ) + Number(otherin ? otherin : 0 )
- Number(otherout ? otherout : 0 ) + Number(nominalPrice ? nominalPrice : 0 ) ;
}
//¼ÆËãծȯ×ܼÆ
function updateContractBondTotal(){
var dunrent = getItemValue(0,getRow(),"DUN_RENT");
var agreedPenalty = getItemValue(0,getRow(),"AGREED_PENALTY");
var corpusOverage = getItemValue(0,getRow(),"CORPUS_OVERAGE");
var fistCorpus = getItemValue(0,getRow(),"FIST_CORPUS");
var sdhandlingCharge = getItemValue(0,getRow(),"SDHANDLING_CHARGE");
var otherin = getItemValue(0,getRow(),"OTHER_IN");
var otherout = getItemValue(0,getRow(),"OTHER_OUT");
var sdnominalPrice=getItemValue(0,getRow(),"SDNOMINAL_PRICE");
return Number(dunrent ? dunrent : 0 ) + Number(agreedPenalty ? agreedPenalty : 0 ) + Number(corpusOverage ? corpusOverage : 0 )
+ Number(fistCorpus ? fistCorpus : 0 ) + Number(sdhandlingCharge ? sdhandlingCharge : 0 ) + Number(otherin ? otherin : 0 )
- Number(otherout ? otherout : 0 ) + Number(sdnominalPrice ? sdnominalPrice : 0 ) ;
}
//计算债券总计
/* function getContractBondTotal(){
var dunrent = getItemValue(0,getRow(),"DUN_RENT");
@ -143,7 +151,8 @@
//检查是否进行过变更
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","checkIsRentChange","flowunid=<%=flowunid%>,plannumber=<%=paymentnumber%>");
if(result == 'true'){
as_save("myiframe0","run()");
setItemValue(0,getRow(),"CONTRACT_TOTAL",updateContractBondTotal());
as_save("myiframe0","run()");
}else{
alert('请先撤销变更,再进行变更操作!!!');
}
@ -159,19 +168,17 @@
setItemValue(0,0,"flowunid","<%=flowunid%>");
setItemValue(0,0,"PAYDAY_DATE","<%=StringFunction.getToday()%>");
//设置商定罚息带出逾期罚息
setItemValue(0,0,"AGREED_PENALTY",getItemValue(0,0,'DUN_PENALTY'));
//setItemValue(0,0,"AGREED_PENALTY",getItemValue(0,0,'DUN_PENALTY'));
//判断其他应收和其他应退是否为空
var otherIn = getItemValue(0,getRow(),"OTHER_IN");
var otherOut = getItemValue(0,getRow(),"OTHER_OUT");
if(!otherIn && !otherOut){
//其他应收和其他应退
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","getTerminateOtherInfo","contractId=<%=contractId%>,paymentnumber=<%=paymentnumber%>");
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","getTerminateOtherInfoFinish","contractId=<%=contractId%>,paymentnumber=<%=paymentnumber%>");
for(var p in result){
setItemValue(0,getRow(),p,result[p]);
}
}
setItemValue(0,getRow(),"OTHER_IN","0");
setItemValue(0,getRow(),"OTHER_OUT","0");
});
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,38 @@
<%@page import="jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Author: undefined 2018-07-16
Content:
History Log:
*/
ASObjectModel doTemp = new ASObjectModel("RentFileList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
// 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","All","Button","修改","查看/修改详情","viewAndEdit()","","","","btn_icon_edit"},
// {"true","","Button","详情","查看/修改详情","view()","","","","btn_icon_detail"},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
var html="";
html+='<a onclick=downloadFile(\''+getItemValue(0,i,"id")+'\')><font color="blue">'+getItemValue(0,i,"FILENAME")+'</font></a>';
getObj(0,i,"file").innerHTML=html;
}
}
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");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -64,6 +64,7 @@
}
if("0020".equals(phaseNo)){
ado.setReadOnly("ACCOUNTING_DATE", false);
ado.setReadOnly("FACT_DATE", false);
}
if("0030".equals(phaseNo)){
ado.setReadOnly("ACCOUNTING_DATE", true);

View File

@ -15,8 +15,9 @@
var contract_number = sReturn[3];
var proj_name = sReturn[4];
var contract_no = sReturn[5];
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",
"ContractId="+contract_id+",FlowKey="+contract_no+",ProjectId="+proj_id+",ProductId="+productId+",contract_number="+contract_number+",ProjectName="+proj_name+",applyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>");
var customername = sReturn[6];
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",
"ContractId="+contract_id+",FlowKey="+contract_no+",ProjectId="+proj_id+",ProductId="+productId+",contract_number="+contract_number+",ProjectName="+(contract_no+"-"+customername)+",applyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>");
var sReturnInfos=sReturnInfo.split("@");
if(sReturnInfos[0]=="success")
{

View File

@ -19,4 +19,13 @@
String sButtons[][] = {
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function(){
var relines=getItemValue(0,0,"relines");
if(relines<0){
$("#RELINES").css("color","red");
}
});
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,112 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Author: undefined 2017-10-23
Content:
History Log:
*/
String id = CurPage.getParameter("id");
String bankType = CurPage.getParameter("BankType");
String templetNo = "CardDeductDataList";
ASObjectModel doTemp = new ASObjectModel(templetNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(pageSize != null?Integer.parseInt(pageSize):10);
dwTemp.genHTMLObjectWindow(id);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","","Button","划扣核销","划扣核销","createRentIncomeWithCard()","","","","btn_icon_get",""},
//{"true","","Button","修改核销合同","修改核销合同","changeIncomeContract()","","","","btn_icon_detail",""},
{"true","","Button","返回","返回","returnList()","","","","btn_icon_back",""}
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function afterSearch(){
for(var i=0;i<DZ[0][2].length;i++){
var incomeStatus = getItemValue(0,i,"income_status");
if(incomeStatus == "3"){
for(var j=0;j<DZ[0][1].length;j++){
var obj = getObj(0,i,DZ[0][1][j][15]);
if(obj){
obj.style.color = "red";
}
}
}
}
}
function changeIncomeContract(){
var deductId = getItemValue(0,getRow(0),"id");
var mayopeMoney = getItemValue(0,getRow(0),"mayope_money");
var incomeStatus = getItemValue(0,getRow(0),"income_status");
if(incomeStatus != "3"){
AsDebug.showMessage("提示","此数据非红冲数据,不可修改合同!","","",true);
return;
}
if(Number(mayopeMoney) == 0){
AsDebug.showMessage("提示","此红冲数据没有可核销金额!","","",true);
return;
}
AsDialog.OpenSelector("SelectCardDeductContract","bankType,<%=bankType%>","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
return;
}
var contractId = sReturn.split("@")[0];
AsDialog.OpenSelector("SelectCardDeductRentPlan","contractId,"+contractId,"dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
return;
}
sReturn = sReturn.split("@~");
var id = "";
var allMoney = 0;
for(var i=0;i<sReturn.length;i++){
if(sReturn[i] == ""){
continue;
}
id += "@" + sReturn[i].split("@")[0];
var rentOver = sReturn[i].split("@")[1];
var penaltyOver = sReturn[i].split("@")[2];
allMoney += eval(rentOver + "+" + penaltyOver);
}
id = id.substring(1);
if(Number(mayopeMoney) < allMoney){
AsDebug.showMessage("提示","选择的计划金额大于可核销金额,请重新选择","","",true);
return;
}
var result = RunJavaMethodTrans("com.tenwa.flow.rent.rentincome.RentIncomeMethod","setCardDeductRentPlan","deductId="+deductId+",planIds="+sReturn+",allMoney="+allMoney);
if(result == "SUCCESS"){
AsDebug.showMessage("提示","操作成功","","",true);
reloadSelf();
}else{
AsDebug.showMessage("提示","操作失败","","",true);
}
},"请选择租金计划");
},"请选择合同");
}
function returnList(){
parent.AsDialog.ClosePage();
AsControl.OpenView("/Tenwa/Lease/Flow/Rent/CardDeduct/LcCardDeductDataList.jsp", "BankType=<%=bankType%>","_self","");
}
function createRentIncomeWithCard(){
if(DZ[0][2].length == 0){
AsDebug.showMessage("提示","页面没有可核销的数据!","","",true);
return;
}
var sReturn = RunJavaMethodTrans("com.tenwa.flow.rent.rentincome.RentIncomeMethod","createRentIncomeWithCard","deductDocId=<%=id%>,bankType=<%=bankType%>,userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>,importDate="+getItemValue(0,getRow(0),"import_date"),true);
/* if(sReturn == "true"){
AsDebug.showMessage("提示","系统开始核销数据...","","",true);
} */
if("SUCCESS" == sReturn){
AsDebug.showMessage("提示","操作成功!","","",true);
reloadSelf();
}else if(sReturn.indexOf("false") != -1){
AsDebug.showMessage("提示","没有可核销数据!","","",true);
}else{
AsDebug.showMessage("提示","操作失败!","","",true);
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,10 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
String bankType = CurPage.getParameter("BankType");
String result = Sqlca.getString(new SqlObject("select count(1) cou from lc_card_deduct_info where import_date is null"));
if("0".equals(result)){
out.println("true");
}else{
out.println("false");
}
%><%@ include file="/IncludeEndAJAX.jsp"%>

View File

@ -5,9 +5,22 @@
<%@page import="java.math.BigDecimal"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
SqlObject so = new SqlObject("delete from lc_occupy_rent_list where flow_name='¿¨¿ÛºËÏú'");
String id = CurPage.getParameter("ID");
String bankType = CurPage.getParameter("ObjectType");
String fileId = CurPage.getParameter("FileId");
String result = "";
try{
SqlObject so = new SqlObject("delete from lc_occupy_rent_list where flow_name='¿¨¿ÛºËÏú' and flowunid='"+id+"'");
Sqlca.executeSQL(so);
so = new SqlObject("delete from lc_"+bankType+"_export_data where deduct_info_id='"+id+"'");
Sqlca.executeSQL(so);
so = new SqlObject("delete from lb_docrelative where id=(select ldl.relative_id from lb_doclibrary ldl left join lb_docattribute lda on ldl.id=lda.library_id where lda.id='"+fileId+"')");
Sqlca.executeSQL(so);
so = new SqlObject("delete from lb_doclibrary where id=(select library_id from lb_docattribute where id='"+fileId+"')");
Sqlca.executeSQL(so);
so = new SqlObject("delete from lb_docattribute where id='"+fileId+"'");
Sqlca.executeSQL(so);
so = new SqlObject("delete from lc_card_deduct_info where id='"+id+"'");
Sqlca.executeSQL(so);
result = "SUCCESS";
}catch(Exception e){

View File

@ -0,0 +1,23 @@
<%@page import="com.amarsoft.are.jbo.JBOTransaction"%>
<%@page import="java.math.BigDecimal"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
String objecttype = CurPage.getAttribute("OBJECTTYPE");
String flowunid = CurPage.getAttribute("FLOW_UNID");
String type = CurPage.getAttribute("TYPE");
String id = CurPage.getAttribute("ID");
String docattributeID = "";
try{
SqlObject so = new SqlObject("SELECT la.id FROM lb_docrelative lr INNER JOIN LB_DOCLIBRARY ll ON ll.relative_id=lr.id INNER JOIN LB_DOCATTRIBUTE la ON la.library_id=ll.id WHERE lr.objecttype=:objecttype AND lr.flow_unid=:flowunid");
so.setParameter("objecttype", objecttype);
so.setParameter("flowunid", flowunid);
docattributeID = Sqlca.getString(so);
if("save".equals(type) && docattributeID != null){
Sqlca.executeSQL(new SqlObject("UPDATE LC_CARD_DEDUCT_INFO SET FILE_ID = '" + docattributeID + "' WHERE ID = '" + id + "'"));
}
}catch(Exception e){
e.printStackTrace();
docattributeID = "";
}
out.println(docattributeID);
%><%@ include file="/IncludeEndAJAX.jsp"%>

View File

@ -15,9 +15,9 @@
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","删除","删除","doDelete()","","","","btn_icon_delete",""},
{"true","","Button","卡扣数据上传","卡扣数据上传","importExcel()","","","","btn_icon_importNew",""},
{"true","","Button","卡扣模版下载","卡扣模版下载","CardDownload()","","","","btn_icon_down",""}
{"true","","Button","跳转到核销页面","跳转到核销页面","openIncomePage()","","","","btn_icon_return",""}
//{"true","","Button","卡扣模版下载","卡扣模版下载","CardDownload()","","","","btn_icon_down",""}
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
@ -30,6 +30,10 @@
</form>
<script type="text/javascript">
function openIncomePage() {
AsControl.OpenTab("/Tenwa/Lease/Flow/Rent/CardDeduct/LcCardDeductDataList.jsp",'',{title:"卡扣核销"});
}
function CardDownload(){
var sId="5605a63d456d454a81b368dbc765474f";

View File

@ -0,0 +1,59 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Author: undefined 2017-11-26
Content:
History Log:
*/
ASObjectModel doTemp = new ASObjectModel("LCCardDeductInfoList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(20);
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","导出数据","导出数据","exportExcel()","","","","btn_icon_export",""},
{"true","All","Button","撤回","撤回","doDelete()","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function exportExcel(){
var fileId = getItemValue(0,getRow(0),"FILE_ID");
if(fileId){
downloadFile(fileId);
reloadSelf();
}else{
AsDebug.showMessage("提示","导出失败!","","",true);
}
}
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 doDelete(){
if(DZ[0][2].length == 0){
AsDebug.showMessage("提示","无数据需要撤回!","","",true);
return;
}
var importDate = getItemValue(0, getRow(0), "IMPORT_DATE");
if("" != importDate){
AsDebug.showMessage("提示","此数据已导入,不能撤回!","","",true);
return;
}
if(confirm("确定要撤回已导出的卡扣数据?")){
var fileId = getItemValue(0, getRow(0), "FILE_ID");
var id = getItemValue(0, getRow(0), "ID");
var sResult = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/CardDeduct/DeleteRentOccupy.jsp","ObjectType=card&FileId="+fileId+"&ID="+id);
if("SUCCESS" == sResult){
AsDebug.showMessage("提示","撤回成功!","","",true);
reloadSelf();
}else{
AsDebug.showMessage("提示","撤回失败!","","",true);
}
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,42 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin.jspf"%>
<%
/*
页面说明:示例模块主页面
*/
String PG_TITLE = "卡扣导出"; // 浏览器窗口标题 <title> PG_TITLE </title>
String PG_CONTENT_TITLE = "&nbsp;&nbsp;通联数据明细&nbsp;&nbsp;"; //默认的内容区标题
String PG_CONTNET_TEXT = "请点击左侧列表";//默认的内容区文字
String PG_LEFT_WIDTH = "200";//默认的treeview宽度
//定义Treeview
OHTMLTreeView tviTemp = new OHTMLTreeView(CurPage, "示例模块主页面","right");
//定义树图结构
tviTemp.insertPage("root","卡扣数据","",1);
tviTemp.insertPage("root","已导出卡扣信息","",2);
//另外两种定义树图结构的方法SQL生成和代码生成 参见View的生成 ExampleView.jsp和ExampleView01.jsp
%>
<%@ include file="/Frame/resources/include/include_main.jspf"%>
<script type="text/javascript">
function TreeViewOnClick(){
var sCurItemname = getCurTVItem().name;
if(sCurItemname == "卡扣数据"){
AsControl.OpenView("/Tenwa/Lease/Flow/Rent/CardDeduct/VILCContractRentPlanList.jsp","","right");
}else if(sCurItemname == "已导出卡扣信息"){
AsControl.OpenView("/Tenwa/Lease/Flow/Rent/CardDeduct/LCCardDeductInfoList.jsp","","right");
}
setTitle(getCurTVItem().name);
}
<%/*~[Describe=生成treeview;]~*/%>
function initTreeView(){
<%=tviTemp.generateHTMLTreeView()%>
expandNode('root');
selectItemByName("卡扣数据"); //默认打开的(叶子)选项
}
initTreeView();
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,85 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Author: undefined 2017-10-23
Content:
History Log:
*/
ASObjectModel doTemp = new ASObjectModel("LCCardDeductDataList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(pageSize != null?Integer.parseInt(pageSize):20);
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","","Button","划扣核销","划扣核销","rentIncome()","","","","btn_icon_get",""},
{"true","","Button","删除","删除","doDelete()","","","","btn_icon_delete",""}
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function afterSearch(){
var rows = getRowCount(0);
for(var i=0;i<rows;i++){
var value = getItemValue(0,i,"docname");
getObj(0,i,"docname").innerHTML = "<a style='color:blue;' onclick='downloadFile("+i+");'>"+value+"</a>";
}
}
function doDelete(){
var ids = getItemValue(0,getRow(0),'id');
if(ids == ""){
AsDebug.showMessage("提示","请选中一行数据!","","",true);
return;
}
var allhadMoney = getItemValue(0,getRow(0),'allhad_money');
if(Number(allhadMoney) > 0){
AsDebug.showMessage("提示","已核销数据不能删除!","","",true);
return;
}
var importDate = getItemValue(0,getRow(0),"import_date");
var deductInfoId = getItemValue(0,getRow(0),"deduct_info_id");
if(confirm("是否确认删除?")){
ids = ids.replace(/,/ig,"@");
var sResult = RunJavaMethodTrans("com.tenwa.flow.rent.carddeduct.CardDeductManage","delete","ids="+ids+",importDate="+importDate+",bankType=card,deductInfoId="+deductInfoId+",userId=<%=CurUser.getUserID()%>");
if("SUCCESS" == sResult){
AsDebug.showMessage("提示","删除成功!","","",true);
reloadSelf();
}else{
AsDebug.showMessage("提示","删除失败!","","",true);
}
}
}
function rentIncome(){
var allmayopeMoney = getItemValue(0,getRow(0),'allmayope_money');
if(allmayopeMoney == 0 && getItemValue(0,getRow(0),"status") == "not_income"){
AsDebug.showMessage("提示","可核销金额为0","","",true);
return;
}
if(allmayopeMoney == 0){
AsDebug.showMessage("提示","该数据已核销!","","",true);
return;
}
var sUrl = "/Tenwa/Lease/Flow/Rent/CardDeduct/CardDeductDataList.jsp";
var id = getItemValue(0,getRow(0),'id');
if(typeof(id)=="undefined" || id.length==0 ){
AsDebug.showMessage("提示","参数不能为空!","","",true);
return ;
}
AsControl.OpenView(sUrl,'id='+id,'_self','');
}
function downloadFile(i){
var fullpath = getItemValue(0,i,"fullpath");
var docname = getItemValue(0,i,"docname");
fullpath = encodeURI(fullpath);
fullpath = encodeURI(fullpath);
docname = encodeURI(docname);
docname = encodeURI(docname);
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/DownloadServlet?CompClientID=<%=sCompClientID%>&fullpath="+fullpath+"&docname="+docname, "downloadTemplate");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -1,3 +1,4 @@
<%@page import="com.tenwa.reckon.util.UUIDUtil"%>
<%@page import="com.amarsoft.app.util.ProductParamUtil"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
@ -8,7 +9,7 @@
*/
ASObjectModel doTemp = new ASObjectModel("VILCContractRentPlanList");
String sql = doTemp.getJboWhere();
ASResultSet rs = Sqlca.getASResultSet("select distinct O.id,O.product_id from vi_lc_contract_rent_plan O where "+sql.replaceAll("v.", ""));
/* ASResultSet rs = Sqlca.getASResultSet("select distinct O.id,O.product_id from vi_lc_contract_rent_plan O where "+sql.replaceAll("v.", ""));
String contractIDs = "";
while(rs.next()){
String productID = rs.getString("PRODUCT_ID");
@ -21,11 +22,11 @@
contractIDs = contractIDs.substring(1);
}else{
contractIDs = "' '";
}
doTemp.appendJboWhere(" and ((O.id in ("+contractIDs+") and O.fee_type<>'罚息') or O.id not in ("+contractIDs+"))");
} */
//doTemp.appendJboWhere(" and ((O.id in ("+contractIDs+") and O.fee_type<>'罚息') or O.id not in ("+contractIDs+"))");
//doTemp.appendJboWhere("(case when O.id in("+contractIDs+") then O.fee_type<>'罚息' else 1 end)");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
String jboWhere = dwTemp.getDataObject().getJboWhere().replaceAll("v.", "").replaceAll("O.", "");//用于卡扣数据导出过滤
//String jboWhere = dwTemp.getDataObject().getJboWhere().replaceAll("v.", "").replaceAll("O.", "");//用于卡扣数据导出过滤
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(pageSize!=null?Integer.parseInt(pageSize):10);
@ -33,12 +34,20 @@
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","卡扣数据导出","卡扣数据导出","exportExcel()","","","","btn_icon_exportNew",""},
{"true","All","Button","卡扣导出撤回","卡扣数据撤回","doDelete()","","","","btn_icon_delete",""}
{"true","All","Button","卡扣数据导出","卡扣数据导出","exportExcel()","","","","btn_icon_exportNew",""}
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function exportExcel(){
if(DZ[0][2].length == 0){
AsDebug.showMessage("提示","无数据需要导出!","","",true);
return;
}
var sReturn = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/CardDeduct/CheckCardExport.jsp","");
if("false" == sReturn){
AsDebug.showMessage("提示","检查到有数据已导出未处理!","","",true);
return;
}
var param={};
var tempParam={};
var sparam="";
@ -49,7 +58,8 @@
//生成文件关联关系
tempParam["OBJECTTYPE"]="卡扣数据导出";
tempParam["FLOW_UNID"]="<%=new java.util.Date().getTime()%>";
tempParam["jboWhere"]="<%=jboWhere%>".replace(/,/ig,"△").replace(/=/ig,"&");
tempParam["DeductInfoId"]="<%=UUIDUtil.getUUID()%>";
<%-- tempParam["jboWhere"]="<%=jboWhere%>".replace(/,/ig,"△").replace(/=/ig,"&"); --%>
//生成模板固定参数
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
@ -63,12 +73,14 @@
}
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
if(result == "success"){
var attributeID = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/BatchIncome/GetLBDocAttributeID.jsp",
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]);
var attributeID = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/CardDeduct/GetLBDocAttributeIDByCard.jsp",
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]+"&TYPE=save&ID="+tempParam["DeductInfoId"]);
downloadFile(attributeID);
console.log(attributeID);
AsDebug.showMessage("提示","操作成功,可在【已导出卡扣信息】中查看!","","",true);
reloadSelf();
}else{
alert("导出失败!");
AsDebug.showMessage("提示","导出失败!","","",true);
}
}

View File

@ -25,6 +25,7 @@
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
window.onload = function(){
setItemValue(0,0,"CERTTYPE_CF","Ind01");
var type = getItemValue(0,0,"customertype");
if(type=="03"||type==""||type==null){
hideItem(0,"CERTTYPE_CC");
@ -34,7 +35,7 @@ window.onload = function(){
hideItem(0,"SEX_CP");
hideItem(0,"CERTTYPE_CP");
hideItem(0,"CERTID_CP");
hideItem(0,"MOBILE_CP");
hideItem(0,"MOBILE_CP");
}
}
</script>

View File

@ -72,3 +72,4 @@ base.business.type=1
base.company.doc.name=\u627F\u79DF\u4EBA\u8EAB\u4EFD\u8BC1\uFF08\u6B63\u53CD\u9762\uFF09@\u627F\u79DF\u4EBA\u8EAB\u4EFD\u8BC1\uFF08\u6B63\u53CD\u9762\uFF09
base.person.doc.name=\u5171\u540C\u627F\u79DF\u4EBA\u8EAB\u4EFD\u8BC1\uFF08\u6B63\u53CD\u9762\uFF09@\u5171\u540C\u627F\u79DF\u4EBA\u8EAB\u4EFD\u8BC1\uFF08\u6B63\u53CD\u9762\uFF09,\u62C5\u4FDD\u4EBA\u8EAB\u4EFD\u8BC1\uFF08\u6B63\u53CD\u9762\uFF09@\u62C5\u4FDD\u4EBA\u8EAB\u4EFD\u8BC1\uFF08\u6B63\u53CD\u9762\uFF09
base.calculation.tool.flow.unid=TENWA123

View File

@ -1990,30 +1990,6 @@
</managerProperties>
</manager>
</class>
<class name="VI_LC_CONTRACT_RENT_PLAN" label="已起租合同租金计划视图" keyAttributes="">
<attributes>
<attribute name="ID" label="合同编号" type="STRING"/>
<attribute name="CONTRACT_NUMBER" label="业务合同号" type="STRING"/>
<attribute name="PRODUCT_ID" label="产品编号" type="STRING"/>
<attribute name="PAYMENT_NUMBER" label="投放编号" type="STRING"/>
<attribute name="CUSTOMERNAME" label="客户名称" type="STRING"/>
<attribute name="LEASE_ACC_BANK" label="本方银行" type="STRING"/>
<attribute name="LEASE_ACC_NAME" label="本方银行" type="STRING"/>
<attribute name="LEASE_ACC_NUMBER" label="本方银行" type="STRING"/>
<attribute name="CLIENT_ACC_BANK" label="对方银行" type="STRING"/>
<attribute name="CLIENT_ACC_NAME" label="对方账户" type="STRING"/>
<attribute name="CLIENT_ACC_NUMBER" label="对方账号" type="STRING"/>
<attribute name="PLAN_DATE" label="计划日期" type="STRING"/>
<attribute name="PLAN_LIST" label="期次" type="STRING"/>
<attribute name="FEE_TYPE" label="费用类型" type="STRING"/>
<attribute name="PLAN_MONEY" label="金额" type="STRING"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="vi_lc_contract_rent_plan" />
</managerProperties>
</manager>
</class>
<class name="LC_CARD_DEDUCT_DOC" label="卡扣文件" keyAttributes="id">
<attributes>
<attribute name="id" label="卡扣文件编号" type="STRING" length="32"/>
@ -2028,6 +2004,8 @@
<attribute name="inputuserid" label="上传人" type="STRING" length="32"/>
<attribute name="inputorgid" label="上传人所在部门" type="STRING" length="32"/>
<attribute name="inputtime" label="上传时间" type="STRING" length="32"/>
<attribute name="import_date" label="导入日期" type="STRING" length="32"/>
<attribute name="deduct_info_id" label="导出数据编号" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
@ -2036,39 +2014,6 @@
</managerProperties>
</manager>
</class>
<class name="LC_CARD_DEDUCT_DATA" label="卡扣数据表" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="payment_number" label="投放编号" type="STRING" length="32"/>
<attribute name="plan_list" label="期次" type="STRING" length="32"/>
<attribute name="fee_type" label="费用类型" type="STRING" length="32"/>
<attribute name="deduct_docid" label="卡扣文件编号" type="STRING" length="32"/>
<attribute name="serialno" label="序号" type="STRING" length="32"/>
<attribute name="paytype" label="固定值7" type="STRING" length="32"/>
<attribute name="transactiontype" label="固定值1" type="STRING" length="32"/>
<attribute name="ownacc_number" label="本方账号" type="STRING" length="200"/>
<attribute name="own_account" label="本方账户" type="STRING" length="200"/>
<attribute name="client_acc_number" label="对方账号" type="STRING" length="200"/>
<attribute name="client_account" label="对方账户" type="STRING" length="200"/>
<attribute name="client_bank" label="对方银行" type="STRING" length="200"/>
<attribute name="uage" label="固定值批量扣款" type="STRING" length="32"/>
<attribute name="fencode" label="固定值01" type="STRING" length="32"/>
<attribute name="currflag" label="固定值0" type="STRING" length="32"/>
<attribute name="amount" label="计划金额" type="DOUBLE" length="22" scale="2"/>
<attribute name="deductfeetype" label="扣款费用类型" type="STRING" length="200"/>
<attribute name="enddate" label="扣款日期" type="STRING" length="32"/>
<attribute name="transtatus" label="交易状态" type="STRING" length="32"/>
<attribute name="errorcode" label="错误代码" type="STRING" length="32"/>
<attribute name="resultdesc" label="交易结果" type="STRING" length="500"/>
<attribute name="actual_debit_amt" label="到账金额" type="DOUBLE" length="22" scale="2"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LC_CARD_DEDUCT_DATA" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LC_CARD_DEDUCT_DOC_TEMP" label="卡扣文件临时表" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>
@ -3138,6 +3083,152 @@
<property name="table" value="vi_lc_rent_collection" />
</managerProperties>
</manager>
</class>
<class name="VI_LC_CONTRACT_RENT_PLAN" label="" keyAttributes="">
<attributes>
<attribute name="ID" label="合同ID" type="STRING"/>
<attribute name="customerid" label="银联网络用户编号" type="STRING"/>
<attribute name="bankcode" label="银行代码" type="STRING"/>
<attribute name="acc_number_type" label="账号类型" type="STRING"/>
<attribute name="account_province" label="开户行所在省 " type="STRING"/>
<attribute name="account_city" label="开户行所在市" type="STRING"/>
<attribute name="account_type" label="账户类型" type="STRING"/>
<attribute name="coin" label="货币类型" type="STRING"/>
<attribute name="protocol_number" label="协议号" type="STRING"/>
<attribute name="protocol_cust_number" label="协议用户编号" type="STRING"/>
<attribute name="cert_type" label="开户证件类型" type="STRING"/>
<attribute name="cert_id" label="证件号" type="STRING"/>
<attribute name="mobile" label="手机号/小灵通" type="STRING"/>
<attribute name="custom_number" label="自定义用户号" type="STRING"/>
<attribute name="clearing_acc_number" label="清分账号" type="STRING"/>
<attribute name="CONTRACT_NUMBER" label="合同编号" type="STRING"/>
<attribute name="PRODUCT_ID" label="产品编号" type="STRING"/>
<attribute name="PAYMENT_NUMBER" label="投放编号" type="STRING"/>
<attribute name="CUSTOMERNAME" label="客户名称" type="STRING"/>
<attribute name="LEASE_ACC_BANK" label="LEASE_ACC_BANK" type="STRING"/>
<attribute name="LEASE_ACC_NAME" label="LEASE_ACC_NAME" type="STRING"/>
<attribute name="LEASE_ACC_NUMBER" label="LEASE_ACC_NUMBER" type="STRING"/>
<attribute name="bank_name" label="开户行名称" type="STRING"/>
<attribute name="account" label="账户名" type="STRING"/>
<attribute name="ACC_NUMBER" label="账号" type="STRING"/>
<attribute name="amount" label="金额" type="STRING"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="vi_lc_contract_rent_plan" />
</managerProperties>
</manager>
</class>
<class name="LC_CARD_DEDUCT_DATA" label="卡扣导入数据" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="payment_number" label="投放编号" type="STRING" length="32"/>
<attribute name="plan_list" label="期次" type="STRING" length="32"/>
<attribute name="fee_type" label="费用类型" type="STRING" length="32"/>
<attribute name="deduct_docid" label="卡扣文件编号" type="STRING" length="32"/>
<attribute name="serialno" label="序号" type="STRING" length="32"/>
<attribute name="paytype" label="固定值7" type="STRING" length="32"/>
<attribute name="transactiontype" label="固定值1" type="STRING" length="32"/>
<attribute name="ownacc_number" label="本方账号" type="STRING" length="200"/>
<attribute name="own_account" label="本方账户" type="STRING" length="200"/>
<attribute name="client_acc_number" label="对方账号" type="STRING" length="200"/>
<attribute name="client_account" label="对方账户" type="STRING" length="200"/>
<attribute name="client_bank" label="对方银行" type="STRING" length="200"/>
<attribute name="uage" label="固定值批量扣款" type="STRING" length="32"/>
<attribute name="fencode" label="固定值01" type="STRING" length="32"/>
<attribute name="currflag" label="固定值0" type="STRING" length="32"/>
<attribute name="amount" label="计划金额" type="DOUBLE" length="22" scale="2"/>
<attribute name="deductfeetype" label="扣款费用类型" type="STRING" length="200"/>
<attribute name="enddate" label="扣款日期" type="STRING" length="32"/>
<attribute name="transtatus" label="交易状态" type="STRING" length="32"/>
<attribute name="errorcode" label="错误代码" type="STRING" length="32"/>
<attribute name="resultdesc" label="交易结果" type="STRING" length="500"/>
<attribute name="actual_debit_amt" label="到账金额" type="DOUBLE" length="22" scale="2"/>
<attribute name="customerid" label="银联网络用户编号" type="STRING" length="32"/>
<attribute name="bankcode" label="银行代码" type="STRING" length="32"/>
<attribute name="acc_number_type" label="帐号类型" type="STRING" length="32"/>
<attribute name="account_province" label="开户行所在省" type="STRING" length="200"/>
<attribute name="account_city" label="开户行所在市" type="STRING" length="200"/>
<attribute name="account_type" label="账户类型" type="STRING" length="32"/>
<attribute name="coin" label="货币类型" type="STRING" length="32"/>
<attribute name="protocol_number" label="协议号" type="STRING" length="32"/>
<attribute name="protocol_cust_number" label="协议用户编号" type="STRING" length="32"/>
<attribute name="cert_type" label="开户证件类型" type="STRING" length="32"/>
<attribute name="cert_id" label="证件号" type="STRING" length="32"/>
<attribute name="mobile" label="手机号/小灵通" type="STRING" length="32"/>
<attribute name="custom_number" label="自定义用户号" type="STRING" length="32"/>
<attribute name="clearing_acc_number" label="清分账号" type="STRING" length="32"/>
<attribute name="contract_number" label="备注" type="STRING" length="32"/>
<attribute name="had_money" label="已核销金额" type="DOUBLE" length="22" scale="2"/>
<attribute name="mayope_money" label="可核销金额" type="DOUBLE" length="22" scale="2"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lc_card_deduct_data" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LC_CARD_DEDUCT_INFO" label="" keyAttributes="id">
<attributes>
<attribute name="id" label="id" type="STRING" length="32"/>
<attribute name="all_count" label="all_count" type="STRING" length="32"/>
<attribute name="all_amount" label="all_amount" type="DOUBLE" length="22" scale="2"/>
<attribute name="may_count" label="may_count" type="STRING" length="32"/>
<attribute name="may_amount" label="may_amount" type="DOUBLE" length="22" scale="2"/>
<attribute name="export_date" label="export_date" type="STRING" length="32"/>
<attribute name="agreement" label="agreement" type="STRING" length="32"/>
<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="bank_type" label="bank_type" type="STRING" length="32"/>
<attribute name="file_id" label="file_id" type="STRING" length="32"/>
<attribute name="import_date" label="import_date" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lc_card_deduct_info" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LC_CARD_EXPORT_DATA" label="" keyAttributes="id">
<attributes>
<attribute name="id" label="id" type="STRING" length="32"/>
<attribute name="serialno" label="serialno" type="STRING" length="32"/>
<attribute name="customerid" label="customerid" type="STRING" length="32"/>
<attribute name="bankcode" label="bankcode" type="STRING" length="32"/>
<attribute name="acc_number_type" label="acc_number_type" type="STRING" length="32"/>
<attribute name="account_province" label="account_province" type="STRING" length="200"/>
<attribute name="account_city" label="account_city" type="STRING" length="200"/>
<attribute name="account_type" label="account_type" type="STRING" length="32"/>
<attribute name="coin" label="coin" type="STRING" length="32"/>
<attribute name="protocol_number" label="protocol_number" type="STRING" length="32"/>
<attribute name="protocol_cust_number" label="protocol_cust_number" type="STRING" length="32"/>
<attribute name="cert_type" label="cert_type" type="STRING" length="32"/>
<attribute name="cert_id" label="cert_id" type="STRING" length="32"/>
<attribute name="mobile" label="mobile" type="STRING" length="32"/>
<attribute name="custom_number" label="custom_number" type="STRING" length="32"/>
<attribute name="clearing_acc_number" label="clearing_acc_number" type="STRING" length="32"/>
<attribute name="contract_number" label="contract_number" type="STRING" length="32"/>
<attribute name="product_id" label="product_id" type="STRING" length="32"/>
<attribute name="payment_number" label="payment_number" type="STRING" length="32"/>
<attribute name="customername" label="customername" type="STRING" length="32"/>
<attribute name="bank_name" label="bank_name" type="STRING" length="100"/>
<attribute name="account" label="account" type="STRING" length="32"/>
<attribute name="acc_number" label="acc_number" type="STRING" length="32"/>
<attribute name="amount" label="amount" type="DOUBLE" length="22" scale="2"/>
<attribute name="deduct_info_id" label="deduct_info_id" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lc_card_export_data" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -130,6 +130,23 @@
</managerProperties>
</manager>
</class>
<class name="QRTZ_SERIAL_LOG" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="ID" type="STRING" length="40"/>
<attribute name="METHOD_NAME" label="方法名" type="STRING" length="64"/>
<attribute name="NODE_NUMBER" label="节点编号" type="STRING" length="32"/>
<attribute name="STATUS" label="状态" type="STRING" length="32"/>
<attribute name="CLOSE_DATE" label="关账日期" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="MESSAGE" label="异常信息" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="qrtz_serial_log" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
<package name="jbo.com.tenwa.entity.comm.own" >
<class name="OWN_ACCOUNT" label="" keyAttributes="id">

View File

@ -112,6 +112,7 @@
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="DELETEED" label="是否已删除" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="40"/>
</attributes>
<manager>
<managerProperties>

View File

@ -1717,6 +1717,7 @@
<attribute name="CALENDAR_NAME" label="CALENDAR_NAME" type="STRING" length="200"/>
<attribute name="MISFIRE_INSTR" label="MISFIRE_INSTR" type="LONG" length="19"/>
<attribute name="JOB_DATA" label="JOB_DATA" type="STRING" length="65535"/>
<attribute name="USERID" label="USERID" type="STRING" length="100"/>
</attributes>
<manager>
<managerProperties>

View File

@ -21,26 +21,22 @@ public class CopyDReturnTempToFormal extends BaseBussiness {
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String DistributorNo = this.getAttribute("DistributorNo").toString();
String flowunid = this.getAttribute("ObjectNo").toString();
String id = this.getAttribute("ProjectId").toString();
Map<String,String> fromCondtion = new HashMap<String,String>();
fromCondtion.put("FLOWUNID", flowunid);
Map<String,String> otherProperty = new HashMap<String,String>();
otherProperty.put("ID", id);
BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca);
String disStatus = dst.getAttribute("id").toString();
BizObjectManager dit = JBOFactory.getBizObjectManager(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME,Sqlca);
BizObject deit = dit.createQuery("select * from O where FLOWUNID=:flowUnid").setParameter("flowUnid", flowunid).getSingleResult(true);
deit.setAttributeValue("DISTRIBUTOR_ID", disStatus);
dit.saveObject(deit);
BizObject deit = dit.createQuery("select * from O where FLOWUNID=:flowUnid").setParameter("flowUnid", flowunid).getSingleResult(false);
DataOperatorUtil.copySingleJBO(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITRETURN_INFO.CLASS_NAME, null, otherProperty, Sqlca);
DataOperatorUtil.copySingleJBO(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITRETURN_INFO.CLASS_NAME, null, null, Sqlca);
//Ð޸ľ­ÏúÉÌ×Üî
BigDecimal sums = new BigDecimal(dst.getAttribute(DISTRIBUTOR_INFO_TEMP.SUMS).getString());
BigDecimal cautionMoney = new BigDecimal(deit.getAttribute(D_DEPOSITRETURN_INFO_TEMP.CAUTION_MONEY).getString());
double num = sums.subtract(cautionMoney).doubleValue();
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set SUMS='"+num+"' where distributor_no='"+disStatus+"'").executeUpdate();
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set SUMS='"+num+"' where distributor_no='"+DistributorNo+"'").executeUpdate();
return "true";
}
}

View File

@ -4,7 +4,6 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
@ -15,6 +14,7 @@ import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.log.Log;
import com.base.util.QuartzUtil;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.reckon.util.DateUtil;
@ -61,7 +61,9 @@ public class AdjustStartDateYear implements Job {
logger.info("起租日年调息完成");
tx.commit();
QuartzUtil.insertLog("com.tenwa.reckon.adjustInterest.AdjustStartDateYear", "success", "成功");
} catch (Exception e) {
QuartzUtil.insertLog("com.tenwa.reckon.adjustInterest.AdjustStartDateYear", "success", "失败");
try {
if(tx!=null){
tx.rollback();

View File

@ -199,6 +199,7 @@ public class CreateTransactionExecutor implements Transaction {
String insertSql="insert into lc_rent_plan(id,quot_id,cust_id, project_id, project_plan_number,contract_id,contract_plan_number,payment_number,plan_list,plan_date,plan_status,rent,corpus,interest,penalty,corpus_business,interest_business,rent_adjust,all_remain_corpus,settle_method,coin,year_rate,memo,flowunid,inputuserid,inputorgid,inputtime,updateuserid,updateorgid,updatetime,interest_date) select id,quot_id,cust_id, project_id, project_plan_number,contract_id,contract_plan_number,payment_number,plan_list,plan_date,plan_status,rent,corpus,interest,penalty,corpus_business,interest_business,rent_adjust,all_remain_corpus,settle_method,coin,year_rate,memo,flowunid,inputuserid,inputorgid,inputtime,updateuserid,updateorgid,updatetime,interest_date from lc_pay_rent_plan where payment_number = '" + this.plannumber + "'";
Sqlca.executeSQL(new SqlObject(insertSql));
Connection conn = Sqlca.getConnection(Sqlca);
//实际租金计划日期开始
PreparedStatement ps = conn.prepareStatement("update lc_rent_plan set plan_date = ? where payment_number = '" + this.plannumber + "' and plan_list = ?");
for(int i = 0; i < planDateList.size(); i ++) {
ps.setString(1, planDateList.get(i));
@ -211,6 +212,7 @@ public class CreateTransactionExecutor implements Transaction {
if(planDateList.size()>0)boLCC.setAttributeValue("first_plan_date", planDateList.get(0));
if(planDateList.size()>1)boLCC.setAttributeValue("second_plan_date", planDateList.get(1));
Bm.saveObject(boLCC);
//实际租金计划日期结束
Sqlca.executeSQL(new SqlObject("update lc_fund_plan set plan_date = '" + planDateList.get(planDateList.size() - 1) + "' where payment_number = '" + this.plannumber + "' and pay_type = 'pay_type_out' and fee_type != 'feetype10'"));
Sqlca.executeSQL(new SqlObject("update lc_fund_plan set plan_date = '" + startDate + "' where payment_number = '" + this.plannumber + "' and pay_type = 'pay_type_in' and fee_type != 'feetype4' and fee_type != 'feetype12'"));
Sqlca.executeSQL(new SqlObject("update lc_fund_plan set plan_date = '" + startDate + "' where payment_number = '" + this.plannumber + "' and fee_type = 'feetype10'"));
@ -300,7 +302,7 @@ public class CreateTransactionExecutor implements Transaction {
//AdjustBean ab = ObjectConvertUtils.converBizObjectToBean(AdjustBean.class, bo);
RentTerminateExe exe = new RentTerminateExe(tx);
FundRentPlanBean rentPlan = exe.create(bean.getCb(), bo, bean);
this.createFundPlan(rentPlan, bean,tx);
this.createFundPlanTerminate(rentPlan, bean,tx,bo);
this.createCashFlow(bean,tx);
jsonObject.appendElement("result", "true");
this.callBack(jsonObject, bean.getCb(), bean,rentPlan,false,tx);
@ -406,7 +408,13 @@ public class CreateTransactionExecutor implements Transaction {
FundFundPlanExecutor fundFundExecutor = new FundFundPlanExecutor();
fundFundExecutor.run(bean.getCb(), bean, planBean,tx);
}
@Override
public void createFundPlanTerminate(FundRentPlanBean planBean, TabCalBean bean,JBOTransaction tx,BizObject bo)
throws Exception {
FundFundPlanExecutor fundFundExecutor = new FundFundPlanExecutor();
fundFundExecutor.runTerminate(bean.getCb(), bean, planBean,tx,bo);
}
@Override
public String createCashFlow(TabCalBean bean,JBOTransaction tx) throws Exception {
CashFlowExecutor executor = new CashFlowExecutor(tx);

View File

@ -7,9 +7,10 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import jbo.app.tenwa.calc.LC_FUND_PLAN;
import jbo.sys.CODE_LIBRARY;
import jbo.app.tenwa.calc.LC_FUND_PLAN_TEMP;
import com.amarsoft.app.util.ProductParamUtil;
import com.amarsoft.app.util.StringUtil;
@ -41,6 +42,108 @@ public class FundFundPlanExecutor {
this.delete(tcb,tx);
this.add(fundPlanBeans, tcb,tx);
}
public void runTerminate(ConditionBean cb , TabCalBean tcb,FundRentPlanBean rentPlan,JBOTransaction tx,BizObject bo) throws Exception{
cb.setDocId(tcb.getDocId());
List<FundPlanBean> fundPlanBeans=new ArrayList<FundPlanBean>();
if(Double.parseDouble(cb.getCautionDeductionMoney()) > 0 ){
fundPlanBeans = splitFundFundPlan(rentPlan, cb, "", "feetype17","feetype16");
}else{
cb.setDeductionLastPlanDate(cb.getLastPlanDate());//不生成保证金抵扣及退还计划
}
fundPlanBeans = this.create(tcb,fundPlanBeans,tx);
fundPlanBeans = this.createTerminate(tcb,fundPlanBeans,tx,bo);
this.delete(tcb,tx);
this.add(fundPlanBeans, tcb,tx);
}
private List<FundPlanBean> createTerminate(TabCalBean tcb,List<FundPlanBean> fundPlanBeans,JBOTransaction tx,BizObject bo) throws Exception{
FundPlanBean ffcp = null;
String custid="";
if("quoted_price".equals(tcb.getCalType())){
custid=tcb.getDocId();
}else if(tcb.getUserId()==null||tcb.getUserId().equals("")){
}else{
String sql2="select customer_id from "+tcb.getUserId()+" where flowunid='"+tcb.getDocId()+"'";
List<Map<String,String>> list=DataOperatorUtil.getDataBySql(tx, sql2, null);
if(list.size()>0){
custid=list.get(0).get("customer_id");
}
}
String paydayAdjust=bo.getAttribute("PAYDAY_ADJUST").toString();//终止日
for (FundPlanBean fundPlanBean : fundPlanBeans) {
if("feetype16".equals(fundPlanBean.getFeeType())&&"pay_type_out".equals(fundPlanBean.getPayType())){
fundPlanBean.setPlanDate(paydayAdjust);
break;
}
}
BizObjectManager bm=JBOFactory.getBizObjectManager(tcb.getFundFundPlan_tb(), tx);
String sdnominalPrice=bo.getAttribute("SDNOMINAL_PRICE").toString();
if(Float.parseFloat(sdnominalPrice)>0){
ffcp=new FundPlanBean();
BizObject bo4 = bm.createQuery("select * from O where FEE_TYPE='feetype4' and PAY_TYPE='pay_type_in' and flowunid=:flowunid ").setParameter("flowunid", tcb.getDocId()).getSingleResult(true);
if(bo4!=null){
ffcp.setId(bo4.getAttribute("ID").toString());
ffcp.setFeeType(bo4.getAttribute(LC_FUND_PLAN_TEMP.FEE_TYPE).toString());//商定留购价
ffcp.setPlanList(bo4.getAttribute(LC_FUND_PLAN_TEMP.PLAN_LIST).toString());
ffcp.setSettleMethod(bo4.getAttribute(LC_FUND_PLAN_TEMP.SETTLE_METHOD).toString());
ffcp.setPayType(bo4.getAttribute(LC_FUND_PLAN_TEMP.PAY_TYPE).toString());
ffcp.setPlanDate(paydayAdjust);
ffcp.setPlanMoney(sdnominalPrice);
ffcp.setPayCust(custid);
fundPlanBeans.add(ffcp);
}else{
ffcp.setId(UUID.randomUUID().toString().replaceAll("-", ""));
ffcp.setFeeType("feetype4");//商定留购价
ffcp.setPlanList("1");
ffcp.setSettleMethod("payfund6");
ffcp.setPayType("pay_type_in");
ffcp.setPlanDate(paydayAdjust);
ffcp.setPlanMoney(sdnominalPrice);
ffcp.setPayCust(custid);
fundPlanBeans.add(ffcp);
}
}
String sdhandlingCharge=bo.getAttribute("SDHANDLING_CHARGE").toString();
if(Float.parseFloat(sdhandlingCharge)>0){
ffcp=new FundPlanBean();
ffcp.setId(UUID.randomUUID().toString().replaceAll("-", ""));
ffcp.setFeeType("feetype30");//商定违约金
ffcp.setPlanList("1");
ffcp.setSettleMethod("payfund6");
ffcp.setPayType("pay_type_in");
ffcp.setPlanDate(paydayAdjust);
ffcp.setPlanMoney(sdhandlingCharge);
ffcp.setPayCust(custid);
fundPlanBeans.add(ffcp);
}
String fistCorpus=bo.getAttribute("FIST_CORPUS").toString();
if(Float.parseFloat(fistCorpus)>0){
ffcp=new FundPlanBean();
ffcp.setId(UUID.randomUUID().toString().replaceAll("-", ""));
ffcp.setFeeType("feetype31");//商定一年内剩余利息
ffcp.setPlanList("1");
ffcp.setSettleMethod("payfund6");
ffcp.setPayType("pay_type_in");
ffcp.setPlanDate(paydayAdjust);
ffcp.setPlanMoney(fistCorpus);
ffcp.setPayCust(custid);
fundPlanBeans.add(ffcp);
}
String otherIn=bo.getAttribute("OTHER_IN").toString();
if(Float.parseFloat(otherIn)>0){
ffcp=new FundPlanBean();
ffcp.setId(UUID.randomUUID().toString().replaceAll("-", ""));
ffcp.setFeeType("feetype8");//其他应收
ffcp.setPlanList("1");
ffcp.setSettleMethod("payfund6");
ffcp.setPayType("pay_type_in");
ffcp.setPlanDate(paydayAdjust);
ffcp.setPlanMoney(otherIn);
ffcp.setPayCust(custid);
fundPlanBeans.add(ffcp);
}
return fundPlanBeans;
}
//´´½¨×Ê½ð¼Æ»®
private List<FundPlanBean> create(TabCalBean tcb,List<FundPlanBean> fundPlanBeans,JBOTransaction tx) throws Exception{
//»ñÈ¡²úÆ·×âÁÞÎïÀàÐÍÅäÖÃ
@ -136,6 +239,7 @@ public class FundFundPlanExecutor {
//ɾ³ý×Ê½ð¼Æ»®
private void delete(TabCalBean tcb,JBOTransaction tx) throws Exception{
String sql = " delete from O where flowunid='" + tcb.getDocId() + "' and "+tcb.getPlanCName()+"='"+tcb.getPlanCValue()+"'";
System.out.println(sql);
BizObjectManager bm=JBOFactory.getBizObjectManager(tcb.getFundFundPlan_tb(), tx);
bm.createQuery(sql).executeUpdate();
}

View File

@ -145,7 +145,7 @@ public class RentCalHelper {
+ " sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.remaininterest else 0 end ) remaininterest, "
+" sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.corpus else 0 end ) remainfincorpus,"
+" sum(case when DATE_FORMAT( t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.interest else 0 end ) remainfininterest,"
+" sum(case when DATE_FORMAT( t.plandate,'%Y/%m/%d') < DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.overduerent else 0 end ) overduerent,sum(case when t.cou< t.planlist and t.planlist-t.cou<=12-t.cou then t.rent else 0 end) fist_rent,"
+" sum(case when DATE_FORMAT( t.plandate,'%Y/%m/%d') < DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.overduerent else 0 end ) overduerent,sum(case when t.cou< t.planlist and t.planlist-t.cou<=12-t.cou then t.interest else 0 end) fist_rent,"
+ " sum(case when t.cou< t.planlist and t.planlist-t.cou>12-t.cou then t.corpus else 0 end) fist_corpus,"
+ " max( case when DATE_FORMAT(t.plandate, '%Y/%m/%d') < DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.plandate else '0' end) plandate"
+ " from ("
@ -224,7 +224,7 @@ public class RentCalHelper {
+ " sum(case ffp.pay_type when 'pay_type_out' then ffp.plan_money else 0 end)sumplanout, "
+ " min(ffp.contract_id) contractid,min(ffp.payment_number) paymentnumber "
+ " from LC_FUND_PLAN ffp "
+ " where ffp.contract_id = ? and ffp.payment_number=?"
+ " where ffp.contract_id = ? and ffp.payment_number=? "
+ " )t2 on t1.contractid = t2.contractid and t1.paymentnumber=t2.paymentnumber left join lc_calc_condition lc on lc.CONTRACT_ID=t2.contractid";
if("ORACLE".equals(InitDBType.DBTYPE)){
fundSql=fundSql.replaceAll("ifnull", "nvl");
@ -255,6 +255,49 @@ public class RentCalHelper {
}
return JSONEncoder.encode(jsonObject);
}
public String getTerminateOtherInfoFinish() throws Exception {
JSONObject jsonObject = JSONObject.createObject();
String fundSql = "select t2.sumplanin,t2.sumplanout,max(lc.NOMINAL_PRICE) nominalprice from ( "
+ " select sum(case ffc.pay_type when 'pay_type_in' then ffc.fact_money else 0 end )sumchargein, "
+ " sum(case ffc.pay_type when 'pay_type_out' then ffc.fact_money else 0 end )sumchargeout, "
+ " min(ffc.contract_id) contractid,min(ffc.payment_number) paymentnumber "
+ " from LC_FUND_INCOME ffc where ffc.contract_id = ? and ffc.payment_number=? "
+ " )t1 right join "
+ " (select sum(case ffp.pay_type when 'pay_type_in' then ffp.plan_money else 0 end )sumplanin, "
+ " sum(case ffp.pay_type when 'pay_type_out' then ffp.plan_money else 0 end)sumplanout, "
+ " min(ffp.contract_id) contractid,min(ffp.payment_number) paymentnumber "
+ " from LC_FUND_PLAN ffp "
+ " where ffp.contract_id = ? and ffp.payment_number=? and ffp.FEE_TYPE='feetype16' "
+ " )t2 on t1.contractid = t2.contractid and t1.paymentnumber=t2.paymentnumber left join lc_calc_condition lc on lc.CONTRACT_ID=t2.contractid";
if("ORACLE".equals(InitDBType.DBTYPE)){
fundSql=fundSql.replaceAll("ifnull", "nvl");
}
JBOTransaction tx=null;
try {
tx=JBOFactory.createJBOTransaction();
Conn conn = new Conn(tx);
List<Map<String, String>> list = conn.executeQuery(fundSql, this.contractId ,this.getPaymentnumber(), this.contractId,this.getPaymentnumber());
if(null != list && list.size() > 0 ){
Map<String, String> fundMap = list.get(0);
jsonObject.appendElement("OTHER_IN",fundMap.get("sumplanin"));
jsonObject.appendElement("OTHER_OUT",fundMap.get("sumplanout"));
jsonObject.appendElement("NOMINAL_PRICE",fundMap.get("nominalprice"));
}else{
jsonObject.appendElement("OTHER_IN","0");
jsonObject.appendElement("OTHER_OUT","0");
jsonObject.appendElement("NOMINAL_PRICE","0");
}
} catch (JBOException e) {
tx.rollback();
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
if(tx!=null){
tx.commit();
}
}
return JSONEncoder.encode(jsonObject);
}
public String getContractId() {

View File

@ -3,6 +3,7 @@ package com.tenwa.reckon.executor;
import java.io.InputStream;
import java.util.Map;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.json.JSONObject;
import com.tenwa.reckon.bean.AdjustBean;
@ -60,4 +61,5 @@ public interface Transaction {
public String runTerminate() throws Exception;
public int importRentPlan(String fileName,InputStream sourceFile,Map<String,String>sourceMap) throws Exception;
public void createFundPlanTerminate(FundRentPlanBean rentPlan, TabCalBean bean,JBOTransaction tx,BizObject bo) throws Exception;
}

View File

@ -78,12 +78,12 @@ public class RentTerminateExe {
rentNew.setAttributeValue("plan_list", rent_list);
rentNew.setAttributeValue("plan_date",payMoneyday);
rentNew.setAttributeValue("plan_status","δ»ØÁý");
rentNew.setAttributeValue("rent", contractTotal);
rentNew.setAttributeValue("rent", endCorpus);
rentNew.setAttributeValue("PENALTY",bo.getAttribute("AGREED_PENALTY").getString());
rentNew.setAttributeValue("corpus_business", endCorpus);
rentNew.setAttributeValue("year_rate", yearRate);
rentNew.setAttributeValue("interest_business", endInterest);
rentNew.setAttributeValue("interest", new BigDecimal(contractTotal).subtract(endCorpus).toString());
rentNew.setAttributeValue("interest_business", "0");
rentNew.setAttributeValue("interest", "0");
rentNew.setAttributeValue("corpus", endCorpus);
rentNew.setAttributeValue("ALL_REMAIN_CORPUS", corpusMoney);
bm.saveObject(rentNew);

View File

@ -816,8 +816,8 @@ public class ProductCondition {
for(String key:map.keySet()){
if(!("EQUIP_AMT".equals(key)||"FIRST_PAYMENT".equals(key))){//设备款和首付款不管
if("feetype_test".equals(key)){//测试费用
this.prodSer.createFeeColRatioApp(appList, key, map.get(key));
this.prodSer.createFeeColApp(appList, key, map.get(key));
this.prodSer.createFeeColRatioApp(appList, key, map.get(key));
}
}
}

View File

@ -0,0 +1,4 @@
#附件预览配置文件,flow --流程附件
CarReclaimFlow=flow
CarEvaluateFlow=flow
CarDisposeFlow=flow

View File

@ -9,6 +9,7 @@ import org.quartz.JobExecutionException;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.base.util.QuartzUtil;
public class HelloJob implements Job {
@ -21,8 +22,9 @@ public class HelloJob implements Job {
BizObject bo = bom.newObject();
bom.saveObject(bo);
//SendMessageUtil.sendMessageByHttpClient("13764771906", "²âÊÔ¶ÌÐÅ£¡");
QuartzUtil.insertLog("com.amarsoft.app.util.HelloJob", "success", "成功");
} catch (Exception e) {
// TODO Auto-generated catch block
QuartzUtil.insertLog("com.amarsoft.app.util.HelloJob", "success", "失败");
e.printStackTrace();
}
}

View File

@ -0,0 +1,29 @@
package com.amarsoft.app.util;
import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP;
import jbo.app.tenwa.calc.LC_CASH_FLOW_TEMP;
import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.base.constant.RestfullConstant;
public class ReloadCalculationToolAction {
public String cleanCalculationToolData() throws Exception {
// ¨Òå±äÁ¿
String sReturn = "SUCCESS";
String flowUnid = RestfullConstant.baseProperty
.get("CALCULATION_TOOL_FLOW_UNID") == null ? ""
: RestfullConstant.baseProperty.get(
"CALCULATION_TOOL_FLOW_UNID").toString();
BizObjectManager conditionM = JBOFactory.getBizObjectManager(LC_CALC_CONDITION_TEMP.CLASS_NAME);
BizObjectManager rentM = JBOFactory.getBizObjectManager(LC_RENT_PLAN_TEMP.CLASS_NAME);
BizObjectManager cash = JBOFactory.getBizObjectManager(LC_CASH_FLOW_TEMP.CLASS_NAME);
conditionM.createQuery("delete from O WHERE FLOWUNID=:FLOWUNID").setParameter("FLOWUNID", flowUnid).executeUpdate();
rentM.createQuery("delete from O WHERE FLOWUNID=:FLOWUNID").setParameter("FLOWUNID", flowUnid).executeUpdate();
cash.createQuery("delete from O WHERE FLOWUNID=:FLOWUNID").setParameter("FLOWUNID", flowUnid).executeUpdate();
return sReturn;
}
}

View File

@ -36,6 +36,7 @@ public class FileTemplateUtil {
public String templateIds;//要生成的合同模板
public String flowunid;//用于查询已经生成的合同
public String leasform;//用判断租赁方式
public String contractId;
public String getTemplateCalss() {return templateCalss;}
public void setTemplateCalss(String templateCalss) {this.templateCalss = templateCalss;}
@ -69,6 +70,13 @@ public class FileTemplateUtil {
public void setLeasform(String leasform) {
this.leasform = leasform;
}
public String getContractId() {
return contractId;
}
public void setContractId(String contractId) {
this.contractId = contractId;
}
public String getTemplateClass(Transaction Sqlca) throws Exception{
String fileClass=templateCalss.replaceAll("@", ",");
List<String>tempFiles=new ArrayList<String>();
@ -167,6 +175,7 @@ public class FileTemplateUtil {
}
}
}
tx.commit();
return message.toString();
}
@ -193,7 +202,7 @@ public class FileTemplateUtil {
String[] bfids = templateIds.split("&");
BizObjectManager btManager = JBOFactory.getBizObjectManager(BF_TEMPLATE.CLASS_NAME);
BizObjectManager ldclManager = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME);
List<BizObject> ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and flow_unid=:flowunid").setParameter("flowunid", flowunid).getResultList(false);
List<BizObject> ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and ( flow_unid=:flowunid or contract_id=:contractid ) ").setParameter("flowunid", flowunid).setParameter("contractid", contractId).getResultList(false);
for(int i=0;i<bfids.length;i++){
BizObject templatename = btManager.createQuery("select templatename from O where id=:id").setParameter("id", bfids[i]).getSingleResult(false);
for(BizObject ldcl:ldcls){
@ -205,7 +214,7 @@ public class FileTemplateUtil {
if(docName.length()>0){
docName=docName+"已存在,请先删除后再生成!";
}
tx.commit();
return docName;
}

View File

@ -1474,6 +1474,8 @@ public void wordToPdfJar(JBOTransaction tx){
DOCRELATIVE = bom.createQuery("CONTRACT_ID=:CONTRACT_ID and objecttype='끓홈瘻盧데'").setParameter("CONTRACT_ID",contract_id).getSingleResult(false);
}else if("settle".equals(PLAN_LIST)){
DOCRELATIVE = bom.createQuery("CONTRACT_ID=:CONTRACT_ID and objecttype='瓊품써헌聯츠'").setParameter("CONTRACT_ID",contract_id).getSingleResult(false);
}else if("TX".equals(PLAN_LIST)){
DOCRELATIVE=bom.createQuery("plan_number=:plan_number and objecttype='AdjustInterst' ").setParameter("plan_number",PAYMENT_NUMBER).getSingleResult(false);
}else{
DOCRELATIVE=bom.createQuery("plan_number=:plan_number and plan_list=:plan_list").setParameter("plan_number",PAYMENT_NUMBER).setParameter("plan_list", PLAN_LIST).getSingleResult(false);
}

View File

@ -20,6 +20,8 @@ import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.lang.StringX;
import com.amarsoft.awe.dw.ui.validator.ValidateRule;
import com.base.constant.RestfullConstant;
import com.base.util.DateUtil;
import com.tenwa.reckon.bean.TabCalBean;
import com.tenwa.reckon.product.ProductCondition;
import com.tenwa.reckon.util.TbBeanTools;
@ -27,7 +29,7 @@ import com.tenwa.util.SerialNumberUtil;
public class ProductBaseLoanTools {
@SuppressWarnings("unchecked")
public static Map<String, Object> checkSource(Map<String, Object> app,
public static Map<String, Object> checkSource(Map<String, Object> app,
String colName, String operation, Object value) {
if (operation.contains("defaultValue")) {
app.put("coldefaultvalue", value);
@ -36,58 +38,69 @@ public class ProductBaseLoanTools {
return app;
}
}
Map<String, Object> donoTemp = (Map<String, Object>) (AppAweDoCache.getAppAweDoCachePool().get("LoanSimulationBasicInfoApp"));
List<Map<String, Object>> libarary = (List<Map<String, Object>>) (donoTemp.get("library"));
Map<String, Object> donoTemp = (Map<String, Object>) (AppAweDoCache
.getAppAweDoCachePool().get("LoanSimulationBasicInfoApp"));
List<Map<String, Object>> libarary = (List<Map<String, Object>>) (donoTemp
.get("library"));
String source = "";
String sourceType = "";
app.put("coldefaultitemno", value);
for (Map<String, Object> col : libarary) {
String sColName = col.get("colname") == null ? "" : col.get("colname").toString();
String sColName = col.get("colname") == null ? "" : col.get(
"colname").toString();
if (sColName.equals(colName)) {
source = col.get("coleditsource") == null ? "" : col.get("coleditsource").toString();
sourceType = col.get("coleditsourcetype") == null ? "" : col.get("coleditsourcetype").toString();
source = col.get("coleditsource") == null ? "" : col.get(
"coleditsource").toString();
sourceType = col.get("coleditsourcetype") == null ? "" : col
.get("coleditsourcetype").toString();
break;
}
}
source = app.get("coleditsource") == null ? source : app.get("coleditsource").toString();
sourceType = app.get("coleditsourcetype") == null ? sourceType : app.get("coleditsourcetype").toString();
source = app.get("coleditsource") == null ? source : app.get(
"coleditsource").toString();
sourceType = app.get("coleditsourcetype") == null ? sourceType : app
.get("coleditsourcetype").toString();
if (StringX.isSpace(source)) {
return app;
}
if (StringX.isSpace(sourceType)) {
return app;
}
if ("Code".equals(sourceType)) { // CODENO='SettleMethod'
try {
String itemno = value == null ? null : value.toString();
BizObjectManager bom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME);
BizObject bo = bom.createQuery("CODENO=:CODENO and itemno=:itemno")
.setParameter("CODENO", source).setParameter("itemno", itemno)
.getSingleResult(false);
BizObjectManager bom = JBOFactory
.getBizObjectManager(CODE_LIBRARY.CLASS_NAME);
BizObject bo = bom
.createQuery("CODENO=:CODENO and itemno=:itemno")
.setParameter("CODENO", source)
.setParameter("itemno", itemno).getSingleResult(false);
if (null == bo) {
return app;
}
app.put("coldefaultvalue", bo.getAttribute("itemname").getValue());
app.put("coldefaultvalue", bo.getAttribute("itemname")
.getValue());
return app;
} catch (JBOException e) {
ARE.getLog().error(e);
return app;
}
} else if ("CodeTable".equals(sourceType)) { // ,,,
try {
String itemno = value == null ? null : value.toString();
int size = source.split(",").length;
if (size > 0 && size % 2 == 0) {
String [] array = source.split(",");
String[] array = source.split(",");
for (int i = 0; i < size; i++) {
if (i!=0 && i + 1 > size) break;
if (i != 0 && i + 1 > size)
break;
String itemno2 = array[i];
if (itemno2.equalsIgnoreCase(itemno)) {
app.put("coldefaultvalue", array[i+1]);
app.put("coldefaultvalue", array[i + 1]);
break;
}
i++;
@ -118,45 +131,43 @@ public class ProductBaseLoanTools {
}
BizObjectManager bom = JBOFactory
.getBizObjectManager(sClass);
BizObjectQuery boq = bom.createQuery("SELECT "
+ sKey + ", " + sValue
+ " FROM O WHERE " + sWhere);
BizObjectQuery boq = bom.createQuery("SELECT " + sKey
+ ", " + sValue + " FROM O WHERE " + sWhere);
List<BizObject> bos = boq.getResultList(false);
for (BizObject bo : bos) {
// sDefult
if (itemno.equals(bo.getAttribute(sKey)
.getValue())) {
app.put("coldefaultvalue", bo.getAttribute(sValue)
.getValue());
if (itemno.equals(bo.getAttribute(sKey).getValue())) {
app.put("coldefaultvalue",
bo.getAttribute(sValue).getValue());
return app;
}
}
}
}
}
} catch (JBOException e) {
ARE.getLog().error(e);
return app;
}
} else if ("@MIN_MAX".equals(sourceType)) { // 6,8
try {
String itemno = value == null ? null : value.toString();
int size = source.split(",").length;
if (size == 2) {
String [] array = source.split(",");
String itemno2 = array[0];
String itemno3 = array[1];
int min = Integer.valueOf(itemno2);
int max = Integer.valueOf(itemno3);
int iin = Integer.valueOf(itemno);
if(min <= iin && iin <= max) {
app.put("coldefaultvalue", iin);
return app;
} else {
app.put("coldefaultvalue", value);
return app;
}
String[] array = source.split(",");
String itemno2 = array[0];
String itemno3 = array[1];
int min = Integer.valueOf(itemno2);
int max = Integer.valueOf(itemno3);
int iin = Integer.valueOf(itemno);
if (min <= iin && iin <= max) {
app.put("coldefaultvalue", iin);
return app;
} else {
app.put("coldefaultvalue", value);
return app;
}
} else {
return app;
}
@ -204,14 +215,16 @@ public class ProductBaseLoanTools {
appList = new ArrayList<Map<String, Object>>();
ProductCondition pc = new ProductCondition();
pc.getProductFundRulesApp(appList, productId);
//获取产品名称
BizObject bo = JBOFactory.createBizObjectQuery(BUSINESS_TYPE.CLASS_NAME,"typeno=:productID")
.setParameter("productID", productId).getSingleResult(false);
// 获取产品名称
BizObject bo = JBOFactory
.createBizObjectQuery(BUSINESS_TYPE.CLASS_NAME,
"typeno=:productID")
.setParameter("productID", productId).getSingleResult(false);
String productName = bo.getAttribute("typename").getString();
ProductBaseLoanTools.addAppList(appList, "PRODUCT_NAME", "coldefaultvalue", productName);
ProductBaseLoanTools.addAppList(appList, "PRODUCT_NAME",
"coldefaultvalue", productName);
/* 设置模板属性 */
Vector<ValidateRule> vali = new Vector<ValidateRule>();
String calcRules = pc.getProductRulesApp(appList, productId, vali);
@ -219,26 +232,55 @@ public class ProductBaseLoanTools {
}
// end
@SuppressWarnings("unused")
public static String getProdouctName(String productId) throws JBOException {
String productName = "";
BizObject bo = JBOFactory
.createBizObjectQuery(BUSINESS_TYPE.CLASS_NAME,
"typeno=:productID")
.setParameter("productID", productId).getSingleResult(false);
productName = bo.getAttribute("typename").getString();
if (null == bo) return productName;
return productName;
}
// begin 获取 测算基础值及流水号
public static Map<String, Object> deadWork(String productId,
String calType, String planCName, String plannumber, String tb,
String flowunid, JBOTransaction tx) throws Exception {
String flowunid, String userId, JBOTransaction tx) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
/* 获取参数 */
/* 根据参数判断 是否去数据库查询 */
BizObject flow = GetFlowAction.getFlowBussinessObject(flowunid);
if (productId == null) {
productId = flow.getAttribute("productId").getString();
}
map.put("productId", productId);
if (calType == null) {
calType = "proj_process";
}
map.put("calType", calType);
TabCalBean tcb = TbBeanTools.getTabInfo(calType);
planCName = tcb.getPlanCName();
map.put("planCName", planCName);
map.put("planCName", planCName); // 测算计划条件编号字段名称
tb = tcb.getCondition_tb();
map.put("tb", tb); // 测算计划条件主表名称
/* 获取参数 */
/* 根据参数判断 是否去数据库查询 */
BizObject flow = GetFlowAction.getFlowBussinessObject(flowunid);
if (productId == null) {
productId = flow.getAttribute("productId").getString();
map.put("productId", productId);
map.put("productName", getProdouctName(productId));
map.put("objectNo", flowunid);
} else {
String ts = DateUtil.timeStamp();
map.put("plannumber", userId + ts);
flowunid = RestfullConstant.baseProperty
.get("CALCULATION_TOOL_FLOW_UNID") == null ? ""
: RestfullConstant.baseProperty.get(
"CALCULATION_TOOL_FLOW_UNID").toString();
map.put("objectNo", flowunid);
map.put("productId", productId); // 产品id
map.put("productName", getProdouctName(productId));
return map;
}
// 方案编号
if (plannumber == null) {
if ("pay_process".equals(calType)
@ -290,8 +332,6 @@ public class ProductBaseLoanTools {
tx.commit();
}
map.put("plannumber", plannumber);
tb = tcb.getCondition_tb();
map.put("tb", tb);
return map;
}
// end

View File

@ -8,7 +8,6 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jbo.prd.BUSINESS_TYPE;
import apx.com.amarsoft.als.apzl.apply.business.loan.manage.LCRentPlanTempDoQueryManage;
import apx.com.amarsoft.als.apzl.apply.business.loan.manage.LoanSimulationBasicInfoAppInfoDoManage;
import apx.com.amarsoft.als.apzl.apply.business.loan.manage.LoanSimulationBasicInfoAppInfoSaveDoManage;
@ -17,8 +16,8 @@ import apx.com.amarsoft.als.apzl.apply.business.loan.service.LoanSimulationBasic
import com.amarsoft.app.lc.workflow.action.GetFlowAction;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.lang.StringX;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.context.ASUser;
import com.base.constant.RestfullConstant;
@ -48,14 +47,23 @@ public class LoanSimulationBasicServiceImpl implements
fieldMap.put("flow_unid".toLowerCase(), flowunid);
fieldMap.put("flow_unid".toUpperCase(), flowunid);
String productId = fieldMap.get("productId".toLowerCase()) == null ? null
: fieldMap.get("productId".toLowerCase()).toString();
String userId = fieldMap.get("userId".toLowerCase()) == null ? ""
: fieldMap.get("userId".toLowerCase()).toString();
productId = StringX.isSpace(productId) ? null : productId;
// 获取 测算基础值及流水号
Map<String, Object> baseMap = ProductBaseLoanTools.deadWork(null, null,
null, null, null, flowunid, tx);
Map<String, Object> baseMap = productId == null ? ProductBaseLoanTools
.deadWork(null, null, null, null, null, flowunid, userId, tx)
: ProductBaseLoanTools.deadWork(productId, null, null, null,
null, null, userId, tx);
productId = baseMap.get("productId") == null ? "" : baseMap.get(
"productId").toString();
// 费用规则
List<Map<String, Object>> appList = new ArrayList<Map<String, Object>>();
String calcRules = ProductBaseLoanTools.getProductFundRules(appList,
baseMap.get("productId").toString());
productId);
Map<String, Object> calcRulesMap = JsonUtil.str2JSONObject(calcRules);
@ -65,18 +73,12 @@ public class LoanSimulationBasicServiceImpl implements
body.put("tb", baseMap.get("tb"));
body.put("calType", baseMap.get("calType"));
body.put("objectNo", baseMap.get("objectNo"));
body.put("productId", baseMap.get("productId"));
body.put("productName", baseMap.get("productName"));
body.put("productDatas", appList);
body.put("productFundRules", calcRulesMap);
// »ñÈ¡²úÆ·Ãû³Æ
BizObject bo = JBOFactory
.createBizObjectQuery(BUSINESS_TYPE.CLASS_NAME,
"typeno=:productID")
.setParameter("productID", baseMap.get("productId").toString())
.getSingleResult(false);
String productName = bo.getAttribute("typename").getString();
body.put("productName", productName);
ReturnMapUtil.setReturnMap(body,
RestfullConstant.baseProperty.get("success").toString(), "");
return ReturnMapUtil.getReturnMap();
@ -172,6 +174,10 @@ public class LoanSimulationBasicServiceImpl implements
/* 获取参数 */
/* 根据参数判断 是否去数据库查询 */
BizObject flow = GetFlowAction.getFlowBussinessObject(flowunid);
if (null == flow) {
productId = fieldMap.get("productId".toLowerCase()) == null ? null
: fieldMap.get("productId".toLowerCase()).toString(); // ·½°¸±àºÅ
}
if (productId == null) {
productId = flow.getAttribute("productId").getString();
}

View File

@ -11,7 +11,6 @@ import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP;
import jbo.app.tenwa.doc.LB_DOCATTRIBUTE;
import jbo.app.tenwa.doc.LB_DOCRELATIVE;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import net.sf.json.JSON;
import net.sf.json.JSONObject;
import com.amarsoft.are.ARE;

View File

@ -92,6 +92,7 @@ public class RestfullConstant {
public static final String COMPANY_DOC_NAME = "base.company.doc.name";
public static final String PERSON_DOC_NAME = "base.person.doc.name";
public static final String CALCULATION_TOOL_FLOW_UNID = "base.calculation.tool.flow.unid";
/**
* APP SESSION ĹäÖĂ
@ -199,6 +200,8 @@ public class RestfullConstant {
pro.getProperty(COMPANY_DOC_NAME));
setMap(baseProperty, "PERSON_DOC_NAME",
pro.getProperty(PERSON_DOC_NAME));
setMap(baseProperty, "CALCULATION_TOOL_FLOW_UNID",
pro.getProperty(CALCULATION_TOOL_FLOW_UNID));
}
private static void loadSessionKey(Properties pro) {

View File

@ -7,11 +7,45 @@ import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import com.amarsoft.are.ARE;
public class DateUtil {
public final static String FULL_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";
public final static String TIME_MONTH = "MONTH";
public final static String TIME_DAY = "DAY";
public final static String TIME_YEAR = "YEAR";
public static void main(String[] args) throws InterruptedException {
System.out.println(timeStamp());
Thread.sleep(1000*5);
System.out.println(timeStamp(new Date()));
Thread.sleep(1000*5);
System.out.println(timeStamp(getDateTime(new Date()), "yyyy-MM-dd HH:mm:ss"));
}
/**
* 取得当前时间戳精确到秒
*
* @return
*/
public static String timeStamp() {
long time = System.currentTimeMillis();
String t = String.valueOf(time / 1000);
return t;
}
public static String timeStamp(String dateStr, String format) {
try {
SimpleDateFormat sdf = new SimpleDateFormat(format);
return String.valueOf(sdf.parse(dateStr).getTime() / 1000);
} catch (Exception e) {
System.out.println(e);
e.printStackTrace();
}
return "";
}
public static String timeStamp(Date date) {
return timeStamp(getDateTime(date), "yyyy-MM-dd HH:mm:ss");
}
public static int getIntervalDays(Date startDate, Date endDate) {
if ((null == startDate) || (null == endDate)) {
@ -20,13 +54,14 @@ public class DateUtil {
long intervalMilli = (endDate.getTime() - startDate.getTime());
return (int) (intervalMilli / (24 * 60 * 60 * 1000));
}
@SuppressWarnings("static-access")
public static String getNexMonthDate(Date date, int iInterval, String returnForMat) {
public static String getNexMonthDate(Date date, int iInterval,
String returnForMat) {
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
calendar.add(calendar.MONTH, iInterval);// 把日期往后增加一个月.整数往后推,负数往前移动
date=calendar.getTime(); //这个时间就是日期往后推一天的结果
date = calendar.getTime(); // 这个时间就是日期往后推一天的结果
String sDate = DateUtil.getSystemTimeByFormat(date, returnForMat);
return sDate;
}
@ -39,25 +74,25 @@ public class DateUtil {
int day2 = aCalendar.get(Calendar.DAY_OF_YEAR);
return day2 - day1;
}
public static int getMonthSpace(String date1, String date2)
throws ParseException {
throws ParseException {
int result = 0;
int result = 0;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
Calendar c1 = Calendar.getInstance();
Calendar c2 = Calendar.getInstance();
Calendar c1 = Calendar.getInstance();
Calendar c2 = Calendar.getInstance();
c1.setTime(sdf.parse(date1));
c2.setTime(sdf.parse(date2));
c1.setTime(sdf.parse(date1));
c2.setTime(sdf.parse(date2));
result = c2.get(Calendar.MONTH) - c1.get(Calendar.MONTH);
result = c2.get(Calendar.MONTH) - c1.get(Calendar.MONTH);
return result+( c2.get(Calendar.YEAR) - c1.get(Calendar.YEAR))*12;
return result + (c2.get(Calendar.YEAR) - c1.get(Calendar.YEAR)) * 12;
}
}
public static String addDate(Date startDate, String type, Integer num) {
Calendar aCalendar = Calendar.getInstance();
@ -170,12 +205,13 @@ public class DateUtil {
return sdf.format(date);
}
public static void main(String[] args) {
String date = getSystemTimeByFormat(new Date(), "yyyy/MM/dd HH:mm:ss");
System.out.println(date);
String []dateArray = date.split("/");
System.out.println("year :" + dateArray[0]);
System.out.println("month :" + dateArray[1]);
System.out.println("day :" + dateArray[2]);
}
// public static void main(String[] args) {
// String date = getSystemTimeByFormat(new Date(), "yyyy/MM/dd HH:mm:ss");
// System.out.println(date);
// String[] dateArray = date.split("/");
// System.out.println("year :" + dateArray[0]);
// System.out.println("month :" + dateArray[1]);
// System.out.println("day :" + dateArray[2]);
// }
}

View File

@ -0,0 +1,52 @@
package com.base.util;
import com.amarsoft.are.ARE;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.log.Log;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.reckon.util.UUIDUtil;
public class QuartzUtil {
private static Log logger=ARE.getLog();
/**
* 新增串行任务日志
* @param method 执行的方法类的全路径 取数据字典{MissionName}
* @param status 执行状态 success,notexecute,error
* @param Message 异常信息 成功,不执行或方法不存在,失败
*/
public static void insertLog(String method, String status, String Message) {
Transaction tran = Transaction.createTransaction("als");
try {
String sql = "insert into qrtz_serial_log(id,method_name,status,close_date,inputtime,message) select '"+UUIDUtil.getUUID()+"','"
+ method + "','" + status + "','"+StringFunction.getTodayNow().replaceAll(":", "")+"','"
+ StringFunction.getTodayNow().replaceAll(":", "") + "','" + Message
+ "' from dual";
SqlObject so = new SqlObject(sql);
so.setDebugSql(so.getDebugSql().replaceAll("", ":"));
so.setOriginalSql(so.getOriginalSql().replaceAll("", ":"));
so.setRunSql(so.getRunSql().replaceAll("", ":"));
tran.executeSQL(so);
tran.commit();
} catch (Exception e) {
logger.info(e.getMessage());
logger.info("新增任务日志失败");
e.printStackTrace();
try {
if(tran != null)
tran.rollback();
} catch (JBOException e1) {
e1.printStackTrace();
}
}finally{
try {
if(tran != null){
tran.disConnect();
}
} catch (JBOException e) {
e.printStackTrace();
}
}
}
}

View File

@ -81,7 +81,9 @@ public class CreditBodyGuardAction {
String personArr = "";
//获取到的所有人员信息对象存入personList中
List<BizObject> personList = new ArrayList<>();
personList.add(borrowerResult);
if(borrowerResult != null){
personList.add(borrowerResult);
}
if(coborrowerResult != null){
personList.add(coborrowerResult);
}

View File

@ -15,6 +15,7 @@ import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.base.util.QuartzUtil;
public class BaseMessageJob implements Job {
@ -25,7 +26,9 @@ public class BaseMessageJob implements Job {
tx= JBOFactory.createJBOTransaction();
this.executeMessage(tx);
tx.commit();
QuartzUtil.insertLog("com.tenwa.comm.message.controller.BaseMessageJob", "success", "成功");
} catch (Exception e) {
QuartzUtil.insertLog("com.tenwa.comm.message.controller.BaseMessageJob", "success", "失败");
try {
if(tx!=null){
tx.rollback();

View File

@ -21,6 +21,7 @@ import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.StringFunction;
import com.base.util.QuartzUtil;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
/**
* 对业务审批结束后超过指定时间未合同制作的业务合同进行
@ -38,7 +39,10 @@ public class BusinessCancelJob implements Job {
tx= JBOFactory.createJBOTransaction();
this.executeMessage(tx);
tx.commit();
QuartzUtil.insertLog("com.tenwa.comm.message.controller.BusinessCancelJob", "success", "成功");
} catch (Exception e) {
QuartzUtil.insertLog("com.tenwa.comm.message.controller.BusinessCancelJob", "error", "失败");
try {
if(tx!=null){
tx.rollback();

View File

@ -1,14 +1,18 @@
package com.tenwa.doc.action;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
import com.amarsoft.awe.Configure;
import com.amarsoft.awe.util.ASResultSet;
import jbo.app.tenwa.doc.LB_DOCATTRIBUTE;
import jbo.app.tenwa.doc.LB_DOCCONFIG;
@ -20,6 +24,7 @@ import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.mysql.jdbc.ResultSet;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.officetempalte.util.FileOperatorUtil;
@ -111,9 +116,9 @@ public class DocListInitAction {
* @param param
* @param docno
* @return
* @throws JBOException
* @throws Exception
*/
public static String getDocSQL(Map<String,String> param,String docno) throws JBOException{
public static String getDocSQL(Map<String,String> param,String docno) throws Exception{
String sql="select id from O left join jbo.app.tenwa.doc.LB_DOCLIBRARY lib on O.id=lib.Relative_Id where lib.doc_Class_Itemno in ("+docno+") ";
if("Customer".equals(param.get("ObjectType"))){
sql+=" and O.cust_id='"+param.get("cust_id")+"' and O.objecttype='Customer' ";
@ -199,13 +204,14 @@ public class DocListInitAction {
}
}
public static String getFlowWhere(BizObject flow,String idlst,String value) throws JBOException{
public static String getFlowWhere(BizObject flow,String idlst,String value) throws Exception{
String table="";
if(value.length()>0){
table=value+".";
}
String FlowName=flow.getAttribute("flow_name").getString();
String proj_id=flow.getAttribute("proj_id").getString();
String contract_id=flow.getAttribute("contract_id").getString();
@ -216,9 +222,9 @@ public class DocListInitAction {
if(idlst.length()>0){
//otherWhere=" and "+table+"flow_unid='"+flowunid+"'";
otherWhere=" and O.id in("+idlst+")";
}else if(contract_id.length()>0){
}else if(contract_id.length()>0&&"".equals(getDocType(FlowName))){
otherWhere=" and "+table+"proj_id='"+proj_id+"' and ("+table+"contract_id='' or "+table+"contract_id is null or "+table+"contract_id='"+contract_id+"') ";
}else if(proj_id.length()>0){
}else if(proj_id.length()>0&&"".equals(getDocType(FlowName))){
otherWhere=" and "+table+"proj_id='"+proj_id+"'";
}else{
otherWhere=" and "+table+"flow_unid='"+flowunid+"'";
@ -226,4 +232,39 @@ public class DocListInitAction {
return otherWhere;
}
/**
* 校验附件一览类型
* 附件一览分2种可上传类型
* 1与项目或合同绑定的附件多次发起流程将会累计附件
* 2与流程本身绑定仅在本次流程中可见
* 3与流程与项目合同都绑定在流程中只能看见本次上传的附件其它次附件在别处根据项目编号可查看
* @return
* @throws Exception
* @throws JBOException
*/
public static String getDocType(String flowName) throws Exception{
String sql ="SELECT FLOWNO FROM flow_catalog WHERE flowname='"+flowName+"'";
List<Map<String,String>> ds = DataOperatorUtil.getDataBySql(JBOFactory.createJBOTransaction(), sql, null);
String flowno = GetValueByKey("docpreview.properties",ds.get(0).get("FLOWNO"));
//根据要求拖车申请是
if(flowno!=null){
return "flow";
}
return "";
}
//根据Key读取Value
public static String GetValueByKey(String filePath, String key) {
Properties pps = new Properties();
try {
InputStream in = DocListInitAction.class.getClassLoader().getResourceAsStream(filePath);
pps.load(in);
String value = pps.getProperty(key);
System.out.println(key + " = " + value);
return value;
}catch (IOException e) {
e.printStackTrace();
return null;
}
}
}

View File

@ -1,16 +1,21 @@
package com.tenwa.officetempalte.exportcallback.impl;
import java.util.List;
import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.Map;
import jbo.app.tenwa.calc.VI_LC_CONTRACT_RENT_PLAN;
import jbo.com.tenwa.lease.comm.LC_OCCUPY_RENT_LIST;
import com.amarsoft.app.awe.config.InitDBType;
import jbo.app.tenwa.calc.LC_CARD_DEDUCT_INFO;
import jbo.app.tenwa.calc.LC_CARD_EXPORT_DATA;
import jbo.com.tenwa.entity.comm.officetempalte.BF_LABLECONFIG;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.lang.DataElement;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.ASResultSet;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.officetempalte.serviceImp.BaseExcelCallBackServiceImpl;
import com.tenwa.reckon.util.UUIDUtil;
@ -19,22 +24,95 @@ public class CardDeductExportCallBack extends BaseExcelCallBackServiceImpl {
@Override
public void runAfter(BizObject templateConfig,
Map<String, String> paramMap, JBOTransaction tx) throws Exception {
BizObjectManager bom = JBOFactory.getBizObjectManager(LC_OCCUPY_RENT_LIST.CLASS_NAME,tx);
List<BizObject> bos;
if(InitDBType.DBTYPE.equals("ORACLE")){
bos = JBOFactory.getBizObjectManager(VI_LC_CONTRACT_RENT_PLAN.CLASS_NAME).createQuery(paramMap.get("jboWhere").replaceAll("to_char", "v.to_char").replaceAll("sysdate", "v.sysdate")).getResultList(false);
}else{
bos = JBOFactory.getBizObjectManager(VI_LC_CONTRACT_RENT_PLAN.CLASS_NAME).createQuery(paramMap.get("jboWhere").replaceAll("date_format", "v.date_format").replaceAll("now", "v.now")).getResultList(false);
}
if(bos.size() > 0){
for(BizObject bo:bos){
BizObject boLORL = bom.newObject();
boLORL.setAttributeValue("ID", UUIDUtil.getUUID());
boLORL.setAttributeValue("PAYMENT_NUMBER", bo.getAttribute("payment_number").getString());
boLORL.setAttributeValue("PLAN_LIST", bo.getAttribute("plan_list").getString());
boLORL.setAttributeValue("FLOW_NAME", "¿¨¿ÛºËÏú");
bom.saveObject(boLORL);
BizObjectManager bomLIED = JBOFactory.getBizObjectManager(LC_CARD_EXPORT_DATA.CLASS_NAME,tx);
//通联在点击导出时不止导出文件在主页面中的通联导出信息中查看并且能反复导出
BizObjectManager bomLIDIT = JBOFactory.getBizObjectManager(LC_CARD_DEDUCT_INFO.CLASS_NAME,tx);
/*BizObject boBTL = JBOFactory.getBizObjectManager(BF_TEMPLATELABLE.CLASS_NAME,tx)
.createQuery("TEMPLATEID='"+templateConfig.getAttribute("ID").getString()+"'").getSingleResult(false);
String lableId = boBTL.getAttribute("LABLEID").getString();*/
BizObject boBLC = JBOFactory.getBizObjectManager(BF_LABLECONFIG.CLASS_NAME,tx)
.createQuery("TAGNAME = 'card_deduct2'").getSingleResult(false);
Transaction trans = Transaction.createTransaction(tx);
Connection con = null;
try{
String sql = boBLC.getAttribute("VALUEMETHOD").getString();
ASResultSet rs = trans.getResultSet(new SqlObject(sql));
DataElement[] des = bomLIED.newObject().getAttributes();
String liedInsert = "insert into lc_card_export_data(colName) values(colValue)";
String lcrlInsert = "insert into lc_occupy_rent_list(ID,PAYMENT_NUMBER,FLOWUNID,FLOW_NAME) values(replace(uuid(), '-', ''),?,?,?)";
String colName = "";
String colValue = "";
for(DataElement de:des){
colName += "," + de.getName();
colValue += ",?";
}
liedInsert = liedInsert.replace("colName", colName.substring(1));
liedInsert = liedInsert.replace("colValue", colValue.substring(1));
con = tx.getConnection(Transaction.createTransaction(tx));
con.setAutoCommit(false);
PreparedStatement liedStat = con.prepareStatement(liedInsert);
PreparedStatement lcrlStat = con.prepareStatement(lcrlInsert);
BigDecimal amount = new BigDecimal("0");
String deductInfoId = paramMap.get("DeductInfoId");
String inputtime = StringFunction.getTodayNow();
int allNum = 0;
int count = 0;
String searchDate = StringFunction.getTodayNow().split(" ")[0];
while(rs.next()){
allNum++;
count++;
for(int i=0;i<des.length;i++){
switch(des[i].getName()){
case "id":
liedStat.setString(i+1, UUIDUtil.getUUID());
break;
case "serialno":
liedStat.setString(i+1, allNum + "");
break;
case "amount":
liedStat.setBigDecimal(i+1, new BigDecimal(rs.getString("amount")));
amount = amount.add(new BigDecimal(rs.getString("amount")));
break;
case "export_date":
liedStat.setString(i+1, searchDate);
break;
case "deduct_info_id":
liedStat.setString(i+1, deductInfoId);
break;
default:
liedStat.setString(i+1, rs.getString(des[i].getName()));
}
}
liedStat.addBatch();
lcrlStat.setString(1, rs.getString("payment_number"));
lcrlStat.setString(2, deductInfoId);
lcrlStat.setString(3, "卡扣核销");
lcrlStat.addBatch();
if(count == 3000){
liedStat.executeBatch();
lcrlStat.executeBatch();
liedStat.clearBatch();
lcrlStat.clearBatch();
count = 0;
}
}
liedStat.executeBatch();
lcrlStat.executeBatch();
BizObject boLIDIT = bomLIDIT.newObject();
boLIDIT.setAttributeValue("ID", deductInfoId);
boLIDIT.setAttributeValue("ALL_COUNT", allNum);
boLIDIT.setAttributeValue("ALL_AMOUNT", amount);
boLIDIT.setAttributeValue("MAY_COUNT", allNum);
boLIDIT.setAttributeValue("MAY_AMOUNT", amount);
boLIDIT.setAttributeValue("EXPORT_DATE", searchDate);
boLIDIT.setAttributeValue("INPUTUSERID", paramMap.get("CurUserId"));
boLIDIT.setAttributeValue("INPUTORGID", paramMap.get("CurOrgId"));
boLIDIT.setAttributeValue("INPUTTIME", inputtime);
bomLIDIT.saveObject(boLIDIT);
}catch(Exception e){
e.printStackTrace();
con.rollback();
tx.rollback();
}
}

View File

@ -10,12 +10,15 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import jbo.app.tenwa.calc.LC_CARD_DEDUCT_DOC;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
@ -209,7 +212,11 @@ public class BaseImportExcelCallBack extends ImportCallBack{
value = PoiExcelUtil.getCellValue(cell);
value = value.trim();
int colIndex = i;
String headername=ExcelImportUtil.getImportHanderName(headerRows, colIndex);
String cenote = importConfig.getAttribute("cenote").getString();
String headername = ExcelImportUtil.getImportHanderName(headerRows, colIndex);
if("no_head".equals(cenote)) {
headername = cell.getColumnIndex() + "";
}
if(columnMap.containsKey(headername)){
BizObject columnConfig=columnMap.get(headername);
String dataType=columnConfig.getAttribute("datatype").getString();//数据类型
@ -271,10 +278,15 @@ public class BaseImportExcelCallBack extends ImportCallBack{
int n = 0;
long start = System.currentTimeMillis();
BizObject bo = importObjects.get(0);
WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();
String deductInfoId = Sqlca.getString(new SqlObject("select id from lc_card_deduct_info where import_date = '' or import_date is null"));
if(deductInfoId == null){
throw new BusinessException("所有导出的数据都已导入,不能再次导入!");
}
/*WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();
ComboPooledDataSource datasource = wac.getBean("dataSourceJDBC",ComboPooledDataSource.class);
con = datasource.getConnection();
con.setAutoCommit(false);
con.setAutoCommit(false);*/
con = Sqlca.getConnection(Sqlca);
String sql = "insert into "+importConfig.getAttribute("importtable").getString()+" (";
DataElement[] des = bo.getAttributes();
BigDecimal money = new BigDecimal(0);
@ -291,13 +303,14 @@ public class BaseImportExcelCallBack extends ImportCallBack{
for(int cindex=0;cindex<importObjects.size();cindex++){
count++;
bo = importObjects.get(cindex);
String status = bo.getAttribute("transtatus").getString();
DataElement[] des1 = bo.getAttributes();
for(int d=0;d<des1.length;d++){
switch(d){
case 0:
stat.setString(d+1, UUIDUtil.getUUID());
continue;
case 1:
/*case 1:
stat.setString(d+1, bo.getAttribute("deductfeetype").getString().split("/")[0]);
continue;
case 2:
@ -305,14 +318,14 @@ public class BaseImportExcelCallBack extends ImportCallBack{
continue;
case 3:
stat.setString(d+1, bo.getAttribute("deductfeetype").getString().split("/")[2]);
continue;
continue;*/
case 4:
stat.setString(d+1, lcddID);
continue;
case 16:
stat.setBigDecimal(d+1, new BigDecimal(des1[d].getDouble()));
stat.setBigDecimal(d+1, new BigDecimal("0"));
continue;
case 18:
/*case 18:
String endDate = bo.getAttribute(des1[d].getName()).getString();
if(endDate.indexOf("/") == -1 && endDate.length() == 8){
String year = endDate.substring(0, 4);
@ -321,11 +334,23 @@ public class BaseImportExcelCallBack extends ImportCallBack{
endDate = year + "/" + month + "/" + day;
}
stat.setString(d+1, endDate);
continue;
continue;*/
case 22:
stat.setBigDecimal(d+1, new BigDecimal(des1[d].getDouble()));
money = money.add(new BigDecimal(des1[d].getDouble()));
stat.setBigDecimal(d+1, new BigDecimal(des1[d].getString().replaceAll(",", "")));
if("0".equals(status)) {
money = money.add(new BigDecimal(des1[d].getDouble()));
}
continue;
case 38:
stat.setBigDecimal(d+1, BigDecimal.ZERO);
continue;
case 39:
if("0".equals(status)) {
stat.setBigDecimal(d+1, new BigDecimal(des1[22].getString().replaceAll(",", "")));
} else {
stat.setBigDecimal(d+1, BigDecimal.ZERO);
}
continue;
default:
stat.setString(d+1, bo.getAttribute(des1[d].getName()).getString());
continue;
@ -355,15 +380,18 @@ public class BaseImportExcelCallBack extends ImportCallBack{
boLCDD.setAttributeValue("allfact_money", money);
boLCDD.setAttributeValue("allmayope_money", money);
boLCDD.setAttributeValue("allhad_money", 0);
boLCDD.setAttributeValue("import_date", StringFunction.getTodayNow().split(" ")[0]);
boLCDD.setAttributeValue("deduct_info_id", deductInfoId);
bomLCDD.saveObject(boLCDD);
con.commit();
stat.executeUpdate("update lc_card_deduct_info set import_date='"+StringFunction.getTodayNow().split(" ")[0]+"',updateuserid='"+CurUser.getUserID()+"',updateorgid='"+CurUser.getUserID()+"',updatetime='"+StringFunction.getTodayNow()+"' where import_date is null or import_date = ''");
}catch(Exception e){
e.printStackTrace();
tx.rollback();
con.rollback();
throw new BusinessException("µ¼Èëʧ°Ü£¡");
}finally{
con.close();
if(e instanceof BusinessException) {
throw new BusinessException(e.getMessage());
} else {
throw new BusinessException("数据错误!");
}
}
}
//导入之后的回调

View File

@ -41,6 +41,7 @@ public class QuartzServerImpl {
private String misfire;
private String startTime;
private String endTime;
private String userId;
public String getMisfire() {
return misfire;
@ -114,6 +115,13 @@ public class QuartzServerImpl {
public void setTriggerState(String triggerState) {
this.triggerState = triggerState;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public QuartzServerImpl(){
try {
this.scheduler = StdSchedulerFactory.getDefaultScheduler();
@ -257,8 +265,8 @@ public class QuartzServerImpl {
public String triggerJob(JBOTransaction tx){
try {
scheduler.triggerJob(JobKey.jobKey(jobName, DEFAULT_GROUP_NAME));
JBOFactory.getBizObjectManager(QRTZ_TRIGGERS.CLASS_NAME).createQuery("UPDATE O SET PREV_FIRE_TIME = :Date,NEXT_FIRE_TIME = null WHERE TRIGGER_NAME = :triggerName AND TRIGGER_GROUP = :triggerGroup AND JOB_NAME = :jobName AND JOB_GROUP = :jobGroup")
.setParameter("Date", new Date().getTime()).setParameter("triggerName", triggerName).setParameter("triggerGroup", DEFAULT_GROUP_NAME).setParameter("jobName", jobName).setParameter("jobGroup", DEFAULT_GROUP_NAME).executeUpdate();
JBOFactory.getBizObjectManager(QRTZ_TRIGGERS.CLASS_NAME).createQuery("UPDATE O SET PREV_FIRE_TIME = :Date,NEXT_FIRE_TIME = null ,USERID = :USERID WHERE TRIGGER_NAME = :triggerName AND TRIGGER_GROUP = :triggerGroup AND JOB_NAME = :jobName AND JOB_GROUP = :jobGroup")
.setParameter("Date", new Date().getTime()).setParameter("triggerName", triggerName).setParameter("triggerGroup", DEFAULT_GROUP_NAME).setParameter("jobName", jobName).setParameter("jobGroup", DEFAULT_GROUP_NAME).setParameter("USERID", this.getUserId()).executeUpdate();
} catch (Exception e) {
e.printStackTrace();
return "ERROR";

View File

@ -41,11 +41,11 @@ public class CreateVoucherContractOnhireChange {
param.clear();
map.put("FlowUnid", FlowUnid);
if("PZ2018072100000049".equals(VOUCHERNO)){
if("PZ2018072100000049".equals(VOUCHERNO)||"PZ2018080400000105".equals(VOUCHERNO)){
sql="SELECT LRPT.SUMINTE - LRP.SUMINTE AS MONEY,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LB_CONTRACT_INFO LCI INNER JOIN (SELECT MAX(CONTRACT_ID) CONTRACT_ID,SUM(ROUND(INTEREST / 1.06, 2)) SUMINTE,FLOWUNID FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.CONTRACT_ID = LCI.ID INNER JOIN (SELECT CONTRACT_ID,SUM(ROUND(INTEREST / 1.06, 2)) SUMINTE FROM LC_RENT_PLAN GROUP BY CONTRACT_ID) LRP ON LRP.CONTRACT_ID = LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO = LCI.DISTRIBUTOR_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 LRPT.FLOWUNID = :FLOWUNID ";
}
if("PZ2018072100000050".equals(VOUCHERNO)){
if("PZ2018072100000050".equals(VOUCHERNO)||"PZ2018080400000106".equals(VOUCHERNO)){
sql="SELECT LRPT.SUMINTE-LRP.SUMINTE AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME ,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LB_CONTRACT_INFO LCI INNER JOIN (SELECT MAX(CONTRACT_ID) CONTRACT_ID,SUM(INTEREST-ROUND(INTEREST/1.06,2))SUMINTE, FLOWUNID FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.CONTRACT_ID=LCI.ID INNER JOIN (SELECT CONTRACT_ID,SUM(INTEREST-ROUND(INTEREST/1.06,2)) SUMINTE FROM LC_RENT_PLAN GROUP BY CONTRACT_ID) LRP ON LRP.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 LRPT.FLOWUNID=:FLOWUNID";
}
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);

View File

@ -39,21 +39,26 @@ public class CreateVoucherContractTerminate {
param.clear();
map.put("FlowUnid", FlowUnid);
//回款--收到违约金
if("PZ2018072100000026".equals(VOUCHERNO)){
if("PZ2018072100000026".equals(VOUCHERNO)||"PZ2018080400000083".equals(VOUCHERNO)){
sql= "SELECT IFNULL(HANDLING_CHARGE,0) AS MONEY ,ROUND(IFNULL(HANDLING_CHARGE,0)/1.06,2) AS MONEYNOTAX,(IFNULL(HANDLING_CHARGE,0)-ROUND(IFNULL(HANDLING_CHARGE,0)/1.06,2)) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 LFRA.FLOWUNID=:FLOWUNID";
}
//收到的提前还款
if("PZ2018072100000027".equals(VOUCHERNO)){
if("PZ2018072100000027".equals(VOUCHERNO)||"PZ2018080400000084".equals(VOUCHERNO)){
sql= "SELECT IFNULL(CORPUS_OVERAGE,0) AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 LFRA.FLOWUNID=:FLOWUNID";
}
//提前还款-调整未实现利息收入
//提前还款-调整未实现利息收入(不含税金)
if("PZ2018072100000045".equals(VOUCHERNO)){
sql="SELECT ROUND(IFNULL(AGREED_INTEREST,0)/1.06,2) AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 LFRA.FLOWUNID=:FLOWUNID";
}
//提前还款-调整未实现利息收入税金
if("PZ2018072100000046".equals(VOUCHERNO)){
if("PZ2018072100000046".equals(VOUCHERNO)||"PZ2018080400000100".equals(VOUCHERNO)){
sql="SELECT IFNULL(AGREED_INTEREST,0)-ROUND(IFNULL(AGREED_INTEREST,0)/1.06,2) AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 LFRA.FLOWUNID=:FLOWUNID";
}
//提前还款-调整未实现利息收入(全部)
if("PZ2018080400000099".equals(VOUCHERNO)){
sql="SELECT IFNULL(AGREED_INTEREST,0)AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 LFRA.FLOWUNID=:FLOWUNID";
}
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl();

View File

@ -38,15 +38,14 @@ public class CreateVoucherCustCautionMoneyIncome extends BaseBussiness{
String CUSTNAME=null;
String CUSTOMERTYPE=null;
String BUSINESSTYPE=null;
String ACC_NUM=null;
String sql="";
param.clear();
map.put("FlowUnid", FlowUnid);
map.put("FEE_TYPE", FeeType);
if("PZ2018073100000062".equals(VOUCHERNO)){
sql="SELECT LFIT.FACT_MONEY AS MONEY,LFIT.FACT_MONEY/1.06 AS MONEYNOTAX,(LFIT.FACT_MONEY-LFIT.FACT_MONEY/1.06) 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.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE 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 WHERE LFIT.FEE_TYPE IN ('feetype20','feetype21','feetype22','feetype23') AND LFIT.FLOWUNID=:FLOWUNID";
}else{
sql= "SELECT LFIT.FACT_MONEY AS MONEY,LFIT.FACT_MONEY/1.06 AS MONEYNOTAX,(LFIT.FACT_MONEY-LFIT.FACT_MONEY/1.06) 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.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE 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 WHERE LFIT.FEE_TYPE=:FEE_TYPE AND LFIT.FLOWUNID=:FLOWUNID ";
}
sql= "SELECT LFIT.FACT_MONEY AS MONEY,ROUND(LFIT.FACT_MONEY/1.06,2) AS MONEYNOTAX,(LFIT.FACT_MONEY-ROUND(LFIT.FACT_MONEY/1.06,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.CERTID 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 WHERE LFIT.FEE_TYPE=:FEE_TYPE AND LFIT.FLOWUNID=:FLOWUNID ";
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl();
@ -73,6 +72,7 @@ public class CreateVoucherCustCautionMoneyIncome extends BaseBussiness{
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);
@ -91,6 +91,7 @@ public class CreateVoucherCustCautionMoneyIncome extends BaseBussiness{
param.put("CUSTNAME",CUSTNAME);
param.put("CUSTOMERTYPE",CUSTOMERTYPE);
param.put("BUSINESSTYPE",BUSINESSTYPE);
param.put("ACC_NUMBER",ACC_NUM);
if("1".equals(BUSINESSTYPE)){
param.put("LEASFORMASSET", "04"); // ÈÚ×Ê×âÁÞ×ʲú

View File

@ -47,10 +47,11 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
String CUSTNAME=null;
String CUSTOMERTYPE=null;
String BUSINESSTYPE=null;
String ACC_NUM=null;
//String FlowUnid=this.getAttribute("FlowUnid").toString();
//String VOUCHERNO="PZ2018071000000005";
//String VOUCHERNO=this.getAttribute("VoucherNo").toString();
String sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.CLEAN_LEASE_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.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION LCCT inner join (SELECT contract_id,FLOWUNID 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";
String sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.CLEAN_LEASE_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.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,lfit.ACC_NUMBER 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";
param.clear();
map.put("FLOWUNID", FlowUnid);
@ -87,7 +88,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
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("EQUIP_AMT",EQUIP_AMT);
param.put("FIRST_PAYMENT",FIRST_PAYMENT);
@ -114,6 +115,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
param.put("CUSTNAME",CUSTNAME);
param.put("CUSTOMERTYPE",CUSTOMERTYPE);
param.put("BUSINESSTYPE",BUSINESSTYPE);
param.put("ACC_NUMBER",ACC_NUM);
if("1".equals(BUSINESSTYPE)){
param.put("LEASFORMASSET", "04"); // ÈÚ×Ê×âÁÞ×ʲú

View File

@ -35,14 +35,14 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
String sql="";
param.clear();
map.put("FLOWUNID", FlowUnid);
if("PZ2018071100000011".equals(VOUCHERNO)){
if("PZ2018071100000011".equals(VOUCHERNO)||"PZ2018080400000076".equals(VOUCHERNO)){
sql= "SELECT DDIT.CAUTION_MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') "
+ "AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,"
+ "DDIT.REFUND_PERSON,DIF.DISTRIBUTOR_CODING DISTRIBUTOR_NO,DIF.DISTRIBUTOR_NAME FROM D_DEPOSITRETURN_INFO_TEMP"
+ " DDIT LEFT JOIN DISTRIBUTOR_INFO DIF ON DIF.DISTRIBUTOR_NO=DDIT.DISTRIBUTOR_ID "
+ "WHERE DDIT.FLOWUNID=:FLOWUNID";
}
if("PZ2018072100000032".equals(VOUCHERNO)){
if("PZ2018072100000032".equals(VOUCHERNO)||"PZ2018080400000088".equals(VOUCHERNO)){
sql= "SELECT DDIT.CAUTION_MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d')"
+ " AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') "
+ "AS FACT_DATE,DDIT.payer,DIF.DISTRIBUTOR_CODING DISTRIBUTOR_NO,"

View File

@ -44,7 +44,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
//String VOUCHERNO=this.getAttribute("VoucherNo").toString();
param.clear();
map.put("FlowUnid", FlowUnid);
sql= "SELECT LCCT.HANDLING_CHARGE_MONEY AS MONEY,LCCT.HANDLING_CHARGE_MONEY/1.06 AS HANDLFEENOTAX,(LCCT.HANDLING_CHARGE_MONEY-LCCT.HANDLING_CHARGE_MONEY/1.06)AS HANDLTAX,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.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION LCCT INNER JOIN lc_fund_income_temp lfit ON lfit.contract_id=lcct.contract_id AND lfit.fee_type='feetype10' LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.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 WHERE lfit.FLOWUNID=:FLOWUNID";
sql= "SELECT LCCT.HANDLING_CHARGE_MONEY AS MONEY,LCCT.HANDLING_CHARGE_MONEY/1.06 AS HANDLFEENOTAX,(LCCT.HANDLING_CHARGE_MONEY-ROUND(LCCT.HANDLING_CHARGE_MONEY/1.06,2))AS HANDLTAX,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.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION LCCT INNER JOIN lc_fund_income_temp lfit ON lfit.contract_id=lcct.contract_id AND lfit.fee_type='feetype10' LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.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 WHERE lfit.FLOWUNID=:FLOWUNID";
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);

View File

@ -0,0 +1,133 @@
package com.tenwa.voucher.CreateVoucherProcess;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import jbo.voucher.LV_VOUCHER_CONFIG;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOException;
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 CreateVoucherInsuranceSettlement{
public void CreateVoucher(String voucherNo) {
Transaction Sqlca =null;
try{
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
Map<String,String> map=new HashMap<String, String>();
Map<String,String> param=new HashMap<String, String>();
String MONEY=null;
String FEEMONEY=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;
param.clear();
String sql="";
String moneyType="MONEY";
sql="SELECT lic.claims_money AS MONEY,DATE_FORMAT(claims_start_date,'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(claims_start_date,'%Y/%m/%d') AS FACT_DATE,lii.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.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LB_INSURANCE_CLAIM lic inner join LB_INSURANCE_INFO lii on lic.INSURANCE_ID=lii.INSURANCE_ID LEFT JOIN LB_CONTRACT_INFO LCI ON lii.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 WHERE DATE_FORMAT(lic.inputtime,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')";
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl();
String VOUCHER_TYPE="1";// 凭证分类 金蝶
String userid ="admin";
for (int i=0;i<dataList.size();i++){
MONEY=dataList.get(i).get(moneyType).toString();
//FEEMONEY=dataList.get(i).get(FEEMONEY).toString();
if("".equals(MONEY)||MONEY==null) MONEY="0.00";
double mon=Double.parseDouble(MONEY);
if(mon>0){
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");
param.put("FACT_MONEY",MONEY);
//param.put("FACT_MONEY",FEEMONEY);
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);
if("1".equals(BUSINESSTYPE)){
param.put("LEASFORMASSET", "04"); // 融资租赁资产
param.put("DEPT", "02"); // 部门
if("03".equals(CUSTOMERTYPE)){ // 如果是个人业务
param.put("LEASINCOMEFORM", "02"); // C端
}else if("01".equals(CUSTOMERTYPE)){
param.put("LEASINCOMEFORM", "01"); // B端
}
}
param.put("FUNDTYPE", "02"); // 主营类型
param.put("BUSINESSTYPE", "06");
map.clear();
map.put("PROJ_TYPE", leas_form);
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(), leas_form, VOUCHER_TYPE, userid,param, Sqlca);
}
}
if(Sqlca!=null){
Sqlca.commit();
}}
}catch (Exception e){
e.printStackTrace();
}finally{
if(Sqlca!=null){
try {
Sqlca.disConnect();
} catch (JBOException e) {
e.printStackTrace();
}
Sqlca = null;
}
}
}
}

View File

@ -7,10 +7,11 @@ import java.util.Map;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
/**
* 났운-看마운
* @author xiezhiwen
*/
public class CleanLeaseMoney implements VoucherJavaParamService {
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
@ -18,7 +19,6 @@ public class CleanLeaseMoney implements VoucherJavaParamService {
String EQUIP_AMT=param.get("EQUIP_AMT")==null?"0.00":param.get("EQUIP_AMT");
String FIRST_PAYMENT=param.get("FIRST_PAYMENT")==null?"0.00":param.get("FIRST_PAYMENT");
BigDecimal factmoney=new BigDecimal(EQUIP_AMT).subtract(new BigDecimal(FIRST_PAYMENT));
returnValue.putAll(param);
returnValue.put("MONEY",factmoney.toString());
return returnValue;

View File

@ -0,0 +1,27 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
/**
* ³µ¿î-Ê׸¿îµÄ˰½ð
* @author xiezhiwen
*/
public class ContractCapitalToTaxToJust implements VoucherJavaParamService{
public Map<String, String> getJavaParam(JBOTransaction tx,Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
returnValue.putAll(param);
String FIRST_PAYMENT=param.get("FIRST_PAYMENT")==null?"0.00":param.get("FIRST_PAYMENT");
String EQUIP_AMT=param.get("EQUIP_AMT")==null?"0.00":param.get("EQUIP_AMT");
String tax="1.06";
BigDecimal divisor= new BigDecimal(tax);
BigDecimal sumMoney=new BigDecimal(FIRST_PAYMENT).subtract(new BigDecimal(EQUIP_AMT));
BigDecimal taxMoney=sumMoney.subtract(sumMoney.divide(divisor, 2, BigDecimal.ROUND_HALF_UP));
returnValue.put("MONEY",taxMoney.toString());
return returnValue;
}
}

View File

@ -0,0 +1,21 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
import java.util.HashMap;
import java.util.Map;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
/**
* »ñÈ¡É豸¿î
* @author xiezhiwen
*/
public class ContractEquipToJust implements VoucherJavaParamService{
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
returnValue.putAll(param);
returnValue.put("MONEY",param.get("EQUIP_AMT"));
return returnValue;
}
}

View File

@ -6,7 +6,10 @@ import java.util.Map;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
/**
* »ñȡ˰½ð
* @author xiezhiwen
*/
public class ContractInterestTax implements VoucherJavaParamService{
@Override
@ -18,5 +21,4 @@ public class ContractInterestTax implements VoucherJavaParamService{
returnValue.put("MONEY",param.get("TAX"));
return returnValue;
}
}

View File

@ -0,0 +1,28 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
/**
* »ñÈ¡Ê׸¿îµÄ˰½ð
* @author xiezhiwen
*/
public class FirstPaymentToTaxToJust implements VoucherJavaParamService{
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
returnValue.putAll(param);
String FIRST_PAYMENT=param.get("FIRST_PAYMENT")==null?"0.00":param.get("FIRST_PAYMENT");
String tax="1.06";
BigDecimal divisor= new BigDecimal(tax);
BigDecimal factmoney=new BigDecimal(FIRST_PAYMENT).subtract(new BigDecimal(FIRST_PAYMENT).divide(divisor, 2, BigDecimal.ROUND_HALF_UP));
returnValue.put("MONEY",factmoney.toString());
return returnValue;
}
}

View File

@ -7,27 +7,26 @@ import java.util.Map;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
/**
* 获取购置税+保险+装潢费+其它费用的和
* @author xiezhiwen
*/
public class OtherFee implements VoucherJavaParamService{
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
//ÆäËû£¨¹ºÖÃ˰/±£ÏÕ/GPS/×°ÊÎ×°äêµÈ£©
// 保险费
String INSURANCE_PREMIUM=param.get("INSURANCE_PREMIUM")==null?"0.00":param.get("INSURANCE_PREMIUM");
// 购置税
String PURCHASE_TAX=param.get("PURCHASE_TAX")==null?"0.00":param.get("PURCHASE_TAX");
// 杂费
String INCIDENTAL=param.get("INCIDENTAL")==null?"0.00":param.get("INCIDENTAL");
// 装潢费
String TABLEWARE_FEE=param.get("TABLEWARE_FEE")==null?"0.00":param.get("TABLEWARE_FEE");
BigDecimal factmoney=new BigDecimal(INSURANCE_PREMIUM)
.add(new BigDecimal(PURCHASE_TAX))
.add(new BigDecimal(INCIDENTAL))
.add(new BigDecimal(TABLEWARE_FEE));
BigDecimal factmoney=new BigDecimal(INSURANCE_PREMIUM).add(new BigDecimal(PURCHASE_TAX)).add(new BigDecimal(INCIDENTAL)).add(new BigDecimal(TABLEWARE_FEE));
returnValue.putAll(param);
returnValue.put("FUNDTYPE","01");
returnValue.put("MONEY",factmoney.toString());
return returnValue;
}
}

View File

@ -24,11 +24,11 @@ public class SynthesizeLeaseMoney implements VoucherJavaParamService{
String INSURANCE_PREMIUM=param.get("INSURANCE_PREMIUM")==null?"0.00":param.get("INSURANCE_PREMIUM");
String PURCHASE_TAX=param.get("PURCHASE_TAX")==null?"0.00":param.get("PURCHASE_TAX");
String INCIDENTAL=param.get("INCIDENTAL")==null?"0.00":param.get("INCIDENTAL");
String GPS_FEE_FINANCE=param.get("GPS_FEE_FINANCE")==null?"0.00":param.get("GPS_FEE_FINANCE");
String TABLEWARE_FEE=param.get("TABLEWARE_FEE")==null?"0.00":param.get("TABLEWARE_FEE");
BigDecimal factmoney=factmoney1.add(new BigDecimal(INSURANCE_PREMIUM))
.add(new BigDecimal(PURCHASE_TAX))
.add(new BigDecimal(INCIDENTAL))
.add(new BigDecimal(GPS_FEE_FINANCE));
.add(new BigDecimal(TABLEWARE_FEE));
returnValue.putAll(param);
returnValue.put("MONEY",factmoney.toString());
return returnValue;

View File

@ -0,0 +1,31 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
/**
* 났운-看마운+뭔零江+괏麴+GPS+陋干陋殃
* @author xiezhiwen
*/
public class SynthesizeLeaseMoneyToJust implements VoucherJavaParamService{
public Map<String, String> getJavaParam(JBOTransaction tx,Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String EQUIP_AMT=param.get("EQUIP_AMT")==null?"0.00":param.get("EQUIP_AMT");
String FIRST_PAYMENT=param.get("FIRST_PAYMENT")==null?"0.00":param.get("FIRST_PAYMENT");
//났운-看마운
BigDecimal factmoney1=new BigDecimal(EQUIP_AMT).subtract(new BigDecimal(FIRST_PAYMENT));
String INSURANCE_PREMIUM=param.get("INSURANCE_PREMIUM")==null?"0.00":param.get("INSURANCE_PREMIUM");
String PURCHASE_TAX=param.get("PURCHASE_TAX")==null?"0.00":param.get("PURCHASE_TAX");
String TABLEWARE_FEE=param.get("TABLEWARE_FEE")==null?"0.00":param.get("TABLEWARE_FEE");
String GPS_FEE_FINANCE=param.get("GPS_FEE_FINANCE")==null?"0.00":param.get("GPS_FEE_FINANCE");
// 몹蘆운淃宮속
BigDecimal factmoney=factmoney1.add(new BigDecimal(INSURANCE_PREMIUM)).add(new BigDecimal(PURCHASE_TAX)).add(new BigDecimal(TABLEWARE_FEE)).add(new BigDecimal(GPS_FEE_FINANCE));
returnValue.putAll(param);
returnValue.put("MONEY",factmoney.toString());
return returnValue;
}
}

View File

@ -48,16 +48,16 @@ public class CreateVoucherLoanDistributor {
moneyDataSource="LCCT.EQUIP_AMT";
}
//폅理-쒔饋<EFBFBD>連마돨渡마운(看마)
if("PZ2018070900000003".equals(VOUCHERNO)){
if("PZ2018070900000003".equals(VOUCHERNO)||"PZ2018080200000065".equals(VOUCHERNO)){
moneyDataSource="LCCT.FIRST_PAYMENT";
}
if("PZ2018070900000004".equals(VOUCHERNO)||"PZ2018071000000006".equals(VOUCHERNO)){
if("PZ2018071000000004".equals(VOUCHERNO)||"PZ2018071000000006".equals(VOUCHERNO)||"PZ2018080300000070".equals(VOUCHERNO)||"PZ2018080300000071".equals(VOUCHERNO)){
moneyDataSource="LCCT.CAUTION_MONEY";
}
if("PZ2018073100000061".equals(VOUCHERNO)){
if("PZ2018073100000061".equals(VOUCHERNO)||"PZ2018080300000068".equals(VOUCHERNO)){
moneyDataSource="LCCT.GPS_FEE";
}
if("PZ2018073100000062".equals(VOUCHERNO)){
if("PZ2018073100000062".equals(VOUCHERNO)||"PZ2018080300000066".equals(VOUCHERNO)){
moneyDataSource="(LCCT.PURCHASE_TAX+LCCT.INSURANCE_PREMIUM+LCCT.INCIDENTAL+LCCT.TABLEWARE_FEE)";
}
//sql= "SELECT "+moneyDataSource+ " AS MONEY,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,LCI.DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CUSTOMERID,CIF.CUSTOMERNAME FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.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 WHERE LCCT.FLOWUNID=:FLOWUNID";

View File

@ -10,7 +10,8 @@ public class CautionMoneyVoucher extends BaseBussiness {
this.initBussinessParam(Sqlca);
String FlowUnid=this.getAttribute("FlowUnid").toString();
CreateVoucherCustCautionMoneyIncome cvcc=new CreateVoucherCustCautionMoneyIncome();
cvcc.CreateVoucher(FlowUnid, "PZ2018072400000059", "feetype17");//Í˻ر£Ö¤½ð
cvcc.CreateVoucher(FlowUnid, "PZ2018072400000059", "feetype17");//Í˻ر£Ö¤½ð--»Ø×â
cvcc.CreateVoucher(FlowUnid, "PZ2018080400000075", "feetype17");//Í˻ر£Ö¤½ð--Ö±×â
return "true";
}
}

View File

@ -12,8 +12,11 @@ public class ContractOnhireChange extends BaseBussiness {
String FlowUnid=this.getAttribute("FlowUnid").toString();
CreateVoucherContractOnhireChange cvco=new CreateVoucherContractOnhireChange();
cvco.CreateVoucher(FlowUnid, "PZ2018072100000049");
cvco.CreateVoucher(FlowUnid, "PZ2018072100000050");
cvco.CreateVoucher(FlowUnid, "PZ2018072100000049");//合同变更-调整未实现利息收入--回租
cvco.CreateVoucher(FlowUnid, "PZ2018080400000105");//合同变更-调整未实现利息收入--直租
cvco.CreateVoucher(FlowUnid, "PZ2018072100000050");//合同变更-调整利息的税--回租
cvco.CreateVoucher(FlowUnid, "PZ2018080400000106");//合同变更-调整的税--直租
return "true";
}

View File

@ -16,21 +16,37 @@ public class ContractOnhireVoucher extends BaseBussiness {
CreateVoucherLoanDistributor cvld=new CreateVoucherLoanDistributor();
cvld.CreateVoucher(FlowUnid, "PZ2018070900000002");//记录给经销商放款-车款全款-
cvld.CreateVoucher(FlowUnid, "PZ2018072400000060");//记录给经销商放款-车款全款-
cvld.CreateVoucher(FlowUnid, "PZ2018070900000003");//经销商支付的预付款(首付)
cvld.CreateVoucher(FlowUnid, "PZ2018070900000004");//记录保证金合同结束后要退回给客户或者冲抵其他款项
cvld.CreateVoucher(FlowUnid, "PZ2018071000000006");//给经销商放款冲抵客户保证金
cvld.CreateVoucher(FlowUnid, "PZ2018073100000062");//购置税+保险+装饰
cvld.CreateVoucher(FlowUnid, "PZ2018073100000061");//GPS
cvld.CreateVoucher(FlowUnid, "PZ2018070900000003");//经销商支付的预付款(首付)-回租
cvld.CreateVoucher(FlowUnid, "PZ2018080200000065");//经销商支付的预付款(首付)-直租
cvld.CreateVoucher(FlowUnid, "PZ2018071000000004");//记录保证金合同结束后要退回给客户或者冲抵其他款项--回租
cvld.CreateVoucher(FlowUnid, "PZ2018080300000070");//记录保证金合同结束后要退回给客户或者冲抵其他款项--直租
cvld.CreateVoucher(FlowUnid, "PZ2018071000000006");//给经销商放款冲抵客户保证金--回租
cvld.CreateVoucher(FlowUnid, "PZ2018080300000071");//给经销商放款冲抵客户保证金--直租
cvld.CreateVoucher(FlowUnid, "PZ2018073100000062");//购置税+保险+装饰 --回租
cvld.CreateVoucher(FlowUnid, "PZ2018080300000066");//购置税+保险+装饰 --直租
cvld.CreateVoucher(FlowUnid, "PZ2018073100000061");//GPS--回租
cvld.CreateVoucher(FlowUnid, "PZ2018080300000068");//GPS--直租
CreateVoucherCustomerRentOrFee cvcr=new CreateVoucherCustomerRentOrFee();
cvcr.CreateVoucher(FlowUnid, "PZ2018071000000005");//客户支付的应收账款总金额
cvcr.CreateVoucher(FlowUnid, "PZ2018080300000069");//客户支付的应收账款总金额
cvcr.CreateVoucher(FlowUnid, "PZ2018071100000010");//给经销商放款-车款及其他绑定款项--回租
cvcr.CreateVoucher(FlowUnid, "PZ2018080300000074");//给经销商放款-车款及其他绑定款项--直租
CreateVoucherHandlingMoney cvhl=new CreateVoucherHandlingMoney();
cvhl.CreateVoucher(FlowUnid, "PZ2018071000000007");//给经销商放款冲抵确认手续费收入一次性确认收入
cvhl.CreateVoucher(FlowUnid, "PZ2018071000000009");//给经销商放款冲抵确认收到手续费按月分摊收入
cvhl.CreateVoucher(FlowUnid, "PZ2018071000000007");//给经销商放款冲抵确认手续费收入一次性确认收入--回租
cvhl.CreateVoucher(FlowUnid, "PZ2018080300000072");//给经销商放款冲抵确认手续费收入一次性确认收入--回租
CreateVoucherCustCautionMoneyIncome cvci=new CreateVoucherCustCautionMoneyIncome();
cvci.CreateVoucher(FlowUnid, "PZ2018071100000010", "feetype10");//给经销商放款-车款及其他绑定款项
cvhl.CreateVoucher(FlowUnid, "PZ2018071000000009");//给经销商放款冲抵确认收到手续费按月分摊收入--直租
cvhl.CreateVoucher(FlowUnid, "PZ2018080300000073");//给经销商放款冲抵确认收到手续费按月分摊收入--回租
//CreateVoucherCustCautionMoneyIncome cvci=new CreateVoucherCustCautionMoneyIncome();
return "true";
}

View File

@ -12,10 +12,17 @@ public class ContractTerminate extends BaseBussiness {
String FlowUnid=this.getAttribute("FlowUnid").toString();
CreateVoucherContractTerminate cvct=new CreateVoucherContractTerminate();
cvct.CreateVoucher(FlowUnid, "PZ2018072100000026");//收到违约金
cvct.CreateVoucher(FlowUnid, "PZ2018072100000027");//收到提前还款
cvct.CreateVoucher(FlowUnid, "PZ2018072100000045");//未实现的利息不含税
cvct.CreateVoucher(FlowUnid, "PZ2018072100000046");//未实现的利息的税金
cvct.CreateVoucher(FlowUnid, "PZ2018072100000026");//收到违约金/罚款--回租
cvct.CreateVoucher(FlowUnid, "PZ2018080400000083");//收到违约金/罚款--直租
cvct.CreateVoucher(FlowUnid, "PZ2018072100000027");//收到提前还款--回租
cvct.CreateVoucher(FlowUnid, "PZ2018080400000084");//收到提前还款--直租
cvct.CreateVoucher(FlowUnid, "PZ2018072100000045");//未实现的利息不含税--回租
cvct.CreateVoucher(FlowUnid, "PZ2018080400000099");//未实现的利息不含税--直租
cvct.CreateVoucher(FlowUnid, "PZ2018072100000046");//未实现的利息的税金--回租
cvct.CreateVoucher(FlowUnid, "PZ2018080400000100");//未实现的利息的税金--直租
return "true";
}

View File

@ -12,8 +12,11 @@ public class DistributorCautionMoneyVoucher extends BaseBussiness {
String FlowUnid=this.getAttribute("FlowUnid").toString();
CreateVoucherDistCautionMoneyRe cvdc=new CreateVoucherDistCautionMoneyRe();
cvdc.CreateVoucher(FlowUnid, "PZ2018071100000011");//Í˻ؾ­ÏúÉ̱£Ö¤½ð
cvdc.CreateVoucher(FlowUnid, "PZ2018072100000032");//ÊÕÈ¡¾­ÏúÉ̱£Ö¤½ð
cvdc.CreateVoucher(FlowUnid, "PZ2018071100000011");//退回经销商保证金 --回租
cvdc.CreateVoucher(FlowUnid, "PZ2018080400000076");//退回经销商保证金 --直租
cvdc.CreateVoucher(FlowUnid, "PZ2018072100000032");//收到经销商保证金--回租
cvdc.CreateVoucher(FlowUnid, "PZ2018080400000088");//收到经销商保证金--直租
return "true";
}

View File

@ -13,10 +13,18 @@ public class IncomeVoucher extends BaseBussiness {
String FlowUnid=this.getAttribute("FlowUnid").toString();
CreateVoucherCustCautionMoneyIncome cvci=new CreateVoucherCustCautionMoneyIncome();
cvci.CreateVoucher(FlowUnid, "PZ2018071100000012", "feetype2");//收到客户保证金
cvci.CreateVoucher(FlowUnid, "PZ2018072100000023", "feetype1");//按月分摊的保证金
cvci.CreateVoucher(FlowUnid, "PZ2018072100000031", "feetype4");//都到留购价款
cvci.CreateVoucher(FlowUnid, "PZ2018072100000028", "feetype27");//贴息
cvci.CreateVoucher(FlowUnid, "PZ2018071100000012", "feetype2");//收到客户保证金 --回租
cvci.CreateVoucher(FlowUnid, "PZ2018080400000078", "feetype2");//收到客户保证金 --直租
cvci.CreateVoucher(FlowUnid, "PZ2018072100000023", "feetype1");//确认收到手续费按月分摊收入--回租
cvci.CreateVoucher(FlowUnid, "PZ2018080400000080", "feetype1");//确认收到手续费按月分摊收入--直租
cvci.CreateVoucher(FlowUnid, "PZ2018072100000031", "feetype4");//回款-收到名义货价--回租
cvci.CreateVoucher(FlowUnid, "PZ2018080400000087", "feetype4");//回款-收到名义货价--直租
cvci.CreateVoucher(FlowUnid, "PZ2018072100000028", "feetype27");//贴息--回租
cvci.CreateVoucher(FlowUnid, "PZ2018080400000085", "feetype27");//贴息--直租
/*CreateVoucherRentIncome cvri=new CreateVoucherRentIncome();

View File

@ -15,15 +15,26 @@ public class RedIncomeVoucher extends BaseBussiness {
* 回款反冲的凭证生成
*/
CreateVoucherCustCautionMoneyIncome cvci=new CreateVoucherCustCautionMoneyIncome();
cvci.CreateVoucher(FlowUnid, "PZ2018072100000034", "feetype2");//收到客户保证金
cvci.CreateVoucher(FlowUnid, "PZ2018072100000036", "feetype1");//按月分摊的保证金
cvci.CreateVoucher(FlowUnid, "PZ2018072100000043", "feetype4");//都到留购价款
cvci.CreateVoucher(FlowUnid, "PZ2018072100000041", "feetype27");//贴息
cvci.CreateVoucher(FlowUnid, "PZ2018072100000034", "feetype2");//收到客户保证金--回租
cvci.CreateVoucher(FlowUnid, "PZ2018080400000089", "feetype2");//收到客户保证金--直租
cvci.CreateVoucher(FlowUnid, "PZ2018072100000036", "feetype1");//回款反冲-确认收到手续费按月分摊收入--回租
cvci.CreateVoucher(FlowUnid, "PZ2018080400000090", "feetype1");//回款反冲-确认收到手续费按月分摊收入--直租
cvci.CreateVoucher(FlowUnid, "PZ2018072100000043", "feetype4");//回款反冲-收到名义货价--回租
cvci.CreateVoucher(FlowUnid, "PZ2018080400000097", "feetype4");//回款反冲-收到名义货价--回租
cvci.CreateVoucher(FlowUnid, "PZ2018072100000041", "feetype27");//回款反冲-收到的贴息--回租
cvci.CreateVoucher(FlowUnid, "PZ2018080400000095", "feetype27");//回款反冲-收到的贴息--直租
CreateVoucherRedRentIncome cvri=new CreateVoucherRedRentIncome();
cvri.CreateVoucher(FlowUnid, "PZ2018072100000037");//收到租金
cvri.CreateVoucher(FlowUnid, "PZ2018072100000038");//收到逾期利息
cvri.CreateVoucher(FlowUnid, "PZ2018072100000037");//收到的租金--回租
cvri.CreateVoucher(FlowUnid, "PZ2018080400000091");//收到的租金--直租
cvri.CreateVoucher(FlowUnid, "PZ2018072100000038");//收到逾期利息--回租
cvri.CreateVoucher(FlowUnid, "PZ2018080400000092");//收到逾期利息--直租
return "true";
}

View File

@ -45,13 +45,17 @@ public class CreateVoucherMonthSettlement{
param.clear();
String sql="";
String moneyType="MONEY";
if("PZ2018071200000017".equals(voucherNo)) moneyType="FEEMONEY";
if("PZ2018071200000016".equals(voucherNo)) moneyType="MONEY";
if("PZ2018071200000017".equals(voucherNo)||"PZ2018080400000104".equals(voucherNo)) moneyType="FEEMONEY";
if("PZ2018071200000016".equals(voucherNo)||"PZ2018080400000102".equals(voucherNo)) moneyType="MONEY";
sql="SELECT CRM.INTEREST AS MONEY,CRM.FEE AS FEEMONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,CRM.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.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM CONTRACT_RENT_MONTH CRM LEFT JOIN LB_CONTRACT_INFO LCI ON CRM.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 WHERE DATE_FORMAT(STR_TO_DATE(CRM.END_DATE,'%Y/%m/%d'),'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')";
//租金的利息税金
if("PZ2018072100000055".equals(voucherNo)){
sql="SELECT LRP.INTEREST-ROUND(LRP.INTEREST/1.06,2) AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID AS CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_RENT_PLAN LRP INNER JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LRP.CONTRACT_ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 DATE_FORMAT(SYSDATE(),'%Y/%m/%d')=DATE_FORMAT(STR_TO_DATE(LRP.PLAN_DATE,'%Y/%m/%d'),'%Y/%m/%d')";
}
//租金的税金
if("PZ2018080200000063".equals(voucherNo)){
sql="SELECT LRP.RENT-ROUND(LRP.RENT/1.06,2) AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID AS CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_RENT_PLAN LRP INNER JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LRP.CONTRACT_ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 DATE_FORMAT(SYSDATE(),'%Y/%m/%d')=DATE_FORMAT(STR_TO_DATE(LRP.PLAN_DATE,'%Y/%m/%d'),'%Y/%m/%d')";
}
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);

View File

@ -39,15 +39,16 @@ public class CreateVoucherRedRentIncome {
String CUSTNAME=null;
String CUSTOMERTYPE=null;
String BUSINESSTYPE=null;
String ACC_NUM=null;
String sql="";
param.clear();
map.clear();
map.put("FLOWUNID", FlowUnid);
if("PZ2018072100000037".equals(VOUCHERNO)){
sql= "SELECT LRIT.rent AS MONEY,0 AS MONEYNOTAX,0 AS MONEYTAX, DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME_temp LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.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 WHERE LrIT.FLOWUNID=:FLOWUNID";
if("PZ2018072100000037".equals(VOUCHERNO)||"PZ2018080400000091".equals(VOUCHERNO)){
sql= "SELECT LRIT.rent AS MONEY,0 AS MONEYNOTAX,0 AS MONEYTAX, DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,LrIT.OWN_NUMBER FROM LC_rent_INCOME_temp LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.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 WHERE LrIT.FLOWUNID=:FLOWUNID";
}
if("PZ2018072100000038".equals(VOUCHERNO)){
sql= "SELECT LrIT.penalty AS MONEY,ROUND(LrIT.penalty/1.06,2) AS MONEYNOTAX,LrIT.penalty-ROUND(LrIT.penalty/1.06,2) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME_temp LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.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 WHERE LrIT.FLOWUNID=:FLOWUNID";
if("PZ2018072100000038".equals(VOUCHERNO)||"PZ2018080400000092".equals(VOUCHERNO)){
sql= "SELECT LrIT.penalty AS MONEY,ROUND(LrIT.penalty/1.06,2) AS MONEYNOTAX,LrIT.penalty-ROUND(LrIT.penalty/1.06,2) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,LrIT.OWN_NUMBER FROM LC_rent_INCOME_temp LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.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 WHERE LrIT.FLOWUNID=:FLOWUNID";
}
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
@ -75,6 +76,7 @@ public class CreateVoucherRedRentIncome {
CUSTNAME=dataList.get(i).get("CUSTOMERNAME");
CUSTOMERTYPE=dataList.get(i).get("CUSTOMERTYPE");
BUSINESSTYPE=dataList.get(i).get("BUSINESSTYPE");
ACC_NUM=dataList.get(i).get("OWN_NUMBER");
param.put("FACT_MONEY",MONEY);
param.put("INTERESTNOTAX",MONEYNOTAX);
@ -93,6 +95,7 @@ public class CreateVoucherRedRentIncome {
param.put("CUSTNAME",CUSTNAME);
param.put("CUSTOMERTYPE",CUSTOMERTYPE);
param.put("BUSINESSTYPE",BUSINESSTYPE);
param.put("ACC_NUMBER",ACC_NUM);
if("1".equals(BUSINESSTYPE)){
param.put("LEASFORMASSET", "04"); // ÈÚ×Ê×âÁÞ×ʲú

View File

@ -39,13 +39,14 @@ public class CreateVoucherRentIncome {
String CUSTNAME=null;
String CUSTOMERTYPE=null;
String BUSINESSTYPE=null;
String ACC_NUM=null;
String sql="";
param.clear();
if("PZ2018072100000024".equals(VOUCHERNO)){
sql= "SELECT LRIT.rent AS MONEY,0 AS MONEYNOTAX,0 AS MONEYTAX, DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.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 WHERE DATE_FORMAT(LrIT.hire_date,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d') ";
if("PZ2018072100000024".equals(VOUCHERNO)||"PZ2018080400000081".equals(VOUCHERNO)){
sql= "SELECT LRIT.rent AS MONEY,0 AS MONEYNOTAX,0 AS MONEYTAX, DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,LrIT.OWN_NUMBER FROM LC_rent_INCOME LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.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 WHERE DATE_FORMAT(LrIT.hire_date,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d') ";
}
if("PZ2018072100000025".equals(VOUCHERNO)){
sql= "SELECT LrIT.penalty AS MONEY,ROUND(LrIT.penalty/1.06,2) AS MONEYNOTAX,LrIT.penalty-ROUND(LrIT.penalty/1.06,2) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.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 WHERE DATE_FORMAT(LrIT.hire_date,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')";
if("PZ2018072100000025".equals(VOUCHERNO)||"PZ2018080400000082".equals(VOUCHERNO)){
sql= "SELECT LrIT.penalty AS MONEY,ROUND(LrIT.penalty/1.06,2) AS MONEYNOTAX,LrIT.penalty-ROUND(LrIT.penalty/1.06,2) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,LrIT.OWN_NUMBER FROM LC_rent_INCOME LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.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 WHERE DATE_FORMAT(LrIT.hire_date,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')";
}
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
@ -73,6 +74,7 @@ public class CreateVoucherRentIncome {
CUSTNAME=dataList.get(i).get("CUSTOMERNAME");
CUSTOMERTYPE=dataList.get(i).get("CUSTOMERTYPE");
BUSINESSTYPE=dataList.get(i).get("BUSINESSTYPE");
ACC_NUM=dataList.get(i).get("OWN_NUMBER");
param.put("FACT_MONEY",MONEY);
param.put("INTERESTNOTAX",MONEYNOTAX);
@ -91,6 +93,7 @@ public class CreateVoucherRentIncome {
param.put("CUSTNAME",CUSTNAME);
param.put("CUSTOMERTYPE",CUSTOMERTYPE);
param.put("BUSINESSTYPE",BUSINESSTYPE);
param.put("ACC_NUMBER",ACC_NUM);
if("1".equals(BUSINESSTYPE)){
param.put("LEASFORMASSET", "04"); // ÈÚ×Ê×âÁÞ×ʲú

View File

@ -13,12 +13,8 @@ public class auxiliaryContractAcc implements VoucherJavaParamService {
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String ACC_BANK=param.get("ACC_BANK");
String ACC_NUMBER=param.get("ACC_NUMBER");
String BANK_NAME=param.get("BANK_NAME");
returnValue.put("ACC_BANK",ACC_BANK);
returnValue.put("ACC_NUMBER",ACC_NUMBER);
returnValue.put("BANK_NAME",BANK_NAME);
return returnValue;
}
}

View File

@ -76,6 +76,8 @@ public class VoucherToV8Impl implements VoucherService {
BigDecimal F7Count = BigDecimal.ZERO;//借方金额总计
BigDecimal F8Count = BigDecimal.ZERO;//贷方金额总计
BigDecimal F7Co = BigDecimal.ZERO;//借方金额
BigDecimal F8Co = BigDecimal.ZERO;//贷方金额
List<BizObject> v8Vouchers=new ArrayList<BizObject>();
for(int i=0;i<list.size();i++){
BizObject v8=bm.newObject();
@ -134,6 +136,7 @@ public class VoucherToV8Impl implements VoucherService {
d.put("F73",list.get(i).get("LEASINCOMEFORM"));
d.put("F74",list.get(i).get("FUNDTYPE"));
d.put("F75",list.get(i).get("BUSINESSTYPE"));
d.put("F76",list.get(i).get("ACC_NUMBER"));
d.put("inputuserid",user.getAttribute("userid").getString());
d.put("v8_status",status);
@ -142,9 +145,15 @@ public class VoucherToV8Impl implements VoucherService {
d.put("generate_date", DateUtil.getSystemDateDetailTime());
d.put("F3", f3);
v8.setAttributesValue(d);
F7Count = F7Count.add(new BigDecimal( list.get(i).get("F7")));
F8Count = F8Count.add(new BigDecimal( list.get(i).get("F8")));
v8Vouchers.add(v8);
F7Co=new BigDecimal( list.get(i).get("F7"));
F8Co=new BigDecimal( list.get(i).get("F8"));
if(F7Co != BigDecimal.ZERO || F8Co != BigDecimal.ZERO){
v8Vouchers.add(v8);
}
}
if( F7Count != BigDecimal.ZERO && F8Count != BigDecimal.ZERO ){//凭证借贷双方各自总价值大于0才可以产生凭证
//实体方式保存凭证

View File

@ -16,10 +16,11 @@ import com.tenwa.doc.action.DocListAction;
public class AdjustInterestAction {
public String flowunid;
public String plan_number;
@SuppressWarnings("unchecked")
public void deleteFile(JBOTransaction tx) throws Exception{
List<BizObject> list=JBOFactory.createBizObjectQuery(LB_DOCRELATIVE.CLASS_NAME,"flow_unid=:flowunid and OBJECTTYPE='AdjustInterst'").setParameter("flowunid", this.flowunid).getResultList(false);
List<BizObject> list=JBOFactory.createBizObjectQuery(LB_DOCRELATIVE.CLASS_NAME,"flow_unid=:flowunid and OBJECTTYPE='AdjustInterst' and plan_number=:plannumber").setParameter("flowunid", this.flowunid).setParameter("plannumber", plan_number) .getResultList(false);
DocListAction doc=new DocListAction();
for(BizObject bo:list){
doc.setRelativeId(bo.getAttribute("id").getString());
@ -53,5 +54,14 @@ public class AdjustInterestAction {
public void setFlowunid(String flowunid) {
this.flowunid = flowunid;
}
public String getPlan_number() {
return plan_number;
}
public void setPlan_number(String plan_number) {
this.plan_number = plan_number;
}
}

View File

@ -1,17 +1,62 @@
package com.tenwa.flow.rent.carddeduct;
import java.sql.Connection;
import java.sql.Statement;
import jbo.app.tenwa.calc.LC_CARD_DEDUCT_DATA;
import jbo.app.tenwa.calc.LC_CARD_DEDUCT_DOC;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.context.ASUser;
import com.tenwa.quartz.DateUtil;
public class CardDeductManage {
private String ids;
private String id;
private String importDate;
private String bankType;
private String deductInfoId;
private String userId;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getDeductInfoId() {
return deductInfoId;
}
public void setDeductInfoId(String deductInfoId) {
this.deductInfoId = deductInfoId;
}
public String getBankType() {
return bankType;
}
public void setBankType(String bankType) {
this.bankType = bankType;
}
public String getImportDate() {
return importDate;
}
public void setImportDate(String importDate) {
this.importDate = importDate;
}
public String getIds() {
return ids;
}
@ -19,48 +64,35 @@ public class CardDeductManage {
public void setIds(String ids) {
this.ids = ids;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String delete(JBOTransaction tx){
public String delete(JBOTransaction tx) throws JBOException{
try{
String[] id = ids.split("@");
BizObjectManager bomLCDD = JBOFactory.getBizObjectManager(LC_CARD_DEDUCT_DOC.CLASS_NAME);
BizObjectManager bomLCDDA = JBOFactory.getBizObjectManager(LC_CARD_DEDUCT_DATA.CLASS_NAME);
Transaction tran = Transaction.createTransaction(tx);
ASUser user = ASUser.getUser(userId, tran);
tx.join(bomLCDD);
tx.join(bomLCDDA);
for(String d:id){
bomLCDD.createQuery("delete from O where id=:ID").setParameter("ID", d).executeUpdate();
bomLCDDA.createQuery("delete from O where deduct_docid=:ID").setParameter("ID", d).executeUpdate();
SqlObject so = new SqlObject("delete from lb_docrelative where id=(select ldl.relative_id from lb_doclibrary ldl left join lb_docattribute lda on ldl.id=lda.library_id where lda.id=(select file_id from lc_card_deduct_info where id='"+deductInfoId+"'))");
tran.executeSQL(so);
so = new SqlObject("delete from lb_doclibrary where id=(select library_id from lb_docattribute where id=(select file_id from lc_card_deduct_info where id='"+deductInfoId+"'))");
tran.executeSQL(so);
so = new SqlObject("delete from lb_docattribute where id=(select file_id from lc_card_deduct_info where id='"+deductInfoId+"')");
tran.executeSQL(so);
so = new SqlObject("update lc_card_deduct_info set updateuserid='"+user.getUserID()+"',updateorgid='"+user.getOrgID()+"',updatetime='"+StringFunction.getTodayNow().replaceAll(":", "¡÷")+"',import_date=null where id='"+deductInfoId+"'");
so.setDebugSql(so.getDebugSql().replaceAll("¡÷", ":"));
so.setOriginalSql(so.getOriginalSql().replaceAll("¡÷", ":"));
so.setRunSql(so.getRunSql().replaceAll("¡÷", ":"));
tran.executeSQL(so);
}
}catch(Exception e){
e.printStackTrace();
return "ERROR";
}
return "SUCCESS";
}
/**
* 检查此笔卡扣数据是否在流程中
* @param tx
* @return
*/
public String checkIsInFlow(JBOTransaction tx){
try{
BizObjectManager bomFBO = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
tx.join(bomFBO);
BizObject fbo = bomFBO.createQuery("select FLOW_KEY FROM O WHERE flow_key=:flowkey and FLOW_NAME='卡扣核销流程' ").setParameter("flowkey",id).getSingleResult(false);
if(fbo!=null){
return "ERROR";
}
}catch(Exception e){
e.printStackTrace();
tx.rollback();
return "ERROR";
}
return "SUCCESS";

View File

@ -1,8 +1,11 @@
package com.tenwa.flow.rent.rentincome;
import java.math.BigDecimal;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@ -33,6 +36,7 @@ import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.Transaction;
import com.mchange.v2.c3p0.ComboPooledDataSource;
import com.tenwa.reckon.constant.Scale;
import com.tenwa.reckon.util.UUIDUtil;
@ -55,7 +59,16 @@ public class RentIncomeMethod {
private String sql;
private String userid;
private String orgid;
private String deductDocId;
public String getDeductDocId() {
return deductDocId;
}
public void setDeductDocId(String deductDocId) {
this.deductDocId = deductDocId;
}
public String getUserid() {
return userid;
}
@ -800,6 +813,30 @@ public class RentIncomeMethod {
}
public String createRentIncomeWithCard(JBOTransaction tx) throws Exception{
String sReturn = "SUCCESS";
Transaction tran = Transaction.createTransaction(tx);
Connection con = null;
try{
con = tran.getConnection(tran);
/* ResultSet rs = stat.executeQuery("select count(1) cou from lc_card_deduct_data where deduct_docid='"+deductDocId+"' and income_status='0'");
if(rs.next()){
String cou = rs.getString("cou");
if("0".equals(cou)){
return "false";
}
}*/
CallableStatement call = con.prepareCall("call proc_card_income('"+deductDocId+"','"+userid+"','"+orgid+"')");
call.execute();
}catch(Exception e){
e.printStackTrace();
con.rollback();
tx.rollback();
return "ERROR";
}
return sReturn;
}
/*public String createRentIncomeWithCard(JBOTransaction tx) throws Exception{
String sReturn = "SUCCESS";
sql = sql.replaceAll("¡÷", ",");
sql = sql.replaceAll("&", "=");
@ -1031,5 +1068,5 @@ public class RentIncomeMethod {
return "ERROR";
}
return sReturn;
}
}*/
}

Some files were not shown because too many files have changed in this diff Show More