| | |
| | | public int HOrgID;//组织 |
| | | public string HPZStatus;//品质确认 |
| | | public string HCKStatus;//仓库接收 |
| | | public string Arbitrarily;//任意参数 |
| | | } |
| | | |
| | | [Route("Cj_CallGoodsBillBack/CallGoodsBillBackMainList")] |
| | |
| | | } |
| | | |
| | | CallGoodsBill ca = JsonConvert.DeserializeObject<CallGoodsBill>(sWhere); |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoodsBillList_Query '{ca.HBillNo}','{ca.MaterialNumber}','{ca.MaterialName}','{ca.MaterialModel}'," + |
| | | $"'{ca.ProcMul}','{ca.HDeptName}',{ca.HOrgID},'{ca.Hmaker}','{ca.HPZStatus}','{ca.HCKStatus}','{ca.HBeginDate}','{ca.HEndDate.AddDays(1).AddSeconds(-1)}'", "h_p_JIT_BackGoodsBillList_Query"); |
| | | oCN.RunProc($"exec h_p_JIT_BackGoodsBillList_Query '{ca.HBillNo}','{ca.MaterialNumber}','{ca.MaterialName}','{ca.MaterialModel}'," + |
| | | $"'{ca.ProcMul}','{ca.HDeptName}',{ca.HOrgID},'{ca.Hmaker}','{ca.HPZStatus}','{ca.HCKStatus}','{ca.HBeginDate}','{ca.HEndDate.AddDays(1).AddSeconds(-1)}'"); |
| | | |
| | | if (ca.HPZStatus == "全部" && ca.HCKStatus == "全部") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query1 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query1"); |
| | | } |
| | | else if (ca.HPZStatus != "全部" && ca.HCKStatus == "全部") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query2 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query2"); |
| | | } |
| | | else if (ca.HPZStatus == "全部" && ca.HCKStatus != "全部") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query3 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query3"); |
| | | } |
| | | else if (ca.HPZStatus != "全部" && ca.HCKStatus != "全部") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query4 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query4"); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 叫料退料单 删除 |
| | | [Route("Cj_CallGoodsBillBack/DelCallGoodsBill")] |
| | | [HttpGet] |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 叫料单列表 (默认查询) |
| | | [Route("Cj_CallGoodsBillBack/JIT_BackGoodsList")] |
| | | [HttpGet] |
| | | public object JIT_BackGoodsList(string HInterID, string user) |
| | | { |
| | | try |
| | | { |
| | | if (HInterID == null || HInterID.Equals("")) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | | objJsonResult.data = new DataTable(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoods_Load '{HInterID}'", "h_p_JIT_BackGoods_Load"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |