From 414de9e193f23e063be6c908640f2ac1d7c78355 Mon Sep 17 00:00:00 2001 From: lenovo <123> Date: Wed, 7 Sep 2022 18:40:39 +0800 Subject: [PATCH] 20220907-data --- .../base/controller/ZyProcessController.java | 26 ++++++++++++++++--- .../demo/base/entity/ZyAllProcess.java | 16 ++++++++++++ .../demo/pro/entity/ZyProcessAccessories.java | 3 +++ .../demo/pro/entity/ZyProcessAction.java | 3 +++ .../demo/pro/entity/ZyProcessFabric.java | 2 ++ .../mapper/ZyProcessAccessoriesMapper.java | 3 +++ .../pro/mapper/ZyProcessActionMapper.java | 2 ++ .../pro/mapper/ZyProcessFabricMapper.java | 3 +++ .../service/IZyProcessAccessoriesService.java | 4 +++ .../pro/service/IZyProcessActionService.java | 2 ++ .../pro/service/IZyProcessFabricService.java | 4 +++ .../impl/ZyProcessAccessoriesServiceImpl.java | 7 +++++ .../impl/ZyProcessActionServiceImpl.java | 5 ++++ .../impl/ZyProcessFabricServiceImpl.java | 7 +++++ 14 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyAllProcess.java diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java index 76713b5d..7f9d8cd5 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java @@ -12,6 +12,7 @@ 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.base.entity.ZyAllProcess; import org.jeecg.modules.demo.base.entity.ZyProcess; import org.jeecg.modules.demo.base.entity.vo.ZyClothActionVo; import org.jeecg.modules.demo.base.service.IZyProcessService; @@ -21,8 +22,15 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; +import org.jeecg.modules.demo.pro.entity.ZyProcessAccessories; import org.jeecg.modules.demo.pro.entity.ZyProcessAction; +import org.jeecg.modules.demo.pro.entity.ZyProcessFabric; +import org.jeecg.modules.demo.pro.mapper.ZyProcessAccessoriesMapper; +import org.jeecg.modules.demo.pro.mapper.ZyProcessActionMapper; +import org.jeecg.modules.demo.pro.mapper.ZyProcessFabricMapper; +import org.jeecg.modules.demo.pro.service.IZyProcessAccessoriesService; import org.jeecg.modules.demo.pro.service.IZyProcessActionService; +import org.jeecg.modules.demo.pro.service.IZyProcessFabricService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; @@ -52,8 +60,12 @@ import org.jeecg.common.aspect.annotation.AutoLog; public class ZyProcessController extends JeecgController { @Autowired private IZyProcessService zyProcessService; - @Autowired + @Autowired + IZyProcessAccessoriesService zyProcessAccessoriesService; + @Autowired IZyProcessActionService zyProcessActionService; + @Autowired + IZyProcessFabricService zyProcessFabricService; /** * 分页列表查询 * @@ -144,10 +156,18 @@ public class ZyProcessController extends JeecgController queryById(@RequestParam(name="id",required=true) String id) { ZyProcess zyProcess=zyProcessService.selectZyprocess(id); - if(zyProcess==null) { + List pageList=zyProcessAccessoriesService.selectByid(id); + List pageList1=zyProcessActionService.selectByid(id); + List pageList2=zyProcessFabricService.selectByid(id); + ZyAllProcess zyAllProcess=new ZyAllProcess(); + zyAllProcess.setZyProcess(zyProcess); + zyAllProcess.setZyProcessAction(pageList1); + zyAllProcess.setZyProcessAccessories(pageList); + zyAllProcess.setZyProcessFabric(pageList2); + if(zyAllProcess==null) { return Result.error("未找到对应数据"); } - return Result.OK(zyProcess); + return Result.OK(zyAllProcess); } /** diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyAllProcess.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyAllProcess.java new file mode 100644 index 00000000..0f6a3a1c --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyAllProcess.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.demo.base.entity; + +import lombok.Data; +import org.jeecg.modules.demo.pro.entity.ZyProcessAccessories; +import org.jeecg.modules.demo.pro.entity.ZyProcessAction; +import org.jeecg.modules.demo.pro.entity.ZyProcessFabric; + +import java.util.List; + +@Data +public class ZyAllProcess { + private ZyProcess zyProcess; + private List zyProcessAccessories; + private List zyProcessFabric; + private List zyProcessAction; +} diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAccessories.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAccessories.java index 06b977ed..7805d92a 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAccessories.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAccessories.java @@ -64,4 +64,7 @@ public class ZyProcessAccessories implements Serializable { @Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id") @ApiModelProperty(value = "面料表id") private String accessoriesId; + + private String processname; + private String accessoriesname; } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAction.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAction.java index b6b19ede..391b7653 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAction.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAction.java @@ -53,4 +53,7 @@ public class ZyProcessAction implements Serializable { @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "创建时间") private Date createTime; + + private String processname; + private String actionname; } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessFabric.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessFabric.java index cf08a868..c0b03743 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessFabric.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessFabric.java @@ -49,4 +49,6 @@ public class ZyProcessFabric implements Serializable { @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "创建时间") private Date createTime; + private String processname; + private String fabricname; } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessAccessoriesMapper.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessAccessoriesMapper.java index 8f000abf..becf27fd 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessAccessoriesMapper.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessAccessoriesMapper.java @@ -18,6 +18,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ @Mapper public interface ZyProcessAccessoriesMapper extends BaseMapper { + + @Select("select a.*,b.process_name as processname,c.contents as accessoriesname from zy_accessories as c,zy_process as b,zy_process_accessories as a where a.process_id=b.id and a.accessories_id=c.id and a.process_id=#{id}") + List selectByid(String id); @Select("") IPage page(Page page, @Param("p") String s, @Param("m") String t); @Select("") diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessActionMapper.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessActionMapper.java index 20c7055d..70282fa2 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessActionMapper.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessActionMapper.java @@ -22,4 +22,6 @@ public interface ZyProcessActionMapper extends BaseMapper { IPage page(Page page, @Param("p") String s, @Param("m") String t); @Select("") IPage page1(Page page, @Param("p") String s, @Param("m") String t); + @Select("select a.*,b.process_name as processname,c.descr as actionname from zy_cloth_action as c,zy_process as b,zy_process_action as a where a.process_id=b.id and a.action_id=c.id and a.process_id=#{id}") + List selectByid(String id); } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessFabricMapper.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessFabricMapper.java index 0cd83515..1794336a 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessFabricMapper.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessFabricMapper.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; +import org.jeecg.modules.demo.pro.entity.ZyProcessAction; import org.jeecg.modules.demo.pro.entity.ZyProcessFabric; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -23,4 +24,6 @@ public interface ZyProcessFabricMapper extends BaseMapper { IPage page(Page page, @Param("p") String s, @Param("m") String t); @Select("") IPage page1(Page page, @Param("p") String s, @Param("m") String t); + @Select("select a.*,b.process_name as processname,c.name as fabricname from zy_fabric as c,zy_process as b,zy_process_fabric as a where a.process_id=b.id and a.fabric_id=c.id and a.process_id=#{id}") + List selectByid(String id); } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessAccessoriesService.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessAccessoriesService.java index b374e7b5..cf5ac200 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessAccessoriesService.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessAccessoriesService.java @@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.jeecg.modules.demo.pro.entity.ZyProcessAccessories; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** * @Description: 面料表 * @Author: jeecg-boot @@ -16,4 +18,6 @@ public interface IZyProcessAccessoriesService extends IService page(Page page, String s, String t); IPage page1(Page page, String s, String t); + + List selectByid(String id); } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessActionService.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessActionService.java index fa2e1455..8cbcce97 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessActionService.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessActionService.java @@ -19,4 +19,6 @@ public interface IZyProcessActionService extends IService { IPage page(Page page, String s, String t); IPage page1(Page page, String s, String t); + + List selectByid(String id); } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessFabricService.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessFabricService.java index 9040d5be..49e86bc3 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessFabricService.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessFabricService.java @@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.jeecg.modules.demo.pro.entity.ZyProcessFabric; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** * @Description: zy_process_fabric * @Author: jeecg-boot @@ -16,4 +18,6 @@ public interface IZyProcessFabricService extends IService { IPage page(Page page, String s, String t); IPage page1(Page page, String s, String t); + + List selectByid(String id); } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessAccessoriesServiceImpl.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessAccessoriesServiceImpl.java index 2ce81793..0f3d1ee6 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessAccessoriesServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessAccessoriesServiceImpl.java @@ -10,6 +10,8 @@ import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import java.util.List; + /** * @Description: 面料表 * @Author: jeecg-boot @@ -30,4 +32,9 @@ public class ZyProcessAccessoriesServiceImpl extends ServiceImpl page1(Page page, String s, String t) { return zyProcessAccessoriesMapper.page1(page,s,t); } + + @Override + public List selectByid(String id) { + return zyProcessAccessoriesMapper.selectByid(id); + } } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessActionServiceImpl.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessActionServiceImpl.java index ddc22491..8cb64d37 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessActionServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessActionServiceImpl.java @@ -33,4 +33,9 @@ public class ZyProcessActionServiceImpl extends ServiceImpl page1(Page page, String s, String t) { return zyProcessActionMapper.page1(page,s,t); } + + @Override + public List selectByid(String id) { + return zyProcessActionMapper.selectByid(id); + } } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessFabricServiceImpl.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessFabricServiceImpl.java index 1e1b395e..4b036812 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessFabricServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessFabricServiceImpl.java @@ -10,6 +10,8 @@ import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import java.util.List; + /** * @Description: zy_process_fabric * @Author: jeecg-boot @@ -30,4 +32,9 @@ public class ZyProcessFabricServiceImpl extends ServiceImpl page1(Page page, String s, String t) { return zyProcessFabricMapper.page1(page,s,t); } + + @Override + public List selectByid(String id) { + return zyProcessFabricMapper.selectByid(id); + } }