preface:
With the development of science and technology and the unique living environment, more and more people pursue the progress of science and technology. Therefore, in today's architectural decoration engineering, we should not only consider the needs of customers and the coordination and unity with the building structure, but also consider the cost and construction organization arrangement. Therefore, modern decoration engineering is a relatively cumbersome but must be done well. While completing the work content with quality and quantity, it is also necessary to ensure the standard data of construction acceptance. Through learning Java related development knowledge for a period of time, we have a basic understanding of various process flows and characteristics in the construction process. We can simply make a decoration acceptance management system by using JavaSpringboot+layui, which is suitable for simple learning and reference.
🍅 Get the source code at the end of the article 🍅
Main design:
- Hydropower acceptance
Main functions:
(1) List query
Functions: query, add, modify, delete and export.
Query fields: serial number, project name, project type, project address, input person, input date, person in charge of the site, designer, supervisor, contract amount, construction date, end date, material brand, construction personnel, assessment results and remarks.
(2) Business document
Function: add water and electricity assessment content
Operation fields: project name, project type, project address, input person, input date, person in charge of the site, designer, supervisor, contract amount, construction date, end date, material brand, construction personnel, assessment results and remarks.
- Bricklayer acceptance
(1) List query
Functions: query, add, modify, delete and export.
Query fields: serial number, project name, project type, project address, input person, input date, person in charge of the site, designer, supervisor, contract amount, construction date, end date, material brand, construction personnel, assessment results and remarks.
(2) Business document
Function: add bricklayer assessment content
Operation fields: project name, project type, project address, input person, input date, person in charge of the site, designer, supervisor, contract amount, construction date, end date, material brand, construction personnel, assessment results and remarks.
- Woodworking acceptance
(1) List query
Functions: query, add, modify, delete and export.
Query fields: serial number, project name, project type, project address, input person, input date, person in charge of the site, designer, supervisor, contract amount, construction date, end date, material brand, construction personnel, assessment results and remarks.
(2) Business document
Function: add woodworking assessment content
Operation fields: project name, project type, project address, input person, input date, person in charge of the site, designer, supervisor, contract amount, construction date, end date, material brand, construction personnel, assessment results and remarks.
- Painter acceptance
(1) List query
Functions: query, add, modify, delete and export.
Query fields: serial number, project name, project type, project address, input person, input date, person in charge of the site, designer, supervisor, contract amount, construction date, end date, material brand, construction personnel, assessment results and remarks.
(2) Business document
Function: add paint assessment content
Operation fields: project name, project type, project address, input person, input date, person in charge of the site, designer, supervisor, contract amount, construction date, end date, material brand, construction personnel, assessment results and remarks.
- Acceptance after construction
(1) List query
Functions: query, add, modify, delete and export.
Query fields: serial number, project name, project type, project address, input person, input date, person in charge of the site, designer, supervisor, contract amount, construction date, end date, material brand, construction personnel, assessment results and remarks.
(2) Business document
Function: add construction end assessment content
Operation fields: project name, project type, project address, input person, input date, person in charge of the site, designer, supervisor, contract amount, construction date, end date, material brand, construction personnel, assessment results and remarks.
Function screenshot:
Administrator login:
System home page:
User management:
Role management:
Menu management:
SQL monitoring:
Hydropower acceptance:
Data export:
Woodworking acceptance:
Change Password:
Code implementation:
Decoration acceptance controller:
@RestController @RequestMapping("/sys/ysWater") public class YsWaterController extends AbstractController { @Autowired private YsWaterService ysWaterervice; @RequestMapping("/wgList") public R wgList(@RequestParam Map<String, Object> params){ params.put("ysType","Bricklayer decoration acceptance"); PageUtils page = ysWaterervice.queryPage(params); return R.ok().put("page", page); } @RequestMapping("/wgDjList") public R wgDjList(@RequestParam Map<String, Object> params){ params.put("ysType","Bricklayer business document"); PageUtils page = ysWaterervice.queryPage(params); return R.ok().put("page", page); } @Autowired private YsWaterServiceImpl ysWaterServiceImpl; @RequestMapping("/waterList") public R waterList(@RequestParam Map<String, Object> params){ params.put("ysType","Acceptance of hydropower decoration"); PageUtils page = ysWaterervice.queryPage(params); return R.ok().put("page", page); } @RequestMapping("/waterDjList") public R waterDjList(@RequestParam Map<String, Object> params){ params.put("ysType","Hydropower business document"); PageUtils page = ysWaterervice.queryPage(params); return R.ok().put("page", page); } @RequestMapping("/mgList") public R mgList(@RequestParam Map<String, Object> params){ params.put("ysType","Acceptance of woodworking decoration"); PageUtils page = ysWaterervice.queryPage(params); return R.ok().put("page", page); } @RequestMapping("/mgDjList") public R mgDjList(@RequestParam Map<String, Object> params){ params.put("ysType","Woodworking business document"); PageUtils page = ysWaterervice.queryPage(params); return R.ok().put("page", page); } @RequestMapping("/yqgList") public R yqgList(@RequestParam Map<String, Object> params){ params.put("ysType","Painter decoration acceptance"); PageUtils page = ysWaterervice.queryPage(params); return R.ok().put("page", page); } @RequestMapping("/yqgDjList") public R yqgDjList(@RequestParam Map<String, Object> params){ params.put("ysType","Painter business document"); PageUtils page = ysWaterervice.queryPage(params); return R.ok().put("page", page); } @RequestMapping("/sgjsList") public R sgjsList(@RequestParam Map<String, Object> params){ params.put("ysType","Acceptance after construction"); PageUtils page = ysWaterervice.queryPage(params); return R.ok().put("page", page); } @RequestMapping("/sgjsDjList") public R sgjsDjList(@RequestParam Map<String, Object> params){ params.put("ysType","Construction completion business document"); PageUtils page = ysWaterervice.queryPage(params); return R.ok().put("page", page); } @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ YsWater ysWater = ysWaterervice.getById(id); return R.ok().put("ysWater", ysWater); } @RequestMapping("/export") public R save(HttpServletResponse response, HttpServletRequest request){ try { ysWaterServiceImpl.outExcelByMealOrReserve(getParametersMap(request),response); } catch (Exception e) { e.printStackTrace(); } return R.ok(); } /** * Assemble all parameters into a Map * @return */ private Map<String, String> getParametersMap(HttpServletRequest request) throws UnsupportedEncodingException { Map<String, String> map = new HashMap<String, String>(); Enumeration<String> paramNames = request.getParameterNames(); String encoding = request.getCharacterEncoding(); while (paramNames.hasMoreElements()) { String paramName = paramNames.nextElement(); String[] paramValues = request.getParameterValues(paramName); if (paramValues.length == 1) { String paramValue = paramValues[0]; if (paramValue.length() != 0) { if (!encoding.toUpperCase().equals("UTF-8")) { map.put(paramName, new String(paramValue.getBytes("ISO-8859-1"),"UTF-8")); } else { map.put(paramName, paramValue); } } } } return map; } @RequestMapping("/save") public R save(@RequestBody YsWater ysWater){ ysWaterervice.save(ysWater); return R.ok(); } @RequestMapping("/update") public R update(@RequestBody YsWater ysWater){ ysWaterervice.updateById(ysWater); return R.ok(); } @RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ ysWaterervice.removeByIds(Arrays.asList(ids)); return R.ok(); } }
User permission interception and release:
/** * Shiro Configuration file for * */ @Configuration public class ShiroConfig { /** * In a stand-alone environment, the session is managed by shiro */ @Bean @ConditionalOnProperty(prefix = "renren", name = "cluster", havingValue = "false") public DefaultWebSessionManager sessionManager(@Value("${renren.globalSessionTimeout:3600}") long globalSessionTimeout){ DefaultWebSessionManager sessionManager = new DefaultWebSessionManager(); sessionManager.setSessionValidationSchedulerEnabled(true); sessionManager.setSessionIdUrlRewritingEnabled(false); sessionManager.setSessionValidationInterval(globalSessionTimeout * 1000); sessionManager.setGlobalSessionTimeout(globalSessionTimeout * 1000); return sessionManager; } @Bean("shiroFilter") public ShiroFilterFactoryBean shiroFilter(SecurityManager securityManager) { ShiroFilterFactoryBean shiroFilter = new ShiroFilterFactoryBean(); shiroFilter.setSecurityManager(securityManager); shiroFilter.setLoginUrl("/login.html"); shiroFilter.setUnauthorizedUrl("/"); Map<String, String> filterMap = new LinkedHashMap<>(); filterMap.put("/swagger/**", "anon"); filterMap.put("/v2/api-docs", "anon"); filterMap.put("/swagger-ui.html", "anon"); filterMap.put("/webjars/**", "anon"); filterMap.put("/swagger-resources/**", "anon"); filterMap.put("/statics/**", "anon"); filterMap.put("/login.html", "anon"); filterMap.put("/sys/login", "anon"); filterMap.put("/favicon.ico", "anon"); filterMap.put("/captcha.jpg", "anon"); filterMap.put("/**", "authc"); shiroFilter.setFilterChainDefinitionMap(filterMap); return shiroFilter; } /** * In the cluster environment, the session is managed by spring session */ @Bean @ConditionalOnProperty(prefix = "renren", name = "cluster", havingValue = "true") public ServletContainerSessionManager servletContainerSessionManager() { return new ServletContainerSessionManager(); } @Bean("securityManager") public SecurityManager securityManager(UserRealm userRealm, SessionManager sessionManager) { DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); securityManager.setCacheManager(new EhCacheManager()); securityManager.setRealm(userRealm); securityManager.setSessionManager(sessionManager); securityManager.setRememberMeManager(null); return securityManager; } @Bean("lifecycleBeanPostProcessor") public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() { return new LifecycleBeanPostProcessor(); } @Bean public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) { AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor(); advisor.setSecurityManager(securityManager); return advisor; } }
Database design:
Database name: Ren_ zxys
Document version: v1.0 zero
Document description: decoration acceptance database table design description
Table sys_config (system configuration information table)
number | name | data type | length | Decimal places | Null value allowed | Primary key | explain |
1 | id | bigint | 20 | 0 | N | Y | |
2 | param_key | varchar | 50 | 0 | Y | N | key |
3 | param_value | varchar | 2000 | 0 | Y | N | value |
4 | status | tinyint | 4 | 0 | Y | N | Status # 0: hide # 1: Show |
5 | remark | varchar | 500 | 0 | Y | N | remarks |
Table sys_dept (Department Management)
number | name | data type | length | Decimal places | Null value allowed | Primary key | explain |
1 | dept_id | bigint | 20 | 0 | N | Y | |
2 | parent_id | bigint | 20 | 0 | Y | N | Superior department ID, first level department is 0 |
3 | name | varchar | 50 | 0 | Y | N | Department name |
4 | order_num | int | 10 | 0 | Y | N | sort |
5 | del_flag | tinyint | 4 | 0 | Y | N | Delete - 1: deleted 0: normal |
Table sys_dict (data dictionary table)
number | name | data type | length | Decimal places | Null value allowed | Primary key | explain |
1 | id | bigint | 20 | 0 | N | Y | |
2 | name | varchar | 100 | 0 | N | N | Dictionary name |
3 | type | varchar | 100 | 0 | Y | N | Dictionary type |
4 | code | varchar | 100 | 0 | Y | N | Dictionary code |
5 | value | varchar | 1000 | 0 | Y | N | Dictionary value |
6 | order_num | int | 10 | 0 | Y | N | sort |
7 | remark | varchar | 255 | 0 | Y | N | remarks |
8 | del_flag | tinyint | 4 | 0 | Y | N | Delete tag - 1: deleted 0: normal |
Table sys_log (system log)
number | name | data type | length | Decimal places | Null value allowed | Primary key | explain |
1 | id | bigint | 20 | 0 | N | Y | |
2 | username | varchar | 50 | 0 | Y | N | user name |
3 | operation | varchar | 50 | 0 | Y | N | User operation |
4 | method | varchar | 200 | 0 | Y | N | Request method |
5 | params | varchar | 5000 | 0 | Y | N | Request parameters |
6 | time | bigint | 20 | 0 | N | N | Execution time (MS) |
7 | ip | varchar | 64 | 0 | Y | N | IP address |
8 | create_date | datetime | 19 | 0 | Y | N | Creation time |
Table sys_menu (menu management)
number | name | data type | length | Decimal places | Null value allowed | Primary key | explain |
1 | menu_id | bigint | 20 | 0 | N | Y | |
2 | parent_id | bigint | 20 | 0 | Y | N | Parent menu ID, first level menu is 0 |
3 | name | varchar | 50 | 0 | Y | N | Menu name |
4 | url | varchar | 200 | 0 | Y | N | Menu URL |
5 | perms | varchar | 500 | 0 | Y | N | Authorization (multiple are separated by commas, such as user:list,user:create) |
6 | type | int | 10 | 0 | Y | N | Type # 0: directory # 1: menu # 2: button |
7 | icon | varchar | 50 | 0 | Y | N | Menu icon |
8 | order_num | int | 10 | 0 | Y | N | sort |
Personal summary:
Through the recent mastery and learning of java object-oriented programming, front-end knowledge and java framework, as well as the development of this education and teaching system during this period, I have better understood the importance of java learning. In developing which system this system is, I have completed many experiments and functional tests of the land management platform. During the stage of system development and learning, I realized that I am familiar with java, and then I can independently use relevant technologies. I found that it does have many conveniences, such as java integrates abstraction and encapsulation, inheritance and polymorphism, The functions of code reuse and code expansion are realized, and the speed and efficiency of the overall software development are improved. For example, when the administrator adds a user, it reports java Lang.nullpointexception. Solution: check the console print information, find that relevant information is not filled in when adding, and report to java Lang.nullpointexception, the data item with empty user information found through power-off debugging, the user's complete relevant information must be filled in when saving at the front end, or the database setting field can be empty. The main purpose of learning program design is to improve the key skills and technologies of program solutions to my actual problems.
Source code acquisition:
Everyone likes, collects, pays attention to, comments and views 👇🏻👇🏻👇🏻 WeChat official account for contact information 👇🏻👇🏻👇🏻
Punch in article update 156 / 365 days
Recommended subscription of wonderful column: in the column below 👇🏻👇🏻👇🏻👇🏻