2022-12-16 修改产品管理部分问题

zhc4dev
赵玉瑞 2 years ago
parent 3c8f31099c
commit 0d0a20e058
  1. 6
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  2. 9
      ant-design-vue-jeecg/src/views/zystyleaccessories/ZyStyleAccessoriesList.vue
  3. 36
      ant-design-vue-jeecg/src/views/zystyleaccessories/modules/ZyAccessoriesList.vue
  4. 6
      ant-design-vue-jeecg/src/views/zystyleaccessories/modules/ZyStyleAccessoriesModal.vue
  5. 5
      ant-design-vue-jeecg/src/views/zystylefabric/ZyStyleFabricList.vue
  6. 21
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyProcessList.vue
  7. 2
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal.vue
  8. 4
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  9. 4
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyClothsModularList.vue
  10. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/controller/ZyStyleAccessoriesController.java
  11. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/entity/ZyStyleAccessories.java
  12. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  13. 11
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java
  14. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/entity/NewZyStyleFabric.java
  15. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/mapper/ZyStyleFabricMapper.java
  16. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/impl/NewZyStyleFabricServiceImpl.java
  17. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java

@ -162,7 +162,11 @@ export default {
return parseInt(index) + 1; return parseInt(index) + 1;
} }
}, },
{
title: '服装类型名称',
align: "center",
dataIndex: 'typeName'
},
{ {
title: '款式名称', title: '款式名称',
align: "center", align: "center",

@ -17,8 +17,8 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料类型"> <a-form-item label="辅料名称">
<j-dict-select-tag placeholder="请选择辅料类型" dictCode="zy_accessories,contents,id" <j-dict-select-tag placeholder="请选择辅料名称" dictCode="zy_accessories,contents,id"
v-model="queryParam.accessoriesId"></j-dict-select-tag> v-model="queryParam.accessoriesId"></j-dict-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -162,6 +162,11 @@ export default {
return parseInt(index) + 1; return parseInt(index) + 1;
} }
}, },
{
title: '服装类型名称',
align: "center",
dataIndex: 'typeName'
},
{ {
title: '款式名称', title: '款式名称',
align: "center", align: "center",

@ -4,19 +4,38 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料编号">
<a-input placeholder="请输入辅料编号" v-model="queryParam.nums"></a-input>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料名称">
<a-input placeholder="请输入辅料名称" v-model="queryParam.contents"></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>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<!-- 查询区域-END --> <!-- 查询区域-END -->
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <!-- <div class="table-operator">-->
</div> <!-- </div>-->
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <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> <a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div> </div>
@ -39,7 +58,8 @@
</template> </template>
<template slot="imgSlot" slot-scope="text"> <template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> <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>
<template slot="fileSlot" slot-scope="text"> <template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@ -68,9 +88,7 @@
export default { export default {
name: 'ZyAccessoriesList', name: 'ZyAccessoriesList',
mixins: [JeecgListMixin, mixinDevice], mixins: [JeecgListMixin, mixinDevice],
components: { components: {},
},
data() { data() {
return { return {
description: 'zy_accessories管理页面', description: 'zy_accessories管理页面',
@ -100,8 +118,8 @@
title: '名称', title: '名称',
align: "center", align: "center",
dataIndex: 'contents', dataIndex: 'contents',
width:10, // width:10,
colspan:2 // colspan:2
}, },
{ {
title: '图片', title: '图片',

@ -9,7 +9,8 @@
@cancel="handleCancel" @cancel="handleCancel"
cancelText="关闭"> cancelText="关闭">
<!-- <zy-style-accessories-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-style-accessories-form>--> <!-- <zy-style-accessories-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-style-accessories-form>-->
<zy-accessories-list ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback" :disabled="disableSubmit"></zy-accessories-list> <zy-accessories-list ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback"
:disabled="disableSubmit"></zy-accessories-list>
</j-modal> </j-modal>
</template> </template>
@ -18,6 +19,7 @@
// import ZyStyleAccessoriesForm from './ZyStyleAccessoriesForm' // import ZyStyleAccessoriesForm from './ZyStyleAccessoriesForm'
import ZyAccessoriesList from "./ZyAccessoriesList"; import ZyAccessoriesList from "./ZyAccessoriesList";
import {postAction} from "../../../api/manage"; import {postAction} from "../../../api/manage";
export default { export default {
name: 'ZyStyleAccessoriesModal', name: 'ZyStyleAccessoriesModal',
components: { components: {
@ -30,7 +32,7 @@
accessoriesId: '' accessoriesId: ''
}, },
title: '', title: '',
width:800, width: 1500,
visible: false, visible: false,
disableSubmit: false, disableSubmit: false,
url: { url: {

@ -145,6 +145,11 @@ export default {
return parseInt(index) + 1; return parseInt(index) + 1;
} }
}, },
{
title: '服装类型',
align: "center",
dataIndex: 'typeName'
},
{ {
title: '款式编号', title: '款式编号',
align: "center", align: "center",

@ -3,7 +3,26 @@
<!-- 查询区域 --> <!-- 查询区域 -->
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row>
<a-row :gutter="24">
<a-col :xl="8" :lg="7" :md="8" :sm="24">
<a-form-item label="工序代码">
<a-input placeholder="请输入工序代码" v-model="queryParam.processCode"></a-input>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="7" :md="8" :sm="24">
<a-form-item label="工序名称">
<a-input placeholder="请输入工序名称" v-model="queryParam.processName"></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>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>

@ -27,7 +27,7 @@
processId:'' processId:''
}, },
title:'', title:'',
width:800, width:900,
visible: false, visible: false,
disableSubmit: false, disableSubmit: false,
url: { url: {

@ -18,8 +18,8 @@
<!-- </a-form-item>--> <!-- </a-form-item>-->
<!-- </a-col>--> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="制衣模块"> <a-form-item label="模块名称">
<j-dict-select-tag placeholder="请输入制衣模块" dictCode="zy_cloths_modular ,modular_name,id" <j-dict-select-tag placeholder="请选择模块名称" dictCode="zy_cloths_modular,modular_name,id"
v-model="queryParam.modularId"></j-dict-select-tag> v-model="queryParam.modularId"></j-dict-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>

@ -4,12 +4,12 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="7" :lg="7" :md="8" :sm="24">
<a-form-item label="编号"> <a-form-item label="编号">
<a-input placeholder="编号" v-model="queryParam.nums"></a-input> <a-input placeholder="编号" v-model="queryParam.nums"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="10" :lg="7" :md="8" :sm="24">
<a-form-item label="模块名称"> <a-form-item label="模块名称">
<a-input placeholder="模块名称" v-model="queryParam.modularName"></a-input> <a-input placeholder="模块名称" v-model="queryParam.modularName"></a-input>
</a-form-item> </a-form-item>

@ -7,6 +7,7 @@ import java.util.stream.Collectors;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -22,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ExportParams;
@ -52,7 +54,11 @@ public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccesso
@Autowired @Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService; private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired @Autowired
ZyStyleAccessoriesMapper zyStyleAccessoriesMapper; private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;
/** /**
* 分页列表查询 * 分页列表查询
@ -73,6 +79,11 @@ public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccesso
QueryWrapper<ZyStyleAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap()); QueryWrapper<ZyStyleAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
Page<ZyStyleAccessories> page = new Page<ZyStyleAccessories>(pageNo, pageSize); Page<ZyStyleAccessories> page = new Page<ZyStyleAccessories>(pageNo, pageSize);
IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(page, queryWrapper); IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(page, queryWrapper);
List<ZyStyleAccessories> listRecords = pageList.getRecords();
for (ZyStyleAccessories zy : listRecords) {
String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId());
zy.setTypeName(typeName);
}
return Result.OK(pageList); return Result.OK(pageList);
} }

@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
import java.util.Date; import java.util.Date;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@ -55,7 +56,7 @@ public class ZyStyleAccessories implements Serializable {
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**款式id*/ /**款式id*/
@Excel(name = "款式id", width = 15) @Excel(name = "服装款式id", width = 15)
@ApiModelProperty(value = "款式id") @ApiModelProperty(value = "款式id")
@Dict(dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id") @Dict(dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id")
private java.lang.String styleId; private java.lang.String styleId;
@ -64,4 +65,10 @@ public class ZyStyleAccessories implements Serializable {
@ApiModelProperty(value = "面料id") @ApiModelProperty(value = "面料id")
@Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id") @Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id")
private java.lang.String accessoriesId; private java.lang.String accessoriesId;
/**服装类型名称*/
@Excel(name = "服装类型名称", width = 15)
@ApiModelProperty(value = "服装类型名称")
@TableField(exist = false)
private java.lang.String typeName;
} }

@ -60,16 +60,16 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
@Override @Override
public String sort(String id) { public String sort(String id) {
String nums = zyClothsStyleMapper.sort(id); String nums = zyClothsStyleMapper.sort(id);
System.out.println(nums + " nums"); // System.out.println(nums + " nums");
String format = String.format("%08d", orderNumber()); String format = String.format("%08d", orderNumber());
System.err.println(format + " format"); // System.err.println(format + " format");
return nums + format; return nums + format;
} }
private Long orderNumber() { private Long orderNumber() {
List<String> numsList = zyClothsStyleMapper.selectNumsList(); List<String> numsList = zyClothsStyleMapper.selectNumsList();
System.out.println(numsList); // System.out.println(numsList);
System.out.println(numsList.size()); // System.out.println(numsList.size());
List<Long> list = new ArrayList<>(); List<Long> list = new ArrayList<>();
for (String nums : numsList) { for (String nums : numsList) {
@ -86,8 +86,8 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
list.add(Long.valueOf(newNums)); list.add(Long.valueOf(newNums));
} }
System.out.println(list); // System.out.println(list);
System.out.println(list.size()); // System.out.println(list.size());
return Collections.max(list) + 1; return Collections.max(list) + 1;
} }
} }

@ -3,8 +3,10 @@ package org.jeecg.modules.zystylefabric.controller;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
@ -19,6 +21,7 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService; import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric; import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric; import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylefabric.service.INewZyStyleFabricService; import org.jeecg.modules.zystylefabric.service.INewZyStyleFabricService;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService; import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
@ -49,6 +52,9 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
@Autowired @Autowired
private IZyFabricService zyFabricService; private IZyFabricService zyFabricService;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -87,6 +93,11 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
newZySF.setId(zyStyleF.getId()); newZySF.setId(zyStyleF.getId());
newZySF.setFabricId(zyStyleF.getFabricId()); newZySF.setFabricId(zyStyleF.getFabricId());
newZySF.setStyleId(zyStyleF.getStyleId()); newZySF.setStyleId(zyStyleF.getStyleId());
//拿到服装类型名称
String typeName = zyStyleFabricMapper.getTypeName(newZySF.getStyleId());
newZySF.setTypeName(typeName);
//款式编号和名称 //款式编号和名称
String styleId = zyStyleF.getStyleId(); String styleId = zyStyleF.getStyleId();
ZyClothsStyle styleById = zyClothsStyleService.getById(styleId); ZyClothsStyle styleById = zyClothsStyleService.getById(styleId);

@ -1,6 +1,7 @@
package org.jeecg.modules.zystylefabric.entity; package org.jeecg.modules.zystylefabric.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -15,6 +16,11 @@ public class NewZyStyleFabric {
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private java.lang.String id; private java.lang.String id;
/**服装类型 名称*/
@ApiModelProperty(value = "服装类型 名称")
private java.lang.String typeName;
/**款式id*/ /**款式id*/
@Excel(name = "款式id", width = 15, dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id") @Excel(name = "款式id", width = 15, dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id")
@ApiModelProperty(value = "款式id") @ApiModelProperty(value = "款式id")
@ -24,8 +30,8 @@ public class NewZyStyleFabric {
@ApiModelProperty(value = "面料id") @ApiModelProperty(value = "面料id")
private java.lang.String fabricId; private java.lang.String fabricId;
/**名称*/ /**名称*/
@Excel(name = "名称", width = 15) @Excel(name = "面料 名称", width = 15)
@ApiModelProperty(value = "名称") @ApiModelProperty(value = "面料 名称")
private java.lang.String fabricName; private java.lang.String fabricName;
/**材料编号*/ /**材料编号*/
@Excel(name = "材料编号", width = 15) @Excel(name = "材料编号", width = 15)
@ -36,8 +42,8 @@ public class NewZyStyleFabric {
@ApiModelProperty(value = "编号") @ApiModelProperty(value = "编号")
private String styleNums; private String styleNums;
/**名称*/ /**名称*/
@Excel(name = "名称", width = 15) @Excel(name = "服装款式 名称", width = 15)
@ApiModelProperty(value = "名称") @ApiModelProperty(value = "服装款式 名称")
private String styleNames; private String styleNames;
/**创建日期*/ /**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

@ -4,6 +4,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric; import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
/** /**
@ -14,4 +15,10 @@ import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
*/ */
public interface ZyStyleFabricMapper extends BaseMapper<ZyStyleFabric> { public interface ZyStyleFabricMapper extends BaseMapper<ZyStyleFabric> {
/**
* @param styleId zyClothsStyle 中的id 款式id
*/
@Select("select type_name from zy_cloths_style where id = #{styleId}")
String getTypeName(String styleId);
} }

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric; import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylefabric.service.INewZyStyleFabricService; import org.jeecg.modules.zystylefabric.service.INewZyStyleFabricService;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Collection; import java.util.Collection;

@ -22,6 +22,7 @@ import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle; import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper; import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService; 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.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule; import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService; import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
@ -50,8 +51,9 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
private IZyClothsModularService zyClothsModularService; private IZyClothsModularService zyClothsModularService;
@Autowired @Autowired
private IZyClothsStyleService zyClothsStyleService; private IZyClothsStyleService zyClothsStyleService;
@Resource @Resource
private ZyClothsStyleMapper zyClothsStyleMapper; private ZyStyleFabricMapper zyStyleFabricMapper;
/** /**
@ -109,12 +111,13 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
newSeMo.setCreateTime(zyStyleModule.getCreateTime()); newSeMo.setCreateTime(zyStyleModule.getCreateTime());
//服装类型 服装类型的id 不知道什么情况 传的是zy_cloths_style中的type_id //服装类型 服装类型的id 不知道什么情况 传的是zy_cloths_style中的type_id
String typeId = zyStyleModule.getTypeId(); //String styleId1 = zyStyleModule.getStyleId();
System.out.println(typeId); String typeName = zyStyleFabricMapper.getTypeName(zyStyleModule.getStyleId());
String typeNameByTypeId = zyClothsStyleMapper.getTypeNameByTypeId(typeId); //System.out.println(typeId);
System.err.println(typeNameByTypeId); //String typeNameByTypeId = zyClothsStyleMapper.getTypeNameByTypeId(typeId);
if (typeNameByTypeId != null){ //System.err.println(typeNameByTypeId);
newSeMo.setTypeName(typeNameByTypeId); if (typeName != null){
newSeMo.setTypeName(typeName);
} else { } else {
newSeMo.setTypeName("typeName为空"); newSeMo.setTypeName("typeName为空");
} }

Loading…
Cancel
Save