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
fdca1196
Commit
fdca1196
authored
May 31, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产领料功能提交
parent
0e5411cf
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
134 additions
and
19 deletions
+134
-19
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+16
-0
HGKC008.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC008.java
+1
-0
HGKC008A.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC008A.java
+17
-0
ServiceHGKC008A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC008A.java
+27
-4
HGKC008.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008.xml
+10
-0
HGKC008A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008A.xml
+10
-1
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+29
-0
HGKC008A.js
src/main/webapp/HG/KC/HGKC008A.js
+23
-14
HGKC008A.jsp
src/main/webapp/HG/KC/HGKC008A.jsp
+1
-0
No files found.
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
fdca1196
...
@@ -275,4 +275,20 @@ public class HGConstant {
...
@@ -275,4 +275,20 @@ public class HGConstant {
public
static
final
Integer
SC
=
3
;
public
static
final
Integer
SC
=
3
;
}
}
/**
*
* 领料单类型
* @author:jianghesong
* @date:2024/5/15,15:18
*/
public
static
class
ReceiveType
{
// 默认
public
static
final
Integer
DEFAULT
=
0
;
// 正常
public
static
final
Integer
ZC
=
1
;
// 退库
public
static
final
Integer
TK
=
2
;
}
}
}
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC008.java
View file @
fdca1196
...
@@ -71,6 +71,7 @@ public class HGKC008 extends DaoEPBase {
...
@@ -71,6 +71,7 @@ public class HGKC008 extends DaoEPBase {
public
static
final
String
DELETE
=
"HGKC008.delete"
;
public
static
final
String
DELETE
=
"HGKC008.delete"
;
public
static
final
String
BATCH_DELETE
=
"HGKC008.batchDelete"
;;
public
static
final
String
BATCH_DELETE
=
"HGKC008.batchDelete"
;;
public
static
final
String
UPDATE_STATUS
=
"HGKC008.updateStatus"
;;
public
static
final
String
UPDATE_STATUS
=
"HGKC008.updateStatus"
;;
public
static
final
String
UPDATE_RECEIVE_TYPE
=
"HGKC008.updateReceiveType"
;;
private
Long
id
=
new
Long
(
0
);
/* 主键id*/
private
Long
id
=
new
Long
(
0
);
/* 主键id*/
private
String
accountCode
=
" "
;
/* 账套*/
private
String
accountCode
=
" "
;
/* 账套*/
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC008A.java
View file @
fdca1196
...
@@ -41,6 +41,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -41,6 +41,7 @@ public class HGKC008A extends DaoEPBase {
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 存货类型*/
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 存货类型*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
public
static
final
String
FIELD_INV_SPEC_ID
=
"invSpecId"
;
/* 规格*/
public
static
final
String
FIELD_INV_SPEC
=
"invSpec"
;
/* 规格*/
public
static
final
String
FIELD_INV_SPEC
=
"invSpec"
;
/* 规格*/
public
static
final
String
FIELD_INV_LENGTH
=
"invLength"
;
/* 长度(MM)*/
public
static
final
String
FIELD_INV_LENGTH
=
"invLength"
;
/* 长度(MM)*/
public
static
final
String
FIELD_INV_WIDTH
=
"invWidth"
;
/* 宽度(MM)*/
public
static
final
String
FIELD_INV_WIDTH
=
"invWidth"
;
/* 宽度(MM)*/
...
@@ -72,6 +73,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -72,6 +73,7 @@ public class HGKC008A extends DaoEPBase {
public
static
final
String
COL_INVENT_TYPE
=
"INVENT_TYPE"
;
/* 存货类型*/
public
static
final
String
COL_INVENT_TYPE
=
"INVENT_TYPE"
;
/* 存货类型*/
public
static
final
String
COL_INVENT_CODE
=
"INVENT_CODE"
;
/* 存货编码*/
public
static
final
String
COL_INVENT_CODE
=
"INVENT_CODE"
;
/* 存货编码*/
public
static
final
String
COL_INVENT_NAME
=
"INVENT_NAME"
;
/* 存货名称*/
public
static
final
String
COL_INVENT_NAME
=
"INVENT_NAME"
;
/* 存货名称*/
public
static
final
String
COL_INV_SPEC_ID
=
"invSpecId"
;
/* 规格Id*/
public
static
final
String
COL_INV_SPEC
=
"INV_SPEC"
;
/* 规格*/
public
static
final
String
COL_INV_SPEC
=
"INV_SPEC"
;
/* 规格*/
public
static
final
String
COL_INV_LENGTH
=
"INV_LENGTH"
;
/* 长度(MM)*/
public
static
final
String
COL_INV_LENGTH
=
"INV_LENGTH"
;
/* 长度(MM)*/
public
static
final
String
COL_INV_WIDTH
=
"INV_WIDTH"
;
/* 宽度(MM)*/
public
static
final
String
COL_INV_WIDTH
=
"INV_WIDTH"
;
/* 宽度(MM)*/
...
@@ -110,6 +112,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -110,6 +112,7 @@ public class HGKC008A extends DaoEPBase {
private
String
inventType
=
" "
;
/* 存货类型*/
private
String
inventType
=
" "
;
/* 存货类型*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
Long
invSpecId
=
new
Long
(
0
);
/* 规格id*/
private
String
invSpec
=
" "
;
/* 规格*/
private
String
invSpec
=
" "
;
/* 规格*/
private
BigDecimal
invLength
=
new
BigDecimal
(
0.000
);
/* 长度(MM)*/
private
BigDecimal
invLength
=
new
BigDecimal
(
0.000
);
/* 长度(MM)*/
private
BigDecimal
invWidth
=
new
BigDecimal
(
0.000
);
/* 宽度(MM)*/
private
BigDecimal
invWidth
=
new
BigDecimal
(
0.000
);
/* 宽度(MM)*/
...
@@ -204,6 +207,10 @@ public class HGKC008A extends DaoEPBase {
...
@@ -204,6 +207,10 @@ public class HGKC008A extends DaoEPBase {
eiColumn
.
setDescName
(
"存货名称"
);
eiColumn
.
setDescName
(
"存货名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_SPEC_ID
);
eiColumn
.
setDescName
(
"规格id"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_SPEC
);
eiColumn
=
new
EiColumn
(
FIELD_INV_SPEC
);
eiColumn
.
setDescName
(
"规格"
);
eiColumn
.
setDescName
(
"规格"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -747,6 +754,14 @@ public class HGKC008A extends DaoEPBase {
...
@@ -747,6 +754,14 @@ public class HGKC008A extends DaoEPBase {
this
.
projName
=
projName
;
this
.
projName
=
projName
;
}
}
public
Long
getInvSpecId
()
{
return
invSpecId
;
}
public
void
setInvSpecId
(
Long
invSpecId
)
{
this
.
invSpecId
=
invSpecId
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -774,6 +789,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -774,6 +789,7 @@ public class HGKC008A extends DaoEPBase {
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setInvSpecId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INV_SPEC_ID
)),
invSpecId
));
setInvSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INV_SPEC
)),
invSpec
));
setInvSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INV_SPEC
)),
invSpec
));
setInvLength
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INV_LENGTH
)),
invLength
));
setInvLength
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INV_LENGTH
)),
invLength
));
setInvWidth
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INV_WIDTH
)),
invWidth
));
setInvWidth
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INV_WIDTH
)),
invWidth
));
...
@@ -813,6 +829,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -813,6 +829,7 @@ public class HGKC008A extends DaoEPBase {
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
map
.
put
(
FIELD_INV_SPEC_ID
,
StringUtils
.
toString
(
invSpecId
,
eiMetadata
.
getMeta
(
FIELD_INV_SPEC_ID
)));
map
.
put
(
FIELD_INV_SPEC
,
StringUtils
.
toString
(
invSpec
,
eiMetadata
.
getMeta
(
FIELD_INV_SPEC
)));
map
.
put
(
FIELD_INV_SPEC
,
StringUtils
.
toString
(
invSpec
,
eiMetadata
.
getMeta
(
FIELD_INV_SPEC
)));
map
.
put
(
FIELD_INV_LENGTH
,
StringUtils
.
toString
(
invLength
,
eiMetadata
.
getMeta
(
FIELD_INV_LENGTH
)));
map
.
put
(
FIELD_INV_LENGTH
,
StringUtils
.
toString
(
invLength
,
eiMetadata
.
getMeta
(
FIELD_INV_LENGTH
)));
map
.
put
(
FIELD_INV_WIDTH
,
StringUtils
.
toString
(
invWidth
,
eiMetadata
.
getMeta
(
FIELD_INV_WIDTH
)));
map
.
put
(
FIELD_INV_WIDTH
,
StringUtils
.
toString
(
invWidth
,
eiMetadata
.
getMeta
(
FIELD_INV_WIDTH
)));
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC008A.java
View file @
fdca1196
...
@@ -3,9 +3,10 @@ package com.baosight.hggp.hg.kc.service;
...
@@ -3,9 +3,10 @@ package com.baosight.hggp.hg.kc.service;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.
kc.domain.HGKC004
;
import
com.baosight.hggp.hg.
constant.HGConstant
;
import
com.baosight.hggp.hg.kc.domain.HGKC008
;
import
com.baosight.hggp.hg.kc.domain.HGKC008
;
import
com.baosight.hggp.hg.kc.domain.HGKC008A
;
import
com.baosight.hggp.hg.kc.domain.HGKC008A
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
@@ -13,6 +14,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
...
@@ -13,6 +14,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
...
@@ -62,6 +64,11 @@ public class ServiceHGKC008A extends ServiceBase {
...
@@ -62,6 +64,11 @@ public class ServiceHGKC008A extends ServiceBase {
// 蓝图ids
// 蓝图ids
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGKC008A
.
FIELD_ID
);
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGKC008A
.
FIELD_ID
);
DaoUtils
.
update
(
HGKC008A
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
DaoUtils
.
update
(
HGKC008A
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
String
receiveId
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGKC008A
.
FIELD_RECEIVE_ID
);
//查看明细是否都删除了,都删除了得修改主表信息
HGKCTools
.
HgKc008A
.
checkMainData
(
ids
,
Long
.
valueOf
(
receiveId
));
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
...
@@ -77,9 +84,9 @@ public class ServiceHGKC008A extends ServiceBase {
...
@@ -77,9 +84,9 @@ public class ServiceHGKC008A extends ServiceBase {
HGKC008A
hgkc008a
=
new
HGKC008A
();
HGKC008A
hgkc008a
=
new
HGKC008A
();
hgkc008a
.
fromMap
(
resultMap
);
hgkc008a
.
fromMap
(
resultMap
);
//查询领料单
//查询领料单
HGKC008
hgkc008
=
(
HGKC008
)
super
.
dao
.
get
(
HGKC008
.
QUERY
,
HGKC008
.
FIELD_ID
,
hgkc008a
.
getReceiveId
());
HGKC008
hgkc008
=
HGKCTools
.
HgKc008
.
getById
(
hgkc008a
.
getReceiveId
());
this
.
checkSaveData
(
hgkc008a
,
hgkc008
);
this
.
setData
(
hgkc008a
,
hgkc008
);
this
.
setData
(
hgkc008a
,
hgkc008
);
this
.
checkSaveData
(
hgkc008a
);
if
(
Objects
.
nonNull
(
hgkc008a
.
getId
())&&
hgkc008a
.
getId
()!=
0
){
if
(
Objects
.
nonNull
(
hgkc008a
.
getId
())&&
hgkc008a
.
getId
()!=
0
){
DaoUtils
.
update
(
HGKC008A
.
UPDATE
,
hgkc008a
);
DaoUtils
.
update
(
HGKC008A
.
UPDATE
,
hgkc008a
);
}
else
{
}
else
{
...
@@ -104,6 +111,15 @@ public class ServiceHGKC008A extends ServiceBase {
...
@@ -104,6 +111,15 @@ public class ServiceHGKC008A extends ServiceBase {
hgkc008a
.
setProjName
(
hgkc008
.
getProjName
());
hgkc008a
.
setProjName
(
hgkc008
.
getProjName
());
hgkc008a
.
setWhCode
(
hgkc008
.
getWhCode
());
hgkc008a
.
setWhCode
(
hgkc008
.
getWhCode
());
hgkc008a
.
setWhName
(
hgkc008
.
getWhName
());
hgkc008a
.
setWhName
(
hgkc008
.
getWhName
());
if
(
hgkc008
.
getReceiveType
().
compareTo
(
HGConstant
.
ReceiveType
.
DEFAULT
)
==
0
){
//如果明细里面有负数的,主表就是退库
if
(
hgkc008a
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
){
hgkc008
.
setReceiveType
(
HGConstant
.
ReceiveType
.
TK
);
}
else
{
hgkc008
.
setReceiveType
(
HGConstant
.
ReceiveType
.
ZC
);
}
DaoUtils
.
update
(
HGKC008
.
UPDATE_RECEIVE_TYPE
,
hgkc008
);
}
}
}
}
}
...
@@ -111,11 +127,18 @@ public class ServiceHGKC008A extends ServiceBase {
...
@@ -111,11 +127,18 @@ public class ServiceHGKC008A extends ServiceBase {
* 校验保存的数据
* 校验保存的数据
*
*
* @param hgkc008a
* @param hgkc008a
* @param hgkc008
*/
*/
private
void
checkSaveData
(
HGKC008A
hgkc008a
)
{
private
void
checkSaveData
(
HGKC008A
hgkc008a
,
HGKC008
hgkc008
)
{
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getOrgId
(),
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getOrgId
(),
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
AssertUtils
.
isNull
(
hgkc008a
.
getReceiveId
(),
"未获取到生产领料单ID信息"
);
AssertUtils
.
isNull
(
hgkc008a
.
getReceiveId
(),
"未获取到生产领料单ID信息"
);
if
(
hgkc008
.
getReceiveType
().
compareTo
(
HGConstant
.
ReceiveType
.
ZC
)
==
0
){
AssertUtils
.
isTrue
(
hgkc008a
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
,
"此生产领料单为正常类型,数量不能小于0"
);
}
if
(
hgkc008
.
getReceiveType
().
compareTo
(
HGConstant
.
ReceiveType
.
TK
)
==
0
){
AssertUtils
.
isTrue
(
hgkc008a
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
,
"此生产领料单为退库类型,数量不能大于0"
);
}
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008.xml
View file @
fdca1196
...
@@ -175,4 +175,14 @@
...
@@ -175,4 +175,14 @@
WHERE
WHERE
ID = #id#
ID = #id#
</update>
</update>
<update
id=
"updateReceiveType"
>
UPDATE ${hggpSchema}.HGKC008
SET
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
RECEIVE_TYPE = #receiveType#
<!-- 领料单类型 0:正常,1:退库 -->
WHERE
ID = #id#
</update>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008A.xml
View file @
fdca1196
...
@@ -60,6 +60,9 @@
...
@@ -60,6 +60,9 @@
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME like CONCAT('%',#inventName#,'%')
INVENT_NAME like CONCAT('%',#inventName#,'%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"invSpecId"
>
INV_SPEC_ID = #invSpecId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"invSpec"
>
<isNotEmpty
prepend=
" AND "
property=
"invSpec"
>
INV_SPEC = #invSpec#
INV_SPEC = #invSpec#
</isNotEmpty>
</isNotEmpty>
...
@@ -93,6 +96,9 @@
...
@@ -93,6 +96,9 @@
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME like ('%$projName$%')
PROJ_NAME like ('%$projName$%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"notIds"
>
id NOT IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"notIds"
>
#notIds[]#
</iterate>
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
@@ -119,6 +125,7 @@
...
@@ -119,6 +125,7 @@
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
INV_SPEC_ID as "invSpecId",
<!-- 规格Id -->
INV_SPEC as "invSpec",
<!-- 规格 -->
INV_SPEC as "invSpec",
<!-- 规格 -->
INV_LENGTH as "invLength",
<!-- 长度(MM) -->
INV_LENGTH as "invLength",
<!-- 长度(MM) -->
INV_WIDTH as "invWidth",
<!-- 宽度(MM) -->
INV_WIDTH as "invWidth",
<!-- 宽度(MM) -->
...
@@ -166,6 +173,7 @@
...
@@ -166,6 +173,7 @@
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_NAME,
<!-- 存货名称 -->
INVENT_NAME,
<!-- 存货名称 -->
INV_SPEC_ID,
<!-- 规格id -->
INV_SPEC,
<!-- 规格 -->
INV_SPEC,
<!-- 规格 -->
INV_LENGTH,
<!-- 长度(MM) -->
INV_LENGTH,
<!-- 长度(MM) -->
INV_WIDTH,
<!-- 宽度(MM) -->
INV_WIDTH,
<!-- 宽度(MM) -->
...
@@ -176,7 +184,7 @@
...
@@ -176,7 +184,7 @@
PRICE,
<!-- 单价 -->
PRICE,
<!-- 单价 -->
AMOUNT
<!-- 金额 -->
AMOUNT
<!-- 金额 -->
)
)
VALUES (#id#, #accountCode#,#projCode#, #projName#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #receiveId#, #companyCode#, #companyName#, #whCode#, #whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invSpec#, #invLength#, #invWidth#, #invThick#, #invQty#, #invUnitWeight#, #invWeight#, #price#, #amount#)
VALUES (#id#, #accountCode#,#projCode#, #projName#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #receiveId#, #companyCode#, #companyName#, #whCode#, #whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invSpec
Id#,#invSpec
#, #invLength#, #invWidth#, #invThick#, #invQty#, #invUnitWeight#, #invWeight#, #price#, #amount#)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
@@ -206,6 +214,7 @@
...
@@ -206,6 +214,7 @@
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
INV_SPEC_ID = #invSpecId#,
<!-- 规格id -->
INV_SPEC = #invSpec#,
<!-- 规格 -->
INV_SPEC = #invSpec#,
<!-- 规格 -->
INV_LENGTH = #invLength#,
<!-- 长度(MM) -->
INV_LENGTH = #invLength#,
<!-- 长度(MM) -->
INV_WIDTH = #invWidth#,
<!-- 宽度(MM) -->
INV_WIDTH = #invWidth#,
<!-- 宽度(MM) -->
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
fdca1196
package
com
.
baosight
.
hggp
.
hg
.
kc
.
tools
;
package
com
.
baosight
.
hggp
.
hg
.
kc
.
tools
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
...
@@ -315,6 +316,34 @@ public class HGKCTools {
...
@@ -315,6 +316,34 @@ public class HGKCTools {
}
}
}
}
public
static
class
HgKc008
{
public
static
HGKC008
getById
(
Long
id
)
{
AssertUtils
.
isEmpty
(
Collections
.
singleton
(
id
),
"ID为空!"
);
HGKC008
result
=
(
HGKC008
)
DaoBase
.
getInstance
().
get
(
HGKC008
.
QUERY
,
HGKC008
.
FIELD_ID
,
id
);
return
result
;
}
}
public
static
class
HgKc008A
{
public
static
void
checkMainData
(
List
<
Long
>
ids
,
Long
receiveId
)
{
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"notIds"
,
ids
);
paramMap
.
put
(
"receiveId"
,
receiveId
);
List
<
HGKC008A
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC008A
.
QUERY
,
paramMap
);
//明细都删除了,修改主表类型
if
(
CollectionUtil
.
isEmpty
(
results
)){
HGKC008
hgkc008
=
new
HGKC008
();
hgkc008
.
setId
(
receiveId
);
hgkc008
.
setReceiveType
(
HGConstant
.
ReceiveType
.
DEFAULT
);
DaoUtils
.
update
(
HGKC008
.
UPDATE_RECEIVE_TYPE
,
hgkc008
);
}
}
}
/**
/**
* HGKC010 工具类
* HGKC010 工具类
*
*
...
...
src/main/webapp/HG/KC/HGKC008A.js
View file @
fdca1196
...
@@ -35,24 +35,12 @@ $(function (){
...
@@ -35,24 +35,12 @@ $(function (){
return
template
;
return
template
;
},
},
editor
:
function
(
container
,
options
)
{
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whCode"
,
options
.
model
[
"whCode"
]);
inInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"field"
,
options
.
field
);
let
dataSource
;
EiCommunicator
.
send
(
"HGKC010"
,
"queryInventCodeBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"invent_code_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
var
input
=
$
(
'<input />'
);
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
input
.
kendoDropDownList
({
dataSource
:
dataSource
,
dataSource
:
inventRecordBoxBlocks
,
minLength
:
0
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataValueField
:
"valueField"
,
...
@@ -115,6 +103,7 @@ $(function (){
...
@@ -115,6 +103,7 @@ $(function (){
}
}
],
],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
//选择后,先加载此方法,再加载属性中的方法
// 此 grid 对象
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
...
@@ -125,6 +114,11 @@ $(function (){
...
@@ -125,6 +114,11 @@ $(function (){
let
totalWeight
=
item
.
invQty
*
item
.
invUnitWeight
;
let
totalWeight
=
item
.
invQty
*
item
.
invUnitWeight
;
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
totalWeight
)
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
totalWeight
)
}
}
if
(
item
.
price
&&
item
.
invQty
){
let
totalAmount
=
item
.
price
*
item
.
invQty
;
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
}
loadChange
(
grid
,
e
,
"price"
);
}
}
//单价计算
//单价计算
if
(
e
.
field
==
"price"
)
{
if
(
e
.
field
==
"price"
)
{
...
@@ -134,8 +128,22 @@ $(function (){
...
@@ -134,8 +128,22 @@ $(function (){
}
}
}
}
if
(
e
.
field
==
"inventType"
)
{
if
(
e
.
field
==
"inventType"
)
{
//选择后,先加载此方法,再加载属性中的方法,所以存货类型加载时,先修改存货编号下拉框的查询
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whCode"
,
options
.
model
[
"whCode"
]);
inInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"field"
,
options
.
field
);
EiCommunicator
.
send
(
"HGKC010"
,
"queryInventCodeBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
inventRecordBoxBlocks
=
ei
.
getBlock
(
"invent_code_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
resultGrid
.
setCellValue
(
item
,
'inventCode'
,
""
)
resultGrid
.
setCellValue
(
item
,
'inventCode'
,
""
)
resultGrid
.
setCellValue
(
item
,
'inventName'
,
""
)
resultGrid
.
setCellValue
(
item
,
'inventName'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invSpecId'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWidth'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWidth'
,
""
)
...
@@ -151,6 +159,7 @@ $(function (){
...
@@ -151,6 +159,7 @@ $(function (){
resultGrid
.
setCellValue
(
item
,
'inventName'
,
inventRecordBoxBlocks
[
i
][
'textField'
])
resultGrid
.
setCellValue
(
item
,
'inventName'
,
inventRecordBoxBlocks
[
i
][
'textField'
])
}
}
}
}
resultGrid
.
setCellValue
(
item
,
'invSpecId'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWidth'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWidth'
,
""
)
...
@@ -169,7 +178,7 @@ $(function (){
...
@@ -169,7 +178,7 @@ $(function (){
resultGrid
.
setCellValue
(
item
,
'invQty'
,
specBoxBlocks
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'invQty'
,
specBoxBlocks
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
specBoxBlocks
[
i
][
'param5Field'
])
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
specBoxBlocks
[
i
][
'param5Field'
])
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
specBoxBlocks
[
i
][
'param6Field'
])
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
specBoxBlocks
[
i
][
'param6Field'
])
template
=
specBoxBlocks
[
i
][
'valueField'
];
resultGrid
.
setCellValue
(
item
,
'invSpecId'
,
specBoxBlocks
[
i
][
'param7Field'
])
}
}
}
}
resultGrid
.
setCellValue
(
item
,
'price'
,
""
)
resultGrid
.
setCellValue
(
item
,
'price'
,
""
)
...
...
src/main/webapp/HG/KC/HGKC008A.jsp
View file @
fdca1196
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"true"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"true"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"120"
align=
"center"
enable=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"120"
align=
"center"
enable=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"invSpecId"
cname=
"规格id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"invSpec"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"invSpec"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"invLength"
cname=
"长度(MM)"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"invLength"
cname=
"长度(MM)"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"invWidth"
cname=
"宽度(MM)"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"invWidth"
cname=
"宽度(MM)"
width=
"120"
align=
"center"
enable=
"false"
/>
...
...
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