| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.ServletException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | |
| | | Integer orderId = (Integer) param.get("orderId"); |
| | | String ids = (String) param.get("ids"); |
| | | Integer typeSource = (Integer) param.get("typeSource"); |
| | | Integer ifsInventoryId = (Integer) param.get("ifsInventoryId"); |
| | | Long ifsInventoryId = (Long) param.get("ifsInventoryId"); |
| | | if(Objects.nonNull(typeSource) && typeSource == 1){ |
| | | ifsInventoryQuantityMapper.update(null,new LambdaUpdateWrapper<IfsInventoryQuantity>() |
| | | .set(IfsInventoryQuantity::getState,0) |
| | |
| | | @ApiOperation(value = "获取ifs订单") |
| | | @GetMapping("/getIfsOrder") |
| | | public Result<?> getIfsOrder() { |
| | | insOrderService.getIfsOrder(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("LOCATION_NO","1302"); |
| | | map.put("STATE_DB","To be Inspected"); |
| | | insOrderService.getIfsOrder(map,false); |
| | | return Result.success(); |
| | | } |
| | | |
| | |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询当前时间是否没有该检测项的抽样计划") |
| | | @PostMapping("/judgeNotSpotCheckOrder") |
| | | public Result<?> judgeNotSpotCheckOrder(@RequestBody InsPlaceOrderDto insPlaceOrderDto) { |
| | | return insOrderService.judgeNotSpotCheckOrder(insPlaceOrderDto.getSampleList(), insPlaceOrderDto.getInsOrder()); |
| | | } |
| | | |
| | | } |