| | |
| | | import com.ruoyi.basic.entity.CoalInfo; |
| | | import com.ruoyi.basic.mapper.CoalInfoMapper; |
| | | import com.ruoyi.basic.service.CoalInfoService; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | CoalInfo coalInfo = new CoalInfo(); |
| | | BeanUtils.copyProperties(coalInfoDto, coalInfo); |
| | | coalInfo.setMaintainerId(SecurityUtils.getUserId()); |
| | | coalInfo.setMaintenanceDate(DateUtils.getNowDate()); |
| | | coalInfo.setMaintenanceDate(LocalDate.now()); |
| | | if (Objects.isNull(coalInfoDto.getId())) { |
| | | return coalInfoMapper.insert(coalInfo); |
| | | } else { |