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
615b96c0
Commit
615b96c0
authored
Feb 15, 2022
by
周毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整代码
parent
1557f5ac
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
70 additions
and
1200 deletions
+70
-1200
pom.xml
gavel/pom.xml
+0
-54
GpwxController.java
.../main/java/com/gavel/kwell/controller/GpwxController.java
+0
-20
GpfkDao.java
gavel/src/main/java/com/gavel/kwell/dao/GpfkDao.java
+0
-20
HzWlxxDao.java
gavel/src/main/java/com/gavel/kwell/dao/HzWlxxDao.java
+0
-14
GpfkDaoImpl.java
...l/src/main/java/com/gavel/kwell/dao/impl/GpfkDaoImpl.java
+0
-156
GpfkService.java
gavel/src/main/java/com/gavel/kwell/service/GpfkService.java
+0
-10
GpfkServiceImpl.java
...in/java/com/gavel/kwell/service/impl/GpfkServiceImpl.java
+46
-822
HzWlxxServiceImpl.java
.../java/com/gavel/kwell/service/impl/HzWlxxServiceImpl.java
+0
-94
WlsnServiceImpl.java
...in/java/com/gavel/kwell/service/impl/WlsnServiceImpl.java
+2
-2
ImageToBase64.java
gavel/src/main/java/com/gavel/kwell/utils/ImageToBase64.java
+1
-2
GpResVO.java
gavel/src/main/java/com/gavel/kwell/vo/GpResVO.java
+2
-1
GpbhgfkCondition.java
gavel/src/main/java/com/gavel/kwell/vo/GpbhgfkCondition.java
+2
-1
GpfkcxVO.java
gavel/src/main/java/com/gavel/kwell/vo/GpfkcxVO.java
+1
-0
GpfkhzVO.java
gavel/src/main/java/com/gavel/kwell/vo/GpfkhzVO.java
+1
-0
GpwxResVO.java
gavel/src/main/java/com/gavel/kwell/vo/GpwxResVO.java
+2
-1
HzKcswCondition.java
gavel/src/main/java/com/gavel/kwell/vo/HzKcswCondition.java
+5
-1
HzWoVO.java
gavel/src/main/java/com/gavel/kwell/vo/HzWoVO.java
+4
-0
WlSnruleVO.java
gavel/src/main/java/com/gavel/kwell/vo/WlSnruleVO.java
+2
-1
WosnMultiVO.java
gavel/src/main/java/com/gavel/kwell/vo/WosnMultiVO.java
+2
-1
No files found.
gavel/pom.xml
View file @
615b96c0
...
...
@@ -140,30 +140,6 @@
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-kc
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-cggl
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-cgjs
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-chhs
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-bom
</artifactId>
...
...
@@ -176,48 +152,18 @@
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-zlgl
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-wo
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-jit
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-xs
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-xsjs
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.gavel.erp
</groupId>
<artifactId>
gavel-cjzy
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
gavel-local
</groupId>
<artifactId>
access-core
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
commons-fileupload
</groupId>
<artifactId>
commons-fileupload
</artifactId>
...
...
gavel/src/main/java/com/gavel/kwell/controller/GpwxController.java
View file @
615b96c0
package
com
.
gavel
.
kwell
.
controller
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -24,9 +22,6 @@ 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
com.gavel.zlgl.vo.JydmxVO
;
import
io.swagger.annotations.ApiOperation
;
@Controller
@RequestMapping
(
"kmes/gpwx"
)
...
...
@@ -80,21 +75,6 @@ public class GpwxController extends BaseController {
doExport
(
request
,
response
,
param
,
records
.
getRecords
());
}
@ApiOperation
(
value
=
"查询条码对应的不合格检验信息,传入wosnid"
)
@RequestMapping
(
value
=
"/getBhgJymx"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
getGphymx
(
@RequestBody
JSONObject
param
)
{
String
wosnid
=
param
.
getString
(
"wosnid"
);
if
(
StringUtils
.
isEmpty
(
wosnid
)){
setReturnMessage
(
"条码信息不允许为空!"
);
return
returnData
();
}
List
<
JydmxVO
>
jydmxVOList
=
gpfkService
.
queryBhgJydmxBySnid
(
wosnid
);
return
buildReturnData
(
jydmxVOList
,
JydmxVO
.
class
);
}
@ResourcePermissions
({
"21"
})
@RequestMapping
(
value
=
"/delGpwx"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
...
...
gavel/src/main/java/com/gavel/kwell/dao/GpfkDao.java
View file @
615b96c0
...
...
@@ -19,12 +19,6 @@ import com.gavel.kwell.vo.GpwxmxVO;
import
com.gavel.kwell.vo.HzWoVO
;
import
com.gavel.persistence.sql.RecordSet
;
import
com.gavel.wo.vo.WogylxVO
;
import
com.gavel.zlgl.persistent.Bhgmx
;
import
com.gavel.zlgl.persistent.Jyd
;
import
com.gavel.zlgl.persistent.Jydmx
;
import
com.gavel.zlgl.vo.JydVO
;
import
com.gavel.zlgl.vo.JydmxVO
;
import
com.gavel.zlgl.vo.JygcVO
;
public
interface
GpfkDao
extends
BaseDao
{
...
...
@@ -35,8 +29,6 @@ public interface GpfkDao extends BaseDao {
public
HzWoVO
queryWoBySnid
(
String
snid
);
public
List
<
JygcVO
>
getJygc
(
String
wlid
,
String
gxid
,
String
xtjylx
);
public
List
<
Gpfk
>
queryExistGpfk
(
String
wosnid
,
String
gxid
);
public
List
<
GpbhgmxVO
>
queryWosnGpbhg
(
String
wosnid
);
...
...
@@ -55,10 +47,6 @@ public interface GpfkDao extends BaseDao {
public
GpfkVO
queryZyjhGpfkVOByGpid
(
String
gpfkid
);
public
JydVO
queryJydVOByGpid
(
String
gpfkid
);
public
List
<
JydmxVO
>
queryJydmxVOByJydid
(
String
jydid
);
public
Gpfk
getLastExistBhgGpfk
(
String
wosnid
,
Date
endtime
);
public
List
<
GpwxmxVO
>
queryGpbhgmxVOByGpid
(
String
gpfkid
);
...
...
@@ -69,14 +57,6 @@ public interface GpfkDao extends BaseDao {
public
List
<
Gpwxmx
>
queryGpwxmxByGpid
(
String
gpfkid
);
public
Jyd
queryJydByGpid
(
String
gpfkid
);
public
List
<
Jydmx
>
queryJydmxByJydid
(
String
jydid
);
public
List
<
Bhgmx
>
queryBhgmxListByJydid
(
String
jydid
);
public
List
<
JydmxVO
>
queryJydmxVOBySnid
(
String
snid
,
String
hgbz
);
public
Bzgx
getLastGx
(
Bzgx
bzgx
);
public
Bzgx
getNextGx
(
Bzgx
bzgx
);
...
...
gavel/src/main/java/com/gavel/kwell/dao/HzWlxxDao.java
deleted
100644 → 0
View file @
1557f5ac
package
com
.
gavel
.
kwell
.
dao
;
import
com.gavel.jcsj.dao.WlxxDao
;
import
com.gavel.jcsj.vo.WlxxCondition
;
import
com.gavel.jcsj.vo.WlxxVO
;
import
com.gavel.persistence.sql.RecordSet
;
public
interface
HzWlxxDao
extends
WlxxDao
{
public
RecordSet
<
WlxxVO
>
query
(
WlxxCondition
condition
);
public
RecordSet
<
WlxxVO
>
queryWlxxCskc
(
WlxxCondition
condition
);
public
RecordSet
<
WlxxVO
>
queryWowl
(
WlxxCondition
condition
);
}
gavel/src/main/java/com/gavel/kwell/dao/impl/GpfkDaoImpl.java
View file @
615b96c0
...
...
@@ -30,13 +30,6 @@ import com.gavel.persistence.sql.RecordSet;
import
com.gavel.persistence.sql.SqlMap
;
import
com.gavel.persistence.sql.SqlUtil
;
import
com.gavel.wo.vo.WogylxVO
;
import
com.gavel.zlgl.persistent.Bhgmx
;
import
com.gavel.zlgl.persistent.Jyd
;
import
com.gavel.zlgl.persistent.Jydmx
;
import
com.gavel.zlgl.utils.JydDjlyEnum
;
import
com.gavel.zlgl.vo.JydVO
;
import
com.gavel.zlgl.vo.JydmxVO
;
import
com.gavel.zlgl.vo.JygcVO
;
@Repository
(
"gpfkDao"
)
...
...
@@ -250,40 +243,6 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
return
sqlMap
.
queryEntity
(
HzWoVO
.
class
);
}
@Override
public
List
<
JygcVO
>
getJygc
(
String
wlid
,
String
gxid
,
String
xtjylx
){
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select JYGC_ID, JYGC_CODE, JYGC_NAME, JYGC_JYLXID, JYGC_JYBZID, "
);
sqlMap
.
append
(
" JYGC_WLID, JYGC_KZFS, JYGC_YGD, JYGC_TYBZ, JYGC_TYSJ, "
);
sqlMap
.
append
(
" JYGC_BZGXID, JYGC_JYYID "
);
sqlMap
.
append
(
"from( "
);
sqlMap
.
append
(
" select JYGC_ID, JYGC_CODE, JYGC_NAME, JYGC_JYLXID, JYGC_JYBZID, "
);
sqlMap
.
append
(
" JYGC_WLID, JYGC_KZFS, JYGC_YGD, JYGC_TYBZ, JYGC_TYSJ, "
);
sqlMap
.
append
(
" JYGC_BZGXID, JYGC_JYYID, 1 as PX "
);
sqlMap
.
append
(
" from JYGC "
);
sqlMap
.
append
(
" left join JYLX on JYLX_ID = JYGC_JYLXID "
);
sqlMap
.
append
(
" where 1 = 1 "
);
sqlMap
.
append
(
" and JYLX_XTJYLXID = :pJYLX and JYGC_WLID = :pWLID "
);
sqlMap
.
append
(
" and isnull(JYGC_BZGXID,' ') = :pGXID "
);
sqlMap
.
append
(
" and isnull(JYGC_TYBZ,'N') = 'N' "
);
sqlMap
.
append
(
" union all "
);
sqlMap
.
append
(
" select JYGC_ID, JYGC_CODE, JYGC_NAME, JYGC_JYLXID, JYGC_JYBZID, "
);
sqlMap
.
append
(
" JYGC_WLID, JYGC_KZFS, JYGC_YGD, JYGC_TYBZ, JYGC_TYSJ, "
);
sqlMap
.
append
(
" JYGC_BZGXID, JYGC_JYYID, 2 as PX "
);
sqlMap
.
append
(
" from JYGC "
);
sqlMap
.
append
(
" left join JYLX on JYLX_ID = JYGC_JYLXID "
);
sqlMap
.
append
(
" where 1 = 1 "
);
sqlMap
.
append
(
" and JYLX_XTJYLXID = :pJYLX and JYGC_WLID = :pWLID "
);
sqlMap
.
append
(
" and isnull(JYGC_BZGXID,' ') = ' ' "
);
sqlMap
.
append
(
" and isnull(JYGC_TYBZ,'N') = 'N' "
);
sqlMap
.
append
(
")A "
);
sqlMap
.
append
(
"order by PX "
);
sqlMap
.
setParamValue
(
"pJYLX"
,
xtjylx
);
sqlMap
.
setParamValue
(
"pWLID"
,
wlid
);
sqlMap
.
setParamValue
(
"pGXID"
,
gxid
);
return
sqlMap
.
query
(
JygcVO
.
class
);
}
@Override
public
List
<
Gpfk
>
queryExistGpfk
(
String
wosnid
,
String
gxid
){
SqlMap
sqlMap
=
new
SqlMap
();
...
...
@@ -765,53 +724,6 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
return
sqlMap
.
queryEntity
(
GpfkVO
.
class
);
}
@Override
public
JydVO
queryJydVOByGpid
(
String
gpfkid
)
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select JYD_ID, JYD_DJID, JYD_JYLXID, JYD_DJLY, JYD_WLID, "
);
sqlMap
.
append
(
" JYD_BZGXID, JYD_KHID, JYD_JYBZID, JYD_JYFS, JYD_CYFS, "
);
sqlMap
.
append
(
" JYD_JYPH, JYD_JYRID, JYD_JYRQ, JYD_JYBMID, JYD_JYSL, "
);
sqlMap
.
append
(
" JYD_JYMS, JYD_YWBMID, JYD_HG, JYD_HGSL, JYD_RBSJSL, "
);
sqlMap
.
append
(
" JYD_BFSL, JYD_THSL, JYD_QTSL, JYD_ZT, JYD_BZ, "
);
sqlMap
.
append
(
" JYD_WFID, JYD_WFINSTID, JYD_WFPID, JYD_WFPNAME, JYD_WFWUSERID, "
);
sqlMap
.
append
(
" JYD_WFWUSERNAME, JYD_WFHUSERID, JYD_WFHUSERNAME, JYD_WHRID, JYD_WHR, "
);
sqlMap
.
append
(
" JYD_WHSJ, JYD_CJRID, JYD_CJR, JYD_CJSJ, JYD_SYSVERSION, JYD_BHGSL, "
);
sqlMap
.
append
(
" JYLX_NAME, WLXX_CODE,WLXX_NAME,BZGX_NAME,JYBZ_NAME,JYD_LYDJID, "
);
sqlMap
.
append
(
" JY.BM_NAME as JYBM_NAME,YW.BM_NAME as YWBM_NAME,KH_NAME,USERS_USERNAME "
);
sqlMap
.
append
(
"from JYD "
);
sqlMap
.
append
(
" left join JYLX on JYLX_ID = JYD_JYLXID "
);
sqlMap
.
append
(
" left join WLXX on WLXX_ID = JYD_WLID "
);
sqlMap
.
append
(
" left join BZGX on BZGX_ID = JYD_BZGXID "
);
sqlMap
.
append
(
" left join KH on KH_ID = JYD_KHID "
);
sqlMap
.
append
(
" left join JYBZ on JYBZ_ID = JYD_JYBZID "
);
sqlMap
.
append
(
" left join BM JY on JY.BM_ID = JYD_JYBMID "
);
sqlMap
.
append
(
" left join BM YW on YW.BM_ID = JYD_YWBMID "
);
sqlMap
.
append
(
" left join USERS on USERS_USERID = JYD_JYRID "
);
sqlMap
.
append
(
"where 1 = 1 "
);
sqlMap
.
append
(
" and JYD_LYDJID = :pGPFKID "
);
sqlMap
.
append
(
" and JYD_DJLY = :pDJLY "
);
sqlMap
.
setParamValue
(
"pGPFKID"
,
gpfkid
);
sqlMap
.
setParamValue
(
"pDJLY"
,
JydDjlyEnum
.
GX
.
getId
());
return
sqlMap
.
queryEntity
(
JydVO
.
class
);
}
@Override
public
List
<
JydmxVO
>
queryJydmxVOByJydid
(
String
jydid
){
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select JYDMX_ID, JYDMX_MID, JYDMX_XH, JYDMX_JYXMID, JYDMX_ZYJB, "
);
sqlMap
.
append
(
" JYDMX_ZLX, JYDMX_JYFS, JYDMX_CYFS, JYDMX_KZFS, JYDMX_YBSL, "
);
sqlMap
.
append
(
" JYDMX_HGSL, JYDMX_SXZ, JYDMX_XXZ, JYDMX_BZZ, JYDMX_JYZ, "
);
sqlMap
.
append
(
" JYDMX_HG, JYDMX_BZ, JYDMX_WHRID, JYDMX_WHR, JYDMX_WHSJ, "
);
sqlMap
.
append
(
" JYDMX_CJRID, JYDMX_CJR, JYDMX_CJSJ, JYDMX_SYSVERSION, JYDMX_BHGSL,"
);
sqlMap
.
append
(
" JYXM_CODE, JYXM_NAME,JYXM_ZYJB "
);
sqlMap
.
append
(
"from JYDMX "
);
sqlMap
.
append
(
" left join JYXM on JYXM_ID = JYDMX_JYXMID "
);
sqlMap
.
append
(
"where 1 = 1 "
);
sqlMap
.
append
(
" and JYDMX_MID = :pMID "
);
sqlMap
.
setParamValue
(
"pMID"
,
jydid
);
return
sqlMap
.
query
(
JydmxVO
.
class
);
}
@Override
public
List
<
GpwxmxVO
>
queryGpbhgmxVOByGpid
(
String
gpfkid
){
SqlMap
sqlMap
=
new
SqlMap
();
...
...
@@ -865,74 +777,6 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
return
sqlMap
.
query
(
Gpwxmx
.
class
);
}
@Override
public
Jyd
queryJydByGpid
(
String
gpfkid
)
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select JYD_ID, JYD_DJID, JYD_JYLXID, JYD_DJLY, JYD_WLID, "
);
sqlMap
.
append
(
" JYD_BZGXID, JYD_KHID, JYD_JYBZID, JYD_JYFS, JYD_CYFS, "
);
sqlMap
.
append
(
" JYD_JYPH, JYD_JYRID, JYD_JYRQ, JYD_JYBMID, JYD_JYSL, "
);
sqlMap
.
append
(
" JYD_JYMS, JYD_YWBMID, JYD_HG, JYD_HGSL, JYD_RBSJSL, "
);
sqlMap
.
append
(
" JYD_BFSL, JYD_THSL, JYD_QTSL, JYD_ZT, JYD_BZ "
);
sqlMap
.
append
(
"from JYD "
);
sqlMap
.
append
(
"where 1 = 1 "
);
sqlMap
.
append
(
" and JYD_LYDJID = :pGPFKID "
);
sqlMap
.
append
(
" and JYD_DJLY = :pDJLY "
);
sqlMap
.
setParamValue
(
"pGPFKID"
,
gpfkid
);
sqlMap
.
setParamValue
(
"pDJLY"
,
JydDjlyEnum
.
GX
.
getId
());
return
sqlMap
.
queryEntity
(
Jyd
.
class
);
}
@Override
public
List
<
Jydmx
>
queryJydmxByJydid
(
String
jydid
){
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select JYDMX_ID, JYDMX_MID, JYDMX_XH, JYDMX_JYXMID, JYDMX_ZYJB, "
);
sqlMap
.
append
(
" JYDMX_ZLX, JYDMX_JYFS, JYDMX_CYFS, JYDMX_KZFS, JYDMX_YBSL, "
);
sqlMap
.
append
(
" JYDMX_HGSL, JYDMX_SXZ, JYDMX_XXZ, JYDMX_BZZ, JYDMX_JYZ, "
);
sqlMap
.
append
(
" JYDMX_HG, JYDMX_BZ, JYDMX_WHRID, JYDMX_WHR, JYDMX_WHSJ "
);
sqlMap
.
append
(
"from JYDMX "
);
sqlMap
.
append
(
"where 1 = 1 "
);
sqlMap
.
append
(
" and JYDMX_MID = :pMID "
);
sqlMap
.
setParamValue
(
"pMID"
,
jydid
);
return
sqlMap
.
query
(
Jydmx
.
class
);
}
@Override
public
List
<
Bhgmx
>
queryBhgmxListByJydid
(
String
jydid
)
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select BHGMX_ID, BHGMX_MID, BHGMX_XXID, BHGMX_YYID, BHGMX_BHGSL, "
);
sqlMap
.
append
(
" BHGMX_BZ, BHGMX_WHRID, BHGMX_WHR, BHGMX_WHSJ, BHGMX_CJRID, "
);
sqlMap
.
append
(
" BHGMX_CJR, BHGMX_CJSJ, BHGMX_SYSVERSION "
);
sqlMap
.
append
(
"from BHGMX "
);
sqlMap
.
append
(
"where 1 = 1 "
);
sqlMap
.
append
(
" and BHGMX_MID = :pMID "
);
sqlMap
.
setParamValue
(
"pMID"
,
jydid
);
return
sqlMap
.
query
(
Bhgmx
.
class
);
}
@Override
public
List
<
JydmxVO
>
queryJydmxVOBySnid
(
String
snid
,
String
hgbz
){
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select JYDMX_ID, JYDMX_MID, JYDMX_XH, JYDMX_JYXMID, JYDMX_ZYJB, "
);
sqlMap
.
append
(
" JYDMX_ZLX, JYDMX_JYFS, JYDMX_CYFS, JYDMX_KZFS, JYDMX_YBSL, "
);
sqlMap
.
append
(
" JYDMX_HGSL, JYDMX_SXZ, JYDMX_XXZ, JYDMX_BZZ, JYDMX_JYZ, "
);
sqlMap
.
append
(
" JYDMX_HG, JYDMX_BZ, JYDMX_WHRID, JYDMX_WHR, JYDMX_WHSJ, "
);
sqlMap
.
append
(
" JYDMX_CJRID, JYDMX_CJR, JYDMX_CJSJ, JYDMX_SYSVERSION, JYDMX_BHGSL,"
);
sqlMap
.
append
(
" JYXM_CODE, JYXM_NAME, JYXM_ZYJB "
);
sqlMap
.
append
(
"from JYDMX "
);
sqlMap
.
append
(
" left join JYXM on JYXM_ID = JYDMX_JYXMID "
);
sqlMap
.
append
(
" left join JYD on JYD_ID = JYDMX_MID and JYD_DJLY = :pDJLY "
);
sqlMap
.
append
(
" left join GPFK on GPFK_ID = JYD_LYDJID "
);
sqlMap
.
append
(
"where 1 = 1 "
);
sqlMap
.
append
(
" and GPFK_WOSNID = :pSNID "
);
if
(
StringUtils
.
isNotEmpty
(
hgbz
)){
sqlMap
.
append
(
"and JYDMX_HG = :pHG "
);
sqlMap
.
setParamValue
(
"pHG"
,
hgbz
);
}
sqlMap
.
setParamValue
(
"pDJLY"
,
JydDjlyEnum
.
GX
.
getId
());
sqlMap
.
setParamValue
(
"pSNID"
,
snid
);
return
sqlMap
.
query
(
JydmxVO
.
class
);
}
@Override
public
Bzgx
getLastGx
(
Bzgx
bzgx
){
SqlMap
sqlMap
=
new
SqlMap
();
...
...
gavel/src/main/java/com/gavel/kwell/service/GpfkService.java
View file @
615b96c0
...
...
@@ -14,9 +14,7 @@ import com.gavel.kwell.vo.GpbhgmxVO;
import
com.gavel.kwell.vo.GpfkCondition
;
import
com.gavel.kwell.vo.GpfkVO
;
import
com.gavel.kwell.vo.HzWoVO
;
import
com.gavel.kzzx.model.GavelEnumModel
;
import
com.gavel.persistence.sql.RecordSet
;
import
com.gavel.zlgl.vo.JydmxVO
;
public
interface
GpfkService
extends
BaseEditService
{
...
...
@@ -70,16 +68,8 @@ public interface GpfkService extends BaseEditService {
public
void
delGpwxById
(
String
gpfkid
);
public
void
delGpjyById
(
String
gpfkid
);
public
List
<
JydmxVO
>
queryBhgJydmxBySnid
(
String
snid
);
public
GpfkVO
getDailyGpfkInfo
(
GpfkCondition
gpfkCondition
);
public
void
delZyjhGpfk
(
String
gpfkid
);
public
List
<
GavelEnumModel
>
getBxPeriod
(
String
bxid
);
public
RecordSet
<
GpfkVO
>
queryLh
(
GpfkCondition
condition
);
public
Date
getGpfkYwrqByFksj
(
Date
nowDate
);
...
...
gavel/src/main/java/com/gavel/kwell/service/impl/GpfkServiceImpl.java
View file @
615b96c0
package
com
.
gavel
.
kwell
.
service
.
impl
;
import
com.gavel.cjzy.utils.ZyjhStateEnum
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.gavel.common.base.entity.BaseEntity
;
import
com.gavel.common.base.service.impl.BaseEditServiceImpl
;
import
com.gavel.common.business.service.CommonService
;
import
com.gavel.common.sql.GavelSql
;
import
com.gavel.common.utils.*
;
import
com.gavel.common.utils.BooleanEnum
;
import
com.gavel.common.utils.CodeStrategy
;
import
com.gavel.common.utils.DateUtils
;
import
com.gavel.common.utils.NumberUtils
;
import
com.gavel.common.utils.StringUtils
;
import
com.gavel.common.utils.ThreadContext
;
import
com.gavel.common.utils.UserInfoUtil
;
import
com.gavel.gygl.persistent.Bzgx
;
import
com.gavel.gygl.utils.GyglParamEnum
;
import
com.gavel.gygl.vo.BzgxCondition
;
import
com.gavel.gygl.vo.BzgxVO
;
import
com.gavel.gygl.vo.GylxVO
;
import
com.gavel.jcsj.service.WxxmService
;
import
com.gavel.jcsj.vo.WxxmCondition
;
import
com.gavel.jcsj.vo.WxxmVO
;
import
com.gavel.kwell.dao.GpfkDao
;
import
com.gavel.kwell.dao.GphyDao
;
import
com.gavel.kwell.persistent.*
;
import
com.gavel.kwell.service.GpbhgmxService
;
import
com.gavel.kwell.persistent.Gpbhgmx
;
import
com.gavel.kwell.persistent.Gpfk
;
import
com.gavel.kwell.persistent.Gpwxmx
;
import
com.gavel.kwell.persistent.HzWosn
;
import
com.gavel.kwell.service.GpfkService
;
import
com.gavel.kwell.service.GpwxmxService
;
import
com.gavel.kwell.utils.*
;
import
com.gavel.kwell.vo.*
;
import
com.gavel.kzzx.model.GavelEnumModel
;
import
com.gavel.kzzx.persistent.User
;
import
com.gavel.kzzx.service.UserService
;
import
com.gavel.kzzx.utils.TybzEnum
;
import
com.gavel.kwell.utils.GpfkFklxEnum
;
import
com.gavel.kwell.utils.HzGylxEnum
;
import
com.gavel.kwell.utils.HzgdParamEnum
;
import
com.gavel.kwell.vo.GpResVO
;
import
com.gavel.kwell.vo.GpWoCondition
;
import
com.gavel.kwell.vo.GpbhgfkCondition
;
import
com.gavel.kwell.vo.GpbhgmxVO
;
import
com.gavel.kwell.vo.GpfkCondition
;
import
com.gavel.kwell.vo.GpfkVO
;
import
com.gavel.kwell.vo.HzWoVO
;
import
com.gavel.persistence.sql.RecordSet
;
import
com.gavel.zlgl.persistent.Bhgmx
;
import
com.gavel.zlgl.persistent.Jyd
;
import
com.gavel.zlgl.persistent.Jydmx
;
import
com.gavel.zlgl.service.BhgmxService
;
import
com.gavel.zlgl.service.JybzService
;
import
com.gavel.zlgl.service.JybzmxService
;
import
com.gavel.zlgl.utils.JydDjlyEnum
;
import
com.gavel.zlgl.utils.JydztEnum
;
import
com.gavel.zlgl.utils.JyfsEnum
;
import
com.gavel.zlgl.utils.XtjylxEnum
;
import
com.gavel.zlgl.vo.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.io.File
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
@Service
(
"gpfkService"
)
...
...
@@ -56,23 +51,6 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
@Autowired
private
GpfkDao
gpfkDao
;
@Autowired
private
GpbhgmxService
gpbhgmxService
;
@Autowired
private
JybzmxService
jybzmxService
;
@Autowired
private
JybzService
jybzService
;
@Autowired
private
UserService
userService
;
@Autowired
private
BhgmxService
bhgmxService
;
@Autowired
private
GpwxmxService
gpwxmxService
;
@Autowired
private
WxxmService
wxxmService
;
@Autowired
private
CommonService
commonService
;
...
...
@@ -501,9 +479,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
/**
* insGpbhg
*/
if
(
gpbhgmxList
!=
null
&&
gpbhgmxList
.
size
()
>
0
){
/*
if(gpbhgmxList != null && gpbhgmxList.size() > 0){
gpbhgmxService.doInsGpbhg(gpbhgmxList);
}
}
*/
gpResVO
.
setHzWoVO
(
hzWoVO
);
gpResVO
.
setGpfk
(
gpfk
);
gpResVO
.
setGpbhgmxList
(
gpbhgmxList
);
...
...
@@ -532,19 +510,17 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
Gpfk
gpfk
=
getGpfkByVo
(
gpfkInfo
);
gpfk
.
setFklx
(
GpfkFklxEnum
.
WO
.
getId
());
List
<
GpbhgmxVO
>
gpbhgmxVOList
=
gpbhgfkCondition
.
getGpbhgmxList
();
List
<
Gpbhgmx
>
gpbhgmxList
=
new
ArrayList
<
Gpbhgmx
>();
if
(
gpbhgmxVOList
==
null
||
gpbhgmxVOList
.
size
()
==
0
){
/**
/*
if(gpbhgmxVOList == null || gpbhgmxVOList.size() == 0){
*/
/**
* 没有不合格信息,则设置为合格
*/
*/
/*
// gpfk.setHgbz(BooleanEnum.YES.getId());
}else{
gpbhgmxList = gpbhgmxService.getGpbhgFromVo(gpfk, gpbhgmxVOList);
}
*/
GpResVO
gpResVO
=
new
GpResVO
();
gpResVO
.
setDcsm
(
BooleanEnum
.
NO
.
getId
());
if
(
BooleanEnum
.
equalsYes
(
gpfk
.
getHgbz
())){
...
...
@@ -571,386 +547,15 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
/**
* insGpbhg
*/
if
(
gpbhgmxList
!=
null
&&
gpbhgmxList
.
size
()
>
0
){
/*
if(gpbhgmxList != null && gpbhgmxList.size() > 0){
gpbhgmxService.doInsGpbhg(gpbhgmxList);
}
}
*/
gpResVO
.
setHzWoVO
(
hzWoVO
);
gpResVO
.
setGpfk
(
gpfk
);
gpResVO
.
setGpbhgmxList
(
gpbhgmxList
);
return
gpResVO
;
}
@Override
public
GpfkJybzinfoVO
getJyInfoBySnid
(
String
snid
,
String
gxid
){
HzWoVO
hzWoVO
=
queryWoBySnid
(
snid
);
if
(
hzWoVO
==
null
){
setReturnMessage
(
"生产条码信息异常,请重新扫描!"
);
return
null
;
}
String
lhids
=
commonService
.
getStringOptionValue
(
HzgdParamEnum
.
HZGD_GXLX_LH
.
getId
());
String
[]
lhgxs
=
lhids
.
split
(
","
);
GpfkVO
lastGpfk
=
gpfkDao
.
getLastGpfk
(
snid
,
lhgxs
);
if
(
lastGpfk
!=
null
){
String
allowContinueIds
=
commonService
.
getStringOptionValue
(
HzgdParamEnum
.
HZGD_GXLX_NGCONTINUE
.
getId
());
if
(
StringUtils
.
equalsIgnoreCase
(
gxid
,
lastGpfk
.
getFkgx
())
&&
(!
allowContinueIds
.
contains
(
gxid
)
||
BooleanEnum
.
equalsYes
(
lastGpfk
.
getHgbz
()))){
setReturnMessage
(
"请不要连续扫描!"
);
return
null
;
}
}
if
(
lastGpfk
!=
null
&&
lastGpfk
.
getBzgxGxlx
().
equalsIgnoreCase
(
HzGylxEnum
.
LH
.
getId
())){
if
(
lastGpfk
.
getFkjssj
()
==
null
){
setReturnMessage
(
"请先完成老化扫描!"
);
return
null
;
}
}
Bzgx
bzgx
=
(
Bzgx
)
GavelSql
.
selectEntityByKey
(
Bzgx
.
class
,
gxid
);
if
(
bzgx
==
null
)
{
setReturnMessage
(
"标准工序不存在!"
);
return
null
;
}
else
if
(
com
.
gavel
.
common
.
utils
.
StringUtils
.
equalsIgnoreCase
(
bzgx
.
getTybz
(),
BooleanEnum
.
YES
.
getId
()))
{
setReturnMessage
(
String
.
format
(
"标准工序【%s】已停用!"
,
bzgx
.
getName
()));
return
null
;
}
// if(!NumberUtils.equals(bzgx.getXh(),0)){
// Bzgx existLastGx = gpfkDao.getLastGx(bzgx);
// if(existLastGx != null){
// List<Gpfk> gpfkList = gpfkDao.queryExistGpfk(snid,existLastGx.getId());
// if(gpfkList == null || gpfkList.size() == 0){
// setReturnMessage("上道工序【%s】尚未完成,不允许反馈!", existLastGx.getName());
// return null;
// }
// }
// }
GylxVO
gylxVO
=
gpfkDao
.
queryLastGylxByWlidGx
(
hzWoVO
.
getWlid
(),
bzgx
.
getId
());
Bzgx
existLastGx
=
null
;
if
(
gylxVO
!=
null
){
existLastGx
=
gpfkDao
.
queryLastBzgxByWlidXh
(
hzWoVO
.
getWlid
(),
gylxVO
.
getXh
());
}
else
{
if
(!
NumberUtils
.
equals
(
bzgx
.
getXh
(),
0
)){
existLastGx
=
gpfkDao
.
getLastGx
(
bzgx
);
}
}
if
(
existLastGx
!=
null
){
List
<
Gpfk
>
gpfkList
=
gpfkDao
.
queryExistGpfk
(
snid
,
existLastGx
.
getId
());
if
(
gpfkList
==
null
||
gpfkList
.
size
()
==
0
){
setReturnMessage
(
String
.
format
(
"上道工序【%s】尚未完成,不允许反馈!"
,
existLastGx
.
getName
()));
return
null
;
}
}
String
jywlid
=
hzWoVO
.
getWlid
();
List
<
JygcVO
>
jygcVOList
=
gpfkDao
.
getJygc
(
jywlid
,
gxid
,
XtjylxEnum
.
GXJY
.
getId
());
if
(
jygcVOList
==
null
||
jygcVOList
.
size
()
==
0
){
setReturnMessage
(
"请先维护当前产品的工序检验规程!"
);
return
null
;
}
else
{
JygcVO
usedJygc
=
jygcVOList
.
get
(
0
);
JybzCondition
jybzCondition
=
new
JybzCondition
();
jybzCondition
.
setId
(
usedJygc
.
getJybzid
());
jybzCondition
.
setTybz
(
TybzEnum
.
NORMAL
.
getId
());
RecordSet
<
JybzVO
>
jybzVORecordSet
=
jybzService
.
query
(
jybzCondition
);
JybzVO
usedJybz
=
new
JybzVO
();
if
(
jybzVORecordSet
!=
null
){
List
<
JybzVO
>
jybzVoList
=
jybzVORecordSet
.
getRecords
();
if
(
jybzVoList
!=
null
&&
jybzVoList
.
size
()
>
0
){
usedJybz
=
jybzVoList
.
get
(
0
);
}
else
{
setReturnMessage
(
"当前产品的检验标准异常,请先维护检验标准!"
);
return
null
;
}
}
else
{
setReturnMessage
(
"当前产品的检验标准异常,请先维护检验标准!"
);
return
null
;
}
JybzmxCondition
jybzmxCondition
=
new
JybzmxCondition
();
jybzmxCondition
.
setMid
(
usedJygc
.
getJybzid
());
RecordSet
<
JybzmxVO
>
jybzmxVORecordSet
=
jybzmxService
.
query
(
jybzmxCondition
);
if
(
jybzmxVORecordSet
!=
null
){
List
<
JybzmxVO
>
jybzmxVOList
=
jybzmxVORecordSet
.
getRecords
();
if
(
jybzmxVOList
!=
null
&&
jybzmxVOList
.
size
()
>
0
){
GpfkJybzinfoVO
gpfkJybzinfoVO
=
new
GpfkJybzinfoVO
();
gpfkJybzinfoVO
.
setJybzVO
(
usedJybz
);
gpfkJybzinfoVO
.
setJybzmxVOList
(
jybzmxVOList
);
gpfkJybzinfoVO
.
setHzWoVO
(
hzWoVO
);
return
gpfkJybzinfoVO
;
}
else
{
setReturnMessage
(
"当前产品的检验标准异常,请先维护检验标准!"
);
return
null
;
}
}
else
{
setReturnMessage
(
"当前产品的检验标准异常,请先维护检验标准!"
);
return
null
;
}
}
}
@Override
public
GpJyResVO
doGpjyfk
(
GpfkJyjgVO
gpfkJyjgVO
){
GpfkVO
gpfkInfo
=
gpfkJyjgVO
.
getGpfkVO
();
if
(
gpfkInfo
==
null
||
StringUtils
.
isEmpty
(
gpfkInfo
.
getWosnid
())){
setReturnMessage
(
"条码信息不允许为空,请检查!"
);
return
null
;
}
if
(
StringUtils
.
isEmpty
(
gpfkInfo
.
getFkgx
())){
setReturnMessage
(
"反馈工序不允许为空,请检查!"
);
return
null
;
}
JydVO
jydVO
=
gpfkJyjgVO
.
getJydVO
();
if
(
jydVO
==
null
){
setReturnMessage
(
"检验单信息异常,请重新反馈!"
);
return
null
;
}
List
<
JydmxVO
>
jydmxVOList
=
gpfkJyjgVO
.
getJydmxVOList
();
if
(
jydmxVOList
==
null
||
jydmxVOList
.
size
()
==
0
){
setReturnMessage
(
"检验单明细信息异常,请重新反馈!"
);
return
null
;
}
HzWoVO
hzWoVO
=
queryWoBySnid
(
gpfkInfo
.
getWosnid
());
if
(
hzWoVO
==
null
){
setReturnMessage
(
"当前产品任务单信息异常,请重新扫描!"
);
return
null
;
}
jydVO
.
setWlid
(
hzWoVO
.
getWlid
());
List
<
BhgmxVO
>
bhgmxVOList
=
gpfkJyjgVO
.
getBhgmxVOList
();
gpfkInfo
.
setWlid
(
hzWoVO
.
getWlid
());
Gpfk
gpfk
=
getGpfkByVo
(
gpfkInfo
);
Jyd
jyd
=
getJydFromVO
(
gpfk
,
jydVO
);
List
<
Bhgmx
>
bhgmxList
=
new
ArrayList
<
Bhgmx
>();
List
<
Gpbhgmx
>
gpbhgmxList
=
new
ArrayList
<>();
if
(
bhgmxVOList
==
null
||
bhgmxVOList
.
size
()
==
0
){
/**
* 没有不合格信息,但设置为了不合格
*/
if
(!
BooleanEnum
.
equalsYes
(
gpfk
.
getHgbz
())){
setReturnMessage
(
"检验为不合格时,不合格信息不允许为空!"
);
return
null
;
}
}
else
{
/**
* 存在不合格信息但设置为合格
*/
if
(
BooleanEnum
.
equalsYes
(
gpfk
.
getHgbz
())){
setReturnMessage
(
"存在不合格信息,不允许进行合格判定,请重新提交!"
);
return
null
;
}
bhgmxList
=
getBhgFromVo
(
jyd
,
bhgmxVOList
);
gpbhgmxList
=
getGpbhgFromBhgList
(
gpfk
,
bhgmxVOList
);
}
List
<
Jydmx
>
jydmxList
=
getJydmxFromVO
(
jyd
,
jydmxVOList
);
doInsGpfk
(
gpfk
);
doInsJyd
(
jyd
);
if
(
bhgmxList
!=
null
&&
bhgmxList
.
size
()
>
0
){
bhgmxService
.
doInsBhg
(
bhgmxList
);
}
if
(
gpbhgmxList
!=
null
&&
gpbhgmxList
.
size
()
>
0
){
gpbhgmxService
.
doInsGpbhg
(
gpbhgmxList
);
}
doInsJydmx
(
jydmxList
);
GpJyResVO
gpJyResVO
=
new
GpJyResVO
();
gpJyResVO
.
setGpfk
(
gpfk
);
gpJyResVO
.
setHzWoVO
(
hzWoVO
);
gpJyResVO
.
setBhgmxList
(
bhgmxList
);
gpJyResVO
.
setJyd
(
jyd
);
gpJyResVO
.
setJydmxList
(
jydmxList
);
return
gpJyResVO
;
}
public
List
<
Bhgmx
>
getBhgFromVo
(
Jyd
jyd
,
List
<
BhgmxVO
>
bhgmxVOList
){
List
<
Bhgmx
>
bhgmxList
=
new
ArrayList
<
Bhgmx
>(
bhgmxVOList
.
size
());
for
(
BhgmxVO
bhgmxVO
:
bhgmxVOList
)
{
Bhgmx
bhgmx
=
new
Bhgmx
();
bhgmx
.
setMid
(
jyd
.
getId
());
bhgmx
.
setXxid
(
bhgmxVO
.
getXxid
());
bhgmx
.
setYyid
(
bhgmxVO
.
getYyid
());
if
(
bhgmxVO
.
getBhgsl
()
!=
null
&&
NumberUtils
.
equals
(
bhgmxVO
.
getBhgsl
(),
0
d
)){
bhgmx
.
setBhgsl
(
1
d
);
}
else
{
bhgmx
.
setBhgsl
(
bhgmxVO
.
getBhgsl
());
}
bhgmx
.
setBz
(
bhgmxVO
.
getBz
());
bhgmxList
.
add
(
bhgmx
);
}
return
bhgmxList
;
}
public
List
<
Gpbhgmx
>
getGpbhgFromBhgList
(
Gpfk
gpfk
,
List
<
BhgmxVO
>
bhgmxVOList
){
List
<
Gpbhgmx
>
bhgmxList
=
new
ArrayList
<
Gpbhgmx
>(
bhgmxVOList
.
size
());
for
(
BhgmxVO
bhgmxVO
:
bhgmxVOList
)
{
Gpbhgmx
gpbhgmx
=
new
Gpbhgmx
();
gpbhgmx
.
setMid
(
gpfk
.
getId
());
gpbhgmx
.
setXxid
(
bhgmxVO
.
getXxid
());
gpbhgmx
.
setYyid
(
bhgmxVO
.
getYyid
());
if
(
bhgmxVO
.
getBhgsl
()
!=
null
&&
NumberUtils
.
equals
(
bhgmxVO
.
getBhgsl
(),
0
d
)){
gpbhgmx
.
setBhgsl
(
1
d
);
}
else
{
gpbhgmx
.
setBhgsl
(
bhgmxVO
.
getBhgsl
());
}
gpbhgmx
.
setBhgsl
(
bhgmxVO
.
getBhgsl
());
gpbhgmx
.
setBz
(
bhgmxVO
.
getBz
());
bhgmxList
.
add
(
gpbhgmx
);
}
return
bhgmxList
;
}
public
void
doInsJyd
(
Jyd
jyd
){
if
(
validJyd
(
jyd
)){
gpfkDao
.
insert
(
jyd
);
}
else
{
throwReturnMessage
(
ThreadContext
.
getReturnData
().
getMessage
());
}
}
public
Jyd
getJydFromVO
(
Gpfk
gpfk
,
JydVO
jydVO
){
Jyd
jyd
=
new
Jyd
();
String
jydid
=
CodeStrategy
.
getUUID
();
if
(
com
.
gavel
.
common
.
utils
.
StringUtils
.
isEmpty
(
jydVO
.
getDjid
())){
jyd
.
setDjid
(
commonService
.
getOrderID
(
"JYD"
,
DateUtils
.
getDatetimeStr
(
"yyyyMM"
),
12
));
}
jyd
.
setWlid
(
jydVO
.
getWlid
());
jyd
.
setZt
(
JydztEnum
.
Test
.
getId
());
jyd
.
setId
(
jydid
);
jyd
.
setHgsl
(
gpfk
.
getHgsl
());
jyd
.
setBhgsl
(
gpfk
.
getBhgsl
());
jyd
.
setHg
(
gpfk
.
getHgbz
());
jyd
.
setBzgxid
(
gpfk
.
getFkgx
());
jyd
.
setJyrid
(
gpfk
.
getFkrid
());
jyd
.
setJyrq
(
gpfk
.
getFksj
());
/**
* 工票检验检验母数=检验数量,全检
*/
jyd
.
setJysl
(
gpfk
.
getFksl
());
if
(
NumberUtils
.
isZero
(
jydVO
.
getJyms
())){
jyd
.
setJyms
(
jyd
.
getJysl
());
}
if
(
StringUtils
.
isEmpty
(
jydVO
.
getJyfs
())){
jyd
.
setJyfs
(
JyfsEnum
.
QJ
.
getId
());
}
else
{
jyd
.
setJyfs
(
jydVO
.
getJyfs
());
}
jyd
.
setJybzid
(
jydVO
.
getJybzid
());
jyd
.
setJylxid
(
jydVO
.
getJylxid
());
jyd
.
setJyph
(
jydVO
.
getJyph
());
jyd
.
setDjly
(
JydDjlyEnum
.
GX
.
getId
());
jyd
.
setLydjid
(
gpfk
.
getId
());
jyd
.
setBz
(
gpfk
.
getBz
());
User
loginUser
=
userService
.
queryByUserid
(
gpfk
.
getFkrid
());
if
(
loginUser
!=
null
){
jyd
.
setJybmid
(
loginUser
.
getBmid
());
}
return
jyd
;
}
public
boolean
validJyd
(
Jyd
jyd
){
if
(
StringUtils
.
isEmpty
(
jyd
.
getBzgxid
())){
setReturnMessage
(
"工序不允许为空!"
);
return
false
;
}
if
(
StringUtils
.
isEmpty
(
jyd
.
getJylxid
())){
setReturnMessage
(
"检验类型不允许为空!"
);
return
false
;
}
if
(
StringUtils
.
isEmpty
(
jyd
.
getJybzid
())){
setReturnMessage
(
"检验标准不允许为空!"
);
return
false
;
}
if
(
StringUtils
.
isEmpty
(
jyd
.
getHg
())){
setReturnMessage
(
"合格标志不允许为空!"
);
return
false
;
}
if
(
StringUtils
.
isEmpty
(
jyd
.
getJyfs
())){
setReturnMessage
(
"检验方式不允许为空!"
);
}
if
(
NumberUtils
.
lessEqual
(
jyd
.
getJysl
(),
0
d
)){
setReturnMessage
(
"检验数量不允许小于或等于0!"
);
return
false
;
}
if
(
NumberUtils
.
isZero
(
jyd
.
getHgsl
())
&&
NumberUtils
.
isZero
(
jyd
.
getBhgsl
()))
{
setReturnMessage
(
"合格数量和不合格数量不允许同时为空!"
);
return
false
;
}
return
true
;
}
public
List
<
Jydmx
>
getJydmxFromVO
(
Jyd
jyd
,
List
<
JydmxVO
>
jydmxVOList
){
List
<
Jydmx
>
jydmxList
=
new
ArrayList
<
Jydmx
>(
jydmxVOList
.
size
());
int
xh
=
1
;
for
(
JydmxVO
jydmxVO
:
jydmxVOList
)
{
Jydmx
jydmx
=
new
Jydmx
();
jydmx
.
setMid
(
jyd
.
getId
());
jydmx
.
setHg
(
jydmxVO
.
getHg
());
jydmx
.
setHgsl
(
jydmxVO
.
getHgsl
());
jydmx
.
setBhgsl
(
jydmxVO
.
getBhgsl
());
// jydmx.setHg(BooleanEnum.YES.getId());
// jydmx.setHgsl(1d);
// jydmx.setBhgsl(0d);
jydmx
.
setXh
(
xh
);
jydmx
.
setZyjb
(
jydmxVO
.
getZyjb
());
jydmx
.
setJyxmid
(
jydmxVO
.
getJyxmid
());
if
(
StringUtils
.
isEmpty
(
jydmxVO
.
getJyfs
())){
jydmx
.
setJyfs
(
JyfsEnum
.
QJ
.
getId
());
}
else
{
jydmx
.
setJyfs
(
jydmxVO
.
getJyfs
());
}
jydmx
.
setKzfs
(
jydmxVO
.
getKzfs
());
jydmx
.
setSxz
(
jydmxVO
.
getSxz
());
jydmx
.
setXxz
(
jydmxVO
.
getXxz
());
jydmx
.
setBzz
(
jydmxVO
.
getBzz
());
jydmx
.
setJyz
(
jydmxVO
.
getJyz
());
jydmx
.
setYbsl
(
jydmxVO
.
getYbsl
());
jydmx
.
setZlx
(
jydmxVO
.
getZlx
());
jydmx
.
setBz
(
jydmxVO
.
getBz
());
jydmxList
.
add
(
jydmx
);
xh
++;
}
return
jydmxList
;
}
public
void
doInsJydmx
(
List
<
Jydmx
>
jydmxList
){
if
(
validJydmx
(
jydmxList
)){
gpfkDao
.
batchAdd
(
jydmxList
);
}
else
{
throwReturnMessage
(
ThreadContext
.
getReturnData
().
getMessage
());
}
}
private
boolean
validJydmx
(
List
<
Jydmx
>
jydmxList
){
if
(
jydmxList
!=
null
&&
jydmxList
.
size
()
>
0
){
for
(
Jydmx
jydmx:
jydmxList
){
if
(
StringUtils
.
isEmpty
(
jydmx
.
getJyxmid
())){
setReturnMessage
(
"检验项目不允许为空!"
);
return
false
;
}
if
(
StringUtils
.
isEmpty
(
jydmx
.
getJyfs
())){
setReturnMessage
(
"检验方式不允许为空!"
);
return
false
;
}
if
(
NumberUtils
.
isZero
(
jydmx
.
getHgsl
())
&&
NumberUtils
.
isZero
(
jydmx
.
getBhgsl
()))
{
setReturnMessage
(
"合格数量和不合格数量不允许同时为空!"
);
return
false
;
}
if
(
StringUtils
.
isEmpty
(
jydmx
.
getHg
())){
setReturnMessage
(
"合格标志不允许为空!"
);
return
false
;
}
}
}
return
true
;
}
@Override
public
GpResVO
doGplhfk
(
GpbhgfkCondition
gpbhgfkCondition
){
GpfkVO
gpfkInfo
=
gpbhgfkCondition
.
getGpfkVO
();
...
...
@@ -985,26 +590,25 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
}
existGpfk
=
getLhgpfk
(
existGpfk
,
gpfkInfo
);
List
<
GpbhgmxVO
>
gpbhgmxVOList
=
gpbhgfkCondition
.
getGpbhgmxList
();
List
<
Gpbhgmx
>
gpbhgmxList
=
new
ArrayList
<
Gpbhgmx
>();
if
(
gpbhgmxVOList
==
null
||
gpbhgmxVOList
.
size
()
==
0
){
/**
/*
if(gpbhgmxVOList == null || gpbhgmxVOList.size() == 0){
*/
/**
* 没有不合格信息,则设置为合格
*/
*/
/*
existGpfk.setHgbz(BooleanEnum.YES.getId());
}else{
gpbhgmxList = gpbhgmxService.getGpbhgFromVo(existGpfk, gpbhgmxVOList);
}
}
*/
/**
* 大屏老化走更新操作的时候(老化结束),需要检验连续扫描
*/
doUpdGpfk
(
existGpfk
);
// doUpdDpGpfk(existGpfk);
/*
if(gpbhgmxList != null && gpbhgmxList.size() > 0){
gpbhgmxService.doInsGpbhg(gpbhgmxList);
}
}
*/
int
gxhs
=
DateUtils
.
betweenMinute
(
existGpfk
.
getFksj
(),
existGpfk
.
getFkjssj
());
...
...
@@ -1016,213 +620,6 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
return
gpResVO
;
}
@Override
public
GpWxInfoVO
getGpwxinfo
(
String
wosnid
,
String
gxid
){
HzWoVO
HzWoVO
=
queryWoBySnid
(
wosnid
);
if
(
HzWoVO
==
null
){
setReturnMessage
(
"当前产品任务单信息异常,请检查!"
);
return
null
;
}
String
lhids
=
commonService
.
getStringOptionValue
(
HzgdParamEnum
.
HZGD_GXLX_LH
.
getId
());
String
[]
lhgxs
=
lhids
.
split
(
","
);
GpfkVO
lastGpfk
=
gpfkDao
.
getLastGpfk
(
wosnid
,
lhgxs
);
if
(
lastGpfk
!=
null
){
String
allowContinueIds
=
commonService
.
getStringOptionValue
(
HzgdParamEnum
.
HZGD_GXLX_NGCONTINUE
.
getId
());
if
(
StringUtils
.
equalsIgnoreCase
(
gxid
,
lastGpfk
.
getFkgx
())
&&
(!
allowContinueIds
.
contains
(
gxid
)
||
BooleanEnum
.
equalsYes
(
lastGpfk
.
getHgbz
()))){
setReturnMessage
(
"请不要连续扫描!"
);
return
null
;
}
}
// Gpfk lastBhgGpfk = gpfkDao.getLastExistBhgGpfk(wosnid,null);
// if(lastBhgGpfk == null){
// setReturnMessage("当前产品没有待维修信息,请检查!");
// return null;
// }
//
// List<GpbhgmxVO> gpbhgmxVOList = gpfkDao.queryWosnGpbhgByfkid(lastBhgGpfk.getId());
// if(gpbhgmxVOList == null || gpbhgmxVOList.size() == 0){
// setReturnMessage("当前产品没有待维修信息,请检查!");
// return null;
// }
List
<
GpbhgmxVO
>
gpbhgmxVOList
=
gpfkDao
.
queryWosnGpbhgBySnid
(
wosnid
);
if
(
gpbhgmxVOList
==
null
||
gpbhgmxVOList
.
size
()
==
0
){
setReturnMessage
(
"当前产品没有待维修信息,请检查!"
);
return
null
;
}
WxxmCondition
wxxmCondition
=
new
WxxmCondition
();
wxxmCondition
.
setWlid
(
HzWoVO
.
getWlid
());
List
<
WxxmVO
>
wxxmVOList
=
wxxmService
.
queryMatchWxxm
(
wxxmCondition
);
GpWxInfoVO
gpWxInfoVO
=
new
GpWxInfoVO
();
gpWxInfoVO
.
setHzWoVO
(
HzWoVO
);
gpWxInfoVO
.
setGpbhgmxVOList
(
gpbhgmxVOList
);
gpWxInfoVO
.
setWxxmVOList
(
wxxmVOList
);
return
gpWxInfoVO
;
}
@Override
public
GpWxInfoVO
getSuperGpwxinfo
(
String
wosnid
,
String
gxid
){
HzWoVO
HzWoVO
=
queryWoBySnid
(
wosnid
);
if
(
HzWoVO
==
null
){
setReturnMessage
(
"当前产品任务单信息异常,请检查!"
);
return
null
;
}
List
<
GpbhgmxVO
>
gpbhgmxVOList
=
gpfkDao
.
queryWosnGpbhgBySnid
(
wosnid
);
if
(
gpbhgmxVOList
==
null
||
gpbhgmxVOList
.
size
()
==
0
){
gpbhgmxVOList
=
new
ArrayList
<
GpbhgmxVO
>();
}
WxxmCondition
wxxmCondition
=
new
WxxmCondition
();
wxxmCondition
.
setWlid
(
HzWoVO
.
getWlid
());
List
<
WxxmVO
>
wxxmVOList
=
wxxmService
.
queryMatchWxxm
(
wxxmCondition
);
GpWxInfoVO
gpWxInfoVO
=
new
GpWxInfoVO
();
gpWxInfoVO
.
setHzWoVO
(
HzWoVO
);
gpWxInfoVO
.
setGpbhgmxVOList
(
gpbhgmxVOList
);
gpWxInfoVO
.
setWxxmVOList
(
wxxmVOList
);
return
gpWxInfoVO
;
}
@Override
public
GpwxResVO
doGpwxfk
(
GpWxInfoVO
gpWxInfoVO
){
GpfkVO
gpfkInfo
=
gpWxInfoVO
.
getGpfkVO
();
if
(
gpfkInfo
==
null
||
StringUtils
.
isEmpty
(
gpfkInfo
.
getWosnid
())){
setReturnMessage
(
"条码信息不允许为空,请检查!"
);
return
null
;
}
if
(
StringUtils
.
isEmpty
(
gpfkInfo
.
getFkgx
())){
setReturnMessage
(
"反馈工序不允许为空,请检查!"
);
return
null
;
}
List
<
GpbhgmxVO
>
gpbhgmxVOList
=
gpWxInfoVO
.
getGpbhgmxVOList
();
if
(
gpbhgmxVOList
==
null
){
setReturnMessage
(
"当前产品没有待维修信息,请检查!"
);
return
null
;
}
// if(gpwxmxVOList == null || gpwxmxVOList.size() == 0){
// setReturnMessage("当前产品没有维修信息,请检查!");
// return null;
// }
HzWoVO
hzWoVO
=
queryWoBySnid
(
gpfkInfo
.
getWosnid
());
if
(
hzWoVO
==
null
){
setReturnMessage
(
"当前产品任务单信息异常,请重新扫描!"
);
return
null
;
}
gpfkInfo
.
setWlid
(
hzWoVO
.
getWlid
());
Gpfk
gpfk
=
getGpfkByVo
(
gpfkInfo
);
List
<
Gpwxmx
>
gpwxmxList
=
getGpwxmxFromVo
(
gpfk
,
gpWxInfoVO
.
getGpwxmxVOList
());
List
<
Gpbhgmx
>
gpbhgmxList
=
getGpbhgForUpd
(
gpfk
,
gpbhgmxVOList
);
List
<
GphyVO
>
gphyInfoList
=
gpWxInfoVO
.
getGphyVOList
();
if
(
gphyInfoList
!=
null
&&
gphyInfoList
.
size
()
>
0
){
List
<
Gphy
>
gphyList
=
getGphylistFromVo
(
gpfk
,
gphyInfoList
);
if
(
validGphyList
(
gpfk
.
getWosnid
(),
gphyList
)){
gpfkDao
.
batchAdd
(
gphyList
);
}
else
{
throwReturnMessage
(
ThreadContext
.
getReturnData
().
getMessage
());
}
}
doInsGpfk
(
gpfk
);
gpfkDao
.
batchUpdate
(
gpbhgmxList
);
gpwxmxService
.
doInsGpwxmx
(
gpwxmxList
);
GpwxResVO
gpwxResVO
=
new
GpwxResVO
();
gpwxResVO
.
setGpfk
(
gpfk
);
gpwxResVO
.
setGpbhgmxList
(
gpbhgmxList
);
gpwxResVO
.
setHzWoVO
(
hzWoVO
);
gpwxResVO
.
setGpwxmxList
(
gpwxmxList
);
return
gpwxResVO
;
}
@Override
public
GpwxResVO
doSuperGpwxfk
(
GpWxInfoVO
gpWxInfoVO
){
GpfkVO
gpfkInfo
=
gpWxInfoVO
.
getGpfkVO
();
if
(
gpfkInfo
==
null
||
StringUtils
.
isEmpty
(
gpfkInfo
.
getWosnid
())){
setReturnMessage
(
"条码信息不允许为空,请检查!"
);
return
null
;
}
if
(
StringUtils
.
isEmpty
(
gpfkInfo
.
getFkgx
())){
setReturnMessage
(
"反馈工序不允许为空,请检查!"
);
return
null
;
}
List
<
GpbhgmxVO
>
gpbhgmxVOList
=
gpWxInfoVO
.
getGpbhgmxVOList
();
if
(
gpbhgmxVOList
==
null
){
gpbhgmxVOList
=
new
ArrayList
<
GpbhgmxVO
>();
}
// if(gpwxmxVOList == null || gpwxmxVOList.size() == 0){
// setReturnMessage("当前产品没有维修信息,请检查!");
// return null;
// }
HzWoVO
hzWoVO
=
queryWoBySnid
(
gpfkInfo
.
getWosnid
());
if
(
hzWoVO
==
null
){
setReturnMessage
(
"当前产品任务单信息异常,请重新扫描!"
);
return
null
;
}
gpfkInfo
.
setWlid
(
hzWoVO
.
getWlid
());
Gpfk
gpfk
=
getGpfkByVo
(
gpfkInfo
);
List
<
Gpwxmx
>
gpwxmxList
=
getGpwxmxFromVo
(
gpfk
,
gpWxInfoVO
.
getGpwxmxVOList
());
List
<
Gpbhgmx
>
gpbhgmxList
=
getGpbhgForUpd
(
gpfk
,
gpbhgmxVOList
);
List
<
GphyVO
>
gphyInfoList
=
gpWxInfoVO
.
getGphyVOList
();
if
(
gphyInfoList
!=
null
&&
gphyInfoList
.
size
()
>
0
){
List
<
Gphy
>
gphyList
=
getGphylistFromVo
(
gpfk
,
gphyInfoList
);
if
(
validGphyList
(
gpfk
.
getWosnid
(),
gphyList
)){
gpfkDao
.
batchAdd
(
gphyList
);
}
else
{
throwReturnMessage
(
ThreadContext
.
getReturnData
().
getMessage
());
}
}
doInsGpfk
(
gpfk
);
if
(
gpbhgmxList
!=
null
&&
gpbhgmxList
.
size
()
>
0
){
gpfkDao
.
batchUpdate
(
gpbhgmxList
);
}
gpwxmxService
.
doInsGpwxmx
(
gpwxmxList
);
GpwxResVO
gpwxResVO
=
new
GpwxResVO
();
gpwxResVO
.
setGpfk
(
gpfk
);
gpwxResVO
.
setGpbhgmxList
(
gpbhgmxList
);
gpwxResVO
.
setHzWoVO
(
hzWoVO
);
gpwxResVO
.
setGpwxmxList
(
gpwxmxList
);
return
gpwxResVO
;
}
private
List
<
Gpbhgmx
>
getGpbhgForUpd
(
Gpfk
gpfk
,
List
<
GpbhgmxVO
>
gpbhgmxVOList
){
List
<
Gpbhgmx
>
gpbhgmxList
=
new
ArrayList
<
Gpbhgmx
>(
gpbhgmxVOList
.
size
());
for
(
GpbhgmxVO
gpbhgmxVO
:
gpbhgmxVOList
)
{
Gpbhgmx
gpbhgmx
=
new
Gpbhgmx
();
gpbhgmx
.
setId
(
gpbhgmxVO
.
getId
());
gpbhgmx
.
setMid
(
gpbhgmxVO
.
getMid
());
gpbhgmx
.
setXxid
(
gpbhgmxVO
.
getXxid
());
gpbhgmx
.
setYyid
(
gpbhgmxVO
.
getYyid
());
gpbhgmx
.
setBhgsl
(
gpbhgmxVO
.
getBhgsl
());
gpbhgmx
.
setBz
(
gpbhgmxVO
.
getBz
());
gpbhgmx
.
setWxgpid
(
gpfk
.
getId
());
gpbhgmxList
.
add
(
gpbhgmx
);
}
return
gpbhgmxList
;
}
private
List
<
Gpwxmx
>
getGpwxmxFromVo
(
Gpfk
gpfk
,
List
<
GpwxmxVO
>
gpwxmxVOList
){
List
<
Gpwxmx
>
gpwxmxList
=
new
ArrayList
<
Gpwxmx
>(
gpwxmxVOList
.
size
());
for
(
GpwxmxVO
gpwxmxVO
:
gpwxmxVOList
)
{
Gpwxmx
gpwxmx
=
new
Gpwxmx
();
gpwxmx
.
setMid
(
gpfk
.
getId
());
gpwxmx
.
setWxxmid
(
gpwxmxVO
.
getWxxmid
());
gpwxmx
.
setBz
(
gpwxmxVO
.
getBz
());
gpwxmxList
.
add
(
gpwxmx
);
}
return
gpwxmxList
;
}
@Override
public
RecordSet
<
HzWoVO
>
queryWosngz
(
GpWoCondition
gpWoCondition
){
return
gpfkDao
.
queryWosngz
(
gpWoCondition
);
...
...
@@ -1241,12 +638,6 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
return
gpfkDao
.
queryWosnGpbhgByfkid
(
gpfkid
);
}
@Override
public
List
<
GphyVO
>
queryGphyListByGpid
(
String
gpfkid
){
List
<
GphyVO
>
gphyVOList
=
gpfkDao
.
queryGphyVOByGpfkid
(
gpfkid
);
return
gphyVOList
;
}
@Override
public
List
<
BzgxVO
>
queryLhBzgx
(
BzgxCondition
condition
)
{
condition
.
setTybz
(
BooleanEnum
.
NO
.
getId
());
...
...
@@ -1258,39 +649,11 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
return
gpfkDao
.
queryLhBzgx
(
condition
,
ugxs
,
lhgxs
);
}
@Override
public
List
<
JydmxVO
>
queryBhgJydmxBySnid
(
String
snid
){
List
<
JydmxVO
>
jydmxVOList
=
gpfkDao
.
queryJydmxVOBySnid
(
snid
,
BooleanEnum
.
NO
.
getId
());
return
jydmxVOList
;
}
@Override
public
GpfkVO
getGpfkvoByGpid
(
String
gpfkid
){
return
gpfkDao
.
queryGpfkVOByGpid
(
gpfkid
);
}
@Override
public
GpfkJyjgVO
getJyjgvoByGpid
(
String
gpfkid
){
GpfkJyjgVO
gpfkJyjgVO
=
new
GpfkJyjgVO
();
GpfkVO
gpfkVO
=
gpfkDao
.
queryGpfkVOByGpid
(
gpfkid
);
JydVO
jydVO
=
gpfkDao
.
queryJydVOByGpid
(
gpfkid
);
List
<
GpbhgmxVO
>
gpbhgmxVOList
=
gpfkDao
.
queryWosnGpbhgByfkid
(
gpfkid
);
if
(
jydVO
!=
null
){
List
<
JydmxVO
>
jydmxVOList
=
gpfkDao
.
queryJydmxVOByJydid
(
jydVO
.
getId
());
gpfkJyjgVO
.
setJydmxVOList
(
jydmxVOList
);
}
else
{
if
(
gpfkVO
!=
null
){
jydVO
=
new
JydVO
();
jydVO
.
setHg
(
gpfkVO
.
getHgbz
());
jydVO
.
setBz
(
gpfkVO
.
getBz
());
}
}
gpfkJyjgVO
.
setGpfkVO
(
gpfkVO
);
gpfkJyjgVO
.
setJydVO
(
jydVO
);
gpfkJyjgVO
.
setGpbhgmxVOList
(
gpbhgmxVOList
);
return
gpfkJyjgVO
;
}
@Override
public
void
cancelGplh
(
String
gpfkid
){
Gpfk
gpfk
=
gpfkDao
.
queryById
(
Gpfk
.
class
,
gpfkid
);
...
...
@@ -1348,10 +711,6 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
@Override
public
void
delGpzpById
(
String
gpfkid
){
delGpfkById
(
gpfkid
);
List
<
Gphy
>
gphyList
=
gpfkDao
.
queryGphyListByGpfkid
(
gpfkid
);
if
(
gphyList
!=
null
&&
gphyList
.
size
()
>
0
){
gpfkDao
.
batchDelete
(
gphyList
);
}
}
@Override
...
...
@@ -1391,99 +750,6 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
}
}
@Override
public
void
delGpjyById
(
String
gpfkid
){
delGpfkById
(
gpfkid
);
Jyd
jyd
=
gpfkDao
.
queryJydByGpid
(
gpfkid
);
if
(
jyd
!=
null
){
gpfkDao
.
delete
(
jyd
);
List
<
Jydmx
>
jydmxList
=
gpfkDao
.
queryJydmxByJydid
(
jyd
.
getId
());
if
(
jydmxList
!=
null
&&
jydmxList
.
size
()
>
0
){
gpfkDao
.
batchDelete
(
jydmxList
);
}
List
<
Bhgmx
>
bhgmxList
=
gpfkDao
.
queryBhgmxListByJydid
(
jyd
.
getId
());
if
(
bhgmxList
!=
null
&&
bhgmxList
.
size
()
>
0
){
gpfkDao
.
batchDelete
(
bhgmxList
);
}
}
}
@Override
public
GpZyjhResVO
doZyjhGpfk
(
GpbhgfkCondition
gpbhgfkCondition
){
GpfkVO
gpfkInfo
=
gpbhgfkCondition
.
getGpfkVO
();
if
(
gpfkInfo
==
null
||
StringUtils
.
isEmpty
(
gpfkInfo
.
getWosnid
())){
setReturnMessage
(
"条码信息不允许为空,请检查!"
);
return
null
;
}
if
(
StringUtils
.
isEmpty
(
gpfkInfo
.
getFkgx
())){
setReturnMessage
(
"反馈工序不允许为空,请检查!"
);
return
null
;
}
HzZyjhmxVO
hzZyjhmxVO
=
gpfkDao
.
queryZyjhmxBySnid
(
gpfkInfo
.
getWosnid
());
if
(
hzZyjhmxVO
==
null
){
setReturnMessage
(
"当前作业计划信息异常,请检查!"
);
return
null
;
}
if
(!
StringUtils
.
equalsIgnoreCase
(
hzZyjhmxVO
.
getBzgxid
(),
gpfkInfo
.
getFkgx
())){
setReturnMessage
(
"该工单指定的工序不是当前反馈工序,请检查!"
);
return
null
;
}
if
(
StringUtils
.
isNotEmpty
(
hzZyjhmxVO
.
getBxid
())
&&
!
StringUtils
.
equalsIgnoreCase
(
hzZyjhmxVO
.
getBxid
(),
gpfkInfo
.
getFkbx
())){
setReturnMessage
(
"该工单指定的班型不是当前反馈班型,请检查!"
);
return
null
;
}
/**
* 查询获得当前工单号对应的作业计划明细
* 如果是按工艺路线开的,则比较对应工艺路线上道总完工数量
*/
// if(StringUtils.isNotEmpty(hzZyjhmxVO.getWogylxid())){
// Wogylx wogylx = gpfkDao.queryById(Wogylx.class,hzZyjhmxVO.getWogylxid());
// WogylxVO existLastWogylx = gpfkDao.queryLastWogylxByMidXh(wogylx.getWoid(),wogylx.getXh());
// if(existLastWogylx != null){
// double lastHgsl = gpfkDao.queryGpHgslByWogylxId(existLastWogylx.getId());
// double thisWgsl = gpfkDao.queryGpWgslByWogylxId(wogylx.getId());
// if(NumberUtils.greater(NumberUtils.plus(thisWgsl,gpfkInfo.getHgsl(),gpfkInfo.getBhgsl()),lastHgsl)){
// setReturnMessage("总完工数量不允许超过上道工序合格数量:"+lastHgsl+",请检查!");
// return null;
// }
// }
// }
gpfkInfo
.
setWlid
(
hzZyjhmxVO
.
getWlid
());
Gpfk
gpfk
=
getGpfkByVo
(
gpfkInfo
);
gpfk
.
setFklx
(
GpfkFklxEnum
.
ZYJH
.
getId
());
List
<
GpbhgmxVO
>
gpbhgmxVOList
=
gpbhgfkCondition
.
getGpbhgmxList
();
List
<
Gpbhgmx
>
gpbhgmxList
=
new
ArrayList
<
Gpbhgmx
>();
if
(
gpbhgmxVOList
==
null
||
gpbhgmxVOList
.
size
()
==
0
){
/**
* 没有不合格信息,则设置为合格
*/
// gpfk.setHgbz(BooleanEnum.YES.getId());
}
else
{
gpbhgmxList
=
gpbhgmxService
.
getGpbhgFromVo
(
gpfk
,
gpbhgmxVOList
);
}
doInsZyjhGpfk
(
gpfk
);
/**
* insGpbhg
*/
if
(
gpbhgmxList
!=
null
&&
gpbhgmxList
.
size
()
>
0
){
gpbhgmxService
.
doInsGpbhg
(
gpbhgmxList
);
}
GpZyjhResVO
gpResVO
=
new
GpZyjhResVO
();
GpfkVO
gpfkVO
=
gpfkDao
.
queryZyjhGpfkVOByGpid
(
gpfk
.
getId
());
gpResVO
.
setHzZyjhmxVO
(
hzZyjhmxVO
);
gpResVO
.
setGpfk
(
gpfk
);
gpResVO
.
setGpfkVO
(
gpfkVO
);
gpResVO
.
setGpbhgmxList
(
gpbhgmxList
);
return
gpResVO
;
}
@Override
public
GpfkVO
getDailyGpfkInfo
(
GpfkCondition
gpfkCondition
){
Date
nowDate
=
DateUtils
.
getDateTime
();
...
...
@@ -1497,48 +763,6 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
return
gpfkVO
;
}
@Override
public
void
delZyjhGpfk
(
String
gpfkid
)
{
Gpfk
gpfk
=
gpfkDao
.
queryById
(
Gpfk
.
class
,
gpfkid
);
if
(
gpfk
==
null
)
{
throw
new
RuntimeException
(
"数据发生变化,请重新操作!"
);
}
if
(!
UserInfoUtil
.
isSuperuser
()
&&
!
StringUtils
.
equalsIgnoreCase
(
gpfk
.
getFkrid
(),
UserInfoUtil
.
getUserId
())){
throw
new
RuntimeException
(
"当前工单由其他人反馈,不允许取消!"
);
}
if
(
NumberUtils
.
greater
(
gpfk
.
getYkrksl
(),
0
d
)){
throw
new
RuntimeException
(
"当前工单已开入库单,不允许取消!"
);
}
if
(
StringUtils
.
equalsIgnoreCase
(
gpfk
.
getFklx
(),
GpfkFklxEnum
.
ZYJH
.
getId
())){
HzZyjhmxVO
zyjhmxVO
=
gpfkDao
.
queryZyjhmxBySnid
(
gpfk
.
getWosnid
());
if
(
zyjhmxVO
==
null
){
throw
new
RuntimeException
(
"作业计划明细异常,请刷新后重新操作!"
);
}
HzZyjhmxVO
existNextZyjhmx
=
gpfkDao
.
queryNextZyjhmxByMidXh
(
zyjhmxVO
.
getMid
(),
zyjhmxVO
.
getXh
());
if
(
existNextZyjhmx
!=
null
){
double
thisHgsl
=
gpfkDao
.
queryGpHgsl
(
zyjhmxVO
.
getGpcode
());
double
nextWgsl
=
gpfkDao
.
queryGpWgsl
(
existNextZyjhmx
.
getGpcode
());
if
(
NumberUtils
.
greater
(
nextWgsl
,
NumberUtils
.
minus
(
thisHgsl
,
gpfk
.
getHgsl
()))){
throw
new
RuntimeException
(
"删除后,下道工序的总完工数量将大于当前合格数量,不允许删除!"
);
}
}
List
<
Gpbhgmx
>
gpbhgmxList
=
gpfkDao
.
queryGpbhgmxByGpid
(
gpfkid
);
if
(
gpbhgmxList
!=
null
&&
gpbhgmxList
.
size
()
>
0
){
/**
* 本次反馈存在不合格,且来源单已开不合格
*/
if
(
NumberUtils
.
greater
(
zyjhmxVO
.
getYkfgsl
(),
0
d
)){
throw
new
RuntimeException
(
"当前工票已开返工作业计划,不允许删除!"
);
}
gpfkDao
.
batchDelete
(
gpbhgmxList
);
}
}
delete
(
gpfk
);
}
@Override
public
Boolean
ifNeedPrint
(
String
gxid
){
String
needPrintGxs
=
commonService
.
getStringOptionValue
(
HzgdParamEnum
.
HZGD_GXLX_NEEDPRINT
.
getId
());
...
...
gavel/src/main/java/com/gavel/kwell/service/impl/HzWlxxServiceImpl.java
deleted
100644 → 0
View file @
1557f5ac
package
com
.
gavel
.
kwell
.
service
.
impl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.gavel.common.Constants
;
import
com.gavel.common.base.entity.BaseEntity
;
import
com.gavel.common.utils.BooleanEnum
;
import
com.gavel.common.utils.StringUtils
;
import
com.gavel.jcsj.persistent.Wlfl
;
import
com.gavel.jcsj.persistent.Wlxx
;
import
com.gavel.jcsj.service.impl.WlxxServiceImpl
;
import
com.gavel.jcsj.vo.WlxxCondition
;
import
com.gavel.jcsj.vo.WlxxVO
;
import
com.gavel.kwell.dao.HzWlxxDao
;
import
com.gavel.kwell.service.HzWlxxService
;
import
com.gavel.persistence.sql.RecordSet
;
/*
* @Author youjian.ding
* @Date $
**/
@Service
(
"hzWlxxService"
)
@Transactional
public
class
HzWlxxServiceImpl
extends
WlxxServiceImpl
implements
HzWlxxService
{
@Autowired
HzWlxxDao
hzWlxxDao
;
@Override
public
RecordSet
<
WlxxVO
>
queryWowl
(
WlxxCondition
condition
){
if
(
StringUtils
.
equalsIgnoreCase
(
condition
.
getFlbm
(),
Constants
.
TREE_ROOT
))
{
condition
.
setFlcjid
(
""
);
}
else
{
Wlfl
wlfl
=
hzWlxxDao
.
queryById
(
Wlfl
.
class
,
condition
.
getFlbm
());
if
(
wlfl
==
null
)
condition
.
setFlcjid
(
""
);
else
condition
.
setFlcjid
(
wlfl
.
getCjid
());
}
return
hzWlxxDao
.
queryWowl
(
condition
);
}
@Override
public
RecordSet
<
WlxxVO
>
queryWlxxCskc
(
WlxxCondition
condition
)
{
if
(
StringUtils
.
equalsIgnoreCase
(
condition
.
getFlbm
(),
Constants
.
TREE_ROOT
))
{
condition
.
setFlcjid
(
""
);
}
else
{
Wlfl
wlfl
=
hzWlxxDao
.
queryById
(
Wlfl
.
class
,
condition
.
getFlbm
());
if
(
wlfl
==
null
)
condition
.
setFlcjid
(
""
);
else
condition
.
setFlcjid
(
wlfl
.
getCjid
());
}
condition
.
setDjgl
(
BooleanEnum
.
NO
.
getId
());
return
hzWlxxDao
.
queryWlxxCskc
(
condition
);
}
@Override
public
boolean
postValid
(
BaseEntity
entity
){
if
(
entity
!=
null
&&
entity
instanceof
Wlxx
){
Wlxx
wlxx
=
(
Wlxx
)
entity
;
//更新记录
if
(
wlxx
.
dataState
()
==
BaseEntity
.
DataState
.
UPDATE
)
{
Wlxx
wlxxOld
=
hzWlxxDao
.
queryById
(
Wlxx
.
class
,
wlxx
.
getId
());
if
(
wlxxOld
==
null
)
{
setReturnMessage
(
"数据发生变化!"
);
return
false
;
}
//编码改变时
if
(!
wlxx
.
getCode
().
equals
(
wlxxOld
.
getCode
()))
{
if
(
hzWlxxDao
.
wlidIsUsed
(
wlxxOld
.
getCode
()))
{
setReturnMessage
(
"原物料编码"
+
wlxxOld
.
getCode
()
+
"已被使用,不允许修改!"
);
return
false
;
}
}
}
}
return
true
;
}
@Override
public
boolean
canDelete
(
BaseEntity
entity
){
if
(
entity
!=
null
&&
entity
instanceof
Wlxx
){
Wlxx
wlxx
=
(
Wlxx
)
entity
;
if
(
hzWlxxDao
.
wlidIsUsed
(
wlxx
.
getCode
()))
{
setReturnMessage
(
"物料编码已被使用,不允许删除!"
);
return
false
;
}
}
return
true
;
}
}
gavel/src/main/java/com/gavel/kwell/service/impl/WlsnServiceImpl.java
View file @
615b96c0
...
...
@@ -57,8 +57,8 @@ public class WlsnServiceImpl extends BaseEditServiceImpl implements WlsnService
@Override
public
void
beforePost
(
BaseEntity
entity
)
{
if
(
entity
instanceof
Wlsn
)
{
Wlsn
wlsn
=
(
Wlsn
)
entity
;
/*
if(StringUtils.isEmpty(wlsn.getHgdj())){
/*
Wlsn wlsn = (Wlsn)entity;
if(StringUtils.isEmpty(wlsn.getHgdj())){
wlsn.setHgdj(DpOcGradeEnum.A0.getId());
}*/
}
...
...
gavel/src/main/java/com/gavel/kwell/utils/ImageToBase64.java
View file @
615b96c0
...
...
@@ -89,10 +89,9 @@ public class ImageToBase64 {
// 图像数据为空
if
(
imgStr
==
null
)
return
false
;
Base64
encoder
=
new
Base64
();
try
{
// Base64解码
byte
[]
b
=
encoder
.
decodeBase64
(
imgStr
);
byte
[]
b
=
Base64
.
decodeBase64
(
imgStr
);
for
(
int
i
=
0
;
i
<
b
.
length
;
++
i
)
{
if
(
b
[
i
]
<
0
)
{
// 调整异常数据
b
[
i
]
+=
256
;
...
...
gavel/src/main/java/com/gavel/kwell/vo/GpResVO.java
View file @
615b96c0
package
com
.
gavel
.
kwell
.
vo
;
import
java.io.Serializable
;
import
java.util.List
;
import
com.gavel.kwell.persistent.Gpbhgmx
;
import
com.gavel.kwell.persistent.Gpfk
;
public
class
GpResVO
{
public
class
GpResVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
gavel/src/main/java/com/gavel/kwell/vo/GpbhgfkCondition.java
View file @
615b96c0
package
com
.
gavel
.
kwell
.
vo
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
GpbhgfkCondition
{
public
class
GpbhgfkCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
gavel/src/main/java/com/gavel/kwell/vo/GpfkcxVO.java
View file @
615b96c0
...
...
@@ -7,6 +7,7 @@ import com.gavel.persistence.annotation.FieldMeta;
public
class
GpfkcxVO
extends
Gpfk
{
private
static
final
long
serialVersionUID
=
3877646077533972481L
;
@FieldMeta
(
fieldName
=
"WOSN_CODE"
,
caption
=
"序列号"
)
private
String
wosnCode
;
@FieldMeta
(
fieldName
=
"BZGX_CODE"
,
caption
=
"工序编码"
)
...
...
gavel/src/main/java/com/gavel/kwell/vo/GpfkhzVO.java
View file @
615b96c0
...
...
@@ -9,6 +9,7 @@ import java.util.Date;
public
class
GpfkhzVO
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
8533157621444610854L
;
@FieldMeta
(
fieldName
=
"BZGX_ID"
,
caption
=
"工序ID"
)
private
String
bzgxId
;
@FieldMeta
(
fieldName
=
"BZGX_CODE"
,
caption
=
"工序编码"
)
...
...
gavel/src/main/java/com/gavel/kwell/vo/GpwxResVO.java
View file @
615b96c0
package
com
.
gavel
.
kwell
.
vo
;
import
java.io.Serializable
;
import
java.util.List
;
import
com.gavel.kwell.persistent.Gpbhgmx
;
...
...
@@ -7,7 +8,7 @@ import com.gavel.kwell.persistent.Gpfk;
import
com.gavel.kwell.persistent.Gpwxmx
;
public
class
GpwxResVO
{
public
class
GpwxResVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
gavel/src/main/java/com/gavel/kwell/vo/HzKcswCondition.java
View file @
615b96c0
...
...
@@ -7,6 +7,10 @@ import java.util.Date;
public
class
HzKcswCondition
extends
BaseEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
private
String
swlx
;
private
Date
start
;
private
Date
end
;
...
...
gavel/src/main/java/com/gavel/kwell/vo/HzWoVO.java
View file @
615b96c0
...
...
@@ -8,6 +8,10 @@ import java.util.Date;
public
class
HzWoVO
extends
Wo
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@FieldMeta
(
fieldName
=
"GC_CODE"
,
caption
=
"工厂编码"
)
private
String
gcCode
;
@FieldMeta
(
fieldName
=
"GC_NAME"
,
caption
=
"工厂名称"
)
...
...
gavel/src/main/java/com/gavel/kwell/vo/WlSnruleVO.java
View file @
615b96c0
...
...
@@ -9,6 +9,7 @@ import com.gavel.persistence.annotation.FieldMeta;
**/
public
class
WlSnruleVO
extends
Snrule
{
private
static
final
long
serialVersionUID
=
7220952323536387600L
;
@FieldMeta
(
fieldName
=
"WLXX_ID"
,
caption
=
"物料编码"
,
length
=
40
)
private
String
wlxxId
;
@FieldMeta
(
fieldName
=
"WLXX_CODE"
,
caption
=
"物料编码"
,
length
=
40
)
...
...
gavel/src/main/java/com/gavel/kwell/vo/WosnMultiVO.java
View file @
615b96c0
...
...
@@ -8,6 +8,7 @@ import com.gavel.persistence.annotation.FieldMeta;
**/
public
class
WosnMultiVO
extends
UWosnVO
{
private
static
final
long
serialVersionUID
=
1622449658227517555L
;
@FieldMeta
(
fieldName
=
"LJWLCODE"
,
caption
=
"物料编码"
)
private
String
ljwlxxCode
;
@FieldMeta
(
fieldName
=
"LJWLNAME"
,
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