Merge remote-tracking branch 'origin/master'

master
wujingtao 3 years ago
commit 6b68ce0df0

@ -7,6 +7,7 @@ import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
@ -31,4 +32,15 @@ public interface OrganizeRepository extends JpaRepository<Organize, Long>, JpaSp
@Modifying @Modifying
@Query(value = "update tb_organize set organize_task_num = ?2 where id = ?1",nativeQuery = true) @Query(value = "update tb_organize set organize_task_num = ?2 where id = ?1",nativeQuery = true)
void updateByOrganizeTaskNum(Long deptId, int organizeTaskNum); void updateByOrganizeTaskNum(Long deptId, int organizeTaskNum);
/**
*
*
* @param strLabel string
* @param id id
*/
@Modifying
@Query("update Organize o set o.organizeLabel = ?1 where o.id = ?2 ")
void updateOrganizeLabelById(String strLabel, Long id);
} }

@ -1,5 +1,6 @@
package com.baiye.modules.system.service.impl; package com.baiye.modules.system.service.impl;
import cn.hutool.json.JSONUtil;
import com.baiye.constant.DefaultNumberConstants; import com.baiye.constant.DefaultNumberConstants;
import com.baiye.feign.AssignDataClient; import com.baiye.feign.AssignDataClient;
import com.baiye.feign.SourceClueClient; import com.baiye.feign.SourceClueClient;
@ -29,6 +30,7 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.*; import java.util.*;
@ -171,6 +173,12 @@ public class OrganizeServiceImpl implements OrganizeService {
public ResponseEntity<Object> saveMemberDistribution(OrganizeMemberDistributionDTO organizeMemberDistributionDTO) { public ResponseEntity<Object> saveMemberDistribution(OrganizeMemberDistributionDTO organizeMemberDistributionDTO) {
List<Long> userIds = organizeMemberDistributionDTO.getUserIds(); List<Long> userIds = organizeMemberDistributionDTO.getUserIds();
Long organizeId = organizeMemberDistributionDTO.getOrganizeId(); Long organizeId = organizeMemberDistributionDTO.getOrganizeId();
// 修改组内标签
if (!CollectionUtils.isEmpty(organizeMemberDistributionDTO.getSourceLabel())) {
organizeRepository.updateOrganizeLabelById
(JSONUtil.toJsonStr(organizeMemberDistributionDTO.getSourceLabel()), organizeId);
}
// 新增小组成员 // 新增小组成员
for (Long userId : userIds) { for (Long userId : userIds) {
OrganizeUser organizeUser = new OrganizeUser(); OrganizeUser organizeUser = new OrganizeUser();
@ -198,6 +206,7 @@ public class OrganizeServiceImpl implements OrganizeService {
*/ */
@Override @Override
public List<UserDto> selectMemberList(OrganizeQueryCriteria organizeQueryCriteria) { public List<UserDto> selectMemberList(OrganizeQueryCriteria organizeQueryCriteria) {
// TODO
//查询所有用户 //查询所有用户
List<UserDto> userDtoList = userService.queryAll(new UserQueryCriteria()); List<UserDto> userDtoList = userService.queryAll(new UserQueryCriteria());
// 任务内组员用户ID集合 // 任务内组员用户ID集合

Loading…
Cancel
Save