Browse Source

Merge remote-tracking branch 'origin/dev'

dev_shibei_match
yinzuomei 5 years ago
parent
commit
07b2e17e7a
  1. 12
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml
  2. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  3. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java
  4. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  5. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/DepartmentServiceImpl.java
  6. 8
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  7. 8
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml
  8. 6
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

12
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml

@ -21,7 +21,7 @@
</when>
<!-- 默认查注册用户 -->
<otherwise>
AND REGISTER = '1'
AND FIRST_REGISTER = '1'
</otherwise>
</choose>
@ -56,7 +56,7 @@
</when>
<!-- 默认查注册用户 -->
<otherwise>
AND REGISTER = '1'
AND FIRST_REGISTER = '1'
</otherwise>
</choose>
<choose>
@ -95,7 +95,7 @@
</when>
<!-- 默认查注册用户 -->
<otherwise>
AND REGISTER = '1'
AND FIRST_REGISTER = '1'
</otherwise>
</choose>
@ -135,7 +135,7 @@
</when>
<!-- 默认查注册用户 -->
<otherwise>
AND REGISTER = '1'
AND FIRST_REGISTER = '1'
</otherwise>
</choose>
@ -303,7 +303,7 @@
</when>
<!-- 默认查注册用户 -->
<otherwise>
AND REGISTER = '1'
AND FIRST_REGISTER = '1'
</otherwise>
</choose>
@ -336,7 +336,7 @@
</when>
<!-- 默认查注册用户 -->
<otherwise>
AND REGISTER = '1'
AND FIRST_REGISTER = '1'
</otherwise>
</choose>

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -206,4 +206,14 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @author sun
**/
List<OrganizeTreeResultDTO> selectAllSub(@Param("agencyId") String agencyId);
/**
* @param agencyId 组织id
* @param operateUserId 当前操作人
* @return int
* @author yinzuomei
* @description
* @Date 2020/12/15 10:04
**/
int delByAgencyId(@Param("agencyId") String agencyId, @Param("operateUserId") String operateUserId);
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java

@ -18,12 +18,10 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerDepartmentDTO;
import com.epmet.dto.CustomerIdDTO;
import com.epmet.dto.result.AgencyDeptList;
import com.epmet.dto.result.DepartmentListResultDTO;
import com.epmet.dto.result.SubListResultDTO;
import com.epmet.entity.CustomerDepartmentEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -93,4 +91,14 @@ public interface CustomerDepartmentDao extends BaseDao<CustomerDepartmentEntity>
* @return void
*/
void deleteStaffDep(@Param("staffId") String staffId);
/**
* @return int
* @param deptId 部门id
* @param operateUserId 当前操作人id
* @author yinzuomei
* @description
* @Date 2020/12/15 10:05
**/
int delDeptById(@Param("deptId")String deptId,@Param("operateUserId") String operateUserId);
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java

@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerAgencyConstant;
@ -67,7 +68,8 @@ public class AgencyServiceImpl implements AgencyService {
private StaffServiceImpl staffServiceImpl;
@Autowired
private CustomerGridDao customerGridDao;
@Autowired
private LoginUserUtil loginUserUtil;
/**
* @param formDTO
* @return
@ -199,7 +201,7 @@ public class AgencyServiceImpl implements AgencyService {
return result;
}
//4:删除当前机关组织(逻辑删)
if (customerAgencyDao.deleteById(formDTO.getAgencyId()) < NumConstant.ONE) {
if (customerAgencyDao.delByAgencyId(formDTO.getAgencyId(),loginUserUtil.getLoginUserId()) < NumConstant.ONE) {
log.error(CustomerAgencyConstant.DEL_EXCEPTION);
throw new RenException(CustomerAgencyConstant.DEL_EXCEPTION);
}

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/DepartmentServiceImpl.java

@ -21,16 +21,16 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerDepartmentConstant;
import com.epmet.dao.CustomerAgencyDao;
import com.epmet.dao.CustomerDepartmentDao;
import com.epmet.dao.CustomerStaffDepartmentDao;
import com.epmet.dto.CustomerIdDTO;
import com.epmet.dto.CustomerDepartmentDTO;
import com.epmet.dto.CustomerIdDTO;
import com.epmet.dto.CustomerStaffDepartmentDTO;
import com.epmet.dto.StaffRoleDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.entity.CustomerAgencyEntity;
@ -49,7 +49,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@ -73,7 +72,8 @@ public class DepartmentServiceImpl implements DepartmentService {
private CustomerStaffDepartmentService customerStaffDepartmentService;
@Autowired
private EpmetUserFeignClient epmetUserFeignClient;
@Autowired
private LoginUserUtil loginUserUtil;
/**
* @param formDTO
* @return
@ -139,7 +139,7 @@ public class DepartmentServiceImpl implements DepartmentService {
return result;
}
//2:删除部门信息(逻辑删)
if (customerDepartmentDao.deleteById(formDTO.getDepartmentId()) < NumConstant.ONE) {
if (customerDepartmentDao.delDeptById(formDTO.getDepartmentId(),loginUserUtil.getLoginUserId()) < NumConstant.ONE) {
log.error(CustomerDepartmentConstant.DEL_EXCEPTION);
throw new RenException(CustomerDepartmentConstant.DEL_EXCEPTION);
}

8
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -381,4 +381,12 @@
<select id="getAgencyElementTree" resultMap="elementTreeAgency">
select id,organization_name,customer_id from customer_agency where pid = #{pid} and customer_id = #{customerId}
</select>
<update id="delByAgencyId" parameterType="map">
update customer_agency
set updated_by = #{operateUserId},
del_flag = '1',
UPDATED_TIME=NOW()
where id=#{agencyId}
</update>
</mapper>

8
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml

@ -76,4 +76,12 @@
AND ca.del_flag = '0'
AND cd.agency_id = #{agencyId}
</select>
<update id="delDeptById" parameterType="map">
update customer_department
set updated_by = #{operateUserId},
del_flag = '1',
UPDATED_TIME=NOW()
where id=#{deptId}
</update>
</mapper>

6
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

@ -194,7 +194,8 @@
set
grid_name = #{gridName},
manage_district = #{manageDistrict},
updated_by = #{updatedBy}
updated_by = #{updatedBy},
UPDATED_TIME=NOW()
where
id = #{id}
</update>
@ -205,7 +206,8 @@
customer_grid
set
updated_by = #{userId},
del_flag = 1
del_flag = 1,
UPDATED_TIME=NOW()
where
id = #{gridId}
</update>

Loading…
Cancel
Save