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

zhc4dev
赵玉瑞 2 years ago
parent 4b3ec4387f
commit ce237998b7
  1. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  2. 44
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  3. 3
      ant-design-vue-jeecg/src/views/zystyleaccessories/ZyStyleAccessoriesList.vue
  4. 3
      ant-design-vue-jeecg/src/views/zystylefabric/ZyStyleFabricList.vue
  5. 3
      ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue
  6. 5
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  7. 45
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyClothsModularList.vue
  8. 6
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  9. 8
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
  10. 14
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsTypeMapper.xml
  11. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java
  12. 19
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
  13. 34
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  14. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/entity/ZyClothsStyle.java
  15. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/mapper/ZyClothsStyleMapper.java
  16. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/mapper/xml/ZyClothsStyleMapper.xml
  17. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
  18. 34
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  19. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  20. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/entity/ZyStyleModule.java

@ -81,7 +81,7 @@
// ],
typeName: [
{ required: true, message: '请输入类型名称!'},
{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!?]{0,50}$/, message: '文本长度过长'},
{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'},
],
enterpriseId: [
{ required: true, message: '请输入企业!'},

@ -14,8 +14,8 @@
<j-popup
v-model="model.typeName"
field="type_name"
org-fields="type_name,nums"
dest-fields="typeName,styleId"
org-fields="type_name,id,nums"
dest-fields="typeName,typeId,styleId"
code="cloths_type"
:multi="false"
@input="popupCallback"
@ -138,7 +138,7 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<!-- <a-row>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="model.enterpriseId" multi />-->
@ -244,7 +244,7 @@
<!-- <j-dict-select-tag v-model="model.sewingForm" placeholder="请选择缝纫形式" dict-code="sewingForm"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
</a-row>
<!-- </a-row>-->
<!-- <a-row>-->
<!-- <a-col :span="24">-->
@ -356,9 +356,7 @@
<script>
import {httpAction, getAction} from '@/api/manage'
import {validateDuplicateValue} from '@/utils/util'
import store from '@/store'
import {getAction, httpAction} from '@/api/manage'
export default {
name: 'ZyClothsStyleForm',
@ -397,25 +395,25 @@ export default {
},
confirmLoading: false,
validatorRules: {
typeId: [
{required: true, message: '请选择服装类型!'},
],
// typeId: [
// {required: true, message: '!'},
// ],
// nums: [
// { required: true, message: '!'},
// ],
styleNames: [
{required: true, message: '请输入名称!'},
],
positionid: [
{required: true, message: '请选择组委会职务!'},
{required: true, message: '请输入款式名称!'},
],
// positionid: [
// {required: true, message: ''},
// ],
},
url: {
add: "/zyclothsstyle/zyClothsStyle/add",
edit: "/zyclothsstyle/zyClothsStyle/edit",
queryById: "/zyclothsstyle/zyClothsStyle/queryById",
//getActionurl
sort:"/base/zyProcess/sort"
sort:"/zyclothsstyle/zyClothsStyle/sort"
}
}
},
@ -466,17 +464,17 @@ export default {
})
},
popupCallback(value, row) {
console.log("1222346584" + "++++++")
console.log("1222346584" + "++++++"+row)
var n = 8;
this.model = Object.assign(this.model, row);
getAction(this.url.sort, {id: this.model.styleId}).then((res) => {
getAction(this.url.sort, {id: this.model.typeId}).then((res) => {
console.log("aaaaaa"+res.result);
var num = parseInt(res.result, 10) + 1
num = num.toString()
while (num.length < n) {
num = "0" + num
}
this.model.nums = this.model.styleId + num;
//var num = parseInt(res.result, 10) + 1;
// num = num.toString();
// while (num.length < n) {
// num = "0" + num
// }
this.model.nums = res.result;
// console.log(this.model.processCode)
})
},

@ -56,7 +56,8 @@
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>
<!-- <a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>-->
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->

@ -48,7 +48,8 @@
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>
<!-- <a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>-->
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->

@ -36,7 +36,8 @@
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>
<!-- <a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>-->
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->

@ -57,7 +57,8 @@
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>
<!-- <a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>-->
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->
<div>
@ -246,7 +247,7 @@ export default {
this.typeId = this.$route.query.typeId;
this.biaoTi = this.$route.query.styleNames+"款式模块管理";
console.log('********id对应的为款式style_id: ' + this.id);
console.log('********biaoTi: ' + this.biaoTi);
//console.log('********biaoTi: ' + this.biaoTi);
console.log('******typeId此为类型typeId: ' + this.typeId);
this.loadRouteType = true;
}

@ -4,6 +4,23 @@
<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="编号">
<a-input placeholder="编号" v-model="queryParam.nums"></a-input>
</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.modularName"></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-form>
</div>
@ -54,7 +71,7 @@
</a-table>
</div>
<!-- <zy-cloths-modular-modal ref="modalForm" @ok="modalFormOk"></zy-cloths-modular-modal>-->
<!-- <zy-cloths-modular-modal ref="modalForm" @ok="modalFormOk"></zy-cloths-modular-modal>-->
</a-card>
</template>
@ -68,9 +85,7 @@ import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'ZyClothsModularList',
mixins: [JeecgListMixin, mixinDevice],
components: {
},
components: {},
data() {
return {
description: '制衣模块 zy_cloths_modular管理页面',
@ -118,17 +133,17 @@ export default {
},
},
methods: {
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey',ids)
},
add (id,typeId) {
},
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey', ids)
},
add(id, typeId) {
},
initDictConfig() {
},
getSuperFieldList() {

@ -57,6 +57,8 @@ 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);
@ -104,6 +106,10 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
}
//生成编号 nums,编号,varchar,10,非空,不重复,企业缩写(4)+顺序号(6)在service层处理
// zyClothsType.setNums(zyClothsTypeService.generateNumber());
//将企业id转化成企业名称 否则在其它form里面的服装类型里面的企业查出来的为id
//@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
//String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(zyClothsType.getEnterpriseId());
//zyClothsType.setEnterpriseId(enterpriseName);
zyClothsTypeService.save(zyClothsType);
return Result.OK("添加成功!");
}

