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.ResponseMessage;
|
||||||
import com.adc.da.http.Result;
|
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.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 io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import com.adc.da.slrs.sarModelTree.entity.SarModelTree;
|
import com.adc.da.slrs.sarModelTree.entity.SarModelTree;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -31,10 +35,14 @@ public class SarModelTreeController extends BaseController<SarModelTree> {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarModelTreeService iSarModelTreeService;
|
private ISarModelTreeService iSarModelTreeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarModuleTreeService iSarModuleTreeService;
|
||||||
|
|
||||||
@ApiOperation("查询父所有资源")
|
@ApiOperation("查询父所有资源")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public ResponseMessage<List<SarModelTree>> getAll(SarModelTree sarVppsTree){
|
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);
|
return Result.success(tsResources);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,4 +54,16 @@ public class SarModelTreeController extends BaseController<SarModelTree> {
|
|||||||
List<SarModelTree> tsResources = iSarModelTreeService.recursionGetChildren(tree);
|
List<SarModelTree> tsResources = iSarModelTreeService.recursionGetChildren(tree);
|
||||||
return Result.success(tsResources);
|
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")
|
@SerializedName("SERIESID")
|
||||||
@TableField("SERIESID")
|
@TableField("SERIESID")
|
||||||
private String seriesid;
|
private String seriesid; //SF_ID
|
||||||
|
|
||||||
@SerializedName("RESERVED")
|
@SerializedName("RESERVED")
|
||||||
@TableField("RESERVED")
|
@TableField("RESERVED")
|
||||||
private String reserved;
|
private String reserved; //SE_ID
|
||||||
|
|
||||||
@SerializedName("STARTED")
|
@SerializedName("STARTED")
|
||||||
@TableField("STARTED")
|
@TableField("STARTED")
|
||||||
private String started;
|
private String started; //SU_ID
|
||||||
|
|
||||||
@SerializedName("CREATIONDATE")
|
@SerializedName("CREATIONDATE")
|
||||||
@TableField("CREATIONDATE")
|
@TableField("CREATIONDATE")
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ public class SarModuleTreeServiceImpl extends ServiceImpl<SarModuleTreeDao, SarM
|
|||||||
SarModelTree modelTree = new SarModelTree();
|
SarModelTree modelTree = new SarModelTree();
|
||||||
modelTree.setId(SarModuleTree.getGuid());
|
modelTree.setId(SarModuleTree.getGuid());
|
||||||
modelTree.setName(SarModuleTree.getFtvstype1());
|
modelTree.setName(SarModuleTree.getFtvstype1());
|
||||||
modelTree.setModel(SarModuleTree.getFtvstype1());
|
// modelTree.setModel("TS"+SarModuleTree.get);
|
||||||
return modelTree;
|
return modelTree;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user