Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
T
TrainSys
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
苏州培训方案
TrainSys
提交
7afc6a51
提交
7afc6a51
编写于
7月 18, 2022
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chitanda 发布系统代码 [TrainSys,网页端]
上级
fba5ad13
流水线
#3283
已取消 ,包含阶段
变更
9
流水线
1
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
554 行增加
和
141 行删除
+554
-141
raw-material-base.service.ts
...ice/src/service/raw-material/raw-material-base.service.ts
+115
-0
swarm.yaml
app_Web/app/swarm.yaml
+1
-1
Dockerfile
app_Web/docker/Dockerfile
+1
-1
swarm.yaml
app_Web/docker/swarm.yaml
+1
-8
raw-material.controller.ts
app_Web/src/modules/raw-material/raw-material.controller.ts
+113
-0
config.xml
config.xml
+0
-28
RawMaterial.json
...trainsys/PSMODULES/common/PSDATAENTITIES/RawMaterial.json
+1
-1
RawMaterial.json
...trainsys/PSSYSAPPS/Web/PSAPPDATAENTITIES/RawMaterial.json
+122
-102
TrainSys.json
.../model/cn/ibizlab/trainsys/PSSYSSERVICEAPIS/TrainSys.json
+200
-0
未找到文件。
app_Web/app/packages/ibiz-service/src/service/raw-material/raw-material-base.service.ts
浏览文件 @
7afc6a51
...
...
@@ -37,6 +37,121 @@ export class RawMaterialBaseService extends EntityBaseService<IRawMaterial> {
return
new
RawMaterial
(
data
);
}
/**
* Create
*
* @param {*} [_context={}]
* @param {*} [_data = {}]
* @returns {Promise<HttpResponse>}
* @memberof RawMaterialService
*/
async
Create
(
_context
:
any
=
{},
_data
:
any
=
{}):
Promise
<
HttpResponse
>
{
try
{
_data
=
await
this
.
beforeExecuteAction
(
_context
,
_data
,
'Create'
);
if
(
!
_data
.
srffrontuf
||
_data
.
srffrontuf
!=
1
)
{
_data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
_data
.
srffrontuf
!=
null
)
{
delete
_data
.
srffrontuf
;
}
_data
=
await
RawMaterialDTOHelp
.
get
(
_context
,
_data
);
const
res
=
await
this
.
http
.
post
(
`/rawmaterials`
,
_data
);
res
.
data
=
await
RawMaterialDTOHelp
.
set
(
_context
,
res
.
data
);
return
res
;
}
catch
(
error
)
{
return
this
.
handleResponseError
(
error
);
}
}
/**
* Get
*
* @param {*} [_context={}]
* @param {*} [_data = {}]
* @returns {Promise<HttpResponse>}
* @memberof RawMaterialService
*/
async
Get
(
_context
:
any
=
{},
_data
:
any
=
{}):
Promise
<
HttpResponse
>
{
try
{
const
res
=
await
this
.
http
.
get
(
`/rawmaterials/
${
encodeURIComponent
(
_context
.
rawmaterial
)}
`
,
_data
);
res
.
data
=
await
RawMaterialDTOHelp
.
set
(
_context
,
res
.
data
);
res
.
data
=
await
this
.
afterExecuteAction
(
_context
,
res
?.
data
,
'Get'
);
return
res
;
}
catch
(
error
)
{
return
this
.
handleResponseError
(
error
);
}
}
/**
* GetDraft
*
* @param {*} [_context={}]
* @param {*} [_data = {}]
* @returns {Promise<HttpResponse>}
* @memberof RawMaterialService
*/
async
GetDraft
(
_context
:
any
=
{},
_data
:
any
=
{}):
Promise
<
HttpResponse
>
{
try
{
_data
[
this
.
APPDENAME
?.
toLowerCase
()]
=
undefined
;
_data
[
this
.
APPDEKEY
]
=
undefined
;
const
res
=
await
this
.
http
.
get
(
`/rawmaterials/getdraft`
,
_data
);
res
.
data
=
await
RawMaterialDTOHelp
.
set
(
_context
,
res
.
data
);
return
res
;
}
catch
(
error
)
{
return
this
.
handleResponseError
(
error
);
}
}
/**
* Remove
*
* @param {*} [_context={}]
* @param {*} [_data = {}]
* @returns {Promise<HttpResponse>}
* @memberof RawMaterialService
*/
async
Remove
(
_context
:
any
=
{},
_data
:
any
=
{}):
Promise
<
HttpResponse
>
{
try
{
const
res
=
await
this
.
http
.
delete
(
`/rawmaterials/
${
encodeURIComponent
(
_context
.
rawmaterial
)}
`
,
_data
);
return
res
;
}
catch
(
error
)
{
return
this
.
handleResponseError
(
error
);
}
}
/**
* Update
*
* @param {*} [_context={}]
* @param {*} [_data = {}]
* @returns {Promise<HttpResponse>}
* @memberof RawMaterialService
*/
async
Update
(
_context
:
any
=
{},
_data
:
any
=
{}):
Promise
<
HttpResponse
>
{
try
{
_data
=
await
this
.
beforeExecuteAction
(
_context
,
_data
,
'Update'
);
_data
=
await
RawMaterialDTOHelp
.
get
(
_context
,
_data
);
const
res
=
await
this
.
http
.
put
(
`/rawmaterials/
${
encodeURIComponent
(
_context
.
rawmaterial
)}
`
,
_data
);
res
.
data
=
await
RawMaterialDTOHelp
.
set
(
_context
,
res
.
data
);
return
res
;
}
catch
(
error
)
{
return
this
.
handleResponseError
(
error
);
}
}
/**
* FetchDefault
*
* @param {*} [_context={}]
* @param {*} [_data = {}]
* @returns {Promise<HttpResponse>}
* @memberof RawMaterialService
*/
async
FetchDefault
(
_context
:
any
=
{},
_data
:
any
=
{}):
Promise
<
HttpResponse
>
{
try
{
const
res
=
await
this
.
http
.
post
(
`/rawmaterials/fetchdefault`
,
_data
);
res
.
data
=
await
RawMaterialDTOHelp
.
ToDataObjArray
(
_context
,
res
.
data
);
res
.
data
=
await
this
.
afterExecuteActionBatch
(
_context
,
res
?.
data
,
'FetchDefault'
);
return
res
;
}
catch
(
error
)
{
return
this
.
handleResponseError
(
error
);
}
}
/**
* Select
*
...
...
app_Web/app/swarm.yaml
浏览文件 @
7afc6a51
...
...
@@ -3,7 +3,7 @@ services:
trainsys-app-web
:
image
:
dstimage
ports
:
-
"
5010
0:80"
-
"
8
0:80"
networks
:
-
agent_network
deploy
:
...
...
app_Web/docker/Dockerfile
浏览文件 @
7afc6a51
...
...
@@ -16,4 +16,4 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
yarn start:prod
EXPOSE
50100
\ No newline at end of file
EXPOSE
8080
\ No newline at end of file
app_Web/docker/swarm.yaml
浏览文件 @
7afc6a51
...
...
@@ -3,16 +3,9 @@ services:
trainsys-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/trainsys-app-web:latest
ports
:
-
"
50100:5010
0"
-
"
8080:808
0"
networks
:
-
agent_network
environment
:
-
NACOS_DISCOVERY_IP=172.16.240.140
-
APPLICATION_PORT=50100
-
NACOS_SERVER_ADDR=127.0.0.1:8848
-
REDIS_HOST=127.0.0.1
-
REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
deploy
:
resources
:
limits
:
...
...
app_Web/src/modules/raw-material/raw-material.controller.ts
浏览文件 @
7afc6a51
...
...
@@ -7,6 +7,119 @@ import { Environment } from '@/environment';
export
class
RawMaterialController
extends
ControllerBase
{
protected
readonly
http
:
NetService
=
new
NetService
(
'rawmaterial'
);
@
Post
(
'/rawmaterials'
)
async
create
(
@
Req
()
request
:
FastifyRequest
,
@
Res
()
response
:
FastifyReply
,
@
Body
()
body
:
any
,
):
Promise
<
any
>
{
if
(
Environment
.
EnableRuntime
)
{
const
url
=
`/rawmaterial/create`
;
this
.
callAPI
(
request
,
response
,
url
,
body
);
return
;
}
const
url
=
this
.
parseUrl
(
request
.
url
);
const
res
=
await
this
.
http
.
post
(
request
,
response
,
url
,
body
);
return
this
.
parseResponse
(
request
,
response
,
res
);
}
@
Get
(
'/rawmaterials/:rawmaterial'
)
async
get
(
@
Req
()
request
:
FastifyRequest
,
@
Res
()
response
:
FastifyReply
,
@
Param
(
'rawmaterial'
)
rawmaterial
:
string
,
):
Promise
<
any
>
{
if
(
Environment
.
EnableRuntime
)
{
const
url
=
`/rawmaterial/get/
${
encodeURIComponent
(
rawmaterial
)}
`
;
this
.
callAPI
(
request
,
response
,
url
);
return
;
}
const
url
=
this
.
parseUrl
(
request
.
url
);
const
res
=
await
this
.
http
.
get
(
request
,
response
,
url
);
return
this
.
parseResponse
(
request
,
response
,
res
);
}
@
Delete
(
'/rawmaterials/:rawmaterial'
)
async
remove
(
@
Req
()
request
:
FastifyRequest
,
@
Res
()
response
:
FastifyReply
,
@
Param
(
'rawmaterial'
)
rawmaterial
:
string
,
):
Promise
<
any
>
{
if
(
Environment
.
EnableRuntime
)
{
const
url
=
`/rawmaterial/remove/
${
encodeURIComponent
(
rawmaterial
)}
`
;
this
.
callAPI
(
request
,
response
,
url
);
return
;
}
const
url
=
this
.
parseUrl
(
request
.
url
);
const
res
=
await
this
.
http
.
delete
(
request
,
response
,
url
);
return
this
.
parseResponse
(
request
,
response
,
res
);
}
@
Put
(
'/rawmaterials/:rawmaterial'
)
async
update
(
@
Req
()
request
:
FastifyRequest
,
@
Res
()
response
:
FastifyReply
,
@
Param
(
'rawmaterial'
)
rawmaterial
:
string
,
@
Body
()
body
:
any
,
):
Promise
<
any
>
{
if
(
Environment
.
EnableRuntime
)
{
const
url
=
`/rawmaterial/update/
${
encodeURIComponent
(
rawmaterial
)}
`
;
this
.
callAPI
(
request
,
response
,
url
,
body
);
return
;
}
const
url
=
this
.
parseUrl
(
request
.
url
);
const
res
=
await
this
.
http
.
put
(
request
,
response
,
url
,
body
);
return
this
.
parseResponse
(
request
,
response
,
res
);
}
@
Post
(
'/rawmaterials/checkkey'
)
async
checkKey
(
@
Req
()
request
:
FastifyRequest
,
@
Res
()
response
:
FastifyReply
,
@
Body
()
body
:
any
,
):
Promise
<
any
>
{
if
(
Environment
.
EnableRuntime
)
{
const
url
=
`/rawmaterial/checkkey`
;
this
.
callAPI
(
request
,
response
,
url
,
body
);
return
;
}
const
url
=
this
.
parseUrl
(
request
.
url
);
const
res
=
await
this
.
http
.
post
(
request
,
response
,
url
,
body
);
return
this
.
parseResponse
(
request
,
response
,
res
);
}
@
Get
(
'/rawmaterials/getdraft'
)
async
getDraft
(
@
Req
()
request
:
FastifyRequest
,
@
Res
()
response
:
FastifyReply
,
@
Body
()
body
:
any
,
):
Promise
<
any
>
{
if
(
Environment
.
EnableRuntime
)
{
const
url
=
`/rawmaterial/getdraft`
;
this
.
callAPI
(
request
,
response
,
url
);
return
;
}
const
url
=
this
.
parseUrl
(
request
.
url
);
const
res
=
await
this
.
http
.
get
(
request
,
response
,
url
);
return
this
.
parseResponse
(
request
,
response
,
res
);
}
@
Post
(
'/rawmaterials/fetchdefault'
)
async
fetchDefault
(
@
Req
()
request
:
FastifyRequest
,
@
Res
()
response
:
FastifyReply
,
@
Body
()
body
:
any
,
):
Promise
<
any
>
{
if
(
Environment
.
EnableRuntime
)
{
const
url
=
`/rawmaterial/fetchdefault`
;
this
.
callFetchAPI
(
request
,
response
,
url
,
body
);
return
;
}
const
url
=
this
.
parseUrl
(
request
.
url
);
const
res
=
await
this
.
http
.
post
(
request
,
response
,
url
,
body
);
return
this
.
parseResponse
(
request
,
response
,
res
);
}
@
Delete
(
'/rawmaterials/batch'
)
async
removeBatch
(
@
Req
()
request
:
FastifyRequest
,
...
...
config.xml
浏览文件 @
7afc6a51
...
...
@@ -55,34 +55,6 @@
git clone -b master $para2 trainsys/
export NODE_OPTIONS=--max-old-space-size=4096
cd trainsys/
mkdir -p /var/lib/jenkins/appcache/A3064A91-F42D-4D7F-BC1C-4173A4F5772C
if [ -e app_Web/.dynamic ]
then
cd app_Web
else
cd app_Web/app
fi
sed -i "s#dstimage#$para5#g" swarm.yaml
if [[ $para3 = all ]];then
mv Dockerfile-ALL Dockerfile
sed -i "s#/api#/trainsys__web#g" src/environments/environment.ts
sed -i "s#outputDir#//outputDir#g" vue.config.js
yarn
ln -s /var/lib/jenkins/appcache/A3064A91-F42D-4D7F-BC1C-4173A4F5772C node_modules/.cache
yarn build
else
if [ -e .dynamic ]
then
mv ../trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSAPPS/Web model
else
mv ../../trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSAPPS/Web model
fi
sed -i "s#srcimagename#$para4#g" Dockerfile-MODEL
mv Dockerfile-MODEL Dockerfile
fi
docker build -t $para5 .
docker push $para5
docker -H $para1 stack deploy --compose-file=swarm.yaml ebsx --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSMODULES/common/PSDATAENTITIES/RawMaterial.json
浏览文件 @
7afc6a51
...
...
@@ -991,7 +991,7 @@
"path"
:
"PSMODULES/common.json"
},
"saaSMode"
:
0
,
"serviceAPIMode"
:
0
,
"serviceAPIMode"
:
1
,
"serviceCodeName"
:
"RawMaterial"
,
"storageMode"
:
1
,
"systemTag"
:
"TrainSys"
,
...
...
trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSAPPS/Web/PSAPPDATAENTITIES/RawMaterial.json
浏览文件 @
7afc6a51
此差异已折叠。
点击以展开。
trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSSERVICEAPIS/TrainSys.json
浏览文件 @
7afc6a51
...
...
@@ -13,6 +13,206 @@
"logicName"
:
"原材料"
,
"name"
:
"RAWMATERIAL"
,
"getPSDEServiceAPIMethods"
:
[
{
"dataAccessAction"
:
"CREATE"
,
"methodType"
:
"DEACTION"
,
"name"
:
"Create"
,
"getPSDEAction"
:
{
"modelref"
:
true
,
"path"
:
"PSMODULES/common/PSDATAENTITIES/RawMaterial/PSDEACTIONS/Create.json"
},
"getPSDEServiceAPIMethodInput"
:
{
"name"
:
"输入对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialDTO"
},
"type"
:
"DTO"
},
"getPSDEServiceAPIMethodReturn"
:
{
"name"
:
"返回对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialDTO"
},
"type"
:
"DTO"
},
"requestMethod"
:
"POST"
,
"noServiceCodeName"
:
true
},
{
"dataAccessAction"
:
"READ"
,
"methodType"
:
"DEACTION"
,
"name"
:
"Get"
,
"getPSDEAction"
:
{
"modelref"
:
true
,
"path"
:
"PSMODULES/common/PSDATAENTITIES/RawMaterial/PSDEACTIONS/Get.json"
},
"getPSDEServiceAPIMethodInput"
:
{
"getKeyPSDEServiceAPIField"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialId"
},
"name"
:
"输入对象"
,
"type"
:
"KEYFIELD"
},
"getPSDEServiceAPIMethodReturn"
:
{
"name"
:
"返回对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialDTO"
},
"type"
:
"DTO"
},
"requestMethod"
:
"GET"
,
"needResourceKey"
:
true
,
"noServiceCodeName"
:
true
},
{
"dataAccessAction"
:
"DELETE"
,
"methodType"
:
"DEACTION"
,
"name"
:
"Remove"
,
"getPSDEAction"
:
{
"modelref"
:
true
,
"path"
:
"PSMODULES/common/PSDATAENTITIES/RawMaterial/PSDEACTIONS/Remove.json"
},
"getPSDEServiceAPIMethodInput"
:
{
"getKeyPSDEServiceAPIField"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialId"
},
"name"
:
"输入对象"
,
"type"
:
"KEYFIELDS"
},
"getPSDEServiceAPIMethodReturn"
:
{
"name"
:
"返回对象"
,
"type"
:
"VOID"
},
"requestMethod"
:
"DELETE"
,
"needResourceKey"
:
true
,
"noServiceCodeName"
:
true
},
{
"dataAccessAction"
:
"UPDATE"
,
"methodType"
:
"DEACTION"
,
"name"
:
"Update"
,
"getPSDEAction"
:
{
"modelref"
:
true
,
"path"
:
"PSMODULES/common/PSDATAENTITIES/RawMaterial/PSDEACTIONS/Update.json"
},
"getPSDEServiceAPIMethodInput"
:
{
"name"
:
"输入对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialDTO"
},
"type"
:
"DTO"
},
"getPSDEServiceAPIMethodReturn"
:
{
"name"
:
"返回对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialDTO"
},
"type"
:
"DTO"
},
"requestMethod"
:
"PUT"
,
"needResourceKey"
:
true
,
"noServiceCodeName"
:
true
},
{
"codeName"
:
"CheckKey"
,
"dataAccessAction"
:
"CREATE"
,
"methodType"
:
"DEACTION"
,
"name"
:
"CheckKey"
,
"getPSDEAction"
:
{
"modelref"
:
true
,
"path"
:
"PSMODULES/common/PSDATAENTITIES/RawMaterial/PSDEACTIONS/CheckKey.json"
},
"getPSDEServiceAPIMethodInput"
:
{
"name"
:
"输入对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialDTO"
},
"type"
:
"DTO"
},
"getPSDEServiceAPIMethodReturn"
:
{
"name"
:
"返回对象"
,
"stdDataType"
:
9
,
"type"
:
"SIMPLE"
},
"requestMethod"
:
"POST"
},
{
"codeName"
:
"GetDraft"
,
"dataAccessAction"
:
"CREATE"
,
"methodType"
:
"DEACTION"
,
"name"
:
"GetDraft"
,
"getPSDEAction"
:
{
"modelref"
:
true
,
"path"
:
"PSMODULES/common/PSDATAENTITIES/RawMaterial/PSDEACTIONS/GetDraft.json"
},
"getPSDEServiceAPIMethodInput"
:
{
"name"
:
"输入对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialDTO"
},
"type"
:
"DTO"
},
"getPSDEServiceAPIMethodReturn"
:
{
"name"
:
"返回对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialDTO"
},
"type"
:
"DTO"
},
"requestMethod"
:
"GET"
},
{
"codeName"
:
"Save"
,
"methodType"
:
"DEACTION"
,
"name"
:
"Save"
,
"getPSDEAction"
:
{
"modelref"
:
true
,
"path"
:
"PSMODULES/common/PSDATAENTITIES/RawMaterial/PSDEACTIONS/Save.json"
},
"getPSDEServiceAPIMethodInput"
:
{
"name"
:
"输入对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialDTO"
},
"type"
:
"DTO"
},
"getPSDEServiceAPIMethodReturn"
:
{
"name"
:
"返回对象"
,
"type"
:
"VOID"
},
"requestMethod"
:
"POST"
,
"needResourceKey"
:
true
},
{
"codeName"
:
"FetchDefault"
,
"dataAccessAction"
:
"READ"
,
"methodType"
:
"FETCH"
,
"name"
:
"FetchDefault"
,
"getPSDEDataSet"
:
{
"modelref"
:
true
,
"id"
:
"Default"
},
"getPSDEServiceAPIMethodInput"
:
{
"name"
:
"输入对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialFilterDTO"
},
"type"
:
"DTO"
},
"getPSDEServiceAPIMethodReturn"
:
{
"name"
:
"返回对象"
,
"getPSDEMethodDTO"
:
{
"modelref"
:
true
,
"id"
:
"RawMaterialDTO"
},
"type"
:
"PAGE"
},
"requestMethod"
:
"POST"
},
{
"codeName"
:
"Select"
,
"dataAccessAction"
:
"READ"
,
"methodType"
:
"SELECT"
,
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录