1.工单派发校验工价,工价未提前设置或设置部分,如果开关关闭时,不校验是否未设置
或者未设置全,工价复制表中都会写入,没有设置的工价就默认0
如果开关打开就必须要设置工价
| | |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <param name="wkshopcode">车间编码</param> |
| | | /// <param name="is_steprice">是否工价管控</param> |
| | | /// <returns></returns> |
| | | [Route(template: "SelectRouteOrWkshop")] |
| | | [HttpGet] |
| | | public HttpResponseMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode) |
| | | public HttpResponseMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode,string is_steprice) |
| | | { |
| | | mes = ProductionManagementBLL.SelectRouteOrWkshop(partcode, routecode, wkshopcode); |
| | | mes = ProductionManagementBLL.SelectRouteOrWkshop(partcode, routecode, wkshopcode, is_steprice); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | #endregion |
| | | |
| | | #region[工单派发选择工艺路线或选择生产车间时判断绑定条件] |
| | | public static ToMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode) |
| | | public static ToMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode,string is_steprice) |
| | | { |
| | | return ProductionManagementDAL.SelectRouteOrWkshop(partcode,routecode,wkshopcode); |
| | | return ProductionManagementDAL.SelectRouteOrWkshop(partcode,routecode,wkshopcode, is_steprice); |
| | | } |
| | | #endregion |
| | | |
| | |
| | | try |
| | | { |
| | | //获取工艺路线对应工序信息 |
| | | sql = @"select A.seq,T.stepcode,T.stepname,T.flwtype,T.descr from TFlw_Rtdt A |
| | | sql = @"select A.seq,T.stepcode,T.stepname,T.flwtype,T.descr,'0' as stepprice from TFlw_Rtdt A |
| | | left join TStep T on A.step_code=T.stepcode |
| | | where A.rout_code=@partcode "; |
| | | dynamicParams.Add("@partcode", routecode); |
| | |
| | | #endregion |
| | | |
| | | #region[工单派发选择工艺路线或选择生产车间时判断绑定条件] |
| | | public static ToMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode) |
| | | public static ToMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode,string is_steprice) |
| | | { |
| | | string sql = ""; |
| | | var dynamicParams = new DynamicParameters(); |
| | |
| | | return mes; |
| | | } |
| | | } |
| | | //判断工艺路线对应工序关联的工作站是否有设置节拍工价 |
| | | sql = @"select AA.step_code,AA.eqp_code,AA.flwtype,S.unprice from ( |
| | | if (is_steprice == "Y") |
| | | { |
| | | //判断工艺路线对应工序关联的工作站是否有设置节拍工价 |
| | | sql = @"select AA.step_code,AA.eqp_code,AA.flwtype,S.unprice from ( |
| | | select A.code,B.step_code,C.eqp_code,S.flwtype 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 |
| | |
| | | ) as AA |
| | | left join (select * from TPrteEqp_Stad where materiel_code=@partcode and route_code=@route_code and wkspcode=@wkshopcode) 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); |
| | | dynamicParams.Add("@wkshopcode", wkshopcode); |
| | | var dtc = DapperHelper.selectdata(sql, dynamicParams); |
| | | for (int i = 0; i < dtc.Rows.Count; i++) |
| | | { |
| | | if (dtc.Rows[i]["flwtype"].ToString() == "Z") //判断工序是否为自制 |
| | | dynamicParams.Add("@partcode", partcode); |
| | | dynamicParams.Add("@route_code", routecode); |
| | | dynamicParams.Add("@wkshopcode", wkshopcode); |
| | | 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) |
| | | if (dtc.Rows[i]["flwtype"].ToString() == "Z") //判断工序是否为自制 |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.Message = "节拍工价中:当前产品【" + partcode + "】,对应工艺路线【" + routecode + "】未设置(或未设置全)或工价小于等于0!"; |
| | | mes.data = null; |
| | | return mes; |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | CreateDate = DateTime.Now.ToString() |
| | | } |
| | | }); |
| | | |
| | | //写入工单工艺路线工序工价复制表 |
| | | sql = @"insert into TWoPrteEqp_Stad(wo,materiel_code,eqp_code,stand_value,opc_conver,route_code,unprice,eqp_value,cavity_qty,wkspcode,lm_user,lm_date,torg_code,is_delete,step_code) |
| | | select distinct @mesordercode as wo,S.materiel_code,S.eqp_code,S.stand_value,S.opc_conver,S.route_code,S.unprice, |
| | | S.eqp_value,S.cavity_qty,S.wkspcode,S.lm_user,S.lm_date,S.torg_code,S.is_delete,S.step_code |
| | | select distinct @mesordercode as wo,@partcode as materiel_code,AA.eqp_code,isnull(S.stand_value,0) as stand_value,isnull(S.opc_conver,0) as opc_conver,AA.rout_code, |
| | | isnull(S.unprice,0) as unprice,isnull(S.eqp_value,0) as eqp_value,isnull(S.cavity_qty,0) as cavity_qty,@wkshopcode as wkspcode,@usercode as lm_user, |
| | | getdate() as lm_date,S.torg_code,isnull(S.is_delete,0) as is_delete,AA.step_code from ( |
| | | select A.rout_code,A.step_code,C.eqp_code |
| | | from TFlw_Rtdt A |
| | | inner join TFlw_Rteqp C on A.step_code=C.step_code |
| | | inner join (select * from TPrteEqp_Stad where materiel_code=@materiel_code and route_code=@routecode) as S on C.step_code=S.step_code and C.eqp_code=S.eqp_code"; |
| | | where A.rout_code=@routecode |
| | | ) as AA |
| | | left join (select * from TPrteEqp_Stad where materiel_code=@partcode and route_code=@routecode) as S on AA.step_code=S.step_code and AA.eqp_code=S.eqp_code"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | mesordercode = mesordercode, |
| | | materiel_code = partcode, |
| | | routecode = routecode |
| | | wkshopcode = wkshopcode, |
| | | partcode = partcode, |
| | | routecode = routecode, |
| | | usercode = username |
| | | } |
| | | }); |
| | | |
| | |
| | | }); |
| | | //写入工单工艺路线工序工价复制表 |
| | | sql = @"insert into TWoPrteEqp_Stad(wo,materiel_code,eqp_code,stand_value,opc_conver,route_code,unprice,eqp_value,cavity_qty,wkspcode,lm_user,lm_date,torg_code,is_delete,step_code) |
| | | select distinct @mesordercode as wo,S.materiel_code,S.eqp_code,S.stand_value,S.opc_conver,S.route_code,S.unprice, |
| | | S.eqp_value,S.cavity_qty,S.wkspcode,S.lm_user,S.lm_date,S.torg_code,S.is_delete,S.step_code |
| | | select distinct @mesordercode as wo,@partcode as materiel_code,AA.eqp_code,isnull(S.stand_value,0) as stand_value,isnull(S.opc_conver,0) as opc_conver,AA.rout_code, |
| | | isnull(S.unprice,0) as unprice,isnull(S.eqp_value,0) as eqp_value,isnull(S.cavity_qty,0) as cavity_qty,@wkshopcode as wkspcode,@usercode as lm_user, |
| | | getdate() as lm_date,S.torg_code,isnull(S.is_delete,0) as is_delete,AA.step_code from ( |
| | | select A.rout_code,A.step_code,C.eqp_code |
| | | from TFlw_Rtdt A |
| | | inner join TFlw_Rteqp C on A.step_code=C.step_code |
| | | inner join (select * from TPrteEqp_Stad where materiel_code=@materiel_code and route_code=@routecode) as S on C.step_code=S.step_code and C.eqp_code=S.eqp_code"; |
| | | where A.rout_code=@routecode |
| | | ) as AA |
| | | left join (select * from TPrteEqp_Stad where materiel_code=@partcode and route_code=@routecode) as S on AA.step_code=S.step_code and AA.eqp_code=S.eqp_code"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | mesordercode = mesordercode, |
| | | materiel_code = partcode, |
| | | routecode = routecode |
| | | wkshopcode = wkshopcode, |
| | | partcode = partcode, |
| | | routecode = routecode, |
| | | usercode = username |
| | | } |
| | | }); |
| | | |
| | | |
| | | bool aa = DapperHelper.DoTransaction(list); |
| | | if (aa) |
| | |
| | | dynamicParams.Add("@wo_code", ordercode); |
| | | dynamicParams.Add("@stepcode", stepcode); |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | | mes.code = "200"; |
| | | mes.Message = "查询成功!"; |
| | | mes.data = data; |
| | | if (data.Rows.Count > 0) |
| | | { |
| | | mes.code = "200"; |
| | | mes.Message = "查询成功!"; |
| | | mes.data = data; |
| | | } |
| | | else |
| | | { |
| | | mes.code = "300"; |
| | | mes.Message = "当前工序未关联生产设备!"; |
| | | mes.data = null; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <_PublishTargetUrl>D:\网站发布\MES正清河</_PublishTargetUrl> |
| | | <History>True|2023-09-26T23:47:41.5372303Z;True|2023-09-21T18:22:16.9575605+08:00;True|2023-09-21T18:09:09.2828591+08:00;True|2023-09-21T17:57:05.3919457+08:00;True|2023-09-21T17:40:17.7722883+08:00;True|2023-09-21T17:24:20.7004108+08:00;True|2023-09-21T17:14:30.5230341+08:00;True|2023-09-21T15:14:11.3019288+08:00;True|2023-09-20T09:47:15.7375677+08:00;True|2023-09-12T14:37:37.0665432+08:00;True|2023-08-16T16:52:02.7063729+08:00;True|2023-08-11T10:35:11.9236725+08:00;True|2023-08-07T10:34:44.0844087+08:00;True|2023-08-07T10:28:56.2230477+08:00;True|2023-07-31T11:18:06.9546379+08:00;True|2023-07-03T10:38:22.8080444+08:00;True|2023-06-26T08:15:27.3611577+08:00;True|2023-06-25T15:36:41.8736654+08:00;True|2023-06-25T14:33:49.5287543+08:00;True|2023-06-13T10:24:59.6876648+08:00;</History> |
| | | <History>True|2023-10-10T02:34:01.3167190Z;True|2023-10-10T10:28:48.9531906+08:00;True|2023-10-10T09:54:43.0218459+08:00;True|2023-10-10T09:43:57.3542420+08:00;True|2023-09-27T07:47:41.5372303+08:00;True|2023-09-21T18:22:16.9575605+08:00;True|2023-09-21T18:09:09.2828591+08:00;True|2023-09-21T17:57:05.3919457+08:00;True|2023-09-21T17:40:17.7722883+08:00;True|2023-09-21T17:24:20.7004108+08:00;True|2023-09-21T17:14:30.5230341+08:00;True|2023-09-21T15:14:11.3019288+08:00;True|2023-09-20T09:47:15.7375677+08:00;True|2023-09-12T14:37:37.0665432+08:00;True|2023-08-16T16:52:02.7063729+08:00;True|2023-08-11T10:35:11.9236725+08:00;True|2023-08-07T10:34:44.0844087+08:00;True|2023-08-07T10:28:56.2230477+08:00;True|2023-07-31T11:18:06.9546379+08:00;True|2023-07-03T10:38:22.8080444+08:00;True|2023-06-26T08:15:27.3611577+08:00;True|2023-06-25T15:36:41.8736654+08:00;True|2023-06-25T14:33:49.5287543+08:00;True|2023-06-13T10:24:59.6876648+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>09/27/2023 07:47:32</publishTime> |
| | | <publishTime>10/10/2023 10:33:56</publishTime> |
| | | </File> |
| | | <File Include="bin/VueWebApi.pdb"> |
| | | <publishTime>09/27/2023 07:47:32</publishTime> |
| | | <publishTime>10/10/2023 10:33:56</publishTime> |
| | | </File> |
| | | <File Include="bin/VueWebApi.xml"> |
| | | <publishTime>09/27/2023 07:47:31</publishTime> |
| | | <publishTime>10/10/2023 10:33:56</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>09/27/2023 07:47:40</publishTime> |
| | | <publishTime>10/10/2023 10:34:00</publishTime> |
| | | </File> |
| | | </ItemGroup> |
| | | </Project> |
| | |
| | | <param name="partnumber">产品编码</param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:VueWebApi.Controllers.ProductionManagementController.SelectRouteOrWkshop(System.String,System.String,System.String)"> |
| | | <member name="M:VueWebApi.Controllers.ProductionManagementController.SelectRouteOrWkshop(System.String,System.String,System.String,System.String)"> |
| | | <summary> |
| | | 工单派发选择工艺路线或选择生产车间时判断绑定条件 |
| | | </summary> |
| | | <param name="partcode">产品编码</param> |
| | | <param name="routecode">工艺路线编码</param> |
| | | <param name="wkshopcode">车间编码</param> |
| | | <param name="is_steprice">是否工价管控</param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:VueWebApi.Controllers.ProductionManagementController.AddMesOrderCodeSearch"> |
| | |
| | | <param name="partnumber">产品编码</param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:VueWebApi.Controllers.ProductionManagementController.SelectRouteOrWkshop(System.String,System.String,System.String)"> |
| | | <member name="M:VueWebApi.Controllers.ProductionManagementController.SelectRouteOrWkshop(System.String,System.String,System.String,System.String)"> |
| | | <summary> |
| | | 工单派发选择工艺路线或选择生产车间时判断绑定条件 |
| | | </summary> |
| | | <param name="partcode">产品编码</param> |
| | | <param name="routecode">工艺路线编码</param> |
| | | <param name="wkshopcode">车间编码</param> |
| | | <param name="is_steprice">是否工价管控</param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:VueWebApi.Controllers.ProductionManagementController.AddMesOrderCodeSearch"> |
| | |
| | | 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 |