Merge remote-tracking branch 'origin/master'

zhc4dev
wangjiadong 2 years ago
commit 6c209ebe31
  1. 4
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 4
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  3. 38
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  4. 18
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  5. 7
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue
  6. 30
      ant-design-vue-jeecg/src/views/zystyleaccessories/ZyStyleAccessoriesList.vue
  7. 9
      ant-design-vue-jeecg/src/views/zystyleaccessories/modules/ZyStyleAccListDetail.vue
  8. 11
      ant-design-vue-jeecg/src/views/zystylefabric/ZyStyleFabricList.vue
  9. 9
      ant-design-vue-jeecg/src/views/zystylefabric/modules/ZyStyleFabricListDetail.vue
  10. 14
      ant-design-vue-jeecg/src/views/zystylemodel/modules/ZyStyleModelListDetails.vue
  11. 4
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyProcessList.vue
  12. 9
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularListDetails.vue
  13. 9
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  14. 9
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleListDetail.vue
  15. 31
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/controller/ZyStyleAccessoriesController.java
  16. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/entity/ZyStyleAccessories.java
  17. 29
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java
  18. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/mapper/ZyStyleFabricMapper.java
  19. 25
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  20. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java

@ -325,9 +325,9 @@ export const JeecgListMixin = {
console.log("js层id的传递"+id);
this.$refs.modalForm.disableSubmit = false;
},
styleModuleHandleAdd: function (id,typeId) {
styleModuleHandleAdd: function (id,typeId,styleNames) {
this.$refs.modalForm.add(id,typeId);
this.$refs.modalForm.title = "新增";
this.$refs.modalForm.title = "服装款式 "+styleNames+" 新增";
this.$refs.modalForm.disableSubmit = false;
},
handleAdd1: function (id) {

@ -193,7 +193,8 @@
},
methods: {
async getNumberClothsComponentList() {
const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsComponent/sort?id=' + this.model.clothsTypeId)
//const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsComponent/sort?id=' + this.model.clothsTypeId)
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
if (res.code !== 200) {
this.$message({
type: 'error',
@ -209,6 +210,7 @@
// }
console.log("制衣部件 编号: "+this.model.nums);
})
},
// bianHao() {
// getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {

@ -85,7 +85,7 @@
{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'},
],
enterpriseId: [
{ required: true, message: '请输入企业!'},
{ required: true, message: '请选择一个企业!'},
],
},
url: {
@ -106,26 +106,38 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
async bianHao(){
const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsType/weiyi?id=' + this.model.enterpriseId)
bianHao(){
// const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsType/weiyi?id=' + this.model.enterpriseId)
// if (res.code !== 200) {
// this.$message({
// type: 'error',
// message: ''
// });
// }
// this.model.nums = res.result
// console.log('res.result')
// console.log(res.result)
//this.confirmLoading = false
// if (this.data.length === 0) {
// this.data.push(res.result)
// }
//console.log("List "+this.model.nums);
// var n=6
getAction(this.url.weiyi,{id: this.model.enterpriseId}).then((res)=>{
if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
this.model.nums = res.result
console.log('res.result')
console.log(res.result)
//this.confirmLoading = false
// if (this.data.length === 0) {
// this.data.push(res.result)
// }
let num = res.result;
console.log("res.result: "+num)
//num=num.toString()
//console.log("List "+this.model.nums);
// var n=6
this.model.nums=res.result;
})
// getAction(this.url.weiyi,null).then((res)=>{
// var num=parseInt(res.result,10)+1
// let num = parseInt(res.result, 10) + 1;
// console.log(num)
// num=num.toString()
// while(num.length<n){

@ -399,8 +399,8 @@ export default {
methods: {
async bianHao() {
if (this.model.id) {
const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/enterpriseNum?id=' + this.model.enterpriseId)
//const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/enterpriseNum?id=' + this.model.enterpriseId)
getAction(this.url.enterpriseNum,{id: this.model.enterpriseId}).then((res)=>{
if (res.code === 500) {
this.$message({
type: 'error',
@ -414,6 +414,7 @@ export default {
}
this.model.nums = res.result + this.model.nums.substring(4);
console.log('res.result ' + this.model.nums)
})
}
},
add() {
@ -452,16 +453,23 @@ export default {
})
},
async popupCallback(value, row) {
popupCallback(value, row) {
this.model = Object.assign(this.model, row);
console.log("1222346584" + "++++++" + row)
const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/sort?id=' + this.model.typeId)
getAction(this.url.sort, {id: this.model.typeId}).then((res) => {
if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
let num = res.result;
console.log("res.result: " + num)
//num=num.toString()
this.model.nums = res.result;
})
//const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/sort?id=' + this.model.typeId)
// var n = 8;
// this.model = Object.assign(this.model, row);
// getAction(this.url.sort, {id: this.model.typeId}).then((res) => {
@ -471,7 +479,7 @@ export default {
// while (num.length < n) {
// num = "0" + num
// }
this.model.nums = res.result;
//this.model.nums = res.result;
// console.log(this.model.processCode)
},
}

@ -85,6 +85,8 @@
</div>
</template>
<script>
import {getAction} from "@api/manage";
const columns1 = [
{
title: '款式名称',
@ -376,7 +378,7 @@ export default {
this.getDetailData()
},
async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/detail?id=' + this.id)
getAction(this.url.detail, {id: this.id}).then((res) => {
if (res.code !== 200) {
this.$message({
type: 'error',
@ -395,6 +397,9 @@ export default {
this.data4 = res.result.zyStyleModels
this.data = res.result.zyStyleModuleList
this.data5 = res.result.zyStyleModularList
})
//const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/detail?id=' + this.id)
},
handleOk(e) {
this.confirmLoading = true;

@ -6,16 +6,21 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式" v-if="styleId===undefined">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"
v-model="queryParam.styleId"></j-dict-select-tag>
</a-form-item>
<a-form-item label="服装款式" v-else="">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"
v-model="queryParam.styleId" disabled></j-dict-select-tag>
</a-form-item>
</a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="服装款式" v-if="styleId===undefined">-->
<!-- <j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"-->
<!-- v-model="queryParam.styleId"></j-dict-select-tag>-->
<!-- </a-form-item>-->
<!-- <a-form-item label="服装款式" v-else="">-->
<!-- <j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"-->
<!-- v-model="queryParam.styleId" disabled></j-dict-select-tag>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="辅料编号">-->
<!-- <a-input placeholder="请输入辅料编号" v-model="queryParam.accessNum"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料名称">
<j-dict-select-tag placeholder="请选择辅料名称" dictCode="zy_accessories,contents,id"
@ -177,6 +182,11 @@ export default {
align: "center",
dataIndex: 'styleId_dictText'
},
{
title: '辅料编号',
align: "center",
dataIndex: 'accessNum'
},
{
title: '辅料名称',
align: "center",

@ -25,6 +25,8 @@
</template>
<script>
import {getAction} from "@api/manage";
const columns1 = [
{
title: '款式名称',
@ -105,6 +107,9 @@ export default {
columns3,
id: '',
url: {
detail: "/zyaccessories/zyStyleAccessories/detail",
},
}
},
methods: {
@ -114,7 +119,8 @@ export default {
this.getDetailData()
},
async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zyaccessories/zyStyleAccessories/detail?id=' + this.id)
//const {data: res} = await this.$axios.get('/jeecg-boot/zyaccessories/zyStyleAccessories/detail?id=' + this.id)
getAction(this.url.detail, {id: this.id}).then((res) => {
if (res.code !== 200) {
this.$message({
type: 'error',
@ -128,6 +134,7 @@ export default {
}
this.data1 = res.result.zyClothsStyles
this.data3 = res.result.zyStyleAccessoriesList
})
},
handleOk(e) {
this.confirmLoading = true;

@ -5,10 +5,15 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="服装款式">-->
<!-- <j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"-->
<!-- v-model="queryParam.styleId"></j-dict-select-tag>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"
v-model="queryParam.styleId"></j-dict-select-tag>
<a-form-item label="面料编号">
<a-input placeholder="请输入面料编号" v-model="queryParam.fabricNumber"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">

@ -26,6 +26,8 @@
</template>
<script>
import {getAction} from "@api/manage";
const columns1 = [
{
title: '款式名称',
@ -119,6 +121,9 @@ export default {
columns2,
id: '',
url: {
detail: "/zystylefabric/zyStyleFabric/detail",
},
}
},
methods: {
@ -128,7 +133,8 @@ export default {
this.getDetailData()
},
async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zystylefabric/zyStyleFabric/detail?id=' + this.id)
//const {data: res} = await this.$axios.get('/jeecg-boot/zystylefabric/zyStyleFabric/detail?id=' + this.id)
getAction(this.url.detail, {id: this.id}).then((res) => {
if (res.code !== 200) {
this.$message({
type: 'error',
@ -142,6 +148,7 @@ export default {
}
this.data1 = res.result.zyClothsStyles
this.data2 = res.result.zyStyleFabricList
})
},
handleOk(e) {
this.confirmLoading = true;

@ -15,7 +15,8 @@
</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" rowKey="id" bordered :pagination="false">
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns4" :data-source="data4"
rowKey="id" bordered :pagination="false">
</a-table>
@ -26,6 +27,8 @@
</template>
<script>
import {getAction} from "@api/manage";
const columns1 = [
{
title: '款式名称',
@ -166,6 +169,9 @@ export default {
data4: [],
id: '',
url: {
detail: "/zystylemodel/zyStyleModel/detail",
},
}
},
methods: {
@ -174,8 +180,9 @@ export default {
this.id = id
this.getDetailData()
},
async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zystylemodel/zyStyleModel/detail?id=' + this.id)
getDetailData() {
//const {data: res} = await this.$axios.get('/jeecg-boot/zystylemodel/zyStyleModel/detail?id=' + this.id)
getAction(this.url.detail, {id: this.id}).then((res) => {
if (res.code !== 200) {
this.$message({
type: 'error',
@ -190,6 +197,7 @@ export default {
}
this.data1 = res.result.zyClothsStyles
this.data4 = res.result.zyStyleModels
})
},
handleOk(e) {
this.confirmLoading = true;

@ -161,8 +161,8 @@ export default {
},
created() {
// queryParam.styleId=this.styleId
// this.getSuperFieldList();
this.loadParameter();
this.getSuperFieldList();
//this.loadParameter();
},
computed: {
importExcelUrl: function () {

@ -26,6 +26,8 @@
</template>
<script>
import {getAction} from "@api/manage";
const columns1 = [
{
title: '款式名称',
@ -101,6 +103,9 @@ export default {
data5: [],
id: '',
url: {
detail: "/zyStyleModular/zyStyleModular/detail",
},
}
},
methods: {
@ -110,7 +115,8 @@ export default {
this.getDetailData()
},
async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zyStyleModular/zyStyleModular/detail?id=' + this.id)
//const {data: res} = await this.$axios.get('/jeecg-boot/zyStyleModular/zyStyleModular/detail?id=' + this.id)
getAction(this.url.detail, {id: this.id}).then((res) => {
if (res.code !== 200) {
this.$message({
type: 'error',
@ -125,6 +131,7 @@ export default {
}
this.data1 = res.result.zyClothsStyles
this.data5 = res.result.zyStyleModularList
})
},
handleOk(e) {
this.confirmLoading = true;

@ -23,6 +23,11 @@
v-model="queryParam.modularId"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="7" :lg="7" :md="8" :sm="24">
<a-form-item label="模块编号">
<a-input placeholder="模块编号" v-model="queryParam.modularNums"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
@ -39,7 +44,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="styleModuleHandleAdd(id,typeId)" type="primary" icon="plus">新增</a-button>
<a-button @click="styleModuleHandleAdd(id,typeId,styleNames)" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('款式模块表')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
@ -215,6 +220,7 @@ export default {
loadRouteType: false,
id: "",
typeId: "",
styleNames: '',
dictOptions: {},
superFieldList: [],
}
@ -251,6 +257,7 @@ export default {
this.id = this.$route.query.id;
this.typeId = this.$route.query.typeId;
this.biaoTi = this.$route.query.styleNames + "款式模块管理";
this.styleNames = this.$route.query.styleNames;
//console.log('********idstyle_id: ' + this.id);
//console.log('********biaoTi: ' + this.biaoTi);
//console.log('******typeIdtypeId: ' + this.typeId);

@ -25,6 +25,8 @@
</template>
<script>
import {getAction} from "@api/manage";
const columns1 = [
{
title: '款式名称',
@ -117,6 +119,9 @@ export default {
columns,
id: '',
url: {
detail: "/zystylemodule/zyStyleModule/detail",
},
}
},
methods: {
@ -126,7 +131,8 @@ export default {
this.getDetailData()
},
async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zystylemodule/zyStyleModule/detail?id=' + this.id)
//const {data: res} = await this.$axios.get('/jeecg-boot/zystylemodule/zyStyleModule/detail?id=' + this.id)
getAction(this.url.detail, {id: this.id}).then((res) => {
if (res.code !== 200) {
this.$message({
type: 'error',
@ -140,6 +146,7 @@ export default {
}
this.data1 = res.result.zyClothsStyles
this.data = res.result.zyStyleModuleList
})
},
handleOk(e) {
this.confirmLoading = true;

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.zyaccessories.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -11,9 +12,13 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.accessories.entity.ZyAccessories;
import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService;
import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccDetailVO;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.mapper.ZyStyleAccessoriesMapper;
@ -33,6 +38,8 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@ -55,6 +62,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccessories, IZyStyleAccessoriesService> {
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
private IZyAccessoriesService zyAccessoriesService;
@Autowired
private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@ -78,14 +87,36 @@ public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccesso
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//zyStyleAccessories.getAccessNum() 辅料编号 查询参数 只有查询的时候才会有
// List<ZyAccessories> accessories = new ArrayList<>();
// if (StringUtils.hasText(zyStyleAccessories.getAccessNum())) {
// LambdaQueryWrapper<ZyAccessories> queryWrapper2 = new LambdaQueryWrapper<>();
// queryWrapper2.like(ZyAccessories::getNums, zyStyleAccessories.getAccessNum());
// accessories.addAll(zyAccessoriesService.list());
// }
QueryWrapper<ZyStyleAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
Page<ZyStyleAccessories> page = new Page<ZyStyleAccessories>(pageNo, pageSize);
IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(page, queryWrapper);
List<ZyStyleAccessories> listRecords = pageList.getRecords();
// if (!ObjectUtils.isEmpty(accessories) && !ObjectUtils.isEmpty(listRecords)) {
// for (ZyAccessories zy : accessories) {
// listRecords.stream()
// .filter(ZyStyleAccessories -> ZyStyleAccessories.getAccessoriesId().equals(zy.getId()))
// .collect(Collectors.toList());
// }
// }
for (ZyStyleAccessories zy : listRecords) {
String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId());
String num = zyStyleFabricMapper.getAccessoriesNumById(zy.getAccessoriesId());
if (StringUtils.hasText(typeName)) {
zy.setTypeName(typeName);
}
if (StringUtils.hasText(num)) {
zy.setAccessNum(num);
}
}
return Result.OK(pageList);
}

@ -65,7 +65,9 @@ public class ZyStyleAccessories implements Serializable {
@ApiModelProperty(value = "面料id")
@Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id")
private java.lang.String accessoriesId;
/** 辅料 编号*/
@TableField(exist = false)
private java.lang.String accessNum;
/**服装类型名称*/
@Excel(name = "服装类型名称", width = 15)
@ApiModelProperty(value = "服装类型名称")

@ -1,5 +1,6 @@
package org.jeecg.modules.zystylefabric.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -9,6 +10,7 @@ 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.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
@ -19,7 +21,11 @@ import org.jeecg.modules.zystylefabric.entity.ZyStyleFabricDetailVo;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylefabric.service.INewZyStyleFabricService;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -29,6 +35,7 @@ import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Description: 款式面料表
@ -66,10 +73,12 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
@ApiOperation(value = "款式面料表-分页列表查询", notes = "款式面料表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<NewZyStyleFabric>> queryPageList(ZyStyleFabric zyStyleFabric, String id,
@RequestParam(name = "fabricNumber", required = false) String fabricNumber,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyStyleFabric> queryWrapper = new QueryWrapper<>();
//从服装款式进去款式面料时 根据style_id进行筛选 所以一般都会有id即style_id
if (id != null) {
queryWrapper.eq("style_id", id);
}
@ -84,6 +93,26 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
}
List<ZyStyleFabric> list = zyStyleFabricService.list(queryWrapper);
//fabricNumber 面料编号查询参数 只有查询的时候才会有
if (StringUtils.hasText(fabricNumber)) {
LambdaQueryWrapper<ZyFabric> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.like( ZyFabric::getFabricNumber,fabricNumber);
List<ZyFabric> listTwo = zyFabricService.list(queryWrapper2);
if (ObjectUtils.isEmpty(listTwo)){
IPage<NewZyStyleFabric> pageList2 = new Page<>(pageNo, pageSize, 0);
return Result.OK(pageList2);
}
List<ZyStyleFabric> zyStyleFabricList = new ArrayList<>();
for (ZyFabric zy : listTwo) {
List<ZyStyleFabric> zyStyleFabrics = zyStyleFabricMapper.getListByFabricId(zy.getId());
zyStyleFabricList.addAll(zyStyleFabrics);
}
//将新查出来的集合在根据styleid 筛选一下
zyStyleFabricList = zyStyleFabricList.stream().filter(ZyStyleFabric -> ZyStyleFabric.getStyleId().equals(id)).collect(Collectors.toList());
list.clear();
list.addAll(zyStyleFabricList);
}
List<NewZyStyleFabric> newZyStyleFabrics = zyStyleFabricService.changeList(list);
IPage<NewZyStyleFabric> pageList = new Page<>(pageNo, pageSize, list.size());
pageList.setRecords(newZyStyleFabrics);

@ -35,4 +35,10 @@ public interface ZyStyleFabricMapper extends BaseMapper<ZyStyleFabric> {
/**根据styleId 拿到 面料名称*/
@Select("select contents from zy_accessories where id = #{styleId}")
String getAccessoriesNameByStyleId(String styleId);
/**根据styleId 拿到 面料名称*/
@Select("select nums from zy_accessories where id = #{styleId}")
String getAccessoriesNumById(String styleId);
@Select("SELECT * FROM zy_style_fabric WHERE fabric_id = #{id}")
List<ZyStyleFabric> getListByFabricId(String id);
}

@ -3,10 +3,13 @@ package org.jeecg.modules.zystylemodule.controller;
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;
@ -77,17 +80,35 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
public Result<?> queryPageList(ZyStyleModule zyStyleModule2,
@RequestParam(name = "id", required = false) String id,
@RequestParam(name = "modularId", required = false) String modularId,
@RequestParam(name = "modularNums", required = false) String modularNums,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@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);
queryWrapper.eq(StringUtils.hasText(modularId), "modular_id", modularId);
Page<ZyStyleModule> page = new Page<>(pageNo, pageSize);
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper);
if (StringUtils.hasText(modularNums)){
LambdaQueryWrapper<ZyClothsModular> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.like( ZyClothsModular::getNums,modularNums);
List<ZyClothsModular> list = zyClothsModularService.list(queryWrapper2);
if (ObjectUtils.isEmpty(list)){
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, 0);
return Result.OK(pageList2);
}
List<ZyStyleModule> zyStyleModules = new ArrayList<>();
for (ZyClothsModular zy :list) {
List<ZyStyleModule> zyStyleModulesList = zyStyleModuleMapper.getListByModularId(zy.getId());
zyStyleModules.addAll(zyStyleModulesList);
}
//将新查出来的集合在根据styleid 筛选一下
zyStyleModules = zyStyleModules.stream().filter(ZyStyleModule -> ZyStyleModule.getStyleId().equals(id)).collect(Collectors.toList());
pageList.setRecords(zyStyleModules);
}
//List<ZyStyleModule> zyStyleModules = zyStyleModuleMapper.getListByStyleId(id);
//改变list中的实体类 类型
List<NewStyleModule> newStyleModuleList = zyStyleModuleService.changeList(pageList.getRecords());
@ -156,7 +177,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@ApiOperation(value = "款式模块表-详情", notes = "款式模块表-详情")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("款式模块表 /detail controller层接受到的id: : " + id);
//System.out.println("款式模块表 /detail controller层接受到的id: : " + id);
ZyStyleModuleDetailVO detailVO = zyStyleModuleService.queryDetail(id);
return Result.OK(detailVO);
}

@ -23,4 +23,7 @@ public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> {
@Select("SELECT * FROM zy_style_module WHERE style_id = #{id}")
List<ZyStyleModule> getListByStyleId(String id);
@Select("SELECT * FROM zy_style_module WHERE modular_id = #{id}")
List<ZyStyleModule> getListByModularId(String id);
}

Loading…
Cancel
Save