Merge remote-tracking branch 'origin/master'

This commit is contained in:
徐晨晨 2021-11-09 13:42:36 +08:00
commit ada0d30f1b
20 changed files with 1217 additions and 3 deletions

View File

@ -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<KilnInfoVo> get(@Validated @RequestBody IdParam idParam) {
return kilnInfoService.get(idParam);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取窑炉列表")
private R<List<KilnInfoVo>> list(@Validated({Default.class}) @RequestBody KilnInfoQueryParam kilnInfoQueryParam) {
return kilnInfoService.list(kilnInfoQueryParam);
}
@PostMapping(value = "page")
@ApiOperation(value = "获取分页窑炉")
private R<PageVo<KilnInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody KilnInfoQueryParam kilnInfoQueryParam) {
return kilnInfoService.page(kilnInfoQueryParam);
}
@PostMapping(value = "add")
@ApiOperation(value = "新增")
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody KilnInfoParam kilnInfoParam) {
return kilnInfoService.add(kilnInfoParam);
}
@PostMapping(value = "update")
@ApiOperation(value = "更新")
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody KilnInfoParam kilnInfoParam) {
return kilnInfoService.update(kilnInfoParam);
}
@PostMapping(value = "delete")
@ApiOperation(value = "删除")
private R<IdVo> 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");
}
}

View File

@ -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<LocationInfoVo> get(@Validated @RequestBody IdParam idParam) {
return locationInfoService.get(idParam);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取库位列表")
private R<List<LocationInfoVo>> list(@Validated({Default.class}) @RequestBody LocationInfoQueryParam locationInfoQueryParam) {
return locationInfoService.list(locationInfoQueryParam);
}
@PostMapping(value = "page")
@ApiOperation(value = "获取分页库位")
private R<PageVo<LocationInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody LocationInfoQueryParam locationInfoQueryParam) {
return locationInfoService.page(locationInfoQueryParam);
}
@PostMapping(value = "add")
@ApiOperation(value = "新增")
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody LocationInfoParam locationInfoParam) {
return locationInfoService.add(locationInfoParam);
}
@PostMapping(value = "update")
@ApiOperation(value = "更新")
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody LocationInfoParam locationInfoParam) {
return locationInfoService.update(locationInfoParam);
}
@PostMapping(value = "delete")
@ApiOperation(value = "删除")
private R<IdVo> 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");
}
}

View File

@ -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<VehicleVo> get(@Validated @RequestBody IdParam idParam) {
return vehicleService.get(idParam);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取车辆列表")
private R<List<VehicleVo>> list(@Validated({Default.class}) @RequestBody VehicleQueryParam vehicleQueryParam) {
return vehicleService.list(vehicleQueryParam);
}
@PostMapping(value = "page")
@ApiOperation(value = "获取分页车辆")
private R<PageVo<VehicleVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody VehicleQueryParam vehicleQueryParam) {
return vehicleService.page(vehicleQueryParam);
}
@PostMapping(value = "add")
@ApiOperation(value = "新增")
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody VehicleParam vehicleParam) {
return vehicleService.add(vehicleParam);
}
@PostMapping(value = "update")
@ApiOperation(value = "更新")
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody VehicleParam vehicleParam) {
return vehicleService.update(vehicleParam);
}
@PostMapping(value = "delete")
@ApiOperation(value = "删除")
private R<IdVo> 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");
}
}

View File

@ -0,0 +1,82 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.base.BaseParam;
import com.mt.wms.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/11/9 12:07
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "窑炉参数对象", description = "用于新增和更新窑炉信息")
public class KilnInfoParam extends BaseParam {
private static final long serialVersionUID = 1L;
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写",required = false, example = "1")
@NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
@NotNull(message = "编码不能为空")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称", example = "1")
@NotNull(message = "名称不能为空")
private String kilnName;
/**
* 别名
*/
@ApiModelProperty(value = "缩写(别名)", example = "1")
@NotNull(message = "别名不能为空")
private String kilnAlias;
/**
* 英文名
*/
@ApiModelProperty(value = "英文名", example = "1")
private String en;
/**
* ip
*/
@ApiModelProperty(value = "ip", example = "192.168.0.1")
private String ip;
/**
* 端口号
*/
@ApiModelProperty(value = "端口号", example = "8888")
private String partNumber;
/**
* 备注
*/
@ApiModelProperty(value = "ip", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}

View File

@ -0,0 +1,25 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.params.BasePageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/9 12:11
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "窑炉查询参数", description = "用于查询窑炉信息")
public class KilnInfoQueryParam extends BasePageParam {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
private Long id;
}

