1.付款将按经销商付款改为按合同付款。
This commit is contained in:
parent
27b8285d5d
commit
785d04026e
@ -80,30 +80,63 @@
|
||||
String[][] sButtons = null;
|
||||
if("ReadOnly".equals(rightType)){
|
||||
sButtons = new String[][]{
|
||||
};
|
||||
};
|
||||
}else if("0010".equals(phaseNo)){
|
||||
sButtons = new String[][]{
|
||||
/* {"true","","Button","±£´æ","±£´æ","as_save(0,'setColRequired()')","","","","btn_icon_saveNew",""},
|
||||
{"true","","Button","ÅúÁ¿ÐÞ¸Ä","ÅúÁ¿ÐÞ¸Ä","batchModify()","","","","btn_icon_detail",""}, */
|
||||
{"true","","Button","ɾ³ý","ɾ³ý","doDelete()","","","","btn_icon_delete",""}, };
|
||||
{"true","","Button","删除","删除","doDelete()","","","","btn_icon_delete",""},
|
||||
};
|
||||
}else if("0020".equals(phaseNo)){
|
||||
sButtons = new String[][]{
|
||||
{"true","","Button","保存","保存","as_save(0,'setColRequired()')","","","","btn_icon_saveNew",""} ,
|
||||
{"true","","Button","ÅúÁ¿ÐÞ¸Ä","ÅúÁ¿ÐÞ¸Ä","batchModify()","","","","btn_icon_detail",""}
|
||||
};
|
||||
{"true","","Button","批量修改","批量修改","batchModify()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","发起付款申请","保存","cmb_tp_pay()","","","","btn_icon_save",""},
|
||||
};
|
||||
}else if("0030".equals(phaseNo)){
|
||||
sButtons = new String[][]{
|
||||
{"true","","Button","付款结果回盘","付款结果回盘","cmb_tp_callback()","","","","btn_icon_delete",""},
|
||||
};
|
||||
}else{
|
||||
sButtons = new String[][]{
|
||||
// {"true","","Button","保存","保存","as_save(0,'setColRequired()')","","","","btn_icon_saveNew",""},
|
||||
// {"true","","Button","批量修改","批量修改","batchModify()","","","","btn_icon_detail",""},
|
||||
// {"true","","Button","导出付款明细","导出付款明细","createFundIncomeExcel()","","","","btn_icon_up",""},
|
||||
};
|
||||
|
||||
}
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
setColRequired();
|
||||
})
|
||||
function cmb_tp_pay(){
|
||||
var plist = getItemValueArray(0,"CONTRACT_ID")+"";
|
||||
if(typeof(plist)=="undefined" || plist.length==0 ){
|
||||
alert("请至少选择一条记录!");
|
||||
return ;
|
||||
}
|
||||
if(confirm("确认要发起付款申请吗?")){
|
||||
ids=plist.replace(/\,/g,"@");
|
||||
var sParams = "CurUserID=<%=CurUser.getUserID()%>,contract_ids="+ids+",FLOWUNID=<%=flowunid%>";
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.sdk.controller.CmbToPayController", "action",sParams );
|
||||
if(typeof(sReturn)=="undefined" || sReturn=="") return;
|
||||
if(sReturn.code==1){
|
||||
alert(sReturn.msg);
|
||||
}else{
|
||||
alert(sReturn.msg);
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
}
|
||||
function cmb_tp_callback(){
|
||||
var sParams = "CurUserID=<%=CurUser.getUserID()%>,FLOWUNID=<%=flowunid%>";
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.sdk.controller.CmbToCallbackController", "action",sParams );
|
||||
if(typeof(sReturn)=="undefined" || sReturn=="") return;
|
||||
if(sReturn.code==1){
|
||||
alert(sReturn.msg);
|
||||
}else{
|
||||
alert(sReturn.msg);
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
function afterSearch(){
|
||||
/* var rows = getRowCount(0);
|
||||
for(var i=0;i<rows;i++){
|
||||
|
||||
@ -6,7 +6,9 @@
|
||||
History Log:
|
||||
*/
|
||||
String phaseNo = CurPage.getParameter("PhaseNo");
|
||||
String rightType = CurPage.getParameter("RightType");
|
||||
//String rightType = CurPage.getParameter("RightType");
|
||||
//此页面以后只作为显示页面。
|
||||
String rightType="ReadOnly";
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String ishistory = CurPage.getParameter("IsHistory");
|
||||
ASObjectModel doTemp = new ASObjectModel("LC_FUND_INCOME_TEMP_HXM");
|
||||
@ -45,7 +47,7 @@
|
||||
sButtons = new String[][]{
|
||||
{"true","","Button","付款结果回盘","付款结果回盘","cmb_tp_callback()","","","","btn_icon_delete",""},
|
||||
};
|
||||
}
|
||||
}
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
@ -3739,7 +3739,8 @@
|
||||
<attributes>
|
||||
<attribute name="ID" label="ID" type="STRING" length="32"/>
|
||||
<attribute name="CMB_PAY_NO" label="付款流水号" type="STRING" length="32"/>
|
||||
<attribute name="CMB_PAY_LOG" label="付款日志" type="STRING" length="32"/>
|
||||
<attribute name="CMB_PAY_LOG" label="付款日志" type="STRING" length="32"/>
|
||||
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
|
||||
<attribute name="DISTRIBUTOR_ID" label="经销商编号" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程号" type="STRING" length="32"/>
|
||||
<attribute name="SQRNBR" label="流水号" type="STRING" length="10"/>
|
||||
@ -3794,7 +3795,8 @@
|
||||
<attributes>
|
||||
<attribute name="ID" label="ID" type="STRING" length="32"/>
|
||||
<attribute name="CMB_PAY_NO" label="付款流水号" type="STRING" length="32"/>
|
||||
<attribute name="CMB_PAY_LOG" label="付款日志" type="STRING" length="32"/>
|
||||
<attribute name="CMB_PAY_LOG" label="付款日志" type="STRING" length="32"/>
|
||||
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
|
||||
<attribute name="DISTRIBUTOR_ID" label="经销商编号" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
|
||||
<attribute name="FACT_MONEY" label="实付款" type="STRING" length="22"/>
|
||||
|
||||
@ -83,6 +83,7 @@ public class CmbToCallbackController extends BaseFlowStartAction {
|
||||
//安鹏要求采用固定写死值。
|
||||
//String LGNNAM = accountBo.getAttribute("OWN_NAME").toString();
|
||||
String LGNNAM = "安鹏经办";
|
||||
//String LGNNAM = "银企直连测试用户113";
|
||||
String FUNNAM = "NTSTLINF";
|
||||
int DATTYP = 2;
|
||||
|
||||
@ -186,7 +187,7 @@ public class CmbToCallbackController extends BaseFlowStartAction {
|
||||
}
|
||||
public void sql() throws JBOException{
|
||||
String sql2 = "update O left join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lci on lci.id=O.contract_id"
|
||||
+" left join jbo.com.tenwa.lease.comm.LC_FUND_INCOME_CALLBACK_DETAIL_TEMP tt on tt.DISTRIBUTOR_ID=lci.distributor_id"
|
||||
+" left join jbo.com.tenwa.lease.comm.LC_FUND_INCOME_CALLBACK_DETAIL_TEMP tt on tt.CONTRACT_ID=lci.ID"
|
||||
+" and O.FLOWUNID=tt.FLOWUNID set O.EBANK_STATUS=case when tt.RTNFLG='S' then '05' else '04' end where O.FLOWUNID='"+FLOWUNID+"'" ;
|
||||
JBOFactory.createBizObjectQuery(LC_FUND_INCOME_TEMP.CLASS_NAME,sql2).executeUpdate();
|
||||
}
|
||||
|
||||
@ -37,7 +37,17 @@ import net.sf.json.JSONObject;
|
||||
|
||||
public class CmbToPayController extends BaseFlowStartAction {
|
||||
private String distributor_ids; //获取选择的 经销商ID
|
||||
private String FLOWUNID ; //流程号
|
||||
private String contract_ids; //获取选择的合同ID
|
||||
private String FLOWUNID ; //流程号、
|
||||
|
||||
|
||||
public String getContract_ids() {
|
||||
return contract_ids;
|
||||
}
|
||||
|
||||
public void setContract_ids(String contract_ids) {
|
||||
this.contract_ids = contract_ids;
|
||||
}
|
||||
|
||||
public String getFLOWUNID() {
|
||||
return FLOWUNID;
|
||||
@ -73,12 +83,20 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
JSONObject jsonObj = JSONObject.fromObject(map);
|
||||
return jsonObj.toString();
|
||||
}
|
||||
List<String> distributor_id_list = java.util.Arrays.asList(distributor_ids.split("@"));
|
||||
//按经销商改为按合同
|
||||
/*List<String> distributor_id_list = java.util.Arrays.asList(distributor_ids.split("@"));
|
||||
if(distributor_id_list==null || distributor_id_list.size()<=0) {
|
||||
map.put("code", "1") ;
|
||||
map.put("msg", "尚未选择经销商,请检查") ;
|
||||
JSONObject jsonObj = JSONObject.fromObject(map);
|
||||
return jsonObj.toString();
|
||||
}*/
|
||||
List<String> contract_id_list = java.util.Arrays.asList(contract_ids.split("@"));
|
||||
if(contract_id_list==null || contract_id_list.size()<=0) {
|
||||
map.put("code", "1") ;
|
||||
map.put("msg", "尚未选择合同,请检查") ;
|
||||
JSONObject jsonObj = JSONObject.fromObject(map);
|
||||
return jsonObj.toString();
|
||||
}
|
||||
/*
|
||||
* 基本参数检查######开始
|
||||
@ -114,6 +132,7 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
//安鹏要求采用固定写死值。
|
||||
//String LGNNAM = accountBo.getAttribute("OWN_NAME").toString();
|
||||
String LGNNAM = "安鹏经办";
|
||||
// String LGNNAM = "银企直连测试用户113";
|
||||
String FUNNAM = "DCPAYREQ";
|
||||
int DATTYP = 2;
|
||||
String BUSMOD = "00001"; //默认参数 请按照实际情况谨慎修改
|
||||
@ -198,7 +217,7 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
String error_null_tips = ""; //定义错误信息 是否为空
|
||||
|
||||
|
||||
if(distributor_id_list.size() > 30){ //招行文档规定 单次批量申请不能超过30条
|
||||
if(contract_id_list.size() > 30){ //招行文档规定 单次批量申请不能超过30条
|
||||
map.put("code", "1") ;
|
||||
map.put("msg", "单次处理不能超过30条,请检查") ;
|
||||
JSONObject jsonObj = JSONObject.fromObject(map);
|
||||
@ -219,7 +238,7 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
String date = df.format(new Date());
|
||||
BigDecimal all_money = new BigDecimal("0");
|
||||
|
||||
List<BizObject> income_all_list = bankBo.createQuery("select o.CMB_PAY_NO,o.FACT_MONEY,o.FLOWUNID,contract_info.CONTRACT_NO,distributor.distributor_id,distributor.acc_number,distributor.open_bank,distributor.account,distributor.district,distributor.provinceInfo from o join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO contract_info on o.CONTRACT_ID = contract_info.id join jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT distributor on contract_info.distributor_id = distributor.distributor_id and distributor.is_main='Y' where FLOWUNID=:FLOWUNID and o.PAY_TYPE = 'pay_type_out' ").setParameter("FLOWUNID", FLOWUNID).getResultList(false);
|
||||
List<BizObject> income_all_list = bankBo.createQuery("select o.CMB_PAY_NO,o.FACT_MONEY,o.FLOWUNID,contract_info.ID,contract_info.CONTRACT_NO,distributor.distributor_id,distributor.acc_number,distributor.open_bank,distributor.account,distributor.district,distributor.provinceInfo from o join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO contract_info on o.CONTRACT_ID = contract_info.id join jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT distributor on contract_info.distributor_id = distributor.distributor_id and distributor.is_main='Y' where FLOWUNID=:FLOWUNID and o.PAY_TYPE = 'pay_type_out' ").setParameter("FLOWUNID", FLOWUNID).getResultList(false);
|
||||
if(income_all_list==null) {
|
||||
map.put("code", "1") ;
|
||||
map.put("msg", "资金收付数据不存在,请检查") ;
|
||||
@ -227,18 +246,18 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
return jsonObj.toString();
|
||||
}
|
||||
int index = 1 ;
|
||||
for (String distributor_id : distributor_id_list) {
|
||||
for (String contract_id : contract_id_list) {
|
||||
infoOne = null ;
|
||||
BigDecimal distributor_all_money = new BigDecimal("0");
|
||||
BigDecimal contract_all_money = new BigDecimal("0");
|
||||
for(BizObject income_one : income_all_list) {
|
||||
String income_one_distributor_id = income_one.getAttribute("distributor_id").toString();
|
||||
if(distributor_id.equals(income_one_distributor_id)) {
|
||||
String income_one_contract_id = income_one.getAttribute("ID").toString();
|
||||
if(contract_id.equals(income_one_contract_id)) {
|
||||
BigDecimal income_one_fact_money = new BigDecimal(income_one.getAttribute("FACT_MONEY").toString());
|
||||
distributor_all_money = distributor_all_money.add(income_one_fact_money);
|
||||
contract_all_money = contract_all_money.add(income_one_fact_money);
|
||||
infoOne = income_one ;
|
||||
}
|
||||
}
|
||||
all_money=all_money.add(distributor_all_money);
|
||||
all_money=all_money.add(contract_all_money);
|
||||
if(infoOne==null) {
|
||||
map.put("code", "1") ;
|
||||
map.put("msg", "第["+index+"]笔数据不存在,请检查") ;
|
||||
@ -248,6 +267,7 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
|
||||
String FLOWUNID = this.FLOWUNID ;
|
||||
String DISTRIBUTOR_ID = infoOne.getAttribute("distributor_id").toString();
|
||||
String CONTRACT_ID = infoOne.getAttribute("ID").toString();
|
||||
String CRTACC = infoOne.getAttribute("acc_number").toString();
|
||||
String BANK_NAME = infoOne.getAttribute("open_bank").toString();
|
||||
String CRTNAM = infoOne.getAttribute("account").toString();
|
||||
@ -281,9 +301,9 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
* 检查当前付款信息是否存在######结束
|
||||
*/
|
||||
|
||||
int check=distributor_all_money.compareTo(BigDecimal.ZERO);
|
||||
int check=contract_all_money.compareTo(BigDecimal.ZERO);
|
||||
|
||||
if( DISTRIBUTOR_ID==null || "".equals( DISTRIBUTOR_ID )
|
||||
if( CONTRACT_ID==null || "".equals( CONTRACT_ID )
|
||||
|| CRTACC==null || "".equals( CRTACC )
|
||||
|| BANK_NAME==null || "".equals( BANK_NAME )
|
||||
|| CRTNAM==null || "".equals( CRTNAM )
|
||||
@ -315,11 +335,11 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
YURREF_INDEX = String.format("%02d", index);
|
||||
}
|
||||
|
||||
String TRSAMT = distributor_all_money.toPlainString();
|
||||
String TRSAMT = contract_all_money.toPlainString();
|
||||
String YURREF = YURREF_INDEX + date+ temp_str;
|
||||
String BNKFLG = checkCMB(BANK_NAME);
|
||||
NUSAGE = "经销商["+CRTACC+"]发起申请";
|
||||
String BUSNAR = "[实际付款][经销商:"+CRTACC+"][支付金额:"+TRSAMT+"]";
|
||||
NUSAGE = "客户["+CRTACC+"]发起申请";
|
||||
String BUSNAR = "[实际付款][客户:"+CRTACC+"][支付金额:"+TRSAMT+"]";
|
||||
|
||||
pay_detail = new SDKDcPayReqxVO();
|
||||
pay_detail.setYURREF(YURREF);
|
||||
@ -346,6 +366,7 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
pay_detail_bo.setAttributeValue("ID", UUID.randomUUID().toString().replaceAll("-", ""));
|
||||
pay_detail_bo.setAttributeValue("CMB_PAY_NO", CMB_PAY_NO);
|
||||
pay_detail_bo.setAttributeValue("DISTRIBUTOR_ID", DISTRIBUTOR_ID);
|
||||
pay_detail_bo.setAttributeValue("CONTRACT_ID", CONTRACT_ID);
|
||||
pay_detail_bo.setAttributeValue("FLOWUNID", FLOWUNID);
|
||||
pay_detail_bo.setAttributeValue("YURREF", YURREF);
|
||||
pay_detail_bo.setAttributeValue("DBTACC", DBTACC);
|
||||
@ -409,7 +430,6 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
return jsonObj.toString();
|
||||
}
|
||||
|
||||
|
||||
if(result.getInfo().getSTATUS()==1) {
|
||||
if("0".equals( result.getInfo().getRETCOD() )) {
|
||||
pay_info_bo.setAttributeValue("FACT_MONEY",all_money.toPlainString());
|
||||
@ -424,9 +444,10 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
|
||||
if(pay_detail_list!=null && pay_detail_list.size()>0)
|
||||
for (BizObject pay_detail_one : pay_detail_list) {
|
||||
BizObjectQuery income_boo= income_bom.createQuery("update o join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lcf on o.contract_id = lcf.id set o.CMB_PAY_NO=:CMB_PAY_NO where o.PAY_TYPE = 'pay_type_out' and FLOWUNID=:FLOWUNID and lcf.distributor_id=:DISTRIBUTOR_ID");
|
||||
BizObjectQuery income_boo= income_bom.createQuery("update o join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lcf on o.contract_id = lcf.id set o.CMB_PAY_NO=:CMB_PAY_NO where o.PAY_TYPE = 'pay_type_out' and o.FLOWUNID=:FLOWUNID and lcf.ID=:CONTRACT_ID");
|
||||
income_boo.setParameter("CMB_PAY_NO",CMB_PAY_NO) ;
|
||||
income_boo.setParameter("FLOWUNID",pay_detail_one.getAttribute("FLOWUNID").toString()) ;
|
||||
income_boo.setParameter("CONTRACT_ID",pay_detail_one.getAttribute("CONTRACT_ID").toString()) ;
|
||||
income_boo.setParameter("DISTRIBUTOR_ID",pay_detail_one.getAttribute("DISTRIBUTOR_ID").toString()) ;
|
||||
income_boo.executeUpdate();//更新资金收付表
|
||||
pay_detail_bom.saveObject(pay_detail_one); //插入支付详情表
|
||||
@ -478,6 +499,7 @@ public class CmbToPayController extends BaseFlowStartAction {
|
||||
if(pay_detail_list!=null && pay_detail_list.size()>0) {
|
||||
for (BizObject pay_detail_one : pay_detail_list) {
|
||||
if(DETAIL_YURREF.equals( pay_detail_one.getAttribute("YURREF").toString() )) {
|
||||
callback_detail_bo.setAttributeValue("CONTRACT_ID",pay_detail_one.getAttribute("CONTRACT_ID").toString());
|
||||
callback_detail_bo.setAttributeValue("DISTRIBUTOR_ID",pay_detail_one.getAttribute("DISTRIBUTOR_ID").toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,6 +108,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
//安鹏要求采用固定写死值。
|
||||
//String LGNNAM = accountBo.getAttribute("OWN_NAME").toString();
|
||||
String LGNNAM = "安鹏经办";
|
||||
// String LGNNAM = "银企直连测试用户113";
|
||||
String FUNNAM = "NTSTLINF";
|
||||
int DATTYP = 2;
|
||||
|
||||
@ -236,6 +237,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
//安鹏要求采用固定写死值。
|
||||
//String LGNNAM = accountBo.getAttribute("OWN_NAME").toString();
|
||||
String LGNNAM = "安鹏经办";
|
||||
// String LGNNAM = "银企直连测试用户113";
|
||||
String FUNNAM = "DCPAYREQ";
|
||||
int DATTYP = 2;
|
||||
String BUSMOD = "00001"; //默认参数 请按照实际情况谨慎修改
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user