inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/PlanController.java
@@ -1,8 +1,6 @@ package com.yuanchu.limslaboratory.controller; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.yuanchu.limslaboratory.annotation.AuthHandler; import com.yuanchu.limslaboratory.pojo.Inspection; import com.yuanchu.limslaboratory.service.PlanService; import com.yuanchu.limslaboratory.vo.Result; import io.swagger.annotations.Api; @@ -13,6 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; /** @@ -42,7 +41,6 @@ @GetMapping("/selectAllPlan") @AuthHandler public Result selectAllPlan(String code, String beginTime, String endTime, Integer status) { System.out.println(planService.selectAllPlan(code, beginTime, endTime, status).toString()); return Result.success(planService.selectAllPlan(code, beginTime, endTime, status)); } inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/vo/InsProductVo.java
@@ -58,6 +58,12 @@ private String instrumentName; /** * 设备id **/ @JsonSerialize private Integer instrumentId; /** * 关联 申请单id **/ @JsonSerialize @@ -68,4 +74,10 @@ **/ @JsonSerialize private String userName; /** * 责任人id **/ @JsonSerialize private Integer userId; } inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
@@ -254,13 +254,11 @@ BeanUtils.copyProperties(insProduct, insProductVo); //获取设备名(前提是如果存在) if (insProduct.getInstrumentId() != null) { String equipmentName = instrumentService.getById(insProduct.getInstrumentId()).getEquipmentName(); insProductVo.setInstrumentName(equipmentName); insProductVo.setInstrumentId(insProduct.getInstrumentId()); } //获取用户名(前提是如果存在) if (insProduct.getUserProId() != null) { String userName = userMapper.selectById(insProduct.getUserProId()).getName(); insProductVo.setUserName(userName); insProductVo.setUserId(insProduct.getUserProId()); } //项目关联物料id insProductVo.setInspectionMaterialId(inspectionMaterial.getId()); inspection-server/src/main/resources/mapper/PlanMapper.xml
@@ -5,7 +5,7 @@ <id property="code" column="code"/> <result property="id" column="id"/> <result property="samplename" column="samplename"/> <result property="inspectionStatus" column="inspectionStatus"/> <result property="testState" column="inspectionStatus"/> <result property="startTime" column="startTime"/> <result property="endTime" column="endTime"/> <collection property="children" resultMap="selectAllPlanMapTowsMap" javaType="List"/>