Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kwell-mes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gavelinfo
kwell-mes
Commits
5f595f13
Commit
5f595f13
authored
Mar 09, 2022
by
zhoumaotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码调整
parent
15d40a16
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
44 deletions
+27
-44
GpfkDao.java
gavel/src/main/java/com/gavel/kwell/dao/GpfkDao.java
+2
-3
GpfkDaoImpl.java
...l/src/main/java/com/gavel/kwell/dao/impl/GpfkDaoImpl.java
+15
-29
GpfkServiceImpl.java
...in/java/com/gavel/kwell/service/impl/GpfkServiceImpl.java
+10
-12
No files found.
gavel/src/main/java/com/gavel/kwell/dao/GpfkDao.java
View file @
5f595f13
...
...
@@ -19,6 +19,7 @@ import com.gavel.kwell.vo.GpwxmxVO;
import
com.gavel.kwell.vo.WolinkInfoVO
;
import
com.gavel.kwell.vo.WosngzVO
;
import
com.gavel.persistence.sql.RecordSet
;
import
com.gavel.wo.persistent.Wogylx
;
import
com.gavel.wo.vo.WobomVO
;
import
com.gavel.wo.vo.WogylxVO
;
...
...
@@ -61,7 +62,7 @@ public interface GpfkDao extends BaseDao {
public
Bzgx
getLastGx
(
Bzgx
bzgx
);
public
Bzgx
getNextGx
(
Bzgx
bzg
x
);
public
Wogylx
getNextGx
(
Wogylx
wogyl
x
);
public
GpfkVO
queryGxidHasGpfk
(
String
snid
,
String
[]
jygxs
);
...
...
@@ -85,8 +86,6 @@ public interface GpfkDao extends BaseDao {
public
int
queryGxTimes
(
String
gxid
,
String
wosnid
);
public
int
queryZxNum
(
String
wosnid
);
public
RecordSet
<
GpfkVO
>
queryLh
(
GpfkCondition
condition
);
public
List
<
GpfkVO
>
queryCanZxsnList
(
String
[]
snids
,
String
[]
zxpdgxs
);
...
...
gavel/src/main/java/com/gavel/kwell/dao/impl/GpfkDaoImpl.java
View file @
5f595f13
...
...
@@ -4,6 +4,7 @@ package com.gavel.kwell.dao.impl;
import
java.util.Date
;
import
java.util.List
;
import
com.gavel.wo.persistent.Wogylx
;
import
org.springframework.stereotype.Repository
;
import
com.gavel.common.Constants
;
...
...
@@ -674,29 +675,25 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
}
@Override
public
Bzgx
getNextGx
(
Bzgx
bzg
x
){
public
Wogylx
getNextGx
(
Wogylx
wogyl
x
){
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select top 1 BZGX_ID, BZGX_CODE, BZGX_NAME, BZGX_GCID, BZGX_GZZXID, "
);
sqlMap
.
append
(
" BZGX_SBSL, BZGX_ZYRSL, BZGX_PDHS, BZGX_ZBHS, BZGX_JGHS, "
);
sqlMap
.
append
(
" BZGX_ZYHS, BZGX_GJGX, BZGX_GXLX, BZGX_TYBZ, BZGX_TYRQ, "
);
sqlMap
.
append
(
" BZGX_BZ, BZGX_CJRID, BZGX_CJR, BZGX_CJSJ, BZGX_WHRID, "
);
sqlMap
.
append
(
" BZGX_WHR, BZGX_WHSJ, BZGX_SYSVERSION, BZGX_XH "
);
sqlMap
.
append
(
"from BZGX "
);
sqlMap
.
append
(
"select top 1 WOGYLX_ID, WOGYLX_WOID, WOGYLX_XH, WOGYLX_BZGXID, WOGYLX_GYLXID, "
);
sqlMap
.
append
(
" WOGYLX_NAME, WOGYLX_GXLX, WOGYLX_GZZXID, WOGYLX_SBSL, WOGYLX_ZYRSL, "
);
sqlMap
.
append
(
" WOGYLX_PDHS, WOGYLX_ZBHS, WOGYLX_JGHS, WOGYLX_ZYHS, WOGYLX_GJGX, "
);
sqlMap
.
append
(
" WOGYLX_DWSJCL, WOGYLX_PCBS, WOGYLX_XQSL, WOGYLX_BZ, WOGYLX_CJRID, "
);
sqlMap
.
append
(
" WOGYLX_CJR, WOGYLX_CJSJ, WOGYLX_WHRID, WOGYLX_WHR, WOGYLX_WHSJ, "
);
sqlMap
.
append
(
" WOGYLX_SYSVERSION, GZZX_NAME, WOGYLX_GXBZ "
);
sqlMap
.
append
(
"from WOGYLX "
);
sqlMap
.
append
(
"where 1 = 1 "
);
sqlMap
.
append
(
" and isnull(BZGX_XH,0) <> 0 "
);
sqlMap
.
append
(
" and BZGX_TYBZ = 'N' "
);
if
(
StringUtils
.
isNotEmpty
(
bzgx
.
getGzzxid
())){
sqlMap
.
append
(
" and isnull(WOGYLX_XH,0) <> 0 "
);
if
(
StringUtils
.
isNotEmpty
(
wogylx
.
getGzzxid
())){
sqlMap
.
append
(
" and BZGX_GZZXID = :pGZZXID "
);
sqlMap
.
setParamValue
(
"pGZZXID"
,
bzgx
.
getGzzxid
());
}
if
(
StringUtils
.
isNotEmpty
(
bzgx
.
getGcid
())){
sqlMap
.
append
(
" and BZGX_GCID = :pGCID "
);
sqlMap
.
setParamValue
(
"pGCID"
,
bzgx
.
getGcid
());
sqlMap
.
setParamValue
(
"pGZZXID"
,
wogylx
.
getGzzxid
());
}
sqlMap
.
append
(
" and BZGX_XH > :pXH "
);
sqlMap
.
append
(
"order by BZGX_XH
asc
"
);
sqlMap
.
setParamValue
(
"pXH"
,
bzg
x
.
getXh
());
return
sqlMap
.
queryEntity
(
Bzg
x
.
class
);
sqlMap
.
append
(
"order by BZGX_XH "
);
sqlMap
.
setParamValue
(
"pXH"
,
wogyl
x
.
getXh
());
return
sqlMap
.
queryEntity
(
Wogyl
x
.
class
);
}
@Override
...
...
@@ -1005,17 +1002,6 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
}
}
@Override
public
int
queryZxNum
(
String
wosnid
){
try
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
setParamValue
(
"pWOSNID"
,
wosnid
);
return
sqlMap
.
queryInt
();
}
catch
(
Exception
e
)
{
return
0
;
}
}
@Override
public
List
<
GpfkVO
>
queryCanZxsnList
(
String
[]
snids
,
String
[]
zxpdgxs
){
SqlMap
sqlMap
=
new
SqlMap
();
...
...
gavel/src/main/java/com/gavel/kwell/service/impl/GpfkServiceImpl.java
View file @
5f595f13
...
...
@@ -32,6 +32,7 @@ import com.gavel.kzzx.vo.YymkCondition;
import
com.gavel.kzzx.vo.YymkVO
;
import
com.gavel.persistence.entity.EntityDataFactory
;
import
com.gavel.persistence.sql.RecordSet
;
import
com.gavel.wo.persistent.Wogylx
;
import
com.gavel.wo.persistent.Wosn
;
import
com.gavel.wo.vo.WobomVO
;
import
org.apache.shiro.SecurityUtils
;
...
...
@@ -563,25 +564,22 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
public
void
delGpfkById
(
String
gpfkid
){
Gpfk
gpfk
=
gpfkDao
.
queryById
(
Gpfk
.
class
,
gpfkid
);
if
(
gpfk
==
null
)
{
throw
new
RuntimeException
(
"
数据发生变化,请重新操作
!"
);
throw
new
RuntimeException
(
"
装配反馈记录不存在,请检查
!"
);
}
if
(!
UserInfoUtil
.
isSuperuser
()
&&
!
StringUtils
.
equalsIgnoreCase
(
gpfk
.
getFkrid
(),
UserInfoUtil
.
getUserId
())){
throw
new
RuntimeException
(
"当前工单由其他人反馈,不允许取消!"
);
}
if
(
NumberUtils
.
Greater
(
gpfkDao
.
queryZxNum
(
gpfk
.
getWosnid
()),
0
)){
throw
new
RuntimeException
(
"当前条码已装箱,不允许取消!"
);
}
Bzgx
bzgx
=
gpfkDao
.
queryById
(
Bzgx
.
class
,
gpfk
.
getFkgx
());
if
(!
NumberUtils
.
equals
(
bzgx
.
getXh
(),
0
)){
Bzgx
existNextGx
=
gpfkDao
.
getNextGx
(
bzgx
);
if
(
existNextGx
!=
null
){
List
<
Gpfk
>
gpfkList
=
gpfkDao
.
queryExistGpfk
(
gpfk
.
getWosnid
(),
existNextGx
.
getId
());
if
(
gpfkList
!=
null
&&
gpfkList
.
size
()
>
0
){
throw
new
RuntimeException
(
String
.
format
(
"下道工序【%s】已完成,不允许取消反馈!"
,
existNextGx
.
getName
()));
Wogylx
wogylx
=
gpfkDao
.
queryById
(
Wogylx
.
class
,
gpfk
.
getWogylx
());
if
(!
NumberUtils
.
equals
(
wogylx
.
getXh
(),
0
)){
Wogylx
existNextWogylx
=
gpfkDao
.
getNextGx
(
wogylx
);
if
(
existNextWogylx
!=
null
){
List
<
Gpfk
>
gpfkList
=
gpfkDao
.
queryExistGpfk
(
gpfk
.
getWosnid
(),
existNextWogylx
.
getId
());
if
(
CollectionUtils
.
isNotEmpty
(
gpfkList
)){
throw
new
RuntimeException
(
String
.
format
(
"下道工艺路线【%s】已完成,不允许取消反馈!"
,
existNextWogylx
.
getName
()));
}
}
}
gpfk
.
setId
(
gpfkid
);
delete
(
gpfk
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment