VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs
@@ -3837,12 +3837,12 @@
                    if (parents[i].flwtype == "Z")
                    {
                        //通过产品编码+工艺路线+工序编码查找对应设备信息
                        sql = @"select A.eqp_code,E.name as eqp_name,A.eqp_value,A.stand_value,A.cavity_qty,A.unprice
                        sql = @"select A.eqp_code,E.name as eqp_name,A.enable,A.eqp_value,A.stand_value,A.cavity_qty,A.unprice
                                from (
                                select S.eqp_code,S.eqp_value,S.stand_value,S.cavity_qty,S.unprice  from TPrteEqp_Stad S
                                select S.eqp_code,S.eqp_value,S.enable,S.stand_value,S.cavity_qty,S.unprice  from TPrteEqp_Stad S
                                where S.materiel_code=@partcode and S.route_code=@routecode and S.step_code=@stepcode
                                union all
                                select  R.eqp_code,'0' as eqp_value,'0' as stand_value,'0' as cavity_qty,'0' as unprice from TMateriel_Route S
                                select  R.eqp_code,'0' as eqp_value,'N' as enable,'0' as stand_value,'0' as cavity_qty,'0' as unprice from TMateriel_Route S
                                inner join TFlw_Rtdt T on S.route_code=T.rout_code
                                inner join TFlw_Rteqp R on T.step_code=R.step_code
                                where S.materiel_code=@partcode and S.route_code=@routecode and T.step_code=@stepcode and S.materiel_code+S.route_code+T.step_code+R.eqp_code
@@ -3859,12 +3859,12 @@
                    else
                    {
                        //通过产品编码+工艺路线+工序编码查找对应外协供应商信息
                        sql = @"select A.eqp_code,C.name as eqp_name,A.eqp_value,A.stand_value,A.cavity_qty,A.unprice
                        sql = @"select A.eqp_code,C.name as eqp_name,A.enable,A.eqp_value,A.stand_value,A.cavity_qty,A.unprice
                                from (
                                select S.eqp_code,S.eqp_value,S.stand_value,S.cavity_qty,S.unprice  from TPrteEqp_Stad S
                                select S.eqp_code,S.eqp_value,S.enable,S.stand_value,S.cavity_qty,S.unprice  from TPrteEqp_Stad S
                                where S.materiel_code=@partcode and S.route_code=@routecode and S.step_code=@stepcode
                                union all
                                select  R.eqp_code,'0' as eqp_value,'0' as stand_value,'0' as cavity_qty,'0' as unprice from TMateriel_Route S
                                select  R.eqp_code,'0' as eqp_value,'N' as enable,'0' as stand_value,'0' as cavity_qty,'0' as unprice from TMateriel_Route S
                                inner join TFlw_Rtdt T on S.route_code=T.rout_code
                                inner join TFlw_Rteqp R on T.step_code=R.step_code
                                where S.materiel_code=@partcode and S.route_code=@routecode and T.step_code=@stepcode and S.materiel_code+S.route_code+T.step_code+R.eqp_code
@@ -4037,7 +4037,7 @@
                            var data0 = DapperHelper.selectdata(sql, dynamicParams);
                            if (data0.Rows.Count > 0)
                            {
                                sql = @"update TPrteEqp_Stad set eqp_value=@eqp_value,stand_value=@stand_value,cavity_qty=@cavity_qty,unprice=@unprice,lm_user=@username,lm_date=@userdate
                                sql = @"update TPrteEqp_Stad set enable=@enable, eqp_value=@eqp_value,stand_value=@stand_value,cavity_qty=@cavity_qty,unprice=@unprice,lm_user=@username,lm_date=@userdate
                                    where materiel_code=@partcode and route_code=@routecode and step_code=@stepcode and eqp_code=@eqpcode";
                                list.Add(new
                                {
@@ -4048,6 +4048,7 @@
                                        routecode = json[0].defaultroute_code,
                                        stepcode = json[0].children[i].code,
                                        eqpcode = json[0].children[i].children[j].eqp_code,
                                        enable= json[0].children[i].children[j].enable,
                                        eqp_value = json[0].children[i].children[j].eqp_value,
                                        stand_value = json[0].children[i].children[j].stand_value,
                                        cavity_qty = json[0].children[i].children[j].cavity_qty,
@@ -4059,8 +4060,8 @@
                            }
                            else
                            {
                                sql = @"insert into TPrteEqp_Stad(materiel_code,route_code,step_code,eqp_code,stand_value,eqp_value,cavity_qty,unprice,lm_user,lm_date)
                                    values(@materiel_code,@route_code,@step_code,@eqp_code,@stand_value,@eqp_value,@cavity_qty,@unprice,@lm_user,@lm_date)";
                                sql = @"insert into TPrteEqp_Stad(materiel_code,route_code,step_code,eqp_code,enable,stand_value,eqp_value,cavity_qty,unprice,lm_user,lm_date)
                                    values(@materiel_code,@route_code,@step_code,@eqp_code,@enable,@stand_value,@eqp_value,@cavity_qty,@unprice,@lm_user,@lm_date)";
                                list.Add(new
                                {
                                    str = sql,
@@ -4070,6 +4071,7 @@
                                        route_code = json[0].defaultroute_code,
                                        step_code = json[0].children[i].code,
                                        eqp_code = json[0].children[i].children[j].eqp_code,
                                        enable = json[0].children[i].children[j].enable,
                                        stand_value = json[0].children[i].children[j].eqp_value,
                                        eqp_value = json[0].children[i].children[j].stand_value,
                                        cavity_qty = json[0].children[i].children[j].cavity_qty,
@@ -4137,7 +4139,7 @@
                            var data0 = DapperHelper.selectdata(sql, dynamicParams);
                            if (data0.Rows.Count > 0)
                            {
                                sql = @"update TPrteEqp_Stad set eqp_value=@eqp_value,stand_value=@stand_value,cavity_qty=@cavity_qty,unprice=@unprice,lm_user=@username,lm_date=@userdate
                                sql = @"update TPrteEqp_Stad set enable=@enable,eqp_value=@eqp_value,stand_value=@stand_value,cavity_qty=@cavity_qty,unprice=@unprice,lm_user=@username,lm_date=@userdate
                                    where materiel_code=@partcode and route_code=@routecode and step_code=@stepcode and eqp_code=@eqpcode";
                                list.Add(new
                                {
@@ -4148,6 +4150,7 @@
                                        routecode = json[0].defaultroute_code,
                                        stepcode = json[0].children[i].code,
                                        eqpcode = json[0].children[i].children[j].eqp_code,
                                        enable= json[0].children[i].children[j].enable,
                                        eqp_value = json[0].children[i].children[j].eqp_value,
                                        stand_value = json[0].children[i].children[j].stand_value,
                                        cavity_qty = json[0].children[i].children[j].cavity_qty,
@@ -4159,8 +4162,8 @@
                            }
                            else
                            {
                                sql = @"insert into TPrteEqp_Stad(materiel_code,route_code,step_code,eqp_code,stand_value,eqp_value,cavity_qty,unprice,lm_user,lm_date)
                                    values(@materiel_code,@route_code,@step_code,@eqp_code,@stand_value,@eqp_value,@cavity_qty,@unprice,@lm_user,@lm_date)";
                                sql = @"insert into TPrteEqp_Stad(materiel_code,route_code,step_code,eqp_code,enable,stand_value,eqp_value,cavity_qty,unprice,lm_user,lm_date)
                                    values(@materiel_code,@route_code,@step_code,@eqp_code,@enable,@stand_value,@eqp_value,@cavity_qty,@unprice,@lm_user,@lm_date)";
                                list.Add(new
                                {
                                    str = sql,
@@ -4170,6 +4173,7 @@
                                        route_code = json[0].defaultroute_code,
                                        step_code = json[0].children[i].code,
                                        eqp_code = json[0].children[i].children[j].eqp_code,
                                        enable= json[0].children[i].children[j].enable,
                                        stand_value = json[0].children[i].children[j].eqp_value,
                                        eqp_value = json[0].children[i].children[j].stand_value,
                                        cavity_qty = json[0].children[i].children[j].cavity_qty,