feat: 新增甲方客户管理模块及配套功能
1. 新增甲方客户CRUD接口、前端页面与权限控制 2. 新增发货单管理模块,包含订单状态流转 3. 修复系统菜单名称乱码问题 4. 新增项目启动脚本与数据库初始化脚本 5. 新增相关实体类、Mapper、Service实现 6. 补充项目设计文档与忽略配置
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
package com.ruoyi.web.controller.bid;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.bid.BizClient;
|
||||
import com.ruoyi.system.service.bid.IBizClientService;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/bid/client")
|
||||
public class BizClientController extends BaseController {
|
||||
@Autowired
|
||||
private IBizClientService service;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:client:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BizClient query) {
|
||||
startPage();
|
||||
List<BizClient> list = service.selectBizClientList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:client:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return success(service.selectBizClientById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:client:add')")
|
||||
@Log(title = "甲方客户", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BizClient record) {
|
||||
record.setCreateBy(getUsername());
|
||||
return toAjax(service.insertBizClient(record));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:client:edit')")
|
||||
@Log(title = "甲方客户", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BizClient record) {
|
||||
record.setUpdateBy(getUsername());
|
||||
return toAjax(service.updateBizClient(record));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:client:remove')")
|
||||
@Log(title = "甲方客户", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{clientIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] clientIds) {
|
||||
return toAjax(service.deleteBizClientByIds(clientIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询客户的关联历史发货单
|
||||
* 链路: client → client_quote → rfq → delivery_order
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bid:client:query')")
|
||||
@GetMapping("/{clientId}/orders")
|
||||
public AjaxResult clientOrders(@PathVariable Long clientId) {
|
||||
return success(service.selectClientDeliveryOrders(clientId));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.ruoyi.web.controller.bid;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.bid.BizDeliveryOrder;
|
||||
import com.ruoyi.system.service.bid.IBizDeliveryOrderService;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/bid/delivery")
|
||||
public class BizDeliveryOrderController extends BaseController {
|
||||
@Autowired
|
||||
private IBizDeliveryOrderService service;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:order:pending') or @ss.hasPermi('bid:order:transit') or @ss.hasPermi('bid:order:history')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BizDeliveryOrder query) {
|
||||
startPage();
|
||||
List<BizDeliveryOrder> list = service.selectBizDeliveryOrderList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:order:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return success(service.selectBizDeliveryOrderById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:order:status')")
|
||||
@Log(title = "发货管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BizDeliveryOrder record) {
|
||||
record.setCreateBy(getUsername());
|
||||
return toAjax(service.insertBizDeliveryOrder(record));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:order:status')")
|
||||
@Log(title = "发货管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BizDeliveryOrder record) {
|
||||
record.setUpdateBy(getUsername());
|
||||
return toAjax(service.updateBizDeliveryOrder(record));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:order:pending')")
|
||||
@Log(title = "发货管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{doIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] doIds) {
|
||||
return toAjax(service.deleteBizDeliveryOrderByIds(doIds));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user