View File

@ -0,0 +1,70 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.base.BaseParam;
import com.mt.wms.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/11/9 10:47
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "库位参数对象", description = "用于新增和更新库位信息")
public class LocationInfoParam extends BaseParam {
private static final long serialVersionUID = 1L;
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写",required = false, example = "1")
@NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
@NotNull(message = "编码不能为空")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "库位名称", example = "1")
@NotNull(message = "名称不能为空")
private String locationName;
/**
* 别名
*/
@ApiModelProperty(value = "别名", example = "1")
@NotNull(message = "别名不能为空")
private String locationNameAlias;
/**
* 缓存区
*/
@ApiModelProperty(value = "缓存区id", example = "1")
private String warehouseId;
/**
* 备注
*/
@ApiModelProperty(value = "备注", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}

View File

@ -0,0 +1,25 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.params.BasePageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/9 11:06
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "库位查询参数", description = "用于查询库位信息")
public class LocationInfoQueryParam extends BasePageParam {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
private Long id;
}

View File

@ -0,0 +1,68 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.base.BaseParam;
import com.mt.wms.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/11/8 10:39
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "车辆参数对象", description = "用于新增和更新车辆信息")
public class VehicleParam extends BaseParam {
private static final long serialVersionUID = 1L;
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写",required = false, example = "1")
@NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
@NotNull(message = "编码不能为空")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称", example = "1")
@NotNull(message = "名称不能为空")
private String vehicleName;
/**
* 规格
*/
@ApiModelProperty(value = "缩写(别名)", example = "1")
private String vehicleAlias;
/**
* ip
*/
@ApiModelProperty(value = "ip", example = "192.168.0.1")
private String ip;
/**
* 备注
*/
@ApiModelProperty(value = "ip", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}

View File

@ -0,0 +1,44 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.params.BasePageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/8 15:19
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "车辆查询参数", description = "用于查询车辆信息")
public class VehicleQueryParam extends BasePageParam {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码",required = false, example = "1")
private String code;
/**
* 别名
*/
@ApiModelProperty(value = "别名",required = false, example = "1")
private String vehicleAlias;
/**
* 名称
*/
@ApiModelProperty(value = "名称",required = false, example = "1")
private String vehicleName;
}

View File

@ -0,0 +1,68 @@
package com.mt.wms.basic.service;
import com.mt.wms.basic.params.KilnInfoParam;
import com.mt.wms.basic.params.KilnInfoQueryParam;
import com.mt.wms.basic.vo.KilnInfoVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 12:12
* @Version 1.0
*/
public interface KilnInfoService {
/**
* 获取xx
*
* @param idParam 主键参数
* @return xx
*/
R<KilnInfoVo> get(IdParam idParam);
/**
* 获取xx列表
*
* @param kilnInfoQueryParam xx查询参数
* @return xx列表
*/
R<List<KilnInfoVo>> list(KilnInfoQueryParam kilnInfoQueryParam);
/**
* 获取xx分页列表
*
* @param kilnInfoQueryParam xx查询参数
* @return xx分页列表
*/
R<PageVo<KilnInfoVo>> page(KilnInfoQueryParam kilnInfoQueryParam);
/**
* 新增xx
*
* @param kilnInfoParam xx参数
* @return 主键
*/
R<IdVo> add(KilnInfoParam kilnInfoParam);
/**
* 更新xx
*
* @param kilnInfoParam xx参数
* @return 主键
*/
R<IdVo> update(KilnInfoParam kilnInfoParam);
/**
* 删除xx
*
* @param idParam 主键参数
* @return 主键
*/
R<IdVo> delete(IdParam idParam);
}

