Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

dongke 2 лет назад
Родитель
Сommit
129551087f
22 измененных файлов с 271 добавлено и 56 удалено
  1. 27 16
      src/main/java/com/dk/mdm/controller/common/CommonController.java
  2. 4 0
      src/main/java/com/dk/mdm/controller/ivt/InboundController.java
  3. 11 0
      src/main/java/com/dk/mdm/controller/ivt/InboundOtherController.java
  4. 21 5
      src/main/java/com/dk/mdm/controller/ivt/InboundPurchaseController.java
  5. 16 0
      src/main/java/com/dk/mdm/controller/mst/StaffController.java
  6. 15 1
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.java
  7. 48 4
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml
  8. 4 4
      src/main/java/com/dk/mdm/model/pojo/mac/Receipt.java
  9. 1 1
      src/main/java/com/dk/mdm/model/pojo/mac/Transfer.java
  10. 3 3
      src/main/java/com/dk/mdm/model/query/mac/ReceiptQuery.java
  11. 1 1
      src/main/java/com/dk/mdm/model/query/mac/TransferQuery.java
  12. 4 3
      src/main/java/com/dk/mdm/model/response/mac/ReceiptResponse.java
  13. 1 1
      src/main/java/com/dk/mdm/model/response/mac/TransferResponse.java
  14. 4 3
      src/main/java/com/dk/mdm/model/vo/mac/ReceiptVO.java
  15. 1 1
      src/main/java/com/dk/mdm/model/vo/mac/TransferVO.java
  16. 29 1
      src/main/java/com/dk/mdm/service/common/CommonService.java
  17. 18 0
      src/main/java/com/dk/mdm/service/ivt/InboundOtherService.java
  18. 20 0
      src/main/java/com/dk/mdm/service/ivt/InboundPurchaseService.java
  19. 6 0
      src/main/java/com/dk/mdm/service/ivt/InboundService.java
  20. 1 8
      src/main/java/com/dk/mdm/service/mac/ReceiptService.java
  21. 35 3
      src/main/java/com/dk/mdm/service/mst/StaffService.java
  22. 1 1
      src/main/resources/dev/bootstrap.yml

+ 27 - 16
src/main/java/com/dk/mdm/controller/common/CommonController.java

@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Dictionary;
 import java.util.List;
 import java.util.Map;
 
@@ -35,21 +36,6 @@ public class CommonController extends BaseController<Map<String, Object>> {
     private CommonService commonService;
 
     /**
-     * @desc : 登录后获取信息
-     * @author : 周兴
-     * @date : 2024/3/4 12:47
-     */
-    @ApiOperation(
-            value = "登录后获取信息",
-            notes = "登录后获取信息"
-    )
-    @PostMapping("get_info_after_login")
-    public ResponseResultVO<Map<String, List<Map<String, Object>>>> getInfoAfterLogin(@RequestBody Map<String, Object> param) {
-        return commonService.getInfoAfterLogin(param);
-    }
-
-
-    /**
      * @desc : 获取数据字典项目
      * @author : 王英杰
      * @date : 2023/1/6 12:47
@@ -597,7 +583,7 @@ public class CommonController extends BaseController<Map<String, Object>> {
     }
 
     /**
-     * @desc : 获取资金账户
+     * @desc : 获取资金账户(下拉)
      * @author : 付斌
      * @date : 2024-03-14 11:34
      */
@@ -609,6 +595,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);
+    }
+
 }

+ 21 - 5
src/main/java/com/dk/mdm/controller/ivt/InboundPurchaseController.java

@@ -1,11 +1,15 @@
 package com.dk.mdm.controller.ivt;
 
 
+import com.dk.common.infrastructure.annotaiton.Pagination;
 import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.common.service.BaseService;
 import com.dk.mdm.model.pojo.ivt.Inbound;
+import com.dk.mdm.model.query.ivt.InboundItemQuery;
 import com.dk.mdm.model.query.ivt.InboundQuery;
+import com.dk.mdm.model.response.ivt.InboundItemResponse;
 import com.dk.mdm.model.response.ivt.InboundResponse;
 import com.dk.mdm.model.vo.ivt.InboundVO;
 import com.dk.mdm.service.ivt.InboundOtherService;
@@ -13,12 +17,12 @@ import com.dk.mdm.service.ivt.InboundPurchaseService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 
 @Api(tags = "采购入库单API接口")
@@ -48,6 +52,18 @@ public class InboundPurchaseController {
     }
 
 
+    /**
+     * @desc   : 明细信息条件查询
+     * @date   : 2024/3/15 9:15
+     * @author : 寇珊珊
+     */
+    @ApiOperation(value = "明细信息条件查询", notes = "明细信息条件查询")
+    @PostMapping({"select_purchase_inbound_item_info_by_id/{id}"})
+    public ResponseResultVO<Map<String, Object>> selectPurchaseInboundItemInfoById(@PathVariable String id) {
+        return inheritedPurchaseService.selectPurchaseInboundItemInfoById(id);
+    }
+
+
 
     /**
      * @desc   : 采购入库新建
@@ -91,7 +107,7 @@ public class InboundPurchaseController {
             notes = "采购入库撤销"
     )
     @PostMapping({"purchase_inbound_cancel"})
-    public ResponseResultVO<?> purchaseInboundCancel(@RequestBody InboundVO inboundVO) {
+    public ResponseResultVO<?> purchaseInboundCancel(@Valid @RequestBody InboundVO inboundVO) {
         return inheritedPurchaseService.purchaseInboundCancel(inboundVO);
     }
 

+ 16 - 0
src/main/java/com/dk/mdm/controller/mst/StaffController.java

@@ -20,7 +20,9 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.ArrayList;
+import java.util.Dictionary;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author : 姜永辉
@@ -201,4 +203,18 @@ public class StaffController {
         return ResponseResultUtil.success(pageListResponseResultVO.getData().getList().get(0));
     }
 
+    /**
+     * @desc : 登录后获取信息
+     * @author : 周兴
+     * @date : 2024/3/4 12:47
+     */
+    @ApiOperation(
+            value = "登录后获取信息",
+            notes = "登录后获取信息"
+    )
+    @PostMapping("get_info_after_login")
+    public ResponseResultVO<Dictionary<String,Object>> getInfoAfterLogin(@RequestBody Map<String, Object> param) {
+        return staffService.getInfoAfterLogin(param);
+    }
+
 }

