| | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | import cn.hutool.core.util.IdUtil; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.common.security.utils.SecurityUtils; |
| | | import com.aps.core.domain.ApsPlanCycle; |
| | |
| | | */ |
| | | @Service |
| | | public class ApsPlanManagementServiceImpl extends ServiceImpl<ApsPlanManagementMapper, ApsPlanManagement> implements IApsPlanManagementService { |
| | | @Resolve |
| | | @Autowired |
| | | private ApsPlanManagementMapper apsPlanManagementMapper; |
| | | |
| | | @Autowired |
| | |
| | | public int insertApsPlanManagement(ApsPlanManagement apsPlanManagement) { |
| | | apsPlanManagement.setCreateTime(DateUtils.getNowDate()); |
| | | apsPlanManagement.setCreateBy(SecurityUtils.getUsername()); |
| | | apsPlanManagement.setId(IdUtil.getSnowflakeNextId()); |
| | | return apsPlanManagementMapper.insertApsPlanManagement(apsPlanManagement); |
| | | } |
| | | |
| | |
| | | if (planCycle == null) { |
| | | apsPlanCycle.setCreateBy(SecurityUtils.getUsername()); |
| | | apsPlanCycle.setCreateTime(DateUtils.getNowDate()); |
| | | apsPlanCycle.setId(IdUtil.getSnowflakeNextId()); |
| | | apsPlanCycleMapper.insert(apsPlanCycle); |
| | | } else { |
| | | BeanUtils.copyProperties(apsPlanCycle, planCycle, "id", "planId"); |