Merge remote-tracking branch 'origin/master'

zhc4dev
wangjiadong 2 years ago
commit 353931e45a
  1. 226
      ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricDataList.vue
  2. 198
      ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricList.vue
  3. 10
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue
  4. 331
      ant-design-vue-jeecg/src/views/productplan/ZyPlanTeamDataList.vue
  5. 257
      ant-design-vue-jeecg/src/views/productplan/ZyPlanTeamList.vue
  6. 126
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm.vue
  7. 106
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm2.vue
  8. 70
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal.vue
  9. 60
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal2.vue
  10. 84
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal__Style#Drawer.vue
  11. 781
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue
  12. 9
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java
  13. 8
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java
  14. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsComponentServiceImpl.java
  15. 8
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularCompentServiceImpl.java
  16. 7
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessComponentServiceImpl.java
  17. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/service/impl/ZyStyleAccessoriesServiceImpl.java
  18. 152
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanFabricController.java
  19. 75
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java
  20. 85
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java
  21. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcess.java
  22. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ProcessDataVo.java
  23. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanFabricMapper.java
  24. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanFabricService.java
  25. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java
  26. 20
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanFabricServiceImpl.java
  27. 41
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java
  28. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/entity/vo/AllClothStyle.java
  29. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  30. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/mapper/ZyStyleFabricMapper.java
  31. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java
  32. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/mapper/ZyStyleModelMapper.java
  33. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/IZyStyleModelService.java
  34. 33
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java

