新增占桩订单后管页面

This commit is contained in:
Lemon
2023-09-08 09:30:43 +08:00
parent 72699df4dc
commit 557fa69811
10 changed files with 612 additions and 100 deletions

View File

@@ -0,0 +1,99 @@
package com.jsowell.web.controller.pile;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.jsowell.pile.service.OrderPileOccupyService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jsowell.common.annotation.Log;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.enums.BusinessType;
import com.jsowell.pile.domain.OrderPileOccupy;
import com.jsowell.common.util.poi.ExcelUtil;
import com.jsowell.common.core.page.TableDataInfo;
/**
* 占桩订单Controller
*
* @author jsowell
* @date 2023-09-08
*/
@RestController
@RequestMapping("/pile/occupy")
public class OrderPileOccupyController extends BaseController {
@Autowired
private OrderPileOccupyService orderPileOccupyService;
/**
* 查询占桩订单列表
*/
@PreAuthorize("@ss.hasPermi('pile:occupy:list')")
@GetMapping("/list")
public TableDataInfo list(OrderPileOccupy orderPileOccupy) {
startPage();
List<OrderPileOccupy> list = orderPileOccupyService.selectOrderPileOccupyList(orderPileOccupy);
return getDataTable(list);
}
/**
* 导出占桩订单列表
*/
@PreAuthorize("@ss.hasPermi('pile:occupy:export')")
@Log(title = "占桩订单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, OrderPileOccupy orderPileOccupy) {
List<OrderPileOccupy> list = orderPileOccupyService.selectOrderPileOccupyList(orderPileOccupy);
ExcelUtil<OrderPileOccupy> util = new ExcelUtil<OrderPileOccupy>(OrderPileOccupy.class);
util.exportExcel(response, list, "占桩订单数据");
}
/**
* 获取占桩订单详细信息
*/
@PreAuthorize("@ss.hasPermi('pile:occupy:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(orderPileOccupyService.selectByPrimaryKey(id.intValue()));
}
/**
* 新增占桩订单
*/
@PreAuthorize("@ss.hasPermi('pile:occupy:add')")
@Log(title = "占桩订单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody OrderPileOccupy orderPileOccupy) {
return toAjax(orderPileOccupyService.insert(orderPileOccupy));
}
/**
* 修改占桩订单
*/
@PreAuthorize("@ss.hasPermi('pile:occupy:edit')")
@Log(title = "占桩订单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody OrderPileOccupy orderPileOccupy) {
return toAjax(orderPileOccupyService.updateByPrimaryKey(orderPileOccupy));
}
/**
* 删除占桩订单
*/
// @PreAuthorize("@ss.hasPermi('pile:occupy:remove')")
// @Log(title = "占桩订单", businessType = BusinessType.DELETE)
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(orderPileOccupyService.deleteByPrimaryKey(ids));
// }
}

View File

@@ -38,8 +38,8 @@ spring:
master:
url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: jsowell_dev
#url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#username: jsowell_prd_copy
# url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: jsowell_prd_copy
password: 123456
# 从库数据源
slave: