| | |
| | | import com.yuanchu.mom.dto.SampleProductDto2; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | import com.yuanchu.mom.pojo.InsOrderTemplate; |
| | | import com.yuanchu.mom.pojo.InsProduct; |
| | | import com.yuanchu.mom.service.InsOrderService; |
| | | import com.yuanchu.mom.service.InsOrderTemplateService; |
| | | import com.yuanchu.mom.service.InsProductService; |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | |
| | | return Result.success(insOrderService.selectInsOrderParameter(page, sampleOrderDto)); |
| | | } |
| | | |
| | | //用于检验下单区别查看所有订单和只查看同一个委托单位的订单 |
| | | @ValueClassify("检验下单") |
| | | @ApiOperation(value = "查看所有检验单") |
| | | @PostMapping("/selectAllInsOrder") |
| | | public Result selectAllInsOrder(){ |
| | | @ApiOperation(value = "查询所有检验单") |
| | | @PostMapping("/selectAllInsOrderParameter") |
| | | public Result selectAllInsOrderParameter() { |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ValueClassify("检验下单") |
| | | @ApiOperation(value = "检验分配") |
| | | @PostMapping("/upInsOrder") |
| | | public Result<?> upInsOrder(Integer orderId, Integer sampleId, String appointed, Integer userId) { |
| | | return Result.success(insOrderService.upInsOrder(orderId, sampleId, appointed, userId)); |
| | | public Result<?> upInsOrder(Integer orderId, Integer sampleId, String appointed, Integer userId,String sonLaboratory) { |
| | | return Result.success(insOrderService.upInsOrder(orderId, sampleId, appointed, userId,sonLaboratory)); |
| | | } |
| | | @ValueClassify("检验下单") |
| | | @ApiOperation(value = "添加检验下单数据") |
| | |
| | | @ApiOperation(value = "查询检验单模板") |
| | | @GetMapping("/selectInsOrderTemplate") |
| | | @ValueAuth |
| | | public Result<?> selectInsOrderTemplate() { |
| | | return Result.success(insOrderTemplateService.selectInsOrderTemplate()); |
| | | public Result<?> selectInsOrderTemplate(String company) { |
| | | return Result.success(insOrderTemplateService.selectInsOrderTemplate(company)); |
| | | } |
| | | |
| | | @ApiOperation(value = "通过检验单模板id获取检验单模板内容") |
| | |
| | | CostStatisticsDto costStatisticsDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), CostStatisticsDto.class); |
| | | return Result.success(insOrderService.costStatistics(page, costStatisticsDto)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "费用统计获取总价") |
| | | @PostMapping("/costStatistics2") |
| | | public Result<?> costStatistics2(@RequestBody Map<String, Object> data) throws Exception { |
| | | CostStatisticsDto costStatisticsDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), CostStatisticsDto.class); |
| | | return Result.success(insOrderService.costStatistics2(costStatisticsDto)); |
| | | } |
| | | |
| | | @ValueClassify("统计图表") |
| | | @ApiOperation(value = "样品缺陷指数") |
| | | @PostMapping("/selectSampleDefects") |
| | |
| | | return Result.success(); |
| | | } |
| | | |
| | | //待检的撤销的查询待检项目 |
| | | @ValueAuth |
| | | @PostMapping("/selectNoProducts") |
| | | public Result<?> selectNoProducts(@RequestBody Map<String, Object> data,Integer orderId ,String ids) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InsProduct insProduct = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InsProduct.class); |
| | | return Result.success(insProductService.selectNoProducts(page, insProduct,orderId,ids)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "待检的撤销") |
| | | @PutMapping("/updateInspected") |
| | | @ValueAuth |
| | | public Result<?> updateInspected(Integer id){ |
| | | insProductService.updateInspected(id); |
| | | public Result<?> updateInspected(Integer orderId,String ids){ |
| | | insProductService.updateInspected(orderId,ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("检验下单") |
| | | @ApiOperation(value = "审核待检撤销") |
| | | @PostMapping("/checkUpdate") |
| | | public Result<?> checkUpdate(Integer orderId,Integer state){ |
| | | insProductService.checkUpdate(orderId,state); |
| | | return Result.success(); |
| | | } |
| | | |
| | |
| | | public Result<?> labelPrinting(String ids) { |
| | | return Result.success(insOrderService.labelPrinting(ids)); |
| | | } |
| | | |
| | | @ValueClassify("费用统计") |
| | | @ApiOperation(value = "费用统计导出") |
| | | @PostMapping("/export") |
| | | public void export(@RequestBody Map<String, Object> data,HttpServletResponse response) throws Exception { |
| | | CostStatisticsDto costStatisticsDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), CostStatisticsDto.class); |
| | | insOrderService.export(costStatisticsDto,response); |
| | | } |
| | | } |