DS7_JinGang
ddlucky 2 years ago
commit c7c0c81c9f

@ -81,12 +81,12 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql.Append(",(select ShowName from [user] where GID=cm.AUDITUSER) as AUDITUSERREF");
strSql.Append(",(select STLNAME from [code_stlmode] where STLCODE=cm.SETTLETYPE) as SETTLETYPEREF");
strSql.Append(",CUSTACCOUNTGID,cm.REASON,AUDITREMARK");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY='RMB' AND BILLNO=cm.BILLNO) as RMBDOAMOUNT ");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY='USD' AND BILLNO=cm.BILLNO) as USDDOAMOUNT ");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY!='RMB' AND CURRENCY!='USD' AND BILLNO=cm.BILLNO) as OTDOAMOUNT ");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do WITH (NOLOCK) where CURRENCY='RMB' AND BILLNO=cm.BILLNO AND CATEGORY=4) as RMBDOAMOUNT ");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do WITH (NOLOCK) where CURRENCY='USD' AND BILLNO=cm.BILLNO AND CATEGORY=4) as USDDOAMOUNT ");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do WITH (NOLOCK) where CURRENCY!='RMB' AND CURRENCY!='USD' AND BILLNO=cm.BILLNO AND CATEGORY=4) as OTDOAMOUNT ");
strSql.Append(",(select CODENAME+'_'+bankname from info_client_bank where gid=cm.CUSTACCOUNTGID) CUSTBANKNAME");
strSql.Append(",(select ACCOUNT from info_client_bank where gid=cm.CUSTACCOUNTGID) CUSTACCOUNT");
strSql.Append(",ISNULL((select sum(isnull(amount,0)-isnull(invoice,0)) as noinvoice from ch_fee WITH (NOLOCK) where isnull(ISINVOICE,0)<>1 and gid in (select feeid from ch_fee_do WITH (NOLOCK) where BILLNO=cm.BILLNO)),0) as NOINVOICE");
strSql.Append(",ISNULL((select sum(isnull(amount,0)-isnull(invoice,0)) as noinvoice from ch_fee WITH (NOLOCK) where isnull(ISINVOICE,0)<>1 and EXISTS (select 1 from ch_fee_do WITH (NOLOCK) where ch_fee_do.FEEID=ch_fee.gid and ch_fee_do.BILLNO=cm.BILLNO)),0) as NOINVOICE");
strSql.Append(",cm.BS_CUSTOMERNAME,0 IsAudit,PREAMOUNTRMB,PREAMOUNTUSD,PREAMOUNTOT ");
strSql.Append(",dbo.GetStlByPayNo(cm.BILLNO) as BALBILLNO,cm.ISPRINT,cm.PRINTCOUNT,wxpush,STLRATE,STLAMOUNT,STLCURR,ISREVINV ");
strSql.Append(",cm.SALECORPID,(select [NAME] from [company] where GID=cm.SALECORPID) as SALECORP");
@ -165,7 +165,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql.Append(",(select STLNAME from [code_stlmode] where STLCODE=i.SETTLETYPE) as SETTLETYPEREF");
strSql.Append(",(select CODENAME+'_'+bankname from info_client_bank where gid=i.CUSTACCOUNTGID) CUSTBANKNAME");
strSql.Append(",(select ACCOUNT from info_client_bank where gid=i.CUSTACCOUNTGID) CUSTACCOUNT");
strSql.Append(",ISNULL((select sum(isnull(f.amount,0)-isnull(f.invoice,0)) as noinvoice from ch_fee f left join ch_fee_do d on (d.FEEID=f.GID) where ISINVOICE<>1 and d.BILLNO=i.BILLNO),0) as NOINVOICE");
strSql.Append(",ISNULL((select sum(isnull(amount,0)-isnull(invoice,0)) as noinvoice from ch_fee WITH (NOLOCK) where isnull(ISINVOICE,0)<>1 and EXISTS (select 1 from ch_fee_do WITH (NOLOCK) where ch_fee_do.FEEID=ch_fee.gid and ch_fee_do.BILLNO=i.BILLNO)),0) as NOINVOICE");
strSql.Append(",i.BS_CUSTOMERNAME,dbo.[GetUsingStep](wu.WORKFLOWID,wu.currentid,'" + userid + "',wu.stepno) as IsAudit ");
strSql.Append(",i.PREAMOUNTRMB,i.PREAMOUNTUSD,i.PREAMOUNTOT ");
strSql.Append(",dbo.GetBalNoByPayNo(i.BILLNO) as BALBILLNO,i.ISPRINT,i.PRINTCOUNT,i.wxpush,i.STLRATE,i.STLAMOUNT,i.STLCURR ");
@ -382,7 +382,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql.Append(",(CASE b.FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF,b.CUSTOMERNAME,b.BLISSUESTATUS,b.CNTRTOTAL");
strSql.Append(",b.VESSEL,b.VOYNO,b.CARRIER,b.ETD,b.PORTLOAD,b.ENTERP,(select [NAME] FROM company where GID=B.SALECORPID) BSSALECORP");
strSql.Append(",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.BSSOURCE,B.BSSOURCEDETAIL,B.OPTYPE,b.PARENTID,b.BSTYPE");
strSql.Append(",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where BILLNO IN (SELECT BILLNO FROM ch_fee_do_invoice WHERE FEEID=c.FEEID)) INVOICENO ");
strSql.Append(",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where EXISTS (SELECT 1 FROM ch_fee_do_invoice WHERE ch_fee_do_invoice.BILLNO=ch_fee_invoicehexiao.BILLNO AND FEEID=c.FEEID)) INVOICENO ");
strSql.Append(",f.Remark Remark,f.INPUTMODE,C.CREATETIME,0 TTLNODR ");
strSql.Append(" FROM ch_fee_do c");
strSql.Append(" left join v_op_bill b on (b.bsno=c.bsno)");
@ -409,7 +409,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql.Append(",(CASE b.FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF,b.CUSTOMERNAME,b.BLISSUESTATUS,b.CNTRTOTAL");
strSql.Append(",b.VESSEL,b.VOYNO,b.CARRIER,b.ETD,b.PORTLOAD,b.ENTERP,(select [NAME] FROM company where GID=B.SALECORPID) BSSALECORP");
strSql.Append(",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.BSSOURCE,B.BSSOURCEDETAIL,B.OPTYPE,b.PARENTID,b.BSTYPE");
strSql.Append(",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where BILLNO IN (SELECT BILLNO FROM ch_fee_do_invoice WHERE FEEID=c.FEEID)) INVOICENO ");
strSql.Append(",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where EXISTS (SELECT 1 FROM ch_fee_do_invoice WHERE ch_fee_do_invoice.BILLNO=ch_fee_invoicehexiao.BILLNO AND FEEID=c.FEEID)) INVOICENO ");
strSql.Append(",f.Remark Remark,f.INPUTMODE,C.CREATETIME,0 TTLNODR ");
strSql.Append(" FROM ch_fee_do c");
strSql.Append(" left join v_op_bill b on (b.bsno=c.bsno)");
@ -449,7 +449,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql.Append(",(CASE b.FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF,b.CUSTOMERNAME,b.BLISSUESTATUS,b.CNTRTOTAL");
strSql.Append(",b.VESSEL,b.VOYNO,b.ETD,b.CARRIER,b.PORTLOAD,b.ENTERP,(select [NAME] FROM company where GID=B.SALECORPID) COMPANYNAME");
strSql.Append(",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.BSSOURCE,B.BSSOURCEDETAIL,B.OPTYPE,b.PARENTID,b.BSTYPE");
strSql.Append(",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where BILLNO IN (SELECT BILLNO FROM ch_fee_do_invoice WHERE FEEID=c.FEEID)) INVOICENO ");
strSql.Append(",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where EXISTS (SELECT 1 FROM ch_fee_do_invoice WHERE ch_fee_do_invoice.BILLNO=ch_fee_invoicehexiao.BILLNO AND FEEID=c.FEEID)) INVOICENO ");
strSql.Append(",f.Remark Remark,f.INPUTMODE,C.CREATETIME ");
strSql.Append(" FROM ch_fee_do c");
strSql.Append(" left join v_op_bill b on (b.bsno=c.bsno)");
@ -483,7 +483,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql.Append(",(CASE b.FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF,b.CUSTOMERNAME,b.BLISSUESTATUS,b.CNTRTOTAL");
strSql.Append(",b.VESSEL,b.VOYNO,b.CARRIER,b.ETD,b.PORTLOAD,b.ENTERP,(select [NAME] FROM company where GID=B.SALECORPID) BSSALECORP");
strSql.Append(",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.BSSOURCE,B.BSSOURCEDETAIL,B.OPTYPE,b.PARENTID,b.BSTYPE");
strSql.Append(",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where BILLNO IN (SELECT BILLNO FROM ch_fee_do_invoice WHERE FEEID=c.FEEID)) INVOICENO ");
strSql.Append(",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where EXISTS (SELECT 1 FROM ch_fee_do_invoice WHERE ch_fee_do_invoice.BILLNO=ch_fee_invoicehexiao.BILLNO AND FEEID=c.FEEID)) INVOICENO ");
strSql.Append(",f.Remark Remark,f.INPUTMODE,C.CREATETIME,0 TTLNODR ");
strSql.Append(" FROM ch_fee_do c");
strSql.Append(" left join v_op_bill b on (b.bsno=c.bsno)");
@ -712,7 +712,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql.Append(",(CASE b.FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF,b.CUSTOMERNAME,b.BLISSUESTATUS,b.CNTRTOTAL");
strSql.Append(",b.VESSEL,b.VOYNO,b.CARRIER,b.ETD,b.PORTLOAD,b.ENTERP,(select [NAME] FROM company where GID=B.SALECORPID) BSSALECORP");
strSql.Append(",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.BSSOURCE,B.BSSOURCEDETAIL,B.OPTYPE,b.PARENTID,b.BSTYPE");
strSql.Append(",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where BILLNO IN (SELECT BILLNO FROM ch_fee_do_invoice WHERE FEEID=c.FEEID)) INVOICENO ");
strSql.Append(",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where EXISTS (SELECT 1 FROM ch_fee_do_invoice WHERE ch_fee_do_invoice.BILLNO=ch_fee_invoicehexiao.BILLNO AND FEEID=c.FEEID)) INVOICENO ");
strSql.Append(",f.Remark Remark,f.INPUTMODE,(g.TTLDR-g.STLTTLDR) TTLNODR ");
strSql.Append(" FROM ch_fee_do c");
strSql.Append(" left join v_op_bill b on (b.bsno=c.bsno)");

