diff --git a/module/programplan/test/model/processplan.php b/module/programplan/test/model/processplan.php index e358e61650..5401989639 100755 --- a/module/programplan/test/model/processplan.php +++ b/module/programplan/test/model/processplan.php @@ -1,28 +1,26 @@ #!/usr/bin/env php config('project')->gen(5); +zdTable('projectproduct')->config('projectproduct')->gen(5); +zdTable('product')->config('product')->gen(2); + /** title=测试 programplanModel->processPlan(); cid=1 pid=1 -测试计算计划131 >> 131,阶段31,已关闭的正常产品21 -测试计算计划132 >> 132,阶段32,已关闭的正常产品22 -测试计算计划133 >> 133,阶段33,已关闭的正常产品23 -测试计算计划134 >> 134,阶段34,已关闭的正常产品24 -测试计算计划135 >> 135,阶段35,已关闭的正常产品25 - */ -$planIDList = array(131, 132, 133, 134, 135); +$planIDList = array(1, 2, 3); $programplan = new programplanTest(); -r($programplan->processPlanTest($planIDList[0])) && p('id,name,productName') && e('131,阶段31,已关闭的正常产品21'); // 测试计算计划131 -r($programplan->processPlanTest($planIDList[1])) && p('id,name,productName') && e('132,阶段32,已关闭的正常产品22'); // 测试计算计划132 -r($programplan->processPlanTest($planIDList[2])) && p('id,name,productName') && e('133,阶段33,已关闭的正常产品23'); // 测试计算计划133 -r($programplan->processPlanTest($planIDList[3])) && p('id,name,productName') && e('134,阶段34,已关闭的正常产品24'); // 测试计算计划134 -r($programplan->processPlanTest($planIDList[4])) && p('id,name,productName') && e('135,阶段35,已关闭的正常产品25'); // 测试计算计划135 \ No newline at end of file +r($programplan->processPlanTest($planIDList[0])) && p('id,name,productName') && e('1,瀑布项目1,瀑布产品1'); // 测试id为1的瀑布项目 +r($programplan->processPlanTest($planIDList[1])) && p('id,name,productName,attribute') && e('2,阶段a,瀑布产品2,review'); // 测试id为2的瀑布项目阶段 +r($programplan->processPlanTest($planIDList[2])) && p('id,name,productName,attribute') && e('3,阶段a子1,瀑布产品2,release'); // 测试id为3的瀑布项目阶段 diff --git a/module/programplan/test/model/yaml/processplan/product.yaml b/module/programplan/test/model/yaml/processplan/product.yaml new file mode 100644 index 0000000000..4ff1d1adc4 --- /dev/null +++ b/module/programplan/test/model/yaml/processplan/product.yaml @@ -0,0 +1,19 @@ +title: zt_product +author: jukui +version: '1.0' +fields: + - field: id + range: 1-10 + - field: name + range: 1-10 + prefix: '瀑布产品' + - field: code + range: 1-10 + prefix: 'code' + - field: desc + range: 1-10 + prefix: '描述' + - field: createdDate + range: '`2023-05-11 16:32:06`' + - field: program + range: 1-10 diff --git a/module/programplan/test/model/yaml/processplan/project.yaml b/module/programplan/test/model/yaml/processplan/project.yaml new file mode 100644 index 0000000000..4ea811038f --- /dev/null +++ b/module/programplan/test/model/yaml/processplan/project.yaml @@ -0,0 +1,30 @@ +title: zt_project +author: jukui +version: '1.0' +fields: + - field: id + range: 1-10 + - field: project + range: '0,1,2,3,1,2,2,1,5,5' + - field: name + range: '瀑布项目1,阶段a,阶段a子1,阶段a子1子1,阶段b,阶段a子2,阶段a子3,阶段a子1子2,阶段b子1,阶段b子2' + - field: parent + range: '0,1,2,1,1,1,2,3,5,10' + - field: type + range: 'project,stage{9}' + - field: percent + range: 1-10 + prefix: '2' + - field: grade + range: 1 + - field: days + range: 1 + - field: status + range: 'doing,doing,doing,closed,suspended,closed' + - field: desc + range: 1-10 + prefix: '项目描述' + - field: path + range: "`,1,`,`,1,2,`,`,1,2,3,`,`,1,2,3,4,`,`,1,5,`,`,1,2,6,`,`,1,2,7`,`1,2,3,8`,`1,5.9`,`1,5,10`" + - field: attribute + range: '``,review,release,qa,dev,design,design,design,design,design' diff --git a/module/programplan/test/model/yaml/processplan/projectproduct.yaml b/module/programplan/test/model/yaml/processplan/projectproduct.yaml new file mode 100644 index 0000000000..931881e1a4 --- /dev/null +++ b/module/programplan/test/model/yaml/processplan/projectproduct.yaml @@ -0,0 +1,12 @@ +title: zt_projectproduct +author: jukui +version: '1.0' +fields: + - field: project + range: 1-10 + - field: product + range: '1,2{9}' + - field: branch + range: 0 + - field: plan + range: 0