Merge remote-tracking branch 'origin/master'

zhc4dev
lenovo 2 years ago
commit 97cb5277b2
  1. 45
      ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue
  2. 9
      ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue
  3. 45
      ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue
  4. 9
      ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue
  5. 49
      ant-design-vue-jeecg/src/views/goodsmodule/GoodsModuleList.vue
  6. 12
      ant-design-vue-jeecg/src/views/goodsmodule/modules/GoodsModuleForm.vue
  7. 325
      ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue
  8. 11
      ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue
  9. 312
      ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue
  10. 6
      ant-design-vue-jeecg/src/views/process/ZyProcessList.vue
  11. 67
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentListDetail.vue
  12. 43
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularCompentModal.vue
  13. 233
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
  14. 99
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularListDetail.vue
  15. 254
      ant-design-vue-jeecg/src/views/process/modules/list/ZyClothsComponentList.vue
  16. 251
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue
  17. 63
      ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue
  18. 13
      ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue
  19. 3
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/IZyStyleModularService.java
  20. 11
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java
  21. 16
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java
  22. 38
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java
  23. 352
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularController.java
  24. 313
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java
  25. 15
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/vo/ZyClothsComponentDetail.java
  26. 19
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/vo/ZyClothsModularDetail.java
  27. 80
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/vo/ZyProcessModularVo.java
  28. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsComponentMapper.java
  29. 8
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsModularCompentMapper.java
  30. 11
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsModularMapper.java
  31. 5
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
  32. 5
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsComponentMapper.xml
  33. 5
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsModularCompentMapper.xml
  34. 20
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsModularMapper.xml
  35. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsComponentService.java
  36. 6
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsModularCompentService.java
  37. 9
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsModularService.java
  38. 77
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsComponentServiceImpl.java
  39. 44
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularCompentServiceImpl.java
  40. 86
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularServiceImpl.java
  41. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessComponentMapper.java
  42. 10
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/xml/ZyProcessComponentMapper.xml
  43. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessComponentService.java
  44. 35
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessComponentServiceImpl.java
  45. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java
  46. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsfabric/controller/GoodsFabricController.java
  47. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/controller/ZyStyleAccessoriesController.java
  48. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/mapper/ZyStyleAccessoriesMapper.java
  49. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/service/IZyStyleAccessoriesService.java
  50. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/service/impl/ZyStyleAccessoriesServiceImpl.java
  51. 164
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java
  52. 23
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  53. 25
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/entity/vo/AllClothStyle.java
  54. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/mapper/ZyClothsStyleMapper.java
  55. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
  56. 106
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  57. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/mapper/ZyStyleFabricMapper.java
  58. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/IZyStyleFabricService.java
  59. 51
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/impl/ZyStyleFabricServiceImpl.java
  60. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  61. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java
  62. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/xml/ZyStyleModuleMapper.xml
  63. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/IZyStyleModuleService.java
  64. 67
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/impl/ZyStyleModuleServiceImpl.java

