| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.pojo.LinkBasicInformation; |
| | | import com.yuanchu.limslaboratory.service.LinkBasicInformationService; |
| | | import com.yuanchu.limslaboratory.utils.MyUtil; |
| | | import com.yuanchu.limslaboratory.utils.RedisUtil; |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation("删除") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "委托样品id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/delLink") |
| | | @AuthHandler |
| | | public Result<?> delLink(Integer id){ |
| | | linkBasicInformationService.delLink(id); |
| | | return Result.success("删除成功!"); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "LinkBasicInformation对象Id", hidden = true) |
| | | private Integer linkBasicId; |
| | | |
| | | @TableLogic(value = "1", delval = "0") |
| | | |
| | | @ApiModelProperty(value = "逻辑删除 正常>=1,删除<=0", hidden = true) |
| | | private Integer state; |
| | | |
| | |
| | | Map<String, String> selectViewUUID(); |
| | | |
| | | boolean isIfViewUUID(String uuid); |
| | | |
| | | //根据委托样品id删除 |
| | | void delLink(Integer id); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.pojo.LinkBasicInformation; |
| | | import com.yuanchu.limslaboratory.mapper.LinkBasicInformationMapper; |
| | | import com.yuanchu.limslaboratory.pojo.LinkDetection; |
| | | import com.yuanchu.limslaboratory.service.LinkBasicInformationService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.limslaboratory.service.LinkDetectionService; |
| | |
| | | return uuid.equals(RedisUtil.get("viewId")); |
| | | } |
| | | |
| | | //根据委托样品删除 |
| | | @Override |
| | | public void delLink(Integer id) { |
| | | LinkDetection linkDetection = new LinkDetection(); |
| | | linkDetection.setId(id); |
| | | linkDetection.setState(0); |
| | | linkDetectionService.updateById(linkDetection); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.limslaboratory.mapper.LinkBasicInformationMapper"> |
| | | <select id="getLinkBasicPage" resultType="map"> |
| | | SELECT l.`id`, l.`entrust_coding`, l.`entrusted`, d.`samples_number`, d.`sample_name`, |
| | | SELECT d.`id`, l.`entrust_coding`, l.`entrusted`, d.`samples_number`, d.`sample_name`, |
| | | d.`specifications_models`, |
| | | DATE_FORMAT(l.`inspection_time`,'%Y-%m-%d') inspectionTime, DATE_FORMAT(l.`completion_deadline`,'%Y-%m-%d') |
| | | completionDeadline, l.`contacts`, |
| | | DATE_FORMAT(d.`date_survey`,'%Y-%m-%d') dateSurvey, d.`inspection_status` |
| | | FROM link_basic_information l, link_detection d |
| | | WHERE l.`id` = d.`link_basic_id` |
| | | AND l.`state` = 1 |
| | | AND d.`state` = 1 |
| | | and l.`state` = 1 |
| | | <if test="entrustCoding != null and entrustCoding != null"> |
| | | AND l.`entrust_coding` like concat('%', #{entrustCoding}, '%') |
| | | </if> |