From 7367cd921dff73d1bd86d47f02b2f03e06f3707d Mon Sep 17 00:00:00 2001 From: mors <3067699729@qq.com> Date: Mon, 14 Nov 2022 22:37:07 +0800 Subject: [PATCH] 2022-11-14 --- .../zystylemodular/ZyStyleModularList.vue | 177 ++++++++++++++++++ .../modules/ZyStyleModularForm.vue | 109 +++++++++++ .../modules/ZyStyleModularModal.vue | 60 ++++++ .../ZyStyleModularModal__Style#Drawer.vue | 84 +++++++++ .../controller/ZyStyleModularController.java | 171 +++++++++++++++++ .../zyStyleModular/entity/ZyStyleModular.java | 65 +++++++ .../mapper/ZyStyleModularMapper.java | 17 ++ .../mapper/xml/ZyStyleModularMapper.xml | 5 + .../service/IZyStyleModularService.java | 14 ++ .../impl/ZyStyleModularServiceImpl.java | 19 ++ 10 files changed, 721 insertions(+) create mode 100644 ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue create mode 100644 ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularForm.vue create mode 100644 ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal.vue create mode 100644 ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal__Style#Drawer.vue create mode 100644 jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java create mode 100644 jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java create mode 100644 jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/xml/ZyStyleModularMapper.xml create mode 100644 jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/IZyStyleModularService.java create mode 100644 jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java diff --git a/ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue b/ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue new file mode 100644 index 00000000..3f8ffb08 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue @@ -0,0 +1,177 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularForm.vue b/ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularForm.vue new file mode 100644 index 00000000..9b0613e2 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularForm.vue @@ -0,0 +1,109 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal.vue b/ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal.vue new file mode 100644 index 00000000..2a25cefc --- /dev/null +++ b/ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal__Style#Drawer.vue new file mode 100644 index 00000000..594f2ddb --- /dev/null +++ b/ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java new file mode 100644 index 00000000..cecfd2fb --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.demo.zyStyleModular.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular; +import org.jeecg.modules.demo.zyStyleModular.service.IZyStyleModularService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 款式工序表 + * @Author: jeecg-boot + * @Date: 2022-11-14 + * @Version: V1.0 + */ +@Api(tags="款式工序表") +@RestController +@RequestMapping("/zyStyleModular/zyStyleModular") +@Slf4j +public class ZyStyleModularController extends JeecgController { + @Autowired + private IZyStyleModularService zyStyleModularService; + + /** + * 分页列表查询 + * + * @param zyStyleModular + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "款式工序表-分页列表查询") + @ApiOperation(value="款式工序表-分页列表查询", notes="款式工序表-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(ZyStyleModular zyStyleModular, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModular, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = zyStyleModularService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param zyStyleModular + * @return + */ + @AutoLog(value = "款式工序表-添加") + @ApiOperation(value="款式工序表-添加", notes="款式工序表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody ZyStyleModular zyStyleModular) { + zyStyleModularService.save(zyStyleModular); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param zyStyleModular + * @return + */ + @AutoLog(value = "款式工序表-编辑") + @ApiOperation(value="款式工序表-编辑", notes="款式工序表-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody ZyStyleModular zyStyleModular) { + zyStyleModularService.updateById(zyStyleModular); + 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) { + zyStyleModularService.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.zyStyleModularService.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) { + ZyStyleModular zyStyleModular = zyStyleModularService.getById(id); + if(zyStyleModular==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(zyStyleModular); + } + + /** + * 导出excel + * + * @param request + * @param zyStyleModular + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ZyStyleModular zyStyleModular) { + return super.exportXls(request, zyStyleModular, ZyStyleModular.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, ZyStyleModular.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java new file mode 100644 index 00000000..d637f198 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java @@ -0,0 +1,65 @@ +package org.jeecg.modules.demo.zyStyleModular.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: 2022-11-14 + * @Version: V1.0 + */ +@Data +@TableName("zy_style_modular") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="zy_style_modular对象", description="款式工序表") +public class ZyStyleModular 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 styleId; + /**工序id*/ + @Excel(name = "工序id", width = 15) + @ApiModelProperty(value = "工序id") + private String processId; +} diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java new file mode 100644 index 00000000..fb4dc6a0 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.zyStyleModular.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 款式工序表 + * @Author: jeecg-boot + * @Date: 2022-11-14 + * @Version: V1.0 + */ +public interface ZyStyleModularMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/xml/ZyStyleModularMapper.xml b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/xml/ZyStyleModularMapper.xml new file mode 100644 index 00000000..d5e9ff86 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/xml/ZyStyleModularMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/IZyStyleModularService.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/IZyStyleModularService.java new file mode 100644 index 00000000..0eff4298 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/IZyStyleModularService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.zyStyleModular.service; + +import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 款式工序表 + * @Author: jeecg-boot + * @Date: 2022-11-14 + * @Version: V1.0 + */ +public interface IZyStyleModularService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java new file mode 100644 index 00000000..272cfaea --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.zyStyleModular.service.impl; + +import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular; +import org.jeecg.modules.demo.zyStyleModular.mapper.ZyStyleModularMapper; +import org.jeecg.modules.demo.zyStyleModular.service.IZyStyleModularService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 款式工序表 + * @Author: jeecg-boot + * @Date: 2022-11-14 + * @Version: V1.0 + */ +@Service +public class ZyStyleModularServiceImpl extends ServiceImpl implements IZyStyleModularService { + +}