You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

618 lines
20 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//#include "dfl_custom.h"
//#include <tc/envelope.h>
//#include <base_utils/IFail.hxx>
//#include <base_utils/TcResultStatus.hxx>
//#include <tccore/aom_prop.h>
//#include "ado.h"
//#include <tccore\aom.h>
//#include <tccore\aom_prop.h>
//#include "rapidjson/document.h"
//#include <tccore/uom.h>
//#include "rapidjson/writer.h"
//#include <sstream>
//#include <iostream>
//#include <fstream>
//#include "ocilib.h"
//#include <regex>
//#include <tccore/grm.h>
//#include <bom/bom.h>
//#include <cfm/cfm.h>
//#include <me/me.h>
//#include <property/nr.h>
//#include <tccore/aom.h>
//#include <tccore/item.h>
//#include <tccore/workspaceobject.h>
//using namespace std;
//extern "C" int POM_AM__set_application_bypass(logical bypass);
////regex qq_reg("^1ZDB5.*\\d{1,}1000X.*-\\d{5,}$");
//tag_t getPBomTag(tag_t designRev) {
// char* object_type;
// AOM_ask_value_string(designRev,"object_type",&object_type);
// if (strcmp(object_type,"ZT2_Design3DRevision") == 0) {
// int num;
// tag_t* mantrs;
// ITKCALL(AOM_ask_value_tags(designRev, "representation_for", &num, &mantrs));
// return mantrs[0];
// }
// else if (strcmp(object_type, "Part Revision") == 0) {
// return designRev;
// }
//}
//void getDrawNo(tag_t bom_line,string &drawNo){
// char* bl_desc;
// AOM_ask_value_string(bom_line, "bl_rev_object_desc", &bl_desc);
// regex qq_reg2("^1ZDB5.*\\d{1,}1000X.*");
// //string item_id = id;
// AOM_ask_value_string(bom_line, "bl_rev_object_desc", &bl_desc);
// vector<string> descVec1;
// Split(bl_desc, " ", descVec1);
// printf("bl_desc===>%s\n", bl_desc);
// if (descVec1.size() > 1) {
// string drawNos = descVec1[1];
// printf("drawNos===>%s\n", descVec1[0].c_str());
// printf("drawNos===>%s\n", drawNos.c_str());
// vector<string> drawNoVec1;
// Split(drawNos, "-", drawNoVec1);
// if (drawNoVec1.size() > 1) {
// drawNo = drawNoVec1[0];
// smatch result;
// vector<string> vec2;
// Split(drawNo,"_", vec2);
// if (vec2.size() > 1) {
// drawNo = vec2[0];
// }
// bool ret = regex_match(drawNo, result, qq_reg2);
// if (ret) {
// drawNo = "1ZDB5*10000X";
// }
// }
// }
//}
////<2F><><EFBFBD><EFBFBD>PBOM
////void
//typedef struct {
// string name;//<2F><>Ʒ<EFBFBD>ͺ<EFBFBD> <20>͡<EFBFBD><CDA1>С<EFBFBD><D0A1>ߡ<EFBFBD><DFA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// string zzmb;
// string xh;
// string tlth;
// string type;
// string tl;
// string yjgx;
// string ejgx;
//}FeedRule;
//
//struct StBomBean {
// string currentName;//<2F><>Ʒ<EFBFBD>ͺ<EFBFBD> <20>͡<EFBFBD><CDA1>С<EFBFBD><D0A1>ߡ<EFBFBD><DFA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// tag_t bomline;
// boolean st = false;
// boolean istl = false;
// boolean flag = true; //<2F><>һ<EFBFBD>
// vector<StBomBean> childs;
//
//};
//
//boolean isSt(tag_t matnr) {
// int cnt2, numFac, cnt3;
// boolean flag = false;
// char** procureType, ** factorys, ** specialProcureType;
// AOM_ask_value_strings(matnr, "zt2_SZSpecialProcuretype", &cnt3, &specialProcureType); //Ϊ/
// AOM_ask_value_strings(matnr, "zt2_SZProcuretype", &cnt2, &procureType); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// AOM_ask_value_strings(matnr, "zt2_SZFactory", &numFac, &factorys);
// for (int i = 0; i < numFac; i++) {
// if (strcmp(factorys[i], "M060") == 0 && cnt2 > i && cnt3 > i) {
// if (strstr(procureType[i], "<22><><EFBFBD><EFBFBD>") != NULL && strcmp(specialProcureType[i], "/") == 0) {
// flag = true;
// }
// }
// }
// return flag;
//}
//void getBomMessage(vector<StBomBean>& stBomlines, tag_t cBomLine, StBomBean &pBean) {
//
// int c_line_count;
// tag_t * c_line_tags;
// //char* parentName;
// //ITKCALL(AOM_ask_value_tag(pBomLine, "bl_line_object", &mantr));
// //ITKCALL(AOM_ask_value_string(mantr, "object_name", &parentName));
// ITKCALL(BOM_line_ask_all_child_lines(cBomLine, &c_line_count, &c_line_tags));
// tag_t cmantr;
// char* cName;
// ITKCALL(AOM_ask_value_tag(cBomLine, "bl_line_object", &cmantr));
// ITKCALL(AOM_ask_value_string(cmantr, "object_name", &cName));
// printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>===>%s\n", cName);
// StBomBean bean;
// bean.bomline = cBomLine;
// bean.currentName = cName;
// bean.flag = false;
// if (c_line_count > 0 && isSt(cmantr)) {
// bean.st = true;
// //stBomlines.push_back(bean);
// pBean.childs.push_back(bean);
// }
// else if (c_line_count == 0) {
// bean.st = true;
// // stBomlines.push_back(bean);
// pBean.childs.push_back(bean);
// }
// else {
// for (int i = 0; i < c_line_count; i++) {
// tag_t c_line_tag = c_line_tags[i];
// getBomMessage(stBomlines, c_line_tag,bean);
// }
// // stBomlines.push_back(bean);
// pBean.childs.push_back(bean);
// }
//}
//void getBomMessage(vector<StBomBean> &stBomlines, tag_t cBomLine) {
//
// int c_line_count;
// tag_t * c_line_tags;
// //char* parentName;
// //ITKCALL(AOM_ask_value_tag(pBomLine, "bl_line_object", &mantr));
// //ITKCALL(AOM_ask_value_string(mantr, "object_name", &parentName));
// ITKCALL(BOM_line_ask_all_child_lines(cBomLine, &c_line_count, &c_line_tags));
// tag_t cmantr;
// char* cName;
// ITKCALL(AOM_ask_value_tag(cBomLine, "bl_line_object", &cmantr));
// ITKCALL(AOM_ask_value_string(cmantr, "object_name", &cName));
// StBomBean bean;
// bean.bomline = cBomLine;
// bean.currentName = cName;
// if (c_line_count > 0 && isSt(cmantr)) {
// bean.st = true;
// stBomlines.push_back(bean);
// }
// else if (c_line_count == 0) {
// bean.st = true;
// stBomlines.push_back(bean);
// //printf("st = true===>%s\n", cName);
// }
// else {
// printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>============>%s\n", cName);
// for (int i = 0; i < c_line_count; i++) {
// tag_t c_line_tag = c_line_tags[i];
// getBomMessage( stBomlines, c_line_tag, bean);
// }
// stBomlines.push_back(bean);
// printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>===========>%d\n", bean.childs.size());
// }
//}
//void autoFeedLike(tag_t towGxLine, StBomBean& pBean, vector<StBomBean>& stBomlines) {
// if (!pBean.st) {
// printf("pBean.childs==>%d\n", pBean.childs.size());
// for (int i = 0; i < pBean.childs.size(); i++) {
// StBomBean& child = pBean.childs[i];
// autoFeedLike(towGxLine, child, stBomlines);
// }
// }
// else if (!pBean.istl) {
//
// pBean.istl = true;
// tag_t newChild;
// ITKCALL(BOM_line_copy(towGxLine, pBean.bomline, NULLTAG, &newChild));
// //ITKCALL(AOM_save(newChild));
// }
//}
//void autoFeedLike(tag_t towGxLine, StBomBean& pBean, string name2, vector<StBomBean>& stBomlines) {
//
// printf(" pBean.childs.size()%d\n", pBean.childs.size());
// for (int i = 0; i < pBean.childs.size(); i++) {
// StBomBean& child = pBean.childs[i];
// printf("child.currentName%s %s \n", child.currentName.c_str(), name2.c_str());
// if (name2.compare(child.currentName) == 0) {
// printf("===================\n");
// autoFeedLike(towGxLine, child, stBomlines);
// }
// }
//}
//
//void startFeed(tag_t meprocess, vector<StBomBean>& stBomlines, FeedRule bean, string name1, string name2) {
// int bvr_count = 0;
// tag_t ebom_window = NULLTAG;
// tag_t bom_line = NULLTAG;
// tag_t item_tag = NULLTAG, * c_line_tags;
// (BOM_create_window(&ebom_window));
// tag_t* bvr_list = NULL;
// (ITEM_rev_list_bom_view_revs(meprocess, &bvr_count, &bvr_list));
// printf("bvr_count=%d", bvr_count);
//
// (BOM_set_window_top_line_bvr(ebom_window, bvr_list[0], &bom_line)); //<2F><><EFBFBD><EFBFBD>bom<6F><6D>ȡ
// //bom_line<6E><65><EFBFBD><EFBFBD>
// int c_line_count;
// ITKCALL(BOM_line_ask_all_child_lines(bom_line, &c_line_count, &c_line_tags)); // һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// //һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// for (int i = 0; i < c_line_count; i++) {
// tag_t oneGx = c_line_tags[i], * towGxLines;
// int c_cnt = 0;
// char* yjName;
// tag_t yjGx;
// ITKCALL(AOM_ask_value_tag(oneGx, "bl_line_object", &yjGx));
// AOM_ask_value_string(yjGx, "object_name", &yjName);
// printf("yjName%s %s \n", yjName, bean.yjgx.c_str());
// if (bean.yjgx.compare(yjName) == 0) {
// BOM_line_ask_all_child_lines(oneGx, &c_cnt, &towGxLines);
// //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// for (int j = 0; j < c_cnt; j++) {
// tag_t towGxLine = towGxLines[j];
// char* ejName;
// tag_t ejGx;
// ITKCALL(AOM_ask_value_tag(towGxLine, "bl_line_object", &ejGx));
// AOM_ask_value_string(ejGx, "object_name", &ejName);
// printf("ejName%s %s\n", ejName, bean.ejgx.c_str());
// if (bean.ejgx.compare(ejName) == 0) {
// printf("stBomlines %d\n", stBomlines.size());
// for (int t = 0; t < stBomlines.size(); t++) {
// StBomBean& stBom = stBomlines[t];
// tag_t newChild;
// printf("stBom.currentName==>%s %d\n", stBom.currentName.c_str(), stBom.childs.size());
// if (stBom.currentName.compare(name1) == 0) {
// //if (!stBom.istl && stBom.st && stBom.flag) {
// autoFeedLike(towGxLine, stBom, name2, stBomlines);
// //stBom.istl = true;
// //}
// }
// }
// }
// }
// }
// }
// BOM_save_window(ebom_window);
// BOM_close_window(ebom_window);
//}
//void startFeed(tag_t meprocess, vector<StBomBean>& stBomlines, FeedRule bean, vector<string> names) {
// int bvr_count = 0;
// tag_t ebom_window = NULLTAG;
// tag_t bom_line = NULLTAG;
// tag_t item_tag = NULLTAG, * c_line_tags;
// (BOM_create_window(&ebom_window));
// tag_t* bvr_list = NULL;
// (ITEM_rev_list_bom_view_revs(meprocess, &bvr_count, &bvr_list));
// printf("bvr_count=%d", bvr_count);
//
// (BOM_set_window_top_line_bvr(ebom_window, bvr_list[0], &bom_line)); //<2F><><EFBFBD><EFBFBD>bom<6F><6D>ȡ
// //bom_line<6E><65><EFBFBD><EFBFBD>
// int c_line_count;
// ITKCALL(BOM_line_ask_all_child_lines(bom_line, &c_line_count, &c_line_tags)); // һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// //һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// for (int i = 0; i < c_line_count; i++) {
// tag_t oneGx = c_line_tags[i], * towGxLines;
// int c_cnt = 0;
// char* yjName;
// tag_t yjGx;
// ITKCALL(AOM_ask_value_tag(oneGx, "bl_line_object", &yjGx));
// AOM_ask_value_string(yjGx, "object_name", &yjName);
// if (bean.yjgx.compare(yjName) == 0) {
// BOM_line_ask_all_child_lines(oneGx, &c_cnt, &towGxLines);
// //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// for (int j = 0; j < c_cnt; j++) {
// tag_t towGxLine = towGxLines[j];
// char* ejName;
// tag_t ejGx;
// ITKCALL(AOM_ask_value_tag(towGxLine, "bl_line_object", &ejGx));
// AOM_ask_value_string(ejGx, "object_name", &ejName);
// if (bean.ejgx.compare(ejName) == 0) {
// for (int t = 0; t < stBomlines.size(); t++) {
// StBomBean& stBom = stBomlines[t];
// tag_t newChild;
// if (std::find(names.begin(), names.end(), stBom.currentName) != names.end() && stBom.flag) {
// printf("stBom.currentName2%s %d\n", stBom.currentName.c_str(), !stBom.istl);
// if (!stBom.istl) {
// autoFeedLike(towGxLine, stBom, stBomlines);
// stBom.istl = true;
// }
// }
// }
// }
// }
// }
// }
// BOM_save_window(ebom_window);
// BOM_close_window(ebom_window);
//}
//void startFeed(tag_t meprocess, vector<StBomBean>& stBomlines, FeedRule bean, string nameLike) {
// int bvr_count = 0;
// tag_t ebom_window = NULLTAG;
// tag_t bom_line = NULLTAG;
// tag_t item_tag = NULLTAG, * c_line_tags;
// (BOM_create_window(&ebom_window));
// tag_t* bvr_list = NULL;
// (ITEM_rev_list_bom_view_revs(meprocess, &bvr_count, &bvr_list));
// printf("bvr_count=%d", bvr_count);
//
// (BOM_set_window_top_line_bvr(ebom_window, bvr_list[0], &bom_line)); //<2F><><EFBFBD><EFBFBD>bom<6F><6D>ȡ
// //bom_line<6E><65><EFBFBD><EFBFBD>
// int c_line_count;
// ITKCALL(BOM_line_ask_all_child_lines(bom_line, &c_line_count, &c_line_tags)); // һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// //һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// for (int i = 0; i < c_line_count; i++) {
// tag_t oneGx = c_line_tags[i], * towGxLines;
// int c_cnt = 0;
// char* yjName;
// tag_t yjGx;
// ITKCALL(AOM_ask_value_tag(oneGx, "bl_line_object", &yjGx));
// AOM_ask_value_string(yjGx, "object_name", &yjName);
// printf("yjName===>%s %s \n", yjName, bean.yjgx.c_str());
//
// if (bean.yjgx.compare(yjName) == 0) {
// BOM_line_ask_all_child_lines(oneGx, &c_cnt, &towGxLines);
// //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// for (int j = 0; j < c_cnt; j++) {
// tag_t towGxLine = towGxLines[j];
// char* ejName;
// tag_t ejGx;
// ITKCALL(AOM_ask_value_tag(towGxLine, "bl_line_object", &ejGx));
// AOM_ask_value_string(ejGx, "object_name", &ejName);
// printf("ejName===>%s \n", ejName);
// if (bean.ejgx.compare(ejName) == 0) {
// for (int t = 0; t < stBomlines.size(); t++) {
// StBomBean& stBom = stBomlines[t];
// tag_t newChild;
// //printf("Tlstart===>%s %d %d\n", stBom.currentName.c_str(), stBom.st, !stBom.istl);
// //printf("Tlstart===>%d %d\n", );
// printf("stBom.currentName2==>%s %d\n", stBom.currentName.c_str(), !stBom.istl);
// if (!nameLike.empty()) {
// if (strstr(stBom.currentName.c_str(), nameLike.c_str()) != NULL) {
// printf("stBom.currentName2==>%s %d\n", stBom.currentName.c_str(), !stBom.st);
// if (!stBom.istl && stBom.flag) {
// autoFeedLike(towGxLine, stBom, stBomlines);
// stBom.istl = true;
// }
// }
// }
// else if (!stBom.istl) {
// autoFeedLike(towGxLine, stBom, stBomlines);
// stBom.istl = true;
// //ITKCALL(BOM_line_copy(towGxLine, stBom.bomline, NULLTAG, &newChild));
// }
// //ITKCALL(AOM_save(newChild));
// }
// break;
// }
// }
// }
// }
// BOM_save_window(ebom_window);
// BOM_close_window(ebom_window);
//}
//void AutoFeeding(char * revUid,string &errBuffer) {
// string sql = "select MC,ZZMB,XH,TLTH,LX,TL,YJGX,EJGX from CHINT_GYGL_001 WHERE LX is not NULL ORDER BY XH ";
//
// /*string sql22 = "select CHINT_MATERIAL_SEQ.nextval as sid from dual";
// int colmun2 = 0, count2 = 0;
// char*** outputValue2 = NULL;
// printf("search1");
// QuerySQLNoInputParam((char*)sql22.c_str(), &colmun2, &count2, &outputValue2);*/
// tag_t matnrRev;
// ITK__convert_uid_to_tag(revUid, &matnrRev);
//
//
// tag_t mantr = getPBomTag(matnrRev);
// int n_references = 0;
// int* levels = 0;
// tag_t* references_tag = NULLTAG;
// char** relation_type_name = NULL;
// //ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// ITKCALL(WSOM_where_referenced(mantr, 1, &n_references, &levels, &references_tag, &relation_type_name));
// //boolean hasProcess = false;
// int meNum = 0;
// tag_t meprocess;
// for (int i = 0; i < n_references; i++)
// {
// char* refType;
// tag_t refTag = references_tag[i];
// AOM_ask_value_string(refTag, "object_type", &refType);
// if (strcmp(refType, "MEProcessRevision") == 0) {
// //hasProcess = true;
// //break;
// meNum = meNum + 1;
// meprocess = refTag;
// }
// }
// if (meNum == 0) {
// errBuffer.append("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>պ<EFBFBD><D5BA><EFBFBD><EFBFBD>²<EFBFBD><C2B2><EFBFBD>.\n");
// return;
// }
// if (meNum > 1) {
// errBuffer.append("<22><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>պ<EFBFBD><D5BA><EFBFBD><EFBFBD>²<EFBFBD><C2B2><EFBFBD>.\n");
// return;
// }
// int url_num = 0;
// char** url_vals = NULL;
// PREF_ask_char_values("database_tc", &url_num, &url_vals);
// string url = url_vals[0];
// url.append("/").append(url_vals[2]);
// string errorBuff;
// //map<string,
// printf("url ==> %s \n", url.c_str());
// if (ConnServer(url_vals[3], url_vals[4], (char*)url.c_str()) == -1)
// {
// printf("<22><>ʾ:<3A>м<EFBFBD><D0BC><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>\n");
// //ifail = 1;
// }
// char selectCPZ[200], selectGyId[200];
// int outputColumn1 = 0, outputValueCount1 = 0;
// char*** outputValue1 = NULL;
// sprintf(selectGyId, sql.c_str());
// printf("search2 %s \n", selectGyId);
// QuerySQLNoInputParam(selectGyId, &outputColumn1, &outputValueCount1, &outputValue1);
// printf("search22\n");
// map<string, vector<FeedRule>> drawMap;
// map<string, vector<FeedRule>> nameMap;
// for (int j = 0; j < outputValueCount1; j++) {
// string name = outputValue1[j][0];
// string zzmb = outputValue1[j][1];
// string num = outputValue1[j][2];
// string tlth = outputValue1[j][3];
// string type = outputValue1[j][4];
// string tl = outputValue1[j][5];
// string yjgx = outputValue1[j][6];
// string ejgx = outputValue1[j][7];
// FeedRule ruleBean;
// ruleBean.name = name;
// ruleBean.zzmb = zzmb;
// ruleBean.xh = num;
// ruleBean.tlth = tlth;
// ruleBean.type = type;
// ruleBean.tl = tl;
// ruleBean.yjgx = yjgx;
// ruleBean.ejgx = ejgx;
// if (strstr(zzmb.c_str(),"ZDB") != NULL) {
// if (drawMap.count(zzmb) == 0) {
// vector<FeedRule> feedRuleVec;
// feedRuleVec.push_back(ruleBean);
// drawMap[zzmb] = feedRuleVec;
// }
// else {
// drawMap[zzmb].push_back(ruleBean);
// }
// }
// else {
// if (nameMap.count(zzmb) == 0) {
// vector<FeedRule> feedRuleVec;
// feedRuleVec.push_back(ruleBean);
// nameMap[zzmb] = feedRuleVec;
// }
// else {
// nameMap[zzmb].push_back(ruleBean);
// }
// }
// }
//
// //<2F><><EFBFBD><EFBFBD>PBOM
// tag_t* bvr_list = NULL, ebom_window, bom_line;
// int bvr_count;
// ITKCALL(ITEM_rev_list_bom_view_revs(mantr, &bvr_count, &bvr_list));
// ITKCALL(BOM_create_window(&ebom_window));
// ITKCALL(BOM_set_window_top_line(ebom_window, NULL, mantr, NULLTAG, &bom_line));
//
// int c_line_count;
// tag_t * c_line_tags;
// vector<StBomBean> stBomlines;
// ITKCALL(BOM_line_ask_all_child_lines(bom_line, &c_line_count, &c_line_tags));
// for (int i = 0; i < c_line_count; i++) {
// getBomMessage(stBomlines, c_line_tags[i]);
// }
// POM_AM__set_application_bypass(true);
// string drawNo;
// getDrawNo(bom_line, drawNo);
// printf("<22><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>=====>%s\n", drawNo.c_str());
// //
// if (drawMap.count(drawNo)>0) {
// //ͼ<><CDBC>ƥ<EFBFBD><C6A5>
// vector<FeedRule> beans = drawMap[drawNo];
// printf("beans===>%d\n", beans.size());
// for (int t = 0; t < beans.size(); t++) {
// FeedRule bean = beans[t];
// printf("nameMatnr%s\n", bean.tlth.c_str());
// if (bean.tlth.empty()) {
// //ȫͶ
// printf("beans===>%s %s\n", bean.yjgx.c_str(), bean.ejgx.c_str());
// startFeed(meprocess, stBomlines,bean,"");
// }
// else{
// //ʣ<><CAA3>ȫͶ
// if (bean.tlth.compare("else") == 0) {
// startFeed(meprocess, stBomlines, bean,"");
// }
// else {
// string nameMatnr = bean.tlth;
// //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>ƥ<EFBFBD><C6A5>Ͷ
//
// if (strstr(nameMatnr.c_str(),"*") != NULL) {
// vector<string> liVec;
// string nameLike;
// Split(nameMatnr, "*", liVec);
// for (int x = 0; x < liVec.size(); x++) {
// if (!liVec[x].empty()) {
// nameLike = liVec[x];
// }
// }
// printf("beans===>%s %s\n", bean.yjgx.c_str(), nameLike);
// startFeed(meprocess, stBomlines, bean, nameLike);
// }
// else {
// printf("beans===>%s %s\n", bean.yjgx.c_str(), bean.ejgx.c_str());
// //<2F><><EFBFBD><EFBFBD><EFBFBD>ƾ<EFBFBD>׼ƥ<D7BC><C6A5>Ͷ<EFBFBD><CDB6>
// if (strstr(nameMatnr.c_str(), "\\") != NULL) {
// vector<string> names;
// Split(nameMatnr, "\\", names);
// startFeed(meprocess, stBomlines, bean, names[0], names[1]);
// }
// else {
// vector<string> names;
// Split(nameMatnr, ";", names);
// startFeed(meprocess, stBomlines, bean, names);
// }
// }
// }
// }
// }
// }
// else {
// //map<string, vector<FeedRule>> nameMap;
// map<string, vector<FeedRule>>::iterator it;
// //<2F><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>ƥ<EFBFBD><C6A5>
// for (it = nameMap.begin(); it != nameMap.end(); it++) {
// string s = it->first;
// char* nowName;
// AOM_ask_value_string(mantr,"object_name",&nowName);
// if (strstr(nowName, s.c_str()) != NULL) {
// vector<FeedRule> beans = nameMap[s];
// printf("beans===>%d\n", beans.size());
// for (int t = 0; t < beans.size(); t++) {
// FeedRule bean = beans[t];
// printf("beans===>%s %s\n", bean.yjgx.c_str(), bean.ejgx.c_str());
// if (bean.tlth.empty()) {
// //ȫͶ
// //printf("beans===>%s %s\n", bean.yjgx.c_str(), bean.ejgx.c_str());
// startFeed(meprocess, stBomlines, bean, "");
// }
// else {
// //ʣ<><CAA3>ȫͶ
// if (bean.tlth.compare("else") == 0) {
// startFeed(meprocess, stBomlines, bean, "");
// }
// else {
// string nameMatnr = bean.tlth;
// //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>ƥ<EFBFBD><C6A5>Ͷ
// if (strstr(nameMatnr.c_str(), "*") != NULL) {
// vector<string> liVec;
// string nameLike;
// Split(nameMatnr, "*", liVec);
// for (int x = 0; x < liVec.size(); x++) {
// if (!liVec[x].empty()) {
// nameLike = liVec[x];
// }
// }
// startFeed(meprocess, stBomlines, bean, nameLike);
// }
// else {
// //<2F><><EFBFBD><EFBFBD><EFBFBD>ƾ<EFBFBD>׼ƥ<D7BC><C6A5>Ͷ<EFBFBD><CDB6>
// if (strstr(nameMatnr.c_str(), "\\") != NULL) {
// vector<string> names;
// Split(nameMatnr, "\\", names);
// printf("beans===>%s %s\n", names[0].c_str(), names[1].c_str());
// startFeed(meprocess, stBomlines, bean, names[0], names[1]);
// }
// else {
// vector<string> names;
// Split(nameMatnr, ";", names);
// for (int k = 0; k < names.size(); k++) {
// printf("k===>%s\n", names[k].c_str());
// }
// printf("beans===>%d %d\n", names.size());
// startFeed(meprocess, stBomlines, bean, names);
// }
// }
// }
// }
// }
// }
// }
// }
//
// POM_AM__set_application_bypass(false);
// ITKCALL(BOM_close_window(ebom_window));
// //readProcessBom(bom_line, errorBuff);
// DisConnServer();
//}