|
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.validation.Valid;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
|
|
|
@@ -47,7 +48,7 @@ public class MuseumInfoController {
|
|
|
public CommonResult<Boolean> updateMuseumInfo(@RequestBody MuseumInfoSaveVO saveVO){
|
|
|
museumInfoService.updateMuseumInfo(saveVO);
|
|
|
return CommonResult.success(true);
|
|
|
-// saveVO.setSampleType(1);
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -56,17 +57,16 @@ public class MuseumInfoController {
|
|
|
@Operation(summary = "删除标本")
|
|
|
public CommonResult<Boolean> deleteMuseumInfo(@RequestParam("id") Integer id,@RequestParam("reason") String reason){
|
|
|
museumInfoService.deleteMuseumInfo(id,reason);
|
|
|
-
|
|
|
-// result.put("删除原因:",提取方法…);
|
|
|
+// result.put("删除原因:",);
|
|
|
return CommonResult.success(true);
|
|
|
}
|
|
|
|
|
|
|
|
|
@GetMapping("/get")
|
|
|
@Operation(summary = "id查找")
|
|
|
- public CommonResult<List<MuseumInfoRespVO>> selectMuseumInfo(@RequestParam("id") Integer id){
|
|
|
- List<MuseumInfoDO> result = museumInfoService.selectMuseumInfo(id);
|
|
|
- List<MuseumInfoRespVO> result1 = BeanUtils.toBean(result,MuseumInfoRespVO.class);
|
|
|
+ public CommonResult<MuseumInfoRespVO> selectMuseumInfo(@RequestParam("id") Integer id){
|
|
|
+ MuseumInfoDO result = museumInfoService.selectMuseumInfo(id);
|
|
|
+ MuseumInfoRespVO result1 = BeanUtils.toBean(result,MuseumInfoRespVO.class);
|
|
|
return CommonResult.success(result1);
|
|
|
}
|
|
|
|
|
@@ -90,13 +90,27 @@ public class MuseumInfoController {
|
|
|
// 返回某种标本类型的List数组
|
|
|
// Integer
|
|
|
// Map<> 键值对
|
|
|
+ @GetMapping("/sampleTypeCount")
|
|
|
+ @Operation(summary = "标本类型计数")
|
|
|
+ public CommonResult<Map<String,Integer>> getMap(@RequestParam("sampleType") Integer sampleType){
|
|
|
+ Map<String,Integer> result =museumInfoService.MuseumInfoBySampleType(sampleType);
|
|
|
+// 标本类型:矿石-1 岩石-2 矿物-3 陨石-4
|
|
|
+ Integer Type = sampleType;
|
|
|
+ result.put("标本类型:",Type);
|
|
|
+ return CommonResult.success(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/saveCount")
|
|
|
+ @Operation(summary = "标本出入库状态计数")
|
|
|
+ public CommonResult<Map<String,Integer>> getSave(@RequestParam("save") Integer save){
|
|
|
+ Map<String,Integer> result =museumInfoService.MuseumInfoBySave(save);
|
|
|
+// 状态:在库-1 出库-0
|
|
|
+ Integer Condition = save;
|
|
|
+ result.put("状态",Condition);
|
|
|
+ return CommonResult.success(result);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
-// public CommonResult<Map<String,Integer>> getMap(@RequestParam("id") Integer id){
|
|
|
-// Map<String,Integer> result =new HashMap<>();
|
|
|
-// Integer Ynmber = null;
|
|
|
-// result.put("陨石数量",Ynmber);
|
|
|
-// return CommonResult.success(result);
|
|
|
-// }
|
|
|
|
|
|
// public CommonResult<MuseumTextRespVO> getdo(@RequestParam("id") Integer id){
|
|
|
// MuseumTextRespVO DO =new MuseumTextRespVO();
|