|
@@ -30,6 +30,7 @@ import com.ym.mec.biz.dal.entity.SellOrder;
|
|
|
import com.ym.mec.biz.dal.entity.StudentPaymentRouteOrder;
|
|
|
import com.ym.mec.biz.dal.enums.AuditStatusEnum;
|
|
|
import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
|
|
|
+import com.ym.mec.biz.dal.page.StudentPaymentRouteOrderQueryInfo;
|
|
|
import com.ym.mec.biz.service.StudentPaymentRouteOrderService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
@@ -86,6 +87,31 @@ public class StudentPaymentRouteOrderController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "财务订单列表")
|
|
|
+ @GetMapping("/queryPage")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('routeOrder/queryPage')")
|
|
|
+ public HttpResponseResult<PageInfo<StudentPaymentRouteOrder>> queryPage(StudentPaymentRouteOrderQueryInfo queryInfo) {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ return failed("用户信息获取失败");
|
|
|
+ }
|
|
|
+ if (!sysUser.getIsSuperAdmin()) {
|
|
|
+ Employee employee = employeeDao.get(sysUser.getId());
|
|
|
+ if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
+ queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
+ } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
|
|
|
+ return failed("用户所在分部异常");
|
|
|
+ } else {
|
|
|
+ List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
|
|
|
+ if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
|
|
|
+ return failed("非法请求");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return succeed(studentPaymentRouteOrderService.queryPage(queryInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "财务订单列表")
|
|
|
@GetMapping("/query")
|
|
|
@PreAuthorize("@pcs.hasPermissions('routeOrder/query')")
|
|
|
public HttpResponseResult<StudentPaymentRouteOrder> query(Long id) {
|
|
@@ -115,6 +141,16 @@ public class StudentPaymentRouteOrderController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "订单审核")
|
|
|
+ @PostMapping("/auditOutOrder")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('routeOrder/auditOutOrder')")
|
|
|
+ public HttpResponseResult<String> auditOutOrder(Long studentPaymentRouteOrderId, AuditStatusEnum auditStatus, String memo) {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ studentPaymentRouteOrderService.auditOutOrder(studentPaymentRouteOrderId, auditStatus, memo, sysUser.getId());
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@ApiOperation(value = "修改订单")
|
|
|
@PostMapping("/update")
|
|
|
@PreAuthorize("@pcs.hasPermissions('routeOrder/update')")
|