Просмотр исходного кода

新增采购合同相关接口

wangqiong 1 год назад
Родитель
Сommit
28f050efc2

+ 162
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPurchaseEvaluateController.java Просмотреть файл

@@ -0,0 +1,162 @@
1
+package com.zzsmart.qomo.kn.cost.manage.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPurchaseEvaluate;
7
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostPurchaseEvaluateService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import lombok.extern.slf4j.Slf4j;
11
+import org.apache.shiro.authz.annotation.RequiresPermissions;
12
+import org.jeecg.common.api.vo.Result;
13
+import org.jeecg.common.aspect.annotation.AutoLog;
14
+import org.jeecg.common.system.base.controller.JeecgController;
15
+import org.jeecg.common.system.query.QueryGenerator;
16
+import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.web.bind.annotation.*;
18
+import org.springframework.web.servlet.ModelAndView;
19
+
20
+import javax.servlet.http.HttpServletRequest;
21
+import javax.servlet.http.HttpServletResponse;
22
+import java.util.Arrays;
23
+
24
+/**
25
+ * @Description: app_scene_cost_purchase_evaluate
26
+ * @Author: jeecg-boot
27
+ * @Date: 2024-08-02
28
+ * @Version: V1.0
29
+ */
30
+@Api(tags = "cost-采购合同")
31
+@RestController
32
+@RequestMapping("//PurchaseEvaluate")
33
+@Slf4j
34
+public class AppSceneCostPurchaseEvaluateController extends JeecgController<AppSceneCostPurchaseEvaluate, IAppSceneCostPurchaseEvaluateService> {
35
+    @Autowired
36
+    private IAppSceneCostPurchaseEvaluateService appSceneCostPurchaseEvaluateService;
37
+
38
+    /**
39
+     * 分页列表查询
40
+     *
41
+     * @param appSceneCostPurchaseEvaluate
42
+     * @param pageNo
43
+     * @param pageSize
44
+     * @param req
45
+     * @return
46
+     */
47
+    //@AutoLog(value = "app_scene_cost_purchase_evaluate-分页列表查询")
48
+    @ApiOperation(value = "app_scene_cost_purchase_evaluate-分页列表查询", notes = "app_scene_cost_purchase_evaluate-分页列表查询")
49
+    @GetMapping(value = "/list")
50
+    public Result<IPage<AppSceneCostPurchaseEvaluate>> queryPageList(AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate,
51
+                                                                     @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
52
+                                                                     @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
53
+                                                                     HttpServletRequest req) {
54
+        QueryWrapper<AppSceneCostPurchaseEvaluate> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostPurchaseEvaluate, req.getParameterMap());
55
+        Page<AppSceneCostPurchaseEvaluate> page = new Page<AppSceneCostPurchaseEvaluate>(pageNo, pageSize);
56
+        IPage<AppSceneCostPurchaseEvaluate> pageList = appSceneCostPurchaseEvaluateService.page(page, queryWrapper);
57
+        return Result.OK(pageList);
58
+    }
59
+
60
+    /**
61
+     * 添加
62
+     *
63
+     * @param appSceneCostPurchaseEvaluate
64
+     * @return
65
+     */
66
+    @AutoLog(value = "app_scene_cost_purchase_evaluate-添加")
67
+    @ApiOperation(value = "app_scene_cost_purchase_evaluate-添加", notes = "app_scene_cost_purchase_evaluate-添加")
68
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:add")
69
+    @PostMapping(value = "/add")
70
+    public Result<String> add(@RequestBody AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) {
71
+        appSceneCostPurchaseEvaluateService.save(appSceneCostPurchaseEvaluate);
72
+        return Result.OK("添加成功!");
73
+    }
74
+
75
+    /**
76
+     * 编辑
77
+     *
78
+     * @param appSceneCostPurchaseEvaluate
79
+     * @return
80
+     */
81
+    @AutoLog(value = "app_scene_cost_purchase_evaluate-编辑")
82
+    @ApiOperation(value = "app_scene_cost_purchase_evaluate-编辑", notes = "app_scene_cost_purchase_evaluate-编辑")
83
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:edit")
84
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
85
+    public Result<String> edit(@RequestBody AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) {
86
+        appSceneCostPurchaseEvaluateService.updateById(appSceneCostPurchaseEvaluate);
87
+        return Result.OK("编辑成功!");
88
+    }
89
+
90
+    /**
91
+     * 通过id删除
92
+     *
93
+     * @param id
94
+     * @return
95
+     */
96
+    @AutoLog(value = "app_scene_cost_purchase_evaluate-通过id删除")
97
+    @ApiOperation(value = "app_scene_cost_purchase_evaluate-通过id删除", notes = "app_scene_cost_purchase_evaluate-通过id删除")
98
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:delete")
99
+    @DeleteMapping(value = "/delete")
100
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
101
+        appSceneCostPurchaseEvaluateService.removeById(id);
102
+        return Result.OK("删除成功!");
103
+    }
104
+//
105
+//    /**
106
+//     * 批量删除
107
+//     *
108
+//     * @param ids
109
+//     * @return
110
+//     */
111
+//    @AutoLog(value = "app_scene_cost_purchase_evaluate-批量删除")
112
+//    @ApiOperation(value = "app_scene_cost_purchase_evaluate-批量删除", notes = "app_scene_cost_purchase_evaluate-批量删除")
113
+//    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:deleteBatch")
114
+//    @DeleteMapping(value = "/deleteBatch")
115
+//    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
116
+//        this.appSceneCostPurchaseEvaluateService.removeByIds(Arrays.asList(ids.split(",")));
117
+//        return Result.OK("批量删除成功!");
118
+//    }
119
+//
120
+//    /**
121
+//     * 通过id查询
122
+//     *
123
+//     * @param id
124
+//     * @return
125
+//     */
126
+//    //@AutoLog(value = "app_scene_cost_purchase_evaluate-通过id查询")
127
+//    @ApiOperation(value = "app_scene_cost_purchase_evaluate-通过id查询", notes = "app_scene_cost_purchase_evaluate-通过id查询")
128
+//    @GetMapping(value = "/queryById")
129
+//    public Result<AppSceneCostPurchaseEvaluate> queryById(@RequestParam(name = "id", required = true) String id) {
130
+//        AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate = appSceneCostPurchaseEvaluateService.getById(id);
131
+//        if (appSceneCostPurchaseEvaluate == null) {
132
+//            return Result.error("未找到对应数据");
133
+//        }
134
+//        return Result.OK(appSceneCostPurchaseEvaluate);
135
+//    }
136
+//
137
+//    /**
138
+//     * 导出excel
139
+//     *
140
+//     * @param request
141
+//     * @param appSceneCostPurchaseEvaluate
142
+//     */
143
+//    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:exportXls")
144
+//    @RequestMapping(value = "/exportXls")
145
+//    public ModelAndView exportXls(HttpServletRequest request, AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) {
146
+//        return super.exportXls(request, appSceneCostPurchaseEvaluate, AppSceneCostPurchaseEvaluate.class, "app_scene_cost_purchase_evaluate");
147
+//    }
148
+//
149
+//    /**
150
+//     * 通过excel导入数据
151
+//     *
152
+//     * @param request
153
+//     * @param response
154
+//     * @return
155
+//     */
156
+//    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:importExcel")
157
+//    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
158
+//    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
159
+//        return super.importExcel(request, response, AppSceneCostPurchaseEvaluate.class);
160
+//    }
161
+
162
+}

