制衣模块相关问题

zhc4dev
赵玉瑞 2 years ago
parent a0bc5dcac6
commit 51e8bf0863
  1. 401
      ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue
  2. 6
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  3. 18
      ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue
  4. 6
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  5. 12
      ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue
  6. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java
  7. 7
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  8. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
  9. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsTypeMapper.xml
  10. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsComponentService.java
  11. 10
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java
  12. 69
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsComponentServiceImpl.java
  13. 54
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularServiceImpl.java
  14. 45
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
  15. 63
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  16. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java
  17. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModelDetailsVo.java
  18. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/IZyStyleModelService.java
  19. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
  20. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  21. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/entity/ZyStyleModuleDetailVo.java
  22. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java
  23. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/xml/ZyStyleModuleMapper.xml
  24. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/IZyStyleModuleService.java
  25. 24
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/impl/ZyStyleModuleServiceImpl.java

@ -1,5 +1,5 @@
<template>
<!-- <a-card :bordered="false">-->
<!-- <a-card :bordered="false">-->
<a-modal
width="70%"
title=""
@ -22,8 +22,9 @@
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序" >
<j-dict-select-tag v-model="queryParam.processId" dictCode="zy_process,process_name,id" placeholder="请选择工序" />
<a-form-item label="工序">
<j-dict-select-tag v-model="queryParam.processId" dictCode="zy_process,process_name,id"
placeholder="请选择工序"/>
</a-form-item>
</a-col>
@ -41,24 +42,30 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd1(componentId1)" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('zy_process_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-button type="primary" icon="download" @click="handleExportXls('zy_process_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>-->
<!-- <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>
@ -81,7 +88,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>
@ -98,9 +106,9 @@
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical" />-->
<a @click="handleDetail(record.id)">详情</a>
<!-- <a-divider type="vertical" />-->
<!-- <a @click="handleDetail(record.id)">详情</a>-->
<a @click="openDetail(record.processId)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
@ -110,199 +118,212 @@
</a-table>
</div>
<zy-process-component-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-process-component-modal>
<zy-process-component-modal @valueChange="valueChange" ref="modalForm"
@ok="modalFormOk"></zy-process-component-modal>
<ZyProcessComponentFormDetail ref="ZyProcessComponentFormDetail"></ZyProcessComponentFormDetail>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
</a-modal>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProcessComponentModal from './modules/ZyProcessComponentModal'
import ZyProcessComponentFormDetail from './modules/ZyProcessComponentFormDetail'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import {filterObj} from "@/utils/util";
import {getAction} from "@api/manage";
import ZyProcessDetail from '@views/process/modules/ZyProcessDetail'
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyProcessComponentModal from './modules/ZyProcessComponentModal'
import ZyProcessComponentFormDetail from './modules/ZyProcessComponentFormDetail'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import {filterObj} from "@/utils/util";
import {getAction} from "@api/manage";
export default {
name: 'ZyProcessComponentList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyProcessComponentModal,
ZyProcessComponentFormDetail
},
data () {
return {
description: 'zy_process_component管理页面',
visible: false,
confirmLoading: false,
componentId1:'',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'部件名称',
align:"center",
dataIndex: 'componentId_dictText'
},
{
title:'工序代码',
align:"center",
dataIndex: 'processCode'
},
{
title:'工序',
align:"center",
dataIndex: 'processId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'bottleneck_dictText'
// },
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
export default {
name: 'ZyProcessComponentList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessDetail,
ZyProcessComponentModal,
ZyProcessComponentFormDetail
},
data() {
return {
description: 'zy_process_component管理页面',
visible: false,
confirmLoading: false,
componentId1: '',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
],
url: {
list: "/pro/zyProcessComponent/list",
delete: "/pro/zyProcessComponent/delete",
deleteBatch: "/pro/zyProcessComponent/deleteBatch",
exportXlsUrl: "/pro/zyProcessComponent/exportXls",
importExcelUrl: "pro/zyProcessComponent/importExcel",
},
//
loadRouteType: false,
biaoTi: '',
dictOptions:{},
superFieldList:[],
}
},
created() {
{
title: '部件名称',
align: "center",
dataIndex: 'componentId_dictText'
},
{
title: '工序代码',
align: "center",
dataIndex: 'processCode'
},
{
title: '工序',
align: "center",
dataIndex: 'processId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'bottleneck_dictText'
// },
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/pro/zyProcessComponent/list",
delete: "/pro/zyProcessComponent/delete",
deleteBatch: "/pro/zyProcessComponent/deleteBatch",
exportXlsUrl: "/pro/zyProcessComponent/exportXls",
importExcelUrl: "pro/zyProcessComponent/importExcel",
},
//
loadRouteType: false,
biaoTi: '',
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: {
edit2(record) {
this.model = Object.assign({}, record);
this.componentId1 = this.model.id;
this.biaoTi = this.model.partsName;
//console.log(topicid);
this.queryParam.componentId = this.model.id;
//console.log( this.queryParam.topicid);
this.loadData();
this.visible = true;
},
methods: {
edit2(record) {
this.model = Object.assign({}, record);
this.componentId1 = this.model.id;
this.biaoTi = this.model.partsName;
//console.log(topicid);
this.queryParam.componentId = this.model.id;
//console.log( this.queryParam.topicid);
this.loadData();
this.visible = true;
},
valueChange(value) {
if (value) this.loadData()
},
//
loadParameter() {
if (this.loadRouteType === false) {
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();
const params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
valueChange(value) {
if (value) this.loadData()
},
//
loadParameter() {
if (this.loadRouteType === false) {
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();
const params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.$message.warning(res.message)
this.ipagination.total = 0;
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
const 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.id=this.id;
param.componentId = this.componentId1;
return filterObj(param);
},
showModal2() {
this.visible = true;
},
handleOk(e) {
this.ModalText = 'The modal will be closed after two seconds';
this.confirmLoading = true;
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 2000);
},
handleCancel(e) {
console.log('Clicked cancel button');
this.visible = false;
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'componentId',text:'部件',dictCode:'zy_cloths_component,parts_name,nums'})
fieldList.push({type:'string',value:'processId',text:'工艺',dictCode:'zy_process,process_name,id'})
this.superFieldList = fieldList
},
handleDetail(id){
//id = this.model.id;
console.log("this。model.id +++++"+id);
this.$refs.ZyProcessComponentFormDetail.showModal(id);
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
const 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.id=this.id;
param.componentId = this.componentId1;
return filterObj(param);
},
showModal2() {
this.visible = true;
},
handleOk(e) {
this.ModalText = 'The modal will be closed after two seconds';
this.confirmLoading = true;
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 2000);
},
handleCancel(e) {
console.log('Clicked cancel button');
this.visible = false;
},
initDictConfig() {
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({
type: 'string',
value: 'componentId',
text: '部件',
dictCode: 'zy_cloths_component,parts_name,nums'
})
fieldList.push({type: 'string', value: 'processId', text: '工艺', dictCode: 'zy_process,process_name,id'})
this.superFieldList = fieldList
},
// handleDetail(id) {
// //id = this.model.id;
// console.log("thismodel.id +++++" + id);
// this.$refs.ZyProcessComponentFormDetail.showModal(id);
// }
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

@ -78,9 +78,9 @@ export default {
},
confirmLoading: false,
validatorRules: {
// nums: [
// { required: true, message: '!'},
// ],
nums: [
{required: true, message: '请输入编号!'},
],
typeName: [
{required: true, message: '请输入类型名称!'},
{pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'},

@ -110,12 +110,11 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a @click="handleDetail(record)">详情</a>
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>-->
<a @click="openDetail(record.id)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.processId)">
<a>删除</a>
</a-popconfirm>
</span>
@ -124,11 +123,13 @@
</div>
<zy-process-modular-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-process-modular-modal>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
</a-modal>
</template>
<script>
import ZyProcessDetail from '@views/process/modules/ZyProcessDetail'
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
@ -140,7 +141,8 @@ export default {
name: 'ZyProcessModularList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessModularModal
ZyProcessModularModal,
ZyProcessDetail,
},
data() {
return {
@ -307,6 +309,10 @@ export default {
fieldList.push({type: 'string', value: 'modularId', text: '模块ID', dictCode: ''})
fieldList.push({type: 'string', value: 'processId', text: '工序ID', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}

@ -366,9 +366,9 @@ export default {
// typeId: [
// {required: true, message: '!'},
// ],
// nums: [
// { required: true, message: '!'},
// ],
nums: [
{ required: true, message: '请输入编号!'},
],
styleNames: [
{required: true, message: '请输入款式名称!'},
],

@ -106,7 +106,8 @@
<span slot="action" slot-scope="text, record">
<a @click="viewDetail(record.id)">详情</a>
<!-- <a @click="viewDetail(record.id)">详情</a>-->
<a @click="openDetail(record.processId)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
@ -118,11 +119,13 @@
<zy-style-modular-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-style-modular-modal>
<ZyStyleModularListDetails ref="ZyStyleModularListDetails"></ZyStyleModularListDetails>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
</a-card>
</template>
<script>
import ZyProcessDetail from '@views/process/modules/ZyProcessDetail'
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
@ -135,6 +138,7 @@ export default {
name: 'ZyStyleModularList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessDetail,
ZyStyleModularListDetails,
ZyStyleModularModal
},
@ -164,7 +168,7 @@ export default {
{
title:'工序代码',
align:"center",
dataIndex: 'processCode'
dataIndex: 'processCode'//
},
{
title: '工序',
@ -285,6 +289,10 @@ export default {
fieldList.push({type: 'string', value: 'styleId', text: '款式id', dictCode: ''})
fieldList.push({type: 'string', value: 'processId', text: '工序id', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}

@ -71,8 +71,6 @@ public class ZyClothsModularCompentController extends JeecgController<ZyClothsMo
//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]+)?");
//只要数字 如果是纯数字 就把它替换了

@ -18,7 +18,6 @@ import org.springframework.util.StringUtils;
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;
@ -57,8 +56,6 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//zyClothsTypeService.chuliBianHaoWenti();
//System.err.println(zyClothsType);
QueryWrapper<ZyClothsType> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsType, req.getParameterMap());
Page<ZyClothsType> page = new Page<ZyClothsType>(pageNo, pageSize);
IPage<ZyClothsType> pageList = zyClothsTypeService.page(page, queryWrapper);
@ -118,9 +115,6 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
/**
* 编辑
*
* @param zyClothsType
* @return
*/
@AutoLog(value = "zy_cloths_type-编辑")
@ApiOperation(value = "zy_cloths_type-编辑", notes = "zy_cloths_type-编辑")
@ -203,6 +197,7 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
if (StringUtils.isEmpty(enterpriseId)) {
return Result.error("请先选择一个企业");
}
//nums,编号,varchar,10,非空,不重复,企业缩写(4)+顺序号(6)
String a = zyClothsTypeService.sort(enterpriseId);
if (a == null) {
return Result.OK("0");

@ -16,8 +16,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@Mapper
public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> {
List<String> selectNumsList();
List<String> listByTypeId(String typeId);
@Select("select nums from zy_cloths_type where nums like 'QIYE%' order by nums desc limit 0,1 ")

@ -5,10 +5,6 @@
UPDATE `zy_cloths_type` SET enterprise_id= #{id}
</update>
<select id="selectNumsList" resultType="java.lang.String">
SELECT nums
FROM zy_cloths_type
</select>
<select id="listByTypeId" resultType="java.lang.String">
SELECT type_name
FROM zy_cloths_type

@ -21,7 +21,7 @@ public interface IZyClothsComponentService extends IService<ZyClothsComponent> {
public List<ZyClothsComponent> selectByModular(String modular_id);
/**编码规则:服装类型(10)+序号(8)*/
String generateNumber(ZyClothsComponent zyClothsComponent);
//String generateNumber(ZyClothsComponent zyClothsComponent);
ZyClothsComponentDetail queryDetail(String id);

@ -23,13 +23,11 @@ public interface IZyClothsTypeService extends IService<ZyClothsType> {
Long orderNumber();
/**
* 拿到集合中的最大值
* @param listString 传进来一个String类型的集合
* @param i 返回数字的位数 例如一般6位或8位
* 拿到集合中的最大值 digits: 位数
* @param stringList 传进来一个String类型的集合
* @param digits 返回数字的位数 例如一般6位或8位
* @return 返回一个long类型的i位数最大值
*/
Long getListMax(List<String> listString, int i);
Long getListMax(List<String> stringList, int digits);
}

@ -9,6 +9,7 @@ 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.base.service.IZyClothsTypeService;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import org.jeecg.modules.demo.pro.service.IZyProcessComponentService;
import org.jetbrains.annotations.NotNull;
@ -21,6 +22,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @Description: zy_cloths_component
@ -33,6 +35,8 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
@Autowired
private IZyProcessComponentService zyProcessComponentService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Resource
private ZyClothsComponentMapper zyClothsComponentMapper;
@ -57,15 +61,15 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
/**
* 编码规则服装类型10+序号8
*/
@Override
public String generateNumber(ZyClothsComponent zyClothsComponent) {
String nums = zyClothsComponent.getClothsTypeId();
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;
}
// @Override
// public String generateNumber(ZyClothsComponent zyClothsComponent) {
// String nums = zyClothsComponent.getClothsTypeId();
// 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;
// }
@Override
public ZyClothsComponentDetail queryDetail(String id) {
@ -81,10 +85,15 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
return detail;
}
/**
* 编码规则服装类型10+序号8
*/
@Override
public String sort(String id) {
String nums = zyClothsTypeMapper.selectNumOne(id);
String format = String.format("%08d", orderNumber());
List<ZyClothsComponent> components = this.list();
List<String> collect = components.stream().map(ZyClothsComponent::getNums).collect(Collectors.toList());
String format = String.format("%08d", zyClothsTypeService.getListMax(collect, 8));
return nums + format;
}
@ -125,24 +134,24 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
}
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)) {
newNums = "0";
}
if (newNums.length() > 8) {
String substring = nums.substring(nums.length() - 8);
listLong.add(Long.valueOf(substring));
} else {
listLong.add(Long.valueOf(newNums));
}
}
//System.out.println(listLong);
return Collections.max(listLong) + 1;
}
// 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)) {
// newNums = "0";
// }
// if (newNums.length() > 8) {
// String substring = nums.substring(nums.length() - 8);
// listLong.add(Long.valueOf(substring));
// } else {
// listLong.add(Long.valueOf(newNums));
// }
// }
// //System.out.println(listLong);
// return Collections.max(listLong) + 1;
// }
}

@ -9,6 +9,8 @@ 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.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -20,6 +22,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @Description: zy_cloths_modular
@ -32,6 +35,8 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
@Autowired
private IZyClothsModularCompentService zyClothsModularComponentService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Resource
private ZyClothsModularMapper zyClothsModularMapper;
@ -50,7 +55,9 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
public String generateNumber(String id) {
String numOne = zyClothsTypeMapper.selectNumOne(id);
// String substring = nums.substring(nums.length() - 10);
String format = String.format("%08d", orderNumber());
List<ZyClothsModular> zyClothsModularList = this.list();
List<String> collect = zyClothsModularList.stream().map(ZyClothsModular::getNums).collect(Collectors.toList());
String format = String.format("%08d", zyClothsTypeService.getListMax(collect, 8));
return numOne + format;
}
@ -97,6 +104,7 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
return zyProcessModularVos;
}
@NotNull
private ZyClothsModular detail(String id) {
ZyClothsModular zyClothsModular = zyClothsModularMapper.selectById(id);
//翻译服装类型名称 和企业
@ -117,30 +125,30 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
}else {
zyClothsModular.setEnterpriseId("null");
}
System.out.println("zyClothsModular 服装款式详情"+zyClothsModular);
//System.out.println("zyClothsModular 服装款式详情"+zyClothsModular);
return zyClothsModular;
}
private Long orderNumber() {
List<String> listString = zyClothsModularMapper.selectNumsList1();
List<Long> listLong = new ArrayList<>();
for (String nums : listString) {
String REGEX = "[^0-9]";
String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
if (newNums.length() > 8) {
String substring = nums.substring(nums.length() - 8);
listLong.add(Long.valueOf(substring));
continue;
}
if (StringUtils.isEmpty(newNums)) {
newNums = "0";
}
listLong.add(Long.valueOf(newNums));
}
//System.out.println(listLong);
return Collections.max(listLong) + 1;
}
// private Long orderNumber() {
// List<String> listString = zyClothsModularMapper.selectNumsList1();
// List<Long> listLong = new ArrayList<>();
// for (String nums : listString) {
// String REGEX = "[^0-9]";
// String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
// if (newNums.length() > 8) {
// String substring = nums.substring(nums.length() - 8);
// listLong.add(Long.valueOf(substring));
// continue;
// }
// if (StringUtils.isEmpty(newNums)) {
// newNums = "0";
// }
// listLong.add(Long.valueOf(newNums));
//
// }
// //System.out.println(listLong);
// return Collections.max(listLong) + 1;
//
// }
}

@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @Description: zy_cloths_type
@ -30,6 +31,7 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
/**
* 顺序号
* nums编号非空不重复企业缩写4+顺序号6
*/
@Override
public String sort(String enterpriseId) {
@ -78,32 +80,37 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
@Override
public Long orderNumber() {
List<String> listString = zyClothsTypeMapper.selectNumsList();
return this.getListMax(listString,6);
//List<String> listString = zyClothsTypeMapper.selectNumsList();
List<ZyClothsType> zyClothsTypeList = this.list();
List<String> stringList = zyClothsTypeList.stream().map(ZyClothsType::getNums).collect(Collectors.toList());
return this.getListMax(stringList,6);
}
/**
* 拿到集合中的最大值 digits: 位数
* @param stringList 传进来一个String类型的集合
* @param digits 返回数字的位数 例如一般6位或8位
* @return 返回一个long类型的digits位数最大值
*/
@Override
public Long getListMax(@NotNull List<String> listString, int i) {
List<Long> listLong = new ArrayList<>();
for (String nums : listString) {
String REGEX = "[^0-9]";
//只要数字
public Long getListMax(@NotNull List<String> stringList, int digits) {
List<Long> longList = new ArrayList<>();
String REGEX = "[^0-9]";
for (String nums : stringList) {
//只要数字.trim()去空格
String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
if (StringUtils.isEmpty(newNums)) {
continue;
}
if (newNums.length() > i) {
//拿到后6位
String substring = newNums.substring(newNums.length() - i);
listLong.add(Long.valueOf(substring));
} else {
listLong.add(Long.valueOf(newNums));
if (StringUtils.isEmpty(newNums)) continue;
if (newNums.length() <= digits) longList.add(Long.valueOf(newNums));
else {
//拿到后6位 substring(4) 截掉前4位
String substring = newNums.substring(newNums.length() - digits);
longList.add(Long.valueOf(substring));
}
}
long max = Collections.max(listLong) + 1;
if (Long.toString(max).length() > i) {
long max = Collections.max(longList) + 1;
if (Long.toString(max).length() > digits) {
String toString = Long.toString(max);
String substring = toString.substring(toString.length() - i);
String substring = toString.substring(toString.length() - digits);
return Long.valueOf(substring);
}
return max;

@ -23,9 +23,8 @@ import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @Description: 服装款式表
@ -58,27 +57,27 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
*/
@Override
public AllClothStyle queryDetail(String id) {
AllClothStyle zyAllClothStyle = new AllClothStyle();
AllClothStyle zyAll = new AllClothStyle();
//服装款式详情
List<ZyClothsStyle> zyClothsStyles = detail(id);
zyAllClothStyle.setZyClothsStyles(zyClothsStyles);
zyAll.setZyClothsStyles(zyClothsStyles);
//服装 款式 模块详情
List<NewStyleModule> zyStyleModuleList = zyStyleModuleService.detail(id);
zyAllClothStyle.setZyStyleModuleList(zyStyleModuleList);
zyAll.setZyStyleModuleList(zyStyleModuleList);
//服装 面料详情
List<NewZyStyleFabric> zyStyleFabricList = zyStyleFabricService.detail(id);
zyAllClothStyle.setZyStyleFabricList(zyStyleFabricList);
zyAll.setZyStyleFabricList(zyStyleFabricList);
//服装 辅料详情
List<ZyStyleAccessories> zyStyleAccessoriesList = zyStyleAccessoriesService.detail(id);
zyAllClothStyle.setZyStyleAccessoriesList(zyStyleAccessoriesList);
zyAll.setZyStyleAccessoriesList(zyStyleAccessoriesList);
//服装 款式型号
List<ZyStyleModel> zyStyleModels = zyStyleModelService.detail(id);
zyAllClothStyle.setZyStyleModels(zyStyleModels);
zyAll.setZyStyleModels(zyStyleModels);
//服装 工序详情
List<ZyStyleModular> zyStyleModularList = zyStyleModularService.detail(id);
zyAllClothStyle.setZyStyleModularList(zyStyleModularList);
zyAll.setZyStyleModularList(zyStyleModularList);
return zyAllClothStyle;
return zyAll;
}
@Override
@ -116,30 +115,32 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
public String sort(String id) {
String nums = zyClothsStyleMapper.sort(id);
//System.out.println(nums + " nums");
String format = String.format("%08d", orderNumber());
List<ZyClothsStyle> styleList = this.list();
List<String> collect = styleList.stream().map(ZyClothsStyle::getNums).collect(Collectors.toList());
String format = String.format("%08d", zyClothsTypeService.getListMax(collect, 8));
//System.err.println(format + " format");
return nums + format;
}
private Long orderNumber() {
List<String> numsList = zyClothsStyleMapper.selectNumsList();
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) {
String substring = newNums.substring(newNums.length() - 8);
list.add(Long.valueOf(substring));
continue;
}
if (StringUtils.isEmpty(newNums)) {
newNums = "0";
}
list.add(Long.valueOf(newNums));
}
return Collections.max(list) + 1;
}
// private Long orderNumber() {
// List<String> numsList = zyClothsStyleMapper.selectNumsList();
// 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) {
// String substring = newNums.substring(newNums.length() - 8);
// list.add(Long.valueOf(substring));
// continue;
// }
// if (StringUtils.isEmpty(newNums)) {
// newNums = "0";
// }
// list.add(Long.valueOf(newNums));
//
// }
// return Collections.max(list) + 1;
// }
}

@ -12,16 +12,14 @@ import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVO;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVo;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.springframework.beans.factory.annotation.Autowired;
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.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@ -128,8 +126,8 @@ public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZySty
@ApiOperation(value = "zy_style_model-详情", notes = "zy_style_model-详情")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
ZyStyleModelDetailsVO detailVO = zyStyleModelService.queryDetails(id);
return Result.OK(detailVO);
ZyStyleModelDetailsVo detailVo = zyStyleModelService.queryDetails(id);
return Result.OK(detailVo);
}
/**

@ -5,7 +5,7 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import java.util.List;
@Data
public class ZyStyleModelDetailsVO {
public class ZyStyleModelDetailsVo {
/**服装款式*/
private List<ZyClothsStyle> zyClothsStyles;
/**子模块 款式型号 */

@ -3,7 +3,7 @@ package org.jeecg.modules.zystylemodel.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVO;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVo;
import java.util.List;
@ -17,7 +17,7 @@ public interface IZyStyleModelService extends IService<ZyStyleModel> {
List<ZyStyleModel> detail(String id);
ZyStyleModelDetailsVO queryDetails(String id);
ZyStyleModelDetailsVo queryDetails(String id);
boolean dataTypeProblem(ZyStyleModel zyStyleModel);
}

@ -7,7 +7,7 @@ import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVO;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVo;
import org.jeecg.modules.zystylemodel.mapper.ZyStyleModelMapper;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.jetbrains.annotations.Contract;
@ -17,7 +17,6 @@ import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.List;
import java.util.regex.Pattern;
@ -107,19 +106,21 @@ public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyS
}
@Override
public ZyStyleModelDetailsVO queryDetails(String id) {
public ZyStyleModelDetailsVo queryDetails(String id) {
ZyStyleModel model = getById(id);
AllClothStyle detail = zyClothsStyleService.queryDetail(model.getStyleId());
ZyStyleModelDetailsVO detailsVO = new ZyStyleModelDetailsVO();
detailsVO.setZyClothsStyles(detail.getZyClothsStyles());
detailsVO.setZyStyleModels(detail.getZyStyleModels());
return detailsVO;
ZyStyleModelDetailsVo detailsVo = new ZyStyleModelDetailsVo();
detailsVo.setZyClothsStyles(detail.getZyClothsStyles());
detailsVo.setZyStyleModels(detail.getZyStyleModels());
return detailsVo;
}
@Override
public boolean dataTypeProblem(ZyStyleModel zyStyleModel) {
public boolean dataTypeProblem(@NotNull ZyStyleModel zyStyleModel) {
// Pattern pattern = Pattern.compile("/[^\\d]/g");
Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
//Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
Pattern pattern = Pattern.compile("[0-9]+(\\.[0-9]+)?");
// /^\d+(\.{0,1}\d+){0,1}$/
//正则表达式判断是否是数字字符串(可判断正数,负数和小数)
if (!ObjectUtils.isEmpty(zyStyleModel.getCollarLarge())){
return pattern.matcher(zyStyleModel.getCollarLarge().toString()).matches();

@ -4,12 +4,10 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Example;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
@ -19,17 +17,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
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.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.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVO;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVo;
import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.jeecg.common.system.base.controller.JeecgController;
@ -85,7 +78,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//System.err.println("ZyStyleModule 款式模块表 传来的 " + id);
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
//从服装款式进去款式模块时 根据style_id进行筛选 所以一般都会有id即style_id
queryWrapper.eq(StringUtils.hasText(id), "style_id", id);
@ -106,8 +98,8 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
zyStyleModules.addAll(zyStyleModulesList);
}
//将新查出来的集合在根据styleid 筛选一下
zyStyleModules = zyStyleModules.stream().filter(ZyStyleModule -> ZyStyleModule.getStyleId().equals(id)).collect(Collectors.toList());
pageList.setRecords(zyStyleModules);
List<ZyStyleModule> collect = zyStyleModules.stream().filter(ZyStyleModule -> ZyStyleModule.getStyleId().equals(id)).collect(Collectors.toList());
pageList.setRecords(collect);
}
//List<ZyStyleModule> zyStyleModules = zyStyleModuleMapper.getListByStyleId(id);
//改变list中的实体类 类型
@ -178,8 +170,8 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
//System.out.println("款式模块表 /detail controller层接受到的id: : " + id);
ZyStyleModuleDetailVO detailVO = zyStyleModuleService.queryDetail(id);
return Result.OK(detailVO);
ZyStyleModuleDetailVo detailVo = zyStyleModuleService.queryDetail(id);
return Result.OK(detailVo);
}
/**

@ -5,7 +5,7 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import java.util.List;
@Data
public class ZyStyleModuleDetailVO {
public class ZyStyleModuleDetailVo {
/**服装款式*/
private List<ZyClothsStyle> zyClothsStyles;
/**子模块 款式模块*/

@ -19,7 +19,7 @@ import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> {
/**根据服装款式的id style_id 查询所有*/
List<ZyStyleModule> handWritingList(String id);
//List<ZyStyleModule> handWritingList(String id);
@Select("SELECT * FROM zy_style_module WHERE style_id = #{id}")
List<ZyStyleModule> getListByStyleId(String id);

@ -2,10 +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>
<!-- <select id="handWritingList" resultType="org.jeecg.modules.zystylemodule.entity.ZyStyleModule"-->
<!-- parameterType="string">-->
<!-- SELECT *-->
<!-- FROM zy_style_module-->
<!-- WHERE style_id = #{id}-->
<!-- </select>-->
</mapper>

@ -1,10 +1,9 @@
package org.jeecg.modules.zystylemodule.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVO;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVo;
import java.util.List;
@ -24,5 +23,5 @@ public interface IZyStyleModuleService extends IService<ZyStyleModule> {
*/
List<NewStyleModule> changeList(List<ZyStyleModule> zyStyleModules);
ZyStyleModuleDetailVO queryDetail(String id);
ZyStyleModuleDetailVo queryDetail(String id);
}

@ -1,15 +1,18 @@
package org.jeecg.modules.zystylemodule.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.entity.vo.AllClothStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVo;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVO;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVo;
import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.springframework.beans.factory.annotation.Autowired;
@ -19,7 +22,6 @@ 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.ArrayList;
import java.util.List;
import java.util.Objects;
@ -40,13 +42,13 @@ public class ZyStyleModuleServiceImpl extends ServiceImpl<ZyStyleModuleMapper, Z
@Autowired
private ZyStyleFabricMapper zyStyleFabricMapper;
@Autowired
private ZyStyleModuleMapper zyStyleModuleMapper;
@Override
public List<NewStyleModule> detail(String id) {
List<ZyStyleModule> list = zyStyleModuleMapper.handWritingList(id);
return changeList(list);
//List<ZyStyleModule> list = zyStyleModuleMapper.handWritingList(id);
List<ZyStyleModule> moduleList = this.list(new LambdaQueryWrapper<ZyStyleModule>().eq(ZyStyleModule::getStyleId, id));
return changeList(moduleList);
}
@Override
@ -86,14 +88,14 @@ public class ZyStyleModuleServiceImpl extends ServiceImpl<ZyStyleModuleMapper, Z
}
@Override
public ZyStyleModuleDetailVO queryDetail(String id) {
ZyStyleModuleDetailVO detailVO = new ZyStyleModuleDetailVO();
public ZyStyleModuleDetailVo queryDetail(String id) {
ZyStyleModuleDetailVo detailVo = new ZyStyleModuleDetailVo();
ZyStyleModule zyStyleModule = getById(id);
String styleId = zyStyleModule.getStyleId();
AllClothStyle allClothStyle = zyClothsStyleService.queryDetail(styleId);
detailVO.setZyClothsStyles(allClothStyle.getZyClothsStyles());
detailVO.setZyStyleModuleList(allClothStyle.getZyStyleModuleList());
return detailVO;
detailVo.setZyClothsStyles(allClothStyle.getZyClothsStyles());
detailVo.setZyStyleModuleList(allClothStyle.getZyStyleModuleList());
return detailVo;
}
}

Loading…
Cancel
Save