| | |
| | | { |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | #region [模具报废入库单审核、反审核] |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | //审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | //审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | public object set_DeleteBill(string HInterID,string user) |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapInBill_Delete", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapInBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 器具报废入库单审核/反审核 |
| | | [Route("Sc_MouldScrapInBill/AuditMouldScrapInBill")] |
| | | [HttpGet] |
| | | public object AuditMouldScrapInBill(string HInterID, string user, int flag) |
| | | { |
| | | //flag=1 审核; flag=2 反审核 |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapInBill_Check", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无审核权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | if (lngBillKey == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据ID为空!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DLL.ClsSc_MouldProdOutBill oBill = new DLL.ClsSc_MouldProdOutBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | if (flag == 1) |
| | | { |
| | | if (oBill.omodel.HBillStatus == 2) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "当前单据已审核,无需再次审核"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | string HCheckDate = DateTime.Now.Date.ToString(); |
| | | oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker ='" + user + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HBillType='3831' and HInterID=" + HInterID); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核成功!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (oBill.omodel.HBillStatus == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "当前单据未审核,无需反审核"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | string HCheckDate = DateTime.Now.Date.ToString(); |
| | | oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker=' ',HCheckDate=' ',HBillStatus=1 Where HBillType='3831' and HInterID=" + HInterID); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反审核成功!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据未找到"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 模具报废入库单列表 |
| | | |
| | |
| | | try |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapRequestBillList", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapRequestBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |