| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanValidators; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import lombok.ToString; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Validator; |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param ardAlarmpointsWell 按井编号查询 |
| | | * @return |
| | | */ |
| | | @Override |
| | | @DataScope(deptAlias = "d",userAlias = "u") |
| | | public List<ArdAlarmpointsWell> selectArdAlarmpointsWellByWellIdLike(ArdAlarmpointsWell ardAlarmpointsWell) { |
| | | return ardAlarmpointsWellMapper.selectArdAlarmpointsWellByWellIdLike(ardAlarmpointsWell); |
| | | } |
| | | |
| | | /** |
| | | * 新增井管理 |
| | | * |
| | | * @param ardAlarmpointsWell 井管理 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public int insertArdAlarmpointsWell(ArdAlarmpointsWell ardAlarmpointsWell) { |
| | | boolean wellIdExists = ardAlarmpointsWellMapper.checkWellIdExists(ardAlarmpointsWell.getWellId()); |
| | | if(wellIdExists) |
| | | { |
| | | throw new RuntimeException("井号已存在"); |
| | | } |
| | | ardAlarmpointsWell.setUserId(SecurityUtils.getUserId()); |
| | | ardAlarmpointsWell.setCreateBy(SecurityUtils.getUsername()); |
| | | ardAlarmpointsWell.setCreateTime(DateUtils.getNowDate()); |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public int updateArdAlarmpointsWell(ArdAlarmpointsWell ardAlarmpointsWell) { |
| | | boolean wellIdExists = ardAlarmpointsWellMapper.checkWellIdExists(ardAlarmpointsWell.getWellId()); |
| | | if(wellIdExists) |
| | | { |
| | | throw new RuntimeException("井号已存在"); |
| | | } |
| | | ardAlarmpointsWell.setUpdateBy(SecurityUtils.getUsername()); |
| | | ardAlarmpointsWell.setUpdateTime(DateUtils.getNowDate()); |
| | | return ardAlarmpointsWellMapper.updateArdAlarmpointsWell(ardAlarmpointsWell); |