From b267af1b816f646fa02c6f4983ebb3f9825cc192 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期六, 13 四月 2024 15:00:44 +0800
Subject: [PATCH] 单据管理:1.销售账号,在系统里面单据管理这里A销售员做的单子,在它的账号只显示自己的客户信息,不同的账号,看不到别人的信息,管理员是可以全部看的 2.增加客户名称,操作员搜索

---
 src/main/java/com/zy/asrs/service/impl/RowLastnoServiceImpl.java |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/RowLastnoServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/RowLastnoServiceImpl.java
index 4926799..49bc63f 100644
--- a/src/main/java/com/zy/asrs/service/impl/RowLastnoServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/RowLastnoServiceImpl.java
@@ -1,6 +1,8 @@
 package com.zy.asrs.service.impl;
 
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.core.common.Cools;
 import com.zy.asrs.entity.RowLastno;
 import com.zy.asrs.mapper.RowLastnoMapper;
 import com.zy.asrs.service.RowLastnoService;
@@ -13,4 +15,28 @@
     public RowLastno findBySection(Integer row) {
         return this.baseMapper.findBySection(row);
     }
+
+    @Override
+    public Integer selectNextWhsType() {
+        RowLastno wrk_mk = this.selectOne(new EntityWrapper<RowLastno>()
+                .eq("wrk_mk", 1));
+        if (Cools.isEmpty(wrk_mk)) {
+            this.baseMapper.updateInitWrkMk();
+            return 1;
+        }else {
+            int i = this.selectCount(null);
+            if (wrk_mk.getWhsType() >= i){
+                this.baseMapper.updateInitWrkMk();
+                wrk_mk.setWrkMk("0");
+                this.update(wrk_mk,new EntityWrapper<RowLastno>()
+                        .eq("whs_type",wrk_mk.getWhsType()));
+            }else {
+                this.baseMapper.updateNextWrkMk(wrk_mk.getWhsType()+1);
+                wrk_mk.setWrkMk("0");
+                this.update(wrk_mk,new EntityWrapper<RowLastno>()
+                        .eq("whs_type",wrk_mk.getWhsType()));
+            }
+            return wrk_mk.getWhsType();
+        }
+    }
 }

--
Gitblit v1.9.1