2022-11-10 赵玉瑞 修改服装类型及相关问题

zhc4dev
赵玉瑞 2 years ago
parent 3091022d6f
commit 3a4c15df00
  1. 9
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 4
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  3. 24
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  4. 17
      ant-design-vue-jeecg/src/views/zystylefabric/ZyStyleFabricList.vue
  5. 7
      ant-design-vue-jeecg/src/views/zystylefabric/modules/ZyStyleFabricForm.vue
  6. 5
      ant-design-vue-jeecg/src/views/zystylefabric/modules/ZyStyleFabricModal.vue
  7. 13
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  8. 10
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  9. 24
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleForm.vue
  10. 4
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleModal.vue
  11. 10
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsType.java
  12. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/entity/ZyClothsStyle.java
  13. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java
  14. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  15. 2
      jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml

@ -9,6 +9,7 @@ import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types" import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
import store from '@/store' import store from '@/store'
import {Modal} from 'ant-design-vue' import {Modal} from 'ant-design-vue'
import type from "@views/exception/type";
export const JeecgListMixin = { export const JeecgListMixin = {
data(){ data(){
@ -266,9 +267,15 @@ export const JeecgListMixin = {
this.$refs.modalForm.title = "新增"; this.$refs.modalForm.title = "新增";
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false;
}, },
styleModuleHandleAdd: function (id) { zyStyleFabricHandleAdd: function (id) {
this.$refs.modalForm.add(id); this.$refs.modalForm.add(id);
this.$refs.modalForm.title = "新增"; this.$refs.modalForm.title = "新增";
console.log("js层id的传递"+id);
this.$refs.modalForm.disableSubmit = false;
},
styleModuleHandleAdd: function (id,typeId) {
this.$refs.modalForm.add(id,typeId);
this.$refs.modalForm.title = "新增";
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false;
}, },
handleAdd1: function (id) { handleAdd1: function (id) {

@ -173,7 +173,7 @@
{ {
title:'服装类型', title:'服装类型',
align:"center", align:"center",
dataIndex: 'typeId' dataIndex: 'typeId_dictText'
}, },
{ {
title:'形式', title:'形式',
@ -237,7 +237,7 @@
path: '/src/views/zystylemodule/ZyStyleModuleList', path: '/src/views/zystylemodule/ZyStyleModuleList',
query: { // query: { //
'id': record.id, 'id': record.id,
//'typeId': record.typeId, 'typeId': record.typeId,
} }
}); });
}, },

