|
// 批量插入数据函数
function insertData(data_all, year, month) {
data_all.forEach(function(data_one) {
self.view.lookup({
"view": "工资管理列表-自动生成",
"application": "薪酬管理",
"filter": [
{
"logic": "and",
"path": "xm",
"comparison": "==",
"value": data_one.data_xm,
"formatType": "textValue"
},
{
"logic": "and",
"path": "ssdw",
"comparison": "==",
"value": data_one.data_ssdw,
"formatType": "textValue"
},
{
"logic": "and",
"path": "nd",
"comparison": "==",
"value": year,
"formatType": "textValue"
},
{
"logic": "and",
"path": "yf",
"comparison": "==",
"value": month,
"formatType": "textValue"
}
]
}, function(existingData) {
if (existingData && existingData.grid.length > 0) {
console.log("已有相同的记录,不执行插入操作。");
} else {
// 执行插入
var dataAll = {
"identity": "",
"wf_jobId": "",
"wf_workId": "",
"wf_formId": "",
"wf_attachmentIds": [""],
"cms_attachmentIds": [""],
"docData": data_one,
//"readerList": [{ }],
//"authorList": [{ }],
"skipPermission": "",
"summary": "",
"title": "",
"objectSecurityClearance": "",
"documentType": "数据",
"docStatus": "",
"categoryId": "d4ae8b3e-bdef-4cb6-b6d4-c8c222bf454a",
"publishTime": "",
"isTop": "",
"documentNotify": {},
"stringValue01": "",
"stringValue02": "",
"stringValue03": ""
};
var action = self.Actions.load("x_cms_assemble_control");
action.DocumentAction.persist_publishContentMockPutToPost(
dataAll,
function(json) {
console.log("成功", dataAll);
}.bind(self),
function(json) {
console.log("错误", dataAll);
}.bind(self)
);
}
});
});
}我这个为什么插入不进去数据 往内容管理的表单自动生成数据
|
|