| | |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.system.dto.TConfirmBreedingAndPreservationDTO; |
| | | import com.ruoyi.system.model.*; |
| | | |
| | | import java.util.List; |
| | |
| | | return R.fail(401,"登陆失效"); |
| | | } |
| | | TBreedingAndPreservationDTO dto = JSON.parseObject(param,TBreedingAndPreservationDTO.class); |
| | | if (dto.getStatus()==3){ |
| | | dto.setIsDraft(1); |
| | | } |
| | | breedingAndPreservationService.save(dto); |
| | | List<TSeparationOfCultureDishes> separationOfCultureDishesList = dto.getSeparationOfCultureDishesList(); |
| | | for (TSeparationOfCultureDishes tSeparationOfCultureDishes : separationOfCultureDishesList) { |
| | |
| | | tSeparationOfCultureDishes.setBreedingPreserveId(dto.getId()); |
| | | } |
| | | culturePreservationService.saveBatch(culturePreservations); |
| | | if (dto.getStatus()==2){ |
| | | if (dto.getStatus()!=null&&dto.getStatus()==2){ |
| | | // 新增消息 |
| | | TNotice tNotice = new TNotice(); |
| | | List<String> collect = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId()) |
| | |
| | | return R.fail(401,"登陆失效"); |
| | | } |
| | | TBreedingAndPreservationDTO dto = JSON.parseObject(param,TBreedingAndPreservationDTO.class); |
| | | if (dto.getStatus()==3){ |
| | | dto.setIsDraft(1); |
| | | }else{ |
| | | dto.setIsDraft(0); |
| | | } |
| | | breedingAndPreservationService.updateById(dto); |
| | | List<TSeparationOfCultureDishes> separationOfCultureDishesList = dto.getSeparationOfCultureDishesList(); |
| | | for (TSeparationOfCultureDishes tSeparationOfCultureDishes : separationOfCultureDishesList) { |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "接种斜面记录确认入库", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "接种斜面记录确认入库",response = TConfirmBreedingAndPreservationDTO.class) |
| | | @PostMapping(value = "/api/t-breeding-and-preservation/vaccinationSlopesConfirm") |
| | | public R<Boolean> vaccinationSlopesConfirm(@RequestBody String param) { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | |
| | | TConfirmBreedingAndPreservationDTO dto = JSON.parseObject(param,TConfirmBreedingAndPreservationDTO.class); |
| | | TVaccinationSlope byId = vaccinationSlopeService.getById(dto.getId()); |
| | | byId.setPreserveId(userId+""); |
| | | byId.setPreserveTime(LocalDateTime.now()); |
| | | byId.setPreserveSignature(dto.getPreserveSignature()); |
| | | vaccinationSlopeService.updateById(byId); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "菌种保藏记录确认入库", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "菌种保藏记录确认入库",response = TConfirmBreedingAndPreservationDTO.class) |
| | | @PostMapping(value = "/api/t-breeding-and-preservation/culturePreservationsConfirm") |
| | | public R<Boolean> culturePreservationsConfirm(@RequestBody String param) { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | TConfirmBreedingAndPreservationDTO dto = JSON.parseObject(param,TConfirmBreedingAndPreservationDTO.class); |
| | | TCulturePreservation byId = culturePreservationService.getById(dto.getId()); |
| | | byId.setPreserveId(userId+""); |
| | | byId.setPreserveTime(LocalDateTime.now()); |
| | | byId.setPreserveSignature(dto.getPreserveSignature()); |
| | | culturePreservationService.updateById(byId); |
| | | return R.ok(); |
| | | } |
| | | //@PreAuthorize("@ss.hasPermi('system:breedingAndPreservation:detail')") |
| | | @ApiOperation(value = "选育保藏记录详情") |
| | | @GetMapping(value = "/open/t-breeding-and-preservation/getDetailById") |