From 150248b6ac0e01120d3c394f7ccad7dcc44c5f1e Mon Sep 17 00:00:00 2001 From: mors <3067699729@qq.com> Date: Thu, 1 Dec 2022 14:53:13 +0800 Subject: [PATCH] =?UTF-8?q?2022-12-1=20=E8=B5=B5=E7=8E=89=E7=91=9E=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=B8=E5=85=B3=E9=83=A8=E5=88=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/process/ZyClothsComponentList.vue | 24 +- .../process/ZyClothsModularCompentList.vue | 18 +- .../src/views/process/ZyClothsModularList.vue | 28 +- .../process/modules/ZyClothsComponentForm.vue | 21 +- .../modules/ZyClothsModularCompentForm.vue | 11 +- .../modules/ZyClothsStyleForm.vue | 12 +- .../controller/ZyClothsStyleController.java | 328 +++++++++--------- .../service/IZyClothsStyleService.java | 2 + .../impl/ZyClothsStyleServiceImpl.java | 13 + 9 files changed, 240 insertions(+), 217 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue index c68708a2..b4af96cb 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue @@ -17,7 +17,7 @@ 导入 - + 删除 @@ -68,7 +68,7 @@ - 查看 + 管理 @@ -151,11 +151,11 @@ dataIndex: 'componentType' }, - { - title:'描述', - align:"center", - dataIndex: 'description' - }, + // { + // title:'描述', + // align:"center", + // dataIndex: 'description' + // }, { title:'图片', align:"center", @@ -167,11 +167,11 @@ align:"center", dataIndex: 'modularId_dictText' }, - { - title:'制衣模块类型', - align:"center", - dataIndex: 'modularType_dictText' - }, + // { + // title:'制衣模块类型', + // align:"center", + // dataIndex: 'modularType_dictText' + // }, { title:'企业', align:"center", diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue index 6b4ed3d4..2022762e 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue @@ -2,7 +2,7 @@
新增 - 导出 - - 导入 - - - + + + + + + + + diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue index f24ea8f8..c086a43e 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue @@ -12,14 +12,14 @@
新增 - 导出 - - 导入 - + + + + + - + + @@ -77,10 +77,10 @@ - 查看 + 管理 - 查看 + 管理 @@ -167,11 +167,11 @@ export default { // align: "center", // dataIndex: 'modularType_dictText' // }, - { - title: '描述', - align: "center", - dataIndex: 'description' - }, + // { + // title: '描述', + // align: "center", + // dataIndex: 'description' + // }, { title: '衣服类型', align: "center", diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue index 5801a55d..7d61698f 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue @@ -3,6 +3,11 @@ + + + + + @@ -33,21 +38,17 @@ - - - - - + + + + + - - - - - + diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularCompentForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularCompentForm.vue index 9440c9e7..dcdb30ba 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularCompentForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularCompentForm.vue @@ -3,11 +3,7 @@ - - - - - + @@ -28,6 +24,11 @@ + + + + + diff --git a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue index 1bdbf18f..c3421754 100644 --- a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue +++ b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue @@ -3,6 +3,12 @@ + + + + + + - - - - - + diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java index 2d4e6cec..6b98cf87 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java @@ -10,6 +10,7 @@ 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; @@ -47,196 +48,199 @@ 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 + * @Date: 2022-09-04 * @Version: V1.0 */ -@Api(tags="服装款式表") +@Api(tags = "服装款式表") @RestController @RequestMapping("/zyclothsstyle/zyClothsStyle") @Slf4j public class ZyClothsStyleController extends JeecgController { - @Autowired - private IZyClothsStyleService zyClothsStyleService; - @Autowired - private IZyClothsComponentService zyClothsComponentService; - - @Autowired - private ISysDepartService sysDepartService; - @Autowired - private IZyClothsModularService zyClothsModularService; - @Autowired - private IZyClothsTypeService zyClothsTypeService; - - /** - * 分页列表查询 - * - * @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 queryWrapper = QueryGenerator.initQueryWrapper(zyClothsStyle, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = zyClothsStyleService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * - * @return - */ - @AutoLog(value = "服装款式表-查询所有") - @ApiOperation(value="服装款式表-查询所有", notes="服装款式表-查询所有") - @GetMapping(value = "/findAll") - public Result findAll() { - List list = zyClothsStyleService.list(); - - for(ZyClothsStyle zycl : list){ - String id = zycl.getEnterpriseId(); - if(id != null){ - SysDepart byId = sysDepartService.getById(id); - zycl.setEnterpriseId(byId.getDepartName()); - } - } - return Result.OK(list); - } - - /** - * 制衣部件 - * @return - */ - @AutoLog(value = "服装款式表-制衣部件查询所有") - @ApiOperation(value="服装款式表-制衣部件查询所有", notes="服装款式表-制衣部件查询所有") - @GetMapping(value = "/cloCfindAll") - public Result cloCfindAll() { - List list = zyClothsComponentService.list(); - - for(ZyClothsComponent zycl : list){ - - String id = zycl.getModularId(); - String enterpriseId = zycl.getEnterpriseId(); + @Autowired + private IZyClothsStyleService zyClothsStyleService; + @Autowired + private IZyClothsComponentService zyClothsComponentService; + + @Autowired + private ISysDepartService sysDepartService; + @Autowired + private IZyClothsModularService zyClothsModularService; + @Autowired + private IZyClothsTypeService zyClothsTypeService; + + /** + * 分页列表查询 + * + * @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 queryWrapper = QueryGenerator.initQueryWrapper(zyClothsStyle, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = zyClothsStyleService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * @return + */ + @AutoLog(value = "服装款式表-查询所有") + @ApiOperation(value = "服装款式表-查询所有", notes = "服装款式表-查询所有") + @GetMapping(value = "/findAll") + public Result findAll() { + List list = zyClothsStyleService.list(); + + for (ZyClothsStyle zycl : list) { + String id = zycl.getEnterpriseId(); + if (id != null) { + SysDepart byId = sysDepartService.getById(id); + zycl.setEnterpriseId(byId.getDepartName()); + } + } + return Result.OK(list); + } + + /** + * 制衣部件 + * + * @return + */ + @AutoLog(value = "服装款式表-制衣部件查询所有") + @ApiOperation(value = "服装款式表-制衣部件查询所有", notes = "服装款式表-制衣部件查询所有") + @GetMapping(value = "/cloCfindAll") + public Result cloCfindAll() { + List list = zyClothsComponentService.list(); + + for (ZyClothsComponent zycl : list) { + + String id = zycl.getModularId(); + String enterpriseId = zycl.getEnterpriseId(); /*if(id!=null || (enterpriseId !=null&&enterpriseId.isEmpty())){ ZyClothsType byId = zyClothsTypeService.getById(id); SysDepart byId1 = sysDepartService.getById(enterpriseId); zycl.setClothsTypeId(byId.getTypeName()); zycl.setEnterpriseId(byId1.getDepartName()); }*/ - if(id!=null){ - ZyClothsModular byId = zyClothsModularService.getById(id); - zycl.setModularId(byId.getModularName()); - } - } + if (id != null) { + ZyClothsModular byId = zyClothsModularService.getById(id); + zycl.setModularId(byId.getModularName()); + } + } /*if(id!=null || (enterpriseId !=null&&enterpriseId.isEmpty())){ ZyClothsType byId = zyClothsTypeService.getById(id); SysDepart byId1 = sysDepartService.getById(enterpriseId); zycl.setClothsTypeId(byId.getTypeName()); zycl.setEnterpriseId(byId1.getDepartName()); }*/ - return Result.OK(list); - - } - /** - * 添加 - * - * @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); - } + return Result.OK(list); + + } + + /** + * 添加 + * + * @param zyClothsStyle + * @return + */ + @AutoLog(value = "服装款式表-添加") + @ApiOperation(value = "服装款式表-添加", notes = "服装款式表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody ZyClothsStyle zyClothsStyle) { + //生成编号 类型编号(10位)+顺序号(8位)在service层处理 + zyClothsStyle.setNums(zyClothsStyleService.generateNumber(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 - */ + * 导出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 - */ + * 通过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); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java index 6637876f..ce924baa 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java @@ -12,4 +12,6 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle; */ public interface IZyClothsStyleService extends IService { + /**生成编号 类型编号(10位)+顺序号(8位)*/ + String generateNumber(ZyClothsStyle zyClothsStyle); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java index 35531bdd..4ae25cd1 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java @@ -17,4 +17,17 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service public class ZyClothsStyleServiceImpl extends ServiceImpl implements IZyClothsStyleService { + /** + * 生成编号 类型编号(10位)+顺序号(8位) + * + * @param zyClothsStyle + */ + @Override + public String generateNumber(ZyClothsStyle zyClothsStyle) { + //先拿到类型编号 + + //在来一个顺序号 + //生成编码 + return null; + } }