From 088edadbf01ba20da3be614efc1f606010ffb922 Mon Sep 17 00:00:00 2001 From: mors <3067699729@qq.com> Date: Thu, 5 Jan 2023 17:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=A7=E5=93=81=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/maker/ZyMakerList.vue | 5 + .../productModule/ProductModuleList.vue | 189 ++++++++++++++++++ .../modules/ProductModuleForm.vue | 119 +++++++++++ .../modules/ProductModuleModal.vue | 60 ++++++ .../ProductModuleModal__Style#Drawer.vue | 84 ++++++++ .../controller/ProductModuleController.java | 156 +++++++++++++++ .../productModule/entity/ProductModule.java | 74 +++++++ .../mapper/ProductModuleMapper.java | 15 ++ .../mapper/xml/ProductModuleMapper.xml | 5 + .../service/IProductModuleService.java | 15 ++ .../impl/ProductModuleServiceImpl.java | 20 ++ 11 files changed, 742 insertions(+) create mode 100644 ant-design-vue-jeecg/src/views/product/productModule/ProductModuleList.vue create mode 100644 ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleForm.vue create mode 100644 ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleModal.vue create mode 100644 ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleModal__Style#Drawer.vue create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/controller/ProductModuleController.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/entity/ProductModule.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/mapper/ProductModuleMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/mapper/xml/ProductModuleMapper.xml create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/service/IProductModuleService.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/service/impl/ProductModuleServiceImpl.java diff --git a/ant-design-vue-jeecg/src/views/maker/ZyMakerList.vue b/ant-design-vue-jeecg/src/views/maker/ZyMakerList.vue index 4e8e7d7f..5902a2f8 100644 --- a/ant-design-vue-jeecg/src/views/maker/ZyMakerList.vue +++ b/ant-design-vue-jeecg/src/views/maker/ZyMakerList.vue @@ -143,6 +143,11 @@ align:"center", dataIndex: 'modelName' }, + { + title: '创建时间', + align: "center", + dataIndex: 'createTime' + }, { title: '操作', dataIndex: 'action', diff --git a/ant-design-vue-jeecg/src/views/product/productModule/ProductModuleList.vue b/ant-design-vue-jeecg/src/views/product/productModule/ProductModuleList.vue new file mode 100644 index 00000000..cc9623c8 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/product/productModule/ProductModuleList.vue @@ -0,0 +1,189 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleForm.vue b/ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleForm.vue new file mode 100644 index 00000000..0bc82d96 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleForm.vue @@ -0,0 +1,119 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleModal.vue b/ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleModal.vue new file mode 100644 index 00000000..c847c29d --- /dev/null +++ b/ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleModal__Style#Drawer.vue new file mode 100644 index 00000000..506c4d9d --- /dev/null +++ b/ant-design-vue-jeecg/src/views/product/productModule/modules/ProductModuleModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/controller/ProductModuleController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/controller/ProductModuleController.java new file mode 100644 index 00000000..7ef5b7aa --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/controller/ProductModuleController.java @@ -0,0 +1,156 @@ +package org.jeecg.modules.product.productModule.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 io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +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.jeecg.modules.product.productModule.entity.ProductModule; +import org.jeecg.modules.product.productModule.service.IProductModuleService; +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: 工单管理下面的产品模块 + * @Author: jeecg-boot + * @Date: 2023-01-05 + * @Version: V1.0 + */ +@Api(tags="工单管理下面的产品模块") +@RestController +@RequestMapping("/productModule/productModule") +@Slf4j +public class ProductModuleController extends JeecgController { + @Autowired + private IProductModuleService productModuleService; + + /** + * 分页列表查询 + * + * @param productModule + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "工单管理下面的产品模块-分页列表查询") + @ApiOperation(value="工单管理下面的产品模块-分页列表查询", notes="工单管理下面的产品模块-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(ProductModule productModule, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(productModule, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = productModuleService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param productModule + * @return + */ + @AutoLog(value = "工单管理下面的产品模块-添加") + @ApiOperation(value="工单管理下面的产品模块-添加", notes="工单管理下面的产品模块-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody ProductModule productModule) { + productModuleService.save(productModule); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param productModule + * @return + */ + @AutoLog(value = "工单管理下面的产品模块-编辑") + @ApiOperation(value="工单管理下面的产品模块-编辑", notes="工单管理下面的产品模块-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody ProductModule productModule) { + productModuleService.updateById(productModule); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "工单管理下面的产品模块-通过id删除") + @ApiOperation(value="工单管理下面的产品模块-通过id删除", notes="工单管理下面的产品模块-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + productModuleService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "工单管理下面的产品模块-批量删除") + @ApiOperation(value="工单管理下面的产品模块-批量删除", notes="工单管理下面的产品模块-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.productModuleService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "工单管理下面的产品模块-通过id查询") + @ApiOperation(value="工单管理下面的产品模块-通过id查询", notes="工单管理下面的产品模块-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + ProductModule productModule = productModuleService.getById(id); + if(productModule==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(productModule); + } + + /** + * 导出excel + * + * @param request + * @param productModule + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ProductModule productModule) { + return super.exportXls(request, productModule, ProductModule.class, "工单管理下面的产品模块"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ProductModule.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/entity/ProductModule.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/entity/ProductModule.java new file mode 100644 index 00000000..37c7e82d --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/entity/ProductModule.java @@ -0,0 +1,74 @@ +package org.jeecg.modules.product.productModule.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 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: 工单管理下面的产品模块 + * @Author: jeecg-boot + * @Date: 2023-01-05 + * @Version: V1.0 + */ +@Data +@TableName("product_module") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="product_module对象", description="工单管理下面的产品模块") +public class ProductModule implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + /**创建日期*/ + @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 String updateBy; + /**更新日期*/ + @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 String sysOrgCode; + /**产品id*/ + @Excel(name = "产品id", width = 15) + @ApiModelProperty(value = "产品id") + private String productId; + /**款式模块id*/ + @Excel(name = "款式模块id", width = 15) + @ApiModelProperty(value = "款式模块id") + private String styleModuleId; + /**模块id*/ + @Excel(name = "模块id", width = 15) + @ApiModelProperty(value = "模块id") + private String moduleId; + /**部位*/ + @Excel(name = "部位", width = 15) + @ApiModelProperty(value = "部位") + private String place; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/mapper/ProductModuleMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/mapper/ProductModuleMapper.java new file mode 100644 index 00000000..cadd0cf0 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/mapper/ProductModuleMapper.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.product.productModule.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.product.productModule.entity.ProductModule; + +/** + * @Description: 工单管理下面的产品模块 + * @Author: jeecg-boot + * @Date: 2023-01-05 + * @Version: V1.0 + */ +public interface ProductModuleMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/mapper/xml/ProductModuleMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/mapper/xml/ProductModuleMapper.xml new file mode 100644 index 00000000..fe054d9a --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/mapper/xml/ProductModuleMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/service/IProductModuleService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/service/IProductModuleService.java new file mode 100644 index 00000000..439b9aa3 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/service/IProductModuleService.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.product.productModule.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.product.productModule.entity.ProductModule; + +/** + * @Description: 工单管理下面的产品模块 + * @Author: jeecg-boot + * @Date: 2023-01-05 + * @Version: V1.0 + */ +public interface IProductModuleService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/service/impl/ProductModuleServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/service/impl/ProductModuleServiceImpl.java new file mode 100644 index 00000000..5245021e --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/service/impl/ProductModuleServiceImpl.java @@ -0,0 +1,20 @@ +package org.jeecg.modules.product.productModule.service.impl; + + +import org.jeecg.modules.product.productModule.entity.ProductModule; +import org.jeecg.modules.product.productModule.mapper.ProductModuleMapper; +import org.jeecg.modules.product.productModule.service.IProductModuleService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 工单管理下面的产品模块 + * @Author: jeecg-boot + * @Date: 2023-01-05 + * @Version: V1.0 + */ +@Service +public class ProductModuleServiceImpl extends ServiceImpl implements IProductModuleService { + +}