1.工单派发选择工艺路线或选择生产车间时判断绑定条件接口开发
2.组织架构删除update改为delete
3.工艺路线新增else if改为if
4.节拍工价根据工序线编码查找关联设备集合
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[工单派发选择工艺路线或选择生产车间时判断绑定条件] |
| | | /// <summary> |
| | | /// 工单派发选择工艺路线或选择生产车间时判断绑定条件 |
| | | /// </summary> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <param name="wkshopcode">车间编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "SelectRouteOrWkshop")] |
| | | [HttpGet] |
| | | public HttpResponseMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode) |
| | | { |
| | | mes = ProductionManagementBLL.SelectRouteOrWkshop(partcode, routecode, wkshopcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[MES工单新增、编辑提交] |
| | | /// <summary> |
| | | /// MES工单新增、编辑提交 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[工单派发选择工艺路线或选择生产车间时判断绑定条件] |
| | | public static ToMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode) |
| | | { |
| | | return ProductionManagementDAL.SelectRouteOrWkshop(partcode, routecode, wkshopcode); |
| | | } |
| | | #endregion |
| | | |
| | | #region[MES工单新增、编辑提交] |
| | | public static ToMessage AddUpdateMesOrder(string mesorderstus, string mesordercode,string sourceorder,string ordertype, string partcode, string mesqty, string routecode, string wkshopcode, string planstartdate, string planenddate, string orderlev, string username, string opertype) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | sql = @"update TOrganization set is_delete='1' where id=@orgid"; |
| | | sql = @"delete TOrganization where id=@orgid"; |
| | | dynamicParams.Add(@"orgid", orgid); |
| | | cont = DapperHelper.SQL(sql, dynamicParams); |
| | | if (cont > 0) |
| | |
| | | { |
| | | is_firststep = "Y"; |
| | | } |
| | | else if (Convert.ToInt32(json.Data.Rows[i]["SEQ"].ToString()) == json.Data.Rows.Count) //是否末道工序 |
| | | if (Convert.ToInt32(json.Data.Rows[i]["SEQ"].ToString()) == json.Data.Rows.Count) //是否末道工序 |
| | | { |
| | | is_laststep = "Y"; |
| | | } |
| | |
| | | if (steptype == "Z") //自制工序 |
| | | { |
| | | total = 0; //总条数 |
| | | //sql = @"select B.code as eqpcode,B.name as eqpname,B.wksp_code,T.org_name as wksp_name,A.eqp_value,A.stand_value,A.cavity_qty,A.unprice |
| | | // from ( |
| | | // select materiel_code, eqp_code,eqp_value,stand_value,cavity_qty,unprice from TPrteEqp_Stad |
| | | // where materiel_code=@partcode and route_code=@routecode and step_code=@stepcode |
| | | // union all |
| | | // select @partcode as materiel_code,eqp_code,'0' as eqp_value,'0' as stand_value,'0' as cavity_qty,'0' as unprice |
| | | // from TFlw_Rteqp where step_code=@stepcode and style='E' and @partcode+eqp_code+step_code not in(select materiel_code+eqp_code+step_code from TPrteEqp_Stad) |
| | | // ) A |
| | | // left join TEqpInfo B on A.eqp_code=B.code |
| | | // left join TOrganization T on B.wksp_code=T.org_code |
| | | // left join TMateriel_Info C on A.materiel_code=C.partcode |
| | | // where B.is_delete<>'1' and T.is_delete<>'1' and C.is_delete<>'1' "; |
| | | |
| | | sql = @"select B.code as eqpcode,B.name as eqpname,B.wksp_code,T.org_name as wksp_name,A.eqp_value,A.stand_value,A.cavity_qty,A.unprice |
| | | from ( |
| | | select materiel_code, eqp_code,eqp_value,stand_value,cavity_qty,unprice from TPrteEqp_Stad |
| | | where materiel_code=@partcode and route_code=@routecode and step_code=@stepcode |
| | | union all |
| | | select @partcode as materiel_code,eqp_code,'0' as eqp_value,'0' as stand_value,'0' as cavity_qty,'0' as unprice |
| | | from TFlw_Rteqp where step_code=@stepcode and style='E' and @partcode+eqp_code+step_code not in(select materiel_code+eqp_code+step_code from TPrteEqp_Stad) |
| | | select @partcode as materiel_code,C.eqp_code,'0' as eqp_value,'0' as stand_value,'0' as cavity_qty,'0' as unprice |
| | | from TFlw_Rout A |
| | | inner join TFlw_Rtdt B on A.code=B.rout_code |
| | | left join TFlw_Rteqp C on B.step_code=C.step_code |
| | | where A.code=@routecode and B.step_code=@stepcode and style='E' and @partcode+A.code+C.eqp_code+B.step_code |
| | | not in(select materiel_code+route_code+eqp_code+step_code from TPrteEqp_Stad where materiel_code=@partcode and route_code=@routecode and step_code=@stepcode) |
| | | ) A |
| | | left join TEqpInfo B on A.eqp_code=B.code |
| | | left join TOrganization T on B.wksp_code=T.org_code |
| | | left join TMateriel_Info C on A.materiel_code=C.partcode |
| | | where B.is_delete<>'1' and T.is_delete<>'1' and C.is_delete<>'1' "; |
| | | where B.is_delete<>'1' and T.is_delete<>'1' and C.is_delete<>'1'"; |
| | | dynamicParams.Add("@partcode", partcode); |
| | | dynamicParams.Add("@routecode", routecode); |
| | | dynamicParams.Add("@stepcode", stepcode); |
| | |
| | | else //外协工序 |
| | | { |
| | | total = 0; //总条数 |
| | | sql = @"select B.code as eqpcode,B.name as eqpname,'' as wksp_code,'' as wksp_name,A.eqp_value,A.stand_value,A.cavity_qty,A.unprice |
| | | //sql = @"select B.code as eqpcode,B.name as eqpname,'' as wksp_code,'' as wksp_name,A.eqp_value,A.stand_value,A.cavity_qty,A.unprice |
| | | // from ( |
| | | // select materiel_code, eqp_code,eqp_value,stand_value,cavity_qty,unprice from TPrteEqp_Stad |
| | | // where materiel_code=@partcode and route_code=@routecode and step_code=@stepcode |
| | | // union all |
| | | // select @partcode as materiel_code,eqp_code,'0' as eqp_value,'0' as stand_value,'0' as cavity_qty,'0' as unprice |
| | | // from TFlw_Rteqp where step_code=@stepcode and style='W' and @partcode+eqp_code+step_code not in(select materiel_code+eqp_code+step_code from TPrteEqp_Stad) |
| | | // ) A |
| | | // left join TCustomer B on A.eqp_code=B.code |
| | | // where B.is_delete<>'1'"; |
| | | sql = @"select B.code as eqpcode,B.name as eqpname,'' as wksp_code,'' as wksp_name,A.eqp_value,A.stand_value,A.cavity_qty,A.unprice |
| | | from ( |
| | | select materiel_code, eqp_code,eqp_value,stand_value,cavity_qty,unprice from TPrteEqp_Stad |
| | | where materiel_code=@partcode and route_code=@routecode and step_code=@stepcode |
| | | union all |
| | | select @partcode as materiel_code,eqp_code,'0' as eqp_value,'0' as stand_value,'0' as cavity_qty,'0' as unprice |
| | | from TFlw_Rteqp where step_code=@stepcode and style='W' and @partcode+eqp_code+step_code not in(select materiel_code+eqp_code+step_code from TPrteEqp_Stad) |
| | | select @partcode as materiel_code,C.eqp_code,'0' as eqp_value,'0' as stand_value,'0' as cavity_qty,'0' as unprice |
| | | from TFlw_Rout A |
| | | inner join TFlw_Rtdt B on A.code=B.rout_code |
| | | left join TFlw_Rteqp C on B.step_code=C.step_code |
| | | where A.code=@routecode and B.step_code=@stepcode and style='W' and @partcode+A.code+C.eqp_code+B.step_code |
| | | not in(select materiel_code+route_code+eqp_code+step_code from TPrteEqp_Stad where materiel_code=@partcode and route_code=@routecode and step_code=@stepcode) |
| | | ) A |
| | | left join TCustomer B on A.eqp_code=B.code |
| | | where B.is_delete<>'1'"; |
| | |
| | | { |
| | | if (partcode != "" && partcode != null) |
| | | { |
| | | search += "and AA.materiel_code=@partcode "; |
| | | search += "and AA.partcode=@partcode "; |
| | | dynamicParams.Add("@partcode", partcode); |
| | | } |
| | | if (routecode != "" && routecode != null) |
| | |
| | | } |
| | | if (stepcode != "" && stepcode != null) |
| | | { |
| | | search += "and AA.step_code=@stepcode "; |
| | | search += "and AA.stepcode=@stepcode "; |
| | | dynamicParams.Add("@stepcode", stepcode); |
| | | } |
| | | if (eqpcode != "" && eqpcode != null) |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[工单派发选择工艺路线或选择生产车间时判断绑定条件] |
| | | public static ToMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode) |
| | | { |
| | | string sql = ""; |
| | | var dynamicParams = new DynamicParameters(); |
| | | try |
| | | { |
| | | mes.code = "200"; |
| | | mes.Message = ""; |
| | | mes.data = null; |
| | | //判断工艺路线对应工序是否都有关联工作站 |
| | | sql = @"select B.step_code,C.eqp_code from TFlw_Rout A |
| | | inner join TFlw_Rtdt B on A.code=B.rout_code |
| | | left join TFlw_Rteqp C on B.step_code=C.step_code |
| | | where A.code=@routecode"; |
| | | dynamicParams.Add("@routecode", routecode); |
| | | var dtck = DapperHelper.selectdata(sql, dynamicParams); |
| | | for (int i = 0; i < dtck.Rows.Count; i++) |
| | | { |
| | | if (dtck.Rows[i].IsNull("eqp_code")) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.Message = "当前工艺路线对应工序【" + dtck.Rows[i]["step_code"].ToString() + "】,未关联设备,请关联所有工序对应设备!"; |
| | | mes.data = null; |
| | | return mes; |
| | | } |
| | | } |
| | | //判断工艺路线对应工序关联的工作站是否有设置节拍工价 |
| | | sql = @"select AA.step_code,AA.eqp_code,S.unprice from ( |
| | | select A.code,B.step_code,C.eqp_code from TFlw_Rout A |
| | | inner join TFlw_Rtdt B on A.code=B.rout_code |
| | | left join TFlw_Rteqp C on B.step_code=C.step_code |
| | | where A.code=@route_code |
| | | ) as AA |
| | | left join (select * from TPrteEqp_Stad where materiel_code=@partcode and route_code=@route_code) as S on |
| | | AA.code=S.route_code and AA.step_code=S.step_code and AA.eqp_code=S.eqp_code"; |
| | | dynamicParams.Add("@partcode", partcode); |
| | | dynamicParams.Add("@route_code", routecode); |
| | | var dtc = DapperHelper.selectdata(sql, dynamicParams); |
| | | for (int i = 0; i < dtc.Rows.Count; i++) |
| | | { |
| | | if (dtc.Rows[i].IsNull("unprice") || decimal.Parse(dtc.Rows[i]["unprice"].ToString()) == 0) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.Message = "节拍工价中:当前产品【" + partcode + "】,对应工艺路线【" + routecode + "】未设置(或未设置全)或工价小于等于0!"; |
| | | mes.data = null; |
| | | return mes; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.Message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[MES工单新增、编辑提交] |
| | | public static ToMessage AddUpdateMesOrder(string mesorderstus, string sourceorder, string ordertype, string mesordercode, string partcode, string mesqty, string routecode, string wkshopcode, string planstartdate, string planenddate, string orderlev, string username, string opertype) |
| | | { |
| | |
| | | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <_PublishTargetUrl>D:\网站发布\MES灵翔</_PublishTargetUrl> |
| | | <History>True|2022-12-06T01:25:41.3057126Z;True|2022-12-06T09:16:45.3313819+08:00;True|2022-12-05T17:22:41.5632159+08:00;True|2022-12-05T17:08:31.1207925+08:00;True|2022-12-05T16:40:51.0731150+08:00;True|2022-12-05T13:17:38.4883581+08:00;True|2022-12-05T13:16:11.2439234+08:00;True|2022-12-05T13:11:31.6502410+08:00;True|2022-12-05T13:06:31.8519147+08:00;True|2022-11-28T17:29:35.0448121+08:00;True|2022-11-21T15:13:51.4848378+08:00;True|2022-11-21T11:02:59.6984011+08:00;True|2022-11-21T10:55:50.7022834+08:00;True|2022-11-18T16:03:51.0449470+08:00;False|2022-11-18T16:03:09.4203709+08:00;True|2022-11-18T16:01:39.4591963+08:00;True|2022-11-18T15:18:55.9443587+08:00;True|2022-11-18T15:18:44.4492390+08:00;True|2022-11-18T13:29:22.9601475+08:00;True|2022-11-18T13:29:05.4108151+08:00;True|2022-11-18T13:25:30.9305617+08:00;True|2022-11-17T10:13:35.2543186+08:00;True|2022-11-16T11:50:20.8332089+08:00;True|2022-11-16T10:30:15.8662476+08:00;True|2022-11-16T09:54:50.9630719+08:00;True|2022-11-11T13:23:20.3484151+08:00;True|2022-11-09T13:07:34.9422662+08:00;True|2022-11-09T10:59:58.4912849+08:00;True|2022-11-09T10:11:04.4851324+08:00;True|2022-11-09T10:10:46.8698985+08:00;</History> |
| | | <History>True|2023-03-04T03:02:31.6417325Z;True|2023-03-03T16:05:26.3953033+08:00;True|2023-02-20T19:56:38.3685951+08:00;True|2022-12-06T09:25:41.3057126+08:00;True|2022-12-06T09:16:45.3313819+08:00;True|2022-12-05T17:22:41.5632159+08:00;True|2022-12-05T17:08:31.1207925+08:00;True|2022-12-05T16:40:51.0731150+08:00;True|2022-12-05T13:17:38.4883581+08:00;True|2022-12-05T13:16:11.2439234+08:00;True|2022-12-05T13:11:31.6502410+08:00;True|2022-12-05T13:06:31.8519147+08:00;True|2022-11-28T17:29:35.0448121+08:00;True|2022-11-21T15:13:51.4848378+08:00;True|2022-11-21T11:02:59.6984011+08:00;True|2022-11-21T10:55:50.7022834+08:00;True|2022-11-18T16:03:51.0449470+08:00;False|2022-11-18T16:03:09.4203709+08:00;True|2022-11-18T16:01:39.4591963+08:00;True|2022-11-18T15:18:55.9443587+08:00;True|2022-11-18T15:18:44.4492390+08:00;True|2022-11-18T13:29:22.9601475+08:00;True|2022-11-18T13:29:05.4108151+08:00;True|2022-11-18T13:25:30.9305617+08:00;True|2022-11-17T10:13:35.2543186+08:00;True|2022-11-16T11:50:20.8332089+08:00;True|2022-11-16T10:30:15.8662476+08:00;True|2022-11-16T09:54:50.9630719+08:00;True|2022-11-11T13:23:20.3484151+08:00;True|2022-11-09T13:07:34.9422662+08:00;True|2022-11-09T10:59:58.4912849+08:00;True|2022-11-09T10:11:04.4851324+08:00;True|2022-11-09T10:10:46.8698985+08:00;</History> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <File Include="Areas/HelpPage/HelpPage.css"> |
| | |
| | | <publishTime>12/24/2021 15:38:29</publishTime> |
| | | </File> |
| | | <File Include="bin/VueWebApi.dll"> |
| | | <publishTime>12/06/2022 09:25:35</publishTime> |
| | | <publishTime>03/04/2023 11:02:29</publishTime> |
| | | </File> |
| | | <File Include="bin/VueWebApi.pdb"> |
| | | <publishTime>12/06/2022 09:25:35</publishTime> |
| | | <publishTime>03/04/2023 11:02:29</publishTime> |
| | | </File> |
| | | <File Include="bin/VueWebApi.xml"> |
| | | <publishTime>12/06/2022 09:25:35</publishTime> |
| | | <publishTime>03/04/2023 11:02:28</publishTime> |
| | | </File> |
| | | <File Include="bin/WebActivatorEx.dll"> |
| | | <publishTime>02/08/2013 16:42:28</publishTime> |
| | |
| | | <publishTime>06/16/2022 13:39:23</publishTime> |
| | | </File> |
| | | <File Include="Web.config"> |
| | | <publishTime>12/06/2022 09:25:40</publishTime> |
| | | <publishTime>03/04/2023 11:02:30</publishTime> |
| | | </File> |
| | | </ItemGroup> |
| | | </Project> |
| | |
| | | <param name="routecode">工艺路线编码</param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:VueWebApi.Controllers.ProductionManagementController.SelectRouteOrWkshop(System.String,System.String,System.String)"> |
| | | <summary> |
| | | 工单派发选择工艺路线或选择生产车间时判断绑定条件 |
| | | </summary> |
| | | <param name="partcode">产品编码</param> |
| | | <param name="routecode">工艺路线编码</param> |
| | | <param name="wkshopcode">车间编码</param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:VueWebApi.Controllers.ProductionManagementController.AddUpdateMesOrder(Newtonsoft.Json.Linq.JObject)"> |
| | | <summary> |
| | | MES工单新增、编辑提交 |
| | |
| | | <param name="routecode">工艺路线编码</param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:VueWebApi.Controllers.ProductionManagementController.SelectRouteOrWkshop(System.String,System.String,System.String)"> |
| | | <summary> |
| | | 工单派发选择工艺路线或选择生产车间时判断绑定条件 |
| | | </summary> |
| | | <param name="partcode">产品编码</param> |
| | | <param name="routecode">工艺路线编码</param> |
| | | <param name="wkshopcode">车间编码</param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:VueWebApi.Controllers.ProductionManagementController.AddUpdateMesOrder(Newtonsoft.Json.Linq.JObject)"> |
| | | <summary> |
| | | MES工单新增、编辑提交 |
| | |
| | | D:\新凯迪MES\MES项目\MES灵翔\VueWebApi\VueWebApi\bin\zh-Hans\System.Web.WebPages.resources.dll |
| | | D:\新凯迪MES\MES项目\MES灵翔\VueWebApi\VueWebApi\bin\zh-Hans\System.Web.WebPages.Deployment.resources.dll |
| | | D:\新凯迪MES\MES项目\MES灵翔\VueWebApi\VueWebApi\bin\zh-Hans\System.Web.WebPages.Razor.resources.dll |
| | | D:\新凯迪MES\MES项目\MES灵翔\VueWebApi\VueWebApi\obj\Release\VueWebApi.csproj.AssemblyReference.cache |
| | | D:\新凯迪MES\MES项目\MES灵翔\VueWebApi\VueWebApi\obj\Release\VueWebApi.csproj.CoreCompileInputs.cache |
| | | D:\新凯迪MES\MES项目\MES灵翔\VueWebApi\VueWebApi\obj\Release\VueWebApi.csproj.CopyComplete |
| | | D:\新凯迪MES\MES项目\MES灵翔\VueWebApi\VueWebApi\obj\Release\VueWebApi.dll |