diff --git a/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/KilnInfoController.java b/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/KilnInfoController.java new file mode 100644 index 0000000..5099a2c --- /dev/null +++ b/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/KilnInfoController.java @@ -0,0 +1,86 @@ +package com.mt.wms.basic.controller; + +import com.mt.wms.basic.params.KilnInfoParam; +import com.mt.wms.basic.params.KilnInfoQueryParam; +import com.mt.wms.basic.service.KilnInfoService; +import com.mt.wms.basic.vo.KilnInfoVo; +import com.mt.wms.core.base.BaseController; +import com.mt.wms.core.constants.CommonConstant; +import com.mt.wms.core.dal.entity.KilnInfo; +import com.mt.wms.core.params.IdParam; +import com.mt.wms.core.utils.IDGenerator; +import com.mt.wms.core.validator.groups.AddGroup; +import com.mt.wms.core.validator.groups.PageGroup; +import com.mt.wms.core.validator.groups.UpdateGroup; +import com.mt.wms.core.vo.IdVo; +import com.mt.wms.core.vo.PageVo; +import com.mt.wms.core.vo.R; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.groups.Default; +import java.util.List; + +/** + * @Author: liguanghao + * @Date: 2021/11/9 12:56 + * @Version 1.0 + */ +@RestController +@RequestMapping(CommonConstant.API_MODULE_BASE + "kilnInfo") +@Slf4j +@Api(value = "窑炉基础信息管理", tags = "窑炉基础信息管理", hidden = false) +public class KilnInfoController extends BaseController { + + @Autowired + private KilnInfoService kilnInfoService; + + @PostMapping(value = "get") + @ApiOperation(value = "获取窑炉信息") + private R get(@Validated @RequestBody IdParam idParam) { + return kilnInfoService.get(idParam); + } + + @PostMapping(value = "list") + @ApiOperation(value = "获取窑炉列表") + private R> list(@Validated({Default.class}) @RequestBody KilnInfoQueryParam kilnInfoQueryParam) { + return kilnInfoService.list(kilnInfoQueryParam); + } + + @PostMapping(value = "page") + @ApiOperation(value = "获取分页窑炉") + private R> page(@Validated({PageGroup.class, Default.class}) @RequestBody KilnInfoQueryParam kilnInfoQueryParam) { + return kilnInfoService.page(kilnInfoQueryParam); + } + + @PostMapping(value = "add") + @ApiOperation(value = "新增") + private R add(@Validated({AddGroup.class, Default.class}) @RequestBody KilnInfoParam kilnInfoParam) { + return kilnInfoService.add(kilnInfoParam); + } + + @PostMapping(value = "update") + @ApiOperation(value = "更新") + private R update(@Validated({UpdateGroup.class, Default.class}) @RequestBody KilnInfoParam kilnInfoParam) { + return kilnInfoService.update(kilnInfoParam); + } + + @PostMapping(value = "delete") + @ApiOperation(value = "删除") + private R delete(@Validated @RequestBody IdParam idParam) { + return kilnInfoService.delete(idParam); + } + + @PostMapping(value = "codeGenerator") + @ApiOperation(value = "编码生成") + private String CodeGenerator(){ + return IDGenerator.gen("YL", "yyyyMMddHHmm", 2, "KILN_CODE"); + } +} diff --git a/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/LocationInfoController.java b/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/LocationInfoController.java new file mode 100644 index 0000000..1abb3c3 --- /dev/null +++ b/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/LocationInfoController.java @@ -0,0 +1,85 @@ +package com.mt.wms.basic.controller; + +import com.mt.wms.basic.params.LocationInfoParam; +import com.mt.wms.basic.params.LocationInfoQueryParam; +import com.mt.wms.basic.service.LocationInfoService; +import com.mt.wms.basic.vo.LocationInfoVo; +import com.mt.wms.core.base.BaseController; +import com.mt.wms.core.constants.CommonConstant; +import com.mt.wms.core.params.IdParam; +import com.mt.wms.core.utils.IDGenerator; +import com.mt.wms.core.validator.groups.AddGroup; +import com.mt.wms.core.validator.groups.PageGroup; +import com.mt.wms.core.validator.groups.UpdateGroup; +import com.mt.wms.core.vo.IdVo; +import com.mt.wms.core.vo.PageVo; +import com.mt.wms.core.vo.R; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.groups.Default; +import java.util.List; + +/** + * @Author: liguanghao + * @Date: 2021/11/9 13:03 + * @Version 1.0 + */ +@RestController +@RequestMapping(CommonConstant.API_MODULE_BASE + "locationInfo") +@Slf4j +@Api(value = "库位基础信息管理", tags = "库位基础信息管理", hidden = false) +public class LocationInfoController extends BaseController { + + @Autowired + private LocationInfoService locationInfoService; + @PostMapping(value = "get") + @ApiOperation(value = "获取库位信息") + private R get(@Validated @RequestBody IdParam idParam) { + return locationInfoService.get(idParam); + } + + @PostMapping(value = "list") + @ApiOperation(value = "获取库位列表") + private R> list(@Validated({Default.class}) @RequestBody LocationInfoQueryParam locationInfoQueryParam) { + return locationInfoService.list(locationInfoQueryParam); + } + + @PostMapping(value = "page") + @ApiOperation(value = "获取分页库位") + private R> page(@Validated({PageGroup.class, Default.class}) @RequestBody LocationInfoQueryParam locationInfoQueryParam) { + return locationInfoService.page(locationInfoQueryParam); + } + + @PostMapping(value = "add") + @ApiOperation(value = "新增") + private R add(@Validated({AddGroup.class, Default.class}) @RequestBody LocationInfoParam locationInfoParam) { + return locationInfoService.add(locationInfoParam); + } + + @PostMapping(value = "update") + @ApiOperation(value = "更新") + private R update(@Validated({UpdateGroup.class, Default.class}) @RequestBody LocationInfoParam locationInfoParam) { + return locationInfoService.update(locationInfoParam); + } + + @PostMapping(value = "delete") + @ApiOperation(value = "删除") + private R delete(@Validated @RequestBody IdParam idParam) { + return locationInfoService.delete(idParam); + } + + @PostMapping(value = "codeGenerator") + @ApiOperation(value = "编码生成") + private String CodeGenerator(){ + return IDGenerator.gen("KW", "yyyyMMddHHmm", 2, "LOCATION_CODE"); + } + +} diff --git a/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/VehicleController.java b/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/VehicleController.java new file mode 100644 index 0000000..e248651 --- /dev/null +++ b/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/VehicleController.java @@ -0,0 +1,85 @@ +package com.mt.wms.basic.controller; + +import com.mt.wms.basic.params.VehicleParam; +import com.mt.wms.basic.params.VehicleQueryParam; +import com.mt.wms.basic.service.VehicleService; +import com.mt.wms.basic.vo.VehicleVo; +import com.mt.wms.core.base.BaseController; +import com.mt.wms.core.constants.CommonConstant; +import com.mt.wms.core.params.IdParam; +import com.mt.wms.core.utils.IDGenerator; +import com.mt.wms.core.validator.groups.AddGroup; +import com.mt.wms.core.validator.groups.PageGroup; +import com.mt.wms.core.validator.groups.UpdateGroup; +import com.mt.wms.core.vo.IdVo; +import com.mt.wms.core.vo.PageVo; +import com.mt.wms.core.vo.R; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.groups.Default; +import java.util.List; + +/** + * @Author: liguanghao + * @Date: 2021/11/9 13:13 + * @Version 1.0 + */ +@RestController +@RequestMapping(CommonConstant.API_MODULE_BASE + "vehicle") +@Slf4j +@Api(value = "车辆基础信息管理", tags = "车辆基础信息管理", hidden = false) +public class VehicleController extends BaseController { + + @Autowired + private VehicleService vehicleService; + @PostMapping(value = "get") + @ApiOperation(value = "获取车辆信息") + private R get(@Validated @RequestBody IdParam idParam) { + return vehicleService.get(idParam); + } + + @PostMapping(value = "list") + @ApiOperation(value = "获取车辆列表") + private R> list(@Validated({Default.class}) @RequestBody VehicleQueryParam vehicleQueryParam) { + return vehicleService.list(vehicleQueryParam); + } + + @PostMapping(value = "page") + @ApiOperation(value = "获取分页车辆") + private R> page(@Validated({PageGroup.class, Default.class}) @RequestBody VehicleQueryParam vehicleQueryParam) { + return vehicleService.page(vehicleQueryParam); + } + + @PostMapping(value = "add") + @ApiOperation(value = "新增") + private R add(@Validated({AddGroup.class, Default.class}) @RequestBody VehicleParam vehicleParam) { + return vehicleService.add(vehicleParam); + } + + @PostMapping(value = "update") + @ApiOperation(value = "更新") + private R update(@Validated({UpdateGroup.class, Default.class}) @RequestBody VehicleParam vehicleParam) { + return vehicleService.update(vehicleParam); + } + + @PostMapping(value = "delete") + @ApiOperation(value = "删除") + private R delete(@Validated @RequestBody IdParam idParam) { + return vehicleService.delete(idParam); + } + + @PostMapping(value = "codeGenerator") + @ApiOperation(value = "编码生成") + private String CodeGenerator(){ + return IDGenerator.gen("CL", "yyyyMMddHHmm", 2, "VEHICLE_CODE"); + } + +}