瀏覽代碼

业务后台修复:1、选择床网报价时,筛选条件加上床垫宽长,即不显示其他尺寸的数据;
2、修复报价保存,清除成本金额、替代公式等历史计算结果
3、裥大侧保存时sortcode错误赋值导致计算错误
4、切换包装方式后,重新获取物料选项

chen_yjin 5 月之前
父節點
當前提交
4f5cc7ef2a

+ 2 - 0
JLHHJSvr/Com/GetMattressImportDW2.cs

@@ -14,6 +14,7 @@ namespace JLHHJSvr.Com
             return "GetMattressImportDW2";
         }
         public string token { get; set; }
+        public int mattressid { get; set; }
         public int mattresstypeid { get; set; }
         /// <summary>
         /// 是否为半成品
@@ -23,6 +24,7 @@ namespace JLHHJSvr.Com
         /// 包装方式   tinyint   选择 0-压包,1-卷包,2-国内
         /// </summary>
         public int packtype { get; set; }
+        public int pricelistid { get; set; }
     }
 
     public sealed class GetMattressImportDW2Response : LJResponse

+ 38 - 0
JLHHJSvr/Com/GetMattressPackagMx.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using JLHHJSvr.Com.Model;
+using LJLib.Net.SPI.Com;
+
+namespace JLHHJSvr.Com
+{
+    public sealed class GetMattressPackagMxRequest : ILJRequest<GetMattressPackagMxResponse>
+    {
+        public string GetApiName()
+        {
+            return "GetMattressPackagMx";
+        }
+        public string token { get; set; }
+        public int mattresstypeid { get; set; }
+        /// <summary>
+        /// 是否为半成品
+        /// </summary>
+        public int ifbcptype { get; set; }
+        /// <summary>
+        /// 包装方式   tinyint   选择 0-压包,1-卷包,2-国内
+        /// </summary>
+        public int packtype { get; set; }
+        public int pricelistid { get; set; }
+    }
+
+    public sealed class GetMattressPackagMxResponse : LJResponse
+    {
+        public decimal? biandai_qty { get; set; }
+        /// <summary>
+        /// 所有明细
+        /// </summary>
+        public List<u_mattress_mx_mtrl> mattressMx { get; set; }
+        public List<replacement> diancengarea { get; set; }
+}
+}

+ 3 - 0
JLHHJSvr/Com/Model/u_mtrl_price.cs

@@ -86,5 +86,8 @@ namespace JLHHJSvr.Com.Model
         /// </summary>
         public string erp_mtrlengname { get; set; }
         public List<u_mtrl_price_pricelist> mxlist { get; set; }
+        public decimal? price { get; set; }
+        public string price_formula { get; set; }
+        public string qty_formula { get; set; }
     }
 }

+ 8 - 2
JLHHJSvr/DataStore/web_bednet_choose.xml

@@ -19,8 +19,8 @@
 		left outer join u_bednetmx ON u_bednetmx.bednetid = u_bednet.bednetid
 	</selectstr>
 	<where>
-		<when notnull="@arg_deptid">
-			u_bednet.deptid=@arg_deptid
+		<when notnull="@deptid">
+			u_bednet.deptid=@deptid
 		</when>
 		<when notnull="@arg_search">
 			u_bednet.bednetname like '%'+ @arg_search + '%' OR u_bednet.bednetcode like '%'+ @arg_search + '%' OR u_bednet.bednetid like '%'+ @arg_search + '%'
@@ -28,6 +28,12 @@
 		<when notnull="@arg_bednettypeid">
 			u_bednet_type.bednettypeid=@arg_bednettypeid
 		</when>
+		<when notnull="@mattress_width">
+			u_bednet.mattress_width = @mattress_width
+		</when>
+		<when notnull="@mattress_length">
+			u_bednet.mattress_length = @mattress_length
+		</when>
 	</where>
 	<orderstr>
 		bednetid DESC

+ 125 - 122
JLHHJSvr/DataStore/web_bednet_define.xml

@@ -2,87 +2,87 @@
 <select>
 	<selectstr>
 		SELECT
-		bednetid,
+		u_bednet.bednetid,
 		u_bednet.deptid,
