add: 基础架构创建
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
package com.boge.modules.car.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.boge.modules.car.entity.CarEntity;
|
||||
import com.boge.modules.car.service.CarService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:51:45
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("car/car")
|
||||
public class CarController {
|
||||
@Autowired
|
||||
private CarService carService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("car:car:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = carService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{carId}")
|
||||
//@RequiresPermissions("car:car:info")
|
||||
public R info(@PathVariable("carId") Long carId){
|
||||
CarEntity car = carService.getById(carId);
|
||||
|
||||
return R.ok().put("car", car);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("car:car:save")
|
||||
public R save(@RequestBody CarEntity car){
|
||||
carService.save(car);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("car:car:update")
|
||||
public R update(@RequestBody CarEntity car){
|
||||
carService.updateById(car);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("car:car:delete")
|
||||
public R delete(@RequestBody Long[] carIds){
|
||||
carService.removeByIds(Arrays.asList(carIds));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
17
base-fast/src/main/java/com/boge/modules/car/dao/CarDao.java
Normal file
17
base-fast/src/main/java/com/boge/modules/car/dao/CarDao.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.boge.modules.car.dao;
|
||||
|
||||
import com.boge.modules.car.entity.CarEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:51:45
|
||||
*/
|
||||
@Mapper
|
||||
public interface CarDao extends BaseMapper<CarEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.boge.modules.car.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:51:45
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_car")
|
||||
public class CarEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long carId;
|
||||
/**
|
||||
* 车型名称
|
||||
*/
|
||||
private String carName;
|
||||
/**
|
||||
* 导航类型
|
||||
*/
|
||||
private Integer navigationType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Integer isOn;
|
||||
/**
|
||||
* 创建者ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.boge.modules.car.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.modules.car.entity.CarEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:51:45
|
||||
*/
|
||||
public interface CarService extends IService<CarEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.boge.modules.car.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.Query;
|
||||
|
||||
import com.boge.modules.car.dao.CarDao;
|
||||
import com.boge.modules.car.entity.CarEntity;
|
||||
import com.boge.modules.car.service.CarService;
|
||||
|
||||
|
||||
@Service("carService")
|
||||
public class CarServiceImpl extends ServiceImpl<CarDao, CarEntity> implements CarService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<CarEntity> page = this.page(
|
||||
new Query<CarEntity>().getPage(params),
|
||||
new QueryWrapper<CarEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.boge.modules.client.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.boge.modules.client.entity.ClientEntity;
|
||||
import com.boge.modules.client.service.ClientService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:46:19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("client/client")
|
||||
public class ClientController {
|
||||
@Autowired
|
||||
private ClientService clientService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("client:client:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = clientService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{clientId}")
|
||||
//@RequiresPermissions("client:client:info")
|
||||
public R info(@PathVariable("clientId") Long clientId){
|
||||
ClientEntity client = clientService.getById(clientId);
|
||||
|
||||
return R.ok().put("client", client);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("client:client:save")
|
||||
public R save(@RequestBody ClientEntity client){
|
||||
clientService.save(client);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("client:client:update")
|
||||
public R update(@RequestBody ClientEntity client){
|
||||
clientService.updateById(client);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("client:client:delete")
|
||||
public R delete(@RequestBody Long[] clientIds){
|
||||
clientService.removeByIds(Arrays.asList(clientIds));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.boge.modules.client.dao;
|
||||
|
||||
import com.boge.modules.client.entity.ClientEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:46:19
|
||||
*/
|
||||
@Mapper
|
||||
public interface ClientDao extends BaseMapper<ClientEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.boge.modules.client.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:46:19
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_client")
|
||||
public class ClientEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long clientId;
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
private String clientName;
|
||||
/**
|
||||
* 法人代表
|
||||
*/
|
||||
private String juridicalPerson;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 行业
|
||||
*/
|
||||
private String industry;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Integer isOn;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.boge.modules.client.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.modules.client.entity.ClientEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:46:19
|
||||
*/
|
||||
public interface ClientService extends IService<ClientEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.boge.modules.client.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.Query;
|
||||
|
||||
import com.boge.modules.client.dao.ClientDao;
|
||||
import com.boge.modules.client.entity.ClientEntity;
|
||||
import com.boge.modules.client.service.ClientService;
|
||||
|
||||
|
||||
@Service("clientService")
|
||||
public class ClientServiceImpl extends ServiceImpl<ClientDao, ClientEntity> implements ClientService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<ClientEntity> page = this.page(
|
||||
new Query<ClientEntity>().getPage(params),
|
||||
new QueryWrapper<ClientEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.boge.modules.contract.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.boge.modules.contract.entity.ContractEntity;
|
||||
import com.boge.modules.contract.service.ContractService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:33:35
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("flow/contract")
|
||||
public class ContractController {
|
||||
@Autowired
|
||||
private ContractService contractService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("flow:contract:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = contractService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{contractId}")
|
||||
//@RequiresPermissions("flow:contract:info")
|
||||
public R info(@PathVariable("contractId") Integer contractId){
|
||||
ContractEntity contract = contractService.getById(contractId);
|
||||
|
||||
return R.ok().put("contract", contract);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("flow:contract:save")
|
||||
public R save(@RequestBody ContractEntity contract){
|
||||
contractService.save(contract);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("flow:contract:update")
|
||||
public R update(@RequestBody ContractEntity contract){
|
||||
contractService.updateById(contract);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("flow:contract:delete")
|
||||
public R delete(@RequestBody Integer[] contractIds){
|
||||
contractService.removeByIds(Arrays.asList(contractIds));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.boge.modules.contract.dao;
|
||||
|
||||
import com.boge.modules.contract.entity.ContractEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:33:35
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractDao extends BaseMapper<ContractEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.boge.modules.contract.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:33:35
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_contract")
|
||||
public class ContractEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Integer contractId;
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
private Integer contractType;
|
||||
/**
|
||||
* 是否是主合同
|
||||
*/
|
||||
private Integer isMaster;
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private String contractNumber;
|
||||
/**
|
||||
* 客户id
|
||||
*/
|
||||
private Long clientId;
|
||||
/**
|
||||
* 物料信息
|
||||
*/
|
||||
private String materialJson;
|
||||
/**
|
||||
* 是否验收
|
||||
*/
|
||||
private Integer isAcceptance;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private Date acceptanceTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.boge.modules.contract.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.modules.contract.entity.ContractEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:33:35
|
||||
*/
|
||||
public interface ContractService extends IService<ContractEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.boge.modules.contract.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.Query;
|
||||
|
||||
import com.boge.modules.contract.dao.ContractDao;
|
||||
import com.boge.modules.contract.entity.ContractEntity;
|
||||
import com.boge.modules.contract.service.ContractService;
|
||||
|
||||
|
||||
@Service("contractService")
|
||||
public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity> implements ContractService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<ContractEntity> page = this.page(
|
||||
new Query<ContractEntity>().getPage(params),
|
||||
new QueryWrapper<ContractEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,7 +26,7 @@ import com.boge.common.utils.R;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author boge
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-01-09 13:56:25
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author boge
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-01-09 13:56:25
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author boge
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-01-09 13:56:25
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Map;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author boge
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-01-09 13:56:25
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.boge.modules.material.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.boge.modules.material.entity.MaterialEntity;
|
||||
import com.boge.modules.material.service.MaterialService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 20:06:39
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("material/material")
|
||||
public class MaterialController {
|
||||
@Autowired
|
||||
private MaterialService materialService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("material:material:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = materialService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{materialId}")
|
||||
//@RequiresPermissions("material:material:info")
|
||||
public R info(@PathVariable("materialId") Long materialId){
|
||||
MaterialEntity material = materialService.getById(materialId);
|
||||
|
||||
return R.ok().put("material", material);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("material:material:save")
|
||||
public R save(@RequestBody MaterialEntity material){
|
||||
materialService.save(material);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("material:material:update")
|
||||
public R update(@RequestBody MaterialEntity material){
|
||||
materialService.updateById(material);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("material:material:delete")
|
||||
public R delete(@RequestBody Long[] materialIds){
|
||||
materialService.removeByIds(Arrays.asList(materialIds));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.boge.modules.material.dao;
|
||||
|
||||
import com.boge.modules.material.entity.MaterialEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 20:06:39
|
||||
*/
|
||||
@Mapper
|
||||
public interface MaterialDao extends BaseMapper<MaterialEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.boge.modules.material.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 20:06:39
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_material")
|
||||
public class MaterialEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long materialId;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String materialCode;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String materialName;
|
||||
/**
|
||||
* 物料类型
|
||||
*/
|
||||
private Integer materialType;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Integer isOn;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.boge.modules.material.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.modules.material.entity.MaterialEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 20:06:39
|
||||
*/
|
||||
public interface MaterialService extends IService<MaterialEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.boge.modules.material.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.Query;
|
||||
|
||||
import com.boge.modules.material.dao.MaterialDao;
|
||||
import com.boge.modules.material.entity.MaterialEntity;
|
||||
import com.boge.modules.material.service.MaterialService;
|
||||
|
||||
|
||||
@Service("materialService")
|
||||
public class MaterialServiceImpl extends ServiceImpl<MaterialDao, MaterialEntity> implements MaterialService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<MaterialEntity> page = this.page(
|
||||
new Query<MaterialEntity>().getPage(params),
|
||||
new QueryWrapper<MaterialEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,7 +22,7 @@ import com.boge.common.utils.R;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author boge
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2023-05-31 23:44:03
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author boge
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2023-05-31 23:44:03
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author boge
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2023-05-31 23:44:03
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Map;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author boge
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2023-05-31 23:44:03
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.boge.modules.tickets.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.boge.modules.tickets.entity.TicketsEntity;
|
||||
import com.boge.modules.tickets.service.TicketsService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:56:28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("tickets/tickets")
|
||||
public class TicketsController {
|
||||
@Autowired
|
||||
private TicketsService ticketsService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("tickets:tickets:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = ticketsService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{ticketsId}")
|
||||
//@RequiresPermissions("tickets:tickets:info")
|
||||
public R info(@PathVariable("ticketsId") String ticketsId){
|
||||
TicketsEntity tickets = ticketsService.getById(ticketsId);
|
||||
|
||||
return R.ok().put("tickets", tickets);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("tickets:tickets:save")
|
||||
public R save(@RequestBody TicketsEntity tickets){
|
||||
ticketsService.save(tickets);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("tickets:tickets:update")
|
||||
public R update(@RequestBody TicketsEntity tickets){
|
||||
ticketsService.updateById(tickets);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("tickets:tickets:delete")
|
||||
public R delete(@RequestBody String[] ticketsIds){
|
||||
ticketsService.removeByIds(Arrays.asList(ticketsIds));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.boge.modules.tickets.dao;
|
||||
|
||||
import com.boge.modules.tickets.entity.TicketsEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:56:28
|
||||
*/
|
||||
@Mapper
|
||||
public interface TicketsDao extends BaseMapper<TicketsEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.boge.modules.tickets.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:56:28
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_tickets")
|
||||
public class TicketsEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 工单id
|
||||
*/
|
||||
@TableId
|
||||
private String ticketsId;
|
||||
/**
|
||||
* 小车类型
|
||||
*/
|
||||
private Integer carType;
|
||||
/**
|
||||
* 异常类型
|
||||
*/
|
||||
private Integer errorType;
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private String contractNumber;
|
||||
/**
|
||||
* 客户id
|
||||
*/
|
||||
private Long clientId;
|
||||
/**
|
||||
* 故障描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 部门对接人
|
||||
*/
|
||||
private String deptPeople;
|
||||
/**
|
||||
* 客户联系电话
|
||||
*/
|
||||
private String deptPhone;
|
||||
/**
|
||||
* 创建者ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.boge.modules.tickets.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.modules.tickets.entity.TicketsEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-02-26 19:56:28
|
||||
*/
|
||||
public interface TicketsService extends IService<TicketsEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.boge.modules.tickets.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.Query;
|
||||
|
||||
import com.boge.modules.tickets.dao.TicketsDao;
|
||||
import com.boge.modules.tickets.entity.TicketsEntity;
|
||||
import com.boge.modules.tickets.service.TicketsService;
|
||||
|
||||
|
||||
@Service("ticketsService")
|
||||
public class TicketsServiceImpl extends ServiceImpl<TicketsDao, TicketsEntity> implements TicketsService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<TicketsEntity> page = this.page(
|
||||
new Query<TicketsEntity>().getPage(params),
|
||||
new QueryWrapper<TicketsEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
18
base-fast/src/main/resources/mapper/car/CarDao.xml
Normal file
18
base-fast/src/main/resources/mapper/car/CarDao.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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="com.boge.modules.car.dao.CarDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.boge.modules.car.entity.CarEntity" id="carMap">
|
||||
<result property="carId" column="car_id"/>
|
||||
<result property="carName" column="car_name"/>
|
||||
<result property="navigationType" column="navigation_type"/>
|
||||
<result property="remarks" column="remarks"/>
|
||||
<result property="isOn" column="is_on"/>
|
||||
<result property="createUserId" column="create_user_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
18
base-fast/src/main/resources/mapper/client/ClientDao.xml
Normal file
18
base-fast/src/main/resources/mapper/client/ClientDao.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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="com.boge.modules.client.dao.ClientDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.boge.modules.client.entity.ClientEntity" id="clientMap">
|
||||
<result property="clientId" column="client_id"/>
|
||||
<result property="clientName" column="client_name"/>
|
||||
<result property="juridicalPerson" column="juridical_person"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="industry" column="industry"/>
|
||||
<result property="isOn" column="is_on"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
21
base-fast/src/main/resources/mapper/contract/ContractDao.xml
Normal file
21
base-fast/src/main/resources/mapper/contract/ContractDao.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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="com.boge.modules.contract.dao.ContractDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.boge.modules.contract.entity.ContractEntity" id="contractMap">
|
||||
<result property="contractId" column="contract_id"/>
|
||||
<result property="contractType" column="contract_type"/>
|
||||
<result property="isMaster" column="is_master"/>
|
||||
<result property="contractNumber" column="contract_number"/>
|
||||
<result property="clientId" column="client_id"/>
|
||||
<result property="materialJson" column="material_json"/>
|
||||
<result property="isAcceptance" column="is_acceptance"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="acceptanceTime" column="acceptance_time"/>
|
||||
<result property="remarks" column="remarks"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
17
base-fast/src/main/resources/mapper/material/MaterialDao.xml
Normal file
17
base-fast/src/main/resources/mapper/material/MaterialDao.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?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="com.boge.modules.material.dao.MaterialDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.boge.modules.material.entity.MaterialEntity" id="materialMap">
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="materialCode" column="material_code"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="materialType" column="material_type"/>
|
||||
<result property="isOn" column="is_on"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
21
base-fast/src/main/resources/mapper/tickets/TicketsDao.xml
Normal file
21
base-fast/src/main/resources/mapper/tickets/TicketsDao.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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="com.boge.modules.tickets.dao.TicketsDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.boge.modules.tickets.entity.TicketsEntity" id="ticketsMap">
|
||||
<result property="ticketsId" column="tickets_id"/>
|
||||
<result property="carType" column="car_type"/>
|
||||
<result property="errorType" column="error_type"/>
|
||||
<result property="contractNumber" column="contract_number"/>
|
||||
<result property="clientId" column="client_id"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="deptPeople" column="dept_people"/>
|
||||
<result property="deptPhone" column="dept_phone"/>
|
||||
<result property="createUserId" column="create_user_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user