Compare commits
No commits in common. 'main' and 'main01' have entirely different histories.
@ -1,66 +0,0 @@
|
|||||||
import com.matrixone.apps.domain.util.FrameworkException;
|
|
||||||
import com.matrixone.apps.domain.util.MqlUtil;
|
|
||||||
import matrix.db.Context;
|
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
public class AegChange4_mxJPO {
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(AegChange2_mxJPO.class.getName());
|
|
||||||
private static final String purchaseGroup = "purchase.plm";
|
|
||||||
private static final String qualityGroup = "quality.plm";
|
|
||||||
private static final String operateGroupIBC = "plm.ibc";
|
|
||||||
private static final String operateGroupRMU = "plm.rmu";
|
|
||||||
private static final String operateGroupLV= "plm.lv";
|
|
||||||
|
|
||||||
|
|
||||||
public void CheckTrustee(Context context, String[] args) throws Exception {
|
|
||||||
String objId = args[0];
|
|
||||||
String personId = args[1];
|
|
||||||
String taskId = args[2];
|
|
||||||
|
|
||||||
LOGGER.info("objId ==> " + objId);
|
|
||||||
LOGGER.info("personId ==> " + personId);
|
|
||||||
LOGGER.info("taskId ==> " + taskId);
|
|
||||||
|
|
||||||
String getPersonName = "print bus " + personId + " select name dump |";
|
|
||||||
String personName = MqlUtil.mqlCommand(context, getPersonName);
|
|
||||||
LOGGER.info("personName ==> " + personName);
|
|
||||||
|
|
||||||
if(!personName.isEmpty()){
|
|
||||||
boolean isFlag = CheckIsPublicAccount(personName);
|
|
||||||
if(isFlag){
|
|
||||||
String getAssignedTask = "print bus " + taskId + " select to[Assigned Tasks].from.name dump |";
|
|
||||||
String assignedTasks = MqlUtil.mqlCommand(context, getAssignedTask);
|
|
||||||
LOGGER.info("assignedTasks ==> " + assignedTasks);
|
|
||||||
|
|
||||||
if(!assignedTasks.isEmpty()){
|
|
||||||
if(assignedTasks.contains("|")){
|
|
||||||
String[] assignedTaskItem = assignedTasks.split("\\|");
|
|
||||||
|
|
||||||
for(String item : assignedTaskItem){
|
|
||||||
if(CheckIsPublicAccount(item)){
|
|
||||||
NoticeInfo(context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else{
|
|
||||||
if (CheckIsPublicAccount(assignedTasks)) {
|
|
||||||
NoticeInfo(context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean CheckIsPublicAccount(String assignedName) throws FrameworkException {
|
|
||||||
if(assignedName.equals(purchaseGroup) || assignedName.equals(qualityGroup) || assignedName.equals(operateGroupIBC) || assignedName.equals(operateGroupLV) || assignedName.equals(operateGroupRMU)){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NoticeInfo(Context context) throws FrameworkException {
|
|
||||||
MqlUtil.mqlCommand(context,"notice $1","\u5df2\u6709\u516c\u5171\u8d26\u53f7\uff0c\u8bf7\u52ff\u591a\u6b21\u6dfb\u52a0");
|
|
||||||
throw new RuntimeException("\u5df2\u6709\u516c\u5171\u8d26\u53f7\uff0c\u8bf7\u52ff\u591a\u6b21\u6dfb\u52a0");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
require.config({
|
|
||||||
paths : {
|
|
||||||
'app' : './VueWidget/js/app.f3689074',
|
|
||||||
'chunk-vendors' : './VueWidget/js/chunk-vendors.2d039da3'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
function init(){
|
|
||||||
require(['app','chunk-vendors'], function(){
|
|
||||||
})
|
|
||||||
console.log(9999);
|
|
||||||
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
.el-table .warning-row{background:oldlace}.el-table .success-row{background:#f0f9eb}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px}
|
|
Before Width: | Height: | Size: 4.2 KiB |
@ -1,47 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<link rel="icon" href="/favicon.ico">
|
|
||||||
<link rel="stylesheet" type="text/css" href="./css/app.d743e96b.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="./css/chunk-vendors.eedde3e4.css">
|
|
||||||
<title>widget-vue</title>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<script src="./Main.js"></script>
|
|
||||||
<script>
|
|
||||||
function widgetLoading(){
|
|
||||||
console.log(123);
|
|
||||||
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
widgetLoading();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="scroll-container">
|
|
||||||
<div id="app" style="width: 50px; height: 500px; background-color: lightblue;"></div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
<style>
|
|
||||||
body, html {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden; /* 防止body滚动 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-container {
|
|
||||||
width: 100%; /* 或你想要的固定宽度 */
|
|
||||||
height: 1500px; /* 设定一个固定高度 */
|
|
||||||
overflow-y: auto; /* 允许Y轴滚动 */
|
|
||||||
border: 1px solid #ccc; /* 可选,仅为了视觉上区分 */
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,541 +0,0 @@
|
|||||||
(function () {
|
|
||||||
"use strict";
|
|
||||||
var t = {
|
|
||||||
68332: function (t, e, l) {
|
|
||||||
var n = l(66848),
|
|
||||||
a = function () {
|
|
||||||
var t = this,
|
|
||||||
e = t.$createElement,
|
|
||||||
l = t._self._c || e;
|
|
||||||
return l("div", {
|
|
||||||
attrs: {
|
|
||||||
id: "app"
|
|
||||||
}
|
|
||||||
}, [l("HelloWorld"), l("TestElementUi"), l("TestTdesignUi")], 1)
|
|
||||||
},
|
|
||||||
o = [],
|
|
||||||
s = function () {
|
|
||||||
var t = this,
|
|
||||||
e = t.$createElement,
|
|
||||||
l = t._self._c || e;
|
|
||||||
return l("section", [l("b-field", {
|
|
||||||
attrs: {
|
|
||||||
grouped: "",
|
|
||||||
"group-multiline": ""
|
|
||||||
}
|
|
||||||
}, [l("div", {
|
|
||||||
staticClass: "control"
|
|
||||||
}, [l("b-switch", {
|
|
||||||
model: {
|
|
||||||
value: t.isBordered,
|
|
||||||
callback: function (e) {
|
|
||||||
t.isBordered = e
|
|
||||||
},
|
|
||||||
expression: "isBordered"
|
|
||||||
}
|
|
||||||
}, [t._v("Bordered")])], 1), l("div", {
|
|
||||||
staticClass: "control"
|
|
||||||
}, [l("b-switch", {
|
|
||||||
model: {
|
|
||||||
value: t.isStriped,
|
|
||||||
callback: function (e) {
|
|
||||||
t.isStriped = e
|
|
||||||
},
|
|
||||||
expression: "isStriped"
|
|
||||||
}
|
|
||||||
}, [t._v("Striped")])], 1), l("div", {
|
|
||||||
staticClass: "control"
|
|
||||||
}, [l("b-switch", {
|
|
||||||
model: {
|
|
||||||
value: t.isNarrowed,
|
|
||||||
callback: function (e) {
|
|
||||||
t.isNarrowed = e
|
|
||||||
},
|
|
||||||
expression: "isNarrowed"
|
|
||||||
}
|
|
||||||
}, [t._v("Narrowed")])], 1), l("div", {
|
|
||||||
staticClass: "control"
|
|
||||||
}, [l("b-switch", {
|
|
||||||
model: {
|
|
||||||
value: t.isHoverable,
|
|
||||||
callback: function (e) {
|
|
||||||
t.isHoverable = e
|
|
||||||
},
|
|
||||||
expression: "isHoverable"
|
|
||||||
}
|
|
||||||
}, [t._v("Hoverable")])], 1), l("div", {
|
|
||||||
staticClass: "control"
|
|
||||||
}, [l("b-switch", {
|
|
||||||
model: {
|
|
||||||
value: t.isFocusable,
|
|
||||||
callback: function (e) {
|
|
||||||
t.isFocusable = e
|
|
||||||
},
|
|
||||||
expression: "isFocusable"
|
|
||||||
}
|
|
||||||
}, [t._v("Focusable")])], 1), l("div", {
|
|
||||||
staticClass: "control"
|
|
||||||
}, [l("b-switch", {
|
|
||||||
model: {
|
|
||||||
value: t.isLoading,
|
|
||||||
callback: function (e) {
|
|
||||||
t.isLoading = e
|
|
||||||
},
|
|
||||||
expression: "isLoading"
|
|
||||||
}
|
|
||||||
}, [t._v("Loading state")])], 1), l("div", {
|
|
||||||
staticClass: "control"
|
|
||||||
}, [l("b-switch", {
|
|
||||||
model: {
|
|
||||||
value: t.isEmpty,
|
|
||||||
callback: function (e) {
|
|
||||||
t.isEmpty = e
|
|
||||||
},
|
|
||||||
expression: "isEmpty"
|
|
||||||
}
|
|
||||||
}, [t._v("Empty")])], 1), l("div", {
|
|
||||||
staticClass: "control"
|
|
||||||
}, [l("b-switch", {
|
|
||||||
model: {
|
|
||||||
value: t.hasMobileCards,
|
|
||||||
callback: function (e) {
|
|
||||||
t.hasMobileCards = e
|
|
||||||
},
|
|
||||||
expression: "hasMobileCards"
|
|
||||||
}
|
|
||||||
}, [t._v("Mobile cards "), l("small", [t._v("(collapsed rows)")])])], 1)]), l("b-table", {
|
|
||||||
attrs: {
|
|
||||||
data: t.isEmpty ? [] : t.data,
|
|
||||||
bordered: t.isBordered,
|
|
||||||
striped: t.isStriped,
|
|
||||||
narrowed: t.isNarrowed,
|
|
||||||
hoverable: t.isHoverable,
|
|
||||||
loading: t.isLoading,
|
|
||||||
focusable: t.isFocusable,
|
|
||||||
"mobile-cards": t.hasMobileCards
|
|
||||||
},
|
|
||||||
scopedSlots: t._u([{
|
|
||||||
key: "empty",
|
|
||||||
fn: function () {
|
|
||||||
return [l("div", {
|
|
||||||
staticClass: "has-text-centered"
|
|
||||||
}, [t._v("No records")])]
|
|
||||||
},
|
|
||||||
proxy: !0
|
|
||||||
}])
|
|
||||||
}, [l("b-table-column", {
|
|
||||||
attrs: {
|
|
||||||
field: "id",
|
|
||||||
label: "ID",
|
|
||||||
width: "40",
|
|
||||||
"td-attrs": t.columnTdAttrs,
|
|
||||||
numeric: ""
|
|
||||||
},
|
|
||||||
scopedSlots: t._u([{
|
|
||||||
key: "default",
|
|
||||||
fn: function (e) {
|
|
||||||
return [t._v(" " + t._s(e.row.id) + " ")]
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
}), l("b-table-column", {
|
|
||||||
attrs: {
|
|
||||||
field: "name",
|
|
||||||
label: "name",
|
|
||||||
"td-attrs": t.columnTdAttrs
|
|
||||||
},
|
|
||||||
scopedSlots: t._u([{
|
|
||||||
key: "default",
|
|
||||||
fn: function (e) {
|
|
||||||
return [t._v(" " + t._s(e.row.name) + " ")]
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
}), l("b-table-column", {
|
|
||||||
attrs: {
|
|
||||||
field: "type",
|
|
||||||
label: "type",
|
|
||||||
"td-attrs": t.columnTdAttrs
|
|
||||||
},
|
|
||||||
scopedSlots: t._u([{
|
|
||||||
key: "default",
|
|
||||||
fn: function (e) {
|
|
||||||
return [t._v(" " + t._s(e.row.type) + " ")]
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
})], 1)], 1)
|
|
||||||
},
|
|
||||||
r = [],
|
|
||||||
i = (l(44114), {
|
|
||||||
data() {
|
|
||||||
const t = [];
|
|
||||||
return {
|
|
||||||
data: t,
|
|
||||||
isEmpty: !1,
|
|
||||||
isBordered: !1,
|
|
||||||
isStriped: !1,
|
|
||||||
isNarrowed: !1,
|
|
||||||
isHoverable: !1,
|
|
||||||
isFocusable: !1,
|
|
||||||
isLoading: !1,
|
|
||||||
hasMobileCards: !0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.axios.get("https://r2023x.mydomain.com/3dspace/FindChangeActions/getChangeInfo").then((t => {
|
|
||||||
let e = t.data.data,
|
|
||||||
l = e.split("\n"),
|
|
||||||
n = [];
|
|
||||||
for (let a = 0; a < l.length; a++) {
|
|
||||||
const t = l[a],
|
|
||||||
e = t.split("|"),
|
|
||||||
o = {};
|
|
||||||
o.id = e[4], o.name = e[5], o.type = e[3], n.push(o)
|
|
||||||
}
|
|
||||||
this.data = n
|
|
||||||
}))
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
dateThAttrs(t) {
|
|
||||||
return "Date" === t.label ? {
|
|
||||||
title: 'This title is sponsored by "th-attrs" prop',
|
|
||||||
class: "has-text-success"
|
|
||||||
} : null
|
|
||||||
},
|
|
||||||
columnTdAttrs(t, e) {
|
|
||||||
return "Total" === t.id ? "ID" === e.label ? {
|
|
||||||
colspan: 4,
|
|
||||||
class: "has-text-weight-bold",
|
|
||||||
style: {
|
|
||||||
"text-align": "left !important"
|
|
||||||
}
|
|
||||||
} : "Gender" === e.label ? {
|
|
||||||
class: "has-text-weight-semibold"
|
|
||||||
} : {
|
|
||||||
style: {
|
|
||||||
display: "none"
|
|
||||||
}
|
|
||||||
} : null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
c = i,
|
|
||||||
d = l(81656),
|
|
||||||
u = (0, d.A)(c, s, r, !1, null, null, null),
|
|
||||||
p = u.exports,
|
|
||||||
f = function () {
|
|
||||||
var t = this,
|
|
||||||
e = t.$createElement,
|
|
||||||
l = t._self._c || e;
|
|
||||||
return l("el-table", {
|
|
||||||
staticStyle: {
|
|
||||||
width: "100%"
|
|
||||||
},
|
|
||||||
attrs: {
|
|
||||||
data: t.tableData,
|
|
||||||
"row-class-name": t.tableRowClassName
|
|
||||||
}
|
|
||||||
}, [l("el-table-column", {
|
|
||||||
attrs: {
|
|
||||||
prop: "id",
|
|
||||||
label: "ID",
|
|
||||||
width: "180"
|
|
||||||
}
|
|
||||||
}), l("el-table-column", {
|
|
||||||
attrs: {
|
|
||||||
prop: "name",
|
|
||||||
label: "姓名",
|
|
||||||
width: "180"
|
|
||||||
}
|
|
||||||
}), l("el-table-column", {
|
|
||||||
attrs: {
|
|
||||||
prop: "type",
|
|
||||||
label: "类型"
|
|
||||||
}
|
|
||||||
})], 1)
|
|
||||||
},
|
|
||||||
b = [],
|
|
||||||
m = {
|
|
||||||
methods: {
|
|
||||||
tableRowClassName({
|
|
||||||
row: t,
|
|
||||||
rowIndex: e
|
|
||||||
}) {
|
|
||||||
return 1 === e ? (console.log(t), "warning-row") : 3 === e ? (console.log(t), "success-row") : ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
tableData: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.axios.get("https://r2023x.mydomain.com/3dspace/FindChangeActions/getChangeInfo").then((t => {
|
|
||||||
let e = t.data.data,
|
|
||||||
l = e.split("\n"),
|
|
||||||
n = [];
|
|
||||||
for (let a = 0; a < l.length; a++) {
|
|
||||||
const t = l[a],
|
|
||||||
e = t.split("|"),
|
|
||||||
o = {};
|
|
||||||
o.id = e[4], o.name = e[5], o.type = e[3], n.push(o)
|
|
||||||
}
|
|
||||||
this.tableData = n
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
},
|
|
||||||
h = m,
|
|
||||||
v = (0, d.A)(h, f, b, !1, null, null, null),
|
|
||||||
y = v.exports,
|
|
||||||
w = function () {
|
|
||||||
var t = this,
|
|
||||||
e = t.$createElement,
|
|
||||||
l = t._self._c || e;
|
|
||||||
return l("t-table", {
|
|
||||||
attrs: {
|
|
||||||
data: t.data,
|
|
||||||
columns: t.columns,
|
|
||||||
rowKey: "property",
|
|
||||||
lazyLoad: ""
|
|
||||||
},
|
|
||||||
scopedSlots: t._u([{
|
|
||||||
key: "title-slot-name",
|
|
||||||
fn: function () {
|
|
||||||
return [l("user-circle-icon"), t._v(" 类型 ")]
|
|
||||||
},
|
|
||||||
proxy: !0
|
|
||||||
}])
|
|
||||||
})
|
|
||||||
},
|
|
||||||
g = [],
|
|
||||||
_ = l(8601),
|
|
||||||
x = l(98981),
|
|
||||||
C = l(87203),
|
|
||||||
T = l(80185);
|
|
||||||
const k = [];
|
|
||||||
for (let U = 0; U < 5; U++) k.push({
|
|
||||||
index: U + 1,
|
|
||||||
applicant: ["贾明", "张三", "王芳"][U % 3],
|
|
||||||
status: U % 3,
|
|
||||||
channel: ["电子签署", "纸质签署", "纸质签署"][U % 3],
|
|
||||||
detail: {
|
|
||||||
email: ["w.cezkdudy@lhll.au", "r.nmgw@peurezgn.sl", "p.cumx@rampblpa.ru"][U % 3]
|
|
||||||
},
|
|
||||||
matters: ["宣传物料制作费用", "algolia 服务报销", "相关周边制作费", "激励奖品快递费"][U % 4],
|
|
||||||
time: [2, 3, 1, 4][U % 4],
|
|
||||||
createTime: ["2022-01-01", "2022-02-01", "2022-03-01", "2022-04-01", "2022-05-01"][U % 4]
|
|
||||||
});
|
|
||||||
const A = [{
|
|
||||||
colKey: "applicant",
|
|
||||||
title: "title-slot-name",
|
|
||||||
width: 120
|
|
||||||
}, {
|
|
||||||
colKey: "matters",
|
|
||||||
title: (t, {
|
|
||||||
colIndex: e
|
|
||||||
}) => t("b", {
|
|
||||||
style: "font-wight: bold"
|
|
||||||
}, [
|
|
||||||
["", "申请事项"][e]
|
|
||||||
])
|
|
||||||
}, {
|
|
||||||
colKey: "status",
|
|
||||||
title: "审批状态",
|
|
||||||
width: 120,
|
|
||||||
cell: (t, {
|
|
||||||
row: e
|
|
||||||
}) => {
|
|
||||||
const l = {
|
|
||||||
0: {
|
|
||||||
label: "审批通过",
|
|
||||||
theme: "success",
|
|
||||||
icon: t(_.A)
|
|
||||||
},
|
|
||||||
1: {
|
|
||||||
label: "审批失败",
|
|
||||||
theme: "danger",
|
|
||||||
icon: t(x.A)
|
|
||||||
},
|
|
||||||
2: {
|
|
||||||
label: "审批过期",
|
|
||||||
theme: "warning",
|
|
||||||
icon: t(C.A)
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return t("t-tag", {
|
|
||||||
attrs: {
|
|
||||||
shape: "round",
|
|
||||||
theme: l[e.status].theme,
|
|
||||||
variant: "light-outline"
|
|
||||||
}
|
|
||||||
}, [l[e.status].icon, l[e.status].label])
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
title: "邮箱地址",
|
|
||||||
colKey: "detail.email",
|
|
||||||
width: 200
|
|
||||||
}, {
|
|
||||||
colKey: "createTime",
|
|
||||||
render(t, e) {
|
|
||||||
const {
|
|
||||||
type: l,
|
|
||||||
row: n,
|
|
||||||
col: a
|
|
||||||
} = e;
|
|
||||||
return {
|
|
||||||
title: "申请时间",
|
|
||||||
cell: n && n[a.colKey]
|
|
||||||
} [l]
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
var S = {
|
|
||||||
components: {
|
|
||||||
UserCircleIcon: T.A
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
data: k,
|
|
||||||
columns: A
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
O = S,
|
|
||||||
E = (0, d.A)(O, w, g, !1, null, null, null),
|
|
||||||
F = E.exports,
|
|
||||||
M = {
|
|
||||||
name: "App",
|
|
||||||
components: {
|
|
||||||
HelloWorld: p,
|
|
||||||
TestElementUi: y,
|
|
||||||
TestTdesignUi: F
|
|
||||||
}
|
|
||||||
},
|
|
||||||
N = M,
|
|
||||||
j = (0, d.A)(N, a, o, !1, null, null, null),
|
|
||||||
H = j.exports,
|
|
||||||
I = l(6079),
|
|
||||||
D = (l(18830), l(89143)),
|
|
||||||
K = l.n(D),
|
|
||||||
L = l(60523),
|
|
||||||
B = (l(91457), l(94373));
|
|
||||||
n["default"].use(L.Ay), n["default"].use(K()), n["default"].use(I.Ay), n["default"].config.productionTip = !1, n["default"].prototype.axios = B.A, new n["default"]({
|
|
||||||
render: t => t(H)
|
|
||||||
}).$mount("#app")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
e = {};
|
|
||||||
|
|
||||||
function l(n) {
|
|
||||||
var a = e[n];
|
|
||||||
if (void 0 !== a) return a.exports;
|
|
||||||
var o = e[n] = {
|
|
||||||
id: n,
|
|
||||||
loaded: !1,
|
|
||||||
exports: {}
|
|
||||||
};
|
|
||||||
return t[n].call(o.exports, o, o.exports, l), o.loaded = !0, o.exports
|
|
||||||
}
|
|
||||||
l.m = t,
|
|
||||||
function () {
|
|
||||||
l.amdO = {}
|
|
||||||
}(),
|
|
||||||
function () {
|
|
||||||
var t = [];
|
|
||||||
l.O = function (e, n, a, o) {
|
|
||||||
if (!n) {
|
|
||||||
var s = 1 / 0;
|
|
||||||
for (d = 0; d < t.length; d++) {
|
|
||||||
n = t[d][0], a = t[d][1], o = t[d][2];
|
|
||||||
for (var r = !0, i = 0; i < n.length; i++)(!1 & o || s >= o) && Object.keys(l.O).every((function (t) {
|
|
||||||
return l.O[t](n[i])
|
|
||||||
})) ? n.splice(i--, 1) : (r = !1, o < s && (s = o));
|
|
||||||
if (r) {
|
|
||||||
t.splice(d--, 1);
|
|
||||||
var c = a();
|
|
||||||
void 0 !== c && (e = c)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return e
|
|
||||||
}
|
|
||||||
o = o || 0;
|
|
||||||
for (var d = t.length; d > 0 && t[d - 1][2] > o; d--) t[d] = t[d - 1];
|
|
||||||
t[d] = [n, a, o]
|
|
||||||
}
|
|
||||||
}(),
|
|
||||||
function () {
|
|
||||||
l.n = function (t) {
|
|
||||||
var e = t && t.__esModule ? function () {
|
|
||||||
return t["default"]
|
|
||||||
} : function () {
|
|
||||||
return t
|
|
||||||
};
|
|
||||||
return l.d(e, {
|
|
||||||
a: e
|
|
||||||
}), e
|
|
||||||
}
|
|
||||||
}(),
|
|
||||||
function () {
|
|
||||||
l.d = function (t, e) {
|
|
||||||
for (var n in e) l.o(e, n) && !l.o(t, n) && Object.defineProperty(t, n, {
|
|
||||||
enumerable: !0,
|
|
||||||
get: e[n]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}(),
|
|
||||||
function () {
|
|
||||||
l.g = function () {
|
|
||||||
if ("object" === typeof globalThis) return globalThis;
|
|
||||||
try {
|
|
||||||
return this || new Function("return this")()
|
|
||||||
} catch (t) {
|
|
||||||
if ("object" === typeof window) return window
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
}(),
|
|
||||||
function () {
|
|
||||||
l.o = function (t, e) {
|
|
||||||
return Object.prototype.hasOwnProperty.call(t, e)
|
|
||||||
}
|
|
||||||
}(),
|
|
||||||
function () {
|
|
||||||
l.r = function (t) {
|
|
||||||
"undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
|
|
||||||
value: "Module"
|
|
||||||
}), Object.defineProperty(t, "__esModule", {
|
|
||||||
value: !0
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}(),
|
|
||||||
function () {
|
|
||||||
l.nmd = function (t) {
|
|
||||||
return t.paths = [], t.children || (t.children = []), t
|
|
||||||
}
|
|
||||||
}(),
|
|
||||||
function () {
|
|
||||||
var t = {
|
|
||||||
524: 0
|
|
||||||
};
|
|
||||||
l.O.j = function (e) {
|
|
||||||
return 0 === t[e]
|
|
||||||
};
|
|
||||||
var e = function (e, n) {
|
|
||||||
var a, o, s = n[0],
|
|
||||||
r = n[1],
|
|
||||||
i = n[2],
|
|
||||||
c = 0;
|
|
||||||
if (s.some((function (e) {
|
|
||||||
return 0 !== t[e]
|
|
||||||
}))) {
|
|
||||||
for (a in r) l.o(r, a) && (l.m[a] = r[a]);
|
|
||||||
if (i) var d = i(l)
|
|
||||||
}
|
|
||||||
for (e && e(n); c < s.length; c++) o = s[c], l.o(t, o) && t[o] && t[o][0](), t[o] = 0;
|
|
||||||
return l.O(d)
|
|
||||||
},
|
|
||||||
n = self["webpackChunkwidget_vue"] = self["webpackChunkwidget_vue"] || [];
|
|
||||||
n.forEach(e.bind(null, 0)), n.push = e.bind(null, n.push.bind(n))
|
|
||||||
}();
|
|
||||||
var n = l.O(void 0, [504], (function () {
|
|
||||||
return l(68332)
|
|
||||||
}));
|
|
||||||
n = l.O(n)
|
|
||||||
})();
|
|
||||||
//# sourceMappingURL=app.f3689074.js.map
|
|
@ -1,144 +0,0 @@
|
|||||||
/* enoECMChangeReportUX
|
|
||||||
*
|
|
||||||
** Copyright (c) 1993-2020 Dassault Systemes. All Rights Reserved.
|
|
||||||
** This program contains proprietary and trade secret information of
|
|
||||||
** Dassault Systemes.
|
|
||||||
** Copyright notice is precautionary only and does not evidence any actual
|
|
||||||
** or intended publication of such program
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import com.dassault_systemes.enovia.changeorder.factory.ChangeOrderFactory;
|
|
||||||
import com.dassault_systemes.enovia.changeorder.interfaces.IChangeOrderServices;
|
|
||||||
import com.dassault_systemes.enovia.changerequest.factory.ChangeRequestFactory;
|
|
||||||
import com.dassault_systemes.enovia.changerequest.interfaces.IChangeRequest;
|
|
||||||
import com.dassault_systemes.enovia.changerequest.interfaces.IChangeRequestServices;
|
|
||||||
import com.matrixone.apps.domain.DomainObject;
|
|
||||||
import com.matrixone.apps.domain.util.*;
|
|
||||||
import com.matrixone.apps.framework.ui.UINavigatorUtil;
|
|
||||||
import com.matrixone.apps.framework.ui.UIUtil;
|
|
||||||
import matrix.db.BusinessObjectWithSelect;
|
|
||||||
import matrix.db.Context;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
public class enoECMChangeReportUX_mxJPO extends enoECMChangeReportUXBase_mxJPO {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
* @param context the eMatrix <code>Context</code> object.
|
|
||||||
* @param args holds no arguments.
|
|
||||||
* @throws Exception if the operation fails.
|
|
||||||
* @since ECM R421.HF4
|
|
||||||
*/
|
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(enoECMChangeReportUXBase_mxJPO.class.getName());
|
|
||||||
|
|
||||||
public enoECMChangeReportUX_mxJPO (Context context, String[] args) throws Exception {
|
|
||||||
super(context, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get change actions of Change Request for Summary Report
|
|
||||||
*
|
|
||||||
* @param context the eMatrix <code>Context</code> object.
|
|
||||||
* @param args holds objectId.
|
|
||||||
* @return String.
|
|
||||||
* @throws Exception If the operation fails.
|
|
||||||
*/
|
|
||||||
public String getChangeActionsOfChangeRequest(Context context, String[] args) throws Exception {
|
|
||||||
StringBuffer sbChangeActions = new StringBuffer();
|
|
||||||
try {
|
|
||||||
String strLanguage = context.getSession().getLanguage();
|
|
||||||
String strChangeRequestId = args[0];
|
|
||||||
|
|
||||||
DomainObject domChange = DomainObject.newInstance(context, strChangeRequestId);
|
|
||||||
|
|
||||||
IChangeOrderServices changeOrderFactory = ChangeOrderFactory.createChangeOrderFactory();
|
|
||||||
|
|
||||||
IChangeRequestServices changeRequestFactory = ChangeRequestFactory.createChangeRequestFactory();
|
|
||||||
IChangeRequest iChangeRequest = changeRequestFactory.retrieveChangeRequestFromDatabase(context, domChange);
|
|
||||||
|
|
||||||
Set<String> caPhysicalIdSet = iChangeRequest.getIndirectImplementingChangeActionIdentifiers(context);
|
|
||||||
List<String> caIdList = iChangeRequest.getImplementingChangeActionIdentifiers(context);
|
|
||||||
|
|
||||||
LOGGER.info("caPhysicalIdSet == >" + caPhysicalIdSet);
|
|
||||||
LOGGER.info("caIdList == >" + caIdList);
|
|
||||||
|
|
||||||
List<String> lsChangeActionId = new ArrayList<>();
|
|
||||||
|
|
||||||
if(!caIdList.isEmpty()){
|
|
||||||
for (String caId : caIdList){
|
|
||||||
lsChangeActionId.add(caId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!caPhysicalIdSet.isEmpty()){
|
|
||||||
for(String caPhysicalId : caPhysicalIdSet){
|
|
||||||
String getCaId = "temp query bus * * * where 'physicalId == " + caPhysicalId + "' select id dump | ";
|
|
||||||
String caIdInfo = MqlUtil.mqlCommand(context, getCaId);
|
|
||||||
String caId = caIdInfo.split("\\|")[3];
|
|
||||||
|
|
||||||
if(lsChangeActionId.isEmpty() || !lsChangeActionId.contains(caId)){
|
|
||||||
lsChangeActionId.add(caId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LOGGER.info("lsChangeActionId == >" + lsChangeActionId);
|
|
||||||
|
|
||||||
List<IChangeOrderServices.ChangeIdCardENUM> changeIdCardSelectables = new ArrayList<IChangeOrderServices.ChangeIdCardENUM>();
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.NAMESELECTABLE);
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.TYPESELECTABLE);
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.POLICYSELECTABLE);
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.OWNERSELECTABLE);
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.CURRENTSELECTABLE);
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.CATITLESELECTABLE);
|
|
||||||
|
|
||||||
Map<String, BusinessObjectWithSelect> mpChangeInfo = changeOrderFactory.getChangeIdCard(context, lsChangeActionId, changeIdCardSelectables);
|
|
||||||
|
|
||||||
sbChangeActions.append("<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" >");
|
|
||||||
sbChangeActions.append("<tr>");
|
|
||||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.NAME") + "</th>");
|
|
||||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.Title") + "</th>");
|
|
||||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.OWNER") + "</th>");
|
|
||||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Common.State") + "</th>");
|
|
||||||
sbChangeActions.append("</tr>");
|
|
||||||
|
|
||||||
Set<String> setMpChangeKeys = mpChangeInfo.keySet();
|
|
||||||
for(String key : setMpChangeKeys) {
|
|
||||||
BusinessObjectWithSelect busSelectData = (BusinessObjectWithSelect) mpChangeInfo.get(key);
|
|
||||||
String strType = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.TYPESELECTABLE.toString());
|
|
||||||
String strName = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.NAMESELECTABLE.toString());
|
|
||||||
String strPolicy = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.POLICYSELECTABLE.toString());
|
|
||||||
String strCurrent = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.CURRENTSELECTABLE.toString());
|
|
||||||
String strTitle = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.CATITLESELECTABLE.toString());
|
|
||||||
String strOwner= busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.OWNERSELECTABLE.toString());
|
|
||||||
String strOwnerFullName = PersonUtil.getFullName(context, strOwner);
|
|
||||||
|
|
||||||
String imgChangeActionType = UINavigatorUtil.getTypeIconProperty(context, strType);
|
|
||||||
if (UIUtil.isNullOrEmpty(imgChangeActionType)) {
|
|
||||||
imgChangeActionType = "iconSmallDefault.gif";
|
|
||||||
}
|
|
||||||
|
|
||||||
sbChangeActions.append("<tr>");
|
|
||||||
sbChangeActions.append("<td><img src=\"../common/images/" + imgChangeActionType + "\" border=\"0\" alt=\"*\"> " + XSSUtil.encodeForHTML(context, strName) + " </td>");
|
|
||||||
sbChangeActions.append("<td>" + XSSUtil.encodeForHTML(context, strTitle) + " </td>");
|
|
||||||
sbChangeActions.append("<td>" + XSSUtil.encodeForHTML(context, strOwnerFullName) + " </td>");
|
|
||||||
sbChangeActions.append("<td>" + i18nNow.getStateI18NString(strPolicy, strCurrent, strLanguage) + " </td>");
|
|
||||||
sbChangeActions.append("</tr>");
|
|
||||||
}
|
|
||||||
if (lsChangeActionId.size() == 0) {
|
|
||||||
sbChangeActions.append("<tr><td colspan=\"5\">" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Change.NoChangeActionConnected") + "</td></tr>");
|
|
||||||
}
|
|
||||||
} catch (FrameworkException Ex) {
|
|
||||||
throw Ex;
|
|
||||||
}
|
|
||||||
sbChangeActions.append("</table>");
|
|
||||||
return sbChangeActions.toString();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,147 +0,0 @@
|
|||||||
/* enoECMChangeReportUX
|
|
||||||
*
|
|
||||||
** Copyright (c) 1993-2020 Dassault Systemes. All Rights Reserved.
|
|
||||||
** This program contains proprietary and trade secret information of
|
|
||||||
** Dassault Systemes.
|
|
||||||
** Copyright notice is precautionary only and does not evidence any actual
|
|
||||||
** or intended publication of such program
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import com.dassault_systemes.enovia.changeorder.factory.ChangeOrderFactory;
|
|
||||||
import com.dassault_systemes.enovia.changeorder.interfaces.IChangeOrderServices;
|
|
||||||
import com.dassault_systemes.enovia.changerequest.factory.ChangeRequestFactory;
|
|
||||||
import com.dassault_systemes.enovia.changerequest.interfaces.IChangeRequest;
|
|
||||||
import com.dassault_systemes.enovia.changerequest.interfaces.IChangeRequestServices;
|
|
||||||
import com.matrixone.apps.domain.DomainObject;
|
|
||||||
import com.matrixone.apps.domain.util.*;
|
|
||||||
import com.matrixone.apps.framework.ui.UINavigatorUtil;
|
|
||||||
import com.matrixone.apps.framework.ui.UIUtil;
|
|
||||||
import matrix.db.BusinessObjectWithSelect;
|
|
||||||
import matrix.db.Context;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
public class enoECMChangeReportUX_mxJPO extends enoECMChangeReportUXBase_mxJPO {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
* @param context the eMatrix <code>Context</code> object.
|
|
||||||
* @param args holds no arguments.
|
|
||||||
* @throws Exception if the operation fails.
|
|
||||||
* @since ECM R421.HF4
|
|
||||||
*/
|
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(enoECMChangeReportUXBase_mxJPO.class.getName());
|
|
||||||
|
|
||||||
public enoECMChangeReportUX_mxJPO (Context context, String[] args) throws Exception {
|
|
||||||
super(context, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get change actions of Change Request for Summary Report
|
|
||||||
*
|
|
||||||
* @param context the eMatrix <code>Context</code> object.
|
|
||||||
* @param args holds objectId.
|
|
||||||
* @return String.
|
|
||||||
* @throws Exception If the operation fails.
|
|
||||||
*/
|
|
||||||
public String getChangeActionsOfChangeRequest(Context context, String[] args) throws Exception {
|
|
||||||
StringBuffer sbChangeActions = new StringBuffer();
|
|
||||||
try {
|
|
||||||
String strLanguage = context.getSession().getLanguage();
|
|
||||||
String strChangeRequestId = args[0];
|
|
||||||
|
|
||||||
DomainObject domChange = DomainObject.newInstance(context, strChangeRequestId);
|
|
||||||
|
|
||||||
IChangeOrderServices changeOrderFactory = ChangeOrderFactory.createChangeOrderFactory();
|
|
||||||
|
|
||||||
IChangeRequestServices changeRequestFactory = ChangeRequestFactory.createChangeRequestFactory();
|
|
||||||
IChangeRequest iChangeRequest = changeRequestFactory.retrieveChangeRequestFromDatabase(context, domChange);
|
|
||||||
|
|
||||||
//获取已实现的更改和建议的更改的信息
|
|
||||||
Set<String> caPhysicalIdSet = iChangeRequest.getIndirectImplementingChangeActionIdentifiers(context);
|
|
||||||
List<String> caIdList = iChangeRequest.getImplementingChangeActionIdentifiers(context);
|
|
||||||
|
|
||||||
LOGGER.info("caPhysicalIdSet == >" + caPhysicalIdSet);
|
|
||||||
LOGGER.info("caIdList == >" + caIdList);
|
|
||||||
|
|
||||||
List<String> lsChangeActionId = new ArrayList<>();
|
|
||||||
|
|
||||||
//先查询建议的更改 放入到集合中
|
|
||||||
if(!caIdList.isEmpty()){
|
|
||||||
for (String caId : caIdList){
|
|
||||||
lsChangeActionId.add(caId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//再查询已实现的更改 放入到集合中
|
|
||||||
if(!caPhysicalIdSet.isEmpty()){
|
|
||||||
for(String caPhysicalId : caPhysicalIdSet){
|
|
||||||
String getCaId = "temp query bus * * * where 'physicalId == " + caPhysicalId + "' select id dump | ";
|
|
||||||
String caIdInfo = MqlUtil.mqlCommand(context, getCaId);
|
|
||||||
String caId = caIdInfo.split("\\|")[3];
|
|
||||||
|
|
||||||
if(lsChangeActionId.isEmpty() || !lsChangeActionId.contains(caId)){
|
|
||||||
lsChangeActionId.add(caId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LOGGER.info("lsChangeActionId == >" + lsChangeActionId);
|
|
||||||
|
|
||||||
List<IChangeOrderServices.ChangeIdCardENUM> changeIdCardSelectables = new ArrayList<IChangeOrderServices.ChangeIdCardENUM>();
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.NAMESELECTABLE);
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.TYPESELECTABLE);
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.POLICYSELECTABLE);
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.OWNERSELECTABLE);
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.CURRENTSELECTABLE);
|
|
||||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.CATITLESELECTABLE);
|
|
||||||
|
|
||||||
Map<String, BusinessObjectWithSelect> mpChangeInfo = changeOrderFactory.getChangeIdCard(context, lsChangeActionId, changeIdCardSelectables);
|
|
||||||
|
|
||||||
sbChangeActions.append("<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" >");
|
|
||||||
sbChangeActions.append("<tr>");
|
|
||||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.NAME") + "</th>");
|
|
||||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.Title") + "</th>");
|
|
||||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.OWNER") + "</th>");
|
|
||||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Common.State") + "</th>");
|
|
||||||
sbChangeActions.append("</tr>");
|
|
||||||
|
|
||||||
Set<String> setMpChangeKeys = mpChangeInfo.keySet();
|
|
||||||
for(String key : setMpChangeKeys) {
|
|
||||||
BusinessObjectWithSelect busSelectData = (BusinessObjectWithSelect) mpChangeInfo.get(key);
|
|
||||||
String strType = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.TYPESELECTABLE.toString());
|
|
||||||
String strName = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.NAMESELECTABLE.toString());
|
|
||||||
String strPolicy = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.POLICYSELECTABLE.toString());
|
|
||||||
String strCurrent = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.CURRENTSELECTABLE.toString());
|
|
||||||
String strTitle = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.CATITLESELECTABLE.toString());
|
|
||||||
String strOwner= busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.OWNERSELECTABLE.toString());
|
|
||||||
String strOwnerFullName = PersonUtil.getFullName(context, strOwner);
|
|
||||||
|
|
||||||
String imgChangeActionType = UINavigatorUtil.getTypeIconProperty(context, strType);
|
|
||||||
if (UIUtil.isNullOrEmpty(imgChangeActionType)) {
|
|
||||||
imgChangeActionType = "iconSmallDefault.gif";
|
|
||||||
}
|
|
||||||
|
|
||||||
sbChangeActions.append("<tr>");
|
|
||||||
sbChangeActions.append("<td><img src=\"../common/images/" + imgChangeActionType + "\" border=\"0\" alt=\"*\"> " + XSSUtil.encodeForHTML(context, strName) + " </td>");
|
|
||||||
sbChangeActions.append("<td>" + XSSUtil.encodeForHTML(context, strTitle) + " </td>");
|
|
||||||
sbChangeActions.append("<td>" + XSSUtil.encodeForHTML(context, strOwnerFullName) + " </td>");
|
|
||||||
sbChangeActions.append("<td>" + i18nNow.getStateI18NString(strPolicy, strCurrent, strLanguage) + " </td>");
|
|
||||||
sbChangeActions.append("</tr>");
|
|
||||||
}
|
|
||||||
if (lsChangeActionId.size() == 0) {
|
|
||||||
sbChangeActions.append("<tr><td colspan=\"5\">" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Change.NoChangeActionConnected") + "</td></tr>");
|
|
||||||
}
|
|
||||||
} catch (FrameworkException Ex) {
|
|
||||||
throw Ex;
|
|
||||||
}
|
|
||||||
sbChangeActions.append("</table>");
|
|
||||||
return sbChangeActions.toString();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
/* enoECMChangeReportUX
|
|
||||||
*
|
|
||||||
** Copyright (c) 1993-2020 Dassault Systemes. All Rights Reserved.
|
|
||||||
** This program contains proprietary and trade secret information of
|
|
||||||
** Dassault Systemes.
|
|
||||||
** Copyright notice is precautionary only and does not evidence any actual
|
|
||||||
** or intended publication of such program
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import matrix.db.Context;
|
|
||||||
|
|
||||||
public class enoECMChangeReportUX_mxJPO extends enoECMChangeReportUXBase_mxJPO {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
* @param context the eMatrix <code>Context</code> object.
|
|
||||||
* @param args holds no arguments.
|
|
||||||
* @throws Exception if the operation fails.
|
|
||||||
* @since ECM R421.HF4
|
|
||||||
*/
|
|
||||||
|
|
||||||
public enoECMChangeReportUX_mxJPO (Context context, String[] args) throws Exception {
|
|
||||||
super(context, args);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
add bus "eService Trigger Program Parameters" "ModifyApprovalPersonTrigger" "-"
|
|
||||||
description "ModifyApprovalPersonTrigger"
|
|
||||||
policy "Business Rule"
|
|
||||||
"eService Program Argument 1" "${TOOBJECTID}"
|
|
||||||
"eService Program Argument 2" "${FROMOBJECTID}"
|
|
||||||
vault "eService Administration"
|
|
||||||
"eService Program Name" "AegPublicAccountMailIntegrate"
|
|
||||||
"eService Sequence Number" 1
|
|
||||||
"eService Method Name" "updateApprovalInfo"
|
|
||||||
current Active;
|
|
||||||
|
|
||||||
modify relationship 'Object Route' add trigger Create Action emxTriggerManager input 'RelationshipObjectRouteCreateAction ModifyApprovalPersonTrigger';
|
|
Before Width: | Height: | Size: 473 KiB |
@ -1,349 +0,0 @@
|
|||||||
import com.dassault_systemes.enovia.enterprisechangemgt.common.ChangeAction;
|
|
||||||
import com.matrixone.apps.cpd.json.JSONObject;
|
|
||||||
import com.matrixone.apps.domain.util.*;
|
|
||||||
import matrix.db.Context;
|
|
||||||
|
|
||||||
import java.text.ParseException;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
public class AegChange_mxJPO {
|
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(AegChange_mxJPO.class.getName());
|
|
||||||
|
|
||||||
private static final SimpleDateFormat NEW_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd",Locale.getDefault());
|
|
||||||
|
|
||||||
private static final SimpleDateFormat ORIGINAL_DATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a", Locale.US);
|
|
||||||
|
|
||||||
public void getPersonInfo(Context context, String[] args) throws Exception {
|
|
||||||
String TitleValue = "";
|
|
||||||
String DateValue = "";
|
|
||||||
String ChangeActionId = "";
|
|
||||||
String PersonName = "";
|
|
||||||
String ChineseName = "";
|
|
||||||
|
|
||||||
String InboxTaskId = args[0];
|
|
||||||
|
|
||||||
String getObjectRouteType = "print bus " + InboxTaskId + " select from[Route Task].to.to[Object Route].from.type from[Route Task].to.to[Object Route].from.id dump | ";
|
|
||||||
String objectRouteType = MqlUtil.mqlCommand(context, getObjectRouteType);
|
|
||||||
LOGGER.info("isChangeAction === > " + objectRouteType);
|
|
||||||
|
|
||||||
String[] caInfo = objectRouteType.split("\\|");
|
|
||||||
|
|
||||||
if(caInfo.length == 2){
|
|
||||||
String isChangeAction = caInfo[0];
|
|
||||||
String caID = caInfo[1];
|
|
||||||
|
|
||||||
if("Change Action".equals(isChangeAction)){
|
|
||||||
|
|
||||||
LOGGER.info("isChangeAction ===> " + isChangeAction);
|
|
||||||
LOGGER.info("caID ====> " + caID);
|
|
||||||
|
|
||||||
ChangeAction changeAction = new ChangeAction(caID);
|
|
||||||
MapList mapList = changeAction.getRealizedChanges(context);
|
|
||||||
Boolean isDrawingFlag = false;
|
|
||||||
|
|
||||||
for (int i = 0; i < mapList.size(); i++) {
|
|
||||||
Map map = (Map) mapList.get(i);
|
|
||||||
if ("Drawing".equals(map.get("type"))) {
|
|
||||||
isDrawingFlag = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LOGGER.info("isDrawingFlag ===> " + isDrawingFlag);
|
|
||||||
|
|
||||||
if (isDrawingFlag) {
|
|
||||||
// 获取数据为 : CA的ID 、 审批人的中文 、 该节点所属人 、 该节点实际完成时间 、 该节点的审批人
|
|
||||||
String getInfo = "print bus " + InboxTaskId + " select from[Route Task].to.to[Object Route].from.id attribute[Title] owner from[Route Task].to.from[Route Node].attribute[Actual Completion Date] from[Route Task].to.from[Route Node].attribute[Title] dump |";
|
|
||||||
String inboxInfo = MqlUtil.mqlCommand(context, getInfo);
|
|
||||||
LOGGER.info("inboxInfo ==> " + inboxInfo);
|
|
||||||
|
|
||||||
String[] splitInfo = inboxInfo.split("\\|");
|
|
||||||
|
|
||||||
if (splitInfo.length > 3) {
|
|
||||||
ChangeActionId = splitInfo[0];
|
|
||||||
|
|
||||||
if (!splitInfo[1].isEmpty() && splitInfo[1].contains("@")){
|
|
||||||
TitleValue = splitInfo[1].split("@")[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!splitInfo[1].isEmpty() && !splitInfo[2].isEmpty()) {
|
|
||||||
String Title = splitInfo[1];
|
|
||||||
PersonName = splitInfo[2];
|
|
||||||
|
|
||||||
for (int i = 3 + (splitInfo.length - 3)/2; i < splitInfo.length; i++) {
|
|
||||||
if (Title.equals(splitInfo[i])) {
|
|
||||||
DateValue = splitInfo[i-(splitInfo.length-3)/2];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//getChineseName
|
|
||||||
String getChineseName = "temp query bus Person " + PersonName + " * select attribute[Title] dump |";
|
|
||||||
String PersonNameInfo = MqlUtil.mqlCommand(context, getChineseName);
|
|
||||||
|
|
||||||
String[] PersonNameInfoLength = PersonNameInfo.split("\\|");
|
|
||||||
if (PersonNameInfoLength.length == 4) {
|
|
||||||
ChineseName = PersonNameInfo.split("\\|")[3];
|
|
||||||
} else {
|
|
||||||
ChineseName = PersonName;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Processing date format
|
|
||||||
try {
|
|
||||||
Date date = ORIGINAL_DATE_FORMAT.parse(DateValue);
|
|
||||||
DateValue = NEW_DATE_FORMAT.format(date);
|
|
||||||
} catch (ParseException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
LOGGER.info("DateValue ==> " + DateValue);
|
|
||||||
LOGGER.info("ChineseName ==> " + ChineseName);
|
|
||||||
LOGGER.info("ChangeActionId ==> " + ChangeActionId);
|
|
||||||
LOGGER.info("TitleValue ==> " + TitleValue);
|
|
||||||
|
|
||||||
for (int i = 0; i < mapList.size(); i++) {
|
|
||||||
Map map = (Map) mapList.get(i);
|
|
||||||
String drawingId = (String) map.get("id");
|
|
||||||
|
|
||||||
if (! "Drawing".equals(map.get("type")))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
Boolean isFlag = getAttrDesignInfo(context, drawingId);
|
|
||||||
|
|
||||||
if (!isFlag) {
|
|
||||||
String chineseName = getChineseName(context, drawingId);
|
|
||||||
String cnTime = getCNTime(context,drawingId);
|
|
||||||
updateAttrDesign(context,drawingId,chineseName,cnTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("\u6279\u51c6".equals(TitleValue))
|
|
||||||
{
|
|
||||||
updateAttr(context,drawingId,"XP_Drawing_Ext.approval",ChineseName,"XP_Drawing_Ext.approval_date",DateValue);
|
|
||||||
} else if ("\u8bbe\u8ba1".equals(TitleValue))
|
|
||||||
{
|
|
||||||
updateAttr(context,drawingId,"XP_Drawing_Ext.design",ChineseName,"XP_Drawing_Ext.design_date",DateValue);
|
|
||||||
} else if ("\u6821\u5bf9".equals(TitleValue))
|
|
||||||
{
|
|
||||||
updateAttr(context, drawingId, "XP_Drawing_Ext.check", ChineseName, "XP_Drawing_Ext.check_date", DateValue);
|
|
||||||
} else if ("\u6807\u51c6\u5316".equals(TitleValue))
|
|
||||||
{
|
|
||||||
updateAttr(context, drawingId, " XP_Drawing_Ext.standard", ChineseName, "XP_Drawing_Ext.standard_date", DateValue);
|
|
||||||
} else if ("\u5de5\u827a".equals(TitleValue))
|
|
||||||
{
|
|
||||||
updateAttr(context, drawingId, "XP_Drawing_Ext.technique", ChineseName, "XP_Drawing_Ext.technique_date", DateValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateAttr(Context context,String drawingId, String personNameKey, String personNameValue, String attrDateKey, String arrDateValue) throws FrameworkException {
|
|
||||||
String updateAttrName = "modify bus " + drawingId + " " + personNameKey + " " + personNameValue + " " + attrDateKey + " " + arrDateValue ;
|
|
||||||
LOGGER.info("updateAttName === >" + updateAttrName);
|
|
||||||
|
|
||||||
ContextUtil.pushContext(context);
|
|
||||||
MqlUtil.mqlCommand(context,updateAttrName);
|
|
||||||
ContextUtil.popContext(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getAttrDesignInfo(Context context, String drawingId) throws FrameworkException {
|
|
||||||
String getDesignInfo = "print bus " +drawingId + " select Attribute[XP_Drawing_Ext.design].value dump |";
|
|
||||||
String designInfo = MqlUtil.mqlCommand(context, getDesignInfo);
|
|
||||||
if(designInfo.isEmpty())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getChineseName(Context context, String drawingId) throws FrameworkException {
|
|
||||||
String getUsName = "print bus " + drawingId + " select owner dump |";
|
|
||||||
String usName = MqlUtil.mqlCommand(context, getUsName);
|
|
||||||
|
|
||||||
String getCnName = "temp query bus Person " + usName + " * select attribute[Title] dump |";
|
|
||||||
String getNameInfo = MqlUtil.mqlCommand(context, getCnName);
|
|
||||||
String cnName = getNameInfo.split("\\|")[3];
|
|
||||||
|
|
||||||
return cnName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCNTime(Context context, String drawingId) throws Exception {
|
|
||||||
String getUsTime = "print bus " + drawingId + " select originated dump |";
|
|
||||||
String usTime = MqlUtil.mqlCommand(context,getUsTime);
|
|
||||||
|
|
||||||
Date date = ORIGINAL_DATE_FORMAT.parse(usTime);
|
|
||||||
String cnTime = NEW_DATE_FORMAT.format(date);
|
|
||||||
|
|
||||||
return cnTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateAttrDesign(Context context, String drawingId, String drawingOwner, String drawingDate) throws FrameworkException{
|
|
||||||
String updateAttrName = "modify bus " + drawingId + " XP_Drawing_Ext.design " + drawingOwner + " XP_Drawing_Ext.design_date " + drawingDate ;
|
|
||||||
|
|
||||||
ContextUtil.pushContext(context);
|
|
||||||
MqlUtil.mqlCommand(context,updateAttrName);
|
|
||||||
ContextUtil.popContext(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Obtain the current status of the BOM
|
|
||||||
* @param context
|
|
||||||
* @param args
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public String getModalStateByJPO(Context context, String[] args) throws Exception {
|
|
||||||
LOGGER.info("=====================================");
|
|
||||||
String PhysicalId = args[0];
|
|
||||||
|
|
||||||
String getModalState = "temp query bus * * * where 'physicalid == " + PhysicalId + "' select current dump |";
|
|
||||||
LOGGER.info("getModalState ======> " + getModalState);
|
|
||||||
String ModalStateInfo = MqlUtil.mqlCommand(context, getModalState);
|
|
||||||
LOGGER.info("ModalStateInfo ======> " + ModalStateInfo);
|
|
||||||
|
|
||||||
String current = ModalStateInfo.split("\\|")[3];
|
|
||||||
LOGGER.info("current =======> " + current);
|
|
||||||
|
|
||||||
return current;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Obtain the Chinese name of the company
|
|
||||||
* @param context
|
|
||||||
* @param args
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public String getCompanyCodeCN(Context context, String[] args) throws Exception {
|
|
||||||
LOGGER.info("=====================================>");
|
|
||||||
List<String> companyCodeCN = new ArrayList<>();
|
|
||||||
String var12 = "Range";
|
|
||||||
String var7 = "zh-CN";
|
|
||||||
|
|
||||||
String getAegCompanyCode = "print attribute AEGVPMReference.AEGcompany_code select range dump | ";
|
|
||||||
String AegCompanyCodeInfo = MqlUtil.mqlCommand(context, getAegCompanyCode);
|
|
||||||
LOGGER.info("AegCompanyCodeInfo ======> " + AegCompanyCodeInfo);
|
|
||||||
|
|
||||||
String[] CompanyCodeInfo = AegCompanyCodeInfo.split("\\|");
|
|
||||||
|
|
||||||
for (String part : CompanyCodeInfo) {
|
|
||||||
String CompanyCode = part.trim().substring(part.trim().indexOf(' ') + 1);
|
|
||||||
companyCodeCN.add(CompanyCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<JSONObject> list =new ArrayList<>();
|
|
||||||
|
|
||||||
for(String companyCode : companyCodeCN){
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
|
||||||
String var11 = "AEGVPMReference.AEGcompany_code." + companyCode;
|
|
||||||
String companyCode_CN = EnoviaResourceBundle.getAdminI18NString(context, var12, var11, var7);
|
|
||||||
|
|
||||||
jsonObject.put("value",companyCode);
|
|
||||||
jsonObject.put("name",companyCode_CN);
|
|
||||||
|
|
||||||
list.add(jsonObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
LOGGER.info("list == > " + list);
|
|
||||||
|
|
||||||
return list.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Obtain the Chinese name of the material group
|
|
||||||
* @param context
|
|
||||||
* @param args
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public String GetMaterialGroupCN(Context context, String[] args) throws Exception {
|
|
||||||
String var7 = "Range";
|
|
||||||
String var12 = "zh-CN";
|
|
||||||
|
|
||||||
String getAEGMaterialGroup = "print attribute AEGVPMReference.AEGmaterial_group select range dump | ";
|
|
||||||
String AegMaterialGroup = MqlUtil.mqlCommand(context, getAEGMaterialGroup);
|
|
||||||
LOGGER.info("AegCompanyCodeInfo ======> " + AegMaterialGroup);
|
|
||||||
|
|
||||||
List<String> list = new ArrayList<>();
|
|
||||||
String jsonValue = "";
|
|
||||||
|
|
||||||
if(!AegMaterialGroup.isEmpty()) {
|
|
||||||
String[] MaterialGroupInfo = AegMaterialGroup.split("\\|");
|
|
||||||
System.out.println("0000000=== > " + MaterialGroupInfo.length);
|
|
||||||
String[] newMaterialGroupInfo = new String[MaterialGroupInfo.length - 1];
|
|
||||||
System.out.println("111111 === > " + MaterialGroupInfo.length);
|
|
||||||
System.arraycopy(MaterialGroupInfo, 1, newMaterialGroupInfo, 0, newMaterialGroupInfo.length);
|
|
||||||
System.out.println("222222 === > " + MaterialGroupInfo.length);
|
|
||||||
for (String part : newMaterialGroupInfo) {
|
|
||||||
String MaterialGroup = part.trim().substring(part.trim().indexOf(' ') + 1);
|
|
||||||
list.add(MaterialGroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<JSONObject> jsonObjectList = new ArrayList<>();
|
|
||||||
System.out.println("333333 === > " + MaterialGroupInfo.length);
|
|
||||||
for (String materialGroup : list) {
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
|
||||||
String var11 = "AEGVPMReference.AEGmaterial_group." + materialGroup;
|
|
||||||
String material_group_ZH = EnoviaResourceBundle.getAdminI18NString(context, var7, var11, var12);
|
|
||||||
System.out.println(material_group_ZH);
|
|
||||||
|
|
||||||
String companyCode = "";
|
|
||||||
if(materialGroup.contains("\\.")){
|
|
||||||
System.out.println("444444444" + materialGroup);
|
|
||||||
companyCode = materialGroup.split(".")[0];
|
|
||||||
} else {
|
|
||||||
companyCode = materialGroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
jsonObject.put("value",material_group_ZH);
|
|
||||||
jsonObject.put("name",material_group_ZH);
|
|
||||||
jsonObject.put("material",materialGroup);
|
|
||||||
System.out.println("555555555");
|
|
||||||
jsonObjectList.add(jsonObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
LOGGER.info("jsonObjectList == > " + jsonObjectList);
|
|
||||||
|
|
||||||
jsonValue = jsonObjectList.toString();
|
|
||||||
}
|
|
||||||
return jsonValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Modify Bom's company code and material group
|
|
||||||
* @param context
|
|
||||||
* @param args
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public String updateModalInfoByJPO(Context context, String[] args) throws Exception {
|
|
||||||
LOGGER.info("=====================================?");
|
|
||||||
|
|
||||||
String PhysicalId = args[0];
|
|
||||||
String companyCode = args[1];
|
|
||||||
String materialGroup = args[2];
|
|
||||||
|
|
||||||
String getModalId = "temp query bus * * * where 'physicalid == " + PhysicalId + "' select id dump |";
|
|
||||||
LOGGER.info("getModalId =======> " + getModalId);
|
|
||||||
String modalInfo = MqlUtil.mqlCommand(context, getModalId);
|
|
||||||
LOGGER.info("modalInfo =====> " + modalInfo);
|
|
||||||
|
|
||||||
String modalId = modalInfo.split("\\|")[3];
|
|
||||||
|
|
||||||
String updateModalAttr = "modify bus " + modalId + " AEGVPMReference.AEGcompany_code " + companyCode + " AEGVPMReference.AEGmaterial_group " + materialGroup;
|
|
||||||
MqlUtil.mqlCommand(context,updateModalAttr);
|
|
||||||
|
|
||||||
String isUpdateSuccess = "print bus " + modalId + " select attribute[AEGVPMReference.AEGmaterial_group].value";
|
|
||||||
String info = MqlUtil.mqlCommand(context, isUpdateSuccess);
|
|
||||||
LOGGER.info("isUpdateSuccess ===> " + info);
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,333 +0,0 @@
|
|||||||
define('DS/UpdateModalValue/UpdateModalValue', [
|
|
||||||
'UWA/Core',
|
|
||||||
'DS/ApplicationFrame/Command',
|
|
||||||
'DS/ENOXEngineerCommonUtils/XENModal',
|
|
||||||
'DS/ENOXEngineerCommonUtils/xEngAlertManager',
|
|
||||||
'DS/EngineeringItemCmd/SetPartNumberCmd/setPartNumberListView',
|
|
||||||
'DS/ENOXEngineerCommonUtils/XENPlatform3DXSettings',
|
|
||||||
'DS/ENOXEngineerCommonUtils/PromiseUtils',
|
|
||||||
'DS/ENOXEngineerCommonUtils/XENCommandsAppContextProxy',
|
|
||||||
'DS/ENOXEngineerCommonUtils/XENWebInWinHelper',
|
|
||||||
'i18n!DS/EngineeringItemCmd/assets/nls/ExposedCmdsNls.json',
|
|
||||||
'css!DS/UpdateModalValue/layui/css/layui.css',
|
|
||||||
'DS/UpdateModalValue/layui/layui.all',
|
|
||||||
'text!DS/UpdateModalValue/index.html',
|
|
||||||
'DS/UpdateModalValue/layui/xmSelect'
|
|
||||||
], function (
|
|
||||||
UWA,
|
|
||||||
AFRCommand,
|
|
||||||
XEngineerModal,
|
|
||||||
xEngAlertManager,
|
|
||||||
PartNumberListView,
|
|
||||||
XENPlatform3DXSettings,
|
|
||||||
PromiseUtils,
|
|
||||||
XENCommandsAppContextProxy,
|
|
||||||
XENWebInWinHelper,
|
|
||||||
nlsKeys,
|
|
||||||
LayUI,
|
|
||||||
laycss,
|
|
||||||
testHTML,
|
|
||||||
xmSelect
|
|
||||||
) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
//todo
|
|
||||||
var SetPartNumber = AFRCommand.extend({
|
|
||||||
_setPartNumberListView: null,
|
|
||||||
items: [],
|
|
||||||
modal: null,
|
|
||||||
transactionParameters: null,
|
|
||||||
sTenentID: "OnPremise",
|
|
||||||
securityContext: null,
|
|
||||||
myBaseAppURL: null,
|
|
||||||
init: function (options) {
|
|
||||||
options = UWA.extend(options, {
|
|
||||||
isAsynchronous: false
|
|
||||||
});
|
|
||||||
this._parent(options);
|
|
||||||
|
|
||||||
// IR-749796-3DEXPERIENCER2021x
|
|
||||||
// The initialization is to early to get the app Security context to correct it
|
|
||||||
// the initialization has been deplaced in isUserGranted call and the that.enable() is now check with isUserGranted
|
|
||||||
// XENCommandsAppContextProxy.loadCommandsSetting();
|
|
||||||
this._initCommandPrereqs();
|
|
||||||
},
|
|
||||||
|
|
||||||
//人员验证
|
|
||||||
isUserGranted: function () {
|
|
||||||
var that = this;
|
|
||||||
if (this.grantingPromise)
|
|
||||||
return this.grantingPromise;
|
|
||||||
this.grantingPromise = PromiseUtils.wrappedWithCancellablePromise(function (resolve, reject) {
|
|
||||||
XENCommandsAppContextProxy.loadCommandsSetting()
|
|
||||||
.then(function (settings) {
|
|
||||||
if (settings && settings.isGrantedEnterpriseExtension) {
|
|
||||||
resolve(true);
|
|
||||||
} else {
|
|
||||||
if (XENPlatform3DXSettings.isCatiaV6Environment()) { //Setting added for IR-788376-3DEXPERIENCER2020x
|
|
||||||
resolve(true);
|
|
||||||
} else {
|
|
||||||
reject('user is not granted');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(function (reason) {
|
|
||||||
if (XENPlatform3DXSettings.isCatiaV6Environment()) { //Setting added for IR-788376-3DEXPERIENCER2020x
|
|
||||||
resolve(true);
|
|
||||||
} else {
|
|
||||||
console.error(reason);
|
|
||||||
reject('some failure');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return this.grantingPromise;
|
|
||||||
},
|
|
||||||
|
|
||||||
//todo 返回的值为 VPLMProjectLeader.Company Name.Common Space //该方法用处还需进一步验证
|
|
||||||
getProvidedSC: function () {
|
|
||||||
if (!this.options.context || !this.options.context.getSecurityContext)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
var _sc = this.options.context.getSecurityContext() || {};
|
|
||||||
var value = _sc.SecurityContext;
|
|
||||||
if (_sc.SecurityContext) {
|
|
||||||
if (value.startsWith('ctx::'))
|
|
||||||
value = value.substring(5);
|
|
||||||
XENPlatform3DXSettings.setDefaultSecurityContext(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_sc.tenant) {
|
|
||||||
XENPlatform3DXSettings.setPlatformId(_sc.tenant);
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 页面加载时触发
|
|
||||||
execute: function () {
|
|
||||||
var that = this;
|
|
||||||
XENCommandsAppContextProxy.getAppContextPromise(this).then(function (context) {
|
|
||||||
var ModalPhysicalId = "";
|
|
||||||
//获取数据值
|
|
||||||
that.items = that.options.context.getSelectedNodes().map(function (item) {
|
|
||||||
console.log(item);
|
|
||||||
//modalValue = item.options.grid['ds6w:identifier'];
|
|
||||||
ModalPhysicalId = item.getID();
|
|
||||||
console.log("==========>");
|
|
||||||
console.log(ModalPhysicalId);
|
|
||||||
return {
|
|
||||||
physicalId: item.getID(),
|
|
||||||
name: item.getLabel(),
|
|
||||||
sessionStoredEIN: (item.getSessionStoredEIN && item.getSessionStoredEIN()) ? item.getSessionStoredEIN() : undefined,
|
|
||||||
partNumber: item.options.grid['ds6wg:EnterpriseExtension.V_PartNumber']
|
|
||||||
};
|
|
||||||
});
|
|
||||||
if (XENPlatform3DXSettings.isBuildSecurityContext() && XENPlatform3DXSettings.isCloud()) {
|
|
||||||
var _platform = {};
|
|
||||||
var strTenentId = that.sTenentID;
|
|
||||||
var sURL = that.myBaseAppURL;
|
|
||||||
_platform[strTenentId] = {
|
|
||||||
"3DSpace": sURL
|
|
||||||
}
|
|
||||||
XENPlatform3DXSettings._platforms = _platform;
|
|
||||||
XENPlatform3DXSettings.setDefaultSecurityContext(that.securityContext.replace("ctx : ", ""));
|
|
||||||
|
|
||||||
that._setPartNumberListView = new PartNumberListView();
|
|
||||||
that._setPartNumberListView.render();
|
|
||||||
that.showDialog(ModalPhysicalId);
|
|
||||||
} else {
|
|
||||||
var needSC = (!that.getProvidedSC());
|
|
||||||
XENPlatform3DXSettings.bindCommandsToABackend(needSC /* need to retrieve SC */).then(function () {
|
|
||||||
that.isUserGranted().then(function () {
|
|
||||||
that._setPartNumberListView = new PartNumberListView();
|
|
||||||
that._setPartNumberListView.render();
|
|
||||||
//todo
|
|
||||||
|
|
||||||
that.showDialog(ModalPhysicalId);
|
|
||||||
}).catch(function (reason) {
|
|
||||||
xEngAlertManager.errorNotif({
|
|
||||||
title: nlsKeys.get("error.not.granted"),
|
|
||||||
subtitle: nlsKeys.get("error.contact.admin"),
|
|
||||||
});
|
|
||||||
that.progressDialog.close();
|
|
||||||
});
|
|
||||||
}).catch(function (error) {
|
|
||||||
console.error(error);
|
|
||||||
//notify the user
|
|
||||||
xEngAlertManager.unexpectedFailure(nlsKeys.get('failure.setPartNumber.cmd.launch'));
|
|
||||||
that.progressDialog.close();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 向页面写具体body页面
|
|
||||||
showDialog: function (ModalPhysicalId) {
|
|
||||||
let httpBaseUrl = "/3dspace/ModalInfo/";
|
|
||||||
|
|
||||||
layui.use(['form', 'jquery'], function () {
|
|
||||||
var form = layui.form;
|
|
||||||
var $ = layui.jquery;
|
|
||||||
let layer = layui.layer;
|
|
||||||
|
|
||||||
//判断当前模型是否是在工作中的状态
|
|
||||||
$.get({
|
|
||||||
url: httpBaseUrl + "GetModalState?PhysicalId=" + ModalPhysicalId,
|
|
||||||
crossDomain: true,
|
|
||||||
contentType: "application/json",
|
|
||||||
dataType: "json",
|
|
||||||
success: function (res) {
|
|
||||||
let modalCurrentState = res.data;
|
|
||||||
console.log(modalCurrentState);
|
|
||||||
if ("IN_WORK" == modalCurrentState) {
|
|
||||||
//公司代码数据
|
|
||||||
var companyCodeValue = "";
|
|
||||||
|
|
||||||
//物料组数据
|
|
||||||
var AEGVPMDataValue = "";
|
|
||||||
|
|
||||||
layer.open({
|
|
||||||
type: 1,
|
|
||||||
title: ["物料组修改", "font-size : 16px; font-weight: bold; color: #fff; background-color: #005685"],
|
|
||||||
area: ["700px", "350px"],
|
|
||||||
content: testHTML,
|
|
||||||
success: function () {
|
|
||||||
var companyCodeSelect = xmSelect.render({
|
|
||||||
el: '#demo1',
|
|
||||||
filterable: true,
|
|
||||||
radio: true,
|
|
||||||
clickClose: true,
|
|
||||||
data: [],
|
|
||||||
toolbar: { show: true },
|
|
||||||
on: function (data) {
|
|
||||||
var arr = data.arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
companyCodeValue = arr[0].value;
|
|
||||||
console.log(companyCodeValue);
|
|
||||||
GetMaterialGroupData(materialGroupSelect, companyCodeValue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
GetCompanyCodeData("GetCompanyCode", companyCodeSelect);
|
|
||||||
|
|
||||||
var materialGroupSelect = xmSelect.render({
|
|
||||||
el: '#demo2',
|
|
||||||
filterable: true,
|
|
||||||
radio: true,
|
|
||||||
clickClose: true,
|
|
||||||
toolbar: { show: true },
|
|
||||||
on: function (data) {
|
|
||||||
var arr = data.arr;
|
|
||||||
console.log(arr);
|
|
||||||
if (arr.length > 0) {
|
|
||||||
AEGVPMDataValue = arr[0].material;
|
|
||||||
console.log("0000000000");
|
|
||||||
console.log(AEGVPMDataValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
function GetCompanyCodeData(url, companyCodeSelect) {
|
|
||||||
$.get({
|
|
||||||
url: httpBaseUrl + url,
|
|
||||||
crossDomain: true,
|
|
||||||
contentType: "application/json",
|
|
||||||
dataType: "json",
|
|
||||||
success: function (res) {
|
|
||||||
console.log(res.data);
|
|
||||||
let companyCode = JSON.parse(res.data);
|
|
||||||
companyCodeSelect.update({ data: companyCode });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function GetMaterialGroupData(materialGroupSelect, value) {
|
|
||||||
$.get({
|
|
||||||
url: httpBaseUrl + "GetMaterialGroup",
|
|
||||||
crossDomain: true,
|
|
||||||
contentType: "application/json",
|
|
||||||
dataType: "json",
|
|
||||||
success: function (res) {
|
|
||||||
let AEGVPMDataValue = JSON.parse(res.data);
|
|
||||||
|
|
||||||
let Array = [];
|
|
||||||
|
|
||||||
$.each(AEGVPMDataValue, function (index, item) {
|
|
||||||
let valueJson = {};
|
|
||||||
|
|
||||||
if (item.value.includes(value)) {
|
|
||||||
valueJson.name = item.name,
|
|
||||||
valueJson.value = item.value,
|
|
||||||
valueJson.material = item.material,
|
|
||||||
Array.push(valueJson);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// console.log(Array);
|
|
||||||
|
|
||||||
materialGroupSelect.update({ data: Array });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// form.on('select(companyCode)', function (data) {
|
|
||||||
// let companyCodeBySelect = data.value; //获取选中的省份索引
|
|
||||||
|
|
||||||
// console.log("00000");
|
|
||||||
// console.log(companyCodeBySelect);
|
|
||||||
|
|
||||||
// //清空城市选择器
|
|
||||||
// $('#MateriaGroup').empty();
|
|
||||||
|
|
||||||
// console.log("123123");
|
|
||||||
|
|
||||||
// console.log(AEGVPMData);
|
|
||||||
|
|
||||||
|
|
||||||
// for (let index = 0; index < AEGVPMData.length; index++) {
|
|
||||||
// console.log("234566");
|
|
||||||
// console.log(AEGVPMData[index].code);
|
|
||||||
// console.log(companyCodeBySelect);
|
|
||||||
// if(AEGVPMData[index].code == companyCodeBySelect){
|
|
||||||
// $('#MateriaGroup').append('<option value = "' + AEGVPMData[index].material + '">' + AEGVPMData[index].materialZH + '</option>')
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// form.render('select');
|
|
||||||
// });
|
|
||||||
|
|
||||||
$('#myButton').on('click', function (data) {
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
// var selectedCompanyCode = $('#demo1').val();
|
|
||||||
// var selectedMateriaGroup = $('#demo2').val();
|
|
||||||
// console.log(ModalPhysicalId);
|
|
||||||
// console.log(selectedMateriaGroup);
|
|
||||||
// console.log(selectedCompanyCode);
|
|
||||||
|
|
||||||
if (AEGVPMDataValue != "" && AEGVPMDataValue != null) {
|
|
||||||
$.post({
|
|
||||||
url: httpBaseUrl + "UpdateModalInfo/" + ModalPhysicalId + "/" + companyCodeValue + "/" + AEGVPMDataValue,
|
|
||||||
crossDomain: true,
|
|
||||||
contentType: "application/json",
|
|
||||||
dataType: "json",
|
|
||||||
success: function (res) {
|
|
||||||
layer.closeAll();
|
|
||||||
}
|
|
||||||
}).done(function () {
|
|
||||||
layer.msg('修改成功');
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
layer.msg('物料组不能为空')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
layer.msg('当前模型已发布,不可更改,请联系管理员');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return SetPartNumber;
|
|
||||||
});
|
|
@ -1,2 +0,0 @@
|
|||||||
/** layui-v2.2.5 MIT License By https://www.layui.com */
|
|
||||||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
|
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 701 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 231 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 777 B |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.4 KiB |