From 28f050efc2776732e579707b120e8e5995c11c79 Mon Sep 17 00:00:00 2001 From: wangqiong <1322446236@qq.com> Date: Fri, 2 Aug 2024 11:17:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=87=87=E8=B4=AD=E5=90=88?= =?UTF-8?q?=E5=90=8C=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ppSceneCostPurchaseEvaluateController.java | 162 ++++++++++++++++++ .../entity/AppSceneCostPurchaseEvaluate.java | 86 ++++++++++ .../AppSceneCostPurchaseEvaluateMapper.java | 14 ++ .../AppSceneCostPurchaseEvaluateMapper.xml | 5 + .../IAppSceneCostPurchaseEvaluateService.java | 14 ++ ...pSceneCostPurchaseEvaluateServiceImpl.java | 19 ++ 6 files changed, 300 insertions(+) create mode 100644 qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPurchaseEvaluateController.java create mode 100644 qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPurchaseEvaluate.java create mode 100644 qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPurchaseEvaluateMapper.java create mode 100644 qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPurchaseEvaluateMapper.xml create mode 100644 qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPurchaseEvaluateService.java create mode 100644 qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostPurchaseEvaluateServiceImpl.java diff --git a/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPurchaseEvaluateController.java b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPurchaseEvaluateController.java new file mode 100644 index 0000000..c2e9fac --- /dev/null +++ b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPurchaseEvaluateController.java @@ -0,0 +1,162 @@ +package com.zzsmart.qomo.kn.cost.manage.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPurchaseEvaluate; +import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostPurchaseEvaluateService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; + +/** + * @Description: app_scene_cost_purchase_evaluate + * @Author: jeecg-boot + * @Date: 2024-08-02 + * @Version: V1.0 + */ +@Api(tags = "cost-采购合同") +@RestController +@RequestMapping("//PurchaseEvaluate") +@Slf4j +public class AppSceneCostPurchaseEvaluateController extends JeecgController { + @Autowired + private IAppSceneCostPurchaseEvaluateService appSceneCostPurchaseEvaluateService; + + /** + * 分页列表查询 + * + * @param appSceneCostPurchaseEvaluate + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "app_scene_cost_purchase_evaluate-分页列表查询") + @ApiOperation(value = "app_scene_cost_purchase_evaluate-分页列表查询", notes = "app_scene_cost_purchase_evaluate-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostPurchaseEvaluate, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = appSceneCostPurchaseEvaluateService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param appSceneCostPurchaseEvaluate + * @return + */ + @AutoLog(value = "app_scene_cost_purchase_evaluate-添加") + @ApiOperation(value = "app_scene_cost_purchase_evaluate-添加", notes = "app_scene_cost_purchase_evaluate-添加") + @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:add") + @PostMapping(value = "/add") + public Result add(@RequestBody AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) { + appSceneCostPurchaseEvaluateService.save(appSceneCostPurchaseEvaluate); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param appSceneCostPurchaseEvaluate + * @return + */ + @AutoLog(value = "app_scene_cost_purchase_evaluate-编辑") + @ApiOperation(value = "app_scene_cost_purchase_evaluate-编辑", notes = "app_scene_cost_purchase_evaluate-编辑") + @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) { + appSceneCostPurchaseEvaluateService.updateById(appSceneCostPurchaseEvaluate); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "app_scene_cost_purchase_evaluate-通过id删除") + @ApiOperation(value = "app_scene_cost_purchase_evaluate-通过id删除", notes = "app_scene_cost_purchase_evaluate-通过id删除") + @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + appSceneCostPurchaseEvaluateService.removeById(id); + return Result.OK("删除成功!"); + } +// +// /** +// * 批量删除 +// * +// * @param ids +// * @return +// */ +// @AutoLog(value = "app_scene_cost_purchase_evaluate-批量删除") +// @ApiOperation(value = "app_scene_cost_purchase_evaluate-批量删除", notes = "app_scene_cost_purchase_evaluate-批量删除") +// @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:deleteBatch") +// @DeleteMapping(value = "/deleteBatch") +// public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { +// this.appSceneCostPurchaseEvaluateService.removeByIds(Arrays.asList(ids.split(","))); +// return Result.OK("批量删除成功!"); +// } +// +// /** +// * 通过id查询 +// * +// * @param id +// * @return +// */ +// //@AutoLog(value = "app_scene_cost_purchase_evaluate-通过id查询") +// @ApiOperation(value = "app_scene_cost_purchase_evaluate-通过id查询", notes = "app_scene_cost_purchase_evaluate-通过id查询") +// @GetMapping(value = "/queryById") +// public Result queryById(@RequestParam(name = "id", required = true) String id) { +// AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate = appSceneCostPurchaseEvaluateService.getById(id); +// if (appSceneCostPurchaseEvaluate == null) { +// return Result.error("未找到对应数据"); +// } +// return Result.OK(appSceneCostPurchaseEvaluate); +// } +// +// /** +// * 导出excel +// * +// * @param request +// * @param appSceneCostPurchaseEvaluate +// */ +// @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:exportXls") +// @RequestMapping(value = "/exportXls") +// public ModelAndView exportXls(HttpServletRequest request, AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) { +// return super.exportXls(request, appSceneCostPurchaseEvaluate, AppSceneCostPurchaseEvaluate.class, "app_scene_cost_purchase_evaluate"); +// } +// +// /** +// * 通过excel导入数据 +// * +// * @param request +// * @param response +// * @return +// */ +// @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:importExcel") +// @RequestMapping(value = "/importExcel", method = RequestMethod.POST) +// public Result importExcel(HttpServletRequest request, HttpServletResponse response) { +// return super.importExcel(request, response, AppSceneCostPurchaseEvaluate.class); +// } + +} diff --git a/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPurchaseEvaluate.java b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPurchaseEvaluate.java new file mode 100644 index 0000000..a6b8656 --- /dev/null +++ b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPurchaseEvaluate.java @@ -0,0 +1,86 @@ +package com.zzsmart.qomo.kn.cost.manage.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import lombok.Builder; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: app_scene_cost_purchase_evaluate + * @Author: jeecg-boot + * @Date: 2024-08-02 + * @Version: V1.0 + */ +@Data +@Builder +@TableName("app_scene_cost_purchase_evaluate") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "app_scene_cost_purchase_evaluate对象", description = "app_scene_cost_purchase_evaluate") +public class AppSceneCostPurchaseEvaluate implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private Integer id; + /** + * 合同编号 + */ + @Excel(name = "合同编号", width = 15) + @ApiModelProperty(value = "合同编号") + private String contractNo; + /** + * 估价 + */ + @Excel(name = "估价", width = 15) + @ApiModelProperty(value = "估价") + private BigDecimal evaluate; + /** + * 合同名称 + */ + @Excel(name = "合同名称", width = 15) + @ApiModelProperty(value = "合同名称") + private String contractName; + /** + * 创建时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间") + private Date createTime; + /** + * 创建人 + */ + @ApiModelProperty(value = "创建人") + private Integer createBy; + /** + * 更新时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新时间") + private Date updateTime; + /** + * 更新人 + */ + @ApiModelProperty(value = "更新人") + private Integer updateBy; +} diff --git a/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPurchaseEvaluateMapper.java b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPurchaseEvaluateMapper.java new file mode 100644 index 0000000..8771364 --- /dev/null +++ b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPurchaseEvaluateMapper.java @@ -0,0 +1,14 @@ +package com.zzsmart.qomo.kn.cost.manage.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPurchaseEvaluate; + +/** + * @Description: app_scene_cost_purchase_evaluate + * @Author: jeecg-boot + * @Date: 2024-08-02 + * @Version: V1.0 + */ +public interface AppSceneCostPurchaseEvaluateMapper extends BaseMapper { + +} diff --git a/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPurchaseEvaluateMapper.xml b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPurchaseEvaluateMapper.xml new file mode 100644 index 0000000..05c4719 --- /dev/null +++ b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPurchaseEvaluateMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPurchaseEvaluateService.java b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPurchaseEvaluateService.java new file mode 100644 index 0000000..3044e7a --- /dev/null +++ b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPurchaseEvaluateService.java @@ -0,0 +1,14 @@ +package com.zzsmart.qomo.kn.cost.manage.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPurchaseEvaluate; + +/** + * @Description: app_scene_cost_purchase_evaluate + * @Author: jeecg-boot + * @Date: 2024-08-02 + * @Version: V1.0 + */ +public interface IAppSceneCostPurchaseEvaluateService extends IService { + +} diff --git a/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostPurchaseEvaluateServiceImpl.java b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostPurchaseEvaluateServiceImpl.java new file mode 100644 index 0000000..a1c4823 --- /dev/null +++ b/qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostPurchaseEvaluateServiceImpl.java @@ -0,0 +1,19 @@ +package com.zzsmart.qomo.kn.cost.manage.service.impl; + +import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPurchaseEvaluate; +import com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostPurchaseEvaluateMapper; +import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostPurchaseEvaluateService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: app_scene_cost_purchase_evaluate + * @Author: jeecg-boot + * @Date: 2024-08-02 + * @Version: V1.0 + */ +@Service +public class AppSceneCostPurchaseEvaluateServiceImpl extends ServiceImpl implements IAppSceneCostPurchaseEvaluateService { + +}