@ -0,0 +1,226 @@
<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 @click="zyStyleFabricHandleAdd(planId)" type="primary" icon="plus">新增</a-button>
<!-- <a-button @click="zyStyleFabricHandleAdd(stationId)" type="primary" icon="plus">新增</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('计划面料')">导出</a-button>
<a-button type="primary" @click="fanHui()">返回</a-button>
</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: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<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>
<!-- <a-divider type="vertical"/>-->
<!-- <a @click="jumpPage1(record)">制定计划工序</a>-->
</span>
</a-table>
</div>
<!-- <div class="table-operator" style="text-align: right">-->
<!-- <a-button type="primary" @click="saveBatch">提交</a-button>-->
<!-- </div>-->
<zy-plan-fabric-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-fabric-modal>
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>-->
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyPlanFabricModal from './modules/ZyPlanFabricModal'
import {getAction, httpAction, downFile, postAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyPlanFabricDataList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyPlanFabricModal
},
data() {
return {
description: '计划面料管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
// {
// title: 'id',
// align: "center",
// dataIndex: 'planId'
// },
{
title: '计划ID',
align: "center",
dataIndex: 'planId'
},
{
title: '面料',
align: "center",
dataIndex: 'fabricId_dictText'
},
{
title: '用量(厘米)',
align: "center",
dataIndex: 'amount'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanFabric/list",
delete: "/org.jeecg.modules.productplan/zyPlanFabric/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanFabric/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanFabric/exportXls",
importExcelUrl: "org.jeecg.modules.productplan/zyPlanFabric/importExcel",
},
loadRouteType: false,
planId: "",
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
// this.model = Object.assign({}, record);
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
fanHui() {
this.$router.push({
//
path: '/productplan/ZyplanFabricList',
});
},
valueChange(value) {
if (value) this.loadData()
},
//
loadParameter() {
if (this.loadRouteType === false) {
this.planId = this.$route.query.planId;
// this.biaoTi = this.$route.query.styleNames+"";
console.log("*******传递的planId:" + this.planId)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
console.log("----------------the params:", params);
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
} else {
this.$message.warning(res.message)
}
}).finally(() => {
// this.dataSource.forEach(item => {
// item['stationName'] = this.stationName;
// item['stationNum'] = this.stationNum;
// })
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.planId = this.planId;
return filterObj(param);
},
// initDictConfig() {
// },
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''})
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''})
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,198 @@
<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('计划面料表')">导出</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: onSelectChange}"
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="action" slot-scope="text, record">-->
<!--&lt;!&ndash; <a @click="handleEdit(record)">编辑</a>&ndash;&gt;-->
<!-- <a-divider type="vertical" />-->
<!-- <a-dropdown>-->
<!--&lt;!&ndash; <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>&ndash;&gt;-->
<!-- <a-menu slot="overlay">-->
<!--&lt;!&ndash; <a-menu-item>&ndash;&gt;-->
<!--&lt;!&ndash; <a @click="handleDetail(record)">详情</a>&ndash;&gt;-->
<!--&lt;!&ndash; </a-menu-item>&ndash;&gt;-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
<!-- </span>-->
<span slot="action" slot-scope="text, record">
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- <a-divider type="vertical"/>-->
<a @click="jumpPage1(record)">制定计划面料</a>
</span>
</a-table>
</div>
<zy-plan-fabric-modal2 ref="modalForm" @ok="modalFormOk"></zy-plan-fabric-modal2>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyPlanFabricModal2 from './modules/ZyPlanFabricModal2'
export default {
name: 'ZyPlanFabricList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyPlanFabricModal2
},
data () {
return {
description: '计划面料表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'计划ID',
align:"center",
dataIndex: 'planId'
},
{
title:'面料',
align:"center",
dataIndex: 'fabricId_dictText'
},
{
title:'用量(合计)',
align:"center",
dataIndex: 'amount'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanFabric/list",
delete: "/org.jeecg.modules.productplan/zyPlanFabric/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanFabric/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanFabric/exportXls",
importExcelUrl: "org.jeecg.modules.productplan/zyPlanFabric/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
jumpPage1(record) {
this.$router.push({
path: '/productplan/ZyPlanFabricDataList',
query: { //
'planId': record.planId,
// 'stationName': record.stationName,
},
});
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'fabricId',text:'面料id',dictCode:''})
fieldList.push({type:'BigDecimal',value:'amount',text:'用量(合计)',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -104,7 +104,7 @@
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
<a @click="jumpPage1(record)">制定计划详情</a>
<a @click="jumpPage1(record)">制定计划工序</a>
</span>
</a-table>
@ -174,8 +174,8 @@ export default {
{
title: '成员',
align: "center",
dataIndex: 'userIds',
scopedSlots: {customRender: 'userIds'}
dataIndex: 'userIds_dictText',
scopedSlots: {customRender: 'userIds_dictText'}
},
{
title: '操作',
@ -187,8 +187,8 @@ export default {
}
],
url: {
// list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
list: "/org.jeecg.modules.productplan/zyPlanProcess/list2",
list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
// list: "/org.jeecg.modules.productplan/zyPlanProcess/list2",
productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",

@ -0,0 +1,331 @@
<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 @click="zyStyleFabricHandleAdd(stationId)" type="primary" icon="plus">新增</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('1')">导出</a-button>
<a-button type="primary" @click="fanHui()">返回</a-button>
</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: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<!-- <span slot="machineIds_dictText" slot-scope="text, record">-->
<span slot="groupMemberList" slot-scope="record,text">
<a-select mode="multiple"
@select="selectData($event,text)"
style="width: 220px"
placeholder="请选择">
<a-select-option v-for="item in record" :value="item.id">
{{ item.userId }}
</a-select-option>
</a-select>
</span>
<!-- <span slot="toolsList" slot-scope="toolsList">-->
<!-- <a-select style="width: 180px" placeholder="请选择">-->
<!-- <a-select-option v-for="item in toolsList" :value="item.id">-->
<!-- {{ item.name }}-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </span>-->
<!-- <span slot="machineList" slot-scope="machineList">-->
<!-- <a-select style="width: 180px" placeholder="请选择">-->
<!-- <a-select-option v-for="item in machineList" :value="item.id">-->
<!-- {{ item.name }}-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </span>-->
</a-table>
</div>
<div class="table-operator" style="text-align: right">
<a-button type="primary" @click="saveBatch">提交</a-button>
</div>
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>-->
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyPlanProcessModal from './modules/ZyPlanProcessModal2'
import {getAction, httpAction, downFile, postAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyPlanProcessList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyPlanProcessModal
},
data() {
return {
description: '生产计划班组管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
// {
// title: 'id',
// align: "center",
// dataIndex: 'planId'
// },
{
title: '工单编号',
align: "center",
dataIndex: 'workOrderId'
},
{
title: '产品id',
align: "center",
dataIndex: 'productId'
},
{
title: '产品',
align: "center",
dataIndex: 'productName'
},
{
title: '车间',
align: "center",
dataIndex: 'departName'
},
{
title: '工序',
align: "center",
dataIndex: 'processName'
},
{
title: '班组成员',
align: "center",
dataIndex: 'groupMemberList',
width: 150,
scopedSlots: {customRender: 'groupMemberList'}
},
// {
// title: '',
// align: "center",
// dataIndex: 'toolsList',
// width: 150,
// scopedSlots: {customRender: 'toolsList'}
// // scopedSlots: {customRender: this.toolsList}
// },
// {
// title: '',
// align: "center",
// dataIndex: 'machineList',
// width: 150,
// scopedSlots: {customRender: 'machineList'}
// },
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/getTeamDatalist",
// getTeamDatalistByPlanId: "/org.jeecg.modules.productplan/zyPlanProcess/getTeamDatalistByPlanId",
groupMemberlist: "/groupxMember/list",
addTeamBatch: "/org.jeecg.modules.productplan/zyPlanProcess/addTeamBatch",
// stationMachinelist: "/stationMachine/list",
// productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",
// deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",
// exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls",
// importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel",
},
loadRouteType: false,
planId: "",
dictOptions: {},
superFieldList: [],
toolsList: [],
machineList: [],
processIds: [],
memberIds: [],
}
},
created() {
this.getSuperFieldList();
// this.model = Object.assign({}, record);
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
saveBatch() {
alert("保存开始")
postAction(this.url.addTeamBatch, this.processIds).then((res) => {
if (res.success) {
this.$message.success(res.message)
this.$emit('ok')
this.close()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.confirmLoading = false
})
},
fanHui() {
this.$router.push({
path: '/productplan/ZyPlanTeamList',
});
},
//$eventkey
selectData($event, row) {
console.log("group_member key $event=" + $event);
// console.log("group_member key row=" + JSON.stringify(row));
console.log("productProcessId=" + JSON.stringify(row.productProcessId));
this.processIds.push({"processId": row.productProcessId, "userIds": $event});
// for (var i = 0; i < processIds.length; i++) {
console.log("the processIds length:" + this.processIds.length);
},
//
loadParameter() {
if (this.loadRouteType === false) {
this.planId = this.$route.query.planId;
// this.biaoTi = this.$route.query.styleNames+"";
console.log("*******传递的planId:" + this.planId)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
console.log("----------------the params:", params);
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
} else {
this.$message.warning(res.message)
}
}).finally(() => {
// this.dataSource.forEach(item => {
// item['stationName'] = this.stationName;
// item['stationNum'] = this.stationNum;
// })
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.planId = this.planId;
return filterObj(param);
},
// initDictConfig() {
// },
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''})
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''})
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList
},
// jumpPage1(record) {
// this.$router.push({
// // path: '/productplan/ZyProductPlanList',
// path: '/productplan/ZyPlanProcessDataList',
//
// // query: { //
// // 'stationId': record.id,
// // 'stationName': record.stationName,
// // },
// });
// },
// pf(record) {
// this.$router.push({
// path: '/productplan/ZyPlanProcessAddList',
// query: { //
// }
// });
// getAction("productPlanlist", {id: record.id}).then((res) => {
// if (res.success) {
// this.$router.push({
// path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList',
// query: { //
// }
// });
// } else {
// this.$message.error(res.message)
// }
// });
// },
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,257 @@
<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('生产计划工序')">导出</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: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<span slot="processId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="stationId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="toolsIds_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="machineIds_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="userIds" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="action" slot-scope="text, record">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
<a @click="jumpPage1(record)">制定计划班组</a>
</span>
</a-table>
</div>
<zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyPlanProcessModal from './modules/ZyPlanProcessModal2'
export default {
name: 'ZyPlanProcessList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyPlanProcessModal
},
data() {
return {
description: '生产计划工序管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '生产计划',
align: "center",
dataIndex: 'planId'
},
{
title: '工序',
align: "center",
dataIndex: 'processId_dictText',
scopedSlots: {customRender: 'stationId_dictText'}
},
{
title: '工位',
align: "center",
dataIndex: 'stationId_dictText',
scopedSlots: {customRender: 'stationId_dictText'}
},
{
title: '设备',
align: "center",
dataIndex: 'machineIds_dictText',
scopedSlots: {customRender: 'machineIds_dictText'}
},
{
title: '工具',
align: "center",
dataIndex: 'toolsIds_dictText',
scopedSlots: {customRender: 'toolsIds_dictText'}
},
{
title: '成员',
align: "center",
dataIndex: 'userIds_dictText',
scopedSlots: {customRender: 'userIds_dictText'}
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
// list: "/org.jeecg.modules.productplan/zyPlanProcess/list2",
productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls",
importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel",
},
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''})
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''})
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList
},
jumpPage1(record) {
this.$router.push({
path: '/productplan/ZyPlanTeamDataList',
query: { //
'planId': record.planId,
// 'stationName': record.stationName,
},
});
},
// pf(record) {
// this.$router.push({
// path: '/productplan/ZyPlanProcessAddList',
// query: { //
// }
// });
// getAction("productPlanlist", {id: record.id}).then((res) => {
// if (res.success) {
// this.$router.push({
// path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList',
// query: { //
// }
// });
// } else {
// this.$message.error(res.message)
// }
// });
// },
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,126 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="面料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricId">
<!-- <j-multi-select-tag type="checkbox" v-model="model.fabricId" dictCode="zy_fabric,name,id" placeholder="请选择面料" />-->
<j-dict-select-tag type="list" v-model="model.fabricId" dictCode="zy_fabric,name,id" placeholder="请选择面料"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用量(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount">
<a-input-number v-model="model.amount" placeholder="请输入用量" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ZyPlanFabricForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
planId:''
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
fabricId: [
{required: true, message: "面料不能为空"},
],
// status: [
// {required: true,message: ""},
// ],
amount: [
{required: true, message: "用量不能不空"},
{pattern: /^[0-9]{0,1000}$/, message: '用量不能为空且长度为正整数'}
],
},
url: {
add: "/org.jeecg.modules.productplan/zyPlanFabric/add",
edit: "/org.jeecg.modules.productplan/zyPlanFabric/edit",
queryById: "/org.jeecg.modules.productplan/zyPlanFabric/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add(planId) {
this.model.planId = planId;
console.log("Modal层接收到上级参数-planId:" + this.model.planId);
this.edit(this.model);
},
// 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;
})
}
})
},
}
}
</script>