-		flag,
-		bednetcode,
-		bednetname,
-		bednettypeid,
-		mattress_width,
-		mattress_length,
-		mattress_height,
-		if_doublenet,
-		if_doublespring,
-		snake_wire_diameter,
-		snake_wire_mtrl_formula,
-		snake_wire_mtrl_cost,
-		pocket_around_spring_formula,
-		pocket_around_spring_cost,
-		pocket_around_fabrics_formula,
-		pocket_around_fabrics_cost,
-		hard_around_mtrl_formula,
-		hard_around_mtrl_cost,
-		hard_around_hr_formula,
-		hard_around_hr_cost,
-		spring_mtrl_cost,
-		spring_hr_cost,
-		glue_price,
-		glue_mtrl_formula,
-		glue_mtrl_cost,
-		fabrics1_mtrl_formula,
-		fabrics1_mtrl_cost,
-		fabrics2_mtrl_formula,
-		fabrics2_mtrl_cost,
-		if_side_iron,
-		side_iron_lossrate,
-		side_iron_price,
-		side_iron_mtrl_formula,
-		side_iron_mtrl_cost,
-		side_iron_hr_formula,
-		side_iron_hr_cost,
-		cnail_price,
-		cnail_mtrl_formula,
-		cnail_mtrl_cost,
-		cnail_hr_formula,
-		cnail_hr_cost,
-		sponge_mtrlid,
-		sponge_thickness,
-		sponge_height,
-		sponge_price,
-		sponge_mtrl_formula,
-		sponge_mtrl_cost,
-		sponge_hr_formula,
-		sponge_hr_cost,
-		sponge_tc_mtrlid,
-		sponge_tc_thickness,
-		sponge_tc_height,
-		edge_mtrlid,
-		edge_price,
-		edge_mtrl_formula,
-		edge_mtrl_cost,
-		edge_hr_formula,
-		edge_hr_cost,
-		edge_height,
-		iffork,
-		fork_qty,
-		fork_price,
-		fork_mtrl_formula,
-		fork_mtrl_cost,
-		fork_hr_formula,
-		fork_hr_cost,
-		if_rsORwa,
-		rsORwa_price,
-		rsORwa_mtrl_formula,
-		rsORwa_mtrl_cost,
-		rsORwa_hr_formula,
-		rsORwa_hr_cost,
-		if_sponge_drilling,
-		sponge_drilling_hr_formula,
-		sponge_drilling_hr_cost,
-		total_hr_cost,
-		total_mtrl_cost ,
-		total_fees_cost,
-		total_cost,
+		u_bednet.flag,
+		u_bednet.bednetcode,
+		u_bednet.bednetname,
+		u_bednet.bednettypeid,
+		u_bednet.mattress_width,
+		u_bednet.mattress_length,
+		u_bednet.mattress_height,
+		u_bednet.if_doublenet,
+		u_bednet.if_doublespring,
+		u_bednet.snake_wire_diameter,
+		u_bednet.snake_wire_mtrl_formula,
+		u_bednet.snake_wire_mtrl_cost,
+		u_bednet.pocket_around_spring_formula,
+		u_bednet.pocket_around_spring_cost,
+		u_bednet.pocket_around_fabrics_formula,
+		u_bednet.pocket_around_fabrics_cost,
+		u_bednet.hard_around_mtrl_formula,
+		u_bednet.hard_around_mtrl_cost,
+		u_bednet.hard_around_hr_formula,
+		u_bednet.hard_around_hr_cost,
+		u_bednet.spring_mtrl_cost,
+		u_bednet.spring_hr_cost,
+		u_bednet.glue_price,
+		u_bednet.glue_mtrl_formula,
+		u_bednet.glue_mtrl_cost,
+		u_bednet.fabrics1_mtrl_formula,
+		u_bednet.fabrics1_mtrl_cost,
+		u_bednet.fabrics2_mtrl_formula,
+		u_bednet.fabrics2_mtrl_cost,
+		u_bednet.if_side_iron,
+		u_bednet.side_iron_lossrate,
+		u_bednet.side_iron_price,
+		u_bednet.side_iron_mtrl_formula,
+		u_bednet.side_iron_mtrl_cost,
+		u_bednet.side_iron_hr_formula,
+		u_bednet.side_iron_hr_cost,
+		u_bednet.cnail_price,
+		u_bednet.cnail_mtrl_formula,
+		u_bednet.cnail_mtrl_cost,
+		u_bednet.cnail_hr_formula,
+		u_bednet.cnail_hr_cost,
+		u_bednet.sponge_mtrlid,
+		u_bednet.sponge_thickness,
+		u_bednet.sponge_height,
+		u_bednet.sponge_price,
+		u_bednet.sponge_mtrl_formula,
+		u_bednet.sponge_mtrl_cost,
+		u_bednet.sponge_hr_formula,
+		u_bednet.sponge_hr_cost,
+		u_bednet.sponge_tc_mtrlid,
+		u_bednet.sponge_tc_thickness,
+		u_bednet.sponge_tc_height,
+		u_bednet.edge_mtrlid,
+		u_bednet.edge_price,
+		u_bednet.edge_mtrl_formula,
+		u_bednet.edge_mtrl_cost,
+		u_bednet.edge_hr_formula,
+		u_bednet.edge_hr_cost,
+		u_bednet.edge_height,
+		u_bednet.iffork,
+		u_bednet.fork_qty,
+		u_bednet.fork_price,
+		u_bednet.fork_mtrl_formula,
+		u_bednet.fork_mtrl_cost,
+		u_bednet.fork_hr_formula,
+		u_bednet.fork_hr_cost,
+		u_bednet.if_rsORwa,
+		u_bednet.rsORwa_price,
+		u_bednet.rsORwa_mtrl_formula,
+		u_bednet.rsORwa_mtrl_cost,
+		u_bednet.rsORwa_hr_formula,
+		u_bednet.rsORwa_hr_cost,
+		u_bednet.if_sponge_drilling,
+		u_bednet.sponge_drilling_hr_formula,
+		u_bednet.sponge_drilling_hr_cost,
+		u_bednet.total_hr_cost,
+		u_bednet.total_mtrl_cost ,
+		u_bednet.total_fees_cost,
+		u_bednet.total_cost,
 		u_bednet.createtime as createtime ,
 		u_bednet.createby as createby,
 		u_mtrl_sponge.name as mtrl_sponge_name,