View File

@ -0,0 +1,68 @@
package com.mt.wms.basic.service;
import com.mt.wms.basic.params.LocationInfoParam;
import com.mt.wms.basic.params.LocationInfoQueryParam;
import com.mt.wms.basic.vo.LocationInfoVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 11:10
* @Version 1.0
*/
public interface LocationInfoService {
/**
* 获取xx
*
* @param idParam 主键参数
* @return xx
*/
R<LocationInfoVo> get(IdParam idParam);
/**
* 获取xx列表
*
* @param locationInfoQueryParam xx查询参数
* @return xx列表
*/
R<List<LocationInfoVo>> list(LocationInfoQueryParam locationInfoQueryParam);
/**
* 获取xx分页列表
*
* @param locationInfoQueryParam xx查询参数
* @return xx分页列表
*/
R<PageVo<LocationInfoVo>> page(LocationInfoQueryParam locationInfoQueryParam);
/**
* 新增xx
*
* @param locationInfoParam xx参数
* @return 主键
*/
R<IdVo> add(LocationInfoParam locationInfoParam);
/**
* 更新xx
*
* @param locationInfoParam xx参数
* @return 主键
*/
R<IdVo> update(LocationInfoParam locationInfoParam);
/**
* 删除xx
*
* @param idParam 主键参数
* @return 主键
*/
R<IdVo> delete(IdParam idParam);
}

View File

@ -0,0 +1,68 @@
package com.mt.wms.basic.service;
import com.mt.wms.basic.params.VehicleParam;
import com.mt.wms.basic.params.VehicleQueryParam;
import com.mt.wms.basic.vo.VehicleVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 10:02
* @Version 1.0
*/
public interface VehicleService {
/**
* 获取xx
*
* @param idParam 主键参数
* @return xx
*/
R<VehicleVo> get(IdParam idParam);
/**
* 获取xx列表
*
* @param vehicleQueryParam xx查询参数
* @return xx列表
*/
R<List<VehicleVo>> list(VehicleQueryParam vehicleQueryParam);
/**
* 获取xx分页列表
*
* @param vehicleQueryParam xx查询参数
* @return xx分页列表
*/
R<PageVo<VehicleVo>> page(VehicleQueryParam vehicleQueryParam);
/**
* 新增xx
*
* @param vehicleParam xx参数
* @return 主键
*/
R<IdVo> add(VehicleParam vehicleParam);
/**
* 更新xx
*
* @param vehicleParam xx参数
* @return 主键
*/
R<IdVo> update(VehicleParam vehicleParam);
/**
* 删除xx
*
* @param idParam 主键参数
* @return 主键
*/
R<IdVo> delete(IdParam idParam);
}

View File

@ -6,7 +6,6 @@ import com.mt.wms.basic.params.AlarmBaseParam;
import com.mt.wms.basic.params.AlarmBaseQueryParam;
import com.mt.wms.basic.service.AlarmBaseService;
import com.mt.wms.basic.vo.AlarmBaseVo;
import com.mt.wms.basic.vo.WarehouseVo;
import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.AlarmBase;
@ -48,7 +47,11 @@ public class AlarmBaseServiceImpl extends BaseService implements AlarmBaseServic
@Override
public R<List<AlarmBaseVo>> list(AlarmBaseQueryParam alarmBaseQueryParam) {
return null;
QueryWrapper<AlarmBase> wrapper=new QueryWrapper<>();
wrapper.eq(AlarmBase.VALID,1);
List<AlarmBase> alarmBaseList = alarmBaseServiceBiz.list(wrapper);
List<AlarmBaseVo> alarmBaseVoList = com.mt.wms.core.utils.BeanUtils.copyList(alarmBaseList, AlarmBaseVo.class);
return successful(alarmBaseVoList);
}
@Override

View File

