package com.zhgd.xmgl.modules.basicdata.service.impl;

import com.zhgd.xmgl.modules.basicdata.entity.Company;
import com.zhgd.xmgl.modules.basicdata.mapper.CompanyMapper;
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.UUID;

/**
 * @Description: 参建单位
 * @author： pengj
 * @date：   2023-03-13
 * @version： V1.0
 */
@Service
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements ICompanyService {

    @Override
    public boolean saveInfo(Company company) {
        String uuid = UUID.randomUUID().toString().replace("-", "").toUpperCase();
        company.setCompanySn(uuid);
        return this.save(company);
    }
}