@@ -90,49 +90,51 @@
 		u_mtrl_edge.name as mtrl_edge_name,
 		u_mtrl_felt.name as mtrl_felt_name,
 		u_mtrl_felt_x.name as mtrl_felt_x_name,
-		felt_mtrlid,
-		felt_x_mtrlid,
-		nottax_factory_cost,
-		nottax_dept_cost,
-		dept_cost,
-		foreign_cost,
-		sum_weight,
+		u_bednet.felt_mtrlid,
+		u_bednet.felt_x_mtrlid,
+		u_bednet.nottax_factory_cost,
+		u_bednet.nottax_dept_cost,
+		u_bednet.dept_cost,
+		u_bednet.foreign_cost,
+		u_bednet.sum_weight,
 		total_cost - sponge_mtrl_cost - felt_mtrl_cost - felt_mtrl_x_cost - packet_mtrl_cost - packet_hr_cost as planprice,
-		ifsaleout,
-		duo_qv_str,
-		if_jb,
-		felt_qty,
-		felt_x_qty,
-		felt_dscrp,
-		extras_cost_dscrp,
-		packtype,
-		packqty,
-		packmtrl,
-		transport_type,
-		commission,
-		other_rate,
-		fob,
-		taxrate,
-		extras_cost,
-		moneyrate,
-		spring_hr_formula,
-		cnail_weight_formula,
-		edge_weight_formula,
-		fabrics1_weight_formula,
-		fabrics2_weight_formula,
-		felt_hr_formula,
-		felt_mtrl_formula,
-		felt_weight_formula,
-		fork_weight_formula,
-		hard_around_weight_formula,
-		packet_hr_formula,
-		packet_mtrl_formula,
-		side_iron_weight_formula,
-		sponge_mtrl_tc_formula,
-		sponge_weight_formula,
-		sponge_weight_tc_formula,
-		spring_mtrl_formula,
-		spring_weight_formula
+		u_bednet.ifsaleout,
+		u_bednet.duo_qv_str,
+		u_bednet.if_jb,
+		u_bednet.felt_qty,
+		u_bednet.felt_x_qty,
+		u_bednet.felt_dscrp,
+		u_bednet.extras_cost_dscrp,
+		u_bednet.packtype,
+		u_bednet.packqty,
+		u_bednet.packmtrl,
+		u_bednet.transport_type,
+		u_bednet.commission,
+		u_bednet.other_rate,
+		u_bednet.fob,
+		u_bednet.taxrate,
+		u_bednet.extras_cost,
+		u_bednet.moneyrate,
+		u_bednet.spring_hr_formula,
+		u_bednet.cnail_weight_formula,
+		u_bednet.edge_weight_formula,
+		u_bednet.fabrics1_weight_formula,
+		u_bednet.fabrics2_weight_formula,
+		u_bednet.felt_hr_formula,
+		u_bednet.felt_mtrl_formula,
+		u_bednet.felt_weight_formula,
+		u_bednet.fork_weight_formula,
+		u_bednet.hard_around_weight_formula,
+		u_bednet.packet_hr_formula,
+		u_bednet.packet_mtrl_formula,
+		u_bednet.side_iron_weight_formula,
+		u_bednet.sponge_mtrl_tc_formula,
+		u_bednet.sponge_weight_formula,
+		u_bednet.sponge_weight_tc_formula,
+		u_bednet.spring_mtrl_formula,
+		u_bednet.spring_weight_formula,
+		u_bednet_type.if_pocket_around,
+		u_bednet_type.if_hard_around
 
 		From u_bednet
 		left join u_mtrl_price u_mtrl_sponge on   u_bednet.sponge_mtrlid=u_mtrl_sponge.mtrlid