@ -2,7 +2,6 @@ package org.jeecg.modules.demo.base.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -21,4 +20,11 @@ public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> {
@Select("select nums from zy_cloths_type where nums like 'QIYE%' order by nums desc limit 0,1 ")
String sort();
String getEnterprisenameById(String enterpriseId);
String getEnterpriseName(String enterpriseName);
void setEnterpriseId(String id);
}

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper">
<update id="setEnterpriseId">
UPDATE `zy_cloths_type` SET enterprise_id= #{id}
</update>
<select id="selectNumsList" resultType="java.lang.String">
SELECT nums
@ -11,4 +14,15 @@
FROM zy_cloths_type
WHERE type_id = #{typeId}
</select>
<select id="getEnterprisenameById" resultType="java.lang.String">
SELECT depart_name
FROM sys_depart
WHERE id = #{enterpriseId}
</select>
<select id="getEnterpriseName" resultType="java.lang.String">
SELECT id
FROM sys_depart
WHERE depart_name = #{enterpriseName}
</select>
</mapper>

@ -15,4 +15,6 @@ public interface IZyClothsTypeService extends IService<ZyClothsType> {
String generateNumber();
String sort();
void chuliBianHaoWenti();
}

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.base.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
@ -11,6 +12,7 @@ import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.regex.Pattern;
@ -49,6 +51,23 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
return zyClothsTypeMapper.sort();
}
@Override
public void chuliBianHaoWenti() {
//先拿到所有编号
//再
//先处理企业问题
LambdaQueryWrapper<ZyClothsType> queryWrapper = new LambdaQueryWrapper<>();
List<ZyClothsType> zyClothsTypeList = list(queryWrapper);
System.err.println(new Date());
for (ZyClothsType enterId : zyClothsTypeList) {
String enterpriseName = enterId.getEnterpriseId();
String id = zyClothsTypeMapper.getEnterpriseName(enterpriseName);
if (StringUtils.hasText(id)){
zyClothsTypeMapper.setEnterpriseId(id);
}
}
}
private Long orderNumber() {
List<String> listString = zyClothsTypeMapper.selectNumsList();
//System.out.println(listString);

@ -1,13 +1,12 @@
package org.jeecg.modules.zyclothsstyle.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -32,6 +31,7 @@ import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@ -40,6 +40,7 @@ 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.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@ -72,6 +73,9 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Resource
private ZyClothsStyleMapper zyClothsStyleMapper;
/**
* 分页列表查询
*
@ -160,13 +164,16 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsStyle zyClothsStyle) {
//生成编号 类型编号(10位)+顺序号(8位)在service层处理
zyClothsStyle.setNums(zyClothsStyleService.generateNumber(zyClothsStyle));
//zyClothsStyle.setNums(zyClothsStyleService.generateNumber(zyClothsStyle));
//同类型的款式名称不能重复
if (StringUtils.isEmpty(zyClothsStyle.getTypeName())) {
return Result.error("添加失败!服装类型不能为空");
}
LambdaQueryWrapper<ZyClothsStyle> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ZyClothsStyle::getTypeName, zyClothsStyle.getTypeName());
List<ZyClothsStyle> zyClothsStyleList = zyClothsStyleService.list(queryWrapper);
for (ZyClothsStyle zy : zyClothsStyleList) {
if (zyClothsStyle.getStyleNames().equals(zy.getStyleNames())){
if (zyClothsStyle.getStyleNames().equals(zy.getStyleNames())) {
return Result.error("添加失败!数据已存在");
}
}
@ -174,6 +181,21 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
return Result.OK("添加成功!");
}
/**
* getAction的url sort 编码
*/
@AutoLog(value = "顺序查询")
@ApiOperation(value = "顺序查询", notes = "顺序查询")
@GetMapping(value = "/sort")
public Result<?> sort(@RequestParam(name = "id", required = true) String id) {
String sort = zyClothsStyleService.sort(id);
System.err.println(sort+ " sort");
if (StringUtils.isEmpty(sort)) {
return Result.OK(0);
}
return Result.OK(sort);
}
/**
* 编辑
*

@ -35,14 +35,14 @@ public class ZyClothsStyle implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private String id;
/**类型id*/
/**服装类型id*/
@Dict(dictTable = "zy_cloths_type", dicText = "type_name", dicCode = "id")
@Excel(name = "类型id", width = 15)
@ApiModelProperty(value = "类型id")
@Excel(name = "服装类型id", width = 15)
@ApiModelProperty(value = "服装类型id")
private String typeId;
/**类型名称*/
@Excel(name = "类型名称", width = 15)
@ApiModelProperty(value = "类型名称")
@Excel(name = "服装类型名称", width = 15)
@ApiModelProperty(value = "服装类型名称")
private String typeName;
/**形式*/
@Excel(name = "形式", width = 15)

@ -1,6 +1,8 @@
package org.jeecg.modules.zyclothsstyle.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import java.util.List;
@ -14,4 +16,9 @@ import java.util.List;
public interface ZyClothsStyleMapper extends BaseMapper<ZyClothsStyle> {
List<String> selectNumsList();
String getTypeNameByTypeId(String typeId);
@Select("select nums from zy_cloths_type where id=#{id} order by create_time DESC limit 0,1")
String sort(String id);
}

@ -6,4 +6,11 @@
SELECT nums
FROM zy_cloths_style
</select>
<select id="getTypeNameByTypeId" resultType="java.lang.String">
SELECT type_name
FROM zy_cloths_style
WHERE type_id = #{typeId}
order by create_time DESC limit 0,1
</select>
</mapper>

@ -14,4 +14,6 @@ public interface IZyClothsStyleService extends IService<ZyClothsStyle> {
/**生成编号 类型编号(10位)+顺序号(8位)*/
String generateNumber(ZyClothsStyle zyClothsStyle);
String sort(String id);
}

@ -16,10 +16,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
/**
* @Description: 服装款式表
@ -55,19 +57,37 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
return nums1 + format;
}
@Override
public String sort(String id) {
String nums = zyClothsStyleMapper.sort(id);
System.out.println(nums + " nums");
String format = String.format("%08d", orderNumber());
System.err.println(format + " format");
return nums + format;
}
private Long orderNumber() {
List<String> zyClothsStyleList = zyClothsStyleMapper.selectNumsList();
List<String> numsList = zyClothsStyleMapper.selectNumsList();
System.out.println(numsList);
System.out.println(numsList.size());
List<Long> list = new ArrayList<>();
for (String nums : zyClothsStyleList) {
if (nums.length() > 8) {
String substring = nums.substring(nums.length() - 8);
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(nums)) {
nums = "0";
if (StringUtils.isEmpty(newNums)) {
newNums = "0";
}
list.add(Long.valueOf(nums));
list.add(Long.valueOf(newNums));
}
System.out.println(list);
System.out.println(list.size());
return Collections.max(list) + 1;
}
}

@ -3,6 +3,7 @@ package org.jeecg.modules.zystylemodule.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -19,6 +20,7 @@ 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.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
@ -48,8 +50,8 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Resource
private ZyClothsStyleMapper zyClothsStyleMapper;
/**
@ -106,12 +108,13 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
newSeMo.setModularName(modularById.getModularName());
newSeMo.setCreateTime(zyStyleModule.getCreateTime());
//服装类型
//服装类型 服装类型的id 不知道什么情况 传的是zy_cloths_style中的type_id
String typeId = zyStyleModule.getTypeId();
ZyClothsType typeById = zyClothsTypeService.getById(typeId);
if (typeById != null){
newSeMo.setTypeName(typeById.getTypeName());
System.out.println(typeId);
String typeNameByTypeId = zyClothsStyleMapper.getTypeNameByTypeId(typeId);
System.err.println(typeNameByTypeId);
if (typeNameByTypeId != null){
newSeMo.setTypeName(typeNameByTypeId);
} else {
newSeMo.setTypeName("typeName为空");
}

@ -36,19 +36,19 @@ public class ZyStyleModule implements Serializable {
@ApiModelProperty(value = "主键")
private String id;
/**类型id*/
@Excel(name = "类型id", width = 15, dictTable = "zy_cloths_type", dicText = "id", dicCode = "type_name")
@Excel(name = "服装类型id", width = 15, dictTable = "zy_cloths_type", dicText = "id", dicCode = "type_name")
@Dict(dictTable = "zy_cloths_type", dicText = "id", dicCode = "type_name")
@ApiModelProperty(value = "类型id")
@ApiModelProperty(value = "服装类型id")
private String typeId;
/**款式id*/
@Excel(name = "款式id", width = 15, dictTable = "zy_cloths_style", dicText = "id", dicCode = "style_names")
@Excel(name = "服装款式id", width = 15, dictTable = "zy_cloths_style", dicText = "id", dicCode = "style_names")
@Dict(dictTable = "zy_cloths_style", dicText = "id", dicCode = "style_names")
@ApiModelProperty(value = "款式id")
@ApiModelProperty(value = "服装款式id")
private String styleId;
/**模块id*/
@Excel(name = "模块id", width = 15, dictTable = "zy_cloths_modular ", dicText = "id", dicCode = "modular_name")
@Excel(name = "制衣模块id", width = 15, dictTable = "zy_cloths_modular ", dicText = "id", dicCode = "modular_name")
@Dict(dictTable = "zy_cloths_modular ", dicText = "id", dicCode = "modular_name")
@ApiModelProperty(value = "模块id")
@ApiModelProperty(value = "制衣模块id")
private String modularId;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

Loading…
Cancel
Save