1.App 智能分析,生产进度看板接口
2.PC端设备点检项目、保养项目、点检标准、保养标准、点检记录、保养记录、维修记录
3.工序检验扫码添加判断(条码任务是否存在、工单是否关闭)
4.添加App图标图片文件
| | |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[Appç产è¿åº¦çæ¿åæ®ä¿¡æ¯] |
| | | /// <summary> |
| | | /// Appç产è¿åº¦çæ¿åæ®ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="ordertype">åæ®ç±»å(SO:éå®è®¢åãMO:ç产订åãPO:ç产工å)</param> |
| | | /// <param name="partcode">产åä¿¡æ¯(å¯å¤ä¸ª)</param> |
| | | /// <param name="Ratetime">åæ®æ¥æèå´</param> |
| | | /// <returns></returns> |
| | | [Route(template: "ProductionScheduleKanban")] |
| | | [HttpGet] |
| | | public JsonResult ProductionScheduleKanban(string ordertype, string partcode = null, string Ratetime = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | //var token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyY29kZSI6Ijk5OCIsInVzZXJuYW1lIjoi5rWL6K-V6LSm5Y-3MSIsInN0b3JnX2NvZGUiOiJTQ0IwMV8xXzEiLCJzdG9yZ19uYW1lIjoi57K-5bel6L2m6Ze0IiwiaXNfc3lzdGVtX2FkbWluIjoiTiIsInJvbGVfY29kZSI6Ijk5OTkiLCJyb2xlX2RhdGFwZXJtaXNzaW9ucyI6IiIsInVzZXJ0eXBlIjoiQVBQIiwicmVkaXNrZXkiOiJOZXdNRVNMb2dpblVzZXJJREFQUDk5OCIsInRpbWVvdXQiOiIyMDIzLTEyLTA3VDE0OjU0OjAzLjU0NDMxMjMrMDg6MDAifQ._L0xdKgeD_dgnedzV8EEN6y2Xad0J7beswuIcNj4OKs"; |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string startopendate = ""; //å¼å§æ¶é´ |
| | | string endclosedate = ""; //ç»ææ¶é´ |
| | | if (Ratetime != "" && Ratetime != null) |
| | | { |
| | | startopendate = Ratetime.Split('~')[0].ToString(); |
| | | endclosedate = Ratetime.Split('~')[1].ToString(); |
| | | } |
| | | mes = AppAnalyticsBLL.ProductionScheduleKanban(us,ordertype, partcode, startopendate, endclosedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateDeviceType")] |
| | | [HttpPost] |
| | | public JsonResult AddUpdateDeviceType(string OperType,List<ObjectDataCont> json) |
| | | public JsonResult AddUpdateDeviceType(string OperType, List<ObjectDataCont> json) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = DeviceManagerBLL.AddUpdateDeviceType(OperType,json, us); |
| | | mes = DeviceManagerBLL.AddUpdateDeviceType(OperType, json, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | |
| | | string storgcode = obj["storgcode"].ToString(); //æå±ç»ç»ç¼ç |
| | | string status = obj["status"].ToString(); //使ç¨ç¶æ |
| | | string OperType = obj["OperType"].ToString(); //æä½ç±»å |
| | | mes = DeviceManagerBLL.AddUpdateDeviceManger(devicecode, devicename, devicetype, storgcode, status,OperType, us); |
| | | mes = DeviceManagerBLL.AddUpdateDeviceManger(devicecode, devicename, devicetype, storgcode, status, OperType, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ç¹æ£é¡¹å表æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£é¡¹å表æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="checkitemcode">ç¹æ£é¨ä½ç¼ç </param> |
| | | /// <param name="checkitemname">ç¹æ£é¨ä½åç§°</param> |
| | | /// <param name="checkdescr">ç¹æ£è¦æ±</param> |
| | | /// <param name="isqrcode">é䏿«ç </param> |
| | | /// <param name="cycle">ç¹æ£å¨æ</param> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceCheckItemSearch")] |
| | | [HttpGet] |
| | | public JsonResult DeviceCheckItemSearch(int page, int rows, string prop, string order, string checkitemcode = null, string checkitemname = null, string checkdescr = null, string isqrcode = null, string cycle = null) |
| | | { |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = DeviceManagerBLL.DeviceCheckItemSearch(checkitemcode, checkitemname, checkdescr, isqrcode, cycle, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£é¡¹æ°å¢ç¼è¾] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£é¡¹æ°å¢ç¼è¾ |
| | | /// </summary> |
| | | /// <param name="obj">æäº¤æ°æ®å¯¹è±¡</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateDeviceCheckItem")] |
| | | [HttpPost] |
| | | public JsonResult AddUpdateDeviceCheckItem([FromBody] JObject obj) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string checkitemid = obj["id"].ToString(); //设å¤ç¹æ£é¡¹id(主é®) |
| | | string checkitemcode = obj["checkitemcode"].ToString(); //设å¤ç¹æ£é¨ä½ç¼ç |
| | | string checkitemname = obj["checkitemname"].ToString(); //设å¤ç¹æ£é¨ä½åç§° |
| | | string checkitemdescr = obj["checkitemdescr"].ToString(); //设å¤ç¹æ£é¨ä½è¦æ± |
| | | string cycle = obj["cycle"].ToString(); //设å¤ç¹æ£é¨ä½å¨æ |
| | | string isqrcode = obj["isqrcode"].ToString(); //æ¯å¦æ«ç |
| | | string OperType = obj["OperType"].ToString(); //æä½ç±»å |
| | | mes = DeviceManagerBLL.AddUpdateDeviceCheckItem(checkitemid, checkitemcode, checkitemname, checkitemdescr, cycle, isqrcode, us, OperType); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£é¡¹å é¤] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£é¡¹å é¤ |
| | | /// </summary> |
| | | /// <param name="checkitemcode">设å¤ç¹æ£é¡¹ç®(é¨ä½)ç¼ç </param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteDeviceCheckItem")] |
| | | [HttpPost] |
| | | public JsonResult DeleteDeviceCheckItem(string checkitemcode) |
| | | { |
| | | mes = DeviceManagerBLL.DeleteDeviceCheckItem(checkitemcode); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[设å¤ä¿å
»é¡¹å表æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»é¡¹å表æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="maiitemcode">ä¿å
»é¨ä½ç¼ç </param> |
| | | /// <param name="maiitemname">ä¿å
»é¨ä½åç§°</param> |
| | | /// <param name="maidescr">ä¿å
»è¦æ±</param> |
| | | /// <param name="isqrcode">é䏿«ç </param> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceMaiItemSearch")] |
| | | [HttpGet] |
| | | public JsonResult DeviceMaiItemSearch(int page, int rows, string prop, string order, string maiitemcode = null, string maiitemname = null, string maidescr = null, string isqrcode = null) |
| | | { |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = DeviceManagerBLL.DeviceMaiItemSearch(maiitemcode, maiitemname, maidescr, isqrcode, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»é¡¹æ°å¢ç¼è¾] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»é¡¹æ°å¢ç¼è¾ |
| | | /// </summary> |
| | | /// <param name="obj">æäº¤æ°æ®å¯¹è±¡</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateDeviceMaiItem")] |
| | | [HttpPost] |
| | | public JsonResult AddUpdateDeviceMaiItem([FromBody] JObject obj) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string maiitemid = obj["id"].ToString(); //设å¤ä¿å
»é¡¹id(主é®) |
| | | string maiitemcode = obj["maiitemcode"].ToString(); //设å¤ä¿å
»é¨ä½ç¼ç |
| | | string maiitemname = obj["maiitemname"].ToString(); //设å¤ä¿å
»é¨ä½åç§° |
| | | string maiitemdescr = obj["maiitemdescr"].ToString(); //设å¤ä¿å
»é¨ä½è¦æ± |
| | | string isqrcode = obj["isqrcode"].ToString(); //æ¯å¦æ«ç |
| | | string OperType = obj["OperType"].ToString(); //æä½ç±»å |
| | | mes = DeviceManagerBLL.AddUpdateDeviceMaiItem(maiitemid, maiitemcode, maiitemname, maiitemdescr, isqrcode, us, OperType); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»é¡¹å é¤] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»é¡¹å é¤ |
| | | /// </summary> |
| | | /// <param name="maiitemcode">设å¤ä¿å
»é¡¹ç®(é¨ä½)ç¼ç </param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteDeviceMaiItem")] |
| | | [HttpPost] |
| | | public JsonResult DeleteDeviceMaiItem(string maiitemcode) |
| | | { |
| | | mes = DeviceManagerBLL.DeleteDeviceMaiItem(maiitemcode); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ç¹æ£æ åå表æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£æ åå表æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="checkstandcode">ç¹æ£æ åç¼ç </param> |
| | | /// <param name="checkstandname">ç¹æ£æ ååç§°</param> |
| | | /// <param name="checkcontr">ç¹æ£ç®¡æ§</param> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceCheckStandArdSearch")] |
| | | [HttpGet] |
| | | public JsonResult DeviceCheckStandArdSearch(int page, int rows, string prop, string order, string checkstandcode = null, string checkstandname = null, string checkcontr = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = DeviceManagerBLL.DeviceCheckStandArdSearch(us, checkstandcode, checkstandname, checkcontr, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åæ°å¢ãç¼è¾è·åæ£éªé¡¹ç®ä¸æå表] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£æ åæ°å¢ãç¼è¾è·åæ£éªé¡¹ç®ä¸æå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceCheckItemSelect")] |
| | | [HttpGet] |
| | | public JsonResult DeviceCheckItemSelect() |
| | | { |
| | | mes = DeviceManagerBLL.DeviceCheckItemSelect(); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åç¼è¾/æ¥çè·åæ°æ®] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£æ åç¼è¾/æ¥çè·åæ°æ® |
| | | /// </summary> |
| | | /// <param name="checkstand_code">设å¤ç¹æ£æ åç¼ç </param> |
| | | /// <returns></returns> |
| | | [Route(template: "ViewDeviceCheckStanedSearch")] |
| | | [HttpPost] |
| | | public JsonResult ViewDeviceCheckStanedSearch(string checkstand_code) |
| | | { |
| | | mes = DeviceManagerBLL.ViewDeviceCheckStanedSearch(checkstand_code); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åæ°å¢ç¼è¾] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£æ åæ°å¢ç¼è¾ |
| | | /// </summary> |
| | | /// <param name="opertype">æä½ç±»å</param> |
| | | /// <param name="json">æäº¤æ°æ®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateDeviceCheckStandArd")] |
| | | [HttpPost] |
| | | public JsonResult AddUpdateDeviceCheckStandArd(string opertype, RoutEdit json) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = DeviceManagerBLL.AddUpdateDeviceCheckStandArd(opertype, json, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åå é¤] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£æ åå é¤ |
| | | /// </summary> |
| | | /// <param name="checkstand_code">设å¤ç¹æ£æ åç¼ç </param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteDeviceCheckStaned")] |
| | | [HttpPost] |
| | | public JsonResult DeleteDeviceCheckStaned(string checkstand_code) |
| | | { |
| | | mes = DeviceManagerBLL.DeleteDeviceCheckStaned(checkstand_code); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åå
³èå·¥ä½ç«æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£æ åå
³èå·¥ä½ç«æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="checkstand_code">设å¤ç¹æ£æ åç¼ç </param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceCheckStanedAssociationEqp")] |
| | | [HttpGet] |
| | | public JsonResult DeviceCheckStanedAssociationEqp(string checkstand_code) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = DeviceManagerBLL.DeviceCheckStanedAssociationEqp(us, checkstand_code); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region [设å¤ç¹æ£æ åå
³èå·¥ä½ç«æäº¤] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£æ åå
³èå·¥ä½ç«æäº¤ |
| | | /// </summary> |
| | | /// <param name="checkstand_code">设å¤ç¹æ£æ åç¼ç </param> |
| | | /// <param name="json">æäº¤æ°æ®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "SaveDeviceCheckStanedAssociationEqp")] |
| | | [HttpPost] |
| | | public JsonResult SaveDeviceCheckStanedAssociationEqp(string checkstand_code, List<ObjectData> json) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = DeviceManagerBLL.SaveDeviceCheckStanedAssociationEqp(us, checkstand_code, json); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ä¿å
»æ åå表æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»æ åå表æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="repairstandcode">ä¿å
»æ åç¼ç </param> |
| | | /// <param name="repairstandname">ä¿å
»æ ååç§°</param> |
| | | /// <param name="repairstanddescr">ä¿å
»æ åæè¿°</param> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceRepairStandArdSearch")] |
| | | [HttpGet] |
| | | public JsonResult DeviceRepairStandArdSearch(int page, int rows, string prop, string order, string repairstandcode = null, string repairstandname = null, string repairstanddescr = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = DeviceManagerBLL.DeviceRepairStandArdSearch(us, repairstandcode, repairstandname, repairstanddescr, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åæ°å¢ãç¼è¾è·åä¿å
»é¡¹ç®ä¸æå表] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»æ åæ°å¢ãç¼è¾è·åä¿å
»é¡¹ç®ä¸æå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceRepairItemSelect")] |
| | | [HttpGet] |
| | | public JsonResult DeviceRepairItemSelect() |
| | | { |
| | | mes = DeviceManagerBLL.DeviceRepairItemSelect(); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åç¼è¾/æ¥çè·åæ°æ®] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»æ åç¼è¾/æ¥çè·åæ°æ® |
| | | /// </summary> |
| | | /// <param name="repairstand_code">设å¤ä¿å
»æ åç¼ç </param> |
| | | /// <returns></returns> |
| | | [Route(template: "ViewDeviceRepairStanedSearch")] |
| | | [HttpPost] |
| | | public JsonResult ViewDeviceRepairStanedSearch(string repairstand_code) |
| | | { |
| | | mes = DeviceManagerBLL.ViewDeviceRepairStanedSearch(repairstand_code); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åæ°å¢ç¼è¾] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»æ åæ°å¢ç¼è¾ |
| | | /// </summary> |
| | | /// <param name="opertype">æä½ç±»å</param> |
| | | /// <param name="json">æäº¤æ°æ®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateDeviceRepairStandArd")] |
| | | [HttpPost] |
| | | public JsonResult AddUpdateDeviceRepairStandArd(string opertype, EqpRepair json) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = DeviceManagerBLL.AddUpdateDeviceRepairStandArd(opertype, json, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åå é¤] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»æ åå é¤ |
| | | /// </summary> |
| | | /// <param name="repairstand_code">设å¤ä¿å
»æ åç¼ç </param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteDeviceRepairStaned")] |
| | | [HttpPost] |
| | | public JsonResult DeleteDeviceRepairStaned(string repairstand_code) |
| | | { |
| | | mes = DeviceManagerBLL.DeleteDeviceRepairStaned(repairstand_code); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åå
³èå·¥ä½ç«æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»æ åå
³èå·¥ä½ç«æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="repairstand_code">设å¤ä¿å
»æ åç¼ç </param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceRepairStanedAssociationEqp")] |
| | | [HttpGet] |
| | | public JsonResult DeviceRepairStanedAssociationEqp(string repairstand_code) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = DeviceManagerBLL.DeviceRepairStanedAssociationEqp(us, repairstand_code); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region [设å¤ä¿å
»æ åå
³èå·¥ä½ç«æäº¤] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»æ åå
³èå·¥ä½ç«æäº¤ |
| | | /// </summary> |
| | | /// <param name="repairstand_code">设å¤ä¿å
»æ åç¼ç </param> |
| | | /// <param name="json">æäº¤æ°æ®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "SaveDeviceRepairStanedAssociationEqp")] |
| | | [HttpPost] |
| | | public JsonResult SaveDeviceRepairStanedAssociationEqp(string repairstand_code, List<ObjectData> json) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = DeviceManagerBLL.SaveDeviceRepairStanedAssociationEqp(us, repairstand_code, json); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ç¹æ£è®°å½æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£è®°å½æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <param name="wkshopcode">车é´ç¼ç </param> |
| | | /// <param name="eqpcode">设å¤ç¼ç </param> |
| | | /// <param name="eqpname">设å¤åç§°</param> |
| | | /// <param name="stanedname">ç¹æ£æ ååç§°</param> |
| | | /// <param name="checkuser">ç¹æ£äººå</param> |
| | | /// <param name="checkdate">ç¹æ£æ¶é´</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceCheckTakeSearch")] |
| | | [HttpGet] |
| | | public JsonResult DeviceCheckTakeSearch(int page, int rows, string prop, string order, string wkshopcode = null, string eqpcode = null, string eqpname = null, string stanedname = null, string checkuser = null, string checkdate = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string checkopendate = "";//ç¹æ£å¼å§æ¶é´ |
| | | string checkclosedate = "";//ç¹æ£ç»ææ¶é´ |
| | | if (checkdate != "" && checkdate != null) |
| | | { |
| | | checkopendate = checkdate.Split('~')[0].ToString(); |
| | | checkclosedate = checkdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1;//èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½rowNum |
| | | mes = DeviceManagerBLL.DeviceCheckTakeSearch(us, wkshopcode, eqpcode, eqpname, stanedname, checkuser, checkopendate, checkclosedate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£è®°å½æç»æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£è®°å½æç»æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="djwo">设å¤ç¹æ£åå·</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceCheckSubTakeSearch")] |
| | | [HttpGet] |
| | | public JsonResult DeviceCheckSubTakeSearch(string djwo) |
| | | { |
| | | mes = DeviceManagerBLL.DeviceCheckSubTakeSearch(djwo); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£è®°å½å¯¼åº] |
| | | /// <summary> |
| | | /// 设å¤ç¹æ£è®°å½å¯¼åº |
| | | /// </summary> |
| | | /// <param name="wkshopcode">车é´ç¼ç </param> |
| | | /// <param name="eqpcode">设å¤ç¼å·</param> |
| | | /// <param name="eqpname">设å¤åç§°</param> |
| | | /// <param name="stanedname">ç¹æ£æ ååç§°</param> |
| | | /// <param name="checkuser">ç¹æ£äººå</param> |
| | | /// <param name="checkdate">ç¹æ£æ¶é´</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceCheckTakeOutExcel")] |
| | | [HttpGet] |
| | | public JsonResult DeviceCheckTakeOutExcel(string wkshopcode = null, string eqpcode = null, string eqpname = null, string stanedname = null, string checkuser = null, string checkdate = null) |
| | | { |
| | | var Token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(Token.ToString()); |
| | | string checkopendate = "";//ç¹æ£å¼å§æ¶é´ |
| | | string checkclosedate = "";//ç¹æ£ç»ææ¶é´ |
| | | if (checkdate != "" && checkdate != null) |
| | | { |
| | | checkopendate = checkdate.Split('~')[0].ToString(); |
| | | checkclosedate = checkdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = DeviceManagerBLL.DeviceCheckTakeOutExcel(us,wkshopcode,eqpcode,eqpname,stanedname,checkuser,checkopendate,checkclosedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[设å¤ä¿å
»è®°å½æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»è®°å½æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <param name="wkshopcode">车é´ç¼ç </param> |
| | | /// <param name="eqpcode">设å¤ç¼ç </param> |
| | | /// <param name="eqpname">设å¤åç§°</param> |
| | | /// <param name="stanedname">ä¿å
»æ ååç§°</param> |
| | | /// <param name="repairuser">ä¿å
»äººå</param> |
| | | /// <param name="repairdate">ä¿å
»æ¶é´</param> |
| | | /// <param name="repairresult">ä¿å
ȍȾ</param> |
| | | /// <returns></returns> |
| | | public JsonResult DeviceRepairTakeSearch(int page, int rows, string prop, string order, string wkshopcode = null, string eqpcode = null,string eqpname=null, string stanedname = null, string repairuser = null, string repairdate = null, string repairresult = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string repairopendate = ""; //ç¹æ£å¼å§æ¶é´ |
| | | string repairclosedate = ""; //ç¹æ£ç»ææ¶é´ |
| | | if (repairdate != "" && repairdate != null) |
| | | { |
| | | repairopendate = repairdate.Split('~')[0].ToString(); |
| | | repairclosedate = repairdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = DeviceManagerBLL.DeviceRepairTakeSearch(us, wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»è®°å½æç»æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»è®°å½æç»æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="bywo">设å¤ä¿å
»åå·</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceRepairSubTakeSearch")] |
| | | [HttpGet] |
| | | public JsonResult DeviceRepairSubTakeSearch(string bywo) |
| | | { |
| | | mes = DeviceManagerBLL.DeviceRepairSubTakeSearch(bywo); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»è®°å½å¯¼åº] |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»è®°å½å¯¼åº |
| | | /// </summary> |
| | | /// <param name="wkshopcode">车é´ç¼ç </param> |
| | | /// <param name="eqpcode">设å¤ç¼å·</param> |
| | | /// <param name="eqpname">设å¤åç§°</param> |
| | | /// <param name="stanedname">æ ååç§°</param> |
| | | /// <param name="repairuser">ä¿å
»äººå</param> |
| | | /// <param name="repairdate">ä¿å
»æ¶é´</param> |
| | | /// <param name="repairresult">ä¿å
ȍȾ</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceRepairTakeOutExcel")] |
| | | [HttpGet] |
| | | public JsonResult DeviceRepairTakeOutExcel(string wkshopcode = null, string eqpcode = null, string eqpname = null, string stanedname = null, string repairuser = null, string repairdate = null, string repairresult = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string repairopendate = ""; //ç¹æ£å¼å§æ¶é´ |
| | | string repairclosedate = ""; //ç¹æ£ç»ææ¶é´ |
| | | if (repairdate != "" && repairdate != null) |
| | | { |
| | | repairopendate = repairdate.Split('~')[0].ToString(); |
| | | repairclosedate = repairdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = DeviceManagerBLL.DeviceRepairTakeOutExcel(us, wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[设å¤ç»´ä¿®è®°å½æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ç»´ä¿®è®°å½æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <param name="wkshopcode">车é´ç¼ç </param> |
| | | /// <param name="eqpcode">设å¤ç¼ç </param> |
| | | /// <param name="eqpname">设å¤åç§°</param> |
| | | /// <param name="reportuser">æ¥ä¿®äººå</param> |
| | | /// <param name="repairuser">维修人å</param> |
| | | /// <param name="vrifcatuser">éªè¯äººå</param> |
| | | /// <param name="reportdate">æ¥ä¿®æ¶é´</param> |
| | | /// <param name="repairdate">ç»´ä¿®æ¶é´</param> |
| | | /// <param name="vrifcatdate">éªè¯æ¶é´</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceUpdateSearch")] |
| | | [HttpGet] |
| | | public JsonResult DeviceUpdateSearch(int page, int rows, string prop, string order, string wkshopcode = null, string eqpcode = null, string eqpname = null, string reportuser = null, string repairuser = null, string vrifcatuser = null, string reportdate = null, string repairdate = null, string vrifcatdate = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string reportopendate = ""; //æ¥ä¿®å¼å§æ¶é´ |
| | | string reportclosedate = ""; //æ¥ä¿®ç»ææ¶é´ |
| | | string repairopendate = ""; //ç»´ä¿®å¼å§æ¶é´ |
| | | string repairclosedate = ""; //ç»´ä¿®ç»ææ¶é´ |
| | | string vrifcatopendate = ""; //ç»´ä¿®éªè¯å¼å§æ¶é´ |
| | | string vrifcatclosedate = ""; //ç»´ä¿®éªè¯ç»ææ¶é´ |
| | | if (reportdate != "" && reportdate != null) |
| | | { |
| | | reportopendate = reportdate.Split('~')[0].ToString(); |
| | | reportclosedate = reportdate.Split('~')[1].ToString(); |
| | | } |
| | | if (repairdate != "" && repairdate != null) |
| | | { |
| | | repairopendate = repairdate.Split('~')[0].ToString(); |
| | | repairclosedate = repairdate.Split('~')[1].ToString(); |
| | | } |
| | | if (vrifcatdate != "" && vrifcatdate != null) |
| | | { |
| | | vrifcatopendate = vrifcatdate.Split('~')[0].ToString(); |
| | | vrifcatclosedate = vrifcatdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = DeviceManagerBLL.DeviceUpdateSearch(us, wkshopcode, eqpcode, eqpname, reportuser, repairuser, vrifcatuser, reportopendate, reportclosedate, repairopendate, repairclosedate, vrifcatopendate, vrifcatclosedate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç»´ä¿®è®°å½æç»æ¥è¯¢] |
| | | /// <summary> |
| | | /// 设å¤ç»´ä¿®è®°å½æç»æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="repair_code">设å¤ç»´ä¿®åå·</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceUpdateSubSearch")] |
| | | [HttpGet] |
| | | public JsonResult DeviceUpdateSubSearch(string repair_code) |
| | | { |
| | | mes = DeviceManagerBLL.DeviceUpdateSubSearch(repair_code); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç»´ä¿®è®°å½å¯¼åº] |
| | | /// <summary> |
| | | /// 设å¤ç»´ä¿®è®°å½å¯¼åº |
| | | /// </summary> |
| | | /// <param name="wkshopcode">车é´ç¼ç </param> |
| | | /// <param name="eqpcode">设å¤ç¼ç </param> |
| | | /// <param name="eqpname">设å¤åç§°</param> |
| | | /// <param name="reportuser">æ¥ä¿®äººå</param> |
| | | /// <param name="repairuser">维修人å</param> |
| | | /// <param name="vrifcatuser">éªè¯äººå</param> |
| | | /// <param name="reportdate">æ¥ä¿®æ¶é´</param> |
| | | /// <param name="repairdate">ç»´ä¿®æ¶é´</param> |
| | | /// <param name="vrifcatdate">éªè¯æ¶é´</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceUpdateOutExcel")] |
| | | [HttpGet] |
| | | public JsonResult DeviceUpdateOutExcel(string wkshopcode = null, string eqpcode = null, string eqpname = null, string reportuser = null, string repairuser = null, string vrifcatuser = null, string reportdate = null, string repairdate = null, string vrifcatdate = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string reportopendate = ""; //æ¥ä¿®å¼å§æ¶é´ |
| | | string reportclosedate = ""; //æ¥ä¿®ç»ææ¶é´ |
| | | string repairopendate = ""; //ç»´ä¿®å¼å§æ¶é´ |
| | | string repairclosedate = ""; //ç»´ä¿®ç»ææ¶é´ |
| | | string vrifcatopendate = ""; //ç»´ä¿®éªè¯å¼å§æ¶é´ |
| | | string vrifcatclosedate = ""; //ç»´ä¿®éªè¯ç»ææ¶é´ |
| | | if (reportdate != "" && reportdate != null) |
| | | { |
| | | reportopendate = reportdate.Split('~')[0].ToString(); |
| | | reportclosedate = reportdate.Split('~')[1].ToString(); |
| | | } |
| | | if (repairdate != "" && repairdate != null) |
| | | { |
| | | repairopendate = repairdate.Split('~')[0].ToString(); |
| | | repairclosedate = repairdate.Split('~')[1].ToString(); |
| | | } |
| | | if (vrifcatdate != "" && vrifcatdate != null) |
| | | { |
| | | vrifcatopendate = vrifcatdate.Split('~')[0].ToString(); |
| | | vrifcatclosedate = vrifcatdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = DeviceManagerBLL.DeviceUpdateOutExcel(us, wkshopcode, eqpcode, eqpname, reportuser, repairuser, vrifcatuser, reportopendate, reportclosedate, repairopendate, repairclosedate, vrifcatopendate, vrifcatclosedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | return AppAnalyticsDAL.ProductionKanban(us, startopendate, endclosedate,defecttype); |
| | | } |
| | | #endregion |
| | | |
| | | #region[Appç产è¿åº¦çæ¿åæ®ä¿¡æ¯] |
| | | public static ToMessage ProductionScheduleKanban(User us, string ordertype, string partcode, string startopendate, string endclosedate) |
| | | { |
| | | return AppAnalyticsDAL.ProductionScheduleKanban(us, ordertype, partcode, startopendate, endclosedate); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | #region[设å¤ç¹æ£é¡¹å表æ¥è¯¢] |
| | | public static ToMessage DeviceCheckItemSearch(string checkitemcode, string checkitemname, string checkdescr, string isqrcode, string cycle, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckItemSearch(checkitemcode, checkitemname, checkdescr, isqrcode, cycle, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£é¡¹æ°å¢ç¼è¾] |
| | | public static ToMessage AddUpdateDeviceCheckItem(string checkitemid, string checkitemcode, string checkitemname, string checkitemdescr, string cycle, string isqrcode, string usercode, string operType) |
| | | { |
| | | return DeviceManagerDAL.AddUpdateDeviceCheckItem(checkitemid, checkitemcode, checkitemname, checkitemdescr, cycle, isqrcode, usercode, operType); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£é¡¹å é¤] |
| | | public static ToMessage DeleteDeviceCheckItem(string checkitemcode) |
| | | { |
| | | return DeviceManagerDAL.DeleteDeviceCheckItem(checkitemcode); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[设å¤ä¿å
»é¡¹å表æ¥è¯¢] |
| | | public static ToMessage DeviceMaiItemSearch(string maiitemcode, string maiitemname, string maidescr, string isqrcode, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceMaiItemSearch(maiitemcode, maiitemname, maidescr, isqrcode, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»é¡¹æ°å¢ç¼è¾] |
| | | public static ToMessage AddUpdateDeviceMaiItem(string maiitemid, string maiitemcode, string maiitemname, string maiitemdescr, string isqrcode, string usercode, string operType) |
| | | { |
| | | return DeviceManagerDAL.AddUpdateDeviceMaiItem(maiitemid, maiitemcode, maiitemname, maiitemdescr, isqrcode, usercode, operType); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»é¡¹å é¤] |
| | | public static ToMessage DeleteDeviceMaiItem(string maiitemcode) |
| | | { |
| | | return DeviceManagerDAL.DeleteDeviceMaiItem(maiitemcode); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ç¹æ£æ åå表æ¥è¯¢] |
| | | public static ToMessage DeviceCheckStandArdSearch(string stu_torgcode, string stu_torgtypecode, string checkstandcode, string checkstandname, string checkcontr, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckStandArdSearch(stu_torgcode, stu_torgtypecode, checkstandcode, checkstandname, checkcontr, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åæ°å¢ãç¼è¾è·åæ£éªé¡¹ç®ä¸æå表] |
| | | public static ToMessage DeviceCheckItemSelect() |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckItemSelect(); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åç¼è¾/æ¥çè·åæ°æ®] |
| | | public static ToMessage ViewDeviceCheckStanedSearch(string checkstand_code) |
| | | { |
| | | return DeviceManagerDAL.ViewDeviceCheckStanedSearch(checkstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åæ°å¢ç¼è¾] |
| | | public static ToMessage AddUpdateDeviceCheckStandArd(string opertype, RoutEdit json, string username) |
| | | { |
| | | return DeviceManagerDAL.AddUpdateDeviceCheckStandArd(opertype, json, username); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åå é¤] |
| | | public static ToMessage DeleteDeviceCheckStaned(string checkstand_code) |
| | | { |
| | | return DeviceManagerDAL.DeleteDeviceCheckStaned(checkstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åå
³èå·¥ä½ç«æ¥è¯¢] |
| | | public static ToMessage DeviceCheckStanedAssociationEqp(string stu_torgcode, string description, string checkstand_code) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckStanedAssociationEqp(stu_torgcode, description, checkstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region [设å¤ç¹æ£æ åå
³èå·¥ä½ç«æäº¤] |
| | | public static ToMessage SaveDeviceCheckStanedAssociationEqp(string stu_torgcode, string stu_torgtypecode, string checkstand_code, string username, List<ObjectData> json) |
| | | { |
| | | return DeviceManagerDAL.SaveDeviceCheckStanedAssociationEqp(stu_torgcode, stu_torgtypecode, checkstand_code, username, json); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ä¿å
»æ åå表æ¥è¯¢] |
| | | public static ToMessage DeviceRepairStandArdSearch(string stu_torgcode, string stu_torgtypecode, string repairstandcode, string repairstandname, string repairstanddescr, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceRepairStandArdSearch(stu_torgcode, stu_torgtypecode, repairstandcode, repairstandname, repairstanddescr, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åæ°å¢ãç¼è¾è·åä¿å
»é¡¹ç®ä¸æå表] |
| | | public static ToMessage DeviceRepairItemSelect() |
| | | { |
| | | return DeviceManagerDAL.DeviceRepairItemSelect(); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åç¼è¾/æ¥çè·åæ°æ®] |
| | | public static ToMessage ViewDeviceRepairStanedSearch(string repairstand_code) |
| | | { |
| | | return DeviceManagerDAL.ViewDeviceRepairStanedSearch(repairstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åæ°å¢ç¼è¾] |
| | | public static ToMessage AddUpdateDeviceRepairStandArd(string opertype, EqpRepair json, string username) |
| | | { |
| | | return DeviceManagerDAL.AddUpdateDeviceRepairStandArd(opertype, json, username); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åå é¤] |
| | | public static ToMessage DeleteDeviceRepairStaned(string repairstand_code) |
| | | { |
| | | return DeviceManagerDAL.DeleteDeviceRepairStaned(repairstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åå
³èå·¥ä½ç«æ¥è¯¢] |
| | | public static ToMessage DeviceRepairStanedAssociationEqp(string stu_torgcode, string description, string repairstand_code) |
| | | { |
| | | return DeviceManagerDAL.DeviceRepairStanedAssociationEqp(stu_torgcode, description, repairstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region [设å¤ä¿å
»æ åå
³èå·¥ä½ç«æäº¤] |
| | | public static ToMessage SaveDeviceRepairStanedAssociationEqp(string stu_torgcode, string stu_torgtypecode, string repairstand_code, string username, List<ObjectData> json) |
| | | { |
| | | return DeviceManagerDAL.SaveDeviceRepairStanedAssociationEqp(stu_torgcode, stu_torgtypecode, repairstand_code, username, json); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ç¹æ£è®°å½æ¥è¯¢] |
| | | public static ToMessage DeviceCheckTakeSearch(string stu_torgcode, string description, string wkshopcode, string eqpcode, string eqpname, string stanedname, string checkuser, string checkopendate, string checkclosedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckTakeSearch(stu_torgcode, description, wkshopcode, eqpcode, eqpname, stanedname, checkuser, checkopendate, checkclosedate, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£è®°å½æç»æ¥è¯¢] |
| | | public static ToMessage DeviceCheckSubTakeSearch(string djwo) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckSubTakeSearch(djwo); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£è®°å½å¯¼åº] |
| | | public static ToMessage DeviceCheckTakeOutExcel(string stu_torgcode, string description, string wkshopcode, string eqpcode, string eqpname, string stanedname, string checkuser, string checkopendate, string checkclosedate) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckTakeOutExcel(stu_torgcode, description, wkshopcode, eqpcode, eqpname, stanedname, checkuser, checkopendate, checkclosedate); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ä¿å
»è®°å½æ¥è¯¢] |
| | | public static ToMessage DeviceRepairTakeSearch(string stu_torgcode, string description, string wkshopcode, string eqpcode, string eqpname, string stanedname, string repairuser, string repairopendate, string repairclosedate, string repairresult, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckTakeSearch(stu_torgcode, description, wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»è®°å½æç»æ¥è¯¢] |
| | | public static ToMessage DeviceRepairSubTakeSearch(string bywo) |
| | | { |
| | | return DeviceManagerDAL.DeviceRepairSubTakeSearch(bywo); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»è®°å½å¯¼åº] |
| | | public static ToMessage DeviceRepairTakeOutExcel(string stu_torgcode, string description, string wkshopcode, string eqpcode, string eqpname, string stanedname, string repairuser, string repairopendate, string repairclosedate, string repairresult) |
| | | { |
| | | return DeviceManagerDAL.DeviceRepairTakeOutExcel(stu_torgcode, description, wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ç»´ä¿®è®°å½æ¥è¯¢] |
| | | public static ToMessage DeviceUpdateSearch(string stu_torgcode, string description, string wkshopcode, string eqpcode, string eqpname, string reportuser, string repairuser, string vrifcatuser, string reportopendate, string reportclosedate, string repairopendate, string repairclosedate, string vrifcatopendate, string vrifcatclosedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceUpdateSearch(stu_torgcode, description, wkshopcode, eqpcode, eqpname, reportuser, repairuser, vrifcatuser, reportopendate, reportclosedate, repairopendate, repairclosedate, vrifcatopendate, vrifcatclosedate, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç»´ä¿®è®°å½æç»æ¥è¯¢] |
| | | public static ToMessage DeviceUpdateSubSearch(string repair_code) |
| | | { |
| | | return DeviceManagerDAL.DeviceUpdateSubSearch(repair_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç»´ä¿®è®°å½å¯¼åº] |
| | | public static ToMessage DeviceUpdateOutExcel(string stu_torgcode, string description, string wkshopcode, string eqpcode, string eqpname, string reportuser, string repairuser, string vrifcatuser, string reportopendate, string reportclosedate, string repairopendate, string repairclosedate, string vrifcatopendate, string vrifcatclosedate) |
| | | { |
| | | return DeviceManagerDAL.DeviceUpdateOutExcel(stu_torgcode, description, wkshopcode, eqpcode, eqpname, reportuser, repairuser, vrifcatuser, reportopendate, reportclosedate, repairopendate, repairclosedate, vrifcatopendate, vrifcatclosedate); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[#region[设å¤ä¿¡æ¯å é¤]] |
| | | #region[设å¤ä¿¡æ¯å é¤] |
| | | public static ToMessage DeleteDeviceManger(string devicecode,User us) |
| | | { |
| | | return DeviceManagerDAL.DeleteDeviceManger(devicecode,us); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[设å¤ç¹æ£é¡¹å表æ¥è¯¢] |
| | | public static ToMessage DeviceCheckItemSearch(string checkitemcode, string checkitemname, string checkdescr, string isqrcode, string cycle, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckItemSearch(checkitemcode, checkitemname, checkdescr, isqrcode, cycle, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£é¡¹æ°å¢ç¼è¾] |
| | | public static ToMessage AddUpdateDeviceCheckItem(string checkitemid, string checkitemcode, string checkitemname, string checkitemdescr, string cycle, string isqrcode, User us, string operType) |
| | | { |
| | | return DeviceManagerDAL.AddUpdateDeviceCheckItem(checkitemid, checkitemcode, checkitemname, checkitemdescr, cycle, isqrcode, us, operType); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£é¡¹å é¤] |
| | | public static ToMessage DeleteDeviceCheckItem(string checkitemcode) |
| | | { |
| | | return DeviceManagerDAL.DeleteDeviceCheckItem(checkitemcode); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[设å¤ä¿å
»é¡¹å表æ¥è¯¢] |
| | | public static ToMessage DeviceMaiItemSearch(string maiitemcode, string maiitemname, string maidescr, string isqrcode, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceMaiItemSearch(maiitemcode, maiitemname, maidescr, isqrcode, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»é¡¹æ°å¢ç¼è¾] |
| | | public static ToMessage AddUpdateDeviceMaiItem(string maiitemid, string maiitemcode, string maiitemname, string maiitemdescr, string isqrcode, User us, string operType) |
| | | { |
| | | return DeviceManagerDAL.AddUpdateDeviceMaiItem(maiitemid, maiitemcode, maiitemname, maiitemdescr, isqrcode, us, operType); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»é¡¹å é¤] |
| | | public static ToMessage DeleteDeviceMaiItem(string maiitemcode) |
| | | { |
| | | return DeviceManagerDAL.DeleteDeviceMaiItem(maiitemcode); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ç¹æ£æ åå表æ¥è¯¢] |
| | | public static ToMessage DeviceCheckStandArdSearch(User us, string checkstandcode, string checkstandname, string checkcontr, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckStandArdSearch(us, checkstandcode, checkstandname, checkcontr, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åæ°å¢ãç¼è¾è·åæ£éªé¡¹ç®ä¸æå表] |
| | | public static ToMessage DeviceCheckItemSelect() |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckItemSelect(); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åç¼è¾/æ¥çè·åæ°æ®] |
| | | public static ToMessage ViewDeviceCheckStanedSearch(string checkstand_code) |
| | | { |
| | | return DeviceManagerDAL.ViewDeviceCheckStanedSearch(checkstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åæ°å¢ç¼è¾] |
| | | public static ToMessage AddUpdateDeviceCheckStandArd(string opertype, RoutEdit json, User us) |
| | | { |
| | | return DeviceManagerDAL.AddUpdateDeviceCheckStandArd(opertype, json, us); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åå é¤] |
| | | public static ToMessage DeleteDeviceCheckStaned(string checkstand_code) |
| | | { |
| | | return DeviceManagerDAL.DeleteDeviceCheckStaned(checkstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£æ åå
³èå·¥ä½ç«æ¥è¯¢] |
| | | public static ToMessage DeviceCheckStanedAssociationEqp(User us, string checkstand_code) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckStanedAssociationEqp(us, checkstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region [设å¤ç¹æ£æ åå
³èå·¥ä½ç«æäº¤] |
| | | public static ToMessage SaveDeviceCheckStanedAssociationEqp(User us, string checkstand_code, List<ObjectData> json) |
| | | { |
| | | return DeviceManagerDAL.SaveDeviceCheckStanedAssociationEqp(us, checkstand_code, json); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ä¿å
»æ åå表æ¥è¯¢] |
| | | public static ToMessage DeviceRepairStandArdSearch(User us, string repairstandcode, string repairstandname, string repairstanddescr, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceRepairStandArdSearch(us, repairstandcode, repairstandname, repairstanddescr, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åæ°å¢ãç¼è¾è·åä¿å
»é¡¹ç®ä¸æå表] |
| | | public static ToMessage DeviceRepairItemSelect() |
| | | { |
| | | return DeviceManagerDAL.DeviceRepairItemSelect(); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åç¼è¾/æ¥çè·åæ°æ®] |
| | | public static ToMessage ViewDeviceRepairStanedSearch(string repairstand_code) |
| | | { |
| | | return DeviceManagerDAL.ViewDeviceRepairStanedSearch(repairstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åæ°å¢ç¼è¾] |
| | | public static ToMessage AddUpdateDeviceRepairStandArd(string opertype, EqpRepair json, User us) |
| | | { |
| | | return DeviceManagerDAL.AddUpdateDeviceRepairStandArd(opertype, json, us); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åå é¤] |
| | | public static ToMessage DeleteDeviceRepairStaned(string repairstand_code) |
| | | { |
| | | return DeviceManagerDAL.DeleteDeviceRepairStaned(repairstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»æ åå
³èå·¥ä½ç«æ¥è¯¢] |
| | | public static ToMessage DeviceRepairStanedAssociationEqp(User us, string repairstand_code) |
| | | { |
| | | return DeviceManagerDAL.DeviceRepairStanedAssociationEqp(us, repairstand_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region [设å¤ä¿å
»æ åå
³èå·¥ä½ç«æäº¤] |
| | | public static ToMessage SaveDeviceRepairStanedAssociationEqp(User us, string repairstand_code, List<ObjectData> json) |
| | | { |
| | | return DeviceManagerDAL.SaveDeviceRepairStanedAssociationEqp(us, repairstand_code, json); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ç¹æ£è®°å½æ¥è¯¢] |
| | | public static ToMessage DeviceCheckTakeSearch(User us, string wkshopcode, string eqpcode, string eqpname, string stanedname, string checkuser, string checkopendate, string checkclosedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckTakeSearch(us, wkshopcode, eqpcode, eqpname, stanedname, checkuser, checkopendate, checkclosedate, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£è®°å½æç»æ¥è¯¢] |
| | | public static ToMessage DeviceCheckSubTakeSearch(string djwo) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckSubTakeSearch(djwo); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç¹æ£è®°å½å¯¼åº] |
| | | public static ToMessage DeviceCheckTakeOutExcel(User us, string wkshopcode, string eqpcode, string eqpname, string stanedname, string checkuser, string checkopendate, string checkclosedate) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckTakeOutExcel(us, wkshopcode, eqpcode, eqpname, stanedname, checkuser, checkopendate, checkclosedate); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[设å¤ä¿å
»è®°å½æ¥è¯¢] |
| | | public static ToMessage DeviceRepairTakeSearch(User us, string wkshopcode, string eqpcode, string eqpname, string stanedname, string repairuser, string repairopendate, string repairclosedate, string repairresult, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceCheckTakeSearch(us, wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»è®°å½æç»æ¥è¯¢] |
| | | public static ToMessage DeviceRepairSubTakeSearch(string bywo) |
| | | { |
| | | return DeviceManagerDAL.DeviceRepairSubTakeSearch(bywo); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ä¿å
»è®°å½å¯¼åº] |
| | | public static ToMessage DeviceRepairTakeOutExcel(User us, string wkshopcode, string eqpcode, string eqpname, string stanedname, string repairuser, string repairopendate, string repairclosedate, string repairresult) |
| | | { |
| | | return DeviceManagerDAL.DeviceRepairTakeOutExcel(us, wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设å¤ç»´ä¿®è®°å½æ¥è¯¢] |
| | | public static ToMessage DeviceUpdateSearch(User us, string wkshopcode, string eqpcode, string eqpname, string reportuser, string repairuser, string vrifcatuser, string reportopendate, string reportclosedate, string repairopendate, string repairclosedate, string vrifcatopendate, string vrifcatclosedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return DeviceManagerDAL.DeviceUpdateSearch(us, wkshopcode, eqpcode, eqpname, reportuser, repairuser, vrifcatuser, reportopendate, reportclosedate, repairopendate, repairclosedate, vrifcatopendate, vrifcatclosedate, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç»´ä¿®è®°å½æç»æ¥è¯¢] |
| | | public static ToMessage DeviceUpdateSubSearch(string repair_code) |
| | | { |
| | | return DeviceManagerDAL.DeviceUpdateSubSearch(repair_code); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç»´ä¿®è®°å½å¯¼åº] |
| | | public static ToMessage DeviceUpdateOutExcel(User us, string wkshopcode, string eqpcode, string eqpname, string reportuser, string repairuser, string vrifcatuser, string reportopendate, string reportclosedate, string repairopendate, string repairclosedate, string vrifcatopendate, string vrifcatclosedate) |
| | | { |
| | | return DeviceManagerDAL.DeviceUpdateOutExcel(us, wkshopcode, eqpcode, eqpname, reportuser, repairuser, vrifcatuser, reportopendate, reportclosedate, repairopendate, repairclosedate, vrifcatopendate, vrifcatclosedate); |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | try |
| | | { |
| | | //è·åå½åç¨æ·æå±ç»ç»åææåèç¹ç»ç» |
| | | mes = TOrganizationRecursion.TOrgCodeSeach("SCB"); |
| | | mes = TOrganizationRecursion.TOrgCodeSeach(us.storg_code); |
| | | if (mes.code == "300") |
| | | { |
| | | return mes; |
| | |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[Appç产è¿åº¦çæ¿åæ®ä¿¡æ¯] |
| | | public static ToMessage ProductionScheduleKanban(User us, string ordertype, string partcode, string startopendate, string endclosedate) |
| | | { |
| | | Dictionary<object, object> dList = new Dictionary<object, object>(); |
| | | List<AppScheduleKanban> list = new List<AppScheduleKanban>(); |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = "", search1 = "", sql = "", torg_codelist = ""; |
| | | DataTable dt; |
| | | try |
| | | { |
| | | //è·åå½åç¨æ·æå±ç»ç»åææåèç¹ç»ç» |
| | | mes = TOrganizationRecursion.TOrgCodeSeachNo(us.storg_code); |
| | | if (mes.code == "300") |
| | | { |
| | | return mes; |
| | | } |
| | | else |
| | | { |
| | | torg_codelist = mes.data.ToString(); //è·åç»ç»éå |
| | | string[] torglist = Array.ConvertAll<string, string>(torg_codelist.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //stringåå²è½¬string[] |
| | | search1 += " and A.wkshp_code in @wkshp_code "; |
| | | dynamicParams.Add("@wkshp_code", torglist.ToArray()); |
| | | } |
| | | |
| | | //æ ¹æ®æ¥è¯¢æ¡ä»¶,æ¥æ¾ç¬¦åè¦æ±çåæ® |
| | | switch (ordertype) |
| | | { |
| | | case "SO": //æéå®è®¢åç»è®¡ |
| | | if (partcode != "" && partcode != null) |
| | | { |
| | | string[] selects = Array.ConvertAll<string, string>(partcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //stringåå²è½¬string[] |
| | | search += " and A.materiel_code in @partcode "; |
| | | dynamicParams.Add("@partcode", selects.ToArray()); |
| | | } |
| | | if (startopendate != "" && startopendate != null) |
| | | { |
| | | search += " and convert(varchar(100),A.saleOrderDate,21)>=@startopendate and convert(varchar(100),A.saleOrderDate,21)<=@endclosedate "; |
| | | dynamicParams.Add("@startopendate", startopendate + " 00:00:00"); |
| | | dynamicParams.Add("@endclosedate", endclosedate + " 23:59:59"); |
| | | } |
| | | //è·ååæ®ä¿¡æ¯ |
| | | sql = @"select distinct saleOrderCode,A.saleOrderDate,sum(A.saleOrderqty) as saleOrderqty |
| | | from TKimp_Ewo A |
| | | where A.saleOrderCode<>'' " + search + " group by A.saleOrderCode,A.saleOrderDate order by A.saleOrderDate desc"; |
| | | dt = DapperHelper.selectlist(sql, dynamicParams); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | AppScheduleKanban cmp = new AppScheduleKanban(); |
| | | cmp.ordercode = dt.Rows[i]["saleOrderCode"].ToString(); |
| | | cmp.orderqty = dt.Rows[i]["saleOrderqty"].ToString(); |
| | | cmp.children = new List<AppScheduleKanbanSub>(); |
| | | //è·ååæ®ä¸äº§åå®æä¿¡æ¯ |
| | | sql = @"select AA.wo,AA.partcode,AA.partname,AA.partspec,AA.saleOrderqty,isnull(BB.good_qty,0) as good_qty from( |
| | | select distinct E.wo,T.partcode,T.partname,T.partspec,sum(E.saleOrderqty) as saleOrderqty |
| | | from TKimp_Ewo E |
| | | left join TMateriel_Info T on E.materiel_code=T.partcode |
| | | where E.saleOrderCode=@saleOrderCode |
| | | group by E.wo,T.partcode,T.partname,T.partspec |
| | | ) as AA |
| | | left join |
| | | ( |
| | | select M.m_po,sum(S.good_qty) as good_qty from TK_Wrk_Man M |
| | | inner join TK_Wrk_Step S on M.wo_code=S.wo_code |
| | | where S.isend='Y' and S.good_qty>0 |
| | | group by M.m_po |
| | | ) as BB on AA.wo=BB.m_po"; |
| | | dynamicParams.Add("@saleOrderCode", dt.Rows[i]["saleOrderCode"].ToString()); |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | | decimal good_qty = data.AsEnumerable().Select(d => d.Field<decimal>("good_qty")).Sum(); //æ¥å·¥æ»æ°é |
| | | cmp.ordergoodqty = good_qty.ToString(); |
| | | for (int j = 0; j < data.Rows.Count; j++) |
| | | { |
| | | AppScheduleKanbanSub cbp = new AppScheduleKanbanSub(); |
| | | cbp.code = data.Rows[j]["partcode"].ToString(); |
| | | cbp.name = data.Rows[j]["partname"].ToString(); |
| | | cbp.spec = data.Rows[j]["partspec"].ToString(); |
| | | cbp.planqty = data.Rows[j]["saleOrderqty"].ToString(); |
| | | cbp.goodqty = data.Rows[j]["good_qty"].ToString(); |
| | | cmp.children.Add(cbp); |
| | | } |
| | | list.Add(cmp); |
| | | } |
| | | mes.code = "200"; |
| | | mes.message = "success!"; |
| | | mes.data = list; |
| | | return mes; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "æ 符åè¦æ±åæ®ï¼"; |
| | | mes.data = null; |
| | | } |
| | | break; |
| | | case "MO": //æç产订åç»è®¡ |
| | | if (partcode != "" && partcode != null) |
| | | { |
| | | string[] selects = Array.ConvertAll<string, string>(partcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //stringåå²è½¬string[] |
| | | search += " and A.materiel_code in @partcode "; |
| | | dynamicParams.Add("@partcode", selects.ToArray()); |
| | | } |
| | | if (startopendate != "" && startopendate != null) |
| | | { |
| | | search += " and convert(varchar(100),A.createdate,21)>=@startopendate and convert(varchar(100),A.createdate,21)<=@endclosedate "; |
| | | dynamicParams.Add("@startopendate", startopendate + " 00:00:00"); |
| | | dynamicParams.Add("@endclosedate", endclosedate + " 23:59:59"); |
| | | } |
| | | //è·ååæ®ä¿¡æ¯ |
| | | sql = @"select distinct A.wo,A.createdate,sum(A.qty) as orderqty |
| | | from TKimp_Ewo A |
| | | where 1=1 " + search + " group by A.wo,A.createdate order by A.createdate desc"; |
| | | dt = DapperHelper.selectlist(sql, dynamicParams); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | AppScheduleKanban cmp = new AppScheduleKanban(); |
| | | cmp.ordercode = dt.Rows[i]["wo"].ToString(); |
| | | cmp.orderqty = dt.Rows[i]["orderqty"].ToString(); |
| | | cmp.children = new List<AppScheduleKanbanSub>(); |
| | | //è·ååæ®ä¸äº§åå®æä¿¡æ¯ |
| | | sql = @"select distinct E.wo,T.partcode,T.partname,T.partspec,sum(E.qty) as orderqty,isnull(BB.good_qty,0) as good_qty |
| | | from TKimp_Ewo E |
| | | left join TMateriel_Info T on E.materiel_code=T.partcode |
| | | left join ( |
| | | select M.m_po,sum(S.good_qty) as good_qty from TK_Wrk_Man M |
| | | inner join TK_Wrk_Step S on M.wo_code=S.wo_code |
| | | where S.isend='Y' and S.good_qty>0 |
| | | group by M.m_po |
| | | ) as BB on E.wo=BB.m_po |
| | | where E.wo=@wo |
| | | group by E.wo,T.partcode,T.partname,T.partspec,BB.good_qty"; |
| | | dynamicParams.Add("@wo", dt.Rows[i]["wo"].ToString()); |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | | decimal good_qty = data.AsEnumerable().Select(d => d.Field<decimal>("good_qty")).Sum(); //æ¥å·¥æ»æ°é |
| | | cmp.ordergoodqty = good_qty.ToString(); |
| | | for (int j = 0; j < data.Rows.Count; j++) |
| | | { |
| | | AppScheduleKanbanSub cbp = new AppScheduleKanbanSub(); |
| | | cbp.code = data.Rows[j]["partcode"].ToString(); |
| | | cbp.name = data.Rows[j]["partname"].ToString(); |
| | | cbp.spec = data.Rows[j]["partspec"].ToString(); |
| | | cbp.planqty = data.Rows[j]["orderqty"].ToString(); |
| | | cbp.goodqty = data.Rows[j]["good_qty"].ToString(); |
| | | cmp.children.Add(cbp); |
| | | } |
| | | list.Add(cmp); |
| | | } |
| | | mes.code = "200"; |
| | | mes.message = "success!"; |
| | | mes.data = list; |
| | | return mes; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "æ 符åè¦æ±åæ®ï¼"; |
| | | mes.data = null; |
| | | } |
| | | break; |
| | | case "PO": //æç产工åç»è®¡ |
| | | if (partcode != "" && partcode != null) |
| | | { |
| | | string[] selects = Array.ConvertAll<string, string>(partcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //stringåå²è½¬string[] |
| | | search += " and A.materiel_code in @partcode "; |
| | | dynamicParams.Add("@partcode", selects.ToArray()); |
| | | } |
| | | if (startopendate != "" && startopendate != null) |
| | | { |
| | | search += " and convert(varchar(100),A.lm_date,21)>=@startopendate and convert(varchar(100),A.lm_date,21)<=@endclosedate "; |
| | | dynamicParams.Add("@startopendate", startopendate + " 00:00:00"); |
| | | dynamicParams.Add("@endclosedate", endclosedate + " 23:59:59"); |
| | | } |
| | | //è·ååæ®ä¿¡æ¯ |
| | | sql = @"select distinct A.wo_code,T.partcode,T.partname,T.partspec,A.lm_date,sum(A.plan_qty) as orderqty |
| | | from TK_Wrk_Man A |
| | | left join TMateriel_Info T on A.materiel_code=T.partcode |
| | | where 1=1 " + search + search1 + " group by A.wo_code,T.partcode,T.partname,T.partspec,A.lm_date order by A.lm_date desc"; |
| | | dt = DapperHelper.selectlist(sql, dynamicParams); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | AppScheduleKanban cmp = new AppScheduleKanban(); |
| | | cmp.ordercode = dt.Rows[i]["wo_code"].ToString(); |
| | | cmp.partcode = dt.Rows[i]["partcode"].ToString(); |
| | | cmp.partname = dt.Rows[i]["partname"].ToString(); |
| | | cmp.partspec = dt.Rows[i]["partspec"].ToString(); |
| | | cmp.orderqty = dt.Rows[i]["orderqty"].ToString(); |
| | | cmp.children = new List<AppScheduleKanbanSub>(); |
| | | //è·ååæ®ä¸äº§åå®æä¿¡æ¯ |
| | | sql = @"select M.wo_code,T.stepcode,T.stepname,S.plan_qty,S.good_qty,S.isend |
| | | from TK_Wrk_Man M |
| | | inner join TK_Wrk_Step S on M.wo_code=S.wo_code |
| | | left join TStep T on S.step_code=T.stepcode |
| | | where M.wo_code=@wo_code |
| | | order by S.seq "; |
| | | dynamicParams.Add("@wo_code", dt.Rows[i]["wo_code"].ToString()); |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | | if (data.Rows.Count > 0) |
| | | { |
| | | cmp.ordergoodqty = data.AsEnumerable().Where(t => t.Field<string>("isend") == "Y").ToList().Select(c => c.Field<decimal>("good_qty")).First().ToString(); |
| | | for (int j = 0; j < data.Rows.Count; j++) |
| | | { |
| | | AppScheduleKanbanSub cbp = new AppScheduleKanbanSub(); |
| | | cbp.code = data.Rows[j]["stepcode"].ToString(); |
| | | cbp.name = data.Rows[j]["stepname"].ToString(); |
| | | cbp.spec = data.Rows[j]["isend"].ToString(); |
| | | cbp.planqty = data.Rows[j]["plan_qty"].ToString(); |
| | | cbp.goodqty = data.Rows[j]["good_qty"].ToString(); |
| | | cmp.children.Add(cbp); |
| | | } |
| | | list.Add(cmp); |
| | | } |
| | | else |
| | | { |
| | | cmp.ordergoodqty = "0"; |
| | | list.Add(cmp); |
| | | } |
| | | } |
| | | mes.code = "200"; |
| | | mes.message = "success!"; |
| | | mes.data = list; |
| | | return mes; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "æ 符åè¦æ±åæ®ï¼"; |
| | | mes.data = null; |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | ordercode = arra[0]; //è·åæå®å符串åé¢çå符 |
| | | stepcode = arra[1]; //è·åæå®å符串åé¢çå符 |
| | | } |
| | | //0.夿å½åæ¡ç å·¥åºä»»å¡ä¸åå¨ |
| | | sql = @"select * from TK_Wrk_Step where wo_code=@ordercode and step_code=@step_code"; |
| | | dynamicParams.Add("@ordercode", ordercode); |
| | | dynamicParams.Add("@step_code", stepcode); |
| | | var da1 = DapperHelper.selectdata(sql, dynamicParams); |
| | | if (da1.Rows.Count <= 0) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "å½åæ¡ç ,å·¥åºä»»å¡ä¸åå¨,请è系管çå!"; |
| | | mes.data = null; |
| | | return mes; |
| | | } |
| | | //夿å½å工忝å¦å
³é |
| | | sql = @"select * from TK_Wrk_Man where wo_code=@ordercode and status='CLOSED'"; |
| | | dynamicParams.Add("@ordercode", ordercode); |
| | | var da0 = DapperHelper.selectdata(sql, dynamicParams); |
| | | if (da0.Rows.Count > 0) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "å½åå·¥åå·²å
³é,ä¸å
许æ£éªæä½!"; |
| | | mes.data = null; |
| | | return mes; |
| | | } |
| | | //éè¿æ«æäºç»´ç ä¿¡æ¯æ¥æ¾ä»»å¡ä¿¡æ¯ |
| | | sql = @"select A.wo_code,A.good_qty,M.partcode,M.partname,M.partspec,M.idinventoryclass as stocktype_code,S.stepcode,S.stepname |
| | | from TK_Wrk_Step A |
| | |
| | | { |
| | | public static ToMessage mes = new ToMessage(); //å®ä¹å
¨å±è¿åä¿¡æ¯å¯¹è±¡ |
| | | |
| | | #region [æ ¹æ®å½åç»ç»ç¼ç è·åææåèç¹ç»ç»(å
å«èªèº«)] |
| | | #region [æ ¹æ®å½åç»ç»ç¼ç è·åææåèç¹ç»ç»(å
å«èªèº«,带åå¼å·)] |
| | | /// <summary> |
| | | /// æ ¹æ®å½åç»ç»ç¼ç è·åææåèç¹ç»ç»(å
å«èªèº«) |
| | | /// æ ¹æ®å½åç»ç»ç¼ç è·åææåèç¹ç»ç»(å
å«èªèº«,带åå¼å·) |
| | | /// </summary> |
| | | /// <param name="torg_code">ç»ç»ç¼ç </param> |
| | | /// <returns></returns> |
| | |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region [æ ¹æ®å½åç»ç»ç¼ç è·åææåèç¹ç»ç»(å
å«èªèº«,ä¸å¸¦åå¼å·)] |
| | | /// <summary> |
| | | /// æ ¹æ®å½åç»ç»ç¼ç è·åææåèç¹ç»ç»(å
å«èªèº«,ä¸å¸¦åå¼å·) |
| | | /// </summary> |
| | | /// <param name="torg_code">ç»ç»ç¼ç </param> |
| | | /// <returns></returns> |
| | | public static ToMessage TOrgCodeSeachNo(string torg_code) |
| | | { |
| | | string sql; |
| | | var dynamicParams = new DynamicParameters(); |
| | | try |
| | | { |
| | | sql = @" WITH RecursiveCTE AS ( |
| | | SELECT id, parent_id, torg_code, torg_name, status, leve, torg_seq |
| | | FROM TOrganization |
| | | WHERE torg_code = @torg_code |
| | | UNION ALL |
| | | SELECT o.id, o.parent_id, o.torg_code, o.torg_name, o.status, o.leve, o.torg_seq |
| | | FROM TOrganization o |
| | | INNER JOIN RecursiveCTE r ON r.torg_code = o.parent_id |
| | | ) |
| | | SELECT STUFF((SELECT ',' + torg_code FROM RecursiveCTE |
| | | FOR XML PATH('')), 1, 1, '') AS torg_codelist"; |
| | | dynamicParams.Add("@torg_code", torg_code); |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | | if (data.Rows.Count > 0 && data.Rows[0]["torg_codelist"].ToString() != null) |
| | | { |
| | | mes.code = "200"; |
| | | mes.count = 0; |
| | | mes.message = "æ¥è¯¢æå!"; |
| | | mes.data = data.Rows[0]["torg_codelist"].ToString(); |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "å½åç¨æ·æå±ç»ç»ç¼ç ã" + torg_code + "ãä¸åå¨!"; |
| | | mes.data = null; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | } |
| | | } |