| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.aps.common.security.utils.DictUtils; |
| | | import com.aps.system.api.domain.SysDictData; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | /** |
| | | * 查询焊缝-临时列表 |
| | | */ |
| | | @RequiresPermissions("gasPipingTemp:gasPipingTemp:list") |
| | | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ApsWeldSeamTemp apsWeldSeamTemp) |
| | | { |
| | | // startPage(); |
| | | List<ApsWeldSeamTemp> list = apsWeldSeamTempService.selectApsWeldSeamTempList(apsWeldSeamTemp); |
| | | //工单类型 |
| | | List<SysDictData> workOrderTypes = DictUtils.getDictCache("aps_weld_work_order_type"); |
| | | //分类 |
| | | List<SysDictData> classification = DictUtils.getDictCache("aps_weld_classification"); |
| | | |
| | | list.forEach(tmp->{ |
| | | classification.stream().filter(t->t.getDictValue().equals(tmp.getClassification())) |
| | | .findFirst().ifPresent(t->{ tmp.setClassification(t.getDictLabel());}) ; |
| | | workOrderTypes.stream().filter(t->t.getDictValue().equals(tmp.getWorkOrderType())) |
| | | .findFirst().ifPresent(t->{ tmp.setWorkOrderType(t.getDictLabel());}) ; |
| | | }); |
| | | |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出焊缝-临时列表 |
| | | */ |
| | | @RequiresPermissions("gasPipingTemp:gasPipingTemp:export") |
| | | @RequiresPermissions("weldSeamTemp:weldSeamTemp:export") |
| | | @Log(title = "焊缝-临时", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ApsWeldSeamTemp apsWeldSeamTemp) |
| | |
| | | /** |
| | | * 获取焊缝-临时详细信息 |
| | | */ |
| | | @RequiresPermissions("gasPipingTemp:gasPipingTemp:query") |
| | | @RequiresPermissions("weldSeamTemp:weldSeamTemp:query") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) |
| | | { |
| | |
| | | /** |
| | | * 新增焊缝-临时 |
| | | */ |
| | | @RequiresPermissions("gasPipingTemp:gasPipingTemp:add") |
| | | @RequiresPermissions("weldSeamTemp:weldSeamTemp:add") |
| | | @Log(title = "焊缝-临时", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ApsWeldSeamTemp apsWeldSeamTemp) |
| | |
| | | /** |
| | | * 修改焊缝-临时 |
| | | */ |
| | | @RequiresPermissions("gasPipingTemp:gasPipingTemp:edit") |
| | | @RequiresPermissions("weldSeamTemp:weldSeamTemp:edit") |
| | | @Log(title = "焊缝-临时", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ApsWeldSeamTemp apsWeldSeamTemp) |
| | |
| | | /** |
| | | * 删除焊缝-临时 |
| | | */ |
| | | @RequiresPermissions("gasPipingTemp:gasPipingTemp:remove") |
| | | @RequiresPermissions("weldSeamTemp:weldSeamTemp:remove") |
| | | @Log(title = "焊缝-临时", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) |