whyclxw
2025-03-13 90f2637328f765b3db59333b8c615e61e3365afc
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.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.ProductLockLog;
import com.whyc.service.ProductLockLogService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import java.text.ParseException;
import java.util.Date;
import java.util.List;
 
@Api(tags = "产品锁定日志")
@RestController
@RequestMapping("productLockLog")
public class ProductLockLogController {
 
    @Autowired
    private ProductLockLogService service;
 
    @ApiOperation("查询列表-根据母料编码和定制表单号")
    @GetMapping("listByParentCodeAndCustomCode")
    public Response getListByParentCodeAndCustomCode(@RequestParam String parentCode,@RequestParam String customCode){
        List<ProductLockLog> lockLogList = service.getListByParentCodeAndCustomCode(parentCode,customCode);
        return new Response().set(1,lockLogList);
    }
 
    @ApiOperation("查询列表-查询用户的解锁操作")
    @GetMapping("getUnlockByOwner")
    public Response getUnlockByOwner( @RequestParam String createTime, @RequestParam String createTime1,@RequestParam int pageCurr,@RequestParam int pageSize ){
        Date testTime1= null;
        Date testTime2= null;
        try {
            testTime1 = ActionUtil.sdfwithALL.parse(createTime);
            testTime2 = ActionUtil.sdfwithALL.parse(createTime1);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return service.getUnlockByOwner(testTime1,testTime2,pageCurr,pageSize);
    }
 
}