feat(bid): 完成物料管理模块全功能开发
1. 新增物料详情页路由、菜单与接口,支持查看物料报价与信息 2. 重构物料列表页面,新增品牌筛选、表格样式优化与详情跳转 3. 扩展物料实体与数据库字段,新增材质、用途、性能参数等字段 4. 新增供应商/甲方报价查询、批量对比、同名称物料匹配接口 5. 新增物料详情组件,包含基础信息、供应商报价、甲方报价标签页 6. 修复比价路由跳转路径错误,调整数据库密码配置 7. 新增物料相关SQL脚本与初始化数据
This commit is contained in:
@@ -54,4 +54,65 @@ public class BizMaterialController extends BaseController {
|
||||
public AjaxResult remove(@PathVariable Long[] materialIds) {
|
||||
return toAjax(service.deleteBizMaterialByIds(materialIds));
|
||||
}
|
||||
|
||||
// ========== 物料详情页接口 ==========
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:material:detail')")
|
||||
@GetMapping("/{id}/supplier-quotes")
|
||||
public AjaxResult supplierQuotes(@PathVariable Long id) {
|
||||
return success(service.selectSupplierQuotesByMaterialId(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:material:detail')")
|
||||
@GetMapping("/{id}/client-quotes")
|
||||
public AjaxResult clientQuotes(@PathVariable Long id) {
|
||||
return success(service.selectClientQuotesByMaterialId(id));
|
||||
}
|
||||
|
||||
@GetMapping("/manufacturer/list")
|
||||
public AjaxResult manufacturerList() {
|
||||
return success(service.selectManufacturerList());
|
||||
}
|
||||
|
||||
// ========== 物料横向对比 ==========
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:material:list')")
|
||||
@PostMapping("/compare")
|
||||
public AjaxResult compare(@RequestBody List<Long> materialIds) {
|
||||
if (materialIds == null || materialIds.isEmpty()) {
|
||||
return error("请至少选择两个物料进行对比");
|
||||
}
|
||||
if (materialIds.size() > 10) {
|
||||
return error("一次最多对比10个物料");
|
||||
}
|
||||
return success(service.compareMaterials(materialIds));
|
||||
}
|
||||
|
||||
// ========== 同类型物料横向对比 ==========
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:material:list')")
|
||||
@GetMapping("/selectable-for-comparison")
|
||||
public AjaxResult getSelectableMaterials() {
|
||||
return success(service.selectMaterialsWithSupplierQuotes());
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:material:list')")
|
||||
@GetMapping("/same-name/{materialName}")
|
||||
public AjaxResult getSameNameMaterials(@PathVariable String materialName,
|
||||
@RequestParam(required = false) Long excludeId) {
|
||||
List<BizMaterial> list = service.selectMaterialsByExactName(materialName, excludeId);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bid:material:list')")
|
||||
@PostMapping("/quote-comparison")
|
||||
public AjaxResult getQuoteComparison(@RequestBody List<Long> materialIds) {
|
||||
if (materialIds == null || materialIds.isEmpty()) {
|
||||
return error("请至少选择一个物料");
|
||||
}
|
||||
if (materialIds.size() > 10) {
|
||||
return error("一次最多对比10个物料");
|
||||
}
|
||||
return success(service.selectSupplierQuoteComparison(materialIds));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ spring:
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: password
|
||||
password: 135827
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
||||
Reference in New Issue
Block a user