@ -0,0 +1,71 @@
package com.mt.wms.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.KilnInfo;
import com.mt.wms.core.dal.service.KilnInfoServiceBiz;
import com.mt.wms.core.errorcode.ApiErrorCode;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 12:16
* @Version 1.0
*/
@Service
@Transactional
public class KilnInfoServiceImpl extends BaseService implements KilnInfoService {
@Resource
private KilnInfoServiceBiz kilnInfoServiceBiz;
@Override
public R<KilnInfoVo> get(IdParam idParam) {
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(idParam.getId());
KilnInfoVo kilnInfoVo=KilnInfoVo.builder().build();
BeanUtils.copyProperties(kilnInfo,kilnInfoVo);
return successful(kilnInfoVo);
}
@Override
public R<List<KilnInfoVo>> list(KilnInfoQueryParam kilnInfoQueryParam) {
QueryWrapper<KilnInfo> wrapper=new QueryWrapper<>();
wrapper.eq(KilnInfo.VALID,1);
List<KilnInfo> kilnInfoList = kilnInfoServiceBiz.list(wrapper);
List<KilnInfoVo> kilnInfoVoList = com.mt.wms.core.utils.BeanUtils.copyList(kilnInfoList, KilnInfoVo.class);
return successful(kilnInfoVoList);
}
@Override
public R<PageVo<KilnInfoVo>> page(KilnInfoQueryParam kilnInfoQueryParam) {
return null;
}
@Override
public R<IdVo> add(KilnInfoParam kilnInfoParam) {
return null;
}
@Override
public R<IdVo> update(KilnInfoParam kilnInfoParam) {
return null;
}
@Override
public R<IdVo> delete(IdParam idParam) {
return null;
}
}

View File

@ -0,0 +1,74 @@
package com.mt.wms.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.basic.vo.VehicleVo;
import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.Location;
import com.mt.wms.core.dal.entity.VehicleInfo;
import com.mt.wms.core.dal.service.LocationServiceBiz;
import com.mt.wms.core.errorcode.ApiErrorCode;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 11:13
* @Version 1.0
*/
@Service
@Transactional
public class LocationInfoServiceImpl extends BaseService implements LocationInfoService {
@Resource
private LocationServiceBiz locationServiceBiz;
@Override
public R<LocationInfoVo> get(IdParam idParam) {
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
Location location = locationServiceBiz.getById(idParam.getId());
LocationInfoVo locationInfoVo=LocationInfoVo.builder().build();
BeanUtils.copyProperties(location,locationInfoVo);
return successful(locationInfoVo);
}
@Override
public R<List<LocationInfoVo>> list(LocationInfoQueryParam locationInfoQueryParam) {
QueryWrapper<Location> wrapper=new QueryWrapper<>();
wrapper.eq(Location.VALID,1);
List<Location> locationList = locationServiceBiz.list(wrapper);
List<LocationInfoVo> locationInfoVoList = com.mt.wms.core.utils.BeanUtils.copyList(locationList, LocationInfoVo.class);
return successful(locationInfoVoList);
}
@Override
public R<PageVo<LocationInfoVo>> page(LocationInfoQueryParam locationInfoQueryParam) {
return null;
}
@Override
public R<IdVo> add(LocationInfoParam locationInfoParam) {
return null;
}
@Override
public R<IdVo> update(LocationInfoParam locationInfoParam) {
return null;
}
@Override
public R<IdVo> delete(IdParam idParam) {
return null;
}
}

View File

@ -0,0 +1,74 @@
package com.mt.wms.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.AlarmBaseVo;
import com.mt.wms.basic.vo.VehicleVo;
import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.AlarmBase;
import com.mt.wms.core.dal.entity.VehicleInfo;
import com.mt.wms.core.dal.service.VehicleInfoServiceBiz;
import com.mt.wms.core.errorcode.ApiErrorCode;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 10:09
* @Version 1.0
*/
@Service
@Transactional
public class VehicleServiceImpl extends BaseService implements VehicleService {
@Resource
private VehicleInfoServiceBiz vehicleInfoServiceBiz;
@Override
public R<VehicleVo> get(IdParam idParam) {
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
VehicleInfo vehicleInfo = vehicleInfoServiceBiz.getById(idParam.getId());
VehicleVo vehicleVo=VehicleVo.builder().build();
BeanUtils.copyProperties(vehicleInfo,vehicleVo);
return successful(vehicleVo);
}
@Override
public R<List<VehicleVo>> list(VehicleQueryParam vehicleQueryParam) {
QueryWrapper<VehicleInfo> wrapper=new QueryWrapper<>();
wrapper.eq(VehicleInfo.VALID,1);
List<VehicleInfo> vehicleInfoList = vehicleInfoServiceBiz.list(wrapper);
List<VehicleVo> vehicleVoList = com.mt.wms.core.utils.BeanUtils.copyList(vehicleInfoList, VehicleVo.class);
return successful(vehicleVoList);
}
@Override
public R<PageVo<VehicleVo>> page(VehicleQueryParam vehicleQueryParam) {
return null;
}
@Override
public R<IdVo> add(VehicleParam vehicleParam) {
return null;
}
@Override
public R<IdVo> update(VehicleParam vehicleParam) {
return null;
}
@Override
public R<IdVo> delete(IdParam idParam) {
return null;
}
}

