| | |
| | | åæ®æå° = 15, |
| | | [Description("çæ¿ç®¡ç")] |
| | | çæ¿ç®¡ç = 16, |
| | | [Description("计æ¶å·¥èµ")] |
| | | 计æ¶å·¥èµ = 17, |
| | | [Description("App个人ä¸å¿")] |
| | | App个人ä¸å¿ = 20, |
| | | [Description("Appæºè½åæ")] |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[æå±ç»ç»æ¥æ¾äººååºç¡èµæ] |
| | | /// <summary> |
| | | /// æå±ç»ç»æ¥æ¾äººååºç¡èµæ |
| | | /// </summary> |
| | | /// <param name="torgcode">ç»ç»(车é´)ç¼ç </param> |
| | | /// <returns></returns> |
| | | [Route(template: "TorgPersonPermissions")] |
| | | [HttpGet] |
| | | public JsonResult TorgPersonPermissions(string torgcode) |
| | | { |
| | | mes = GeneralBasicDataBLL.TorgPersonPermissions(torgcode); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[æé®åºç¡èµæ] |
| | | /// <summary> |
| | | /// æé®åºç¡èµæ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | using VueWebCoreApi.DLL.BLL; |
| | | using VueWebCoreApi.Models; |
| | | using VueWebCoreApi.Models.AttendanceSetting; |
| | | using VueWebCoreApi.Tools; |
| | | |
| | | namespace VueWebCoreApi.Controllers |
| | | { |
| | | [ApiExplorerSettings(GroupName = "计æ¶å·¥èµ")] |
| | | [ApiController] |
| | | [Route("api/[controller]")] |
| | | |
| | | public class HourlyWageController : Controller |
| | | { |
| | | //å®ä¹å
¨å±ä¿¡æ¯è¿ååé |
| | | ToMessage mes = new ToMessage(); |
| | | RedisCommon redis = new RedisCommon(); |
| | | |
| | | #region[èå¤è®¾ç½®æ¥è¯¢] |
| | | /// <summary> |
| | | /// èå¤è®¾ç½®æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="wkshop_code">车é´ç¼ç </param> |
| | | /// <param name="creatuser">å建人å</param> |
| | | /// <param name="creatdate">å建æ¶é´</param> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AttendanceSettSearch")] |
| | | [HttpGet] |
| | | [ChannelActionFilter] |
| | | public JsonResult AttendanceSettSearch(string wkshop_code = null,string creatuser = null, string creatdate = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string paydatestartdate = ""; //å建å¼å§æ¶é´ |
| | | string paydateenddate = ""; //åå»ºç»ææ¶é´ |
| | | if (creatdate != "" && creatdate != null) |
| | | { |
| | | paydatestartdate = creatdate.Split('~')[0].ToString(); |
| | | paydateenddate = creatdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = HourlyWageBLL.AttendanceSettSearch(wkshop_code, creatuser, paydatestartdate, paydateenddate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®¾ç½®æ°å¢/ç¼è¾] |
| | | /// <summary> |
| | | /// èå¤è®¾ç½®æ°å¢/ç¼è¾ |
| | | /// </summary> |
| | | /// <param name="OperType">æä½ç±»å(Add/Update)</param> |
| | | /// <param name="attendancesett">æäº¤æ°æ®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AttendanceSettAddUpdate")] |
| | | [HttpPost] |
| | | [ChannelActionFilter] |
| | | public JsonResult AttendanceSettAddUpdate(AttendanceSett attendancesett, string OperType) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = HourlyWageBLL.AttendanceSettAddUpdate(attendancesett, OperType, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®¾ç½®å é¤] |
| | | /// <summary> |
| | | /// èå¤è®¾ç½®å é¤ |
| | | /// </summary> |
| | | /// <param name="attendancesett">æäº¤è®¾ç½®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AttendanceSettDelete")] |
| | | [HttpPost] |
| | | [ChannelActionFilter] |
| | | public JsonResult AttendanceSettDelete(AttendanceSett attendancesett) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = HourlyWageBLL.AttendanceSettDelete(attendancesett, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[è夿å¡ä¿¡æ¯æ¥è¯¢] |
| | | /// <summary> |
| | | /// è夿å¡ä¿¡æ¯æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="usercode">ç¨æ·ç¼ç </param> |
| | | /// <returns></returns> |
| | | [Route(template: "AttendanceSearch")] |
| | | [HttpGet] |
| | | public JsonResult AttendanceSearch(string usercode = null) |
| | | { |
| | | mes = HourlyWageBLL.AttendanceSearch(usercode); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[è夿å¡ä¿¡æ¯æäº¤] |
| | | /// <summary> |
| | | /// è夿å¡ä¿¡æ¯æäº¤ |
| | | /// </summary> |
| | | /// <param name="attendance">æäº¤æ°æ®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AttendanceSave")] |
| | | [HttpPost] |
| | | public JsonResult AttendanceSave(Attendance attendance) |
| | | { |
| | | mes = HourlyWageBLL.AttendanceSave(attendance); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[èå¤è®°å½æ¥è¯¢] |
| | | /// <summary> |
| | | /// èå¤è®°å½æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="wkshop_code">车é´ç¼ç </param> |
| | | /// <param name="creatusercode">æå¡äººåç¼ç </param> |
| | | /// <param name="creatdate">æå¡æ¥æ</param> |
| | | /// <param name="status">æ ¸ç®ç¶æ(å·²æ ¸ç®/æªæ ¸ç®)</param> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AttendanceRecordSearch")] |
| | | [HttpGet] |
| | | [ChannelActionFilter] |
| | | public JsonResult AttendanceRecordSearch(string wkshop_code = null, string creatusercode = null, string creatdate = null,string status=null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string paydatestartdate = ""; //æå¡å¼å§æ¶é´ |
| | | string paydateenddate = ""; //æå¡ç»ææ¶é´ |
| | | if (creatdate != "" && creatdate != null) |
| | | { |
| | | paydatestartdate = creatdate.Split('~')[0].ToString(); |
| | | paydateenddate = creatdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = HourlyWageBLL.AttendanceRecordSearch(wkshop_code, creatusercode, paydatestartdate, paydateenddate,status, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®°å½æ°å¢ç¼è¾] |
| | | /// <summary> |
| | | /// èå¤è®°å½æ°å¢ç¼è¾ |
| | | /// </summary> |
| | | /// <param name="OperType">æä½ç±»å</param> |
| | | /// <param name="attendanceRecord">æäº¤æ°æ®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AttendanceRecordAddUpdate")] |
| | | [HttpPost] |
| | | [ChannelActionFilter] |
| | | public JsonResult AttendanceRecordAddUpdate(AttendanceRecord attendanceRecord, string OperType) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = HourlyWageBLL.AttendanceRecordAddUpdate(attendanceRecord, OperType, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®°å½å é¤] |
| | | /// <summary> |
| | | /// èå¤è®°å½å é¤ |
| | | /// </summary> |
| | | /// <param name="attendanceRecord">æäº¤æ°æ®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AttendanceRecordDelete")] |
| | | [HttpPost] |
| | | [ChannelActionFilter] |
| | | public JsonResult AttendanceRecordDelete(AttendanceRecord attendanceRecord) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = HourlyWageBLL.AttendanceRecordDelete(attendanceRecord, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®°å½æ ¸ç®æäº¤] |
| | | /// <summary> |
| | | /// èå¤è®°å½æ ¸ç®æäº¤ |
| | | /// </summary> |
| | | /// <param name="attendanceSave">æäº¤æ°æ®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AttendanceRecordSave")] |
| | | [HttpPost] |
| | | [ChannelActionFilter] |
| | | public JsonResult AttendanceRecordSave(AttendanceSave attendanceSave) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = HourlyWageBLL.AttendanceRecordSave(attendanceSave,us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[æ¥è®¡æ¶å·¥èµæ¥è¡¨æ¥è¯¢] |
| | | /// <summary> |
| | | /// æ¥è®¡æ¶å·¥èµæ¥è¡¨æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="wkshop_code">车é´ç¼ç </param> |
| | | /// <param name="creatusercode">æå¡äººåç¼ç </param> |
| | | /// <param name="creatdate">æå¡æ¥æ</param> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DailyWageReportSearch")] |
| | | [HttpGet] |
| | | [ChannelActionFilter] |
| | | public JsonResult DailyWageReportSearch(string wkshop_code = null, string creatusercode = null, string creatdate = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string paydatestartdate = ""; //å建å¼å§æ¶é´ |
| | | string paydateenddate = ""; //åå»ºç»ææ¶é´ |
| | | if (creatdate != "" && creatdate != null) |
| | | { |
| | | paydatestartdate = creatdate.Split('~')[0].ToString(); |
| | | paydateenddate = creatdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = HourlyWageBLL.DailyWageReportSearch(wkshop_code, creatusercode, paydatestartdate, paydateenddate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[æ¥è®¡æ¶å·¥èµä¿®æ¹æ£é¤æ¶é¿ãæ£é¤èªèµ] |
| | | /// <summary> |
| | | /// æ¥è®¡æ¶å·¥èµä¿®æ¹æ£é¤æ¶é¿ãæ£é¤èªèµ |
| | | /// </summary> |
| | | /// <param name="dailyWageReport">æäº¤æ°æ®</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DailyWageReportUpdate")] |
| | | [HttpPost] |
| | | [ChannelActionFilter] |
| | | public JsonResult DailyWageReportUpdate(DailyWageReport dailyWageReport) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = HourlyWageBLL.DailyWageReportUpdate(dailyWageReport, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[æ¥è®¡æ¶å·¥èµæ¥è¡¨å¯¼åº] |
| | | /// <summary> |
| | | /// æ¥è®¡æ¶å·¥èµæ¥è¡¨å¯¼åº |
| | | /// </summary> |
| | | /// <param name="wkshop_code">车é´ç¼ç </param> |
| | | /// <param name="creatusercode">æå¡äººåç¼ç </param> |
| | | /// <param name="creatdate">æå¡æ¥æ</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DailyWageReportExcelSearch")] |
| | | [HttpGet] |
| | | [ChannelActionFilter] |
| | | public JsonResult DailyWageReportExcelSearch(string wkshop_code = null, string creatusercode = null, string creatdate = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string paydatestartdate = ""; //å建å¼å§æ¶é´ |
| | | string paydateenddate = ""; //åå»ºç»ææ¶é´ |
| | | if (creatdate != "" && creatdate != null) |
| | | { |
| | | paydatestartdate = creatdate.Split('~')[0].ToString(); |
| | | paydateenddate = creatdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = HourlyWageBLL.DailyWageReportExcelSearch(wkshop_code, creatusercode, paydatestartdate, paydateenddate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[æè®¡æ¶å·¥èµæ¥è¡¨æ¥è¯¢] |
| | | /// <summary> |
| | | /// æè®¡æ¶å·¥èµæ¥è¡¨æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="wkshop_code">车é´ç¼ç </param> |
| | | /// <param name="creatdate">æ¥è¯¢æä»½</param> |
| | | /// <param name="page">页ç </param> |
| | | /// <param name="rows">æ¯é¡µæ¾ç¤ºæ¡æ°</param> |
| | | /// <param name="prop">æåºå段</param> |
| | | /// <param name="order">æåºè§å</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MonthlyWageReportSearch")] |
| | | [HttpPost] |
| | | [ChannelActionFilter] |
| | | public JsonResult MonthlyWageReportSearch(string wkshop_code = null, string creatdate = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string paydatestartdate = ""; //å建å¼å§æ¶é´ |
| | | string paydateenddate = ""; //åå»ºç»ææ¶é´ |
| | | if (creatdate != "" && creatdate != null) |
| | | { |
| | | paydatestartdate = creatdate.Split('~')[0].ToString(); |
| | | paydateenddate = creatdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = HourlyWageBLL.MonthlyWageReportSearch(wkshop_code, paydatestartdate, paydateenddate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[æè®¡æ¶å·¥èµæ¥è¡¨å¯¼åº] |
| | | /// <summary> |
| | | /// æè®¡æ¶å·¥èµæ¥è¡¨å¯¼åº |
| | | /// </summary> |
| | | /// <param name="wkshop_code">车é´ç¼ç </param> |
| | | /// <param name="creatdate">æå¡æ¥æ</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MonthlyWageReportExcelSearch")] |
| | | [HttpGet] |
| | | [ChannelActionFilter] |
| | | public JsonResult MonthlyWageReportExcelSearch(string wkshop_code = null,string creatdate = null) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | string paydatestartdate = ""; //å建å¼å§æ¶é´ |
| | | string paydateenddate = ""; //åå»ºç»ææ¶é´ |
| | | if (creatdate != "" && creatdate != null) |
| | | { |
| | | paydatestartdate = creatdate.Split('~')[0].ToString(); |
| | | paydateenddate = creatdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = HourlyWageBLL.MonthlyWageReportExcelSearch(wkshop_code, paydatestartdate, paydateenddate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="status">å·¥åç¶æ</param> |
| | | /// <param name="wkshopcode">车é´ç¼å·</param > |
| | | /// <param name="socode">éå®åå·</param> |
| | | /// <param name="wocode">å·¥åç¼å·</param> |
| | | /// <param name="partcode">产åç¼ç </param> |
| | | /// <param name="partname">产ååç§°</param> |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "ProductionScheduleReportSearch")] |
| | | [HttpGet] |
| | | public JsonResult ProductionScheduleReportSearch(int page, int rows, string prop, string order, string status = null, string wocode = null,string wkshopcode=null, string partcode = null, string partname = null, string partspec = null, string lm_date = null) |
| | | public JsonResult ProductionScheduleReportSearch(int page, int rows, string prop, string order, string status = null,string socode=null, string wocode = null,string wkshopcode=null, string partcode = null, string partname = null, string partspec = null, string lm_date = null) |
| | | { |
| | | string opendate = ""; //å¼å§æ¶é´ |
| | | string closedate = ""; //ç»ææ¶é´ |
| | |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = ReportManagerBLL.ProductionScheduleReportSearch(status, wkshopcode, wocode,partcode, partname, partspec, opendate, closedate, startNum, endNum, prop, order); |
| | | mes = ReportManagerBLL.ProductionScheduleReportSearch(status, wkshopcode, socode, wocode,partcode, partname, partspec, opendate, closedate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// </summary> |
| | | /// <param name="status">å·¥åç¶æ</param> |
| | | /// <param name="wkshopcode">车é´ç¼å·</param > |
| | | /// <param name="socode">éå®åå·</param> |
| | | /// <param name="wocode">å·¥åç¼å·</param> |
| | | /// <param name="partcode">产åç¼ç </param> |
| | | /// <param name="partname">产ååç§°</param> |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "ProductionScheduleReportExcelSearch")] |
| | | [HttpGet] |
| | | public JsonResult ProductionScheduleReportExcelSearch(string status = null, string wkshopcode = null, string wocode = null,string partcode = null, string partname = null, string partspec = null, string lm_date = null) |
| | | public JsonResult ProductionScheduleReportExcelSearch(string status = null, string wkshopcode = null, string socode = null, string wocode = null,string partcode = null, string partname = null, string partspec = null, string lm_date = null) |
| | | { |
| | | string opendate = ""; //å¼å§æ¶é´ |
| | | string closedate = ""; //ç»ææ¶é´ |
| | |
| | | opendate = lm_date.Split('~')[0].ToString(); |
| | | closedate = lm_date.Split('~')[1].ToString(); |
| | | } |
| | | mes = ReportManagerBLL.ProductionScheduleReportExcelSearch(status, wkshopcode,wocode, partcode, partname, partspec, opendate, closedate); |
| | | mes = ReportManagerBLL.ProductionScheduleReportExcelSearch(status, wkshopcode, socode,wocode, partcode, partname, partspec, opendate, closedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// </summary> |
| | | /// <param name="compute">è®¡ç®æ¹å¼(éé/æ«é)</param> |
| | | /// <param name="wkshopcode">车é´ç¼å·</param > |
| | | /// <param name="socode">éå®åå·</param> |
| | | /// <param name="wocode">å·¥åç¼å·</param> |
| | | /// <param name="partcode">产åç¼ç </param> |
| | | /// <param name="partname">产ååç§°</param> |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "GroupSalaryReportSearch")] |
| | | [HttpGet] |
| | | public JsonResult GroupSalaryReportSearch(int page, int rows, string prop, string order, string compute,string wkshopcode=null, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string username = null, string operdate = null) |
| | | public JsonResult GroupSalaryReportSearch(int page, int rows, string prop, string order, string compute,string wkshopcode=null,string socode=null, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string username = null, string operdate = null) |
| | | { |
| | | string operopendate = ""; //æ¥å·¥å¼å§æ¶é´ |
| | | string operclosedate = ""; //æ¥å·¥ç»ææ¶é´ |
| | |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = ReportManagerBLL.GroupSalaryReportSearch(compute, wkshopcode, wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate, startNum, endNum, prop, order); |
| | | mes = ReportManagerBLL.GroupSalaryReportSearch(compute, wkshopcode, socode, wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// çç»å·¥èµæ¥è¡¨è®°å½æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="compute">è®¡ç®æ¹å¼(éé/æ«é)</param> |
| | | /// <param name="socode">éå®åå·</param> |
| | | /// <param name="wkshopcode">车é´ç¼å·</param > |
| | | /// <param name="wocode">å·¥åç¼å·</param> |
| | | /// <param name="partcode">产åç¼ç </param> |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "GroupSalaryReportExcelSearch")] |
| | | [HttpGet] |
| | | public JsonResult GroupSalaryReportExcelSearch(string compute,string wkshopcode=null, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string username = null, string operdate = null) |
| | | public JsonResult GroupSalaryReportExcelSearch(string compute,string wkshopcode=null, string socode = null, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string username = null, string operdate = null) |
| | | { |
| | | string operopendate = ""; //æ¥å·¥å¼å§æ¶é´ |
| | | string operclosedate = ""; //æ¥å·¥ç»ææ¶é´ |
| | |
| | | operopendate = operdate.Split('~')[0].ToString(); |
| | | operclosedate = operdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = ReportManagerBLL.GroupSalaryReportExcelSearch(compute,wkshopcode, wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate); |
| | | mes = ReportManagerBLL.GroupSalaryReportExcelSearch(compute,wkshopcode, socode, wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// </summary> |
| | | /// <param name="compute">è®¡ç®æ¹å¼(éé/æ«é)</param> |
| | | /// <param name="wkshopcode">车é´ç¼å·</param > |
| | | /// <param name="socode">éå®åå·</param> |
| | | /// <param name="wocode">å·¥åç¼å·</param> |
| | | /// <param name="partcode">产åç¼ç </param> |
| | | /// <param name="partname">产ååç§°</param> |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "PeopleSalaryReportSearch")] |
| | | [HttpGet] |
| | | public JsonResult PeopleSalaryReportSearch(int page, int rows, string prop, string order, string compute,string wkshopcode=null, string wocode = null, string partcode = null, string partname = null, string partspec = null,string stepcode=null, string stepname = null, string reportname = null, string reportdate = null) |
| | | public JsonResult PeopleSalaryReportSearch(int page, int rows, string prop, string order, string compute,string wkshopcode=null,string socode=null, string wocode = null, string partcode = null, string partname = null, string partspec = null,string stepcode=null, string stepname = null, string reportname = null, string reportdate = null) |
| | | { |
| | | string reportopendate = ""; //æ¥å·¥å¼å§æ¶é´ |
| | | string reportclosedate = ""; //æ¥å·¥ç»ææ¶é´ |
| | |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //èµ·å§è®°å½rowNum |
| | | int endNum = rows * page; //ç»æè®°å½ rowNum |
| | | mes = ReportManagerBLL.PeopleSalaryReportSearch(compute, wkshopcode, wocode, partcode, partname, partspec, stepcode, stepname, reportname, reportopendate, reportclosedate, startNum, endNum, prop, order); |
| | | mes = ReportManagerBLL.PeopleSalaryReportSearch(compute, wkshopcode, socode, wocode, partcode, partname, partspec, stepcode, stepname, reportname, reportopendate, reportclosedate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// </summary> |
| | | /// <param name="compute">è®¡ç®æ¹å¼(éé/æ«é)</param> |
| | | /// <param name="wkshopcode">车é´ç¼å·</param > |
| | | /// <param name="socode">éå®åå·</param> |
| | | /// <param name="wocode">å·¥åç¼å·</param> |
| | | /// <param name="partcode">产åç¼ç </param> |
| | | /// <param name="partname">产ååç§°</param> |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "PeopleSalaryReportExcelSearch")] |
| | | [HttpGet] |
| | | public JsonResult PeopleSalaryReportExcelSearch(string compute,string wkshopcode=null, string wocode = null, string partcode = null, string partname = null, string partspec = null,string stepcode=null, string stepname = null, string reportname = null, string reportdate = null) |
| | | public JsonResult PeopleSalaryReportExcelSearch(string compute,string wkshopcode=null,string socode=null, string wocode = null, string partcode = null, string partname = null, string partspec = null,string stepcode=null, string stepname = null, string reportname = null, string reportdate = null) |
| | | { |
| | | string reportopendate = ""; //æ¥å·¥å¼å§æ¶é´ |
| | | string reportclosedate = ""; //æ¥å·¥ç»ææ¶é´ |
| | |
| | | reportopendate = reportdate.Split('~')[0].ToString(); |
| | | reportclosedate = reportdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = ReportManagerBLL.PeopleSalaryReportExcelSearch(compute, wkshopcode, wocode, partcode, partname, partspec,stepcode,stepname, reportname, reportopendate, reportclosedate); |
| | | mes = ReportManagerBLL.PeopleSalaryReportExcelSearch(compute, wkshopcode, socode, wocode, partcode, partname, partspec,stepcode,stepname, reportname, reportopendate, reportclosedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | |
| | | [ApiExplorerSettings(GroupName = "å·¥å管ç")] |
| | | [ApiController] |
| | | [Route("api/[controller]")] |
| | | //[ChannelActionFilter] |
| | | [ChannelActionFilter] |
| | | public class WorkOrderController : Controller |
| | | { |
| | | //å®ä¹å
¨å±ä¿¡æ¯è¿ååé |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[æå±ç»ç»æ¥æ¾äººååºç¡èµæ] |
| | | public static ToMessage TorgPersonPermissions(string torgcode) |
| | | { |
| | | return GeneralBasicDataDAL.TorgPersonPermissions(torgcode); |
| | | } |
| | | #endregion |
| | | |
| | | #region[æé®åºç¡èµæ] |
| | | public static ToMessage ButtonData() |
| | | { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | using VueWebCoreApi.DLL.DAL; |
| | | using VueWebCoreApi.Models; |
| | | using VueWebCoreApi.Models.AttendanceSetting; |
| | | using VueWebCoreApi.Tools; |
| | | |
| | | namespace VueWebCoreApi.DLL.BLL |
| | | { |
| | | public class HourlyWageBLL |
| | | { |
| | | #region[èå¤è®¾ç½®æ¥è¯¢] |
| | | public static ToMessage AttendanceSettSearch(string wkshop_code, string creatuser, string paydatestartdate, string paydateenddate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return HourlyWageDAL.AttendanceSettSearch(wkshop_code,creatuser,paydatestartdate,paydateenddate,startNum,endNum,prop,order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®¾ç½®æ°å¢/ç¼è¾] |
| | | public static ToMessage AttendanceSettAddUpdate(AttendanceSett attendancesett,string OperType, User us) |
| | | { |
| | | return HourlyWageDAL.AttendanceSettAddUpdate(attendancesett, OperType, us); |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®¾ç½®å é¤] |
| | | public static ToMessage AttendanceSettDelete(AttendanceSett attendancesett, User us) |
| | | { |
| | | return HourlyWageDAL.AttendanceSettDelete(attendancesett, us); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[è夿å¡ä¿¡æ¯æ¥è¯¢] |
| | | public static ToMessage AttendanceSearch(string usercode) |
| | | { |
| | | return HourlyWageDAL.AttendanceSearch(usercode); |
| | | } |
| | | #endregion |
| | | |
| | | #region[è夿å¡ä¿¡æ¯æäº¤] |
| | | public static ToMessage AttendanceSave(Attendance attendance) |
| | | { |
| | | return HourlyWageDAL.AttendanceSave(attendance); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[èå¤è®°å½æ¥è¯¢] |
| | | public static ToMessage AttendanceRecordSearch(string wkshop_code, string creatusercode, string paydatestartdate, string paydateenddate,string status, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return HourlyWageDAL.AttendanceRecordSearch(wkshop_code, creatusercode, paydatestartdate, paydateenddate,status, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®°å½æ°å¢ç¼è¾] |
| | | public static ToMessage AttendanceRecordAddUpdate(AttendanceRecord attendanceRecord, string operType, User us) |
| | | { |
| | | return HourlyWageDAL.AttendanceRecordAddUpdate(attendanceRecord, operType,us); |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®°å½å é¤] |
| | | public static ToMessage AttendanceRecordDelete(AttendanceRecord attendanceRecord, User us) |
| | | { |
| | | return HourlyWageDAL.AttendanceRecordDelete(attendanceRecord, us); |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®°å½æ ¸ç®æäº¤] |
| | | public static ToMessage AttendanceRecordSave(AttendanceSave attendanceSave, User us) |
| | | { |
| | | return HourlyWageDAL.AttendanceRecordSave(attendanceSave,us); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[æ¥è®¡æ¶å·¥èµæ¥è¡¨æ¥è¯¢] |
| | | public static ToMessage DailyWageReportSearch(string wkshop_code, string creatusercode, string paydatestartdate, string paydateenddate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return HourlyWageDAL.DailyWageReportSearch(wkshop_code, creatusercode, paydatestartdate, paydateenddate, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[æ¥è®¡æ¶å·¥èµä¿®æ¹æ£é¤æ¶é¿ãæ£é¤èªèµ] |
| | | public static ToMessage DailyWageReportUpdate(DailyWageReport dailyWageReport, User us) |
| | | { |
| | | return HourlyWageDAL.DailyWageReportUpdate(dailyWageReport,us); |
| | | } |
| | | #endregion |
| | | |
| | | #region[æ¥è®¡æ¶å·¥èµæ¥è¡¨å¯¼åº] |
| | | public static ToMessage DailyWageReportExcelSearch(string wkshop_code, string creatusercode, string paydatestartdate, string paydateenddate) |
| | | { |
| | | return HourlyWageDAL.DailyWageReportExcelSearch(wkshop_code, creatusercode, paydatestartdate, paydateenddate); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[æè®¡æ¶å·¥èµæ¥è¡¨æ¥è¯¢] |
| | | public static ToMessage MonthlyWageReportSearch(string wkshop_code,string paydatestartdate, string paydateenddate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return HourlyWageDAL.MonthlyWageReportSearch(wkshop_code, paydatestartdate, paydateenddate, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[æè®¡æ¶å·¥èµæ¥è¡¨å¯¼åº] |
| | | public static ToMessage MonthlyWageReportExcelSearch(string wkshop_code, string paydatestartdate, string paydateenddate) |
| | | { |
| | | return HourlyWageDAL.MonthlyWageReportExcelSearch(wkshop_code,paydatestartdate, paydateenddate); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | public class ReportManagerBLL |
| | | { |
| | | #region[ç产è¿åº¦æ¥è¡¨] |
| | | public static ToMessage ProductionScheduleReportSearch(string status, string wkshopcode,string wocode,string partcode, string partname, string partspec, string opendate, string closedate, int startNum, int endNum, string prop, string order) |
| | | public static ToMessage ProductionScheduleReportSearch(string status, string wkshopcode,string socode, string wocode,string partcode, string partname, string partspec, string opendate, string closedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return ReportManagerDAL.ProductionScheduleReportSearch(wkshopcode, status, wocode,partcode, partname, partspec, opendate, closedate, startNum, endNum, prop, order); |
| | | return ReportManagerDAL.ProductionScheduleReportSearch(wkshopcode, status, socode, wocode,partcode, partname, partspec, opendate, closedate, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[ç产è¿åº¦æ¥è¡¨å¯¼åº] |
| | | public static ToMessage ProductionScheduleReportExcelSearch(string status, string wkshopcode, string wocode, string partcode, string partname, string partspec, string opendate, string closedate) |
| | | public static ToMessage ProductionScheduleReportExcelSearch(string status, string wkshopcode,string socode, string wocode, string partcode, string partname, string partspec, string opendate, string closedate) |
| | | { |
| | | return ReportManagerDAL.ProductionScheduleReportExcelSearch(wkshopcode, status, wocode, partcode, partname, partspec, opendate, closedate); |
| | | return ReportManagerDAL.ProductionScheduleReportExcelSearch(wkshopcode, status, socode, wocode, partcode, partname, partspec, opendate, closedate); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[çç»å·¥èµæ¥è¡¨è®°å½æ¥è¯¢] |
| | | public static ToMessage GroupSalaryReportSearch(string compute,string wkshopcode, string wocode, string partcode, string partname, string partspec, string stepname, string groupcode, string username, string operopendate, string operclosedate, int startNum, int endNum, string prop, string order) |
| | | public static ToMessage GroupSalaryReportSearch(string compute,string wkshopcode,string socode, string wocode, string partcode, string partname, string partspec, string stepname, string groupcode, string username, string operopendate, string operclosedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return ReportManagerDAL.GroupSalaryReportSearch(compute, wkshopcode, wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate, startNum, endNum, prop, order); |
| | | return ReportManagerDAL.GroupSalaryReportSearch(compute, wkshopcode, socode, wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region[çç»å·¥èµæ¥è¡¨è®°å½å¯¼åº] |
| | | public static ToMessage GroupSalaryReportExcelSearch(string compute,string wkshopcode, string wocode, string partcode, string partname, string partspec, string stepname, string groupcode, string username, string operopendate, string operclosedate) |
| | | public static ToMessage GroupSalaryReportExcelSearch(string compute,string wkshopcode,string socode, string wocode, string partcode, string partname, string partspec, string stepname, string groupcode, string username, string operopendate, string operclosedate) |
| | | { |
| | | return ReportManagerDAL.GroupSalaryReportExcelSearch(compute, wkshopcode, wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate); |
| | | return ReportManagerDAL.GroupSalaryReportExcelSearch(compute, wkshopcode, socode, wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[人åå·¥èµæç»æ¥è¡¨] |
| | | public static ToMessage PeopleSalaryReportSearch(string compute,string wkshopcode, string wocode, string partcode, string partname, string partspec,string stepcode, string stepname, string reportname, string reportopendate, string reportclosedate, int startNum, int endNum, string prop, string order) |
| | | public static ToMessage PeopleSalaryReportSearch(string compute,string wkshopcode,string socode, string wocode, string partcode, string partname, string partspec,string stepcode, string stepname, string reportname, string reportopendate, string reportclosedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return ReportManagerDAL.PeopleSalaryReportSearch(compute, wkshopcode, wocode, partcode, partname, partspec, stepcode, stepname, reportname, reportopendate, reportclosedate, startNum, endNum, prop, order); |
| | | return ReportManagerDAL.PeopleSalaryReportSearch(compute, wkshopcode, socode, wocode, partcode, partname, partspec, stepcode, stepname, reportname, reportopendate, reportclosedate, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[人åå·¥èµæç»æ¥è¡¨å¯¼åº] |
| | | public static ToMessage PeopleSalaryReportExcelSearch(string compute,string wkshopcode, string wocode, string partcode, string partname, string partspec, string stepcode, string stepname, string reportname, string reportopendate, string reportclosedate) |
| | | public static ToMessage PeopleSalaryReportExcelSearch(string compute,string wkshopcode,string socode, string wocode, string partcode, string partname, string partspec, string stepcode, string stepname, string reportname, string reportopendate, string reportclosedate) |
| | | { |
| | | return ReportManagerDAL.PeopleSalaryReportSearch(compute, wkshopcode, wocode, partcode, partname, partspec, stepcode, stepname, reportname, reportopendate, reportclosedate); |
| | | return ReportManagerDAL.PeopleSalaryReportSearch(compute, wkshopcode, socode, wocode, partcode, partname, partspec, stepcode, stepname, reportname, reportopendate, reportclosedate); |
| | | } |
| | | #endregion |
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[æå±ç»ç»æ¥æ¾äººååºç¡èµæ] |
| | | public static ToMessage TorgPersonPermissions(string torgcode) |
| | | { |
| | | var sql = ""; |
| | | var dynamicParams = new DynamicParameters(); |
| | | try |
| | | { |
| | | sql = @"select usercode,username from TUser where storg_code=@torgcode"; |
| | | dynamicParams.Add("@torgcode", torgcode); |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | | mes.code = "200"; |
| | | mes.message = "æ¥è¯¢æå!"; |
| | | mes.data = data; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[æé®åºç¡èµæ] |
| | | public static ToMessage ButtonData() |
| | | { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Dapper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | using VueWebCoreApi.Models; |
| | | using VueWebCoreApi.Models.AttendanceSetting; |
| | | using VueWebCoreApi.Tools; |
| | | |
| | | namespace VueWebCoreApi.DLL.DAL |
| | | { |
| | | public class HourlyWageDAL |
| | | { |
| | | public static DataTable dt; //å®ä¹å
¨å±åédt |
| | | public static bool res; //å®ä¹å
¨å±åédt |
| | | |
| | | public static ToMessage mes = new ToMessage(); //å®ä¹å
¨å±è¿åä¿¡æ¯å¯¹è±¡ |
| | | public static string strProcName = ""; //å®ä¹å
¨å±sqlåé |
| | | public static List<SqlParameter> listStr = new List<SqlParameter>(); //å®ä¹å
¨å±åæ°éå |
| | | public static SqlParameter[] parameters; //å®ä¹å
¨å±SqlParameteråæ°æ°ç» |
| | | |
| | | #region[èå¤è®¾ç½®æ¥è¯¢] |
| | | public static ToMessage AttendanceSettSearch(string wkshop_code, string creatuser, string paydatestartdate, string paydateenddate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | try |
| | | { |
| | | if (wkshop_code != "" && wkshop_code != null) |
| | | { |
| | | search += " and S.wkshop_code=@wkshop_code "; |
| | | dynamicParams.Add("@wkshop_code", wkshop_code); |
| | | } |
| | | if (creatuser != "" && creatuser != null) |
| | | { |
| | | search += " and S.lm_user=@creatuser "; |
| | | dynamicParams.Add("@creatuser", creatuser); |
| | | } |
| | | |
| | | if (paydatestartdate != "" && paydatestartdate != null) |
| | | { |
| | | search += " and S.lm_date between @paydatestartdate and @paydateenddate "; |
| | | dynamicParams.Add("@paydatestartdate", paydatestartdate + " 00:00:00"); |
| | | dynamicParams.Add("@paydateenddate", paydateenddate + " 23:59:59"); |
| | | } |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select S.wkshop_code,T.torg_name as wkshop_name,S.workhouse,S.uphouse,S.closehouse,S.downhouse,S.workprice,overprice,U.username,S.lm_date |
| | | from AttendanceSettings S |
| | | left join TOrganization T on S.wkshop_code=T.torg_code |
| | | left join TUser U on S.lm_user=U.usercode where 1=1 " + search; |
| | | var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total); |
| | | mes.code = "200"; |
| | | mes.message = "æ¥è¯¢æå!"; |
| | | mes.count = total; |
| | | mes.data = data.ToList(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®¾ç½®æ°å¢/ç¼è¾] |
| | | public static ToMessage AttendanceSettAddUpdate(AttendanceSett attendancesett, string OperType, User us) |
| | | { |
| | | string sql = ""; |
| | | var dynamicParams = new DynamicParameters(); |
| | | List<object> list = new List<object>(); |
| | | try |
| | | { |
| | | if (OperType == "Add") |
| | | { |
| | | //åå
¥è®¡æ¶å·¥èµè®¾ç½®è¡¨ |
| | | sql = @"insert into AttendanceSettings(wkshop_code,workhouse,closehouse,workprice,overprice,uphouse,downhouse,lm_user,lm_date) |
| | | values(@wkshop_code,@workhouse,@closehouse,@workprice,@overprice,@uphouse,@downhouse,@lm_user,@lm_date)"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | wkshop_code = attendancesett.wkshop_code, |
| | | workhouse = attendancesett.workhouse, |
| | | closehouse = attendancesett.closehouse, |
| | | workprice = attendancesett.workprice, |
| | | overprice = attendancesett.overprice, |
| | | uphouse = attendancesett.uphouse, |
| | | downhouse = attendancesett.downhouse, |
| | | lm_user = us.usercode, |
| | | lm_date = DateTime.Now.ToString() |
| | | } |
| | | }); |
| | | bool aa = DapperHelper.DoTransaction(list); |
| | | if (aa) |
| | | { |
| | | //åå
¥æä½è®°å½è¡¨ |
| | | LogHelper.DbOperateLog(us.usercode, "æ°å¢", "æ°å¢äºèå¤è®¾ç½®è½¦é´ä¸º:" + attendancesett.wkshop_code + ",ä¸çæ¶é´ä¸º:" + attendancesett.workhouse + ",ä¸çæ¶é´ä¸º:" + attendancesett.closehouse + "çæ å", us.usertype); |
| | | mes.code = "200"; |
| | | mes.count = 0; |
| | | mes.message = "èå¤è®¾ç½®æ°å»ºæå!"; |
| | | mes.data = null; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "èå¤è®¾ç½®æ°å»ºå¤±è´¥!"; |
| | | mes.data = null; |
| | | } |
| | | } |
| | | if (OperType == "Update") |
| | | { |
| | | //ä¿®æ¹å·¥å表 |
| | | sql = @"update AttendanceSettings set workhouse=@workhouse,closehouse=@closehouse,workprice=@workprice,overprice=@overprice,uphouse=@uphouse,downhouse=@downhouse, |
| | | lm_user=@lm_user,lm_date=@lm_date where wkshop_code=@wkshop_code"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | wkshop_code = attendancesett.wkshop_code, |
| | | workhouse = attendancesett.workhouse, |
| | | closehouse = attendancesett.closehouse, |
| | | workprice = attendancesett.workprice, |
| | | overprice = attendancesett.overprice, |
| | | uphouse = attendancesett.uphouse, |
| | | downhouse = attendancesett.downhouse, |
| | | lm_user = us.usercode, |
| | | lm_date = DateTime.Now.ToString() |
| | | } |
| | | }); |
| | | bool aa = DapperHelper.DoTransaction(list); |
| | | if (aa) |
| | | { |
| | | //åå
¥æä½è®°å½è¡¨ |
| | | LogHelper.DbOperateLog(us.usercode, "ä¿®æ¹", "ä¿®æ¹äºèå¤è®¾ç½®è½¦é´ä¸º:" + attendancesett.wkshop_code + ",ä¸çæ¶é´ä¸º:" + attendancesett.workhouse + ",ä¸çæ¶é´ä¸º:" + attendancesett.closehouse + "çæ å", us.usertype); |
| | | mes.code = "200"; |
| | | mes.count = 0; |
| | | mes.message = "èå¤è®¾ç½®ä¿®æ¹æå!"; |
| | | mes.data = null; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "èå¤è®¾ç½®ä¿®æ¹å¤±è´¥!"; |
| | | mes.data = null; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®¾ç½®å é¤] |
| | | public static ToMessage AttendanceSettDelete(AttendanceSett attendancesett, User us) |
| | | { |
| | | var sql = ""; |
| | | List<object> list = new List<object>(); |
| | | var dynamicParams = new DynamicParameters(); |
| | | try |
| | | { |
| | | //æ ¡éªå½åèå¤è®¾ç½®æ¯å¦è¢«å¼ç¨ |
| | | sql = @"select * from Attendance where wkshop_code=@wkshop_code"; |
| | | dynamicParams.Add("@wkshop_code", attendancesett.wkshop_code); |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | | if (data.Rows.Count > 0) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "å½åèå¤è®¾ç½®å·²ç»çæèå¤è®°å½,ä¸å
许å é¤!"; |
| | | mes.data = null; |
| | | return mes; |
| | | } |
| | | else |
| | | { |
| | | //计æ¶å·¥èµè®¾ç½®è¡¨ |
| | | sql = @"delete AttendanceSettings where wkshop_code=@wkshop_code"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | wkshop_code = attendancesett.wkshop_code |
| | | } |
| | | }); |
| | | } |
| | | bool aa = DapperHelper.DoTransaction(list); |
| | | LogHelper.WriteLogData(aa.ToString()); |
| | | if (aa) |
| | | { |
| | | //åå
¥æä½è®°å½è¡¨ |
| | | LogHelper.DbOperateLog(us.usercode, "å é¤", "å é¤äºèå¤è®¾ç½®è½¦é´ä¸º:" + attendancesett.wkshop_code + ",ä¸çæ¶é´ä¸º:" + attendancesett.workhouse + ",ä¸çæ¶é´ä¸º:" + attendancesett.closehouse + "çæ å", us.usertype); |
| | | mes.code = "200"; |
| | | mes.count = 0; |
| | | mes.message = "èå¤è®¾ç½®å 餿å!"; |
| | | mes.data = null; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "èå¤è®¾ç½®å é¤å¤±è´¥!"; |
| | | mes.data = null; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[è夿å¡ä¿¡æ¯æ¥è¯¢] |
| | | public static ToMessage AttendanceSearch(string usercode) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | Dictionary<object, object> dir = new Dictionary<object, object>(); |
| | | try |
| | | { |
| | | if (usercode == "" || usercode == null) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "å·¥å·ä¸è½ä¸ºç©º!"; |
| | | mes.data = null; |
| | | return mes; |
| | | } |
| | | else |
| | | { |
| | | search += " and A.usercode=@usercode "; |
| | | dynamicParams.Add("@usercode", usercode); |
| | | } |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var sql = @"select A.wkshop_code,T.torg_name as wkshop_name,U.username,A.createdate,S.workprice |
| | | from Attendance A |
| | | left join AttendanceSettings S on A.wkshop_code=S.wkshop_code |
| | | left join TOrganization T on A.wkshop_code=T.torg_code |
| | | left join TUser U on A.usercode=U.usercode |
| | | where convert(date, A.createdate) = convert(date, getdate()) " + search; |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | | |
| | | //è·åç¨æ·ä¿¡æ¯ |
| | | var sql0 = @"select U.usercode,U.username,U.storg_code,T.torg_name, |
| | | STUFF((SELECT ',' + P.postname |
| | | FROM TPost P |
| | | WHERE CHARINDEX(',' + P.postcode + ',', ',' + U.post_code + ',') > 0 |
| | | FOR XML PATH('')), 1, 1, '') AS postname |
| | | from TUser U |
| | | left join TOrganization T on U.storg_code=T.torg_code |
| | | where U.usercode=@usercode"; |
| | | dynamicParams.Add("@usercode", usercode); |
| | | var data0 = DapperHelper.selectdata(sql0, dynamicParams); |
| | | dir.Add("userdate", data0); |
| | | dir.Add("checkcrd", data); |
| | | mes.code = "200"; |
| | | mes.message = "æ¥è¯¢æå!"; |
| | | mes.count = dir.Count; |
| | | mes.data = dir; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[è夿å¡ä¿¡æ¯æäº¤] |
| | | public static ToMessage AttendanceSave(Attendance attendance) |
| | | { |
| | | string sql = ""; |
| | | List<object> list = new List<object>(); |
| | | try |
| | | { |
| | | //åå
¥è®¡æ¶å·¥èµè夿å¡è¡¨ |
| | | sql = @"insert into Attendance(wkshop_code,usercode,createdate) values(@wkshop_code,@usercode,@createdate)"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | wkshop_code = attendance.wkshop_code, |
| | | usercode = attendance.user_code, |
| | | createdate = DateTime.Now.ToString() |
| | | } |
| | | }); |
| | | bool aa = DapperHelper.DoTransaction(list); |
| | | if (aa) |
| | | { |
| | | //åå
¥æä½è®°å½è¡¨ |
| | | LogHelper.DbOperateLog(attendance.user_code, "æå¡", "ç¨æ·:" + attendance.user_code + "æå¡,æå¡æ¶é´ä¸º:" + DateTime.Now.ToString() + "", "PC"); |
| | | mes.code = "200"; |
| | | mes.count = 0; |
| | | mes.message = "æå¡æå!"; |
| | | mes.data = null; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "æå¡å¤±è´¥!"; |
| | | mes.data = null; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[èå¤è®°å½æ¥è¯¢] |
| | | public static ToMessage AttendanceRecordSearch(string wkshop_code, string creatusercode, string paydatestartdate, string paydateenddate,string status, int startNum, int endNum, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | try |
| | | { |
| | | if (wkshop_code != "" && wkshop_code != null) |
| | | { |
| | | search += " and S.wkshop_code=@wkshop_code "; |
| | | dynamicParams.Add("@wkshop_code", wkshop_code); |
| | | } |
| | | if (creatusercode != "" && creatusercode != null) |
| | | { |
| | | search += " and A.usercode=@creatusercode"; |
| | | dynamicParams.Add("@creatusercode", creatusercode); |
| | | } |
| | | |
| | | if (paydatestartdate != "" && paydatestartdate != null) |
| | | { |
| | | search += " and A.createdate between @paydatestartdate and @paydateenddate "; |
| | | dynamicParams.Add("@paydatestartdate", paydatestartdate + " 00:00:00"); |
| | | dynamicParams.Add("@paydateenddate", paydateenddate + " 23:59:59"); |
| | | } |
| | | if (status != "" && status != null) |
| | | { |
| | | search += " and A.status=@status "; |
| | | dynamicParams.Add("@status", status); |
| | | } |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select A.id,S.wkshop_code,T.torg_name as wkshop_name,A.usercode,U.username,A.createdate,S.workprice,A.status |
| | | from Attendance A |
| | | left join AttendanceSettings S on A.wkshop_code=S.wkshop_code |
| | | left join TOrganization T on A.wkshop_code=T.torg_code |
| | | left join TUser U on A.usercode=U.usercode where 1=1 " + search; |
| | | var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total); |
| | | mes.code = "200"; |
| | | mes.message = "æ¥è¯¢æå!"; |
| | | mes.count = total; |
| | | mes.data = data.ToList(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®°å½æ°å¢ç¼è¾] |
| | | public static ToMessage AttendanceRecordAddUpdate(AttendanceRecord attendanceRecord, string operType, User us) |
| | | { |
| | | string sql = ""; |
| | | var dynamicParams = new DynamicParameters(); |
| | | List<object> list = new List<object>(); |
| | | try |
| | | { |
| | | if (operType == "Add") |
| | | { |
| | | //åå
¥è®¡æ¶å·¥èµè夿å¡è¡¨ |
| | | sql = @"insert into Attendance(wkshop_code,usercode,createdate,status) |
| | | values(@wkshop_code,@usercode,@createdate,@status)"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | wkshop_code = attendanceRecord.wkshop_code, |
| | | usercode = attendanceRecord.creatusercode, |
| | | createdate = attendanceRecord.creatdate, |
| | | status = attendanceRecord.status |
| | | } |
| | | }); |
| | | bool aa = DapperHelper.DoTransaction(list); |
| | | if (aa) |
| | | { |
| | | //åå
¥æä½è®°å½è¡¨ |
| | | LogHelper.DbOperateLog(us.usercode, "æ°å¢", "æ°å¢äºæå¡è®°å½è½¦é´ä¸º:" + attendanceRecord.wkshop_code + ",人å为:" + attendanceRecord.creatusercode + ",è夿¶é´ä¸º:" + attendanceRecord.creatdate + "", us.usertype); |
| | | mes.code = "200"; |
| | | mes.count = 0; |
| | | mes.message = "æ°å¢æå¡è®°å½æå!"; |
| | | mes.data = null; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "æ°å¢æå¡è®°å½å¤±è´¥!"; |
| | | mes.data = null; |
| | | } |
| | | } |
| | | if (operType == "Update") |
| | | { |
| | | //ä¿®æ¹è®¡æ¶å·¥èµè夿å¡è¡¨ |
| | | sql = @"update Attendance set createdate=@createdate where wkshop_code=@wkshop_code and usercode=@usercode and id=@id"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | id= attendanceRecord.id, |
| | | wkshop_code = attendanceRecord.wkshop_code, |
| | | usercode = attendanceRecord.creatusercode, |
| | | createdate = attendanceRecord.creatdate |
| | | } |
| | | }); |
| | | bool aa = DapperHelper.DoTransaction(list); |
| | | if (aa) |
| | | { |
| | | //åå
¥æä½è®°å½è¡¨ |
| | | LogHelper.DbOperateLog(us.usercode, "ä¿®æ¹", "ä¿®æ¹äºæå¡è®°å½id为"+attendanceRecord.id+",车é´ä¸º:" + attendanceRecord.wkshop_code + ",人å为:" + attendanceRecord.creatusercode + ",è夿¶é´ä¸º:" + attendanceRecord.creatdate + "", us.usertype); |
| | | mes.code = "200"; |
| | | mes.count = 0; |
| | | mes.message = "ä¿®æ¹æå¡è®°å½æå!"; |
| | | mes.data = null; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "ä¿®æ¹æå¡è®°å½å¤±è´¥!"; |
| | | mes.data = null; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®°å½å é¤] |
| | | public static ToMessage AttendanceRecordDelete(AttendanceRecord attendanceRecord, User us) |
| | | { |
| | | var sql = ""; |
| | | List<object> list = new List<object>(); |
| | | var dynamicParams = new DynamicParameters(); |
| | | try |
| | | { |
| | | //计æ¶å·¥èµè夿å¡è¡¨ |
| | | sql = @"delete Attendance where id=@id"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | id = attendanceRecord.id |
| | | } |
| | | }); |
| | | bool aa = DapperHelper.DoTransaction(list); |
| | | LogHelper.WriteLogData(aa.ToString()); |
| | | if (aa) |
| | | { |
| | | //åå
¥æä½è®°å½è¡¨ |
| | | LogHelper.DbOperateLog(us.usercode, "å é¤", "å é¤äºæå¡è®°å½è½¦é´ä¸º:" + attendanceRecord.wkshop_code + ",人å为:" + attendanceRecord.creatusercode + ",è夿¶é´ä¸º:" + attendanceRecord.creatdate + "", us.usertype); |
| | | mes.code = "200"; |
| | | mes.count = 0; |
| | | mes.message = "æå¡è®°å½å 餿å!"; |
| | | mes.data = null; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "æå¡è®°å½å é¤å¤±è´¥!"; |
| | | mes.data = null; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[èå¤è®°å½æ ¸ç®æäº¤] |
| | | public static ToMessage AttendanceRecordSave(AttendanceSave attendanceSave, User us) |
| | | { |
| | | var sql = ""; |
| | | var dynamicParams = new DynamicParameters(); |
| | | string paydatestartdate = ""; //å¼å§æ¶é´ |
| | | string paydateenddate = ""; //ç»ææ¶é´ |
| | | try |
| | | { |
| | | if (attendanceSave.creatdate != "" && attendanceSave.creatdate != null) |
| | | { |
| | | paydatestartdate = attendanceSave.creatdate.Split('~')[0].ToString(); |
| | | paydateenddate = attendanceSave.creatdate.Split('~')[1].ToString(); |
| | | } |
| | | //åå¨è¿ç¨å |
| | | DataTable dt = new DataTable(); |
| | | sql = @"h_p_MES_HourlyWage"; |
| | | dynamicParams.Add("@wkshop_code", attendanceSave.wkshop_code); |
| | | dynamicParams.Add("@usercode", attendanceSave.creatusercode); |
| | | dynamicParams.Add("@startdate", paydatestartdate); |
| | | dynamicParams.Add("@closedate", paydateenddate); |
| | | dynamicParams.Add("@status", attendanceSave.status); |
| | | bool a = DapperHelper.IsProcedure(sql, dynamicParams); |
| | | if (a) |
| | | { |
| | | //åå
¥æä½è®°å½è¡¨ |
| | | LogHelper.DbOperateLog(us.usercode, "计æ¶å·¥èµæ ¸ç®", "ç¨æ·:" + us.usercode + "è¿è¡æ ¸ç®,æä½æ¶é´ä¸ºï¼" + DateTime.Now.ToString() + "", "PC"); |
| | | mes.code = "200"; |
| | | mes.count = 0; |
| | | mes.message = "æ ¸ç®æå!"; |
| | | mes.data = null; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "æ ¸ç®å¤±è´¥!"; |
| | | mes.data = null; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[æ¥è®¡æ¶å·¥èµæ¥è¡¨æ¥è¯¢] |
| | | public static ToMessage DailyWageReportSearch(string wkshop_code, string creatusercode, string paydatestartdate, string paydateenddate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | try |
| | | { |
| | | if (wkshop_code != "" && wkshop_code != null) |
| | | { |
| | | search += " and S.wkshop_code=@wkshop_code "; |
| | | dynamicParams.Add("@wkshop_code", wkshop_code); |
| | | } |
| | | if (creatusercode != "" && creatusercode != null) |
| | | { |
| | | search += " and S.usercode=@creatusercode"; |
| | | dynamicParams.Add("@creatusercode", creatusercode); |
| | | } |
| | | |
| | | if (paydatestartdate != "" && paydatestartdate != null) |
| | | { |
| | | search += " and S.checkindate between @paydatestartdate and @paydateenddate "; |
| | | dynamicParams.Add("@paydatestartdate", paydatestartdate + " 00:00:00"); |
| | | dynamicParams.Add("@paydateenddate", paydateenddate + " 23:59:59"); |
| | | } |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select S.id,S.wkshop_code,T.torg_name as wkshop_name,S.usercode,U.username,S.checkindate,S.workcount,S.workprice, |
| | | S.overcount,S.overprice,S.deductcount,S.deductmoney,S.timimoney |
| | | from AttendanceSum S |
| | | left join TOrganization T on S.wkshop_code=T.torg_code |
| | | left join TUser U on S.usercode=U.usercode where 1=1 " + search; |
| | | var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total); |
| | | mes.code = "200"; |
| | | mes.message = "æ¥è¯¢æå!"; |
| | | mes.count = total; |
| | | mes.data = data.ToList(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[æ¥è®¡æ¶å·¥èµä¿®æ¹æ£é¤æ¶é¿ãæ£é¤èªèµ] |
| | | public static ToMessage DailyWageReportUpdate(DailyWageReport dailyWageReport, User us) |
| | | { |
| | | var sql = ""; |
| | | List<object> list = new List<object>(); |
| | | var dynamicParams = new DynamicParameters(); |
| | | try |
| | | { |
| | | //计æ¶å·¥èµæ¥æ±æ»è¡¨ |
| | | sql = @"update AttendanceSum set deductcount=@deductcount,deductmoney=@deductmoney where id=@id"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | id = dailyWageReport.id, |
| | | deductcount = dailyWageReport.deductcount, |
| | | deductmoney = dailyWageReport.deductmoney |
| | | } |
| | | }); |
| | | bool aa = DapperHelper.DoTransaction(list); |
| | | LogHelper.WriteLogData(aa.ToString()); |
| | | if (aa) |
| | | { |
| | | //åå
¥æä½è®°å½è¡¨ |
| | | LogHelper.DbOperateLog(us.usercode, "ä¿®æ¹", "ä¿®æ¹äºå·¥èµæ¥æ±æ»è¡¨,车é´ä¸º:"+dailyWageReport.whshop_code+",æå¡äºº:"+dailyWageReport.usercode+",æå¡æ¶é´ä¸º:"+dailyWageReport.checkindate+",æ£é¤æ¶é¿ä¸º:" + dailyWageReport.deductcount + ",æ£é¤å·¥èµä¸º:" + dailyWageReport.deductmoney + "çå·¥èµè®°å½", us.usertype); |
| | | mes.code = "200"; |
| | | mes.count = 0; |
| | | mes.message = "å·¥èµä¿®æ¹æå!"; |
| | | mes.data = null; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = "å·¥èµä¿®æ¹å¤±è´¥!"; |
| | | mes.data = null; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[æ¥è®¡æ¶å·¥èµæ¥è¡¨å¯¼åº] |
| | | public static ToMessage DailyWageReportExcelSearch(string wkshop_code, string creatusercode, string paydatestartdate, string paydateenddate) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | try |
| | | { |
| | | if (wkshop_code != "" && wkshop_code != null) |
| | | { |
| | | search += " and S.wkshop_code=@wkshop_code "; |
| | | dynamicParams.Add("@wkshop_code", wkshop_code); |
| | | } |
| | | if (creatusercode != "" && creatusercode != null) |
| | | { |
| | | search += " and S.usercode=@creatusercode"; |
| | | dynamicParams.Add("@creatusercode", creatusercode); |
| | | } |
| | | |
| | | if (paydatestartdate != "" && paydatestartdate != null) |
| | | { |
| | | search += " and S.checkindate between @paydatestartdate and @paydateenddate "; |
| | | dynamicParams.Add("@paydatestartdate", paydatestartdate + " 00:00:00"); |
| | | dynamicParams.Add("@paydateenddate", paydateenddate + " 23:59:59"); |
| | | } |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select S.wkshop_code as æå±è½¦é´ç¼ç ,T.torg_name as æå±è½¦é´,S.usercode as æå¡äººåç¼ç ,U.username as æå¡äººå,S.checkindate as æå¡æ¥æ, |
| | | S.workcount as 'ä¸çæ¶é¿(å°æ¶)',S.workprice as '工价(å
/å°æ¶)',S.overcount as 'å çæ¶é¿(å°æ¶)',S.overprice as 'å ç工价(å
/å°æ¶)', |
| | | S.deductcount as 'æ£é¤æ¶é¿(å°æ¶)',S.deductmoney as 'æ£é¤å·¥èµ(å
)',S.timimoney as '计æ¶å·¥èµ(å
)',(S.timimoney-S.deductmoney) as 'ç»ç®å·¥èµ(å
)' |
| | | from AttendanceSum S |
| | | left join TOrganization T on S.wkshop_code=T.torg_code |
| | | left join TUser U on S.usercode=U.usercode where 1=1 " + search; |
| | | DataTable data = DapperHelper.selectdata(sql, dynamicParams); |
| | | data.TableName = "Table"; //设置DataTableçåç§° |
| | | string msg = DownLoad.DataTableToExcel(data, "æ¥è®¡æ¶å·¥èµæ¥è¡¨"); |
| | | mes.code = "200"; |
| | | mes.message = "æ¥è¯¢æå!"; |
| | | mes.count = total; |
| | | mes.data = msg; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[æè®¡æ¶å·¥èµæ¥è¡¨æ¥è¯¢] |
| | | public static ToMessage MonthlyWageReportSearch(string wkshop_code, string paydatestartdate, string paydateenddate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | try |
| | | { |
| | | if (wkshop_code != "" && wkshop_code != null) |
| | | { |
| | | search += " and S.wkshop_code=@wkshop_code "; |
| | | dynamicParams.Add("@wkshop_code", wkshop_code); |
| | | } |
| | | if (paydatestartdate != "" && paydatestartdate != null) |
| | | { |
| | | search += " and S.checkindate between @paydatestartdate and @paydateenddate "; |
| | | dynamicParams.Add("@paydatestartdate", paydatestartdate + " 00:00:00"); |
| | | dynamicParams.Add("@paydateenddate", paydateenddate + " 23:59:59"); |
| | | } |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select T.torg_name as wkshop_name,U.username, |
| | | sum(S.workcount) as TotalWorkCount, |
| | | avg(S.workprice) as workprice, |
| | | sum(S.overcount) AS TotalOverCount, |
| | | avg(S.overprice) as overprice, |
| | | (sum(S.workcount) * avg(S.workprice)) AS TotalWorkValue, |
| | | (sum(S.overcount) * avg(S.overprice)) AS TotalOverValue, |
| | | sum(S.timimoney) AS TotalTimedMoney |
| | | from AttendanceSum S |
| | | left join TOrganization T on S.wkshop_code=T.torg_code |
| | | left join TUser U on S.usercode=U.usercode |
| | | where 1=1 " + search+ " group by T.torg_name,U.username"; |
| | | var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total); |
| | | mes.code = "200"; |
| | | mes.message = "æ¥è¯¢æå!"; |
| | | mes.count = total; |
| | | mes.data = data.ToList(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[æè®¡æ¶å·¥èµæ¥è¡¨å¯¼åº] |
| | | public static ToMessage MonthlyWageReportExcelSearch(string wkshop_code, string paydatestartdate, string paydateenddate) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | try |
| | | { |
| | | if (wkshop_code != "" && wkshop_code != null) |
| | | { |
| | | search += " and S.wkshop_code=@wkshop_code "; |
| | | dynamicParams.Add("@wkshop_code", wkshop_code); |
| | | } |
| | | if (paydatestartdate != "" && paydatestartdate != null) |
| | | { |
| | | search += " and S.checkindate between @paydatestartdate and @paydateenddate "; |
| | | dynamicParams.Add("@paydatestartdate", paydatestartdate + " 00:00:00"); |
| | | dynamicParams.Add("@paydateenddate", paydateenddate + " 23:59:59"); |
| | | } |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select T.torg_name as 'æå±è½¦é´',U.username as 'æå¡äººå', |
| | | sum(S.workcount) as 'æ»å·¥ä½æ¶é¿(å°æ¶)', |
| | | avg(S.workprice) as 'æ¯å°æ¶åä»·(å
)', |
| | | sum(S.overcount) as 'æ»å çæ¶é¿(å°æ¶)', |
| | | avg(S.overprice) as 'å çæ¯å°æ¶åä»·(å
)', |
| | | (sum(S.workcount) * avg(S.workprice)) as 'æ»å·¥ä½å·¥èµ(å
)', |
| | | (sum(S.overcount) * avg(S.overprice)) as 'æ»å çå·¥èµ(å
)', |
| | | sum(S.timimoney) AS 'æ»è®¡æ¶å·¥èµ(å
)' |
| | | from AttendanceSum S |
| | | left join TOrganization T on S.wkshop_code=T.torg_code |
| | | left join TUser U on S.usercode=U.usercode |
| | | where 1=1 " + search + " group by T.torg_name,U.username"; |
| | | DataTable data = DapperHelper.selectdata(sql, dynamicParams); |
| | | data.TableName = "Table"; //设置DataTableçåç§° |
| | | string msg = DownLoad.DataTableToExcel(data, "æè®¡æ¶å·¥èµæ¥è¡¨"); |
| | | mes.code = "200"; |
| | | mes.message = "æ¥è¯¢æå!"; |
| | | mes.count = total; |
| | | mes.data = msg; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | #region[ç产è¿åº¦æ¥è¡¨] |
| | | public static ToMessage ProductionScheduleReportSearch(string wkshopcode, string status, string wocode, string partcode, string partname, string partspec, string opendate, string closedate, int startNum, int endNum, string prop, string order) |
| | | public static ToMessage ProductionScheduleReportSearch(string wkshopcode, string status,string socode, string wocode, string partcode, string partname, string partspec, string opendate, string closedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | |
| | | search += "and AA.status='æªå¼å§' "; |
| | | break; |
| | | } |
| | | } |
| | | if (socode != "" && socode != null) |
| | | { |
| | | search += "and AA.saleOrderCode like '%'+@socode+'%' "; |
| | | dynamicParams.Add("@socode", socode); |
| | | } |
| | | if (wocode != "" && wocode != null) |
| | | { |
| | |
| | | dynamicParams.Add("@opendate", opendate + " 00:00:00"); |
| | | dynamicParams.Add("@closedate", closedate + " 23:59:59"); |
| | | } |
| | | if (search == "") |
| | | { |
| | | search = "and 1=1 "; |
| | | } |
| | | search = search.Substring(3);//æªåç´¢å¼2åé¢çå符 |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select top 100 percent AA.saleOrderCode,AA.m_po,AA.wkshp_code,AA.wkshp_name,AA.wo_code,AA.status,AA.lm_date, |
| | |
| | | left join TMateriel_Info P on W.materiel_code=p.partcode |
| | | left join TOrganization F on W.wkshp_code=F.torg_code |
| | | group by E.saleOrderCode,W.m_po,W.wo_code,W.wkshp_code,F.torg_name,W.status,W.lm_date,P.partcode,P.partname,P.partspec,W.plan_qty |
| | | ) as AA where " + search; |
| | | ) as AA where AA.concat_name is not null " + search; |
| | | var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total); |
| | | mes.code = "200"; |
| | | mes.message = "æ¥è¯¢æå!"; |
| | |
| | | #endregion |
| | | |
| | | #region[ç产è¿åº¦æ¥è¡¨å¯¼åº] |
| | | public static ToMessage ProductionScheduleReportExcelSearch(string wkshopcode, string status, string wocode,string partcode, string partname, string partspec, string opendate, string closedate) |
| | | public static ToMessage ProductionScheduleReportExcelSearch(string wkshopcode, string status,string socode, string wocode,string partcode, string partname, string partspec, string opendate, string closedate) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | |
| | | search += "and AA.status='æªå¼å§' "; |
| | | break; |
| | | } |
| | | } |
| | | if (socode != "" && socode != null) |
| | | { |
| | | search += "and AA.saleOrderCode like '%'+@socode+'%' "; |
| | | dynamicParams.Add("@socode", socode); |
| | | } |
| | | if (wocode != "" && wocode != null) |
| | | { |
| | |
| | | dynamicParams.Add("@opendate", opendate + " 00:00:00"); |
| | | dynamicParams.Add("@closedate", closedate + " 23:59:59"); |
| | | } |
| | | if (search == "") |
| | | { |
| | | search = "and 1=1 "; |
| | | } |
| | | search = search.Substring(3);//æªåç´¢å¼2åé¢çå符 |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | |
| | |
| | | left join TOrganization F on W.wkshp_code=F.torg_code |
| | | group by E.saleOrderCode,W.m_po,W.wo_code,W.wkshp_code,F.torg_name,W.status,W.lm_date,P.partcode,P.partname,P.partspec,W.plan_qty |
| | | ) as AA |
| | | where " + search; |
| | | where where AA.concat_name is not null " + search; |
| | | DataTable data = DapperHelper.selectdata(sql, dynamicParams); |
| | | data.TableName = "Table"; //设置DataTableçåç§° |
| | | string msg = DownLoad.DataTableToExcel(data, "ç产è¿åº¦æ¥è¡¨"); |
| | |
| | | |
| | | |
| | | #region[çç»å·¥èµæ¥è¡¨è®°å½æ¥è¯¢] |
| | | public static ToMessage GroupSalaryReportSearch(string compute,string wkshopcode, string wocode, string partcode, string partname, string partspec, string stepname, string groupcode, string username, string operopendate, string operclosedate, int startNum, int endNum, string prop, string order) |
| | | public static ToMessage GroupSalaryReportSearch(string compute,string wkshopcode,string socode, string wocode, string partcode, string partname, string partspec, string stepname, string groupcode, string username, string operopendate, string operclosedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | |
| | | { |
| | | search += "and K.wkshp_code=@wkshopcode "; |
| | | dynamicParams.Add("@wkshopcode", wkshopcode); |
| | | } |
| | | if (socode != "" && socode != null) |
| | | { |
| | | search += "and K.saleOrderCode like '%'+@socode+'%' "; |
| | | dynamicParams.Add("@socode", socode); |
| | | } |
| | | if (wocode != "" && wocode != null) |
| | | { |
| | |
| | | //search = search.Substring(3);//æªåç´¢å¼2åé¢çå符 |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select distinct A.id,K.wkshp_code,F.torg_name as wkshp_name,A.wo_code,M.partcode,M.partname,M.partspec,T.stepcode,T.stepname,A.task_qty,G.usergroupcode,G.usergroupname,A.good_qty, |
| | | var sql = @"select distinct A.id,K.wkshp_code,F.torg_name as wkshp_name,K.saleOrderCode,A.wo_code,M.partcode,M.partname,M.partspec,T.stepcode,T.stepname,A.task_qty,G.usergroupcode,G.usergroupname,A.good_qty, |
| | | isnull(A.step_price,0) as unprice,A.good_qty*isnull(A.step_price,0) as usermoney,U.username as lm_user,A.lm_date,B.report_date |
| | | from TK_Wrk_Record A |
| | | inner join TK_Wrk_RecordSub B on A.id=B.m_id |
| | |
| | | #endregion |
| | | |
| | | #region[çç»å·¥èµæ¥è¡¨è®°å½å¯¼åº] |
| | | public static ToMessage GroupSalaryReportExcelSearch(string compute,string wkshopcode, string wocode, string partcode, string partname, string partspec, string stepname, string groupcode, string username, string operopendate, string operclosedate) |
| | | public static ToMessage GroupSalaryReportExcelSearch(string compute,string wkshopcode,string socode, string wocode, string partcode, string partname, string partspec, string stepname, string groupcode, string username, string operopendate, string operclosedate) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | |
| | | { |
| | | search += "and K.wkshp_code=@wkshopcode "; |
| | | dynamicParams.Add("@wkshopcode", wkshopcode); |
| | | } |
| | | if (socode != "" && socode != null) |
| | | { |
| | | search += "and K.saleOrderCode like '%'+@socode+'%' "; |
| | | dynamicParams.Add("@socode", socode); |
| | | } |
| | | if (wocode != "" && wocode != null) |
| | | { |
| | |
| | | } |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select distinct K.wkshp_code as 车é´ç¼ç ,F.torg_name as 车é´åç§°, A.wo_code as å·¥åç¼å·,M.partcode as 产åç¼ç ,M.partname as 产ååç§°,M.partspec as 产åè§æ ¼, |
| | | var sql = @"select distinct K.wkshp_code as 车é´ç¼ç ,F.torg_name as 车é´åç§°,K.saleOrderCode as 'éå®åå·',A.wo_code as å·¥åç¼å·,M.partcode as 产åç¼ç ,M.partname as 产ååç§°,M.partspec as 产åè§æ ¼, |
| | | T.stepcode as å·¥åºç¼ç ,T.stepname as å·¥åºåç§°,A.task_qty as 任塿°é,G.usergroupcode as çç»ç¼ç ,G.usergroupname as çç»åç§°, |
| | | A.good_qty as æ¥å·¥æ°é,isnull(A.step_price,0) as å·¥åºåä»·,A.good_qty*isnull(A.step_price,0) as 计件工èµ,U.username as æä½äººå,A.lm_date as æä½æ¶é´,B.report_date as æ¥å·¥æ¶é´ |
| | | from TK_Wrk_Record A |
| | |
| | | |
| | | |
| | | #region[人åå·¥èµæç»æ¥è¡¨] |
| | | public static ToMessage PeopleSalaryReportSearch(string compute,string wkshopcode, string wocode, string partcode, string partname, string partspec,string stepcode, string stepname, string reportname, string reportopendate, string reportclosedate, int startNum, int endNum, string prop, string order) |
| | | public static ToMessage PeopleSalaryReportSearch(string compute,string wkshopcode,string socode, string wocode, string partcode, string partname, string partspec,string stepcode, string stepname, string reportname, string reportopendate, string reportclosedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | |
| | | { |
| | | search += "and AA.wkshp_code=@wkshopcode "; |
| | | dynamicParams.Add("@wkshopcode", wkshopcode); |
| | | } |
| | | if (socode != "" && socode != null) |
| | | { |
| | | search += "and AA.saleOrderCode like '%'+@socode+'%' "; |
| | | dynamicParams.Add("@socode", socode); |
| | | } |
| | | if (wocode != "" && wocode != null) |
| | | { |
| | |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select * from( |
| | | select M.wkshp_code,F.torg_name as wkshp_name,A.wo_code,A.materiel_code as partcode,P.partname,P.partspec,A.step_seq,A.step_code,S.stepname,S.flwtype as steptype,K.isend, |
| | | select M.wkshp_code,F.torg_name as wkshp_name,M.saleOrderCode,A.wo_code,A.materiel_code as partcode,P.partname,P.partspec,A.step_seq,A.step_code,S.stepname,S.flwtype as steptype,K.isend, |
| | | A.task_qty,B.report_qty,isnull(A.step_price,0) as step_price,(B.report_qty*isnull(A.step_price,0)) as moneys, |
| | | B.report_person as usercode, |
| | | STUFF((SELECT ',' + U.username |
| | |
| | | left join TOrganization F on M.wkshp_code=F.torg_code |
| | | where A.style='B' and B.style='B' and A.verify='Y' and B.usergroup_code='' |
| | | union all |
| | | select M.wkshp_code,F.torg_name as wkshp_name,A.wo_code,A.materiel_code as partcode,P.partname,P.partspec,A.step_seq,A.step_code,S.stepname,S.flwtype as steptype,K.isend, |
| | | select M.wkshp_code,F.torg_name as wkshp_name,M.saleOrderCode,A.wo_code,A.materiel_code as partcode,P.partname,P.partspec,A.step_seq,A.step_code,S.stepname,S.flwtype as steptype,K.isend, |
| | | M.plan_qty as task_qty,B.sqty as report_qty,isnull(A.step_price,0) as step_price,(B.sqty*isnull(A.step_price,0)) as moneys, |
| | | B.in_person as usercode, |
| | | STUFF((SELECT ',' + U.username |
| | |
| | | #endregion |
| | | |
| | | #region[人åå·¥èµæç»æ¥è¡¨å¯¼åº] |
| | | public static ToMessage PeopleSalaryReportSearch(string compute,string wkshopcode, string wocode, string partcode, string partname, string partspec, string stepcode, string stepname, string reportname, string reportopendate, string reportclosedate) |
| | | public static ToMessage PeopleSalaryReportSearch(string compute,string wkshopcode,string socode, string wocode, string partcode, string partname, string partspec, string stepcode, string stepname, string reportname, string reportopendate, string reportclosedate) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | |
| | | { |
| | | search += "and AA.wkshp_code=@wkshopcode "; |
| | | dynamicParams.Add("@wkshopcode", wkshopcode); |
| | | } |
| | | if (socode != "" && socode != null) |
| | | { |
| | | search += "and AA.saleOrderCode like '%'+@socode+'%' "; |
| | | dynamicParams.Add("@socode", socode); |
| | | } |
| | | if (wocode != "" && wocode != null) |
| | | { |
| | |
| | | search = search.Substring(3);//æªåç´¢å¼2åé¢çå符 |
| | | // --------------æ¥è¯¢æå®æ°æ®-------------- |
| | | var total = 0; //æ»æ¡æ° |
| | | var sql = @"select AA.wkshp_code as 车é´ç¼ç ,AA.wkshp_name as 车é´åç§°,AA.wo_code as 'å·¥åå·',AA.partcode as '产åç¼ç ',AA.partname '产ååç§°',AA.partspec as 'è§æ ¼åå·',AA.step_seq as 'å·¥åºåºå·', |
| | | var sql = @"select AA.wkshp_code as 车é´ç¼ç ,AA.wkshp_name as 车é´åç§°,AA.saleOrderCode as 'éå®åå·',AA.wo_code as 'å·¥åå·',AA.partcode as '产åç¼ç ',AA.partname '产ååç§°',AA.partspec as 'è§æ ¼åå·',AA.step_seq as 'å·¥åºåºå·', |
| | | AA.step_code as 'å·¥åºç¼ç ',AA.stepname as 'å·¥åºåç§°',(case when AA.steptype='Z' then 'èªå¶' else 'å¤å' end) as 'å·¥åºç±»å',AA.task_qty as '任塿°é',AA.report_qty as 'æ¥å·¥æ°é', |
| | | AA.step_price as 'å·¥åºåä»·',AA.moneys as '计件工èµ',AA.usercode as 'æ¥å·¥äººåç¼å·',AA.username as 'æ¥å·¥äººååç§°',AA.report_date as 'æ¥å·¥æ¶é´' |
| | | from( |
| | | select M.wkshp_code,F.torg_name as wkshp_name,A.wo_code,A.materiel_code as partcode,P.partname,P.partspec,A.step_seq,A.step_code,S.stepname,S.flwtype as steptype,K.isend, |
| | | select M.wkshp_code,F.torg_name as wkshp_name,M.saleOrderCode,A.wo_code,A.materiel_code as partcode,P.partname,P.partspec,A.step_seq,A.step_code,S.stepname,S.flwtype as steptype,K.isend, |
| | | A.task_qty,B.report_qty,isnull(A.step_price,0) as step_price,(B.report_qty*isnull(A.step_price,0)) as moneys, |
| | | B.report_person as usercode, |
| | | STUFF((SELECT ',' + U.username |
| | |
| | | left join TOrganization F on M.wkshp_code=F.torg_code |
| | | where A.style='B' and B.style='B' and A.verify='Y' and B.usergroup_code='' |
| | | union all |
| | | select M.wkshp_code,F.torg_name as wkshp_name,A.wo_code,A.materiel_code as partcode,P.partname,P.partspec,A.step_seq,A.step_code,S.stepname,S.flwtype as steptype,K.isend, |
| | | select M.wkshp_code,F.torg_name as wkshp_name,M.saleOrderCode,A.wo_code,A.materiel_code as partcode,P.partname,P.partspec,A.step_seq,A.step_code,S.stepname,S.flwtype as steptype,K.isend, |
| | | M.plan_qty as task_qty,B.sqty as report_qty,isnull(A.step_price,0) as step_price,(B.sqty*isnull(A.step_price,0)) as moneys, |
| | | B.in_person as usercode, |
| | | STUFF((SELECT ',' + U.username |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace VueWebCoreApi.Models.AttendanceSetting |
| | | { |
| | | public class Attendance |
| | | { |
| | | public string wkshop_code { get; set; } |
| | | public string user_code { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace VueWebCoreApi.Models.AttendanceSetting |
| | | { |
| | | public class AttendanceRecord |
| | | { |
| | | /// <summary> |
| | | /// æ¥å·¥è®°å½id |
| | | /// </summary> |
| | | public string id { get; set; } |
| | | /// <summary> |
| | | /// 车é´ç¼ç |
| | | /// </summary> |
| | | public string wkshop_code { get; set; } |
| | | /// <summary> |
| | | /// æå¡äººåç¼ç |
| | | /// </summary> |
| | | public string creatusercode { get; set; } |
| | | /// <summary> |
| | | /// æå¡æ¥æ |
| | | /// </summary> |
| | | public string creatdate { get; set; } |
| | | /// <summary> |
| | | /// æ ¸ç®ç¶æ |
| | | /// </summary> |
| | | public string status { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace VueWebCoreApi.Models.AttendanceSetting |
| | | { |
| | | public class AttendanceSave |
| | | { |
| | | /// <summary> |
| | | /// 车é´ç¼ç |
| | | /// </summary> |
| | | public string wkshop_code { get; set; } |
| | | /// <summary> |
| | | /// æå¡äººåç¼ç |
| | | /// </summary> |
| | | public string creatusercode { get; set; } |
| | | /// <summary> |
| | | /// æå¡æ¥æ |
| | | /// </summary> |
| | | public string creatdate { get; set; } |
| | | /// <summary> |
| | | /// æ ¸ç®ç¶æ |
| | | /// </summary> |
| | | public string status { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace VueWebCoreApi.Models.AttendanceSetting |
| | | { |
| | | public class AttendanceSett |
| | | { |
| | | /// <summary> |
| | | /// 车é´ç¼ç |
| | | /// </summary> |
| | | public string wkshop_code { get; set; } |
| | | /// <summary> |
| | | /// ä¸çæ¶é´ |
| | | /// </summary> |
| | | public string workhouse { get; set; } |
| | | /// <summary> |
| | | /// ä¸çæ¶é´ |
| | | /// </summary> |
| | | public string closehouse { get; set; } |
| | | /// <summary> |
| | | /// æ£å¸¸ä¸ç工价 |
| | | /// </summary> |
| | | public string workprice { get; set; } |
| | | /// <summary> |
| | | /// å ç工价 |
| | | /// </summary> |
| | | public string overprice { get; set; } |
| | | /// <summary> |
| | | /// ä¸çæå¡ææèå´/å°æ¶ |
| | | /// </summary> |
| | | public string uphouse { get; set; } |
| | | /// <summary> |
| | | /// ä¸çæå¼ææèå´/å°æ¶ |
| | | /// </summary> |
| | | public string downhouse { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace VueWebCoreApi.Models.AttendanceSetting |
| | | { |
| | | public class DailyWageReport |
| | | { |
| | | /// <summary> |
| | | /// id |
| | | /// </summary> |
| | | public string id { get; set; } |
| | | /// <summary> |
| | | /// 车é´ç¼ç |
| | | /// </summary> |
| | | public string whshop_code { get; set; } |
| | | /// <summary> |
| | | /// æå¡æ¥æ |
| | | /// </summary> |
| | | public string checkindate { get; set; } |
| | | /// <summary> |
| | | /// æå¡äººå |
| | | /// </summary> |
| | | public string usercode { get; set; } |
| | | /// <summary> |
| | | /// 工使¶é¿(å°æ¶) |
| | | /// </summary> |
| | | public string workcount { get; set; } |
| | | /// <summary> |
| | | /// 计æ¶å·¥ä»·(å
/å°æ¶) |
| | | /// </summary> |
| | | public string workprice { get; set; } |
| | | /// <summary> |
| | | /// å çæ¶é¿(å°æ¶) |
| | | /// </summary> |
| | | public string overcount { get; set; } |
| | | /// <summary> |
| | | /// å ç工价(å
/å°æ¶) |
| | | /// </summary> |
| | | public string overprice { get; set; } |
| | | /// <summary> |
| | | /// æ£é¤æ¶é¿(å°æ¶) |
| | | /// </summary> |
| | | public string deductcount { get; set; } |
| | | /// <summary> |
| | | /// æ£é¤èªèµ(å
) |
| | | /// </summary> |
| | | public string deductmoney { get; set; } |
| | | /// <summary> |
| | | /// 计æ¶å·¥èµ(å
) |
| | | /// </summary> |
| | | public string timimoney { get; set; } |
| | | } |
| | | } |
| | |
| | | { |
| | | c.SwaggerDoc(version, new OpenApiInfo() |
| | | { |
| | | Title = $"æ°å¯è¿ªäº§å-MesApiææ¡£:{version}", |
| | | Title = $"æ¡¥ä¸å·¥è´¸-MesApiææ¡£:{version}", |
| | | Version = version, |
| | | Description = $"Panda.Sewerage : {version} ", |
| | | }); |
| | |
| | | /// <param name="sql">åå¨è¿ç¨å</param> |
| | | /// <param name="parm">åæ°</param> |
| | | /// <returns></returns> |
| | | public static bool selectProcedureTable(string sql, Object parm, out DataTable table) |
| | | { |
| | | bool result; |
| | | //sqlè¯å¥ |
| | | using (IDbConnection conn = sqlConnection()) |
| | | { |
| | | try |
| | | { |
| | | var res = conn.ExecuteReader(sql, parm, commandType: CommandType.StoredProcedure);//sql åå¨è¿ç¨ |
| | | table= (DataTable)res; |
| | | result = true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | //å建æ¥å¿è®°å½ç»ä»¶å®ä¾ |
| | | LogHelper.WriteLog(ex); |
| | | throw ex; |
| | | } |
| | | finally |
| | | { |
| | | conn.Dispose(); |
| | | conn.Close(); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Dapperæ§è¡åå¨è¿ç¨è¿ådatatableæ°æ®(另忰) |
| | | /// </summary> |
| | | /// <param name="sql">åå¨è¿ç¨å</param> |
| | | /// <param name="parm">åæ°</param> |
| | | /// <returns></returns> |
| | | public static bool IsProcedure(string sql, Object parm) |
| | | { |
| | | bool result; |
| | |
| | | "AllowedHosts": "*", |
| | | //æå¡å¨ç¯å¢ |
| | | "ConnectionStrings": { |
| | | "DBServer": "Data Source=121.196.36.24,1533;Initial Catalog=xkdvmes;User ID=sa;Password=xkd@20230101;pooling=false", |
| | | "DBServer": "Data Source=121.196.36.24,1533;Initial Catalog=vmes_qx;User ID=sa;Password=xkd@20230101;pooling=false", |
| | | //ä¼ä¸ç¼ç |
| | | "CompanyCode": "000", |
| | | //ä¼ä¸åç§° |