Commit af094ce3 by 张蕴鹏

feat(类型):调整导入方法和逻辑

parent e3f875fa
import com.qinqinxiaobao.report.commons.ErrorLine
import com.qinqinxiaobao.report.general.controller.ActionValidationResponse
import com.qinqinxiaobao.report.uniplat.engine.DO.DataObject
import com.qinqinxiaobao.report.uniplat.engine.DO.EnvDataObject
import com.qinqinxiaobao.report.uniplat.engine.DataList
import com.qinqinxiaobao.report.uniplat.executor.*
import com.qinqinxiaobao.report.uniplat.host.Host
import com.qinqinxiaobao.report.uniplat.models.meta.DataModel
import com.qinqinxiaobao.report.uniplat.workflow.dto.WorkflowUser
import com.qinqinxiaobao.report.uniplat.workflow.dto.handle.WorkflowHandleContext
import com.qinqinxiaobao.report.uniplat.workflow.engine.WorkflowDao
import com.qinqinxiaobao.report.uniplat.workflow.params.StartPlanTaskParam
class CityChange {
def model_name = "city"
def multiCascadeInput(ActionBehaviorContext context) {
// 测试树
def treeModel = context.host.getDataModel('province')
def treeList1 = treeModel.tableTree.queryNodeAllAncestor(3, false)
def treeList = treeModel.tableTree.queryNodeAllDescendant(1, false)
def model = context.dataModel
def obj = context.dataList.fetchOne()
def typeList = context.inputs.type.value
def sql = "delete from city_type_relation where city_id = ?"
// 执行删除
model.getDataSource().execute(sql, obj.getKeyValue())
// 插入新的 sql
sql = "insert into city_type_relation(city_id, type_id) values (?,?)"
for (List type : typeList) {
def lastItem = type.get(type.size() - 1)
model.getDataSource().insert(sql, obj.getKeyValue(), lastItem)
}
return new BehaviorResult(0, "成功", 0)
}
def getMultiCascadeList(DataObject object) {
def dataModel = Host.getInstance().getDataModel("city")
def sql = "select type_id from city_type_relation where city_id = ?"
def list = dataModel.queryDataListWithParams(sql, [object.getKeyValue()])
def result = []
for (DataObject o : list.asList()) {
def parent = getParent(dataModel, o.type_id.value)
def innerList = [o.type_id.value]
if (parent != null && parent != '') {
innerList = [parent, o.type_id.value]
}
result.add(innerList)
}
return result
}
def getParent(DataModel model, Object id) {
def sql = "select parent from demo_product_type where id = ?"
def obj = model.queryDataListWithParams(sql, [id]).fetchOne()
return obj.parent.value
}
def level_updator(Host host, InputParameter parameter, DataList datalist, EnvDataObject env, Map params, String sender) {
if (sender == "name") {
return ["default_value": 10]
}
return ["default_value": ""]
}
def testValid(BatchActionValidatorContext context) {
def list = context.getList()
def value = list.get(0).getValue("test1")
def errorLines = new ArrayList()
errorLines.add(new ErrorLine(0, "找不到主订单"))
ActionValidationResponse response = new ActionValidationResponse()
// response.fromErrLines(errorLines)
return response
}
def process1(ActionBehaviorContext context) {
var obj = context.dataList.fetchOne()
context.dataModel.addRemark(obj.getKeyFieldValue(), "dataModel备注")
obj.addRemark("dataObject备注")
StartPlanTaskParam startPlanTaskParam = new StartPlanTaskParam();
startPlanTaskParam.setDealer(1L)
startPlanTaskParam.setAssociateId(1L)
startPlanTaskParam.setDays(2)
startPlanTaskParam.setRemark("测试 API 接口")
startPlanTaskParam.setPriority(1)
startPlanTaskParam.setCreator(238)
def pid = context.getDataModel().getWorkflowEngine().getProcessCore().startPlanProcessApi(startPlanTaskParam)
// def obj = context.dataList.fetchOne()
// def model = context.getDataModel()
// def id = obj.getKeyValue()
// WorkflowUser user = new WorkflowUser();
// user.setId(999)
// user.setName("测试启动11")
// def pid = model.getWorkflowEngine().getWorkFlowCore().createUninitializedProcess("信息核验", id, user)
return new BehaviorResult(0, "成功", pid)
}
def testWorkflow(ActionBehaviorContext context) {
def obj = context.dataList.fetchOne()
def process = context.getDataModel().getWorkflowEngine().getWorkflowQuery().getRunningProcess(obj.getLong("id"), "信息核验")
context.getDataModel().getWorkflowEngine().processCore.changeProcessStateOrFinishTask(process.getId().longValue(), "关机")
return new BehaviorResult(0, "成功", 2)
}
def batchInsert(ActionBehaviorContext context) {
def model = context.getDataModel()
def workflowDao = new WorkflowDao(model)
workflowDao.getProcessInstance()
def core = model.getWorkflowEngine().getWorkFlowCore()
core.changeProcessState()
// for (int i = 0; i < 10000; i++) {
// var name = String.format("批量city%s", i)
// model.insertByMap(["name": name, "province_id": 1])
// }
return new BehaviorResult(0, "成功", 2)
}
def test1(List<Map<String, String>> map) {
var a = 2
var c = 3
return [
"result": false,
"msg" : "非法的手机号"
]
}
def batchTest(BatchActionBehaviorContext context) {
def object = context.getList().get(0)
Thread.sleep(Math.random() * 1500 as long)
return new BehaviorResult(0, "成功", 2)
}
def dealerConfig(WorkflowHandleContext context) {
def workflow = context.workflowContext
return WorkflowHandleContext.success(new WorkflowUser(1000, "李冬梅"))
}
}
\ No newline at end of file
{
"modelDescription": "城市",
"table": "city",
"database": "intent_example",
"key_field": "id",
"miniEditor": {
"editorDefs": [
{
"name": "multiCascade",
"when": "1",
"label": "多选级联-字段编辑",
"inputParameter": {
"property": "type",
"type": "cascader",
"multi": true,
"mapping": "product_type_mapping",
"label": "产品类型",
"default_value": "{{host.invokeModelFunc(\"city\",\"getMultiCascadeList\",object)}}"
},
"behavior": "multiCascadeInput"
},
{
"name": "singleCascade",
"when": "1",
"field": "type_id",
"type": "cascader",
"mapping": "product_type_mapping",
"defaultValue": "object.type_id.value",
"label": "多选级联-字段编辑"
}
]
},
"action_defs": [
{
"name": "startPlanTask",
"when": "1",
"on": "object",
"label": "创建计划任务",
"prompt": "创建计划任务",
"container": "dialog",
"parameters": {
"server": [],
"inputs": [
{
"property": "dealer",
"label": "处理人",
"type": "search",
"joint": "auth_user",
"required": true
},
{
"property": "startTime",
"label": "任务开始时间",
"type": "date",
"required": true
},
{
"property": "endTime",
"label": "任务结束时间",
"type": "date",
"required": true
},
{
"property": "remark",
"label": "任务内容",
"type": "text"
},
{
"property": "priority",
"label": "紧急程度",
"type": "mapping",
"mapping": "taskPriorityMapping"
}
]
},
"behavior": "startPlanProcess",
"forward": "",
"tagGroups": [
]
},
{
"name": "updateTypeId",
"when": "1",
"on": "object",
"label": "级联单选",
"prompt": "",
"behavior": "update",
"container": "dialog",
"forward": "",
"parameters": {
"server": [],
"inputs": [
{
"property": "type_id",
"type": "cascader",
"mapping": "product_type_mapping",
"label": "产品类型",
"default_value": "object.type_id.value"
},
{
"property": "tree_id",
"type": "tree_cascader",
"treeModelName": "province",
"treePrefilters": [
{
"property": "type",
"value": "object.type_id.value"
}
],
"label": "树测试"
}
]
}
},
{
"name": "testCascader",
"when": "1",
"on": "object",
"label": "多选级联测试",
"prompt": "",
"behavior": "multiCascadeInput",
"container": "dialog",
"forward": "",
"parameters": {
"server": [],
"inputs": [
{
"property": "type",
"type": "cascader",
"multi": true,
"mapping": "product_type_mapping",
"label": "产品类型",
"default_value": "{{host.invokeModelFunc(\"city\",\"getMultiCascadeList\",object)}}"
}
]
}
},
{
"name": "testWorkflow",
"when": "1",
"on": "object",
"label": "工作流模拟",
"prompt": "",
"behavior": "testWorkflow",
"container": "dialog",
"forward": "",
"parameters": {
"server": [],
"inputs": []
}
},
{
"name": "process1",
"when": "1",
"label": "工作流池子",
"prompt": "工作流池子",
"container": "dialog",
"parameters": {
"server": [],
"inputs": [
]
},
"behavior": "process1",
"forward": ""
},
{
"name": "set_tags",
"when": "1",
"label": "标签设置",
"prompt": "",
"behavior": "update",
"container": "dialog",
"forward": "",
"parameters": {
"server": [],
"inputs": []
},
"tagGroups": [
{
"name": "任务类型"
}
]
},
{
"name": "process1",
"when": "1",
"label": "工作流池子",
"prompt": "工作流池子",
"container": "dialog",
"parameters": {
"server": [],
"inputs": [
]
},
"behavior": "process1",
"forward": ""
},
{
"name": "batch_export_items",
"label": "批量导入差额明细",
"when": "1",
"on": "none",
"behavior": "batchTest",
"validator": "",
"prompt": "导入操作完成",
"parameters": {
"server": [
{
"property": "uid",
"result": "env.user_id.value"
}
],
"inputs": [
{
"property": "uid",
"type": "hidden",
"default_value": "1235",
"label": "fdds"
}
],
"list": [
{
"label": "姓名",
"property": "PersonalName",
"type": "text",
"unique": true,
"ignore_space": true
},
{
"label": "身份证号码",
"property": "PersonalIdCardNo",
"type": "text",
"ignore_space": true
},
{
"label": "参保月份",
"property": "ExcutDate",
"type": "text",
"rules": [
{
"pattern": "^\\d{4}-\\d{2}$",
"message": "参保月份格式错误(例:2020-06)"
}
]
},
{
"label": "个人养老",
"property": "personalOldAge",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业养老",
"property": "enterpriseOldAge",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "养老事由",
"property": "oldAgeReason",
"type": "text",
"ignore_space": true
},
{
"label": "个人医疗",
"property": "personalMedical",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业医疗",
"property": "enterpriseMedical",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "医疗事由",
"property": "medicalReason",
"type": "text",
"ignore_space": true
},
{
"label": "个人失业",
"property": "perUnemployment",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业失业",
"property": "entUnemployment",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "失业事由",
"property": "unemploymentReason",
"type": "text",
"ignore_space": true
},
{
"label": "个人工伤",
"property": "perWorkInjury",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业工伤",
"property": "entWorkInjury",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "工伤事由",
"property": "workInjuryReason",
"type": "text",
"ignore_space": true
},
{
"label": "个人生育",
"property": "perFertility",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业生育",
"property": "entFertility",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "生育事由",
"property": "fertilityReason",
"type": "text",
"ignore_space": true
},
{
"label": "个人大病",
"property": "perSeriousIllness",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业大病",
"property": "entSeriousIllness",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "大病事由",
"property": "seriousIllnessReason",
"type": "text",
"ignore_space": true
},
{
"label": "个人其他",
"property": "perOther",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业其他",
"property": "entOther",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "其他事由",
"property": "otherReason",
"type": "text",
"ignore_space": true
},
{
"label": "个人调整项",
"property": "perAdjust",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业调整项",
"property": "entAdjust",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "调整项事由",
"property": "adjustReason",
"type": "text",
"ignore_space": true
},
{
"label": "个人残保金",
"property": "perResidual",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业参保金",
"property": "entResidual",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "参保金事由",
"property": "residualReason",
"type": "text",
"ignore_space": true
},
{
"label": "个人滞纳金",
"property": "perLateFee",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业滞纳金",
"property": "entLateFee",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "滞纳金事由",
"property": "lateFeeReason",
"type": "text",
"ignore_space": true
},
{
"label": "个人新参工本费",
"property": "perNewGinseng",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "企业新参工本费",
"property": "entNewGinseng",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "新参工本费事由",
"property": "newGinsengReason",
"type": "text",
"ignore_space": true
}
]
},
"container": "bigAction",
"bigAction": {
"disableSchema": true
},
"batch": {
"keys": [
"PersonalName",
"PersonalIdCardNo",
"ExcutDate",
"personalOldAge",
"enterpriseOldAge",
"oldAgeReason",
"personalMedical",
"enterpriseMedical",
"medicalReason",
"perUnemployment",
"entUnemployment",
"unemploymentReason",
"perWorkInjury",
"entWorkInjury",
"workInjuryReason",
"perFertility",
"entFertility",
"fertilityReason",
"perSeriousIllness",
"entSeriousIllness",
"seriousIllnessReason",
"perOther",
"entOther",
"otherReason",
"perAdjust",
"entAdjust",
"adjustReason",
"perResidual",
"entResidual",
"residualReason",
"perLateFee",
"entLateFee",
"lateFeeReason",
"perNewGinseng",
"entNewGinseng",
"newGinsengReason"
],
"schemas": [
{
"label": "基础方案",
"sheet": 1,
"start_row": 1,
"columns": [
"PersonalName",
"PersonalIdCardNo",
"ExcutDate",
"personalOldAge",
"enterpriseOldAge",
"oldAgeReason",
"personalMedical",
"enterpriseMedical",
"medicalReason",
"perUnemployment",
"entUnemployment",
"unemploymentReason",
"perWorkInjury",
"entWorkInjury",
"workInjuryReason",
"perFertility",
"entFertility",
"fertilityReason",
"perSeriousIllness",
"entSeriousIllness",
"seriousIllnessReason",
"perOther",
"entOther",
"otherReason",
"perAdjust",
"entAdjust",
"adjustReason",
"perResidual",
"entResidual",
"residualReason",
"perLateFee",
"entLateFee",
"lateFeeReason",
"perNewGinseng",
"entNewGinseng",
"newGinsengReason"
]
}
]
},
"forward": "",
"calls": [
]
},
{
"name": "redirect",
"when": "1",
"on": "none",
"label": "重定向",
"prompt": "重定向",
"container": "redirect",
"parameters": {
"server": [],
"inputs": [
]
},
"behavior": "",
"forward": "https://www.baidu.com?a={{object.name.value}}&b=2&c=3"
},
{
"name": "batchInsert",
"when": "1",
"label": "模拟数据",
"prompt": "模拟数据",
"container": "dialog",
"parameters": {
"server": [],
"inputs": [
]
},
"behavior": "batchInsert",
"forward": ""
},
{
"name": "batch_test",
"when": "1",
"on": "none",
"label": "批量测试",
"prompt": "批量测试",
"container": "bigAction",
"bigAction": {
"executeType": "each"
},
"parameters": {
"server": [],
"inputs": [
{
"property": "remark",
"label": "remark",
"type": "text",
"required": true
}
],
"list": [
{
"label": "测试字段1",
"property": "test1",
"type": "text",
"rules": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"message": "金额只能为空或数字",
"trigger": "change"
}
],
"ignore_space": true
},
{
"label": "测试字段2",
"property": "test2",
"type": "text",
"ignore_space": true
},
{
"label": "测试字段3",
"property": "test3",
"type": "text",
"ignore_space": true
}
]
},
"batch": {
"keys": [
"test1",
"test2",
"test3"
],
"schemas": [
{
"label": "基础方案",
"sheet": 1,
"start_row": 1,
"columns": [
"test1",
null,
"test2",
"test3"
]
},
{
"label": "测试方案2",
"sheet": 1,
"start_row": 1,
"columns": [
"test1",
"test3"
]
}
]
},
"behavior": "batchTest",
"forward": "",
"validator": "testValid"
},
{
"name": "addRemark",
"bigAction": {
"tx": true
},
"when": "1",
"label": "添加备注",
"prompt": "添加备注",
"container": "dialog",
"parameters": {
"server": [],
"inputs": [
{
"property": "remark",
"label": "remark",
"type": "text",
"required": true
},
{
"property": "type",
"label": "type",
"type": "text"
},
{
"property": "file1",
"label": "文件",
"type": "file"
}
]
},
"behavior": "uniplatAddRemark",
"forward": ""
},
{
"name": "workflowPanel",
"when": "1",
"label": "工作流看板",
"prompt": "批量启动工作流",
"container": "workflowPanel",
"parameters": {
"server": [],
"inputs": []
},
"behavior": "none",
"forward": ""
},
{
"name": "insert",
"when": "1",
"label": "新增",
"prompt": "执行新增之提示",
"on": "none",
"container": "dialog",
"parameters": {
"server": [
{
"property": "uid",
"result": "env.user_id.value"
}
],
"inputs": [
{
"property": "name",
"label": "name",
"type": "text",
"required": true
},
{
"property": "remark",
"label": "remark",
"type": "text"
},
{
"type": "tree",
"property": "province_id",
"label": "省份ID",
"treeModelName": "province",
"_treeRootNode": "1",
"required": true
}
],
"detailsss": [
{
"name": "province",
"label": "付款项目(必填)",
"relatedId": "id",
"controls": [
{
"property": "id",
"label": "类型",
"type": "tree",
"treeModelName": "province",
"required": true
}
]
}
]
},
"behavior": "insert",
"forward": ""
},
{
"name": "insert1",
"when": "1",
"label": "新增1",
"prompt": "执行新增之提示",
"container": "dialog",
"parameters": {
"server": [
{
"property": "uid",
"result": "env.user_id.value"
}
],
"inputs": [
{
"property": "name",
"label": "name",
"type": "text",
"default_value": "localStorage.text1"
},
{
"type": "tree_cascader",
"property": "province_id",
"label": "省份ID",
"treeModelName": "province"
}
]
},
"behavior": "insert",
"forward": ""
},
{
"name": "update",
"when": "1",
"label": "修改",
"prompt": "执行修改之提示",
"container": "dialog",
"parameters": {
"server": [
{
"property": "uid",
"result": "env.user_id.value"
}
],
"inputs": [
{
"property": "name",
"label": "name",
"default_value": "object.name.value",
"type": "text"
},
{
"property": "province_id",
"label": "省份ID",
"default_value": "object.province_id.value",
"type": "tree_cascader",
"treeModelName": "province",
"readonly": true,
"treeShowAllPath": false
}
]
},
"behavior": "update",
"forward": ""
},
{
"name": "delete",
"when": "1",
"label": "删除",
"prompt": "执行删除之提示",
"container": "dialog",
"parameters": {
"server": [
{
"property": "uid",
"result": "env.user_id.value"
}
],
"inputs": []
},
"behavior": "delete",
"forward": "close"
},
{
"name": "startProcess",
"when": "1",
"on": "each",
"label": "启动工作流22",
"prompt": "批量启动工作流",
"container": "startProcess",
"parameters": {
"server": [],
"inputs": [],
"inputss": [
{
"property": "state",
"label": "state",
"default_value": "'启动状态'",
"type": "text"
},
{
"property": "task",
"label": "task",
"default_value": "'打游戏'",
"type": "text"
},
{
"property": "dealer",
"label": "dealer",
"default_value": "'1|张云鹏567'",
"type": "number",
"valueBehavior1": "dealerConfig"
}
]
},
"behavior": "startProcess",
"forward": ""
},
{
"name": "eachTest",
"when": "1",
"on": "each",
"label": "eachTest",
"prompt": "",
"container": "dialog",
"parameters": {
"server": [],
"inputs": []
},
"behavior": "update",
"forward": ""
}
],
"mapping_defs": [
{
"name": "product_type_mapping",
"sql": "select id,name,parent pid from demo_product_type",
"database": "demo_school"
},
{
"name": "taskPriorityMapping",
"mapping_values": [
{
"key": "0",
"value": "未设置"
},
{
"key": "1",
"value": "A:既紧急也重要"
},
{
"key": "2",
"value": "B:重要但不紧急"
},
{
"key": "3",
"value": "C:紧急但不重要"
},
{
"key": "4",
"value": "D:既不紧急也不重要"
}
]
}
],
"joint_defs": [
{
"name": "auth_user",
"database": "(host)",
"sql": "select id,username,first_name from auth_user",
"key_field": "id",
"joint_field": "id",
"field_defs": [
{
"property": "id",
"label": "编号"
},
{
"property": "username",
"label": "登录名"
},
{
"property": "first_name",
"label": "姓名"
}
]
},
{
"name": "province_joint",
"table": "province",
"key_field": "id",
"joint_field": "id",
"field_defs": [
{
"property": "id",
"label": "id"
},
{
"property": "name",
"label": "省份"
}
]
}
],
"intentDefs": [
{
"name": "openSideWorkflowDetail",
"label": "工作流详情",
"action": "openWorkflowDetail",
"model": "city",
"when": "1",
"enabled": "1",
"parameters": {
"processId": "{{object.getRunningProcess('信息核验').id}}",
"detailName": "default"
}
},
{
"name": "addRemark",
"label": "intent-添加备注",
"action": "addMemo",
"action": "addMemo",
"when": "1",
"enabled": "1",
"parameters": {
"enableRemarkType": false,
"enableAttachments": true
}
},
{
"name": "showSidebarDetail",
"label": "intent-插入",
"action": "execute",
"model": "city",
"container": "dialog",
"when": "1",
"enabled": "1",
"parameters": {
"actionName": "insert",
"parameters": {
"inputs": [
{
"property": "name",
"label": "name",
"type": "text",
"default_value": "{{object.id.value}}"
},
{
"property": "remark",
"label": "remark",
"type": "text"
},
{
"type": "tree",
"property": "province_id",
"label": "省份ID",
"treeModelName": "province",
"required": false
}
]
}
}
},
{
"name": "testCascader",
"label": "intent-测试onObject",
"action": "execute",
"model": "city",
"container": "dialog",
"when": "1",
"enabled": "1",
"parameters": {
"actionName": "testCascader",
"parameters": {
"inputs": [
]
}
}
}
],
"field_defs": [
{
"property": "cas1",
"label": "计算字段",
"calculator": "case when _main.id = 0 then 1 else 0 end"
},
{
"property": "id",
"type": "number",
"label": "id",
"format": "0"
},
{
"property": "name",
"type": "text",
"label": "name",
"format": ""
},
{
"property": "province_id",
"type": "number",
"label": "省份ID",
"format": "0"
},
{
"property": "type_id",
"type": "text",
"label": "产品类型ID"
}
],
"calculator_defs": [],
"group_sums": [
"province_id"
],
"list": {
"label": "城市",
"sortDefs": [
{
"property": "id",
"type": "desc"
},
{
"property": "name"
}
],
"filters": [
{
"label": "文本搜索",
"type": "combo_text",
"hint": "name",
"fields": [
"name"
],
"width": 450
},
{
"label": "搜索",
"type": "search",
"hint": "name",
"field": "name",
"joint": "province_joint",
"width": 450
},
{
"label": "树测试",
"type": "tree",
"field": "province_id",
"treeModelName": "province",
"width": 450
},
{
"width": 450,
"label": "工作流状态",
"type": "workflow_instance_state",
"field": "user_name",
"workflowFilter": true
},
{
"field": "uniplat_process_dealer",
"type": "search",
"label": "工作流处理人",
"joint": "auth_user",
"workflowFilter": true
}
],
"actions": [
"testCascader",
"batch_export_items",
"batchInsert",
"insert",
"startProcess",
"batch_test",
"eachTest"
],
"prefilters": [
],
"field_groups": [
{
"label": "id",
"template": "{id}",
"miniEditor": "multiCascade"
},
{
"label": "name",
"template": "{name}"
},
{
"label": "省份",
"template": "{province_id#province_joint.name}"
}
],
"pages": [],
"row_actions": [
"startPlanTask",
"updateTypeId",
"testCascader",
"testWorkflow",
"workflowPanel",
"set_tags"
],
"rowIntents": [
"testCascader",
"addRemark"
],
"detail_action_visible": true,
"log_action_visible": false,
"_tree": {
"field": "province_id",
"treeModelName": "province"
},
"_tree_with_data": {
"treeModelName": "province",
"template": "{name}",
"dataModelName": "city",
"foreignKey": "id",
"treeForeignKey": "province_id",
"treeForeignField": "province#joint.id",
"cancelButtonLabel": "测试1",
"fields": [
"id",
"name",
"province_id"
]
}
},
"detail": {
"label": "城市",
"title_template": "",
"sections": [
{
"label": "块头标题",
"field_groups": [
{
"label": "id",
"template": "{id}"
},
{
"label": "城市",
"template": "{name}"
},
{
"label": "城市",
"template": "{name}"
},
{
"label": "城市",
"template": "{name}"
},
{
"label": "城市",
"template": "{name}"
},
{
"label": "城市",
"template": "{name}"
},
{
"label": "省份",
"template": "{province_id#province_joint.name}"
}
],
"page_groups": [],
"actions": [
"update",
"delete"
]
}
],
"actions": [
"startProcess",
"redirect",
"delete"
],
"intents": [
"addRemark"
],
"header": {
"field_groups": [
{
"label": "描述",
"template": "{{host.getDataModel(\"city\").getModelDescription()}}"
},
{
"label": "id",
"template": "{id}",
"miniEditor": "singleCascade"
},
{
"label": "城市",
"template": "{name}-18581576505*-重复3人",
"actions": [
"update"
]
},
{
"label": "省份",
"_template": "{province_id#province_joint.name}",
"template": "{{object.getTreeDisplay(object.province_id.value, 'province')}}"
}
],
"actions": [
"update",
"batch_test"
]
},
"pages": [],
"pagess": [
{
"name": "detail_page_1",
"label": "数据明细页1",
"prefilters": [
],
"sectionss": [
{
"label": "块头标题",
"field_groups": [
{
"label": "id",
"template": "{id}"
},
{
"label": "城市",
"template": "{name}"
},
{
"label": "城市",
"template": "{name}"
},
{
"label": "城市",
"template": "{name}"
},
{
"label": "城市",
"template": "{name}"
},
{
"label": "城市",
"template": "{name}"
},
{
"label": "省份",
"template": "{province_id#province_joint.name}"
}
],
"page_groups": [],
"actions": [
"update",
"delete"
]
}
],
"sections": [],
"workflow_list": {
"name": "city",
"prefilters": []
}
},
{
"name": "detail_page_22",
"label": "数据明细页2",
"sections": [],
"list": {
"name": "school",
"list_name": "",
"prefilters": []
}
}
]
},
"pivot_tables": [
{
"name": "city_pivot",
"label": "数据透视表",
"fields": [
{
"property": "id",
"type": "number",
"label": "id"
},
{
"property": "name",
"type": "text",
"label": "城市名称"
},
{
"property": "province_id",
"type": "tree",
"label": "省份",
"treeModelName": "province",
"treeGroupLevel": [
"省",
"市",
"县"
]
}
],
"scheme": {
"groupFields": [
{
"property": "body"
},
{
"property": "title"
}
],
"filters": []
}
}
],
"workflow2": {
"handles": [
{
"label": "前置条件1",
"name": "test",
"handle": "test1",
"type": "pre"
},
{
"label": "默认负责人1",
"name": "test1",
"handle": "test2",
"type": "defaultMaster"
},
{
"label": "默认处理人1",
"name": "test3",
"handle": "test3",
"type": "defaultDealer"
},
{
"label": "分配1",
"name": "test11",
"handle": "test11",
"type": "dispatch"
},
{
"label": "分配2",
"name": "dealerConfig",
"handle": "dealerConfig",
"type": "dispatch"
}
],
"ruleOfDistribution": [
{
"label": "分配1",
"name": "test11",
"handler": "test11"
},
{
"label": "分配2",
"name": "dealerConfig",
"handler": "dealerConfig"
}
],
"orderByCreateTimeDesc": false,
"enablePlanTask": true
},
"chat": {
"enabled": true,
"detailName": "default",
"title": "系统消息",
"catalog": "大爱毕节",
"chatType": "1",
"keyword": "系统消息",
"imChatType": "notify",
"csGroupId": "0"
},
"tagGroups": [
{
"name": "任务类型"
}
]
}
...@@ -3,11 +3,16 @@ import com.qinqinxiaobao.report.uniplat.engine.DO.PureDataObject ...@@ -3,11 +3,16 @@ import com.qinqinxiaobao.report.uniplat.engine.DO.PureDataObject
import com.qinqinxiaobao.report.uniplat.engine.DataList import com.qinqinxiaobao.report.uniplat.engine.DataList
import com.qinqinxiaobao.report.uniplat.executor.InputParameter import com.qinqinxiaobao.report.uniplat.executor.InputParameter
import com.qinqinxiaobao.report.uniplat.host.Host import com.qinqinxiaobao.report.uniplat.host.Host
import com.qinqinxiaobao.report.uniplat.list.ListDef
import com.qinqinxiaobao.report.uniplat.models.meta.DataModel import com.qinqinxiaobao.report.uniplat.models.meta.DataModel
class province { class province {
def model_name = "province" def model_name = "province"
def methodTest(Host host, String a, int b, Long c, ListDef pureDataObject) {
return 0
}
def up(Host host, DataModel dataModel, DataList dataList, PureDataObject inputsObj, EnvDataObject envObj) { def up(Host host, DataModel dataModel, DataList dataList, PureDataObject inputsObj, EnvDataObject envObj) {
def object = dataList.fetchOne(); def object = dataList.fetchOne();
dataModel.getTableTree().orderUpOrDown(object.getKeyValue(), true); dataModel.getTableTree().orderUpOrDown(object.getKeyValue(), true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment