2022-11-05 赵玉瑞 修改款式模块管理

zhc4dev
赵玉瑞 2 years ago
parent 096a8f739c
commit 347f8afb10
  1. 7
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 4
      ant-design-vue-jeecg/src/views/personel/shift/ZyShiftList.vue
  3. 31
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  4. 32
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  5. 31
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleForm.vue
  6. 4
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleModal.vue
  7. 5
      jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/entity/ZyShift.java
  8. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/OrderNumberRule.java
  9. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java
  10. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java
  11. 393
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  12. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/entity/NewStyleModule.java
  13. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java
  14. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/xml/ZyStyleModuleMapper.xml

@ -93,7 +93,7 @@ export const JeecgListMixin = {
}else{
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
}
if(res.code===510){
this.$message.warning(res.message)
@ -266,6 +266,11 @@ export const JeecgListMixin = {
this.$refs.modalForm.title = "新增";
this.$refs.modalForm.disableSubmit = false;
},
styleModuleHandleAdd: function (id) {
this.$refs.modalForm.add(id);
this.$refs.modalForm.title = "新增";
this.$refs.modalForm.disableSubmit = false;
},
handleAdd1: function (id) {
this.$refs.modalForm.add1(id);
this.$refs.modalForm.title = "新增";

@ -116,7 +116,7 @@
},
data () {
return {
description: 'zy_shift管理页面',
description: '班次管理 zy_shift管理页面',
//
columns: [
{
@ -170,7 +170,7 @@
deleteBatch: "/zyPerson/zyShift/deleteBatch",
exportXlsUrl: "/zyPerson/zyShift/exportXls",
importExcelUrl: "/zyPerson/zyShift/importExcel",
},
dictOptions:{},
superFieldList:[],

@ -99,7 +99,7 @@
</template>
<span slot="action1" slot-scope="text, record">
<a @click="jumpPage1(record)" >管理模块</a>
<a @click="jumpPage1(record)" >管理模块</a>
<a-divider type="vertical" />
<a @click="jumpPage2(record)" >管理面料</a>
<a-divider type="vertical" />
@ -155,30 +155,32 @@
}
},
{
title:'服装类型',
title:'款式名称',
align:"center",
dataIndex: 'typeId'
dataIndex: 'styleNames'
},
{
title:'形式',
title:'编号',
align:"center",
dataIndex: 'shape_dictText'
dataIndex: 'nums'
},
{
title:'编号',
title:'规格',
align:"center",
dataIndex: 'nums'
dataIndex: 'specification'
},
{
title:'名称',
title:'服装类型',
align:"center",
dataIndex: 'styleNames'
dataIndex: 'typeId'
},
{
title:'规格',
title:'形式',
align:"center",
dataIndex: 'specification'
dataIndex: 'shape_dictText'
},
{
title:'企业',
align:"center",
@ -212,7 +214,7 @@
deleteBatch: "/zyclothsstyle/zyClothsStyle/deleteBatch",
exportXlsUrl: "/zyclothsstyle/zyClothsStyle/exportXls",
importExcelUrl: "zyclothsstyle/zyClothsStyle/importExcel",
},
dictOptions:{},
superFieldList:[],
@ -229,14 +231,17 @@
methods: {
initDictConfig(){
},
//
jumpPage1(record) {
this.$router.push({
path: '/src/views/zystylemodule/ZyStyleModuleList',
query: { //
'id': record.id,
//'typeId': record.typeId,
}
});
},
//
jumpPage2(record) {
this.$router.push({
path: '/src/views/zystylefabric/ZyStyleFabricList',
@ -245,6 +250,7 @@
}
});
},
//
jumpPage4(record) {
this.$router.push({
path: '/src/views/zystylemodel/ZyStyleModelList',
@ -253,6 +259,7 @@
}
});
},
//
jumpPage5(record) {
this.$router.push({
path: '/process/ZyProcessList',

@ -35,7 +35,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button @click="styleModuleHandleAdd(id)" 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>
@ -147,9 +147,9 @@ export default {
}
},
{
title: '服装类型',
title: '款式名称',
align: "center",
dataIndex: 'typeName'
dataIndex: 'styleNames'
},
{
title: '款式编号',
@ -157,9 +157,14 @@ export default {
dataIndex: 'styleNums'
},
{
title: '款式名称',
title: '服装类型',
align: "center",
dataIndex: 'styleNames'
dataIndex: 'typeName'
},
{
title: '模块名称',
align: "center",
dataIndex: 'modularName'
},
{
title: '模块编号',
@ -167,10 +172,11 @@ export default {
dataIndex: 'modularNums'
},
{
title: '模块名称',
title: '创建时间',
align: "center",
dataIndex: 'modularName'
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
@ -209,15 +215,17 @@ export default {
},
//
loadParameter() {
if (this.loadRouteType == false) {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
console.log(this.id)
//this.typeId = this.$route.query.typeId;
console.log('********id对应的为款式style_id: '+this.id);
console.log('******typeId此为类型typeId: '+this.typeId);
this.loadRouteType = true;
}
},
loadData(arg) {
if(!this.url.list){
this.$message.error("请设置url.list属性!")
this.$message.error("请设置url.list属性!");
return
}
// 1
@ -256,7 +264,8 @@ export default {
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.id=this.id;
//param.id=this.id;
param.id=this.$route.query.id;
return filterObj(param);
},
getSuperFieldList() {
@ -264,6 +273,7 @@ export default {
fieldList.push({type: 'string', value: 'typeId', text: '类型id', dictCode: "zy_cloths_type,id,type_name"})
fieldList.push({type: 'string', value: 'styleId', text: '款式id', dictCode: "zy_cloths_style,id,style_names"})
fieldList.push({type: 'string', value: 'modularId', text: '模块id', dictCode: "zy_cloths_modular ,id,modular_name"})
fieldList.push({type: 'string', value: 'createTime', text: '创建时间'})
this.superFieldList = fieldList
}
}

@ -3,16 +3,18 @@
<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-dict-select-tag type="list" v-model="model.typeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<!-- <a-col :span="24">
<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="请选择款式" />
</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="请选择类型" />
</a-form-model-item>
</a-col>-->
<a-col :span="24">
<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="请选择模块" />
@ -44,6 +46,8 @@
data () {
return {
model:{
typeId: '',
styleId: '',
},
labelCol: {
xs: { span: 24 },
@ -55,9 +59,9 @@
},
confirmLoading: false,
validatorRules: {
typeId: [
/*typeId: [
{ required: true, message: '请输入类型id!'},
],
],*/
styleId: [
{ required: true, message: '请输入款式id!'},
],
@ -82,8 +86,11 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
add (id) {
this.edit(this.modelDefault);
//this.model.typeId = typeId;
this.model.styleId = id;
},
edit (record) {
this.model = Object.assign({}, record);
@ -115,7 +122,7 @@
that.confirmLoading = false;
})
}
})
},
}

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

@ -7,6 +7,11 @@ import lombok.Data;
import java.util.Date;
/**
* 这是人员管理子系统下面的班组管理下面的班次管理
* 对应数据库表为 zy_shift
*/
@Data
public class ZyShift {

@ -32,5 +32,4 @@ public class OrderNumberRule implements IFillRuleHandler {
}
return value;
}
}

@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyClothSampleController extends JeecgController<ZyClothSample, IZyClothSampleService> {
@Autowired
private IZyClothSampleService zyClothSampleService;
/**
* 分页列表查询
*
@ -71,7 +71,7 @@ public class ZyClothSampleController extends JeecgController<ZyClothSample, IZyC
IPage<ZyClothSample> pageList = zyClothSampleService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -90,7 +90,7 @@ public class ZyClothSampleController extends JeecgController<ZyClothSample, IZyC
zyClothSampleService.save(zyClothSample);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -116,9 +116,9 @@ public class ZyClothSampleController extends JeecgController<ZyClothSample, IZyC
zyClothSampleService.updateById(zyClothSample);
return Result.OK("编辑成功");
}
/**
* 通过id删除
* 通过id删除
*
* @param id
* @return
@ -130,9 +130,9 @@ public class ZyClothSampleController extends JeecgController<ZyClothSample, IZyC
zyClothSampleService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
* 批量删除
*
* @param ids
* @return
@ -144,7 +144,7 @@ public class ZyClothSampleController extends JeecgController<ZyClothSample, IZyC
this.zyClothSampleService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -14,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface ZyClothSampleMapper extends BaseMapper<ZyClothSample> {
}

@ -8,8 +8,11 @@ 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;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
@ -28,6 +31,7 @@ import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper;
import org.jeecg.modules.zystylemodule.service.INewZyStyleModuleService;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
@ -46,194 +50,221 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
/**
* @Description: 款式模块表
* @Author: jeecg-boot
* @Date: 2022-09-08
* @Date: 2022-09-08
* @Version: V1.0
*/
@Api(tags="款式模块表")
@Api(tags = "款式模块表")
@RestController
@RequestMapping("/zystylemodule/zyStyleModule")
@Slf4j
public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyStyleModuleService> {
@Autowired
private IZyStyleModuleService zyStyleModuleService;
@Autowired
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Autowired
private IZyStyleModuleService zyStyleModuleService;
@Autowired
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
/**
* 分页列表查询
*
* @param zyStyleModule2
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "款式模块表-分页列表查询")
@ApiOperation(value = "款式模块表-分页列表查询", notes = "款式模块表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyStyleModule zyStyleModule2, String id,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
/*LambdaQueryWrapper<ZyStyleModule> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ZyStyleModule::getStyleId,id);
Page<NewStyleModule> page = new Page<>(pageNo,pageSize);
Page<NewStyleModule> pageList = zyStyleModuleService.page(page, lambdaQueryWrapper);
System.out.println(pageList.getRecords());
return Result.OK(pageList);*/
List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
if (id != null) {
queryWrapper.eq("style_id", id);
}
if (zyStyleModule2.getStyleId() != null || zyStyleModule2.getModularId() != null || zyStyleModule2.getTypeId() != null) {
if (zyStyleModule2.getStyleId() != null) {
queryWrapper.eq("style_id", zyStyleModule2.getStyleId());
}
if (zyStyleModule2.getModularId() != null) {
queryWrapper.eq("modular_id", zyStyleModule2.getModularId());
}
if (zyStyleModule2.getTypeId() != null) {
queryWrapper.eq("type_id", zyStyleModule2.getTypeId());
}
}
List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper);
//System.out.println(list);
for (ZyStyleModule zyStyleModule : list) {
NewStyleModule newSeMo = new NewStyleModule();
//编辑回显
newSeMo.setId(zyStyleModule.getId());
newSeMo.setTypeId(zyStyleModule.getTypeId());
newSeMo.setStyleId(zyStyleModule.getStyleId());
newSeMo.setModularId(zyStyleModule.getModularId());
//款式编号和名称
String styleId = zyStyleModule.getStyleId();
ZyClothsStyle styleById = zyClothsStyleService.getById(styleId);
newSeMo.setStyleNums(styleById.getNums());
newSeMo.setStyleNames(styleById.getStyleNames());
//模块编号和名称
String modularId = zyStyleModule.getModularId();
ZyClothsModular modularById = zyClothsModularService.getById(modularId);
newSeMo.setModularNums(modularById.getNums());
newSeMo.setModularName(modularById.getModularName());
//服装类型
String typeId = zyStyleModule.getTypeId();
ZyClothsType typeById = zyClothsTypeService.getById(typeId);
newSeMo.setCreateTime(zyStyleModule.getCreateTime());
if (typeById != null){
newSeMo.setTypeName(typeById.getTypeName());
} else {
newSeMo.setTypeName("typeName为空");
}
listNewStyleModules.add(newSeMo);
}
IPage<NewStyleModule> pageList = new Page<>(pageNo, pageSize, listNewStyleModules.size());
pageList.setRecords(listNewStyleModules);
System.out.println(pageList.getRecords());
return Result.OK(pageList);
}
/**
* 分页列表查询
*
* @param zyStyleModule
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "款式模块表-分页列表查询")
@ApiOperation(value = "款式模块表-分页列表查询", notes = "款式模块表-分页列表查询")
@GetMapping(value = "/list1")
public Result<IPage<ZyStyleModule>> queryPageList1(ZyStyleModule zyStyleModule,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyStyleModule> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap());
Page<ZyStyleModule> page = new Page<ZyStyleModule>(pageNo, pageSize);
/**
* 分页列表查询
*
* @param zyStyleModule2
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "款式模块表-分页列表查询")
@ApiOperation(value="款式模块表-分页列表查询", notes="款式模块表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyStyleModule zyStyleModule2,String id,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
if(id!=null){
queryWrapper.eq("style_id",id);
}
if(zyStyleModule2.getStyleId()!=null || zyStyleModule2.getModularId()!=null || zyStyleModule2.getTypeId()!=null){
if(zyStyleModule2.getStyleId()!=null){
queryWrapper.eq("style_id",zyStyleModule2.getStyleId());
}
if(zyStyleModule2.getModularId()!=null){
queryWrapper.eq("modular_id",zyStyleModule2.getModularId());
}
if(zyStyleModule2.getTypeId()!=null){
queryWrapper.eq("type_id",zyStyleModule2.getTypeId());
}
}
List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper);
for (ZyStyleModule zyStyleModule : list){
NewStyleModule newSeMo = new NewStyleModule();
//编辑回显
newSeMo.setId(zyStyleModule.getId());
newSeMo.setTypeId(zyStyleModule.getTypeId());
newSeMo.setStyleId(zyStyleModule.getStyleId());
newSeMo.setModularId(zyStyleModule.getModularId());
//款式编号和名称
String styleId = zyStyleModule.getStyleId();
ZyClothsStyle styleById = zyClothsStyleService.getById(styleId);
newSeMo.setStyleNums(styleById.getNums());
newSeMo.setStyleNames(styleById.getStyleNames());
//模块编号和名称
String modularId = zyStyleModule.getModularId();
ZyClothsModular modularById = zyClothsModularService.getById(modularId);
newSeMo.setModularNums(modularById.getNums());
newSeMo.setModularName(modularById.getModularName());
//服装类型
String typeId = zyStyleModule.getTypeId();
ZyClothsType typeById = zyClothsTypeService.getById(typeId);
newSeMo.setTypeName(typeById.getTypeName());
listNewStyleModules.add(newSeMo);
}
IPage<NewStyleModule> pageList = new Page<>(pageNo, pageSize, list.size());
pageList.setRecords(listNewStyleModules);
return Result.OK(pageList);
}
/**
* 分页列表查询
*
* @param zyStyleModule
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "款式模块表-分页列表查询")
@ApiOperation(value="款式模块表-分页列表查询", notes="款式模块表-分页列表查询")
@GetMapping(value = "/list1")
public Result<IPage<ZyStyleModule>> queryPageList1(ZyStyleModule zyStyleModule,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper);
//System.out.println(zyStyleModule);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyStyleModule
* @return
*/
@AutoLog(value = "款式模块表-添加")
@ApiOperation(value = "款式模块表-添加", notes = "款式模块表-添加")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) {
//根据styleId到原表 zy cloths style直接把名字拿过来,再根据名字到另一个表 zy cloths type 中把id拿过来
String styleId = zyStyleModule.getStyleId();
QueryWrapper<ZyStyleModule> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap());
Page<ZyStyleModule> page = new Page<ZyStyleModule>(pageNo, pageSize);
ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(styleId);
LambdaQueryWrapper<ZyClothsType> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ZyClothsType::getTypeName,zyClothsStyle.getTypeId());
ZyClothsType zyClothsType = zyClothsTypeService.getOne(lambdaQueryWrapper);
zyStyleModule.setTypeId(zyClothsType.getId());
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper);
System.out.println(zyStyleModule);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyStyleModule
* @return
*/
@AutoLog(value = "款式模块表-添加")
@ApiOperation(value="款式模块表-添加", notes="款式模块表-添加")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) {
zyStyleModuleService.save(zyStyleModule);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyStyleModule
* @return
*/
@AutoLog(value = "款式模块表-编辑")
@ApiOperation(value="款式模块表-编辑", notes="款式模块表-编辑")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ZyStyleModule zyStyleModule) {
zyStyleModuleService.updateById(zyStyleModule);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "款式模块表-通过id删除")
@ApiOperation(value="款式模块表-通过id删除", notes="款式模块表-通过id删除")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
zyStyleModuleService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "款式模块表-批量删除")
@ApiOperation(value="款式模块表-批量删除", notes="款式模块表-批量删除")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyStyleModuleService.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) {
ZyStyleModule zyStyleModule = zyStyleModuleService.getById(id);
if(zyStyleModule==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyStyleModule);
}
zyStyleModuleService.save(zyStyleModule);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyStyleModule
* @return
*/
@AutoLog(value = "款式模块表-编辑")
@ApiOperation(value = "款式模块表-编辑", notes = "款式模块表-编辑")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody ZyStyleModule zyStyleModule) {
zyStyleModuleService.updateById(zyStyleModule);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "款式模块表-通过id删除")
@ApiOperation(value = "款式模块表-通过id删除", notes = "款式模块表-通过id删除")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
zyStyleModuleService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "款式模块表-批量删除")
@ApiOperation(value = "款式模块表-批量删除", notes = "款式模块表-批量删除")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.zyStyleModuleService.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) {
ZyStyleModule zyStyleModule = zyStyleModuleService.getById(id);
if (zyStyleModule == null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyStyleModule);
}
/**
* 导出excel
*
* @param request
* @param zyStyleModule
*/
* 导出excel
*
* @param request
* @param zyStyleModule
*/
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyStyleModule zyStyleModule) {
@ -241,12 +272,12 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("zy_style_module:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {

@ -2,11 +2,19 @@ package org.jeecg.modules.zystylemodule.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 增强ZyStyleModule
* 原有的属性太少
*/
@Data
public class NewStyleModule {
/**主键*/
@ -48,4 +56,9 @@ public class NewStyleModule {
@Excel(name = "模块名称", width = 15)
@ApiModelProperty(value = "模块名称")
private java.lang.String modularName;
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
}

@ -15,4 +15,5 @@ import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
*/
public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> {
List<ZyStyleModule> handWritingList(String id);
}

@ -2,4 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper">
</mapper>
<select id="handWritingList" resultType="org.jeecg.modules.zystylemodule.entity.ZyStyleModule" parameterType="string">
select * from zy_style_module
where style_id = #{id}
</select>
</mapper>

Loading…
Cancel
Save