| | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.constant.BaseConsts; |
| | | import cn.huge.module.ctuser.dao.mapper.CtUnitMapper; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | if (IdUtils.checkNewId(ctUnit.getId())){ |
| | | ctUnit.setId(utilsClient.getNewTimeId()); |
| | | ctUnit.setCreateTime(nowDate); |
| | | }else { |
| | | // 1、更新单位信息时,更新调度规则指标目标组织名称 |
| | | mapper.updateDispNormCauseTargetUnitName(ctUnit.getUnitName(), ctUnit.getId()); |
| | | } |
| | | ctUnit.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(ctUnit); |
| | |
| | | return ctUnit; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * |
| | | * @param ctUnit 对象 |
| | | */ |
| | | public void updateTerms(CtUnit ctUnit) { |
| | | mapper.updateTerms(ctUnit); |
| | | } |
| | | } |