diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/mapper/ZyToolTypesMapper.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/mapper/ZyToolTypesMapper.java index f323ea31..1584c283 100644 --- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/mapper/ZyToolTypesMapper.java +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/mapper/ZyToolTypesMapper.java @@ -2,7 +2,9 @@ package org.jeecg.modules.demo.tools.mapper; import java.util.List; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.jeecg.modules.demo.tools.entity.ZyToolTypes; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -12,6 +14,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @Date: 2021-11-12 * @Version: V1.0 */ +@Mapper public interface ZyToolTypesMapper extends BaseMapper { + @Select("select * from zy_tool_types where id in (select toolid from zy_operationtool where operationid=#{id})") + List selectByid(String id); } diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/service/IZyToolTypesService.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/service/IZyToolTypesService.java index 2189d9dc..6a6d62a8 100644 --- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/service/IZyToolTypesService.java +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/service/IZyToolTypesService.java @@ -3,6 +3,8 @@ package org.jeecg.modules.demo.tools.service; import org.jeecg.modules.demo.tools.entity.ZyToolTypes; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** * @Description: 工具类型表 * @Author: jeecg-boot @@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface IZyToolTypesService extends IService { + List selectByid(String id); } diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/service/impl/ZyToolTypesServiceImpl.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/service/impl/ZyToolTypesServiceImpl.java index 1b13c302..0db83793 100644 --- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/service/impl/ZyToolTypesServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tools/service/impl/ZyToolTypesServiceImpl.java @@ -3,10 +3,13 @@ package org.jeecg.modules.demo.tools.service.impl; import org.jeecg.modules.demo.tools.entity.ZyToolTypes; import org.jeecg.modules.demo.tools.mapper.ZyToolTypesMapper; import org.jeecg.modules.demo.tools.service.IZyToolTypesService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import java.util.List; + /** * @Description: 工具类型表 * @Author: jeecg-boot @@ -16,4 +19,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service public class ZyToolTypesServiceImpl extends ServiceImpl implements IZyToolTypesService { + @Autowired + ZyToolTypesMapper zyToolTypesMapper; + @Override + public List selectByid(String id) { + return zyToolTypesMapper.selectByid(id); + } } diff --git a/jeecg-boot/jeecg-boot-module-process/pom.xml b/jeecg-boot/jeecg-boot-module-process/pom.xml index 7b8e77b8..8a2c3f12 100644 --- a/jeecg-boot/jeecg-boot-module-process/pom.xml +++ b/jeecg-boot/jeecg-boot-module-process/pom.xml @@ -14,6 +14,13 @@ org.jeecgframework.boot jeecg-boot-base-core + + org.jeecgframework.boot + jeecg-boot-module-erp + 2.4.5 + compile + + 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 7f9d8cd5..30db338c 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 @@ -2,19 +2,13 @@ package org.jeecg.modules.demo.base.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.accessories.entity.ZyAccessories; import org.jeecg.modules.demo.base.entity.ZyAllProcess; +import org.jeecg.modules.demo.base.entity.ZyClothAction; 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; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -22,27 +16,18 @@ 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.device.entity.ZyDevicetypel; +import org.jeecg.modules.demo.device.service.IZyDevicetypeService1; +import org.jeecg.modules.demo.fabric.entity.ZyFabric; 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; -import org.jeecgframework.poi.excel.entity.ImportParams; -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.modules.demo.tools.entity.ZyToolTypes; +import org.jeecg.modules.demo.tools.service.IZyToolTypesService; 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; @@ -66,6 +51,10 @@ public class ZyProcessController extends JeecgController queryById(@RequestParam(name="id",required=true) String id) { ZyProcess zyProcess=zyProcessService.selectZyprocess(id); - List pageList=zyProcessAccessoriesService.selectByid(id); - List pageList1=zyProcessActionService.selectByid(id); - List pageList2=zyProcessFabricService.selectByid(id); + List pageList=zyProcessAccessoriesService.selectByid(id); + List pageList1=zyProcessActionService.selectByid(id); + List pageList2=zyProcessFabricService.selectByid(id); + List pageList3=zyDevicetypeService.selectByid(id); + List pageList4=zyToolTypesService.selectByid(id); ZyAllProcess zyAllProcess=new ZyAllProcess(); zyAllProcess.setZyProcess(zyProcess); - zyAllProcess.setZyProcessAction(pageList1); - zyAllProcess.setZyProcessAccessories(pageList); - zyAllProcess.setZyProcessFabric(pageList2); + zyAllProcess.setZyClothActions(pageList1); + zyAllProcess.setZyAccessories(pageList); + zyAllProcess.setZyFabrics(pageList2); + zyAllProcess.setZyDevicetypes(pageList3); + zyAllProcess.setZyToolTypes(pageList4); + if(zyAllProcess==null) { return Result.error("未找到对应数据"); } 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 index 0f6a3a1c..f82d5a21 100644 --- 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 @@ -1,16 +1,19 @@ 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 org.jeecg.modules.demo.accessories.entity.ZyAccessories; +import org.jeecg.modules.demo.device.entity.ZyDevicetypel; +import org.jeecg.modules.demo.fabric.entity.ZyFabric; +import org.jeecg.modules.demo.tools.entity.ZyToolTypes; import java.util.List; @Data public class ZyAllProcess { private ZyProcess zyProcess; - private List zyProcessAccessories; - private List zyProcessFabric; - private List zyProcessAction; + private List zyClothActions;//基础动作 + private List zyAccessories;//辅料管理 + private List zyFabrics;//面料管理 + private List zyDevicetypes;//设备管理 + private List zyToolTypes; //工具管理 } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/entity/ZyDevicetypel.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/entity/ZyDevicetypel.java new file mode 100644 index 00000000..f4d8937e --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/entity/ZyDevicetypel.java @@ -0,0 +1,101 @@ +package org.jeecg.modules.demo.device.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +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 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.util.Date; + +/** + * @Description: 设备类型 + * @Author: jeecg-boot + * @Date: 2021-11-11 + * @Version: V1.0 + */ +@Data +@TableName("zy_devicetype") +@ApiModel(value="zy_devicetype对象", description="设备类型") +public class ZyDevicetypel 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 pid; + /**是否有子节点*/ + @Excel(name = "是否有子节点", width = 15, dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "是否有子节点") + private String hasChild; + /**类型编号*/ + @Excel(name = "类型编号", width = 15) + @ApiModelProperty(value = "类型编号") + private String code; + /**类型名称*/ + @Excel(name = "类型名称", width = 15) + @ApiModelProperty(value = "类型名称") + private String name; + /**类型图片*/ + @Excel(name = "类型图片", width = 15) + @ApiModelProperty(value = "类型图片") + private String img; + /**类型品牌*/ + @Excel(name = "类型品牌", width = 15) + @ApiModelProperty(value = "类型品牌") + private String brand; + /**型号*/ + @Excel(name = "型号", width = 15) + @ApiModelProperty(value = "型号") + private String model; + /**生产厂商*/ + @Excel(name = "生产厂商", width = 15) + @ApiModelProperty(value = "生产厂商") + private String manufacturer; + /**供货商*/ + @Excel(name = "供货商", width = 15) + @ApiModelProperty(value = "供货商") + private String supplier; + /**联系人*/ + @Excel(name = "联系人", width = 15) + @ApiModelProperty(value = "联系人") + private String contact; + /**产地*/ + @Excel(name = "产地", width = 15) + @ApiModelProperty(value = "产地") + private String place; + /**二维码*/ + @Excel(name = "二维码", width = 15) + @ApiModelProperty(value = "二维码") + private String erweima; +} diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/mapper/ZyDevicetypeMapper1.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/mapper/ZyDevicetypeMapper1.java new file mode 100644 index 00000000..902ba7b1 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/mapper/ZyDevicetypeMapper1.java @@ -0,0 +1,21 @@ +package org.jeecg.modules.demo.device.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Select; +import org.jeecg.modules.demo.device.entity.ZyDevicetypel; + +import java.util.List; + +/** + * @Description: 设备类型 + * @Author: jeecg-boot + * @Date: 2021-11-11 + * @Version: V1.0 + */ +@Mapper +public interface ZyDevicetypeMapper1 extends BaseMapper { + + @Select("select * from zy_devicetype where id in (select machine_id from zy_process_machine where process_id=#{id})") + List selectByid(String id); +} diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/service/IZyDevicetypeService1.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/service/IZyDevicetypeService1.java new file mode 100644 index 00000000..420a0885 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/service/IZyDevicetypeService1.java @@ -0,0 +1,20 @@ +package org.jeecg.modules.demo.device.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.demo.device.entity.ZyDevicetypel; + +import java.util.List; + +/** + * @Description: 设备类型 + * @Author: jeecg-boot + * @Date: 2021-11-11 + * @Version: V1.0 + */ +public interface IZyDevicetypeService1 extends IService { + + + + + List selectByid(String id); +} diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/service/impl/ZyDevicetypeServiceImpl1.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/service/impl/ZyDevicetypeServiceImpl1.java new file mode 100644 index 00000000..cd9d27e0 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/device/service/impl/ZyDevicetypeServiceImpl1.java @@ -0,0 +1,30 @@ +package org.jeecg.modules.demo.device.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.demo.device.entity.ZyDevicetypel; +import org.jeecg.modules.demo.device.mapper.ZyDevicetypeMapper1; +import org.jeecg.modules.demo.device.service.IZyDevicetypeService1; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Description: 设备类型 + * @Author: jeecg-boot + * @Date: 2021-11-11 + * @Version: V1.0 + */ +@Service +public class ZyDevicetypeServiceImpl1 extends ServiceImpl implements IZyDevicetypeService1 { + + @Autowired + private ZyDevicetypeMapper1 zyDevicetypeMapper; + + + @Override + public List selectByid(String id) { + return zyDevicetypeMapper.selectByid(id); + } + +} 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 7805d92a..8d937b25 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 @@ -65,6 +65,5 @@ public class ZyProcessAccessories implements Serializable { @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 391b7653..44fee084 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 @@ -54,6 +54,5 @@ public class ZyProcessAction implements Serializable { @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 c0b03743..106f0b64 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,6 +49,5 @@ 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 becf27fd..4f1ee564 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 @@ -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.accessories.entity.ZyAccessories; import org.jeecg.modules.demo.pro.entity.ZyProcessAccessories; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -19,8 +20,8 @@ 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("select * from zy_accessories where id in (select accessories_id from zy_process_accessories where 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 70282fa2..e87256af 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 @@ -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.base.entity.ZyClothAction; import org.jeecg.modules.demo.pro.entity.ZyProcessAction; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -22,6 +23,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); + @Select("select * from zy_cloth_action where id in (select action_id from zy_process_action where 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 1794336a..1a5f3e72 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.fabric.entity.ZyFabric; import org.jeecg.modules.demo.pro.entity.ZyProcessAction; import org.jeecg.modules.demo.pro.entity.ZyProcessFabric; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -24,6 +25,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); + @Select("select * from zy_fabric where id in (select fabric_id from zy_process_fabric where 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 cf5ac200..a5f5e642 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 @@ -2,6 +2,7 @@ package org.jeecg.modules.demo.pro.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.modules.demo.accessories.entity.ZyAccessories; import org.jeecg.modules.demo.pro.entity.ZyProcessAccessories; import com.baomidou.mybatisplus.extension.service.IService; @@ -19,5 +20,5 @@ public interface IZyProcessAccessoriesService extends IService page1(Page page, String s, String t); - List selectByid(String id); + 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 8cbcce97..db1e0a9f 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 @@ -2,6 +2,7 @@ package org.jeecg.modules.demo.pro.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.modules.demo.base.entity.ZyClothAction; import org.jeecg.modules.demo.pro.entity.ZyProcessAction; import com.baomidou.mybatisplus.extension.service.IService; @@ -20,5 +21,5 @@ public interface IZyProcessActionService extends IService { IPage page1(Page page, String s, String t); - List selectByid(String id); + 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 49e86bc3..68ac5c03 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 @@ -2,6 +2,7 @@ package org.jeecg.modules.demo.pro.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.modules.demo.fabric.entity.ZyFabric; import org.jeecg.modules.demo.pro.entity.ZyProcessFabric; import com.baomidou.mybatisplus.extension.service.IService; @@ -19,5 +20,5 @@ public interface IZyProcessFabricService extends IService { IPage page1(Page page, String s, String t); - List selectByid(String id); + 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 0f3d1ee6..8f607bfe 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 @@ -2,6 +2,7 @@ package org.jeecg.modules.demo.pro.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.modules.demo.accessories.entity.ZyAccessories; import org.jeecg.modules.demo.pro.entity.ZyProcessAccessories; import org.jeecg.modules.demo.pro.mapper.ZyProcessAccessoriesMapper; import org.jeecg.modules.demo.pro.service.IZyProcessAccessoriesService; @@ -34,7 +35,7 @@ public class ZyProcessAccessoriesServiceImpl extends ServiceImpl selectByid(String id) { + 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 8cb64d37..e34fced3 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 @@ -2,6 +2,7 @@ package org.jeecg.modules.demo.pro.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.modules.demo.base.entity.ZyClothAction; import org.jeecg.modules.demo.pro.entity.ZyProcessAction; import org.jeecg.modules.demo.pro.mapper.ZyProcessActionMapper; import org.jeecg.modules.demo.pro.service.IZyProcessActionService; @@ -35,7 +36,7 @@ public class ZyProcessActionServiceImpl extends ServiceImpl selectByid(String id) { + 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 4b036812..814d5bd2 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 @@ -2,6 +2,7 @@ package org.jeecg.modules.demo.pro.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.modules.demo.fabric.entity.ZyFabric; import org.jeecg.modules.demo.pro.entity.ZyProcessFabric; import org.jeecg.modules.demo.pro.mapper.ZyProcessFabricMapper; import org.jeecg.modules.demo.pro.service.IZyProcessFabricService; @@ -34,7 +35,7 @@ public class ZyProcessFabricServiceImpl extends ServiceImpl selectByid(String id) { + public List selectByid(String id) { return zyProcessFabricMapper.selectByid(id); } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/mapper/ZyDevicetypeMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/mapper/ZyDevicetypeMapper.java index 7fc5384d..92704dba 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/mapper/ZyDevicetypeMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/mapper/ZyDevicetypeMapper.java @@ -3,6 +3,7 @@ package org.jeecg.modules.devicetype.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.jeecg.modules.devicetype.entity.ZyDevicetype; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -14,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface ZyDevicetypeMapper extends BaseMapper { + @Select("select * from zy_devicetype where id in (select machine_id from zy_process_machine where process_id=#{id})") + List selectByid(String id); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/service/IZyDevicetypeService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/service/IZyDevicetypeService.java index 3627c787..3fd34199 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/service/IZyDevicetypeService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/service/IZyDevicetypeService.java @@ -28,4 +28,5 @@ public interface IZyDevicetypeService extends IService { public void delBatchMain (Collection idList); + List selectByid(String id); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/service/impl/ZyDevicetypeServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/service/impl/ZyDevicetypeServiceImpl.java index 26b366c5..7734cdfe 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/service/impl/ZyDevicetypeServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/devicetype/service/impl/ZyDevicetypeServiceImpl.java @@ -49,4 +49,9 @@ public class ZyDevicetypeServiceImpl extends ServiceImpl selectByid(String id) { + return zyDevicetypeMapper.selectByid(id); + } + }