2023-1-29产品

zhc4dev
lenovo 2 years ago
parent 0871cca2ea
commit d3f05a4b9c
  1. 20
      ant-design-vue-jeecg/src/views/product/pdaccessories/ProductAccessoriesList.vue
  2. 21
      ant-design-vue-jeecg/src/views/product/pdfabric/ProductFabricList.vue
  3. 32
      ant-design-vue-jeecg/src/views/product/productProcess/ZyProductProcessList.vue
  4. 36
      ant-design-vue-jeecg/src/views/zyWorkProduct/ZyProductList.vue
  5. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/controller/ProductAccessoriesController.java
  6. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/entity/ProductAccessories.java
  7. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/mapper/ProductAccessoriesMapper.java
  8. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/IProductAccessoriesService.java
  9. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/impl/ProductAccessoriesServiceImpl.java
  10. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/controller/ProductFabricController.java
  11. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/entity/ProductFabric.java
  12. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/mapper/ProductFabricMapper.java
  13. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/IProductFabricService.java
  14. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/impl/ProductFabricServiceImpl.java
  15. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/controller/ZyProductProcessController.java
  16. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/entity/ZyProductProcess.java
  17. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/mapper/ZyProductProcessMapper.java
  18. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/service/IZyProductProcessService.java
  19. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/service/impl/ZyProductProcessServiceImpl.java

