Procházet zdrojové kódy

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

于继渤 před 2 roky
rodič
revize
ccde4a9924

+ 26 - 1
src/main/java/com/dk/mdm/controller/common/CommonController.java

@@ -597,7 +597,7 @@ public class CommonController extends BaseController<Map<String, Object>> {
     }
 
     /**
-     * @desc : 获取资金账户
+     * @desc : 获取资金账户(下拉)
      * @author : 付斌
      * @date : 2024-03-14 11:34
      */
@@ -609,6 +609,31 @@ public class CommonController extends BaseController<Map<String, Object>> {
     public ResponseResultVO<List<Map<String, Object>>> getMac(@RequestBody Map<String, Object> param) {
         return commonService.getMac(param);
     }
+
+    /**
+     * @desc : 获取资金账户(放大镜)
+     * @author : 付斌
+     * @date : 2024-03-05 10:50
+     */
+    @ApiOperation(
+            value = "获取商品",
+            notes = "获取商品"
+    )
+    @PostMapping("get_money_account")
+    public ResponseResultVO<List<Map<String, Object>>> getMoneyAccount(@RequestBody Map<String, Object> param) {
+        return commonService.getMoneyAccount(param);
+    }
+
+    /**
+     * @desc : 获取资金账户(放大镜分页)
+     * @author : 付斌
+     * @date : 2024-03-05 10:50
+     */
+    @ApiOperation(value = "获取商品分页查询", notes = "获取商品分页查询")
+    @PostMapping({"get_money_account_by_page"})
+    public ResponseResultVO<PageList<Map<String, Object>>> getMoneyAccountByPage(@RequestBody Map<String, Object> param) {
+        return commonService.getMoneyAccountByPage(param);
+    }
 }
 
 

+ 4 - 0
src/main/java/com/dk/mdm/controller/ivt/InboundController.java

@@ -109,4 +109,8 @@ public class InboundController{
         return inheritedPurchaseService.purchaseHandleInbound(inboundVO);
     }
 
+
+
+
+
 }

+ 11 - 0
src/main/java/com/dk/mdm/controller/ivt/InboundOtherController.java

@@ -107,4 +107,15 @@ public class InboundOtherController {
         return inboundOtherService.otherInboundCancel(inboundVO);
     }
 
+    /**
+     * @desc   : 获取单据信息(编辑用)
+     * @date   : 2024/3/14 16:37
+     * @author : 寇珊珊
+     */
+    @ApiOperation(value = "获取单据信息(编辑用)", notes = "获取单据信息(编辑用)")
+    @PostMapping({"select_by_update/{id}"})
+    public ResponseResultVO<?> selectByUpdate(@PathVariable String id) {
+        return inboundOtherService.selectByUpdate(id);
+    }
+
 }

+ 15 - 1
src/main/java/com/dk/mdm/mapper/common/CommonMapper.java

@@ -418,9 +418,23 @@ public interface CommonMapper extends BaseMapper<Map<String, Object>> {
     Long getOrganizationCount(Map<String, Object> param);
 
     /**
-     * @desc   : 获取资金账户
+     * @desc   : 获取资金账户(下拉)
      * @author : 付斌
      * @date   : 2024-03-14 11:35
      */
     List<Map<String, Object>> getMac(Map param);
+
+    /**
+     * @desc : 获取资金账户(放大镜)
+     * @author : 付斌
+     * @date : 2024-03-05 10:53
+     */
+    List<Map<String, Object>> getMoneyAccount(Map param);
+
+    /**
+     * @desc : 获取资金账户(数量)
+     * @author : 付斌
+     * @date : 2024-03-05 10:52
+     */
+    Long getMoneyAccountCountByPage(Map param);
 }

+ 48 - 4
src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

