@ -105,4 +105,6 @@ public interface CustomerDepartmentDao extends BaseDao<CustomerDepartmentEntity>
int updateSubDeptAreaCode(@Param("customerId") String customerId,
@Param("areaCode")String areaCode,
@Param("operateUserId") String operateUserId);
int updateDeptAreaCode(@Param("agencyId")String agencyId, @Param("areaCode")String areaCode);
}
@ -355,4 +355,6 @@ public interface CustomerGridDao extends BaseDao<CustomerGridEntity> {
int updateSubGridAreaCode(@Param("customerId") String customerId,
@Param("agencyId")String agencyId,
int updateGridAreaCode(@Param("agencyId")String agencyId, @Param("areaCode")String areaCode);
@ -192,6 +192,8 @@ public class AgencyServiceImpl implements AgencyService {
originalEntity.setParentAreaCode(parent.getAreaCode());
customerGridDao.updateGridAreaCode(originalEntity.getId(),formDTO.getAreaCode());
customerDepartmentDao.updateDeptAreaCode(originalEntity.getId(),formDTO.getAreaCode());
//1:更新当前组织信息
@ -96,4 +96,12 @@
where customer_id=#{customerId}
AND AREA_CODE LIKE concat(#{areaCode}, '%' )
</update>
<update id="updateDeptAreaCode" parameterType="map">
update customer_department
SET AREA_CODE = #{areaCode},
UPDATED_TIME = NOW()
where del_flag='0'
and agency_id=#{agencyId}
</mapper>
@ -763,4 +763,12 @@
AND pids LIKE concat('%',#{agencyId}, '%' )
<update id="updateGridAreaCode" parameterType="map">
update customer_grid
and pid=#{agencyId}