@ -0,0 +1,106 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="生产计划" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planId">
<!-- <a-input v-model="model.planId" placeholder="请选择生产计划"></a-input>-->
<j-dict-select-tag type="list" v-model="model.planId" dictCode="zy_product_plan,id,id"
placeholder="请选择生产计划"/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ZyPlanFabricForm2',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/org.jeecg.modules.productplan/zyPlanFabric/add",
edit: "/org.jeecg.modules.productplan/zyPlanFabric/edit",
queryById: "/org.jeecg.modules.productplan/zyPlanFabric/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
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;
})
}
})
},
}
}
</script>

@ -0,0 +1,70 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-plan-fabric-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-plan-fabric-form>
</j-modal>
</template>
<script>
import ZyPlanFabricForm from './ZyPlanFabricForm'
export default {
name: 'ZyPlanFabricModal',
components: {
ZyPlanFabricForm
},
data () {
return {
model:{
planId:'',
},
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add (id) {
this.model.planId=id
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add(id);
})
},
// add () {
// this.visible=true
// this.$nextTick(()=>{
// this.$refs.realForm.add();
// })
// },
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-plan-fabric-form2 ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-plan-fabric-form2>
</j-modal>
</template>
<script>
import ZyPlanFabricForm2 from './ZyPlanFabricForm2'
export default {
name: 'ZyPlanFabricModal2',
components: {
ZyPlanFabricForm2
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<zy-plan-fabric-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-plan-fabric-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import ZyPlanFabricForm from './ZyPlanFabricForm'
export default {
name: 'ZyPlanFabricModal',
components: {
ZyPlanFabricForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -8,410 +8,425 @@
:width='1000'
@ok="handleOk"
@cancel="handleCancel">
<!-- <table border="1" style="width: 98%;font-size:14px;margin:30px auto 0" class="table">-->
<!-- <tr>-->
<!-- <td><span>款式名称</span>tttt</td>-->
<!-- <td><span>款式编号</span>QIYE80301100000130</td>-->
<!-- <td><span>款式规格</span>123</td>-->
<!-- <td><span>款式形式</span>预制</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td><span>企业</span>黄淮服装智能制造中心</td>-->
<!-- <td><span>款式创建时间</span>2022-12-06 10:02:59</td>-->
<!-- &lt;!&ndash; 模块&ndash;&gt;-->
<!-- <td><span>服装类型</span>tttt</td>-->
<!-- <td><span>模块编号</span>QIYE80301100000130</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td><span>模块名称</span>2</td>-->
<!-- <td><span>模块创建时间</span>2022-12-06 10:02:59</td>-->
<!-- &lt;!&ndash; 面料&ndash;&gt;-->
<!-- <td><span>面料编号</span>2</td>-->
<!-- <td><span>面料名称</span>2A01</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td><span>面料创建时间</span>2022-12-06 10:02:59</td>-->
<!-- &lt;!&ndash; 辅料&ndash;&gt;-->
<!-- <td><span>辅料名称</span>2A01</td>-->
<!-- <td><span>辅料创建时间</span>2022-12-06 10:02:59</td>-->
<!-- &lt;!&ndash; 工序&ndash;&gt;-->
<!-- <td><span>工序名称</span>2A01</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td><span>工序创建时间</span>2022-12-06 10:02:59</td>-->
<!-- <table border="1" style="width: 98%;font-size:14px;margin:30px auto 0" class="table">-->
<!-- <tr>-->
<!-- <td><span>款式名称</span>tttt</td>-->
<!-- <td><span>款式编号</span>QIYE80301100000130</td>-->
<!-- <td><span>款式规格</span>123</td>-->
<!-- <td><span>款式形式</span>预制</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td><span>企业</span>黄淮服装智能制造中心</td>-->
<!-- <td><span>款式创建时间</span>2022-12-06 10:02:59</td>-->
<!-- &lt;!&ndash; 模块&ndash;&gt;-->
<!-- <td><span>服装类型</span>tttt</td>-->
<!-- <td><span>模块编号</span>QIYE80301100000130</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td><span>模块名称</span>2</td>-->
<!-- <td><span>模块创建时间</span>2022-12-06 10:02:59</td>-->
<!-- &lt;!&ndash; 面料&ndash;&gt;-->
<!-- <td><span>面料编号</span>2</td>-->
<!-- <td><span>面料名称</span>2A01</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td><span>面料创建时间</span>2022-12-06 10:02:59</td>-->
<!-- &lt;!&ndash; 辅料&ndash;&gt;-->
<!-- <td><span>辅料名称</span>2A01</td>-->
<!-- <td><span>辅料创建时间</span>2022-12-06 10:02:59</td>-->
<!-- &lt;!&ndash; 工序&ndash;&gt;-->
<!-- <td><span>工序名称</span>2A01</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td><span>工序创建时间</span>2022-12-06 10:02:59</td>-->
<!-- <td><span>面料编号</span>2</td>-->
<!-- <td><span>面料名称</span>2A01</td>-->
<!-- <td><span>面料名称</span>2A01</td>-->
<!-- </tr>-->
<!-- <td><span>面料编号</span>2</td>-->
<!-- <td><span>面料名称</span>2A01</td>-->
<!-- <td><span>面料名称</span>2A01</td>-->
<!-- </tr>-->
<!-- </table>-->
<!-- </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 rowKey="nums" :pagination="false">
</a-table>
<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
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" 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="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" rowKey="id" bordered :pagination="false">
<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"
rowKey="id" bordered :pagination="false">
</a-table>
</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" rowKey="id" bordered :pagination="false">
<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"
rowKey="id" bordered :pagination="false">
</a-table>
</a-table>
<h3 style="width: 98%;;margin:20px auto 0">管理型号</h3>
<!-- <a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns4" :data-source="data4" bordered :pagination="false">-->
<h3 style="width: 98%;;margin:20px auto 0">管理型号</h3>
<!-- <a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns4" :data-source="data4" bordered :pagination="false">-->
<!-- </a-table>-->
<!-- </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" rowKey="id" bordered :pagination="false">
<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"
rowKey="id" bordered :pagination="false">
</a-table>
</a-table>
</a-spin>
</a-modal>
</div>
</template>
<script>
const columns1 = [
{
title: '款式名称',
dataIndex: 'styleNames',
key: 'styleNames',
align:'center'
},
{
title: '款式编号',
dataIndex: 'nums',
key: 'nums',
align:'center'
},
{
title: '款式规格',
dataIndex: 'specification',
key: 'specification',
align:'center'
},
{
title: '款式形式',
dataIndex: 'shape',
key: 'shape',
align:'center'
},
{
title: '企业',
dataIndex: 'enterpriseId',
key: 'enterpriseId',
align:'center'
},
{
title: '款式创建时间',
dataIndex: 'createTime',
key: 'createTime',
align:'center'
},
];
const columns = [
{
title: '服装类型',
dataIndex: 'typeName',
key: 'typeName',
align:'center'
},
{
title: '款式编号',
dataIndex: 'styleNums',
key: 'styleNums',
align:'center'
},
{
title: '款式名称',
dataIndex: 'styleNames',
key: 'styleNames',
align:'center'
},
{
title: '模块编号',
dataIndex: 'modularNums',
key: 'modularNums',
align:'center'
},
{
title: '模块名称',
dataIndex: 'modularName',
key: 'modularName',
align:'center'
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
align:'center'
}
];
const columns2 = [
{
title: '服装类型',
dataIndex: 'typeName',
key: 'typeName',
align:'center'
},
{
title: '款式编号',
dataIndex: 'styleNums',
key: 'styleNums',
align:'center'
},
{
title: '款式名称',
dataIndex: 'styleNames',
key: 'styleNames',
align:'center'
},
{
title: '面料编号',
dataIndex: 'fabricNumber',
key: 'fabricNumber',
align:'center'
},
{
title: '面料名称',
dataIndex: 'fabricName',
key: 'fabricName',
align:'center'
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
align:'center'
}
];
const columns3 = [
{
title: '服装类型名称',
dataIndex: 'typeName',
key: 'typeName',
align:'center'
},
{
title: '款式名称',
dataIndex: 'styleId',
key: 'styleId',
align:'center'
},
{
title: '辅料名称',
dataIndex: 'accessoriesId',
key: 'accessoriesId',
align:'center'
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
align:'center'
}
];
const columns4 = [
{
title: '服装款式',
dataIndex: 'a',
key: 'a',
align:'center'
},
{
title: '是否默认尺码',
dataIndex: 'c',
key: 'c',
align:'center'
},
{
title: '型号编码',
dataIndex: 'e',
key: 'e',
align:'center'
},
{
title: '码数',
dataIndex: 'f',
key: 'f',
align:'center'
},
{
title: '型',
dataIndex: 'a',
key: 'a',
align:'center'
},
{
title: '号',
dataIndex: 'a',
key: 'a',
align:'center'
},
{
title: '领大',
dataIndex: 'c',
key: 'c',
align:'center'
},
{
title: '胸围',
dataIndex: 'e',
key: 'e',
align:'center'
},
{
title: '袖长',
dataIndex: 'f',
key: 'f',
align:'center'
},
{
title: '连肩袖长',
dataIndex: 'e',
key: 'e',
align:'center'
},
{
title: '总肩宽',
dataIndex: 'f',
key: 'f',
align:'center'
},
{
title: '袖口',
dataIndex: 'f',
key: 'f',
align:'center'
},
{
title: '腰围',
dataIndex: 'f',
key: 'f',
align:'center'
},
{
title: '下摆',
dataIndex: 'f',
key: 'f',
align:'center'
}
];
const data4 = [
{
key: '1',
a:'女衬衫',
c:'test010',
e:'123',
f:'2022-12-06 10:02:59',
}
];
const columns5 = [
{
title: '款式名称',
dataIndex: 'styleId',
key: 'styleId',
align:'center'
},
{
title: '工序',
dataIndex: 'processId',
key: 'processId',
align:'center'
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
align:'center'
const columns1 = [
{
title: '款式名称',
dataIndex: 'styleNames',
key: 'styleNames',
align: 'center'
},
{
title: '款式编号',
dataIndex: 'nums',
key: 'nums',
align: 'center'
},
{
title: '款式规格',
dataIndex: 'specification',
key: 'specification',
align: 'center'
},
{
title: '款式形式',
dataIndex: 'shape',
key: 'shape',
align: 'center'
},
{
title: '企业',
dataIndex: 'enterpriseId',
key: 'enterpriseId',
align: 'center'
},
{
title: '款式创建时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center'
}
];
const columns = [
{
title: '服装类型',
dataIndex: 'typeName',
key: 'typeName',
align: 'center'
},
{
title: '款式编号',
dataIndex: 'styleNums',
key: 'styleNums',
align: 'center'
},
{
title: '款式名称',
dataIndex: 'styleNames',
key: 'styleNames',
align: 'center'
},
{
title: '模块编号',
dataIndex: 'modularNums',
key: 'modularNums',
align: 'center'
},
{
title: '模块名称',
dataIndex: 'modularName',
key: 'modularName',
align: 'center'
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center'
}
];
const columns2 = [
{
title: '服装类型',
dataIndex: 'typeName',
key: 'typeName',
align: 'center'
},
{
title: '款式编号',
dataIndex: 'styleNums',
key: 'styleNums',
align: 'center'
},
{
title: '款式名称',
dataIndex: 'styleNames',
key: 'styleNames',
align: 'center'
},
{
title: '面料编号',
dataIndex: 'fabricNumber',
key: 'fabricNumber',
align: 'center'
},
{
title: '面料名称',
dataIndex: 'fabricName',
key: 'fabricName',
align: 'center'
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center'
}
];
const columns3 = [
{
title: '服装类型名称',
dataIndex: 'typeName',
key: 'typeName',
align: 'center'
},
{
title: '款式名称',
dataIndex: 'styleId',
key: 'styleId',
align: 'center'
},
{
title: '辅料名称',
dataIndex: 'accessoriesId',
key: 'accessoriesId',
align: 'center'
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center'
}
];
const columns4 = [
{
title: '服装款式',
dataIndex: 'a',
key: 'a',
align: 'center'
},
{
title: '是否默认尺码',
dataIndex: 'c',
key: 'c',
align: 'center'
},
{
title: '型号编码',
dataIndex: 'e',
key: 'e',
align: 'center'
},
{
title: '码数',
dataIndex: 'f',
key: 'f',
align: 'center'
},
{
title: '型',
dataIndex: 'a',
key: 'a',
align: 'center'
},
{
title: '号',
dataIndex: 'a',
key: 'a',
align: 'center'
},
{
title: '领大',
dataIndex: 'c',
key: 'c',
align: 'center'
},
{
title: '胸围',
dataIndex: 'e',
key: 'e',
align: 'center'
},
{
title: '袖长',
dataIndex: 'f',
key: 'f',
align: 'center'
},
{
title: '连肩袖长',
dataIndex: 'e',
key: 'e',
align: 'center'
},
{
title: '总肩宽',
dataIndex: 'f',
key: 'f',
align: 'center'
},
{
title: '袖口',
dataIndex: 'f',
key: 'f',
align: 'center'
},
{
title: '腰围',
dataIndex: 'f',
key: 'f',
align: 'center'
},
{
title: '下摆',
dataIndex: 'f',
key: 'f',
align: 'center'
}
];
const data4 = [
{
key: '1',
a: '女衬衫',
c: 'test010',
e: '123',
f: '2022-12-06 10:02:59',
}
];
const columns5 = [
{
title: '款式名称',
dataIndex: 'styleId',
key: 'styleId',
align: 'center'
},
{
title: '工序',
dataIndex: 'processId',
key: 'processId',
align: 'center'
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center'
}
];
export default {
name: 'ZyClothsStyleListDetail',//
data() {
return {
visible: false,
model: {},
confirmLoading: true,
//
data: [],
columns,
//
data1: [],
columns1,
//
data2: [],
columns2,
//
data3: [],
columns3,
//
columns4,
data4,
//
columns5,
data5: [],
url: {
detail: "/zyclothsstyle/zyClothsStyle/detail",
},
id: '',
}
];
export default {
name: 'ZyClothsStyleListDetail',//
data () {
return {
visible: false,
model:{
},
confirmLoading:true,
//
data:[],
columns,
//
data1:[],
columns1,
//
data2:[],
columns2,
//
data3:[],
columns3,
//
columns4,
data4,
//
columns5,
data5:[],
url: {
detail: "/zyclothsstyle/zyClothsStyle/detail",
},
id:'',
},
methods: {
showModal(id) {
this.visible = true;
this.id = 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: '未查询到数据!'
});
}
},
methods: {
showModal(id) {
this.visible = true;
this.id = 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
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
},
handleOk(e) {
this.confirmLoading = true;
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 1);
},
handleCancel(e) {
this.confirmLoading = false
if (this.data1.length === 0) {
this.data1.push(res.result.zyClothsStyles)
}
this.data1 = res.result.zyClothsStyles
this.data2 = res.result.zyStyleFabricList
this.data3 = res.result.zyStyleAccessoriesList
this.data = res.result.zyStyleModuleList
this.data5 = res.result.zyStyleModularList
},
handleOk(e) {
this.confirmLoading = true;
setTimeout(() => {
this.visible = false;
},
this.confirmLoading = false;
}, 1);
},
}
</script >
handleCancel(e) {
this.visible = false;
},
},
}
</script>
<style scoped>
.table{border-color:#d9d9d9;border-radius: 3px}
.table td{padding: 10px 20px;max-width: 380px; }
.table td span{color: #333}
.table {
border-color: #d9d9d9;
border-radius: 3px
}
.table td {
padding: 10px 20px;
max-width: 380px;
}
.table td span {
color: #333
}
</style>

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.zyStyleModular.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -16,4 +17,12 @@ public interface ZyStyleModularMapper extends BaseMapper<ZyStyleModular> {
List<ZyStyleModular> selectListByStyleId(String styleId);
/**根据styleId 拿到 款式名称*/
@Select("select style_names from zy_cloths_style where id = #{styleId}")
String getStyleNameByStyleId(String styleId);
/**根据工序id 拿到 工序名称*/
@Select("select process_name from zy_process where id = #{processId}")
String getProcessNameByStyleId(String processId);
}

@ -13,7 +13,7 @@ import java.util.List;
/**
* @Description: 款式工序表
* @Author: jeecg-boot
* @Date: 2022-11-14
* @Date: 2022-11-14
* @Version: V1.0
*/
@Service
@ -25,6 +25,12 @@ public class ZyStyleModularServiceImpl extends ServiceImpl<ZyStyleModularMapper,
@Override
public List<ZyStyleModular> detail(String id) {
List<ZyStyleModular> list = zyStyleModularMapper.selectListByStyleId(id);
for (ZyStyleModular zy : list) {
String styleName = zyStyleModularMapper.getStyleNameByStyleId(zy.getStyleId());
zy.setStyleId(styleName);
String processName = zyStyleModularMapper.getProcessNameByStyleId(zy.getProcessId());
zy.setProcessId(processName);
}
return list;
}
}

@ -92,6 +92,10 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
}
String name = containChinese(zyClothsComponent.getEnterpriseId());
zyClothsComponent.setEnterpriseId(name);
String modularName = zyClothsModularMapper.getModularNameByModularId(zyClothsComponent.getModularId());
if (StringUtils.hasText(modularName)) {
zyClothsComponent.setModularId(modularName);
}
return zyClothsComponent;
}

@ -4,12 +4,14 @@ 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.mapper.ZyClothsModularMapper;
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 org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.List;
@ -31,6 +33,8 @@ public class ZyClothsModularCompentServiceImpl extends ServiceImpl<ZyClothsModul
private ZyClothsComponentMapper zyClothsComponentMapper;
@Resource
private ZyClothsModularCompentMapper zyClothsModularCompentMapper;
@Resource
private ZyClothsModularMapper zyClothsModularMapper;
/**
* 把部件信息查出来 赋给模块部件表
* @param componentId 部件id
@ -57,6 +61,10 @@ public class ZyClothsModularCompentServiceImpl extends ServiceImpl<ZyClothsModul
ZyClothsComponent byId = zyClothsComponentService.getById(partsName);
s.setPartsName(byId.getPartsName());
}
if (StringUtils.hasText(s.getModularId())){
String modularName = zyClothsModularMapper.getModularNameByModularId(s.getModularId());
s.setModularId(modularName);
}
}
return zyClothsModularComponents;
}

@ -46,6 +46,13 @@ public class ZyProcessComponentServiceImpl extends ServiceImpl<ZyProcessComponen
}else{
processComponent.setComponentId("null");
}
if (processComponent.getBottleneck().equals("1")){
processComponent.setBottleneck("是");
}else if (processComponent.getBottleneck().equals("2")){
processComponent.setBottleneck("否");
}else {
processComponent.setBottleneck(null);
}
}
return zyProcessComponents;
}

@ -32,6 +32,10 @@ public class ZyStyleAccessoriesServiceImpl extends ServiceImpl<ZyStyleAccessorie
for (ZyStyleAccessories zy : list) {
String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId());
zy.setTypeName(typeName);
String styleName = zyStyleFabricMapper.getStyleNameByStyleId(zy.getStyleId());
zy.setStyleId(styleName);
String accessoriesName = zyStyleFabricMapper.getAccessoriesNameByStyleId(zy.getAccessoriesId());
zy.setAccessoriesId(accessoriesName);
}
return list;
}

@ -0,0 +1,152 @@
package org.jeecg.modules.productplan.controller;
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.modules.productplan.entity.ZyPlanFabric;
import org.jeecg.modules.productplan.service.IZyPlanFabricService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
* @Description: 计划面料表
* @Author: jeecg-boot
* @Date: 2022-12-20
* @Version: V1.0
*/
@Api(tags = "计划面料表")
@RestController
@RequestMapping("/org.jeecg.modules.productplan/zyPlanFabric")
@Slf4j
public class ZyPlanFabricController extends JeecgController<ZyPlanFabric, IZyPlanFabricService> {
@Autowired
private IZyPlanFabricService zyPlanFabricService;
/**
* 分页列表查询
*
* @param zyPlanFabric
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "计划面料表-分页列表查询")
@ApiOperation(value = "计划面料表-分页列表查询", notes = "计划面料表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyPlanFabric zyPlanFabric, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
QueryWrapper<ZyPlanFabric> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanFabric, req.getParameterMap());
Page<ZyPlanFabric> page = new Page<ZyPlanFabric>(pageNo, pageSize);
IPage<ZyPlanFabric> pageList = zyPlanFabricService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyPlanFabric
* @return
*/
@AutoLog(value = "计划面料表-添加")
@ApiOperation(value = "计划面料表-添加", notes = "计划面料表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyPlanFabric zyPlanFabric) {
zyPlanFabricService.save(zyPlanFabric);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyPlanFabric
* @return
*/
@AutoLog(value = "计划面料表-编辑")
@ApiOperation(value = "计划面料表-编辑", notes = "计划面料表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyPlanFabric zyPlanFabric) {
zyPlanFabricService.updateById(zyPlanFabric);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "计划面料表-通过id删除")
@ApiOperation(value = "计划面料表-通过id删除", notes = "计划面料表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
zyPlanFabricService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "计划面料表-批量删除")
@ApiOperation(value = "计划面料表-批量删除", notes = "计划面料表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.zyPlanFabricService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "计划面料表-通过id查询")
@ApiOperation(value = "计划面料表-通过id查询", notes = "计划面料表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
ZyPlanFabric zyPlanFabric = zyPlanFabricService.getById(id);
if (zyPlanFabric == null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyPlanFabric);
}
/**
* 导出excel
*
* @param request
* @param zyPlanFabric
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyPlanFabric zyPlanFabric) {
return super.exportXls(request, zyPlanFabric, ZyPlanFabric.class, "计划面料表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyPlanFabric.class);
}
}

@ -1,7 +1,10 @@
package org.jeecg.modules.productplan.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.PageList;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -10,11 +13,14 @@ 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.exception.JeecgBootException;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.productplan.entity.ZyPlanProcess;
import org.jeecg.modules.productplan.entity.vo.ProcessDataVo;
import org.jeecg.modules.productplan.service.IZyPlanProcessService;
import org.jeecg.modules.team.entity.GroupxMember;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
@ -22,9 +28,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @Description: 生产计划工序
@ -111,6 +115,33 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
return Result.OK(processDatalist);
}
@ApiOperation(value = "计划班组管理-查询产品工序&班组", notes = "计划班组管理-查询产品工序&班组")
@GetMapping(value = "/getTeamDatalist")
public Result<?> getTeamDatalist(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
// Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
List<ProcessDataVo> processDatalist = zyPlanProcessService.getTeamDatalist(zyPlanProcess);
// PageList<ProcessDataVo> processDataVos = new PageList<>(processDatalist, processDatalist.size());
return Result.OK(processDatalist);
}
@ApiOperation(value = "计划班组管理-查询产品工序&班组", notes = "计划班组管理-查询产品工序&班组")
@GetMapping(value = "/getTeamDatalistByPlanId")
public Result<?> getTeamDatalistByPlanId(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
queryWrapper.eq("plan_id", zyPlanProcess.getPlanId());
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
IPage<ZyPlanProcess> pageList = zyPlanProcessService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -125,6 +156,29 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
return Result.OK("添加成功!");
}
// @AutoLog(value = "生产计划工序-添加")
@ApiOperation(value = "计划工序管理-批量添加工序、工位、设备", notes = "计划工序管理-批量添加工序、工位、设备")
@PostMapping(value = "/addProcessBatch")
public Result<?> addProcessBatch(@RequestBody List<ZyPlanProcess> zyPlanProcessList) {
zyPlanProcessService.saveBatch(zyPlanProcessList);
return Result.OK("添加成功!");
}
// @AutoLog(value = "计划班组管理-批量添加成员")
@ApiOperation(value = "计划班组管理-批量添zyPlanProcessList = {ArrayList@21228} size = 7加工序-班组成员", notes = "批量添加工序-班组成员")
@PostMapping(value = "/addTeamBatch")
public Result<?> addTeamBatch(@RequestBody List<ZyPlanProcess> zyPlanProcessList) {
if (!ObjectUtils.isEmpty(zyPlanProcessList)) {
zyPlanProcessList.forEach(e -> {
zyPlanProcessService.update(new LambdaUpdateWrapper<ZyPlanProcess>()
.set(ZyPlanProcess::getUserIds, e.getUserIds())
.eq(ZyPlanProcess::getProcessId, e.getProcessId()));
});
}
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -145,7 +199,6 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
* @param id
* @return
*/
@AutoLog(value = "生产计划工序-通过id删除")
@ApiOperation(value = "生产计划工序-通过id删除", notes = "生产计划工序-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
@ -159,11 +212,19 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
* @param ids
* @return
*/
@AutoLog(value = "生产计划工序-批量删除")
@ApiOperation(value = "生产计划工序-批量删除", notes = "生产计划工序-批量删除")
@ApiOperation(value = "计划班组管理-批量删除工序-班组成员", notes = "计划班组管理-批量删除工序-班组成员")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.zyPlanProcessService.removeByIds(Arrays.asList(ids.split(",")));
List<ZyPlanProcess> zyPlanProcessList = zyPlanProcessService.list(new LambdaQueryWrapper<ZyPlanProcess>().in(ZyPlanProcess::getId, Arrays.asList(ids.split(","))));
if (ObjectUtils.isEmpty(zyPlanProcessList)) throw new JeecgBootException("计划工序数据异常");
List<ZyPlanProcess> updateList = new LinkedList<>();
zyPlanProcessList.forEach(e -> {
ZyPlanProcess en = new ZyPlanProcess();
BeanUtils.copyProperties(e, en);
en.setUserIds("");
updateList.add(en);
});
zyPlanProcessService.updateBatchById(updateList);
return Result.OK("批量删除成功!");
}

@ -0,0 +1,85 @@
package org.jeecg.modules.productplan.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 计划面料表
* @Author: jeecg-boot
* @Date: 2022-12-20
* @Version: V1.0
*/
@Data
@TableName("zy_plan_fabric")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "zy_plan_fabric对象", description = "计划面料表")
public class ZyPlanFabric implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**
* 计划id
*/
@Excel(name = "计划id", width = 15)
@ApiModelProperty(value = "计划id")
private String planId;
/**
* 面料id
*/
@Excel(name = "面料id", width = 15)
@ApiModelProperty(value = "面料id")
@Dict(dictTable = "zy_fabric", dicText = "name", dicCode = "id")
private String fabricId;
/**
* 用量合计
*/
@Excel(name = "用量(合计)", width = 15)
@ApiModelProperty(value = "用量(合计)")
private BigDecimal amount;
}

@ -100,6 +100,6 @@ public class ZyPlanProcess implements Serializable {
*/
@Excel(name = "成员id列表", width = 15)
@ApiModelProperty(value = "成员id列表")
// @Dict(dictTable = "sys_user", dicText = "name", dicCode = "id")
@Dict(dictTable = "groupx_member", dicText = "user_id", dicCode = "id")
private String userIds;
}

@ -4,6 +4,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.team.entity.GroupxMember;
import org.jeecg.modules.team.entity.Station;
import java.io.Serializable;
@ -16,6 +17,7 @@ public class ProcessDataVo implements Serializable {
private static final long serialVersionUID = 1009888L;
private String id;
//工单id
private String workOrderId;
@ -31,6 +33,9 @@ public class ProcessDataVo implements Serializable {
//工位
private List<Station> stationList;
//班组成员列表
private List<GroupxMember> groupMemberList;
//产品工序id
// @Dict(dictTable ="zy_process",dicText = "process_name",dicCode = "id")
private String productProcessId;

@ -0,0 +1,14 @@
package org.jeecg.modules.productplan.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.productplan.entity.ZyPlanFabric;
/**
* @Description: 计划面料表
* @Author: jeecg-boot
* @Date: 2022-12-20
* @Version: V1.0
*/
public interface ZyPlanFabricMapper extends BaseMapper<ZyPlanFabric> {
}

@ -0,0 +1,15 @@
package org.jeecg.modules.productplan.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.productplan.entity.ZyPlanFabric;
/**
* @Description: 计划面料表
* @Author: jeecg-boot
* @Date: 2022-12-20
* @Version: V1.0
*/
public interface IZyPlanFabricService extends IService<ZyPlanFabric> {
}

@ -16,4 +16,6 @@ import java.util.List;
public interface IZyPlanProcessService extends IService<ZyPlanProcess> {
List<ProcessDataVo> getProcessDatalist(ZyPlanProcess zyPlanProcess);
List<ProcessDataVo> getTeamDatalist(ZyPlanProcess zyPlanProcess);
}

@ -0,0 +1,20 @@
package org.jeecg.modules.productplan.service.impl;
import org.jeecg.modules.productplan.entity.ZyPlanFabric;
import org.jeecg.modules.productplan.mapper.ZyPlanFabricMapper;
import org.jeecg.modules.productplan.service.IZyPlanFabricService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 计划面料表
* @Author: jeecg-boot
* @Date: 2022-12-20
* @Version: V1.0
*/
@Service
public class ZyPlanFabricServiceImpl extends ServiceImpl<ZyPlanFabricMapper, ZyPlanFabric> implements IZyPlanFabricService {
}

@ -16,7 +16,9 @@ import org.jeecg.modules.productplan.service.IZyPlanProcessService;
import org.jeecg.modules.productplan.service.IZyProductPlanService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.team.entity.GroupxMember;
import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.service.IGroupxMemberService;
import org.jeecg.modules.team.service.IStationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -48,6 +50,8 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
private ISysDepartService iSysDepartService;
@Autowired
private IZyProcessService iZyProcessService;
@Autowired
private IGroupxMemberService iGroupxMemberService;
public List<ProcessDataVo> getProcessDatalist(ZyPlanProcess zyPlanProcess) {
@ -83,4 +87,41 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
}
return result;
}
@Override
public List<ProcessDataVo> getTeamDatalist(ZyPlanProcess zyPlanProcess) {
//生产计划id
String planId = zyPlanProcess.getPlanId();
ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId);
if (ObjectUtils.isEmpty(zyPlanProcess)) {
throw new JeecgBootException("生产计划不存在!");
}
//工单id
String productCode = zyProductPlan.getProductCode();
String departId = zyProductPlan.getWorkshopId();
// TODO zy_product产品表,根据工单id获取产品id,
List<ProcessDataVo> result = new LinkedList<>();
//根据产品id获取产品工序列表
// List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>().eq(ZyProductProcess::getProductId, "产品id"));
List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>().eq(ZyProductProcess::getProductId, "1"));
if (!ObjectUtils.isEmpty(productProcessesList)) {
SysDepart depart = iSysDepartService.getById(departId);
List<GroupxMember> groupxMemberList = iGroupxMemberService.list(new LambdaQueryWrapper<GroupxMember>().eq(GroupxMember::getGroupxId, zyProductPlan.getTeamId()));
productProcessesList.forEach(e -> {
ProcessDataVo vo = new ProcessDataVo();
// vo.setId()
vo.setProductProcessId(e.getProcessId());
vo.setProcessName(iZyProcessService.getById(e.getProcessId()).getProcessName());
vo.setProductId(e.getProductId());
// vo.setProductName("产品名称")
vo.setWorkOrderId(productCode);
vo.setDepartId(departId);
vo.setDepartName(depart.getDepartName());
// vo.setStationList(stationList);
vo.setGroupMemberList(groupxMemberList);
result.add(vo);
});
}
return result;
}
}

@ -5,6 +5,7 @@ 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.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import java.util.List;
@ -12,7 +13,7 @@ import java.util.List;
@Data
public class AllClothStyle {
/**服装款式*/
private ZyClothsStyle zyClothsStyle;
private List<ZyClothsStyle> zyClothsStyles;
/**子模块 款式模块*/
private List<NewStyleModule> zyStyleModuleList;
/**子模块 款式面料*/
@ -20,6 +21,7 @@ public class AllClothStyle {
/**子模块 款式辅料*/
private List<ZyStyleAccessories> zyStyleAccessoriesList;
/*子模块 款式型号 因风格问题 暂不开发*/
private List<ZyStyleModel> zyStyleModels;
/**子模块 款式工序*/
private List<ZyStyleModular> zyStyleModularList;
}

@ -12,6 +12,8 @@ import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
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.NewStyleModule;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.springframework.beans.factory.annotation.Autowired;
@ -40,6 +42,8 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
private IZyStyleModularService zyStyleModularService;
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
private IZyStyleModelService zyStyleModelService;
@Resource
private ZyClothsStyleMapper zyClothsStyleMapper;
@ -53,8 +57,8 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
public AllClothStyle queryDetail(String id) {
AllClothStyle zyAllClothStyle = new AllClothStyle();
//服装款式详情
ZyClothsStyle zyClothsStyle = detail(id);
zyAllClothStyle.setZyClothsStyle(zyClothsStyle);
List<ZyClothsStyle> zyClothsStyles = detail(id);
zyAllClothStyle.setZyClothsStyles(zyClothsStyles);
//服装 款式 模块详情
List<NewStyleModule> zyStyleModuleList = zyStyleModuleService.detail(id);
zyAllClothStyle.setZyStyleModuleList(zyStyleModuleList);
@ -64,7 +68,9 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
//服装 辅料详情
List<ZyStyleAccessories> zyStyleAccessoriesList = zyStyleAccessoriesService.detail(id);
zyAllClothStyle.setZyStyleAccessoriesList(zyStyleAccessoriesList);
//服装 款式型号
List<ZyStyleModel> zyStyleModels = zyStyleModelService.detail(id);
zyAllClothStyle.setZyStyleModels(zyStyleModels);
//服装 工序详情
List<ZyStyleModular> zyStyleModularList = zyStyleModularService.detail(id);
zyAllClothStyle.setZyStyleModularList(zyStyleModularList);
@ -72,7 +78,7 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
return zyAllClothStyle;
}
public ZyClothsStyle detail(String id){
public List<ZyClothsStyle> detail(String id){
ZyClothsStyle zyClothsStyle = zyClothsStyleMapper.selectById(id);
//翻译规格 shape 和企业
String shape = zyClothsStyle.getShape();
@ -90,7 +96,9 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
zyClothsStyle.setEnterpriseId("null");
}
System.out.println("zyClothsStyle 服装款式详情"+zyClothsStyle);
return zyClothsStyle;
List<ZyClothsStyle> zyClothsStyles = new ArrayList<>();
zyClothsStyles.add(zyClothsStyle);
return zyClothsStyles;
}

@ -25,4 +25,12 @@ public interface ZyStyleFabricMapper extends BaseMapper<ZyStyleFabric> {
@Select("SELECT * FROM zy_style_fabric WHERE style_id = #{id}")
List<ZyStyleFabric> listByStyleId(String id);
/**根据styleId 拿到 款式名称*/
@Select("select style_names from zy_cloths_style where id = #{styleId}")
String getStyleNameByStyleId(String styleId);
/**根据styleId 拿到 面料名称*/
@Select("select contents from zy_accessories where id = #{styleId}")
String getAccessoriesNameByStyleId(String styleId);
}

@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -44,6 +45,11 @@ public class ZyStyleModel implements Serializable {
@Excel(name = "是否默认尺码", width = 15)
@ApiModelProperty(value = "是否默认尺码")
private java.lang.Integer isdefault;
/**是否默认尺码*/
@TableField(exist = false)
private String isDefaultSize;
/**型号编码*/
@Excel(name = "型号编码", width = 15)
@ApiModelProperty(value = "型号编码")
@ -97,4 +103,6 @@ public class ZyStyleModel implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间")
private java.util.Date createTime;
}

@ -4,6 +4,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
/**
@ -14,4 +15,6 @@ import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
*/
public interface ZyStyleModelMapper extends BaseMapper<ZyStyleModel> {
@Select("SELECT * FROM zy_style_model WHERE style_id = #{id}")
List<ZyStyleModel> listByStyleId(String id);
}

@ -4,6 +4,8 @@ package org.jeecg.modules.zystylemodel.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import java.util.List;
/**
* @Description: zy_style_model
* @Author: jeecg-boot
@ -12,4 +14,5 @@ import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
*/
public interface IZyStyleModelService extends IService<ZyStyleModel> {
List<ZyStyleModel> detail(String id);
}

@ -2,19 +2,50 @@ package org.jeecg.modules.zystylemodel.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.mapper.ZyStyleModelMapper;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.List;
/**
* @Description: zy_style_model
* @Author: jeecg-boot
* @Date: 2022-09-17
* @Date: 2022-09-17
* @Version: V1.0
*/
@Service
public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyStyleModel> implements IZyStyleModelService {
@Resource
private ZyStyleModelMapper zyStyleModelMapper;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;
@Override
public List<ZyStyleModel> detail(String id) {
List<ZyStyleModel> zyStyleModels = zyStyleModelMapper.listByStyleId(id);
for (ZyStyleModel zy : zyStyleModels) {
String styleName = zyStyleFabricMapper.getStyleNameByStyleId(zy.getStyleId());
if (StringUtils.hasText(styleName)) {
zy.setStyleId(styleName);
} else {
zy.setStyleId(null);
}
Integer isDefault = zy.getIsdefault();
if (isDefault == 0) {
zy.setIsDefaultSize("否");
} else if (isDefault == 1) {
zy.setIsDefaultSize("是");
} else {
zy.setIsDefaultSize(null);
}
}
return zyStyleModels;
}
}

Loading…
Cancel
Save