current position:Home>Java project: agricultural material management system (java + springboot + easyUI + HTML + Maven + MySQL)
Java project: agricultural material management system (java + springboot + easyUI + HTML + Maven + MySQL)
2022-04-29 16:40:37【OldWinePot】
The source code for : Blog's front page " resources " Download !
Project introduction
Agricultural material management system , Administrators can configure roles , Assign user roles ;
The main functions include : Sign in 、 register 、 Change Password 、 Retail delivery 、 Retail returns 、 Purchase order management 、 Purchase receipt management 、 Purchase return management 、 Sales management 、 Financial management 、 Report management 、 material management 、 Basic data management .
Environmental needs
1. Running environment : It is best to java jdk 1.8, We run on this platform . Other versions can, in theory .
2.IDE Environmental Science :IDEA,Eclipse,Myeclipse Fine . recommend IDEA;
3.tomcat Environmental Science :Tomcat 7.x,8.x,9.x All versions are available
4. Hardware environment :windows 7/8/10 1G Above memory ; perhaps Mac OS;
5. database :MySql 5.7 edition ;
6. whether Maven project : yes ;
Technology stack
1. Back end :springboot MyBatis
2. front end :HTML+css+javascript+jQuery+easyui
Instructions
1. Use Navicat Or other tools , stay mysql Create a database with the corresponding name in , And import the sql file ;
2. Use IDEA/Eclipse/MyEclipse Import the project ,Eclipse/MyEclipse Import time , if maven Item, please select maven;
if maven project , After importing successfully, please execute maven clean;maven install command , To configure tomcat, And then run ;
3. In the project application.properties Change the database configuration in the configuration file to your own configuration ;
4. After successful operation , visit http://localhost:8080/ Go to the login page
Administrator user name :admin password :123456
Organization controller :
/**
* Organization controller
*/
@Controller
@RequestMapping("/organization")
public class OrgController {
@Autowired
private OrganizationService organizationService;
/**
* Dynamically query and organize information according to conditions , Load data into table
*/
@PostMapping("/list")
public String listOrganizationByLevel(Organization example, ModelMap map){
List<Organization> list = organizationService.listOrganizationByExample(example);
int sublevel = example.getOrgLevel();
map.put("dtoList",list);
String pageName = null;
switch (sublevel) { // Determine the return page target according to the parameters
case 1: pageName= "friDepartments" ;break;
case 2: pageName= "secDepartments" ;break;
case 3: pageName= "macAddress" ;break;
}
return pageName+"::table-refresh";
}
/**
* Query child organizations dynamically according to conditions
*/
@PostMapping("/sub/list")
@ResponseBody
public List listOrganization(Organization example){
List<Organization> list = organizationService.listOrganizationByExample(example);
return list;
}
/**
* According to the primary and secondary departments id Query physical location
*/
@PostMapping("/macAddress/list")
public String listMacaddress(String fristId,String secondId,ModelMap map){
List<Organization> list = organizationService.listMacaddressByRootID(fristId,secondId);
map.put("dtoList",list);
return "macAddress::table-refresh";
}
/**
* Add organization
* @param organization
* @return
*/
@PostMapping
@ResponseBody
public int addOrganization(Organization organization){
return organizationService.insertOrganization(organization);
}
/**
* Delete organization
* @param orgId
* @return
*/
@DeleteMapping("/{orgId}")
@ResponseBody
public int delteOrganizationByid(@PathVariable("orgId") String orgId){
return organizationService.deleteOrganizationById(orgId);
}
/**
* Modify organization name
* @param organization
* @return
*/
@PutMapping
@ResponseBody
public int updateDeviceType(Organization organization){
return organizationService.updateOrganizationName(organization);
}
/**
* Get the organization tree
* @return
*/
@GetMapping("/tree")
@ResponseBody
public OrganizationDTO getOrganizationTree(){
return organizationService.getOrgTree();
}
}
User access controller :
@Controller
@RequestMapping("/account")
public class AccountController {
// Automatically inject service classes
@Autowired
private AccountService accountService;
/**
* Administrator account information
* @return
*/
@GetMapping("/admins")
public String listAdmins(ModelMap map){
List<AccountDTO> adminList = accountService.listAccountByLevel(2);
List<AccountDTO> superAdminList = accountService.listAccountByLevel(1);
adminList.addAll(superAdminList);
map.put("adminsList", adminList);
return "system::table-refresh";
}
/**
* Get all account information
* @param map
* @return
*/
@GetMapping("/list")
public String listAccounts(ModelMap map){
List<AccountDTO> accountList = accountService.listAccount();
map.put("accountDTOList", accountList);
return "account::table-refresh";
}
/**
* Search for users by user name
* @param map
* @param userName
* @return
*/
@GetMapping("/list/{userName}")
public String listAccountsByUserName(ModelMap map,@PathVariable("userName")String userName){
List<AccountDTO> accountList = accountService.listAccountByName(userName);
map.put("accountDTOList", accountList);
return "account::table-refresh";
}
/**
* Add administrator page
* @param map
* @return
*/
@GetMapping("/users")
public String listUsers(ModelMap map){
List<AccountDTO> accountList = accountService.listAccountByLevel(3);
map.put("usersDTOList", accountList);
return "system::list-refresh";
}
/**
* Get the user information of the device
* @param map
* @param devId
* @return
*/
@GetMapping("/ownerList")
public String getOwnerList(ModelMap map, String devId){
Map resMap = accountService.listOwenrByDevId(devId);
map.put("ownerMap", resMap);
return "allotDevice::list-refresh";
}
/**
* Add account
* @param account
* @return
*/
@PostMapping
@ResponseBody
public int addAccount(Account account){
return accountService.addAccount(account);
}
/**
* according to uuid Delete account
* @param uuid
* @return
*/
@DeleteMapping("/{uuid}")
@ResponseBody
public int deleteAccount(@PathVariable("uuid")String uuid){
return accountService.deleteAccountById(uuid);
}
/**
* Change account password
* @param uuid
* @param password
* @return
*/
@PutMapping("/password")
@ResponseBody
public int updatePassword(String uuid, String password){
return accountService.updatePasswordByid(uuid,password);
}
/**
* Modify account status
* @param uuid
* @param status
* @return
*/
@PutMapping("/status")
@ResponseBody
public int updateStatus(String uuid,int status){
return accountService.updateStatusByid(uuid,status);
}
/**
* Change Administrator
* @return
*/
@PutMapping("/admins")
@ResponseBody
public int updateDevOwner(HttpServletRequest request){
String[] groups = request.getParameter("groups").split(",");
int level = Integer.parseInt(request.getParameter("level"));
return accountService.updateAccountLevel(level,groups);
};
}
Material and equipment management control layer :
@Controller
@RequestMapping("/baseInfos")
public class BaseInfoController {
@Autowired
private BaseInfoService baseInfoService;
@Autowired
private LogService logService;
/**
* Get all device type information
* @param map
* @return
*/
@RequestMapping("/type/list")
public String listDeviceType(ModelMap map){
List<DeviceType> typeList = baseInfoService.listDeviceType();
map.put("typeList",typeList);
return "deviceTypes::table-refresh";
}
/**
* Add device type
* @param deviceType
* @return
*/
@PostMapping("/type")
@ResponseBody
public int addtDeviceType(DeviceType deviceType){
return baseInfoService.addtDeviceType(deviceType);
}
/**
* Delete device type
* @param typeId
* @return
*/
@DeleteMapping("/type/{typeId}")
@ResponseBody
public int delteDeviceTypByid(@PathVariable("typeId") String typeId){
return baseInfoService.deleteDeviceTypeById(typeId);
}
/**
* Modify device type
* @param deviceType
* @return
*/
@PutMapping("/type")
@ResponseBody
public int updateDeviceType(DeviceType deviceType){
return baseInfoService.updateDeviceType(deviceType);
}
/**
* Get all equipment brand information
* @param map
* @return
*/
@RequestMapping("/brand/list")
public String listDeviceBrand(ModelMap map){
List<DeviceBrand> brandList = baseInfoService.listDeviceBrand();
map.put("brandList",brandList);
return "deviceBrands::table-refresh";
}
/**
* Add equipment brand
* @param deviceBrand
* @return
*/
@PostMapping("/brand")
@ResponseBody
public int addtDeviceBrand(DeviceBrand deviceBrand){
return baseInfoService.addtDeviceBrand(deviceBrand);
}
/**
* Delete equipment brand
* @param brandId
* @return
*/
@DeleteMapping("/brand/{brandId}")
@ResponseBody
public int delteDeviceBrandByid(@PathVariable("brandId") String brandId){
return baseInfoService.deleteDeviceBrandById(brandId);
}
/**
* Brand revision
* @param deviceBrand
* @return
*/
@PutMapping("/brand")
@ResponseBody
public int updateDeviceBrand(DeviceBrand deviceBrand){
return baseInfoService.updateDeviceBrand(deviceBrand);
}
/**
* Get system log
* @param map
* @return
*/
@RequestMapping("/log")
public String listLog(ModelMap map, HttpServletRequest request){
String startTime = request.getParameter("startTime");
String endTime = request.getParameter("endTime");
List<SystemLog> logs = logService.listLogsByDate(startTime,endTime);
map.put("logList",logs);
return "system::logList-refresh";
}
}
The source code for : Blog's front page " resources " Download !
copyright notice
author[OldWinePot],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204291448261639.html
The sidebar is recommended
- HTTP becomes HTTPS, self-made certificate
- Web front-end operation - tourism enterprise marketing publicity responsive website template (HTML + CSS + JavaScript)
- Self inspection list of a [qualified] front-end Engineer
- This principle in JavaScript and six common usage scenarios
- JavaScript this priority
- Analyzing the principle of HTTPS encryption
- Difference and principle between websocket and http
- Use of elementui scroll bar component El scrollbar
- Nginx security optimization
- GAC group has become the first pilot enterprise of "yueyouhang". Blessed are the car owners in Guangdong!
guess what you like
Loki HTTP API usage
JavaScript - prototype, prototype chain
Front end experience
JavaScript -- Inheritance
HTTP cache
Filters usage of table in elementui
A JavaScript pit encountered by a non front-end siege lion
Grain College - image error when writing Vue with vscode
Utility gadget - get the IP address in the HTTP request
Could not fetch URL https://pypi.org/simple/pytest-html/: There was a problem confirming the ssl cer
Random recommended
- Function of host parameter in http
- Use nginx proxy node red under centos7 and realize password access
- Centos7 nginx reverse proxy TCP port
- In eclipse, an error is reported when referencing layuijs and CSS
- Front end online teacher Pink
- Learn to use PHP to insert elements at the specified position and key of the array
- Learn how to use HTML and CSS styles to overlay two pictures on another picture to achieve the effect of scanning QR code by wechat
- Learn how to use CSS to vertically center the content in Div
- Learn how to use CSS to circle numbers
- Learn to open and display PDF files in HTML web pages
- The PHP array random sorting function shuffle() randomly scrambles the order of array elements
- JQuery implements the keyboard enter search function
- 16 ArcGIS API for JavaScript 4.18 a new development method based on ES modules @ ArcGIS / core
- 17 ArcGIS API for JavaScript 4.18 draw points, lines and faces with the mouse
- 18 ArcGIS API for JavaScript 4.18 obtain the length and area after drawing line segments and surface features
- Vue environment construction -- scaffold
- Build a demo with Vue scaffold
- Using vuex in Vue projects
- Use Vue router in Vue project
- 26 [react basics-5] react hook
- 07 Chrome browser captures hover element style
- WebGIS development training (ArcGIS API for JavaScript)
- Solution to the blank page of the project created by create react app after packaging
- 19. Html2canvas implements ArcGIS API for JavaScript 4 X screenshot function
- Introduction to JavaScript API for ArcGIS 13
- Development of ArcGIS API for JavaScript under mainstream front-end framework
- Nginx learning notes
- Less learning notes tutorial
- Vue2 cannot get the value in props in the data of the child component, or it is always the default value (the value of the parent component comes from asynchrony)
- LeetCode 217. Determine whether there are duplicate elements in the array
- I'll write a website collection station myself. Do you think it's ok? [HTML + CSS + JS] Tan Zi
- Front end browser debugging tips
- Application of anti chattering and throttling in JavaScript
- How to create JavaScript custom events
- Several ways of hiding elements in CSS
- node. Js-3 step out the use of a server and express package
- CSS matrix function
- Fastapi series - synchronous and asynchronous mutual conversion processing practice
- How to extend the functionality of Axios without interceptors
- Read pseudo classes and pseudo elements