20240903 销售订舱审核列表 改为分页查询

YingHang
dengyu 3 months ago
parent 48041a6291
commit 357d1e10c5

@ -4389,6 +4389,15 @@ namespace DSWeb.Common.DB
public string Type { get; set; }
}
/// <summary>
/// 云港通 码头 回执状态 type= YGTYARDCARRIER
/// </summary>
[Table("user_attribute")]
public class user_attribute_md
{
[Key]
public string GID { get; set; }
public string NAME { get; set; }
public string DESCRIPTION { get; set; }
}
}

@ -152,6 +152,7 @@ namespace DSWeb.Common.DB
public DbSet<op_seae_vgm_history_md> op_seae_vgm_history { get; set; }
public DbSet<op_seae_vgm_state_md> op_seae_vgm_state { get; set; }
public DbSet<user_attribute_md> user_attribute { get; set; }

@ -84,6 +84,44 @@ namespace DSWeb.Areas.CommMng.Controllers
return Json(new { success = true, data = evList.ToList() });
}
}
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public JsonResult GetUserByAttribute(string AttributeName, string dbname = "")
{
/*使
*/
var cdc = new CommonDataContext();
var = cdc.user_attribute.Where(x => x.DESCRIPTION.IndexOf(AttributeName) >= 0).ToList();
if ( == null || .Count == 0) {
return Json(new { success = false });
}
var condition = $" u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='{角色属性[0].GID}' and VALUE='true' ) ";
List<UserRefModel> evList = BasicDataRefDAL.GetUserRefList(condition, dbname);
if (evList.Count == 0)
{
return Json(new { success = false });
}
else
{
return Json(new { success = true, data = evList.ToList() });
}
}
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public JsonResult GetUserActionRefListRm(string CODENAME,string MODULENAME, string condition = "")
{

@ -484,9 +484,10 @@ namespace DSWeb.MvcShipping.Controllers
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public ContentResult GetAuditDataList(int start, int limit, string sort, string condition)
{
var dataList = MsSeaeOrderDAL.GetAuditDataList(condition, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), sort);
var list = dataList.Skip(start).Take(limit);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list.ToList() });
var dataList = MsSeaeOrderDAL.GetAuditDataList(condition, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), start, limit, sort);
var list = dataList;//.Skip(start).Take(limit);
int count = MsSeaeOrderDAL.getTotalCount(condition, CookieConfig.GetCookie_UserId(Request), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]));
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = count, data = list.ToList() });
return new ContentResult() { Content = json };
}

@ -789,7 +789,7 @@ namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
#region 审核通过处理
static public List<MsSeaeOrder> GetAuditDataList(string strCondition, string userid, string usercode, string companyid, string sort = null)
static public List<MsSeaeOrder> GetAuditDataList(string strCondition, string userid, string usercode, string companyid, int start, int limit,string sort = null )
{
var rangstr = "";
@ -813,9 +813,24 @@ namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
strCondition = rangstr;
}
}
//
var strSql = new StringBuilder();
strSql.Append("SELECT ORDNO,BSNO,ORSTATUS,ORREASON,BSDATE,MBLNO,CUSTOMERNAME,ORDTYPE,SHIPPERID,CONSIGNEEID,NOTIFYPARTYID,YARD");
strSql.Append(@"SELECT * from (SELECT row_number() over (");
var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring))
{
strSql.Append(" order by " + sortstring);
}
else
{
strSql.Append(" order by BSDATE desc");
}
strSql.Append(@") as num , ");
//strSql.Append(" SELECT ");
strSql.Append(" ORDNO,BSNO,ORSTATUS,ORREASON,BSDATE,MBLNO,CUSTOMERNAME,ORDTYPE,SHIPPERID,CONSIGNEEID,NOTIFYPARTYID,YARD");
strSql.Append(",SHIPPER,CONSIGNEE,NOTIFYPARTY,VESSEL,VOYNO,ETD,PlACERECEIPT,PlACERECEIPTID,PORTLOADID,PORTLOAD,PORTDISCHARGEID,PORTDISCHARGE");
strSql.Append(",PLACEDELIVERYID,PLACEDELIVERY,DESTINATIONID,DESTINATION,NOBILL,ISSUETYPE,ISSUEDATE,ISSUEPLACE,ISSUEPLACEID,BLFRT");
strSql.Append(",PREPARDAT,PAYABLEAT,[SERVICE],MARKS,NOPKGS,[DESCRIPTION],GOODSNAME,GROSSWEIGHT,MEASUREMENT,PKGS,KINDPKGS");
@ -838,15 +853,19 @@ namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
strSql.Append(" where " + strCondition);
}
//
var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring))
{
strSql.Append(" order by " + sortstring);
}
else
{
strSql.Append(" order by BSDATE desc");
}
//var sortstring = DatasetSort.Getsortstring(sort);
//if (!string.IsNullOrEmpty(sortstring))
//{
// strSql.Append(" order by " + sortstring);
//}
//else
//{
// strSql.Append(" order by BSDATE desc");
//}
strSql.Append(@")as t ");
strSql.Append(string.Format("where t.num>{0} and t.num<={1} order by t.num ", start, start + limit));
return SetData(strSql);
}

@ -814,8 +814,7 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, {
});
//服务项目
this.myCheckboxService = new Ext.form.CheckboxGroup({
id: 'myService',
xtype: 'checkboxgroup',
@ -943,8 +942,6 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, {
});
//#endregion
//运输条款
this.storeSERVICE = Ext.create('DsExt.ux.RefTableStore', {
model: 'CODE_SERVICE',
@ -1061,6 +1058,7 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, {
name: 'TRADETERM'
});
//#endregion
//#region 编辑formHead 基本信息
this.formHead = Ext.widget('form', {

Loading…
Cancel
Save