YingHang
hanxuntao 4 months ago
parent d69c8d1193
commit 1a1e77b1a0

@ -580,6 +580,114 @@ namespace DSWeb.Areas.Account.Controllers
} }
public ContentResult SendPayReCharge()
{
var GID = Guid.NewGuid().ToString().Replace("-", "");
if (GID.Length > 32) GID = GID.Substring(0, 32);
var NonceStr = Guid.NewGuid().ToString().Replace("-", "");
if (NonceStr.Length > 32) NonceStr = NonceStr.Substring(0, 32);
var DSPAYUSERNAME = MsSysParamSetDAL.GetData("PARAMNAME='DSPAYUSERNAME'").PARAMVALUE;
var newPaymentFrom = new PayReCharge();
newPaymentFrom.AppId = MsSysParamSetDAL.GetData("PARAMNAME='DSPAYID'").PARAMVALUE;
newPaymentFrom.Username = DSPAYUSERNAME;
newPaymentFrom.RechargeCode = "0000";
newPaymentFrom.RechargeAmount =10000;
newPaymentFrom.Username = "ds_hxt";
newPaymentFrom.CompanyName = "青岛东胜伟业软件有限公司";
newPaymentFrom.RechargePackage = "111";
newPaymentFrom.ApiSerialNo = NonceStr;
newPaymentFrom.RechargeStartTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ssZ");
newPaymentFrom.RechargeEndTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ssZ");
newPaymentFrom.RechargeTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ssZ");
DBResult result = new DBResult();
var Timestamp = ConvertDateTimeToInt(DateTime.Now);
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
var CompanyName = T_ALL_DA.GetStrSQL("FULLNAME", "select FULLNAME from [company] where GID='" + Convert.ToString(Session["COMPANYID"]).ToString().Trim() + "'");
var secretKey = MsSysParamSetDAL.GetData("PARAMNAME='DSPAYKEY'").PARAMVALUE;
var payUrl = MsSysParamSetDAL.GetData("PARAMNAME='DSPAYURL'").PARAMVALUE;
var jsonstr = Newtonsoft.Json.JsonConvert.SerializeObject(newPaymentFrom);
var Signature = signatureGet(jsonstr, NonceStr, Timestamp.ToString(), secretKey);
Dictionary<string, string> dicData = new Dictionary<string, string>();
dicData.Add("Signature", Signature);
dicData.Add("Timestamp", Timestamp.ToString());
dicData.Add("NonceStr", NonceStr);
BasicDataRefDAL.SaveLog(jsonstr, "admin", "快付发起备案", "发送");
var rtn = WebRequestHelper.DoPostHead(payUrl + "/api/ManualBankRecordCallback", dicData, jsonstr);
var _rd = JsonConvert.Deserialize<PaymentResult>(rtn);
BasicDataRefDAL.SaveLog(rtn, "", "快付发起备案", "返回");
result.Success = _rd.Code == 0;
result.Message = _rd.Msg;
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult SendPaymentCallBack()
{
var GID = Guid.NewGuid().ToString().Replace("-", "");
if (GID.Length > 32) GID = GID.Substring(0, 32);
var NonceStr = Guid.NewGuid().ToString().Replace("-", "");
if (NonceStr.Length > 32) NonceStr = NonceStr.Substring(0, 32);
var DSPAYUSERNAME = MsSysParamSetDAL.GetData("PARAMNAME='DSPAYUSERNAME'").PARAMVALUE;
var newPaymentFrom = new PaymentCallBack();
newPaymentFrom.AppId = MsSysParamSetDAL.GetData("PARAMNAME='DSPAYID'").PARAMVALUE;
newPaymentFrom.SerialNo = "ff5beca2-85aa-4c02-830c-e40c5cd51214";
newPaymentFrom.BankCode = "0000";
newPaymentFrom.ChargeAmount = 30000;
newPaymentFrom.BankMsg = "111";
newPaymentFrom.ApiSerialNo = NonceStr;
newPaymentFrom.CallbackUrl = "http://47.104.102.13:8081/Dispatch/Dispatch/PaymentCallback";
DBResult result = new DBResult();
var Timestamp = ConvertDateTimeToInt(DateTime.Now);
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
var CompanyName = T_ALL_DA.GetStrSQL("FULLNAME", "select FULLNAME from [company] where GID='" + Convert.ToString(Session["COMPANYID"]).ToString().Trim() + "'");
var secretKey = MsSysParamSetDAL.GetData("PARAMNAME='DSPAYKEY'").PARAMVALUE;
var payUrl = MsSysParamSetDAL.GetData("PARAMNAME='DSPAYURL'").PARAMVALUE;
var jsonstr = Newtonsoft.Json.JsonConvert.SerializeObject(newPaymentFrom);
var Signature = signatureGet(jsonstr, NonceStr, Timestamp.ToString(), secretKey);
Dictionary<string, string> dicData = new Dictionary<string, string>();
dicData.Add("Signature", Signature);
dicData.Add("Timestamp", Timestamp.ToString());
dicData.Add("NonceStr", NonceStr);
BasicDataRefDAL.SaveLog(jsonstr, "admin", "快付发起备案", "发送");
var rtn = WebRequestHelper.DoPostHead(payUrl + "/api/ManualBankRecordCallback", dicData, jsonstr);
var _rd = JsonConvert.Deserialize<PaymentResult>(rtn);
BasicDataRefDAL.SaveLog(rtn, "", "快付发起备案", "返回");
result.Success = _rd.Code == 0;
result.Message = _rd.Msg;
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public static long ConvertDateTimeToInt(System.DateTime time) public static long ConvertDateTimeToInt(System.DateTime time)
{ {
long t = (time.Ticks - 621356256000000000) / 10000; long t = (time.Ticks - 621356256000000000) / 10000;

@ -442,6 +442,10 @@ namespace DSWeb.Areas.Account.Models.Chfee_Pay
/// ///
/// </summary> /// </summary>
public string CallbackUrl { get; set; } public string CallbackUrl { get; set; }
public string OrderRejectionCode { get; set; }
public string OrderRejectionMsg { get; set; }
} }
public class ChPaymentCallBack : ModelObjectBillHead public class ChPaymentCallBack : ModelObjectBillHead

@ -28,6 +28,7 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, {
this.MsPeriod = null; this.MsPeriod = null;
this.ISRATESET = 0; this.ISRATESET = 0;
this.sqlcontext = ''; this.sqlcontext = '';
this.STLSHOWVOU = 0;
this.storeMustBe = Ext.create('Ext.data.Store', { this.storeMustBe = Ext.create('Ext.data.Store', {
model: 'DsShipping.ux.OpDefValue', model: 'DsShipping.ux.OpDefValue',
@ -2891,6 +2892,33 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, {
selType: 'cellmodel', selType: 'cellmodel',
columns: this.girdcolums columns: this.girdcolums
}); });
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsSysParamSet/GetData',
params: {
condition: "PARAMNAME='STLSHOWVOU'"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success != true) {
} else {
var data = result.data;
if (data.PARAMVALUE == '1') {
this.STLSHOWVOU = 1;
} else {
}
}
} else {
}
},
scope: this
});
//#endregion //#endregion
//#endregion //#endregion
@ -5024,6 +5052,9 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, {
}, this); }, this);
_this.editRecord.commit(); _this.editRecord.commit();
_this.GetEditStatus(); _this.GetEditStatus();
if (_this.STLSHOWVOU == 1) {
DsOpenEditWin('/MvcShipping/MsCwVouchersGl/Edit?handle=check&ordno=' + jsonresult.Data, "凭证录入", "", "940", "10", "10");
}
} else { } else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText); Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
} }