@ -6,15 +6,16 @@
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId"> <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-popup <j-popup
v-model="model.typeId" v-model="model.typeName"
field="other" field="type_name"
org-fields="id,type_name" org-fields="type_name,id"
dest-fields="popup,other" dest-fields="typeName,typeId"
code="cloths_type" code="cloths_type"
:multi="false" :multi="false"
@input="popupCallback" @input="popupCallback"
/> {{ typeId }} />
</a-form-model-item> </a-form-model-item>
<a-input v-model="model.typeId" hidden/>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="形式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shape"> <a-form-model-item label="形式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shape">
@ -52,8 +53,8 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="特征" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="characteristic"> <a-form-model-item label="风格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="characteristic">
<a-input v-model="model.characteristic" placeholder="请输入特征" ></a-input> <a-input v-model="model.characteristic" placeholder="请输入风格" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -67,13 +68,13 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="测量方法" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measuringMethod"> <a-form-model-item label="制衣参数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measuringMethod">
<a-input v-model="model.measuringMethod" placeholder="请输入测量方法" ></a-input> <a-textarea v-model="model.measuringMethod" placeholder="请输入制衣参数" ></a-textarea>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="误差" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="error"> <a-form-model-item label="测体余量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="error">
<a-input v-model="model.error" placeholder="请输入误差" ></a-input> <a-input v-model="model.error" placeholder="请输入测体余量" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -127,6 +128,7 @@
data () { data () {
return { return {
typeId : "", typeId : "",
typeName:"",
model:{ model:{
shape:1 shape:1
}, },

@ -27,7 +27,7 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="zyStyleFabricHandleAdd(id)" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('款式面料表')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('款式面料表')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button> <a-button type="primary" icon="import">导入</a-button>
@ -130,15 +130,20 @@
return parseInt(index)+1; return parseInt(index)+1;
} }
}, },
{
title:'款式名称',
align:"center",
dataIndex: 'styleNames'
},
{ {
title:'款式编号', title:'款式编号',
align:"center", align:"center",
dataIndex: 'styleNums' dataIndex: 'styleNums'
}, },
{ {
title:'款式名称', title:'面料名称',
align:"center", align:"center",
dataIndex: 'styleNames' dataIndex: 'fabricName'
}, },
{ {
title:'面料编号', title:'面料编号',
@ -146,9 +151,9 @@
dataIndex: 'fabricNumber' dataIndex: 'fabricNumber'
}, },
{ {
title:'面料名称', title:'创建时间',
align:"center", align:"center",
dataIndex: 'fabricName' dataIndex: 'createTime'
}, },
{ {
title: '操作', title: '操作',
@ -190,7 +195,7 @@
loadParameter() { loadParameter() {
if (this.loadRouteType == false) { if (this.loadRouteType == false) {
this.id = this.$route.query.id; this.id = this.$route.query.id;
console.log(this.id) console.log("*******传递的id"+this.id)
this.loadRouteType = true; this.loadRouteType = true;
} }
}, },

@ -5,7 +5,7 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="款式类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId"> <a-form-model-item label="款式类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式类型" /> <j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式类型" disabled/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -40,6 +40,7 @@
data () { data () {
return { return {
model:{ model:{
styleId: '',
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@ -75,8 +76,10 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
methods: { methods: {
add () { add (id) {
this.edit(this.modelDefault); this.edit(this.modelDefault);
this.model.styleId = id;
console.log("form层的id接收"+id);
}, },
edit (record) { edit (record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);

@ -29,10 +29,11 @@
} }
}, },
methods: { methods: {
add () { add (id) {
this.visible=true this.visible=true
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.realForm.add(); this.$refs.realForm.add(id);
console.log("Modal层的id传递"+id);
}) })
}, },
edit (record) { edit (record) {

@ -94,7 +94,7 @@
columns: [ columns: [
{ {
title: '款式', title: '服装款式',
width: '150px', width: '150px',
fixed: 'left', fixed: 'left',
key: 'styleId', key: 'styleId',
@ -187,7 +187,7 @@
var str = props.rowId; var str = props.rowId;
let httpurl = ''; let httpurl = '';
let method = ''; let method = '';
if (str.search("row") != -1) { if (str.search("row") !== -1) {
httpurl += this.url.add; httpurl += this.url.add;
method = 'post'; method = 'post';
} else { } else {
@ -203,14 +203,15 @@
} }
}) })
}, },
// //
loadParameter() { loadParameter() {
if (this.loadRouteType == false) { if (this.loadRouteType === false) {
this.id = this.$route.query.id; this.id = this.$route.query.id;
console.log("**********传递到此层的id:"+this.id);
this.loadRouteType = true; this.loadRouteType = true;
} }
}, },
// //
loadData(arg) { loadData(arg) {
// 1 // 1
if (arg === 1) { if (arg === 1) {
@ -289,5 +290,5 @@
} }
</script> </script>
<style scoped> <style scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
</style> </style>

@ -35,7 +35,7 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button @click="styleModuleHandleAdd(id)" type="primary" icon="plus">新增</a-button> <a-button @click="styleModuleHandleAdd(id,typeId)" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('款式模块表')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('款式模块表')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button> <a-button type="primary" icon="import">导入</a-button>
@ -156,6 +156,11 @@ export default {
align: "center", align: "center",
dataIndex: 'styleNums' dataIndex: 'styleNums'
}, },
/*{
title: '服装类型',
align: "center",
dataIndex: 'typeId'
},*/
{ {
title: '服装类型', title: '服装类型',
align: "center", align: "center",
@ -197,6 +202,7 @@ export default {
// //
loadRouteType:false, loadRouteType:false,
id:"", id:"",
typeId: "",
dictOptions: {}, dictOptions: {},
superFieldList: [], superFieldList: [],
} }
@ -217,7 +223,7 @@ export default {
loadParameter() { loadParameter() {
if (this.loadRouteType === false) { if (this.loadRouteType === false) {
this.id = this.$route.query.id; this.id = this.$route.query.id;
//this.typeId = this.$route.query.typeId; this.typeId = this.$route.query.typeId;
console.log('********id对应的为款式style_id: '+this.id); console.log('********id对应的为款式style_id: '+this.id);
console.log('******typeId此为类型typeId: '+this.typeId); console.log('******typeId此为类型typeId: '+this.typeId);
this.loadRouteType = true; this.loadRouteType = true;

@ -3,21 +3,28 @@
<j-form-container :disabled="formDisabled"> <j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<!-- <a-col :span="24"> <a-col :span="24">
<a-form-model-item label="款式名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId"> <a-form-model-item label="款式名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式" /> <j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式" disabled />
</a-form-model-item> </a-form-model-item>
</a-col>--> </a-col>
<!-- <a-col :span="24"> <!-- <a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId"> <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-model="model.typeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择类型" /> <a-input v-model="model.typeNme" placeholder="请输入服装类型" disabled></a-input>
<a-input v-model="model.typeid" hidden />
</a-form-model-item> </a-form-model-item>
</a-col>--> </a-col>-->
<a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-dict-select-tag type="list" v-model="model.typeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择类型" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId"> <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">
<j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular ,modular_name,id" placeholder="请选择模块" /> <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
@ -46,8 +53,8 @@
data () { data () {
return { return {
model:{ model:{
typeId: '',
styleId: '', styleId: '',
typeId: '',
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@ -86,11 +93,12 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
methods: { methods: {
add (id) { add (id,typeId) {
this.edit(this.modelDefault); this.edit(this.modelDefault);
//this.model.typeId = typeId; //this.model.typeId = typeId;
this.model.styleId = id; this.model.styleId = id;
this.model.typeId = typeId;
}, },
edit (record) { edit (record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);

@ -29,10 +29,10 @@
} }
}, },
methods: { methods: {
add (id) { add (id,typeId) {
this.visible=true this.visible=true
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.realForm.add(id); this.$refs.realForm.add(id,typeId);
}) })
}, },
edit (record) { edit (record) {

@ -54,15 +54,15 @@ public class ZyClothsType implements Serializable {
@ApiModelProperty(value = "企业") @ApiModelProperty(value = "企业")
private java.lang.String enterpriseId; private java.lang.String enterpriseId;
/**createTime*/ /**createTime*/
@Excel(name = "创建时间", width = 15,format = "yyyy-MM-dd") @Excel(name = "创建时间", width = 15,format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "createTime") @ApiModelProperty(value = "createTime")
private java.util.Date createTime; private java.util.Date createTime;
/**updateTime*/ /**updateTime*/
@Excel(name = "更新时间", width = 15 ,format = "yyyy-MM-dd") @Excel(name = "更新时间", width = 15 ,format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "updateTime") @ApiModelProperty(value = "updateTime")
private java.util.Date updateTime; private java.util.Date updateTime;
} }

@ -36,9 +36,14 @@ public class ZyClothsStyle implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private String id; private String id;
/**类型id*/ /**类型id*/
@Dict(dictTable = "zy_cloths_type", dicText = "type_name", dicCode = "id")
@Excel(name = "类型id", width = 15) @Excel(name = "类型id", width = 15)
@ApiModelProperty(value = "类型id") @ApiModelProperty(value = "类型id")
private String typeId; private String typeId;
/**类型名称*/
@Excel(name = "类型名称", width = 15)
@ApiModelProperty(value = "类型名称")
private String typeName;
/**形式*/ /**形式*/
@Excel(name = "形式", width = 15) @Excel(name = "形式", width = 15)
@Dict(dicCode = "style_shape") @Dict(dicCode = "style_shape")
@ -110,13 +115,13 @@ public class ZyClothsStyle implements Serializable {
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
private String enterpriseId; private String enterpriseId;
/**创建时间*/ /**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date createTime; private Date createTime;
/**更新时间*/ /**更新时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
private Date updateTime; private Date updateTime;
} }

@ -117,6 +117,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
ZyFabric fabricById = zyFabricService.getById(fabricId); ZyFabric fabricById = zyFabricService.getById(fabricId);
newZySF.setFabricNumber(fabricById.getFabricNumber()); newZySF.setFabricNumber(fabricById.getFabricNumber());
newZySF.setFabricName(fabricById.getName()); newZySF.setFabricName(fabricById.getName());
newZySF.setCreateTime(zyStyleF.getCreateTime());
newZyStyleFabrics.add(newZySF); newZyStyleFabrics.add(newZySF);
} }
IPage<NewZyStyleFabric> pageList = new Page<>(pageNo, pageSize, list.size()); IPage<NewZyStyleFabric> pageList = new Page<>(pageNo, pageSize, list.size());

@ -96,6 +96,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
List<NewStyleModule> listNewStyleModules = new ArrayList<>(); List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>(); QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
System.err.println("传来的 "+id);
if (id != null) { if (id != null) {
queryWrapper.eq("style_id", id); queryWrapper.eq("style_id", id);
} }
@ -111,7 +112,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
} }
} }
List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper); List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper);
//System.out.println(list); System.out.println(list);
for (ZyStyleModule zyStyleModule : list) { for (ZyStyleModule zyStyleModule : list) {
NewStyleModule newSeMo = new NewStyleModule(); NewStyleModule newSeMo = new NewStyleModule();
//编辑回显 //编辑回显
@ -129,10 +130,12 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
ZyClothsModular modularById = zyClothsModularService.getById(modularId); ZyClothsModular modularById = zyClothsModularService.getById(modularId);
newSeMo.setModularNums(modularById.getNums()); newSeMo.setModularNums(modularById.getNums());
newSeMo.setModularName(modularById.getModularName()); newSeMo.setModularName(modularById.getModularName());
newSeMo.setCreateTime(zyStyleModule.getCreateTime());
//服装类型 //服装类型
String typeId = zyStyleModule.getTypeId(); String typeId = zyStyleModule.getTypeId();
ZyClothsType typeById = zyClothsTypeService.getById(typeId); ZyClothsType typeById = zyClothsTypeService.getById(typeId);
newSeMo.setCreateTime(zyStyleModule.getCreateTime());
if (typeById != null){ if (typeById != null){
newSeMo.setTypeName(typeById.getTypeName()); newSeMo.setTypeName(typeById.getTypeName());
} else { } else {
@ -185,13 +188,13 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) { public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) {
//根据styleId到原表 zy cloths style直接把名字拿过来,再根据名字到另一个表 zy cloths type 中把id拿过来 //根据styleId到原表 zy cloths style直接把名字拿过来,再根据名字到另一个表 zy cloths type 中把id拿过来
String styleId = zyStyleModule.getStyleId(); //String styleId = zyStyleModule.getStyleId();
ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(styleId); //ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(styleId);
LambdaQueryWrapper<ZyClothsType> lambdaQueryWrapper = new LambdaQueryWrapper<>(); //LambdaQueryWrapper<ZyClothsType> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ZyClothsType::getTypeName,zyClothsStyle.getTypeId()); //lambdaQueryWrapper.eq(ZyClothsType::getTypeName,zyClothsStyle.getTypeId());
ZyClothsType zyClothsType = zyClothsTypeService.getOne(lambdaQueryWrapper); //ZyClothsType zyClothsType = zyClothsTypeService.getOne(lambdaQueryWrapper);
zyStyleModule.setTypeId(zyClothsType.getId()); //zyStyleModule.setTypeId(zyClothsType.getId());
zyStyleModuleService.save(zyStyleModule); zyStyleModuleService.save(zyStyleModule);
return Result.OK("添加成功!"); return Result.OK("添加成功!");

@ -169,7 +169,7 @@ mybatis-plus:
table-underline: true table-underline: true
configuration: configuration:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段 # 返回类型为Map,显示null对应的字段
call-setters-on-nulls: true call-setters-on-nulls: true
#jeecg专用配置 #jeecg专用配置

Loading…
Cancel
Save