From 8c4e1eff6eb97eb6238b429fa90c23630187b13e Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Tue, 20 Dec 2022 17:56:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=8F=AD=E7=BB=84=E7=AE=A1?= =?UTF-8?q?=E7=90=86=2012.20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productplan/ZyPlanFabricDataList.vue | 226 ++++++++++++++++++ .../views/productplan/ZyPlanFabricList.vue | 198 +++++++++++++++ .../views/productplan/ZyPlanProcessList.vue | 4 +- .../productplan/modules/ZyPlanFabricForm.vue | 126 ++++++++++ .../productplan/modules/ZyPlanFabricForm2.vue | 106 ++++++++ .../productplan/modules/ZyPlanFabricModal.vue | 70 ++++++ .../modules/ZyPlanFabricModal2.vue | 60 +++++ .../ZyPlanFabricModal__Style#Drawer.vue | 84 +++++++ .../controller/ZyPlanFabricController.java | 152 ++++++++++++ .../productplan/entity/ZyPlanFabric.java | 85 +++++++ .../mapper/ZyPlanFabricMapper.java | 14 ++ .../service/IZyPlanFabricService.java | 15 ++ .../service/impl/ZyPlanFabricServiceImpl.java | 20 ++ 13 files changed, 1158 insertions(+), 2 deletions(-) create mode 100644 ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricDataList.vue create mode 100644 ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricList.vue create mode 100644 ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm.vue create mode 100644 ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm2.vue create mode 100644 ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal.vue create mode 100644 ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal2.vue create mode 100644 ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal__Style#Drawer.vue create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanFabricController.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanFabricMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanFabricService.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanFabricServiceImpl.java diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricDataList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricDataList.vue new file mode 100644 index 00000000..0f262def --- /dev/null +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricDataList.vue @@ -0,0 +1,226 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricList.vue new file mode 100644 index 00000000..7e32c097 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricList.vue @@ -0,0 +1,198 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue index d5812940..ed51932f 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue @@ -174,8 +174,8 @@ export default { { title: '成员', align: "center", - dataIndex: 'userIds', - scopedSlots: {customRender: 'userIds'} + dataIndex: 'userIds_dictText', + scopedSlots: {customRender: 'userIds_dictText'} }, { title: '操作', diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm.vue new file mode 100644 index 00000000..beaa6e8b --- /dev/null +++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm.vue @@ -0,0 +1,126 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm2.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm2.vue new file mode 100644 index 00000000..3932857c --- /dev/null +++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm2.vue @@ -0,0 +1,106 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal.vue new file mode 100644 index 00000000..48affde0 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal2.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal2.vue new file mode 100644 index 00000000..df3f8031 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal2.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal__Style#Drawer.vue new file mode 100644 index 00000000..6b6c6bd4 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal__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/productplan/controller/ZyPlanFabricController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanFabricController.java new file mode 100644 index 00000000..c7427804 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanFabricController.java @@ -0,0 +1,152 @@ +package org.jeecg.modules.productplan.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.productplan.entity.ZyPlanFabric; +import org.jeecg.modules.productplan.service.IZyPlanFabricService; +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-12-20 + * @Version: V1.0 + */ +@Api(tags = "计划面料表") +@RestController +@RequestMapping("/org.jeecg.modules.productplan/zyPlanFabric") +@Slf4j +public class ZyPlanFabricController extends JeecgController { + @Autowired + private IZyPlanFabricService zyPlanFabricService; + + /** + * 分页列表查询 + * + * @param zyPlanFabric + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "计划面料表-分页列表查询") + @ApiOperation(value = "计划面料表-分页列表查询", notes = "计划面料表-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(ZyPlanFabric zyPlanFabric, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyPlanFabric, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = zyPlanFabricService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param zyPlanFabric + * @return + */ + @AutoLog(value = "计划面料表-添加") + @ApiOperation(value = "计划面料表-添加", notes = "计划面料表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody ZyPlanFabric zyPlanFabric) { + zyPlanFabricService.save(zyPlanFabric); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param zyPlanFabric + * @return + */ + @AutoLog(value = "计划面料表-编辑") + @ApiOperation(value = "计划面料表-编辑", notes = "计划面料表-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody ZyPlanFabric zyPlanFabric) { + zyPlanFabricService.updateById(zyPlanFabric); + 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) { + zyPlanFabricService.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.zyPlanFabricService.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) { + ZyPlanFabric zyPlanFabric = zyPlanFabricService.getById(id); + if (zyPlanFabric == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(zyPlanFabric); + } + + /** + * 导出excel + * + * @param request + * @param zyPlanFabric + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ZyPlanFabric zyPlanFabric) { + return super.exportXls(request, zyPlanFabric, ZyPlanFabric.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, ZyPlanFabric.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java new file mode 100644 index 00000000..cc008a9f --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java @@ -0,0 +1,85 @@ +package org.jeecg.modules.productplan.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-12-20 + * @Version: V1.0 + */ +@Data +@TableName("zy_plan_fabric") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "zy_plan_fabric对象", description = "计划面料表") +public class ZyPlanFabric 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; + /** + * 计划id + */ + @Excel(name = "计划id", width = 15) + @ApiModelProperty(value = "计划id") + private String planId; + /** + * 面料id + */ + @Excel(name = "面料id", width = 15) + @ApiModelProperty(value = "面料id") + @Dict(dictTable = "zy_fabric", dicText = "name", dicCode = "id") + private String fabricId; + /** + * 用量(合计) + */ + @Excel(name = "用量(合计)", width = 15) + @ApiModelProperty(value = "用量(合计)") + private BigDecimal amount; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanFabricMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanFabricMapper.java new file mode 100644 index 00000000..ce6cda6f --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanFabricMapper.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.productplan.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.productplan.entity.ZyPlanFabric; + +/** + * @Description: 计划面料表 + * @Author: jeecg-boot + * @Date: 2022-12-20 + * @Version: V1.0 + */ +public interface ZyPlanFabricMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanFabricService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanFabricService.java new file mode 100644 index 00000000..9fe7ec46 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanFabricService.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.productplan.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.productplan.entity.ZyPlanFabric; + +/** + * @Description: 计划面料表 + * @Author: jeecg-boot + * @Date: 2022-12-20 + * @Version: V1.0 + */ +public interface IZyPlanFabricService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanFabricServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanFabricServiceImpl.java new file mode 100644 index 00000000..066d3c83 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanFabricServiceImpl.java @@ -0,0 +1,20 @@ +package org.jeecg.modules.productplan.service.impl; + + +import org.jeecg.modules.productplan.entity.ZyPlanFabric; +import org.jeecg.modules.productplan.mapper.ZyPlanFabricMapper; +import org.jeecg.modules.productplan.service.IZyPlanFabricService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 计划面料表 + * @Author: jeecg-boot + * @Date: 2022-12-20 + * @Version: V1.0 + */ +@Service +public class ZyPlanFabricServiceImpl extends ServiceImpl implements IZyPlanFabricService { + +}