Sfoglia il codice sorgente

库存管理-修复一个库存无法出库问题

wangxiaoming 5 anni fa
parent
commit
7a418dd616

+ 9 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java

@@ -39,6 +39,7 @@ public class SalesOrder implements Serializable {
     private String salesAddressDesc;        //地址详情
     private String salesAddressTel;         //收件人电话
     private String salesAddressName;        //收件人姓名
+    private String salesAddressPostcode;        //收件人姓名
     private Integer salesAmount;            //订单总金额
     private Integer salesPayMoney;          //已付金额
     private Integer salesPayType;           //付款方式  1:微信支付 2:现金支付3:已支付定金¥99 4:刷卡支付 5:支付宝支付
@@ -894,4 +895,12 @@ public class SalesOrder implements Serializable {
     public void setSalesPostFirmName(String salesPostFirmName) {
         this.salesPostFirmName = salesPostFirmName;
     }
+
+    public String getSalesAddressPostcode() {
+        return salesAddressPostcode;
+    }
+
+    public void setSalesAddressPostcode(String salesAddressPostcode) {
+        this.salesAddressPostcode = salesAddressPostcode;
+    }
 }

+ 4 - 4
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/InventoryServiceImpl.java

@@ -71,7 +71,7 @@ public class InventoryServiceImpl implements InventoryService {
 
     @Transactional
     @Override
-    public Integer addInventory(InventoryInfo invent) {
+    public synchronized Integer addInventory(InventoryInfo invent) {
         Integer flag = 0;
         if(invent.getWarehouseId() == null){
             throw new RuntimeException("【出库】更新库存失败,出库仓库ID。");
@@ -170,7 +170,7 @@ public class InventoryServiceImpl implements InventoryService {
 
     @Transactional
     @Override
-    public Integer minusInventory(InventoryInfo invent) {
+    public synchronized Integer minusInventory(InventoryInfo invent) {
         Integer flag = 0;
         if(invent.getWarehouseId() == null){
             throw new RuntimeException("【出库】更新库存失败,出库仓库ID。");
@@ -215,7 +215,7 @@ public class InventoryServiceImpl implements InventoryService {
 
             //inventoryGoodProductNum;//良品数量
             if(invent.getInventoryGoodProductNum() != null && invent.getInventoryGoodProductNum() != 0 ){
-                if(info.getInventoryGoodProductNum() > invent.getInventoryGoodProductNum()){
+                if(info.getInventoryGoodProductNum() >= invent.getInventoryGoodProductNum()){
                     logRecord = sdf.format(new Date())+"[良品]出库"+invent.getInventoryGoodProductNum()+"件,"+record;
                     newInent.setInventoryGoodProductNum(info.getInventoryGoodProductNum() - invent.getInventoryGoodProductNum());
                     newInent.setInventoryRecentRecord(logRecord);
@@ -227,7 +227,7 @@ public class InventoryServiceImpl implements InventoryService {
                 }
             }else if(invent.getInventoryDefectiveProductNum() != null && invent.getInventoryDefectiveProductNum() != 0 ){
                 //inventoryDefectiveProductNum;//不良品数量
-                if(info.getInventoryDefectiveProductNum() > invent.getInventoryDefectiveProductNum()){
+                if(info.getInventoryDefectiveProductNum() >= invent.getInventoryDefectiveProductNum()){
                     logRecord = sdf.format(new Date())+"[不良品]出库"+invent.getInventoryDefectiveProductNum()+"件,"+record;
                     newInent.setInventoryDefectiveProductNum(info.getInventoryDefectiveProductNum() - invent.getInventoryDefectiveProductNum());
                     newInent.setInventoryRecentRecord(logRecord);

+ 2 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java

@@ -174,6 +174,7 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
     @Transactional
     public int updateDetectQc(ComplaintDetectInfo record) {
         ComplaintDetectInfo comdi = complaintDetectInfoMapper.getDetectByIdFast(record.getDetectId());
+        record.setDetectNumber(comdi.getDetectNumber());
         if(comdi == null){
             throw new RuntimeException("查询维修记录失败");
         }
@@ -736,6 +737,7 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
         if(cdi == null){
             return 0;
         }
+        detectInfo.setDetectNumber(cdi.getDetectNumber());
         Integer flag = complaintDetectInfoMapper.updateDetectById(detectInfo);
         if(flag < 1){
             return flag;

+ 18 - 18
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inventory/inventory_list.ftl

@@ -83,35 +83,35 @@
         <table class="table table-border table-bordered table-bg table-hover table-sort">
             <thead>
             <tr class="text-c">
-                <th width="100">仓库</th>
-                <th width="100">产品类型</th>
+                <th width="50">仓库</th>
+                <th width="60">产品类型</th>
                 <th width="100">产品名称</th>
-                <#--<th width="100">产品型号</th>-->
-                <#--<th width="100">产品简称</th>-->
-                <th width="100">产品颜色</th>
-                <th width="100">产品69码</th>
-                <#--<th width="100">待发数量</th>-->
-                <th width="100">良品数量</th>
-                <th width="100">不良品数量</th>
-                <th width="100">最近记录</th>
-                <th width="100">操作</th>
+            <#--<th width="100">产品型号</th>-->
+            <#--<th width="100">产品简称</th>-->
+                <th width="50">产品颜色</th>
+                <th width="70">产品69码</th>
+            <#--<th width="100">待发数量</th>-->
+                <th width="50">良品数量</th>
+                <th width="50">不良品数量</th>
+                <th width="150">最近记录</th>
+                <th width="60">操作</th>
             </tr>
             </thead>
             <tbody id="listid">
             <#if (page.dataList?size > 0)>
                 <#list page.dataList as info>
                 <tr>
-                    <td class="text-c" width="100">${info.warehouseName!}</td>
-                    <td class="text-c" width="100">${info.productTypeName!}</td>
+                    <td class="text-c" width="50">${info.warehouseName!}</td>
+                    <td class="text-c" width="60">${info.productTypeName!}</td>
                     <td class="text-c" width="100">${info.inventoryProductName!}</td>
                     <#--<td class="text-c" width="100">${info.productNumber!}</td>-->
                     <#--<td class="text-c" width="100">${info.productAbbreviation!}</td>-->
-                    <td class="text-c" width="100">${info.productColorName!}</td>
-                    <td class="text-c" width="100">${info.inventoryProductBar!}</td>
+                    <td class="text-c" width="50">${info.productColorName!}</td>
+                    <td class="text-c" width="70">${info.inventoryProductBar!}</td>
                     <#--<td class="text-c" width="100">${info.inventoryMomentumNum!}</td>-->
-                    <td class="text-c" width="100">${info.inventoryGoodProductNum!}</td>
-                    <td class="text-c" width="100">${info.inventoryDefectiveProductNum!}</td>
-                    <td class="text-c" width="100">${info.inventoryRecentRecord!}</td>
+                    <td class="text-c" width="50">${info.inventoryGoodProductNum!}</td>
+                    <td class="text-c" width="50">${info.inventoryDefectiveProductNum!}</td>
+                    <td class="text-c" width="150">${info.inventoryRecentRecord!}</td>
                     <!-- 遍历操作 -->
                     <td class="td-manage text-c">
                         <a style="text-decoration:none" href="javascript:;" title="增加库存"