zhuo
2024-07-23 5ed5f51d479989d5b2149b09c82b6b3ea495b589
inspect-server/src/main/java/com/yuanchu/mom/controller/InsOrderController.java
@@ -23,6 +23,8 @@
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
@@ -60,8 +62,8 @@
    @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 = "添加检验下单数据")
@@ -142,6 +144,15 @@
        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")
@@ -170,4 +181,12 @@
    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);
    }
}