Merge branch 'develop_3' into 'develop_master'

Develop 3

See merge request LiuChao/foton-slrs-system-rest!199
This commit is contained in:
super_liu
2021-10-13 15:55:22 +08:00
3 changed files with 28 additions and 8 deletions
@@ -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")
@@ -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());