using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Text; using DirectService.Tools; using JLHHJSvr.BLL; using JLHHJSvr.Com; using JLHHJSvr.Com.Model; using JLHHJSvr.Helper; using JLHHJSvr.LJException; using JLHHJSvr.Tools; using LJLib.DAL.SQL; using LJLib.Net.SPI.Server; namespace JLHHJSvr.Excutor { internal sealed class GetMattressSubspecsExcutor : ExcutorBase { protected override void ExcuteInternal(GetMattressSubspecsRequest request, object state, GetMattressSubspecsResponse rslt) { var tokendata = BllHelper.GetToken(request.token); if (tokendata == null) { rslt.ErrMsg = "会话已经中断,请重新登录"; return; } if (request.mattressid == 0) { rslt.ErrMsg = "床垫id不能为0"; return; } using (var con = new SqlConnection(GlobalVar.ConnectionString)) using (var cmd = con.CreateCommand()) { con.Open(); using (cmd.Transaction = con.BeginTransaction()) { var helper = HelperBase.GetHelper(cmd, new HelperBase.Context() { tokendata = tokendata }); var subspecsList = new List(); var result = new List(); //获取副规格列表 subspecsList = helper.GetMattressSubspecs(request.mattressid); if (subspecsList.Count > 0) { foreach(var mattrss in subspecsList) { var _res = new u_mattress_mx_subspecs() { mattressid = mattrss.mattressid, mattress_width = mattrss.mattress_width, mattress_length = mattrss.mattress_length, //mattress_height = }; //获取弹簧排列 List springList = helper.GetMattressSubspecsBednet(mattrss.mattressid); //判断是否有主副规格调整物料 } } //rslt.mattressMx = result; } } } } }