public string UpdatePlanList2(sbxj_jh data) { Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(data)); sbxj_jh jh = data; sd_xsjh sjh = Client.ClientHelper.PlatformSqlMap.GetOneByKey<sd_xsjh>(jh.id); if (sjh != null) { sjh.xskssj = DateTime.Parse(jh.kssj); sjh.xswcsj = DateTime.Parse(jh.wcsj); sjh.qxnr = jh.qxnr; sjh.wcbj = jh.wcbj; } if (jh.gjlist != null && jh.gjlist.Count > 0) { updateGjlist(jh.id, jh.gjlist); } Client.ClientHelper.PlatformSqlMap.Update<sd_xsjh>(sjh); Console.WriteLine(string.Format("{0},调用方法:{1},共更新{2}条计划。", DateTime.Now.ToString(), "UpdatePlanList", 1)); return "ok"; }
public sbxj_jh GetPlan(string pid) { sbxj_jh xsjh = new sbxj_jh(); sd_xsjh jh = Client.ClientHelper.PlatformSqlMap.GetOneByKey<sd_xsjh>(pid); if (jh == null) return null; xsjh = new sbxj_jh() { id = jh.ID, LineName = jh.LineName, xslb = jh.xslb, xsnr = jh.xsnr, wcbj = jh.wcbj, vol = jh.vol , jhsj = jh.jhsj.ToString("yyyy-MM-dd HH:mm:ss") , wcsj = jh.xswcsj.ToString("yyyy-MM-dd HH:mm:ss") , kssj = jh.xskssj.ToString("yyyy-MM-dd HH:mm:ss") , qxnr = jh.qxnr , xsr = jh.sxr , rwlist = getrwlist(jh.ID) , xmlist = getxmlist(jh.ID) }; Console.WriteLine(string.Format("{0},调用方法:{1}({2})", DateTime.Now.ToString(), "GetPlan", pid)); return xsjh; }