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.

29 lines
901 B

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 "util.h"
int jd_check_wlms_len(EPM_rule_message_t msg) {
POM_AM__set_application_bypass(true);
tag_t root_task, *attachments;
int att_cnt;
EPM_ask_root_task(msg.task, &root_task);
EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt, &attachments);
for (int i = 0;i < att_cnt;i++) {
if (isTypeOf(attachments[i], "ItemRevision")) {
int form_cnt;
tag_t *forms;
AOM_ask_value_tags(attachments[i], "IMAN_master_form_rev", &form_cnt, &forms);
if (form_cnt == 0) {
continue;
}
char *wlms;
AOM_ask_value_string(forms[0], "jd2_wlms", &wlms);
cout << "jd2_wlms====>" << wlms << endl;
if (tc_strlen(wlms) > 40) {
POM_AM__set_application_bypass(false);
return EMH_store_error_s1(EMH_severity_error, EMH_AE_error_base, "物料描述属性长度过长正确长度应该小于等于40个字符");
}
}
}
POM_AM__set_application_bypass(false);
return EPM_go;
}