| | |
| | | import java.util.Calendar; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.domain.BaseOnlyvalue; |
| | | import com.ruoyi.project.service.IBaseOnlyvalueService; |
| | | import com.ruoyi.web.controller.common.OnlyValueCommon; |
| | |
| | | /** |
| | | * 查询外围单位人员列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:externalperson:list')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:externalperson:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceExternalperson serviceExternalperson) { |
| | | logger.info("询外围单位人员列表的入参为 :{}", serviceExternalperson); |
| | | startPage(); |
| | | List<ServiceExternalperson> list = serviceExternalpersonService.queryList(serviceExternalperson); |
| | | return getDataTable(list); |
| | |
| | | /** |
| | | * 导出外围单位人员列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:externalperson:export')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:externalperson:export')") |
| | | @Log(title = "外围单位人员", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(ServiceExternalperson serviceExternalperson) { |
| | |
| | | /** |
| | | * 获取外围单位人员详细信息 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:externalperson:query')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:externalperson:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(serviceExternalpersonService.getById(id)); |
| | |
| | | /** |
| | | * 新增外围单位人员 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:externalperson:add')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:externalperson:add')") |
| | | @Log(title = "外围单位人员", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceExternalperson serviceExternalperson) { |
| | | String zj = onlyValueCommon.addOnlyValue("zj"); |
| | | String formattedNumber = String.format("%05d", zj); |
| | | serviceExternalperson.setUserno(formattedNumber); |
| | | return toAjax(serviceExternalpersonService.save(serviceExternalperson)); |
| | | if (StringUtils.isEmpty(serviceExternalperson.getUserno())) { |
| | | String zj = onlyValueCommon.addOnlyValue("zj"); |
| | | String formattedNumber = String.format("%05d", zj); |
| | | serviceExternalperson.setUserno(formattedNumber); |
| | | } |
| | | boolean save1 = serviceExternalpersonService.save(serviceExternalperson); |
| | | return AjaxResult.success(serviceExternalperson); |
| | | } |
| | | |
| | | /** |
| | | * 修改外围单位人员 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:externalperson:edit')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:externalperson:edit')") |
| | | @Log(title = "外围单位人员", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/editZJInfo") |
| | | @RepeatSubmit |
| | |
| | | /** |
| | | * 删除外围单位人员 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:externalperson:remove')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:externalperson:remove')") |
| | | @Log(title = "外围单位人员", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |