|
@@ -90,40 +90,44 @@ class TestController {
|
|
|
@GetMapping(value = ["/test/analog/data"])
|
|
|
fun analogData(@RequestParam groupCode: String, @RequestBody types: Types): SBaseResponse{
|
|
|
logger.debug("数据= ${types.toJson()}")
|
|
|
- for (type in types.types!!) {
|
|
|
- val defFuncIdList = defFuncIdService.select(SFilter.eq("classCode", type), SFilter.eq("projectId", "Pj4403070003")).exec()
|
|
|
- for (defFuncId in defFuncIdList){
|
|
|
- if (!defFuncId.firstName.isNullOrEmpty()){
|
|
|
- if (defFuncId.firstName == "台账参数"){
|
|
|
- val dictInfosWanDa = DictInfosWanDa()
|
|
|
- dictInfosWanDa.classCode = type
|
|
|
- dictInfosWanDa.code = defFuncId.code
|
|
|
- dictInfosWanDa.groupCode = groupCode
|
|
|
- dictInfosWanDa.projectId = "0"
|
|
|
- dictInfosWanDa.name = defFuncId.name
|
|
|
- dictInfosWanDa.stage = "mdc"
|
|
|
- dictInfosWanDaService.replace(dictInfosWanDa)
|
|
|
- }else if (defFuncId.firstName == "技术参数") {
|
|
|
- val dictInfosWanDa = DictInfosWanDa()
|
|
|
- dictInfosWanDa.classCode = type
|
|
|
- dictInfosWanDa.code = defFuncId.code
|
|
|
- dictInfosWanDa.groupCode = groupCode
|
|
|
- dictInfosWanDa.projectId = "0"
|
|
|
- dictInfosWanDa.name = defFuncId.name
|
|
|
- dictInfosWanDa.stage = "dpm"
|
|
|
- dictInfosWanDaService.replace(dictInfosWanDa)
|
|
|
- } else if (defFuncId.firstName == "运行参数"||defFuncId.firstName == "设定参数") {
|
|
|
- val dictInfosWanDa = DictInfosWanDa()
|
|
|
- dictInfosWanDa.classCode = type
|
|
|
- dictInfosWanDa.code = defFuncId.code
|
|
|
- dictInfosWanDa.groupCode = groupCode
|
|
|
- dictInfosWanDa.projectId = "0"
|
|
|
- dictInfosWanDa.name = defFuncId.name
|
|
|
- dictInfosWanDa.stage = "moms"
|
|
|
- dictInfosWanDaService.replace(dictInfosWanDa)
|
|
|
+ try {
|
|
|
+ for (type in types.types!!) {
|
|
|
+ val defFuncIdList = defFuncIdService.select(SFilter.eq("classCode", type), SFilter.eq("projectId", "Pj4403070003")).exec()
|
|
|
+ for (defFuncId in defFuncIdList){
|
|
|
+ if (!defFuncId.firstName.isNullOrEmpty()){
|
|
|
+ if (defFuncId.firstName == "台账参数"){
|
|
|
+ val dictInfosWanDa = DictInfosWanDa()
|
|
|
+ dictInfosWanDa.classCode = type
|
|
|
+ dictInfosWanDa.code = defFuncId.code
|
|
|
+ dictInfosWanDa.groupCode = groupCode
|
|
|
+ dictInfosWanDa.projectId = "0"
|
|
|
+ dictInfosWanDa.name = defFuncId.name
|
|
|
+ dictInfosWanDa.stage = "mdc"
|
|
|
+ dictInfosWanDaService.replace(dictInfosWanDa)
|
|
|
+ }else if (defFuncId.firstName == "技术参数") {
|
|
|
+ val dictInfosWanDa = DictInfosWanDa()
|
|
|
+ dictInfosWanDa.classCode = type
|
|
|
+ dictInfosWanDa.code = defFuncId.code
|
|
|
+ dictInfosWanDa.groupCode = groupCode
|
|
|
+ dictInfosWanDa.projectId = "0"
|
|
|
+ dictInfosWanDa.name = defFuncId.name
|
|
|
+ dictInfosWanDa.stage = "dpm"
|
|
|
+ dictInfosWanDaService.replace(dictInfosWanDa)
|
|
|
+ } else if (defFuncId.firstName == "运行参数"||defFuncId.firstName == "设定参数") {
|
|
|
+ val dictInfosWanDa = DictInfosWanDa()
|
|
|
+ dictInfosWanDa.classCode = type
|
|
|
+ dictInfosWanDa.code = defFuncId.code
|
|
|
+ dictInfosWanDa.groupCode = groupCode
|
|
|
+ dictInfosWanDa.projectId = "0"
|
|
|
+ dictInfosWanDa.name = defFuncId.name
|
|
|
+ dictInfosWanDa.stage = "moms"
|
|
|
+ dictInfosWanDaService.replace(dictInfosWanDa)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ } catch (e: Exception) {
|
|
|
+ e.printStackTrace()
|
|
|
}
|
|
|
return SBaseResponse(SResponseType.success)
|
|
|
}
|