diff --git a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js index a964c027..1f1616d3 100644 --- a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js +++ b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js @@ -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 = "新增"; diff --git a/ant-design-vue-jeecg/src/views/personel/shift/ZyShiftList.vue b/ant-design-vue-jeecg/src/views/personel/shift/ZyShiftList.vue index c6c67083..4fc43e49 100644 --- a/ant-design-vue-jeecg/src/views/personel/shift/ZyShiftList.vue +++ b/ant-design-vue-jeecg/src/views/personel/shift/ZyShiftList.vue @@ -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:[], diff --git a/ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue b/ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue index aee5e989..607aa159 100644 --- a/ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue +++ b/ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue @@ -99,7 +99,7 @@ - 管理模块 + 管理模块 管理面料 @@ -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', diff --git a/ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue b/ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue index ab5c0db0..ca6220b1 100644 --- a/ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue +++ b/ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue @@ -35,7 +35,7 @@
- 新增 + 新增 导出 + + + @@ -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; }) } - + }) }, } diff --git a/ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleModal.vue b/ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleModal.vue index 2495da71..2d94815b 100644 --- a/ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleModal.vue +++ b/ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleModal.vue @@ -29,10 +29,10 @@ } }, methods: { - add () { + add (id) { this.visible=true this.$nextTick(()=>{ - this.$refs.realForm.add(); + this.$refs.realForm.add(id); }) }, edit (record) { diff --git a/jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/entity/ZyShift.java b/jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/entity/ZyShift.java index a8bf8aab..ae785280 100644 --- a/jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/entity/ZyShift.java +++ b/jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/entity/ZyShift.java @@ -7,6 +7,11 @@ import lombok.Data; import java.util.Date; +/** + * 这是人员管理子系统下面的班组管理下面的班次管理 + * 对应数据库表为 zy_shift + */ + @Data public class ZyShift { diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/OrderNumberRule.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/OrderNumberRule.java index 24b2f1b5..8517342a 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/OrderNumberRule.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/OrderNumberRule.java @@ -32,5 +32,4 @@ public class OrderNumberRule implements IFillRuleHandler { } return value; } - } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java index bfd4998a..8c9f6b6a 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java @@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; public class ZyClothSampleController extends JeecgController { @Autowired private IZyClothSampleService zyClothSampleService; - + /** * 分页列表查询 * @@ -71,7 +71,7 @@ public class ZyClothSampleController extends JeecgController pageList = zyClothSampleService.page(page, queryWrapper); return Result.OK(pageList); } - + /** * 添加 * @@ -90,7 +90,7 @@ public class ZyClothSampleController extends JeecgController { + } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java index 1f7cf642..ae01f4df 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java @@ -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 { - @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 lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(ZyStyleModule::getStyleId,id); + Page page = new Page<>(pageNo,pageSize); + Page pageList = zyStyleModuleService.page(page, lambdaQueryWrapper); + System.out.println(pageList.getRecords()); + return Result.OK(pageList);*/ + + List listNewStyleModules = new ArrayList<>(); + QueryWrapper 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 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 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> queryPageList1(ZyStyleModule zyStyleModule, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap()); + Page page = new Page(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 listNewStyleModules = new ArrayList<>(); - QueryWrapper 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 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 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> queryPageList1(ZyStyleModule zyStyleModule, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { + IPage 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 add(@RequestBody ZyStyleModule zyStyleModule) { + //根据styleId到原表 zy cloths style直接把名字拿过来,再根据名字到另一个表 zy cloths type 中把id拿过来 + String styleId = zyStyleModule.getStyleId(); - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); + ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(styleId); + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(ZyClothsType::getTypeName,zyClothsStyle.getTypeId()); + ZyClothsType zyClothsType = zyClothsTypeService.getOne(lambdaQueryWrapper); + zyStyleModule.setTypeId(zyClothsType.getId()); - IPage 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 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 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 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 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 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 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 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 importExcel(HttpServletRequest request, HttpServletResponse response) { diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/entity/NewStyleModule.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/entity/NewStyleModule.java index bb3b35ff..632eaed2 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/entity/NewStyleModule.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/entity/NewStyleModule.java @@ -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; } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java index a08233c1..e9d616b1 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java @@ -15,4 +15,5 @@ import org.jeecg.modules.zystylemodule.entity.ZyStyleModule; */ public interface ZyStyleModuleMapper extends BaseMapper { + List handWritingList(String id); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/xml/ZyStyleModuleMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/xml/ZyStyleModuleMapper.xml index 2fc94d4d..2fc42d9b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/xml/ZyStyleModuleMapper.xml +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/xml/ZyStyleModuleMapper.xml @@ -2,4 +2,8 @@ - \ No newline at end of file + +