diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessAccessoriesDataList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessAccessoriesDataList.vue
new file mode 100644
index 00000000..1b2b0598
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessAccessoriesDataList.vue
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+
+ handleDelete(record.id)">
+ 删除
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessAccessoriesList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessAccessoriesList.vue
new file mode 100644
index 00000000..53de1e5c
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessAccessoriesList.vue
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 制定计划面料
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue
index a4c1e758..f0141f6d 100644
--- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue
+++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue
@@ -110,7 +110,7 @@ export default {
popupCode: 'zy_process',
field: 'id,process_code,process_name,process_describe',
orgFields: 'id,process_code,process_name,process_describe',
- destFields: 'popup,id,popup_process_name,popup_process_describe',
+ destFields: 'proProcess,process_code,process_name,process_describe',
},
// {
// key: 'proProcess',
@@ -127,7 +127,7 @@ export default {
popupCode: 'zy_process',
field: 'id,process_code,process_name,process_describe',
orgFields: 'id,process_code,process_name,process_describe',
- destFields: 'popup,id,popup_process_name,popup_process_describe',
+ destFields: 'postProcess,process_code,process_name,process_describe',
},
{key: 'inputProduct', title: '输入产品', width: '150', type: JVXETypes.input},
{key: 'semiProduct', title: '成品/半成品', width: '150', type: JVXETypes.input},
diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessFabricDataList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessFabricDataList.vue
new file mode 100644
index 00000000..d7bec52e
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessFabricDataList.vue
@@ -0,0 +1,196 @@
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+
+ handleDelete(record.id)">
+ 删除
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessFabricList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessFabricList.vue
new file mode 100644
index 00000000..f8279069
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessFabricList.vue
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
新增
+
导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 制定计划面料
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanAccessoriesForm.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanAccessoriesForm.vue
index d032f7c4..6b6bd2d0 100644
--- a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanAccessoriesForm.vue
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanAccessoriesForm.vue
@@ -52,7 +52,7 @@ export default {
confirmLoading: false,
validatorRules: {
accessoriesId: [
- {required: true, message: "面料不能为空"},
+ {required: true, message: "辅料不能为空"},
],
amount: [
{required: true, message: "用量不能不空"},
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesForm.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesForm.vue
new file mode 100644
index 00000000..146eab2b
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesForm.vue
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesForm2.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesForm2.vue
new file mode 100644
index 00000000..1c23b6da
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesForm2.vue
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesModal.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesModal.vue
new file mode 100644
index 00000000..ef40a829
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesModal.vue
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesModal2.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesModal2.vue
new file mode 100644
index 00000000..f4f8e8b2
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesModal2.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesModal__Style#Drawer.vue
new file mode 100644
index 00000000..b03603a5
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessAccessoriesModal__Style#Drawer.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricForm.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricForm.vue
new file mode 100644
index 00000000..6ac265af
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricForm.vue
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricForm2.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricForm2.vue
new file mode 100644
index 00000000..3f825810
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricForm2.vue
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricModal.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricModal.vue
new file mode 100644
index 00000000..33c75c9a
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricModal.vue
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricModal2.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricModal2.vue
new file mode 100644
index 00000000..36f13299
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricModal2.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricModal__Style#Drawer.vue
new file mode 100644
index 00000000..25c63107
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessFabricModal__Style#Drawer.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue
index ec5597e6..c442ed61 100644
--- a/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue
@@ -20,7 +20,7 @@
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessAccessoriesController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessAccessoriesController.java
new file mode 100644
index 00000000..bbb49bb3
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessAccessoriesController.java
@@ -0,0 +1,200 @@
+package org.jeecg.modules.productplan.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+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.exception.JeecgBootException;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.productplan.entity.ZyPlanProcess;
+import org.jeecg.modules.productplan.entity.ZyPlanProcessAccessories;
+import org.jeecg.modules.productplan.entity.ZyProductPlan;
+import org.jeecg.modules.productplan.service.IZyPlanProcessAccessoriesService;
+import org.jeecg.modules.productplan.service.IZyPlanProcessService;
+import org.jeecg.modules.productplan.service.IZyProductPlanService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ObjectUtils;
+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;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @Description: 计划工序辅料管理
+ * @Author: jeecg-boot
+ * @Date: 2023-01-10
+ * @Version: V1.0
+ */
+@Api(tags = "计划工序辅料管理")
+@RestController
+@RequestMapping("/org.jeecg.modules.productplan/zyPlanProcessAccessories")
+@Slf4j
+public class ZyPlanProcessAccessoriesController extends JeecgController {
+ @Autowired
+ private IZyPlanProcessAccessoriesService zyPlanProcessAccessoriesService;
+
+ @Autowired
+ private IZyPlanProcessService iZyPlanProcessService;
+
+ @Autowired
+ private IZyProductPlanService iZyProductPlanService;
+
+ /**
+ * 分页列表查询
+ *
+ * @param zyPlanProcessAccessories
+ * @param pageNo
+ * @param pageSize
+ * @param req
+ * @return
+ */
+ @AutoLog(value = "计划工序辅料管理-分页列表查询")
+ @ApiOperation(value = "计划工序辅料管理-分页列表查询", notes = "计划工序辅料管理-分页列表查询")
+ @GetMapping(value = "/list")
+ public Result> queryPageList(ZyPlanProcessAccessories zyPlanProcessAccessories,
+ @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+ HttpServletRequest req) {
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcessAccessories, req.getParameterMap());
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = zyPlanProcessAccessoriesService.page(page, queryWrapper);
+ List records = pageList.getRecords();
+ if (!ObjectUtils.isEmpty(records)) {
+ records.forEach(e -> {
+ ZyPlanProcess zyPlanProcess = iZyPlanProcessService.getById(e.getPlanProcessId());
+ if (!ObjectUtils.isEmpty(zyPlanProcess)) {
+ e.setPlanId(zyPlanProcess.getPlanId());
+ }
+ });
+ }
+ return Result.OK(pageList);
+ }
+
+ @ApiOperation(value = "计划工序辅料管理-添加", notes = "计划工序辅料管理-添加")
+ @PostMapping(value = "/saveBatch")
+ public Result> saveBatch(@RequestBody ZyPlanProcessAccessories zyPlanProcessAccessories) {
+ ZyProductPlan zyProductPlan = iZyProductPlanService.getById(zyPlanProcessAccessories.getPlanId());
+ if (ObjectUtils.isEmpty(zyProductPlan))
+ throw new JeecgBootException(zyPlanProcessAccessories.getPlanId() + "-生产计划不存在");
+
+ List addList = new LinkedList<>();
+ List processList = iZyPlanProcessService.list(new LambdaQueryWrapper().eq(ZyPlanProcess::getPlanId, zyPlanProcessAccessories.getPlanId()));
+ if (!ObjectUtils.isEmpty(processList)) {
+ processList.forEach(e -> {
+ ZyPlanProcessAccessories en = new ZyPlanProcessAccessories();
+ en.setPlanProcessId(e.getId());
+ addList.add(en);
+ });
+ }
+ zyPlanProcessAccessoriesService.saveBatch(addList);
+ return Result.OK("添加成功!");
+ }
+
+ /**
+ * 添加
+ *
+ * @param zyPlanProcessAccessories
+ * @return
+ */
+ @AutoLog(value = "计划工序辅料管理-添加")
+ @ApiOperation(value = "计划工序辅料管理-添加", notes = "计划工序辅料管理-添加")
+ @PostMapping(value = "/add")
+ public Result> add(@RequestBody ZyPlanProcessAccessories zyPlanProcessAccessories) {
+ zyPlanProcessAccessoriesService.save(zyPlanProcessAccessories);
+ return Result.OK("添加成功!");
+ }
+
+ /**
+ * 编辑
+ *
+ * @param zyPlanProcessAccessories
+ * @return
+ */
+ @AutoLog(value = "计划工序辅料管理-编辑")
+ @ApiOperation(value = "计划工序辅料管理-编辑", notes = "计划工序辅料管理-编辑")
+ @PutMapping(value = "/edit")
+ public Result> edit(@RequestBody ZyPlanProcessAccessories zyPlanProcessAccessories) {
+ zyPlanProcessAccessoriesService.updateById(zyPlanProcessAccessories);
+ 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) {
+ zyPlanProcessAccessoriesService.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.zyPlanProcessAccessoriesService.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) {
+ ZyPlanProcessAccessories zyPlanProcessAccessories = zyPlanProcessAccessoriesService.getById(id);
+ if (zyPlanProcessAccessories == null) {
+ return Result.error("未找到对应数据");
+ }
+ return Result.OK(zyPlanProcessAccessories);
+ }
+
+ /**
+ * 导出excel
+ *
+ * @param request
+ * @param zyPlanProcessAccessories
+ */
+ @RequestMapping(value = "/exportXls")
+ public ModelAndView exportXls(HttpServletRequest request, ZyPlanProcessAccessories zyPlanProcessAccessories) {
+ return super.exportXls(request, zyPlanProcessAccessories, ZyPlanProcessAccessories.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, ZyPlanProcessAccessories.class);
+ }
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessFabricController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessFabricController.java
new file mode 100644
index 00000000..edd78ba4
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessFabricController.java
@@ -0,0 +1,202 @@
+package org.jeecg.modules.productplan.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+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.exception.JeecgBootException;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.productplan.entity.ZyPlanProcess;
+import org.jeecg.modules.productplan.entity.ZyPlanProcessFabric;
+import org.jeecg.modules.productplan.entity.ZyProductPlan;
+import org.jeecg.modules.productplan.service.IZyPlanProcessFabricService;
+import org.jeecg.modules.productplan.service.IZyPlanProcessService;
+import org.jeecg.modules.productplan.service.IZyProductPlanService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ObjectUtils;
+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;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @Description: 计划工序面料管理
+ * @Author: jeecg-boot
+ * @Date: 2023-01-09
+ * @Version: V1.0
+ */
+@Api(tags = "计划工序面料管理")
+@RestController
+@RequestMapping("/org.jeecg.modules.productplan/zyPlanProcessFabric")
+@Slf4j
+public class ZyPlanProcessFabricController extends JeecgController {
+ @Autowired
+ private IZyPlanProcessFabricService zyPlanProcessFabricService;
+
+ @Autowired
+ private IZyPlanProcessService iZyPlanProcessService;
+
+ @Autowired
+ private IZyProductPlanService iZyProductPlanService;
+
+
+ /**
+ * 分页列表查询
+ *
+ * @param zyPlanProcessFabric
+ * @param pageNo
+ * @param pageSize
+ * @param req
+ * @return
+ */
+ @AutoLog(value = "计划工序面料管理-分页列表查询")
+ @ApiOperation(value = "计划工序面料管理-分页列表查询", notes = "计划工序面料管理-分页列表查询")
+ @GetMapping(value = "/list")
+ public Result> queryPageList(ZyPlanProcessFabric zyPlanProcessFabric,
+ @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+ HttpServletRequest req) {
+
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcessFabric, req.getParameterMap());
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = zyPlanProcessFabricService.page(page, queryWrapper);
+ List records = pageList.getRecords();
+ if (!ObjectUtils.isEmpty(records)) {
+ records.forEach(e -> {
+ ZyPlanProcess zyPlanProcess = iZyPlanProcessService.getById(e.getPlanProcessId());
+ if (!ObjectUtils.isEmpty(zyPlanProcess)) {
+ e.setPlanId(zyPlanProcess.getPlanId());
+ }
+ });
+ //按planid排序
+// Collections.sort(records, Comparator.comparing(ZyPlanProcessFabric::getPlanId));
+ }
+ return Result.OK(pageList);
+ }
+
+ /**
+ * 添加
+ *
+ * @param zyPlanProcessFabric
+ * @return
+ */
+ @ApiOperation(value = "计划工序面料管理-添加", notes = "计划工序面料管理-添加")
+ @PostMapping(value = "/saveBatch")
+ public Result> saveBatch(@RequestBody ZyPlanProcessFabric zyPlanProcessFabric) {
+ ZyProductPlan zyProductPlan = iZyProductPlanService.getById(zyPlanProcessFabric.getPlanId());
+ if (ObjectUtils.isEmpty(zyProductPlan))
+ throw new JeecgBootException(zyPlanProcessFabric.getPlanId() + "-生产计划不存在");
+
+ List addList = new LinkedList<>();
+ List processList = iZyPlanProcessService.list(new LambdaQueryWrapper().eq(ZyPlanProcess::getPlanId, zyPlanProcessFabric.getPlanId()));
+ if (!ObjectUtils.isEmpty(processList)) {
+ processList.forEach(e -> {
+ ZyPlanProcessFabric en = new ZyPlanProcessFabric();
+ en.setPlanProcessId(e.getId());
+ addList.add(en);
+ });
+ }
+ zyPlanProcessFabricService.saveBatch(addList);
+ return Result.OK("添加成功!");
+ }
+
+ @ApiOperation(value = "计划工序面料管理-添加", notes = "计划工序面料管理-添加")
+ @PostMapping(value = "/add")
+ public Result> add(@RequestBody ZyPlanProcessFabric zyPlanProcessFabric) {
+ zyPlanProcessFabricService.save(zyPlanProcessFabric);
+ return Result.OK("添加成功!");
+ }
+
+ /**
+ * 编辑
+ *
+ * @param zyPlanProcessFabric
+ * @return
+ */
+ @AutoLog(value = "计划工序面料管理-编辑")
+ @ApiOperation(value = "计划工序面料管理-编辑", notes = "计划工序面料管理-编辑")
+ @PutMapping(value = "/edit")
+ public Result> edit(@RequestBody ZyPlanProcessFabric zyPlanProcessFabric) {
+ zyPlanProcessFabricService.updateById(zyPlanProcessFabric);
+ 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) {
+ zyPlanProcessFabricService.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.zyPlanProcessFabricService.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) {
+ ZyPlanProcessFabric zyPlanProcessFabric = zyPlanProcessFabricService.getById(id);
+ if (zyPlanProcessFabric == null) {
+ return Result.error("未找到对应数据");
+ }
+ return Result.OK(zyPlanProcessFabric);
+ }
+
+ /**
+ * 导出excel
+ *
+ * @param request
+ * @param zyPlanProcessFabric
+ */
+ @RequestMapping(value = "/exportXls")
+ public ModelAndView exportXls(HttpServletRequest request, ZyPlanProcessFabric zyPlanProcessFabric) {
+ return super.exportXls(request, zyPlanProcessFabric, ZyPlanProcessFabric.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, ZyPlanProcessFabric.class);
+ }
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcessAccessories.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcessAccessories.java
new file mode 100644
index 00000000..9454b84e
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcessAccessories.java
@@ -0,0 +1,88 @@
+package org.jeecg.modules.productplan.entity;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 计划工序辅料管理
+ * @Author: jeecg-boot
+ * @Date: 2023-01-10
+ * @Version: V1.0
+ */
+@Data
+@TableName("zy_plan_process_accessories")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "zy_plan_process_accessories对象", description = "计划工序辅料管理")
+public class ZyPlanProcessAccessories 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 planProcessId;
+ /**
+ * 辅料id
+ */
+ @Excel(name = "辅料id", width = 15)
+ @ApiModelProperty(value = "辅料id")
+ @Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id")
+ private String accessoriesId;
+ /**
+ * 用量
+ */
+ @Excel(name = "用量", width = 15)
+ @ApiModelProperty(value = "用量")
+ private BigDecimal amount;
+
+ @TableField(exist = false)
+ private String planId;
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcessFabric.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcessFabric.java
new file mode 100644
index 00000000..3d8cbf05
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcessFabric.java
@@ -0,0 +1,89 @@
+package org.jeecg.modules.productplan.entity;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 计划工序面料管理
+ * @Author: jeecg-boot
+ * @Date: 2023-01-09
+ * @Version: V1.0
+ */
+@Data
+@TableName("zy_plan_process_fabric")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "zy_plan_process_fabric对象", description = "计划工序面料管理")
+public class ZyPlanProcessFabric 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 planProcessId;
+ /**
+ * 面料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;
+
+ @TableField(exist = false)
+ private String planId;
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanProcessAccessoriesMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanProcessAccessoriesMapper.java
new file mode 100644
index 00000000..e37aac07
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanProcessAccessoriesMapper.java
@@ -0,0 +1,15 @@
+package org.jeecg.modules.productplan.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.productplan.entity.ZyPlanProcessAccessories;
+
+/**
+ * @Description: 计划工序辅料管理
+ * @Author: jeecg-boot
+ * @Date: 2023-01-10
+ * @Version: V1.0
+ */
+public interface ZyPlanProcessAccessoriesMapper extends BaseMapper {
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanProcessFabricMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanProcessFabricMapper.java
new file mode 100644
index 00000000..1b11be2b
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanProcessFabricMapper.java
@@ -0,0 +1,15 @@
+package org.jeecg.modules.productplan.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.productplan.entity.ZyPlanProcessFabric;
+
+/**
+ * @Description: 计划工序面料管理
+ * @Author: jeecg-boot
+ * @Date: 2023-01-09
+ * @Version: V1.0
+ */
+public interface ZyPlanProcessFabricMapper extends BaseMapper {
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessAccessoriesService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessAccessoriesService.java
new file mode 100644
index 00000000..8dd66eab
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessAccessoriesService.java
@@ -0,0 +1,15 @@
+package org.jeecg.modules.productplan.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.productplan.entity.ZyPlanProcessAccessories;
+
+/**
+ * @Description: 计划工序辅料管理
+ * @Author: jeecg-boot
+ * @Date: 2023-01-10
+ * @Version: V1.0
+ */
+public interface IZyPlanProcessAccessoriesService extends IService {
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessFabricService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessFabricService.java
new file mode 100644
index 00000000..d34f6087
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessFabricService.java
@@ -0,0 +1,15 @@
+package org.jeecg.modules.productplan.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.productplan.entity.ZyPlanProcessFabric;
+
+/**
+ * @Description: 计划工序面料管理
+ * @Author: jeecg-boot
+ * @Date: 2023-01-09
+ * @Version: V1.0
+ */
+public interface IZyPlanProcessFabricService extends IService {
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessAccessoriesServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessAccessoriesServiceImpl.java
new file mode 100644
index 00000000..35a93975
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessAccessoriesServiceImpl.java
@@ -0,0 +1,20 @@
+package org.jeecg.modules.productplan.service.impl;
+
+
+import org.jeecg.modules.productplan.entity.ZyPlanProcessAccessories;
+import org.jeecg.modules.productplan.mapper.ZyPlanProcessAccessoriesMapper;
+import org.jeecg.modules.productplan.service.IZyPlanProcessAccessoriesService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 计划工序辅料管理
+ * @Author: jeecg-boot
+ * @Date: 2023-01-10
+ * @Version: V1.0
+ */
+@Service
+public class ZyPlanProcessAccessoriesServiceImpl extends ServiceImpl implements IZyPlanProcessAccessoriesService {
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessFabricServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessFabricServiceImpl.java
new file mode 100644
index 00000000..f3f231f3
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessFabricServiceImpl.java
@@ -0,0 +1,19 @@
+package org.jeecg.modules.productplan.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.productplan.entity.ZyPlanProcessFabric;
+import org.jeecg.modules.productplan.mapper.ZyPlanProcessFabricMapper;
+import org.jeecg.modules.productplan.service.IZyPlanProcessFabricService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: 计划工序面料管理
+ * @Author: jeecg-boot
+ * @Date: 2023-01-09
+ * @Version: V1.0
+ */
+@Service
+public class ZyPlanProcessFabricServiceImpl extends ServiceImpl implements IZyPlanProcessFabricService {
+
+}