@ -235,6 +235,7 @@ Ext.extend(Shipping.MsChPaySettlementBLEdit, Ext.Panel, {
labelWidth: 70, labelWidth: 70,
flex: 0.5, flex: 0.5,
allowBlank: false, allowBlank: false,
emptyText: Zi.LAN.STLCURR, //原币申请
name: 'CURR', name: 'CURR',
valueField: 'CURR', valueField: 'CURR',
displayField: 'CURR', displayField: 'CURR',

@ -2154,7 +2154,7 @@ Ext.extend(Shipping.MsChPaysettlementIndex, Ext.Panel, {
Ext.Ajax.request({ Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
url: '/Account/Chfee_Pay/SendBankRecord', url: '/Account/Chfee_Pay/CreateUrl',
params: { params: {
GID:'' GID:''
}, },

@ -128,6 +128,7 @@ Ext.extend(Shipping.MsChRecvInvSettlementEdit, Ext.Panel, {
store: this.StoreCurr, store: this.StoreCurr,
forceSelection: true, forceSelection: true,
allowBlank: false, allowBlank: false,
emptyText: Zi.LAN.STLCURR, //原币申请
flex: 0.5, flex: 0.5,
name: 'CURR', name: 'CURR',
valueField: 'CURR', valueField: 'CURR',

@ -165,6 +165,7 @@ Ext.extend(Shipping.MsChRecvSettlementBLEdit, Ext.Panel, {
store: this.StoreCurr, store: this.StoreCurr,
forceSelection: true, forceSelection: true,
allowBlank: false, allowBlank: false,
emptyText: Zi.LAN.STLCURR, //原币申请
flex: 0.5, flex: 0.5,
name: 'CURR', name: 'CURR',
valueField: 'CURR', valueField: 'CURR',

@ -312,7 +312,10 @@ Ext.extend(Shipping.MsRptLhRptListIndex, Ext.Panel, {
text: '超期利息', text: '超期利息',
//text:'业务来源', //text:'业务来源',
width: 120, width: 120,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
summaryType: 'sum', align: 'right', summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true); value = usMoney(value, 2, '', true);

@ -946,18 +946,18 @@ Ext.extend(Shipping.MsRptSaleBalProfitShareIndex, Ext.Panel, {
var SALE = form.findField('PS_SALE').getValue(); var SALE = form.findField('PS_SALE').getValue();
sql = sql + getAndConSql(sql, SALE, "B.SALE='" + SALE + "'"); sql = sql + getAndConSql(sql, SALE, "B.SALE='" + SALE + "'");
var expDate_Min = form.findField('PS_STLDATEBGN').getRawValue(); var expDate_Min = form.findField('PS_ACCDATEBGN').getRawValue();
if (expDate_Min != '') { if (expDate_Min != '') {
var myexpDate_Min = Ext.util.Format.date(expDate_Min, 'Y-m'); var myexpDate_Min = Ext.util.Format.date(expDate_Min, 'Y-m');
sql = sql + getAndConSql(sql, myexpDate_Min, " B.ACCDATE>='" + myexpDate_Min + "'"); sql = sql + getAndConSql(sql, myexpDate_Min, " B.ACCDATE>='" + myexpDate_Min + "'");
} }
var expDate_Max = form.findField('PS_STLDATEEND').getRawValue(); var expDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
if (expDate_Max != '') { if (expDate_Max != '') {
var myexpDate_Max = Ext.util.Format.date(expDate_Max, 'Y-m'); var myexpDate_Max = Ext.util.Format.date(expDate_Max, 'Y-m');
sql = sql + getAndConSql(sql, myexpDate_Max, " B.ACCDATE<='" + myexpDate_Min + "'"); sql = sql + getAndConSql(sql, myexpDate_Max, " B.ACCDATE<='" + myexpDate_Max + "'");
} }

@ -21,6 +21,9 @@ using DSWeb.Areas.CommMng.Models;
using System.Text; using System.Text;
using System.Web.Configuration; using System.Web.Configuration;
using DSWeb.SoftMng.Filter; using DSWeb.SoftMng.Filter;
using com.sun.org.apache.bcel.@internal.generic;
using DSWeb.TruckMng.Models.MsCustTruckFeeTemplate;
using static NPOI.HSSF.Util.HSSFColor;
namespace DSWeb.Areas.TruckMng.Controllers namespace DSWeb.Areas.TruckMng.Controllers
{ {
@ -1376,12 +1379,13 @@ namespace DSWeb.Areas.TruckMng.Controllers
strSql.Append(",CASE WHEN (case when ISNULL(B.KGS,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.KGS*P.PCKGS,2) as numeric(20,2)) END)=0 THEN 0 ELSE cast(round((((case when ISNULL(B.KGS,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.KGS*P.PCKGS+(P.TTLDR*P.PCKGS),2) as numeric(20,2)) END)-"); strSql.Append(",CASE WHEN (case when ISNULL(B.KGS,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.KGS*P.PCKGS,2) as numeric(20,2)) END)=0 THEN 0 ELSE cast(round((((case when ISNULL(B.KGS,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.KGS*P.PCKGS+(P.TTLDR*P.PCKGS),2) as numeric(20,2)) END)-");
strSql.Append("((P.TTLCR*P.PCKGS)+(case when ISNULL(B.KGS,0)=0 THEN 0 ELSE cast(round(G.TTKHFCR/B.KGS*P.PCKGS,2) as numeric(20,2)) END)))/(case when ISNULL(B.KGS,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.KGS*P.PCKGS+(P.TTLDR*P.PCKGS),2) as numeric(20,2)) END)*100),2) AS numeric(20,2)) END PROFITRATE "); strSql.Append("((P.TTLCR*P.PCKGS)+(case when ISNULL(B.KGS,0)=0 THEN 0 ELSE cast(round(G.TTKHFCR/B.KGS*P.PCKGS,2) as numeric(20,2)) END)))/(case when ISNULL(B.KGS,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.KGS*P.PCKGS+(P.TTLDR*P.PCKGS),2) as numeric(20,2)) END)*100),2) AS numeric(20,2)) END PROFITRATE ");
strSql.Append(" ,(SELECT DESCRIPTION FROM info_client WHERE SHORTNAME=B.CUSTOMERNAME) AS CUSTOMERNAMEREF"); strSql.Append(" ,(SELECT DESCRIPTION FROM info_client WHERE SHORTNAME=B.CUSTOMERNAME) AS CUSTOMERNAMEREF");
strSql.Append(" ,(SELECT DESCRIPTION FROM info_client WHERE SHORTNAME=P.TRUCKER) AS TRUCKERREF"); strSql.Append(" ,(SELECT DESCRIPTION FROM info_client WHERE SHORTNAME=P.TRUCKER) AS TRUCKERREF,ISTEMPLATENAME");
strSql.Append(" FROM op_truck_bulk B LEFT JOIN v_op_gain_dr_INV_truck G ON (G.BSNO=B.BSNO)"); strSql.Append(" FROM op_truck_bulk B LEFT JOIN v_op_gain_dr_INV_truck G ON (G.BSNO=B.BSNO)");
strSql.Append(" LEFT JOIN (select P.BSNO,P.TRANSSTATUS,P.ETD,P.CREATETIME,datediff(day,P.ETD,P.CREATETIME) DELAYDAYS,P.TRUCKER,P.DRIVER,P.TRUCKNO,P.DRIVERTEL,P.REMARK,CASE WHEN P.KGS=0 THEN 0 ELSE P.FREIGHT/P.KGS END FREIGHT,"); strSql.Append(" LEFT JOIN (select P.BSNO,P.TRANSSTATUS,P.ETD,P.CREATETIME,datediff(day,P.ETD,P.CREATETIME) DELAYDAYS,P.TRUCKER,P.DRIVER,P.TRUCKNO,P.DRIVERTEL,P.REMARK,CASE WHEN P.KGS=0 THEN 0 ELSE P.FREIGHT/P.KGS END FREIGHT,");
strSql.Append(" P.TAXRATE,CASE WHEN P.KGS=0 THEN 0 ELSE P.TTLFREIGHT/P.KGS END TTLFREIGHT,CASE WHEN P.KGS=0 THEN 0 ELSE G.TTLOTCR/P.KGS END TTLOTCR,CASE WHEN P.KGS=0 THEN 0 ELSE G.TTKHFCR/P.KGS END TTKHFCR"); strSql.Append(" P.TAXRATE,CASE WHEN P.KGS=0 THEN 0 ELSE P.TTLFREIGHT/P.KGS END TTLFREIGHT,CASE WHEN P.KGS=0 THEN 0 ELSE G.TTLOTCR/P.KGS END TTLOTCR,CASE WHEN P.KGS=0 THEN 0 ELSE G.TTKHFCR/P.KGS END TTKHFCR");
strSql.Append(",CASE WHEN P.KGS=0 THEN 0 ELSE G.TTLCR/P.KGS END TTLCR,CASE WHEN P.KGS=0 THEN 0 ELSE G.TTLDR/P.KGS END TTLDR,PD.LINKBSNO,PD.PCKGS,PD.PCCTNNUM,PD.PCPKGS,PD.PCCBM,PD.PCNETWEIGHT "); strSql.Append(",CASE WHEN P.KGS=0 THEN 0 ELSE G.TTLCR/P.KGS END TTLCR,CASE WHEN P.KGS=0 THEN 0 ELSE G.TTLDR/P.KGS END TTLDR,PD.LINKBSNO,PD.PCKGS,PD.PCCTNNUM,PD.PCPKGS,PD.PCCBM,PD.PCNETWEIGHT ");
strSql.Append(",P.SALE,P.CUSTSERVICE,P.KGS TTLPCKGS from (select BSNO,LINKBSNO,SUM(KGS)PCKGS,SUM(CTNNUM) PCCTNNUM,SUM(PKGS) PCPKGS,SUM(CBM) PCCBM,SUM(NETWEIGHT) PCNETWEIGHT from op_truck_bulk_pc_detail pd GROUP BY BSNO,LINKBSNO) PD"); strSql.Append(",P.SALE,P.CUSTSERVICE,P.KGS TTLPCKGS,CASE WHEN ISNULL(P.TEMPLATENAME,'')='' THEN '否' ELSE CASE WHEN (SELECT isnull(COUNT(1),0) FROM Cust_Truck_feetemplate WHERE CONTRACTNO<>'' AND TEMPLATENAME=P.TEMPLATENAME)>0 THEN '是' ELSE '否' END END ISTEMPLATENAME ");
strSql.Append(" from (select BSNO,LINKBSNO,SUM(KGS)PCKGS,SUM(CTNNUM) PCCTNNUM,SUM(PKGS) PCPKGS,SUM(CBM) PCCBM,SUM(NETWEIGHT) PCNETWEIGHT from op_truck_bulk_pc_detail pd GROUP BY BSNO,LINKBSNO) PD");
strSql.Append(" LEFT JOIN op_truck_bulk_pc p ON (P.BSNO=pD.BSNO) LEFT JOIN v_op_gain_dr_INV_truck G ON (G.BSNO=p.BSNO)) P ON (P.LINKBSNO=B.BSNO)"); strSql.Append(" LEFT JOIN op_truck_bulk_pc p ON (P.BSNO=pD.BSNO) LEFT JOIN v_op_gain_dr_INV_truck G ON (G.BSNO=p.BSNO)) P ON (P.LINKBSNO=B.BSNO)");
strSql.Append(" where B.transtype='普运' "); strSql.Append(" where B.transtype='普运' ");
if (!string.IsNullOrEmpty(condition)) if (!string.IsNullOrEmpty(condition))
@ -1576,12 +1580,15 @@ namespace DSWeb.Areas.TruckMng.Controllers
strSql.Append(",CASE WHEN (case when ISNULL(B.CTNNUM,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.CTNNUM*P.PCCTNNUM+(P.TTLDR*P.PCCTNNUM),2) as numeric(20,2)) END)=0 THEN 0 ELSE cast(round((((case when ISNULL(B.CTNNUM,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.CTNNUM*P.PCCTNNUM+(P.TTLDR*P.PCCTNNUM),2) as numeric(20,2)) END)"); strSql.Append(",CASE WHEN (case when ISNULL(B.CTNNUM,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.CTNNUM*P.PCCTNNUM+(P.TTLDR*P.PCCTNNUM),2) as numeric(20,2)) END)=0 THEN 0 ELSE cast(round((((case when ISNULL(B.CTNNUM,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.CTNNUM*P.PCCTNNUM+(P.TTLDR*P.PCCTNNUM),2) as numeric(20,2)) END)");
strSql.Append("-((P.TTLCR*P.PCCTNNUM)+(case when ISNULL(B.CTNNUM,0)=0 THEN 0 ELSE cast(round(G.TTKHFCR/B.CTNNUM*P.PCCTNNUM,2) as numeric(20,2)) END)))/(case when ISNULL(B.CTNNUM,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.CTNNUM*P.PCCTNNUM+(P.TTLDR*P.PCCTNNUM),2) as numeric(20,2)) END)*100),2) AS numeric(20,2)) END PROFITRATE "); strSql.Append("-((P.TTLCR*P.PCCTNNUM)+(case when ISNULL(B.CTNNUM,0)=0 THEN 0 ELSE cast(round(G.TTKHFCR/B.CTNNUM*P.PCCTNNUM,2) as numeric(20,2)) END)))/(case when ISNULL(B.CTNNUM,0)=0 THEN 0 ELSE cast(round(G.TTLDR/B.CTNNUM*P.PCCTNNUM+(P.TTLDR*P.PCCTNNUM),2) as numeric(20,2)) END)*100),2) AS numeric(20,2)) END PROFITRATE ");
strSql.Append(" ,(SELECT DESCRIPTION FROM info_client WHERE SHORTNAME=B.CUSTOMERNAME) AS CUSTOMERNAMEREF"); strSql.Append(" ,(SELECT DESCRIPTION FROM info_client WHERE SHORTNAME=B.CUSTOMERNAME) AS CUSTOMERNAMEREF");
strSql.Append(" ,(SELECT DESCRIPTION FROM info_client WHERE SHORTNAME=P.TRUCKER) AS TRUCKERREF"); strSql.Append(" ,(SELECT DESCRIPTION FROM info_client WHERE SHORTNAME=P.TRUCKER) AS TRUCKERREF,ISTEMPLATENAME");
strSql.Append(" FROM (select *,(select sum(CTNNUM) from op_truck_bulk_detail where BSNO=op_truck_bulk.BSNO) CTNNUM from op_truck_bulk where transtype='集装箱') B LEFT JOIN v_op_gain_dr_INV_truck G ON (G.BSNO=B.BSNO)"); strSql.Append(" FROM (select *,(select sum(CTNNUM) from op_truck_bulk_detail where BSNO=op_truck_bulk.BSNO) CTNNUM from op_truck_bulk where transtype='集装箱') B LEFT JOIN v_op_gain_dr_INV_truck G ON (G.BSNO=B.BSNO)");
strSql.Append(" LEFT JOIN (select P.BSNO,P.TRANSSTATUS,P.ETD,P.ETA,P.CREATETIME,datediff(day,P.ETA,P.CREATETIME) DELAYDAYS,P.TRUCKER,P.DRIVER,P.TRUCKNO,P.DRIVERTEL,P.REMARK,CASE WHEN P.CTNNUM=0 THEN 0 ELSE P.FREIGHT/P.CTNNUM END FREIGHT,P.TAXRATE"); strSql.Append(" LEFT JOIN (select P.BSNO,P.TRANSSTATUS,P.ETD,P.ETA,P.CREATETIME,datediff(day,P.ETA,P.CREATETIME) DELAYDAYS,P.TRUCKER,P.DRIVER,P.TRUCKNO,P.DRIVERTEL,P.REMARK,CASE WHEN P.CTNNUM=0 THEN 0 ELSE P.FREIGHT/P.CTNNUM END FREIGHT,P.TAXRATE");
strSql.Append(",CASE WHEN P.CTNNUM=0 THEN 0 ELSE P.TTLFREIGHT/P.CTNNUM END TTLFREIGHT,CASE WHEN P.CTNNUM=0 THEN 0 ELSE G.TTLOTCR/P.CTNNUM END TTLOTCR,CASE WHEN P.CTNNUM=0 THEN 0 ELSE G.TTKHFCR/P.CTNNUM END TTKHFCR"); strSql.Append(",CASE WHEN P.CTNNUM=0 THEN 0 ELSE P.TTLFREIGHT/P.CTNNUM END TTLFREIGHT,CASE WHEN P.CTNNUM=0 THEN 0 ELSE G.TTLOTCR/P.CTNNUM END TTLOTCR,CASE WHEN P.CTNNUM=0 THEN 0 ELSE G.TTKHFCR/P.CTNNUM END TTKHFCR");
strSql.Append(",CASE WHEN P.CTNNUM=0 THEN 0 ELSE G.TTLCR/P.CTNNUM END TTLCR,CASE WHEN P.CTNNUM=0 THEN 0 ELSE G.TTLDR/P.CTNNUM END TTLDR,PD.LINKBSNO,PD.PCKGS,PD.PCCTNNUM"); strSql.Append(",CASE WHEN P.CTNNUM=0 THEN 0 ELSE G.TTLCR/P.CTNNUM END TTLCR,CASE WHEN P.CTNNUM=0 THEN 0 ELSE G.TTLDR/P.CTNNUM END TTLDR,PD.LINKBSNO,PD.PCKGS,PD.PCCTNNUM");
strSql.Append(",CASE WHEN ISNULL(P.TEMPLATENAME,'')='' THEN '否' ELSE CASE WHEN (SELECT isnull(COUNT(1),0) FROM Cust_Truck_feetemplate WHERE CONTRACTNO<>'' AND TEMPLATENAME=P.TEMPLATENAME)>0 THEN '是' ELSE '否' END END ISTEMPLATENAME ");
strSql.Append(",P.SALE,P.CUSTSERVICE from (select BSNO,LINKBSNO,SUM(KGS)PCKGS,SUM(CTNNUM) PCCTNNUM from op_truck_bulk_pc_detail pd GROUP BY BSNO,LINKBSNO) PD"); strSql.Append(",P.SALE,P.CUSTSERVICE from (select BSNO,LINKBSNO,SUM(KGS)PCKGS,SUM(CTNNUM) PCCTNNUM from op_truck_bulk_pc_detail pd GROUP BY BSNO,LINKBSNO) PD");
strSql.Append(" LEFT JOIN op_truck_bulk_pc p ON (P.BSNO=pD.BSNO) LEFT JOIN v_op_gain_dr_INV_truck G ON (G.BSNO=p.BSNO)) P ON (P.LINKBSNO=B.BSNO)"); strSql.Append(" LEFT JOIN op_truck_bulk_pc p ON (P.BSNO=pD.BSNO) LEFT JOIN v_op_gain_dr_INV_truck G ON (G.BSNO=p.BSNO)) P ON (P.LINKBSNO=B.BSNO)");
strSql.Append(" where B.transtype='集装箱' "); strSql.Append(" where B.transtype='集装箱' ");
if (!string.IsNullOrEmpty(condition)) if (!string.IsNullOrEmpty(condition))

@ -62,6 +62,7 @@ Ext.extend(Shipping.MsRptTruckBulkCtnProfitIndex, Ext.Panel, {
{ name: 'CUSTSERVICE', type: 'string' }, // 毛重 { name: 'CUSTSERVICE', type: 'string' }, // 毛重
{ name: 'CNTRTOTAL', type: 'string' }, // 净重 { name: 'CNTRTOTAL', type: 'string' }, // 净重
{ name: 'PCREMARK', type: 'string' }, // { name: 'PCREMARK', type: 'string' }, //
{ name: 'ISTEMPLATENAME', type: 'string' },
{ name: 'PKGS', type: 'string' }, // 件数 { name: 'PKGS', type: 'string' }, // 件数
{ name: 'PCCTNNUM', type: 'number' }, { name: 'PCCTNNUM', type: 'number' },
{ name: 'PCFREIGHT', type: 'number' }, { name: 'PCFREIGHT', type: 'number' },
@ -185,7 +186,12 @@ Ext.extend(Shipping.MsRptTruckBulkCtnProfitIndex, Ext.Panel, {
dataIndex: 'PCREMARK', dataIndex: 'PCREMARK',
header: '派车备注', header: '派车备注',
width: 120 width: 120
}, { }, {
sortable: true,
dataIndex: 'ISTEMPLATENAME',
header: '是否自定义价格',
width: 120
}, {
sortable: true, sortable: true,
dataIndex: 'TTLOTCR', dataIndex: 'TTLOTCR',
header: '应付代垫费用', header: '应付代垫费用',

@ -60,6 +60,7 @@ Ext.extend(Shipping.MsRptTruckBulkProfitIndex, Ext.Panel, {
{ name: 'DRIVER', type: 'string' }, // 驾驶员 { name: 'DRIVER', type: 'string' }, // 驾驶员
{ name: 'DRIVERTEL', type: 'string' }, // 驾驶员电话 { name: 'DRIVERTEL', type: 'string' }, // 驾驶员电话
{ name: 'PCREMARK', type: 'string' }, { name: 'PCREMARK', type: 'string' },
{ name: 'ISTEMPLATENAME', type: 'string' },
{ name: 'PCKGS', type: 'number' }, // 毛重 { name: 'PCKGS', type: 'number' }, // 毛重
{ name: 'PCNETWEIGHT', type: 'number' }, // 净重 { name: 'PCNETWEIGHT', type: 'number' }, // 净重
{ name: 'PCPKGS', type: 'number' }, // 件数 { name: 'PCPKGS', type: 'number' }, // 件数
@ -195,7 +196,12 @@ Ext.extend(Shipping.MsRptTruckBulkProfitIndex, Ext.Panel, {
dataIndex: 'PCREMARK', dataIndex: 'PCREMARK',
header: '派车备注', header: '派车备注',
width: 120 width: 120
}, { }, {
sortable: true,
dataIndex: 'ISTEMPLATENAME',
header: '是否自定义价格',
width: 120
}, {
sortable: true, sortable: true,
dataIndex: 'PCFREIGHT', dataIndex: 'PCFREIGHT',
header: '应付税前运费', header: '应付税前运费',

Loading…
Cancel
Save