Browse Source

添加完成

jz.kai 2 years ago
parent
commit
ed87538001

+ 31 - 0
web/src/main/java/com/jpsoft/prices/modules/base/controller/InvoiceController.java

@@ -234,4 +234,35 @@ public class InvoiceController {
 
         return msgResult;
     }
+
+    @ApiOperation(value="完成")
+    @PostMapping("finish/{id}")
+    public MessageResult<Integer> finish(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Invoice invoice = invoiceService.get(id);
+            invoice.setStatus(true);
+            invoice.setUpdateBy(subject);
+            invoice.setUpdateTime(new Date());
+
+            int affectCount = invoiceService.update(invoice);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("提交失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
 }

+ 2 - 2
web/src/main/java/com/jpsoft/prices/modules/base/controller/InvoiceQuotesController.java

@@ -106,7 +106,7 @@ public class InvoiceQuotesController {
                             continue;
                         }
                     }
-                    if(info.getBoxLength() >= 1000 || info.getBoxWidth() >= 1000 ||info.getBoxHight() >= 1000) {
+                    if(info.getBoxLength() >= 100 || info.getBoxWidth() >= 100 ||info.getBoxHight() >= 100) {
                         standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "e915f3a3-a431-4879-a729-a4b4d0a0e97a", "木箱(1米及以上)");
                         if(standard != null) {
                             BigDecimal tempFee = piecePlan(standard, info);
@@ -126,7 +126,7 @@ public class InvoiceQuotesController {
                             continue;
                         }
                     }
-                    if(info.getBoxLength() < 1000 && info.getBoxWidth() < 1000 && info.getBoxHight() < 1000) {
+                    if(info.getBoxLength() < 100 && info.getBoxWidth() < 100 && info.getBoxHight() < 100) {
                         standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "e915f3a3-a431-4879-a729-a4b4d0a0e97a", "木箱(1米以下)");
                         if(standard != null) {
                             BigDecimal tempFee = piecePlan(standard, info);