diff --git a/BookingJieFeng/BookingJieFeng.csproj.user b/BookingJieFeng/BookingJieFeng.csproj.user index a48b3371..28be9c4c 100644 --- a/BookingJieFeng/BookingJieFeng.csproj.user +++ b/BookingJieFeng/BookingJieFeng.csproj.user @@ -1,7 +1,7 @@  - Debug|Any CPU + Release|Any CPU FolderProfile true diff --git a/BookingWeb/BookingWeb.csproj.user b/BookingWeb/BookingWeb.csproj.user index 6bc24ada..4edb5e0f 100644 --- a/BookingWeb/BookingWeb.csproj.user +++ b/BookingWeb/BookingWeb.csproj.user @@ -1,7 +1,7 @@  - Debug|Any CPU + Release|Any CPU true diff --git a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs index 832e2ea0..13be8056 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs @@ -811,6 +811,8 @@ namespace DSWeb.Areas.Account.Controllers public ContentResult SubmitAuditBackList(string bills) { + var paylist = ChpayapplicationDAL.GetDataList(0, 1000, "BILLNO IN ('" + bills.Replace(",", "','") + "')", Convert.ToString(Session["USERID"]), Convert.ToString(Session["CODENAME"]), Convert.ToString(Session["COMPANYID"])); + DBResult result = new DBResult(); var DingTalkSet = MsCodeDingTalkSetDAL.GetData("MODULENAME='付款申请'", Convert.ToString(Session["COMPANYID"])); if (DingTalkSet != null && DingTalkSet.ISENABLE) @@ -820,7 +822,8 @@ namespace DSWeb.Areas.Account.Controllers { result = DingTalkHelper.SubmitAuditBack(DingTalkSet, bill, Convert.ToString(Session["USERID"])); if (result.Success) { - var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"])); + // var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"])); + var headdata = paylist.Find(x => x.BILLNO == bill); if (headdata.BILLSTATUS == 2) { result = ChpayapplicationDAL.SubmitAuditBack("FeeSettleAudit", Convert.ToString(Session["USERID"]), bill); @@ -841,7 +844,7 @@ namespace DSWeb.Areas.Account.Controllers else { - result = ChpayapplicationDAL.SubmitAuditBackList("FeeSettleAudit", Convert.ToString(Session["USERID"]), bills, CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"])); + result = ChpayapplicationDAL.SubmitAuditBackList("FeeSettleAudit", Convert.ToString(Session["USERID"]), paylist, CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"])); } var json = JsonConvert.Serialize(result); return new ContentResult() { Content = json }; diff --git a/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs index cfef9cf1..4bcf81c2 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs @@ -4683,7 +4683,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin string str = ""; var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(" VISIBLERANGE,OPERATERANGE,AUTHORITYID ");//,VSSQL + strSql.Append(" VISIBLERANGE,OPERATERANGE,AUTHORITYID,VSSQL ");//,VSSQL strSql.Append(" from VW_User_Authority "); strSql.Append(" where [NAME]='modInvoiceManagement' and USERID='" + userid + "' and ISDELETE=0"); @@ -4699,7 +4699,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin visiblerange = Convert.ToString(reader["VISIBLERANGE"]); operaterange = Convert.ToString(reader["OPERATERANGE"]); AUTHORITYID = Convert.ToString(reader["AUTHORITYID"]); - //VSSQL = Convert.ToString(reader["VSSQL"]); + VSSQL = Convert.ToString(reader["VSSQL"]); break; } reader.Close(); diff --git a/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs index 119304e6..0e8d55a7 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs @@ -3390,13 +3390,14 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(" VISIBLERANGE,OPERATERANGE,AUTHORITYID "); + strSql.Append(" VISIBLERANGE,OPERATERANGE,AUTHORITYID,VSSQL "); strSql.Append(" from VW_User_Authority "); strSql.Append(" where [NAME]='" + modustr + "' and USERID='" + userid + "' and ISDELETE=0"); string visiblerange = "4"; string operaterange = "4"; string AUTHORITYID = ""; + string VSSQL = ""; Database db = DatabaseFactory.CreateDatabase(); using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString())) { @@ -3405,6 +3406,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication visiblerange = Convert.ToString(reader["VISIBLERANGE"]); operaterange = Convert.ToString(reader["OPERATERANGE"]); AUTHORITYID = Convert.ToString(reader["AUTHORITYID"]); + VSSQL = Convert.ToString(reader["VSSQL"]); break; } reader.Close(); @@ -3483,6 +3485,21 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication { str = " 1=1 "; } + VSSQL = VSSQL.Trim(); + if (!string.IsNullOrEmpty(VSSQL)) + { + + if (!string.IsNullOrEmpty(str)) + { + str = str + " and (" + VSSQL + ") "; + } + else + { + str = " (" + VSSQL + ") "; + } + + } + return str; } public static DBResult PASSAUDITWithGID(string ch_fee_invoiceapplicationGID) diff --git a/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs index ffa0577a..3a313f8a 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs @@ -2460,7 +2460,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication { var result = new DBResult(); - + var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", USERID, usercode, companyid); T_ALL_DA T_ALL_DA = new T_ALL_DA(); Database db = DatabaseFactory.CreateDatabase(); using (var conn = db.CreateConnection()) @@ -2497,7 +2497,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication if (WorkFlowid == "") WorkFlowid = "no"; } - var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", USERID, usercode, companyid); + Resultmb WorkResult = WorkFlowDAL.WorkFlowStart(WorkFlowName, bill, USERID,bill, bill,"", WorkFlowid); @@ -2626,9 +2626,10 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication { var FEECLOSEPAYAUTOAUDIT = MsSysParamSetDAL.GetData("PARAMNAME='FEECLOSEPAYAUTOAUDIT'"); + var paylist = ChpayapplicationDAL.GetDataList(0, 1000, "BILLNO IN ('" + bills.Replace(",", "','") + "')", USERID, usercode, companyid); + - - var result = new DBResult(); + var result = new DBResult(); var billList = bills.Split(','); T_ALL_DA T_ALL_DA = new T_ALL_DA(); Database db = DatabaseFactory.CreateDatabase(); @@ -2641,14 +2642,14 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication { var oacommitList = new List(); - foreach (var bill in billList) + foreach (var headdata in paylist) { - var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", USERID, usercode, companyid); + var isclose = false; if (FEECLOSEPAYAUTOAUDIT.PARAMVALUE == "1") { - var dataList = ChpayapplicationDAL.GetBodyAllList("BILLNO='" + bill + "'"); + var dataList = ChpayapplicationDAL.GetBodyAllList("BILLNO='" + headdata.BILLNO + "'"); if (dataList != null) { @@ -2661,7 +2662,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set BILLSTATUS=0,AUDITUSER='" + USERID + "',AUDITTIME='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' where BILLNO=@BILLNO"); cmdupdate.Parameters.Clear(); - db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, bill); + db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, headdata.BILLNO); db.ExecuteNonQuery(cmdupdate, tran); @@ -2686,7 +2687,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication foreach (DataRow row in dsworkflow.Tables[0].Rows) { var CONDITIONSQL = Convert.ToString(row["CONDITIONSQL"]); - CONDITIONSQL = CONDITIONSQL.Replace("[业务编号]", "'" + bill + "'"); + CONDITIONSQL = CONDITIONSQL.Replace("[业务编号]", "'" + headdata.BILLNO + "'"); var strCOUNT = T_ALL_DA.GetStrSQL("BLCT", CONDITIONSQL); if (strCOUNT != "0") { @@ -2702,7 +2703,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication } - Resultmb WorkResult = WorkFlowDAL.WorkFlowStart(WorkFlowName, bill, USERID, bill, bill, "", WorkFlowid); + Resultmb WorkResult = WorkFlowDAL.WorkFlowStart(WorkFlowName, headdata.BILLNO, USERID, headdata.BILLNO, headdata.BILLNO, "", WorkFlowid); if (WorkResult.Success == true) { @@ -2721,7 +2722,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication cmdupdate.Parameters.Clear(); - db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, bill); + db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, headdata.BILLNO); db.ExecuteNonQuery(cmdupdate, tran); @@ -2943,7 +2944,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication } - public static DBResult SubmitAuditBackList(String WorkFlowName, String USERID, String bills,string usercode,string companyid) + public static DBResult SubmitAuditBackList(String WorkFlowName, String USERID,List bills,string usercode,string companyid) { var result = new DBResult(); @@ -2963,7 +2964,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication } finally { } - var billList = bills.Split(','); + //var billList = bills.Split(','); Database db = DatabaseFactory.CreateDatabase(); using (var conn = db.CreateConnection()) @@ -2973,20 +2974,20 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication try { - foreach (var bill in billList) + foreach (var headdata in bills) { - var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", USERID, usercode,companyid); + //var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill.BILLNO + "'", USERID, usercode,companyid); if (headdata.BILLSTATUS == 2) { - Resultmb WorkResult = WorkFlowDAL.WorkFlowReset(WorkFlowName, bill, USERID); + Resultmb WorkResult = WorkFlowDAL.WorkFlowReset(WorkFlowName, headdata.BILLNO, USERID); if (WorkResult.Success == true) { var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set BILLSTATUS=1 where BILLNO=@BILLNO"); cmdupdate.Parameters.Clear(); - db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, bill); + db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, headdata.BILLNO); db.ExecuteNonQuery(cmdupdate, tran); result = new DBResult(); diff --git a/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs b/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs index 44a55291..b2fc6e87 100644 --- a/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs +++ b/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs @@ -1037,7 +1037,30 @@ namespace DSWeb.Areas.CommMng.Controllers return Json(new { success = true, data = evList.ToList() }); } } + public JsonResult GetTraderRm(string CODENAME) + { + var condition = ""; + if (CODENAME == "") + { + condition = ""; + } + else + { + condition = " (CODENAME like '" + CODENAME + "%' or SHORTNAME like '%" + CODENAME + "%') "; + } + + var evList = BasicDataRefDAL.GetTrader(condition); + + if (evList.Count == 0) + { + return Json(new { success = false }); + } + else + { + return Json(new { success = true, data = evList.ToList() }); + } + } public JsonResult GetPCTrader(string condition) { var evList = BasicDataRefDAL.GetPCTrader(condition); diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsInfoClientController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsInfoClientController.cs index fff96e6f..d986620b 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsInfoClientController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsInfoClientController.cs @@ -947,7 +947,7 @@ namespace DSWeb.MvcShipping.Controllers public ContentResult GetContractDataList(string condition, string sort) { - var dataList = MsInfoClientDAL.GetContractDataList(condition, sort,Session["USERID"].ToString()); + var dataList = MsInfoClientDAL.GetContractDataList(condition, sort,Session["USERID"].ToString(), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"])); var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() }); return new ContentResult() { Content = json }; @@ -958,7 +958,7 @@ namespace DSWeb.MvcShipping.Controllers if (handle == "edit") { - var list = MsInfoClientDAL.GetContractDataList(condition,"", Session["USERID"].ToString()); + var list = MsInfoClientDAL.GetContractDataList(condition,"", Session["USERID"].ToString(), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"])); if (list.Count > 0) head = list[0]; } diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs index cdc03893..c0e00df6 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs @@ -43,6 +43,7 @@ using java.util.regex; using DSWeb.Common.DB; using DSWeb.Common.Helper; using DSWeb.Areas.SysMng.DAL.SysUser; +using DSWeb.Areas.Account.Models.BSNOLB; namespace DSWeb.MvcShipping.Controllers { @@ -1261,6 +1262,83 @@ namespace DSWeb.MvcShipping.Controllers } } + public ContentResult DeleteList(string data) + { + string LAN = Convert.ToString(Session["LANGUAGES"]); + var headData = JsonConvert.Deserialize>(data); + var errstr = ""; + var itemClass = ""; + var strfp = "此票拼箱主票存在分票业务,请先删除分票信息!"; + var strsccg = "删除成功!"; + var strfy = "存在费用,请先删除费用才能删除此票业务!"; + if (LAN == "en-us") + { + strfp = "This LCL has ticket splitting business. Please delete the ticket splitting information first!"; + strsccg = "Successfully deleted!"; + strfy = "There are fees present. Please delete the fees before deleting this transaction!"; + } + + var BSNOLIST = new List(); + if (headData != null) + { + foreach (var enumValue in headData) + { + var isfee = MsOpSeaiDAL.GetFeeCount(enumValue.BSNO); + if (isfee) + { + if (errstr == "") + errstr = enumValue.CUSTNO; + else + errstr = errstr + "," + enumValue.CUSTNO; + } + else + { + itemClass = ""; + //if (enumValue.BLTYPE == "拼箱主票") + //{ + T_ALL_DA T_ALL_DA = new T_ALL_DA(); + var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from OP_SEAI WHERE MASTERNO='" + enumValue.BSNO + "' AND BSNO<>'" + enumValue.BSNO + "'"); + if (BLCOUNT == "0") + { + var BSNO = enumValue.BSNO; + var modb = new ModelObjectDB(); + DBResult result = modb.Delete(enumValue); + if (result.Success == true) + { + MsOpSeaiDAL.DeleteDetail(enumValue); MsSysBillNoSetDAL.DeleteBsNo(enumValue.CUSTNO); + var blUpSQL = " insert into sys_log(GID,NAME,LOGTYPE,LOGTIME,LOGCONTENT,CREATEUSER) values(NEWID(),'" + enumValue.BSNO + "','删除海运进口','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + enumValue.MBLNO + '(' + enumValue.CUSTOMERNAME + ')' + "','" + Convert.ToString(Session["USERID"]) + "')"; + bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); + var NEWBSNO = new BSNOLB(); + NEWBSNO.BSNO = enumValue.BSNO; + BSNOLIST.Add(NEWBSNO); + + } + + } + else + { + var jsonRespose2 = new JsonResponse { Success = false, Message = strfp }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + + } + + } + + } + } + + + + + if (errstr == "") errstr = strsccg; + else errstr = errstr + strfy; + + var jsonRespose = new JsonResponse { Success = true, Message = errstr }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + + } + + #endregion public ContentResult GetCtnSum(string condition) diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs index ab4640bc..1f07f5b3 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs @@ -340,6 +340,19 @@ namespace DSWeb.MvcShipping.Controllers { var dataList = new List(); + var rangstr = MsOp_BLISSUEDAL.GetSPRangDAStr("OpBlSpList", Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"])); + if (!string.IsNullOrEmpty(rangstr)) + { + if (!string.IsNullOrEmpty(condition)) + { + condition = condition + " and " + rangstr; + } + else + { + condition = rangstr; + } + } + var SPISCUSTBAL = MsSysParamSetDAL.GetData("PARAMNAME='SPISCUSTBAL'"); if (SPISCUSTBAL.PARAMVALUE == "1") { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs index 12bbdb57..fef86703 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs @@ -965,7 +965,7 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient #region 合同 - static public List GetContractDataList(string strCondition, string sort = null, string USERID = "1") + static public List GetContractDataList(string strCondition, string sort = null, string USERID = "1",string username="",string companyid="") { var strSql = new StringBuilder(); @@ -980,7 +980,9 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient if (USERID == "1") rangstr = "1=2"; else { - rangstr = BasicDataRefDAL.GetVisableRange("modInfoClinet_info", USERID, "", "CREATEUSER", "DEPTGID"); + // rangstr = BasicDataRefDAL.GetVisableRange("modInfoClinet_info", USERID, "", "CREATEUSER", "DEPTGID"); + rangstr = GetContractRangDAStr("ClientContractList", USERID, username, companyid); + } if (!string.IsNullOrEmpty(rangstr)) { @@ -1010,6 +1012,105 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient } return SetContractData(strSql); } + public static string GetContractRangDAStr(string tb, string userid, string username, string companyid) + { + string str = ""; + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(" VISIBLERANGE,OPERATERANGE,AUTHORITYID,VSSQL "); + strSql.Append(" from VW_User_Authority "); + strSql.Append(" where [NAME]='" + tb + "' and USERID='" + userid + "' and ISDELETE=0"); + + string visiblerange = "4"; + string operaterange = "4"; + string AUTHORITYID = ""; + string VSSQL = ""; + + Database db = DatabaseFactory.CreateDatabase(); + using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString())) + { + while (reader.Read()) + { + visiblerange = Convert.ToString(reader["VISIBLERANGE"]); + operaterange = Convert.ToString(reader["OPERATERANGE"]); + AUTHORITYID = Convert.ToString(reader["AUTHORITYID"]); + VSSQL = Convert.ToString(reader["VSSQL"]); + break; + } + reader.Close(); + } + if (visiblerange == "4") + { + str = " (CREATEUSER='" + userid + "')"; + } + else if (visiblerange == "3") + { + str = " (CREATEUSER='" + userid + "')"; + } + else if (visiblerange == "2") + { + var rangeDa = new RangeDA(); + var deptid = rangeDa.GetDEPTGID(userid); + str = " DEPTGID='" + deptid + "' "; + } + else if (visiblerange == "1") + { + str = " CREATEUSER in (select USERID from vw_user where COMPANYID='" + companyid + "') "; + + } + else if (visiblerange == "5") + { + str = " CREATEUSER in (select USERID from vw_user where COMPANYID IN (select COMPANYID from user_authority_range_company where userid='" + userid + "' and AUTHORITYID='" + AUTHORITYID + "' and VISIBLERANGE=1)) "; + } + else if (visiblerange == "6") + { + str = " EXISTS (select 1 from user_authority_range_op P left join [user] u on (u.GID=P.OPID) where (info_client_contract.CREATEUSER=U.GID) AND P.userid='" + userid + "' and P.AUTHORITYID='" + AUTHORITYID + "' and P.VISIBLERANGE=1) "; + + //var userstr = new StringBuilder(); + //userstr.Append(" select OPID,(select SHOWNAME from [user] where GID=user_authority_range_op.OPID) SHOWNAME from user_authority_range_op where userid='" + userid + "' and AUTHORITYID='" + AUTHORITYID + "' and VISIBLERANGE=1"); + //Database userdb = DatabaseFactory.CreateDatabase(); + //using (IDataReader reader = userdb.ExecuteReader(CommandType.Text, userstr.ToString())) + //{ + // str = ""; + // while (reader.Read()) + // { + // if (str == "") + // { + // str = " (ob.OPNAME='" + Convert.ToString(reader["SHOWNAME"]) + "'"; + // } + // else + // { + // str = str + " or ob.OPNAME='" + Convert.ToString(reader["SHOWNAME"]) + "'"; + // }; + // } + // str = str + ")"; + // reader.Close(); + //} + + + } + + else if (visiblerange == "0") + { + str = " 1=1 "; + } + VSSQL = VSSQL.Trim(); + if (!string.IsNullOrEmpty(VSSQL)) + { + + if (!string.IsNullOrEmpty(str)) + { + str = str + " and (" + VSSQL + ") "; + } + else + { + str = " (" + VSSQL + ") "; + } + + } + + return str; + } static public MsInfoContract GetContractData(string condition, string userid) { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs index b370260f..21fc6127 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs @@ -16753,7 +16753,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL var icount = 0; var OpBill = new MsOpSeaeBill(); var bsno = ""; - r.WriteLine("UNB+UNOA:1+" + ftpset.SENDCODE + ":ZZZ+" + ftpset.RECEIVECODE + ":ZZZ+" + DateTime.Now.ToString("yyMMdd:HHmm") + "+" + headData[0].CUSTNO + "'"); + r.WriteLine("UNB+UNOC:2+" + ftpset.SENDCODE + ":ZZZ+" + ftpset.RECEIVECODE + ":ZZZ+" + DateTime.Now.ToString("yyMMdd:HHmm") + "+" + headData[0].CUSTNO + "'"); foreach (var bill in headData) { @@ -16779,20 +16779,16 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL } icount++; - if (ftpset.SENDATTN != "") - { - r.WriteLine("CTA+IC+:" + ftpset.SENDATTN + "'"); - icount++; - } - if (ftpset.SENDTEL != "") - { - r.WriteLine("COM+" + ftpset.SENDTEL + ":TE'"); - icount++; - } - if (ftpset.SENDEMAIL != "") + if (dsUserOp != null) { - r.WriteLine("COM+" + ftpset.SENDEMAIL + ":EM'"); - icount++; + if (dsUserOp.Tables[0].Rows.Count > 0) + { + r.WriteLine("CTA+IC+:" + dsUserOp.Tables[0].Rows[0]["USERNAME"].ToString().Trim() + "'"); + r.WriteLine("COM+" + dsUserOp.Tables[0].Rows[0]["OFFICEPHONE"].ToString().Trim() + ":TE'"); + r.WriteLine("COM+" + dsUserOp.Tables[0].Rows[0]["EMAIL1"].ToString().Trim() + ":EM'"); + + icount = icount + 3; + } } r.WriteLine("DTM+137:" + DateTime.Now.ToString("yyyyMMddHHmm") + ":203'"); @@ -16876,16 +16872,65 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL if (isbill != 1) { r.WriteLine("CNT+7:" + Math.Round(Convert.ToDecimal(bill.KGS), 3) + ":KGM'"); - r.WriteLine("CNT+11:" + bill.PKGS + "'"); + r.WriteLine("CNT+11:" + bill.PKGS + ":" + GetPackageEDICode(bill.KINDPKGS, "EVERGREEN") + "'"); r.WriteLine("CNT+15:" + Math.Round(Convert.ToDecimal(bill.CBM), 3) + ":MTQ'"); } else { r.WriteLine("CNT+7:" + Math.Round(OpBill.KGS, 3) + ":KGM'"); - r.WriteLine("CNT+11:" + OpBill.PKGS + "'"); + r.WriteLine("CNT+11:" + OpBill.PKGS + ":"+GetPackageEDICode(OpBill.KINDPKGS,"EVERGREEN") +"'"); r.WriteLine("CNT+15:" + Math.Round(OpBill.CBM, 3) + ":MTQ'"); } icount = icount + 3; + var copynum = GetBillNum(bill.COPYNOBILL); + + + if (bill.ISSUETYPE == "正本") + { + r.WriteLine("DOC+705+++" + GetBillNum(bill.NOBILL) + "'"); + icount = icount + 1; + if (copynum != "") + { + r.WriteLine("DOC+707+++" + copynum + "'"); + icount = icount + 1; + } + + } + else if (bill.ISSUETYPE == "海运单" || bill.ISSUETYPE == "Seaway" || bill.ISSUETYPE == "WAYBILL" || bill.ISSUETYPE == "SWB正本" || bill.ISSUETYPE == "SWB" || bill.ISSUETYPE == "SWB无正本") + { + r.WriteLine("DOC+710+++" + GetBillNum(bill.NOBILL) + "'"); + icount = icount + 1; + + } + else if (bill.ISSUETYPE == "BILL COPY" || bill.ISSUETYPE == "电放") + { + r.WriteLine("DOC+705+++" + GetBillNum(bill.NOBILL) + "'"); + icount = icount + 1; + if (copynum != "") + { + r.WriteLine("DOC+707+++" + copynum + "'"); + icount = icount + 1; + } + + } + else if (bill.ISSUETYPE == "正副本") + { + r.WriteLine("DOC+705+++" + GetBillNum(bill.NOBILL) + "'"); + icount = icount + 1; + if (copynum != "") + { + r.WriteLine("DOC+707+++" + copynum + "'"); + icount = icount + 1; + } + + } + else if (bill.ISSUETYPE == "HOUSE BILL") + { + r.WriteLine("DOC+714+++" + GetBillNum(bill.NOBILL) + "'"); + icount = icount + 1; + + } + //var ctnttllist = GetCtnTTLSum("BSNO='" + bill.BSNO + "'"); //var ctnttl = ctnttllist[0]; @@ -16894,14 +16939,14 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL #endregion #region 地址地点 - if (bill.BLFRT == "FREIGHT COLLECT") - r.WriteLine("LOC+57+" + bill.PREPARDATID + "::6:" + bill.PAYABLEAT + "'"); - else - r.WriteLine("LOC+57+" + bill.PREPARDATID + "::6:" + bill.PREPARDAT + "'"); - icount++; + //if (bill.BLFRT == "FREIGHT COLLECT") + // r.WriteLine("LOC+57+" + bill.PREPARDATID + "::6:" + bill.PAYABLEAT + "'"); + //else + // r.WriteLine("LOC+57+" + bill.PREPARDATID + "::6:" + bill.PREPARDAT + "'"); + //icount++; - r.WriteLine("LOC+73+" + GetPortEDICode(bill.ISSUEPLACEID, "MAERSK") + "::6:" + bill.ISSUEPLACE + "'"); - icount++; + //r.WriteLine("LOC+73+" + GetPortEDICode(bill.ISSUEPLACEID, "MAERSK") + "::6:" + bill.ISSUEPLACE + "'"); + //icount++; #endregion #region 提单号 @@ -17136,7 +17181,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL { for (var i = 0; i < ShippingList.Count; i++) { - if (i == 0) Shipping = "NAD+NI+++" + ShippingList[0] + "+"; + if (i == 0) Shipping = "NAD+N1+++" + ShippingList[0] + "+"; if (i == 1) Shipping = Shipping + ShippingList[i]; if (i == 2 || i == 3) Shipping = Shipping + ":" + ShippingList[i]; if (i >= 4 && ShippingList.Count > 5) @@ -17184,50 +17229,37 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL #endregion #region 承运公司/人 - // r.WriteLine("NAD+CA+" + carrier + ":160:86++" + bill.CARRIER + "'"); - if (ftpset.SENDNAME.Length > 35) - r.WriteLine("NAD+BA+" + ftpset.SENDCOMPANYCODE + ":160:86++" + ftpset.SENDNAME.Substring(0, 35) + "+" + ftpset.SENDNAME.Substring(35) + "'"); - else - r.WriteLine("NAD+BA+" + ftpset.SENDCOMPANYCODE + ":160:86++" + ftpset.SENDNAME + "'"); + //if (ftpset.SENDNAME.Length > 35) + // r.WriteLine("NAD+BA+" + ftpset.SENDCOMPANYCODE + ":160:86++" + ftpset.SENDNAME.Substring(0, 35) + "+" + ftpset.SENDNAME.Substring(35) + "'"); + //else + // r.WriteLine("NAD+BA+" + ftpset.SENDCOMPANYCODE + ":160:86++" + ftpset.SENDNAME + "'"); + //icount = icount + 2; - //r.WriteLine("CTA+IC+:" + billams.ATTN + "'"); - //r.WriteLine("COM+" + billams.ATTNTEL + ":TE'"); - //r.WriteLine("COM+" + billams.ATTNEMAIL + ":EM'"); - if (dsUserOp != null) - { - if (dsUserOp.Tables[0].Rows.Count > 0) - { - r.WriteLine("CTA+IC+:" + dsUserOp.Tables[0].Rows[0]["USERNAME"].ToString().Trim() + "'"); - r.WriteLine("COM+" + dsUserOp.Tables[0].Rows[0]["OFFICEPHONE"].ToString().Trim() + ":TE'"); - r.WriteLine("COM+" + dsUserOp.Tables[0].Rows[0]["EMAIL1"].ToString().Trim() + ":EM'"); - icount = icount + 5; - } - } #endregion - #region 签单方式 - if (bill.ISSUETYPE == "正本") - { - r.WriteLine("DOC+706+++" + GetBillNum(bill.NOBILL) + "'"); - icount++; - } - else if (bill.ISSUETYPE == "海运单" || bill.ISSUETYPE == "WAYBILL" || bill.ISSUETYPE == "Seaway" || bill.ISSUETYPE == "SWB正本" || bill.ISSUETYPE == "SWB无正本") - { - r.WriteLine("DOC+710+++" + GetBillNum(bill.NOBILL) + "'"); - icount++; - } - else if (bill.ISSUETYPE == "BILL COPY" || bill.ISSUETYPE == "电放" || bill.ISSUETYPE == "正副本") - { - r.WriteLine("DOC+706+++" + GetBillNum(bill.NOBILL) + "'"); - icount++; - } - else if (bill.ISSUETYPE == "HOUSE BILL") - { - r.WriteLine("DOC+714+++" + GetBillNum(bill.NOBILL) + "'"); - icount++; - } - #endregion + //#region 签单方式 + //if (bill.ISSUETYPE == "正本") + //{ + // r.WriteLine("DOC+706+++" + GetBillNum(bill.NOBILL) + "'"); + // icount++; + //} + //else if (bill.ISSUETYPE == "海运单" || bill.ISSUETYPE == "WAYBILL" || bill.ISSUETYPE == "Seaway" || bill.ISSUETYPE == "SWB正本" || bill.ISSUETYPE == "SWB无正本") + //{ + // r.WriteLine("DOC+710+++" + GetBillNum(bill.NOBILL) + "'"); + // icount++; + //} + //else if (bill.ISSUETYPE == "BILL COPY" || bill.ISSUETYPE == "电放" || bill.ISSUETYPE == "正副本") + //{ + // r.WriteLine("DOC+706+++" + GetBillNum(bill.NOBILL) + "'"); + // icount++; + //} + //else if (bill.ISSUETYPE == "HOUSE BILL") + //{ + // r.WriteLine("DOC+714+++" + GetBillNum(bill.NOBILL) + "'"); + // icount++; + //} + //#endregion //判断集装箱是否包含分箱明细 string slSQL = "select count(*) as inum from op_ctn_detail where CTN_ID in (select CTN_ID from op_ctn where bsno='" + bill.BSNO.ToString() + "')"; @@ -17258,6 +17290,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL else Shipping = formatEdiStr("txt", OpBill.DESCRIPTION); Shipping = Shipping.Replace("\n", "\\"); Shipping = Shipping.Replace("\r", " "); + var tmpdescription = ""; + List DescriptionListAll = new List(); string[] DescriptionList = Shipping.Split('\\'); if (DescriptionList.Length != 0) { @@ -17265,45 +17299,72 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL { if (DescriptionList[i] != "") { - r.WriteLine("FTX+AAA+++" + DescriptionList[i] + "'"); - icount = icount + 1; + if ((tmpdescription.Length + DescriptionList[i].Length + 1) > 512) + { + DescriptionListAll.Add(tmpdescription); + tmpdescription = DescriptionList[i]; + } + else + { + tmpdescription = tmpdescription + " " + DescriptionList[i]; + + } } } } - if (DescriptionShipper != "") + if (!string.IsNullOrEmpty(tmpdescription)) { + DescriptionListAll.Add(tmpdescription); + } - r.WriteLine("FTX+AAA+++" + DescriptionShipper + "'"); - icount = icount + 1; + if (DescriptionListAll.Count != 0) + { + foreach (var description in DescriptionListAll) + { + r.WriteLine("FTX+AAA+++" + description + "'"); + icount++; + } } - if (DescriptionConsignee != "") - { - - r.WriteLine("FTX+AAA+++" + DescriptionConsignee + "'"); - icount = icount + 1; - } - if (DescriptionNotifyparty != "") + if (DescriptionShipper != "") { - r.WriteLine("FTX+AAA+++" + DescriptionNotifyparty + "'"); - icount = icount + 1; - + if (DescriptionShipper != "") + { + r.WriteLine("FTX+AAA+++" + DescriptionShipper + "'"); + icount++; + } } - - if (isbill != 1) + if (DescriptionConsignee != "") { - r.WriteLine("MEA+AAE+G+KGM:" + Math.Round(Convert.ToDecimal(bill.KGS), 3) + "'"); - r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(Convert.ToDecimal(bill.CBM), 3) + "'"); + if (DescriptionConsignee != "") + { + r.WriteLine("FTX+AAA+++" + DescriptionConsignee + "'"); + icount++; + } } - else + if (DescriptionNotifyparty != "") { - r.WriteLine("MEA+AAE+G+KGM:" + Math.Round(OpBill.KGS, 3) + "'"); - r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(OpBill.CBM, 3) + "'"); + if (DescriptionNotifyparty != "") + { + r.WriteLine("FTX+AAA+++" + DescriptionNotifyparty + "'"); + icount++; + } } - icount = icount + 2; + + //if (isbill != 1) + //{ + // r.WriteLine("MEA+AAE+G+KGM:" + Math.Round(Convert.ToDecimal(bill.KGS), 3) + "'"); + // r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(Convert.ToDecimal(bill.CBM), 3) + "'"); + //} + //else + //{ + // r.WriteLine("MEA+AAE+G+KGM:" + Math.Round(OpBill.KGS, 3) + "'"); + // r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(OpBill.CBM, 3) + "'"); + //} + //icount = icount + 2; if (billams.GOODSNCM != "") @@ -17338,14 +17399,14 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL Shipping = bill.BSNO; } else Shipping = OpBill.AS_ID; - var ctnsumlist2 = MsOpSeaeDAL.MsOpSeaeDAL.GetBodyList("BSNO='" + Shipping + "'"); - foreach (var ctn in ctnsumlist2) - { - r.WriteLine("SGP+" + ctn.CNTRNO + "+" + ctn.PKGS.ToString() + "'"); - r.WriteLine("MEA+AAE+G+KGM:" + Math.Round(ctn.KGS, 3) + "'"); - r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(ctn.CBM, 3) + "'"); - icount = icount + 3; - } + //var ctnsumlist2 = MsOpSeaeDAL.MsOpSeaeDAL.GetBodyList("BSNO='" + Shipping + "'"); + //foreach (var ctn in ctnsumlist2) + //{ + // r.WriteLine("SGP+" + ctn.CNTRNO + "+" + ctn.PKGS.ToString() + "'"); + // r.WriteLine("MEA+AAE+G+KGM:" + Math.Round(ctn.KGS, 3) + "'"); + // r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(ctn.CBM, 3) + "'"); + // icount = icount + 3; + //} #endregion } else @@ -17411,24 +17472,24 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL icount++; } // - lsSQL = "SELECT c.CTNALL,c.CNTRNO,c.SEALNO,d.PKGS,d.KINDPKGS,d.KGS,d.CBM,d.HSCODE,d.[DESCRIPTION] from op_ctn as c INNER JOIN op_ctn_detail as d on c.CTN_ID=d.CTN_ID where d.HSCODE='" + dsHSCODE.Tables[0].Rows[i]["HSCODE"].ToString() + "' and d.KINDPKGS='" + dsHSCODE.Tables[0].Rows[i]["KINDPKGS"].ToString() + "' and d.DESCRIPTION='" + dsHSCODE.Tables[0].Rows[i]["DESCRIPTION"].ToString() + "' order by c.CTNCODE,d.[ID]"; - DataSet dsCNTRNO = T_ALL_DA.GetAllSQL(lsSQL); - if (dsCNTRNO != null) - { - if (dsCNTRNO.Tables[0].Rows.Count > 0) - { - for (int n = 0; n < dsCNTRNO.Tables[0].Rows.Count; n++) - { - //SGP+MSCU1234567+100' - r.WriteLine("SGP+" + dsCNTRNO.Tables[0].Rows[n]["CNTRNO"].ToString() + "+" + dsCNTRNO.Tables[0].Rows[n]["PKGS"].ToString() + "'"); - //MEA+AAE+WT+KGM:1000' - r.WriteLine("MEA+AAE+G+KGM:" + Math.Round(Decimal.Parse(dsCNTRNO.Tables[0].Rows[n]["KGS"].ToString()), 3) + "'"); - //MEA+AAE+AAW+MTQ:50.11' - r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(Decimal.Parse(dsCNTRNO.Tables[0].Rows[n]["CBM"].ToString()), 3) + "'"); - icount = icount + 3; - } - } - } + //lsSQL = "SELECT c.CTNALL,c.CNTRNO,c.SEALNO,d.PKGS,d.KINDPKGS,d.KGS,d.CBM,d.HSCODE,d.[DESCRIPTION] from op_ctn as c INNER JOIN op_ctn_detail as d on c.CTN_ID=d.CTN_ID where d.HSCODE='" + dsHSCODE.Tables[0].Rows[i]["HSCODE"].ToString() + "' and d.KINDPKGS='" + dsHSCODE.Tables[0].Rows[i]["KINDPKGS"].ToString() + "' and d.DESCRIPTION='" + dsHSCODE.Tables[0].Rows[i]["DESCRIPTION"].ToString() + "' order by c.CTNCODE,d.[ID]"; + //DataSet dsCNTRNO = T_ALL_DA.GetAllSQL(lsSQL); + //if (dsCNTRNO != null) + //{ + // if (dsCNTRNO.Tables[0].Rows.Count > 0) + // { + // for (int n = 0; n < dsCNTRNO.Tables[0].Rows.Count; n++) + // { + // //SGP+MSCU1234567+100' + // r.WriteLine("SGP+" + dsCNTRNO.Tables[0].Rows[n]["CNTRNO"].ToString() + "+" + dsCNTRNO.Tables[0].Rows[n]["PKGS"].ToString() + "'"); + // //MEA+AAE+WT+KGM:1000' + // r.WriteLine("MEA+AAE+G+KGM:" + Math.Round(Decimal.Parse(dsCNTRNO.Tables[0].Rows[n]["KGS"].ToString()), 3) + "'"); + // //MEA+AAE+AAW+MTQ:50.11' + // r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(Decimal.Parse(dsCNTRNO.Tables[0].Rows[n]["CBM"].ToString()), 3) + "'"); + // icount = icount + 3; + // } + // } + //} } } } @@ -17448,8 +17509,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL r.WriteLine("EQD+CN+" + ctn.CNTRNO + "+" + GetCtnEDICode(ctn.CTNALL, "EVERGREEN") + "+1'"); else r.WriteLine("EQD+CN+" + ctn.CNTRNO + "+" + GetCtnEDICode(ctn.CTNALL, "EVERGREEN") + "+2'"); - r.WriteLine("MEA+AAE+G+KGM:" + Math.Round(ctn.KGS, 3) + "'"); - r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(ctn.CBM, 3) + "'"); + r.WriteLine("TMD+3'"); + icount++; + r.WriteLine("MEA+WT+AAL+KGM:" + Math.Round(ctn.KGS, 3) + "'"); + r.WriteLine("MEA+VOL+AAW+MTQ:" + Math.Round(ctn.CBM, 3) + "'"); + r.WriteLine("MEA+AAU++"+GetPackageEDICode(ctn.KINDPKGS,"EVERGREEN")+":" + ctn.PKGS.ToString()+ "'"); icount = icount + 3; if (bill.CARGOID == "R") diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs index eac11ebe..fa0cef24 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs @@ -38,7 +38,21 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE #region 提单列表 static public List GetDataList ( string strCondition,int start,int limit,out int recordcount, string sort="",string corpid="") - { //合同信息/商品信息 + { + //var rangstr = GetRangDAStr("index", userid, usercode, companyid); + //if (!string.IsNullOrEmpty(rangstr)) + //{ + // if (!string.IsNullOrEmpty(strCondition)) + // { + // strCondition = strCondition + " and " + rangstr; + // } + // else + // { + // strCondition = rangstr; + // } + //} + + //合同信息/商品信息 var strSql = new StringBuilder(); strSql.Append(" select ob.GID,B.BSNO,B.mblno BLNO,B.HBLNO "); strSql.Append(" ,B.OPTYPE ZDFD "); @@ -3335,6 +3349,131 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE #endregion + + + + public static string GetSPRangDAStr(string tb, string userid, string username, string companyid) + { + string str = ""; + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(" VISIBLERANGE,OPERATERANGE,AUTHORITYID,VSSQL "); + strSql.Append(" from VW_User_Authority "); + strSql.Append(" where [NAME]='" + tb + "' and USERID='" + userid + "' and ISDELETE=0"); + + string visiblerange = "4"; + string operaterange = "4"; + string AUTHORITYID = ""; + string VSSQL = ""; + + Database db = DatabaseFactory.CreateDatabase(); + using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString())) + { + while (reader.Read()) + { + visiblerange = Convert.ToString(reader["VISIBLERANGE"]); + operaterange = Convert.ToString(reader["OPERATERANGE"]); + AUTHORITYID = Convert.ToString(reader["AUTHORITYID"]); + VSSQL = Convert.ToString(reader["VSSQL"]); + break; + } + reader.Close(); + } + if (visiblerange == "4") + { + str = " (ob.OPNAME='" + username + "')"; + } + else if (visiblerange == "3") + { + str = " (ob.OPNAME='" + username + "')"; + } + else if (visiblerange == "2") + { + var rangeDa = new RangeDA(); + var deptid = rangeDa.GetDEPTGID(userid); + str = " ob.OPNAME in (select SHOWNAME from vw_user where deptid='" + deptid + "') "; + } + else if (visiblerange == "1") + { + str = " ob.OPNAME in (select SHOWNAME from vw_user where COMPANYID='" + companyid + "') "; + + } + else if (visiblerange == "5") + { + str = " ob.OPNAME in (select SHOWNAME from vw_user where COMPANYID IN (select COMPANYID from user_authority_range_company where userid='" + userid + "' and AUTHORITYID='" + AUTHORITYID + "' and VISIBLERANGE=1)) "; + //var userstr = new StringBuilder(); + //userstr.Append(" select COMPANYID from user_authority_range_company where userid='" + userid + "' and AUTHORITYID='" + AUTHORITYID + "' and VISIBLERANGE=1"); + //Database userdb = DatabaseFactory.CreateDatabase(); + //using (IDataReader reader = userdb.ExecuteReader(CommandType.Text, userstr.ToString())) + //{ + // str = ""; + // while (reader.Read()) + // { + // if (str == "") + // { + // str = " (COMPANYID='" + Convert.ToString(reader["COMPANYID"]) + "'"; + // } + // else + // { + // str = str + " or COMPANYID='" + Convert.ToString(reader["COMPANYID"]) + "'"; + // }; + // } + // str = str + ")"; + // reader.Close(); + //} + + + } + else if (visiblerange == "6") + { + + var userstr = new StringBuilder(); + userstr.Append(" select OPID,(select SHOWNAME from [user] where GID=user_authority_range_op.OPID) SHOWNAME from user_authority_range_op where userid='" + userid + "' and AUTHORITYID='" + AUTHORITYID + "' and VISIBLERANGE=1"); + Database userdb = DatabaseFactory.CreateDatabase(); + using (IDataReader reader = userdb.ExecuteReader(CommandType.Text, userstr.ToString())) + { + str = ""; + while (reader.Read()) + { + if (str == "") + { + str = " (ob.OPNAME='" + Convert.ToString(reader["SHOWNAME"]) + "'"; + } + else + { + str = str + " or ob.OPNAME='" + Convert.ToString(reader["SHOWNAME"]) + "'"; + }; + } + str = str + ")"; + reader.Close(); + } + + + } + + else if (visiblerange == "0") + { + str = " 1=1 "; + } + VSSQL = VSSQL.Trim(); + if (!string.IsNullOrEmpty(VSSQL)) + { + + if (!string.IsNullOrEmpty(str)) + { + str = str + " and (" + VSSQL + ") "; + } + else + { + str = " (" + VSSQL + ") "; + } + + } + + return str; + } + + } } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/MainForm.js b/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/MainForm.js index 6c6366b8..07d14f49 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/MainForm.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/MainForm.js @@ -509,7 +509,7 @@ Ext.extend(Shipping.MainForm, Ext.Panel, { this.topleft = Ext.create('Ext.panel.Panel', { - title: "功能菜单", + title: Zi.LAN.MENU, layout: "accordion", //设置为手风琴布局 layoutConfig: { animate: true @@ -522,7 +522,7 @@ Ext.extend(Shipping.MainForm, Ext.Panel, { }); this.Mainpanel = new Ext.Panel({ - title: '首页', + title: Zi.LAN.HOMEPAGE, region: 'center', iconCls: "img_main", animate: true, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/Zi_en-us.js b/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/Zi_en-us.js index 3da68bb6..225024dd 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/Zi_en-us.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/Zi_en-us.js @@ -11,8 +11,9 @@ Zi.LAN.USERNAME = "User Name:"; Zi.LAN.WODEXIAOXI = "My Message"; Zi.LAN.XIAZAI = "DownLoad"; Zi.LAN.GUANYU = "About"; -Zi.LAN.TUICHU ="[Exit]"; - +Zi.LAN.TUICHU = "[Exit]"; +Zi.LAN.HOMEPAGE = "首页"; +Zi.LAN.MENU = "功能菜单"; //#endregion //Zi.LAN. = ""; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/Zi_zh-cn.js b/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/Zi_zh-cn.js index cdc53b91..af096d7b 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/Zi_zh-cn.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/Zi_zh-cn.js @@ -12,6 +12,8 @@ Zi.LAN.WODEXIAOXI = "我的消息"; Zi.LAN.XIAZAI = "下载"; Zi.LAN.GUANYU = "关于"; Zi.LAN.TUICHU = "[退出]"; +Zi.LAN.HOMEPAGE = "首页"; +Zi.LAN.MENU = "功能菜单"; //#endregion diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js index eefdcf14..4e9910eb 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js @@ -306,4 +306,5 @@ Zi.LAN.YES = "是"; Zi.LAN.NO = "否"; Zi.LAN.GJHL = "根据汇率设置"; Zi.LAN.GDFYWH = '固定费用维护'; -Zi.LAN.QSYBCM = '确实要保存吗?'; \ No newline at end of file +Zi.LAN.QSYBCM = '确实要保存吗?'; +Zi.LAN.ISINVDEF = '是否开票默认账户'; \ No newline at end of file diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js index f3813cd6..089965f8 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js @@ -311,3 +311,4 @@ Zi.LAN.QSYBCM = '确实要保存吗?'; Zi.LAN.ISINVDEF = '是否开票默认账户'; + diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiIndex.js index c6e51730..f386341c 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiIndex.js @@ -1980,7 +1980,7 @@ Ext.extend(Shipping.MsOpSeaiIndex, Ext.Panel, { text: Zi.LAN.btndelete, //"删除", iconCls: "btndelete", handler: function (button, event) { - this.onDeleteClick(button, event); + this.onDeleteListClick(button, event); }, scope: this }, '-', { @@ -3402,6 +3402,118 @@ Ext.extend(Shipping.MsOpSeaiIndex, Ext.Panel, { } }, this); }, + + onDeleteListClick: function (button, event) { + var selections = this.gridList.getSelectionModel().getSelection(); + if (selections.length == 0) { + Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + } + var reg = new RegExp("<", "g"); //创建正则RegExp对象 + var stringObj = ""; + var bodyAddDatas = []; + var icount = 0; + for (var i = 0; i < selections.length; i++) { + var rec = selections[i]; + var isdelete = true; + if (rec.data.BSSTATUS == true) { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.YeWuYiSuoDingBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + isdelete = false; + return; + } + + if (rec.data.FEESTATUS == true) { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FeiYongYiSuoDingBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + isdelete = false; + return; + } + if (rec.data.ORDERTYPE == '销售订舱') { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.CiPiaohuoWeiXiaoShouDingCangYeWuBuYunXuShanchu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + isdelete = false; + return; + } + + + if (this.StoreOpRange.getCount() == 0) { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.QuanXianBuZuBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + isdelete = false; + return; + + } else { + var op = rec.data.OP; + var inputby = rec.data.INPUTBY; + var records = DsStoreQueryBy(this.StoreOpRange, 'OPID', op); + if (records.getCount() > 0) { + } else { + var recordins = DsStoreQueryBy(this.StoreOpRange, 'OPID', inputby); + if (recordins.getCount() > 0) { + } else { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.QuanXianBuZuBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + isdelete = false; + return; + + } + } + } + + if (isdelete) { + stringObj = rec.data.SHIPPER; + var data2js = stringObj.replace(reg, "❥"); + rec.data.SHIPPER = data2js; + stringObj = rec.data.CONSIGNEE; + var data2js = stringObj.replace(reg, "❥"); + rec.data.CONSIGNEE = data2js; + stringObj = rec.data.NOTIFYPARTY; + var data2js = stringObj.replace(reg, "❥"); + rec.data.NOTIFYPARTY = data2js; + stringObj = rec.data.MARKS; + var data2js = stringObj.replace(reg, "❥"); + rec.data.MARKS = data2js; + stringObj = rec.data.DESCRIPTION; + var data2js = stringObj.replace(reg, "❥"); + rec.data.DESCRIPTION = data2js; + bodyAddDatas.push(rec); + icount = icount + 1; + } + } + + + + Ext.MessageBox.confirm(Zi.LAN.TiShi, Zi.LAN.QueshiYaoShanChu1 + icount.toString() + Zi.LAN.QueshiYaoShanChu2, function (btn) { + if (btn == 'yes') { + + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); + Ext.Ajax.request({ + waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, + url: '/MvcShipping/MsOpSeai/DeleteList', + params: { + data: jsonbodyAddDatas + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + this.onDsQuery(); + Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + } + else { + Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } + } + }, + failure: function (response, options) { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { }, + scope: this + }); //end Ext.Ajax.request + } + }, this); + + + }, + //#endregion //#region 拼箱分票Grid diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_en-us.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_en-us.js index d8ce2fe5..45ff35c3 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_en-us.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_en-us.js @@ -417,6 +417,9 @@ Zi.LAN.KG = "千克"; Zi.LAN.YES = "是"; Zi.LAN.NO = "否"; Zi.LAN.ZhengZaiGengXinShuJu = "正在更新数据..."; +Zi.LAN.QueshiYaoShanChu1 = "确实要删除选中的"; +Zi.LAN.QueshiYaoShanChu2 = "票业务吗?"; + //#endregion //Zi.LAN. = ""; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_zh-cn.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_zh-cn.js index 6ed4d55c..ff4fd7e5 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_zh-cn.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_zh-cn.js @@ -417,6 +417,9 @@ Zi.LAN.YINRUBAOGUAN = "引入报关信息"; Zi.LAN.QueDingShanChuGaiJiLuMa = "确定删除该记录吗?"; Zi.LAN.LOCK = "锁定"; Zi.LAN.UNLOCK = "未锁定"; +Zi.LAN.QueshiYaoShanChu1 = "确实要删除选中的"; +Zi.LAN.QueshiYaoShanChu2 = "票业务吗?"; + //#endregion //Zi.LAN. = ""; diff --git a/DSWeb/Areas/SoftMng/Controllers/ExportController.cs b/DSWeb/Areas/SoftMng/Controllers/ExportController.cs index db76cdfb..8a449e70 100644 --- a/DSWeb/Areas/SoftMng/Controllers/ExportController.cs +++ b/DSWeb/Areas/SoftMng/Controllers/ExportController.cs @@ -440,9 +440,9 @@ namespace DSWeb.SoftMng.Controllers foreach (var CodeSgAuditRuleGroup in CodeSgAuditRuleGroupList) { var billerrorstr = ""; - var iserror = true; + var iserror = false; foreach (var audit in CodeSgAuditRuleGroup.CodeSgAuditRuleList) { - if (!iserror) + if (1==2) { } @@ -1243,7 +1243,8 @@ namespace DSWeb.SoftMng.Controllers } if (iserror) { - errorstr= errorstr+ Environment.NewLine+"序号:"+ CodeSgAuditRuleGroup.SGANO+"("+billerrorstr+")"; + + errorstr = errorstr+ Environment.NewLine+"序号:"+ CodeSgAuditRuleGroup.SGANO+"("+billerrorstr+")"; } diff --git a/DSWeb/Areas/SoftMng/Controllers/HomeController.cs b/DSWeb/Areas/SoftMng/Controllers/HomeController.cs index 9cb899aa..4bda80fc 100644 --- a/DSWeb/Areas/SoftMng/Controllers/HomeController.cs +++ b/DSWeb/Areas/SoftMng/Controllers/HomeController.cs @@ -27,6 +27,17 @@ namespace DSWeb.SoftMng.Controllers /// public ActionResult Index() { + string LAN = Convert.ToString(Session["LANGUAGES"]); + if (LAN == "en-us") + { + ViewData["GONGGAO"] = "Notice"; + ViewData["DAIBAN"] = "To-do work"; + } + else { + ViewData["GONGGAO"] ="公告"; + ViewData["DAIBAN"] = "待办工作"; + } + ViewData["Notice"] = Json(new op_NoticeBLL().GetModelList(0, 15, "", "CreateTime desc")).Data; return View(); } diff --git a/DSWeb/Areas/SoftMng/Views/Home/Index.aspx b/DSWeb/Areas/SoftMng/Views/Home/Index.aspx index 6c0f8847..18737a8c 100644 --- a/DSWeb/Areas/SoftMng/Views/Home/Index.aspx +++ b/DSWeb/Areas/SoftMng/Views/Home/Index.aspx @@ -37,7 +37,7 @@
-
公告
+
<%=ViewData["GONGGAO"]%>
@@ -55,7 +55,7 @@
+ diff --git a/DSWeb/Areas/SoftMng/Viewsjs/Home/Index.min.js b/DSWeb/Areas/SoftMng/Viewsjs/Home/Index.min.js index 75b41af6..0f68a218 100644 --- a/DSWeb/Areas/SoftMng/Viewsjs/Home/Index.min.js +++ b/DSWeb/Areas/SoftMng/Viewsjs/Home/Index.min.js @@ -55,16 +55,16 @@ function showTopNotice() { layer.open({ type: 1, - title: "公告详情", + title: Zi.LAN.GONGGAODETAIL, skin:"layui-layer-molv", area: ['80%', '80%'], content: buildNoticeDetail(res[0]), - btn: ["不再提示", "关闭"], + btn: [Zi.LAN.BUZAITISHI, Zi.LAN.CLOSE], yes: function (index, layero) { CommonAjax.Post("/SoftMng/Home/SetNoticeUserRelation", { id: res[0].GID}, function (res) { - layer.msg(res ? "设置成功" : "设置失败"); + layer.msg(res ? Zi.LAN.SHEZHICHENGGONG : Zi.LAN.SHEZHISHIBAI); layer.close(index); }); } @@ -78,7 +78,7 @@ function showNotice(obj) { { layer.open({ type: 1, - title: "公告详情", + title: Zi.LAN.GONGGAODETAIL, area: ['80%', '80%'], content: buildNoticeDetail(res) }); @@ -88,8 +88,8 @@ function showNotice(obj) { //构造公告详情 function buildNoticeDetail(item) { return "

" + item.Title + "

" - + "公告时间:" + CommonJson.GetDate(item.CreateTime).format('yyyy-mm-dd hh:ii') + "" - + "公告人:" + item.CreateUser + "" + + "" + Zi.LAN.GONGGAOSHIJIAN+ CommonJson.GetDate(item.CreateTime).format('yyyy-mm-dd hh:ii') + "" + + "" + Zi.LAN.GONGGAOREN+ item.CreateUser + "" + "
".concat(decodeURIComponent(item.Content)).concat("
"); } //获取预警 @@ -97,12 +97,12 @@ function getpreWarning() { //默认列配置项 var columnsDefault = [{ field: 'BSTYPE', - title: '单据类型', + title: Zi.LAN.BSTYPE, width: 160 } , { field: 'BSMSG', - title: '消息主题', + title: Zi.LAN.BSMSG, width: 290 }]; $("#preWarning").bootstrapTable({ diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js index a8e66e95..2dda26fb 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js @@ -130,14 +130,17 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, { this.storeCustomerName = Ext.create('DsExt.ux.RefTableStore', { model: 'Tradermb', - proxy: { url: '/CommMng/BasicDataRef/GetTrader' } + proxy: { url: '/CommMng/BasicDataRef/GetTraderRm' } }); - this.storeCustomerName.load({ params: { condition: ""} }); + this.storeCustomerName.load(); this.comboxCustomerName = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '客户', id: "CustomerName", //hidden: true, forceSelection: true, store: this.storeCustomerName, + queryMode: 'remote', + minChars: 1, + queryParam: 'CODENAME', name: 'CustomerName', valueField: 'name', displayField: 'codename', @@ -157,15 +160,18 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, { //客户加载_车队 this.storeTRUCKER = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', - proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } + proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListTRUCK' } }); - this.storeTRUCKER.load({ params: { condition: "ISTRUCK='1'"} }); + //this.storeTRUCKER.load({ params: { condition: "ISTRUCK='1'"} }); _thisPc = this; //车队 this.comboxTRUCKER = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '车队', store: this.storeTRUCKER, + queryMode: 'remote', + minChars: 1, + queryParam: 'CODENAME', name: 'F_CustomerName', valueField: 'CustName', displayField: 'CodeAndName' diff --git a/DSWeb/DSWeb.csproj b/DSWeb/DSWeb.csproj index 38329315..93b236f4 100644 --- a/DSWeb/DSWeb.csproj +++ b/DSWeb/DSWeb.csproj @@ -3147,6 +3147,8 @@ + + diff --git a/DSWeb/DSWeb.csproj.user b/DSWeb/DSWeb.csproj.user index a8615099..5d714467 100644 --- a/DSWeb/DSWeb.csproj.user +++ b/DSWeb/DSWeb.csproj.user @@ -4,7 +4,7 @@ ShowAllFiles 配置文件1 true - Debug|Any CPU + Release|Any CPU diff --git a/DispatchWeb/DispatchWeb.csproj.user b/DispatchWeb/DispatchWeb.csproj.user index e6a8406a..af17a67a 100644 --- a/DispatchWeb/DispatchWeb.csproj.user +++ b/DispatchWeb/DispatchWeb.csproj.user @@ -1,7 +1,7 @@  - Debug|Any CPU + Release|Any CPU true