| | |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 获取工序详情 |
| | | /// </summary> |
| | | /// <param name="hItemId"></param> |
| | | /// <returns></returns> |
| | | public static ApiResult<Models.M_Process> GetProcessDetail(int hItemId) |
| | | { |
| | | var processModel = ProcessDal.GetProcessDetail(hItemId); |
| | | if (processModel == null) |
| | | return new ApiResult<M_Process> { code = -1, msg = "查询为空" }; |
| | | processModel.DepartmentModel = ProcessDal.GetDepartmentModel(processModel.HDeptID); |
| | | processModel.ProcMulModel = ProcessDal.GetProcMulModel(processModel.HProcMulID); |
| | | return new ApiResult<M_Process> { code = 1, msg = "查询成功", data = processModel }; |
| | | } |
| | | /// <summary> |
| | | /// 获取工序列表 |
| | | /// </summary> |
| | | /// <param name="hName"></param> |
| | | /// <param name="hLevel"></param> |
| | | /// <param name="hNumber"></param> |
| | | /// <param name="hBillSubType"></param> |
| | | /// <returns></returns> |
| | | public static ApiResult<List<Models.M_Process>> GetProcessList(string hName, int hLevel, string hNumber, string hBillSubType, int page, int limit) |
| | | { |
| | | int pageCount = 0; |
| | | var list = ProcessDal.GetProcessList(hName, hLevel, hNumber, hBillSubType, page, limit, ref pageCount); |
| | | if (list?.Count == 0) |
| | | return new ApiResult<List<M_Process>> { code = -1, msg = "查询为空" }; |
| | | return new ApiResult<List<M_Process>> { code = 0, msg = "查询成功", data = list, count = pageCount }; |
| | | } |
| | | /// <summary> |
| | | /// 删除一条工序 |
| | | /// </summary> |
| | | /// <param name="hItemID"></param> |
| | | /// <returns></returns> |
| | | public static ApiResult DeleteProcess(int hItemID) |
| | | { |
| | | var result = ProcessDal.DeleteProcess(hItemID); |
| | | if (result > 0) |
| | | return new ApiResult { code = 1, msg = "删除成功" }; |
| | | return new ApiResult { code = -1, msg = "删除数据不存在" }; |
| | | } |
| | | #region sql语句 |
| | | public static DataSet GetStationOutBill(string strWhere) |
| | | { |
| | |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID("3791", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //oCN.BeginTran(); |
| | | oCN.BeginTran(); |
| | | var sql = "Insert Into Sc_StationOutBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark" + |