@@ -140,6 +142,7 @@
 		left join u_mtrl_price u_mtrl_edge on   u_bednet.edge_mtrlid=u_mtrl_edge.mtrlid
 		left join u_mtrl_price u_mtrl_felt on   u_bednet.felt_mtrlid=u_mtrl_felt.mtrlid
 		left join u_mtrl_price u_mtrl_felt_x on   u_bednet.felt_x_mtrlid=u_mtrl_felt_x.mtrlid
+		inner join u_bednet_type on u_bednet_type.bednettypeid = u_bednet.bednettypeid
 	</selectstr>
 	<where>
 		<when notnull="@arg_bednetid">

+ 137 - 0
JLHHJSvr/DataStore/web_mattress_interface.xml

@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<select>
+	<selectstr>
+		SELECT
+		mattressid,
+		mattressname,
+		deptid,
+		mattresstypeid,
+		mattresscode,
+		mattress_width,
+		mattress_length,
+		mattress_height,
+		packtype,
+		packqty,
+		woodpallettype,
+		total_hr_cost,
+		total_material_cost ,
+		fees_dscrp,
+		total_fees_cost,
+		total_cost,
+		taxrate,
+		taxes,
+		commissionrate,
+		commission,
+		fob,
+		profitrate,
+		nottax_factory_cost,
+		nottax_dept_cost,
+		dept_cost,
+		foreign_cost,
+		extras_cost,
+		dept_profitrate,
+		moneyrate,
+		mattressrelcode,
+
+		flag,
+		auditingrep,
+		auditingdate,
+
+		createtime,
+		createby,
+
+		yw_flag,
+		yw_auditingrep,
+		yw_auditingdate,
+		js1_flag,
+		js1_auditingrep,
+		js1_auditingdate,
+		js2_flag,
+		js2_auditingrep,
+		js2_auditingdate,
+		creatmtrl_flag,
+		creatmtrl_auditingrep,
+		creatmtrl_auditingdate,
+		creatmtrlqd_flag,
+		creatmtrlqd_auditingrep,
+		creatmtrlqd_auditingdate,
+
+		erp_mtrlcode as erp_mtrlcode,
+
+		erp_mtrlid,
+		nottax_factory_cost  / ( dept_profitrate + dept_profitrate_rangli / 100  ) as dijia_cost,
+		erp_mtrlengname,
+		erp_configcodetype
+
+		From u_mattress
+	</selectstr>
+	<where>
+		<when>
+			u_mattress.xd_flag = 1
+		</when>
+		<when notnull="@arg_deptid">
+			u_mattress.deptid = @arg_deptid
+		</when>
+		<when notempty="@@arg_deptid_arry@@">
+			u_mattress.deptid in (@@arg_deptid_arry@@)
+		</when>
+		<when notempty="@@arg_arry_outrepstr@@">
+			u_mattress.createby in (@@arg_arry_outrepstr@@) or  @arg_empid = 0
+		</when>
+		<when notnull="@arg_yw_flag">
+			u_mattress.yw_flag = @arg_yw_flag
+		</when>
+		<when notnull="@arg_js1_flag">
+			u_mattress.js1_flag = @arg_js1_flag
+		</when>
+		<when notnull="@arg_js2_flag">
+			u_mattress.js2_flag = @arg_js2_flag
+		</when>
+		<when notnull="@arg_creatmtrl_flag">
+			u_mattress.creatmtrl_flag = @arg_creatmtrl_flag
+		</when>
+		<when notnull="@arg_creatmtrlqd_flag">
+			u_mattress.creatmtrlqd_flag = @arg_creatmtrlqd_flag
+		</when>
+		<when notnull="@arg_search">
+			u_mattress.mattresscode like '%'+ @arg_search + '%' OR u_mattress.mattressrelcode like '%'+ @arg_search + '%' OR u_mattress.mattressname like '%'+ @arg_search + '%'
+		</when>
+	</where>
+	<displayfields>
+		<field field="pid" compute="getrow()">序</field>
+		<field field="yw_flag" datatype="checkbox">业务审核</field>
+		<field field="js1_flag" datatype="checkbox">产品补充审核</field>
+		<field field="js2_flag" datatype="checkbox">清单补充审核</field>
+		<field field="creatmtrl_flag" datatype="checkbox">生成L1产品</field>
+		<field field="creatmtrlqd_flag" datatype="checkbox">生成L1清单</field>
+		<field field="erp_mtrlcode">L1物料编码</field>
+		<field field="mattresscode">报价唯一码</field>
+		<field field="mattressrelcode">床垫编码</field>
+		<field field="mattressname">床垫名称</field>
+		<field field="mattresstypeid" mapper="" ddd="ddd_mattress_type_choose">床垫类别</field>
+		<field field="mattress_width" datatype="number">床垫宽/CM</field>
+		<field field="mattress_length" datatype="number">床垫长/CM</field>
+		<field field="mattress_height" datatype="number">床垫高/CM</field>
+		<field field="createby">登记人</field>
+		<field field="createtime" datatype="datetime">登记时间</field>
+		<field field="deptid" mapper="" ddd="ddd_mattress_dept_choose" align="left">部门</field>
+		<field field="yw_auditingrep">业务审核人</field>
+		<field field="yw_auditingdate" datatype="datetime">业务审核时间</field>
+		<field field="js1_auditingrep">产品补充审核人</field>
+		<field field="js1_auditingdate" datatype="datetime">产品补充审核时间</field>
+		<field field="js2_auditingrep">清单补充审核人</field>
+		<field field="js2_auditingdate" datatype="datetime">清单补充审核时间</field>
+		<field field="creatmtrl_auditingrep">生成L1产品人</field>
+		<field field="creatmtrl_auditingdate" datatype="datetime">生成L1产品时间</field>
+		<field field="creatmtrlqd_auditingrep">生成L1清单人</field>
+		<field field="creatmtrlqd_auditingdate" datatype="datetime">生成L1清单时间</field>
+		<field field="mattressid">Mattressid</field>
+		<field field="dijia_cost" datatype="number">底价</field>
+		<field field="yongjin" datatype="number" compute="dijia_cost / (1 - (commission - 1 )) - dijia_cost">佣金</field>
+		<field field="taxrate" datatype="number">税率</field>
+		<field field="fob" datatype="number">Fob</field>
+		<field field="taxes" datatype="number">税金</field>
+		<field field="erp_mtrlengname">原来物料mtrlcode</field>
+		<field field="erp_configcodetype">Erp Configcodetype</field>
+	</displayfields>
+</select>

