Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
Details
Activity
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
platform
hg-smart
Commits
45b56188
Commit
45b56188
authored
May 27, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.生产入库单的生成数据接口
parent
e7fbac6b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
112 additions
and
49 deletions
+112
-49
HGKC003.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003.java
+17
-0
HGKC003A.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003A.java
+6
-6
ServiceHGKC003.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC003.java
+0
-3
ServiceHGKC003B.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC003B.java
+3
-0
HGKC003.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003.xml
+7
-1
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+79
-36
HGKC003B.js
src/main/webapp/HG/KC/HGKC003B.js
+0
-3
No files found.
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003.java
View file @
45b56188
...
...
@@ -24,6 +24,7 @@ public class HGKC003 extends DaoEPBase {
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_QUALITY_ID
=
"qualityId"
;
/* 质检单ID*/
public
static
final
String
FIELD_ACCOUNT_CODE
=
"accountCode"
;
/* 企业编码*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 记录创建者*/
...
...
@@ -66,6 +67,7 @@ public class HGKC003 extends DaoEPBase {
public
static
final
String
FIELD_SUBMIT_STATUS
=
"submitStatus"
;
/* 提交状态 0未提交,1已提交*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_QUALITY_ID
=
"QUALITY_ID"
;
/* 质检单ID*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 记录创建者*/
...
...
@@ -115,6 +117,7 @@ public class HGKC003 extends DaoEPBase {
public
static
final
String
UPDATE_SUBMIT_STATUS
=
"HGKC003.updateSubmitStatus"
;
private
Long
id
=
new
Long
(
0
);
private
Long
qualityId
=
new
Long
(
0
);
/* 质检单id*/
private
String
accountCode
=
" "
;
/* 企业编码*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
...
...
@@ -167,6 +170,10 @@ public class HGKC003 extends DaoEPBase {
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_QUALITY_ID
);
eiColumn
.
setDescName
(
"质检单id"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ACCOUNT_CODE
);
eiColumn
.
setDescName
(
"企业编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -1013,6 +1020,14 @@ public class HGKC003 extends DaoEPBase {
this
.
submitStatus
=
submitStatus
;
}
public
Long
getQualityId
()
{
return
qualityId
;
}
public
void
setQualityId
(
Long
qualityId
)
{
this
.
qualityId
=
qualityId
;
}
/**
* get the value from Map.
*
...
...
@@ -1022,6 +1037,7 @@ public class HGKC003 extends DaoEPBase {
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setQualityId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QUALITY_ID
)),
qualityId
));
setAccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
accountCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
...
...
@@ -1072,6 +1088,7 @@ public class HGKC003 extends DaoEPBase {
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_QUALITY_ID
,
StringUtils
.
toString
(
qualityId
,
eiMetadata
.
getMeta
(
FIELD_QUALITY_ID
)));
map
.
put
(
FIELD_ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003A.java
View file @
45b56188
...
...
@@ -112,12 +112,12 @@ public class HGKC003A extends DaoEPBase {
public
static
final
String
COL_AMOUNT
=
"AMOUNT"
;
/* 金额*/
public
static
final
String
COL_STORAGE_TYPE
=
"STORAGE_TYPE"
;
/* 入库类型:0:入库 1:退回*/
public
static
final
String
QUERY
=
"
hgkc003a
.query"
;
public
static
final
String
COUNT
=
"
hgkc003a
.count"
;
public
static
final
String
INSERT
=
"
hgkc003a
.insert"
;
public
static
final
String
UPDATE
=
"
hgkc003a
.update"
;
public
static
final
String
DELETE
=
"
hgkc003a
.delete"
;
public
static
final
String
BATCH_DELETE
=
"
hgkc003a
.batchDelete"
;
public
static
final
String
QUERY
=
"
HGKC003A
.query"
;
public
static
final
String
COUNT
=
"
HGKC003A
.count"
;
public
static
final
String
INSERT
=
"
HGKC003A
.insert"
;
public
static
final
String
UPDATE
=
"
HGKC003A
.update"
;
public
static
final
String
DELETE
=
"
HGKC003A
.delete"
;
public
static
final
String
BATCH_DELETE
=
"
HGKC003A
.batchDelete"
;
private
Long
id
=
new
Long
(
0
);
private
String
accountCode
=
" "
;
/* 企业编码*/
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC003.java
View file @
45b56188
...
...
@@ -7,10 +7,7 @@ import com.baosight.hggp.core.enums.DeleteFlagEnum;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.sc.domain.HGSC003
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC003B.java
View file @
45b56188
package
com
.
baosight
.
hggp
.
hg
.
kc
.
service
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
...
...
@@ -24,6 +25,7 @@ public class ServiceHGKC003B extends ServiceEPBase {
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGKC003A
.
QUERY
,
new
HGKC003A
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
));
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
...
...
@@ -33,6 +35,7 @@ public class ServiceHGKC003B extends ServiceEPBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGKC003A
.
QUERY
,
new
HGKC003A
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
));
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003.xml
View file @
45b56188
...
...
@@ -4,6 +4,7 @@
<sql
id=
"column"
>
ID as "id",
QUALITY_ID as "qualityId",
<!-- 质检单id -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
...
...
@@ -141,6 +142,9 @@
<isNotEmpty
prepend=
" AND "
property=
"submitStatus"
>
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"qualityId"
>
QUALITY_ID = #qualityId#
</isNotEmpty>
</sql>
<sql
id=
"idCondition"
>
...
...
@@ -193,6 +197,7 @@
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGKC003 (
QUALITY_ID,
<!-- 企业编码 -->
ACCOUNT_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 记录创建者 -->
...
...
@@ -231,7 +236,7 @@
PART_SPEC,
<!-- 零件规格 -->
SUBMIT_STATUS
<!-- 提交状态 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#qualityId#,
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#, #whCode#, #whName#,
#invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#,
#projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#,
...
...
@@ -247,6 +252,7 @@
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGKC003
SET
QUALITY_ID = #qualityId#,
<!-- 质检单id -->
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
45b56188
package
com
.
baosight
.
hggp
.
hg
.
kc
.
tools
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.kc.domain.HGKC001
;
import
com.baosight.hggp.hg.kc.domain.HGKC002
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.domain.HGKC010
;
import
com.baosight.hggp.hg.kc.domain.HGKC011
;
import
com.baosight.hggp.hg.kc.domain.*
;
import
com.baosight.hggp.hg.sc.domain.HGSC005
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -21,7 +22,7 @@ import java.util.stream.Collectors;
* @date:2024/5/13,14:56
*/
public
class
HGKCTools
{
/**
* HGKC001 工具类
*
...
...
@@ -29,7 +30,7 @@ public class HGKCTools {
* @date:2024/5/9,14:33
*/
public
static
class
HgKc001
{
/**
* 锁
*
...
...
@@ -44,7 +45,7 @@ public class HGKCTools {
paramMap
.
put
(
"depositNos"
,
depositNos
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgKc001
.
LOCK
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -57,7 +58,7 @@ public class HGKCTools {
paramMap
.
put
(
"depositNos"
,
depositNos
);
return
DaoBase
.
getInstance
().
query
(
HGKC001
.
QUERY
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -68,9 +69,9 @@ public class HGKCTools {
List
<
HGKC001
>
results
=
list
(
depositNos
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGKC001:
:
getDepositNo
,
item
->
item
));
}
}
/**
* HGKC002 工具类
*
...
...
@@ -78,7 +79,7 @@ public class HGKCTools {
* @date:2024/5/9,14:33
*/
public
static
class
HgKc002
{
/**
* 锁
*
...
...
@@ -93,7 +94,7 @@ public class HGKCTools {
paramMap
.
put
(
"reqNos"
,
reqNos
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgKc002
.
LOCK
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -106,7 +107,7 @@ public class HGKCTools {
paramMap
.
put
(
"reqNos"
,
reqNos
);
return
DaoBase
.
getInstance
().
query
(
HGKC002
.
QUERY
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -117,10 +118,10 @@ public class HGKCTools {
List
<
HGKC002
>
results
=
list
(
reqNos
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGKC002:
:
getReqNo
,
item
->
item
));
}
}
/**
* HGKC003 工具类
*
...
...
@@ -128,7 +129,25 @@ public class HGKCTools {
* @date:2024/5/15,9:49
*/
public
static
class
HgKc003
{
public
static
HGKC003
save
(
HGKC003
hgkc003
){
checkSaveData
(
hgkc003
);
hgkc003
.
setDepositNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
PROD_DEPOSIT_NO
));
DaoUtils
.
insert
(
HGKC003
.
INSERT
,
hgkc003
);
return
hgkc003
;
}
private
static
void
checkSaveData
(
HGKC003
hgkc003
)
{
AssertUtils
.
isEmpty
(
hgkc003
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getCompanyName
(),
"公司名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getWhCode
(),
"仓库编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getWhName
(),
"仓库名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getProjCode
(),
"项目编号不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getProjName
(),
"项目名称不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc003
.
getQualityId
())||
hgkc003
.
getQualityId
()<=
0
,
"质检单idID不能为空!"
);
}
/**
* 锁
*
...
...
@@ -143,7 +162,7 @@ public class HGKCTools {
paramMap
.
put
(
"depositNos"
,
depositNos
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgKc003
.
LOCK
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -156,7 +175,7 @@ public class HGKCTools {
paramMap
.
put
(
"depositNos"
,
depositNos
);
return
DaoBase
.
getInstance
().
query
(
HGKC003
.
QUERY
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -168,7 +187,31 @@ public class HGKCTools {
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGKC003:
:
getDepositNo
,
item
->
item
));
}
}
/**
* HGKC003A 工具类
*
* @author:songx
* @date:2024/5/15,9:49
*/
public
static
class
THGKC003A
{
public
static
HGKC003A
save
(
HGKC003A
hgkc003a
){
checkSaveData
(
hgkc003a
);
hgkc003a
.
setDepositNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
PROD_DEPOSIT_NO
));
DaoUtils
.
insert
(
HGKC003A
.
INSERT
,
hgkc003a
);
return
hgkc003a
;
}
private
static
void
checkSaveData
(
HGKC003A
hgkc003a
)
{
AssertUtils
.
isEmpty
(
hgkc003a
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getCompanyName
(),
"公司名称不能为空!"
);
// AssertUtils.isTrue(Objects.isNull(hgkc003.getQualityId())||hgkc003.getQualityId()<=0, "质检单idID不能为空!");
}
}
/**
* HGKC010 工具类
*
...
...
@@ -176,7 +219,7 @@ public class HGKCTools {
* @date:2024/5/9,14:33
*/
public
static
class
HgKc010
{
/**
* 锁
*
...
...
@@ -191,8 +234,8 @@ public class HGKCTools {
paramMap
.
put
(
"ids"
,
ids
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgKc010
.
LOCKS
,
paramMap
);
}
/**
* 锁
*
...
...
@@ -211,7 +254,7 @@ public class HGKCTools {
paramMap
.
put
(
"specId"
,
specId
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgKc010
.
LOCK
,
paramMap
);
}
/**
* @param companyCode
* @param whCode
...
...
@@ -228,7 +271,7 @@ public class HGKCTools {
List
<
HGKC010
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC010
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
* 查询
*
...
...
@@ -241,7 +284,7 @@ public class HGKCTools {
paramMap
.
put
(
"ids"
,
ids
);
return
DaoBase
.
getInstance
().
query
(
HGKC010
.
QUERY
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -252,9 +295,9 @@ public class HGKCTools {
List
<
HGKC010
>
results
=
list
(
ids
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGKC010:
:
getId
,
item
->
item
));
}
}
/**
* HGKC010 工具类
*
...
...
@@ -262,7 +305,7 @@ public class HGKCTools {
* @date:2024/5/9,14:33
*/
public
static
class
HgKc011
{
/**
* 锁
*
...
...
@@ -277,8 +320,8 @@ public class HGKCTools {
paramMap
.
put
(
"ids"
,
ids
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgKc011
.
LOCKS
,
paramMap
);
}
/**
* 锁
*
...
...
@@ -297,7 +340,7 @@ public class HGKCTools {
paramMap
.
put
(
"prodOrderNo"
,
prodOrderNo
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgKc011
.
LOCK
,
paramMap
);
}
/**
* @param companyCode
* @param whCode
...
...
@@ -314,7 +357,7 @@ public class HGKCTools {
List
<
HGKC011
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC011
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
* 查询
*
...
...
@@ -327,7 +370,7 @@ public class HGKCTools {
paramMap
.
put
(
"ids"
,
ids
);
return
DaoBase
.
getInstance
().
query
(
HGKC011
.
QUERY
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -339,5 +382,5 @@ public class HGKCTools {
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGKC011:
:
getId
,
item
->
item
));
}
}
}
src/main/webapp/HG/KC/HGKC003B.js
View file @
45b56188
...
...
@@ -19,9 +19,6 @@ $(function () {
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 选择生产任务
$
(
"#SELECT_TASK"
).
on
(
"click"
,
selectTask
);
});
/**
...
...
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