Commit 1995bf45 by huluobin

update

parent 5b4e0ae2
...@@ -56,4 +56,11 @@ public class CostTemplateColController { ...@@ -56,4 +56,11 @@ public class CostTemplateColController {
return CostResult.success(resp); return CostResult.success(resp);
} }
@ApiOperation("/根据模版字段获取字段详情")
@PostMapping("/queryById")
public CostResult<CostTemplateCol> queryById(@RequestParam Integer id) {
CostTemplateCol resp = costTemplateColService.queryById(id);
return CostResult.success(resp);
}
} }
...@@ -74,4 +74,13 @@ public interface ICostTemplateBaseColService extends IService<CostTemplateBaseCo ...@@ -74,4 +74,13 @@ public interface ICostTemplateBaseColService extends IService<CostTemplateBaseCo
* @param costTemplateColList req * @param costTemplateColList req
*/ */
void setCostTemplateBaseCol(List<CostTemplateCol> costTemplateColList); void setCostTemplateBaseCol(List<CostTemplateCol> costTemplateColList);
/**
* <p>
* 补全聚合
* </p>
*
* @param costTemplateCol req
*/
void setCostTemplateBaseCol(CostTemplateCol costTemplateCol);
} }
...@@ -72,4 +72,13 @@ public interface ICostTemplateColService extends IService<CostTemplateCol> { ...@@ -72,4 +72,13 @@ public interface ICostTemplateColService extends IService<CostTemplateCol> {
* @return res * @return res
*/ */
List<CostTemplateCol> queryList(CostTemplateColApiReq.QueryListReq req); List<CostTemplateCol> queryList(CostTemplateColApiReq.QueryListReq req);
/**
* <p>
* 根据模版字段获取字段详情
* </p>
* @param id id
* @return desc
*/
CostTemplateCol queryById(Integer id);
} }
...@@ -68,4 +68,10 @@ public class CostTemplateBaseColServiceImpl extends ServiceImpl<CostTemplateBase ...@@ -68,4 +68,10 @@ public class CostTemplateBaseColServiceImpl extends ServiceImpl<CostTemplateBase
costTemplateColList.forEach(costTemplateCol -> costTemplateCol.setCostTemplateBaseCol(costTemplateBaseColMap.get(costTemplateCol.getCostTemplateBaseColId()))); costTemplateColList.forEach(costTemplateCol -> costTemplateCol.setCostTemplateBaseCol(costTemplateBaseColMap.get(costTemplateCol.getCostTemplateBaseColId())));
} }
} }
@Override
public void setCostTemplateBaseCol(CostTemplateCol costTemplateCol) {
CostTemplateBaseCol costTemplateBaseCol = this.getById(costTemplateCol.getCostTemplateBaseColId());
costTemplateCol.setCostTemplateBaseCol(costTemplateBaseCol);
}
} }
...@@ -125,4 +125,11 @@ public class CostTemplateColServiceImpl extends ServiceImpl<CostTemplateColMappe ...@@ -125,4 +125,11 @@ public class CostTemplateColServiceImpl extends ServiceImpl<CostTemplateColMappe
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
@Override
public CostTemplateCol queryById(Integer id) {
CostTemplateCol costTemplateCol = this.getById(id);
costTemplateBaseColService.setCostTemplateBaseCol(costTemplateCol);
return costTemplateCol;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment