Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

huangx 7 years ago
parent
commit
8f8532d7e0
100 changed files with 1912 additions and 2531 deletions
  1. 2 2
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomerDTO.java
  2. 2 2
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomeraddressDTO.java
  3. 2 2
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomercontactDTO.java
  4. 2 2
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductDTO.java
  5. 92 130
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bankinformation.java
  6. 5 5
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Warehouse.java
  7. 3 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/DocumentApplication.java
  8. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/BankinformationController.java
  9. 0 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java
  10. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductbrandController.java
  11. 2 9
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/WarehouseController.java
  12. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BomMapper.java
  13. 6 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductbrandMapper.java
  14. 1 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/WarehouseMapper.java
  15. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/BankinformationService.java
  16. 2 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/BomService.java
  17. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductbrandService.java
  18. 2 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/WarehouseService.java
  19. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BankinformationServiceImpl.java
  20. 26 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java
  21. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  22. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductbrandServiceImpl.java
  23. 10 8
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  24. 150 156
      applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml
  25. 28 114
      applications/document/document-server/src/main/resources/mapper/BomDetailMapper.xml
  26. 18 0
      applications/document/document-server/src/main/resources/mapper/BomMapper.xml
  27. 21 92
      applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml
  28. 15 56
      applications/document/document-server/src/main/resources/mapper/CustomercontactMapper.xml
  29. 4 0
      applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml
  30. 16 97
      applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml
  31. 6 0
      applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml
  32. 49 38
      applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml
  33. 11 3
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomeraddressMapperTest.java
  34. 7 0
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomercontactMapperTest.java
  35. 18 10
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/FundtransferController.java
  36. 8 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthreceiptsController.java
  37. 5 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthspengdingsController.java
  38. 11 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java
  39. 7 7
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java
  40. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java
  41. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/FundtransferMapper.java
  42. 3 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/FundtransferdetailMapper.java
  43. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java
  44. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java
  45. 0 19
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Banksubledger.java
  46. 69 95
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Fundtransfer.java
  47. 119 120
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Fundtransferdetail.java
  48. 27 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java
  49. 0 20
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java
  50. 0 19
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java
  51. 0 19
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java
  52. 5 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/FundtransferService.java
  53. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/PaybalanceService.java
  54. 79 12
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  55. 5 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  56. 8 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  57. 5 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  58. 138 105
      applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml
  59. 129 134
      applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml
  60. 7 1
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  61. 109 105
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  62. 4 1
      applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml
  63. 1 1
      applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml
  64. 1 1
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  65. 2 2
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java
  66. 4 4
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java
  67. 6 2
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java
  68. 0 28
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutReqDTO.java
  69. 2 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java
  70. 2 6
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  71. 4 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java
  72. 4 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  73. 7 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  74. 15 6
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  75. 54 239
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  76. 2 0
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  77. 2 1
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  78. 23 0
      applications/purchase/purchase-server/src/test/PurchaseTest.java
  79. 3 1
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdIODetailDTO.java
  80. 4 2
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdInOutDTO.java
  81. 3 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDetailDTO.java
  82. 4 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java
  83. 0 3
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdIODetailMapper.java
  84. 0 14
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java
  85. 4 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaleDetail.java
  86. 9 12
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  87. 1 1
      applications/sale/sale-server/src/main/resources/application.yml
  88. 2 549
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  89. 1 221
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  90. 1 1
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  91. 31 1
      applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml
  92. 35 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/MakeListDTO.java
  93. 2 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java
  94. 5 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java
  95. 5 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutListDTO.java
  96. 238 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/Make.java
  97. 141 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/MakeMaterial.java
  98. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java
  99. 8 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java
  100. 6 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

+ 2 - 2
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomerDTO.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.document.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -11,7 +11,7 @@ import java.util.Date;
  * 2018-10-23 17:21.
  */
 @Data
