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
e07c7bc4
Commit
e07c7bc4
authored
Mar 15, 2022
by
yff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整合代码修改BUG
parent
b50bba41
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1323 additions
and
281 deletions
+1323
-281
GpfkController.java
.../main/java/com/gavel/kwell/controller/GpfkController.java
+16
-34
GphyController.java
.../main/java/com/gavel/kwell/controller/GphyController.java
+11
-26
GpfkDao.java
gavel/src/main/java/com/gavel/kwell/dao/GpfkDao.java
+10
-2
GpfkDaoImpl.java
...l/src/main/java/com/gavel/kwell/dao/impl/GpfkDaoImpl.java
+69
-34
GpfkService.java
gavel/src/main/java/com/gavel/kwell/service/GpfkService.java
+14
-6
GphyService.java
gavel/src/main/java/com/gavel/kwell/service/GphyService.java
+0
-2
GpfkServiceImpl.java
...in/java/com/gavel/kwell/service/impl/GpfkServiceImpl.java
+428
-119
GphyServiceImpl.java
...in/java/com/gavel/kwell/service/impl/GphyServiceImpl.java
+0
-57
SmCodeEnum.java
gavel/src/main/java/com/gavel/kwell/utils/SmCodeEnum.java
+17
-1
FkCondition.java
gavel/src/main/java/com/gavel/kwell/vo/FkCondition.java
+59
-0
FkVO.java
gavel/src/main/java/com/gavel/kwell/vo/FkVO.java
+678
-0
WolinkInfoVO.java
gavel/src/main/java/com/gavel/kwell/vo/WolinkInfoVO.java
+21
-0
No files found.
gavel/src/main/java/com/gavel/kwell/controller/GpfkController.java
View file @
e07c7bc4
...
...
@@ -28,9 +28,10 @@ import com.gavel.common.utils.DateUtils;
import
com.gavel.common.utils.StringUtils
;
import
com.gavel.common.utils.ThreadContext
;
import
com.gavel.gygl.vo.BzgxVO
;
import
com.gavel.kwell.persistent.Gpfk
;
import
com.gavel.kwell.service.GpfkService
;
import
com.gavel.kwell.utils.SmCodeModel
;
import
com.gavel.kwell.vo.FkCondition
;
import
com.gavel.kwell.vo.FkVO
;
import
com.gavel.kwell.vo.GpResVO
;
import
com.gavel.kwell.vo.GpbhgfkCondition
;
import
com.gavel.kwell.vo.GpbhgmxVO
;
...
...
@@ -266,24 +267,6 @@ public class GpfkController extends BaseController {
}
}
@ApiOperation
(
value
=
"扫描生产主产品条码,{\"wosnid\":111}传入条码,返回任务单信息"
)
@RequestMapping
(
value
=
"/queryKwellWoinfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
getKwellSninfo
(
@RequestBody
JSONObject
param
)
{
String
wosnid
=
param
.
getString
(
"wosnid"
);
String
bzlx
=
param
.
getString
(
"bzlx"
);
if
(
StringUtils
.
isEmpty
(
wosnid
)){
setReturnMessage
(
"条码不允许为空!"
);
return
returnData
();
}
GpfkVO
gpfk
=
gpfkService
.
queryKwellWosnWithAddGpfk
(
wosnid
,
bzlx
);
if
(
gpfk
!=
null
){
return
buildReturnData
(
gpfk
);
}
else
{
return
ThreadContext
.
getReturnData
();
}
}
@ApiOperation
(
value
=
"扫码得到wobom,{\"woid\":111}传入条码,返回任务单信息"
)
@RequestMapping
(
value
=
"/queryWoBomByWoid"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
...
...
@@ -313,18 +296,22 @@ public class GpfkController extends BaseController {
}
}
@RequestMapping
(
value
=
"/zpwl"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
query
(
@RequestBody
JSONObject
param
)
{
FkCondition
condition
=
JSONObject
.
toJavaObject
(
param
,
FkCondition
.
class
);
FkVO
gpfk
=
gpfkService
.
zpfk
(
condition
);
if
(
gpfk
!=
null
)
{
return
buildReturnData
(
gpfk
);
}
return
ThreadContext
.
getReturnData
();
}
@RequestMapping
(
value
=
"/jyfk"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
jyfk
(
@RequestBody
JSONObject
param
)
{
String
fkid
=
param
.
getString
(
"fkid"
);
String
hgsn
=
param
.
getString
(
"hgsn"
);
if
(
StringUtils
.
isEmpty
(
fkid
)||
StringUtils
.
isEmpty
(
hgsn
)){
setReturnMessage
(
"参数错误"
);
return
returnData
();
}
Gpfk
gpfk
=
gpfkService
.
jyfk
(
fkid
,
hgsn
);
FkCondition
condition
=
JSONObject
.
toJavaObject
(
param
,
FkCondition
.
class
);
FkVO
gpfk
=
gpfkService
.
jyfk
(
condition
);
if
(
gpfk
!=
null
){
return
buildReturnData
(
gpfk
);
}
else
{
...
...
@@ -335,13 +322,8 @@ public class GpfkController extends BaseController {
@RequestMapping
(
value
=
"/wxfk"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
wxfk
(
@RequestBody
JSONObject
param
)
{
String
fkid
=
param
.
getString
(
"fkid"
);
String
hgsn
=
param
.
getString
(
"hgsn"
);
if
(
StringUtils
.
isEmpty
(
fkid
)||
StringUtils
.
isEmpty
(
hgsn
)){
setReturnMessage
(
"参数错误"
);
return
returnData
();
}
Gpfk
gpfk
=
gpfkService
.
wxfk
(
fkid
,
hgsn
);
FkCondition
condition
=
JSONObject
.
toJavaObject
(
param
,
FkCondition
.
class
);
FkVO
gpfk
=
gpfkService
.
wxfk
(
condition
);
if
(
gpfk
!=
null
){
return
buildReturnData
(
gpfk
);
}
else
{
...
...
gavel/src/main/java/com/gavel/kwell/controller/GphyController.java
View file @
e07c7bc4
package
com
.
gavel
.
kwell
.
controller
;
import
com.gavel.common.BaseURL
;
import
com.gavel.common.base.BaseEditJSON
;
import
com.gavel.common.converter.DataConvert
;
import
com.gavel.common.utils.StringUtils
;
import
com.gavel.kwell.persistent.Gpfk
;
import
com.gavel.kwell.service.GpfkService
;
import
com.gavel.kwell.vo.GpfkCondition
;
import
com.gavel.kwell.vo.GpfkVO
;
import
com.gavel.persistence.sql.RecordSet
;
import
io.swagger.annotations.ApiOperation
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -18,15 +11,19 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gavel.common.BaseURL
;
import
com.gavel.common.SystemOperation
;
import
com.gavel.common.annotation.ResourcePermissions
;
import
com.gavel.common.base.BaseEditJSON
;
import
com.gavel.common.base.controller.BaseController
;
import
com.gavel.common.converter.DataConvert
;
import
com.gavel.common.utils.StringUtils
;
import
com.gavel.common.utils.ThreadContext
;
import
com.gavel.kwell.service.GpfkService
;
import
com.gavel.kwell.service.GphyService
;
import
com.gavel.kwell.vo.GphyCondition
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.gavel.kwell.vo.GpfkCondition
;
import
com.gavel.kwell.vo.GpfkVO
;
import
com.gavel.persistence.sql.RecordSet
;
@Controller
...
...
@@ -69,18 +66,6 @@ public class GphyController extends BaseController {
return
"kmes/gphy/gx"
;
}
@RequestMapping
(
value
=
"/zpwl"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
query
(
@RequestBody
JSONObject
param
)
{
GphyCondition
condition
=
JSONObject
.
toJavaObject
(
param
,
GphyCondition
.
class
);
Gpfk
gpfk
=
gphyService
.
zpwl
(
condition
);
if
(
gpfk
!=
null
)
{
return
buildReturnData
(
gpfk
);
}
return
ThreadContext
.
getReturnData
();
}
@RequestMapping
(
value
=
BaseURL
.
QUERY
,
method
=
RequestMethod
.
POST
)
@ResponseBody
...
...
gavel/src/main/java/com/gavel/kwell/dao/GpfkDao.java
View file @
e07c7bc4
...
...
@@ -12,10 +12,13 @@ import com.gavel.kwell.persistent.Gpbhgmx;
import
com.gavel.kwell.persistent.Gpfk
;
import
com.gavel.kwell.persistent.Gphy
;
import
com.gavel.kwell.persistent.Gpwxmx
;
import
com.gavel.kwell.vo.FkCondition
;
import
com.gavel.kwell.vo.FkVO
;
import
com.gavel.kwell.vo.GpWoCondition
;
import
com.gavel.kwell.vo.GpbhgmxVO
;
import
com.gavel.kwell.vo.GpfkCondition
;
import
com.gavel.kwell.vo.GpfkVO
;
import
com.gavel.kwell.vo.GphyCondition
;
import
com.gavel.kwell.vo.GpwxmxVO
;
import
com.gavel.kwell.vo.WolinkInfoVO
;
import
com.gavel.kwell.vo.WosngzVO
;
...
...
@@ -114,13 +117,13 @@ public interface GpfkDao extends BaseDao {
/**科威尔工票反馈sql */
public
WosngzVO
queryKwellWoBySnid
(
String
snid
);
public
WolinkInfo
VO
queryKwellWoBySnid
(
String
snid
,
String
bzgx
);
public
Fk
VO
queryKwellWoBySnid
(
String
snid
,
String
bzgx
);
public
List
<
WobomVO
>
queryWobomByWo
(
String
woid
,
String
bzgx
,
String
wosn
);
public
GylxVO
queryKwellWoStandGylx
(
String
djid
,
String
bzgx
);
public
GpfkVO
queryKwellGpfkByWosnAndGxid
(
Gpf
kCondition
condition
);
public
GpfkVO
queryKwellGpfkByWosnAndGxid
(
F
kCondition
condition
);
public
double
queryWobomZpslByDjidAndWlid
(
String
fkid
,
String
wlid
);
...
...
@@ -132,4 +135,9 @@ public interface GpfkDao extends BaseDao {
public
List
<
WobomVO
>
queryWobomByFkidAndWlid
(
String
fkid
,
String
wlid
,
String
bzlx
);
public
double
checkIfContainsWosn
(
String
sn
);
public
double
checkIfContainsWobomWl
(
FkCondition
fkCondition
);
public
double
checkIfContainsGphywl
(
GphyCondition
condition
);
}
gavel/src/main/java/com/gavel/kwell/dao/impl/GpfkDaoImpl.java
View file @
e07c7bc4
...
...
@@ -4,7 +4,6 @@ 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
;
...
...
@@ -21,16 +20,19 @@ import com.gavel.kwell.persistent.Gpfk;
import
com.gavel.kwell.persistent.Gphy
;
import
com.gavel.kwell.persistent.Gpwxmx
;
import
com.gavel.kwell.utils.GpfkFklxEnum
;
import
com.gavel.kwell.vo.FkCondition
;
import
com.gavel.kwell.vo.FkVO
;
import
com.gavel.kwell.vo.GpWoCondition
;
import
com.gavel.kwell.vo.GpbhgmxVO
;
import
com.gavel.kwell.vo.GpfkCondition
;
import
com.gavel.kwell.vo.GpfkVO
;
import
com.gavel.kwell.vo.GphyCondition
;
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.persistence.sql.SqlMap
;
import
com.gavel.persistence.sql.SqlUtil
;
import
com.gavel.wo.persistent.Wogylx
;
import
com.gavel.wo.vo.WobomVO
;
import
com.gavel.wo.vo.WogylxVO
;
...
...
@@ -1149,7 +1151,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
}
@Override
public
GpfkVO
queryKwellGpfkByWosnAndGxid
(
Gpf
kCondition
condition
){
public
GpfkVO
queryKwellGpfkByWosnAndGxid
(
F
kCondition
condition
){
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select GPFK_ID, GPFK_WOSNID, GPFK_FKLX, GPFK_FKSJ, GPFK_HGBZ, GPFK_FKSL, "
);
sqlMap
.
append
(
" GPFK_HGSL, GPFK_BHGSL, GPFK_FKR, GPFK_FKGX, GPFK_BZ, "
);
...
...
@@ -1166,41 +1168,17 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap
.
append
(
" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX "
);
sqlMap
.
append
(
" left join BZGX on BZGX_ID = GPFK_FKGX "
);
sqlMap
.
append
(
"where 1 = 1 "
);
if
(
StringUtils
.
isNotEmpty
(
condition
.
getId
())){
sqlMap
.
append
(
" and "
+
SqlUtil
.
getWhereSql
(
"GPFK_ID"
,
condition
.
getId
()));
sqlMap
.
setParamValue
(
"GPFK_ID"
,
condition
.
getId
());
}
if
(
StringUtils
.
isNotEmpty
(
condition
.
getGxid
())){
sqlMap
.
append
(
" and GPFK_FKGX = :pFKGX "
);
sqlMap
.
setParamValue
(
"pFKGX"
,
condition
.
getGxid
());
}
if
(
StringUtils
.
isNotEmpty
(
condition
.
getBzgxid
())){
sqlMap
.
append
(
" and
BZGX_ID = :pBZ
GX "
);
sqlMap
.
setParamValue
(
"p
BZ
GX"
,
condition
.
getBzgxid
());
sqlMap
.
append
(
" and
GPFK_FKGX = :pFK
GX "
);
sqlMap
.
setParamValue
(
"p
FK
GX"
,
condition
.
getBzgxid
());
}
if
(
StringUtils
.
isNotEmpty
(
condition
.
getWogylx
())){
sqlMap
.
append
(
" and WOGYLX_ID = :pWOGYLX "
);
sqlMap
.
setParamValue
(
"pWOGYLX"
,
condition
.
getWogylx
());
}
if
(
StringUtils
.
isNotEmpty
(
condition
.
getFkrid
())){
sqlMap
.
append
(
" and GPFK_FKRID = :pFKRID "
);
sqlMap
.
setParamValue
(
"pFKRID"
,
condition
.
getFkrid
());
}
if
(
StringUtils
.
isNotEmpty
(
condition
.
getWosnid
())){
if
(
StringUtils
.
isNotEmpty
(
condition
.
getWosncode
())){
sqlMap
.
append
(
"and GPFK_WOSNID like :pWOSNID "
);
sqlMap
.
setParamValueLike
(
"pWOSNID"
,
condition
.
getWosnid
());
}
if
(
StringUtils
.
isNotEmpty
(
condition
.
getWodjid
())){
sqlMap
.
append
(
"and WO_DJID like :pDJID "
);
sqlMap
.
setParamValueLike
(
"pDJID"
,
condition
.
getWodjid
());
}
if
(
condition
.
getStart
()
!=
null
)
{
sqlMap
.
append
(
" and GPFK_FKSJ >= :pFKSJS "
);
sqlMap
.
setParamValue
(
"pFKSJS"
,
condition
.
getStart
());
}
if
(
condition
.
getEnd
()
!=
null
)
{
sqlMap
.
append
(
" and GPFK_FKSJ <= :pFKSJE "
);
sqlMap
.
setParamValue
(
"pFKSJE"
,
condition
.
getEnd
());
sqlMap
.
setParamValueLike
(
"pWOSNID"
,
condition
.
getWosncode
());
}
sqlMap
.
append
(
"order by GPFK_FKSJ desc, GPFK_FKGX "
);
return
sqlMap
.
queryEntity
(
GpfkVO
.
class
);
...
...
@@ -1230,9 +1208,10 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
@Override
public
WolinkInfo
VO
queryKwellWoBySnid
(
String
snid
,
String
bzgx
)
{
public
Fk
VO
queryKwellWoBySnid
(
String
snid
,
String
bzgx
)
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select WO_ID,WO_ZT, WLXX_ID,WOSN_CODE,WOSN_ID,BZGX_ID,WOGYLX_ID "
);
sqlMap
.
append
(
"select WO_ID,BZGX_CODE,WO_ZT,WLXX_CODE,WLXX_GG,WLXX_ID,WOSN_CODE,WOSN_ID,BZGX_ID,WOGYLX_ID,"
);
sqlMap
.
append
(
" BZGX_NAME,WLXX_GG,WO_DJID,BZGX_GXLX,WOSN_CODE "
);
sqlMap
.
append
(
"from WOSN "
);
sqlMap
.
append
(
" left join WO on WO_ID=WOSN_WOID"
);
sqlMap
.
append
(
" left join WOGYLX on WOGYLX_WOID =WO_ID"
);
...
...
@@ -1244,7 +1223,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap
.
setParamValue
(
"pSNID"
,
snid
);
sqlMap
.
append
(
" and BZGX_ID = :pBZGXID "
);
sqlMap
.
setParamValue
(
"pBZGXID"
,
bzgx
);
return
sqlMap
.
queryEntity
(
WolinkInfo
VO
.
class
);
return
sqlMap
.
queryEntity
(
Fk
VO
.
class
);
}
...
...
@@ -1343,5 +1322,61 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
}
@Override
public
double
checkIfContainsWosn
(
String
sn
)
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select count(1) "
);
sqlMap
.
append
(
"from WOSN"
);
sqlMap
.
append
(
"where 1=1"
);
if
(
StringUtils
.
isNotEmpty
(
sn
)){
sqlMap
.
append
(
"and WOSN_CODE like :pWOSNID "
);
sqlMap
.
setParamValueLike
(
"pWOSNID"
,
sn
);
}
System
.
out
.
println
(
sqlMap
.
getSqlText
());
return
sqlMap
.
queryDouble
();
}
@Override
public
double
checkIfContainsWobomWl
(
FkCondition
fkCondition
)
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select count(1) "
);
sqlMap
.
append
(
" from WOBOM"
);
sqlMap
.
append
(
" left join WLXX on WLXX_ID = WOBOM_WLID"
);
sqlMap
.
append
(
" left join WO on WO_ID = WOBOM_WOID"
);
sqlMap
.
append
(
" left join WOSN on WOSN_WOID = WO_ID"
);
sqlMap
.
append
(
"where 1=1"
);
if
(
StringUtils
.
isNotEmpty
(
fkCondition
.
getBzgxid
())){
sqlMap
.
append
(
" and "
+
SqlUtil
.
getWhereSql
(
"WOBOM_FFGX"
,
fkCondition
.
getBzgxid
()));
sqlMap
.
setParamValue
(
"WOBOM_FFGX"
,
fkCondition
.
getBzgxid
());
}
if
(
StringUtils
.
isNotEmpty
(
fkCondition
.
getWosncode
())){
sqlMap
.
append
(
" and "
+
SqlUtil
.
getWhereSql
(
"WOSN_CODE"
,
fkCondition
.
getWosncode
()));
sqlMap
.
setParamValue
(
"WOSN_CODE"
,
fkCondition
.
getWosncode
());
}
if
(
StringUtils
.
isNotEmpty
(
fkCondition
.
getWlxxId
())){
sqlMap
.
append
(
" and "
+
SqlUtil
.
getWhereSql
(
"WLXX_ID"
,
fkCondition
.
getWlxxId
()));
sqlMap
.
setParamValue
(
"WLXX_ID"
,
fkCondition
.
getWlxxId
());
}
return
sqlMap
.
queryDouble
();
}
public
double
checkIfContainsGphywl
(
GphyCondition
condition
)
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select count(1) "
);
sqlMap
.
append
(
"from GPHY "
);
sqlMap
.
append
(
"LEFT JOIN WLXX ON WLXX_ID = GPHY_WLID "
);
sqlMap
.
append
(
"where 1 = 1 "
);
if
(
StringUtils
.
isNotEmpty
(
condition
.
getSnid
())){
sqlMap
.
append
(
" and (GPHY_WLSNID like :pSnid or WLXX_CODE like :pSnid or WLXX_NAME like :pSnid) "
);
sqlMap
.
setParamValueLike
(
"pSnid"
,
condition
.
getSnid
());
}
if
(
StringUtils
.
isNotEmpty
(
condition
.
getMid
())){
sqlMap
.
append
(
" and "
+
SqlUtil
.
getWhereSql
(
"GPHY_MID"
,
condition
.
getMid
()));
sqlMap
.
setParamValue
(
"GPHY_MID"
,
condition
.
getMid
());
}
return
sqlMap
.
queryDouble
();
}
}
gavel/src/main/java/com/gavel/kwell/service/GpfkService.java
View file @
e07c7bc4
...
...
@@ -10,6 +10,8 @@ import com.gavel.gygl.vo.BzgxVO;
import
com.gavel.gygl.vo.GylxVO
;
import
com.gavel.kwell.persistent.Gpfk
;
import
com.gavel.kwell.utils.SmCodeModel
;
import
com.gavel.kwell.vo.FkCondition
;
import
com.gavel.kwell.vo.FkVO
;
import
com.gavel.kwell.vo.GpResVO
;
import
com.gavel.kwell.vo.GpWoCondition
;
import
com.gavel.kwell.vo.GpbhgfkCondition
;
...
...
@@ -98,17 +100,23 @@ public interface GpfkService extends BaseEditService {
public
Attachment
queryWoGylxFj
(
String
djid
,
String
bzlx
);
public
GpfkVO
queryKwellWosnWithAddGpfk
(
String
wosn
,
String
bzlx
);
public
Gpfk
jyfk
(
String
fkid
,
String
hgsn
);
public
Gpfk
wxfk
(
String
fkid
,
String
hgsn
);
public
BzgxVO
login
(
String
usersn
,
String
bzgxid
);
public
void
updatePcjh
(
String
woid
,
String
fklx
,
boolean
hgbz
);
public
void
cancelPcjh
(
String
woid
,
String
fklx
,
boolean
hgbz
);
/**
* 判断序列号类型
*/
public
String
checkSnType
(
String
snid
);
public
FkVO
zpfk
(
FkCondition
fkCondition
);
public
FkVO
jyfk
(
FkCondition
fkCondition
);
public
FkVO
wxfk
(
FkCondition
fkCondition
);
/** 科威尔mes工票反馈重写--end */
}
gavel/src/main/java/com/gavel/kwell/service/GphyService.java
View file @
e07c7bc4
...
...
@@ -24,8 +24,6 @@ public interface GphyService extends BaseEditService {
public
void
queryGphyWithOrGphy
(
GphyCondition
condition
);
public
Gpfk
zpwl
(
GphyCondition
condition
);
public
boolean
compareIsZpComplete
(
String
fkid
,
String
wlid
);
public
WlslItem
querywlzpsl
(
GphyCondition
condition
);
...
...
gavel/src/main/java/com/gavel/kwell/service/impl/GpfkServiceImpl.java
View file @
e07c7bc4
This diff is collapsed.
Click to expand it.
gavel/src/main/java/com/gavel/kwell/service/impl/GphyServiceImpl.java
View file @
e07c7bc4
package
com
.
gavel
.
kwell
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.gavel.common.base.service.impl.BaseEditServiceImpl
;
import
com.gavel.common.sql.GavelSql
;
import
com.gavel.common.utils.DateUtils
;
import
com.gavel.common.utils.StringUtils
;
import
com.gavel.jcsj.service.CoderuleService
;
import
com.gavel.kwell.dao.GpfkDao
;
import
com.gavel.kwell.dao.GphyDao
;
import
com.gavel.kwell.persistent.Gpfk
;
import
com.gavel.kwell.persistent.Gphy
;
import
com.gavel.kwell.service.GpfkService
;
import
com.gavel.kwell.service.GphyService
;
import
com.gavel.kwell.utils.HzGylxEnum
;
import
com.gavel.kwell.vo.GphyCondition
;
import
com.gavel.kwell.vo.GphyVO
;
import
com.gavel.kwell.vo.GphycxVO
;
import
com.gavel.kwell.vo.WlslItem
;
import
com.gavel.persistence.sql.RecordSet
;
import
com.gavel.wo.persistent.Wobom
;
import
com.gavel.wo.persistent.Wogylx
;
import
com.gavel.wo.vo.WobomVO
;
@Service
(
"gphyService"
)
...
...
@@ -38,12 +26,6 @@ public class GphyServiceImpl extends BaseEditServiceImpl implements GphyService
@Autowired
private
GpfkDao
gpfkDao
;
@Autowired
private
GpfkService
gpfkService
;
@Autowired
private
CoderuleService
coderuleService
;
@Override
public
void
initService
()
{
addMaster
(
Gphy
.
class
);
...
...
@@ -74,45 +56,6 @@ public class GphyServiceImpl extends BaseEditServiceImpl implements GphyService
}
@Override
public
Gpfk
zpwl
(
GphyCondition
condition
)
{
List
<
GphyVO
>
dbGphy
=
gphyDao
.
queryKwellZpGphy
(
condition
).
getRecords
();
if
(
dbGphy
!=
null
&&
dbGphy
.
size
()>
0
)
{
throwReturnMessage
(
"该序列号已经被扫描"
);
}
String
wlid
=
coderuleService
.
matchCodeByRule
(
condition
.
getSnid
());
if
(
StringUtils
.
isEmpty
(
wlid
))
{
throwReturnMessage
(
"不存在该物料"
);
}
List
<
WobomVO
>
woboms
=
gpfkDao
.
queryWobomByFkidAndWlid
(
condition
.
getMid
(),
wlid
,
condition
.
getGxid
());
if
(
woboms
==
null
||
woboms
.
size
()<=
0
)
{
throwReturnMessage
(
"该订单不存在该物料"
);
}
if
(
compareIsZpComplete
(
condition
.
getFkid
(),
wlid
))
{
Gphy
gphy
=
new
Gphy
();
gphy
.
setFkgx
(
condition
.
getGxid
());
gphy
.
setWlid
(
wlid
);
gphy
.
setMid
(
condition
.
getFkid
());
gphy
.
setWlsnid
(
condition
.
getSnid
());
gphy
.
setFksj
(
DateUtils
.
getDate
());
gphy
.
setZpsl
(
1.0
);
gphy
.
setHylx
(
HzGylxEnum
.
ZP
.
getId
());
insert
(
gphy
);
}
Gpfk
gpfk
=
gpfkDao
.
queryById
(
Gpfk
.
class
,
condition
.
getFkid
());
if
(
gphyDao
.
queryIfZpwc
(
condition
)!=
0
)
{
Wogylx
wogylx
=
(
Wogylx
)
GavelSql
.
selectEntityByKey
(
Wogylx
.
class
,
gpfk
.
getWogylx
());
if
(
wogylx
!=
null
&&
StringUtils
.
isNotEmpty
(
wogylx
.
getGxbz
())&&(
wogylx
.
getGxbz
().
equals
(
"D"
)||
wogylx
.
getGxbz
().
equals
(
"M"
)))
{
if
(
StringUtils
.
isNotEmpty
(
gpfk
.
getHgbz
())&&
gpfk
.
getHgbz
().
equals
(
"N"
))
{
gpfkService
.
updatePcjh
(
wogylx
.
getWoid
(),
wogylx
.
getGxlx
(),
false
);
}
else
{
gpfkService
.
updatePcjh
(
wogylx
.
getWoid
(),
wogylx
.
getGxlx
(),
true
);
}
}
}
return
gpfk
;
}
@Override
public
boolean
compareIsZpComplete
(
String
fkid
,
String
wlid
)
{
...
...
gavel/src/main/java/com/gavel/kwell/utils/SmCodeEnum.java
View file @
e07c7bc4
...
...
@@ -8,7 +8,7 @@ public enum SmCodeEnum {
LOGOUT
(
"LOGOUT"
,
"退出"
,
"LOGOUT"
,
10
),
WOSNID
(
"WOSNID"
,
"工单序列号"
,
"2"
,
10
),
//
WLID("WLID","物料编码","D",10),
WLID
(
"WLID"
,
"物料编码"
,
"D"
,
10
),
OKBZ
(
"OKBZ"
,
"OK按钮"
,
"OK"
,
10
),
NGBZ
(
"NGBZ"
,
"NG按钮"
,
"NG"
,
10
);
...
...
@@ -70,4 +70,20 @@ public enum SmCodeEnum {
}
return
list
;
}
public
static
List
<
SmCodeModel
>
queryCommonBz
(){
List
<
SmCodeModel
>
list
=
new
ArrayList
<>();
for
(
SmCodeEnum
e
:
SmCodeEnum
.
values
())
{
if
(!
e
.
getId
().
equals
(
WOSNID
.
id
)&&!
e
.
getId
().
equals
(
WLID
.
id
))
{
SmCodeModel
moduleParams
=
new
SmCodeModel
();
moduleParams
.
setId
(
e
.
getId
());
moduleParams
.
setLen
(
e
.
getLen
());
moduleParams
.
setName
(
e
.
getName
());
moduleParams
.
setPrefix
(
e
.
getPrefix
());
list
.
add
(
moduleParams
);
}
}
return
list
;
}
}
gavel/src/main/java/com/gavel/kwell/vo/FkCondition.java
0 → 100644
View file @
e07c7bc4
package
com
.
gavel
.
kwell
.
vo
;
import
com.gavel.common.base.entity.BaseEntity
;
public
class
FkCondition
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
sncode
;
private
String
bzgxid
;
private
String
woid
;
private
String
wlxxId
;
private
String
wosncode
;
private
String
wogylx
;
private
String
wlid
;
public
String
getWlid
()
{
return
wlid
;
}
public
void
setWlid
(
String
wlid
)
{
this
.
wlid
=
wlid
;
}
public
String
getWogylx
()
{
return
wogylx
;
}
public
void
setWogylx
(
String
wogylx
)
{
this
.
wogylx
=
wogylx
;
}
public
String
getWosncode
()
{
return
wosncode
;
}
public
void
setWosncode
(
String
wosncode
)
{
this
.
wosncode
=
wosncode
;
}
public
String
getWoid
()
{
return
woid
;
}
public
void
setWoid
(
String
woid
)
{
this
.
woid
=
woid
;
}
public
String
getSncode
()
{
return
sncode
;
}
public
void
setSncode
(
String
sncode
)
{
this
.
sncode
=
sncode
;
}
public
String
getBzgxid
()
{
return
bzgxid
;
}
public
void
setBzgxid
(
String
bzgxid
)
{
this
.
bzgxid
=
bzgxid
;
}
public
String
getWlxxId
()
{
return
wlxxId
;
}
public
void
setWlxxId
(
String
wlxxId
)
{
this
.
wlxxId
=
wlxxId
;
}
}
gavel/src/main/java/com/gavel/kwell/vo/FkVO.java
0 → 100644
View file @
e07c7bc4
This diff is collapsed.
Click to expand it.
gavel/src/main/java/com/gavel/kwell/vo/WolinkInfoVO.java
View file @
e07c7bc4
package
com
.
gavel
.
kwell
.
vo
;
import
java.util.Date
;
import
com.gavel.common.base.entity.BaseEntity
;
import
com.gavel.persistence.annotation.FieldMeta
;
public
class
WolinkInfoVO
extends
BaseEntity
{
@FieldMeta
(
fieldName
=
"WOSN_ID"
,
caption
=
"WOSN编码"
)
private
String
wosnid
;
@FieldMeta
(
fieldName
=
"BZGX_CODE"
,
caption
=
"工序编码"
)
private
String
bzgxCode
;
@FieldMeta
(
fieldName
=
"BZGX_NAME"
,
caption
=
"工序名称"
)
private
String
bzgxName
;
@FieldMeta
(
fieldName
=
"WLXX_ID"
,
caption
=
"物料编码"
)
private
String
wlxxId
;
@FieldMeta
(
fieldName
=
"WLXX_CODE"
,
caption
=
"物料编码"
)
private
String
wlxxCode
;
@FieldMeta
(
fieldName
=
"WLXX_NAME"
,
caption
=
"物料名称"
)
private
String
wlxxName
;
@FieldMeta
(
fieldName
=
"WLXX_GG"
,
caption
=
"规格"
)
private
String
wlxxGg
;
@FieldMeta
(
fieldName
=
"WO_DJID"
,
caption
=
"任务单号"
)
private
String
woDjid
;
@FieldMeta
(
fieldName
=
"BZGX_GXLX"
,
caption
=
"工序类型"
)
private
String
bzgxGxlx
;
@FieldMeta
(
fieldName
=
"WLXX_ID"
,
caption
=
"物料编码"
)
private
String
wlid
;
@FieldMeta
(
fieldName
=
"WOSN_CODE"
,
caption
=
"序列号"
)
...
...
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