@ -4,11 +4,6 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="商品">
<j-dict-select-tag placeholder="请选择商品" v-model="queryParam.goodsId" dictCode="zy_goods,goods_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料">
<j-dict-select-tag placeholder="请选择辅料" v-model="queryParam.accessoriesId" dictCode="zy_accessories,contents,id"/>
@ -18,10 +13,6 @@
<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="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
@ -32,12 +23,14 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('商品辅料表')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<a-button type="primary" icon="reload" @click="gx()">更新</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('商品辅料表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<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-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@ -120,6 +113,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import GoodsAccessoriesModal from './modules/GoodsAccessoriesModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { getAction,postAction } from '@/api/manage'
export default {
name: 'GoodsAccessoriesList',
@ -162,11 +156,12 @@
}
],
url: {
list: "/goodsaccessories/goodsAccessories/list",
list: "/goodsaccessories/goodsAccessories/list?goodsid="+this.$route.query.goodsid,
delete: "/goodsaccessories/goodsAccessories/delete",
deleteBatch: "/goodsaccessories/goodsAccessories/deleteBatch",
exportXlsUrl: "/goodsaccessories/goodsAccessories/exportXls",
importExcelUrl: "goodsaccessories/goodsAccessories/importExcel",
upfl:"/zygoods/zyGoods/upfl",
},
dictOptions:{},
@ -182,12 +177,32 @@
},
},
methods: {
fanHui() {
this.$router.push({
path: '/zygoods/ZyGoodsList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
gx(){
getAction(this.url.upfl, {id: this.$route.query.goodsid}).then((res) => {
if (res.success) {
this.$message.success(res.result);
this.loadData();
} else {
this.$message.error(res.message);
}
});
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'goodsId',text:'商品id',dictCode:'zy_goods,goods_name,id'})
fieldList.push({type:'string',value:'accessoriesId',text:'辅料id',dictCode:'zy_accessories,contents,id'})
fieldList.push({type:'string',value:'goodsId',text:'商品',dictCode:'zy_goods,goods_name,id'})
fieldList.push({type:'string',value:'accessoriesId',text:'辅料',dictCode:'zy_accessories,contents,id'})
this.superFieldList = fieldList
}
}

@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId">
<j-dict-select-tag type="list" v-model="model.goodsId" dictCode="zy_goods,goods_name,id" placeholder="请选择商品" />
<j-dict-select-tag type="list" v-model="model.goodsId" :dictCode="goods" placeholder="请选择商品" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -38,6 +38,7 @@
},
data () {
return {
goods:"zy_goods,goods_name,id,id="+this.$route.query.goodsid,
model:{
},
labelCol: {
@ -50,6 +51,12 @@
},
confirmLoading: false,
validatorRules: {
goodsId: [
{ required: true, message: '请选择商品!'},
],
accessoriesId: [
{ required: true, message: '请选择辅料!'},
],
},
url: {
add: "/goodsaccessories/goodsAccessories/add",

@ -4,11 +4,6 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="商品">
<j-dict-select-tag placeholder="请选择商品" v-model="queryParam.goodsId" dictCode="zy_goods,goods_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="面料">
<j-dict-select-tag placeholder="请选择面料" v-model="queryParam.fabricId" dictCode="zy_fabric,name,id"/>
@ -18,10 +13,6 @@
<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="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
@ -32,12 +23,14 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('商品面料表')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<a-button type="primary" icon="reload" @click="gx()">更新</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('商品面料表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<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-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@ -120,6 +113,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import GoodsFabricModal from './modules/GoodsFabricModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { getAction,postAction } from '@/api/manage'
export default {
name: 'GoodsFabricList',
@ -162,11 +156,12 @@
}
],
url: {
list: "/goodsfabric/goodsFabric/list",
list: "/goodsfabric/goodsFabric/list?goodsid="+this.$route.query.goodsid,
delete: "/goodsfabric/goodsFabric/delete",
deleteBatch: "/goodsfabric/goodsFabric/deleteBatch",
exportXlsUrl: "/goodsfabric/goodsFabric/exportXls",
importExcelUrl: "goodsfabric/goodsFabric/importExcel",
upml:"/zygoods/zyGoods/upml",
},
dictOptions:{},
@ -182,12 +177,32 @@
},
},
methods: {
fanHui() {
this.$router.push({
path: '/zygoods/ZyGoodsList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
gx(){
getAction(this.url.upml, {id: this.$route.query.goodsid}).then((res) => {
if (res.success) {
this.$message.success(res.result);
this.loadData();
} else {
this.$message.error(res.message);
}
});
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'goodsId',text:'商品id',dictCode:'zy_goods,goods_name,id'})
fieldList.push({type:'string',value:'fabricId',text:'面料id',dictCode:'zy_fabric,name,id'})
fieldList.push({type:'string',value:'goodsId',text:'商品',dictCode:'zy_goods,goods_name,id'})
fieldList.push({type:'string',value:'fabricId',text:'面料',dictCode:'zy_fabric,name,id'})
this.superFieldList = fieldList
}
}

@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId">
<j-dict-select-tag type="list" v-model="model.goodsId" dictCode="zy_goods,goods_name,id" placeholder="请选择商品" />
<j-dict-select-tag type="list" v-model="model.goodsId" :dictCode="goods" placeholder="请选择商品" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -38,6 +38,7 @@
},
data () {
return {
goods:"zy_goods,goods_name,id,id="+this.$route.query.goodsid,
model:{
},
labelCol: {
@ -50,6 +51,12 @@
},
confirmLoading: false,
validatorRules: {
goodsId: [
{ required: true, message: '请选择商品!'},
],
fabricId: [
{ required: true, message: '请选择面料!'},
],
},
url: {
add: "/goodsfabric/goodsFabric/add",

@ -5,30 +5,19 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="商品">
<j-dict-select-tag placeholder="请选择商品" v-model="queryParam.goodsId" dictCode="zy_goods,goods_name,id"/>
<a-form-item label="款式">
<j-dict-select-tag placeholder="请选择款式" v-model="queryParam.styleId" dictCode="zy_cloths_style,style_names,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="款式">
<j-dict-select-tag placeholder="请选择款式" v-model="queryParam.styleId" dictCode="zy_cloths_style,style_names,id"/>
<a-form-item label="模块">
<j-dict-select-tag placeholder="请选择模块" v-model="queryParam.moduleId" dictCode="zy_cloths_modular ,modular_name,id"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="模块">
<j-dict-select-tag placeholder="请选择模块" v-model="queryParam.moduleId" dictCode="zy_cloths_modular ,modular_name,id"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
@ -39,12 +28,14 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('商品模块表')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<a-button type="primary" icon="reload" @click="gx()">更新</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('商品模块表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<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-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@ -127,6 +118,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import GoodsModuleModal from './modules/GoodsModuleModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { getAction,postAction } from '@/api/manage'
export default {
name: 'GoodsModuleList',
@ -184,6 +176,7 @@
deleteBatch: "/goodsmodule/goodsModule/deleteBatch",
exportXlsUrl: "/goodsmodule/goodsModule/exportXls",
importExcelUrl: "goodsmodule/goodsModule/importExcel",
upmk:"/zygoods/zyGoods/upmk",
},
dictOptions:{},
@ -199,6 +192,26 @@
},
},
methods: {
fanHui() {
this.$router.push({
path: '/zygoods/ZyGoodsList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
gx(){
getAction(this.url.upmk, {id: this.$route.query.goodsid}).then((res) => {
if (res.success) {
this.$message.success(res.result);
this.loadData();
} else {
this.$message.error(res.message);
}
});
},
initDictConfig(){
},
getSuperFieldList(){

@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId">
<j-dict-select-tag type="list" v-model="model.goodsId" dictCode="zy_goods,goods_name,id" placeholder="请选择商品" />
<j-dict-select-tag type="list" v-model="model.goodsId" :dictCode="goods" placeholder="请选择商品" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -43,6 +43,7 @@
},
data () {
return {
goods:"zy_goods,goods_name,id,id="+this.$route.query.goodsid,
model:{
},
labelCol: {
@ -55,6 +56,15 @@
},
confirmLoading: false,
validatorRules: {
goodsId: [
{ required: true, message: '请选择商品!'},
],
styleId: [
{ required: true, message: '请选择款式!'},
],
moduleId: [
{ required: true, message: '请选择模块!'},
],
},
url: {
add: "/goodsmodule/goodsModule/add",

@ -13,23 +13,29 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('zy_cloths_component')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </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-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-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>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
@ -52,7 +58,8 @@
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<img v-else :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@ -67,32 +74,32 @@
</a-button>
</template>
<span slot="action2" slot-scope="text, record" >
<a @click="viewVid2(record)" >管理</a>
<span slot="action2" slot-scope="text, record">
<a @click="viewVid2(record)">管理</a>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a @click="handleDetail(record.id)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<!-- <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>-->
<!-- <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>-->
</span>
</a-table>
@ -106,148 +113,148 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyClothsComponentModal from './modules/ZyClothsComponentModal'
import ZyProcessComponentList from "@views/process/ZyProcessComponentList"
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil';
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyClothsComponentModal from './modules/ZyClothsComponentModal'
import ZyProcessComponentList from "@views/process/ZyProcessComponentList"
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil';
import ZyClothsComponentListDetail from './modules/ZyClothsComponentListDetail'
export default {
name: 'ZyClothsComponentList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyProcessComponentList,
ZyClothsComponentModal,
ZyClothsComponentListDetail
},
data () {
return {
description: 'zy_cloths_component管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'编号',
align:"center",
dataIndex: 'nums'
},
{
title:'部件名称',
align:"center",
dataIndex: 'partsName'
},
// {
// title:'',
// align:"center",
// dataIndex: 'componentType'
// },
{
title: '服装类型',
align: "center",
dataIndex: 'clothsTypeId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'description'
// },
{
title:'图片',
align:"center",
dataIndex: 'pictureUrl',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'模块',
align:"center",
dataIndex: 'modularId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'modularType_dictText'
// },
{
title:'企业',
align:"center",
dataIndex: 'enterpriseId_dictText'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '部件工序',
dataIndex: 'action2',
align:"center",
scopedSlots: { customRender: 'action2' }
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
export default {
name: 'ZyClothsComponentList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessComponentList,
ZyClothsComponentModal,
ZyClothsComponentListDetail
},
data() {
return {
description: 'zy_cloths_component管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
],
url: {
list: "/base/zyClothsComponent/list",
delete: "/base/zyClothsComponent/delete",
deleteBatch: "/base/zyClothsComponent/deleteBatch",
exportXlsUrl: "/base/zyClothsComponent/exportXls",
importExcelUrl: "base/zyClothsComponent/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
{
title: '编号',
align: "center",
dataIndex: 'nums'
},
{
title: '部件名称',
align: "center",
dataIndex: 'partsName'
},
// {
// title:'',
// align:"center",
// dataIndex: 'componentType'
// },
{
title: '服装类型',
align: "center",
dataIndex: 'clothsTypeId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'description'
// },
{
title: '图片',
align: "center",
dataIndex: 'pictureUrl',
scopedSlots: {customRender: 'imgSlot'}
},
{
title: '模块',
align: "center",
dataIndex: 'modularId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'modularType_dictText'
// },
{
title: '企业',
align: "center",
dataIndex: 'enterpriseId_dictText'
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '部件工序',
dataIndex: 'action2',
align: "center",
scopedSlots: {customRender: 'action2'}
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/base/zyClothsComponent/list",
delete: "/base/zyClothsComponent/delete",
deleteBatch: "/base/zyClothsComponent/deleteBatch",
exportXlsUrl: "/base/zyClothsComponent/exportXls",
importExcelUrl: "base/zyClothsComponent/importExcel",
},
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
viewVid2(record) {
this.$refs.ZyProcessComponentList.showModal2();
this.$refs.ZyProcessComponentList.edit2(record);
this.$refs.ZyProcessComponentList.disableSubmit = false;
},
methods: {
viewVid2(record){
this.$refs.ZyProcessComponentList.showModal2();
this.$refs.ZyProcessComponentList.edit2(record);
this.$refs.ZyProcessComponentList.disableSubmit = false;
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'nums',text:'编号',dictCode:''})
fieldList.push({type:'string',value:'partsName',text:'部件名称',dictCode:''})
fieldList.push({type:'string',value:'componentType',text:'部件类型',dictCode:''})
fieldList.push({type:'string',value:'description',text:'描述',dictCode:''})
fieldList.push({type:'string',value:'pictureUrl',text:'图片',dictCode:''})
fieldList.push({type:'string',value:'modularId',text:'模块',dictCode:'zy_cloths_modular,modular_name,id'})
fieldList.push({type:'string',value:'enterpriseId',text:'企业',dictCode:''})
this.superFieldList = fieldList
},
handleDetail(record){
this.$refs.ZyClothsComponentListDetail.showModal(record)
}
initDictConfig() {
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'nums', text: '编号', dictCode: ''})
fieldList.push({type: 'string', value: 'partsName', text: '部件名称', dictCode: ''})
fieldList.push({type: 'string', value: 'componentType', text: '部件类型', dictCode: ''})
fieldList.push({type: 'string', value: 'description', text: '描述', dictCode: ''})
fieldList.push({type: 'string', value: 'pictureUrl', text: '图片', dictCode: ''})
fieldList.push({type: 'string', value: 'modularId', text: '模块', dictCode: 'zy_cloths_modular,modular_name,id'})
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业', dictCode: ''})
this.superFieldList = fieldList
},
handleDetail(id) {
this.$refs.ZyClothsComponentListDetail.showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

@ -1,13 +1,16 @@
<template>
<!-- <a-card :bordered="false">-->
<a-modal
width="70%"
title="模块部件管理"
:title="biaoTi"
style="font-size: 30px; color: #333"
:visible="visible"
:confirm-loading="confirmLoading"
@ok="handleOk"
@cancel="handleCancel"
>
<!-- <p style="font-size: 20px;color:#333"> {{biaoTi}} 模块部件管理 </p>-->
<!-- 查询区域 -->
<!-- <div class="table-page-search-wrapper">-->
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">-->
@ -124,6 +127,7 @@ export default {
visible: false,
confirmLoading: false,
yid: '',
biaoTi: "",
//
columns: [
{
@ -194,8 +198,11 @@ export default {
//this.ax= this.model.id;
//console.log(topicid);
this.yid = this.model.id;
this.biaoTi = record.modularName+" 模块部件管理";
//this.title = record.modularName;
console.log("+++++ this.biaoTi "+ this.biaoTi)
this.queryParam.modularId = this.model.id;
console.log("aaaaaaa " + this.queryParam.modularId);
console.log("+++++ this.queryParam.modularId: " + this.queryParam.modularId);
this.loadData();
this.visible = true;
},

@ -4,6 +4,33 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="模块名称">
<a-input placeholder="请输入模块名称" v-model="queryParam.modularName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装类型">
<j-dict-select-tag placeholder="请选择服装类型" v-model="queryParam.clothsTypeId"
dictCode="zy_cloths_type,type_name,id"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="企业" >
<j-select-depart v-model="queryParam.enterpriseId" placeholder="请输入企业名称"/>
</a-form-model-item>
</a-col>
<!-- </a-row>-->
<!-- <a-row>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -87,7 +114,7 @@
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a @click="handleDetail(record)">详情</a>
<a @click="handleDetail(record.id)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
@ -115,160 +142,161 @@
<!-- <ZyClothsMcList ref="ZyClothsMcList"></ZyClothsMcList>-->
<ZyClothsModularCompentList ref="ZyClothsModularCompentList"></ZyClothsModularCompentList>
<ZyProcessModularList ref="ZyProcessModularList"></ZyProcessModularList>
<<ZyClothsModularListDetail ref="ZyClothsModularListDetail"></ZyClothsModularListDetail>
<ZyClothsModularListDetail ref="ZyClothsModularListDetail"></ZyClothsModularListDetail>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyClothsModularModal from './modules/ZyClothsModularModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import ZyClothsModularCompentList from "@views/process/ZyClothsModularCompentList";
import ZyProcessModularList from "@views/zyProcessModular/ZyProcessModularList";
import ZyClothsModularListDetail from './modules/ZyClothsModularListDetail'
export default {
name: 'ZyClothsModularList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessModularList,
ZyClothsModularCompentList,
ZyClothsModularModal,
ZyClothsModularListDetail
},
data() {
return {
description: '制衣模块 zy_cloths_modular管理页面',
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyClothsModularModal from './modules/ZyClothsModularModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import ZyClothsModularCompentList from "@views/process/ZyClothsModularCompentList";
import ZyProcessModularList from "@views/zyProcessModular/ZyProcessModularList";
import ZyClothsModularListDetail from './modules/ZyClothsModularListDetail'
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '编号',
align: "center",
dataIndex: 'nums'
},
{
title: '模块名称',
align: "center",
dataIndex: 'modularName'
},
// {
// title: '',
// align: "center",
// dataIndex: 'modularType_dictText'
// },
// {
// title: '',
// align: "center",
// dataIndex: 'description'
// },
{
title: '服装类型',
align: "center",
dataIndex: 'clothsTypeId_dictText'
},
{
title: '企业',
align: "center",
dataIndex: 'enterpriseId_dictText'
},
{
title: '图片',
align: "center",
dataIndex: 'pictureUrl',
scopedSlots: {customRender: 'imgSlot'}
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '模块部件',
dataIndex: 'action2',
align:"center",
// fixed:"right",
scopedSlots: { customRender: 'action2' }
},
{
title: '模块工序',
dataIndex: 'action3',
align:"center",
// fixed:"right",
scopedSlots: { customRender: 'action3' }
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/base/zyClothsModular/list",
delete: "/base/zyClothsModular/delete",
deleteBatch: "/base/zyClothsModular/deleteBatch",
exportXlsUrl: "/base/zyClothsModular/exportXls",
importExcelUrl: "base/zyClothsModular/importExcel",
export default {
name: 'ZyClothsModularList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessModularList,
ZyClothsModularCompentList,
ZyClothsModularModal,
ZyClothsModularListDetail
},
data() {
return {
description: '制衣模块 zy_cloths_modular管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '编号',
align: "center",
dataIndex: 'nums'
},
{
title: '模块名称',
align: "center",
dataIndex: 'modularName'
},
// {
// title: '',
// align: "center",
// dataIndex: 'modularType_dictText'
// },
// {
// title: '',
// align: "center",
// dataIndex: 'description'
// },
{
title: '服装类型',
align: "center",
dataIndex: 'clothsTypeId_dictText'
},
{
title: '企业',
align: "center",
dataIndex: 'enterpriseId_dictText'
},
{
title: '图片',
align: "center",
dataIndex: 'pictureUrl',
scopedSlots: {customRender: 'imgSlot'}
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
dictOptions: {},
superFieldList: [],
}
{
title: '模块部件',
dataIndex: 'action2',
align: "center",
// fixed:"right",
scopedSlots: {customRender: 'action2'}
},
{
title: '模块工序',
dataIndex: 'action3',
align: "center",
// fixed:"right",
scopedSlots: {customRender: 'action3'}
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/base/zyClothsModular/list",
delete: "/base/zyClothsModular/delete",
deleteBatch: "/base/zyClothsModular/deleteBatch",
exportXlsUrl: "/base/zyClothsModular/exportXls",
importExcelUrl: "base/zyClothsModular/importExcel",
},
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
created() {
this.getSuperFieldList();
},
methods: {
viewVid(record) {
this.$refs.ZyClothsModularCompentList.showModal1();
this.$refs.ZyClothsModularCompentList.edit1(record);
console.log("制衣模块传给模块部件的id zyclothsMclist" + record.id);
this.$refs.ZyClothsModularCompentList.disableSubmit = false;
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
viewVid2(record) {
this.$refs.ZyProcessModularList.showModal1();
this.$refs.ZyProcessModularList.edit1(record);
console.log("父弹窗ID++++++:" + record.id);
this.$refs.ZyProcessModularList.disableSubmit = false;
},
methods: {
viewVid(record){
this.$refs.ZyClothsModularCompentList.showModal1();
this.$refs.ZyClothsModularCompentList.edit1(record);
console.log("zyclothsMclist"+record.id);
this.$refs.ZyClothsModularCompentList.disableSubmit = false;
},
viewVid2(record){
this.$refs.ZyProcessModularList.showModal1();
this.$refs.ZyProcessModularList.edit1(record);
console.log("父弹窗ID++++++:"+record.id);
this.$refs.ZyProcessModularList.disableSubmit = false;
},
initDictConfig() {
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'nums', text: '编号', dictCode: ''})
fieldList.push({type: 'string', value: 'modularName', text: '模块名称', dictCode: ''})
fieldList.push({type: 'string', value: 'description', text: '描述', dictCode: ''})
fieldList.push({type: 'string', value: 'clothsTypeId', text: '衣服类型', dictCode: 'zy_cloths_type,type_name,id'})
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业', dictCode: ''})
fieldList.push({type: 'string', value: 'pictureUrl', text: '图片', dictCode: ''})
this.superFieldList = fieldList
},
handleDetail(record){
this.$refs.ZyClothsModularListDetail.showModal(record)
}
initDictConfig() {
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'nums', text: '编号', dictCode: ''})
fieldList.push({type: 'string', value: 'modularName', text: '模块名称', dictCode: ''})
fieldList.push({type: 'string', value: 'description', text: '描述', dictCode: ''})
fieldList.push({type: 'string', value: 'clothsTypeId', text: '衣服类型', dictCode: 'zy_cloths_type,type_name,id'})
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业', dictCode: ''})
fieldList.push({type: 'string', value: 'pictureUrl', text: '图片', dictCode: ''})
this.superFieldList = fieldList
},
handleDetail(id) {
this.$refs.ZyClothsModularListDetail.showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

@ -21,9 +21,9 @@
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="enterpriseId" placeholder="请输入企业名称" />
</a-form-model-item>
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="enterpriseId" placeholder="请输入企业名称" />
</a-form-model-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">

@ -7,12 +7,13 @@
:width='1000'
@ok="handleOk"
@cancel="handleCancel">
<a-spin :spinning="confirmLoading">
<p class="title">制衣部件详情</p>
<a-descriptions title="" bordered>
<a-descriptions-item label="企业">{{model.enterpriseId_dictText}}</a-descriptions-item>
<a-descriptions-item label="服装类型">{{model.clothsTypeId_dictText}}</a-descriptions-item>
<a-descriptions-item label="企业">{{model.enterpriseId}}</a-descriptions-item>
<a-descriptions-item label="服装类型">{{model.clothsTypeId}}</a-descriptions-item>
<a-descriptions-item label="部件名称">{{model.partsName}}</a-descriptions-item>
<a-descriptions-item label="模块">{{model.modularId_dictText}}</a-descriptions-item>
<a-descriptions-item label="模块">{{model.modularId}}</a-descriptions-item>
<a-descriptions-item label="描述" :span="2">{{model.description}}</a-descriptions-item>
<a-descriptions-item label="图片" :span="3">
<img v-if="model.pictureUrl" :src="model.pictureUrl" alt="无法显示"></img>
@ -20,8 +21,9 @@
</a-descriptions-item>
</a-descriptions>
<p class="title">部件工序详情</p>
<a-table :columns="columns1" :data-source="data1" bordered :pagination="false">
<a-table :columns="columns1" :data-source="data1" rowKey="id" bordered :pagination="false">
</a-table>
</a-spin>
</a-modal>
</div>
</template>
@ -38,20 +40,20 @@
},
{
title: '部件',
dataIndex: 'nums',
key: 'nums',
dataIndex: 'componentId',
key: 'componentId',
align:'center'
},
{
title: '工序',
dataIndex: 'modularId_dictText',
key: 'modularId_dictText',
dataIndex: 'processId',
key: 'processId',
align:'center'
},
{
title: '是否瓶颈工序',
dataIndex: 'partsName',
key: 'partsName',
dataIndex: 'bottleneck',
key: 'bottleneck',
align:'center'
},
{
@ -61,40 +63,41 @@
align:'center'
},
];
const data1 = [
{
key: '1',
nums:'gfhjf',
modularId_dictText:'1-3合后育克',
partsName:'是',
createTime:'2022-12-06 19:00:07'
},
// {
// key: '2',
// nums:'aaff',
// modularId_dictText:'1-3',
// partsName:'',
// createTime:'2022-12-06 18:30:49'
// }
]
export default {
name: 'ZyClothsComponentListDetail',//
data () {
return {
visible: false,
confirmLoading: false,
confirmLoading:true,
model:{
},
data1,
data1:[],
columns1,
}
},
methods: {
showModal(record) {
showModal(id) {
this.visible = true;
this.model = record
console.log('record')
console.log(record)
this.$http.get('/base/zyClothsComponent/detail?id='+id).then(
res=>{
this.model = res.result.zyClothsComponent
this.data1 = res.result.zyProcessComponents
this.confirmLoading = false
// this.model = res.result.zyClothsComponent
// this.ProcessData = res.result.zyProcess
// this.basicActionData = res.result.zyClothActions
// this.accessoriesData = res.result.zyFabrics
// this.fabricData = res.result.zyAccessories
console.log('工序详情页')
console.log(res.result)
// console.log(this.data)
// console.log(this.accessoriesData)
// console.log(this.fabricData)
// this.img = "http://10.100.200.112/jeecg-boot/sys/common/static/"+this.data.image;
// this.mp4 = "http://10.100.200.112/jeecg-boot/sys/common/static/"+this.data.vedio;
}
)
},
handleOk(e) {
this.confirmLoading = true;

@ -8,28 +8,47 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-cloths-modular-compent-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-cloths-modular-compent-form>
<!-- <zy-cloths-modular-compent-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-cloths-modular-compent-form>-->
<zy-cloths-component-list ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback"
:disabled="disableSubmit"></zy-cloths-component-list>
</j-modal>
</template>
<script>
import ZyClothsModularCompentForm from './ZyClothsModularCompentForm'
// import ZyClothsModularCompentForm from './ZyClothsModularCompentForm'
import ZyClothsComponentList from "@views/process/modules/list/ZyClothsComponentList";
import {postAction} from "@api/manage";
export default {
name: 'ZyClothsModularCompentModal',
components: {
ZyClothsModularCompentForm
ZyClothsComponentList,
// ZyClothsModularCompentForm
},
data () {
return {
model:{
componentId: '',
modularId: '',
},
title:'',
width:800,
width:1000,
visible: false,
disableSubmit: false
disableSubmit: false,
url: {
add: "/base/zyClothsModularCompent/add",
edit: "/base/zyClothsModularCompent/edit",
queryById: "/base/zyClothsModularCompent/queryById"
}
}
},
methods: {
add1 (id) {
//this.model.componentId = this.$route.query.id;
// id
this.model.modularId = id;
console.log('this.modularId'+id)
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add1(id);
@ -45,8 +64,20 @@
this.$emit('close');
this.visible = false;
},
chuancan(res) {
this.model.componentId = res;
},
handleOk () {
this.$refs.realForm.submitForm();
// this.$refs.realForm.submitForm();
postAction(this.url.add, this.model).then((res) => {
if (res.success) {
this.$message.success(res.message);
} else {
this.$message.warning(res.message);
}
this.$emit('valueChange', 1)
this.close()
})
},
submitCallback(){
this.$emit('ok');

@ -1,28 +1,49 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-form-model ref="model" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="48">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" placeholder="请选择企业"/>
<j-select-depart v-model="model.enterpriseId" placeholder="请选择企业"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="48">
<a-form-model-item label="模块名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularName">
<a-input v-model="model.modularName" placeholder="请输入模块名称" ></a-input>
<a-input v-model="model.modularName" placeholder="请输入模块名称"></a-input>
<!-- <a-input v-model="model.modularName" placeholder="请输入模块名称(最多30字)" :maxLength="30"></a-input>-->
<!-- <a-input v-model="model.modularName" placeholder="请输入模块名称" ></a-input>-->
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<!-- <a-col :span="48">-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择服装类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="48">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">
<j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择服装类型" />
<a-form-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">
<j-tree-select v-model="model.clothsTypeId"
dict="zy_cloths_type,type_name,id"
pidField="type_id"
placeholder="请选择服装类型"
@change="bianhao">
</j-tree-select>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" disabled></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="48">
<a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">
@ -33,7 +54,7 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">
<j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>
<j-image-upload isMultiple v-model="model.pictureUrl"></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
@ -44,10 +65,7 @@
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">-->
<!-- <a-input v-model="model.nums" placeholder="请输入编号" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="模块名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularName">-->
@ -89,103 +107,120 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {httpAction, getAction} from '@/api/manage'
import {validateDuplicateValue} from '@/utils/util'
import JTreeSelect from '@/components/jeecg/JTreeSelect'
export default {
name: 'ZyClothsModularForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
export default {
name: 'ZyClothsModularForm',
components: {
JTreeSelect
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data() {
return {
model: {},
labelCol: {
xs: {span: 24},
sm: {span: 4},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
validatorRules: {
// nums: [
// { required: true, message: '!'},
// ],
modularName: [
{required: true, message: '请输入模块名称!'},
//{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;!()?]{0,50}$/, message: ''},
{min: 1, max: 30, message: '最多输入30字!', trigger: 'blur'},
],
clothsTypeId: [
{required: true, message: '请选择衣服类型!'},
]
},
url: {
add: "/base/zyClothsModular/add",
edit: "/base/zyClothsModular/edit",
queryById: "/base/zyClothsModular/queryById",
//getActionurl
sort: "/base/zyClothsModular/sort"
}
}
},
computed: {
formDisabled() {
return this.disabled
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 4 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
// nums: [
// { required: true, message: '!'},
// ],
modularName: [
{ required: true, message: '请输入模块名称!'},
],
clothsTypeId: [
{ required: true, message: '请选择衣服类型!'},
]
},
url: {
add: "/base/zyClothsModular/add",
edit: "/base/zyClothsModular/edit",
queryById: "/base/zyClothsModular/queryById"
}
}
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
bianhao() {
//var n=6
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
let num = res.result;
console.log("+6++++aaa" + num)
//num=num.toString()
//while(num.length<n){
//num="0"+num
//}
console.log(num)
this.model.nums = num;
})
},
computed: {
formDisabled(){
return this.disabled
},
add() {
this.edit(this.modelDefault);
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
edit(record) {
this.model = Object.assign({}, record);
this.visible = true;
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
submitForm() {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if (!this.model.id) {
httpurl += this.url.add;
method = 'post';
} else {
httpurl += this.url.edit;
method = 'put';
}
})
},
}
httpAction(httpurl, this.model, method).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.$emit('ok');
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>
<style scoped>
.ant-form-item{
margin-bottom: 16px;
}
.ant-form-item {
margin-bottom: 16px;
}
</style>

@ -7,24 +7,26 @@
:width='1000'
@ok="handleOk"
@cancel="handleCancel">
<a-spin :spinning="confirmLoading">
<p class="title">制衣模块详情</p>
<a-descriptions title="" bordered>
<a-descriptions-item label="企业">{{model.enterpriseId_dictText}}</a-descriptions-item>
<a-descriptions-item label="企业">{{model.enterpriseId}}</a-descriptions-item>
<a-descriptions-item label="编号">{{model.nums}}</a-descriptions-item>
<a-descriptions-item label="模块名称">{{model.modularName}}</a-descriptions-item>
<a-descriptions-item label="服装类型">{{model.clothsTypeId_dictText}}</a-descriptions-item>
<a-descriptions-item label="服装类型">{{model.clothsTypeId}}</a-descriptions-item>
<a-descriptions-item label="描述" :span="2">{{model.description}}</a-descriptions-item>
<a-descriptions-item label="图片" :span="3">
<img v-if="model.pictureUrl" :src="model.pictureUrl" alt="无法显示"></img>
<img v-if="img" :src="img" alt="无法显示"></img>
<span v-else>暂无图片</span>
</a-descriptions-item>
</a-descriptions>
<p class="title">模块部件详情</p>
<a-table :columns="columns1" :data-source="data1" bordered :pagination="false">
<a-table :columns="columns1" :data-source="data1" rowKey="id" bordered :pagination="false">
</a-table>
<p class="title">模块工序详情</p>
<a-table :columns="columns2" :data-source="data2" bordered :pagination="false">
<a-table :columns="columns2" :data-source="data2" rowKey="id" bordered :pagination="false">
</a-table>
</a-spin>
</a-modal>
</div>
</template>
@ -43,8 +45,10 @@
},
{
title: '模块名称',
dataIndex: 'modularId_dictText',
key: 'modularId_dictText',
// dataIndex: 'modularId_dictText',
// key: 'modularId_dictText',
dataIndex: 'modularId',
key: 'modularId',
align:'center'
},
{
@ -60,29 +64,6 @@
align:'center'
},
];
const data1 = [
{
key: '1',
nums:'tttt',
modularId_dictText:'tttt',
partsName:'大袖衩',
createTime:'2022-12-06 19:00:07'
},
{
key: '2',
nums:'aaff',
modularId_dictText:'tttt',
partsName:'外片',
createTime:'2022-12-06 18:30:49'
},
{
key: '3',
nums:'test01',
modularId_dictText:'tttt',
partsName:'大片',
createTime:'2022-12-06 09:07:05'
}
]
const columns2 = [
{
title:'索引',
@ -91,14 +72,14 @@
},
{
title: '模块名称',
dataIndex: 'modularId_dictText',
key: 'modularId_dictText',
dataIndex: 'modularId',
key: 'modularId',
align:'center'
},
{
title: '工序名称',
dataIndex: 'processId_dictText',
key: 'processId_dictText',
dataIndex: 'processId',
key: 'processId',
align:'center'
},
{
@ -108,46 +89,42 @@
align:'center'
},
];
const data2 = [
{
key: '1',
modularId_dictText:'tttt',
processId_dictText:'1-3合后育克',
createTime:'2022-12-06 19:00:07'
},
{
key: '2',
modularId_dictText:'tttt',
processId_dictText:'模板运袋盖',
createTime:'2022-12-06 18:30:49'
},
{
key: '3',
modularId_dictText:'tttt',
processId_dictText:'1-4辑后育克0.1cm明线',
createTime:'2022-12-06 09:07:05'
}
]
export default {
name: 'ZyClothsModularListDetail',//
data () {
return {
visible: false,
confirmLoading: false,
model:{
},
data1,
data1:[],
columns1,
data2,
data2:[],
columns2,
img:'',
mp4:'',
confirmLoading:true
}
},
methods: {
showModal(record) {
showModal(id) {
this.visible = true;
this.model = record
console.log('record')
console.log(record)
// this.model = record
this.$http.get('/base/zyClothsModular/detail?id='+id).then(
res=>{
// this.data = res.result
this.model = res.result.zyClothsModular
this.data1 = res.result.zyClothsModularComponents
this.data2 = res.result.zyProcessModularVos
this.confirmLoading = false
// this.ProcessData = res.result.zyProcess
// this.basicActionData = res.result.zyClothActions
// this.accessoriesData = res.result.zyFabrics
// this.fabricData = res.result.zyAccessories
// this.img = "http://10.100.200.112/jeecg-boot/sys/common/static/"+this.data.image;
// this.mp4 = "http://10.100.200.112/jeecg-boot/sys/common/static/"+this.data.vedio;
}
)
},
handleOk(e) {
this.confirmLoading = true;

@ -0,0 +1,254 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<!-- <div class="table-operator">-->
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('zy_cloths_component')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!-- </a-dropdown>-->
<!-- </div>-->
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange1}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<!-- <span slot="action2" slot-scope="text, record" >-->
<!-- <a @click="viewVid2(record)" >管理</a>-->
<!-- </span>-->
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical" />-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- <a-divider type="vertical" />-->
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<!-- <zy-cloths-component-modal ref="modalForm" @ok="modalFormOk"></zy-cloths-component-modal>-->
<!-- <ZyProcessComponentList ref="ZyProcessComponentList"></ZyProcessComponentList>-->
<!-- <ZyClothsComponentListDetail ref="ZyClothsComponentListDetail"></ZyClothsComponentListDetail>-->
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil';
export default {
name: 'ZyClothsComponentList',
mixins:[JeecgListMixin, mixinDevice],
components: {},
data () {
return {
model:{
fuId: '',
},
description: 'zy_cloths_component管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'编号',
align:"center",
dataIndex: 'nums'
},
{
title:'模块类型',
align:"center",
dataIndex: 'modularType'
},
{
title:'部件名称',
align:"center",
dataIndex: 'partsName'
},
// {
// title:'',
// align:"center",
// dataIndex: 'componentType'
// },
// {
// title: '',
// align: "center",
// dataIndex: 'clothsTypeId_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'description'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'pictureUrl',
// scopedSlots: {customRender: 'imgSlot'}
// },
// {
// title:'',
// align:"center",
// dataIndex: 'modularId_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'modularType_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'enterpriseId_dictText'
// },
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
// {
// title: '',
// dataIndex: 'action2',
// align:"center",
// scopedSlots: { customRender: 'action2' }
// },
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/base/zyClothsComponent/list",
delete: "/base/zyClothsComponent/delete",
deleteBatch: "/base/zyClothsComponent/deleteBatch",
exportXlsUrl: "/base/zyClothsComponent/exportXls",
importExcelUrl: "base/zyClothsComponent/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
// viewVid2(record){
// this.$refs.ZyProcessComponentList.showModal2();
// this.$refs.ZyProcessComponentList.edit2(record);
// this.$refs.ZyProcessComponentList.disableSubmit = false;
// },
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (let a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey', ids)
},
add1(id) {
//this.model.fuId = id;
console.log("弹窗list层接受到的id 应该等于modularName: "+id);
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'nums',text:'编号',dictCode:''})
fieldList.push({type:'string',value:'partsName',text:'部件名称',dictCode:''})
fieldList.push({type:'string',value:'componentType',text:'部件类型',dictCode:''})
fieldList.push({type:'string',value:'description',text:'描述',dictCode:''})
fieldList.push({type:'string',value:'pictureUrl',text:'图片',dictCode:''})
fieldList.push({type:'string',value:'modularId',text:'模块',dictCode:'zy_cloths_modular,modular_name,id'})
fieldList.push({type:'string',value:'enterpriseId',text:'企业',dictCode:''})
this.superFieldList = fieldList
},
handleDetail(record){
this.$refs.ZyClothsComponentListDetail.showModal(record)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -1,5 +1,6 @@
<template>
<div>
<a-modal
title="服装款式详情"
:visible="visible"
@ -45,22 +46,22 @@
<!-- </tr>-->
<!-- </table>-->
<a-spin :spinning="confirmLoading">
<h3 style="width: 98%;;margin:0px auto">款式详情</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto" :columns="columns1" :data-source="data1" bordered :pagination="false">
<a-table style="width: 98%;font-size:14px;margin:10px auto" :columns="columns1" :data-source="data1" bordered rowKey="nums" :pagination="false">
</a-table>
<h3 style="width: 98%;;margin:20px auto 0">管理模块</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns" :data-source="data" bordered :pagination="false">
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns" :data-source="data" rowKey="id" bordered :pagination="false">
</a-table>
<h3 style="width: 98%;;margin:20px auto 0">管理面料</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns2" :data-source="data2" bordered :pagination="false">
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns2" :data-source="data2" rowKey="id" bordered :pagination="false">
</a-table>
<h3 style="width: 98%;;margin:20px auto 0">管理辅料</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns3" :data-source="data3" bordered :pagination="false">
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns3" :data-source="data3" rowKey="id" bordered :pagination="false">
</a-table>
@ -70,221 +71,155 @@
<!-- </a-table>-->
<h3 style="width: 98%;;margin:20px auto 0">管理工序</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns5" :data-source="data5" bordered :pagination="false">
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns5" :data-source="data5" rowKey="id" bordered :pagination="false">
</a-table>
</a-spin>
</a-modal>
</div>
</template>
<script>
const columns1 = [
{
title: '款式名称',
dataIndex: 'a',
key: 'a',
dataIndex: 'styleNames',
key: 'styleNames',
align:'center'
},
{
title: '款式编号',
dataIndex: 'b',
key: 'b',
dataIndex: 'nums',
key: 'nums',
align:'center'
},
{
title: '款式规格',
dataIndex: 'c',
key: 'c',
dataIndex: 'specification',
key: 'specification',
align:'center'
},
{
title: '款式形式',
dataIndex: 'd',
key: 'd',
dataIndex: 'shape',
key: 'shape',
align:'center'
},
{
title: '企业',
dataIndex: 'e',
key: 'e',
dataIndex: 'enterpriseId',
key: 'enterpriseId',
align:'center'
},
{
title: '款式创建时间',
dataIndex: 'f',
key: 'f',
dataIndex: 'createTime',
key: 'createTime',
align:'center'
},
];
const data1 = [
{
key:'1',
a:'tttt',
b:'QIYE80301100000130',
c:'123',
d:'预制',
e:'黄淮服装智能制造中心',
f:'2022-12-06 10:02:59',
}
];
const columns = [
{
title: '服装类型',
dataIndex: 'a',
key: 'a',
dataIndex: 'typeName',
key: 'typeName',
align:'center'
},
{
title: '款式编号',
dataIndex: 'b',
key: 'b',
dataIndex: 'styleNums',
key: 'styleNums',
align:'center'
},
{
title: '款式名称',
dataIndex: 'c',
key: 'c',
dataIndex: 'styleNames',
key: 'styleNames',
align:'center'
},
{
title: '模块编号',
dataIndex: 'd',
key: 'd',
dataIndex: 'modularNums',
key: 'modularNums',
align:'center'
},
{
title: '模块名称',
dataIndex: 'e',
key: 'e',
dataIndex: 'modularName',
key: 'modularName',
align:'center'
},
{
title: '创建时间',
dataIndex: 'f',
key: 'f',
dataIndex: 'createTime',
key: 'createTime',
align:'center'
}
];
const data = [
{
key: '1',
a:'女衬衫',
b:'a000400000014',
c:'test010',
d:'QIYE80301100000021',
e:'tttt',
f:'2022-12-06 10:02:59',
},
{
key: '2',
a:'女衬衫',
b:'a000400000014',
c:'test010',
d:'a000180301100000022',
e:'袖口模块A1',
f:'2022-12-06 10:02:59',
}, {
key: '3',
a:'女衬衫',
b:'a000400000014',
c:'test010',
d:'b0005',
e:'领子模块',
f:'2022-12-06 10:02:59',
}
];
const columns2 = [
{
title: '服装类型',
dataIndex: 'a',
key: 'a',
dataIndex: 'typeName',
key: 'typeName',
align:'center'
},
{
title: '款式编号',
dataIndex: 'b',
key: 'b',
dataIndex: 'styleNums',
key: 'styleNums',
align:'center'
},
{
title: '款式名称',
dataIndex: 'c',
key: 'c',
dataIndex: 'styleNames',
key: 'styleNames',
align:'center'
},
{
title: '面料编号',
dataIndex: 'd',
key: 'd',
dataIndex: 'fabricNumber',
key: 'fabricNumber',
align:'center'
},
{
title: '面料名称',
dataIndex: 'e',
key: 'e',
dataIndex: 'fabricName',
key: 'fabricName',
align:'center'
},
{
title: '创建时间',
dataIndex: 'f',
key: 'f',
dataIndex: 'createTime',
key: 'createTime',
align:'center'
}
];
const data2 = [
{
key: '1',
a:'女衬衫',
b:'a000400000014',
c:'test010',
d:'1002',
e:'面料2',
f:'2022-12-06 10:02:59',
},
{
key: '2',
a:'女衬衫',
b:'a000400000014',
c:'test010',
d:'1003',
e:'面料3',
f:'2022-12-06 10:02:59',
}
];
const columns3 = [
{
title: '服装类型名称',
dataIndex: 'a',
key: 'a',
dataIndex: 'typeName',
key: 'typeName',
align:'center'
},
{
title: '款式名称',
dataIndex: 'c',
key: 'c',
dataIndex: 'styleId',
key: 'styleId',
align:'center'
},
{
title: '辅料名称',
dataIndex: 'e',
key: 'e',
dataIndex: 'accessoriesId',
key: 'accessoriesId',
align:'center'
},
{
title: '创建时间',
dataIndex: 'f',
key: 'f',
dataIndex: 'createTime',
key: 'createTime',
align:'center'
}
];
const data3 = [
{
key: '1',
a:'女衬衫',
c:'test010',
e:'123',
f:'2022-12-06 10:02:59',
}
];
const columns4 = [
{
title: '服装款式',
@ -383,65 +318,89 @@
const columns5 = [
{
title: '款式名称',
dataIndex: 'a',
key: 'a',
dataIndex: 'styleId',
key: 'styleId',
align:'center'
},
{
title: '工序',
dataIndex: 'c',
key: 'c',
dataIndex: 'processId',
key: 'processId',
align:'center'
},
{
title: '创建时间',
dataIndex: 'f',
key: 'f',
dataIndex: 'createTime',
key: 'createTime',
align:'center'
}
];
const data5 = [
{
key: '1',
a:'test010',
c:'9',
f:'2022-12-06 10:02:59',
},
{
key: '2',
a:'test010',
c:'8',
f:'2022-12-06 10:02:59',
}
];
export default {
name: 'ZyClothsStyleListDetail',//
data () {
return {
visible: false,
confirmLoading: false,
model:{
},
data,
confirmLoading:true,
//
data:[],
columns,
data1,
//
data1:[],
columns1,
data2,
//
data2:[],
columns2,
data3,
//
data3:[],
columns3,
//
columns4,
data4,
//
columns5,
data5,
data5:[],
url: {
detail: "/zyclothsstyle/zyClothsStyle/detail",
},
id:'',
}
},
methods: {
showModal(record) {
this.visible = true;
this.model = record
console.log('this.model')
console.log(this.model)
this.id = record.id
// this.$http.get('/zyclothsstyle/zyClothsStyle/detail?id='+record.id).then(
// res=>{
// console.log('res')
// console.log(res.result.zyClothsStyle)
// this.data1.push(res.result.zyClothsStyle)
// }
// )
this.getDetailData()
},
async getDetailData(){
const {data:res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/detail?id='+this.id)
if (res.code !== 200) {
this.$message({
type: 'error',
message: '查询不到知识点数据'
});
}
this.confirmLoading = false
console.log('res.result')
console.log(res.result)
if(this.data1.length == 0){
this.data1.push(res.result.zyClothsStyle)
}
this.data2 = res.result.zyStyleFabricList
this.data3 = res.result.zyStyleAccessoriesList
this.data = res.result.zyStyleModuleList
this.data5 = res.result.zyStyleModularList
console.log('data')
console.log(this.data)
},
handleOk(e) {
this.confirmLoading = true;

@ -119,16 +119,21 @@
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
@click="lookFile(text)">
预览
</a-button>
</template>
<template slot="mk" slot-scope="text, record">
<a @click="goodsModule(record)">管理</a>
</template>
<template slot="ml" slot-scope="text, record">
<a @click="goodsModule2(record)">管理</a>
</template>
<template slot="fl" slot-scope="text, record">
<a @click="goodsModule3(record)">管理</a>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="goodsModule(record)">模块</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@ -279,6 +284,21 @@
align:"center",
dataIndex: 'enterprisesId_dictText'
},
{
title: '商品模块',
align: "center",
scopedSlots: {customRender: 'mk'}
},
{
title: '商品面料',
align: "center",
scopedSlots: {customRender: 'ml'}
},
{
title: '商品辅料',
align: "center",
scopedSlots: {customRender: 'fl'}
},
{
title: '操作',
dataIndex: 'action',
@ -309,6 +329,19 @@
},
},
methods: {
lookFile (fileUrl) {
let file=window._CONFIG['domianURL']+"/sys/common/static/"+fileUrl
let Base64 = require('js-base64').Base64;
let url =window._CONFIG['onlinePreviewDomainURL']+ '/onlinePreview?url=' + encodeURIComponent(Base64.encode(file))
window.open(url);
// var url = 'http://10.100.200.112/jeecg-boot/sys/common/static/'+text; //访
// window.open('http://10.100.200.112/KKFileView/onlinePreview?url='+encodeURIComponent(url));//
// var url = text; //访
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(url)));
},
goodsModule(record)
{
this.$router.push({
@ -318,6 +351,24 @@
}
});
},
goodsModule2(record)
{
this.$router.push({
path: '/goodsfabric/GoodsFabricList',
query: { //
'goodsid': record.id,
}
});
},
goodsModule3(record)
{
this.$router.push({
path: '/goodsaccessories/GoodsAccessoriesList',
query: { //
'goodsid': record.id,
}
});
},
initDictConfig(){
},
getSuperFieldList(){

@ -178,7 +178,8 @@
add: "/zygoods/zyGoods/add",
edit: "/zygoods/zyGoods/edit",
queryById: "/zygoods/zyGoods/queryById",
zy:"/zygoods/zyGoods/getspbh"
zy:"/zygoods/zyGoods/getspbh",
zystyle:"/zygoods/zyGoods/getzystyle",
}
}
},
@ -200,6 +201,16 @@
},
getxh(){
this.xh ="zy_style_model,model_number,id,style_id='" + this.model.styleId + "'";
getAction(this.url.zystyle, {ksid:this.model.styleId}).then((res) => {
if (res.success) {
// this.$forceUpdate();
this.$set(this.model,'goodsIntr',res.result.productOverview);
this.$set(this.model,'goodsPicture',res.result.designSketch);
this.$set(this.model,'defaultPicture',res.result.designSketch);
} else {
}
});
},
getspbh(){
getAction(this.url.zy, {lxid:this.model.clothsTypeId,xhid:this.model.modelId}).then((res) => {

@ -3,6 +3,8 @@ package org.jeecg.modules.demo.zyStyleModular.service;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
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 IZyStyleModularService extends IService<ZyStyleModular> {
List<ZyStyleModular> detail(String id);
}

@ -7,6 +7,9 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.List;
/**
* @Description: 款式工序表
* @Author: jeecg-boot
@ -16,4 +19,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyStyleModularServiceImpl extends ServiceImpl<ZyStyleModularMapper, ZyStyleModular> implements IZyStyleModularService {
@Resource
private ZyStyleModularMapper zyStyleModularMapper;
@Override
public List<ZyStyleModular> detail(String id) {
List<ZyStyleModular> list = zyStyleModularMapper.selectListByStyleId(id);
return list;
}
}

@ -12,6 +12,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsComponentDetail;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsModularDetail;
import org.jeecg.modules.demo.base.entity.vo.ZyProcessVo;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
@ -79,6 +81,20 @@ public class ZyClothsComponentController extends JeecgController<ZyClothsCompone
// return Result.OK(list);
// }
/**
* 制衣部件详情
* @param id 根据制衣部件id进行查询
*/
@AutoLog(value = "制衣部件详情")
@ApiOperation(value = "制衣部件详情", notes = "根据制衣部件详情id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("controller层接受到的id:zy_cloths_component对象 Id: "+id);
ZyClothsComponentDetail detail = zyClothsComponentService.queryDetail(id);
return Result.OK(detail);
}
/**
* 添加
*

@ -12,14 +12,14 @@ import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import org.jeecg.modules.demo.base.mapper.ZyClothsComponentMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularCompentMapper;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.NumberUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
@ -41,7 +41,10 @@ public class ZyClothsModularCompentController extends JeecgController<ZyClothsMo
@Autowired
private IZyClothsModularCompentService zyClothsModularCompentService;
@Autowired
IZyClothsComponentService zyClothsComponentService;
private IZyClothsComponentService zyClothsComponentService;
@Resource
private ZyClothsModularCompentMapper zyClothsModularCompentMapper;
/**
* 分页列表查询
@ -58,17 +61,24 @@ public class ZyClothsModularCompentController extends JeecgController<ZyClothsMo
public Result<?> queryPageList(ZyClothsModularCompent zyClothsModularCompent,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
String modularId,
HttpServletRequest req) {
System.out.println("接受到的modularId: "+modularId);
QueryWrapper<ZyClothsModularCompent> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsModularCompent, req.getParameterMap());
queryWrapper.eq("modular_id", modularId);
Page<ZyClothsModularCompent> page = new Page<ZyClothsModularCompent>(pageNo, pageSize);
IPage<ZyClothsModularCompent> pageList = zyClothsModularCompentService.page(page, queryWrapper);
List<ZyClothsModularCompent> recordList = zyClothsModularCompentMapper.queryList(modularId);
pageList.setRecords(recordList);
List<ZyClothsModularCompent> records = pageList.getRecords();
Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
//Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
//只要数字 如果是纯数字 就把它替换了
Pattern pattern = Pattern.compile("[^0-9]");
for (ZyClothsModularCompent s : records) {
String partsName = s.getPartsName();
if (pattern.matcher(partsName).matches()){
if (pattern.matcher(partsName).matches()) {
ZyClothsComponent byId = zyClothsComponentService.getById(partsName);
s.setPartsName(byId.getPartsName()) ;
s.setPartsName(byId.getPartsName());
}
}
@ -85,7 +95,21 @@ public class ZyClothsModularCompentController extends JeecgController<ZyClothsMo
@ApiOperation(value = "制衣模块部件中间表-添加", notes = "制衣模块部件中间表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsModularCompent zyClothsModularCompent) {
zyClothsModularCompentService.save(zyClothsModularCompent);
System.out.println(zyClothsModularCompent);
String[] split = zyClothsModularCompent.getComponentId().split(",");
for (String componentId : split) {
//把部件信息查出来 赋给模块部件表
//System.out.println("+++部件id: "+componentId);
//看是否有重复信息
int a = zyClothsModularCompentMapper.count(zyClothsModularCompent.getModularId(),componentId);
if (a >= 1){
return Result.error("添加失败,存在该款式部件");
}
ZyClothsModularCompent zy = zyClothsModularCompentService.handleComponent(componentId);
zy.setModularId(zyClothsModularCompent.getModularId());
zyClothsModularCompentService.save(zy);
}
return Result.OK("添加成功!");
}

@ -1,199 +1,215 @@
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 com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsModularDetail;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.base.service.IZyClothsTypeService;
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.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;
/**
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
* @Description: zy_cloths_modular
* @Author: jeecg-boot
* @Date: 2021-11-10
* @Date: 2021-11-10
* @Version: V1.0
*/
@Api(tags="zy_cloths_modular")
@Api(tags = "zy_cloths_modular")
@RestController
@RequestMapping("/base/zyClothsModular")
@Slf4j
public class ZyClothsModularController extends JeecgController<ZyClothsModular, IZyClothsModularService> {
@Autowired
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
/**
* 分页列表查询
*
* @param zyClothsModular
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "zy_cloths_modular-分页列表查询")
@ApiOperation(value="zy_cloths_modular-分页列表查询", notes="zy_cloths_modular-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyClothsModular zyClothsModular,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyClothsModular> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsModular, req.getParameterMap());
Page<ZyClothsModular> page = new Page<ZyClothsModular>(pageNo, pageSize);
IPage<ZyClothsModular> pageList = zyClothsModularService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "zy_cloths_modular-查询所有")
@ApiOperation(value="zy_cloths_modular-查询所有", notes="zy_cloths_modular-查询所有")
@GetMapping(value = "/findAll")
public Result<?> findAll() {
List<ZyClothsModular> list = zyClothsModularService.list();
for(ZyClothsModular zycl : list){
String id = zycl.getClothsTypeId();
if(id!=null){
ZyClothsType byId = zyClothsTypeService.getById(id);
zycl.setClothsTypeId(byId.getTypeName());
}
}
return Result.OK(list);
}
/**
* 添加
*
* @param zyClothsModular
* @return
*/
@AutoLog(value = "zy_cloths_modular-添加")
@ApiOperation(value="zy_cloths_modular-添加", notes="zy_cloths_modular-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsModular zyClothsModular) {
//nums,编号,varchar,18,非空,不重复,编码规则:服装类型(10)+序号(8)
zyClothsModular.setNums(zyClothsModularService.generateNumber(zyClothsModular));
//模块名称不能重复
List<ZyClothsModular> zyClothsModularList = zyClothsModularService.list();
for (ZyClothsModular zy : zyClothsModularList) {
if (zyClothsModular.getModularName().equals(zy.getModularName())){
return Result.error("添加失败!模块名称已存在");
}
}
zyClothsModularService.save(zyClothsModular);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyClothsModular
* @return
*/
@AutoLog(value = "zy_cloths_modular-编辑")
@ApiOperation(value="zy_cloths_modular-编辑", notes="zy_cloths_modular-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyClothsModular zyClothsModular) {
zyClothsModularService.updateById(zyClothsModular);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "zy_cloths_modular-通过id删除")
@ApiOperation(value="zy_cloths_modular-通过id删除", notes="zy_cloths_modular-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
zyClothsModularService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "zy_cloths_modular-批量删除")
@ApiOperation(value="zy_cloths_modular-批量删除", notes="zy_cloths_modular-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyClothsModularService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "zy_cloths_modular-通过id查询")
@ApiOperation(value="zy_cloths_modular-通过id查询", notes="zy_cloths_modular-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyClothsModular zyClothsModular = zyClothsModularService.getById(id);
if(zyClothsModular==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyClothsModular);
}
@Autowired
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
/**
* 分页列表查询
*
* @param zyClothsModular
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "zy_cloths_modular-分页列表查询")
@ApiOperation(value = "zy_cloths_modular-分页列表查询", notes = "zy_cloths_modular-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyClothsModular zyClothsModular,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyClothsModular> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsModular, req.getParameterMap());
Page<ZyClothsModular> page = new Page<ZyClothsModular>(pageNo, pageSize);
IPage<ZyClothsModular> pageList = zyClothsModularService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "zy_cloths_modular-查询所有")
@ApiOperation(value = "zy_cloths_modular-查询所有", notes = "zy_cloths_modular-查询所有")
@GetMapping(value = "/findAll")
public Result<?> findAll() {
List<ZyClothsModular> list = zyClothsModularService.list();
for (ZyClothsModular zycl : list) {
String id = zycl.getClothsTypeId();
if (id != null) {
ZyClothsType byId = zyClothsTypeService.getById(id);
zycl.setClothsTypeId(byId.getTypeName());
}
}
return Result.OK(list);
}
/**
* 制衣模块详情
* @param id 根据服装款式id进行查询
*/
@AutoLog(value = "制衣模块详情详情")
@ApiOperation(value = "制衣模块详情详情", notes = "根据制衣模块详情id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("controller层接受到的id: zy_cloths_modularId: "+id);
ZyClothsModularDetail detail = zyClothsModularService.queryDetail(id);
return Result.OK(detail);
}
/**
* 添加
*
* @param zyClothsModular
* @return
*/
@AutoLog(value = "zy_cloths_modular-添加")
@ApiOperation(value = "zy_cloths_modular-添加", notes = "zy_cloths_modular-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsModular zyClothsModular) {
//zyClothsModular.setNums(zyClothsModularService.generateNumber(zyClothsModular));
//模块名称不能重复
List<ZyClothsModular> zyClothsModularList = zyClothsModularService.list();
for (ZyClothsModular zy : zyClothsModularList) {
if (zyClothsModular.getModularName().equals(zy.getModularName())) {
return Result.error("添加失败!模块名称已存在");
}
}
zyClothsModularService.save(zyClothsModular);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyClothsModular
* @return
*/
@AutoLog(value = "zy_cloths_modular-编辑")
@ApiOperation(value = "zy_cloths_modular-编辑", notes = "zy_cloths_modular-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyClothsModular zyClothsModular) {
zyClothsModularService.updateById(zyClothsModular);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "zy_cloths_modular-通过id删除")
@ApiOperation(value = "zy_cloths_modular-通过id删除", notes = "zy_cloths_modular-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
zyClothsModularService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "zy_cloths_modular-批量删除")
@ApiOperation(value = "zy_cloths_modular-批量删除", notes = "zy_cloths_modular-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.zyClothsModularService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "zy_cloths_modular-通过id查询")
@ApiOperation(value = "zy_cloths_modular-通过id查询", notes = "zy_cloths_modular-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
ZyClothsModular zyClothsModular = zyClothsModularService.getById(id);
if (zyClothsModular == null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyClothsModular);
}
/**
* sort 编码
*
* @param id 服装类型的id
* @return
*/
@AutoLog(value = "编码-通过id查询")
@ApiOperation(value = "编码-通过id查询", notes = "编码-通过id查询")
@GetMapping(value = "/sort")
public Result<?> sort(@RequestParam(name = "id", required = true) String id) {
//根据zy cloths type服装类型的id 进行自动编码
//nums,编号,varchar,18,非空,不重复,编码规则:服装类型(10)+序号(8)
String clothsTypeNums = zyClothsModularService.generateNumber(id);
if (clothsTypeNums == null) {
return Result.error("未找到对应数据");
}
return Result.OK(clothsTypeNums);
}
/**
* 导出excel
*
* @param request
* @param zyClothsModular
*/
* 导出excel
*
* @param request
* @param zyClothsModular
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyClothsModular zyClothsModular) {
return super.exportXls(request, zyClothsModular, ZyClothsModular.class, "zy_cloths_modular");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyClothsModular.class);

@ -4,6 +4,7 @@ import java.util.Arrays;
import java.util.List;
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.modules.demo.accessories.entity.ZyAccessories;
@ -33,180 +34,182 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
/**
* @Description: zy_process
* @Author: jeecg-boot
* @Date: 2021-11-03
* @Date: 2021-11-03
* @Version: V1.0
*/
@Api(tags="zy_process")
@Api(tags = "zy_process")
@RestController
@RequestMapping("/base/zyProcess")
@Slf4j
public class ZyProcessController extends JeecgController<ZyProcess, IZyProcessService> {
@Autowired
private IZyProcessService zyProcessService;
@Autowired
IZyProcessAccessoriesService zyProcessAccessoriesService;
@Autowired
IZyProcessActionService zyProcessActionService;
@Autowired
IZyProcessFabricService zyProcessFabricService;
@Autowired
private IZyDevicetypeService1 zyDevicetypeService;
@Autowired
private IZyToolTypesService zyToolTypesService;
/**
* 分页列表查询
*
* @param zyProcess
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "zy_process-分页列表查询")
@ApiOperation(value="zy_process-分页列表查询", notes="zy_process-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyProcess zyProcess,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyProcess, req.getParameterMap());
//QueryWrapper queryWrapper = new QueryWrapper();
Page<ZyProcess> page = new Page<ZyProcess>(pageNo, pageSize);
IPage<ZyProcess> pageList = zyProcessService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyProcess
* @return
*/
@AutoLog(value = "zy_process-添加")
@ApiOperation(value="zy_process-添加", notes="zy_process-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProcess zyProcess) {
zyProcess.setCreateTime(null);
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("process_name",zyProcess.getProcessName());
int a=zyProcessService.count(queryWrapper);
if(a!=0)
return Result.error("添加失败,该工序名称已存在!!!");
zyProcessService.save(zyProcess);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyProcess
* @return
*/
@AutoLog(value = "zy_process-编辑")
@ApiOperation(value="zy_process-编辑", notes="zy_process-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProcess zyProcess) {
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("process_name",zyProcess.getProcessName());
int a=zyProcessService.count(queryWrapper);
if(a!=0)
return Result.error("编辑失败,该工序名称已存在!!!");
zyProcessService.updateById(zyProcess);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "zy_process-通过id删除")
@ApiOperation(value="zy_process-通过id删除", notes="zy_process-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
zyProcessService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "zy_process-批量删除")
@ApiOperation(value="zy_process-批量删除", notes="zy_process-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyProcessService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "zy_process-通过id查询")
@ApiOperation(value="zy_process-通过id查询", notes="zy_process-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyProcess zyProcess=zyProcessService.selectZyprocess(id);
List<ZyAccessories> pageList=zyProcessAccessoriesService.selectByid(id);
List<ZyClothAction> pageList1=zyProcessActionService.selectByid(id);
List<ZyFabric> pageList2=zyProcessFabricService.selectByid(id);
List<ZyDevicetypel> pageList3=zyDevicetypeService.selectByid(id);
List<ZyToolTypes> pageList4=zyToolTypesService.selectByid(id);
ZyAllProcess zyAllProcess=new ZyAllProcess();
zyAllProcess.setZyProcess(zyProcess);
zyAllProcess.setZyClothActions(pageList1);
zyAllProcess.setZyAccessories(pageList);
zyAllProcess.setZyFabrics(pageList2);
zyAllProcess.setZyDevicetypes(pageList3);
zyAllProcess.setZyToolTypes(pageList4);
if(zyAllProcess==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyAllProcess);
}
@Autowired
private IZyProcessService zyProcessService;
@Autowired
IZyProcessAccessoriesService zyProcessAccessoriesService;
@Autowired
IZyProcessActionService zyProcessActionService;
@Autowired
IZyProcessFabricService zyProcessFabricService;
@Autowired
private IZyDevicetypeService1 zyDevicetypeService;
@Autowired
private IZyToolTypesService zyToolTypesService;
/**
* 分页列表查询
*
* @param zyProcess
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "zy_process-分页列表查询")
@ApiOperation(value = "zy_process-分页列表查询", notes = "zy_process-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyProcess zyProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyProcess, req.getParameterMap());
//QueryWrapper queryWrapper = new QueryWrapper();
Page<ZyProcess> page = new Page<ZyProcess>(pageNo, pageSize);
IPage<ZyProcess> pageList = zyProcessService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyProcess
* @return
*/
@AutoLog(value = "zy_process-添加")
@ApiOperation(value = "zy_process-添加", notes = "zy_process-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProcess zyProcess) {
zyProcess.setCreateTime(null);
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("process_name", zyProcess.getProcessName());
int a = zyProcessService.count(queryWrapper);
if (a != 0)
return Result.error("添加失败,该工序名称已存在!!!");
zyProcessService.save(zyProcess);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyProcess
* @return
*/
@AutoLog(value = "zy_process-编辑")
@ApiOperation(value = "zy_process-编辑", notes = "zy_process-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProcess zyProcess) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("process_name", zyProcess.getProcessName());
int a = zyProcessService.count(queryWrapper);
if (a != 0)
return Result.error("编辑失败,该工序名称已存在!!!");
zyProcessService.updateById(zyProcess);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "zy_process-通过id删除")
@ApiOperation(value = "zy_process-通过id删除", notes = "zy_process-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
zyProcessService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "zy_process-批量删除")
@ApiOperation(value = "zy_process-批量删除", notes = "zy_process-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.zyProcessService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 导出excel
*
* @param request
* @param zyProcess
*/
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "zy_process-通过id查询")
@ApiOperation(value = "zy_process-通过id查询", notes = "zy_process-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
ZyProcess zyProcess = zyProcessService.selectZyprocess(id);
List<ZyAccessories> pageList = zyProcessAccessoriesService.selectByid(id);
List<ZyClothAction> pageList1 = zyProcessActionService.selectByid(id);
List<ZyFabric> pageList2 = zyProcessFabricService.selectByid(id);
List<ZyDevicetypel> pageList3 = zyDevicetypeService.selectByid(id);
List<ZyToolTypes> pageList4 = zyToolTypesService.selectByid(id);
ZyAllProcess zyAllProcess = new ZyAllProcess();
zyAllProcess.setZyProcess(zyProcess);
zyAllProcess.setZyClothActions(pageList1);
zyAllProcess.setZyAccessories(pageList);
zyAllProcess.setZyFabrics(pageList2);
zyAllProcess.setZyDevicetypes(pageList3);
zyAllProcess.setZyToolTypes(pageList4);
if (zyAllProcess == null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyAllProcess);
}
/**
* 导出excel
*
* @param request
* @param zyProcess
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyProcess zyProcess) {
return super.exportXls(request, zyProcess, ZyProcess.class, "zy_process");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyProcess.class);
}
@AutoLog(value = "zy_process-顺序查询")
@ApiOperation(value="zy_process-顺序查询", notes="zy_process-顺序查询")
@GetMapping(value = "/sort")
public Result<?> sort(@RequestParam(name="id",required=true) String id) {
String sort=zyProcessService.sort(id);
if(sort==null){
return Result.ok(0);
}
return Result.OK(sort.substring(10,sort.length()));
}
@AutoLog(value = "zy_process-顺序查询")
@ApiOperation(value = "zy_process-顺序查询", notes = "zy_process-顺序查询")
@GetMapping(value = "/sort")
public Result<?> sort(@RequestParam(name = "id", required = true) String id) {
String sort = zyProcessService.sort(id);
if (sort == null) {
return Result.ok(0);
}
return Result.OK(sort.substring(10, sort.length()));
}
}

@ -0,0 +1,15 @@
package org.jeecg.modules.demo.base.entity.vo;
import lombok.Data;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import java.util.List;
@Data
public class ZyClothsComponentDetail {
/**制衣部件 详情*/
private ZyClothsComponent zyClothsComponent;
/**部件工序 详情*/
private List<ZyProcessComponent> zyProcessComponents;
}

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.base.entity.vo;
import lombok.Data;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import java.util.List;
@Data
public class ZyClothsModularDetail {
/**制衣模块*/
private ZyClothsModular zyClothsModular;
/**模块部件*/
private List<ZyClothsModularCompent> zyClothsModularComponents;
/**模块工序*/
private List<ZyProcessModularVo> zyProcessModularVos;
}

@ -0,0 +1,80 @@
package org.jeecg.modules.demo.base.entity.vo;
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.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 不知道什么原因 在base模块中无法调用ZyProcessModular实体类
* 因此创建这个类来接受数据
* @Description: 模块工序表
*/
@Data
@TableName("zy_process_modular")
public class ZyProcessModularVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**
* 所属部门
*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**
* 模块ID
*/
@ApiModelProperty(value = "模块ID")
//@Dict(dictTable = "zy_cloths_modular", dicText = "modular_name", dicCode = "id")
private java.lang.String modularId;
/**
* 工序ID
*/
@ApiModelProperty(value = "工序ID")
//@Dict(dictTable = "zy_process", dicText = "process_name", dicCode = "id")
private java.lang.String processId;
/**
* 序号
*/
@ApiModelProperty(value = "序号")
private Integer serialnumber;
}

@ -24,4 +24,6 @@ public interface ZyClothsComponentMapper extends BaseMapper<ZyClothsComponent> {
String getComponentNameById(String componentId);
List<String> selectNumsList2();
ZyClothsComponent queryById(String componentId);
}

@ -3,15 +3,21 @@ package org.jeecg.modules.demo.base.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 制衣模块部件中间表
* @Author: jeecg-boot
* @Date: 2022-11-11
* @Date: 2022-11-11
* @Version: V1.0
*/
public interface ZyClothsModularCompentMapper extends BaseMapper<ZyClothsModularCompent> {
@Select("select count(*) from zy_cloths_modular_compent where modular_id = #{ModularId} and component_id=#{componentId}")
int count(@Param("ModularId")String ModularId, @Param("componentId")String componentId);
//根据modularId查询
List<ZyClothsModularCompent> queryList(String modularId);
}

@ -5,6 +5,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.demo.base.entity.vo.ZyProcessModularVo;
/**
* @Description: zy_cloths_modular
@ -16,4 +17,14 @@ public interface ZyClothsModularMapper extends BaseMapper<ZyClothsModular> {
public List<ZyClothsModular> selectByType(@Param("cloths_type_id")String cloths_type_id);
List<String> selectNumsList1();
/**根据cloth_type_id查服装类型名称*/
String getTypeNameById(String clothsTypeId);
/**根据ZyClothsModular的id查询 模块工序 list信息*/
List<ZyProcessModularVo> queryProcessModularList(String id);
String getModularNameByModularId(String modularId);
String getProcessNameByProcessId(String processId);
}

@ -21,10 +21,15 @@ public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> {
@Select("select nums from zy_cloths_type where nums like 'QIYE%' order by nums desc limit 0,1 ")
String sort();
/**根据部门id拿到部门名称*/
String getEnterprisenameById(String enterpriseId);
/**根据部门名称拿到部门id*/
String getEnterpriseName(String enterpriseName);
void setEnterpriseId(String id);
@Select("select nums from zy_cloths_type where id = #{id} ")
String selectNumOne(String id);
}

@ -33,4 +33,9 @@
select nums
from zy_cloths_component
</select>
<select id="queryById" resultType="org.jeecg.modules.demo.base.entity.ZyClothsComponent">
select *
from zy_cloths_component
where id = #{componentId}
</select>
</mapper>

@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.base.mapper.ZyClothsModularCompentMapper">
<select id="queryList" resultType="org.jeecg.modules.demo.base.entity.ZyClothsModularCompent">
select *
from zy_cloths_modular_compent
where modular_id = #{ModularId}
</select>
</mapper>

@ -10,4 +10,24 @@
select nums
from zy_cloths_modular
</select>
<select id="getTypeNameById" resultType="java.lang.String">
SELECT type_name
from zy_cloths_type
where id = #{clothsTypeId}
</select>
<select id="queryProcessModularList" resultType="org.jeecg.modules.demo.base.entity.vo.ZyProcessModularVo">
SELECT *
from zy_process_modular
where modular_id =#{id}
</select>
<select id="getModularNameByModularId" resultType="java.lang.String">
SELECT modular_name
from zy_cloths_modular
where id = #{modularId}
</select>
<select id="getProcessNameByProcessId" resultType="java.lang.String">
SELECT process_name
from zy_process
where id = #{processId}
</select>
</mapper>

@ -4,6 +4,7 @@ import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsComponentDetail;
import org.jeecg.modules.demo.base.entity.vo.ZyProcessVo;
import java.util.List;
@ -21,4 +22,6 @@ public interface IZyClothsComponentService extends IService<ZyClothsComponent> {
/**编码规则:服装类型(10)+序号(8)*/
String generateNumber(ZyClothsComponent zyClothsComponent);
ZyClothsComponentDetail queryDetail(String id);
}

@ -3,6 +3,8 @@ package org.jeecg.modules.demo.base.service;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 制衣模块部件中间表
* @Author: jeecg-boot
@ -11,4 +13,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IZyClothsModularCompentService extends IService<ZyClothsModularCompent> {
/**把部件信息查出来 赋给模块部件表*/
ZyClothsModularCompent handleComponent(String componentId);
List<ZyClothsModularCompent> detail(String id);
}

@ -2,6 +2,7 @@ package org.jeecg.modules.demo.base.service;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsModularDetail;
import java.util.List;
@ -15,5 +16,11 @@ public interface IZyClothsModularService extends IService<ZyClothsModular> {
public List<ZyClothsModular> selectByType(String cloths_type_id);
/**nums,编号,varchar,18,非空,不重复,编码规则:服装类型(10)+序号(8)*/
String generateNumber(ZyClothsModular zyClothsModular);
String generateNumber(String id);
/**
* 制衣模块详情
* @param id 根据服装款式id进行查询
*/
ZyClothsModularDetail queryDetail(String id);
}

@ -1,17 +1,19 @@
package org.jeecg.modules.demo.base.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsComponentDetail;
import org.jeecg.modules.demo.base.entity.vo.ZyProcessVo;
import org.jeecg.modules.demo.base.mapper.ZyClothsComponentMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import org.jeecg.modules.demo.pro.service.IZyProcessComponentService;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
@ -23,20 +25,26 @@ import java.util.regex.Pattern;
/**
* @Description: zy_cloths_component
* @Author: jeecg-boot
* @Date: 2021-11-10
* @Date: 2021-11-10
* @Version: V1.0
*/
@Service
public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentMapper, ZyClothsComponent> implements IZyClothsComponentService {
@Autowired
private IZyProcessComponentService zyProcessComponentService;
@Resource
private ZyClothsComponentMapper zyClothsComponentMapper;
@Resource
ZyClothsTypeMapper zyClothsTypeMapper;
private ZyClothsModularMapper zyClothsModularMapper;
@Resource
private ZyClothsTypeMapper zyClothsTypeMapper;
@Override
public List<ZyProcessVo> selectList(String id) {
List<String> list=baseMapper.selectlistid(id);
List<ZyProcessVo> zyProcessVoList=baseMapper.selectProcessVo(list);
List<String> list = baseMapper.selectlistid(id);
List<ZyProcessVo> zyProcessVoList = baseMapper.selectProcessVo(list);
return zyProcessVoList;
}
@ -58,24 +66,71 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
return nums1 + format;
}
private Long orderNumber() {
@Override
public ZyClothsComponentDetail queryDetail(String id) {
ZyClothsComponentDetail detail = new ZyClothsComponentDetail();
//制衣部件
ZyClothsComponent zyClothsComponent = zyClothsComponentDetail(id);
detail.setZyClothsComponent(zyClothsComponent);
//部件工序
List<ZyProcessComponent> zyProcessComponents = zyProcessComponentService.detail(id);
detail.setZyProcessComponents(zyProcessComponents);
return detail;
}
public ZyClothsComponent zyClothsComponentDetail(String id) {
ZyClothsComponent zyClothsComponent = zyClothsComponentMapper.selectById(id);
//翻译
String clothsTypeId = zyClothsComponent.getClothsTypeId();
if (StringUtils.hasText(clothsTypeId)) {
String typeNameById = zyClothsModularMapper.getTypeNameById(clothsTypeId);
if (StringUtils.hasText(typeNameById)){
zyClothsComponent.setClothsTypeId(typeNameById);
}
}
String name = containChinese(zyClothsComponent.getEnterpriseId());
zyClothsComponent.setEnterpriseId(name);
return zyClothsComponent;
}
//判断字符串中有没有汉字 这个方法的作用就是如果是汉字或者空就直接返回true
//如果是一些编码 那就根据编码查到对应的名字并返回
//汉字:[19968,40869]
public String containChinese(String str) {
if (StringUtils.isEmpty(str)){
return str;
}
for (int i = 0; i < str.length(); i++) {
int n = (int) str.charAt(i);
if (19968 <= n && n <= 40869) {
return str;
}
}
return zyClothsTypeMapper.getEnterprisenameById(str);
}
public Long orderNumber() {
List<String> listString = zyClothsComponentMapper.selectNumsList2();
//System.err.println(listString);
List<Long> listLong = new ArrayList<>();
for (String nums : listString) {
String REGEX = "[^0-9]";
String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
if (!StringUtils.hasText(newNums)){
if (!StringUtils.hasText(newNums)) {
newNums = "0";
}
if (newNums.length() > 8) {
String substring = nums.substring(nums.length() - 8);
listLong.add(Long.valueOf(substring));
}else {
} else {
listLong.add(Long.valueOf(newNums));
}
}
System.out.println(listLong);
return Collections.max(listLong)+1;
return Collections.max(listLong) + 1;
}
}

@ -1,12 +1,20 @@
package org.jeecg.modules.demo.base.service.impl;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import org.jeecg.modules.demo.base.mapper.ZyClothsComponentMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularCompentMapper;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.List;
import java.util.regex.Pattern;
/**
* @Description: 制衣模块部件中间表
* @Author: jeecg-boot
@ -16,4 +24,40 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyClothsModularCompentServiceImpl extends ServiceImpl<ZyClothsModularCompentMapper, ZyClothsModularCompent> implements IZyClothsModularCompentService {
@Autowired
private IZyClothsComponentService zyClothsComponentService;
@Resource
private ZyClothsComponentMapper zyClothsComponentMapper;
@Resource
private ZyClothsModularCompentMapper zyClothsModularCompentMapper;
/**
* 把部件信息查出来 赋给模块部件表
* @param componentId 部件id
*/
@Override
public ZyClothsModularCompent handleComponent(String componentId) {
System.out.println("service层的id:"+componentId);
ZyClothsComponent zyClothsComponent = zyClothsComponentMapper.queryById(componentId);
ZyClothsModularCompent zy = new ZyClothsModularCompent();
zy.setPartsName(zyClothsComponent.getPartsName());
zy.setNums(zyClothsComponent.getNums());
zy.setComponentId(componentId);
return zy;
}
@Override
public List<ZyClothsModularCompent> detail(String id) {
List<ZyClothsModularCompent> zyClothsModularComponents = zyClothsModularCompentMapper.queryList(id);
//只要数字 如果是纯数字 就把它替换了
Pattern pattern = Pattern.compile("[^0-9]");
for (ZyClothsModularCompent s : zyClothsModularComponents) {
String partsName = s.getPartsName();
if (pattern.matcher(partsName).matches()) {
ZyClothsComponent byId = zyClothsComponentService.getById(partsName);
s.setPartsName(byId.getPartsName());
}
}
return zyClothsModularComponents;
}
}

@ -1,9 +1,13 @@
package org.jeecg.modules.demo.base.service.impl;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsModularDetail;
import org.jeecg.modules.demo.base.entity.vo.ZyProcessModularVo;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -25,10 +29,14 @@ import java.util.regex.Pattern;
*/
@Service
public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMapper, ZyClothsModular> implements IZyClothsModularService {
@Autowired
private IZyClothsModularCompentService zyClothsModularComponentService;
@Resource
private ZyClothsModularMapper zyClothsModularMapper;
@Resource
ZyClothsTypeMapper zyClothsTypeMapper;
private ZyClothsTypeMapper zyClothsTypeMapper;
@Override
public List<ZyClothsModular> selectByType(String cloths_type_id) {
@ -39,16 +47,81 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
* nums编号varchar18非空不重复编码规则服装类型10+序号8
*/
@Override
public String generateNumber(ZyClothsModular zyClothsModular) {
String nums = zyClothsModular.getClothsTypeId();
ZyClothsType zyClothsType = zyClothsTypeMapper.selectById(nums);
String nums1 = zyClothsType.getNums();
public String generateNumber(String id) {
String numOne = zyClothsTypeMapper.selectNumOne(id);
// String substring = nums.substring(nums.length() - 10);
String format = String.format("%08d", orderNumber());
return nums1 + format;
return numOne + format;
}
/**
* 制衣模块详情
*
* @param id 根据服装款式id进行查询
*/
@Override
public ZyClothsModularDetail queryDetail(String id) {
ZyClothsModularDetail zyClothsModularDetail = new ZyClothsModularDetail();
//制衣模块
ZyClothsModular zyClothsModular = detail(id);
zyClothsModularDetail.setZyClothsModular(zyClothsModular);
//模块部件
List<ZyClothsModularCompent> zyClothsModularComponents = zyClothsModularComponentService.detail(id);
zyClothsModularDetail.setZyClothsModularComponents(zyClothsModularComponents);
//模块工序
List<ZyProcessModularVo> zyProcessModularVos = processModularDetail(id);
zyClothsModularDetail.setZyProcessModularVos(zyProcessModularVos);
return zyClothsModularDetail;
}
private List<ZyProcessModularVo> processModularDetail(String id) {
List<ZyProcessModularVo> zyProcessModularVos = zyClothsModularMapper.queryProcessModularList(id);
for (ZyProcessModularVo zyProcessModularVo: zyProcessModularVos) {
String modularName = zyClothsModularMapper.getModularNameByModularId(zyProcessModularVo.getModularId());
if (StringUtils.hasText(modularName)){
zyProcessModularVo.setModularId(modularName);
}else{
zyProcessModularVo.setModularId("null");
}
String processName = zyClothsModularMapper.getProcessNameByProcessId(zyProcessModularVo.getProcessId());
if (StringUtils.hasText(processName)){
zyProcessModularVo.setProcessId(processName);
}else{
zyProcessModularVo.setProcessId("null");
}
}
return zyProcessModularVos;
}
private ZyClothsModular detail(String id) {
ZyClothsModular zyClothsModular = zyClothsModularMapper.selectById(id);
//翻译服装类型名称 和企业
String clothsTypeId1 = zyClothsModular.getClothsTypeId();
if (StringUtils.isEmpty(clothsTypeId1)){
zyClothsModular.setClothsTypeId("null");
return zyClothsModular;
}
String clothsTypeId = zyClothsModularMapper.getTypeNameById(zyClothsModular.getClothsTypeId());
if (StringUtils.hasText(clothsTypeId)){
zyClothsModular.setClothsTypeId(clothsTypeId);
} else {
zyClothsModular.setClothsTypeId("null");
}
String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(zyClothsModular.getEnterpriseId());
if (StringUtils.hasText(enterpriseName)){
zyClothsModular.setEnterpriseId(enterpriseName);
}else {
zyClothsModular.setEnterpriseId("null");
}
System.out.println("zyClothsModular 服装款式详情"+zyClothsModular);
return zyClothsModular;
}
private Long orderNumber() {
List<String> listString = zyClothsModularMapper.selectNumsList1();
List<Long> listLong = new ArrayList<>();
@ -58,6 +131,7 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
if (newNums.length() > 8) {
String substring = nums.substring(nums.length() - 8);
listLong.add(Long.valueOf(substring));
continue;
}
if (StringUtils.isEmpty(newNums)) {
newNums = "0";

@ -14,4 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface ZyProcessComponentMapper extends BaseMapper<ZyProcessComponent> {
List<ZyProcessComponent> queryListByComponentId(String id);
String getComponentNameByComponentId(String processId);
}

@ -2,4 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.pro.mapper.ZyProcessComponentMapper">
<select id="queryListByComponentId" resultType="org.jeecg.modules.demo.pro.entity.ZyProcessComponent">
SELECT *
from zy_process_component
where component_id = #{id}
</select>
<select id="getComponentNameByComponentId" resultType="java.lang.String">
SELECT parts_name
from zy_cloths_component
where id = #{id}
</select>
</mapper>

@ -3,6 +3,8 @@ package org.jeecg.modules.demo.pro.service;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: zy_process_component
* @Author: jeecg-boot
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IZyProcessComponentService extends IService<ZyProcessComponent> {
List<ZyProcessComponent> detail(String id);
}

@ -1,19 +1,52 @@
package org.jeecg.modules.demo.pro.service.impl;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularMapper;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import org.jeecg.modules.demo.pro.mapper.ZyProcessComponentMapper;
import org.jeecg.modules.demo.pro.service.IZyProcessComponentService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.List;
/**
* @Description: zy_process_component
* @Author: jeecg-boot
* @Date: 2021-11-11
* @Date: 2021-11-11
* @Version: V1.0
*/
@Service
public class ZyProcessComponentServiceImpl extends ServiceImpl<ZyProcessComponentMapper, ZyProcessComponent> implements IZyProcessComponentService {
@Resource
private ZyProcessComponentMapper zyProcessComponentMapper;
@Resource
private ZyClothsModularMapper zyClothsModularMapper;
@Override
public List<ZyProcessComponent> detail(String id) {
List<ZyProcessComponent> zyProcessComponents = zyProcessComponentMapper.queryListByComponentId(id);
if (ObjectUtils.isEmpty(zyProcessComponents)) {
return zyProcessComponents;
}
for (ZyProcessComponent processComponent : zyProcessComponents) {
String processName = zyClothsModularMapper.getProcessNameByProcessId(processComponent.getProcessId());
if (StringUtils.hasText(processName)){
processComponent.setProcessId(processName);
}else{
processComponent.setProcessId("null");
}
String componentName = zyProcessComponentMapper.getComponentNameByComponentId(processComponent.getComponentId());
if (StringUtils.hasText(componentName)){
processComponent.setComponentId(componentName);
}else{
processComponent.setComponentId("null");
}
}
return zyProcessComponents;
}
}

@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class GoodsAccessoriesController extends JeecgController<GoodsAccessories, IGoodsAccessoriesService> {
@Autowired
private IGoodsAccessoriesService goodsAccessoriesService;
/**
* 分页列表查询
*
@ -65,13 +65,14 @@ public class GoodsAccessoriesController extends JeecgController<GoodsAccessories
public Result<?> queryPageList(GoodsAccessories goodsAccessories,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
HttpServletRequest req,String goodsid) {
QueryWrapper<GoodsAccessories> queryWrapper = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapper.eq("goods_id",goodsid);
Page<GoodsAccessories> page = new Page<GoodsAccessories>(pageNo, pageSize);
IPage<GoodsAccessories> pageList = goodsAccessoriesService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -85,7 +86,7 @@ public class GoodsAccessoriesController extends JeecgController<GoodsAccessories
goodsAccessoriesService.save(goodsAccessories);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -99,7 +100,7 @@ public class GoodsAccessoriesController extends JeecgController<GoodsAccessories
goodsAccessoriesService.updateById(goodsAccessories);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -113,7 +114,7 @@ public class GoodsAccessoriesController extends JeecgController<GoodsAccessories
goodsAccessoriesService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -127,7 +128,7 @@ public class GoodsAccessoriesController extends JeecgController<GoodsAccessories
this.goodsAccessoriesService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class GoodsFabricController extends JeecgController<GoodsFabric, IGoodsFabricService> {
@Autowired
private IGoodsFabricService goodsFabricService;
/**
* 分页列表查询
*
@ -65,13 +65,14 @@ public class GoodsFabricController extends JeecgController<GoodsFabric, IGoodsFa
public Result<?> queryPageList(GoodsFabric goodsFabric,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
HttpServletRequest req,String goodsid) {
QueryWrapper<GoodsFabric> queryWrapper = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrapper.eq("goods_id",goodsid);
Page<GoodsFabric> page = new Page<GoodsFabric>(pageNo, pageSize);
IPage<GoodsFabric> pageList = goodsFabricService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -85,7 +86,7 @@ public class GoodsFabricController extends JeecgController<GoodsFabric, IGoodsFa
goodsFabricService.save(goodsFabric);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -99,7 +100,7 @@ public class GoodsFabricController extends JeecgController<GoodsFabric, IGoodsFa
goodsFabricService.updateById(goodsFabric);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -113,7 +114,7 @@ public class GoodsFabricController extends JeecgController<GoodsFabric, IGoodsFa
goodsFabricService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -127,7 +128,7 @@ public class GoodsFabricController extends JeecgController<GoodsFabric, IGoodsFa
this.goodsFabricService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -53,9 +53,9 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccessories, IZyStyleAccessoriesService> {
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@Resource
private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;

@ -19,4 +19,7 @@ public interface ZyStyleAccessoriesMapper extends BaseMapper<ZyStyleAccessories>
@Select("select count(*) from zy_style_accessories where style_id=#{styleId} and accessories_id=#{accessoriesId}")
int count(@Param("accessoriesId") String accessoriesId, @Param("styleId") String styleId);
@Select("select * from zy_style_accessories where style_id=#{styleId}")
List<ZyStyleAccessories> listByStyleId(String id);
}

@ -3,6 +3,8 @@ package org.jeecg.modules.demo.zyaccessories.service;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
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 IZyStyleAccessoriesService extends IService<ZyStyleAccessories> {
List<ZyStyleAccessories> detail(String id);
}

@ -1,12 +1,17 @@
package org.jeecg.modules.demo.zyaccessories.service.impl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.mapper.ZyStyleAccessoriesMapper;
import org.jeecg.modules.demo.zyaccessories.service.IZyStyleAccessoriesService;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.List;
/**
* @Description: 款式辅料管理
* @Author: jeecg-boot
@ -16,4 +21,18 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyStyleAccessoriesServiceImpl extends ServiceImpl<ZyStyleAccessoriesMapper, ZyStyleAccessories> implements IZyStyleAccessoriesService {
@Resource
private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;
@Override
public List<ZyStyleAccessories> detail(String id) {
List<ZyStyleAccessories> list = zyStyleAccessoriesMapper.listByStyleId(id);
for (ZyStyleAccessories zy : list) {
String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId());
zy.setTypeName(typeName);
}
return list;
}
}

@ -15,8 +15,14 @@ import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories;
import org.jeecg.modules.demo.goodsaccessories.service.IGoodsAccessoriesService;
import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric;
import org.jeecg.modules.demo.goodsfabric.service.IGoodsFabricService;
import org.jeecg.modules.demo.goodsmodule.entity.GoodsModule;
import org.jeecg.modules.demo.goodsmodule.service.IGoodsModuleService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.service.IZyStyleAccessoriesService;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import org.jeecg.modules.demo.zygoods.service.IZyGoodsService;
@ -25,7 +31,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
@ -71,6 +80,14 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
private IZyStyleModelService zyStyleModelService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Autowired
private IZyStyleFabricService zyStyleFabricService;
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
private IGoodsAccessoriesService goodsAccessoriesService;
@Autowired
private IGoodsFabricService goodsFabricService;
/**
* 分页列表查询
@ -119,6 +136,26 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
//goodsModule.setPlace();
goodsModuleService.save(goodsModule);
}
ZyStyleFabric zyStyleFabric = new ZyStyleFabric();
QueryWrapper<ZyStyleFabric> queryWrapperzsf = QueryGenerator.initQueryWrapper(zyStyleFabric, req.getParameterMap());
queryWrapperzsf.eq("style_id",zyGoods.getStyleId());
List<ZyStyleFabric> listzsf = zyStyleFabricService.list(queryWrapperzsf);
for (int j = 0 ; j < listzsf.size() ; j++){
GoodsFabric goodsFabric = new GoodsFabric();
goodsFabric.setGoodsId(zyGoods.getId());
goodsFabric.setFabricId(listzsf.get(j).getFabricId());
goodsFabricService.save(goodsFabric);
}
ZyStyleAccessories zyStyleAccessories = new ZyStyleAccessories();
QueryWrapper<ZyStyleAccessories> queryWrapperzsa = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
queryWrapperzsa.eq("style_id",zyGoods.getStyleId());
List<ZyStyleAccessories> listzsa = zyStyleAccessoriesService.list(queryWrapperzsa);
for (int k = 0 ; k < listzsa.size() ; k++){
GoodsAccessories goodsAccessories = new GoodsAccessories();
goodsAccessories.setGoodsId(zyGoods.getId());
goodsAccessories.setAccessoriesId(listzsa.get(k).getAccessoriesId());
goodsAccessoriesService.save(goodsAccessories);
}
return Result.OK("添加成功!");
}
@ -151,8 +188,121 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
//goodsModule1.setPlace();
goodsModuleService.save(goodsModule1);
}
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrappergf.eq("goods_id",zyGoods.getId());
goodsFabricService.remove(queryWrappergf);
ZyStyleFabric zyStyleFabric = new ZyStyleFabric();
QueryWrapper<ZyStyleFabric> queryWrapperzsf = QueryGenerator.initQueryWrapper(zyStyleFabric, req.getParameterMap());
queryWrapperzsf.eq("style_id",zyGoods.getStyleId());
List<ZyStyleFabric> listzsf = zyStyleFabricService.list(queryWrapperzsf);
for (int j = 0 ; j < listzsf.size() ; j++){
GoodsFabric goodsFabric1 = new GoodsFabric();
goodsFabric1.setGoodsId(zyGoods.getId());
goodsFabric1.setFabricId(listzsf.get(j).getFabricId());
goodsFabricService.save(goodsFabric1);
}
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapperga.eq("goods_id",zyGoods.getId());
goodsAccessoriesService.remove(queryWrapperga);
ZyStyleAccessories zyStyleAccessories = new ZyStyleAccessories();
QueryWrapper<ZyStyleAccessories> queryWrapperzsa = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
queryWrapperzsa.eq("style_id",zyGoods.getStyleId());
List<ZyStyleAccessories> listzsa = zyStyleAccessoriesService.list(queryWrapperzsa);
for (int k = 0 ; k < listzsa.size() ; k++){
GoodsAccessories goodsAccessories1 = new GoodsAccessories();
goodsAccessories1.setGoodsId(zyGoods.getId());
goodsAccessories1.setAccessoriesId(listzsa.get(k).getAccessoriesId());
goodsAccessoriesService.save(goodsAccessories1);
}
return Result.OK("编辑成功!");
}
/**
* 更新商品辅料
*
* @param id
* @return
*/
@AutoLog(value = "更新商品辅料")
@ApiOperation(value="更新商品辅料", notes="更新商品辅料")
@GetMapping(value = "/upfl")
public Result<?> upfl(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
ZyGoods zyGoods = zyGoodsService.getById(id);
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapperga.eq("goods_id",id);
goodsAccessoriesService.remove(queryWrapperga);
ZyStyleAccessories zyStyleAccessories = new ZyStyleAccessories();
QueryWrapper<ZyStyleAccessories> queryWrapperzsa = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
queryWrapperzsa.eq("style_id",zyGoods.getStyleId());
List<ZyStyleAccessories> listzsa = zyStyleAccessoriesService.list(queryWrapperzsa);
for (int k = 0 ; k < listzsa.size() ; k++){
GoodsAccessories goodsAccessories1 = new GoodsAccessories();
goodsAccessories1.setGoodsId(id);
goodsAccessories1.setAccessoriesId(listzsa.get(k).getAccessoriesId());
goodsAccessoriesService.save(goodsAccessories1);
}
return Result.OK("更新成功!");
}
/**
* 更新商品模块
*
* @param id
* @return
*/
@AutoLog(value = "更新商品模块")
@ApiOperation(value="更新商品模块", notes="更新商品模块")
@GetMapping(value = "/upmk")
public Result<?> upmk(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
ZyGoods zyGoods = zyGoodsService.getById(id);
GoodsModule goodsModule = new GoodsModule();
QueryWrapper<GoodsModule> queryWrappergm = QueryGenerator.initQueryWrapper(goodsModule, req.getParameterMap());
queryWrappergm.eq("goods_id",id);
goodsModuleService.remove(queryWrappergm);
ZyStyleModule zyStyleModule = new ZyStyleModule();
QueryWrapper<ZyStyleModule> queryWrapperzsm = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap());
queryWrapperzsm.eq("style_id",zyGoods.getStyleId());
List<ZyStyleModule> listzsm = zyStyleModuleService.list(queryWrapperzsm);
for (int i = 0 ; i < listzsm.size() ; i++){
GoodsModule goodsModule1 = new GoodsModule();
goodsModule1.setGoodsId(id);
goodsModule1.setStyleId(zyGoods.getStyleId());
goodsModule1.setStyleModuleId(listzsm.get(i).getId());
goodsModule1.setModuleId(listzsm.get(i).getModularId());
//部位暂时没有字段,zy_cloths_modular的place
//goodsModule1.setPlace();
goodsModuleService.save(goodsModule1);
}
return Result.OK("更新成功!");
}
/**
* 更新商品面料
*
* @param id
* @return
*/
@AutoLog(value = "更新商品面料")
@ApiOperation(value="更新商品面料", notes="更新商品面料")
@GetMapping(value = "/upml")
public Result<?> upml(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
ZyGoods zyGoods = zyGoodsService.getById(id);
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrappergf.eq("goods_id",zyGoods.getId());
goodsFabricService.remove(queryWrappergf);
ZyStyleFabric zyStyleFabric = new ZyStyleFabric();
QueryWrapper<ZyStyleFabric> queryWrapperzsf = QueryGenerator.initQueryWrapper(zyStyleFabric, req.getParameterMap());
queryWrapperzsf.eq("style_id",zyGoods.getStyleId());
List<ZyStyleFabric> listzsf = zyStyleFabricService.list(queryWrapperzsf);
for (int j = 0 ; j < listzsf.size() ; j++){
GoodsFabric goodsFabric1 = new GoodsFabric();
goodsFabric1.setGoodsId(zyGoods.getId());
goodsFabric1.setFabricId(listzsf.get(j).getFabricId());
goodsFabricService.save(goodsFabric1);
}
return Result.OK("更新成功!");
}
/**
* 通过id删除
@ -239,6 +389,20 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
return Result.OK(spbh);
}
/**
* 动态服装款式
*
* @param
* @return
*/
@AutoLog(value = "商品表-通过id查询")
@ApiOperation(value="商品表-通过id查询", notes="商品表-通过id查询")
@GetMapping(value = "/getzystyle")
public Result<?> getzystyle(@RequestParam(name="ksid",required=true) String ksid) {
ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(ksid);
return Result.OK(zyClothsStyle);
}
/**
* 导出excel
*

@ -20,17 +20,20 @@ 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.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.accessories.entity.ZyAccessories;
import org.jeecg.modules.demo.base.entity.*;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.demo.device.entity.ZyDevicetypel;
import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecg.modules.demo.pro.entity.NewZyProcessComponent;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import org.jeecg.modules.demo.tools.entity.ZyToolTypes;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
@ -117,6 +120,20 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
return Result.OK(list);
}
/**
* 服装款式详情
* @param id 根据服装款式id进行查询
*/
@AutoLog(value = "服装款式详情")
@ApiOperation(value = "服装款式详情", notes = "根据服装款式id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("controller层接受到的id: styleId: "+id);
AllClothStyle allClothStyle = zyClothsStyleService.queryDetail(id);
return Result.OK(allClothStyle);
}
/**
* 制衣部件
*

@ -0,0 +1,25 @@
package org.jeecg.modules.zyclothsstyle.entity.vo;
import lombok.Data;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import java.util.List;
@Data
public class AllClothStyle {
/**服装款式*/
private ZyClothsStyle zyClothsStyle;
/**子模块 款式模块*/
private List<NewStyleModule> zyStyleModuleList;
/**子模块 款式面料*/
private List<NewZyStyleFabric> zyStyleFabricList;
/**子模块 款式辅料*/
private List<ZyStyleAccessories> zyStyleAccessoriesList;
/*子模块 款式型号 因风格问题 暂不开发*/
/**子模块 款式工序*/
private List<ZyStyleModular> zyStyleModularList;
}

@ -21,4 +21,7 @@ public interface ZyClothsStyleMapper extends BaseMapper<ZyClothsStyle> {
@Select("select nums from zy_cloths_type where id=#{id} order by create_time DESC limit 0,1")
String sort(String id);
@Select("select depart_name from sys_depart where id=#{enterpriseId}")
String getEnterpriseName(String enterpriseId);
}

@ -3,6 +3,7 @@ package org.jeecg.modules.zyclothsstyle.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
/**
* @Description: 服装款式表
@ -13,7 +14,13 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
public interface IZyClothsStyleService extends IService<ZyClothsStyle> {
/**生成编号 类型编号(10位)+顺序号(8位)*/
String generateNumber(ZyClothsStyle zyClothsStyle);
//String generateNumber(ZyClothsStyle zyClothsStyle);
String sort(String id);
/**
* 服装类型详情
* @param id 根据服装款式id进行查询
*/
AllClothStyle queryDetail(String id);
}

@ -1,24 +1,25 @@
package org.jeecg.modules.zyclothsstyle.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.bytedeco.javacpp.freenect;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import org.jeecg.modules.demo.zyStyleModular.service.IZyStyleModularService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.service.IZyStyleAccessoriesService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jetbrains.annotations.NotNull;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
@ -31,51 +32,90 @@ import java.util.regex.Pattern;
*/
@Service
public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, ZyClothsStyle> implements IZyClothsStyleService {
@Autowired
private IZyStyleModuleService zyStyleModuleService;
@Autowired
private IZyStyleFabricService zyStyleFabricService;
@Autowired
private IZyStyleModularService zyStyleModularService;
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Resource
private ZyClothsStyleMapper zyClothsStyleMapper;
@Resource
ZyClothsTypeMapper zyClothsTypeMapper;
/**
* 生成编号 类型编号10位+顺序号8位
* 服装类型详情
*
* @param zyClothsStyle
* @param id 根据服装款式id进行查询
*/
@Override
public String generateNumber(ZyClothsStyle zyClothsStyle) {
//先拿到类型编号
String nums = zyClothsStyle.getTypeId();
ZyClothsType zyClothsType = zyClothsTypeMapper.selectById(nums);
String nums1 = zyClothsType.getNums();
//截取后十位
//String substring = nums.substring(nums.length() - 10);
//再来一个顺序号
String format = String.format("%08d", orderNumber());
//生成编码
return nums1 + format;
public AllClothStyle queryDetail(String id) {
AllClothStyle zyAllClothStyle = new AllClothStyle();
//服装款式详情
ZyClothsStyle zyClothsStyle = detail(id);
zyAllClothStyle.setZyClothsStyle(zyClothsStyle);
//服装 款式 模块详情
List<NewStyleModule> zyStyleModuleList = zyStyleModuleService.detail(id);
zyAllClothStyle.setZyStyleModuleList(zyStyleModuleList);
//服装 面料详情
List<NewZyStyleFabric> zyStyleFabricList = zyStyleFabricService.detail(id);
zyAllClothStyle.setZyStyleFabricList(zyStyleFabricList);
//服装 辅料详情
List<ZyStyleAccessories> zyStyleAccessoriesList = zyStyleAccessoriesService.detail(id);
zyAllClothStyle.setZyStyleAccessoriesList(zyStyleAccessoriesList);
//服装 工序详情
List<ZyStyleModular> zyStyleModularList = zyStyleModularService.detail(id);
zyAllClothStyle.setZyStyleModularList(zyStyleModularList);
return zyAllClothStyle;
}
public ZyClothsStyle detail(String id){
ZyClothsStyle zyClothsStyle = zyClothsStyleMapper.selectById(id);
//翻译规格 shape 和企业
String shape = zyClothsStyle.getShape();
if (shape.equals("1")){
zyClothsStyle.setShape("预制");
}else if (shape.equals("0")){
zyClothsStyle.setShape("定制");
}else {
zyClothsStyle.setShape("null");
}
String enterpriseName = zyClothsStyleMapper.getEnterpriseName(zyClothsStyle.getEnterpriseId());
if (StringUtils.hasText(enterpriseName)){
zyClothsStyle.setEnterpriseId(enterpriseName);
}else {
zyClothsStyle.setEnterpriseId("null");
}
System.out.println("zyClothsStyle 服装款式详情"+zyClothsStyle);
return zyClothsStyle;
}
@Override
public String sort(String id) {
String nums = zyClothsStyleMapper.sort(id);
// System.out.println(nums + " nums");
//System.out.println(nums + " nums");
String format = String.format("%08d", orderNumber());
// System.err.println(format + " format");
//System.err.println(format + " format");
return nums + format;
}
private Long orderNumber() {
List<String> numsList = zyClothsStyleMapper.selectNumsList();
// System.out.println(numsList);
// System.out.println(numsList.size());
/*
System.out.println(numsList);
System.out.println(numsList.size());
*/
List<Long> list = new ArrayList<>();
for (String nums : numsList) {
String REGEX = "[^0-9]";
String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
if (newNums.length()>8) {
if (newNums.length() > 8) {
String substring = newNums.substring(newNums.length() - 8);
list.add(Long.valueOf(substring));
continue;
@ -86,8 +126,10 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
list.add(Long.valueOf(newNums));
}
// System.out.println(list);
// System.out.println(list.size());
/*
System.out.println(list);
System.out.println(list.size());
*/
return Collections.max(list) + 1;
}
}

@ -17,8 +17,12 @@ public interface ZyStyleFabricMapper extends BaseMapper<ZyStyleFabric> {
/**
* @param styleId zyClothsStyle 中的id 款式id
* 拿到服装类型名称
* @param styleId zyClothsStyle 中的id 款式id
*/
@Select("select type_name from zy_cloths_style where id = #{styleId}")
String getTypeName(String styleId);
@Select("SELECT * FROM zy_style_fabric WHERE style_id = #{id}")
List<ZyStyleFabric> listByStyleId(String id);
}

@ -2,8 +2,11 @@ package org.jeecg.modules.zystylefabric.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
import java.util.List;
/**
* @Description: 款式面料表
* @Author: jeecg-boot
@ -12,4 +15,5 @@ import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
*/
public interface IZyStyleFabricService extends IService<ZyStyleFabric> {
List<NewZyStyleFabric> detail(String id);
}

@ -1,12 +1,22 @@
package org.jeecg.modules.zystylefabric.service.impl;
import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* @Description: 款式面料表
* @Author: jeecg-boot
@ -16,4 +26,45 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyStyleFabricServiceImpl extends ServiceImpl<ZyStyleFabricMapper, ZyStyleFabric> implements IZyStyleFabricService {
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyFabricService zyFabricService;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;
@Override
public List<NewZyStyleFabric> detail(String id) {
List<ZyStyleFabric> list = zyStyleFabricMapper.listByStyleId(id);
List<NewZyStyleFabric> newZyStyleFabrics = new ArrayList<>();
for (ZyStyleFabric zyStyleF : list) {
System.out.println("****" + zyStyleF);
NewZyStyleFabric newZySF = new NewZyStyleFabric();
//编辑回显
newZySF.setId(zyStyleF.getId());
newZySF.setFabricId(zyStyleF.getFabricId());
newZySF.setStyleId(zyStyleF.getStyleId());
//拿到服装类型名称
String typeName = zyStyleFabricMapper.getTypeName(newZySF.getStyleId());
newZySF.setTypeName(typeName);
//款式编号和名称
String styleId = zyStyleF.getStyleId();
ZyClothsStyle styleById = zyClothsStyleService.getById(styleId);
newZySF.setStyleNums(styleById.getNums());
newZySF.setStyleNames(styleById.getStyleNames());
//模块编号和名称
String fabricId = zyStyleF.getFabricId();
ZyFabric fabricById = zyFabricService.getById(fabricId);
newZySF.setFabricNumber(fabricById.getFabricNumber());
newZySF.setFabricName(fabricById.getName());
newZySF.setCreateTime(zyStyleF.getCreateTime());
newZyStyleFabrics.add(newZySF);
}
return newZyStyleFabrics;
}
}

@ -75,7 +75,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
System.err.println("传来的 "+id);
System.err.println("ZyStyleModule 款式模块表 传来的 "+id);
if (id != null) {
queryWrapper.eq("style_id", id);
}

@ -15,5 +15,6 @@ import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
*/
public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> {
/**根据服装款式的id style_id 查询所有*/
List<ZyStyleModule> handWritingList(String id);
}

@ -2,8 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper">
<select id="handWritingList" resultType="org.jeecg.modules.zystylemodule.entity.ZyStyleModule" parameterType="string">
select * from zy_style_module
where style_id = #{id}
<select id="handWritingList" resultType="org.jeecg.modules.zystylemodule.entity.ZyStyleModule"
parameterType="string">
SELECT *
FROM zy_style_module
WHERE style_id = #{id}
</select>
</mapper>

@ -15,5 +15,5 @@ import java.util.List;
*/
public interface IZyStyleModuleService extends IService<ZyStyleModule> {
List<NewStyleModule> detail(String id);
}

@ -1,12 +1,24 @@
package org.jeecg.modules.zystylemodule.service.impl;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* @Description: 款式模块表
@ -17,4 +29,59 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyStyleModuleServiceImpl extends ServiceImpl<ZyStyleModuleMapper, ZyStyleModule> implements IZyStyleModuleService {
@Autowired
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;
@Resource
private ZyStyleModuleMapper zyStyleModuleMapper;
@Override
public List<NewStyleModule> detail(String id) {
List<ZyStyleModule> list = zyStyleModuleMapper.handWritingList(id);
List<NewStyleModule> newStyleModuleList = new ArrayList<>();
for (ZyStyleModule zyStyleModule : list) {
NewStyleModule newSeMo = new NewStyleModule();
//编辑回显
newSeMo.setId(zyStyleModule.getId());
newSeMo.setTypeId(zyStyleModule.getTypeId());
newSeMo.setStyleId(zyStyleModule.getStyleId());
newSeMo.setModularId(zyStyleModule.getModularId());
//款式编号和名称
String styleId = zyStyleModule.getStyleId();
ZyClothsStyle styleById = zyClothsStyleService.getById(styleId);
newSeMo.setStyleNums(styleById.getNums());
newSeMo.setStyleNames(styleById.getStyleNames());
//模块编号和名称
String modularId = zyStyleModule.getModularId();
ZyClothsModular modularById = zyClothsModularService.getById(modularId);
if(StringUtils.isEmpty(modularById)){
newSeMo.setModularNums("null");
newSeMo.setModularName("null");
}else {
newSeMo.setModularNums(modularById.getNums());
newSeMo.setModularName(modularById.getModularName());
}
newSeMo.setCreateTime(zyStyleModule.getCreateTime());
//服装类型 服装类型的id 不知道什么情况 传的是zy_cloths_style中的type_id
//String styleId1 = zyStyleModule.getStyleId();
String typeName = zyStyleFabricMapper.getTypeName(zyStyleModule.getStyleId());
//System.out.println(typeId);
//String typeNameByTypeId = zyClothsStyleMapper.getTypeNameByTypeId(typeId);
//System.err.println(typeNameByTypeId);
if (typeName != null){
newSeMo.setTypeName(typeName);
} else {
newSeMo.setTypeName("typeName为空");
}
newStyleModuleList.add(newSeMo);
}
return newStyleModuleList;
}
}

Loading…
Cancel
Save