@ -5,6 +5,11 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料编号">
<a-input placeholder="辅料编号" v-model="nums"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料名称"> <a-form-item label="辅料名称">
<a-input placeholder="辅料名称" v-model="accessoriesId"></a-input> <a-input placeholder="辅料名称" v-model="accessoriesId"></a-input>
@ -120,6 +125,7 @@
return { return {
description: '产品辅料表管理页面', description: '产品辅料表管理页面',
accessoriesId:'', accessoriesId:'',
nums:'',
biaoTi: '', biaoTi: '',
// //
columns: [ columns: [
@ -141,10 +147,20 @@
{ {
title:'产品编号', title:'产品编号',
align:"center", align:"center",
dataIndex: 'productCode'
},
{
title:'产品名称',
align:"center",
dataIndex: 'productId_dictText' dataIndex: 'productId_dictText'
}, },
{ {
title:'辅料', title:'辅料编号',
align:"center",
dataIndex: 'nums'
},
{
title:'辅料名称',
align:"center", align:"center",
dataIndex: 'accessoriesId_dictText' dataIndex: 'accessoriesId_dictText'
}, },
@ -262,10 +278,12 @@
//param.id=this.id; //param.id=this.id;
param.productId = this.$route.query.id; param.productId = this.$route.query.id;
param.accessoriesId=this.accessoriesId; param.accessoriesId=this.accessoriesId;
param.nums=this.nums;
return filterObj(param); return filterObj(param);
}, },
searchReset() { searchReset() {
this.accessoriesId = '' this.accessoriesId = ''
this.nums = ''
this.loadData(1); this.loadData(1);
}, },
handleDetail(id){ handleDetail(id){

@ -5,11 +5,17 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="面料编号">
<a-input placeholder="面料编号" v-model="fabricNumber"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="面料名称"> <a-form-item label="面料名称">
<a-input placeholder="面料名称" v-model="fabricId"></a-input> <a-input placeholder="面料名称" v-model="fabricId"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
@ -119,6 +125,7 @@
return { return {
description: '产品面料表管理页面', description: '产品面料表管理页面',
fabricId:'', fabricId:'',
fabricNumber:'',
biaoTi: '', biaoTi: '',
// //
columns: [ columns: [
@ -135,10 +142,20 @@
{ {
title:'产品编号', title:'产品编号',
align:"center", align:"center",
dataIndex: 'productCode'
},
{
title:'产品名称',
align:"center",
dataIndex: 'productId_dictText' dataIndex: 'productId_dictText'
}, },
{ {
title:'面料', title:'面料编号',
align:"center",
dataIndex: 'fabricNumber'
},
{
title:'面料名称',
align:"center", align:"center",
dataIndex: 'fabricId_dictText' dataIndex: 'fabricId_dictText'
}, },
@ -256,10 +273,12 @@
//param.id=this.id; //param.id=this.id;
param.productId = this.$route.query.id; param.productId = this.$route.query.id;
param.fabricId=this.fabricId; param.fabricId=this.fabricId;
param.fabricNumber=this.fabricNumber;
return filterObj(param); return filterObj(param);
}, },
searchReset() { searchReset() {
this.fabricId = '' this.fabricId = ''
this.fabricNumber=''
this.loadData(1); this.loadData(1);
}, },
handleDetail(id,name){ handleDetail(id,name){

@ -5,6 +5,11 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序编号">
<a-input placeholder="工序编号" v-model="processCode"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序名称"> <a-form-item label="工序名称">
<a-input placeholder="工序名称" v-model="processId"></a-input> <a-input placeholder="工序名称" v-model="processId"></a-input>
@ -30,13 +35,13 @@
<!-- <a-button type="primary" icon="import">导入</a-button>--> <!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>--> <!-- </a-upload>-->
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0"> <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<a-menu slot="overlay"> <!-- <a-menu slot="overlay">-->
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
</a-menu> <!-- </a-menu>-->
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
</a-dropdown> <!-- </a-dropdown>-->
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
@ -120,6 +125,7 @@
return { return {
description: '产品工序管理页面', description: '产品工序管理页面',
processId:'', processId:'',
processCode:'',
biaoTi:'', biaoTi:'',
// //
columns: [ columns: [
@ -136,8 +142,18 @@
{ {
title:'产品编号', title:'产品编号',
align:"center", align:"center",
dataIndex: 'productCode'
},
{
title:'产品名称',
align:"center",
dataIndex: 'productId_dictText' dataIndex: 'productId_dictText'
}, },
{
title:'工序编号',
align:"center",
dataIndex: 'processCode'
},
{ {
title:'工序名称', title:'工序名称',
align:"center", align:"center",
@ -265,10 +281,12 @@
//param.id=this.id; //param.id=this.id;
param.productId = this.$route.query.id; param.productId = this.$route.query.id;
param.processId=this.processId; param.processId=this.processId;
param.processCode=this.processCode;
return filterObj(param); return filterObj(param);
}, },
searchReset() { searchReset() {
this.processId = '' this.processId = ''
this.processCode = ''
this.loadData(1); this.loadData(1);
}, },
fanhui(){ fanhui(){

@ -118,16 +118,16 @@
</template> </template>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)">工序</a> <a @click="jumpProcesses(record)">工序</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDetail(record)">模块</a> <a @click="handleDetail(record)">模块</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDetail(record)">面料</a> <a @click="jumpFabrics(record)">面料</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDetail(record)">辅料</a> <a @click="jumpAccessories(record)">辅料</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDetail(record)">设备</a> <a @click="handleDetail(record)">设备</a>
@ -358,11 +358,11 @@
jumpProcesses(record) jumpProcesses(record)
{ {
this.$router.push({ this.$router.push({
path: '/src/views/product/productProcess/ZyProductProcessList', path: '/product/productProcess/ZyProductProcessList',
// query: { // query: { //
// 'pid': record.id, 'productName': record.productName,
// 'tname': record.name, 'id': record.id,
// } }
}); });
}, },
//- //-
@ -380,22 +380,22 @@
jumpFabrics(record) jumpFabrics(record)
{ {
this.$router.push({ this.$router.push({
path: '/src/views/product/pdfabric/ProductFabricList', path: '/product/pdfabric/ProductFabricList',
// query: { // query: { //
// 'pid': record.id, 'productName': record.productName,
// 'tname': record.name, 'id': record.id,
// } }
}); });
}, },
//- //-
jumpAccessories(record) jumpAccessories(record)
{ {
this.$router.push({ this.$router.push({
path: '/src/views/duct/pdaccessories/ProductAccessoriesList', path: '/product/pdaccessories/ProductAccessoriesList',
// query: { // query: { //
// 'pid': record.id, 'productName': record.productName,
// 'tname': record.name, 'id': record.id,
// } }
}); });
}, },
//- //-

@ -68,15 +68,15 @@ public class ProductAccessoriesController extends JeecgController<ProductAccesso
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
// QueryWrapper<ProductAccessories> queryWrapper = QueryGenerator.initQueryWrapper(productAccessories, req.getParameterMap()); // QueryWrapper<ProductAccessories> queryWrapper = QueryGenerator.initQueryWrapper(productAccessories, req.getParameterMap());
QueryWrapper queryWrapper=new QueryWrapper(); // QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("product_id",productAccessories.getProductId()); // queryWrapper.eq("product_id",productAccessories.getProductId());
if(productAccessories.getAccessoriesId()!=null&&!productAccessories.getAccessoriesId().equals("")){ // if(productAccessories.getAccessoriesId()!=null&&!productAccessories.getAccessoriesId().equals("")){
String s="%"+productAccessories.getAccessoriesId()+"%"; // String s="%"+productAccessories.getAccessoriesId()+"%";
List<String> fabric = productAccessoriesService.findAll(s); // List<String> fabric = productAccessoriesService.findAll(s);
queryWrapper.in("accessories_id",fabric); // queryWrapper.in("accessories_id",fabric);
} // }
Page<ProductAccessories> page = new Page<ProductAccessories>(pageNo, pageSize); Page<ProductAccessories> page = new Page<ProductAccessories>(pageNo, pageSize);
IPage<ProductAccessories> pageList = productAccessoriesService.page(page, queryWrapper); IPage<ProductAccessories> pageList = productAccessoriesService.page1(page, productAccessories);
return Result.OK(pageList); return Result.OK(pageList);
} }

@ -48,7 +48,7 @@ public class ProductAccessories implements Serializable {
/**产品id*/ /**产品id*/
@Excel(name = "产品id", width = 15) @Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id") @ApiModelProperty(value = "产品id")
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") @Dict(dictTable = "zy_product",dicText = "product_name",dicCode = "id")
private String productId; private String productId;
/**辅料id*/ /**辅料id*/
@Excel(name = "辅料id", width = 15) @Excel(name = "辅料id", width = 15)
@ -68,4 +68,6 @@ public class ProductAccessories implements Serializable {
@Excel(name = "差额", width = 15) @Excel(name = "差额", width = 15)
@ApiModelProperty(value = "差额") @ApiModelProperty(value = "差额")
private Double difference; private Double difference;
private String nums;
private String productCode;
} }

@ -4,6 +4,8 @@ package org.jeecg.modules.product.pdaccessories.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -24,4 +26,6 @@ public interface ProductAccessoriesMapper extends BaseMapper<ProductAccessories>
@Delete("delete from product_accessories where product_id=#{pd} and accessories_id=#{access}") @Delete("delete from product_accessories where product_id=#{pd} and accessories_id=#{access}")
void deleteAccessories(@Param("pd") String productId, @Param("access") String listAccessory); void deleteAccessories(@Param("pd") String productId, @Param("access") String listAccessory);
@Select("<script>select a.*,b.nums,c.product_code from product_accessories as a,zy_accessories as b,zy_product as c where c.id=a.product_id and a.product_id=#{productId} and a.accessories_id=b.id and a.accessories_id in (select id from zy_accessories <where><if test=\" id != null\">contents like #{id}</if><if test=\" number != null\">nums like #{number}</if></where>)</script>")
IPage<ProductAccessories> page1(Page<ProductAccessories> page, @Param("productId") String productId, @Param("id") String accessoriesId, @Param("number") String nums);
} }

@ -1,6 +1,8 @@
package org.jeecg.modules.product.pdaccessories.service; package org.jeecg.modules.product.pdaccessories.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.product.pdaccessories.entity.ProductAccessories; import org.jeecg.modules.product.pdaccessories.entity.ProductAccessories;
@ -17,4 +19,6 @@ public interface IProductAccessoriesService extends IService<ProductAccessories>
List<String> findAll(String s); List<String> findAll(String s);
void deleteAccessories(String productId, String listAccessory); void deleteAccessories(String productId, String listAccessory);
IPage<ProductAccessories> page1(Page<ProductAccessories> page, ProductAccessories productAccessories);
} }

@ -1,6 +1,8 @@
package org.jeecg.modules.product.pdaccessories.service.impl; package org.jeecg.modules.product.pdaccessories.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.product.pdaccessories.entity.ProductAccessories; import org.jeecg.modules.product.pdaccessories.entity.ProductAccessories;
import org.jeecg.modules.product.pdaccessories.mapper.ProductAccessoriesMapper; import org.jeecg.modules.product.pdaccessories.mapper.ProductAccessoriesMapper;
import org.jeecg.modules.product.pdaccessories.service.IProductAccessoriesService; import org.jeecg.modules.product.pdaccessories.service.IProductAccessoriesService;
@ -31,4 +33,17 @@ public class ProductAccessoriesServiceImpl extends ServiceImpl<ProductAccessorie
public void deleteAccessories(String productId, String listAccessory) { public void deleteAccessories(String productId, String listAccessory) {
productAccessoriesMapper.deleteAccessories(productId,listAccessory); productAccessoriesMapper.deleteAccessories(productId,listAccessory);
} }
@Override
public IPage<ProductAccessories> page1(Page<ProductAccessories> page, ProductAccessories productAccessories) {
if(productAccessories.getNums()!=null){
String s="%"+productAccessories.getNums()+"%";
productAccessories.setNums(s);
}
if(productAccessories.getAccessoriesId()!=null){
String s="%"+productAccessories.getAccessoriesId()+"%";
productAccessories.setAccessoriesId(s);
}
return productAccessoriesMapper.page1(page,productAccessories.getProductId(),productAccessories.getAccessoriesId(),productAccessories.getNums());
}
} }

@ -70,15 +70,15 @@ public class ProductFabricController extends JeecgController<ProductFabric, IPro
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
// QueryWrapper<ProductFabric> queryWrapper = QueryGenerator.initQueryWrapper(productFabric, req.getParameterMap()); // QueryWrapper<ProductFabric> queryWrapper = QueryGenerator.initQueryWrapper(productFabric, req.getParameterMap());
QueryWrapper queryWrapper=new QueryWrapper(); // QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("product_id",productFabric.getProductId()); // queryWrapper.eq("product_id",productFabric.getProductId());
if(productFabric.getFabricId()!=null&&!productFabric.getFabricId().equals("")){ // if(productFabric.getFabricId()!=null&&!productFabric.getFabricId().equals("")){
String s="%"+productFabric.getFabricId()+"%"; // String s="%"+productFabric.getFabricId()+"%";
List<String> fabric = productFabricService.findAll(s); // List<String> fabric = productFabricService.findAll(s);
queryWrapper.in("fabric_id",fabric); // queryWrapper.in("fabric_id",fabric);
} // }
Page<ProductFabric> page = new Page<ProductFabric>(pageNo, pageSize); Page<ProductFabric> page = new Page<ProductFabric>(pageNo, pageSize);
IPage<ProductFabric> pageList = productFabricService.page(page, queryWrapper); IPage<ProductFabric> pageList = productFabricService.page1(page, productFabric);
return Result.OK(pageList); return Result.OK(pageList);
} }

@ -48,7 +48,7 @@ public class ProductFabric implements Serializable {
/**产品id*/ /**产品id*/
@Excel(name = "产品id", width = 15) @Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id") @ApiModelProperty(value = "产品id")
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") @Dict(dictTable = "zy_product",dicText = "product_name",dicCode = "id")
private String productId; private String productId;
/**面料id*/ /**面料id*/
@Excel(name = "面料id", width = 15) @Excel(name = "面料id", width = 15)
@ -68,4 +68,6 @@ public class ProductFabric implements Serializable {
@Excel(name = "差额", width = 15) @Excel(name = "差额", width = 15)
@ApiModelProperty(value = "差额") @ApiModelProperty(value = "差额")
private Double difference; private Double difference;
private String fabricNumber;
private String productCode;
} }

@ -4,6 +4,8 @@ package org.jeecg.modules.product.pdfabric.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -24,4 +26,7 @@ public interface ProductFabricMapper extends BaseMapper<ProductFabric> {
@Delete("delete from product_fabric where product_id=#{productId} and fabric_id=#{s1}") @Delete("delete from product_fabric where product_id=#{productId} and fabric_id=#{s1}")
void deleteFabric(@Param("productId") String productId, @Param("s1") String s1); void deleteFabric(@Param("productId") String productId, @Param("s1") String s1);
@Select("<script>select a.*,b.fabric_number,c.product_code from product_fabric as a,zy_fabric as b,zy_product as c where c.id=a.product_id and a.product_id=#{productId} and a.fabric_id=b.id and a.fabric_id in (select id from zy_fabric <where><if test=\" id != null\">name like #{id}</if><if test=\" number != null\">fabric_number like #{number}</if></where>)</script>")
IPage<ProductFabric> page1(Page<ProductFabric> page,@Param("productId") String productId, @Param("id") String fabricId, @Param("number") String fabricNumber);
} }

@ -1,5 +1,7 @@
package org.jeecg.modules.product.pdfabric.service; package org.jeecg.modules.product.pdfabric.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.product.pdfabric.entity.ProductFabric; import org.jeecg.modules.product.pdfabric.entity.ProductFabric;
@ -16,4 +18,6 @@ public interface IProductFabricService extends IService<ProductFabric> {
List<String> findAll(String s); List<String> findAll(String s);
void deleteFabric(String productId, String s1); void deleteFabric(String productId, String s1);
IPage<ProductFabric> page1(Page<ProductFabric> page, ProductFabric productFabric);
} }

@ -1,6 +1,8 @@
package org.jeecg.modules.product.pdfabric.service.impl; package org.jeecg.modules.product.pdfabric.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.product.pdfabric.entity.ProductFabric; import org.jeecg.modules.product.pdfabric.entity.ProductFabric;
import org.jeecg.modules.product.pdfabric.mapper.ProductFabricMapper; import org.jeecg.modules.product.pdfabric.mapper.ProductFabricMapper;
import org.jeecg.modules.product.pdfabric.service.IProductFabricService; import org.jeecg.modules.product.pdfabric.service.IProductFabricService;
@ -31,4 +33,17 @@ public class ProductFabricServiceImpl extends ServiceImpl<ProductFabricMapper, P
public void deleteFabric(String productId, String s1) { public void deleteFabric(String productId, String s1) {
productFabricMapper.deleteFabric(productId,s1); productFabricMapper.deleteFabric(productId,s1);
} }
@Override
public IPage<ProductFabric> page1(Page<ProductFabric> page, ProductFabric productFabric) {
if(productFabric.getFabricId()!=null){
String s="%"+productFabric.getFabricId();
productFabric.setFabricId(s);
}
if(productFabric.getFabricNumber()!=null){
String s="%"+productFabric.getFabricNumber();
productFabric.setFabricNumber(s);
}
return productFabricMapper.page1(page,productFabric.getProductId(),productFabric.getFabricId(),productFabric.getFabricNumber());
}
} }

