commit temp
This commit is contained in:
+24
-4
@@ -3,14 +3,18 @@ package com.adc.da.slrs.sarModelTree.controller;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarModelTree.entity.ResponseResult;
|
||||
import com.adc.da.slrs.sarModelTree.service.ISarModelTreeService;
|
||||
import com.adc.da.slrs.sarModelTree.service.ISarModuleTreeService;
|
||||
import com.adc.da.slrs.sarModelTree.service.impl.SarModuleTreeServiceImpl;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.Company;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.Head;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.ResponseDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarModelTree.entity.SarModelTree;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
@@ -31,10 +35,14 @@ public class SarModelTreeController extends BaseController<SarModelTree> {
|
||||
@Autowired
|
||||
private ISarModelTreeService iSarModelTreeService;
|
||||
|
||||
@Autowired
|
||||
private ISarModuleTreeService iSarModuleTreeService;
|
||||
|
||||
@ApiOperation("查询父所有资源")
|
||||
@GetMapping("/list")
|
||||
public ResponseMessage<List<SarModelTree>> getAll(SarModelTree sarVppsTree){
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.getAll(sarVppsTree);
|
||||
// List<SarModelTree> tsResources = iSarModelTreeService.getAll(sarVppsTree);
|
||||
List<SarModelTree> tsResources = iSarModuleTreeService.getAll(sarVppsTree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@@ -46,4 +54,16 @@ public class SarModelTreeController extends BaseController<SarModelTree> {
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.recursionGetChildren(tree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@ApiOperation("同步模块单元信息")
|
||||
@PostMapping("/save")
|
||||
public ResponseDto save(@RequestBody String json){
|
||||
//todo 实现解析并存储的到数据库
|
||||
Head head = iSarModuleTreeService.analysisJsonAndStorage(json);
|
||||
ResponseDto responseDto = new ResponseDto(head);
|
||||
return responseDto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -56,15 +56,15 @@ public class SarModuleTree {
|
||||
|
||||
@SerializedName("SERIESID")
|
||||
@TableField("SERIESID")
|
||||
private String seriesid;
|
||||
private String seriesid; //SF_ID
|
||||
|
||||
@SerializedName("RESERVED")
|
||||
@TableField("RESERVED")
|
||||
private String reserved;
|
||||
private String reserved; //SE_ID
|
||||
|
||||
@SerializedName("STARTED")
|
||||
@TableField("STARTED")
|
||||
private String started;
|
||||
private String started; //SU_ID
|
||||
|
||||
@SerializedName("CREATIONDATE")
|
||||
@TableField("CREATIONDATE")
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class SarModuleTreeServiceImpl extends ServiceImpl<SarModuleTreeDao, SarM
|
||||
SarModelTree modelTree = new SarModelTree();
|
||||
modelTree.setId(SarModuleTree.getGuid());
|
||||
modelTree.setName(SarModuleTree.getFtvstype1());
|
||||
modelTree.setModel(SarModuleTree.getFtvstype1());
|
||||
// modelTree.setModel("TS"+SarModuleTree.get);
|
||||
return modelTree;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user