| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | | import com.yuanchu.limslaboratory.pojo.Inspection; |
| | | import com.yuanchu.limslaboratory.pojo.InspectionMaterialList; |
| | | import com.yuanchu.limslaboratory.pojo.InspectionProductList; |
| | | import com.yuanchu.limslaboratory.pojo.Product; |
| | | import com.yuanchu.limslaboratory.service.*; |
| | |
| | | }) |
| | | @PostMapping("/addInspection") |
| | | public Result addInspection(@RequestHeader("X-Token") String token, int type) throws Exception { |
| | | System.out.println(token); |
| | | System.out.println(type); |
| | | Object object = RedisUtil.get(token); |
| | | System.out.println(object); |
| | | Map<String, Object> unmarshal = JackSonUtil.unmarshal(JackSonUtil.marshal(object), Map.class); |
| | | return Result.success(inspectionService.addInspection("" + unmarshal.get("name"), type)); |
| | | } |
| | |
| | | return Result.success(materialService.selectMaterialById(materialId)); |
| | | } |
| | | |
| | | @ApiOperation("提交申请") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "inspectionId", value = "检验单ID", dataTypeClass = String.class, required = true), |
| | | }) |
| | | @PostMapping("/submitInspection") |
| | | public Result submitInspection(String inspectionId) { |
| | | return Result.success(inspectionService.subInspectionByInsId(inspectionId)); |
| | | } |
| | | |
| | | @ApiOperation("作废申请") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "inspectionId", value = "检验单ID", dataTypeClass = String.class, required = true), |
| | | }) |
| | | @PostMapping("/delInspection") |
| | | public Result delInspection(String inspectionId) { |
| | | return Result.success(inspectionService.delInspectionByInsId(inspectionId)); |
| | | } |
| | | } |