Design Concept:
Because the country uses prefecture-level cities as the smallest unit, there will be more than 3200, and then the number of employees is 100, there will be a minimum of 320000 relationship settings, the control is fine enough, however, permission control is complicated.
Therefore, the [regional group] concept is added to divide the country into regional groups according to business needs.
1. Employees and investment promotion managers, and investment promotion specialists (with no regional attributes)
Defined Region group> RegionRelationship, Employee and investment manager, Investment Promotion specialistYou can define the relationship between the region groups. If there is no region attribute, you can view the region group information.
2. Investment Manager (with Regional Attributes)
Same Definition Region group and regionBut if a person has a region attribute, The data in the region range is used as the query range.
1. Monthly purchases (monthly agent purchase details are queried)
Requirement: this function should be able to check the incoming goods of agents in the current user's group region
Query the sales details of the specified group region or region within a certain period of time (relative to the Head Office)
Obtain the Group area that can be queried by the current user.
1.1EmployeesWhen a user purchases goods, all agents in the region can be queried Based on the defined group region (that is, the sales details of the current group region)
1.2AgentThe region of the current agent group.