Explorar o código

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

changhaoning hai 1 ano
pai
achega
ecd17e8b19

+ 12 - 1
src/main/java/com/dk/mdm/controller/mst/PrintLayoutController.java

@@ -12,6 +12,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import io.swagger.annotations.Api;
 import com.dk.mdm.service.mst.PrintLayoutService;
 
+import java.util.Map;
+
 @Api(tags = "打印模版API接口")
 @RestController
 @RequestMapping("/mst/printLayout")
@@ -27,7 +29,6 @@ public class PrintLayoutController{
     @Autowired
     private CommonService commonService;
 
-
     /**
      * @desc   : 条件查询
      * @author : 张潇木
@@ -92,4 +93,14 @@ public class PrintLayoutController{
     public ResponseResultVO<Boolean> enable(@PathVariable String id) {
         return this.getService().enable(id);
     }
+
+    /**
+     * @desc : 查询打印数据
+     * @author : 周兴
+     * @date : 2024/4/22 15:28
+     */
+    @PostMapping("get_print_data")
+    public ResponseResultVO<?> getPrintData(@RequestBody Map<String, Object> param) {
+        return printLayoutService.getPrintData(param);
+    }
 }

+ 8 - 0
src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.xml

@@ -241,6 +241,9 @@
             <if test="staffName != null and staffName != ''">
                 AND tms.staff_name LIKE concat('%',my_ex.likequery(#{staffName}),'%')
             </if>
+            <if test="whName != null and whName != ''">
+                AND tmw.wh_name LIKE concat('%',my_ex.likequery(#{whName}),'%')
+            </if>
             <if test="staffId != null and staffId != ''">
                 AND tpi.staff_id = #{staffId}::uuid
             </if>
@@ -253,6 +256,7 @@
             <if test="makeStaff != null and makeStaff != ''">
                 AND tpi.make_staff = #{makeStaff}
             </if>
+
             <if test="makeTime != null">
                 AND tpi.make_time = #{makeTime}
             </if>
@@ -277,6 +281,10 @@
             <if test="staffIdList != null and staffIdList.size() > 0">
                 AND tms.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
             </if>
+            <if test="intoDateStart != null and intoDateEnd != null">
+                AND tpi.into_date &gt;= #{intoDateStart}::timestamp with time zone
+                AND tpi.into_date &lt; #{intoDateEnd}::timestamp with time zone + interval '1 day'
+            </if>
             <if test="makeTimeStart != null and makeTimeEnd != null">
                 AND tpi.make_time &gt;= #{makeTimeStart}::timestamp with time zone
                 AND tpi.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'

+ 8 - 1
src/main/java/com/dk/mdm/mapper/mst/PrintLayoutMapper.java

@@ -4,11 +4,18 @@ import com.dk.mdm.model.pojo.mst.PrintLayout;
 import com.dk.common.mapper.BaseMapper;
 import org.springframework.stereotype.Repository;
 
+import java.util.Map;
+
 /**
 *  打印模版 Mapper
 */
 @Repository
 public interface PrintLayoutMapper extends BaseMapper<PrintLayout>{
-	
+    /**
+     * @desc : 获取打印数据
+     * @author : 周兴
+     * @date : 2024-4-22 15:47
+     */
+    Map<String, Object> getPrintData(Map param);
 }
 

+ 7 - 0
src/main/java/com/dk/mdm/mapper/mst/PrintLayoutMapper.xml

@@ -111,6 +111,13 @@
         for update
     </select>
 
+    <!--获取打印数据-->
+    <select id="getPrintData" resultType="java.util.Map">
+        SELECT *
+        FROM
+            dkic_b.f_get_print_data(#{dataId} ::uuid, #{objectCode}, #{i18n})
+    </select>
+
     <insert id="insertBatch">
         insert into dkic_b.t_mst_print_layout
         (

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

@@ -1050,6 +1050,10 @@
             ,tpo.make_time AS "makeTime"
             ,tms.staff_name as "staffName"
             ,tmo.org_name   as "orgName"
+            ,tmrp.sum_amt_rec AS "sumAmtRec"
+            ,tmrp.sum_should_handle AS "sumShouldHandle"
+            ,tmrp.sum_use_payment_residue  AS "sumUsePaymentResidue"
+            ,tmrp.sum_waive_amt AS "sumWaiveAmt"
         FROM
             dkic_b.t_psi_order tpo
         left join dkic_b.t_mst_customer tmc on tpo.cus_id = tmc.cus_id
@@ -1058,6 +1062,7 @@
         left join sys.t_data_kind as tdk3 on tpo.out_status = tdk3.kind_code
         left join dkic_b.t_mst_staff tms on tpo.staff_id = tms.staff_id
         left join dkic_b.t_mst_org tmo on tpo.org_id = tmo.org_id
+        left join dkic_b.t_mac_rec_pay tmrp on  tmrp.biznis_id = tpo.order_id
         <include refid="ConditionSalesTrackingReport"/>
         order by  tpo.op_create_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
@@ -1091,6 +1096,8 @@
                T."outingQty",
                T."priceSale",
                T."itemQty",
+               T."sumQuantity",
+               T."sumAmount",
                T."sumAmtRec",
                T."sumShouldHandle",
                T."sumUsePaymentResidue",
@@ -1117,6 +1124,8 @@
                     tpo.outing_qty AS "outingQty",
                     tpoi.price_sale AS "priceSale",
                     tpoi.item_qty AS "itemQty",
+                    tpo.sum_quantity AS "sumQuantity",
+                    tpo.sum_amount AS "sumAmount",
                     0.00 AS "sumAmtRec",
                     0.00 AS "sumShouldHandle",
                     0.00 AS "sumUsePaymentResidue",
@@ -1154,6 +1163,8 @@
                     WHEN tpobi.out_status = '出库状态-出库中' THEN
                     tpobi.outing_qty ELSE tpobi.out_qty
                     END AS "itemQty",
+                    0.00 AS "sumQuantity",
+                    0.00 AS "sumAmount",
                     0.00 AS "sumAmtRec",
                     0.00 AS "sumShouldHandle",
                     0.00 AS "sumUsePaymentResidue",
@@ -1190,6 +1201,8 @@
                     WHEN tpobi.out_status = '出库状态-出库中' THEN
                     tpobi.outing_qty ELSE tpobi.out_qty
                     END AS "itemQty",
+                    0.00 AS "sumQuantity",
+                    0.00 AS "sumAmount",
                     0.00 AS "sumAmtRec",
                     0.00 AS "sumShouldHandle",
                     0.00 AS "sumUsePaymentResidue",

+ 14 - 7
src/main/java/com/dk/mdm/model/query/ivt/InboundQuery.java

@@ -116,13 +116,6 @@ public class InboundQuery extends PageInfo<InboundQuery>{
 
 
 
-    /**
-     * 入库日期
-     */
-    @ApiModelProperty(value = "入库日期")
-    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
-    @TableField(typeHandler = TimestampTypeHandler.class)
-    private LocalDate intoDate;
 
 
     /**
@@ -208,6 +201,20 @@ public class InboundQuery extends PageInfo<InboundQuery>{
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private LocalDate makeTimeEnd;
 
+    @ApiModelProperty(value = "入库时间开始")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDate intoDateStart;
+
+    @ApiModelProperty(value = "入库时间结束")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDate intoDateEnd;
+
+    /**
+     * 收货仓库
+     */
+    @Excel(name = "仓库")
+    @ApiModelProperty(value = "收货仓库")
+    private String whName;
     /**
      * 商品型号
      */

+ 3 - 0
src/main/java/com/dk/mdm/model/vo/ivt/OutboundItemVO.java

@@ -229,6 +229,9 @@ public class OutboundItemVO {
     @ApiModelProperty(value = "新建编辑标识true:新建,false:编辑")
     private Boolean addOrEditFlag;
 
+    @ApiModelProperty(value = "可以输入负数出库标识")
+    private Boolean canNegativeFlag;
+
     private static final long serialVersionUID = 1L;
 
 }

+ 1 - 1
src/main/java/com/dk/mdm/service/ivt/inbound/InboundPurchaseService.java

@@ -319,7 +319,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
             for (InboundItemVO inboundItemVO : inboundVO.getItemList()) {
                 InboundItem inboundItem = new InboundItem();
                 inboundItem.setItemId(inboundItemVO.getItemId());
-                if (inboundItemVO.getRemarks() != null || inboundItemVO.getRemarks() != " ") {
+                if (inboundItemVO.getRemarks() != null && inboundItemVO.getRemarks() != "") {
                     inboundItem.setRemarks(inboundItemVO.getRemarks());
                     inboundItemMapper.update(inboundItem,
                             new UpdateWrapper<InboundItem>().lambda()

+ 20 - 0
src/main/java/com/dk/mdm/service/mst/PrintLayoutService.java

@@ -1,5 +1,10 @@
 package com.dk.mdm.service.mst;
 
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultUtil;
+import com.dk.common.response.ResponseResultVO;
 import com.dk.mdm.model.pojo.mst.PrintLayout;
 import com.dk.mdm.mapper.mst.PrintLayoutMapper;
 import com.dk.common.service.BaseService;
@@ -8,6 +13,11 @@ import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 @Service
 @Transactional
 public class PrintLayoutService extends BaseService<PrintLayout> {
@@ -25,4 +35,14 @@ public class PrintLayoutService extends BaseService<PrintLayout> {
 	@Autowired
 	private PrintLayoutMapper printLayoutMapper;
 
+	/**
+	 * @desc : 获取打印数据
+	 * @author : 周兴
+	 * @date : 2024/4/22 15:28
+	 */
+	public ResponseResultVO<?> getPrintData(Map<String, Object> param) {
+		Map<String, Object> map = printLayoutMapper.getPrintData(param);
+		JSONObject obj = JSONObject.parseObject(map.get("f_get_print_data").toString());
+		return ResponseResultUtil.success(obj.get("data"));
+	}
 }