liusheng
2024-04-09 4207b9bd1dd2f81eea512a82085c4083be5e6d44
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;
@@ -52,6 +53,7 @@
    //@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);
@@ -83,13 +85,16 @@
     */
    //@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);
    }
    /**