@ -82,17 +82,17 @@ public class ZyProductProcessController extends JeecgController<ZyProductProcess
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
//QueryWrapper<ZyProductProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyProductProcess, req.getParameterMap()); //QueryWrapper<ZyProductProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyProductProcess, req.getParameterMap());
QueryWrapper queryWrapper=new QueryWrapper(); // QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.orderByDesc("number"); // queryWrapper.orderByDesc("number");
queryWrapper.eq("product_id",zyProductProcess.getProductId()); // queryWrapper.eq("product_id",zyProductProcess.getProductId());
if(zyProductProcess.getProcessId()!=null&&!zyProductProcess.getProcessId().equals("")){ // if(zyProductProcess.getProcessId()!=null&&!zyProductProcess.getProcessId().equals("")){
String s="%"+zyProductProcess.getProcessId()+"%"; // String s="%"+zyProductProcess.getProcessId()+"%";
List<String> list=zyProductProcessService.find(s); // List<String> list=zyProductProcessService.find(s);
queryWrapper.in("process_id",list); // queryWrapper.in("process_id",list);
} // }
Page<ZyProductProcess> page = new Page<ZyProductProcess>(pageNo, pageSize); Page<ZyProductProcess> page = new Page<ZyProductProcess>(pageNo, pageSize);
IPage<ZyProductProcess> pageList = zyProductProcessService.page(page, queryWrapper); IPage<ZyProductProcess> pageList = zyProductProcessService.page1(page,zyProductProcess);
return Result.OK(pageList); return Result.OK(pageList);
} }

