|
@ -28,6 +28,7 @@ import com.epmet.dao.IssueProjectCategoryDictDao; |
|
|
import com.epmet.dao.IssueProjectRelationDao; |
|
|
import com.epmet.dao.IssueProjectRelationDao; |
|
|
import com.epmet.dto.IssueDTO; |
|
|
import com.epmet.dto.IssueDTO; |
|
|
import com.epmet.dto.IssueProjectCategoryDictDTO; |
|
|
import com.epmet.dto.IssueProjectCategoryDictDTO; |
|
|
|
|
|
import com.epmet.dto.form.CategoryTagInitFormDTO; |
|
|
import com.epmet.dto.form.CustomerCategoryListFormDTO; |
|
|
import com.epmet.dto.form.CustomerCategoryListFormDTO; |
|
|
import com.epmet.dto.form.ProjectSaveCategoryFormDTO; |
|
|
import com.epmet.dto.form.ProjectSaveCategoryFormDTO; |
|
|
import com.epmet.dto.form.SaveIssueCategoryFormDTO; |
|
|
import com.epmet.dto.form.SaveIssueCategoryFormDTO; |
|
@ -36,8 +37,11 @@ import com.epmet.dto.result.ProjectCategoryDTOResultDTO; |
|
|
import com.epmet.dto.result.ProjectIssueCategoryResultDTO; |
|
|
import com.epmet.dto.result.ProjectIssueCategoryResultDTO; |
|
|
import com.epmet.dto.result.ProjectIssueDTOResultDTO; |
|
|
import com.epmet.dto.result.ProjectIssueDTOResultDTO; |
|
|
import com.epmet.entity.IssueProjectCategoryDictEntity; |
|
|
import com.epmet.entity.IssueProjectCategoryDictEntity; |
|
|
|
|
|
import com.epmet.entity.IssueProjectTagDictEntity; |
|
|
import com.epmet.redis.IssueProjectCategoryDictRedis; |
|
|
import com.epmet.redis.IssueProjectCategoryDictRedis; |
|
|
import com.epmet.service.IssueProjectCategoryDictService; |
|
|
import com.epmet.service.IssueProjectCategoryDictService; |
|
|
|
|
|
import com.epmet.service.IssueProjectTagDictService; |
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
@ -61,6 +65,8 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl<IssuePr |
|
|
private IssueProjectCategoryDictRedis issueProjectCategoryDictRedis; |
|
|
private IssueProjectCategoryDictRedis issueProjectCategoryDictRedis; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private IssueProjectRelationDao issueProjectRelationDao; |
|
|
private IssueProjectRelationDao issueProjectRelationDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private IssueProjectTagDictService issueProjectTagDictService; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageData<IssueProjectCategoryDictDTO> page(Map<String, Object> params) { |
|
|
public PageData<IssueProjectCategoryDictDTO> page(Map<String, Object> params) { |
|
@ -165,4 +171,32 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl<IssuePr |
|
|
return resultDTO; |
|
|
return resultDTO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 客户分类标签数据初始化 |
|
|
|
|
|
* |
|
|
|
|
|
* @param formDTO |
|
|
|
|
|
* @return void |
|
|
|
|
|
* @author zhaoqifeng |
|
|
|
|
|
* @date 2020/12/10 10:02 |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
public void init(CategoryTagInitFormDTO formDTO) { |
|
|
|
|
|
List<IssueProjectCategoryDictEntity> list = baseDao.selectCategoryListByCustomer(formDTO.getCustomerId()); |
|
|
|
|
|
if (CollectionUtils.isEmpty(list)) { |
|
|
|
|
|
//分类初始化
|
|
|
|
|
|
List<IssueProjectCategoryDictEntity> categoryList = baseDao.selectCategoryListByCustomer("default"); |
|
|
|
|
|
categoryList.forEach(item -> { |
|
|
|
|
|
item.setCustomerId(formDTO.getCustomerId()); |
|
|
|
|
|
}); |
|
|
|
|
|
this.insertBatch(categoryList); |
|
|
|
|
|
//标签初始化
|
|
|
|
|
|
List<IssueProjectTagDictEntity> tagList = issueProjectTagDictService.getTagListByCustomer("default"); |
|
|
|
|
|
tagList.forEach(item -> { |
|
|
|
|
|
item.setCustomerId(formDTO.getCustomerId()); |
|
|
|
|
|
}); |
|
|
|
|
|
issueProjectTagDictService.insertBatch(tagList); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |