2022-09-07 1.1.2 款式管理 初版效果

zhc4dev
chen 2 years ago
parent 04bc70e841
commit c6ef0025b1
  1. 268
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  2. 214
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  3. 60
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleModal.vue
  4. 84
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleModal__Style#Drawer.vue
  5. 171
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  6. 122
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/entity/ZyClothsStyle.java
  7. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/mapper/ZyClothsStyleMapper.java
  8. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/mapper/xml/ZyClothsStyleMapper.xml
  9. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
  10. 20
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java

@ -0,0 +1,268 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<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="形式">
<j-dict-select-tag placeholder="请选择形式" dictCode="style_shape" v-model="queryParam.shape" ></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.styleNames" ></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.specification" ></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="企业名称">
<j-select-depart placeholder="请输入企业名称" v-model="queryParam.enterpriseId" />
</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>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</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-button type="primary" icon="import">导入</a-button>
</a-upload>-->
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action1" slot-scope="text, record">
<a @click="jumpPage(record)" >管理模块</a>
<a-divider type="vertical" />
<a @click="jumpPage(record)" >管理面料</a>
<a-divider type="vertical" />
<a @click="jumpPage(record)" >管理辅料</a>
<a-divider type="vertical" />
<a @click="jumpPage(record)" >管理型号</a>
<a-divider type="vertical" />
<a @click="jumpPage(record)" >管理工序</a>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<zy-cloths-style-modal ref="modalForm" @ok="modalFormOk"></zy-cloths-style-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyClothsStyleModal from './modules/ZyClothsStyleModal'
export default {
name: 'ZyClothsStyleList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyClothsStyleModal
},
data () {
return {
description: '服装款式表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'服装类型',
align:"center",
dataIndex: 'typeId'
},
{
title:'形式',
align:"center",
dataIndex: 'shape_dictText'
},
{
title:'编号',
align:"center",
dataIndex: 'nums'
},
{
title:'名称',
align:"center",
dataIndex: 'styleNames'
},
{
title:'规格',
align:"center",
dataIndex: 'specification'
},
{
title:'企业',
align:"center",
dataIndex: 'enterpriseId_dictText'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '管理模块',
dataIndex: 'action1',
align:"center",
fixed:"right",
width:110,
scopedSlots: { customRender: 'action1' }
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/zyclothsstyle/zyClothsStyle/list",
delete: "/zyclothsstyle/zyClothsStyle/delete",
deleteBatch: "/zyclothsstyle/zyClothsStyle/deleteBatch",
exportXlsUrl: "/zyclothsstyle/zyClothsStyle/exportXls",
importExcelUrl: "zyclothsstyle/zyClothsStyle/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
jumpPage(record)
{
this.$router.push({
path: '/xxx/xxx',
query: { //
'id': record.id,
}
});
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'popup',value:'typeId',text:'类型id', popup:{code:'zy_cloths_type',field:'type_name',orgFields:'type_name',destFields:'id'}})
fieldList.push({type:'string',value:'shape',text:'形式',dictCode:''})
fieldList.push({type:'string',value:'nums',text:'编号',dictCode:''})
fieldList.push({type:'string',value:'styleNames',text:'名称',dictCode:''})
fieldList.push({type:'string',value:'specification',text:'规格',dictCode:''})
fieldList.push({type:'string',value:'salesTerritory',text:'销售地区',dictCode:''})
fieldList.push({type:'string',value:'productOverview',text:'产品概述',dictCode:''})
fieldList.push({type:'string',value:'structure',text:'结构',dictCode:''})
fieldList.push({type:'string',value:'characteristic',text:'特征',dictCode:''})
fieldList.push({type:'string',value:'designSketch',text:'效果',dictCode:''})
fieldList.push({type:'string',value:'mainMap',text:'主图',dictCode:''})
fieldList.push({type:'string',value:'measuringMethod',text:'测量方法',dictCode:''})
fieldList.push({type:'string',value:'error',text:'误差',dictCode:''})
fieldList.push({type:'string',value:'quotaMaterials',text:'定额用料',dictCode:''})
fieldList.push({type:'string',value:'foldingPackaging',text:'折叠搭配及包装',dictCode:''})
fieldList.push({type:'string',value:'accLogos',text:'配件及标志',dictCode:''})
fieldList.push({type:'string',value:'sewingForm',text:'缝纫形式',dictCode:''})
fieldList.push({type:'sel_depart',value:'enterpriseId',text:'企业id'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,214 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-popup
v-model="model.typeId"
field="other"
org-fields="id,type_name"
dest-fields="popup,other"
code="cloths_type"
:multi="false"
@input="popupCallback"
/> {{ typeId }}
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="形式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shape">
<j-dict-select-tag type="radio" v-model="model.shape" dictCode="style_shape" placeholder="请输入形式" ></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleNames">
<a-input v-model="model.styleNames" placeholder="请输入名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specification">
<a-input v-model="model.specification" placeholder="请输入规格" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="销售地区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="salesTerritory">
<a-textarea v-model="model.salesTerritory" rows="4" placeholder="请输入销售地区" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品概述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productOverview">
<a-textarea v-model="model.productOverview" rows="4" placeholder="请输入产品概述" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="结构" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="structure">
<a-input v-model="model.structure" placeholder="请输入结构" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="特征" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="characteristic">
<a-input v-model="model.characteristic" placeholder="请输入特征" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="效果" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="designSketch">
<j-image-upload isMultiple v-model="model.designSketch" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="主图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mainMap">
<j-image-upload isMultiple v-model="model.mainMap" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="测量方法" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measuringMethod">
<a-input v-model="model.measuringMethod" placeholder="请输入测量方法" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="误差" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="error">
<a-input v-model="model.error" placeholder="请输入误差" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="定额用料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quotaMaterials">
<a-input v-model="model.quotaMaterials" placeholder="请输入定额用料" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging">
<a-textarea v-model="model.foldingPackaging" rows="4" placeholder="请输入折叠搭配及包装" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="配件及标志" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accLogos">
<a-textarea v-model="model.accLogos" rows="4" placeholder="请输入配件及标志" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="缝纫形式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sewingForm">
<a-textarea v-model="model.sewingForm" rows="4" placeholder="请输入缝纫形式" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" multi />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ZyClothsStyleForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
typeId : "",
model:{
shape:1
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
typeId: [
{ required: true, message: '请选择服装类型!'},
],
nums: [
{ required: true, message: '请输入编号!'},
],
styleNames: [
{ required: true, message: '请输入名称!'},
],
positionid: [
{ required: true, message: '请选择组委会职务!'},
],
},
url: {
add: "/zyclothsstyle/zyClothsStyle/add",
edit: "/zyclothsstyle/zyClothsStyle/edit",
queryById: "/zyclothsstyle/zyClothsStyle/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
popupCallback(value,row){
this.model = Object.assign(this.model, row);
},
}
}
</script>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-cloths-style-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-cloths-style-form>
</j-modal>
</template>
<script>
import ZyClothsStyleForm from './ZyClothsStyleForm'
export default {
name: 'ZyClothsStyleModal',
components: {
ZyClothsStyleForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<zy-cloths-style-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-cloths-style-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import ZyClothsStyleForm from './ZyClothsStyleForm'
export default {
name: 'ZyClothsStyleModal',
components: {
ZyClothsStyleForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,171 @@
package org.jeecg.modules.zyclothsstyle.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
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.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 服装款式表
* @Author: jeecg-boot
* @Date: 2022-09-04
* @Version: V1.0
*/
@Api(tags="服装款式表")
@RestController
@RequestMapping("/zyclothsstyle/zyClothsStyle")
@Slf4j
public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyClothsStyleService> {
@Autowired
private IZyClothsStyleService zyClothsStyleService;
/**
* 分页列表查询
*
* @param zyClothsStyle
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "服装款式表-分页列表查询")
@ApiOperation(value="服装款式表-分页列表查询", notes="服装款式表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyClothsStyle zyClothsStyle,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyClothsStyle> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsStyle, req.getParameterMap());
Page<ZyClothsStyle> page = new Page<ZyClothsStyle>(pageNo, pageSize);
IPage<ZyClothsStyle> pageList = zyClothsStyleService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyClothsStyle
* @return
*/
@AutoLog(value = "服装款式表-添加")
@ApiOperation(value="服装款式表-添加", notes="服装款式表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsStyle zyClothsStyle) {
zyClothsStyleService.save(zyClothsStyle);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyClothsStyle
* @return
*/
@AutoLog(value = "服装款式表-编辑")
@ApiOperation(value="服装款式表-编辑", notes="服装款式表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyClothsStyle zyClothsStyle) {
zyClothsStyleService.updateById(zyClothsStyle);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "服装款式表-通过id删除")
@ApiOperation(value="服装款式表-通过id删除", notes="服装款式表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
zyClothsStyleService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "服装款式表-批量删除")
@ApiOperation(value="服装款式表-批量删除", notes="服装款式表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyClothsStyleService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "服装款式表-通过id查询")
@ApiOperation(value="服装款式表-通过id查询", notes="服装款式表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(id);
if(zyClothsStyle==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyClothsStyle);
}
/**
* 导出excel
*
* @param request
* @param zyClothsStyle
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyClothsStyle zyClothsStyle) {
return super.exportXls(request, zyClothsStyle, ZyClothsStyle.class, "服装款式表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyClothsStyle.class);
}
}

@ -0,0 +1,122 @@
package org.jeecg.modules.zyclothsstyle.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 服装款式表
* @Author: jeecg-boot
* @Date: 2022-09-04
* @Version: V1.0
*/
@Data
@TableName("zy_cloths_style")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="zy_cloths_style对象", description="服装款式表")
public class ZyClothsStyle implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private String id;
/**类型id*/
@Excel(name = "类型id", width = 15)
@ApiModelProperty(value = "类型id")
private String typeId;
/**形式*/
@Excel(name = "形式", width = 15)
@Dict(dicCode = "style_shape")
@ApiModelProperty(value = "形式")
private String shape;
/**编号*/
@Excel(name = "编号", width = 15)
@ApiModelProperty(value = "编号")
private String nums;
/**名称*/
@Excel(name = "名称", width = 15)
@ApiModelProperty(value = "名称")
private String styleNames;
/**规格*/
@Excel(name = "规格", width = 15)
@ApiModelProperty(value = "规格")
private String specification;
/**销售地区*/
@Excel(name = "销售地区", width = 15)
@ApiModelProperty(value = "销售地区")
private String salesTerritory;
/**产品概述*/
@Excel(name = "产品概述", width = 15)
@ApiModelProperty(value = "产品概述")
private String productOverview;
/**结构*/
@Excel(name = "结构", width = 15)
@ApiModelProperty(value = "结构")
private String structure;
/**特征*/
@Excel(name = "特征", width = 15)
@ApiModelProperty(value = "特征")
private String characteristic;
/**效果*/
@Excel(name = "效果", width = 15)
@ApiModelProperty(value = "效果")
private String designSketch;
/**主图*/
@Excel(name = "主图", width = 15)
@ApiModelProperty(value = "主图")
private String mainMap;
/**测量方法*/
@Excel(name = "测量方法", width = 15)
@ApiModelProperty(value = "测量方法")
private String measuringMethod;
/**误差*/
@Excel(name = "误差", width = 15)
@ApiModelProperty(value = "误差")
private String error;
/**定额用料*/
@Excel(name = "定额用料", width = 15)
@ApiModelProperty(value = "定额用料")
private String quotaMaterials;
/**折叠搭配及包装*/
@Excel(name = "折叠搭配及包装", width = 15)
@ApiModelProperty(value = "折叠搭配及包装")
private String foldingPackaging;
/**配件及标志*/
@Excel(name = "配件及标志", width = 15)
@ApiModelProperty(value = "配件及标志")
private String accLogos;
/**缝纫形式*/
@Excel(name = "缝纫形式", width = 15)
@ApiModelProperty(value = "缝纫形式")
private String sewingForm;
/**企业id*/
@Excel(name = "企业id", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "企业id")
private String enterpriseId;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**更新时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "更新时间")
private Date updateTime;
}

@ -0,0 +1,18 @@
package org.jeecg.modules.zyclothsstyle.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
/**
* @Description: 服装款式表
* @Author: jeecg-boot
* @Date: 2022-09-04
* @Version: V1.0
*/
public interface ZyClothsStyleMapper extends BaseMapper<ZyClothsStyle> {
}

@ -0,0 +1,5 @@
<?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.zyclothsstyle.mapper.ZyClothsStyleMapper">
</mapper>

@ -0,0 +1,15 @@
package org.jeecg.modules.zyclothsstyle.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
/**
* @Description: 服装款式表
* @Author: jeecg-boot
* @Date: 2022-09-04
* @Version: V1.0
*/
public interface IZyClothsStyleService extends IService<ZyClothsStyle> {
}

@ -0,0 +1,20 @@
package org.jeecg.modules.zyclothsstyle.service.impl;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 服装款式表
* @Author: jeecg-boot
* @Date: 2022-09-04
* @Version: V1.0
*/
@Service
public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, ZyClothsStyle> implements IZyClothsStyleService {
}
Loading…
Cancel
Save