| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | 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; |
| | |
| | | import com.aps.core.mapper.ApsPlanManagementMapper; |
| | | import com.aps.core.service.IApsPlanManagementService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.simpleframework.xml.core.Resolve; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.Objects; |
| | | |
| | | /** |
| | | * 计划管理Service业务层处理 |
| | |
| | | */ |
| | | @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"); |