jhz
2022-08-09 9d93f219367a57659c6641319922dee224e68d39
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -501,7 +501,7 @@
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select 流水号 HProcNo,HProcID,工序代码 HProcNumber,工序名称 HProcName,加工说明 HWorkRemark,HCenterID,工作中心代码 HCenterNumber,
                                                工作中心 HCenterName,HSupID,供应商代码 HSupNumber,供应商 HSupName,isEntrust,计划数量 HQty,加工单价 HOutPrice, 表体备注 HRemark,
                                            进站数量 HRelationQty_In,出站数量 HRelationQty_Out,委外工单数量 HRelationQty_WWOrder,不合格数量 HRelationQty_Bad,超额比例 HOverRate,
                                            进站关联数量 HRelationQty_In,出站关联数量 HRelationQty_Out,委外工单数量 HRelationQty_WWOrder,不合格数量 HRelationQty_Bad,超额比例 HOverRate,
                                            良率 HPassRate,累计良率 HSumPassRate,图纸编号 HPicNum,本工序确认记录 HProcCheckNote,工艺参数 HTechnologyParameter,HDeptID,
                                            加工车间代码 HDeptNumber,加工车间 HDeptName
                                            from h_v_Sc_ProcessExchangeBillQuerySub");
@@ -552,6 +552,25 @@
                objJsonResult.data = null;
                return objJsonResult;
            }
            //删除前判断关联数量
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet ds;
            ds = oCn.RunProcReturn("select ct from (  " +
                          "  select 1 ct from Sc_StationInBillMain Where HProcExchInterID=" + lngBillKey + " " +
                          "  union all " +
                          "  select 1 from Sc_StationOutBillMain Where HProcExchInterID=" + lngBillKey + " ) as a  ", "Sc_ProcExchReportSub");
            if (ds.Tables[0].Rows.Count != 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "流转卡已经有下游进出站单后,不允许删除!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            DAL.ClsSc_ProcessExchangeBill oBill = new DAL.ClsSc_ProcessExchangeBill();
            DBUtility.ClsPub.HOrgID = HPRDORGID;
            if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))