@ -56,7 +56,7 @@ public class ZyProductProcess implements Serializable {
/**产品id*/ /**产品id*/
@Excel(name = "产品id", width = 15) @Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id") @ApiModelProperty(value = "产品id")
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") @Dict(dictTable = "zy_product",dicText = "product_name",dicCode = "id")
private String productId; private String productId;
/**工序id*/ /**工序id*/
@Excel(name = "工序id", width = 15) @Excel(name = "工序id", width = 15)
@ -68,4 +68,7 @@ public class ZyProductProcess implements Serializable {
@Excel(name = "序号", width = 15) @Excel(name = "序号", width = 15)
@ApiModelProperty(value = "序号") @ApiModelProperty(value = "序号")
private Integer number; private Integer number;
private String productCode;
private String processCode;
} }

@ -2,6 +2,8 @@ package org.jeecg.modules.product.zyproductprocess.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -39,4 +41,7 @@ public interface ZyProductProcessMapper extends BaseMapper<ZyProductProcess> {
//设备 //设备
@Select("select machine_id from zy_process_machine where process_id =#{processId}") @Select("select machine_id from zy_process_machine where process_id =#{processId}")
List<String> findAllMachine(String processId); List<String> findAllMachine(String processId);
//按照number降序排列,通过产品id筛选,然后通过processId和processCode筛选
@Select("<script>select c.*,a.process_code,b.product_code from zy_process as a,zy_product as b,zy_product_process as c where b.id=c.product_id and c.product_id=#{productId} and c.process_id=a.id and c.process_id in (select id from zy_process <where><if test=\" process != null\">process_name like #{process}</if><if test=\" code != null\">and process_code like #{code}</if></where>) order by number desc</script>")
IPage<ZyProductProcess> page1(Page<ZyProductProcess> page, @Param("productId") String productId, @Param("process") String processId, @Param("code") String processCode);
} }

