| | |
| | | } |
| | | |
| | | //回传出库单 |
| | | public bool FinishSo(int id, string url, int userId) |
| | | public bool FinishSo(int id, string url, string userNo, string pwd, int userId) |
| | | { |
| | | try |
| | | { |
| | | var loginPwd = Md5Tools.CalcMd5(pwd); |
| | | var date = Db.Queryable<SysUserInfor>().First(m => m.IsDel == "0" && m.UserName == userNo && m.PassWord == loginPwd); |
| | | |
| | | if (date == null) //账号密码是否正确 |
| | | { |
| | | throw new Exception("账号密码不正确或没有此账号"); |
| | | } |
| | | if (date.Status != "0") //当前账号是否正常启用 |
| | | { |
| | | throw new Exception("当前账号非启用状态"); |
| | | } |
| | | |
| | | var notice = Db.Queryable<BllExportNotice>().First(m => m.Id == id && m.IsDel == "0"); |
| | | if (notice == null) |
| | | { |
| | |
| | | { |
| | | throw new Exception("未查询到单据明细信息"); |
| | | } |
| | | if (userId == notice.UpdateUser) |
| | | if (date.Id == notice.UpdateUser) |
| | | { |
| | | throw new Exception("复核失败,复核人员和关闭订单人员不能相同!"); |
| | | } |
| | |
| | | |
| | | notice.Status = "6"; |
| | | notice.CheckTime = DateTime.Now; |
| | | notice.CheckUser = userId; |
| | | notice.CheckUser = date.Id; |
| | | Db.Updateable(notice).ExecuteCommand(); |
| | | |
| | | new OperationSOServer().AddLogOperationSo("出库作业", "出库单据", notice.SONo, "复核", $"复核了单据号为{notice.SONo}的单据信息", userId); |
| | | new OperationSOServer().AddLogOperationSo("出库作业", "出库单据", notice.SONo, "复核", $"{date.RealName}复核了单据号为{notice.SONo}的单据信息", userId); |
| | | return true; |
| | | } |
| | | catch (Exception e) |