| | |
| | | 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; |
| | | |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 单位工程管理(标段) |
| | | */ |
| | | @Service |
| | | public class SysSegmentServiceImpl implements SysSegmentService { |
| | | |
| | |
| | | @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","标段名称被占用"); |
| | | } |
| | |
| | | } |
| | | return BasicResult.success("修改成功"); |
| | | } |
| | | |
| | | |
| | | } |