@ -1851,6 +1851,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
region: 'center',
animate: true,
autoScroll: true,
id:'panelCustMaster',
//containerScroll: true,
frame: false,
items: [this.gridListMaster]
@ -2197,7 +2198,8 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
[
this.panelCustSum,
this.panelCurrSum,
this.panelAmendttlSum
this.panelAmendttlSum,
this.panelCustMaster
]
});
@ -4310,11 +4312,43 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
this.storeChFeeGain.load({ params: { bsno: bsno, optype: this.stroplb} });
this.storeChFeeAmendGain.load({ params: { bsno: this.strMBSNO, optype: this.stroplb } });
if (record.data.BLTYPE == '拼箱主票' || record.data.BLTYPE == '合票主票' || record.data.BLTYPE == '主票') {
this.tabTotal.remove(this.panelCustMaster);
this.tabTotal.add(this.panelCustMaster);
//var finded = false;
//var children = this.tabTotal.items;
//if (children) {
// for (var i = 0, len = children.length; i < len; i++) {
// if (children.items[i].id) {
// if (children.items[i].id == 'panelCustMaster') {
// finded = true;
// }
// }
// }
//}
//if (finded == false) {
// this.tabTotal.add(this.panelCustMaster);
// this.tabTotal.doLayout();
//}
//this.panelCustMaster.setVisible(true);
this.storeChFeeMasterGain.load({ params: { bsno: bsno } });
} else {
this.tabTotal.remove(this.panelCustMaster);
this.storeChFeeMasterGain.removeAll();
//var finded = false;
//var children = this.tabTotal.items;
//if (children) {
// for (var i = 0, len = children.length; i < len; i++) {
// if (children.items[i].id) {
// if (children.items[i].id == 'panelCustMaster') {
// finded = true;
// }
// }
// }
//}
//if (finded) {
// this.tabTotal.remove(this.panelCustMaster);
// this.tabTotal.doLayout();
//}
//this.panelCustMaster.setVisible(false);
}
//this.storeChFeeMasterGain.on('beforeload', function (store) {
// Ext.apply(store.proxy.extraParams, { bsno: bsno });