@ -1,6 +1,8 @@
package org.jeecg.modules.product.zyproductprocess.service; package org.jeecg.modules.product.zyproductprocess.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess; import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
@ -29,4 +31,6 @@ public interface IZyProductProcessService extends IService<ZyProductProcess> {
List<String> findAllOperationtool(String processId); List<String> findAllOperationtool(String processId);
List<String> findAllMachine(String processId); List<String> findAllMachine(String processId);
IPage<ZyProductProcess> page1(Page<ZyProductProcess> page, ZyProductProcess zyProductProcess);
} }

@ -1,6 +1,8 @@
package org.jeecg.modules.product.zyproductprocess.service.impl; package org.jeecg.modules.product.zyproductprocess.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess; import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
import org.jeecg.modules.product.zyproductprocess.mapper.ZyProductProcessMapper; import org.jeecg.modules.product.zyproductprocess.mapper.ZyProductProcessMapper;
import org.jeecg.modules.product.zyproductprocess.service.IZyProductProcessService; import org.jeecg.modules.product.zyproductprocess.service.IZyProductProcessService;
@ -61,4 +63,18 @@ public class ZyProductProcessServiceImpl extends ServiceImpl<ZyProductProcessMap
public List<String> findAllMachine(String processId) { public List<String> findAllMachine(String processId) {
return zyProductProcessMapper.findAllMachine(processId); return zyProductProcessMapper.findAllMachine(processId);
} }
@Override
public IPage<ZyProductProcess> page1(Page<ZyProductProcess> page, ZyProductProcess zyProductProcess) {
if(zyProductProcess.getProcessId()!=null){
String s="%"+zyProductProcess.getProcessId()+"%";
zyProductProcess.setProcessId(s);
}
if(zyProductProcess.getProcessCode()!=null){
String s="%"+zyProductProcess.getProcessCode()+"%";
zyProductProcess.setProcessCode(s);
} System.err.println(zyProductProcess);
return zyProductProcessMapper.page1(page,zyProductProcess.getProductId(),zyProductProcess.getProcessId(),zyProductProcess.getProcessCode());
}
} }

Loading…
Cancel
Save