邱宇豪
2023-09-22 07a07e9072946498a7d37c7345f83f9021f5deeb
hd/pipe/engineeringManage/src/main/java/com/thhy/engineering/modules/biz/engineering/service/impl/SysSegmentServiceImpl.java
@@ -3,13 +3,16 @@
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil;
import com.thhy.engineering.modules.biz.engineering.entity.SysProject;
import com.thhy.engineering.modules.biz.engineering.entity.SysSegmentNeed;
import com.thhy.engineering.modules.biz.engineering.entity.SysSegment;
import com.thhy.engineering.modules.biz.engineering.mapper.SysProjectMapper;
import com.thhy.engineering.modules.biz.engineering.mapper.SysSegmentMapper;
import com.thhy.engineering.modules.biz.engineering.service.SysSegmentService;
import com.thhy.general.common.BasicResult;
import com.thhy.general.config.SysUserInfo;
import com.thhy.general.utils.UserInfoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -18,6 +21,9 @@
import java.util.List;
import java.util.Map;
/**
 * 单位工程管理(标段)
 */
@Service
public class SysSegmentServiceImpl implements SysSegmentService {
@@ -28,9 +34,9 @@
    @Transactional
    public BasicResult segmentInsert(Map<String, Object> values) {
        String segmentName = values.get("segmentName").toString();
        String unitProjectName = values.get("unitProjectName").toString();
        String segmentId =  segmentMapper.segmentNameByOne(segmentName);
        String segmentId =  segmentMapper.segmentNameByProjectName(unitProjectName);
        if(!StringUtil.isEmpty(segmentId)){
            return  BasicResult.faild("11111","error","标段名称被占用");
        }
@@ -112,6 +118,4 @@
        }
        return BasicResult.success("修改成功");
    }
}