| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败, 单据无返回值!"; |
| | | objjson.Message = "无待上模单据!"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | }else |
| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败, 单据无返回值!"; |
| | | objjson.Message = "无待开工单据!"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败, 单据无返回值!"; |
| | | objjson.Message = "无待下模单据!"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | |
| | | { |
| | | if(JOneKVP is JObject item) |
| | | { |
| | | foreach (var line in lines) |
| | | //foreach (var line in lines) |
| | | //{ |
| | | //string currentLine = line; |
| | | |
| | | //// 跳过注释行 // |
| | | //if (currentLine.TrimStart().StartsWith("//")) |
| | | //{ |
| | | //continue; |
| | | //} |
| | | |
| | | |
| | | //// 正则表达式匹配 {{ 字段名 }} 所在行的字段,如果有,则进行替换,没有,则默认为空字符串 |
| | | //currentLine = regex.Replace(currentLine, match => |
| | | //{ |
| | | ////判断上一行是否为矩形行,如果是矩形行,则根据矩形行的宽高判断字符是否需要换行 |
| | | |
| | | //string fieldName = match.Groups[1].Value.Trim(); |
| | | //if (msg != null && item.ContainsKey(fieldName)) |
| | | //{ |
| | | //return item[fieldName]?.ToString() ?? ""; |
| | | //} |
| | | //return ""; |
| | | //}); |
| | | //// 将所有 \n 的换行符 替换为 \r\n |
| | | |
| | | //sb.Append(currentLine); |
| | | //sb.Append("\r\n"); // 标准换行 |
| | | //} |
| | | |
| | | for(int i = 0; i<lines.Length; i++) |
| | | { |
| | | string currentLine = line; |
| | | string currentLine = lines[i]; |
| | | string preLine = ""; |
| | | if(i>0) |
| | | { |
| | | // 获取当前行的上一行,用于判断是否是矩形框 |
| | | preLine = lines[i - 1]; |
| | | } |
| | | |
| | | // 跳过注释行 // |
| | | if (currentLine.TrimStart().StartsWith("//")) |
| | |
| | | continue; |
| | | } |
| | | |
| | | |
| | | // 正则表达式匹配 {{ 字段名 }} 所在行的字段,如果有,则进行替换,没有,则默认为空字符串 |
| | | currentLine = regex.Replace(currentLine, match => |
| | | { |