Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
package org.nl.wms.dispatch_manage.point.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.dispatch_manage.point.service.ISchBasePointService;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.dispatch_manage.point.service.dto.SchBasePointQuery;
|
||||
import org.nl.wms.dispatch_manage.region.service.ISchBaseRegionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位基础表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/point")
|
||||
public class SchBasePointController {
|
||||
@Autowired
|
||||
private ISchBasePointService pointService;
|
||||
@Autowired
|
||||
private ISchBaseRegionService regionService;
|
||||
|
||||
@GetMapping
|
||||
public ResponseEntity<Object> query(SchBasePointQuery whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(pointService.page(page.build(SchBasePoint.class), whereJson.build())), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SchBasePoint entity) {
|
||||
entity.setId(IdUtil.getStringId());
|
||||
entity.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
entity.setCreate_time(DateUtil.now());
|
||||
pointService.save(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SchBasePoint entity) {
|
||||
entity.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
entity.setUpdate_time(DateUtil.now());
|
||||
pointService.updateById(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
pointService.removeByIds(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getRegion")
|
||||
public ResponseEntity<Object> getRegion() {
|
||||
return new ResponseEntity<>(regionService.list(), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.dispatch_manage.point.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.SchBasePoint;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位基础表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package org.nl.wms.dispatch_manage.point.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位基础表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sch_base_point")
|
||||
public class SchBasePoint implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 点位id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 点位编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 点位名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 生产区域
|
||||
*/
|
||||
private String product_area;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
private String region_code;
|
||||
|
||||
/**
|
||||
* 点位类型
|
||||
*/
|
||||
private String point_type;
|
||||
|
||||
/**
|
||||
* 锁定类型
|
||||
*/
|
||||
private String lock_type;
|
||||
|
||||
/**
|
||||
* 点位组编码
|
||||
*/
|
||||
private String group_code;
|
||||
|
||||
/**
|
||||
* 位置
|
||||
*/
|
||||
private String point_location;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private String is_used;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_name;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 表单数据
|
||||
*/
|
||||
private String form_data;
|
||||
|
||||
private String priority;
|
||||
|
||||
/**
|
||||
* 载具编码
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.dispatch_manage.point.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.SchBasePoint;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位基础表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
public interface SchBasePointMapper extends BaseMapper<SchBasePoint> {
|
||||
|
||||
}
|
||||
@@ -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="org.nl.wms.dispatch_manage.point.service.dao.mapper.SchBasePointMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.dispatch_manage.point.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.entity.BaseQuery;
|
||||
import org.nl.common.domain.entity.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.SchBasePoint;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Data
|
||||
public class SchBasePointQuery extends BaseQuery<SchBasePoint> {
|
||||
private String search;
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("search", QParam.builder().k(new String[]{"point_code", "point_name"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.dispatch_manage.point.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.dispatch_manage.point.service.ISchBasePointService;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.mapper.SchBasePointMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位基础表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@Service
|
||||
public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, SchBasePoint> implements ISchBasePointService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package org.nl.wms.dispatch_manage.region.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.dispatch_manage.region.service.ISchBaseRegionService;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.SchBaseRegion;
|
||||
import org.nl.wms.dispatch_manage.region.service.dto.SchBaseRegionQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 区域基础表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/region")
|
||||
public class SchBaseRegionController {
|
||||
|
||||
@Autowired
|
||||
private ISchBaseRegionService regionService;
|
||||
|
||||
@GetMapping
|
||||
public ResponseEntity<Object> query(SchBaseRegionQuery whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(regionService.page(page.build(SchBaseRegion.class), whereJson.build())), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SchBaseRegion entity) {
|
||||
entity.setId(IdUtil.getStringId());
|
||||
entity.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
entity.setCreate_time(DateUtil.now());
|
||||
regionService.save(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SchBaseRegion entity) {
|
||||
entity.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
entity.setUpdate_time(DateUtil.now());
|
||||
regionService.updateById(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
regionService.removeByIds(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.nl.wms.dispatch_manage.region.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.SchBaseRegion;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 区域基础表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
public interface ISchBaseRegionService extends IService<SchBaseRegion> {
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package org.nl.wms.dispatch_manage.region.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 区域基础表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sch_base_region")
|
||||
public class SchBaseRegion implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 是否合并下发任务0否1是
|
||||
*/
|
||||
private String is_merge;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_name;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 表单数据
|
||||
*/
|
||||
private String form_data;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 点位类型说明
|
||||
*/
|
||||
private String type_explain;
|
||||
|
||||
/**
|
||||
* 点位状态说明
|
||||
*/
|
||||
private String status_explain;
|
||||
|
||||
/**
|
||||
* 生产区域
|
||||
*/
|
||||
private String product_area;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.dispatch_manage.region.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.SchBaseRegion;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 区域基础表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
public interface SchBaseRegionMapper extends BaseMapper<SchBaseRegion> {
|
||||
|
||||
}
|
||||
@@ -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="org.nl.wms.dispatch_manage.region.service.dao.mapper.SchBaseRegionMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.dispatch_manage.region.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.entity.BaseQuery;
|
||||
import org.nl.common.domain.entity.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.SchBaseRegion;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Data
|
||||
public class SchBaseRegionQuery extends BaseQuery<SchBaseRegion> {
|
||||
private String search;
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("search", QParam.builder().k(new String[]{"code","name"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.dispatch_manage.region.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.dispatch_manage.region.service.ISchBaseRegionService;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.SchBaseRegion;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.mapper.SchBaseRegionMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 区域基础表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@Service
|
||||
public class SchBaseRegionServiceImpl extends ServiceImpl<SchBaseRegionMapper, SchBaseRegion> implements ISchBaseRegionService {
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user