@@ -919,6 +919,9 @@
         <if test="whName != null">
             AND tmgs.wh_name LIKE concat('%',my_ex.likequery(#{whName}),'%')
         </if>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
     </select>
 
     <!-- 查询库存个数 -->
@@ -937,13 +940,13 @@
             AND tpi.non_std_code = #{nonStdCode}
         </if>
         <if test="skuCode != null">
-            AND tmgs.sku_code = #{skuCode}
+            AND tmgs.sku_code LIKE concat('%',my_ex.likequery(#{skuCode}),'%')
         </if>
         <if test="skuName != null">
-            AND tmgs.sku_name = #{skuName}
+            AND tmgs.sku_name LIKE concat('%',my_ex.likequery(#{skuName}),'%')
         </if>
         <if test="whName != null">
-            AND tmgs.wh_name = #{whName}
+            AND tmgs.wh_name LIKE concat('%',my_ex.likequery(#{whName}),'%')
         </if>
     </select>
 
@@ -1195,7 +1198,7 @@
         </if>
     </select>
 
-    <!-- 获取资金账户-->
+    <!-- 获取资金账户(下拉)-->
     <select id="getMac" resultType="java.util.Map">
         select tmma.mac_id           as "macId",
                tmma.mac_code         as "macCode",
@@ -1217,4 +1220,45 @@
         </if>
         order by tmma.display_no
     </select>
+
+    <!-- 获取资金账户(放大镜) -->
+    <select id="getMoneyAccount" resultType="java.util.Map">
+        select tmma.mac_id           as "macId",
+               tmma.mac_code         as "macCode",
+               tmma.mac_name         as "macName",
+               tmma.mac_type         as "macType",
+               tmma.balance,
+               tmma.display_no       as "displayNo",
+               tmma.flg_default      as "flgDefault",
+               tmma.mac_receipt_code as "macReceiptCode",
+               tmma.remarks
+        from dkic_b.t_mst_money_account tmma
+        where tmma.flg_valid
+          and tmma.cp_id = #{cpId}
+        <if test="macCode !=null and macCode !=''">
+            AND tmma.mac_code LIKE concat('%',my_ex.likequery(#{macCode}),'%')
+        </if>
+        <if test="macName !=null and macName !=''">
+            AND tmma.mac_name LIKE concat('%',my_ex.likequery(#{macName}),'%')
+        </if>
+        order by tmma.display_no
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 获取资金账户(放大镜)个数 -->
+    <select id="getMoneyAccountCountByPage" resultType="Long">
+        SELECT
+        count(1)
+        from dkic_b.t_mst_money_account tmma
+        where tmma.flg_valid
+          and tmma.cp_id = #{cpId}
+        <if test="macCode !=null and macCode !=''">
+            AND tmma.mac_code LIKE concat('%',my_ex.likequery(#{macCode}),'%')
+        </if>
+        <if test="macName !=null and macName !=''">
+            AND tmma.mac_name LIKE concat('%',my_ex.likequery(#{macName}),'%')
+        </if>
+    </select>
 </mapper>

+ 4 - 4
src/main/java/com/dk/mdm/model/pojo/mac/Receipt.java

@@ -18,7 +18,7 @@ import io.swagger.annotations.ApiModelProperty;
 import com.alibaba.fastjson.JSONObject;
 
 import java.math.BigDecimal;
-import java.util.List;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 
 /**
@@ -41,7 +41,7 @@ public class Receipt extends PageInfo<Receipt> implements Serializable {
     /**
      * 收款单ID
      */
-    @TableId(value = "receipt_id", type = IdType.AUTO)
+//    @TableId(value = "receipt_id", type = IdType.AUTO)
     @ApiModelProperty(value = "收款单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String receiptId;
@@ -60,9 +60,9 @@ public class Receipt extends PageInfo<Receipt> implements Serializable {
      */
     @Excel(name = "收款日期 (账务日期)")
     @ApiModelProperty(value = "收款日期 (账务日期)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
-    private LocalDateTime receiptDate;
+    private LocalDate receiptDate;
 
 
     /**

+ 1 - 1
src/main/java/com/dk/mdm/model/pojo/mac/Transfer.java

@@ -41,7 +41,7 @@ public class Transfer extends PageInfo<Transfer> implements Serializable {
     /**
      * 转账单ID
      */
-    @TableId(value = "trf_id", type = IdType.AUTO)
+//    @TableId(value = "trf_id", type = IdType.AUTO)
     @ApiModelProperty(value = "转账单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String trfId;

+ 3 - 3
src/main/java/com/dk/mdm/model/query/mac/ReceiptQuery.java

@@ -43,7 +43,7 @@ public class ReceiptQuery extends PageInfo<ReceiptQuery> implements Serializable
     /**
      * 收款单ID
      */
-    @TableId(value = "receipt_id", type = IdType.AUTO)
+//    @TableId(value = "receipt_id", type = IdType.AUTO)
     @ApiModelProperty(value = "收款单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String receiptId;
@@ -62,9 +62,9 @@ public class ReceiptQuery extends PageInfo<ReceiptQuery> implements Serializable
      */
     @Excel(name = "收款日期 (账务日期)")
     @ApiModelProperty(value = "收款日期 (账务日期)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
-    private LocalDateTime receiptDate;
+    private LocalDate receiptDate;
 
 
     /**

+ 1 - 1
src/main/java/com/dk/mdm/model/query/mac/TransferQuery.java

@@ -44,7 +44,7 @@ public class TransferQuery extends PageInfo<TransferQuery> implements Serializab
     /**
      * 转账单ID
      */
-    @TableId(value = "trf_id", type = IdType.AUTO)
+//    @TableId(value = "trf_id", type = IdType.AUTO)
     @ApiModelProperty(value = "转账单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String trfId;

+ 4 - 3
src/main/java/com/dk/mdm/model/response/mac/ReceiptResponse.java

@@ -19,6 +19,7 @@ import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 
 /**
@@ -41,7 +42,7 @@ public class ReceiptResponse extends PageInfo<ReceiptResponse> implements Serial
     /**
      * 收款单ID
      */
-    @TableId(value = "receipt_id", type = IdType.AUTO)
+//    @TableId(value = "receipt_id", type = IdType.AUTO)
     @ApiModelProperty(value = "收款单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String receiptId;
@@ -60,9 +61,9 @@ public class ReceiptResponse extends PageInfo<ReceiptResponse> implements Serial
      */
     @Excel(name = "收款日期 (账务日期)")
     @ApiModelProperty(value = "收款日期 (账务日期)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
-    private LocalDateTime receiptDate;
+    private LocalDate receiptDate;
 
 
     /**

+ 1 - 1
src/main/java/com/dk/mdm/model/response/mac/TransferResponse.java

@@ -44,7 +44,7 @@ public class TransferResponse extends PageInfo<TransferResponse> implements Seri
     /**
      * 转账单ID
      */
-    @TableId(value = "trf_id", type = IdType.AUTO)
+//    @TableId(value = "trf_id", type = IdType.AUTO)
     @ApiModelProperty(value = "转账单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String trfId;

+ 4 - 3
src/main/java/com/dk/mdm/model/vo/mac/ReceiptVO.java

@@ -19,6 +19,7 @@ import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 
 /**
@@ -41,7 +42,7 @@ public class ReceiptVO extends PageInfo<ReceiptVO> implements Serializable {
     /**
      * 收款单ID
      */
-    @TableId(value = "receipt_id", type = IdType.AUTO)
+//    @TableId(value = "receipt_id", type = IdType.AUTO)
     @ApiModelProperty(value = "收款单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String receiptId;
@@ -60,9 +61,9 @@ public class ReceiptVO extends PageInfo<ReceiptVO> implements Serializable {
      */
     @Excel(name = "收款日期 (账务日期)")
     @ApiModelProperty(value = "收款日期 (账务日期)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
-    private LocalDateTime receiptDate;
+    private LocalDate receiptDate;
 
 
     /**

+ 1 - 1
src/main/java/com/dk/mdm/model/vo/mac/TransferVO.java

@@ -44,7 +44,7 @@ public class TransferVO extends PageInfo<TransferVO> implements Serializable {
     /**
      * 转账单ID
      */
-    @TableId(value = "trf_id", type = IdType.AUTO)
+//    @TableId(value = "trf_id", type = IdType.AUTO)
     @ApiModelProperty(value = "转账单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String trfId;

+ 28 - 1
src/main/java/com/dk/mdm/service/common/CommonService.java

@@ -821,7 +821,7 @@ public class CommonService extends BaseService<Map<String, Object>> {
     }
 
     /**
-     * @desc   : 获取资金账户
+     * @desc   : 获取资金账户(下拉)
      * @author : 付斌
      * @date   : 2024-03-14 11:34
      */
@@ -830,4 +830,31 @@ public class CommonService extends BaseService<Map<String, Object>> {
         List<Map<String, Object>> list = commonMapper.getMac(param);
         return ResponseResultUtil.success(list);
     }
+
+    /**
+     * @desc : 获取资金账户(放大镜)
+     * @author : 付斌
+     * @date : 2024-03-05 10:50
+     */
+    public ResponseResultVO<List<Map<String, Object>>> getMoneyAccount(Map<String, Object> param) {
+        // 获取系统基础数据
+        List<Map<String, Object>> list = commonMapper.getMoneyAccount(param);
+        return ResponseResultUtil.success(list);
+    }
+
+    /**
+     * @desc : 获取资金账户(放大镜分页)
+     * @author : 付斌
+     * @date : 2024-03-05 10:50
+     */
+    public ResponseResultVO<PageList<Map<String, Object>>> getMoneyAccountByPage(Map<String, Object> param) {
+        // 校验分页参数
+        if (param.get("pageSize") == null || param.get("currentPage") == null) {
+            return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
+        }
+        // 分页参数赋值
+        param = this.getLimit(param);
+        return super.mergeListWithCount(param, commonMapper.getMoneyAccount(param),
+                commonMapper.getMoneyAccountCountByPage(param));
+    }
 }

+ 18 - 0
src/main/java/com/dk/mdm/service/ivt/InboundOtherService.java

@@ -356,5 +356,23 @@ public class InboundOtherService extends BaseService<Inbound> {
 		}
 		return intoStatus;
 	}
+
+
+	/**
+	 * @desc   : 获取单据信息(编辑用)
+	 * @date   : 2024/3/14 16:38
+	 * @author : 寇珊珊
+	 */
+	public ResponseResultVO<?> selectByUpdate(String id) {
+		Map<String, Object> dataInfo = new HashMap<>();
+		//总单
+		InboundResponse inboundResponse = inboundMapper.selectById(id);
+		dataInfo.put("data", inboundResponse);
+
+		// 明细
+		List<InboundItemResponse> inboundItemResponses = inboundItemMapper.selectByCond(new InboundItemQuery().setIntoId(id));
+		dataInfo.put("dataItem", inboundItemResponses);
+		return ResponseResultUtil.success(dataInfo);
+	}
 	
 }

+ 6 - 0
src/main/java/com/dk/mdm/service/ivt/InboundService.java

@@ -18,10 +18,13 @@ import com.dk.mdm.model.query.ivt.InboundItemQuery;
 import com.dk.mdm.model.query.ivt.InboundQuery;
 import com.dk.mdm.model.query.pur.PurchaseItemQuery;
 import com.dk.mdm.model.query.pur.PurchaseQuery;
+import com.dk.mdm.model.query.sale.OrderItemQuery;
 import com.dk.mdm.model.response.ivt.InboundItemResponse;
 import com.dk.mdm.model.response.ivt.InboundResponse;
 import com.dk.mdm.model.response.pur.PurchaseItemResponse;
 import com.dk.mdm.model.response.pur.PurchaseResponse;
+import com.dk.mdm.model.response.sale.OrderItemResponse;
+import com.dk.mdm.model.response.sale.OrderResponse;
 import com.dk.mdm.model.vo.ivt.InboundVO;
 import com.dk.mdm.model.vo.mst.GoodsBrandVO;
 import com.dk.mdm.service.common.CommonService;
@@ -29,6 +32,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -116,4 +120,6 @@ public class InboundService extends BaseService<Inbound> {
 	}
 
 
+
+
 }

+ 1 - 8
src/main/java/com/dk/mdm/service/mac/ReceiptService.java

@@ -1,12 +1,9 @@
 package com.dk.mdm.service.mac;
 
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.dk.common.exception.BaseBusinessException;
 import com.dk.common.infrastructure.annotaiton.Pagination;
 import com.dk.common.infrastructure.constant.Constant;
-import com.dk.common.infrastructure.enums.ErrorCodeEnum;
 import com.dk.common.model.pojo.PageList;
-import com.dk.common.response.ResponseCodeEnum;
 import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.mdm.infrastructure.convert.mac.ReceiptConvert;
@@ -14,7 +11,6 @@ import com.dk.mdm.model.pojo.mac.Receipt;
 import com.dk.mdm.mapper.mac.ReceiptMapper;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
-import com.dk.mdm.model.pojo.mst.Customer;
 import com.dk.mdm.model.query.mac.ReceiptQuery;
 import com.dk.mdm.model.response.mac.ReceiptResponse;
 import com.dk.mdm.model.vo.mac.ReceiptVO;
@@ -23,11 +19,8 @@ import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.UUID;
-import java.util.stream.Collectors;
 
 @Service
 @Transactional
@@ -75,7 +68,7 @@ public class ReceiptService extends BaseService<Receipt> {
 	public ResponseResultVO<?> insert(ReceiptVO receiptVO) {
 
 		// 获取单号
-		Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.ORDER.getName(), false);
+		Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.CUSRECEIPT.getName(), false);
 		receiptVO.setReceiptId(codeMap.get("outId").toString()).setReceiptNo(codeMap.get("outNote").toString())
 				.setReceiptType(Constant.DocumentType.ORDER.getName());
 		// 转化实体