Java 實(shí)戰(zhàn)項(xiàng)目之精美物流管理系統(tǒng)的實(shí)現(xiàn)流程
一、項(xiàng)目簡述
本系統(tǒng)功能包括:
數(shù)據(jù)統(tǒng)計(jì)、收件錄入、發(fā)件錄入、到件錄入、派件錄入、問題件錄入、退件錄入、留倉錄入、裝車錄入、發(fā)車錄入、到車錄入、卸車錄入、運(yùn)單錄入、運(yùn)單編輯、運(yùn)單查詢、數(shù)據(jù)導(dǎo)入、簽收錄入、簽收查詢、快件跟蹤、自定義跟蹤、問題件跟蹤、預(yù)付款管理、財(cái)務(wù)報(bào)表明細(xì)、現(xiàn)金賬單、月結(jié)賬單、代收貨款、業(yè)務(wù)員提成、訂單分配、訂單查詢、物品名維護(hù)、入庫、出庫、庫存、物料、角色管理、用戶管理、系統(tǒng)設(shè)置、員工維護(hù)、客戶維護(hù)、網(wǎng)點(diǎn)維護(hù)、報(bào)價(jià)維護(hù)、其他維護(hù)、收發(fā)記錄、到件預(yù)報(bào)。
二、項(xiàng)目運(yùn)行
環(huán)境配置: Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。
項(xiàng)目技術(shù): Springboot + Maven + mybatis+ Vue 等等組成,B/S模式 + Maven管理等等。