@ -6320,7 +6320,7 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
function (btn) {
if (btn == 'yes') {
this.doPostInv();
_this.doPostInv();
}
});

@ -233,7 +233,12 @@ Ext.extend(Shipping.MsChRecvsettlementIndex, Ext.Panel, {
sortable: true,
dataIndex: 'ACCOUNTS_MONEY',
header: Zi.LAN.BookKeepingData,
width: 100,
width: 100,
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
@ -255,7 +260,12 @@ Ext.extend(Shipping.MsChRecvsettlementIndex, Ext.Panel, {
sortable: true,
dataIndex: 'PREPAY_MONEY',
header: Zi.LAN.YuShouZhiReport,
width: 100,
width: 100,
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
@ -277,7 +287,12 @@ Ext.extend(Shipping.MsChRecvsettlementIndex, Ext.Panel, {
sortable: true,
dataIndex: 'AHSR_MONEY',
header: Zi.LAN.ShiShouZhiReport,
width: 100,
width: 100,
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
@ -299,7 +314,12 @@ Ext.extend(Shipping.MsChRecvsettlementIndex, Ext.Panel, {
sortable: true,
dataIndex: 'FINANCIAL_MONEY',
header: Zi.LAN.FinanceCose,
width: 100,
width: 100,
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
@ -321,7 +341,12 @@ Ext.extend(Shipping.MsChRecvsettlementIndex, Ext.Panel, {
sortable: true,
dataIndex: 'ADVANCE_MONEY',
header: Zi.LAN.YuShouZhiQuReport,
width: 100,
width: 100,
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);

@ -34,6 +34,10 @@ using DSWeb.SoftMng.Filter;
using DSWeb.MvcShipping.DAL.MsBaseInfoDAL;
using DSWeb.MvcShipping.DAL.MsOpRailwayDAL;
using DSWeb.MvcShipping.Models.MsOpRailway;
using DSWeb.MvcShipping.DAL.MsOpAireDAL;
using DSWeb.MvcShipping.Models.MsOpAire;
using DSWeb.MvcShipping.DAL.MsOpAiriDAL;
using DSWeb.MvcShipping.Models.MsOpAiri;
namespace DSWeb.MvcShipping.Controllers
{
@ -880,6 +884,39 @@ namespace DSWeb.MvcShipping.Controllers
result = modb.SaveHead(_L2);
var OpAireList = MsOpAireDAL.GetDataList(condition, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), "", "");
foreach (var _op in OpAireList)
{
_op.DbOperationType = DbOperationType.DbotUpd;
_op.ModelUIStatus = "E";
var _dmb = MsInfoClientDAL.GetSTLDATE(_op.CUSTOMERNAME, "空运出口", _op.ETD, _op.SALE);
_op.STLNAME = _dmb.STLNAME;
if (_dmb.STLDATE != _op.ETD)
{
_op.STLDATE = _dmb.STLDATE;
}
}
var _L4 = ModelObjectConvert<MsOpAire>.ToModelObjectList(OpAireList);
var modb4 = new ModelObjectRepository();
result = modb.SaveHead(_L4);
var AiriCondition = " OP_AIRI.CUSTOMERNAME=(select shortname from info_client where gid= '" + headData.LINKGID + "') and OP_AIRI.ETA between Convert(datetime,'" + headData.BGNDATE + "') and convert(datetime,'" + headData.ENDDATE + "') ";
var OpAiriList = MsOpAiriDAL.GetDataList(AiriCondition, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), "", "");
foreach (var _op in OpAiriList)
{
_op.DbOperationType = DbOperationType.DbotUpd;
_op.ModelUIStatus = "E";
var _dmb = MsInfoClientDAL.GetSTLDATE(_op.CUSTOMERNAME, "空运进口", _op.ETA, _op.SALE);
_op.STLNAME = _dmb.STLNAME;
if (_dmb.STLDATE != _op.ETA)
{
_op.STLDATE = _dmb.STLDATE;
}
}
var _L5 = ModelObjectConvert<MsOpAiri>.ToModelObjectList(OpAiriList);
var modb5= new ModelObjectRepository();
result = modb.SaveHead(_L5);
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}

@ -273,7 +273,7 @@ namespace DSWeb.MvcShipping.Controllers
strSql.Append("GROUP BY BSNO) G ON (G.BSNO=A.BSNO) ");
strSql.Append(" LEFT JOIN info_client C ON (C.SHORTNAME=B.CUSTOMERNAME) ");
// strSql.Append("LEFT JOIN OP_CLOSE CL ON (CL.BSNO=A.BSNO) ");
strSql.Append(" WHERE 1=1 ");
strSql.Append(" WHERE G.BSNO IS NOT NULL ");
}
@ -357,7 +357,7 @@ namespace DSWeb.MvcShipping.Controllers
strSql.Append("GROUP BY BSNO) G ON (G.BSNO=B.BSNO) ");
// strSql.Append("LEFT JOIN OP_CLOSE CL ON (CL.BSNO=B.BSNO) ");
strSql.Append(" LEFT JOIN info_client C ON (C.SHORTNAME=B.CUSTOMERNAME) ");
strSql.Append(" WHERE 1=1 ");
strSql.Append(" WHERE G.BSNO IS NOT NULL ");
}
else

@ -74,7 +74,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpAireDAL
strSql.Append(",I.TTLDR,I.TTLINVDR,I.TTLDUIDR");
strSql.Append(",(SELECT COUNT(*) FROM OP_APPLY WHERE MASTERNO=B.BSNO) as APPLYCOUNT,B.BillFeeStatus ");
strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=B.SALECORPID) as SALECORP,CONTRACTNO,LANE,DELIVERYDATE,DOC,HSCODE,ISCANCEL");
strSql.Append(",(select TOP 1 COLOR FROM code_op_status_detail WITH (NOLOCK) WHERE OPSTATUS = (CASE WHEN (SELECT TOP 1 [STATUS] FROM V_OP_STATUS WHERE BSNO=B.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) is null THEN '接受委托' else (SELECT TOP 1[STATUS] FROM V_OP_STATUS WHERE BSNO = B.BSNO ORDER BY COMPTIME DESC, INPUTTIME DESC) end))AS COLOR");
strSql.Append(" from OP_AIRE B");
strSql.Append(" LEFT JOIN v_op_gain_dr_INV I ON (I.BSNO=B.BSNO) ");
@ -147,6 +148,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpAireDAL
strSql.Append(",dbo.F_GetBillCrFeeStatus(B.BSNO) CRFEESTATUS,ISPRINTPR");
strSql.Append(",I.TTLDR,I.TTLINVDR,I.TTLDUIDR,0 APPLYCOUNT,B.BillFeeStatus ");
strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=B.SALECORPID) as SALECORP,CONTRACTNO,LANE,DELIVERYDATE,DOC,HSCODE,ISCANCEL");
strSql.Append(",(select TOP 1 COLOR FROM code_op_status_detail WITH (NOLOCK) WHERE OPSTATUS = (CASE WHEN (SELECT TOP 1 [STATUS] FROM V_OP_STATUS WHERE BSNO=B.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) is null THEN '接受委托' else (SELECT TOP 1[STATUS] FROM V_OP_STATUS WHERE BSNO = B.BSNO ORDER BY COMPTIME DESC, INPUTTIME DESC) end))AS COLOR");
strSql.Append(" from OP_AIRE B");
strSql.Append(" LEFT JOIN v_op_gain_dr_INV I ON (I.BSNO=B.BSNO) ");
@ -250,6 +252,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpAireDAL
strSql.Append(",'' DRFEESTATUS");
strSql.Append(",'' CRFEESTATUS,ISPRINTPR,0 TTLDR,0 TTLINVDR,0 TTLDUIDR,0 APPLYCOUNT,B.BillFeeStatus ");
strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=B.SALECORPID) as SALECORP,CONTRACTNO,LANE,DELIVERYDATE,DOC,HSCODE,ISCANCEL");
strSql.Append(",'' AS COLOR");
strSql.Append(" from OP_AIRE B");
if (!string.IsNullOrEmpty(condition))
@ -302,6 +305,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpAireDAL
strSql.Append(",dbo.F_GetBillDrFeeStatus(B.BSNO) DRFEESTATUS");
strSql.Append(",dbo.F_GetBillCrFeeStatus(B.BSNO) CRFEESTATUS,ISPRINTPR,0 TTLDR,0 TTLINVDR,0 TTLDUIDR,0 APPLYCOUNT,B.BillFeeStatus ");
strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=B.SALECORPID) as SALECORP,CONTRACTNO,LANE,DELIVERYDATE,DOC,HSCODE,ISCANCEL");
strSql.Append(",(select TOP 1 COLOR FROM code_op_status_detail WITH (NOLOCK) WHERE OPSTATUS = (CASE WHEN (SELECT TOP 1 [STATUS] FROM V_OP_STATUS WHERE BSNO=B.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) is null THEN '接受委托' else (SELECT TOP 1[STATUS] FROM V_OP_STATUS WHERE BSNO = B.BSNO ORDER BY COMPTIME DESC, INPUTTIME DESC) end))AS COLOR");
strSql.Append(" from OP_AIRE B");
@ -545,6 +549,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpAireDAL
data.DELIVERYDATE = Convert.ToDateTime(reader["DELIVERYDATE"]).ToString("yyyy-MM-dd");
data.DOC = Convert.ToString(reader["DOC"]);//唛头
data.HSCODE = Convert.ToString(reader["HSCODE"]);//HSCODE
data.COLOR = reader["COLOR"].ToString();
data.ISCANCEL = Convert.ToString(reader["ISCANCEL"]);
#endregion

@ -81,6 +81,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpAiriDAL
strSql.Append(",(SELECT COUNT(*) FROM OP_APPLY WHERE MASTERNO=OP_AIRI.BSNO) as APPLYCOUNT ");
strSql.Append(",(SELECT TOP 1 BLSTATUS FROM op_blissue WHERE BSNO=OP_AIRI.BSNO) BLISSUESTATUS,DOC,OP_AIRI.BillFeeStatus ");
strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=OP_AIRI.SALECORPID) as SALECORP,LANE,DELIVERYDATE,HSCODE");
strSql.Append(",(select TOP 1 COLOR FROM code_op_status_detail WITH (NOLOCK) WHERE OPSTATUS = (CASE WHEN (SELECT TOP 1 [STATUS] FROM V_OP_STATUS WHERE BSNO=OP_AIRI.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) is null THEN '接受委托' else (SELECT TOP 1[STATUS] FROM V_OP_STATUS WHERE BSNO = OP_AIRI.BSNO ORDER BY COMPTIME DESC, INPUTTIME DESC) end))AS COLOR");
//SR2020060200003
strSql.Append(",isnull(ISBONDED,0) ISBONDED");
@ -154,6 +155,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpAiriDAL
strSql.Append(",(SELECT COUNT(*) FROM OP_APPLY WHERE MASTERNO=B.BSNO) as APPLYCOUNT ");
strSql.Append(",(SELECT TOP 1 BLSTATUS FROM op_blissue WHERE BSNO=B.BSNO) BLISSUESTATUS,DOC,B.BillFeeStatus ");
strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=B.SALECORPID) as SALECORP,LANE,DELIVERYDATE,HSCODE");
strSql.Append(",(select TOP 1 COLOR FROM code_op_status_detail WITH (NOLOCK) WHERE OPSTATUS = (CASE WHEN (SELECT TOP 1 [STATUS] FROM V_OP_STATUS WHERE BSNO=B.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) is null THEN '接受委托' else (SELECT TOP 1[STATUS] FROM V_OP_STATUS WHERE BSNO = B.BSNO ORDER BY COMPTIME DESC, INPUTTIME DESC) end))AS COLOR");
//SR2020060200003
strSql.Append(",isnull(ISBONDED,0) ISBONDED");
@ -269,6 +271,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpAiriDAL
strSql.Append(",dbo.F_GetBillDrFeeStatus(B.BSNO) DRFEESTATUS");
strSql.Append(",dbo.F_GetBillCrFeeStatus(B.BSNO) CRFEESTATUS,ISPRINTPR,0 TTLDR,0 TTLINVDR,0 TTLDUIDR,0 APPLYCOUNT,B.BillFeeStatus,B.DOC ");
strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=B.SALECORPID) as SALECORP,LANE,CURRENCY,CARGOVALUE,DELIVERYDATE,HSCODE");
strSql.Append(",(select TOP 1 COLOR FROM code_op_status_detail WITH (NOLOCK) WHERE OPSTATUS = (CASE WHEN (SELECT TOP 1 [STATUS] FROM V_OP_STATUS WHERE BSNO=B.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) is null THEN '接受委托' else (SELECT TOP 1[STATUS] FROM V_OP_STATUS WHERE BSNO = B.BSNO ORDER BY COMPTIME DESC, INPUTTIME DESC) end))AS COLOR");
//SR2020060200003
strSql.Append(",isnull(ISBONDED,0) ISBONDED");
strSql.Append(" from OP_AIRI B");
@ -313,6 +317,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpAiriDAL
strSql.Append(",'' DRFEESTATUS");
strSql.Append(",'' CRFEESTATUS,ISPRINTPR,0 TTLDR,0 TTLINVDR,0 TTLDUIDR,0 APPLYCOUNT,DOC,B.BillFeeStatus ");
strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=B.SALECORPID) as SALECORP,LANE,CURRENCY,CARGOVALUE,DELIVERYDATE,HSCODE");
strSql.Append(",'' AS COLOR");
//SR2020060200003
strSql.Append(",isnull(ISBONDED,0) ISBONDED");
strSql.Append(" from OP_AIRI B");
@ -493,6 +499,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpAiriDAL
data.HSCODE = reader["HSCODE"].ToString();
data.ISBONDED = reader["ISBONDED"].ToString();
data.COLOR = reader["COLOR"].ToString();
#endregion
headList.Add(data);