+ 86
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPurchaseEvaluate.java Просмотреть файл

@@ -0,0 +1,86 @@
1
+package com.zzsmart.qomo.kn.cost.manage.entity;
2
+
3
+import java.io.Serializable;
4
+import java.io.UnsupportedEncodingException;
5
+import java.util.Date;
6
+import java.math.BigDecimal;
7
+
8
+import com.baomidou.mybatisplus.annotation.IdType;
9
+import com.baomidou.mybatisplus.annotation.TableId;
10
+import com.baomidou.mybatisplus.annotation.TableName;
11
+import com.baomidou.mybatisplus.annotation.TableLogic;
12
+import lombok.Builder;
13
+import lombok.Data;
14
+import com.fasterxml.jackson.annotation.JsonFormat;
15
+import org.springframework.format.annotation.DateTimeFormat;
16
+import org.jeecgframework.poi.excel.annotation.Excel;
17
+import org.jeecg.common.aspect.annotation.Dict;
18
+import io.swagger.annotations.ApiModel;
19
+import io.swagger.annotations.ApiModelProperty;
20
+import lombok.EqualsAndHashCode;
21
+import lombok.experimental.Accessors;
22
+
23
+/**
24
+ * @Description: app_scene_cost_purchase_evaluate
25
+ * @Author: jeecg-boot
26
+ * @Date: 2024-08-02
27
+ * @Version: V1.0
28
+ */
29
+@Data
30
+@Builder
31
+@TableName("app_scene_cost_purchase_evaluate")
32
+@Accessors(chain = true)
33
+@EqualsAndHashCode(callSuper = false)
34
+@ApiModel(value = "app_scene_cost_purchase_evaluate对象", description = "app_scene_cost_purchase_evaluate")
35
+public class AppSceneCostPurchaseEvaluate implements Serializable {
36
+    private static final long serialVersionUID = 1L;
37
+
38
+    /**
39
+     * 主键
40
+     */
41
+    @TableId(type = IdType.ASSIGN_ID)
42
+    @ApiModelProperty(value = "主键")
43
+    private Integer id;
44
+    /**
45
+     * 合同编号
46
+     */
47
+    @Excel(name = "合同编号", width = 15)
48
+    @ApiModelProperty(value = "合同编号")
49
+    private String contractNo;
50
+    /**
51
+     * 估价
52
+     */
53
+    @Excel(name = "估价", width = 15)
54
+    @ApiModelProperty(value = "估价")
55
+    private BigDecimal evaluate;
56
+    /**
57
+     * 合同名称
58
+     */
59
+    @Excel(name = "合同名称", width = 15)
60
+    @ApiModelProperty(value = "合同名称")
61
+    private String contractName;
62
+    /**
63
+     * 创建时间
64
+     */
65
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
66
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
67
+    @ApiModelProperty(value = "创建时间")
68
+    private Date createTime;
69
+    /**
70
+     * 创建人
71
+     */
72
+    @ApiModelProperty(value = "创建人")
73
+    private Integer createBy;
74
+    /**
75
+     * 更新时间
76
+     */
77
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
78
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
79
+    @ApiModelProperty(value = "更新时间")
80
+    private Date updateTime;
81
+    /**
82
+     * 更新人
83
+     */
84
+    @ApiModelProperty(value = "更新人")
85
+    private Integer updateBy;
86
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPurchaseEvaluateMapper.java Просмотреть файл

@@ -0,0 +1,14 @@
1
+package com.zzsmart.qomo.kn.cost.manage.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPurchaseEvaluate;
5
+
6
+/**
7
+ * @Description: app_scene_cost_purchase_evaluate
8
+ * @Author: jeecg-boot
9
+ * @Date: 2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface AppSceneCostPurchaseEvaluateMapper extends BaseMapper<AppSceneCostPurchaseEvaluate> {
13
+
14
+}

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPurchaseEvaluateMapper.xml Просмотреть файл

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostPurchaseEvaluateMapper">
4
+
5
+</mapper>

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPurchaseEvaluateService.java Просмотреть файл

@@ -0,0 +1,14 @@
1
+package com.zzsmart.qomo.kn.cost.manage.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPurchaseEvaluate;
5
+
6
+/**
7
+ * @Description: app_scene_cost_purchase_evaluate
8
+ * @Author: jeecg-boot
9
+ * @Date: 2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface IAppSceneCostPurchaseEvaluateService extends IService<AppSceneCostPurchaseEvaluate> {
13
+
14
+}

+ 19
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostPurchaseEvaluateServiceImpl.java Просмотреть файл

@@ -0,0 +1,19 @@
1
+package com.zzsmart.qomo.kn.cost.manage.service.impl;
2
+
3
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPurchaseEvaluate;
4
+import com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostPurchaseEvaluateMapper;
5
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostPurchaseEvaluateService;
6
+import org.springframework.stereotype.Service;
7
+
8
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
9
+
10
+/**
11
+ * @Description: app_scene_cost_purchase_evaluate
12
+ * @Author: jeecg-boot
13
+ * @Date:   2024-08-02
14
+ * @Version: V1.0
15
+ */
16
+@Service
17
+public class AppSceneCostPurchaseEvaluateServiceImpl extends ServiceImpl<AppSceneCostPurchaseEvaluateMapper, AppSceneCostPurchaseEvaluate> implements IAppSceneCostPurchaseEvaluateService {
18
+
19
+}