運(yùn)輸點(diǎn)管理控制層代碼:
/**
* 運(yùn)輸點(diǎn)管理控制層
*/
@RequestMapping("/admin/transport")
@Controller
public class TransportController {
@Autowired
private UserService userService;
@Autowired
private RoleService roleService;
@Autowired
private OperaterLogService operaterLogService;
/**
* 運(yùn)輸點(diǎn)列表頁面
* @param model
* @param user
* @param pageBean
* @return
*/
@RequestMapping(value="/list")
public String list(Model model, User user, PageBean<User> pageBean){
model.addAttribute("title", "運(yùn)輸點(diǎn)列表");
model.addAttribute("username", user.getUsername());
model.addAttribute("pageBean", userService.findList(pageBean,user.getUsername(), UserRoleTypeEnum.TRANSPORT));
return "admin/transport/list";
}
/**
* 新增運(yùn)輸點(diǎn)頁面
* @param model
* @return
*/
@RequestMapping(value="/add",method= RequestMethod.GET)
public String add(Model model){
model.addAttribute("roles", roleService.findAllByRoleType(UserRoleTypeEnum.TRANSPORT));
return "admin/transport/add";
}
/**
* 運(yùn)輸點(diǎn)添加表單提交處理
* @param user
* @return
*/
@RequestMapping(value="/add",method= RequestMethod.POST)
@ResponseBody
public Result<Boolean> add(User user){
//用統(tǒng)一驗(yàn)證實(shí)體方法驗(yàn)證是否合法
CodeMsg validate = ValidateEntityUtil.validate(user);
if(validate.getCode() != CodeMsg.SUCCESS.getCode()){
return Result.error(validate);
}
if(user.getAddress() == null){
return Result.error(CodeMsg.ADDRESS_ERROR);
}
if(user.getRole() == null || user.getRole().getId() == null){
return Result.error(CodeMsg.TRANSPORT_USER_ROLE_EMPTY);
}
//判斷運(yùn)輸點(diǎn)名是否存在
if(userService.isExistUsername(user.getUsername(), 0L)){
return Result.error(CodeMsg.TRANSPORT_USERNAME_EXIST);
}
user.setUserType(UserRoleTypeEnum.TRANSPORT);
//到這說明一切符合條件,進(jìn)行數(shù)據(jù)庫新增
if(userService.save(user) == null){
return Result.error(CodeMsg.TRANSPORT_USE_ADD_ERROR);
}
operaterLogService.add("添加運(yùn)輸點(diǎn),運(yùn)輸點(diǎn)名:" + user.getUsername());
return Result.success(true);
}
/**
* 運(yùn)輸點(diǎn)編輯頁面
* @param model
* @return
*/
@RequestMapping(value="/edit",method= RequestMethod.GET)
public String edit(Model model, @RequestParam(name="id")Long id){
model.addAttribute("roles", roleService.findAllByRoleType(UserRoleTypeEnum.TRANSPORT));
model.addAttribute("user", userService.find(id));
return "admin/transport/edit";
}
/**
* 編輯運(yùn)輸點(diǎn)信息表單提交處理
* @param user
* @return
*/
@RequestMapping(value="/edit",method= RequestMethod.POST)
@ResponseBody
public Result<Boolean> edit(User user){
//用統(tǒng)一驗(yàn)證實(shí)體方法驗(yàn)證是否合法
CodeMsg validate = ValidateEntityUtil.validate(user);
if(validate.getCode() != CodeMsg.SUCCESS.getCode()){
return Result.error(validate);
}
if(user.getAddress() == null){
return Result.error(CodeMsg.ADDRESS_ERROR);
}
if(user.getRole() == null || user.getRole().getId() == null){
return Result.error(CodeMsg.TRANSPORT_USER_ROLE_EMPTY);
}
if(user.getId() == null || user.getId().longValue() <= 0){
return Result.error(CodeMsg.TRANSPORT_USE_NO_EXIST);
}
if(userService.isExistUsername(user.getUsername(), user.getId())){
return Result.error(CodeMsg.TRANSPORT_USERNAME_EXIST);
}
//到這說明一切符合條件,進(jìn)行數(shù)據(jù)庫保存
User findById = userService.find(user.getId());
//講提交的運(yùn)輸點(diǎn)信息指定字段復(fù)制到已存在的user對象中,該方法會(huì)覆蓋新字段內(nèi)容
BeanUtils.copyProperties(user, findById, "id","createTime","updateTime","userType");
if(userService.save(findById) == null){
return Result.error(CodeMsg.TRANSPORT_USE_EDIT_ERROR);
}
operaterLogService.add("編輯運(yùn)輸點(diǎn),運(yùn)輸點(diǎn)名:" + user.getUsername());
return Result.success(true);
}
/**
* 刪除運(yùn)輸點(diǎn)
* @param id
* @return
*/
@RequestMapping(value="/delete",method= RequestMethod.POST)
@ResponseBody
public Result<Boolean> delete(@RequestParam(name="id")Long id){
try {
userService.delete(id);
} catch (Exception e) {
return Result.error(CodeMsg.TRANSPORT_USE_DELETE_ERROR);
}
operaterLogService.add("刪除運(yùn)輸點(diǎn),運(yùn)輸點(diǎn)ID:" + id);
return Result.success(true);
}
}
到此這篇關(guān)于Java 實(shí)戰(zhàn)項(xiàng)目之精美物流管理系統(tǒng)的實(shí)現(xiàn)流程的文章就介紹到這了,更多相關(guān)Java 物流管理系統(tǒng)內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Java多線程中關(guān)于join方法的使用實(shí)例解析
本文通過實(shí)例代碼給大家實(shí)例介紹了Java多線程中關(guān)于join方法的使用,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友參考下2017-01-01
java線程池ExecutorService超時(shí)處理小結(jié)
使用ExecutorService時(shí),設(shè)置子線程執(zhí)行超時(shí)是一個(gè)常見需求,本文就來詳細(xì)的介紹一下ExecutorService超時(shí)的三種方法,感興趣的可以了解一下2024-09-09
Spring boot 實(shí)現(xiàn)單個(gè)或批量文件上傳功能
這篇文章主要介紹了Spring boot 實(shí)現(xiàn)單個(gè)或批量文件上傳功能,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友參考下吧2018-08-08
Spring Boot實(shí)現(xiàn)通用的接口參數(shù)校驗(yàn)
本文介紹基于 Spring Boot 和 JDK8 編寫一個(gè) AOP ,結(jié)合自定義注解實(shí)現(xiàn)通用的接口參數(shù)校驗(yàn)。具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-05-05
Springboot詳解實(shí)現(xiàn)食品倉庫管理系統(tǒng)流程
這是一個(gè)使用Springboot開發(fā)的食品倉庫管理系統(tǒng),是為商家提供商品貨物進(jìn)銷存的信息化管理系統(tǒng),具有一個(gè)倉庫管理系統(tǒng)該有的所有功能,感興趣的朋友快來看看吧2022-06-06

