| | |
| | | import com.yuanchu.limslaboratory.pojo.vo.ReportVo; |
| | | import com.yuanchu.limslaboratory.service.ReportService; |
| | | import com.yuanchu.limslaboratory.utils.JackSonUtil; |
| | | import com.yuanchu.limslaboratory.utils.MyUtil; |
| | | import com.yuanchu.limslaboratory.utils.RedisUtil; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @ApiImplicitParam(name = "result", value = "审核结论", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @PostMapping("/check") |
| | | public Result check(@RequestHeader("token") String token, Integer id, String result) throws Exception { |
| | | public Result check(@RequestHeader("X-Token") String token, Integer id, String result) throws Exception { |
| | | Object object = RedisUtil.get(token); |
| | | Map<String, Object> unmarshal = JackSonUtil.unmarshal(JackSonUtil.marshal(object), Map.class); |
| | | MyUtil.PrintLog(unmarshal + "-------id" + id + "=========" + result); |
| | | return Result.success(reportService.check((String) unmarshal.get("name"), id, result)); |
| | | } |
| | | |
| | |
| | | im.name materialName, |
| | | r.conclusion , |
| | | r.status , |
| | | r.approver , |
| | | check_time, |
| | | u.name |
| | | from lims_laboratory.report r |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.service.ProductService; |
| | | import com.yuanchu.limslaboratory.utils.MyUtil; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | }) |
| | | @PostMapping("/write") |
| | | public Result<?> write(Integer id, String required, String internal) { |
| | | return Result.success(productService.write(id, required, internal)); |
| | | Integer write = productService.write(id, required, internal); |
| | | if (write >= 1){ |
| | | return Result.success("更新成功"); |
| | | } |
| | | return Result.fail("更新失败"); |
| | | } |
| | | |
| | | @ApiOperation("项目Id列表删除") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "ids", value = "标准项目ID", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @DeleteMapping("/deleteList") |
| | | public Result<?> deleteList(String ids) { |
| | | MyUtil.PrintLog(ids); |
| | | productService.deleteList(ids); |
| | | return Result.success("删除成功"); |
| | | } |
| | | } |
| | |
| | | //展示该型号下的检验项目要求 |
| | | List<Map<String, Object>> pageProductInformation(Integer specificationsId); |
| | | |
| | | |
| | | |
| | | void deleteList(String ids); |
| | | } |
| | |
| | | */ |
| | | Integer write(Integer id, String required, String internal); |
| | | |
| | | void deleteList(String ids); |
| | | } |
| | |
| | | product.setId(id); |
| | | product.setRequired(required); |
| | | product.setInternal(internal); |
| | | productMapper.updateById(product); |
| | | return 1; |
| | | MyUtil.PrintLog(product.toString()); |
| | | return productMapper.updateById(product); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteList(String ids) { |
| | | productMapper.deleteList(ids); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | <!--展示该型号下的检验项目要求--> |
| | | <resultMap id="pageProductInformationMap" type="map"> |
| | | <id property="father" column="father"/> |
| | | <id property="name" column="father"/> |
| | | <collection property="children" resultMap="pageProductInformationTowMap" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="pageProductInformationTowMap" type="map"> |
| | |
| | | where state = 1 |
| | | and specifications_id = #{specificationsId} |
| | | </select> |
| | | |
| | | <select id="deleteList"> |
| | | update lims_laboratory.product |
| | | set state=0 |
| | | where id in (${ids}) |
| | | </select> |
| | | </mapper> |