|
|
@@ -3,7 +3,6 @@ package com.uas.platform.b2c.logistics.controller;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.uas.platform.b2c.core.constant.Type;
|
|
|
import com.uas.platform.b2c.core.support.SystemSession;
|
|
|
-import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
|
|
|
import com.uas.platform.b2c.core.utils.FastjsonUtils;
|
|
|
import com.uas.platform.b2c.core.utils.StringUtilB2C;
|
|
|
import com.uas.platform.b2c.logistics.model.Invoice;
|
|
|
@@ -11,19 +10,16 @@ import com.uas.platform.b2c.logistics.service.InvoiceFOrderService;
|
|
|
import com.uas.platform.b2c.logistics.service.InvoiceFPurchaseService;
|
|
|
import com.uas.platform.b2c.logistics.service.InvoiceService;
|
|
|
import com.uas.platform.b2c.trade.support.ResultMap;
|
|
|
-import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.model.PageParams;
|
|
|
import com.uas.platform.core.model.Status;
|
|
|
import com.wordnik.swagger.annotations.ApiOperation;
|
|
|
import com.wordnik.swagger.annotations.ApiParam;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
-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.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.management.OperationsException;
|
|
|
import java.util.List;
|
|
|
@@ -51,7 +47,7 @@ public class InvoiceController {
|
|
|
@Autowired
|
|
|
private InvoiceFPurchaseService inFpuService;
|
|
|
|
|
|
- private static final UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(InvoiceController.class);
|
|
|
|
|
|
@RequestMapping(value = "/convert", method = RequestMethod.GET)
|
|
|
public ResultMap convert() {
|
|
|
@@ -68,7 +64,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFor/create/{orid}/order", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "订单转出货", httpMethod = "PUT")
|
|
|
public Invoice send(@ApiParam(required = true, value = "订单id") @PathVariable Long orid) {
|
|
|
- logger.log("客户出货单信息管理", "转出货", "转出货的订单id=" + orid + ",操作人:" + SystemSession.getUser().getUserUU() + "-" + SystemSession.getUser().getUserName());
|
|
|
+ logger.info("客户出货单信息管理", "转出货", "转出货的订单id=" + orid + ",操作人:" + SystemSession.getUser().getUserUU() + "-" + SystemSession.getUser().getUserName());
|
|
|
return invoiceService.createInvoiceFromOrder(orid);
|
|
|
}
|
|
|
|
|
|
@@ -81,7 +77,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFor/{inid}/send", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "平台发货", httpMethod = "PUT")
|
|
|
public Invoice sendorder(@ApiParam(required = true, value = "发货单号") @PathVariable String inid) {
|
|
|
- logger.log("客户出货单信息管理", "平台发货", "平台发货的流水号:" + inid + ",操作人:" + SystemSession.getUser().getUserUU() + "-" +SystemSession.getUser().getUserName());
|
|
|
+ logger.info("客户出货单信息管理", "平台发货", "平台发货的流水号:" + inid + ",操作人:" + SystemSession.getUser().getUserUU() + "-" +SystemSession.getUser().getUserName());
|
|
|
return invoiceService.sendInvoiceFOrder(inid);
|
|
|
}
|
|
|
|
|
|
@@ -96,7 +92,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFor/admin", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "平台根据状态查看卖家出货单", httpMethod = "GET")
|
|
|
public Page<Invoice> findAdminInFor(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword, @ApiParam(required = true, value = "出货单状态") String status) {
|
|
|
- logger.log("客户出货单信息管理", "平台根据状态查看卖家出货单");
|
|
|
+ logger.info("客户出货单信息管理", "平台根据状态查看卖家出货单");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
return invoiceService.findAdminInFor(pageInfo, keyword, status);
|
|
|
}
|
|
|
@@ -111,7 +107,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFor/tobeshipped", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "查看待出货状态出货单", httpMethod = "GET")
|
|
|
public Page<Invoice> findToBeShipped(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword) {
|
|
|
- logger.log("客户出货单信息管理", "查看待出货");
|
|
|
+ logger.info("客户出货单信息管理", "查看待出货");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
info.filter("status", Status.TOBESHIPPED.value());
|
|
|
return invoiceService.findPageByStatus(info, keyword, com.uas.platform.b2c.core.constant.Type.Invoice_B2c_code.value());
|
|
|
@@ -127,7 +123,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFor/inbound", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "查看待收货状态出货单", httpMethod = "GET")
|
|
|
public Page<Invoice> findInbound(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword) {
|
|
|
- logger.log("客户出货单信息管理", "查看待收货");
|
|
|
+ logger.info("客户出货单信息管理", "查看待收货");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
info.filter("status", Status.INBOUND.value());
|
|
|
return invoiceService.findPageByStatus(info, keyword, com.uas.platform.b2c.core.constant.Type.Invoice_B2c_code.value());
|
|
|
@@ -143,7 +139,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFor/received", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "查看已收货状态出货单", httpMethod = "GET")
|
|
|
public Page<Invoice> findReceived(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword) {
|
|
|
- logger.log("客户出货单信息管理", "查看已收货");
|
|
|
+ logger.info("客户出货单信息管理", "查看已收货");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
info.filter("status", Status.RECEIVED.value());
|
|
|
return invoiceService.findPageByStatus(info, keyword, com.uas.platform.b2c.core.constant.Type.Invoice_B2c_code.value());
|
|
|
@@ -159,7 +155,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFor/paid", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "查看已付款状态出货单", httpMethod = "GET")
|
|
|
public Page<Invoice> findPaid(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword) {
|
|
|
- logger.log("客户出货单信息管理", "查看已付款");
|
|
|
+ logger.info("客户出货单信息管理", "查看已付款");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
info.filter("status", Status.PAID.value());
|
|
|
return invoiceService.findPageByStatus(info, keyword, com.uas.platform.b2c.core.constant.Type.Invoice_B2c_code.value());
|
|
|
@@ -174,7 +170,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/{inid}/find", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "根据转出货单id查看出货单信息", httpMethod = "GET")
|
|
|
public Invoice getInvoiceFOrder(@ApiParam(required = true, value = "出货单号") @PathVariable Long inid) {
|
|
|
- logger.log("客户出货单信息管理", "产看客户出货单信息");
|
|
|
+ logger.info("客户出货单信息管理", "产看客户出货单信息");
|
|
|
return invoiceService.getInvoice(inid);
|
|
|
}
|
|
|
|
|
|
@@ -189,7 +185,7 @@ public class InvoiceController {
|
|
|
public String convertInvoiceFOrder(@ApiParam(required = true, value = "所有转出货单的订单map集合") @RequestBody String postDate) {
|
|
|
JSONObject jsonObject = FastjsonUtils.parseObject(postDate);
|
|
|
assert logger != null;
|
|
|
- logger.log("客户出货单信息管理", "批量转出货单id号:" + jsonObject.getString("ids") + ",操作者:" + SystemSession.getUser().getUserUU() + "-" + SystemSession.getUser().getUserName());
|
|
|
+ logger.info("客户出货单信息管理", "批量转出货单id号:" + jsonObject.getString("ids") + ",操作者:" + SystemSession.getUser().getUserUU() + "-" + SystemSession.getUser().getUserName());
|
|
|
return invoiceService.convertInvoiceFOrder(jsonObject);
|
|
|
}
|
|
|
|
|
|
@@ -232,7 +228,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/{invoiceid}/code", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "根据出货单号查看出货详情", httpMethod = "GET")
|
|
|
public Invoice getInvoiceFOrder(@ApiParam(required = true, value = "出货单号") @PathVariable String invoiceid) {
|
|
|
- logger.log("客户出货单信息管理", "根据出货单号查看出货详情");
|
|
|
+ logger.info("客户出货单信息管理", "根据出货单号查看出货详情");
|
|
|
invoiceid = StringUtilB2C.decodeValue(invoiceid);
|
|
|
return invoiceService.getInvoice(invoiceid);
|
|
|
}
|
|
|
@@ -250,7 +246,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFpu/tobeshipped", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "查看待出货状态的出货单(采购单)", httpMethod = "GET")
|
|
|
public Page<Invoice> findInvoiceFPurchaseToBeShipped(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword) {
|
|
|
- logger.log("平台出货单管理", "查看待出货");
|
|
|
+ logger.info("平台出货单管理", "查看待出货");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
info.filter("status", Status.TOBESHIPPED.value());
|
|
|
return invoiceService.findPageByStatus(info, keyword, Type.Invoice_Vender_code.value());
|
|
|
@@ -268,7 +264,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFpu/business", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "根据状态查看企业出货单", httpMethod = "GET")
|
|
|
public Page<Invoice> findBusiness(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword, @ApiParam(required = true, value = "分页参数") String status, @ApiParam(required = true, value = "是否是送样单,是-送样单") boolean isProof) {
|
|
|
- logger.log("平台出货单管理", "根据状态查看企业出货单");
|
|
|
+ logger.info("平台出货单管理", "根据状态查看企业出货单");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
pageInfo.filter("sellerenuu", SystemSession.getUser().getEnterprise().getUu());
|
|
|
return invoiceService.findPageBusiness(pageInfo, keyword, status, isProof, Type.Invoice_Vender_code.value());
|
|
|
@@ -285,7 +281,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFpu/admin", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "平台根据状态查看卖家出货单", httpMethod = "GET")
|
|
|
public Page<Invoice> findAdminInFpu(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword, @ApiParam(required = true, value = "出货单状态") String status) {
|
|
|
- logger.log("平台出货单管理", "平台根据状态查看卖家出货单");
|
|
|
+ logger.info("平台出货单管理", "平台根据状态查看卖家出货单");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
return invoiceService.findAdminInFpu(pageInfo, keyword, status, Type.Invoice_Vender_code.value());
|
|
|
}
|
|
|
@@ -299,7 +295,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFpu/tobeshipped/{ids}", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "批量查看平台出货单信息", httpMethod = "GET")
|
|
|
public List<Invoice> findToBeShippedByInvoiceid(@ApiParam(required = true, value = "出货单号拼接字符串") @PathVariable("ids") String invoiceid) {
|
|
|
- logger.log("平台出货单管理", "");
|
|
|
+ logger.info("平台出货单管理", "");
|
|
|
return invoiceService.findToBeShippedByInvoiceid(invoiceid);
|
|
|
}
|
|
|
|
|
|
@@ -313,7 +309,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFpu/inbound", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "查看待收货", httpMethod = "GET")
|
|
|
public Page<Invoice> findInvoiceFPurchaseInbound(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword) {
|
|
|
- logger.log("平台出货单管理", "查看待收货");
|
|
|
+ logger.info("平台出货单管理", "查看待收货");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
info.filter("status", Status.INBOUND.value());
|
|
|
return invoiceService.findPageByStatus(info, keyword, Type.Invoice_Vender_code.value());
|
|
|
@@ -330,7 +326,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFpu/received", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "查看已收货", httpMethod = "GET")
|
|
|
public Page<Invoice> findInvoiceFPurchaseReceived(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword) {
|
|
|
- logger.log("平台出货单管理", "查看已收货");
|
|
|
+ logger.info("平台出货单管理", "查看已收货");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
info.filter("status", Status.RECEIVED.value());
|
|
|
return invoiceService.findPageByStatus(info, keyword, Type.Invoice_Vender_code.value());
|
|
|
@@ -346,7 +342,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFpu/toreceivemoney", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "查看待收款", httpMethod = "GET")
|
|
|
public Page<Invoice> findToreceivemoney(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword) {
|
|
|
- logger.log("平台出货单管理", "查看待收款");
|
|
|
+ logger.info("平台出货单管理", "查看待收款");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
info.filter("status", Status.TORECEIVEMONEY.value());
|
|
|
return invoiceService.findPageByStatus(info, keyword, Type.Invoice_Vender_code.value());
|
|
|
@@ -362,7 +358,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFpu/moneyreceived", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "查看已收款", httpMethod = "GET")
|
|
|
public Page<Invoice> findMoneyreceived(@ApiParam(required = true, value = "分页参数") PageParams params, @ApiParam(required = true, value = "搜索字符串") String keyword) {
|
|
|
- logger.log("平台出货单管理", "查看已收款");
|
|
|
+ logger.info("平台出货单管理", "查看已收款");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
info.filter("status", Status.MONEYRECEIVED.value());
|
|
|
return invoiceService.findPageByStatus(info, keyword, com.uas.platform.b2c.core.constant.Type.Invoice_Vender_code.value());
|
|
|
@@ -379,7 +375,7 @@ public class InvoiceController {
|
|
|
@RequestMapping(value = "/inFpu/save", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "保存出货单信息", httpMethod = "POST")
|
|
|
public ResultMap saveInvoiceFP(@ApiParam(required = true, value = "对象json字符串") @RequestBody String json, @ApiParam(required = true, value = "单号") Long id) throws OperationsException {
|
|
|
- logger.log("平台出货单管理", "保存出货单信息", "保存出货单信息 流水号:" + id + ", 操作人:" + SystemSession.getUser().getUserUU() + "-" + SystemSession.getUser().getUserName());
|
|
|
+ logger.info("平台出货单管理", "保存出货单信息", "保存出货单信息 流水号:" + id + ", 操作人:" + SystemSession.getUser().getUserUU() + "-" + SystemSession.getUser().getUserName());
|
|
|
return invoiceService.ship(json, id);
|
|
|
}
|
|
|
|