diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue new file mode 100644 index 00000000..3b922cb1 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue @@ -0,0 +1,194 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java new file mode 100644 index 00000000..e9bbe83d --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java @@ -0,0 +1,155 @@ +package org.jeecg.modules.demo.base.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.demo.base.entity.ZyClothsModularCompent; +import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService; +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: 2022-11-11 + * @Version: V1.0 + */ +@Api(tags = "制衣模块部件中间表") +@RestController +@RequestMapping("/base/zyClothsModularCompent") +@Slf4j +public class ZyClothsModularCompentController extends JeecgController { + @Autowired + private IZyClothsModularCompentService zyClothsModularCompentService; + + /** + * 分页列表查询 + * + * @param zyClothsModularCompent + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "制衣模块部件中间表-分页列表查询") + @ApiOperation(value = "制衣模块部件中间表-分页列表查询", notes = "制衣模块部件中间表-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(ZyClothsModularCompent zyClothsModularCompent, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyClothsModularCompent, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = zyClothsModularCompentService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param zyClothsModularCompent + * @return + */ + @AutoLog(value = "制衣模块部件中间表-添加") + @ApiOperation(value = "制衣模块部件中间表-添加", notes = "制衣模块部件中间表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody ZyClothsModularCompent zyClothsModularCompent) { + zyClothsModularCompentService.save(zyClothsModularCompent); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param zyClothsModularCompent + * @return + */ + @AutoLog(value = "制衣模块部件中间表-编辑") + @ApiOperation(value = "制衣模块部件中间表-编辑", notes = "制衣模块部件中间表-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody ZyClothsModularCompent zyClothsModularCompent) { + zyClothsModularCompentService.updateById(zyClothsModularCompent); + 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) { + zyClothsModularCompentService.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.zyClothsModularCompentService.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) { + ZyClothsModularCompent zyClothsModularCompent = zyClothsModularCompentService.getById(id); + if (zyClothsModularCompent == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(zyClothsModularCompent); + } + + /** + * 导出excel + * + * @param request + * @param zyClothsModularCompent + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ZyClothsModularCompent zyClothsModularCompent) { + return super.exportXls(request, zyClothsModularCompent, ZyClothsModularCompent.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, ZyClothsModularCompent.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java new file mode 100644 index 00000000..5fd47f56 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java @@ -0,0 +1,73 @@ +package org.jeecg.modules.demo.base.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-11 + * @Version: V1.0 + */ +@Data +@TableName("zy_cloths_modular_compent") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="zy_cloths_modular_compent对象", description="制衣模块部件中间表") +public class ZyClothsModularCompent 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; + /**编码*/ + @Excel(name = "编码", width = 15) + @ApiModelProperty(value = "编码") + private String nums; + /**部件名称*/ + @Excel(name = "部件名称", width = 15) + @ApiModelProperty(value = "部件名称") + private String partsName; + /**制衣模块类型*/ + @Excel(name = "制衣模块类型", width = 15) + @ApiModelProperty(value = "制衣模块类型") + private String modularType; + /**部件id*/ + @Excel(name = "部件id", width = 15) + @ApiModelProperty(value = "部件id") + private String componentId; +} diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsModularCompentMapper.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsModularCompentMapper.java new file mode 100644 index 00000000..0dc4786e --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsModularCompentMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.base.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 制衣模块部件中间表 + * @Author: jeecg-boot + * @Date: 2022-11-11 + * @Version: V1.0 + */ +public interface ZyClothsModularCompentMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsModularCompentMapper.xml b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsModularCompentMapper.xml new file mode 100644 index 00000000..a753adb6 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsModularCompentMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsModularCompentService.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsModularCompentService.java new file mode 100644 index 00000000..297e0283 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsModularCompentService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.base.service; + +import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 制衣模块部件中间表 + * @Author: jeecg-boot + * @Date: 2022-11-11 + * @Version: V1.0 + */ +public interface IZyClothsModularCompentService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularCompentServiceImpl.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularCompentServiceImpl.java new file mode 100644 index 00000000..33d4caaf --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularCompentServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.base.service.impl; + +import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent; +import org.jeecg.modules.demo.base.mapper.ZyClothsModularCompentMapper; +import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 制衣模块部件中间表 + * @Author: jeecg-boot + * @Date: 2022-11-11 + * @Version: V1.0 + */ +@Service +public class ZyClothsModularCompentServiceImpl extends ServiceImpl implements IZyClothsModularCompentService { + +}