View File

@ -45,7 +45,11 @@ public class WarehouseServiceImpl extends BaseService implements WarehouseServic
@Override
public R<List<WarehouseVo>> list(WarehouseQueryParam warehouseQueryParam) {
return null;
QueryWrapper<Warehouse> wrapper=new QueryWrapper<>();
wrapper.eq(Warehouse.VALID,1);
List<Warehouse> warehouseList = warehouseServiceBiz.list(wrapper);
List<WarehouseVo> warehouseVoList = com.mt.wms.core.utils.BeanUtils.copyList(warehouseList, WarehouseVo.class);
return successful(warehouseVoList);
}
@Override

View File

@ -0,0 +1,82 @@
package com.mt.wms.basic.vo;
import com.mt.wms.core.base.BaseVo;
import com.mt.wms.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/9 11:21
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "窑炉视图对象", description = "用于查询窑炉信息")
public class KilnInfoVo extends BaseVo implements PageVo.ConvertVo {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键", required = true, example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称", example = "1")
private String kilnName;
/**
* 别名
*/
@ApiModelProperty(value = "缩写(别名)", example = "1")
private String kilnAlias;
/**
* 英文名
*/
@ApiModelProperty(value = "英文名", example = "1")
private String en;
/**
* ip
*/
@ApiModelProperty(value = "ip", example = "192.168.0.1")
private String ip;
/**
* 端口号
*/
@ApiModelProperty(value = "端口号", example = "8888")
private String partNumber;
/**
* 状态 0初始化1损坏
*/
@ApiModelProperty(value = "状态", example = "0")
private String status;
/**
* 备注
*/
@ApiModelProperty(value = "ip", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}

View File

@ -0,0 +1,69 @@
package com.mt.wms.basic.vo;
import com.mt.wms.core.base.BaseVo;
import com.mt.wms.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/9 10:22
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "库位信息视图对象", description = "用于查询库位信息")
public class LocationInfoVo extends BaseVo implements PageVo.ConvertVo {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键", required = true, example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "仓库名称", example = "1")
private String locationName;
/**
* 别名
*/
@ApiModelProperty(value = "别名", example = "1")
private String locationNameAlias;
/**
* 状态
*/
@ApiModelProperty(value = "状态:0空闲1使用2不可用", example = "1")
private String status;
/**
* 缓存区
*/
@ApiModelProperty(value = "缓存区", example = "1")
private String warehouse;
/**
* 备注
*/
@ApiModelProperty(value = "备注", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}

View File

@ -0,0 +1,63 @@
package com.mt.wms.basic.vo;
import com.mt.wms.core.base.BaseVo;
import com.mt.wms.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/8 10:28
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "车辆视图对象", description = "用于查询车辆信息")
public class VehicleVo extends BaseVo implements PageVo.ConvertVo{
/**
* 主键自增
*/
@ApiModelProperty(value = "主键", required = true, example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称", example = "1")
private String vehicleName;
/**
* 别名
*/
@ApiModelProperty(value = "缩写(别名)", example = "1")
private String vehicleAlias;
/**
* ip
*/
@ApiModelProperty(value = "ip", example = "192.168.0.1")
private String ip;
/**
* 备注
*/
@ApiModelProperty(value = "ip", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}