|
|
@ -29,6 +29,7 @@ import com.epmet.entity.stats.CustomerProjectCategoryDictEntity; |
|
|
|
import com.epmet.service.stats.CustomerProjectCategoryDictService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
@ -67,17 +68,19 @@ public class CustomerProjectCategoryDictServiceImpl extends BaseServiceImpl<Cust |
|
|
|
}); |
|
|
|
updateCategoies.forEach(updatedEntity -> { |
|
|
|
CustomerProjectCategoryDictEntity entity=baseDao.selectByCustomerIdAndId(updatedEntity.getCustomerId(),updatedEntity.getId()); |
|
|
|
if(null!=entity){ |
|
|
|
if (null != entity) { |
|
|
|
entity.setCategoryCode(updatedEntity.getCategoryCode()); |
|
|
|
entity.setCategoryName(updatedEntity.getCategoryName()); |
|
|
|
entity.setParentCategoryCode(updatedEntity.getParentCategoryCode()); |
|
|
|
entity.setLevel(Integer.valueOf(updatedEntity.getCategoryType())); |
|
|
|
if (StringUtils.isNotBlank(updatedEntity.getCategoryType())) { |
|
|
|
entity.setLevel(Integer.valueOf(updatedEntity.getCategoryType())); |
|
|
|
} |
|
|
|
entity.setSort(updatedEntity.getSort()); |
|
|
|
entity.setIsDisable(updatedEntity.getIsDisable()); |
|
|
|
entity.setOriginCreatedTime(updatedEntity.getCreatedTime()); |
|
|
|
entity.setOriginUpdatedTime(updatedEntity.getUpdatedTime()); |
|
|
|
baseDao.updateById(entity); |
|
|
|
} |
|
|
|
baseDao.updateById(entity); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|