+ 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;

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

@@ -14,6 +14,7 @@ import com.dk.mdm.mapper.common.CommonMapper;
 import com.dk.mdm.infrastructure.util.AuthUtils;
 import com.dk.mdm.mapper.mst.StaffMapper;
 import com.dk.common.model.response.mst.StaffResponse;
+import com.dk.mdm.model.pojo.mst.Staff;
 import lombok.extern.slf4j.Slf4j;
 import org.postgresql.util.PGobject;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -819,7 +820,7 @@ public class CommonService extends BaseService<Map<String, Object>> {
     }
 
     /**
-     * @desc   : 获取资金账户
+     * @desc   : 获取资金账户(下拉)
      * @author : 付斌
      * @date   : 2024-03-14 11:34
      */
@@ -828,4 +829,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);
+	}
 	
 }

+ 20 - 0
src/main/java/com/dk/mdm/service/ivt/InboundPurchaseService.java

@@ -35,6 +35,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -88,6 +89,25 @@ public class InboundPurchaseService extends BaseService<Inbound> {
 	}
 
 
+
+
+	/**
+	 * @desc   : 查询明细
+	 * @date   : 2024/3/9 15:43
+	 * @author : 寇珊珊
+	 */
+	@Pagination
+	public ResponseResultVO<Map<String, Object>> selectPurchaseInboundItemInfoById(String id) {
+		Map<String, Object> result = new HashMap<>();
+		// 商品明细
+		List<InboundItemResponse> inboundItemResponses = inboundItemMapper.selectByCond(new InboundItemQuery().setIntoId(id));
+		result.put("itemList", inboundItemResponses);
+		// 收款
+
+		// 附件
+		return ResponseResultUtil.success(result);
+	}
+
 	/**
 	 * @desc   : 采购入库新建
 	 * @date   : 2024/3/7 14:13

+ 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());
 		// 转化实体

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

@@ -5,12 +5,14 @@ import com.dk.common.infrastructure.constant.Constant;
 import com.dk.common.model.pojo.PageList;
 import com.dk.common.model.pojo.mst.StaffPurview;
 import com.dk.common.model.pojo.mst.StaffRight;
+import com.dk.common.model.vo.core.StaffEntity;
 import com.dk.common.response.ResponseCodeEnum;
 import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.mdm.feign.CompanyFeign;
 import com.dk.mdm.infrastructure.convert.mst.StaffConvert;
 import com.dk.mdm.infrastructure.util.AuthUtils;
+import com.dk.mdm.mapper.common.CommonMapper;
 import com.dk.mdm.model.pojo.mst.*;
 import com.dk.mdm.mapper.mst.StaffMapper;
 import com.dk.common.service.BaseService;
@@ -25,9 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @author : 姜永辉
@@ -71,6 +71,9 @@ public class StaffService extends BaseService<Staff> {
     private CommonService commonService;
 
     @Autowired
+    private CommonMapper commonMapper;
+
+    @Autowired
     private AuthUtils authUtils;
 
     /**
@@ -259,4 +262,33 @@ public class StaffService extends BaseService<Staff> {
         return ResponseResultUtil.success();
     }
 
+    /**
+     * @desc : 登录后获取信息
+     * @author : 周兴
+     * @date : 2024/3/4 11:41
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<Dictionary<String,Object>> getInfoAfterLogin(Map<String, Object> param) {
+        // 先根据userId查询当前企业的员工信息
+        StaffResponse staff = staffMapper.selectByUserId(param.get("userId").toString());
+        if (staff != null) {
+            // 存Redis
+            authUtils.saveStaff(new StaffEntity().setStaffId(staff.getStaffId())
+                    .setStaffCode(staff.getStaffCode())
+                    .setStaffName(staff.getStaffName())
+                    .setCpId(Integer.parseInt(param.get("cpId").toString()))
+                    .setAppCode(param.get("appCode").toString()));
+            // 更新员工登录状态
+            this.updateByUuid(new Staff().setStaffId(staff.getStaffId()).setFlgCanLogin(true));
+        }
+        // 获取菜单
+        List menuList = commonMapper.getMenuByUser(param);
+        Dictionary<String,Object> dic = new Hashtable<>();
+        dic.put("menuList", menuList);
+        dic.put("staff",staff);
+        return ResponseResultUtil.success(dic);
+    }
+
 }

+ 1 - 1
src/main/resources/dev/bootstrap.yml

@@ -2,7 +2,7 @@ server:
   port: 7008
 spring:
   application:
-    name: mdm-server-dkic-b1
+    name: mdm-server-dkic-b1-zx
   cloud:
     nacos:
       config: