liusheng
2024-05-16 c678e5fe694f06b023369ca0fc5d2f1cf50f6599
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceExternalpersonController.java
@@ -4,6 +4,7 @@
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;
@@ -49,9 +50,10 @@
    /**
     * 查询外围单位人员列表
     */
    //@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);
@@ -60,7 +62,7 @@
    /**
     * 导出外围单位人员列表
     */
    //@PreAuthorize("@ss.hasPermi('project:externalperson:export')")
    //// @PreAuthorize("@ss.hasPermi('project:externalperson:export')")
    @Log(title = "外围单位人员", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(ServiceExternalperson serviceExternalperson) {
@@ -72,7 +74,7 @@
    /**
     * 获取外围单位人员详细信息
     */
    //@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));
@@ -81,21 +83,24 @@
    /**
     * 新增外围单位人员
     */
    //@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
@@ -106,7 +111,7 @@
    /**
     * 删除外围单位人员
     */
    //@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) {