diff --git a/ant-design-vue-jeecg/src/views/team/StationList.vue b/ant-design-vue-jeecg/src/views/team/StationList.vue new file mode 100644 index 00000000..adbea45b --- /dev/null +++ b/ant-design-vue-jeecg/src/views/team/StationList.vue @@ -0,0 +1,207 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/StationMachineList.vue b/ant-design-vue-jeecg/src/views/team/StationMachineList.vue new file mode 100644 index 00000000..edfa8b5f --- /dev/null +++ b/ant-design-vue-jeecg/src/views/team/StationMachineList.vue @@ -0,0 +1,175 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/StationToolList.vue b/ant-design-vue-jeecg/src/views/team/StationToolList.vue new file mode 100644 index 00000000..81b7e095 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/team/StationToolList.vue @@ -0,0 +1,173 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue b/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue new file mode 100644 index 00000000..c7bb1ed8 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue @@ -0,0 +1,114 @@ + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal__Style#Drawer.vue new file mode 100644 index 00000000..3205fdf6 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal__Style#Drawer.vue @@ -0,0 +1,134 @@ + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/modules/StationModal.vue b/ant-design-vue-jeecg/src/views/team/modules/StationModal.vue new file mode 100644 index 00000000..046e9d00 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/team/modules/StationModal.vue @@ -0,0 +1,134 @@ + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/modules/StationModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/team/modules/StationModal__Style#Drawer.vue new file mode 100644 index 00000000..9e644954 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/team/modules/StationModal__Style#Drawer.vue @@ -0,0 +1,140 @@ + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/modules/StationToolModal.vue b/ant-design-vue-jeecg/src/views/team/modules/StationToolModal.vue new file mode 100644 index 00000000..8cb42d77 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/team/modules/StationToolModal.vue @@ -0,0 +1,114 @@ + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/modules/StationToolModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/team/modules/StationToolModal__Style#Drawer.vue new file mode 100644 index 00000000..388180d8 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/team/modules/StationToolModal__Style#Drawer.vue @@ -0,0 +1,134 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/controller/StationController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/controller/StationController.java index 69e1b1c3..8064d114 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/controller/StationController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/controller/StationController.java @@ -43,13 +43,13 @@ import org.jeecg.common.aspect.annotation.AutoLog; * @Version: V1.0 */ @Api(tags="工位表") -@RestController +@RestController(value = "StationControllerOld") @RequestMapping("/station/station") @Slf4j public class StationController extends JeecgController { @Autowired private IStationService stationService; - + /** * 分页列表查询 * @@ -71,7 +71,7 @@ public class StationController extends JeecgController IPage pageList = stationService.page(page, queryWrapper); return Result.ok(pageList); } - + /** * 添加 * @@ -85,7 +85,7 @@ public class StationController extends JeecgController stationService.save(station); return Result.ok("添加成功!"); } - + /** * 编辑 * @@ -99,7 +99,7 @@ public class StationController extends JeecgController stationService.updateById(station); return Result.ok("编辑成功!"); } - + /** * 通过id删除 * @@ -113,7 +113,7 @@ public class StationController extends JeecgController stationService.removeById(id); return Result.ok("删除成功!"); } - + /** * 批量删除 * @@ -127,7 +127,7 @@ public class StationController extends JeecgController this.stationService.removeByIds(Arrays.asList(ids.split(","))); return Result.ok("批量删除成功!"); } - + /** * 通过id查询 * diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/entity/Station.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/entity/Station.java index d71f3c97..e91e034b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/entity/Station.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/entity/Station.java @@ -24,7 +24,20 @@ import lombok.experimental.Accessors; * @Version: V1.0 */ @Data -@TableName("station") +//@TableName("station") +/** + * station 工位表 station|工位表【 + * id,内部编号,varchar,32,PK; + * depart_id,部门id,varchar,32,FK,部门表,最下级的生产部门,即车间; + * station_num,工位序号,int; + * station_name,工位名称,varchar,32; + * description,描述,varchar,500; + * create_by,创建人,varchar,32; + * create_time,创建时间,datetime; + * 】 + *根据软件平台V4.0需求重构,将station重命名为statoin_old + */ +@TableName("station_old") @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) @ApiModel(value="station对象", description="工位表") diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/mapper/StationMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/mapper/StationMapper.java index 59ef2e1c..93b2067c 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/mapper/StationMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/mapper/StationMapper.java @@ -1,10 +1,8 @@ package org.jeecg.modules.station.mapper; -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import org.jeecg.modules.station.entity.Station; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.station.entity.Station; +import org.springframework.stereotype.Service; /** * @Description: 工位表 @@ -12,6 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @Date: 2021-11-12 * @Version: V1.0 */ +@Service(value = "StationMapperOld") public interface StationMapper extends BaseMapper { } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/service/impl/StationServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/service/impl/StationServiceImpl.java index 3aaf2b94..2291974c 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/service/impl/StationServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/service/impl/StationServiceImpl.java @@ -13,7 +13,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; * @Date: 2021-11-12 * @Version: V1.0 */ -@Service +@Service(value = "StationServiceOld") public class StationServiceImpl extends ServiceImpl implements IStationService { } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationController.java new file mode 100644 index 00000000..ec7c9e73 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationController.java @@ -0,0 +1,178 @@ +package org.jeecg.modules.team.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.activiti.entity.ActBusiness; +import org.jeecg.modules.system.entity.SysDepart; +import org.jeecg.modules.system.service.ISysDepartService; +import org.jeecg.modules.team.entity.Station; +import org.jeecg.modules.team.service.IStationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * @Description: 车间工位管理 + * @Author: jeecg-boot + * @Date: 2022-12-05 + * @Version: V1.0 + */ +@Slf4j +@Api(tags = "车间工位管理") +@RestController +@RequestMapping("/team/station") +public class StationController extends JeecgController { + @Autowired + private IStationService stationService; + + @Autowired + private ISysDepartService iSysDepartService; + + /** + * 分页列表查询 + * + * @param station + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "车间工位管理-分页列表查询") + @ApiOperation(value = "车间工位管理-分页列表查询", notes = "车间工位管理-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(Station station, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(station, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = stationService.page(page, queryWrapper); + if (!ObjectUtils.isEmpty(pageList.getRecords())) { + List records = pageList.getRecords(); + List ids = records.stream().map(o -> o.getDepartId()).collect(Collectors.toList()); + List departList = iSysDepartService.list(new LambdaQueryWrapper().in(SysDepart::getId, ids)); + records.forEach(e -> { + departList.forEach(j -> { + if (e.getDepartId().equals(j.getId())) { + e.setDepartName(j.getDepartName()); + return; + } + }); + }); + } + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param station + * @return + */ + @AutoLog(value = "车间工位管理-添加") + @ApiOperation(value = "车间工位管理-添加", notes = "车间工位管理-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody Station station) { + stationService.save(station); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param station + * @return + */ + @AutoLog(value = "车间工位管理-编辑") + @ApiOperation(value = "车间工位管理-编辑", notes = "车间工位管理-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody Station station) { + stationService.updateById(station); + 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) { + stationService.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.stationService.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) { + Station station = stationService.getById(id); + return Result.OK(station); + } + + /** + * 导出excel + * + * @param request + * @param station + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Station station) { + return super.exportXls(request, station, Station.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, Station.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java new file mode 100644 index 00000000..f98a612c --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java @@ -0,0 +1,152 @@ +package org.jeecg.modules.team.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.team.entity.StationMachine; +import org.jeecg.modules.team.service.IStationMachineService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; + +/** + * @Description: 工序设备管理 + * @Author: jeecg-boot + * @Date: 2022-12-06 + * @Version: V1.0 + */ +@Slf4j +@Api(tags = "工序设备管理") +@RestController +@RequestMapping("/stationMachine") +public class StationMachineController extends JeecgController { + @Autowired + private IStationMachineService stationMachineService; + + /** + * 分页列表查询 + * + * @param stationMachine + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "工序设备管理-分页列表查询") + @ApiOperation(value = "工序设备管理-分页列表查询", notes = "工序设备管理-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(StationMachine stationMachine, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(stationMachine, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = stationMachineService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param stationMachine + * @return + */ + @AutoLog(value = "工序设备管理-添加") + @ApiOperation(value = "工序设备管理-添加", notes = "工序设备管理-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody StationMachine stationMachine) { + stationMachineService.save(stationMachine); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param stationMachine + * @return + */ + @AutoLog(value = "工序设备管理-编辑") + @ApiOperation(value = "工序设备管理-编辑", notes = "工序设备管理-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody StationMachine stationMachine) { + stationMachineService.updateById(stationMachine); + 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) { + stationMachineService.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.stationMachineService.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) { + StationMachine stationMachine = stationMachineService.getById(id); + return Result.OK(stationMachine); + } + + /** + * 导出excel + * + * @param request + * @param stationMachine + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, StationMachine stationMachine) { + return super.exportXls(request, stationMachine, StationMachine.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, StationMachine.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java new file mode 100644 index 00000000..f53ac6ef --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java @@ -0,0 +1,152 @@ +package org.jeecg.modules.team.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.team.entity.StationTool; +import org.jeecg.modules.team.service.IStationToolService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; + +/** + * @Description: 工序工具管理 + * @Author: jeecg-boot + * @Date: 2022-12-06 + * @Version: V1.0 + */ +@Slf4j +@Api(tags = "工序工具管理") +@RestController +@RequestMapping("/stationTool") +public class StationToolController extends JeecgController { + @Autowired + private IStationToolService stationToolService; + + /** + * 分页列表查询 + * + * @param stationTool + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "工序工具管理-分页列表查询") + @ApiOperation(value = "工序工具管理-分页列表查询", notes = "工序工具管理-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(StationTool stationTool, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = stationToolService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param stationTool + * @return + */ + @AutoLog(value = "工序工具管理-添加") + @ApiOperation(value = "工序工具管理-添加", notes = "工序工具管理-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody StationTool stationTool) { + stationToolService.save(stationTool); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param stationTool + * @return + */ + @AutoLog(value = "工序工具管理-编辑") + @ApiOperation(value = "工序工具管理-编辑", notes = "工序工具管理-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody StationTool stationTool) { + stationToolService.updateById(stationTool); + 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) { + stationToolService.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.stationToolService.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) { + StationTool stationTool = stationToolService.getById(id); + return Result.OK(stationTool); + } + + /** + * 导出excel + * + * @param request + * @param stationTool + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, StationTool stationTool) { + return super.exportXls(request, stationTool, StationTool.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, StationTool.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/Station.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/Station.java new file mode 100644 index 00000000..abaec42a --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/Station.java @@ -0,0 +1,87 @@ +package org.jeecg.modules.team.entity; + + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * @Description: 车间工位管理 + * @Author: jeecg-boot + * @Date: 2022-12-05 + * @Version: V1.0 + */ +@Data +@TableName("station") +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value = "station对象", description = "车间工位管理") +public class Station { + + /** + * id + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + private String id; + /** + * 创建人 + */ + @Excel(name = "创建人", width = 15) + @ApiModelProperty(value = "创建人") + private String createBy; + /** + * 创建日期 + */ + @Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /** + * FK,部门表,最下级的生产部门,即车间 + */ + @Excel(name = "车间ID", width = 15) + @ApiModelProperty(value = "FK,部门表,最下级的生产部门,即车间") + private String departId; + + /** + * FK,部门表,最下级的生产部门,即车间 + */ + @TableField(exist = false) + @Excel(name = "车间名称", width = 15) + @ApiModelProperty(value = "车间") +// @Dict(dictTable = "depart_status") + @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + private String departName; + /** + * 工位名称 + */ + @Excel(name = "工位名称", width = 15) + @ApiModelProperty(value = "工位名称") + private String stationName; + /** + * 工位序号 + */ + @Excel(name = "工位序号", width = 15) + @ApiModelProperty(value = "工位序号") + private Integer stationNum; + /** + * 备注 + */ + @Excel(name = "备注", width = 15) + @ApiModelProperty(value = "备注") + private String description; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java new file mode 100644 index 00000000..06e19fef --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java @@ -0,0 +1,56 @@ +package org.jeecg.modules.team.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * @Description: 工序设备管理 + * @Author: jeecg-boot + * @Date: 2022-12-06 + * @Version: V1.0 + */ +@Data +@TableName("station_machine") +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value = "station_machine对象", description = "工序设备管理") +public class StationMachine { + + /** + * id + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + private String id; + /** + * 工位id,uuid,FK,工位表 + */ + @Excel(name = "工位id,uuid,FK,工位表", width = 15) + @ApiModelProperty(value = "工位id,uuid,FK,工位表") + private String stationId; + /** + * 设备id,uuid,FK,设备表 + */ + @Excel(name = "设备id,uuid,FK,设备表", width = 15) + @ApiModelProperty(value = "设备id,uuid,FK,设备表") + private String machineId; + /** + * 创建日期 + */ + @Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @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/team/entity/StationTool.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationTool.java new file mode 100644 index 00000000..8f8231f1 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationTool.java @@ -0,0 +1,56 @@ +package org.jeecg.modules.team.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * @Description: 工序工具管理 + * @Author: jeecg-boot + * @Date: 2022-12-06 + * @Version: V1.0 + */ +@Data +@TableName("station_tool") +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value = "station_tool对象", description = "工序工具管理") +public class StationTool { + + /** + * id + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + private String id; + /** + * 工位id,uuid,FK,工位表 + */ + @Excel(name = "工位id,uuid,FK,工位表", width = 15) + @ApiModelProperty(value = "工位id,uuid,FK,工位表") + private String stationId; + /** + * 工具id,uuid,FK,工具表 + */ + @Excel(name = "工具id,uuid,FK,工具表", width = 15) + @ApiModelProperty(value = "工具id,uuid,FK,工具表") + private String toolsId; + /** + * 创建日期 + */ + @Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @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/team/mapper/StationMachineMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationMachineMapper.java new file mode 100644 index 00000000..d1376328 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationMachineMapper.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.team.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.team.entity.StationMachine; + +/** + * @Description: 工序设备管理 + * @Author: jeecg-boot + * @Date: 2022-12-06 + * @Version: V1.0 + */ +public interface StationMachineMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationMapper.java new file mode 100644 index 00000000..498101db --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationMapper.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.team.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.team.entity.Station; + +/** + * @Description: 车间工位管理 + * @Author: jeecg-boot + * @Date: 2022-12-05 + * @Version: V1.0 + */ +public interface StationMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationToolMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationToolMapper.java new file mode 100644 index 00000000..fa6b32c2 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationToolMapper.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.team.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.team.entity.StationTool; + +/** + * @Description: 工序工具管理 + * @Author: jeecg-boot + * @Date: 2022-12-06 + * @Version: V1.0 + */ +public interface StationToolMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationMachineMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationMachineMapper.xml new file mode 100644 index 00000000..c0697f4c --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationMachineMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationMapper.xml new file mode 100644 index 00000000..cad550f9 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationToolMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationToolMapper.xml new file mode 100644 index 00000000..5f4e0193 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationToolMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationMachineService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationMachineService.java new file mode 100644 index 00000000..20d6d1dc --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationMachineService.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.team.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.team.entity.StationMachine; + +/** + * @Description: 工序设备管理 + * @Author: jeecg-boot + * @Date: 2022-12-06 + * @Version: V1.0 + */ +public interface IStationMachineService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationService.java new file mode 100644 index 00000000..4fdd4da6 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationService.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.team.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.team.entity.Station; + +/** + * @Description: 车间工位管理 + * @Author: jeecg-boot + * @Date: 2022-12-05 + * @Version: V1.0 + */ +public interface IStationService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationToolService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationToolService.java new file mode 100644 index 00000000..b95997da --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationToolService.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.team.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.team.entity.StationTool; + +/** + * @Description: 工序工具管理 + * @Author: jeecg-boot + * @Date: 2022-12-06 + * @Version: V1.0 + */ +public interface IStationToolService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationMachineServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationMachineServiceImpl.java new file mode 100644 index 00000000..552b9c20 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationMachineServiceImpl.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.team.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.team.entity.StationMachine; +import org.jeecg.modules.team.mapper.StationMachineMapper; +import org.jeecg.modules.team.service.IStationMachineService; +import org.springframework.stereotype.Service; + +/** + * @Description: 工序设备管理 + * @Author: jeecg-boot + * @Date: 2022-12-06 + * @Version: V1.0 + */ +@Service +public class StationMachineServiceImpl extends ServiceImpl implements IStationMachineService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java new file mode 100644 index 00000000..deb585da --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.team.service.impl; + + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.team.entity.Station; +import org.jeecg.modules.team.mapper.StationMapper; +import org.jeecg.modules.team.service.IStationService; +import org.springframework.stereotype.Service; + +/** + * @Description: 车间工位管理 + * @Author: jeecg-boot + * @Date: 2022-12-05 + * @Version: V1.0 + */ +@Service +public class StationServiceImpl extends ServiceImpl implements IStationService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationToolServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationToolServiceImpl.java new file mode 100644 index 00000000..ee00432d --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationToolServiceImpl.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.team.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.team.entity.StationTool; +import org.jeecg.modules.team.mapper.StationToolMapper; +import org.jeecg.modules.team.service.IStationToolService; +import org.springframework.stereotype.Service; + +/** + * @Description: 工序工具管理 + * @Author: jeecg-boot + * @Date: 2022-12-06 + * @Version: V1.0 + */ +@Service +public class StationToolServiceImpl extends ServiceImpl implements IStationToolService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml index f929fa9b..8f55395f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml @@ -169,7 +169,7 @@ mybatis-plus: table-underline: true configuration: # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 - # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 返回类型为Map,显示null对应的字段 call-setters-on-nulls: true #jeecg专用配置