查看: 856|回复: 1

数据

升级   5.11%

85

主题

62

回帖

511

积分

注册会员

Rank: 2

积分
511
发表于 2024-9-9 15:28:44 | 显示全部楼层 |阅读模式
// 批量插入数据函数
                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)
                        );
                      }
                    });
                  });
                }我这个为什么插入不进去数据  往内容管理的表单自动生成数据

回复

使用道具 举报

升级   100%

139

主题

1万

回帖

4万

积分

超级版主

Rank: 8Rank: 8

积分
41458
发表于 2024-9-11 10:33:28 | 显示全部楼层
前端执行还是后端执行,跟踪过吗?是报错了还是没执行?数据传入的都对不对,现象截图看看,跟踪时的图也都截一下
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系客服 关注微信 下载APP 返回顶部 返回列表
viewthread