Browse Source

销售出货单BUG修改

guq 7 years ago
parent
commit
7322d8cceb

+ 1 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/MaxnumberServiceImpl.java

@@ -222,8 +222,8 @@ public class MaxnumberServiceImpl extends CommonBaseServiceImpl<MaxnumbersMapper
     */
     private String getRulecode(Maxnumbers maxnumbers) {
         String rulecode = maxnumbers.getMn_leadcode();
-        Integer length = maxnumbers.getMn_number();
         String mn_rule = maxnumbers.getMn_rule();
+        mn_rule = mn_rule == null ? "" : mn_rule.toUpperCase();
         String date = "YYYYMM".equals(mn_rule) ? DateUtils.format(new Date(), "yyyyMM") :
                 DateUtils.format(new Date(), "yyyyMMdd");
         return rulecode += date;

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

@@ -6,8 +6,9 @@ import lombok.Data;
 import java.io.Serializable;
 import java.util.Date;
 @Data
-public class ProductDTO extends CommonBaseDTO implements Serializable {
+public class ProductDTO implements Serializable {
 
+    private Long pr_id;
     private String pr_code;
     private String pr_detail;
     private String pr_spec;

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

@@ -47,7 +47,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 server:
   port: 9480
   tomcat:

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

@@ -42,7 +42,7 @@
     <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
     <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
-      <id column="pr_id" property="id"/>
+      <id column="pr_id" property="pr_id"/>
       <result column="pr_code" property="pr_code"/>
       <result column="pr_detail" property="pr_detail"/>
       <result column="pr_spec" property="pr_spec"/>
@@ -763,16 +763,16 @@ where a.pd_id in (select pd_ioid from prodiodetail where pd_piid=#{id} and pd_pi
 
   <update id="updatePDSaleIN" parameterType="long">
    update prodiodetail set
-   pd_total=IFNULL(pd_inqty,0)*IFNULL(pd_sendprice,0),
-   pd_netprice = IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),
-   pd_nettotal = (IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_inqty,0)
+   pd_total=round(IFNULL(pd_inqty,0)*IFNULL(pd_sendprice,0),2),
+   pd_netprice = round(IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),2),
+   pd_nettotal = round((IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_inqty,0),2)
    where pd_piid=#{id}
   </update>
   <update id="updatePDSaleOut" parameterType="long">
     update prodiodetail set
-    pd_total=IFNULL(pd_outqty,0)*IFNULL(pd_sendprice,0),
-    pd_netprice = IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),
-    pd_nettotal = (IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_outqty,0)
+    pd_total=round(IFNULL(pd_outqty,0)*IFNULL(pd_sendprice,0),2),
+    pd_netprice = round(IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),0),
+    pd_nettotal = round((IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_outqty,0),0)
     where pd_piid=#{id}
   </update>
 </mapper>