-public class CustomerDTO extends CommonBaseEntity implements Serializable {
+public class CustomerDTO extends CommonBaseDTO implements Serializable {
     private String cu_code;
 
     private String cu_name;

+ 2 - 2
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomeraddressDTO.java

@@ -1,12 +1,12 @@
 package com.usoftchina.saas.document.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import lombok.Data;
 
 import java.io.Serializable;
 
 @Data
-public class CustomeraddressDTO extends CommonBaseEntity implements Serializable {
+public class CustomeraddressDTO extends CommonBaseDTO implements Serializable {
 
     private Long ca_cuid;
 

+ 2 - 2
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomercontactDTO.java

@@ -1,12 +1,12 @@
 package com.usoftchina.saas.document.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import lombok.Data;
 
 import java.io.Serializable;
 
 @Data
-public class CustomercontactDTO extends CommonBaseEntity implements Serializable {
+public class CustomercontactDTO extends CommonBaseDTO implements Serializable {
 
     private Long cc_cuid;
 

+ 2 - 2
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductDTO.java

@@ -1,12 +1,12 @@
 package com.usoftchina.saas.document.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
 @Data
-public class ProductDTO extends CommonBaseEntity implements Serializable {
+public class ProductDTO extends CommonBaseDTO implements Serializable {
 
     private String pr_code;
     private String pr_detail;

+ 92 - 130
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bankinformation.java

@@ -2,226 +2,188 @@ package com.usoftchina.saas.document.entities;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
 
+import java.io.Serializable;
 import java.util.Date;
 
-public class Bankinformation extends CommonBaseEntity {
-    private Integer bkId;
+public class Bankinformation extends CommonBaseEntity implements Serializable {
 
-    private String bkBankcode;
+    private String bk_bankcode;
 
-    private String bkBankname;
+    private String bk_bankname;
 
-    private Date bkDate;
+    private Date bk_date;
 
-    private String bkType;
+    private String bk_type;
 
-    private Double bkBeginamount;
+    private Double bk_beginamount;
 
-    private Double bkThisamount;
+    private Double bk_thisamount;
 
-    private String bkStatus;
+    private String bk_status;
 
-    private String bkStatuscode;
+    private String bk_statuscode;
 
-    private Integer bkRecorderid;
+    private Integer bk_recorderid;
 
-    private String bkRecorder;
+    private String bk_recorder;
 
-    private Date bkRecorddate;
+    private Date bk_recorddate;
 
-    private Integer bkYm;
+    private Integer bk_ym;
 
-    private Integer companyid;
+    private String bk_text1;
 
-    private Integer updaterid;
+    private String bk_text2;
 
-    private Date updatetime;
+    private String bk_text3;
 
-    private String bkText1;
+    private String bk_text4;
 
-    private String bkText2;
+    private String bk_text5;
 
-    private String bkText3;
+    private String bk_remark;
 
-    private String bkText4;
-
-    private String bkText5;
-
-    private String bkRemark;
-
-    public Integer getBkId() {
-        return bkId;
-    }
-
-    public void setBkId(Integer bkId) {
-        this.bkId = bkId;
-    }
-
-    public String getBkBankcode() {
-        return bkBankcode;
-    }
-
-    public void setBkBankcode(String bkBankcode) {
-        this.bkBankcode = bkBankcode == null ? null : bkBankcode.trim();
-    }
-
-    public String getBkBankname() {
-        return bkBankname;
-    }
-
-    public void setBkBankname(String bkBankname) {
-        this.bkBankname = bkBankname == null ? null : bkBankname.trim();
-    }
-
-    public Date getBkDate() {
-        return bkDate;
-    }
-
-    public void setBkDate(Date bkDate) {
-        this.bkDate = bkDate;
-    }
-
-    public String getBkType() {
-        return bkType;
+    public String getBk_bankcode() {
+        return bk_bankcode;
     }
 
-    public void setBkType(String bkType) {
-        this.bkType = bkType == null ? null : bkType.trim();
+    public void setBk_bankcode(String bk_bankcode) {
+        this.bk_bankcode = bk_bankcode;
     }
 
-    public Double getBkBeginamount() {
-        return bkBeginamount;
+    public String getBk_bankname() {
+        return bk_bankname;
     }
 
-    public void setBkBeginamount(Double bkBeginamount) {
-        this.bkBeginamount = bkBeginamount;
+    public void setBk_bankname(String bk_bankname) {
+        this.bk_bankname = bk_bankname;
     }
 
-    public Double getBkThisamount() {
-        return bkThisamount;
+    public Date getBk_date() {
+        return bk_date;
     }
 
-    public void setBkThisamount(Double bkThisamount) {
-        this.bkThisamount = bkThisamount;
+    public void setBk_date(Date bk_date) {
+        this.bk_date = bk_date;
     }
 
-    public String getBkStatus() {
-        return bkStatus;
+    public String getBk_type() {
+        return bk_type;
     }
 
-    public void setBkStatus(String bkStatus) {
-        this.bkStatus = bkStatus == null ? null : bkStatus.trim();
+    public void setBk_type(String bk_type) {
+        this.bk_type = bk_type;
     }
 
-    public String getBkStatuscode() {
-        return bkStatuscode;
+    public Double getBk_beginamount() {
+        return bk_beginamount;
     }
 
-    public void setBkStatuscode(String bkStatuscode) {
-        this.bkStatuscode = bkStatuscode == null ? null : bkStatuscode.trim();
+    public void setBk_beginamount(Double bk_beginamount) {
+        this.bk_beginamount = bk_beginamount;
     }
 
-    public Integer getBkRecorderid() {
-        return bkRecorderid;
+    public Double getBk_thisamount() {
+        return bk_thisamount;
     }
 
-    public void setBkRecorderid(Integer bkRecorderid) {
-        this.bkRecorderid = bkRecorderid;
+    public void setBk_thisamount(Double bk_thisamount) {
+        this.bk_thisamount = bk_thisamount;
     }
 
-    public String getBkRecorder() {
-        return bkRecorder;
+    public String getBk_status() {
+        return bk_status;
     }
 
-    public void setBkRecorder(String bkRecorder) {
-        this.bkRecorder = bkRecorder == null ? null : bkRecorder.trim();
+    public void setBk_status(String bk_status) {
+        this.bk_status = bk_status;
     }
 
-    public Date getBkRecorddate() {
-        return bkRecorddate;
+    public String getBk_statuscode() {
+        return bk_statuscode;
     }
 
-    public void setBkRecorddate(Date bkRecorddate) {
-        this.bkRecorddate = bkRecorddate;
+    public void setBk_statuscode(String bk_statuscode) {
+        this.bk_statuscode = bk_statuscode;
     }
 
-    public Integer getBkYm() {
-        return bkYm;
+    public Integer getBk_recorderid() {
+        return bk_recorderid;
     }
 
-    public void setBkYm(Integer bkYm) {
-        this.bkYm = bkYm;
+    public void setBk_recorderid(Integer bk_recorderid) {
+        this.bk_recorderid = bk_recorderid;
     }
 
-    public Integer getCompanyid() {
-        return companyid;
+    public String getBk_recorder() {
+        return bk_recorder;
     }
 
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
+    public void setBk_recorder(String bk_recorder) {
+        this.bk_recorder = bk_recorder;
     }
 
-    public Integer getUpdaterid() {
-        return updaterid;
+    public Date getBk_recorddate() {
+        return bk_recorddate;
     }
 
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
+    public void setBk_recorddate(Date bk_recorddate) {
+        this.bk_recorddate = bk_recorddate;
     }
 
-    public Date getUpdatetime() {
-        return updatetime;
+    public Integer getBk_ym() {
+        return bk_ym;
     }
 
-    public void setUpdatetime(Date updatetime) {
-        this.updatetime = updatetime;
+    public void setBk_ym(Integer bk_ym) {
+        this.bk_ym = bk_ym;
     }
 
-    public String getBkText1() {
-        return bkText1;
+    public String getBk_text1() {
+        return bk_text1;
     }
 
-    public void setBkText1(String bkText1) {
-        this.bkText1 = bkText1 == null ? null : bkText1.trim();
+    public void setBk_text1(String bk_text1) {
+        this.bk_text1 = bk_text1;
     }
 
-    public String getBkText2() {
-        return bkText2;
+    public String getBk_text2() {
+        return bk_text2;
     }
 
-    public void setBkText2(String bkText2) {
-        this.bkText2 = bkText2 == null ? null : bkText2.trim();
+    public void setBk_text2(String bk_text2) {
+        this.bk_text2 = bk_text2;
     }
 
-    public String getBkText3() {
-        return bkText3;
+    public String getBk_text3() {
+        return bk_text3;
     }
 
-    public void setBkText3(String bkText3) {
-        this.bkText3 = bkText3 == null ? null : bkText3.trim();
+    public void setBk_text3(String bk_text3) {
+        this.bk_text3 = bk_text3;
     }
 
-    public String getBkText4() {
-        return bkText4;
+    public String getBk_text4() {
+        return bk_text4;
     }
 
-    public void setBkText4(String bkText4) {
-        this.bkText4 = bkText4 == null ? null : bkText4.trim();
+    public void setBk_text4(String bk_text4) {
+        this.bk_text4 = bk_text4;
     }
 
-    public String getBkText5() {
-        return bkText5;
+    public String getBk_text5() {
+        return bk_text5;
     }
 
-    public void setBkText5(String bkText5) {
-        this.bkText5 = bkText5 == null ? null : bkText5.trim();
+    public void setBk_text5(String bk_text5) {
+        this.bk_text5 = bk_text5;
     }
 
-    public String getBkRemark() {
-        return bkRemark;
+    public String getBk_remark() {
+        return bk_remark;
     }
 
-    public void setBkRemark(String bkRemark) {
-        this.bkRemark = bkRemark == null ? null : bkRemark.trim();
+    public void setBk_remark(String bk_remark) {
+        this.bk_remark = bk_remark;
     }
 }

+ 5 - 5
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Warehouse.java

@@ -17,7 +17,7 @@ public class Warehouse extends CommonBaseEntity implements Serializable {
     private String wh_description;
     private String wh_statuscode;
     private String wh_status;
-    private long wh_recordid;
+    private long wh_recorderid;
     private String wh_recorder;
     /**
      * 录入日期
@@ -69,12 +69,12 @@ public class Warehouse extends CommonBaseEntity implements Serializable {
         this.wh_status = wh_status;
     }
 
-    public long getWh_recordid() {
-        return wh_recordid;
+    public long getWh_recorderid() {
+        return wh_recorderid;
     }
 
-    public void setWh_recordid(long wh_recordid) {
-        this.wh_recordid = wh_recordid;
+    public void setWh_recorderid(long wh_recorderid) {
+        this.wh_recorderid = wh_recorderid;
     }
 
     public String getWh_recorder() {

+ 3 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/DocumentApplication.java

@@ -6,7 +6,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
 @SpringBootApplication
 @EnableEurekaClient
@@ -14,10 +13,10 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
 @EnableTransactionManagement
 @EnableFeignClients("com.usoftchina.saas")
 @MapperScan("com.usoftchina.saas.document.mapper")
-public class DocumentApplication{
-
+public class DocumentApplication  {
     public static void main(String[] args) {
-        SpringApplication.run(DocumentApplication.class);
+        SpringApplication.run(DocumentApplication.class, args);
     }
 
+
 }

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/BankinformationController.java

@@ -25,7 +25,7 @@ public class BankinformationController {
     }
 
     @PostMapping("/delete/{id}")
-    public Result delete(@PathVariable("id") int id){
+    public Result delete(@PathVariable("id")int id){
         bankinformationService.removeByPrimaryKey(id);
         return Result.success();
     }

+ 0 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java

@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.*;
  * Created by zdw
  * 2018-10-23 11:39.
  */
-@CrossOrigin
 @RestController
 @RequestMapping("/customer")
 public class CustomerController {

+ 5 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductbrandController.java

@@ -46,4 +46,9 @@ public class ProductbrandController {
         List<Productbrand> productbrandList = productbrandService.findAll();
         return Result.success(productbrandList);
     }
+
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        return Result.success(productbrandService.getCombo());
+    }
 }

+ 2 - 9
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/WarehouseController.java

@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.entities.Warehouse;
 import com.usoftchina.saas.document.service.WarehouseService;
 import com.usoftchina.saas.page.PageRequest;
@@ -12,7 +13,6 @@ import org.springframework.web.bind.annotation.*;
 
 import java.util.Map;
 
-@CrossOrigin
 @RestController
 @RequestMapping("/warehouse")
 public class WarehouseController {
@@ -80,14 +80,7 @@ public class WarehouseController {
         return Result.success(result);
     }
 
-    /**
-     * 获取列表
-     * @return
-     */
-    @GetMapping("/list")
-    public Result getList(){
-        return Result.success(warehouseService.selectAll());
-    }
+
 
     /**
      * 关闭

+ 4 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BomMapper.java

@@ -4,6 +4,8 @@ import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.document.entities.Bom;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 public interface BomMapper extends CommonBaseMapper<Bom> {
     int deleteByPrimaryKey(Long bo_id);
 
@@ -22,4 +24,6 @@ public interface BomMapper extends CommonBaseMapper<Bom> {
     int validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
 
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
+
+    List<Bom> getListData(@Param("condition") String condition, @Param("companyId") Long companyId);
 }

+ 6 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductbrandMapper.java

@@ -1,7 +1,11 @@
 package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Productbrand;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface ProductbrandMapper extends CommonBaseMapper<Productbrand> {
 
@@ -16,4 +20,6 @@ public interface ProductbrandMapper extends CommonBaseMapper<Productbrand> {
     int updateByPrimaryKeySelective(Productbrand record);
 
     int updateByPrimaryKey(Productbrand record);
+
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
 }

+ 1 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/WarehouseMapper.java

@@ -27,10 +27,9 @@ public interface WarehouseMapper extends CommonBaseMapper<Warehouse> {
 
     void unPost(Map<String, Object> map);
 
-    List<Warehouse> selectAll(@Param("companyId") Long companyId);
-
     int validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
 
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
+    List<Warehouse> selectWarehouseListByCondition(@Param("con") String con,@Param("companyId") Long companyId);
 }

+ 2 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/BankinformationService.java

@@ -12,4 +12,6 @@ public interface BankinformationService extends CommonBaseService<Bankinformatio
     boolean save(Bankinformation bankinformation);
 
     boolean removeByPrimaryKey(int id);
+
+
 }

+ 2 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/BomService.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.document.service;
 
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
@@ -38,7 +39,7 @@ public interface BomService extends CommonBaseService<BomMapper, Bom> {
      * @param listReqDTO    条件对象
      * @return
      */
-    List<BomList> getListDataByCondition(PageRequest pageRequest, ListReqDTO listReqDTO);
+    PageInfo<Bom> getListDataByCondition(PageRequest pageRequest, ListReqDTO listReqDTO);
 
     /**
      * 通过ID获取主从表数据

+ 5 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductbrandService.java

@@ -1,9 +1,14 @@
 package com.usoftchina.saas.document.service;
 
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Productbrand;
 import com.usoftchina.saas.document.mapper.ProductbrandMapper;
 
+import java.util.List;
+
 public interface ProductbrandService extends CommonBaseService<ProductbrandMapper, Productbrand> {
 
+    List<ComboDTO> getCombo();
+
 }

+ 2 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/WarehouseService.java

@@ -2,12 +2,13 @@ package com.usoftchina.saas.document.service;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.entities.Warehouse;
 import com.usoftchina.saas.document.mapper.WarehouseMapper;
 import com.usoftchina.saas.page.PageRequest;
 
-import java.util.List;
 import java.util.Map;
 
 public interface WarehouseService extends CommonBaseService<WarehouseMapper, Warehouse> {
@@ -22,7 +23,6 @@ public interface WarehouseService extends CommonBaseService<WarehouseMapper, War
 
     void unPost(Map<String, Object> map);
 
-    List<Warehouse> selectAll();
 
     /**
      * 关闭

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BankinformationServiceImpl.java

@@ -18,7 +18,7 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
 
     @Override
     public boolean save(Bankinformation bankinformation){
-        if(bankinformation.getBkId() == 0){
+        if(bankinformation.getId() == 0){
             bankinformationMapper.insertSelective(bankinformation);
         }else{
             bankinformationMapper.updateByPrimaryKeySelective(bankinformation);

+ 26 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java

@@ -1,5 +1,7 @@
 package com.usoftchina.saas.document.service.impl;
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -20,6 +22,7 @@ import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.ArrayList;
 import java.util.Date;
@@ -36,6 +39,7 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
     private MessageLogService messageLogService;
 
     @Override
+    @Transactional
     public DocBaseDTO saveData(BomList bomList) {
         Long id = bomList.getMain().getId();
         Long companyId = BaseContextHolder.getCompanyId();
@@ -117,8 +121,28 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
     }
 
     @Override
-    public List<BomList> getListDataByCondition(PageRequest pageRequest, ListReqDTO listReqDTO) {
-        return null;
+    public PageInfo<Bom> getListDataByCondition(PageRequest page, ListReqDTO listReqDTO) {
+        //设置分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<Bom> bomList = getList(listReqDTO);
+        //取分页信息
+        PageInfo<Bom> pageInfo = new PageInfo<Bom>(bomList);
+        return pageInfo;
+    }
+
+    private List<Bom> getList(ListReqDTO listReqDTO) {
+        Long companyId = BaseContextHolder.getCompanyId();
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<Bom> bomList = getMapper().getListData(condition, companyId);
+        return bomList;
     }
 
     @Override

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -213,6 +213,6 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         Long companyId = BaseContextHolder.getCompanyId();
         Integer count = "0".equals(String.valueOf(id)) ? getMapper().validateCodeWhenInsert(code, companyId) :
                 getMapper().validateCodeWhenUpdate(code, id, companyId);
-        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.VENDOR.getCaller()).getData();
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.PRODUCT.getCaller()).getData();
     }
 }

+ 7 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductbrandServiceImpl.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Productbrand;
@@ -10,6 +11,8 @@ import com.usoftchina.saas.document.service.ProductbrandService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandMapper, Productbrand> implements ProductbrandService {
 
@@ -46,4 +49,8 @@ public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandM
         return true;
     }
 
+    @Override
+    public List<ComboDTO> getCombo() {
+        return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    }
 }

+ 10 - 8
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java

@@ -7,6 +7,7 @@ import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
@@ -15,10 +16,10 @@ import com.usoftchina.saas.document.entities.Warehouse;
 import com.usoftchina.saas.document.mapper.WarehouseMapper;
 import com.usoftchina.saas.document.service.WarehouseService;
 import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import javax.print.Doc;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -48,6 +49,7 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
         return pageInfo;
     }
 
+
     private List<Warehouse> getListByMode(ListReqDTO req) {
         List<Warehouse> list = null;
         Long companyId = BaseContextHolder.getCompanyId();
@@ -55,11 +57,13 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
         if (null == con) {
             con = "1=1";
         }
-        list = getMapper().selectCustomerListByCondition(con, companyId);
+        list = getMapper().selectWarehouseListByCondition(con, companyId);
         return list;
     }
 
 
+
+
     /**
      * 过账
      * @param map
@@ -99,10 +103,11 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
         DocBaseDTO docBaseDTO = null;
         if(record.getId() == 0){
             String code = pushMaxnubmer(record.getWh_code(), record.getId());
-            count = getMapper().insertSelective(record);
             record.setCompanyId(BaseContextHolder.getCompanyId());
             record.setCreatorId(BaseContextHolder.getUserId());
             record.setCreateTime(new Date());
+
+            count = getMapper().insertSelective(record);
             //记录LOG
             docBaseDTO = generateMsgObj(record.getId(), code);
             messageLogService.save(docBaseDTO);
@@ -127,10 +132,7 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
         getMapper().unPost(map);
     }
 
-    @Override
-    public List<Warehouse> selectAll() {
-        return getMapper().selectAll(BaseContextHolder.getCompanyId());
-    }
+
 
     @Override
     public DocBaseDTO close(Long id) {
@@ -217,6 +219,6 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
         Long companyId = BaseContextHolder.getCompanyId();
         Integer count = "0".equals(String.valueOf(id)) ? getMapper().validateCodeWhenInsert(code, companyId) :
                 getMapper().validateCodeWhenUpdate(code, id, companyId);
-        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.VENDOR.getCaller()).getData();
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.WAREHOUSE.getCaller()).getData();
     }
 }

+ 150 - 156
applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml

@@ -2,35 +2,35 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.usoftchina.saas.document.mapper.BankinformationMapper" >
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Bankinformation" >
-    <id column="bk_id" property="bkId" jdbcType="INTEGER" />
-    <result column="bk_bankcode" property="bkBankcode" jdbcType="VARCHAR" />
-    <result column="bk_bankname" property="bkBankname" jdbcType="VARCHAR" />
-    <result column="bk_date" property="bkDate" jdbcType="TIMESTAMP" />
-    <result column="bk_type" property="bkType" jdbcType="VARCHAR" />
-    <result column="bk_beginamount" property="bkBeginamount" jdbcType="DOUBLE" />
-    <result column="bk_thisamount" property="bkThisamount" jdbcType="DOUBLE" />
-    <result column="bk_status" property="bkStatus" jdbcType="VARCHAR" />
-    <result column="bk_statuscode" property="bkStatuscode" jdbcType="VARCHAR" />
-    <result column="bk_recorderid" property="bkRecorderid" jdbcType="INTEGER" />
-    <result column="bk_recorder" property="bkRecorder" jdbcType="VARCHAR" />
-    <result column="bk_recorddate" property="bkRecorddate" jdbcType="TIMESTAMP" />
-    <result column="bk_ym" property="bkYm" jdbcType="INTEGER" />
-    <result column="companyid" property="companyid" jdbcType="INTEGER" />
-    <result column="updaterid" property="updaterid" jdbcType="INTEGER" />
-    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
-    <result column="bk_text1" property="bkText1" jdbcType="VARCHAR" />
-    <result column="bk_text2" property="bkText2" jdbcType="VARCHAR" />
-    <result column="bk_text3" property="bkText3" jdbcType="VARCHAR" />
-    <result column="bk_text4" property="bkText4" jdbcType="VARCHAR" />
-    <result column="bk_text5" property="bkText5" jdbcType="VARCHAR" />
+    <id column="bk_id" property="id" jdbcType="INTEGER" />
+    <result column="bk_bankcode" property="bk_bankcode" jdbcType="VARCHAR" />
+    <result column="bk_bankname" property="bk_bankname" jdbcType="VARCHAR" />
+    <result column="bk_date" property="bk_date" jdbcType="TIMESTAMP" />
+    <result column="bk_type" property="bk_type" jdbcType="VARCHAR" />
+    <result column="bk_beginamount" property="bk_beginamount" jdbcType="DOUBLE" />
+    <result column="bk_thisamount" property="bk_thisamount" jdbcType="DOUBLE" />
+    <result column="bk_status" property="bk_status" jdbcType="VARCHAR" />
+    <result column="bk_statuscode" property="bk_statuscode" jdbcType="VARCHAR" />
+    <result column="bk_recorderid" property="bk_recorderid" jdbcType="INTEGER" />
+    <result column="bk_recorder" property="bk_recorder" jdbcType="VARCHAR" />
+    <result column="bk_recorddate" property="bk_recorddate" jdbcType="TIMESTAMP" />
+    <result column="bk_ym" property="bk_ym" jdbcType="INTEGER" />
+    <result column="companyid" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="bk_text1" property="bk_text1" jdbcType="VARCHAR" />
+    <result column="bk_text2" property="bk_text2" jdbcType="VARCHAR" />
+    <result column="bk_text3" property="bk_text3" jdbcType="VARCHAR" />
+    <result column="bk_text4" property="bk_text4" jdbcType="VARCHAR" />
+    <result column="bk_text5" property="bk_text5" jdbcType="VARCHAR" />
   </resultMap>
   <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Bankinformation" extends="BaseResultMap" >
-    <result column="bk_remark" property="bkRemark" jdbcType="LONGVARCHAR" />
+    <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount, 
     bk_status, bk_statuscode, bk_recorderid, bk_recorder, bk_recorddate, bk_ym, companyid, 
-    updaterid, updatetime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5
+    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5
   </sql>
   <sql id="Blob_Column_List" >
     bk_remark
@@ -41,237 +41,231 @@
     ,
     <include refid="Blob_Column_List" />
     from bankinformation
-    where bk_id = #{bkId,jdbcType=INTEGER}
+    where bk_id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from bankinformation
-    where bk_id = #{bkId,jdbcType=INTEGER}
+    where bk_id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Bankinformation" >
     insert into bankinformation (bk_id, bk_bankcode, bk_bankname, 
       bk_date, bk_type, bk_beginamount, 
       bk_thisamount, bk_status, bk_statuscode, 
       bk_recorderid, bk_recorder, bk_recorddate, 
-      bk_ym, companyid, updaterid, 
-      updatetime, bk_text1, bk_text2, 
+      bk_ym, companyid, updaterId, 
+      updateTime, bk_text1, bk_text2, 
       bk_text3, bk_text4, bk_text5, 
       bk_remark)
-    values (#{bkId,jdbcType=INTEGER}, #{bkBankcode,jdbcType=VARCHAR}, #{bkBankname,jdbcType=VARCHAR}, 
-      #{bkDate,jdbcType=TIMESTAMP}, #{bkType,jdbcType=VARCHAR}, #{bkBeginamount,jdbcType=DOUBLE}, 
-      #{bkThisamount,jdbcType=DOUBLE}, #{bkStatus,jdbcType=VARCHAR}, #{bkStatuscode,jdbcType=VARCHAR}, 
-      #{bkRecorderid,jdbcType=INTEGER}, #{bkRecorder,jdbcType=VARCHAR}, #{bkRecorddate,jdbcType=TIMESTAMP}, 
-      #{bkYm,jdbcType=INTEGER}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
-      #{updatetime,jdbcType=TIMESTAMP}, #{bkText1,jdbcType=VARCHAR}, #{bkText2,jdbcType=VARCHAR}, 
-      #{bkText3,jdbcType=VARCHAR}, #{bkText4,jdbcType=VARCHAR}, #{bkText5,jdbcType=VARCHAR}, 
-      #{bkRemark,jdbcType=LONGVARCHAR})
+    values (#{bk_bankcode,jdbcType=VARCHAR}, #{bk_bankname,jdbcType=VARCHAR},
+      #{bk_date,jdbcType=TIMESTAMP}, #{bk_type,jdbcType=VARCHAR}, #{bk_beginamount,jdbcType=DOUBLE},
+      #{bk_thisamount,jdbcType=DOUBLE}, #{bk_status,jdbcType=VARCHAR}, #{bk_statuscode,jdbcType=VARCHAR},
+      #{bk_recorderid,jdbcType=INTEGER}, #{bk_recorder,jdbcType=VARCHAR}, #{bk_recorddate,jdbcType=TIMESTAMP},
+      #{bk_ym,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER},
+      #{updateTime,jdbcType=TIMESTAMP}, #{bk_text1,jdbcType=VARCHAR}, #{bk_text2,jdbcType=VARCHAR},
+      #{bk_text3,jdbcType=VARCHAR}, #{bk_text4,jdbcType=VARCHAR}, #{bk_text5,jdbcType=VARCHAR},
+      #{bk_remark,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Bankinformation" >
     insert into bankinformation
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="bkId != null" >
-        bk_id,
-      </if>
-      <if test="bkBankcode != null" >
+      <if test="bk_bankcode != null" >
         bk_bankcode,
       </if>
-      <if test="bkBankname != null" >
+      <if test="bk_bankname != null" >
         bk_bankname,
       </if>
-      <if test="bkDate != null" >
+      <if test="bk_date != null" >
         bk_date,
       </if>
-      <if test="bkType != null" >
+      <if test="bk_type != null" >
         bk_type,
       </if>
-      <if test="bkBeginamount != null" >
+      <if test="bk_beginamount != null" >
         bk_beginamount,
       </if>
-      <if test="bkThisamount != null" >
+      <if test="bk_thisamount != null" >
         bk_thisamount,
       </if>
-      <if test="bkStatus != null" >
+      <if test="bk_status != null" >
         bk_status,
       </if>
-      <if test="bkStatuscode != null" >
+      <if test="bk_statuscode != null" >
         bk_statuscode,
       </if>
-      <if test="bkRecorderid != null" >
+      <if test="bk_recorderid != null" >
         bk_recorderid,
       </if>
-      <if test="bkRecorder != null" >
+      <if test="bk_recorder != null" >
         bk_recorder,
       </if>
-      <if test="bkRecorddate != null" >
+      <if test="bk_recorddate != null" >
         bk_recorddate,
       </if>
-      <if test="bkYm != null" >
+      <if test="bk_ym != null" >
         bk_ym,
       </if>
-      <if test="companyid != null" >
+      <if test="companyId != null" >
         companyid,
       </if>
-      <if test="updaterid != null" >
-        updaterid,
+      <if test="updaterId != null" >
+        updaterId,
       </if>
-      <if test="updatetime != null" >
-        updatetime,
+      <if test="updateTime != null" >
+        updateTime,
       </if>
-      <if test="bkText1 != null" >
+      <if test="bk_text1 != null" >
         bk_text1,
       </if>
-      <if test="bkText2 != null" >
+      <if test="bk_text2 != null" >
         bk_text2,
       </if>
-      <if test="bkText3 != null" >
+      <if test="bk_text3 != null" >
         bk_text3,
       </if>
-      <if test="bkText4 != null" >
+      <if test="bk_text4 != null" >
         bk_text4,
       </if>
-      <if test="bkText5 != null" >
+      <if test="bk_text5 != null" >
         bk_text5,
       </if>
-      <if test="bkRemark != null" >
+      <if test="bk_remark != null" >
         bk_remark,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="bkId != null" >
-        #{bkId,jdbcType=INTEGER},
+      <if test="bk_bankcode != null" >
+        #{bk_bankcode,jdbcType=VARCHAR},
       </if>
-      <if test="bkBankcode != null" >
-        #{bkBankcode,jdbcType=VARCHAR},
+      <if test="bk_bankname != null" >
+        #{bk_bankname,jdbcType=VARCHAR},
       </if>
-      <if test="bkBankname != null" >
-        #{bkBankname,jdbcType=VARCHAR},
+      <if test="bk_date != null" >
+        #{bk_date,jdbcType=TIMESTAMP},
       </if>
-      <if test="bkDate != null" >
-        #{bkDate,jdbcType=TIMESTAMP},
+      <if test="bk_type != null" >
+        #{bk_type,jdbcType=VARCHAR},
       </if>
-      <if test="bkType != null" >
-        #{bkType,jdbcType=VARCHAR},
+      <if test="bk_beginamount != null" >
+        #{bk_beginamount,jdbcType=DOUBLE},
       </if>
-      <if test="bkBeginamount != null" >
-        #{bkBeginamount,jdbcType=DOUBLE},
+      <if test="bk_thisamount != null" >
+        #{bk_thisamount,jdbcType=DOUBLE},
       </if>
-      <if test="bkThisamount != null" >
-        #{bkThisamount,jdbcType=DOUBLE},
+      <if test="bk_status != null" >
+        #{bk_status,jdbcType=VARCHAR},
       </if>
-      <if test="bkStatus != null" >
-        #{bkStatus,jdbcType=VARCHAR},
+      <if test="bk_statuscode != null" >
+        #{bk_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="bkStatuscode != null" >
-        #{bkStatuscode,jdbcType=VARCHAR},
+      <if test="bk_recorderid != null" >
+        #{bk_recorderid,jdbcType=INTEGER},
       </if>
-      <if test="bkRecorderid != null" >
-        #{bkRecorderid,jdbcType=INTEGER},
+      <if test="bk_recorder != null" >
+        #{bk_recorder,jdbcType=VARCHAR},
       </if>
-      <if test="bkRecorder != null" >
-        #{bkRecorder,jdbcType=VARCHAR},
+      <if test="bk_recorddate != null" >
+        #{bk_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="bkRecorddate != null" >
-        #{bkRecorddate,jdbcType=TIMESTAMP},
+      <if test="bk_ym != null" >
+        #{bk_ym,jdbcType=INTEGER},
       </if>
-      <if test="bkYm != null" >
-        #{bkYm,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null" >
-        #{companyid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="updatetime != null" >
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="bk_text1 != null" >
+        #{bk_text1,jdbcType=VARCHAR},
       </if>
-      <if test="bkText1 != null" >
-        #{bkText1,jdbcType=VARCHAR},
+      <if test="bk_text2 != null" >
+        #{bk_text2,jdbcType=VARCHAR},
       </if>
-      <if test="bkText2 != null" >
-        #{bkText2,jdbcType=VARCHAR},
+      <if test="bk_text3 != null" >
+        #{bk_text3,jdbcType=VARCHAR},
       </if>
-      <if test="bkText3 != null" >
-        #{bkText3,jdbcType=VARCHAR},
+      <if test="bk_text4 != null" >
+        #{bk_text4,jdbcType=VARCHAR},
       </if>
-      <if test="bkText4 != null" >
-        #{bkText4,jdbcType=VARCHAR},
+      <if test="bk_text5 != null" >
+        #{bk_text5,jdbcType=VARCHAR},
       </if>
-      <if test="bkText5 != null" >
-        #{bkText5,jdbcType=VARCHAR},
-      </if>
-      <if test="bkRemark != null" >
-        #{bkRemark,jdbcType=LONGVARCHAR},
+      <if test="bk_remark != null" >
+        #{bk_remark,jdbcType=LONGVARCHAR},
       </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Bankinformation" >
     update bankinformation
     <set >
-      <if test="bkBankcode != null" >
-        bk_bankcode = #{bkBankcode,jdbcType=VARCHAR},
+      <if test="bk_bankcode != null" >
+        bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR},
       </if>
-      <if test="bkBankname != null" >
-        bk_bankname = #{bkBankname,jdbcType=VARCHAR},
+      <if test="bk_bankname != null" >
+        bk_bankname = #{bk_bankname,jdbcType=VARCHAR},
       </if>
-      <if test="bkDate != null" >
-        bk_date = #{bkDate,jdbcType=TIMESTAMP},
+      <if test="bk_date != null" >
+        bk_date = #{bk_date,jdbcType=TIMESTAMP},
       </if>
-      <if test="bkType != null" >
-        bk_type = #{bkType,jdbcType=VARCHAR},
+      <if test="bk_type != null" >
+        bk_type = #{bk_type,jdbcType=VARCHAR},
       </if>
-      <if test="bkBeginamount != null" >
-        bk_beginamount = #{bkBeginamount,jdbcType=DOUBLE},
+      <if test="bk_beginamount != null" >
+        bk_beginamount = #{bk_beginamount,jdbcType=DOUBLE},
       </if>
-      <if test="bkThisamount != null" >
-        bk_thisamount = #{bkThisamount,jdbcType=DOUBLE},
+      <if test="bk_thisamount != null" >
+        bk_thisamount = #{bk_thisamount,jdbcType=DOUBLE},
       </if>
-      <if test="bkStatus != null" >
-        bk_status = #{bkStatus,jdbcType=VARCHAR},
+      <if test="bk_status != null" >
+        bk_status = #{bk_status,jdbcType=VARCHAR},
       </if>
-      <if test="bkStatuscode != null" >
-        bk_statuscode = #{bkStatuscode,jdbcType=VARCHAR},
+      <if test="bk_statuscode != null" >
+        bk_statuscode = #{bk_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="bkRecorderid != null" >
-        bk_recorderid = #{bkRecorderid,jdbcType=INTEGER},
+      <if test="bk_recorderid != null" >
+        bk_recorderid = #{bk_recorderid,jdbcType=INTEGER},
       </if>
-      <if test="bkRecorder != null" >
-        bk_recorder = #{bkRecorder,jdbcType=VARCHAR},
+      <if test="bk_recorder != null" >
+        bk_recorder = #{bk_recorder,jdbcType=VARCHAR},
       </if>
-      <if test="bkRecorddate != null" >
-        bk_recorddate = #{bkRecorddate,jdbcType=TIMESTAMP},
+      <if test="bk_recorddate != null" >
+        bk_recorddate = #{bk_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="bkYm != null" >
-        bk_ym = #{bkYm,jdbcType=INTEGER},
+      <if test="bk_ym != null" >
+        bk_ym = #{bk_ym,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null" >
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyid = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        updaterid = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null" >
-        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="bkText1 != null" >
-        bk_text1 = #{bkText1,jdbcType=VARCHAR},
+      <if test="bk_text1 != null" >
+        bk_text1 = #{bk_text1,jdbcType=VARCHAR},
       </if>
-      <if test="bkText2 != null" >
-        bk_text2 = #{bkText2,jdbcType=VARCHAR},
+      <if test="bk_text2 != null" >
+        bk_text2 = #{bk_text2,jdbcType=VARCHAR},
       </if>
-      <if test="bkText3 != null" >
-        bk_text3 = #{bkText3,jdbcType=VARCHAR},
+      <if test="bk_text3 != null" >
+        bk_text3 = #{bk_text3,jdbcType=VARCHAR},
       </if>
-      <if test="bkText4 != null" >
-        bk_text4 = #{bkText4,jdbcType=VARCHAR},
+      <if test="bk_text4 != null" >
+        bk_text4 = #{bk_text4,jdbcType=VARCHAR},
       </if>
-      <if test="bkText5 != null" >
-        bk_text5 = #{bkText5,jdbcType=VARCHAR},
+      <if test="bk_text5 != null" >
+        bk_text5 = #{bk_text5,jdbcType=VARCHAR},
       </if>
-      <if test="bkRemark != null" >
-        bk_remark = #{bkRemark,jdbcType=LONGVARCHAR},
+      <if test="bk_remark != null" >
+        bk_remark = #{bk_remark,jdbcType=LONGVARCHAR},
       </if>
     </set>
-    where bk_id = #{bkId,jdbcType=INTEGER}
+    where bk_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.entities.Bankinformation" >
     update bankinformation
@@ -287,9 +281,9 @@
       bk_recorder = #{bkRecorder,jdbcType=VARCHAR},
       bk_recorddate = #{bkRecorddate,jdbcType=TIMESTAMP},
       bk_ym = #{bkYm,jdbcType=INTEGER},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      companyid = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
       bk_text1 = #{bkText1,jdbcType=VARCHAR},
       bk_text2 = #{bkText2,jdbcType=VARCHAR},
       bk_text3 = #{bkText3,jdbcType=VARCHAR},
@@ -312,15 +306,15 @@
       bk_recorder = #{bkRecorder,jdbcType=VARCHAR},
       bk_recorddate = #{bkRecorddate,jdbcType=TIMESTAMP},
       bk_ym = #{bkYm,jdbcType=INTEGER},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      companyid = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
       bk_text1 = #{bkText1,jdbcType=VARCHAR},
       bk_text2 = #{bkText2,jdbcType=VARCHAR},
       bk_text3 = #{bkText3,jdbcType=VARCHAR},
       bk_text4 = #{bkText4,jdbcType=VARCHAR},
       bk_text5 = #{bkText5,jdbcType=VARCHAR}
-    where bk_id = #{bkId,jdbcType=INTEGER}
+    where bk_id = #{bk_id,jdbcType=INTEGER}
   </update>
 
   <select id="selectAll" resultMap="BaseResultMap">

+ 28 - 114
applications/document/document-server/src/main/resources/mapper/BomDetailMapper.xml

@@ -11,7 +11,7 @@
     <result column="bd_baseqty" property="bd_baseqty" jdbcType="INTEGER" />
     <result column="bd_replace" property="bd_replace" jdbcType="VARCHAR" />
     <result column="bd_remark" property="bd_remark" jdbcType="VARCHAR" />
-    <result column="comapnyId" property="companyId" jdbcType="INTEGER" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
     <result column="bd_text1" property="bd_text1" jdbcType="VARCHAR" />
@@ -22,7 +22,7 @@
   </resultMap>
   <sql id="Base_Column_List" >
     bd_id, bd_bomid, bd_detno, bd_sonid, bd_soncode, bd_unit, bd_baseqty, bd_replace, 
-    bd_remark, comapnyId, updaterId, updateTime, bd_text1, bd_text2, bd_text3, bd_text4, 
+    bd_remark, companyId, updaterId, updateTime, bd_text1, bd_text2, bd_text3, bd_text4, 
     bd_text5
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
@@ -39,13 +39,13 @@
     insert into bomdetail (bd_bomid, bd_detno,
       bd_sonid, bd_soncode, bd_unit, 
       bd_baseqty, bd_replace, bd_remark, 
-      comapnyId, updaterId, updateTime, 
+      companyId, updaterId, updateTime, 
       bd_text1, bd_text2, bd_text3, 
       bd_text4, bd_text5)
     values ( #{bd_bomid,jdbcType=INTEGER}, #{bd_detno,jdbcType=INTEGER},
       #{bd_sonid,jdbcType=INTEGER}, #{bd_soncode,jdbcType=VARCHAR}, #{bd_unit,jdbcType=VARCHAR}, 
       #{bd_baseqty,jdbcType=INTEGER}, #{bd_replace,jdbcType=VARCHAR}, #{bd_remark,jdbcType=VARCHAR}, 
-      #{comapnyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, 
       #{bd_text1,jdbcType=VARCHAR}, #{bd_text2,jdbcType=VARCHAR}, #{bd_text3,jdbcType=VARCHAR}, 
       #{bd_text4,jdbcType=VARCHAR}, #{bd_text5,jdbcType=VARCHAR})
   </insert>
@@ -76,8 +76,8 @@
       <if test="bd_remark != null" >
         bd_remark,
       </if>
-      <if test="comapnyId != null" >
-        comapnyId,
+      <if test="companyId != null" >
+        companyId,
       </if>
       <if test="updaterId != null" >
         updaterId,
@@ -126,8 +126,8 @@
       <if test="bd_remark != null" >
         #{bd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="comapnyId != null" >
-        #{comapnyId,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
       </if>
       <if test="updaterId != null" >
         #{updaterId,jdbcType=INTEGER},
@@ -179,8 +179,8 @@
       <if test="bd_remark != null" >
         bd_remark = #{bd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="comapnyId != null" >
-        comapnyId = #{comapnyId,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
       </if>
       <if test="updaterId != null" >
         updaterId = #{updaterId,jdbcType=INTEGER},
@@ -216,7 +216,7 @@
       bd_baseqty = #{bd_baseqty,jdbcType=INTEGER},
       bd_replace = #{bd_replace,jdbcType=VARCHAR},
       bd_remark = #{bd_remark,jdbcType=VARCHAR},
-      comapnyId = #{comapnyId,jdbcType=INTEGER},
+      companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updateTime = #{updateTime,jdbcType=TIMESTAMP},
       bd_text1 = #{bd_text1,jdbcType=VARCHAR},
@@ -227,108 +227,22 @@
     where bd_id = #{id}
   </update>
   <insert id="batchInsert" parameterType="java.util.List">
+    INSERT INTO BOMDETAIL (bd_bomid, bd_detno,
+    bd_sonid, bd_soncode, bd_unit,
+    bd_baseqty, bd_replace, bd_remark,
+    companyId, updaterId, updateTime,
+    bd_text1, bd_text2, bd_text3,
+    bd_text4, bd_text5)
+    values
     <foreach collection="list" item="item" index="index" open="" close="" separator=",">
-      INSERT INTO BOMDETAIL
-      <trim prefix="(" suffix=")" suffixOverrides=",">
-        <if test="item.bd_bomid != null" >
-          bd_bomid,
-        </if>
-        <if test="item.bd_detno != null" >
-          bd_detno,
-        </if>
-        <if test="item.bd_sonid != null" >
-          bd_sonid,
-        </if>
-        <if test="item.bd_soncode != null" >
-          bd_soncode,
-        </if>
-        <if test="item.bd_unit != null" >
-          bd_unit,
-        </if>
-        <if test="item.bd_baseqty != null" >
-          bd_baseqty,
-        </if>
-        <if test="item.bd_replace != null" >
-          bd_replace,
-        </if>
-        <if test="item.bd_remark != null" >
-          bd_remark,
-        </if>
-        <if test="item.comapnyId != null" >
-          comapnyId,
-        </if>
-        <if test="item.updaterId != null" >
-          updaterId,
-        </if>
-        <if test="item.updateTime != null" >
-          updateTime,
-        </if>
-        <if test="item.bd_text1 != null" >
-          bd_text1,
-        </if>
-        <if test="item.bd_text2 != null" >
-          bd_text2,
-        </if>
-        <if test="item.bd_text3 != null" >
-          bd_text3,
-        </if>
-        <if test="item.bd_text4 != null" >
-          bd_text4,
-        </if>
-        <if test="item.bd_text5 != null" >
-          bd_text5,
-        </if>
-      </trim>
-      <trim prefix="values (" suffix=")" suffixOverrides="," >
-        <if test="item.bd_bomid != null" >
-          #{item.bd_bomid},
-        </if>
-        <if test="bd_detno != null" >
-          #{item.bd_detno,jdbcType=INTEGER},
-        </if>
-        <if test="bd_sonid != null" >
-          #{item.bd_sonid,jdbcType=INTEGER},
-        </if>
-        <if test="bd_soncode != null" >
-          #{item.bd_soncode,jdbcType=VARCHAR},
-        </if>
-        <if test="bd_unit != null" >
-          #{item.bd_unit,jdbcType=VARCHAR},
-        </if>
-        <if test="bd_baseqty != null" >
-          #{item.bd_baseqty,jdbcType=INTEGER},
-        </if>
-        <if test="bd_replace != null" >
-          #{item.bd_replace,jdbcType=VARCHAR},
-        </if>
-        <if test="bd_remark != null" >
-          #{item.bd_remark,jdbcType=VARCHAR},
-        </if>
-        <if test="comapnyId != null" >
-          #{item.comapnyId,jdbcType=INTEGER},
-        </if>
-        <if test="updaterId != null" >
-          #{item.updaterId,jdbcType=INTEGER},
-        </if>
-        <if test="updateTime != null" >
-          #{item.updateTime,jdbcType=TIMESTAMP},
-        </if>
-        <if test="bd_text1 != null" >
-          #{item.bd_text1,jdbcType=VARCHAR},
-        </if>
-        <if test="bd_text2 != null" >
-          #{item.bd_text2,jdbcType=VARCHAR},
-        </if>
-        <if test="bd_text3 != null" >
-          #{item.bd_text3,jdbcType=VARCHAR},
-        </if>
-        <if test="bd_text4 != null" >
-          #{item.bd_text4,jdbcType=VARCHAR},
-        </if>
-        <if test="bd_text5 != null" >
-          #{item.bd_text5,jdbcType=VARCHAR},
-        </if>
-      </trim>
+      (
+      #{item.bd_bomid,jdbcType=INTEGER}, #{item.bd_detno,jdbcType=INTEGER},
+      #{item.bd_sonid,jdbcType=INTEGER}, #{item.bd_soncode,jdbcType=VARCHAR}, #{item.bd_unit,jdbcType=VARCHAR},
+      #{item.bd_baseqty,jdbcType=INTEGER}, #{item.bd_replace,jdbcType=VARCHAR}, #{item.bd_remark,jdbcType=VARCHAR},
+      #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP},
+      #{item.bd_text1,jdbcType=VARCHAR}, #{item.bd_text2,jdbcType=VARCHAR}, #{item.bd_text3,jdbcType=VARCHAR},
+      #{item.bd_text4,jdbcType=VARCHAR}, #{item.bd_text5,jdbcType=VARCHAR}
+      )
     </foreach>
   </insert>
 
@@ -360,8 +274,8 @@
         <if test="bd_remark != null" >
           bd_remark = #{item.bd_remark,jdbcType=VARCHAR},
         </if>
-        <if test="comapnyId != null" >
-          comapnyId = #{item.comapnyId,jdbcType=INTEGER},
+        <if test="companyId != null" >
+          companyId = #{item.companyId,jdbcType=INTEGER},
         </if>
         <if test="updaterId != null" >
           updaterId = #{item.updaterId,jdbcType=INTEGER},

+ 18 - 0
applications/document/document-server/src/main/resources/mapper/BomMapper.xml

@@ -37,6 +37,9 @@
     where bo_id = #{id}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Bom" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into bom (bo_motherid, bo_mothercode,
       bo_mothername, bo_version, bo_status, 
       bo_statuscode, bo_recorderid, bo_recorder, 
@@ -53,6 +56,9 @@
       )
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Bom" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into bom
     <trim prefix="(" suffix=")" suffixOverrides="," >
       <if test="bo_motherid != null" >
@@ -251,4 +257,16 @@
   <select id="getCodeById" resultType="string">
       SELECT BO_MOTHERCODE FROM BOM WHERE BO_ID = #{id} and COMPANYID = #{companyId}
   </select>
+  <select id="getListData" resultMap="BaseResultMap">
+    SELECT * FROM BOM
+    <where>
+      <if test="condition!=null">
+        ${condition}
+      </if>
+      <if test="companyId!=null">
+        AND companyId = #{companyId}
+      </if>
+    </where>
+    ORDER BY BO_ID
+  </select>
 </mapper>

+ 21 - 92
applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml

@@ -211,102 +211,31 @@
   </select>
 
   <insert id="batchInsert" parameterType="java.util.List" >
-    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
-      insert into customeraddress
-      <trim prefix="(" suffix=")" suffixOverrides=",">
-
-        <if test="item.ca_cuid != null">
-          ca_cuid,
-        </if>
-        <if test="item.ca_detno != null">
-          ca_detno,
-        </if>
-        <if test="item.ca_person != null">
-          ca_person,
-        </if>
-        <if test="item.ca_phone != null">
-          ca_phone,
-        </if>
-        <if test="item.ca_default != null">
-          ca_default,
-        </if>
-        <if test="item.companyId != null">
-          companyid,
-        </if>
-        <if test="item.updaterId != null">
-          updaterid,
-        </if>
-        <if test="item.updateTime != null">
-          updatetime,
-        </if>
-        <if test="item.ca_text1 != null">
-          ca_text1,
-        </if>
-        <if test="item.ca_text2 != null">
-          ca_text2,
-        </if>
-        <if test="item.ca_text3 != null">
-          ca_text3,
-        </if>
-        <if test="item.ca_text4 != null">
-          ca_text4,
-        </if>
-        <if test="item.ca_text5 != null">
-          ca_text5,
-        </if>
-        <if test="item.ca_address != null">
-          ca_address,
-        </if>
-      </trim>
-      <trim prefix="values (" suffix=")" suffixOverrides=",">
 
-        <if test="item.ca_cuid != null">
-          #{item.ca_cuid,jdbcType=INTEGER},
-        </if>
-        <if test="item.ca_detno != null">
-          #{item.ca_detno,jdbcType=INTEGER},
-        </if>
-        <if test="item.ca_person != null">
-          #{item.ca_person,jdbcType=VARCHAR},
-        </if>
-        <if test="item.ca_phone != null">
-          #{item.ca_phone,jdbcType=INTEGER},
-        </if>
-        <if test="item.ca_default != null">
-          #{item.ca_default,jdbcType=INTEGER},
-        </if>
-        <if test="item.companyId != null">
-          #{item.companyId,jdbcType=INTEGER},
-        </if>
-        <if test="item.updaterId != null">
-          #{item.updaterId,jdbcType=INTEGER},
-        </if>
-        <if test="item.updateTime != null">
-          #{item.updateTime,jdbcType=TIMESTAMP},
-        </if>
-        <if test="item.ca_text1 != null">
-          #{item.ca_text1,jdbcType=VARCHAR},
-        </if>
-        <if test="item.ca_text2 != null">
-          #{item.ca_text2,jdbcType=VARCHAR},
-        </if>
-        <if test="item.ca_text3 != null">
-          #{item.ca_text3,jdbcType=VARCHAR},
-        </if>
-        <if test="item.ca_text4 != null">
-          #{item.ca_text4,jdbcType=VARCHAR},
-        </if>
-        <if test="item.ca_text5 != null">
-          #{item.ca_text5,jdbcType=VARCHAR},
-        </if>
-        <if test="item.ca_address != null">
-          #{item.ca_address,jdbcType=LONGVARCHAR},
-        </if>
-      </trim>
+    insert into customeraddress
+    (ca_cuid,ca_detno,ca_person,ca_address,ca_phone,
+    ca_default,companyid,updaterid,updatetime,ca_text1,
+    ca_text2,ca_text3,ca_text4,ca_text5) VALUES
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      (
+      #{item.ca_cuid,jdbcType=INTEGER},
+      #{item.ca_detno,jdbcType=INTEGER},
+      #{item.ca_person,jdbcType=VARCHAR},
+      #{item.ca_address,jdbcType=LONGVARCHAR},
+      #{item.ca_phone,jdbcType=INTEGER},
+      #{item.ca_default,jdbcType=INTEGER},
+      #{item.companyId,jdbcType=INTEGER},
+      #{item.updaterId,jdbcType=INTEGER},
+      #{item.updateTime,jdbcType=TIMESTAMP},
+      #{item.ca_text1,jdbcType=VARCHAR},
+      #{item.ca_text2,jdbcType=VARCHAR},
+      #{item.ca_text3,jdbcType=VARCHAR},
+      #{item.ca_text4,jdbcType=VARCHAR},
+      #{item.ca_text5,jdbcType=VARCHAR}
+       )
     </foreach>
   </insert>
 
-
   <update id="batchUpdate" parameterType="com.usoftchina.saas.document.entities.Customeraddress" >
     <foreach collection="list" item="item" index="index" open="" close="" separator=";">
       update customeraddress

+ 15 - 56
applications/document/document-server/src/main/resources/mapper/CustomercontactMapper.xml

@@ -196,72 +196,31 @@
   </select>
 
   <insert id="batchInsert" parameterType="java.util.List" >
+    insert into customercontact (cc_cuid, cc_detno,
+    cc_name, cc_tel, cc_qq,
+    cc_email, companyid, updaterid,
+    updatetime, cc_text1, cc_text2,
+    cc_text3, cc_text4, cc_text5,cc_default
+    )
+    values
     <foreach collection="list" item="item" index="index" open="" close="" separator=",">
-      insert into customercontact
-      <trim prefix="(" suffix=")" suffixOverrides=",">
-        <if test="item.cc_cuid != null">
-          cc_cuid,
-        </if>
-        <if test="item.cc_detno != null">
-          cc_detno,
-        </if>
-        <if test="item.cc_name != null">
-          cc_name,
-        </if>
-        <if test="item.cc_tel != null">
-          cc_tel,
-        </if>
-        <if test="item.cc_qq != null">
-          cc_qq,
-        </if>
-        <if test="item.cc_email != null">
-          cc_email,
-        </if>
-        <if test="item.companyId != null">
-          companyid,
-        </if>
-        <if test="item.updaterId != null">
-          updaterid,
-        </if>
-        <if test="item.updateTime != null">
-          updatetime,
-        </if>
-        <if test="item.cc_default != null">
-          cc_default,
-        </if>
-      </trim>
-      <trim prefix="values (" suffix=")" suffixOverrides=",">
-        <if test="item.cc_cuid != null">
+      (
           #{item.cc_cuid,jdbcType=INTEGER},
-        </if>
-        <if test="item.cc_detno != null">
           #{item.cc_detno,jdbcType=INTEGER},
-        </if>
-        <if test="item.cc_name != null">
           #{item.cc_name,jdbcType=VARCHAR},
-        </if>
-        <if test="item.cc_tel != null">
           #{item.cc_tel,jdbcType=INTEGER},
-        </if>
-        <if test="item.cc_qq != null">
           #{item.cc_qq,jdbcType=VARCHAR},
-        </if>
-        <if test="item.cc_email != null">
           #{item.cc_email,jdbcType=VARCHAR},
-        </if>
-        <if test="item.companyId != null">
           #{item.companyId,jdbcType=INTEGER},
-        </if>
-        <if test="item.updaterId != null">
           #{item.updaterId,jdbcType=INTEGER},
-        </if>
-        <if test="item.updateTime != null">
           #{item.updateTime,jdbcType=TIMESTAMP},
-        </if>
-        <if test="item.cc_default != null">
-          #{item.cc_default,jdbcType=INTEGER},
-        </if>
-      </trim>
+          #{item.cc_text1,jdbcType=VARCHAR},
+          #{item.cc_text2,jdbcType=VARCHAR},
+          #{item.cc_text3,jdbcType=VARCHAR},
+          #{item.cc_text4,jdbcType=VARCHAR},
+          #{item.cc_text5,jdbcType=VARCHAR},
+          #{item.cc_default,jdbcType=INTEGER}
+      )
     </foreach>
   </insert>
 

+ 4 - 0
applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml

@@ -122,4 +122,8 @@
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM PRODUCTBRAND
   </select>
+
+  <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+    SELECT PB_NAME display,PB_NAME value FROM PRODUCTBRAND
+  </select>
 </mapper>

+ 16 - 97
applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml

@@ -226,103 +226,22 @@
     where vc_id = #{id}
   </update>
   <insert id="batchInsert" parameterType="java.util.List">
-    <foreach collection="list" item="item" separator=",">
-      INSERT INTO VENDORCONTACT
-      <trim prefix="(" suffix=")" suffixOverrides=",">
-        <if test="item.vc_veid != null" >
-          vc_veid,
-        </if>
-        <if test="item.vc_detno != null" >
-          vc_detno,
-        </if>
-        <if test="item.vc_name != null" >
-          vc_name,
-        </if>
-        <if test="item.vc_tel != null" >
-          vc_tel,
-        </if>
-        <if test="item.vc_qq != null" >
-          vc_qq,
-        </if>
-        <if test="item.vc_email != null" >
-          vc_email,
-        </if>
-        <if test="item.companyId != null" >
-          companyId,
-        </if>
-        <if test="item.updaterId != null" >
-          updaterId,
-        </if>
-        <if test="item.updateTime != null" >
-          updateTime,
-        </if>
-        <if test="item.vc_text1 != null" >
-          vc_text1,
-        </if>
-        <if test="item.vc_text2 != null" >
-          vc_text2,
-        </if>
-        <if test="item.vc_text3 != null" >
-          vc_text3,
-        </if>
-        <if test="item.vc_text4 != null" >
-          vc_text4,
-        </if>
-        <if test="item.vc_text5 != null" >
-          vc_text5,
-        </if>
-        <if test="item.vc_default != null" >
-          vc_default,
-        </if>
-      </trim>
-
-      <trim prefix="values(" suffix=")" suffixOverrides=",">
-        <if test="item.vc_veid != null" >
-          #{item.vc_veid},
-        </if>
-        <if test="item.vc_detno != null" >
-          #{item.vc_detno,jdbcType=INTEGER},
-        </if>
-        <if test="item.vc_name != null" >
-          #{item.vc_name,jdbcType=VARCHAR},
-        </if>
-        <if test="item.vc_tel != null" >
-          #{item.vc_tel,jdbcType=INTEGER},
-        </if>
-        <if test="item.vc_qq != null" >
-          #{item.vc_qq,jdbcType=VARCHAR},
-        </if>
-        <if test="item.vc_email != null" >
-          #{item.vc_email,jdbcType=VARCHAR},
-        </if>
-        <if test="item.companyId != null" >
-          #{item.companyId,jdbcType=INTEGER},
-        </if>
-        <if test="item.updaterId != null" >
-          #{item.updaterId,jdbcType=INTEGER},
-        </if>
-        <if test="item.updateTime != null" >
-          #{item.updateTime,jdbcType=TIMESTAMP},
-        </if>
-        <if test="item.vc_text1 != null" >
-          #{item.vc_text1,jdbcType=VARCHAR},
-        </if>
-        <if test="item.vc_text2 != null" >
-          #{item.vc_text2,jdbcType=VARCHAR},
-        </if>
-        <if test="item.vc_text3 != null" >
-          #{item.vc_text3,jdbcType=VARCHAR},
-        </if>
-        <if test="item.vc_text4 != null" >
-          #{item.vc_text4,jdbcType=VARCHAR},
-        </if>
-        <if test="item.vc_text5 != null" >
-          #{item.vc_text5,jdbcType=VARCHAR},
-        </if>
-        <if test="item.vc_default != null" >
-          #{item.vc_default,jdbcType=VARCHAR},
-        </if>
-      </trim>
+      INSERT INTO VENDORCONTACT(vc_veid, vc_detno,
+        vc_name, vc_tel, vc_qq,
+        vc_email, companyId, updaterId,
+        updateTime, vc_text1, vc_text2,
+        vc_text3, vc_text4, vc_text5, vc_default
+        )
+        values
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      (
+      #{item.vc_veid}, #{item.vc_detno,jdbcType=INTEGER},
+      #{item.vc_name,jdbcType=VARCHAR}, #{item.vc_tel,jdbcType=INTEGER}, #{item.vc_qq,jdbcType=VARCHAR},
+      #{item.vc_email,jdbcType=VARCHAR}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.vc_text1,jdbcType=VARCHAR}, #{item.vc_text2,jdbcType=VARCHAR},
+      #{item.vc_text3,jdbcType=VARCHAR}, #{item.vc_text4,jdbcType=VARCHAR}, #{item.vc_text5,jdbcType=VARCHAR},
+      #{item.vc_default,jdbcType=VARCHAR}
+      )
     </foreach>
   </insert>
   <update id="batchUpdate" parameterType="com.usoftchina.saas.document.entities.Vendorcontact">

+ 6 - 0
applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml

@@ -25,6 +25,9 @@
     where vk_id = #{id}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Vendorkind">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into vendorkind (vk_name, vk_recordid,
     vk_recorder, vk_date, companyId,
     updaterId, updateTime)
@@ -33,6 +36,9 @@
     #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Vendorkind">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into vendorkind
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="vk_name != null">

+ 49 - 38
applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml

@@ -11,7 +11,7 @@
         <result column="wh_recordid" property="wh_recordid" jdbcType="INTEGER" />
         <result column="wh_recorder" property="wh_recorder" jdbcType="INTEGER" />
         <result column="wh_date" property="wh_date" jdbcType="INTEGER" />
-        <result column="companyid" property="companyId" jdbcType="INTEGER" />
+        <result column="companyId" property="companyId" jdbcType="INTEGER" />
         <result column="updatemanid" property="updaterId" jdbcType="INTEGER" />
         <result column="updatedate" property="updateTime" jdbcType="TIMESTAMP" />
         <result column="wh_text1" property="wh_text1" jdbcType="VARCHAR" />
@@ -30,11 +30,11 @@
         <parameter property="inoutNo" jdbcType="VARCHAR" mode="IN" />
         <parameter property="class" jdbcType="VARCHAR" mode="IN" />
         <parameter property="commitid" jdbcType="INTEGER" mode="IN" />
-        <parameter property="companyid" jdbcType="INTEGER" mode="IN" />
+        <parameter property="companyId" jdbcType="INTEGER" mode="IN" />
         <parameter property="result" jdbcType="VARCHAR" mode="OUT" />
     </parameterMap>
     <select id="validPeriod" parameterType="map" resultType="java.lang.Short">
-        SELECT IFNULL(PD_STATUS,0) PD_STATUS FROM PERIODSDETAIL WHERE COMPANYID=#{companyId} AND PD_DETNO=#{period}
+        SELECT IFNULL(PD_STATUS,0) PD_STATUS FROM PERIODSDETAIL WHERE companyId=#{companyId} AND PD_DETNO=#{period}
     </select>
 
     <sql id="Example_Where_Clause">
@@ -97,40 +97,43 @@
     </sql>
     <sql id="Base_Column_List">
         wh_id, wh_code, wh_type, wh_description, wh_statuscode, wh_status, wh_recorderid,
-        wh_recorder, wh_date, companyid, updaterId, updatetime, wh_text1, wh_text2, wh_text3,
+        wh_recorder, wh_date, companyId, updaterId, updateTime, wh_text1, wh_text2, wh_text3,
         wh_text4, wh_text5
     </sql>
-    <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="WarehouseResultMapper">
+    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="WarehouseResultMapper">
         select
         <include refid="Base_Column_List" />
         from warehouse
-        where wh_id = #{wh_id,jdbcType=INTEGER}
+        where wh_id = #{id}
     </select>
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
         delete from warehouse
-        where wh_id = #{wh_id,jdbcType=INTEGER}
+        where wh_id = #{id}
     </delete>
 
     <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Warehouse">
-        insert into warehouse (wh_id, wh_code, wh_type,
+        <selectKey resultType="java.lang.Long" keyProperty="id">
+            SELECT LAST_INSERT_ID() AS ID
+        </selectKey>
+        insert into warehouse (wh_code, wh_type,
         wh_description, wh_statuscode, wh_status,
         wh_recorderid, wh_recorder, wh_date,
-        companyid, updaterId, updatetime,
+        companyId, updaterId, updateTime,
         wh_text1, wh_text2, wh_text3,
         wh_text4, wh_text5)
-        values (#{wh_id,jdbcType=INTEGER}, #{wh_code,jdbcType=VARCHAR}, #{wh_type,jdbcType=VARCHAR},
+        values (#{wh_code,jdbcType=VARCHAR}, #{wh_type,jdbcType=VARCHAR},
         #{wh_description,jdbcType=VARCHAR}, #{wh_statuscode,jdbcType=VARCHAR}, #{wh_status,jdbcType=VARCHAR},
         #{wh_recorderid,jdbcType=VARCHAR}, #{wh_recorder,jdbcType=VARCHAR}, #{wh_date,jdbcType=TIMESTAMP},
-        #{companyid,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP},
+        #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP},
         #{wh_text1,jdbcType=VARCHAR}, #{wh_text2,jdbcType=VARCHAR}, #{wh_text3,jdbcType=VARCHAR},
         #{wh_text4,jdbcType=VARCHAR}, #{wh_text5,jdbcType=VARCHAR})
     </insert>
     <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Warehouse">
+        <selectKey resultType="java.lang.Long" keyProperty="id">
+            SELECT LAST_INSERT_ID() AS ID
+        </selectKey>
         insert into warehouse
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="wh_id != null">
-                wh_id,
-            </if>
             <if test="wh_code != null">
                 wh_code,
             </if>
@@ -155,14 +158,14 @@
             <if test="wh_date != null">
                 wh_date,
             </if>
-            <if test="companyid != null">
-                companyid,
+            <if test="companyId != null">
+                companyId,
             </if>
             <if test="updaterId != null">
                 updaterId,
             </if>
-            <if test="updatetime != null">
-                updatetime,
+            <if test="updateTime != null">
+                updateTime,
             </if>
             <if test="wh_text1 != null">
                 wh_text1,
@@ -181,9 +184,6 @@
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="wh_id != null">
-                #{wh_id,jdbcType=INTEGER},
-            </if>
             <if test="wh_code != null">
                 #{wh_code,jdbcType=VARCHAR},
             </if>
@@ -208,14 +208,14 @@
             <if test="wh_date != null">
                 #{wh_date,jdbcType=TIMESTAMP},
             </if>
-            <if test="companyid != null">
-                #{companyid,jdbcType=INTEGER},
+            <if test="companyId != null">
+                #{companyId,jdbcType=INTEGER},
             </if>
             <if test="updaterId != null">
                 #{updaterId,jdbcType=INTEGER},
             </if>
-            <if test="updatetime != null">
-                #{updatetime,jdbcType=TIMESTAMP},
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
             </if>
             <if test="wh_text1 != null">
                 #{wh_text1,jdbcType=VARCHAR},
@@ -261,14 +261,14 @@
             <if test="wh_date != null">
                 wh_date = #{wh_date,jdbcType=TIMESTAMP},
             </if>
-            <if test="companyid != null">
-                companyid = #{companyid,jdbcType=INTEGER},
+            <if test="companyId != null">
+                companyId = #{companyId,jdbcType=INTEGER},
             </if>
             <if test="updaterId != null">
                 updaterId = #{updaterId,jdbcType=INTEGER},
             </if>
-            <if test="updatetime != null">
-                updatetime = #{updatetime,jdbcType=TIMESTAMP},
+            <if test="updateTime != null">
+                updateTime = #{updateTime,jdbcType=TIMESTAMP},
             </if>
             <if test="wh_text1 != null">
                 wh_text1 = #{wh_text1,jdbcType=VARCHAR},
@@ -286,7 +286,7 @@
                 wh_text5 = #{wh_text5,jdbcType=VARCHAR},
             </if>
         </set>
-        where wh_id = #{wh_id,jdbcType=INTEGER}
+        where wh_id = #{id}
     </update>
     <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Warehouse">
         update warehouse
@@ -298,26 +298,37 @@
         wh_recorderid = #{wh_recorderid,jdbcType=VARCHAR},
         wh_recorder = #{wh_recorder,jdbcType=VARCHAR},
         wh_date = #{wh_date,jdbcType=TIMESTAMP},
-        companyid = #{companyid,jdbcType=INTEGER},
+        companyId = #{companyId,jdbcType=INTEGER},
         updaterId = #{updaterId,jdbcType=INTEGER},
-        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
         wh_text1 = #{wh_text1,jdbcType=VARCHAR},
         wh_text2 = #{wh_text2,jdbcType=VARCHAR},
         wh_text3 = #{wh_text3,jdbcType=VARCHAR},
         wh_text4 = #{wh_text4,jdbcType=VARCHAR},
         wh_text5 = #{wh_text5,jdbcType=VARCHAR}
-        where wh_id = #{wh_id,jdbcType=INTEGER}
+        where wh_id = #{id}
     </update>
 
-    <select id="selectAll" resultType="com.usoftchina.saas.document.entities.Warehouse">
-        SELECT * FROM WAREHOUSE WHERE COMPANYID = #{companyId}
-    </select>
-
     <select id="validateCodeWhenInsert" resultType="int">
         select count(*) from WAREHOUSE where WH_CODE = #{code} and companyId =#{companyId}
     </select>
     <select id="validateCodeWhenUpdate" resultType="int" >
         select count(*) from WAREHOUSE where WH_CODE = #{code} and WH_ID != #{id} and companyId =#{companyId}
     </select>
+
+    <select id="selectWarehouseListByCondition">
+        select  *  from warehouse
+        <where>
+            <if test="con != null">
+                ${con}
+            </if>
+            <if test="companyId != null">
+                and  companyid = #{companyId}
+            </if>
+        </where>
+        order by wh_id
+    </select>
+
+
 </mapper>
 

+ 11 - 3
applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomeraddressMapperTest.java

@@ -47,9 +47,17 @@ public class CustomeraddressMapperTest {
     @Test
     public void batchInsert() throws Exception {
         List<Customeraddress> list = new ArrayList<>();
-        Customeraddress customeraddress = new Customeraddress();
-        customeraddress.setCa_address("地址1");
-        list.add(customeraddress);
+        Customeraddress customeraddress1 = new Customeraddress();
+        customeraddress1.setCa_address("地址1");
+
+        Customeraddress customeraddress2 = new Customeraddress();
+        customeraddress2.setCa_address("地址2");
+
+        list.add(customeraddress1);
+        list.add(customeraddress2);
+
+
+
         customeraddressMapper.batchInsert(list);
     }
 

+ 7 - 0
applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomercontactMapperTest.java

@@ -53,7 +53,14 @@ public class CustomercontactMapperTest {
         customercontact.setCc_name("zdw");
         customercontact.setCc_tel(1881);
 
+        Customercontact customercontact1 = new Customercontact();
+        customercontact1.setCc_cuid(new Long(1));
+        customercontact1.setCc_detno(1);
+        customercontact1.setCc_name("zdw");
+        customercontact1.setCc_tel(1881);
+
         insertDetail1.add(customercontact);
+        insertDetail1.add(customercontact1);
         customercontactMapper.batchInsert(insertDetail1);
     }
 

+ 18 - 10
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/FundtransferController.java

@@ -2,6 +2,8 @@ package com.usoftchina.saas.money.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Fundtran;
 import com.usoftchina.saas.money.po.Fundtransfer;
 import com.usoftchina.saas.money.service.FundtransferService;
@@ -14,33 +16,39 @@ import org.springframework.web.bind.annotation.*;
  * @date 2018/10/25 19:21
  **/
 @RestController
-@RequestMapping("/money/fundtransfer")
+@RequestMapping("/fundtransfer")
 public class FundtransferController {
     @Autowired
     private FundtransferService fundtransferService;
 
     @RequestMapping("/save")
     public Result insert(@RequestBody Fundtran body) {
-        int id = fundtransferService.insert(body);
-        return Result.success(id);
+        DocBaseDTO docBaseDTO = fundtransferService.insert(body);
+        return Result.success(docBaseDTO);
     }
 
 
-    @PostMapping("/delete")
-    public Result delete(@RequestBody int id){
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") int id){
         fundtransferService.delete(id);
         return Result.success();
     }
 
+    @PostMapping("/deleteDetail/{id}")
+    public Result deleteItem(@PathVariable("id") int id){
+        fundtransferService.deleteItem(id);
+        return Result.success();
+    }
+
 
-    @GetMapping("/read")
-    public Result read(int id){
+    @GetMapping("/read/{id}")
+    public Result read(@PathVariable("id")int id){
         return Result.success(fundtransferService.select(id));
     }
 
-    @GetMapping("/List")
-    public Result getList(PageRequest page){
-        PageInfo<Fundtransfer> list = fundtransferService.selectList(page);
+    @GetMapping("/list")
+    public Result getList(PageRequest page, ListReqDTO condition){
+        PageInfo<Fundtransfer> list = fundtransferService.selectList(page, condition);
         return Result.success(list);
     }
 

+ 8 - 3
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthreceiptsController.java

@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
  * @date 2018/10/24 17:26
  **/
 @RestController
-@RequestMapping("/money/othreceipts")
+@RequestMapping("/othreceipts")
 public class OthreceiptsController {
     @Autowired
     private OthreceiptsService othreceiptsService;
@@ -28,12 +28,17 @@ public class OthreceiptsController {
     }
 
 
-    @PostMapping("/delete")
-    public Result deletePaybalance(@RequestBody int id){
+    @PostMapping("/delete/{id}")
+    public Result deletePaybalance(@PathVariable("id") int id){
         othreceiptsService.delete(id);
         return Result.success();
     }
 
+    @PostMapping("/deleteDetail/{id}")
+    public Result deleteItem(@PathVariable("id") int id){
+        othreceiptsService.deleteItem(id);
+        return Result.success();
+    }
 
     @GetMapping("/read/{id}")
     public Result getPaybalance(@PathVariable("id")int id){

+ 5 - 5
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthspengdingsController.java

@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
  * @date 2018/10/24 22:15
  **/
 @RestController
-@RequestMapping("/money/othspengdings")
+@RequestMapping("/othspendings")
 public class OthspengdingsController {
     @Autowired
     private OthspendingsService othspendingsService;
@@ -31,14 +31,14 @@ public class OthspengdingsController {
     }
 
 
-    @PostMapping("/delete")
-    public Result deletePaybalance(@RequestBody int id){
+    @PostMapping("/delete/{id}")
+    public Result deletePaybalance(@PathVariable("id") int id){
         othspendingsService.delete(id);
         return Result.success();
     }
 
-    @PostMapping("/deleteItem")
-    public Result deleteItem(@RequestBody int id){
+    @PostMapping("/deleteDetail/{id}")
+    public Result deleteItem(@PathVariable("id") int id){
         othspendingsService.deleteItem(id);
         return Result.success();
     }

+ 11 - 5
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java

@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
  * @date 2018/10/22 15:03
  **/
 @RestController
-@RequestMapping("/money/paybalance")
+@RequestMapping("/paybalance")
 public class PaybalanceController {
     @Autowired
     private PaybalanceService paybalanceService;
@@ -28,18 +28,24 @@ public class PaybalanceController {
     }
 
 
-    @PostMapping("/delete")
-    public Result deletePaybalance(@RequestBody int id){
+    @PostMapping("/delete/{id}")
+    public Result deletePaybalance(@PathVariable("id") int id){
         paybalanceService.delete(id);
         return Result.success();
     }
 
-    @PostMapping("/deleteItem/")
-    public Result deleteItem(@RequestBody int id){
+    @PostMapping("/deleteDetail/{id}")
+    public Result deleteItem(@PathVariable("id") int id){
         paybalanceService.deleteItem(id);
         return Result.success();
     }
 
+    @PostMapping("/deleteDetai2/{id}")
+    public Result deleteItems(@PathVariable("id") int id){
+        paybalanceService.deleteItems(id);
+        return Result.success();
+    }
+
     @GetMapping("/read/{id}")
     public Result getPaybalance(@PathVariable("id")int id){
         return Result.success(paybalanceService.select(id));

+ 7 - 7
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java

@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*;
  * @date 2018/10/23 15:40
  **/
 @RestController
-@RequestMapping("/money/recbalance")
+@RequestMapping("/recbalance")
 public class RecbalanceContorller {
     @Autowired
     private RecbalanceService recbalanceService;
@@ -25,20 +25,20 @@ public class RecbalanceContorller {
         return Result.success(docBaseDTO);
     }
 
-    @PostMapping("/delete")
-    public Result delete(@RequestBody int id){
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") int id){
         recbalanceService.delect(id);
         return Result.success();
     }
 
-    @PostMapping("/deleteItems1")
-    public Result deleteItem(@RequestBody int id){
+    @PostMapping("/deleteDetail1/{id}")
+    public Result deleteItem(@PathVariable("id") int id){
         recbalanceService.deleteItem(id);
         return Result.success();
     }
 
-    @PostMapping("/deleteItems2")
-    public Result deleteItems(@RequestBody int id){
+    @PostMapping("/deleteDetail2/{id}")
+    public Result deleteItems(@PathVariable("id") int id){
         recbalanceService.deleteItems(id);
         return Result.success();
     }

+ 1 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java

@@ -19,7 +19,7 @@ public interface BanksubledgerMapper extends CommonBaseMapper<Banksubledger> {
 
     int deleteByPrimaryKey(Integer bl_id);
 
-    Long insert(Banksubledger record);
+//    Long insert(Banksubledger record);
 
     int insertSelective(Banksubledger record);
 

+ 10 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/FundtransferMapper.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.money.po.Fundtransfer;
+import com.usoftchina.saas.money.po.Othreceipts;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -18,4 +20,12 @@ public interface FundtransferMapper {
     int updateByPrimaryKeySelective(Fundtransfer record);
 
     int updateByPrimaryKey(Fundtransfer record);
+
+    Integer validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
+
+    Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id,
+                                   @Param("companyId") Long companyId);
+
+    List<Fundtransfer> selectFundtransferBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+    List<Fundtransfer> selectFundtransferListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 }

+ 3 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/FundtransferdetailMapper.java

@@ -2,6 +2,8 @@ package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.money.po.Fundtransferdetail;
 
+import java.util.List;
+
 public interface FundtransferdetailMapper {
     int deleteByPrimaryKey(Integer ftdId);
     int deleteItem(int id);
@@ -10,7 +12,7 @@ public interface FundtransferdetailMapper {
 
     int insertSelective(Fundtransferdetail record);
 
-    Fundtransferdetail selectByPrimaryKey(Integer ftdId);
+    List<Fundtransferdetail> selectByPrimaryKey(Integer ftdId);
 
     int updateByPrimaryKeySelective(Fundtransferdetail record);
 

+ 1 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java

@@ -11,7 +11,7 @@ public interface PaybalanceMapper extends CommonBaseMapper<Paybalance> {
 
     int deleteByPrimaryKey(Integer pb_id);
 
-    Long insert(Paybalance record);
+//    Long insert(Paybalance record);
 
     int insertSelective(Paybalance record);
 

+ 1 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java

@@ -21,7 +21,7 @@ public interface RecbalanceMapper extends CommonBaseMapper<Recbalance> {
 
     int deleteByPrimaryKey(Integer rb_id);
 
-    Long insert(Recbalance record);
+//    Long insert(Recbalance record);
 
     int insertSelective(Recbalance record);
 

+ 0 - 19
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Banksubledger.java

@@ -162,23 +162,4 @@ public class Banksubledger extends CommonBaseEntity implements Serializable {
         this.bl_remark = bl_remark == null ? null : bl_remark.trim();
     }
 
-    @Override
-    public void setCreatorId(long creatorId) {
-
-    }
-
-    @Override
-    public void setUpdaterId(long updaterId) {
-
-    }
-
-    @Override
-    public long getCompanyId() {
-        return 0;
-    }
-
-    @Override
-    public void setCompanyId(long companyId) {
-
-    }
 }

+ 69 - 95
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Fundtransfer.java

@@ -1,128 +1,102 @@
 package com.usoftchina.saas.money.po;
 
-import java.util.Date;
-
-public class Fundtransfer {
-    private Integer ftId;
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
 
-    private String ftCode;
+import java.io.Serializable;
+import java.util.Date;
 
-    private Date ftDate;
+public class Fundtransfer extends CommonBaseEntity implements Serializable {
 
-    private Integer ftRecorderid;
+    private String ft_code;
 
-    private String ftRecorder;
+    private Date ft_date;
 
-    private Date ftRecorddate;
+    private Integer ft_recorderid;
 
-    private String ftStatus;
+    private String ft_recorder;
 
-    private String ftStatuscode;
+    private Date ft_recorddate;
 
-    private String ftRemark;
+    private String ft_status;
 
-    private Integer companyid;
+    private String ft_statuscode;
 
-    private Integer updaterid;
+    private String ft_remark;
 
     private Date updatedate;
 
-    private String ftText1;
-
-    private String ftText2;
+    private String ft_text1;
 
-    private String ftText3;
+    private String ft_text2;
 
-    private String ftText4;
+    private String ft_text3;
 
-    private String ftText5;
-
-    public Integer getFtId() {
-        return ftId;
-    }
-
-    public void setFtId(Integer ftId) {
-        this.ftId = ftId;
-    }
+    private String ft_text4;
 
-    public String getFtCode() {
-        return ftCode;
-    }
-
-    public void setFtCode(String ftCode) {
-        this.ftCode = ftCode == null ? null : ftCode.trim();
-    }
-
-    public Date getFtDate() {
-        return ftDate;
-    }
-
-    public void setFtDate(Date ftDate) {
-        this.ftDate = ftDate;
-    }
+    private String ft_text5;
 
-    public Integer getFtRecorderid() {
-        return ftRecorderid;
+    public String getFt_code() {
+        return ft_code;
     }
 
-    public void setFtRecorderid(Integer ftRecorderid) {
-        this.ftRecorderid = ftRecorderid;
+    public void setFt_code(String ft_code) {
+        this.ft_code = ft_code;
     }
 
-    public String getFtRecorder() {
-        return ftRecorder;
+    public Date getFt_date() {
+        return ft_date;
     }
 
-    public void setFtRecorder(String ftRecorder) {
-        this.ftRecorder = ftRecorder == null ? null : ftRecorder.trim();
+    public void setFt_date(Date ft_date) {
+        this.ft_date = ft_date;
     }
 
-    public Date getFtRecorddate() {
-        return ftRecorddate;
+    public Integer getFt_recorderid() {
+        return ft_recorderid;
     }
 
-    public void setFtRecorddate(Date ftRecorddate) {
-        this.ftRecorddate = ftRecorddate;
+    public void setFt_recorderid(Integer ft_recorderid) {
+        this.ft_recorderid = ft_recorderid;
     }
 
-    public String getFtStatus() {
-        return ftStatus;
+    public String getFt_recorder() {
+        return ft_recorder;
     }
 
-    public void setFtStatus(String ftStatus) {
-        this.ftStatus = ftStatus == null ? null : ftStatus.trim();
+    public void setFt_recorder(String ft_recorder) {
+        this.ft_recorder = ft_recorder;
     }
 
-    public String getFtStatuscode() {
-        return ftStatuscode;
+    public Date getFt_recorddate() {
+        return ft_recorddate;
     }
 
-    public void setFtStatuscode(String ftStatuscode) {
-        this.ftStatuscode = ftStatuscode == null ? null : ftStatuscode.trim();
+    public void setFt_recorddate(Date ft_recorddate) {
+        this.ft_recorddate = ft_recorddate;
     }
 
-    public String getFtRemark() {
-        return ftRemark;
+    public String getFt_status() {
+        return ft_status;
     }
 
-    public void setFtRemark(String ftRemark) {
-        this.ftRemark = ftRemark == null ? null : ftRemark.trim();
+    public void setFt_status(String ft_status) {
+        this.ft_status = ft_status;
     }
 
-    public Integer getCompanyid() {
-        return companyid;
+    public String getFt_statuscode() {
+        return ft_statuscode;
     }
 
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
+    public void setFt_statuscode(String ft_statuscode) {
+        this.ft_statuscode = ft_statuscode;
     }
 
-    public Integer getUpdaterid() {
-        return updaterid;
+    public String getFt_remark() {
+        return ft_remark;
     }
 
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
+    public void setFt_remark(String ft_remark) {
+        this.ft_remark = ft_remark;
     }
 
     public Date getUpdatedate() {
@@ -133,43 +107,43 @@ public class Fundtransfer {
         this.updatedate = updatedate;
     }
 
-    public String getFtText1() {
-        return ftText1;
+    public String getFt_text1() {
+        return ft_text1;
     }
 
-    public void setFtText1(String ftText1) {
-        this.ftText1 = ftText1 == null ? null : ftText1.trim();
+    public void setFt_text1(String ft_text1) {
+        this.ft_text1 = ft_text1;
     }
 
-    public String getFtText2() {
-        return ftText2;
+    public String getFt_text2() {
+        return ft_text2;
     }
 
-    public void setFtText2(String ftText2) {
-        this.ftText2 = ftText2 == null ? null : ftText2.trim();
+    public void setFt_text2(String ft_text2) {
+        this.ft_text2 = ft_text2;
     }
 
-    public String getFtText3() {
-        return ftText3;
+    public String getFt_text3() {
+        return ft_text3;
     }
 
-    public void setFtText3(String ftText3) {
-        this.ftText3 = ftText3 == null ? null : ftText3.trim();
+    public void setFt_text3(String ft_text3) {
+        this.ft_text3 = ft_text3;
     }
 
-    public String getFtText4() {
-        return ftText4;
+    public String getFt_text4() {
+        return ft_text4;
     }
 
-    public void setFtText4(String ftText4) {
-        this.ftText4 = ftText4 == null ? null : ftText4.trim();
+    public void setFt_text4(String ft_text4) {
+        this.ft_text4 = ft_text4;
     }
 
-    public String getFtText5() {
-        return ftText5;
+    public String getFt_text5() {
+        return ft_text5;
     }
 
-    public void setFtText5(String ftText5) {
-        this.ftText5 = ftText5 == null ? null : ftText5.trim();
+    public void setFt_text5(String ft_text5) {
+        this.ft_text5 = ft_text5;
     }
 }

+ 119 - 120
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Fundtransferdetail.java

@@ -1,178 +1,152 @@
 package com.usoftchina.saas.money.po;
 
-import java.util.Date;
-
-public class Fundtransferdetail {
-    private Integer ftdId;
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
 
-    private Integer ftdFtid;
+import java.io.Serializable;
+import java.util.Date;
 
-    private Integer ftdDetno;
+public class Fundtransferdetail extends CommonBaseEntity implements Serializable {
 
-    private Integer ftdYm;
+    private Integer ftd_ftid;
 
-    private Integer ftdBankid;
+    private Integer ftd_detno;
 
-    private String ftdBankcode;
+    private Integer ftd_ym;
 
-    private String ftdBankname;
+    private Integer ftd_bankid;
 
-    private Integer ftdInbankid;
+    private String ftd_bankcode;
 
-    private String ftdInbankcode;
+    private String ftd_bankname;
 
-    private String ftdInbankname;
+    private Integer ftd_inbankid;
 
-    private Double ftdNowbalance;
+    private String ftd_inbankcode;
 
-    private String ftdPaymethod;
+    private String ftd_inbankname;
 
-    private String ftdPaycode;
+    private Double ftd_nowbalance;
 
-    private String ftdRemark;
+    private String ftd_paymethod;
 
-    private Integer companyid;
+    private String ftd_paycode;
 
-    private Integer updaterid;
+    private String ftd_remark;
 
     private Date updatedate;
 
-    private String ftdText1;
+    private String ftd_text1;
 
-    private String ftdText2;
+    private String ftd_text2;
 
-    private String ftdText3;
+    private String ftd_text3;
 
-    private String ftdText4;
+    private String ftd_text4;
 
-    private String ftdText5;
-
-    public Integer getFtdId() {
-        return ftdId;
-    }
-
-    public void setFtdId(Integer ftdId) {
-        this.ftdId = ftdId;
-    }
-
-    public Integer getFtdFtid() {
-        return ftdFtid;
-    }
+    private String ftd_text5;
 
-    public void setFtdFtid(Integer ftdFtid) {
-        this.ftdFtid = ftdFtid;
+    public Integer getFtd_ftid() {
+        return ftd_ftid;
     }
 
-    public Integer getFtdDetno() {
-        return ftdDetno;
+    public void setFtd_ftid(Integer ftd_ftid) {
+        this.ftd_ftid = ftd_ftid;
     }
 
-    public void setFtdDetno(Integer ftdDetno) {
-        this.ftdDetno = ftdDetno;
+    public Integer getFtd_detno() {
+        return ftd_detno;
     }
 
-    public Integer getFtdYm() {
-        return ftdYm;
+    public void setFtd_detno(Integer ftd_detno) {
+        this.ftd_detno = ftd_detno;
     }
 
-    public void setFtdYm(Integer ftdYm) {
-        this.ftdYm = ftdYm;
+    public Integer getFtd_ym() {
+        return ftd_ym;
     }
 
-    public Integer getFtdBankid() {
-        return ftdBankid;
+    public void setFtd_ym(Integer ftd_ym) {
+        this.ftd_ym = ftd_ym;
     }
 
-    public void setFtdBankid(Integer ftdBankid) {
-        this.ftdBankid = ftdBankid;
+    public Integer getFtd_bankid() {
+        return ftd_bankid;
     }
 
-    public String getFtdBankcode() {
-        return ftdBankcode;
+    public void setFtd_bankid(Integer ftd_bankid) {
+        this.ftd_bankid = ftd_bankid;
     }
 
-    public void setFtdBankcode(String ftdBankcode) {
-        this.ftdBankcode = ftdBankcode == null ? null : ftdBankcode.trim();
+    public String getFtd_bankcode() {
+        return ftd_bankcode;
     }
 
-    public String getFtdBankname() {
-        return ftdBankname;
+    public void setFtd_bankcode(String ftd_bankcode) {
+        this.ftd_bankcode = ftd_bankcode;
     }
 
-    public void setFtdBankname(String ftdBankname) {
-        this.ftdBankname = ftdBankname == null ? null : ftdBankname.trim();
+    public String getFtd_bankname() {
+        return ftd_bankname;
     }
 
-    public Integer getFtdInbankid() {
-        return ftdInbankid;
+    public void setFtd_bankname(String ftd_bankname) {
+        this.ftd_bankname = ftd_bankname;
     }
 
-    public void setFtdInbankid(Integer ftdInbankid) {
-        this.ftdInbankid = ftdInbankid;
+    public Integer getFtd_inbankid() {
+        return ftd_inbankid;
     }
 
-    public String getFtdInbankcode() {
-        return ftdInbankcode;
+    public void setFtd_inbankid(Integer ftd_inbankid) {
+        this.ftd_inbankid = ftd_inbankid;
     }
 
-    public void setFtdInbankcode(String ftdInbankcode) {
-        this.ftdInbankcode = ftdInbankcode == null ? null : ftdInbankcode.trim();
+    public String getFtd_inbankcode() {
+        return ftd_inbankcode;
     }
 
-    public String getFtdInbankname() {
-        return ftdInbankname;
+    public void setFtd_inbankcode(String ftd_inbankcode) {
+        this.ftd_inbankcode = ftd_inbankcode;
     }
 
-    public void setFtdInbankname(String ftdInbankname) {
-        this.ftdInbankname = ftdInbankname == null ? null : ftdInbankname.trim();
+    public String getFtd_inbankname() {
+        return ftd_inbankname;
     }
 
-    public Double getFtdNowbalance() {
-        return ftdNowbalance;
+    public void setFtd_inbankname(String ftd_inbankname) {
+        this.ftd_inbankname = ftd_inbankname;
     }
 
-    public void setFtdNowbalance(Double ftdNowbalance) {
-        this.ftdNowbalance = ftdNowbalance;
+    public Double getFtd_nowbalance() {
+        return ftd_nowbalance;
     }
 
-    public String getFtdPaymethod() {
-        return ftdPaymethod;
+    public void setFtd_nowbalance(Double ftd_nowbalance) {
+        this.ftd_nowbalance = ftd_nowbalance;
     }
 
-    public void setFtdPaymethod(String ftdPaymethod) {
-        this.ftdPaymethod = ftdPaymethod == null ? null : ftdPaymethod.trim();
+    public String getFtd_paymethod() {
+        return ftd_paymethod;
     }
 
-    public String getFtdPaycode() {
-        return ftdPaycode;
+    public void setFtd_paymethod(String ftd_paymethod) {
+        this.ftd_paymethod = ftd_paymethod;
     }
 
-    public void setFtdPaycode(String ftdPaycode) {
-        this.ftdPaycode = ftdPaycode == null ? null : ftdPaycode.trim();
+    public String getFtd_paycode() {
+        return ftd_paycode;
     }
 
-    public String getFtdRemark() {
-        return ftdRemark;
+    public void setFtd_paycode(String ftd_paycode) {
+        this.ftd_paycode = ftd_paycode;
     }
 
-    public void setFtdRemark(String ftdRemark) {
-        this.ftdRemark = ftdRemark == null ? null : ftdRemark.trim();
+    public String getFtd_remark() {
+        return ftd_remark;
     }
 
-    public Integer getCompanyid() {
-        return companyid;
-    }
-
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
-    }
-
-    public Integer getUpdaterid() {
-        return updaterid;
-    }
-
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
+    public void setFtd_remark(String ftd_remark) {
+        this.ftd_remark = ftd_remark;
     }
 
     public Date getUpdatedate() {
@@ -183,43 +157,68 @@ public class Fundtransferdetail {
         this.updatedate = updatedate;
     }
 
-    public String getFtdText1() {
-        return ftdText1;
+    public String getFtd_text1() {
+        return ftd_text1;
+    }
+
+    public void setFtd_text1(String ftd_text1) {
+        this.ftd_text1 = ftd_text1;
     }
 
-    public void setFtdText1(String ftdText1) {
-        this.ftdText1 = ftdText1 == null ? null : ftdText1.trim();
+    public String getFtd_text2() {
+        return ftd_text2;
     }
 
-    public String getFtdText2() {
-        return ftdText2;
+    public void setFtd_text2(String ftd_text2) {
+        this.ftd_text2 = ftd_text2;
     }
 
-    public void setFtdText2(String ftdText2) {
-        this.ftdText2 = ftdText2 == null ? null : ftdText2.trim();
+    public String getFtd_text3() {
+        return ftd_text3;
     }
 
-    public String getFtdText3() {
-        return ftdText3;
+    public void setFtd_text3(String ftd_text3) {
+        this.ftd_text3 = ftd_text3;
     }
 
-    public void setFtdText3(String ftdText3) {
-        this.ftdText3 = ftdText3 == null ? null : ftdText3.trim();
+    public String getFtd_text4() {
+        return ftd_text4;
     }
 
-    public String getFtdText4() {
-        return ftdText4;
+    public void setFtd_text4(String ftd_text4) {
+        this.ftd_text4 = ftd_text4;
     }
 
-    public void setFtdText4(String ftdText4) {
-        this.ftdText4 = ftdText4 == null ? null : ftdText4.trim();
+    public String getFtd_text5() {
+        return ftd_text5;
     }
 
-    public String getFtdText5() {
-        return ftdText5;
+    public void setFtd_text5(String ftd_text5) {
+        this.ftd_text5 = ftd_text5;
     }
 
-    public void setFtdText5(String ftdText5) {
-        this.ftdText5 = ftdText5 == null ? null : ftdText5.trim();
+    @Override
+    public String toString() {
+        return "Fundtransferdetail{" +
+                "ftd_ftid=" + ftd_ftid +
+                ", ftd_detno=" + ftd_detno +
+                ", ftd_ym=" + ftd_ym +
+                ", ftd_bankid=" + ftd_bankid +
+                ", ftd_bankcode='" + ftd_bankcode + '\'' +
+                ", ftd_bankname='" + ftd_bankname + '\'' +
+                ", ftd_inbankid=" + ftd_inbankid +
+                ", ftd_inbankcode='" + ftd_inbankcode + '\'' +
+                ", ftd_inbankname='" + ftd_inbankname + '\'' +
+                ", ftd_nowbalance=" + ftd_nowbalance +
+                ", ftd_paymethod='" + ftd_paymethod + '\'' +
+                ", ftd_paycode='" + ftd_paycode + '\'' +
+                ", ftd_remark='" + ftd_remark + '\'' +
+                ", updatedate=" + updatedate +
+                ", ftd_text1='" + ftd_text1 + '\'' +
+                ", ftd_text2='" + ftd_text2 + '\'' +
+                ", ftd_text3='" + ftd_text3 + '\'' +
+                ", ftd_text4='" + ftd_text4 + '\'' +
+                ", ftd_text5='" + ftd_text5 + '\'' +
+                '}';
     }
 }

+ 27 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java

@@ -216,4 +216,31 @@ public class Othreceipts extends CommonBaseEntity implements Serializable {
     public void setOr_text5(String or_text5) {
         this.or_text5 = or_text5;
     }
+
+    @Override
+    public String toString() {
+        return "Othreceipts{" +
+                "or_code='" + or_code + '\'' +
+                ", or_date=" + or_date +
+                ", or_custid=" + or_custid +
+                ", or_custcode='" + or_custcode + '\'' +
+                ", or_custname='" + or_custname + '\'' +
+                ", or_bankcode='" + or_bankcode + '\'' +
+                ", or_bankid=" + or_bankid +
+                ", or_bankname='" + or_bankname + '\'' +
+                ", or_amount=" + or_amount +
+                ", or_recorderid=" + or_recorderid +
+                ", or_recorder='" + or_recorder + '\'' +
+                ", or_recorddate=" + or_recorddate +
+                ", or_status='" + or_status + '\'' +
+                ", or_statuscode='" + or_statuscode + '\'' +
+                ", or_remark='" + or_remark + '\'' +
+                ", updatedate=" + updatedate +
+                ", or_text1='" + or_text1 + '\'' +
+                ", or_text2='" + or_text2 + '\'' +
+                ", or_text3='" + or_text3 + '\'' +
+                ", or_text4='" + or_text4 + '\'' +
+                ", or_text5='" + or_text5 + '\'' +
+                '}';
+    }
 }

+ 0 - 20
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java

@@ -252,24 +252,4 @@ public class Paybalance extends CommonBaseEntity implements Serializable {
     public void setPb_text5(String pb_text5) {
         this.pb_text5 = pb_text5 == null ? null : pb_text5.trim();
     }
-
-    @Override
-    public void setCreatorId(long creatorId) {
-
-    }
-
-    @Override
-    public void setUpdaterId(long updaterId) {
-
-    }
-
-    @Override
-    public long getCompanyId() {
-        return 0;
-    }
-
-    @Override
-    public void setCompanyId(long companyId) {
-
-    }
 }

+ 0 - 19
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java

@@ -253,23 +253,4 @@ public class Recbalance extends CommonBaseEntity implements Serializable {
         this.rb_text5 = rb_text5 == null ? null : rb_text5.trim();
     }
 
-    @Override
-    public void setCreatorId(long creatorId) {
-
-    }
-
-    @Override
-    public void setUpdaterId(long updaterId) {
-
-    }
-
-    @Override
-    public long getCompanyId() {
-        return 0;
-    }
-
-    @Override
-    public void setCompanyId(long companyId) {
-
-    }
 }

+ 0 - 19
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java

@@ -173,23 +173,4 @@ public class Recbalancedet extends CommonBaseEntity implements Serializable{
         this.rd_text5 = rd_text5 == null ? null : rd_text5.trim();
     }
 
-    @Override
-    public void setCreatorId(long creatorId) {
-
-    }
-
-    @Override
-    public void setUpdaterId(long updaterId) {
-
-    }
-
-    @Override
-    public long getCompanyId() {
-        return 0;
-    }
-
-    @Override
-    public void setCompanyId(long companyId) {
-
-    }
 }

+ 5 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/FundtransferService.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.money.service;
 
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Fundtran;
 import com.usoftchina.saas.money.po.Fundtransfer;
 import com.usoftchina.saas.page.PageRequest;
@@ -10,15 +12,16 @@ import com.usoftchina.saas.page.PageRequest;
  * @date 2018/10/25 19:26
  **/
 public interface FundtransferService {
-    int insert(Fundtran fundtran);
+    DocBaseDTO insert(Fundtran fundtran);
 
     void audit(Fundtran fundtran);
 
     void unAudit(int id);
 
     void delete(int id);
+    void deleteItem(int id);
 
     Fundtran select(int id);
 
-    PageInfo<Fundtransfer> selectList(PageRequest page);
+    PageInfo<Fundtransfer> selectList(PageRequest page, ListReqDTO reqDTO);
 }

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/PaybalanceService.java

@@ -23,6 +23,8 @@ public interface PaybalanceService {
 
     void deleteItem(int id);
 
+    void deleteItems(int id);
+
     Pay select(int id);
 
     PageInfo<Paybalance> selectList(PageRequest page, ListReqDTO reqDTO);

+ 79 - 12
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java

@@ -2,16 +2,25 @@ package com.usoftchina.saas.money.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.api.MaxnumberService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.money.mapper.FundtransferMapper;
 import com.usoftchina.saas.money.mapper.FundtransferdetailMapper;
 import com.usoftchina.saas.money.po.Fundtran;
 import com.usoftchina.saas.money.po.Fundtransfer;
 import com.usoftchina.saas.money.po.Fundtransferdetail;
+import com.usoftchina.saas.money.po.Paybalance;
 import com.usoftchina.saas.money.service.FundtransferService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
 
 import java.util.Iterator;
 import java.util.List;
@@ -26,34 +35,57 @@ public class FundtransferServiceImpl implements FundtransferService {
     private FundtransferMapper fundtransferMapper;
     @Autowired
     private FundtransferdetailMapper fundtransferdetailMapper;
+    @Autowired
+    private MaxnumberService maxnumberService;
 
     @Override
-    public int insert(Fundtran fundtran) {
+    public DocBaseDTO insert(Fundtran fundtran) {
         Fundtransfer fundtransfer = fundtran.getMain();
         List<Fundtransferdetail> fundtransferdetails = fundtran.getItems();
 
-        if (fundtransfer.getFtId() > 0){
+        System.out.println("fun:"+fundtransferdetails);
+
+        String ft_code = fundtransfer.getFt_code();
+
+        //编号校验
+        ft_code = pushMaxnubmer(ft_code, fundtransfer.getId());
+
+        System.out.println("ft_code" + ft_code);
+        //单号赋值
+        fundtransfer.setFt_code(ft_code);
+
+        Long id = fundtransfer.getId();
+
+        if (fundtransfer.getId() > 0){
             fundtransferMapper.updateByPrimaryKeySelective(fundtransfer);
         }else {
-            fundtransferMapper.insert(fundtransfer);
+            fundtransfer.setCompanyId(BaseContextHolder.getCompanyId());
+            fundtransferMapper.insertSelective(fundtransfer);
+            id = fundtransfer.getId();
         }
 
         Iterator isdet = fundtransferdetails.iterator();
         while (isdet.hasNext()){
             Fundtransferdetail fundtransferdetail= (Fundtransferdetail) isdet.next();
-            if (fundtransferdetail.getFtdId() > 0 ){
+            fundtransferdetail.setCompanyId(BaseContextHolder.getCompanyId());
+            fundtransferdetail.setFtd_ftid(Math.toIntExact(id));
+            if (fundtransferdetail.getId() > 0 ){
                 fundtransferdetailMapper.updateByPrimaryKey(fundtransferdetail);
             }else {
                 fundtransferdetailMapper.insertSelective(fundtransferdetail);
             }
         }
-        return 0;
+        return new DocBaseDTO(id, ft_code, BillCodeSeq.FUNDTRANSFER.getCaller());
     }
 
     @Override
     public void audit(Fundtran fundtran) {
-        int id = fundtran.getMain().getFtId();
+        Long companyId = BaseContextHolder.getCompanyId();
+        int id = Math.toIntExact(fundtran.getMain().getId());
         Fundtransfer fundtransfer = fundtransferMapper.selectByPrimaryKey(id);
+        fundtransfer.setFt_status(Status.AUDITED.getDisplay());
+        fundtransfer.setFt_statuscode(Status.AUDITED.name());
+        fundtransfer.setCompanyId(companyId);
         if ( fundtransfer == null || "".equals(fundtransfer)){
             this.insert(fundtran);
         }else {
@@ -64,9 +96,9 @@ public class FundtransferServiceImpl implements FundtransferService {
     @Override
     public void unAudit(int id) {
         Fundtransfer fundtransfer = new Fundtransfer();
-        fundtransfer.setFtId(id);
-        fundtransfer.setFtStatus(com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay());
-        fundtransfer.setFtStatuscode(Status.UNAUDITED.name());
+        fundtransfer.setId(Long.valueOf(id));
+        fundtransfer.setFt_status(com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay());
+        fundtransfer.setFt_statuscode(Status.UNAUDITED.name());
         fundtransferMapper.updateByPrimaryKey(fundtransfer);
     }
 
@@ -85,12 +117,12 @@ public class FundtransferServiceImpl implements FundtransferService {
     public Fundtran select(int id) {
         Fundtran fundtran = new Fundtran();
         fundtran.setMain(fundtransferMapper.selectByPrimaryKey(id));
-        fundtran.setItems((List<Fundtransferdetail>) fundtransferdetailMapper.selectByPrimaryKey(id));
+        fundtran.setItems(fundtransferdetailMapper.selectByPrimaryKey(id));
         return fundtran;
     }
 
     @Override
-    public PageInfo<Fundtransfer> selectList(PageRequest page) {
+    public PageInfo<Fundtransfer> selectList(PageRequest page, ListReqDTO reqDTO) {
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
@@ -98,9 +130,44 @@ public class FundtransferServiceImpl implements FundtransferService {
             page.setSize(10);
         }
         PageHelper.startPage(page.getNumber(), page.getSize());
-        List<Fundtransfer> fundtransfers = fundtransferMapper.selectList();
+        List<Fundtransfer> fundtransfers = this.getListByMode(reqDTO);
         //取分页信息
         PageInfo<Fundtransfer> pageInfo = new PageInfo<>(fundtransfers);
         return pageInfo;
     }
+
+    /**
+     * @Description: 检验获取并更新单号
+     * @Param: [code, id]
+     * @return: java.lang.String
+     * @Author: guq
+     * @Date: 2018/10/19
+     */
+    private String pushMaxnubmer(String code, Long id) {
+        if (null == code) {
+            throw new BizException(BizExceptionCode.NULL_CODE);
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer count = "0".equals(String.valueOf(id)) ? fundtransferMapper.validateCodeWhenInsert(code, companyId) :
+                fundtransferMapper.validateCodeWhenUpdate(code, id, companyId);
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.FUNDTRANSFER.getCaller()).getData();
+    }
+
+    private List<Fundtransfer> getListByMode(ListReqDTO req) {
+        List<Fundtransfer> fundtransferList = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        if (StringUtils.isEmpty(req)) {
+            return  null;
+        }
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        if (StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
+            fundtransferList = fundtransferMapper.selectFundtransferBycondition(con, companyId);
+        } else {
+            fundtransferList = fundtransferMapper.selectFundtransferListByCondition(con, companyId);
+        }
+        return fundtransferList;
+    }
 }

+ 5 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java

@@ -41,10 +41,14 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
         Othreceipts othreceipts = othte.getMain();
         List<Othreceiptsdetail> othreceiptsdetail = othte.getItems();
 
+        System.out.println("oth:" + othreceipts);
+
         String or_code = othreceipts.getOr_code();
 
         //编号校验
         or_code = pushMaxnubmer(or_code, othreceipts.getId());
+
+        System.out.println("or_code" + or_code);
         //单号赋值
         othreceipts.setOr_code(or_code);
 
@@ -69,7 +73,7 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
                 othreceiptsdetailMapper.insertSelective(othreceiptsdetail1);
             }
         }
-        return new DocBaseDTO(id, or_code, BillCodeSeq.OTHERIN.getCaller());
+        return new DocBaseDTO(id, or_code, BillCodeSeq.OTHRECEIPTS.getCaller());
     }
 
 //    @Override

+ 8 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java

@@ -55,14 +55,18 @@ public class OthspendingsServiceImpl implements OthspendingsService {
         if (othspendings.getId() > 0){
             othspendingsMapper.updateByPrimaryKeySelective(othspendings);
         }else {
-            othspendingsMapper.insert(othspendings);
+            othspendings.setCompanyId(BaseContextHolder.getCompanyId());
+            othspendingsMapper.insertSelective(othspendings);
+            id = othspendings.getId();
         }
 
         Iterator isdet = othspendingsdetails.iterator();
         while (isdet.hasNext()){
             Othspendingsdetail othspendingsdetail = (Othspendingsdetail) isdet.next();
-            if (othspendingsdetail.getOsd_orid() > 0 ){
-                othspendingsdetailMapper.updateByPrimaryKey(othspendingsdetail);
+            othspendingsdetail.setOsd_orid(Math.toIntExact(id));
+            othspendingsdetail.setCompanyId(BaseContextHolder.getCompanyId());
+            if (othspendingsdetail.getId() > 0 ){
+                othspendingsdetailMapper.updateByPrimaryKeySelective(othspendingsdetail);
             }else {
                 othspendingsdetailMapper.insertSelective(othspendingsdetail);
             }
@@ -138,7 +142,7 @@ public class OthspendingsServiceImpl implements OthspendingsService {
         Long companyId = BaseContextHolder.getCompanyId();
         Integer count = "0".equals(String.valueOf(id)) ? othspendingsMapper.validateCodeWhenInsert(code, companyId) :
                 othspendingsMapper.validateCodeWhenUpdate(code, id, companyId);
-        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.OTHRECEIPTS.getCaller()).getData();
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.OTHSPENDINGS.getCaller()).getData();
     }
 
     private List<Othspendings> getListByMode(ListReqDTO req) {

+ 5 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java

@@ -121,10 +121,14 @@ public class PaybalanceServiceImpl implements PaybalanceService {
 
     @Override
     public void deleteItem(int id) {
-        paybalancedetailMapper.deleteItem(id);
         paybalancedetMapper.deleteItem(id);
     }
 
+    @Override
+    public void deleteItems(int id) {
+        paybalancedetailMapper.deleteItem(id);
+    }
+
     public Pay select(int id){
         Pay pay = new Pay();
         pay.setMain(paybalanceMapper.selectByPrimaryKey(id));

+ 138 - 105
applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml

@@ -2,34 +2,34 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.usoftchina.saas.money.mapper.FundtransferMapper" >
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Fundtransfer" >
-    <id column="ft_id" property="ftId" jdbcType="INTEGER" />
-    <result column="ft_code" property="ftCode" jdbcType="VARCHAR" />
-    <result column="ft_date" property="ftDate" jdbcType="TIMESTAMP" />
-    <result column="ft_recorderid" property="ftRecorderid" jdbcType="INTEGER" />
-    <result column="ft_recorder" property="ftRecorder" jdbcType="VARCHAR" />
-    <result column="ft_recorddate" property="ftRecorddate" jdbcType="TIMESTAMP" />
-    <result column="ft_status" property="ftStatus" jdbcType="VARCHAR" />
-    <result column="ft_statuscode" property="ftStatuscode" jdbcType="VARCHAR" />
-    <result column="ft_remark" property="ftRemark" jdbcType="VARCHAR" />
-    <result column="companyid" property="companyid" jdbcType="INTEGER" />
-    <result column="updaterId" property="updaterid" jdbcType="INTEGER" />
+    <id column="ft_id" property="id" jdbcType="INTEGER" />
+    <result column="ft_code" property="ft_code" jdbcType="VARCHAR" />
+    <result column="ft_date" property="ft_date" jdbcType="TIMESTAMP" />
+    <result column="ft_recorderid" property="ft_recorderid" jdbcType="INTEGER" />
+    <result column="ft_recorder" property="ft_recorder" jdbcType="VARCHAR" />
+    <result column="ft_recorddate" property="ft_recorddate" jdbcType="TIMESTAMP" />
+    <result column="ft_status" property="ft_status" jdbcType="VARCHAR" />
+    <result column="ft_statuscode" property="ft_statuscode" jdbcType="VARCHAR" />
+    <result column="ft_remark" property="ft_remark" jdbcType="VARCHAR" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
-    <result column="ft_text1" property="ftText1" jdbcType="VARCHAR" />
-    <result column="ft_text2" property="ftText2" jdbcType="VARCHAR" />
-    <result column="ft_text3" property="ftText3" jdbcType="VARCHAR" />
-    <result column="ft_text4" property="ftText4" jdbcType="VARCHAR" />
-    <result column="ft_text5" property="ftText5" jdbcType="VARCHAR" />
+    <result column="ft_text1" property="ft_text1" jdbcType="VARCHAR" />
+    <result column="ft_text2" property="ft_text2" jdbcType="VARCHAR" />
+    <result column="ft_text3" property="ft_text3" jdbcType="VARCHAR" />
+    <result column="ft_text4" property="ft_text4" jdbcType="VARCHAR" />
+    <result column="ft_text5" property="ft_text5" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     ft_id, ft_code, ft_date, ft_recorderid, ft_recorder, ft_recorddate, ft_status, ft_statuscode, 
-    ft_remark, companyid, updaterId, updatedate, ft_text1, ft_text2, ft_text3, ft_text4, 
+    ft_remark, companyId, updaterId, updatedate, ft_text1, ft_text2, ft_text3, ft_text4, 
     ft_text5
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
     <include refid="Base_Column_List" />
     from fundtransfer
-    where ft_id = #{ftId,jdbcType=INTEGER}
+    where ft_id = #{id,jdbcType=INTEGER}
   </select>
 
   <select id="selectList" resultMap="BaseResultMap" >
@@ -39,184 +39,181 @@
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from fundtransfer
-    where ft_id = #{ftId,jdbcType=INTEGER}
+    where ft_id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Fundtransfer" >
     insert into fundtransfer (ft_id, ft_code, ft_date, 
       ft_recorderid, ft_recorder, ft_recorddate, 
       ft_status, ft_statuscode, ft_remark, 
-      companyid, updaterId, updatedate, 
+      companyId, updaterId, updatedate, 
       ft_text1, ft_text2, ft_text3, 
       ft_text4, ft_text5)
     values (#{ftId,jdbcType=INTEGER}, #{ftCode,jdbcType=VARCHAR}, #{ftDate,jdbcType=TIMESTAMP}, 
       #{ftRecorderid,jdbcType=INTEGER}, #{ftRecorder,jdbcType=VARCHAR}, #{ftRecorddate,jdbcType=TIMESTAMP}, 
       #{ftStatus,jdbcType=VARCHAR}, #{ftStatuscode,jdbcType=VARCHAR}, #{ftRemark,jdbcType=VARCHAR}, 
-      #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, 
+      #{companyId,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, 
       #{ftText1,jdbcType=VARCHAR}, #{ftText2,jdbcType=VARCHAR}, #{ftText3,jdbcType=VARCHAR}, 
       #{ftText4,jdbcType=VARCHAR}, #{ftText5,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Fundtransfer" >
     insert into fundtransfer
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="ftId != null" >
-        ft_id,
-      </if>
-      <if test="ftCode != null" >
+      <if test="ft_code != null" >
         ft_code,
       </if>
-      <if test="ftDate != null" >
+      <if test="ft_date != null" >
         ft_date,
       </if>
-      <if test="ftRecorderid != null" >
+      <if test="ft_recorderid != null" >
         ft_recorderid,
       </if>
-      <if test="ftRecorder != null" >
+      <if test="ft_recorder != null" >
         ft_recorder,
       </if>
-      <if test="ftRecorddate != null" >
+      <if test="ft_recorddate != null" >
         ft_recorddate,
       </if>
-      <if test="ftStatus != null" >
+      <if test="ft_status != null" >
         ft_status,
       </if>
-      <if test="ftStatuscode != null" >
+      <if test="ft_statuscode != null" >
         ft_statuscode,
       </if>
-      <if test="ftRemark != null" >
+      <if test="ft_remark != null" >
         ft_remark,
       </if>
-      <if test="companyid != null" >
-        companyid,
+      <if test="companyId != null" >
+        companyId,
       </if>
-      <if test="updaterid != null" >
+      <if test="updaterId != null" >
         updaterId,
       </if>
       <if test="updatedate != null" >
         updatedate,
       </if>
-      <if test="ftText1 != null" >
+      <if test="ft_text1 != null" >
         ft_text1,
       </if>
-      <if test="ftText2 != null" >
+      <if test="ft_text2 != null" >
         ft_text2,
       </if>
-      <if test="ftText3 != null" >
+      <if test="ft_text3 != null" >
         ft_text3,
       </if>
-      <if test="ftText4 != null" >
+      <if test="ft_text4 != null" >
         ft_text4,
       </if>
-      <if test="ftText5 != null" >
+      <if test="ft_text5 != null" >
         ft_text5,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="ftId != null" >
-        #{ftId,jdbcType=INTEGER},
+      <if test="ft_code != null" >
+        #{ft_code,jdbcType=VARCHAR},
       </if>
-      <if test="ftCode != null" >
-        #{ftCode,jdbcType=VARCHAR},
+      <if test="ft_date != null" >
+        #{ft_date,jdbcType=TIMESTAMP},
       </if>
-      <if test="ftDate != null" >
-        #{ftDate,jdbcType=TIMESTAMP},
+      <if test="ft_recorderid != null" >
+        #{ft_recorderid,jdbcType=INTEGER},
       </if>
-      <if test="ftRecorderid != null" >
-        #{ftRecorderid,jdbcType=INTEGER},
+      <if test="ft_recorder != null" >
+        #{ft_recorder,jdbcType=VARCHAR},
       </if>
-      <if test="ftRecorder != null" >
-        #{ftRecorder,jdbcType=VARCHAR},
+      <if test="ft_recorddate != null" >
+        #{ft_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="ftRecorddate != null" >
-        #{ftRecorddate,jdbcType=TIMESTAMP},
+      <if test="ft_status != null" >
+        #{ft_status,jdbcType=VARCHAR},
       </if>
-      <if test="ftStatus != null" >
-        #{ftStatus,jdbcType=VARCHAR},
+      <if test="ft_statuscode != null" >
+        #{ft_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="ftStatuscode != null" >
-        #{ftStatuscode,jdbcType=VARCHAR},
+      <if test="ft_remark != null" >
+        #{ft_remark,jdbcType=VARCHAR},
       </if>
-      <if test="ftRemark != null" >
-        #{ftRemark,jdbcType=VARCHAR},
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null" >
-        #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterid != null" >
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="ftText1 != null" >
-        #{ftText1,jdbcType=VARCHAR},
+      <if test="ft_text1 != null" >
+        #{ft_text1,jdbcType=VARCHAR},
       </if>
-      <if test="ftText2 != null" >
-        #{ftText2,jdbcType=VARCHAR},
+      <if test="ft_text2 != null" >
+        #{ft_text2,jdbcType=VARCHAR},
       </if>
-      <if test="ftText3 != null" >
-        #{ftText3,jdbcType=VARCHAR},
+      <if test="ft_text3 != null" >
+        #{ft_text3,jdbcType=VARCHAR},
       </if>
-      <if test="ftText4 != null" >
-        #{ftText4,jdbcType=VARCHAR},
+      <if test="ft_text4 != null" >
+        #{ft_text4,jdbcType=VARCHAR},
       </if>
-      <if test="ftText5 != null" >
-        #{ftText5,jdbcType=VARCHAR},
+      <if test="ft_text5 != null" >
+        #{ft_text5,jdbcType=VARCHAR},
       </if>
     </trim>
+    <selectKey resultType="Long" keyProperty="id" order="AFTER">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Fundtransfer" >
     update fundtransfer
     <set >
-      <if test="ftCode != null" >
-        ft_code = #{ftCode,jdbcType=VARCHAR},
+      <if test="ft_code != null" >
+        ft_code = #{ft_code,jdbcType=VARCHAR},
       </if>
-      <if test="ftDate != null" >
-        ft_date = #{ftDate,jdbcType=TIMESTAMP},
+      <if test="ft_date != null" >
+        ft_date = #{ft_date,jdbcType=TIMESTAMP},
       </if>
-      <if test="ftRecorderid != null" >
-        ft_recorderid = #{ftRecorderid,jdbcType=INTEGER},
+      <if test="ft_recorderid != null" >
+        ft_recorderid = #{ft_recorderid,jdbcType=INTEGER},
       </if>
-      <if test="ftRecorder != null" >
-        ft_recorder = #{ftRecorder,jdbcType=VARCHAR},
+      <if test="ft_recorder != null" >
+        ft_recorder = #{ft_recorder,jdbcType=VARCHAR},
       </if>
-      <if test="ftRecorddate != null" >
-        ft_recorddate = #{ftRecorddate,jdbcType=TIMESTAMP},
+      <if test="ft_recorddate != null" >
+        ft_recorddate = #{ft_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="ftStatus != null" >
-        ft_status = #{ftStatus,jdbcType=VARCHAR},
+      <if test="ft_status != null" >
+        ft_status = #{ft_status,jdbcType=VARCHAR},
       </if>
-      <if test="ftStatuscode != null" >
-        ft_statuscode = #{ftStatuscode,jdbcType=VARCHAR},
+      <if test="ft_statuscode != null" >
+        ft_statuscode = #{ft_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="ftRemark != null" >
-        ft_remark = #{ftRemark,jdbcType=VARCHAR},
+      <if test="ft_remark != null" >
+        ft_remark = #{ft_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        updaterId = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         updatedate = #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="ftText1 != null" >
-        ft_text1 = #{ftText1,jdbcType=VARCHAR},
+      <if test="ft_text1 != null" >
+        ft_text1 = #{ft_text1,jdbcType=VARCHAR},
       </if>
-      <if test="ftText2 != null" >
-        ft_text2 = #{ftText2,jdbcType=VARCHAR},
+      <if test="ft_text2 != null" >
+        ft_text2 = #{ft_text2,jdbcType=VARCHAR},
       </if>
-      <if test="ftText3 != null" >
-        ft_text3 = #{ftText3,jdbcType=VARCHAR},
+      <if test="ft_text3 != null" >
+        ft_text3 = #{ft_text3,jdbcType=VARCHAR},
       </if>
-      <if test="ftText4 != null" >
-        ft_text4 = #{ftText4,jdbcType=VARCHAR},
+      <if test="ft_text4 != null" >
+        ft_text4 = #{ft_text4,jdbcType=VARCHAR},
       </if>
-      <if test="ftText5 != null" >
-        ft_text5 = #{ftText5,jdbcType=VARCHAR},
+      <if test="ft_text5 != null" >
+        ft_text5 = #{ft_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where ft_id = #{ftId,jdbcType=INTEGER}
+    where ft_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Fundtransfer" >
     update fundtransfer
@@ -228,7 +225,7 @@
       ft_status = #{ftStatus,jdbcType=VARCHAR},
       ft_statuscode = #{ftStatuscode,jdbcType=VARCHAR},
       ft_remark = #{ftRemark,jdbcType=VARCHAR},
-      companyid = #{companyid,jdbcType=INTEGER},
+      companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterid,jdbcType=INTEGER},
       updatedate = #{updatedate,jdbcType=TIMESTAMP},
       ft_text1 = #{ftText1,jdbcType=VARCHAR},
@@ -238,4 +235,40 @@
       ft_text5 = #{ftText5,jdbcType=VARCHAR}
     where ft_id = #{ftId,jdbcType=INTEGER}
   </update>
+
+  <select id="validateCodeWhenInsert" resultType="int">
+    select count(1) from fundtransfer where ft_code = #{code} and companyId =#{companyId}
+  </select>
+  <select id="validateCodeWhenUpdate" resultType="int" >
+    select count(1) from fundtransfer where ft_code = #{code} and ft_id != #{id} and companyId =#{companyId}
+  </select>
+
+  <select id="selectFundtransferBycondition" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from Fundtransfer
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   Fundtransfer.companyId = #{companyId}
+      </if>
+    </where>  order by ft_id
+  </select>
+
+  <select id="selectFundtransferListByCondition" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from fundtransfer
+    left join fundtransferdetail on ft_id=ftd_ftid
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   fundtransfer.companyId = #{companyId}
+      </if>
+    </where>  order by ft_id
+  </select>
 </mapper>

+ 129 - 134
applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml

@@ -2,28 +2,28 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.usoftchina.saas.money.mapper.FundtransferdetailMapper" >
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Fundtransferdetail" >
-    <id column="ftd_id" property="ftdId" jdbcType="INTEGER" />
-    <result column="ftd_ftid" property="ftdFtid" jdbcType="INTEGER" />
-    <result column="ftd_detno" property="ftdDetno" jdbcType="INTEGER" />
-    <result column="ftd_ym" property="ftdYm" jdbcType="INTEGER" />
-    <result column="ftd_bankid" property="ftdBankid" jdbcType="INTEGER" />
-    <result column="ftd_bankcode" property="ftdBankcode" jdbcType="VARCHAR" />
-    <result column="ftd_bankname" property="ftdBankname" jdbcType="VARCHAR" />
-    <result column="ftd_inbankid" property="ftdInbankid" jdbcType="INTEGER" />
-    <result column="ftd_inbankcode" property="ftdInbankcode" jdbcType="VARCHAR" />
-    <result column="ftd_inbankname" property="ftdInbankname" jdbcType="VARCHAR" />
-    <result column="ftd_nowbalance" property="ftdNowbalance" jdbcType="DOUBLE" />
-    <result column="ftd_paymethod" property="ftdPaymethod" jdbcType="VARCHAR" />
-    <result column="ftd_paycode" property="ftdPaycode" jdbcType="VARCHAR" />
-    <result column="ftd_remark" property="ftdRemark" jdbcType="VARCHAR" />
-    <result column="companyid" property="companyid" jdbcType="INTEGER" />
-    <result column="updaterId" property="updaterid" jdbcType="INTEGER" />
+    <id column="ftd_id" property="id" jdbcType="INTEGER" />
+    <result column="ftd_ftid" property="ftd_ftid" jdbcType="INTEGER" />
+    <result column="ftd_detno" property="ftd_detno" jdbcType="INTEGER" />
+    <result column="ftd_ym" property="ftd_ym" jdbcType="INTEGER" />
+    <result column="ftd_bankid" property="ftd_bankid" jdbcType="INTEGER" />
+    <result column="ftd_bankcode" property="ftd_bankcode" jdbcType="VARCHAR" />
+    <result column="ftd_bankname" property="ftd_bankname" jdbcType="VARCHAR" />
+    <result column="ftd_inbankid" property="ftd_inbankid" jdbcType="INTEGER" />
+    <result column="ftd_inbankcode" property="ftd_inbankcode" jdbcType="VARCHAR" />
+    <result column="ftd_inbankname" property="ftd_inbankname" jdbcType="VARCHAR" />
+    <result column="ftd_nowbalance" property="ftd_nowbalance" jdbcType="DOUBLE" />
+    <result column="ftd_paymethod" property="ftd_paymethod" jdbcType="VARCHAR" />
+    <result column="ftd_paycode" property="ftd_paycode" jdbcType="VARCHAR" />
+    <result column="ftd_remark" property="ftd_remark" jdbcType="VARCHAR" />
+    <result column="companyid" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
-    <result column="ftd_text1" property="ftdText1" jdbcType="VARCHAR" />
-    <result column="ftd_text2" property="ftdText2" jdbcType="VARCHAR" />
-    <result column="ftd_text3" property="ftdText3" jdbcType="VARCHAR" />
-    <result column="ftd_text4" property="ftdText4" jdbcType="VARCHAR" />
-    <result column="ftd_text5" property="ftdText5" jdbcType="VARCHAR" />
+    <result column="ftd_text1" property="ftd_text1" jdbcType="VARCHAR" />
+    <result column="ftd_text2" property="ftd_text2" jdbcType="VARCHAR" />
+    <result column="ftd_text3" property="ftd_text3" jdbcType="VARCHAR" />
+    <result column="ftd_text4" property="ftd_text4" jdbcType="VARCHAR" />
+    <result column="ftd_text5" property="ftd_text5" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     ftd_id, ftd_ftid, ftd_detno, ftd_ym, ftd_bankid, ftd_bankcode, ftd_bankname, ftd_inbankid, 
@@ -34,16 +34,17 @@
     select 
     <include refid="Base_Column_List" />
     from fundtransferdetail
-    where ftd_id = #{ftdId,jdbcType=INTEGER}
+    where ftd_ftid = #{id,jdbcType=INTEGER}
   </select>
+
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from fundtransferdetail
-    where ftd_id = #{ftdId,jdbcType=INTEGER}
+    where ftd_ftid = #{id,jdbcType=INTEGER}
   </delete>
 
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from fundtransferdetail
-    where ftd_ftid = #{ftdFtid,jdbcType=INTEGER}
+    where ftd_id = #{id,jdbcType=INTEGER}
   </delete>
 
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Fundtransferdetail" >
@@ -51,7 +52,7 @@
       ftd_ym, ftd_bankid, ftd_bankcode, 
       ftd_bankname, ftd_inbankid, ftd_inbankcode, 
       ftd_inbankname, ftd_nowbalance, ftd_paymethod, 
-      ftd_paycode, ftd_remark, companyid, 
+      ftd_paycode, ftd_remark, companyid,
       updaterId, updatedate, ftd_text1, 
       ftd_text2, ftd_text3, ftd_text4, 
       ftd_text5)
@@ -59,7 +60,7 @@
       #{ftdYm,jdbcType=INTEGER}, #{ftdBankid,jdbcType=INTEGER}, #{ftdBankcode,jdbcType=VARCHAR}, 
       #{ftdBankname,jdbcType=VARCHAR}, #{ftdInbankid,jdbcType=INTEGER}, #{ftdInbankcode,jdbcType=VARCHAR}, 
       #{ftdInbankname,jdbcType=VARCHAR}, #{ftdNowbalance,jdbcType=DOUBLE}, #{ftdPaymethod,jdbcType=VARCHAR}, 
-      #{ftdPaycode,jdbcType=VARCHAR}, #{ftdRemark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, 
+      #{ftdPaycode,jdbcType=VARCHAR}, #{ftdRemark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, 
       #{updaterid,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{ftdText1,jdbcType=VARCHAR}, 
       #{ftdText2,jdbcType=VARCHAR}, #{ftdText3,jdbcType=VARCHAR}, #{ftdText4,jdbcType=VARCHAR}, 
       #{ftdText5,jdbcType=VARCHAR})
@@ -67,210 +68,204 @@
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Fundtransferdetail" >
     insert into fundtransferdetail
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="ftdId != null" >
-        ftd_id,
-      </if>
-      <if test="ftdFtid != null" >
+      <if test="ftd_ftid != null" >
         ftd_ftid,
       </if>
-      <if test="ftdDetno != null" >
+      <if test="ftd_detno != null" >
         ftd_detno,
       </if>
-      <if test="ftdYm != null" >
+      <if test="ftd_ym != null" >
         ftd_ym,
       </if>
-      <if test="ftdBankid != null" >
+      <if test="ftd_bankid != null" >
         ftd_bankid,
       </if>
-      <if test="ftdBankcode != null" >
+      <if test="ftd_bankcode != null" >
         ftd_bankcode,
       </if>
-      <if test="ftdBankname != null" >
+      <if test="ftd_bankname != null" >
         ftd_bankname,
       </if>
-      <if test="ftdInbankid != null" >
+      <if test="ftd_inbankid != null" >
         ftd_inbankid,
       </if>
-      <if test="ftdInbankcode != null" >
+      <if test="ftd_inbankcode != null" >
         ftd_inbankcode,
       </if>
-      <if test="ftdInbankname != null" >
+      <if test="ftd_inbankname != null" >
         ftd_inbankname,
       </if>
-      <if test="ftdNowbalance != null" >
+      <if test="ftd_nowbalance != null" >
         ftd_nowbalance,
       </if>
-      <if test="ftdPaymethod != null" >
+      <if test="ftd_paymethod != null" >
         ftd_paymethod,
       </if>
-      <if test="ftdPaycode != null" >
+      <if test="ftd_paycode != null" >
         ftd_paycode,
       </if>
-      <if test="ftdRemark != null" >
+      <if test="ftd_remark != null" >
         ftd_remark,
       </if>
-      <if test="companyid != null" >
+      <if test="companyId != null" >
         companyid,
       </if>
-      <if test="updaterid != null" >
+      <if test="updaterId != null" >
         updaterId,
       </if>
       <if test="updatedate != null" >
         updatedate,
       </if>
-      <if test="ftdText1 != null" >
+      <if test="ftd_text1 != null" >
         ftd_text1,
       </if>
-      <if test="ftdText2 != null" >
+      <if test="ftd_text2 != null" >
         ftd_text2,
       </if>
-      <if test="ftdText3 != null" >
+      <if test="ftd_text3 != null" >
         ftd_text3,
       </if>
-      <if test="ftdText4 != null" >
+      <if test="ftd_text4 != null" >
         ftd_text4,
       </if>
-      <if test="ftdText5 != null" >
+      <if test="ftd_text5 != null" >
         ftd_text5,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="ftdId != null" >
-        #{ftdId,jdbcType=INTEGER},
-      </if>
-      <if test="ftdFtid != null" >
-        #{ftdFtid,jdbcType=INTEGER},
+      <if test="ftd_ftid != null" >
+        #{ftd_ftid,jdbcType=INTEGER},
       </if>
-      <if test="ftdDetno != null" >
-        #{ftdDetno,jdbcType=INTEGER},
+      <if test="ftd_detno != null" >
+        #{ftd_detno,jdbcType=INTEGER},
       </if>
-      <if test="ftdYm != null" >
-        #{ftdYm,jdbcType=INTEGER},
+      <if test="ftd_ym != null" >
+        #{ftd_ym,jdbcType=INTEGER},
       </if>
-      <if test="ftdBankid != null" >
-        #{ftdBankid,jdbcType=INTEGER},
+      <if test="ftd_bankid != null" >
+        #{ftd_bankid,jdbcType=INTEGER},
       </if>
-      <if test="ftdBankcode != null" >
-        #{ftdBankcode,jdbcType=VARCHAR},
+      <if test="ftd_bankcode != null" >
+        #{ftd_bankcode,jdbcType=VARCHAR},
       </if>
-      <if test="ftdBankname != null" >
-        #{ftdBankname,jdbcType=VARCHAR},
+      <if test="ftd_bankname != null" >
+        #{ftd_bankname,jdbcType=VARCHAR},
       </if>
-      <if test="ftdInbankid != null" >
-        #{ftdInbankid,jdbcType=INTEGER},
+      <if test="ftd_inbankid != null" >
+        #{ftd_inbankid,jdbcType=INTEGER},
       </if>
-      <if test="ftdInbankcode != null" >
-        #{ftdInbankcode,jdbcType=VARCHAR},
+      <if test="ftd_inbankcode != null" >
+        #{ftd_inbankcode,jdbcType=VARCHAR},
       </if>
-      <if test="ftdInbankname != null" >
-        #{ftdInbankname,jdbcType=VARCHAR},
+      <if test="ftd_inbankname != null" >
+        #{ftd_inbankname,jdbcType=VARCHAR},
       </if>
-      <if test="ftdNowbalance != null" >
-        #{ftdNowbalance,jdbcType=DOUBLE},
+      <if test="ftd_nowbalance != null" >
+        #{ftd_nowbalance,jdbcType=DOUBLE},
       </if>
-      <if test="ftdPaymethod != null" >
-        #{ftdPaymethod,jdbcType=VARCHAR},
+      <if test="ftd_paymethod != null" >
+        #{ftd_paymethod,jdbcType=VARCHAR},
       </if>
-      <if test="ftdPaycode != null" >
-        #{ftdPaycode,jdbcType=VARCHAR},
+      <if test="ftd_paycode != null" >
+        #{ftd_paycode,jdbcType=VARCHAR},
       </if>
-      <if test="ftdRemark != null" >
-        #{ftdRemark,jdbcType=VARCHAR},
+      <if test="ftd_remark != null" >
+        #{ftd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="ftdText1 != null" >
-        #{ftdText1,jdbcType=VARCHAR},
+      <if test="ftd_text1 != null" >
+        #{ftd_text1,jdbcType=VARCHAR},
       </if>
-      <if test="ftdText2 != null" >
-        #{ftdText2,jdbcType=VARCHAR},
+      <if test="ftd_text2 != null" >
+        #{ftd_text2,jdbcType=VARCHAR},
       </if>
-      <if test="ftdText3 != null" >
-        #{ftdText3,jdbcType=VARCHAR},
+      <if test="ftd_text3 != null" >
+        #{ftd_text3,jdbcType=VARCHAR},
       </if>
-      <if test="ftdText4 != null" >
-        #{ftdText4,jdbcType=VARCHAR},
+      <if test="ftd_text4 != null" >
+        #{ftd_text4,jdbcType=VARCHAR},
       </if>
-      <if test="ftdText5 != null" >
-        #{ftdText5,jdbcType=VARCHAR},
+      <if test="ftd_text5 != null" >
+        #{ftd_text5,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Fundtransferdetail" >
     update fundtransferdetail
     <set >
-      <if test="ftdFtid != null" >
-        ftd_ftid = #{ftdFtid,jdbcType=INTEGER},
+      <if test="ftd_ftid != null" >
+        ftd_ftid = #{ftd_ftid,jdbcType=INTEGER},
       </if>
-      <if test="ftdDetno != null" >
-        ftd_detno = #{ftdDetno,jdbcType=INTEGER},
+      <if test="ftd_detno != null" >
+        ftd_detno = #{ftd_detno,jdbcType=INTEGER},
       </if>
-      <if test="ftdYm != null" >
-        ftd_ym = #{ftdYm,jdbcType=INTEGER},
+      <if test="ftd_ym != null" >
+        ftd_ym = #{ftd_ym,jdbcType=INTEGER},
       </if>
-      <if test="ftdBankid != null" >
-        ftd_bankid = #{ftdBankid,jdbcType=INTEGER},
+      <if test="ftd_bankid != null" >
+        ftd_bankid = #{ftd_bankid,jdbcType=INTEGER},
       </if>
-      <if test="ftdBankcode != null" >
-        ftd_bankcode = #{ftdBankcode,jdbcType=VARCHAR},
+      <if test="ftd_bankcode != null" >
+        ftd_bankcode = #{ftd_bankcode,jdbcType=VARCHAR},
       </if>
-      <if test="ftdBankname != null" >
-        ftd_bankname = #{ftdBankname,jdbcType=VARCHAR},
+      <if test="ftd_bankname != null" >
+        ftd_bankname = #{ftd_bankname,jdbcType=VARCHAR},
       </if>
-      <if test="ftdInbankid != null" >
-        ftd_inbankid = #{ftdInbankid,jdbcType=INTEGER},
+      <if test="ftd_inbankid != null" >
+        ftd_inbankid = #{ftd_inbankid,jdbcType=INTEGER},
       </if>
-      <if test="ftdInbankcode != null" >
-        ftd_inbankcode = #{ftdInbankcode,jdbcType=VARCHAR},
+      <if test="ftd_inbankcode != null" >
+        ftd_inbankcode = #{ftd_inbankcode,jdbcType=VARCHAR},
       </if>
-      <if test="ftdInbankname != null" >
-        ftd_inbankname = #{ftdInbankname,jdbcType=VARCHAR},
+      <if test="ftd_inbankname != null" >
+        ftd_inbankname = #{ftd_inbankname,jdbcType=VARCHAR},
       </if>
-      <if test="ftdNowbalance != null" >
-        ftd_nowbalance = #{ftdNowbalance,jdbcType=DOUBLE},
+      <if test="ftd_nowbalance != null" >
+        ftd_nowbalance = #{ftd_nowbalance,jdbcType=DOUBLE},
       </if>
-      <if test="ftdPaymethod != null" >
-        ftd_paymethod = #{ftdPaymethod,jdbcType=VARCHAR},
+      <if test="ftd_paymethod != null" >
+        ftd_paymethod = #{ftd_paymethod,jdbcType=VARCHAR},
       </if>
-      <if test="ftdPaycode != null" >
-        ftd_paycode = #{ftdPaycode,jdbcType=VARCHAR},
+      <if test="ftd_paycode != null" >
+        ftd_paycode = #{ftd_paycode,jdbcType=VARCHAR},
       </if>
-      <if test="ftdRemark != null" >
-        ftd_remark = #{ftdRemark,jdbcType=VARCHAR},
+      <if test="ftd_remark != null" >
+        ftd_remark = #{ftd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyid = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        updaterId = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         updatedate = #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="ftdText1 != null" >
-        ftd_text1 = #{ftdText1,jdbcType=VARCHAR},
+      <if test="ftd_text1 != null" >
+        ftd_text1 = #{ftd_text1,jdbcType=VARCHAR},
       </if>
-      <if test="ftdText2 != null" >
-        ftd_text2 = #{ftdText2,jdbcType=VARCHAR},
+      <if test="ftd_text2 != null" >
+        ftd_text2 = #{ftd_text2,jdbcType=VARCHAR},
       </if>
-      <if test="ftdText3 != null" >
-        ftd_text3 = #{ftdText3,jdbcType=VARCHAR},
+      <if test="ftd_text3 != null" >
+        ftd_text3 = #{ftd_text3,jdbcType=VARCHAR},
       </if>
-      <if test="ftdText4 != null" >
-        ftd_text4 = #{ftdText4,jdbcType=VARCHAR},
+      <if test="ftd_text4 != null" >
+        ftd_text4 = #{ftd_text4,jdbcType=VARCHAR},
       </if>
-      <if test="ftdText5 != null" >
-        ftd_text5 = #{ftdText5,jdbcType=VARCHAR},
+      <if test="ftd_text5 != null" >
+        ftd_text5 = #{ftd_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where ftd_id = #{ftdId,jdbcType=INTEGER}
+    where ftd_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Fundtransferdetail" >
     update fundtransferdetail
@@ -287,7 +282,7 @@
       ftd_paymethod = #{ftdPaymethod,jdbcType=VARCHAR},
       ftd_paycode = #{ftdPaycode,jdbcType=VARCHAR},
       ftd_remark = #{ftdRemark,jdbcType=VARCHAR},
-      companyid = #{companyid,jdbcType=INTEGER},
+      companyid = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterid,jdbcType=INTEGER},
       updatedate = #{updatedate,jdbcType=TIMESTAMP},
       ftd_text1 = #{ftdText1,jdbcType=VARCHAR},

+ 7 - 1
applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml

@@ -26,7 +26,7 @@
     select 
     <include refid="Base_Column_List" />
     from othreceiptsdetail
-    where ord_id = #{id,jdbcType=INTEGER}
+    where ord_orid = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from othreceiptsdetail
@@ -55,6 +55,9 @@
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Othreceiptsdetail" >
     insert into othreceiptsdetail
     <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="ord_orid != null" >
+        ord_orid,
+      </if>
       <if test="ord_detno != null" >
         ord_detno,
       </if>
@@ -96,6 +99,9 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="ord_orid != null" >
+        #{ord_orid,jdbcType=INTEGER},
+      </if>
       <if test="ord_detno != null" >
         #{ord_detno,jdbcType=INTEGER},
       </if>

+ 109 - 105
applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml

@@ -66,219 +66,223 @@
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Othspendings" >
     insert into othspendings
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="osCode != null" >
+
+      <if test="os_code != null" >
         os_code,
       </if>
-      <if test="osDate != null" >
+      <if test="os_date != null" >
         os_date,
       </if>
-      <if test="osVendid != null" >
+      <if test="os_vendid != null" >
         os_vendid,
       </if>
-      <if test="osVendcode != null" >
+      <if test="os_vendcode != null" >
         os_vendcode,
       </if>
-      <if test="osVendname != null" >
+      <if test="os_vendname != null" >
         os_vendname,
       </if>
-      <if test="osBankid != null" >
+      <if test="os_bankid != null" >
         os_bankid,
       </if>
-      <if test="osBankcode != null" >
+      <if test="os_bankcode != null" >
         os_bankcode,
       </if>
-      <if test="osBankname != null" >
+      <if test="os_bankname != null" >
         os_bankname,
       </if>
-      <if test="osAmount != null" >
+      <if test="os_amount != null" >
         os_amount,
       </if>
-      <if test="osRecorderid != null" >
+      <if test="os_recorderid != null" >
         os_recorderid,
       </if>
-      <if test="osRecorder != null" >
+      <if test="os_recorder != null" >
         os_recorder,
       </if>
-      <if test="osRecorddate != null" >
+      <if test="os_recorddate != null" >
         os_recorddate,
       </if>
-      <if test="osStatus != null" >
+      <if test="os_status != null" >
         os_status,
       </if>
-      <if test="osStatuscode != null" >
+      <if test="os_statuscode != null" >
         os_statuscode,
       </if>
-      <if test="osRemark != null" >
+      <if test="os_remark != null" >
         os_remark,
       </if>
       <if test="companyId != null" >
         companyId,
       </if>
-      <if test="updaterid != null" >
+      <if test="updaterId != null" >
         updaterId,
       </if>
       <if test="updatedate != null" >
         updatedate,
       </if>
-      <if test="osText1 != null" >
+      <if test="os_text1 != null" >
         os_text1,
       </if>
-      <if test="osText2 != null" >
+      <if test="os_text2 != null" >
         os_text2,
       </if>
-      <if test="osText3 != null" >
+      <if test="os_text3 != null" >
         os_text3,
       </if>
-      <if test="osText4 != null" >
+      <if test="os_text4 != null" >
         os_text4,
       </if>
-      <if test="osText5 != null" >
+      <if test="os_text5 != null" >
         os_text5,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="osCode != null" >
-        #{osCode,jdbcType=VARCHAR},
+      <if test="os_code != null" >
+        #{os_code,jdbcType=VARCHAR},
       </if>
-      <if test="osDate != null" >
-        #{osDate,jdbcType=TIMESTAMP},
+      <if test="os_date != null" >
+        #{os_date,jdbcType=TIMESTAMP},
       </if>
-      <if test="osVendid != null" >
-        #{osVendid,jdbcType=INTEGER},
+      <if test="os_vendid != null" >
+        #{os_vendid,jdbcType=INTEGER},
       </if>
-      <if test="osVendcode != null" >
-        #{osVendcode,jdbcType=VARCHAR},
+      <if test="os_vendcode != null" >
+        #{os_vendcode,jdbcType=VARCHAR},
       </if>
-      <if test="osVendname != null" >
-        #{osVendname,jdbcType=VARCHAR},
+      <if test="os_vendname != null" >
+        #{os_vendname,jdbcType=VARCHAR},
       </if>
-      <if test="osBankid != null" >
-        #{osBankid,jdbcType=INTEGER},
+      <if test="os_bankid != null" >
+        #{os_bankid,jdbcType=INTEGER},
       </if>
-      <if test="osBankcode != null" >
-        #{osBankcode,jdbcType=VARCHAR},
+      <if test="os_bankcode != null" >
+        #{os_bankcode,jdbcType=VARCHAR},
       </if>
-      <if test="osBankname != null" >
-        #{osBankname,jdbcType=VARCHAR},
+      <if test="os_bankname != null" >
+        #{os_bankname,jdbcType=VARCHAR},
       </if>
-      <if test="osAmount != null" >
-        #{osAmount,jdbcType=DOUBLE},
+      <if test="os_amount != null" >
+        #{os_amount,jdbcType=DOUBLE},
       </if>
-      <if test="osRecorderid != null" >
-        #{osRecorderid,jdbcType=INTEGER},
+      <if test="os_recorderid != null" >
+        #{os_recorderid,jdbcType=INTEGER},
       </if>
-      <if test="osRecorder != null" >
-        #{osRecorder,jdbcType=VARCHAR},
+      <if test="os_recorder != null" >
+        #{os_recorder,jdbcType=VARCHAR},
       </if>
-      <if test="osRecorddate != null" >
-        #{osRecorddate,jdbcType=TIMESTAMP},
+      <if test="os_recorddate != null" >
+        #{os_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="osStatus != null" >
-        #{osStatus,jdbcType=INTEGER},
+      <if test="os_status != null" >
+        #{os_status,jdbcType=VARCHAR},
       </if>
-      <if test="osStatuscode != null" >
-        #{osStatuscode,jdbcType=DECIMAL},
+      <if test="os_statuscode != null" >
+        #{os_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="osRemark != null" >
-        #{osRemark,jdbcType=VARCHAR},
+      <if test="os_remark != null" >
+        #{os_remark,jdbcType=VARCHAR},
       </if>
       <if test="companyId != null" >
         #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="osText1 != null" >
-        #{osText1,jdbcType=VARCHAR},
+      <if test="os_text1 != null" >
+        #{os_text1,jdbcType=VARCHAR},
       </if>
-      <if test="osText2 != null" >
-        #{osText2,jdbcType=VARCHAR},
+      <if test="os_text2 != null" >
+        #{os_text2,jdbcType=VARCHAR},
       </if>
-      <if test="osText3 != null" >
-        #{osText3,jdbcType=VARCHAR},
+      <if test="os_text3 != null" >
+        #{os_text3,jdbcType=VARCHAR},
       </if>
-      <if test="osText4 != null" >
-        #{osText4,jdbcType=VARCHAR},
+      <if test="os_text4 != null" >
+        #{os_text4,jdbcType=VARCHAR},
       </if>
-      <if test="osText5 != null" >
-        #{osText5,jdbcType=VARCHAR},
+      <if test="os_text5 != null" >
+        #{os_text5,jdbcType=VARCHAR},
       </if>
     </trim>
+    <selectKey resultType="Long" keyProperty="id" order="AFTER">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Othspendings" >
     update othspendings
     <set >
-      <if test="osCode != null" >
-        os_code = #{osCode,jdbcType=VARCHAR},
+      <if test="os_code != null" >
+        os_code = #{os_code,jdbcType=VARCHAR},
       </if>
-      <if test="osDate != null" >
-        os_date = #{osDate,jdbcType=TIMESTAMP},
+      <if test="os_date != null" >
+        os_date = #{os_date,jdbcType=TIMESTAMP},
       </if>
-      <if test="osVendid != null" >
-        os_vendid = #{osVendid,jdbcType=INTEGER},
+      <if test="os_vendid != null" >
+        os_vendid = #{os_vendid,jdbcType=INTEGER},
       </if>
-      <if test="osVendcode != null" >
-        os_vendcode = #{osVendcode,jdbcType=VARCHAR},
+      <if test="os_vendcode != null" >
+        os_vendcode = #{os_vendcode,jdbcType=VARCHAR},
       </if>
-      <if test="osVendname != null" >
-        os_vendname = #{osVendname,jdbcType=VARCHAR},
+      <if test="os_vendname != null" >
+        os_vendname = #{os_vendname,jdbcType=VARCHAR},
       </if>
-      <if test="osBankid != null" >
-        os_bankid = #{osBankid,jdbcType=INTEGER},
+      <if test="os_bankid != null" >
+        os_bankid = #{os_bankid,jdbcType=INTEGER},
       </if>
-      <if test="osBankcode != null" >
-        os_bankcode = #{osBankcode,jdbcType=VARCHAR},
+      <if test="os_bankcode != null" >
+        os_bankcode = #{os_bankcode,jdbcType=VARCHAR},
       </if>
-      <if test="osBankname != null" >
-        os_bankname = #{osBankname,jdbcType=VARCHAR},
+      <if test="os_bankname != null" >
+        os_bankname = #{os_bankname,jdbcType=VARCHAR},
       </if>
-      <if test="osAmount != null" >
-        os_amount = #{osAmount,jdbcType=DOUBLE},
+      <if test="os_amount != null" >
+        os_amount = #{os_amount,jdbcType=DOUBLE},
       </if>
-      <if test="osRecorderid != null" >
-        os_recorderid = #{osRecorderid,jdbcType=INTEGER},
+      <if test="os_recorderid != null" >
+        os_recorderid = #{os_recorderid,jdbcType=INTEGER},
       </if>
-      <if test="osRecorder != null" >
-        os_recorder = #{osRecorder,jdbcType=VARCHAR},
+      <if test="os_recorder != null" >
+        os_recorder = #{os_recorder,jdbcType=VARCHAR},
       </if>
-      <if test="osRecorddate != null" >
-        os_recorddate = #{osRecorddate,jdbcType=TIMESTAMP},
+      <if test="os_recorddate != null" >
+        os_recorddate = #{os_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="osStatus != null" >
-        os_status = #{osStatus,jdbcType=INTEGER},
+      <if test="os_status != null" >
+        os_status = #{os_status,jdbcType=VARCHAR},
       </if>
-      <if test="osStatuscode != null" >
-        os_statuscode = #{osStatuscode,jdbcType=DECIMAL},
+      <if test="os_statuscode != null" >
+        os_statuscode = #{os_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="osRemark != null" >
-        os_remark = #{osRemark,jdbcType=VARCHAR},
+      <if test="os_remark != null" >
+        os_remark = #{os_remark,jdbcType=VARCHAR},
       </if>
       <if test="companyId != null" >
         companyId = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        updaterId = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         updatedate = #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="osText1 != null" >
-        os_text1 = #{osText1,jdbcType=VARCHAR},
+      <if test="os_text1 != null" >
+        os_text1 = #{os_text1,jdbcType=VARCHAR},
       </if>
-      <if test="osText2 != null" >
-        os_text2 = #{osText2,jdbcType=VARCHAR},
+      <if test="os_text2 != null" >
+        os_text2 = #{os_text2,jdbcType=VARCHAR},
       </if>
-      <if test="osText3 != null" >
-        os_text3 = #{osText3,jdbcType=VARCHAR},
+      <if test="os_text3 != null" >
+        os_text3 = #{os_text3,jdbcType=VARCHAR},
       </if>
-      <if test="osText4 != null" >
-        os_text4 = #{osText4,jdbcType=VARCHAR},
+      <if test="os_text4 != null" >
+        os_text4 = #{os_text4,jdbcType=VARCHAR},
       </if>
-      <if test="osText5 != null" >
-        os_text5 = #{osText5,jdbcType=VARCHAR},
+      <if test="os_text5 != null" >
+        os_text5 = #{os_text5,jdbcType=VARCHAR},
       </if>
     </set>
     where os_id = #{id,jdbcType=INTEGER}

+ 4 - 1
applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml

@@ -26,7 +26,7 @@
     select 
     <include refid="Base_Column_List" />
     from othspendingsdetail
-    where osd_id = #{osd_orid,jdbcType=INTEGER}
+    where osd_orid = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from othspendingsdetail
@@ -142,6 +142,9 @@
         #{osd_text5,jdbcType=VARCHAR},
       </if>
     </trim>
+    <selectKey resultType="Long" keyProperty="id" order="AFTER">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Othspendingsdetail" >
     update othspendingsdetail

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml

@@ -31,7 +31,7 @@
     select
     <include refid="Base_Column_List" />
     from paybalancedetail
-    where pbd_id = #{id,jdbcType=INTEGER}
+    where pbd_pbid = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from paybalancedetail

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml

@@ -89,7 +89,7 @@
     select 
     <include refid="Base_Column_List" />
     from recbalancedet
-    where rd_id = #{id,jdbcType=INTEGER}
+    where rd_rbid = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer">
     delete from recbalancedet

+ 2 - 2
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.purchase.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import lombok.Data;
 
@@ -11,7 +11,7 @@ import java.io.Serializable;
  * 2018-10-17 13:45.
  */
 @Data
-public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
+public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Long pd_piid;
 

+ 4 - 4
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java

@@ -1,7 +1,6 @@
 package com.usoftchina.saas.purchase.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
-import io.swagger.annotations.ApiModel;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -12,8 +11,7 @@ import java.util.Date;
  * 2018-10-17 13:44.
  */
 @Data
-@ApiModel(value = "Prodinout", description = "出入库单")
-public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
+public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_inoutno;
 
@@ -69,6 +67,8 @@ public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
 
+    private String pi_auditman;
 
 }

+ 6 - 2
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.purchase.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -11,7 +11,7 @@ import java.util.Date;
  * 2018-10-17 13:45.
  */
 @Data
-public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
+public class ProdInOutListDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_inoutno;
 
@@ -67,6 +67,10 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private String pi_auditman;
+
     private Long pd_piid;
 
     private String pd_inoutno;

+ 0 - 28
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutReqDTO.java

@@ -1,28 +0,0 @@
-package com.usoftchina.saas.purchase.dto;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by zdw
- * 2018-10-17 13:46.
- */
-@Data
-public class ProdInOutReqDTO implements Serializable {
-    /**
-     * 开始日期
-     */
-    private Date begin;
-    /**
-     * 截止日期
-     */
-    private Date end;
-    private String status;
-    private String keyword;
-    //区分是否为关联列表
-    private String mode;
-
-
-}

+ 2 - 3
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java

@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.*;
  * Created by zdw
  * 2018-10-17 11:41.
  */
-@CrossOrigin
 @RestController
 @RequestMapping("/prodinout")
 public class ProdInOutController {
@@ -92,7 +91,7 @@ public class ProdInOutController {
      * @param id
      * @return
      */
-    @PostMapping("/deleteItem/{id}")
+    @PostMapping("/deleteDetail/{id}")
     public Result deleteItem(@PathVariable("id") Long id) {
         prodInOutService.deleteItem(id);
         return Result.success();
@@ -143,7 +142,7 @@ public class ProdInOutController {
      */
     @PostMapping("/batchUnAudit")
     public Result batchUnAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        prodInOutService.batchAudit(baseDTOs);
+        prodInOutService.batchUnAudit(baseDTOs);
         return Result.success();
     }
 

+ 2 - 6
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -1,21 +1,17 @@
 package com.usoftchina.saas.purchase.controller;
 
 import com.github.pagehelper.PageInfo;
-import com.netflix.discovery.converters.Auto;
 import com.usoftchina.saas.base.Result;
-
-import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.page.PageRequest;
-import com.usoftchina.saas.purchase.dto.*;
+import com.usoftchina.saas.purchase.dto.PurchaseFormDTO;
 import com.usoftchina.saas.purchase.po.PurchaseList;
 import com.usoftchina.saas.purchase.service.PurchaseService;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.context.request.async.DeferredResult;
+
 
 
 /**

+ 4 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java

@@ -62,4 +62,8 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private String pi_auditman;
+
 }

+ 4 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java

@@ -66,6 +66,10 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private String pi_auditman;
+
     private Long pd_piid;
 
     private String pd_inoutno;

+ 7 - 4
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java

@@ -300,7 +300,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
-            messageLogService.audit(docBaseDTO);
+            messageLogService.unAudit(docBaseDTO);
             return "";
         }
     }
@@ -389,7 +389,10 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
          for (int i = 0;i<sourcePids.size();i++){
              ProdIODetail sourcePid = sourcePids.get(i);
              ProdIODetail targetPid = new ProdIODetail();
-             if(sourcePid.getPd_inqty()-sourcePid.getPd_yqty()>0){
+             pdInqty = sourcePid.getPd_inqty()==null?0:sourcePid.getPd_inqty();
+             pdYqty = sourcePid.getPd_yqty()==null?0:sourcePid.getPd_yqty();
+
+             if(pdInqty-pdYqty>0){
                  targetPid.setPd_piid(pi_id);
                  targetPid.setPd_inoutno(piInoutno);
                  targetPid.setPd_piclass(BillCodeSeq.PURCHASEOUT.getName());
@@ -404,10 +407,10 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  //公司id
                  targetPid.setCompanyId(sourcePid.getCompanyId());
                  //本次转单数
-                 targetPid.setPd_outqty(sourcePid.getPd_inqty()-sourcePid.getPd_yqty());
+                 targetPid.setPd_outqty(pdInqty-pdYqty);
                  prodIODetailMapper.insertSelective(targetPid);
                  //更新已转数
-                 sourcePid.setPd_yqty(sourcePid.getPd_inqty());
+                 sourcePid.setPd_yqty(pdInqty);
                  prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
              }
          }

+ 15 - 6
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -132,6 +132,9 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 detail.setPd_puid(pu_id);
                 detail.setPd_code(pu_code);
                 detail.setPd_yqty(new Double(0));
+                detail.setCompanyId(companyId);
+                detail.setCreatorId(userId);
+                detail.setCreateTime(new Date());
                 insertDetails.add(detail);
             }
             //插入从表
@@ -150,6 +153,9 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             PurchaseDetail detail = BeanMapper.map(item, PurchaseDetail.class);
             detail.setPd_puid(pu_id);
             detail.setPd_code(pu_code);
+            detail.setCompanyId(companyId);
+            detail.setCreatorId(userId);
+            detail.setCreateTime(new Date());
             if (StringUtils.isEmpty(detail.getId()) || "0".equals(detail.getId().toString())) {
                 insertDetails.add(detail);
             } else {
@@ -334,8 +340,8 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
 
         //检查从表
         for (PurchaseDetail purchaseDetail : purchaseDetails) {
-            pdQty = purchaseDetail.getPd_qty();
-            pdYqty = purchaseDetail.getPd_yqty();
+            pdQty = purchaseDetail.getPd_qty()==null?0:purchaseDetail.getPd_qty();
+            pdYqty = purchaseDetail.getPd_yqty()==null?0:purchaseDetail.getPd_yqty();
             if (pdQty-pdYqty>0){
                 count++;
             }
@@ -347,7 +353,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         //插入验收单主表
         ProdInOut prodInOut = new ProdInOut();
         //生成单号
-        String piInoutno ="YS0001";
+        String piInoutno =maxnumberService.getMaxnumber(BillCodeSeq.PURCHASEIN.getCaller(),true).getData();
 
         prodInOut.setPi_inoutno(piInoutno);
         prodInOut.setPi_class("采购验收单");
@@ -371,7 +377,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         for (int i=0;i<purchaseDetails.size();i++){
             PurchaseDetail purchaseDetail =purchaseDetails.get(i);
             ProdIODetail prodIODetail = new ProdIODetail();
-            if ((int) (purchaseDetail.getPd_qty()-purchaseDetail.getPd_yqty())>0){
+            pdQty = purchaseDetail.getPd_qty()==null?0:purchaseDetail.getPd_qty();
+            pdYqty = purchaseDetail.getPd_yqty()==null?0:purchaseDetail.getPd_yqty();
+
+            if (pdQty-pdYqty>0){
                 prodIODetail.setPd_piid(pi_id);
                 prodIODetail.setPd_inoutno(piInoutno);
                 prodIODetail.setPd_piclass("采购验收单");
@@ -385,10 +394,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 //公司id
                 prodIODetail.setCompanyId(purchaseDetail.getCompanyId());
                 //本次转单数
-                prodIODetail.setPd_inqty((purchaseDetail.getPd_qty()-purchaseDetail.getPd_yqty()));
+                prodIODetail.setPd_inqty(pdQty-pdYqty);
                 prodIODetailMapper.insertSelective(prodIODetail);
                 //更新已转数
-                purchaseDetail.setPd_yqty(purchaseDetail.getPd_qty());
+                purchaseDetail.setPd_yqty(pdQty);
                 purchasedetailMapper.updateByPrimaryKeySelective(purchaseDetail);
             }
         }

+ 54 - 239
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -550,246 +550,61 @@
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </update>
   <insert id="batchInsert" parameterType="java.util.List" >
+    insert into prodiodetail (pd_piid, pd_inoutno,
+    pd_piclass, pd_pdno, pd_ordercode,
+    pd_orderdetno, pd_prodid, pd_prodcode,
+    pd_unit, pd_inqty, pd_outqty,
+    pd_orderprice, pd_sendprice, pd_price,
+    pd_total, pd_taxrate, pd_netprice,
+    pd_nettotal, pd_whid, pd_whcode,
+    pd_whname, pd_inwhid, pd_inwhcode,
+    pd_inwhname, pd_orderid, pd_sdid,
+    pd_status, companyid, updaterid,
+    updatetime, pd_text1, pd_text2,
+    pd_text3, pd_text4, pd_text5,
+    pd_ym, pd_yqty, pd_ioid,
+    pd_remark) VALUES
     <foreach collection="list" item="item" index="index" open="" close="" separator=",">
-      insert into prodiodetail
-      <trim prefix="(" suffix=")" suffixOverrides=",">
-        <if test="item.pd_piid != null">
-          pd_piid,
-        </if>
-        <if test="item.pd_inoutno != null">
-          pd_inoutno,
-        </if>
-        <if test="item.pd_piclass != null">
-          pd_piclass,
-        </if>
-        <if test="item.pd_pdno != null">
-          pd_pdno,
-        </if>
-        <if test="item.pd_ordercode != null">
-          pd_ordercode,
-        </if>
-        <if test="item.pd_orderdetno != null">
-          pd_orderdetno,
-        </if>
-        <if test="item.pd_prodid != null">
-          pd_prodid,
-        </if>
-        <if test="item.pd_prodcode != null">
-          pd_prodcode,
-        </if>
-        <if test="item.pd_unit != null">
-          pd_unit,
-        </if>
-        <if test="item.pd_inqty != null">
-          pd_inqty,
-        </if>
-        <if test="item.pd_outqty != null">
-          pd_outqty,
-        </if>
-        <if test="item.pd_orderprice != null">
-          pd_orderprice,
-        </if>
-        <if test="item.pd_sendprice != null">
-          pd_sendprice,
-        </if>
-        <if test="item.pd_price != null">
-          pd_price,
-        </if>
-        <if test="item.pd_total != null">
-          pd_total,
-        </if>
-        <if test="item.pd_taxrate != null">
-          pd_taxrate,
-        </if>
-        <if test="item.pd_netprice != null">
-          pd_netprice,
-        </if>
-        <if test="item.pd_nettotal != null">
-          pd_nettotal,
-        </if>
-        <if test="item.pd_whid != null">
-          pd_whid,
-        </if>
-        <if test="item.pd_whcode != null">
-          pd_whcode,
-        </if>
-        <if test="item.pd_whname != null">
-          pd_whname,
-        </if>
-        <if test="item.pd_inwhid != null">
-          pd_inwhid,
-        </if>
-        <if test="item.pd_inwhcode != null">
-          pd_inwhcode,
-        </if>
-        <if test="item.pd_inwhname != null">
-          pd_inwhname,
-        </if>
-        <if test="item.pd_orderid != null">
-          pd_orderid,
-        </if>
-        <if test="item.pd_sdid != null">
-          pd_sdid,
-        </if>
-        <if test="item.pd_status != null">
-          pd_status,
-        </if>
-        <if test="item.companyId != null">
-          companyid,
-        </if>
-        <if test="item.updaterId != null">
-          updaterid,
-        </if>
-        <if test="item.updateTime != null">
-          updatetime,
-        </if>
-        <if test="item.pd_text1 != null">
-          pd_text1,
-        </if>
-        <if test="item.pd_text2 != null">
-          pd_text2,
-        </if>
-        <if test="item.pd_text3 != null">
-          pd_text3,
-        </if>
-        <if test="item.pd_text4 != null">
-          pd_text4,
-        </if>
-        <if test="item.pd_text5 != null">
-          pd_text5,
-        </if>
-        <if test="item.pd_ym != null">
-          pd_ym,
-        </if>
-        <if test="item.pd_yqty != null">
-          pd_yqty,
-        </if>
-        <if test="item.pd_remark != null">
-          pd_remark,
-        </if>
-        <if test="item.pd_ioid != null">
-          pd_ioid,
-        </if>
-      </trim>
-      <trim prefix="values (" suffix=")" suffixOverrides=",">
-        <if test="item.pd_piid != null">
-          #{item.pd_piid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_inoutno != null">
-          #{item.pd_inoutno,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_piclass != null">
-          #{item.pd_piclass,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_pdno != null">
-          #{item.pd_pdno,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_ordercode != null">
-          #{item.pd_ordercode,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_orderdetno != null">
-          #{item.pd_orderdetno,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_prodid != null">
-          #{item.pd_prodid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_prodcode != null">
-          #{item.pd_prodcode,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_unit != null">
-          #{item.pd_unit,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_inqty != null">
-          #{item.pd_inqty,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_outqty != null">
-          #{item.pd_outqty,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_orderprice != null">
-          #{item.pd_orderprice,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_sendprice != null">
-          #{item.pd_sendprice,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_price != null">
-          #{item.pd_price,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_total != null">
-          #{item.pd_total,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_taxrate != null">
-          #{item.pd_taxrate,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_netprice != null">
-          #{item.pd_netprice,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_nettotal != null">
-          #{item.pd_nettotal,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_whid != null">
-          #{item.pd_whid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_whcode != null">
-          #{item.pd_whcode,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_whname != null">
-          #{item.pd_whname,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_inwhid != null">
-          #{item.pd_inwhid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_inwhcode != null">
-          #{item.pd_inwhcode,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_inwhname != null">
-          #{item.pd_inwhname,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_orderid != null">
-          #{item.pd_orderid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_sdid != null">
-          #{item.pd_sdid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_status != null">
-          #{item.pd_status,jdbcType=INTEGER},
-        </if>
-        <if test="item.companyId != null">
-          #{item.companyId,jdbcType=INTEGER},
-        </if>
-        <if test="item.updaterId != null">
-          #{item.updaterId,jdbcType=INTEGER},
-        </if>
-        <if test="item.updateTime != null">
-          #{item.updateTime,jdbcType=TIMESTAMP},
-        </if>
-        <if test="item.pd_text1 != null">
-          #{item.pd_text1,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_text2 != null">
-          #{item.pd_text2,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_text3 != null">
-          #{item.pd_text3,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_text4 != null">
-          #{item.pd_text4,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_text5 != null">
-          #{item.pd_text5,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_ym != null">
-          #{item.pd_ym,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_yqty != null">
-          #{item.pd_yqty,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_remark != null">
-          #{item.pd_remark,jdbcType=LONGVARCHAR},
-        </if>
-        <if test="item.pd_ioid != null">
-          #{item.pd_ioid,jdbcType=INTEGER},
-        </if>
-      </trim>
+      (
+      #{item.pd_piid,jdbcType=INTEGER},
+      #{item.pd_inoutno,jdbcType=VARCHAR},
+      #{item.pd_piclass,jdbcType=VARCHAR},
+      #{item.pd_pdno,jdbcType=INTEGER},
+      #{item.pd_ordercode,jdbcType=VARCHAR},
+      #{item.pd_orderdetno,jdbcType=INTEGER},
+      #{item.pd_prodid,jdbcType=INTEGER},
+      #{item.pd_prodcode,jdbcType=VARCHAR},
+      #{item.pd_unit,jdbcType=VARCHAR},
+      #{item.pd_inqty,jdbcType=DOUBLE},
+      #{item.pd_outqty,jdbcType=DOUBLE},
+      #{item.pd_orderprice,jdbcType=DOUBLE},
+      #{item.pd_sendprice,jdbcType=DOUBLE},
+      #{item.pd_price,jdbcType=DOUBLE},
+      #{item.pd_total,jdbcType=DOUBLE},
+      #{item.pd_taxrate,jdbcType=DOUBLE},
+      #{item.pd_netprice,jdbcType=DOUBLE},
+      #{item.pd_nettotal,jdbcType=DOUBLE},
+      #{item.pd_whid,jdbcType=INTEGER},
+      #{item.pd_whcode,jdbcType=VARCHAR},
+      #{item.pd_whname,jdbcType=VARCHAR},
+      #{item.pd_inwhid,jdbcType=INTEGER},
+      #{item.pd_inwhcode,jdbcType=VARCHAR},
+      #{item.pd_inwhname,jdbcType=VARCHAR},
+      #{item.pd_orderid,jdbcType=INTEGER},
+      #{item.pd_sdid,jdbcType=INTEGER},
+      #{item.pd_status,jdbcType=INTEGER},
+      #{item.companyId,jdbcType=INTEGER},
+      #{item.updaterId,jdbcType=INTEGER},
+      #{item.updateTime,jdbcType=TIMESTAMP},
+      #{item.pd_text1,jdbcType=VARCHAR},
+      #{item.pd_text2,jdbcType=VARCHAR},
+      #{item.pd_text3,jdbcType=VARCHAR},
+      #{item.pd_text4,jdbcType=VARCHAR},
+      #{item.pd_text5,jdbcType=VARCHAR},
+      #{item.pd_ym,jdbcType=INTEGER},
+      #{item.pd_yqty,jdbcType=DOUBLE},
+      #{item.pd_remark,jdbcType=LONGVARCHAR},
+      #{item.pd_ioid,jdbcType=INTEGER})
     </foreach>
   </insert>
 

+ 2 - 0
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -29,6 +29,8 @@
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
     <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
+    <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
+    <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
     <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
     <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />

+ 2 - 1
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -32,7 +32,8 @@
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
     <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
-
+    <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
+    <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
 
 
   </resultMap>

+ 23 - 0
applications/purchase/purchase-server/src/test/PurchaseTest.java

@@ -1,4 +1,6 @@
 import com.usoftchina.saas.purchase.PurchaseApplication;
+import com.usoftchina.saas.purchase.mapper.ProdIODetailMapper;
+import com.usoftchina.saas.purchase.po.ProdIODetail;
 import com.usoftchina.saas.purchase.service.ProdInOutService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -7,6 +9,9 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
+import java.util.ArrayList;
+import java.util.List;
+
 @RunWith(SpringJUnit4ClassRunner.class)
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = PurchaseApplication.class)
 @EnableAutoConfiguration
@@ -14,9 +19,27 @@ public class PurchaseTest {
 
     @Autowired
     private ProdInOutService prodInOutService;
+    @Autowired
+    private ProdIODetailMapper prodIODetailMapper;
+
 
     @Test
     public void test(){
+        List<ProdIODetail> list = new ArrayList<>();
+        ProdIODetail prodIODetail1 = new ProdIODetail();
+        prodIODetail1.setPd_piid(new Long(1));
+        prodIODetail1.setCompanyId(-1);
+        prodIODetail1.setPd_inoutno("test01");
+
+
+        ProdIODetail prodIODetail2 = new ProdIODetail();
+        prodIODetail2.setPd_piid(new Long(1));
+        prodIODetail2.setCompanyId(-1);
+        prodIODetail2.setPd_inoutno("test02");
+
+        list.add(prodIODetail1);
+        list.add(prodIODetail2);
 
+        prodIODetailMapper.batchInsert(list);
     }
 }

+ 3 - 1
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdIODetailDTO.java

@@ -12,7 +12,9 @@ import java.io.Serializable;
  * 2018-10-23
  */
 @Data
-public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
+public class ProdIODetailDTO implements Serializable {
+
+    private Long id;
 
     private Long pd_piid;
 

+ 4 - 2
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdInOutDTO.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.sale.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
 import io.swagger.annotations.ApiModel;
 import lombok.Data;
 
@@ -12,7 +12,9 @@ import java.util.Date;
  * 2018-10-23
  */
 @Data
-public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
+public class ProdInOutDTO implements Serializable {
+
+    protected Long id;
 
     private String pi_inoutno;
 

+ 3 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDetailDTO.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.sale.dto;
 
 import com.usoftchina.saas.base.dto.CommonBaseDTO;
 
+import com.usoftchina.saas.document.dto.ProductDTO;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -54,4 +55,6 @@ public class SaleDetailDTO extends CommonBaseDTO implements Serializable {
     private String sd_text4;
 
     private String sd_text5;
+
+    private ProductDTO productDTO;
 }

+ 4 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java

@@ -163,4 +163,8 @@ public class SaleController {
         return Result.success();
     }
 
+    @GetMapping("/test")
+    public String test() {
+        return "配置构建success";
+    }
 }

+ 0 - 3
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdIODetailMapper.java

@@ -8,9 +8,6 @@ import java.util.List;
 
 public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
 
-
-    int deleteByExample(ProdIODetailExample example);
-
     int insert(ProdIODetail record);
 
     int insertSelective(ProdIODetail record);

+ 0 - 14
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java

@@ -9,28 +9,14 @@ import org.apache.ibatis.annotations.Param;
 import java.util.List;
 
 public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
-    long countByExample(ProdInOutExample example);
-
-    int deleteByExample(ProdInOutExample example);
-
     int deleteByPrimaryKey(Long pi_id);
 
     int insert(ProdInOut record);
 
     int insertSelective(ProdInOut record);
 
-    List<ProdInOut> selectByExampleWithBLOBs(ProdInOutExample example);
-
-    List<ProdInOut> selectByExample(ProdInOutExample example);
-
     ProdInOut selectByPrimaryKey(Long pi_id);
 
-    int updateByExampleSelective(@Param("record") ProdInOut record, @Param("example") ProdInOutExample example);
-
-    int updateByExampleWithBLOBs(@Param("record") ProdInOut record, @Param("example") ProdInOutExample example);
-
-    int updateByExample(@Param("record") ProdInOut record, @Param("example") ProdInOutExample example);
-
     int updateByPrimaryKeySelective(ProdInOut record);
 
     int updateByPrimaryKeyWithBLOBs(ProdInOut record);

+ 4 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaleDetail.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.sale.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.document.dto.ProductDTO;
+import com.usoftchina.saas.document.entities.Product;
 import lombok.Data;
 
 import java.util.Date;
@@ -52,4 +54,6 @@ public class SaleDetail extends CommonBaseEntity{
     private String sd_text4;
 
     private String sd_text5;
+
+    private ProductDTO productDTO;
 }

+ 9 - 12
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java

@@ -8,7 +8,6 @@ import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
-import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.BillCodeSeq;
@@ -56,9 +55,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         //查询主表
         ProdInOut prodInOut = checkAndReturnOrder(id);
         //将prodInOut实体对象转化为传输对象
-        ProdInOutDTO main = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+        ProdInOutDTO main = BeanMapper.map(prodInOut, ProdInOutDTO.class);
         //查询从表
-
         List<ProdIODetail> prodIODetails = prodIODetailMapper.selectByFK(id);
         List<ProdIODetailDTO> items = BeanMapper.mapList(prodIODetails,ProdIODetailDTO.class);
         prodInOutFormDTO.setMain(main);
@@ -189,7 +187,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             }
             String res = singleAudit(formData.getMain());
             if(StringUtils.hasText(res)){
-                new BizException(501,res);
+                throw new BizException(501,res);
             }
         }
         baseDTO.setId(id);
@@ -204,10 +202,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("companyid",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.post(map);
-        Object result =  map.get("result");
-        System.out.println("result:"+result);
-        if(result!=null){
+        Result res = warehouseApi.post(map);
+        Object result =  res.getData();
+        if(!StringUtils.isEmpty(result)){
             return result.toString();
         }else{
             //记录日志
@@ -242,9 +239,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("companyid",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.unPost(map);
-        Object result =  map.get("result");
-        if(result!=null){
+        Result res = warehouseApi.unPost(map);
+        Object result =  res.getData();
+        if(!StringUtils.isEmpty(result)){
             return result.toString();
         }else{
             //更新状态为未审核
@@ -303,7 +300,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             error+=singleUnAudit(prodInOutDTO);
         }
         if(!StringUtils.isEmpty(error)){
-            new BizException(501,error);
+            throw new BizException(501,error);
         }
     }
 

+ 1 - 1
applications/sale/sale-server/src/main/resources/application.yml

@@ -47,7 +47,7 @@ eureka:
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
 server:
-  port: 8900
+  port: 8820
   tomcat:
     uri-encoding: UTF-8
 info:

+ 2 - 549
applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -41,7 +41,7 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-    <association property="product" javaType="com.usoftchina.saas.document.entities.Product">
+    <association property="productDTO" javaType="com.usoftchina.saas.document.entities.Product">
       <id column="pr_id" property="id"/>
       <result column="pr_code" property="pr_code"/>
       <result column="pr_detail" property="pr_detail"/>
@@ -143,34 +143,7 @@
   <sql id="Blob_Column_List">
     pd_remark
   </sql>
-  <select id="selectByExampleWithBLOBs" parameterType="com.usoftchina.saas.storage.po.ProdIODetailExample" resultMap="ResultMapWithBLOBs">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
-    from prodiodetail
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByExample" parameterType="com.usoftchina.saas.storage.po.ProdIODetailExample" resultMap="BaseResultMap">
-    select
-        *
-    from prodiodetail a left join product b on a.pd_prodid = b.pr_id and a.companyid = b.companyid
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
     select 
     <include refid="Base_Column_List" />
     ,
@@ -184,12 +157,6 @@
   <delete id="deleteByForeignKey" parameterType="java.lang.Long">
     delete from prodiodetail where pd_piid = #{pd_id}
   </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.storage.po.ProdIODetailExample">
-    delete from prodiodetail
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.storage.po.ProdIODetail">
     insert into prodiodetail (pd_id, pd_piid, pd_inoutno, 
       pd_piclass, pd_pdno, pd_ordercode, 
@@ -465,232 +432,6 @@
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.storage.po.ProdIODetailExample" resultType="java.lang.Long">
-    select count(*) from prodiodetail
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    update prodiodetail
-    <set>
-      <if test="record.pd_id != null">
-        pd_id = #{record.pd_id,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_piid != null">
-        pd_piid = #{record.pd_piid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_inoutno != null">
-        pd_inoutno = #{record.pd_inoutno,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_piclass != null">
-        pd_piclass = #{record.pd_piclass,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_pdno != null">
-        pd_pdno = #{record.pd_pdno,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_ordercode != null">
-        pd_ordercode = #{record.pd_ordercode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_orderdetno != null">
-        pd_orderdetno = #{record.pd_orderdetno,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_prodid != null">
-        pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_prodcode != null">
-        pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_unit != null">
-        pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_inqty != null">
-        pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_outqty != null">
-        pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_orderprice != null">
-        pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_sendprice != null">
-        pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_price != null">
-        pd_price = #{record.pd_price,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_total != null">
-        pd_total = #{record.pd_total,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_taxrate != null">
-        pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_netprice != null">
-        pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_nettotal != null">
-        pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_whid != null">
-        pd_whid = #{record.pd_whid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_whcode != null">
-        pd_whcode = #{record.pd_whcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_whname != null">
-        pd_whname = #{record.pd_whname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_inwhid != null">
-        pd_inwhid = #{record.pd_inwhid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_inwhcode != null">
-        pd_inwhcode = #{record.pd_inwhcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_inwhname != null">
-        pd_inwhname = #{record.pd_inwhname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_orderid != null">
-        pd_orderid = #{record.pd_orderid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_sdid != null">
-        pd_sdid = #{record.pd_sdid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_status != null">
-        pd_status = #{record.pd_status,jdbcType=INTEGER},
-      </if>
-      <if test="record.companyid != null">
-        companyid = #{record.companyid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterid != null">
-        updaterid = #{record.updaterid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updatetime != null">
-        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pd_text1 != null">
-        pd_text1 = #{record.pd_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_text2 != null">
-        pd_text2 = #{record.pd_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_text3 != null">
-        pd_text3 = #{record.pd_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_text4 != null">
-        pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_text5 != null">
-        pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_ym != null">
-        pd_ym = #{record.pd_ym,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_yqty != null">
-        pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_remark != null">
-        pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
-      </if>
-      <if test="record.pd_ioid != null">
-        pd_ioid = #{record.pd_ioid,jdbcType=INTEGER},
-      </if>
-
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExampleWithBLOBs" parameterType="map">
-    update prodiodetail
-    set pd_id = #{record.pd_id,jdbcType=INTEGER},
-      pd_piid = #{record.pd_piid,jdbcType=INTEGER},
-      pd_inoutno = #{record.pd_inoutno,jdbcType=VARCHAR},
-      pd_piclass = #{record.pd_piclass,jdbcType=VARCHAR},
-      pd_pdno = #{record.pd_pdno,jdbcType=INTEGER},
-      pd_ordercode = #{record.pd_ordercode,jdbcType=VARCHAR},
-      pd_orderdetno = #{record.pd_orderdetno,jdbcType=INTEGER},
-      pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
-      pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
-      pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
-      pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
-      pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
-      pd_price = #{record.pd_price,jdbcType=DOUBLE},
-      pd_total = #{record.pd_total,jdbcType=DOUBLE},
-      pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
-      pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
-      pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
-      pd_whid = #{record.pd_whid,jdbcType=INTEGER},
-      pd_whcode = #{record.pd_whcode,jdbcType=VARCHAR},
-      pd_whname = #{record.pd_whname,jdbcType=VARCHAR},
-      pd_inwhid = #{record.pd_inwhid,jdbcType=INTEGER},
-      pd_inwhcode = #{record.pd_inwhcode,jdbcType=VARCHAR},
-      pd_inwhname = #{record.pd_inwhname,jdbcType=VARCHAR},
-      pd_orderid = #{record.pd_orderid,jdbcType=INTEGER},
-      pd_sdid = #{record.pd_sdid,jdbcType=INTEGER},
-      pd_status = #{record.pd_status,jdbcType=INTEGER},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterid = #{record.updaterid,jdbcType=INTEGER},
-      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      pd_text1 = #{record.pd_text1,jdbcType=VARCHAR},
-      pd_text2 = #{record.pd_text2,jdbcType=VARCHAR},
-      pd_text3 = #{record.pd_text3,jdbcType=VARCHAR},
-      pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
-      pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
-      pd_ym = #{record.pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
-      pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
-      pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    update prodiodetail
-    set pd_id = #{record.pd_id,jdbcType=INTEGER},
-      pd_piid = #{record.pd_piid,jdbcType=INTEGER},
-      pd_inoutno = #{record.pd_inoutno,jdbcType=VARCHAR},
-      pd_piclass = #{record.pd_piclass,jdbcType=VARCHAR},
-      pd_pdno = #{record.pd_pdno,jdbcType=INTEGER},
-      pd_ordercode = #{record.pd_ordercode,jdbcType=VARCHAR},
-      pd_orderdetno = #{record.pd_orderdetno,jdbcType=INTEGER},
-      pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
-      pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
-      pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
-      pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
-      pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
-      pd_price = #{record.pd_price,jdbcType=DOUBLE},
-      pd_total = #{record.pd_total,jdbcType=DOUBLE},
-      pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
-      pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
-      pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
-      pd_whid = #{record.pd_whid,jdbcType=INTEGER},
-      pd_whcode = #{record.pd_whcode,jdbcType=VARCHAR},
-      pd_whname = #{record.pd_whname,jdbcType=VARCHAR},
-      pd_inwhid = #{record.pd_inwhid,jdbcType=INTEGER},
-      pd_inwhcode = #{record.pd_inwhcode,jdbcType=VARCHAR},
-      pd_inwhname = #{record.pd_inwhname,jdbcType=VARCHAR},
-      pd_orderid = #{record.pd_orderid,jdbcType=INTEGER},
-      pd_sdid = #{record.pd_sdid,jdbcType=INTEGER},
-      pd_status = #{record.pd_status,jdbcType=INTEGER},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterid = #{record.updaterid,jdbcType=INTEGER},
-      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      pd_text1 = #{record.pd_text1,jdbcType=VARCHAR},
-      pd_text2 = #{record.pd_text2,jdbcType=VARCHAR},
-      pd_text3 = #{record.pd_text3,jdbcType=VARCHAR},
-      pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
-      pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
-      pd_ym = #{record.pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
-      pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.po.ProdIODetail">
     update prodiodetail
     <set>
@@ -814,49 +555,6 @@
     </set>
     where pd_id = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.storage.po.ProdIODetail">
-    update prodiodetail
-    set pd_piid = #{pd_piid,jdbcType=INTEGER},
-      pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
-      pd_piclass = #{pd_piclass,jdbcType=VARCHAR},
-      pd_pdno = #{pd_pdno,jdbcType=INTEGER},
-      pd_ordercode = #{pd_ordercode,jdbcType=VARCHAR},
-      pd_orderdetno = #{pd_orderdetno,jdbcType=INTEGER},
-      pd_prodid = #{pd_prodid,jdbcType=INTEGER},
-      pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
-      pd_unit = #{pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{pd_outqty,jdbcType=INTEGER},
-      pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
-      pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
-      pd_price = #{pd_price,jdbcType=DOUBLE},
-      pd_total = #{pd_total,jdbcType=DOUBLE},
-      pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
-      pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
-      pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
-      pd_whid = #{pd_whid,jdbcType=INTEGER},
-      pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
-      pd_whname = #{pd_whname,jdbcType=VARCHAR},
-      pd_inwhid = #{pd_inwhid,jdbcType=INTEGER},
-      pd_inwhcode = #{pd_inwhcode,jdbcType=VARCHAR},
-      pd_inwhname = #{pd_inwhname,jdbcType=VARCHAR},
-      pd_orderid = #{pd_orderid,jdbcType=INTEGER},
-      pd_sdid = #{pd_sdid,jdbcType=INTEGER},
-      pd_status = #{pd_status,jdbcType=INTEGER},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
-      pd_text1 = #{pd_text1,jdbcType=VARCHAR},
-      pd_text2 = #{pd_text2,jdbcType=VARCHAR},
-      pd_text3 = #{pd_text3,jdbcType=VARCHAR},
-      pd_text4 = #{pd_text4,jdbcType=VARCHAR},
-      pd_text5 = #{pd_text5,jdbcType=VARCHAR},
-      pd_ym = #{pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{pd_yqty,jdbcType=INTEGER},
-      pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
-      pd_ioid = #{pd_ioid,jdbcType=INTEGER}
-    where pd_id = #{pd_id,jdbcType=INTEGER}
-  </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.storage.po.ProdIODetail">
     update prodiodetail
     set pd_piid = #{pd_piid,jdbcType=INTEGER},
@@ -927,251 +625,6 @@
     </foreach>
   </insert>
 
-  <insert id="batchInsert1" parameterType="java.util.List" >
-    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
-      insert into prodiodetail
-      <trim prefix="(" suffix=")" suffixOverrides=",">
-        <if test="item.pd_piid != null">
-          pd_piid,
-        </if>
-        <if test="item.pd_inoutno != null">
-          pd_inoutno,
-        </if>
-        <if test="item.pd_piclass != null">
-          pd_piclass,
-        </if>
-        <if test="item.pd_pdno != null">
-          pd_pdno,
-        </if>
-        <if test="item.pd_ordercode != null">
-          pd_ordercode,
-        </if>
-        <if test="item.pd_orderdetno != null">
-          pd_orderdetno,
-        </if>
-        <if test="item.pd_prodid != null">
-          pd_prodid,
-        </if>
-        <if test="item.pd_prodcode != null">
-          pd_prodcode,
-        </if>
-        <if test="item.pd_unit != null">
-          pd_unit,
-        </if>
-        <if test="item.pd_inqty != null">
-          pd_inqty,
-        </if>
-        <if test="item.pd_outqty != null">
-          pd_outqty,
-        </if>
-        <if test="item.pd_orderprice != null">
-          pd_orderprice,
-        </if>
-        <if test="item.pd_sendprice != null">
-          pd_sendprice,
-        </if>
-        <if test="item.pd_price != null">
-          pd_price,
-        </if>
-        <if test="item.pd_total != null">
-          pd_total,
-        </if>
-        <if test="item.pd_taxrate != null">
-          pd_taxrate,
-        </if>
-        <if test="item.pd_netprice != null">
-          pd_netprice,
-        </if>
-        <if test="item.pd_nettotal != null">
-          pd_nettotal,
-        </if>
-        <if test="item.pd_whid != null">
-          pd_whid,
-        </if>
-        <if test="item.pd_whcode != null">
-          pd_whcode,
-        </if>
-        <if test="item.pd_whname != null">
-          pd_whname,
-        </if>
-        <if test="item.pd_inwhid != null">
-          pd_inwhid,
-        </if>
-        <if test="item.pd_inwhcode != null">
-          pd_inwhcode,
-        </if>
-        <if test="item.pd_inwhname != null">
-          pd_inwhname,
-        </if>
-        <if test="item.pd_orderid != null">
-          pd_orderid,
-        </if>
-        <if test="item.pd_sdid != null">
-          pd_sdid,
-        </if>
-        <if test="item.pd_status != null">
-          pd_status,
-        </if>
-        <if test="item.companyId != null">
-          companyid,
-        </if>
-        <if test="item.updaterId != null">
-          updaterid,
-        </if>
-        <if test="item.updateTime != null">
-          updatetime,
-        </if>
-        <if test="item.pd_text1 != null">
-          pd_text1,
-        </if>
-        <if test="item.pd_text2 != null">
-          pd_text2,
-        </if>
-        <if test="item.pd_text3 != null">
-          pd_text3,
-        </if>
-        <if test="item.pd_text4 != null">
-          pd_text4,
-        </if>
-        <if test="item.pd_text5 != null">
-          pd_text5,
-        </if>
-        <if test="item.pd_ym != null">
-          pd_ym,
-        </if>
-        <if test="item.pd_yqty != null">
-          pd_yqty,
-        </if>
-        <if test="item.pd_remark != null">
-          pd_remark,
-        </if>
-        <if test="item.pd_ioid != null">
-          pd_ioid,
-        </if>
-      </trim>
-      <trim prefix="values (" suffix=")" suffixOverrides=",">
-        <if test="item.pd_piid != null">
-          #{item.pd_piid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_inoutno != null">
-          #{item.pd_inoutno,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_piclass != null">
-          #{item.pd_piclass,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_pdno != null">
-          #{item.pd_pdno,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_ordercode != null">
-          #{item.pd_ordercode,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_orderdetno != null">
-          #{item.pd_orderdetno,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_prodid != null">
-          #{item.pd_prodid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_prodcode != null">
-          #{item.pd_prodcode,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_unit != null">
-          #{item.pd_unit,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_inqty != null">
-          #{item.pd_inqty,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_outqty != null">
-          #{item.pd_outqty,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_orderprice != null">
-          #{item.pd_orderprice,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_sendprice != null">
-          #{item.pd_sendprice,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_price != null">
-          #{item.pd_price,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_total != null">
-          #{item.pd_total,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_taxrate != null">
-          #{item.pd_taxrate,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_netprice != null">
-          #{item.pd_netprice,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_nettotal != null">
-          #{item.pd_nettotal,jdbcType=DOUBLE},
-        </if>
-        <if test="item.pd_whid != null">
-          #{item.pd_whid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_whcode != null">
-          #{item.pd_whcode,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_whname != null">
-          #{item.pd_whname,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_inwhid != null">
-          #{item.pd_inwhid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_inwhcode != null">
-          #{item.pd_inwhcode,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_inwhname != null">
-          #{item.pd_inwhname,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_orderid != null">
-          #{item.pd_orderid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_sdid != null">
-          #{item.pd_sdid,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_status != null">
-          #{item.pd_status,jdbcType=INTEGER},
-        </if>
-        <if test="item.companyId != null">
-          #{item.companyId,jdbcType=INTEGER},
-        </if>
-        <if test="item.updaterId != null">
-          #{item.updaterId,jdbcType=INTEGER},
-        </if>
-        <if test="item.updateTime != null">
-          #{item.updateTime,jdbcType=TIMESTAMP},
-        </if>
-        <if test="item.pd_text1 != null">
-          #{item.pd_text1,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_text2 != null">
-          #{item.pd_text2,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_text3 != null">
-          #{item.pd_text3,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_text4 != null">
-          #{item.pd_text4,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_text5 != null">
-          #{item.pd_text5,jdbcType=VARCHAR},
-        </if>
-        <if test="item.pd_ym != null">
-          #{item.pd_ym,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_yqty != null">
-          #{item.pd_yqty,jdbcType=INTEGER},
-        </if>
-        <if test="item.pd_remark != null">
-          #{item.pd_remark,jdbcType=LONGVARCHAR},
-        </if>
-        <if test="item.pd_ioid != null">
-          #{item.pd_ioid,jdbcType=INTEGER},
-        </if>
-      </trim>
-
-    </foreach>
-  </insert>
-
   <update id="batchUpdate" parameterType="com.usoftchina.saas.storage.po.ProdIODetail" >
     <foreach collection="list" item="item" index="index" open="" close="" separator=";">
       update prodiodetail <set>

+ 1 - 221
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -34,8 +34,6 @@
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
-
-
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
@@ -107,37 +105,7 @@
   <sql id="Blob_Column_List">
     pi_address
   </sql>
-  <select id="selectByExampleWithBLOBs" parameterType="com.usoftchina.saas.storage.po.ProdInOutExample" resultMap="ResultMapWithBLOBs">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
-    from prodinout
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByExample" parameterType="com.usoftchina.saas.storage.po.ProdInOutExample" resultMap="BaseResultMap">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from prodinout
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
     select 
     <include refid="Base_Column_List" />
     ,
@@ -149,12 +117,6 @@
     delete from prodinout
     where pi_id = #{pi_id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.storage.po.ProdInOutExample">
-    delete from prodinout
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.storage.po.ProdInOut">
     insert into prodinout (pi_id, pi_inoutno, pi_class, 
       pi_date, pi_vendid, pi_vendcode, 
@@ -371,188 +333,6 @@
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.storage.po.ProdInOutExample" resultType="java.lang.Long">
-    select count(*) from prodinout
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    update prodinout
-    <set>
-      <if test="record.pi_id != null">
-        pi_id = #{record.pi_id,jdbcType=INTEGER},
-      </if>
-      <if test="record.pi_inoutno != null">
-        pi_inoutno = #{record.pi_inoutno,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_class != null">
-        pi_class = #{record.pi_class,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_date != null">
-        pi_date = #{record.pi_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pi_vendid != null">
-        pi_vendid = #{record.pi_vendid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pi_vendcode != null">
-        pi_vendcode = #{record.pi_vendcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_vendname != null">
-        pi_vendname = #{record.pi_vendname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_custid != null">
-        pi_custid = #{record.pi_custid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pi_custcode != null">
-        pi_custcode = #{record.pi_custcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_custname != null">
-        pi_custname = #{record.pi_custname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_puid != null">
-        pi_puid = #{record.pi_puid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pi_pucode != null">
-        pi_pucode = #{record.pi_pucode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_said != null">
-        pi_said = #{record.pi_said},
-      </if>
-      <if test="record.pi_sacode != null">
-        pi_sacode = #{record.pi_sacode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_total != null">
-        pi_total = #{record.pi_total,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pi_recordmanid != null">
-        pi_recordmanid = #{record.pi_recordmanid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pi_recordman != null">
-        pi_recordman = #{record.pi_recordman,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_recorddate != null">
-        pi_recorddate = #{record.pi_recorddate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pi_status != null">
-        pi_status = #{record.pi_status,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_statuscode != null">
-        pi_statuscode = #{record.pi_statuscode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_printstatus != null">
-        pi_printstatus = #{record.pi_printstatus,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_printstatuscode != null">
-        pi_printstatuscode = #{record.pi_printstatuscode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.companyid != null">
-        companyid = #{record.companyid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterid != null">
-        updaterid = #{record.updaterid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updatetime != null">
-        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pi_text1 != null">
-        pi_text1 = #{record.pi_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_text2 != null">
-        pi_text2 = #{record.pi_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_text3 != null">
-        pi_text3 = #{record.pi_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_text4 != null">
-        pi_text4 = #{record.pi_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_text5 != null">
-        pi_text5 = #{record.pi_text5,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pi_address != null">
-        pi_address = #{record.pi_address,jdbcType=LONGVARCHAR},
-      </if>
-
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExampleWithBLOBs" parameterType="map">
-    update prodinout
-    set pi_id = #{record.pi_id,jdbcType=INTEGER},
-      pi_inoutno = #{record.pi_inoutno,jdbcType=VARCHAR},
-      pi_class = #{record.pi_class,jdbcType=VARCHAR},
-      pi_date = #{record.pi_date,jdbcType=TIMESTAMP},
-      pi_vendid = #{record.pi_vendid,jdbcType=INTEGER},
-      pi_vendcode = #{record.pi_vendcode,jdbcType=VARCHAR},
-      pi_vendname = #{record.pi_vendname,jdbcType=VARCHAR},
-      pi_custid = #{record.pi_custid,jdbcType=INTEGER},
-      pi_custcode = #{record.pi_custcode,jdbcType=VARCHAR},
-      pi_custname = #{record.pi_custname,jdbcType=VARCHAR},
-      pi_puid = #{record.pi_puid,jdbcType=INTEGER},
-      pi_pucode = #{record.pi_pucode,jdbcType=VARCHAR},
-      pi_said = #{record.pi_said},
-      pi_sacode = #{record.pi_sacode,jdbcType=VARCHAR},
-      pi_total = #{record.pi_total,jdbcType=DOUBLE},
-      pi_recordmanid = #{record.pi_recordmanid,jdbcType=INTEGER},
-      pi_recordman = #{record.pi_recordman,jdbcType=VARCHAR},
-      pi_recorddate = #{record.pi_recorddate,jdbcType=TIMESTAMP},
-      pi_status = #{record.pi_status,jdbcType=VARCHAR},
-      pi_statuscode = #{record.pi_statuscode,jdbcType=VARCHAR},
-      pi_printstatus = #{record.pi_printstatus,jdbcType=VARCHAR},
-      pi_printstatuscode = #{record.pi_printstatuscode,jdbcType=VARCHAR},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterid = #{record.updaterid,jdbcType=INTEGER},
-      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      pi_text1 = #{record.pi_text1,jdbcType=VARCHAR},
-      pi_text2 = #{record.pi_text2,jdbcType=VARCHAR},
-      pi_text3 = #{record.pi_text3,jdbcType=VARCHAR},
-      pi_text4 = #{record.pi_text4,jdbcType=VARCHAR},
-      pi_text5 = #{record.pi_text5,jdbcType=VARCHAR},
-      pi_address = #{record.pi_address,jdbcType=LONGVARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    update prodinout
-    set pi_id = #{record.pi_id,jdbcType=INTEGER},
-      pi_inoutno = #{record.pi_inoutno,jdbcType=VARCHAR},
-      pi_class = #{record.pi_class,jdbcType=VARCHAR},
-      pi_date = #{record.pi_date,jdbcType=TIMESTAMP},
-      pi_vendid = #{record.pi_vendid,jdbcType=INTEGER},
-      pi_vendcode = #{record.pi_vendcode,jdbcType=VARCHAR},
-      pi_vendname = #{record.pi_vendname,jdbcType=VARCHAR},
-      pi_custid = #{record.pi_custid,jdbcType=INTEGER},
-      pi_custcode = #{record.pi_custcode,jdbcType=VARCHAR},
-      pi_custname = #{record.pi_custname,jdbcType=VARCHAR},
-      pi_puid = #{record.pi_puid,jdbcType=INTEGER},
-      pi_pucode = #{record.pi_pucode,jdbcType=VARCHAR},
-      pi_said = #{record.pi_said},
-      pi_sacode = #{record.pi_sacode,jdbcType=VARCHAR},
-      pi_total = #{record.pi_total,jdbcType=DOUBLE},
-      pi_recordmanid = #{record.pi_recordmanid,jdbcType=INTEGER},
-      pi_recordman = #{record.pi_recordman,jdbcType=VARCHAR},
-      pi_recorddate = #{record.pi_recorddate,jdbcType=TIMESTAMP},
-      pi_status = #{record.pi_status,jdbcType=VARCHAR},
-      pi_statuscode = #{record.pi_statuscode,jdbcType=VARCHAR},
-      pi_printstatus = #{record.pi_printstatus,jdbcType=VARCHAR},
-      pi_printstatuscode = #{record.pi_printstatuscode,jdbcType=VARCHAR},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterid = #{record.updaterid,jdbcType=INTEGER},
-      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      pi_text1 = #{record.pi_text1,jdbcType=VARCHAR},
-      pi_text2 = #{record.pi_text2,jdbcType=VARCHAR},
-      pi_text3 = #{record.pi_text3,jdbcType=VARCHAR},
-      pi_text4 = #{record.pi_text4,jdbcType=VARCHAR},
-      pi_text5 = #{record.pi_text5,jdbcType=VARCHAR}
-
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.po.ProdInOut">
     update prodinout
     <set>

+ 1 - 1
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -372,7 +372,7 @@
   </update>
 
   <update id="updateNetTotal" parameterType="long">
-    update saledetail a set sd_nettotal=round(ifnull(sd_netprice,0)*nvl(sd_qty,0),2)
+    update saledetail a set sd_nettotal=round(ifnull(sd_netprice,0)*ifnull(sd_qty,0),2)
     where sd_said=#{id}
   </update>
 </mapper>

+ 31 - 1
applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml

@@ -25,6 +25,36 @@
     <result column="sd_text3" property="sd_text3" jdbcType="VARCHAR" />
     <result column="sd_text4" property="sd_text4" jdbcType="VARCHAR" />
     <result column="sd_text5" property="sd_text5" jdbcType="VARCHAR" />
+    <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
+      <id column="pr_id" property="id"/>
+      <result column="pr_code" property="pr_code"/>
+      <result column="pr_detail" property="pr_detail"/>
+      <result column="pr_spec" property="pr_spec"/>
+      <result column="pr_unit" property="pr_unit"/>
+      <result column="pr_kind" property="pr_kind"/>
+      <result column="pr_orispeccode" property="pr_orispeccode"/>
+      <result column="pr_whid" property="pr_whid"/>
+      <result column="pr_whcode" property="pr_whcode"/>
+      <result column="pr_whname" property="pr_whname"/>
+      <result column="pr_zxbzs" property="pr_zxbzs"/>
+      <result column="pr_leadtime" property="pr_leadtime"/>
+      <result column="pr_brand" property="pr_brand"/>
+      <result column="pr_standardprice" property="pr_standardprice"/>
+      <result column="pr_purcprice" property="pr_purcprice"/>
+      <result column="pr_saleprice" property="pr_saleprice"/>
+      <result column="pr_vendid" property="pr_vendid"/>
+      <result column="pr_vendname" property="pr_vendname"/>
+      <result column="pr_vendcode" property="pr_vendcode"/>
+      <result column="pr_docdate" property="pr_docdate"/>
+      <result column="pr_recordmanid" property="pr_recordmanid"/>
+      <result column="pr_recordman" property="pr_recordman"/>
+      <result column="pr_status" property="pr_status"/>
+      <result column="pr_statuscode" property="pr_statuscode"/>
+      <result column="pr_text1" property="pr_text1"/>
+      <result column="pr_text2" property="pr_text2"/>
+      <result column="pr_text3" property="pr_text3"/>
+      <result column="pr_text4" property="pr_text4"/>
+    </association>
   </resultMap>
   <sql id="Base_Column_List" >
     sd_id, sd_said, sd_detno, sd_prodid, sd_prodcode, sd_qty, sd_price, sd_total, sd_taxrate, 
@@ -336,7 +366,7 @@
   </delete>
 
   <select id="selectByFK" parameterType="long" resultMap="BaseResultMap">
-    select * from saledetail
+    select * from saledetail a left join product b on a.companyid=b.companyid and a.sd_prodid=b.pr_id
     where sd_said=#{id} order by sd_detno
   </select>
 </mapper>

+ 35 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/MakeListDTO.java

@@ -0,0 +1,35 @@
+package com.usoftchina.saas.storage.dto;
+
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
+import com.usoftchina.saas.storage.po.Make;
+import com.usoftchina.saas.storage.po.MakeMaterial;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 制造单主从表传输对象
+ * @author chenwei
+ * @date 2018/10/29
+ */
+public class MakeListDTO extends CommonBaseDTO implements Serializable {
+
+    private Make main;
+    private List<MakeMaterial> items;
+
+    public Make getMain() {
+        return main;
+    }
+
+    public void setMain(Make main) {
+        this.main = main;
+    }
+
+    public List<MakeMaterial> getItems() {
+        return items;
+    }
+
+    public void setItems(List<MakeMaterial> items) {
+        this.items = items;
+    }
+}

+ 2 - 2
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.storage.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import lombok.Data;
 
@@ -11,7 +11,7 @@ import java.io.Serializable;
  * 2018-10-17 13:45.
  */
 @Data
-public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
+public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Long pd_piid;
 

+ 5 - 2
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.storage.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import io.swagger.annotations.ApiModel;
 import lombok.Data;
 
@@ -13,7 +13,7 @@ import java.util.Date;
  */
 @Data
 @ApiModel(value = "Prodinout", description = "出入库单")
-public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
+public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_inoutno;
 
@@ -69,6 +69,9 @@ public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private Date pi_auditman;
 
 
 }

+ 5 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutListDTO.java

@@ -67,6 +67,11 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private Date pi_auditman;
+
+
     private Long pd_piid;
 
     private String pd_inoutno;

+ 238 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/Make.java

@@ -0,0 +1,238 @@
+package com.usoftchina.saas.storage.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Make extends CommonBaseEntity implements Serializable {
+    private String ma_code;
+
+    private String ma_status;
+
+    private String ma_statuscode;
+
+    private String ma_type;
+
+    private Integer ma_prodid;
+
+    private String ma_prodcode;
+
+    private String ma_proddetail;
+
+    private String ma_prodspec;
+
+    private String ma_version;
+
+    private String ma_produnit;
+
+    private Double ma_qty;
+
+    private Integer ma_whid;
+
+    private String ma_whcode;
+
+    private Date ma_recorddate;
+
+    private Integer ma_recordid;
+
+    private String ma_recorder;
+
+    private Double ma_price;
+
+    private Double ma_total;
+
+    private String ma_text1;
+
+    private String ma_text2;
+
+    private String ma_text3;
+
+    private String ma_text4;
+
+    private String ma_text5;
+
+    public String getMa_code() {
+        return ma_code;
+    }
+
+    public void setMa_code(String ma_code) {
+        this.ma_code = ma_code == null ? null : ma_code.trim();
+    }
+
+    public String getMa_status() {
+        return ma_status;
+    }
+
+    public void setMa_status(String ma_status) {
+        this.ma_status = ma_status == null ? null : ma_status.trim();
+    }
+
+    public String getMa_statuscode() {
+        return ma_statuscode;
+    }
+
+    public void setMa_statuscode(String ma_statuscode) {
+        this.ma_statuscode = ma_statuscode == null ? null : ma_statuscode.trim();
+    }
+
+    public String getMa_type() {
+        return ma_type;
+    }
+
+    public void setMa_type(String ma_type) {
+        this.ma_type = ma_type == null ? null : ma_type.trim();
+    }
+
+    public Integer getMa_prodid() {
+        return ma_prodid;
+    }
+
+    public void setMa_prodid(Integer ma_prodid) {
+        this.ma_prodid = ma_prodid;
+    }
+
+    public String getMa_prodcode() {
+        return ma_prodcode;
+    }
+
+    public void setMa_prodcode(String ma_prodcode) {
+        this.ma_prodcode = ma_prodcode == null ? null : ma_prodcode.trim();
+    }
+
+    public String getMa_proddetail() {
+        return ma_proddetail;
+    }
+
+    public void setMa_proddetail(String ma_proddetail) {
+        this.ma_proddetail = ma_proddetail == null ? null : ma_proddetail.trim();
+    }
+
+    public String getMa_prodspec() {
+        return ma_prodspec;
+    }
+
+    public void setMa_prodspec(String ma_prodspec) {
+        this.ma_prodspec = ma_prodspec == null ? null : ma_prodspec.trim();
+    }
+
+    public String getMa_version() {
+        return ma_version;
+    }
+
+    public void setMa_version(String ma_version) {
+        this.ma_version = ma_version == null ? null : ma_version.trim();
+    }
+
+    public String getMa_produnit() {
+        return ma_produnit;
+    }
+
+    public void setMa_produnit(String ma_produnit) {
+        this.ma_produnit = ma_produnit == null ? null : ma_produnit.trim();
+    }
+
+    public Double getMa_qty() {
+        return ma_qty;
+    }
+
+    public void setMa_qty(Double ma_qty) {
+        this.ma_qty = ma_qty;
+    }
+
+    public Integer getMa_whid() {
+        return ma_whid;
+    }
+
+    public void setMa_whid(Integer ma_whid) {
+        this.ma_whid = ma_whid;
+    }
+
+    public String getMa_whcode() {
+        return ma_whcode;
+    }
+
+    public void setMa_whcode(String ma_whcode) {
+        this.ma_whcode = ma_whcode == null ? null : ma_whcode.trim();
+    }
+
+    public Date getMa_recorddate() {
+        return ma_recorddate;
+    }
+
+    public void setMa_recorddate(Date ma_recorddate) {
+        this.ma_recorddate = ma_recorddate;
+    }
+
+    public Integer getMa_recordid() {
+        return ma_recordid;
+    }
+
+    public void setMa_recordid(Integer ma_recordid) {
+        this.ma_recordid = ma_recordid;
+    }
+
+    public String getMa_recorder() {
+        return ma_recorder;
+    }
+
+    public void setMa_recorder(String ma_recorder) {
+        this.ma_recorder = ma_recorder == null ? null : ma_recorder.trim();
+    }
+
+    public Double getMa_price() {
+        return ma_price;
+    }
+
+    public void setMa_price(Double ma_price) {
+        this.ma_price = ma_price;
+    }
+
+    public Double getMa_total() {
+        return ma_total;
+    }
+
+    public void setMa_total(Double ma_total) {
+        this.ma_total = ma_total;
+    }
+
+    public String getMa_text1() {
+        return ma_text1;
+    }
+
+    public void setMa_text1(String ma_text1) {
+        this.ma_text1 = ma_text1 == null ? null : ma_text1.trim();
+    }
+
+    public String getMa_text2() {
+        return ma_text2;
+    }
+
+    public void setMa_text2(String ma_text2) {
+        this.ma_text2 = ma_text2 == null ? null : ma_text2.trim();
+    }
+
+    public String getMa_text3() {
+        return ma_text3;
+    }
+
+    public void setMa_text3(String ma_text3) {
+        this.ma_text3 = ma_text3 == null ? null : ma_text3.trim();
+    }
+
+    public String getMa_text4() {
+        return ma_text4;
+    }
+
+    public void setMa_text4(String ma_text4) {
+        this.ma_text4 = ma_text4 == null ? null : ma_text4.trim();
+    }
+
+    public String getMa_text5() {
+        return ma_text5;
+    }
+
+    public void setMa_text5(String ma_text5) {
+        this.ma_text5 = ma_text5 == null ? null : ma_text5.trim();
+    }
+}

+ 141 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/MakeMaterial.java

@@ -0,0 +1,141 @@
+package com.usoftchina.saas.storage.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 制造单明细
+ * @author chenwei
+ * @date 2018/10/29
+ */
+public class MakeMaterial extends CommonBaseEntity implements Serializable {
+    private Long mm_maid;
+
+    private Integer mm_detno;
+
+    private Integer mm_prodid;
+
+    private String mm_prodcode;
+
+    private Integer mm_whid;
+
+    private String mm_whcode;
+
+    private Double mm_price;
+
+    private Double mm_oneuseqty;
+
+    private Double mm_qty;
+
+    private Double mm_amount;
+
+    private String mm_repprodcode;
+
+    private String mm_remark;
+
+    public Long getMm_maid() {
+        return mm_maid;
+    }
+
+    public void setMm_maid(Long mm_maid) {
+        this.mm_maid = mm_maid;
+    }
+
+    public Integer getMm_detno() {
+        return mm_detno;
+    }
+
+    public void setMm_detno(Integer mm_detno) {
+        this.mm_detno = mm_detno;
+    }
+
+    public Integer getMm_prodid() {
+        return mm_prodid;
+    }
+
+    public void setMm_prodid(Integer mm_prodid) {
+        this.mm_prodid = mm_prodid;
+    }
+
+    public String getMm_prodcode() {
+        return mm_prodcode;
+    }
+
+    public void setMm_prodcode(String mm_prodcode) {
+        this.mm_prodcode = mm_prodcode == null ? null : mm_prodcode.trim();
+    }
+
+    public Integer getMm_whid() {
+        return mm_whid;
+    }
+
+    public void setMm_whid(Integer mm_whid) {
+        this.mm_whid = mm_whid;
+    }
+
+    public String getMm_whcode() {
+        return mm_whcode;
+    }
+
+    public void setMm_whcode(String mm_whcode) {
+        this.mm_whcode = mm_whcode == null ? null : mm_whcode.trim();
+    }
+
+    public Double getMm_price() {
+        return mm_price;
+    }
+
+    public void setMm_price(Double mm_price) {
+        this.mm_price = mm_price;
+    }
+
+    public Double getMm_oneuseqty() {
+        return mm_oneuseqty;
+    }
+
+    public void setMm_oneuseqty(Double mm_oneuseqty) {
+        this.mm_oneuseqty = mm_oneuseqty;
+    }
+
+    public Double getMm_qty() {
+        return mm_qty;
+    }
+
+    public void setMm_qty(Double mm_qty) {
+        this.mm_qty = mm_qty;
+    }
+
+    public Double getMm_amount() {
+        return mm_amount;
+    }
+
+    public void setMm_amount(Double mm_amount) {
+        this.mm_amount = mm_amount;
+    }
+
+    public String getMm_repprodcode() {
+        return mm_repprodcode;
+    }
+
+    public void setMm_repprodcode(String mm_repprodcode) {
+        this.mm_repprodcode = mm_repprodcode == null ? null : mm_repprodcode.trim();
+    }
+
+    public String getMm_remark() {
+        return mm_remark;
+    }
+
+    public void setMm_remark(String mm_remark) {
+        this.mm_remark = mm_remark == null ? null : mm_remark.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 1 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java

@@ -57,7 +57,7 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private String pd_inwhname;
 
-    private Integer pd_orderid;
+    private Long pd_orderid;
 
     private Integer pd_sdid;
 

+ 8 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java

@@ -31,7 +31,7 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_pucode;
 
-    private Integer pi_said;
+    private Long pi_said;
 
     private String pi_sacode;
 
@@ -63,4 +63,11 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Double pi_nettotal;
+
+    private Date pi_auditdate;
+
+    private String pi_auditman;
+
+
 }

+ 6 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

@@ -138,4 +138,10 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Long pd_ioid;
 
+    private Date pi_auditdate;
+
+    private String pi_auditman;
+
+    private Double pi_nettotal;
+
 }

Some files were not shown because too many files changed in this diff