chenlu
2024-02-20 736dd5afb982ce1c19b15633ffd3495f6f8822ec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.example.erp.controller.pp;
 
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.Order;
import com.example.erp.common.Result;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.service.pp.FlowCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.sql.Date;
 
@RestController
@RequestMapping("/processCard")
public class ProcessCardController {
    @Autowired
    FlowCardService flowCardService;
 
    @PostMapping  ("/flowCard/{selectTime1}/{selectTime2}")
    public Result DateProcess(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @RequestBody FlowCard  flowCard){
        System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString());
        return Result.seccess(flowCardService.selectProcessCard(selectTime1,selectTime2,flowCard));
        
    }
 
    @PostMapping  ("/selectAddProcess/{selectTime1}/{selectTime2}")
    public Result SelectAddProcess(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @RequestBody Order  order){
    //    System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString());
        return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,order));
 
    }
 
    @PostMapping  ("/detailsSelect/{orderId}")
 
    public Result DetailsSelect(
            @PathVariable String orderId,
            @RequestBody OrderDetail orderDetail){
        return Result.seccess(flowCardService.DetailsSelectSv(orderId,orderDetail));
 
    }
 
}