+ 1 - 6
JLHHJSvr/DataStore/web_mtrl_choose.xml

@@ -22,11 +22,9 @@
 		SPACE(200) AS erp_mtrlname,
 		SPACE(200) AS erp_mtrlmode,
 		SPACE(200) AS erp_unit,
-		SPACE(200) AS erp_mtrlengname,
-		ISNULL(u_mattress_formula.formulaid,0) AS formulaid
+		SPACE(200) AS erp_mtrlengname
 		FROM u_mtrl_price
 		LEFT JOIN u_mtrl_price_pricelist ON u_mtrl_price.mtrlid = u_mtrl_price_pricelist.mtrlid
-		LEFT OUTER JOIN u_mattress_formula ON u_mattress_formula.default_mtrlid = u_mtrl_price.mtrlid
 	</selectstr>
 	<where>
 		<when notnull="@keyword">
@@ -49,9 +47,6 @@
 		<when notnull="@arg_mtrlid">
 			u_mtrl_price.mtrlid = @arg_mtrlid 
 		</when>
-		<when notempty="@@arg_array_formulaid@@">
-			u_mattress_formula.formulaid IN (@@arg_array_formulaid@@) OR u_mtrl_price.mtrlid IN (@@arg_array_mtrlid@@)
-		</when>
 	</where>
 	<displayfields>
 		<field field="pid" compute="getrow()">序</field>

