feat: 新增料场位置相关接口
This commit is contained in:
@@ -157,7 +157,6 @@ public class BudgetController {
|
|||||||
// todo-1 发布编码替换
|
// todo-1 发布编码替换
|
||||||
// todo-1 公众网站数据
|
// todo-1 公众网站数据
|
||||||
// todo-1 公众网站历史数据
|
// todo-1 公众网站历史数据
|
||||||
// todo-1 料场位置管理
|
|
||||||
// todo-1 地图里程数据
|
// todo-1 地图里程数据
|
||||||
// todo-1 价格权重调整
|
// todo-1 价格权重调整
|
||||||
// todo-1 外省数据上传
|
// todo-1 外省数据上传
|
||||||
|
@@ -0,0 +1,151 @@
|
|||||||
|
|
||||||
|
package mjkf.xinke.main.modular.location.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import mjkf.xinke.common.exception.CommonException;
|
||||||
|
import mjkf.xinke.main.model.db.LocalMaterial;
|
||||||
|
import mjkf.xinke.main.modular.location.param.*;
|
||||||
|
import mjkf.xinke.main.service.LocalMaterialService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import mjkf.xinke.common.annotation.CommonLog;
|
||||||
|
import mjkf.xinke.common.pojo.CommonResult;
|
||||||
|
import mjkf.xinke.common.pojo.CommonValidList;
|
||||||
|
import mjkf.xinke.main.modular.location.entity.Location;
|
||||||
|
import mjkf.xinke.main.modular.location.service.LocationService;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料场位置控制器
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
*/
|
||||||
|
@Api(tags = "料场位置控制器")
|
||||||
|
@ApiSupport(author = "SNOWY_TEAM", order = 1)
|
||||||
|
@RestController
|
||||||
|
@Validated
|
||||||
|
public class LocationController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private LocationService locationService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private LocalMaterialService localMaterialService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已知料场位置列表
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
*/
|
||||||
|
@ApiOperationSupport(order = 1)
|
||||||
|
@ApiOperation("获取已知料场位置列表")
|
||||||
|
//@SaCheckPermission("/location/location/page")
|
||||||
|
@GetMapping("/location/location/known")
|
||||||
|
public CommonResult<List<LocalMaterial>> knownList(LocationKnownParam param) {
|
||||||
|
var query = new QueryWrapper<LocalMaterial>();
|
||||||
|
if (ObjectUtil.isNotEmpty(param.getName())) {
|
||||||
|
query.lambda().like(LocalMaterial::getPosition, param.getName());
|
||||||
|
}
|
||||||
|
query.select("DISTINCT position");
|
||||||
|
var result = localMaterialService.list(query);
|
||||||
|
|
||||||
|
return CommonResult.data(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取料场位置分页
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
*/
|
||||||
|
@ApiOperationSupport(order = 1)
|
||||||
|
@ApiOperation("获取料场位置分页")
|
||||||
|
//@SaCheckPermission("/location/location/page")
|
||||||
|
@GetMapping("/location/location/page")
|
||||||
|
public CommonResult<Page<Location>> page(LocationPageParam locationPageParam) {
|
||||||
|
return CommonResult.data(locationService.page(locationPageParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加料场位置
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
*/
|
||||||
|
@ApiOperationSupport(order = 2)
|
||||||
|
@ApiOperation("添加料场位置")
|
||||||
|
@CommonLog("添加料场位置")
|
||||||
|
//@SaCheckPermission("/location/location/add")
|
||||||
|
@PostMapping("/location/location/add")
|
||||||
|
public CommonResult<String> add(@RequestBody @Valid LocationAddParam locationAddParam) {
|
||||||
|
var item = locationService.getByName(locationAddParam.getName());
|
||||||
|
if (ObjectUtil.isNotEmpty(item)) {
|
||||||
|
throw new CommonException("已存在同名位置");
|
||||||
|
}
|
||||||
|
locationService.add(locationAddParam);
|
||||||
|
return CommonResult.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑料场位置
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
*/
|
||||||
|
@ApiOperationSupport(order = 3)
|
||||||
|
@ApiOperation("编辑料场位置")
|
||||||
|
@CommonLog("编辑料场位置")
|
||||||
|
//@SaCheckPermission("/location/location/edit")
|
||||||
|
@PostMapping("/location/location/edit")
|
||||||
|
public CommonResult<String> edit(@RequestBody @Valid LocationEditParam locationEditParam) {
|
||||||
|
locationService.edit(locationEditParam);
|
||||||
|
return CommonResult.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除料场位置
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
*/
|
||||||
|
@ApiOperationSupport(order = 4)
|
||||||
|
@ApiOperation("删除料场位置")
|
||||||
|
@CommonLog("删除料场位置")
|
||||||
|
//@SaCheckPermission("/location/location/delete")
|
||||||
|
@PostMapping("/location/location/delete")
|
||||||
|
public CommonResult<String> delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
|
||||||
|
CommonValidList<LocationIdParam> locationIdParamList) {
|
||||||
|
locationService.delete(locationIdParamList);
|
||||||
|
return CommonResult.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取料场位置详情
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
*/
|
||||||
|
@ApiOperationSupport(order = 5)
|
||||||
|
@ApiOperation("获取料场位置详情")
|
||||||
|
//@SaCheckPermission("/location/location/detail")
|
||||||
|
@GetMapping("/location/location/detail")
|
||||||
|
public CommonResult<Location> detail(@Valid LocationIdParam locationIdParam) {
|
||||||
|
return CommonResult.data(locationService.detail(locationIdParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,72 @@
|
|||||||
|
|
||||||
|
package mjkf.xinke.main.modular.location.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料场位置实体
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("LOCATION")
|
||||||
|
public class Location {
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
@TableId
|
||||||
|
@ApiModelProperty(value = "id", position = 1)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
@ApiModelProperty(value = "名称", position = 2)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 经度 */
|
||||||
|
@ApiModelProperty(value = "经度", position = 3)
|
||||||
|
private BigDecimal lon;
|
||||||
|
|
||||||
|
/** 纬度 */
|
||||||
|
@ApiModelProperty(value = "纬度", position = 4)
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
/** 扩展信息 */
|
||||||
|
@ApiModelProperty(value = "扩展信息", position = 5)
|
||||||
|
private String extJson;
|
||||||
|
|
||||||
|
/** 租户id */
|
||||||
|
@ApiModelProperty(value = "租户id", position = 6)
|
||||||
|
private String tenantId;
|
||||||
|
|
||||||
|
/** 删除标志 */
|
||||||
|
@ApiModelProperty(value = "删除标志", position = 7)
|
||||||
|
@TableLogic
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String deleteFlag;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@ApiModelProperty(value = "创建时间", position = 8)
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 创建用户 */
|
||||||
|
@ApiModelProperty(value = "创建用户", position = 9)
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
@ApiModelProperty(value = "更新时间", position = 10)
|
||||||
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
@ApiModelProperty(value = "更新人", position = 11)
|
||||||
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
|
private String updateUser;
|
||||||
|
}
|
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
package mjkf.xinke.main.modular.location.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料场位置枚举
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
public enum LocationEnum {
|
||||||
|
|
||||||
|
/** 测试 */
|
||||||
|
TEST("TEST");
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
LocationEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
package mjkf.xinke.main.modular.location.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import mjkf.xinke.main.modular.location.entity.Location;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料场位置Mapper接口
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
**/
|
||||||
|
public interface LocationMapper extends BaseMapper<Location> {
|
||||||
|
}
|
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="mjkf.xinke.main.modular.location.mapper.LocationMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
package mjkf.xinke.main.modular.location.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料场位置添加参数
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class LocationAddParam {
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
@ApiModelProperty(value = "名称", position = 2)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 经度 */
|
||||||
|
@ApiModelProperty(value = "经度", position = 3)
|
||||||
|
private BigDecimal lon;
|
||||||
|
|
||||||
|
/** 纬度 */
|
||||||
|
@ApiModelProperty(value = "纬度", position = 4)
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
package mjkf.xinke.main.modular.location.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料场位置编辑参数
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class LocationEditParam {
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
@ApiModelProperty(value = "id", required = true, position = 1)
|
||||||
|
@NotBlank(message = "id不能为空")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 经度 */
|
||||||
|
@ApiModelProperty(value = "经度", position = 3)
|
||||||
|
private BigDecimal lon;
|
||||||
|
|
||||||
|
/** 纬度 */
|
||||||
|
@ApiModelProperty(value = "纬度", position = 4)
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
package mjkf.xinke.main.modular.location.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料场位置Id参数
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class LocationIdParam {
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
@ApiModelProperty(value = "id", required = true)
|
||||||
|
@NotBlank(message = "id不能为空")
|
||||||
|
private String id;
|
||||||
|
}
|
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
package mjkf.xinke.main.modular.location.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料场位置查询参数
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class LocationKnownParam {
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
package mjkf.xinke.main.modular.location.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料场位置查询参数
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class LocationPageParam {
|
||||||
|
|
||||||
|
/** 当前页 */
|
||||||
|
@ApiModelProperty(value = "当前页码")
|
||||||
|
private Integer current;
|
||||||
|
|
||||||
|
/** 每页条数 */
|
||||||
|
@ApiModelProperty(value = "每页条数")
|
||||||
|
private Integer size;
|
||||||
|
|
||||||
|
/** 排序字段 */
|
||||||
|
@ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
|
||||||
|
private String sortField;
|
||||||
|
|
||||||
|
/** 排序方式 */
|
||||||
|
@ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
|
||||||
|
private String sortOrder;
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,93 @@
|
|||||||
|
|
||||||
|
package mjkf.xinke.main.modular.location.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollStreamUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import mjkf.xinke.common.enums.CommonSortOrderEnum;
|
||||||
|
import mjkf.xinke.common.exception.CommonException;
|
||||||
|
import mjkf.xinke.common.page.CommonPageRequest;
|
||||||
|
import mjkf.xinke.main.modular.location.entity.Location;
|
||||||
|
import mjkf.xinke.main.modular.location.param.LocationAddParam;
|
||||||
|
import mjkf.xinke.main.modular.location.param.LocationEditParam;
|
||||||
|
import mjkf.xinke.main.modular.location.param.LocationIdParam;
|
||||||
|
import mjkf.xinke.main.modular.location.param.LocationPageParam;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料场位置Service类
|
||||||
|
*
|
||||||
|
* @author han0
|
||||||
|
* @date 2024/09/10 10:36
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class LocationService extends ServiceImpl<BaseMapper<Location>, Location> {
|
||||||
|
|
||||||
|
|
||||||
|
public Page<Location> page(LocationPageParam locationPageParam) {
|
||||||
|
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
|
||||||
|
if(ObjectUtil.isNotEmpty(locationPageParam.getName())) {
|
||||||
|
queryWrapper.lambda().like(Location::getName, locationPageParam.getName());
|
||||||
|
}
|
||||||
|
if(ObjectUtil.isAllNotEmpty(locationPageParam.getSortField(), locationPageParam.getSortOrder())) {
|
||||||
|
CommonSortOrderEnum.validate(locationPageParam.getSortOrder());
|
||||||
|
queryWrapper.orderBy(true, locationPageParam.getSortOrder().equals(CommonSortOrderEnum.ASC.getValue()),
|
||||||
|
StrUtil.toUnderlineCase(locationPageParam.getSortField()));
|
||||||
|
} else {
|
||||||
|
queryWrapper.lambda().orderByAsc(Location::getId);
|
||||||
|
}
|
||||||
|
return this.page(CommonPageRequest.defaultPage(), queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Location add(LocationAddParam locationAddParam) {
|
||||||
|
Location location = BeanUtil.toBean(locationAddParam, Location.class);
|
||||||
|
this.save(location);
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Location getByName(String name) {
|
||||||
|
var queryWrapper = new LambdaQueryWrapper<Location>();
|
||||||
|
queryWrapper.eq(Location::getName, name);
|
||||||
|
var result = this.getOne(queryWrapper, false);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Location edit(LocationEditParam locationEditParam) {
|
||||||
|
Location location = this.queryEntity(locationEditParam.getId());
|
||||||
|
BeanUtil.copyProperties(locationEditParam, location);
|
||||||
|
this.updateById(location);
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void delete(List<LocationIdParam> locationIdParamList) {
|
||||||
|
// 执行删除
|
||||||
|
this.removeByIds(CollStreamUtil.toList(locationIdParamList, LocationIdParam::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Location detail(LocationIdParam locationIdParam) {
|
||||||
|
return this.queryEntity(locationIdParam.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Location queryEntity(Serializable id) {
|
||||||
|
Location location = this.getById(id);
|
||||||
|
if(ObjectUtil.isEmpty(location)) {
|
||||||
|
throw new CommonException("料场位置不存在,id值为:{}", id);
|
||||||
|
}
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -55,4 +55,19 @@ ALTER TABLE PRICE_RESULT
|
|||||||
ALTER TABLE PRICE_RESULT
|
ALTER TABLE PRICE_RESULT
|
||||||
MODIFY COLUMN FLUCTUATING_FUJIAN decimal(16,4) DEFAULT '0.0000' COMMENT '住建厅浮动' AFTER PRICE_FUJIAN;
|
MODIFY COLUMN FLUCTUATING_FUJIAN decimal(16,4) DEFAULT '0.0000' COMMENT '住建厅浮动' AFTER PRICE_FUJIAN;
|
||||||
|
|
||||||
|
-- todo 统一改为表定义:
|
||||||
|
-- material_manage.PRICE_RESULT
|
||||||
|
-- material_manage.PRICE_PUBLISH
|
||||||
|
-- material_manage.SANMING_STEEL
|
||||||
|
-- material_manage.FUJIAN_SURVEY
|
||||||
|
-- material_manage.FUZHOU_HIGHWAY_BUREAU
|
||||||
|
-- material_manage.FUZHOU_TRANSPORTATION_BUREAU
|
||||||
|
-- material_manage.LOCAL_MATERIAL
|
||||||
|
-- material_manage.MATERIAL
|
||||||
|
-- material_manage.MATERIAL_TASK
|
||||||
|
-- material_manage.DATA_FUJIAN
|
||||||
|
-- material_manage.DATA_GUANGDONG
|
||||||
|
-- material_manage.DATA_NETWORK
|
||||||
|
-- material_manage.DATA_ZHEJIANG
|
||||||
|
-- material_manage.BUDGET
|
||||||
|
-- material_manage.BUDGET_ITEM
|
||||||
|
14
src/main/resources/_sql/init/mysql/v0.3.sql
Normal file
14
src/main/resources/_sql/init/mysql/v0.3.sql
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
create table LOCATION (
|
||||||
|
ID varchar(32) not null comment 'id' primary key,
|
||||||
|
NAME varchar(128) not null comment '名称',
|
||||||
|
LON decimal(16, 7) default 0 comment '经度',
|
||||||
|
LAT decimal(16, 7) default 0 comment '纬度',
|
||||||
|
EXT_JSON longtext null comment '扩展信息',
|
||||||
|
TENANT_ID varchar(20) null comment '租户id',
|
||||||
|
DELETE_FLAG varchar(255) null comment '删除标志',
|
||||||
|
CREATE_TIME datetime null comment '创建时间',
|
||||||
|
CREATE_USER varchar(20) null comment '创建用户',
|
||||||
|
UPDATE_TIME datetime null comment '更新时间',
|
||||||
|
UPDATE_USER varchar(20) null comment '更新人'
|
||||||
|
) comment '料场位置';
|
||||||
|
|
Reference in New Issue
Block a user