Преглед изворни кода

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss-server-mdm

changhaoning пре 1 година
родитељ
комит
cb8537f1d3

+ 4 - 4
src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.xml

@@ -97,6 +97,8 @@
         <result column="follow_staff_name" property="followStaffName"/>
         <result column="receivable_residue" property="receivableResidue"/>
         <result column="receipt_residue" property="receiptResidue"/>
+        <result column="receivable" property="receivable"/>
+        <result column="receipt" property="receipt"/>
         <result column="orderQuantity" property="orderQuantity"/>
         <result column="orderAmount" property="orderAmount"/>
 
@@ -298,12 +300,10 @@
         (SELECT sum(tpob.out_amt) FROM dkic_b.t_psi_outbound tpob WHERE tpob.cus_id = tmc.cus_id AND tpob.cp_id =
         tmc.cp_id AND tpob.flg_valid AND tpob.out_type = '出库类型-销退回库') AS
         "outboundReturnAmount",
-
+        tma.receipt,
+        tma.receivable,
         tma.receivable_residue,
         tma.receipt_residue
-
-
-
         FROM dkic_b.t_mst_customer tmc
         LEFT JOIN dkic_b.t_mst_dictionary_data tmd on tmd.data_id = tmc.cus_from
         LEFT JOIN dkic_b.t_mst_sale_channel tmsc on tmsc.channel_id = tmc.channel_id

+ 11 - 0
src/main/java/com/dk/mdm/mapper/report/ReportMapper.xml

@@ -912,17 +912,22 @@
         ,makestaff.staff_name as "makeStaffName"
         ,tmgs.sku_name as "skuName"
         ,tmgs.sku_model as "skuModel"
+        ,tmgs.sku_spec as "skuSpec"
         ,tpi.non_std_code as "nonStdCode"
         ,tmgb.short_name as "shortName"
         ,tmgc.cat_name as "catName"
         ,series.series_name as "whName"
         ,tmw.wh_name as "seriesName"
         ,tpoi.outing_qty as "outingQty"
+        ,concat(tpoi.outing_qty,tmgu.unit_name)  as "outingQtyPiece"
         ,tpoi.outing_amt as "outingAmt"
+        ,concat(tpoi.out_qty,tmgu.unit_name)   as "outQtyPiece"
         ,tpoi.out_qty as "outQty"
         ,tpoi.out_amt as "outAmt"
         ,tpoi.return_qty as "returnQty"
         ,tpoi.return_amt as "returnAmt"
+        ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.outing_box,tpoi.outing_piece) as "outingBoxPiece"
+        ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.out_box,tpoi.out_piece) as "outBoxPiece"
         FROM dkic_b.t_psi_outbound as t
         left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
         Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.sup_id
@@ -939,6 +944,8 @@
         left join dkic_b.t_mst_goods_series as series on series.series_id = tmgs.series_id
         left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = tpoi.inv_id
         left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = tpi.wh_id
+        left join dkic_b.t_mst_unit as tmgu on tmgs.unit_id = tmgu.unit_id
+        left join dkic_b.t_mst_unit as tmgus on tmgs.sub_unit_id = tmgus.unit_id
         <include refid="Condition_OutboundDetailReport"/>
         order by tpoi.op_create_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
@@ -1065,6 +1072,8 @@
         ,tpoi.into_amt as "intoAmt"
         ,tpoi.return_qty as "returnQty"
         ,tpoi.return_amt as "returnAmt"
+        ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.intoing_box,tpoi.intoing_piece) as "intoingBoxPiece"
+        ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.into_box,tpoi.into_piece) as "intoBoxPiece"
         FROM dkic_b.t_psi_inbound as t
         left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
         Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.sup_id
@@ -1080,6 +1089,8 @@
         left join dkic_b.t_mst_goods_category as tmgc on tmgc.cat_id = tmgs.category_id
         left join dkic_b.t_mst_goods_series as series on series.series_id = tmgs.series_id
         left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = tpoi.inv_id
+        left join dkic_b.t_mst_unit as tmgu on tmgs.unit_id = tmgu.unit_id
+        left join dkic_b.t_mst_unit as tmgus on tmgs.sub_unit_id = tmgus.unit_id
         <include refid="Condition_IntoboundDetailReport"/>
         order by tpoi.op_create_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">

+ 6 - 0
src/main/java/com/dk/mdm/model/response/mst/CustomerResponse.java

@@ -312,6 +312,12 @@ public class CustomerResponse extends PageInfo<CustomerResponse> implements Seri
     @ApiModelProperty(value = "总收款金额-总应收收款金额+总应收优惠金额(现金池)")
     private BigDecimal receiptResidue;
 
+    @ApiModelProperty(value = "总收款金额")
+    private BigDecimal receipt;
+
+    @ApiModelProperty(value = "总应收账款")
+    private BigDecimal receivable;
+
     @ApiModelProperty(value = "订单数量")
     private BigDecimal orderQuantity;
 

+ 2 - 2
src/main/java/com/dk/mdm/service/mst/StaffService.java

@@ -174,7 +174,7 @@ public class StaffService extends BaseService<Staff> {
             return ResponseResultUtil.error(ResponseCodeEnum.ERROR_STAFF_CODE_EXIST);
         }
         //可以绑定微信的员工人数  人数上限
-        if (staffVO.getFlgCanLogin()) {
+        if (staffVO.getFlgCanLogin()!=null && staffVO.getFlgCanLogin()) {
             ResponseResultVO<?> resultMaxnum = companyFeign.getCompanyMaxStaffNum(cpId);
             if (resultMaxnum.getCode() != ResponseCodeEnum.SUCCESS.getCode()) {
                 // 无用户
@@ -556,7 +556,7 @@ public class StaffService extends BaseService<Staff> {
         super.updateByUuid(staff);
 
         //可以绑定微信的员工人数  人数上限
-        if (staffVO.getFlgCanLogin()) {
+        if (staffVO.getFlgCanLogin()!=null && staffVO.getFlgCanLogin()) {
             ResponseResultVO<?> resultMaxnum = companyFeign.getCompanyMaxStaffNum(cpId);
             if (resultMaxnum.getCode() != ResponseCodeEnum.SUCCESS.getCode()) {
                 // 无用户