@ -1683,7 +1683,7 @@ namespace DSWeb.MvcShipping.Models.MsOpAire
get { return _iscancel; }
set { _iscancel = value; }
}
public string COLOR { get; set; }
#endregion
public MsOpAire()

@ -1210,7 +1210,7 @@ namespace DSWeb.MvcShipping.Models.MsOpAiri
get { return _ISBONDED; }
set { _ISBONDED = value; }
}
public string COLOR { get; set; }
#endregion
public MsOpAiri()

@ -298,6 +298,11 @@ Ext.extend(Shipping.MsOpAireIndex, Ext.Panel, {
id: '',
dataIndex: 'OPSTATUS',
header: '业务状态',
renderer: function (value, metadata, record, rowIndex) {
metadata.style = "background-color:" + record.data.COLOR;
return value;
},
width: 60
},
{

@ -179,6 +179,7 @@
{ name: 'SERVICE8', type: 'string' },
{ name: 'SERVICE9', type: 'string' },
{ name: 'SERVICE10', type: 'string' },
{ name: 'COLOR', type: 'string' },
{ name: 'BillFeeStatus', type: 'string' }
]
});

@ -300,6 +300,11 @@ Ext.extend(Shipping.MsOpAiriIndex, Ext.Panel, {
id: '',
dataIndex: 'OPSTATUS',
header: '业务状态',
renderer: function (value, metadata, record, rowIndex) {
metadata.style = "background-color:" + record.data.COLOR;
return value;
},
width: 60
},
{

@ -129,6 +129,7 @@
{ name: 'SERVICE9', type: 'string' },
{ name: 'SERVICE10', type: 'string' },
{ name: 'HSCODE', type: 'string' },
{ name: 'COLOR', type: 'string' },
{ name: 'BillFeeStatus', type: 'string' },
{ name: 'ISBONDED', type: 'string' }

@ -1656,7 +1656,22 @@ namespace DSWeb.Areas.TruckMng.Controllers
strSql.Append(",case when ISNULL(B.CTNNUM,0)=0 THEN 0 ELSE cast(round(G.TTKHFDR/B.CTNNUM*P.PCCTNNUM,2) as numeric(20,2)) END TTKHFDR");
strSql.Append(",(case when ISNULL(B.CTNNUM,0)=0 THEN 0 ELSE cast(round(G.TTKHFCR/B.CTNNUM*P.PCCTNNUM,2) as numeric(20,2)) END)+(P.TTKHFCR*P.PCCTNNUM) TTKHFCR");
strSql.Append(",B.TRADETYPE,B.MBLNO,P.ETD PCETD,P.DELAYDAYS,P.TRUCKER,P.DRIVER,P.TRUCKNO,P.DRIVERTEL,P.BSNO PCBSNO,P.TRANSSTATUS,P.PCKGS,P.PCCTNNUM,B.SALE,P.CUSTSERVICE");
//strSql.Append(",B.TRADETYPE,B.MBLNO,P.ETD PCETD,P.DELAYDAYS,P.TRUCKER,P.DRIVER,P.TRUCKNO,P.DRIVERTEL,P.BSNO PCBSNO,P.TRANSSTATUS,P.PCKGS,P.PCCTNNUM,B.SALE,P.CUSTSERVICE");
//strSql.Append(",P.FREIGHT*P.PCCTNNUM PCFREIGHT,P.TAXRATE,P.TTLFREIGHT*P.PCCTNNUM PCTTLFREIGHT,P.TTLOTCR*P.PCCTNNUM TTLOTCR,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) TTLCR");
//strSql.Append(",(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)-((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)) AS PROFIT");
//// strSql.Append(",cast(round(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(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) - (P.TTLCR * P.PCCTNNUM)/(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) END,2) AS numeric(20, 2)) PROFITRATE ");
//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(" ,(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(" 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.CREATETIME,datediff(day,P.ETD,P.CREATETIME) DELAYDAYS,P.TRUCKER,P.DRIVER,P.TRUCKNO,P.DRIVERTEL,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 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(",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(",B.TRADETYPE,B.MBLNO,P.ETA PCETD,P.CREATETIME,P.DELAYDAYS,P.TRUCKER,P.DRIVER,P.TRUCKNO,P.DRIVERTEL,P.BSNO PCBSNO,P.TRANSSTATUS,P.PCKGS,P.PCCTNNUM,B.SALE,P.CUSTSERVICE,P.REMARK PCREMARK");
strSql.Append(",P.FREIGHT*P.PCCTNNUM PCFREIGHT,P.TAXRATE,P.TTLFREIGHT*P.PCCTNNUM PCTTLFREIGHT,P.TTLOTCR*P.PCCTNNUM TTLOTCR,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) TTLCR");
strSql.Append(",(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)-((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)) AS PROFIT");
// strSql.Append(",cast(round(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(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) - (P.TTLCR * P.PCCTNNUM)/(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) END,2) AS numeric(20, 2)) PROFITRATE ");
@ -1665,11 +1680,12 @@ namespace DSWeb.Areas.TruckMng.Controllers
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(" 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.CREATETIME,datediff(day,P.ETD,P.CREATETIME) DELAYDAYS,P.TRUCKER,P.DRIVER,P.TRUCKNO,P.DRIVERTEL,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 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(",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(" where B.transtype='集装箱' ");
if (!string.IsNullOrEmpty(condition))
{

@ -2,7 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>H:\DS7_dev\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>配置文件1</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />
@ -32,7 +32,7 @@
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>

Loading…
Cancel
Save