20220907-data

zhc4dev
lenovo 2 years ago
parent 11ce9857b9
commit 414de9e193
  1. 26
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java
  2. 16
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyAllProcess.java
  3. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAccessories.java
  4. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAction.java
  5. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessFabric.java
  6. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessAccessoriesMapper.java
  7. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessActionMapper.java
  8. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessFabricMapper.java
  9. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessAccessoriesService.java
  10. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessActionService.java
  11. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessFabricService.java
  12. 7
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessAccessoriesServiceImpl.java
  13. 5
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessActionServiceImpl.java
  14. 7
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessFabricServiceImpl.java

@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils; 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.ZyProcess;
import org.jeecg.modules.demo.base.entity.vo.ZyClothActionVo; import org.jeecg.modules.demo.base.entity.vo.ZyClothActionVo;
import org.jeecg.modules.demo.base.service.IZyProcessService; 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 com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; 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.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.IZyProcessActionService;
import org.jeecg.modules.demo.pro.service.IZyProcessFabricService;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ExportParams;
@ -52,8 +60,12 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyProcessController extends JeecgController<ZyProcess, IZyProcessService> { public class ZyProcessController extends JeecgController<ZyProcess, IZyProcessService> {
@Autowired @Autowired
private IZyProcessService zyProcessService; private IZyProcessService zyProcessService;
@Autowired @Autowired
IZyProcessAccessoriesService zyProcessAccessoriesService;
@Autowired
IZyProcessActionService zyProcessActionService; IZyProcessActionService zyProcessActionService;
@Autowired
IZyProcessFabricService zyProcessFabricService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -144,10 +156,18 @@ public class ZyProcessController extends JeecgController<ZyProcess, IZyProcessSe
@GetMapping(value = "/queryById") @GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyProcess zyProcess=zyProcessService.selectZyprocess(id); ZyProcess zyProcess=zyProcessService.selectZyprocess(id);
if(zyProcess==null) { List<ZyProcessAccessories> pageList=zyProcessAccessoriesService.selectByid(id);
List<ZyProcessAction> pageList1=zyProcessActionService.selectByid(id);
List<ZyProcessFabric> 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.error("未找到对应数据");
} }
return Result.OK(zyProcess); return Result.OK(zyAllProcess);
} }
/** /**

@ -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> zyProcessAccessories;
private List<ZyProcessFabric> zyProcessFabric;
private List<ZyProcessAction> zyProcessAction;
}

@ -64,4 +64,7 @@ public class ZyProcessAccessories implements Serializable {
@Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id") @Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id")
@ApiModelProperty(value = "面料表id") @ApiModelProperty(value = "面料表id")
private String accessoriesId; private String accessoriesId;
private String processname;
private String accessoriesname;
} }

@ -53,4 +53,7 @@ public class ZyProcessAction implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date createTime; private Date createTime;
private String processname;
private String actionname;
} }

@ -49,4 +49,6 @@ public class ZyProcessFabric implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date createTime; private Date createTime;
private String processname;
private String fabricname;
} }

@ -18,6 +18,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
@Mapper @Mapper
public interface ZyProcessAccessoriesMapper extends BaseMapper<ZyProcessAccessories> { public interface ZyProcessAccessoriesMapper extends BaseMapper<ZyProcessAccessories> {
@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<ZyProcessAccessories> selectByid(String id);
@Select("<script>select * from zy_process_accessories <where><if test=\" p != null\">process_id in (select id from zy_process where process_name like #{p})</if><if test=\" m != null\"> and accessories_id in (select id from zy_accessories where contents like #{m})</if></where></script>") @Select("<script>select * from zy_process_accessories <where><if test=\" p != null\">process_id in (select id from zy_process where process_name like #{p})</if><if test=\" m != null\"> and accessories_id in (select id from zy_accessories where contents like #{m})</if></where></script>")
IPage<ZyProcessAccessories> page(Page<ZyProcessAccessories> page, @Param("p") String s, @Param("m") String t); IPage<ZyProcessAccessories> page(Page<ZyProcessAccessories> page, @Param("p") String s, @Param("m") String t);
@Select("<script>select * from zy_process_accessories <where>process_id =#{p}<if test=\" m != null\"> and accessories_id in (select id from zy_accessories where contents like #{m})</if></where></script>") @Select("<script>select * from zy_process_accessories <where>process_id =#{p}<if test=\" m != null\"> and accessories_id in (select id from zy_accessories where contents like #{m})</if></where></script>")

@ -22,4 +22,6 @@ public interface ZyProcessActionMapper extends BaseMapper<ZyProcessAction> {
IPage<ZyProcessAction> page(Page<ZyProcessAction> page, @Param("p") String s, @Param("m") String t); IPage<ZyProcessAction> page(Page<ZyProcessAction> page, @Param("p") String s, @Param("m") String t);
@Select("<script>select * from zy_process_action <where>process_id =#{p}<if test=\" m != null\"> and action_id in (select id from zy_cloth_action where descr like #{m})</if></where></script>") @Select("<script>select * from zy_process_action <where>process_id =#{p}<if test=\" m != null\"> and action_id in (select id from zy_cloth_action where descr like #{m})</if></where></script>")
IPage<ZyProcessAction> page1(Page<ZyProcessAction> page, @Param("p") String s, @Param("m") String t); IPage<ZyProcessAction> page1(Page<ZyProcessAction> 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<ZyProcessAction> selectByid(String id);
} }

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.pro.entity.ZyProcessAction;
import org.jeecg.modules.demo.pro.entity.ZyProcessFabric; import org.jeecg.modules.demo.pro.entity.ZyProcessFabric;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -23,4 +24,6 @@ public interface ZyProcessFabricMapper extends BaseMapper<ZyProcessFabric> {
IPage<ZyProcessFabric> page(Page<ZyProcessFabric> page, @Param("p") String s, @Param("m") String t); IPage<ZyProcessFabric> page(Page<ZyProcessFabric> page, @Param("p") String s, @Param("m") String t);
@Select("<script>select * from zy_process_fabric <where>process_id =#{p}<if test=\" m != null\"> and fabric_id in (select id from zy_fabric where name like #{m})</if></where></script>") @Select("<script>select * from zy_process_fabric <where>process_id =#{p}<if test=\" m != null\"> and fabric_id in (select id from zy_fabric where name like #{m})</if></where></script>")
IPage<ZyProcessFabric> page1(Page<ZyProcessFabric> page, @Param("p") String s, @Param("m") String t); IPage<ZyProcessFabric> page1(Page<ZyProcessFabric> 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<ZyProcessFabric> selectByid(String id);
} }

@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.pro.entity.ZyProcessAccessories; import org.jeecg.modules.demo.pro.entity.ZyProcessAccessories;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/** /**
* @Description: 面料表 * @Description: 面料表
* @Author: jeecg-boot * @Author: jeecg-boot
@ -16,4 +18,6 @@ public interface IZyProcessAccessoriesService extends IService<ZyProcessAccessor
IPage<ZyProcessAccessories> page(Page<ZyProcessAccessories> page, String s, String t); IPage<ZyProcessAccessories> page(Page<ZyProcessAccessories> page, String s, String t);
IPage<ZyProcessAccessories> page1(Page<ZyProcessAccessories> page, String s, String t); IPage<ZyProcessAccessories> page1(Page<ZyProcessAccessories> page, String s, String t);
List<ZyProcessAccessories> selectByid(String id);
} }

@ -19,4 +19,6 @@ public interface IZyProcessActionService extends IService<ZyProcessAction> {
IPage<ZyProcessAction> page(Page<ZyProcessAction> page, String s, String t); IPage<ZyProcessAction> page(Page<ZyProcessAction> page, String s, String t);
IPage<ZyProcessAction> page1(Page<ZyProcessAction> page, String s, String t); IPage<ZyProcessAction> page1(Page<ZyProcessAction> page, String s, String t);
List<ZyProcessAction> selectByid(String id);
} }

@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.pro.entity.ZyProcessFabric; import org.jeecg.modules.demo.pro.entity.ZyProcessFabric;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/** /**
* @Description: zy_process_fabric * @Description: zy_process_fabric
* @Author: jeecg-boot * @Author: jeecg-boot
@ -16,4 +18,6 @@ public interface IZyProcessFabricService extends IService<ZyProcessFabric> {
IPage<ZyProcessFabric> page(Page<ZyProcessFabric> page, String s, String t); IPage<ZyProcessFabric> page(Page<ZyProcessFabric> page, String s, String t);
IPage<ZyProcessFabric> page1(Page<ZyProcessFabric> page, String s, String t); IPage<ZyProcessFabric> page1(Page<ZyProcessFabric> page, String s, String t);
List<ZyProcessFabric> selectByid(String id);
} }

@ -10,6 +10,8 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/** /**
* @Description: 面料表 * @Description: 面料表
* @Author: jeecg-boot * @Author: jeecg-boot
@ -30,4 +32,9 @@ public class ZyProcessAccessoriesServiceImpl extends ServiceImpl<ZyProcessAccess
public IPage<ZyProcessAccessories> page1(Page<ZyProcessAccessories> page, String s, String t) { public IPage<ZyProcessAccessories> page1(Page<ZyProcessAccessories> page, String s, String t) {
return zyProcessAccessoriesMapper.page1(page,s,t); return zyProcessAccessoriesMapper.page1(page,s,t);
} }
@Override
public List<ZyProcessAccessories> selectByid(String id) {
return zyProcessAccessoriesMapper.selectByid(id);
}
} }

@ -33,4 +33,9 @@ public class ZyProcessActionServiceImpl extends ServiceImpl<ZyProcessActionMappe
public IPage<ZyProcessAction> page1(Page<ZyProcessAction> page, String s, String t) { public IPage<ZyProcessAction> page1(Page<ZyProcessAction> page, String s, String t) {
return zyProcessActionMapper.page1(page,s,t); return zyProcessActionMapper.page1(page,s,t);
} }
@Override
public List<ZyProcessAction> selectByid(String id) {
return zyProcessActionMapper.selectByid(id);
}
} }

@ -10,6 +10,8 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/** /**
* @Description: zy_process_fabric * @Description: zy_process_fabric
* @Author: jeecg-boot * @Author: jeecg-boot
@ -30,4 +32,9 @@ public class ZyProcessFabricServiceImpl extends ServiceImpl<ZyProcessFabricMappe
public IPage<ZyProcessFabric> page1(Page<ZyProcessFabric> page, String s, String t) { public IPage<ZyProcessFabric> page1(Page<ZyProcessFabric> page, String s, String t) {
return zyProcessFabricMapper.page1(page,s,t); return zyProcessFabricMapper.page1(page,s,t);
} }
@Override
public List<ZyProcessFabric> selectByid(String id) {
return zyProcessFabricMapper.selectByid(id);
}
} }

Loading…
Cancel
Save