+ 9 - 47
JLHHJSvr/Excutor/GetMattressImportDW2Excutor.cs

@@ -51,6 +51,8 @@ namespace JLHHJSvr.Excutor
 
                     AutoInit.AutoInitS(cmd, mattersstype);
 
+                    var helper = HelperBase.GetHelper<MattressHelper>(cmd, new HelperBase.Context() { tokendata = tokendata });
+
                     var selectStr = @"
                             SELECT formulaid
 	                            ,formulakind
@@ -184,37 +186,8 @@ namespace JLHHJSvr.Excutor
                         dw_2.Add(newDw2);
                     }
 
-
                     //   导入 2-按包装方式  的公式
-                    var mattressFormulaList2 = new List<u_mattress_formula>();
-                    param.Clear();
-                    param.Add("@usetype", 2);
-                    DbSqlHelper.SelectJoin(cmd, selectStr, ListEx.GetWhereStr(whereList), param, "formulatype, sortcode", outFields, 0, 0, mattressFormulaList2);
-
-                    foreach (var mx in mattressFormulaList2)
-                    {
-                        if (request.packtype == 0 && mx.if_packtype0 != 1) continue;
-                        if (request.packtype == 1 && mx.if_packtype1 != 1) continue;
-                        if (request.packtype == 2 && mx.if_packtype2 != 1) continue;
-
-                        var newDw2 = new u_mattress_mx_mtrl();
-                        AutoInit.AutoInitS(newDw2);
-                        if (mx.if_mtrl > 1)
-                        {
-                            newDw2.addmx = "+";
-                            newDw2.delmx = "-";
-                        }
-                        newDw2.formulatype = mx.formulatype;
-                        newDw2.if_mtrl = mx.if_mtrl;
-                        newDw2.formulaid = mx.formulaid;
-                        newDw2.sortcode = mx.sortcode;
-                        newDw2.formulakind = mx.formulakind;
-                        newDw2.formula = mx.formula;
-                        newDw2.useformula = mx.useformula;
-                        newDw2.gydscrp = mx.gydscrp;
-
-                        dw_2.Add(newDw2);
-                    }
+                    helper.wf_import_bz(request.packtype, ref dw_2);
 
 
                     //加多一个 小侧2
@@ -250,24 +223,13 @@ namespace JLHHJSvr.Excutor
                         rslt.diancengarea = wf_add_dianceng_area_bytype(cmd, mattersstype.dianceng_area);
                     }
 
-                    // u_mattress_formula_formulatype A xu A u_mattress_formula_sortcode A u_mattress_mx_mtrl_formulaid A
-                    dw_2.Sort((a, b) =>
-                    {
-                        if (a.formulatype != b.formulatype)
-                        {
-                            return a.formulatype.Value.CompareTo(b.formulatype.Value);
-                        }
-                        if (a.xu != b.xu)
-                        {
-                            return a.xu.Value.CompareTo(b.xu.Value);
-                        }
-                        if (a.sortcode != b.sortcode)
-                        {
-                            return a.sortcode.CompareTo(b.sortcode);
-                        }
-                        return a.formulaid.Value.CompareTo(b.formulaid.Value);
-                    });
+                    helper.wf_sort_mx(ref dw_2);
 
+                    if (request.mattressid == 0)
+                    {
+                        helper.wf_default_mtrlid(request.pricelistid, ref dw_2);
+                        helper.wf_default_mtrlid_notbz(request.pricelistid, ref dw_2);
+                    }
 
                     rslt.mattressMx = dw_2;
 

+ 59 - 0
JLHHJSvr/Excutor/GetMattressPackagMxExcutor.cs

