From 8b883105ffcc80a1f3bac54580d757723eb38c96 Mon Sep 17 00:00:00 2001
From: zhangchao <zc857179121@qq.com>
Date: 星期二, 27 八月 2024 14:10:02 +0800
Subject: [PATCH] 配置
---
src/main/java/com/zy/common/service/CommonService.java | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index fa0d583..4f8c73e 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -1,8 +1,8 @@
package com.zy.common.service;
import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.mapper.EntityWrapper;
-import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.common.Arith;
import com.core.common.Cools;
import com.core.exception.CoolException;
@@ -54,7 +54,7 @@
* @return workNo(宸ヤ綔鍙�)
*/
public int getWorkNo(Integer wrkMk) {
- WrkLastno wrkLastno = wrkLastnoService.selectById(wrkMk);
+ WrkLastno wrkLastno = wrkLastnoService.getById(wrkMk);
if (Cools.isEmpty(wrkLastno)) {
throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�");
}
@@ -64,7 +64,7 @@
int eNo = wrkLastno.getENo();
workNo = workNo>=eNo ? sNo : workNo+1;
while (true) {
- WrkMast wrkMast = wrkMastService.selectById(workNo);
+ WrkMast wrkMast = wrkMastService.getById(workNo);
if (null != wrkMast) {
workNo = workNo>=eNo ? sNo : workNo+1;
} else {
@@ -80,7 +80,7 @@
if (workNo == 0) {
throw new CoolException("鐢熸垚宸ヤ綔鍙峰け璐ワ紝璇疯仈绯荤鐞嗗憳");
} else {
- if (wrkMastService.selectById(workNo)!=null) {
+ if (wrkMastService.getById(workNo)!=null) {
throw new CoolException("鐢熸垚宸ヤ綔鍙�" + workNo + "鍦ㄥ伐浣滄。涓凡瀛樺湪");
}
}
@@ -121,7 +121,7 @@
default:
throw new CoolException("搴撲綅鎺掑彿鍒嗛厤閿欒, 婧愮珯鍙凤細" + sourceStaNo);
}
- RowLastno rowLastno = rowLastnoService.selectById(whsType);
+ RowLastno rowLastno = rowLastnoService.getById(whsType);
if (Cools.isEmpty(rowLastno)) {
throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�");
}
@@ -146,7 +146,7 @@
}
String shallowLocNo = Utils.getShallowLoc(slaveProperties, locNo);
// 妫�娴嬬洰鏍囧簱浣嶆槸鍚︿负绌哄簱浣�
- LocMast shallowLoc = locMastService.selectById(shallowLocNo);
+ LocMast shallowLoc = locMastService.getById(shallowLocNo);
if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) {
if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) {
if (VersionUtils.locMoveCheckLocType(shallowLoc, locTypeDto)) {
@@ -161,7 +161,7 @@
// 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭
if (staDescId == 10) {
- List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow));
+ List<LocMast> locMasts = locMastService.list(new QueryWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow));
if (locMasts.size() > 0) {
for (LocMast loc : locMasts) {
if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) {
@@ -169,7 +169,7 @@
}
String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo());
// 妫�娴嬬洰鏍囧簱浣嶆槸鍚︿负绌哄簱浣�
- LocMast shallowLoc = locMastService.selectById(shallowLocNo);
+ LocMast shallowLoc = locMastService.getById(shallowLocNo);
if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) {
if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) {
locMast = shallowLoc;
@@ -235,16 +235,16 @@
throw new CoolException("娌℃湁鍙敤鐨勫爢鍨涙満");
}
// 鑾峰彇鐩爣绔�
- Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
+ Wrapper<StaDesc> wrapper = new QueryWrapper<StaDesc>()
.eq("type_no", staDescId)
.eq("stn_no", sourceStaNo)
.eq("crn_no", crnNo);
- StaDesc staDesc = staDescService.selectOne(wrapper);
+ StaDesc staDesc = staDescService.getOne(wrapper);
if (Cools.isEmpty(staDesc)) {
News.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo);
throw new CoolException("鍏ュ簱璺緞涓嶅瓨鍦�");
}
- BasDevp staNo = basDevpService.selectById(staDesc.getCrnStn());
+ BasDevp staNo = basDevpService.getById(staDesc.getCrnStn());
if (!staNo.getAutoing().equals("Y")) {
throw new CoolException("鐩爣绔�"+staDesc.getCrnStn()+"涓嶅彲鐢�");
}
@@ -272,14 +272,14 @@
}
// 鐩爣搴撲綅 ===>> 娴呭簱浣嶏紝 鍒欐牎楠屽叾娣卞簱浣嶆槸鍚︿负 F D X
if (null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) {
- LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo()));
+ LocMast deepLoc = locMastService.getById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo()));
if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) {
locMast = null;
}
}
// 鐩爣搴撲綅 ===>> 娣卞簱浣嶏紝 鍒欐牎楠屽叾娴呭簱浣嶆槸鍚︿负 O
if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) {
- LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo()));
+ LocMast shallowLoc = locMastService.getById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo()));
if (!shallowLoc.getLocSts().equals("O")) {
locMast = null;
}
--
Gitblit v1.9.1