|
@@ -13,6 +13,7 @@ using System.Collections.Generic;
|
|
using System.Data.SqlClient;
|
|
using System.Data.SqlClient;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text;
|
|
|
|
+using System.Text.RegularExpressions;
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks;
|
|
using System.Web;
|
|
using System.Web;
|
|
using System.Xml.Linq;
|
|
using System.Xml.Linq;
|
|
@@ -595,6 +596,7 @@ namespace JLHHJSvr.Helper
|
|
var mianList1 = new HashSet<string> { "面裥绵", "底裥绵" };
|
|
var mianList1 = new HashSet<string> { "面裥绵", "底裥绵" };
|
|
var mianList2 = new string[4] { "顶布裥棉1", "顶布裥棉2", "顶布裥棉3", "顶布裥棉4" };
|
|
var mianList2 = new string[4] { "顶布裥棉1", "顶布裥棉2", "顶布裥棉3", "顶布裥棉4" };
|
|
var mianList3 = new HashSet<string> { "普通大侧", "上下拼侧1", "上下拼侧2", "上下拼侧3", "左右拼侧1", "左右拼侧2", "左右拼侧3", "小侧1", "小侧2", "小侧3" };
|
|
var mianList3 = new HashSet<string> { "普通大侧", "上下拼侧1", "上下拼侧2", "上下拼侧3", "左右拼侧1", "左右拼侧2", "左右拼侧3", "小侧1", "小侧2", "小侧3" };
|
|
|
|
+ var mianList4 = new HashSet<string> { "小侧1", "小侧2", "小侧3" };
|
|
|
|
|
|
var name_arr = new string[5];
|
|
var name_arr = new string[5];
|
|
foreach (var mx in mxlist)
|
|
foreach (var mx in mxlist)
|
|
@@ -610,28 +612,68 @@ namespace JLHHJSvr.Helper
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (mianList4.Contains(key))
|
|
|
|
+ {
|
|
|
|
+ var _index = 0;
|
|
|
|
+ Regex regex = new Regex(@"\d+");
|
|
|
|
+ Match match = regex.Match(key);
|
|
|
|
+ _index = Convert.ToInt32(match.Value) - 1;
|
|
|
|
+ for (int i = 0; i < mianList4.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ XiaoCePeizhi.SetValue(name_arr[i], i, _index);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
var sb = new StringBuilder();
|
|
var sb = new StringBuilder();
|
|
foreach (var name2 in name_arr)
|
|
foreach (var name2 in name_arr)
|
|
{
|
|
{
|
|
sb.Append(name2);
|
|
sb.Append(name2);
|
|
}
|
|
}
|
|
|
|
|
|
- if (sb.Length > 0)
|
|
|
|
|
|
+ if (sb.Length > 0 || mianList2.Contains(key))
|
|
{
|
|
{
|
|
if (!string.IsNullOrEmpty(chastrArr[1])) interfaceList.Add(InserMattressInterfacePz(chastrArr[0], chastrArr[1], 2, name_arr));
|
|
if (!string.IsNullOrEmpty(chastrArr[1])) interfaceList.Add(InserMattressInterfacePz(chastrArr[0], chastrArr[1], 2, name_arr));
|
|
interfaceList.Add(InserMattressInterfacePz(chastrArr[0], chastrArr[2], 1, new string[] { "" }));
|
|
interfaceList.Add(InserMattressInterfacePz(chastrArr[0], chastrArr[2], 1, new string[] { "" }));
|
|
if (chastrArr.Length > 3) interfaceList.Add(InserMattressInterfacePz(chastrArr[0], chastrArr[3], 1, new string[] { "" }));
|
|
if (chastrArr.Length > 3) interfaceList.Add(InserMattressInterfacePz(chastrArr[0], chastrArr[3], 1, new string[] { "" }));
|
|
}
|
|
}
|
|
|
|
|
|
- foreach (var name in chastrArr)
|
|
|
|
|
|
+ if (mianList3.Contains(key)) {
|
|
|
|
+ foreach (var name in chastrArr)
|
|
|
|
+ {
|
|
|
|
+ if (string.IsNullOrEmpty(name)) continue;
|
|
|
|
+ // 计算小测是否添加说明
|
|
|
|
+ bool ifInert = true;
|
|
|
|
+ if (mianList4.Contains(key))
|
|
|
|
+ {
|
|
|
|
+ ifInert = ifHasXiaoceMtrl();
|
|
|
|
+ }
|
|
|
|
+ if (name.Contains("说明") && ifInert)
|
|
|
|
+ {
|
|
|
|
+ interfaceList.Add(InserMattressInterfacePz(chastrArr[0], name, 1, new string[] { "" }));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ private bool ifHasXiaoceMtrl()
|
|
|
|
+ {
|
|
|
|
+ bool hasVal = false;
|
|
|
|
+ for (int i = 0; i < XiaoCePeizhi.GetLength(0); i++)
|
|
{
|
|
{
|
|
- if (string.IsNullOrEmpty(name)) continue;
|
|
|
|
- if (name.Contains("说明"))
|
|
|
|
|
|
+ for (int j = 0; j < XiaoCePeizhi.GetLength(1); j++)
|
|
{
|
|
{
|
|
- interfaceList.Add(InserMattressInterfacePz(chastrArr[0], name, 1, new string[] { "" }));
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(XiaoCePeizhi[i, j]))
|
|
|
|
+ {
|
|
|
|
+ hasVal = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (hasVal)
|
|
|
|
+ {
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ return hasVal;
|
|
}
|
|
}
|
|
|
|
|
|
private void SetFormulaTypeZeroPzName(u_mattress_mx_mtrl mx, string key, int[] powerArr, string[] name_arr)
|
|
private void SetFormulaTypeZeroPzName(u_mattress_mx_mtrl mx, string key, int[] powerArr, string[] name_arr)
|
|
@@ -1670,6 +1712,8 @@ namespace JLHHJSvr.Helper
|
|
#region 全局变量
|
|
#region 全局变量
|
|
// 储存顶布裥棉数据
|
|
// 储存顶布裥棉数据
|
|
private string[,] DingBuLianMian = new string[4,5];
|
|
private string[,] DingBuLianMian = new string[4,5];
|
|
|
|
+ // 储存顶布裥棉数据
|
|
|
|
+ private string[,] XiaoCePeizhi = new string[3, 5];
|
|
private enum PackType
|
|
private enum PackType
|
|
{
|
|
{
|
|
压包 = 0,
|
|
压包 = 0,
|