@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+using DirectService.Tools;
+using JLHHJSvr.BLL;
+using JLHHJSvr.Com;
+using JLHHJSvr.Com.Model;
+using JLHHJSvr.Helper;
+using JLHHJSvr.LJException;
+using JLHHJSvr.Tools;
+using LJLib.DAL.SQL;
+using LJLib.Net.SPI.Server;
+
+namespace JLHHJSvr.Excutor
+{
+    internal sealed class GetMattressPackagMxExcutor : ExcutorBase<GetMattressPackagMxRequest, GetMattressPackagMxResponse>
+    {
+        protected override void ExcuteInternal(GetMattressPackagMxRequest request, object state, GetMattressPackagMxResponse rslt)
+        {
+            var tokendata = BllHelper.GetToken(request.token);
+            if (tokendata == null)
+            {
+                rslt.ErrMsg = "会话已经中断,请重新登录";
+                return;
+            }
+            if (request.mattresstypeid == 0)
+            {
+                rslt.ErrMsg = "床垫类别不能为0";
+                return;
+            }
+
+            using (var con = new SqlConnection(GlobalVar.ConnectionString))
+            using (var cmd = con.CreateCommand())
+            {
+                con.Open();
+
+                using (cmd.Transaction = con.BeginTransaction())
+                {
+
+                    var helper = HelperBase.GetHelper<MattressHelper>(cmd, new HelperBase.Context() { tokendata = tokendata });
+
+                    var dw_2 = new List<u_mattress_mx_mtrl>();
+
+                    //   导入 2-按包装方式  的公式
+                    helper.wf_import_bz(request.packtype, ref dw_2);
+
+                    helper.wf_sort_mx(ref dw_2);
+
+                    helper.wf_default_mtrlid(request.pricelistid, ref dw_2);
+
+                    rslt.mattressMx = dw_2;
+
+                }
+            }
+        }
+    }
+}

+ 1 - 0
JLHHJSvr/GlobalVar/GlobalVar.cs

@@ -160,6 +160,7 @@ namespace JLHHJSvr
                 excutorManager.AddMap("SaveMattressBcp", typeof(SaveMattressBcpRequest), new SaveMattressBcpExcutor());// 保存半成品报价
                 excutorManager.AddMap("DeleteMattressBcp", typeof(DeleteMattressBcpRequest), new DeleteMattressBcpExcutor());// 删除半成品报价
                 excutorManager.AddMap("AuditMattressBcp", typeof(AuditMattressBcpRequest), new AuditMattressBcpExcutor());// 审核半成品报价
+                excutorManager.AddMap("GetMattressPackagMx", typeof(GetMattressPackagMxRequest), new GetMattressPackagMxExcutor());// 包装方式切换
 
                 excutorManager.AddMap("SaveBedNet", typeof(SaveBedNetRequest), new SaveBedNetExcutor());// 保存床网报价
                 excutorManager.AddMap("DeleteBedNet", typeof(DeleteBedNetRequest), new DeleteBedNetExcutor());// 删除床网报价

文件差異過大導致無法顯示
+ 247 - 9
JLHHJSvr/Helper/MattressHelper.cs


+ 2 - 0
JLHHJSvr/JLHHJSvr.csproj

@@ -101,6 +101,7 @@
     <Compile Include="Com\GetBillList.cs" />
     <Compile Include="Com\GetCarList.cs" />
     <Compile Include="Com\GetMattressImportDW2.cs" />
+    <Compile Include="Com\GetMattressPackagMx.cs" />
     <Compile Include="Com\GetComputeMattress.cs" />
     <Compile Include="Com\GetComputeBednet.cs" />
     <Compile Include="Com\GetDept.cs" />
@@ -253,6 +254,7 @@
     <Compile Include="Excutor\GetBedNetVarListExcutor.cs" />
     <Compile Include="Excutor\GetBillListExcutor.cs" />
     <Compile Include="Excutor\GetCarListExcutor.cs" />
+    <Compile Include="Excutor\GetMattressPackagMxExcutor.cs" />
     <Compile Include="Excutor\GetMattressImportDW2Excutor.cs" />
     <Compile Include="Excutor\GetComputeMattressExcutor.cs" />
     <Compile Include="Excutor\GetComputeBednetExcutor.cs" />