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
50fdebeb
Commit
50fdebeb
authored
Jun 11, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-10 优化销售发货和销售退货
parent
4359b058
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
240 additions
and
255 deletions
+240
-255
HGYX002C.java
src/main/java/com/baosight/hggp/hg/yx/domain/HGYX002C.java
+13
-0
ServiceHGYX001.java
.../java/com/baosight/hggp/hg/yx/service/ServiceHGYX001.java
+84
-89
ServiceHGYX001A.java
...java/com/baosight/hggp/hg/yx/service/ServiceHGYX001A.java
+1
-1
ServiceHGYX002.java
.../java/com/baosight/hggp/hg/yx/service/ServiceHGYX002.java
+47
-95
ServiceHGYX002C.java
...java/com/baosight/hggp/hg/yx/service/ServiceHGYX002C.java
+3
-3
HGYX001.xml
src/main/java/com/baosight/hggp/hg/yx/sql/HGYX001.xml
+1
-0
HGYX001C.xml
src/main/java/com/baosight/hggp/hg/yx/sql/HGYX001C.xml
+2
-3
HGYX002C.xml
src/main/java/com/baosight/hggp/hg/yx/sql/HGYX002C.xml
+76
-52
HGYX001.jsp
src/main/webapp/HG/YX/HGYX001.jsp
+3
-3
HGYX001A.jsp
src/main/webapp/HG/YX/HGYX001A.jsp
+1
-1
HGYX002.js
src/main/webapp/HG/YX/HGYX002.js
+2
-2
HGYX002.jsp
src/main/webapp/HG/YX/HGYX002.jsp
+3
-3
HGYX002A.js
src/main/webapp/HG/YX/HGYX002A.js
+2
-2
HGYX002A.jsp
src/main/webapp/HG/YX/HGYX002A.jsp
+1
-1
HGYX002C.jsp
src/main/webapp/HG/YX/HGYX002C.jsp
+1
-0
No files found.
src/main/java/com/baosight/hggp/hg/yx/domain/HGYX002C.java
0 → 100644
View file @
50fdebeb
package
com
.
baosight
.
hggp
.
hg
.
yx
.
domain
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
/**
* @author LiuYang
* @version 1.0 2024/6/11
*/
public
class
HGYX002C
extends
DaoEPBase
{
public
static
final
String
QUERY
=
"HGYX002C.query"
;
public
static
final
String
COUNT
=
"HGYX002C.count"
;
}
src/main/java/com/baosight/hggp/hg/yx/service/ServiceHGYX001.java
View file @
50fdebeb
...
...
@@ -9,11 +9,15 @@ import com.baosight.hggp.hg.cw.tools.HGCWTools;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.kc.domain.HGKC004
;
import
com.baosight.hggp.hg.kc.domain.HGKC004A
;
import
com.baosight.hggp.hg.kc.domain.HGKC010
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.yx.domain.HGYX001
;
import
com.baosight.hggp.hg.yx.domain.HGYX001A
;
import
com.baosight.hggp.hg.yx.domain.HGYX002
;
import
com.baosight.hggp.hg.yx.domain.HGYX002A
;
import
com.baosight.hggp.hg.yx.tools.HGYXTools
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
...
...
@@ -106,6 +110,13 @@ public class ServiceHGYX001 extends ServiceEPBase {
HGYX001A
hgyx001A
=
new
HGYX001A
();
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInventRecordId
());
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
}
if
(
hgkc010
.
getInvQty
().
compareTo
(
hgyx001A
.
getQuantity
())
<
0
)
{
throw
new
PlatException
(
"库存不足,无法保存!"
);
}
if
(
hgyx001A
.
getId
()
==
null
||
hgyx001A
.
getId
()
==
0
)
{
this
.
addDatail
(
hgyx001A
);
}
...
...
@@ -116,6 +127,13 @@ public class ServiceHGYX001 extends ServiceEPBase {
HGYX001A
hgyx001A
=
new
HGYX001A
();
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInventRecordId
());
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
}
if
(
hgkc010
.
getInvQty
().
compareTo
(
hgyx001A
.
getQuantity
())
<
0
)
{
throw
new
PlatException
(
"库存不足,无法保存!"
);
}
if
(
hgyx001A
.
getId
()
==
null
||
hgyx001A
.
getId
()
==
0
)
{
this
.
addDatail
(
hgyx001A
);
}
else
{
...
...
@@ -142,8 +160,6 @@ public class ServiceHGYX001 extends ServiceEPBase {
}
public
void
addDatail
(
HGYX001A
hgyx001A
)
{
//生成工序编码
//hgyx001A.setDeliveryCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PLAN_CODE));
DaoUtils
.
insert
(
HGYX001A
.
INSERT
,
hgyx001A
);
}
...
...
@@ -182,7 +198,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
}
@OperationLogAnnotation
(
operModul
=
"销售发货"
,
operType
=
"提交"
,
operDesc
=
"提交"
)
@OperationLogAnnotation
(
operModul
=
"销售发货"
,
operType
=
"提交"
,
operDesc
=
"提交
操作
"
)
public
EiInfo
commit
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
...
...
@@ -195,7 +211,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
hgyx001
.
setStatus
(
1
);
hgyx001
.
setOutboundCode
(
outboundCode
);
/*销售出库*/
saveOutbound
(
resultRow
,
outboundCode
);
saveOutbound
(
hgyx001
);
DaoUtils
.
update
(
HGYX001
.
BATCH_COMMIT
,
hgyx001
);
}
...
...
@@ -203,65 +219,68 @@ public class ServiceHGYX001 extends ServiceEPBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据提交成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
操作
失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
提交
失败"
);
}
return
inInfo
;
}
public
void
saveOutbound
(
Map
resultRow
,
String
outboundCode
)
{
public
void
saveOutbound
(
HGYX001
hgyx001
)
{
// 写入数据
HGKC004
hgkc004
=
new
HGKC004
();
String
id
=
resultRow
.
get
(
HGYX001
.
FIELD_ID
).
toString
();
hgkc004
.
setParentId
(
Long
.
parseLong
(
id
));
hgkc004
.
setReceiptDate
(
DateUtils
.
formatShort
(
DateUtils
.
date
()));
hgkc004
.
setCompanyCode
(
resultRow
.
get
(
HGYX001
.
FIELD_COMPANY_CODE
).
toString
());
//hgkc004.setCompanyName(resultRow.get(HGYX001.FIELD_COMPANY_NAME).toString());
hgkc004
.
setWhCode
(
resultRow
.
get
(
HGYX001
.
FIELD_CONS_WH_CODE
).
toString
());
//hgkc004.setWhName(resultRow.get(HGYX001.FIELD_CONS_WH_NAME).toString());
hgkc004
.
setSaleOutCode
(
outboundCode
);
if
(
hgkc004
.
getId
()
==
null
||
hgkc004
.
getId
()
==
0
)
{
this
.
add
(
hgkc004
);
String
parentId
=
resultRow
.
get
(
HGYX001
.
FIELD_ID
).
toString
();
List
<
HGYX001A
>
hgyx001As
=
HGYXTools
.
Hgyx001
.
getParentId
(
Long
.
parseLong
(
parentId
));
if
(
CollectionUtils
.
isEmpty
(
hgyx001As
)){
throw
new
PlatException
(
"销售发货详情不能为空!"
);
}
this
.
addDetail
(
hgyx001As
,
hgkc004
.
getId
());
HGKC004
hgkc004
=
this
.
addHGKC004
(
hgyx001
);
List
<
HGYX001A
>
hgyx001As
=
HGYXTools
.
Hgyx001
.
getParentId
(
hgyx001
.
getId
());
if
(
CollectionUtils
.
isEmpty
(
hgyx001As
)){
throw
new
PlatException
(
"销售发货详情不能为空!"
);
}
this
.
addHGKC004A
(
hgyx001As
,
hgkc004
);
}
/**
* 新增销售发货
* @param hgkc004
*/
public
void
add
(
HGKC004
hgkc004
)
{
//生成工序编码
//hgkc004.setSaleOutCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE));
//hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
//新增销售出库单
public
HGKC004
addHGKC004
(
HGYX001
hgyx001
)
{
HGKC004
hgkc004
=
new
HGKC004
();
hgkc004
.
setParentId
(
hgyx001
.
getId
());
hgkc004
.
setReceiptDate
(
DateUtils
.
formatShort
(
DateUtils
.
date
()));
hgkc004
.
setCompanyCode
(
hgyx001
.
getCompanyCode
());
hgkc004
.
setCompanyName
(
hgyx001
.
getCompanyName
());
hgkc004
.
setWhCode
(
hgyx001
.
getConsWhCode
());
hgkc004
.
setWhName
(
hgyx001
.
getConsWhName
());
hgkc004
.
setSaleOutCode
(
hgyx001
.
getOutboundCode
());
DaoUtils
.
insert
(
HGKC004
.
INSERT
,
hgkc004
);
return
hgkc004
;
}
/**
* 新增销售
发
货详情
* 新增销售
退
货详情
*/
public
void
add
Detail
(
List
<
HGYX001A
>
hgyx001As
,
Long
parentId
)
{
public
void
add
HGKC004A
(
List
<
HGYX001A
>
hgyx001As
,
HGKC004
hgkc004
)
{
for
(
HGYX001A
hgyx001A
:
hgyx001As
)
{
HGKC004A
hgkc004A
=
new
HGKC004A
();
hgkc004A
.
setInventType
(
hgyx001A
.
getInventType
());
hgkc004A
.
setInventCode
(
hgyx001A
.
getInventCode
());
hgkc004A
.
setInventName
(
hgyx001A
.
getInventName
());
hgkc004A
.
setInventRecordId
(
hgyx001A
.
getInventRecordId
());
hgkc004A
.
setSpec
(
hgyx001A
.
getSpec
());
hgkc004A
.
setLength
(
hgyx001A
.
getLength
());
hgkc004A
.
setThick
(
hgyx001A
.
getThick
());
hgkc004A
.
setWidth
(
hgyx001A
.
getWidth
());
hgkc004A
.
setQuantity
(
hgyx001A
.
getQuantity
());
hgkc004A
.
setUnitWeight
(
hgyx001A
.
getUnitWeight
());
hgkc004A
.
setWeight
(
hgyx001A
.
getWeight
());
hgkc004A
.
setParentId
(
parentId
);
DaoUtils
.
insert
(
HGKC004A
.
INSERT
,
hgkc004A
);
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgkc004
.
getCompanyCode
(),
hgkc004
.
getWhCode
(),
hgyx001A
.
getInventRecordId
());
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
}
if
(
hgkc010
.
getInvQty
().
compareTo
(
hgyx001A
.
getQuantity
())
<
0
)
{
throw
new
PlatException
(
"库存不足,无法保存!"
);
}
this
.
addHGKC004A
(
hgyx001A
,
hgkc004
);
}
}
//新增销售出库详情
public
void
addHGKC004A
(
HGYX001A
hgyx001A
,
HGKC004
hgkc004
)
{
HGKC004A
hgkc004A
=
new
HGKC004A
();
hgkc004A
.
setInventType
(
hgyx001A
.
getInventType
());
hgkc004A
.
setInventCode
(
hgyx001A
.
getInventCode
());
hgkc004A
.
setInventName
(
hgyx001A
.
getInventName
());
hgkc004A
.
setInventRecordId
(
hgyx001A
.
getInventRecordId
());
hgkc004A
.
setSpec
(
hgyx001A
.
getSpec
());
hgkc004A
.
setLength
(
hgyx001A
.
getLength
());
hgkc004A
.
setThick
(
hgyx001A
.
getThick
());
hgkc004A
.
setWidth
(
hgyx001A
.
getWidth
());
hgkc004A
.
setQuantity
(
hgyx001A
.
getQuantity
());
hgkc004A
.
setUnitWeight
(
hgyx001A
.
getUnitWeight
());
hgkc004A
.
setWeight
(
hgyx001A
.
getWeight
());
hgkc004A
.
setParentId
(
hgkc004
.
getId
());
DaoUtils
.
insert
(
HGKC004A
.
INSERT
,
hgkc004A
);
}
@OperationLogAnnotation
(
operModul
=
"销售发货"
,
operType
=
"保存并审核"
,
operDesc
=
"保存操作"
)
public
EiInfo
saveStatus
(
EiInfo
inInfo
)
{
...
...
@@ -276,67 +295,43 @@ public class ServiceHGYX001 extends ServiceEPBase {
hgyx001
.
setOutboundCode
(
outboundCode
);
if
(
hgyx001
.
getId
()
==
null
||
hgyx001
.
getId
()
==
0
)
{
this
.
add
(
hgyx001
);
HGKC004
hgkc004
=
new
HGKC004
();
hgkc004
.
setParentId
(
hgyx001
.
getId
());
hgkc004
.
setReceiptDate
(
DateUtils
.
formatShort
(
DateUtils
.
date
()));
hgkc004
.
setCompanyCode
(
hgyx001
.
getCompanyCode
());
hgkc004
.
setWhCode
(
hgyx001
.
getConsWhCode
());
hgkc004
.
setSaleOutCode
(
outboundCode
);
DaoUtils
.
insert
(
HGKC004
.
INSERT
,
hgkc004
);
HGKC004
hgkc004
=
this
.
addHGKC004
(
hgyx001
);
for
(
Map
resultRow
:
resultRows
)
{
HGYX001A
hgyx001A
=
new
HGYX001A
();
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInventRecordId
());
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
}
if
(
hgkc010
.
getInvQty
().
compareTo
(
hgyx001A
.
getQuantity
())
<
0
)
{
throw
new
PlatException
(
"库存不足,无法保存!"
);
}
if
(
hgyx001A
.
getId
()
==
null
||
hgyx001A
.
getId
()
==
0
)
{
this
.
addDatail
(
hgyx001A
);
HGKC004A
hgkc004A
=
new
HGKC004A
();
hgkc004A
.
setInventType
(
hgyx001A
.
getInventType
());
hgkc004A
.
setInventCode
(
hgyx001A
.
getInventCode
());
hgkc004A
.
setInventName
(
hgyx001A
.
getInventName
());
hgkc004A
.
setInventRecordId
(
hgyx001A
.
getInventRecordId
());
hgkc004A
.
setSpec
(
hgyx001A
.
getSpec
());
hgkc004A
.
setLength
(
hgyx001A
.
getLength
());
hgkc004A
.
setThick
(
hgyx001A
.
getThick
());
hgkc004A
.
setWidth
(
hgyx001A
.
getWidth
());
hgkc004A
.
setQuantity
(
hgyx001A
.
getQuantity
());
hgkc004A
.
setUnitWeight
(
hgyx001A
.
getUnitWeight
());
hgkc004A
.
setWeight
(
hgyx001A
.
getWeight
());
hgkc004A
.
setParentId
(
hgkc004
.
getId
());
DaoUtils
.
insert
(
HGKC004A
.
INSERT
,
hgkc004A
);
this
.
addHGKC004A
(
hgyx001A
,
hgkc004
);
}
}
}
else
{
this
.
modify
(
hgyx001
);
HGKC004
hgkc004
=
new
HGKC004
();
hgkc004
.
setParentId
(
hgyx001
.
getId
());
hgkc004
.
setReceiptDate
(
DateUtils
.
formatShort
(
DateUtils
.
date
()));
hgkc004
.
setCompanyCode
(
hgyx001
.
getCompanyCode
());
hgkc004
.
setWhCode
(
hgyx001
.
getConsWhCode
());
hgkc004
.
setSaleOutCode
(
outboundCode
);
DaoUtils
.
insert
(
HGKC004
.
INSERT
,
hgkc004
);
HGKC004
hgkc004
=
this
.
addHGKC004
(
hgyx001
);
for
(
Map
resultRow
:
resultRows
)
{
HGYX001A
hgyx001A
=
new
HGYX001A
();
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInventRecordId
());
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
}
if
(
hgkc010
.
getInvQty
().
compareTo
(
hgyx001A
.
getQuantity
())
<
0
)
{
throw
new
PlatException
(
"库存不足,无法保存!"
);
}
if
(
hgyx001A
.
getId
()
==
null
||
hgyx001A
.
getId
()
==
0
)
{
this
.
addDatail
(
hgyx001A
);
}
else
{
this
.
modifyDatail
(
hgyx001A
);
}
HGKC004A
hgkc004A
=
new
HGKC004A
();
hgkc004A
.
setInventType
(
hgyx001A
.
getInventType
());
hgkc004A
.
setInventCode
(
hgyx001A
.
getInventCode
());
hgkc004A
.
setInventName
(
hgyx001A
.
getInventName
());
hgkc004A
.
setInventRecordId
(
hgyx001A
.
getInventRecordId
());
hgkc004A
.
setSpec
(
hgyx001A
.
getSpec
());
hgkc004A
.
setLength
(
hgyx001A
.
getLength
());
hgkc004A
.
setThick
(
hgyx001A
.
getThick
());
hgkc004A
.
setWidth
(
hgyx001A
.
getWidth
());
hgkc004A
.
setQuantity
(
hgyx001A
.
getQuantity
());
hgkc004A
.
setUnitWeight
(
hgyx001A
.
getUnitWeight
());
hgkc004A
.
setWeight
(
hgyx001A
.
getWeight
());
hgkc004A
.
setParentId
(
hgkc004
.
getId
());
DaoUtils
.
insert
(
HGKC004A
.
INSERT
,
hgkc004A
);
this
.
addHGKC004A
(
hgyx001A
,
hgkc004
);
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/yx/service/ServiceHGYX001A.java
View file @
50fdebeb
...
...
@@ -48,7 +48,7 @@ public class ServiceHGYX001A extends ServiceEPBase {
}
outInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"type"
,
type
);
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
outInfo
.
getBlock
(
EiConstant
.
resultBlock
).
setBlockMeta
(
new
HGYX001
().
eiMetadata
);
outInfo
.
getBlock
(
EiConstant
.
resultBlock
).
setBlockMeta
(
new
HGYX001
A
().
eiMetadata
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
,
...
...
src/main/java/com/baosight/hggp/hg/yx/service/ServiceHGYX002.java
View file @
50fdebeb
...
...
@@ -141,8 +141,6 @@ public class ServiceHGYX002 extends ServiceEPBase {
}
public
void
addDatail
(
HGYX002A
hgyx002A
)
{
//生成工序编码
//hgyx001A.setDeliveryCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PLAN_CODE));
DaoUtils
.
insert
(
HGYX002A
.
INSERT
,
hgyx002A
);
}
...
...
@@ -169,7 +167,7 @@ public class ServiceHGYX002 extends ServiceEPBase {
hgyx002
.
setStatus
(
1
);
hgyx002
.
setOutboundCode
(
outboundCode
);
/*销售出库*/
saveOutbound
(
resultRow
,
outboundCode
);
saveOutbound
(
hgyx002
);
DaoUtils
.
update
(
HGYX002
.
BATCH_COMMIT
,
hgyx002
);
}
...
...
@@ -177,67 +175,62 @@ public class ServiceHGYX002 extends ServiceEPBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据提交成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
操作
失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
提交
失败"
);
}
return
inInfo
;
}
public
void
saveOutbound
(
Map
resultRow
,
String
outboundCode
)
{
// 写入数据
HGKC004
hgkc004
=
new
HGKC004
();
String
id
=
resultRow
.
get
(
HGYX002
.
FIELD_ID
).
toString
();
hgkc004
.
setParentId
(
Long
.
parseLong
(
id
));
hgkc004
.
setReceiptDate
(
DateUtils
.
formatShort
(
DateUtils
.
date
()));
hgkc004
.
setCompanyCode
(
resultRow
.
get
(
HGYX002
.
FIELD_COMPANY_CODE
).
toString
());
hgkc004
.
setCompanyName
(
resultRow
.
get
(
HGYX002
.
FIELD_COMPANY_NAME
).
toString
());
hgkc004
.
setWhCode
(
resultRow
.
get
(
HGYX002
.
FIELD_CONS_WH_CODE
).
toString
());
hgkc004
.
setWhName
(
resultRow
.
get
(
HGYX002
.
FIELD_CONS_WH_NAME
).
toString
());
hgkc004
.
setSaleOutCode
(
outboundCode
);
if
(
hgkc004
.
getId
()
==
null
||
hgkc004
.
getId
()
==
0
)
{
this
.
add
(
hgkc004
);
String
parentId
=
resultRow
.
get
(
HGYX002
.
FIELD_ID
).
toString
();
List
<
HGYX002A
>
hgyx002As
=
HGYXTools
.
Hgyx002
.
getParentId
(
Long
.
parseLong
(
parentId
));
if
(
CollectionUtils
.
isEmpty
(
hgyx002As
)){
throw
new
PlatException
(
"销售退货详情不能为空!"
);
}
this
.
addDetail
(
hgyx002As
,
hgkc004
.
getId
());
public
void
saveOutbound
(
HGYX002
hgyx002
)
{
HGKC004
hgkc004
=
this
.
addHGKC004
(
hgyx002
);
List
<
HGYX002A
>
hgyx002As
=
HGYXTools
.
Hgyx002
.
getParentId
(
hgyx002
.
getId
());
if
(
CollectionUtils
.
isEmpty
(
hgyx002As
)){
throw
new
PlatException
(
"销售退货详情不能为空!"
);
}
this
.
addHGKC004A
(
hgyx002As
,
hgkc004
);
}
/**
* 新增销售退货
* @param hgkc004
*/
public
void
add
(
HGKC004
hgkc004
)
{
//生成工序编码
//hgkc004.setSaleOutCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE));
//hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
//新增销售出库单
public
HGKC004
addHGKC004
(
HGYX002
hgyx002
)
{
HGKC004
hgkc004
=
new
HGKC004
();
hgkc004
.
setParentId
(
hgyx002
.
getId
());
hgkc004
.
setReceiptDate
(
DateUtils
.
formatShort
(
DateUtils
.
date
()));
hgkc004
.
setCompanyCode
(
hgyx002
.
getCompanyCode
());
hgkc004
.
setCompanyName
(
hgyx002
.
getCompanyName
());
hgkc004
.
setWhCode
(
hgyx002
.
getConsWhCode
());
hgkc004
.
setWhName
(
hgyx002
.
getConsWhName
());
hgkc004
.
setSaleOutCode
(
hgyx002
.
getOutboundCode
());
DaoUtils
.
insert
(
HGKC004
.
INSERT
,
hgkc004
);
return
hgkc004
;
}
/**
* 新增销售退货详情
*/
public
void
add
Detail
(
List
<
HGYX002A
>
hgyx002As
,
Long
parentId
)
{
public
void
add
HGKC004A
(
List
<
HGYX002A
>
hgyx002As
,
HGKC004
hgkc004
)
{
for
(
HGYX002A
hgyx002A
:
hgyx002As
)
{
HGKC004A
hgkc004A
=
new
HGKC004A
();
hgkc004A
.
setInventType
(
hgyx002A
.
getInventType
());
hgkc004A
.
setInventCode
(
hgyx002A
.
getInventCode
());
hgkc004A
.
setInventName
(
hgyx002A
.
getInventName
());
hgkc004A
.
setInventRecordId
(
hgyx002A
.
getInventRecordId
());
hgkc004A
.
setSpec
(
hgyx002A
.
getSpec
());
hgkc004A
.
setLength
(
hgyx002A
.
getLength
());
hgkc004A
.
setThick
(
hgyx002A
.
getThick
());
hgkc004A
.
setWidth
(
hgyx002A
.
getWidth
());
hgkc004A
.
setQuantity
(
hgyx002A
.
getReturnQuantity
());
hgkc004A
.
setUnitWeight
(
hgyx002A
.
getUnitWeight
());
hgkc004A
.
setWeight
(
hgyx002A
.
getReturnWeight
());
hgkc004A
.
setParentId
(
parentId
);
DaoUtils
.
insert
(
HGKC004A
.
INSERT
,
hgkc004A
);
this
.
addHGKC004A
(
hgyx002A
,
hgkc004
);
}
}
//新增销售出库详情
public
void
addHGKC004A
(
HGYX002A
hgyx002A
,
HGKC004
hgkc004
)
{
HGKC004A
hgkc004A
=
new
HGKC004A
();
hgkc004A
.
setInventType
(
hgyx002A
.
getInventType
());
hgkc004A
.
setInventCode
(
hgyx002A
.
getInventCode
());
hgkc004A
.
setInventName
(
hgyx002A
.
getInventName
());
hgkc004A
.
setInventRecordId
(
hgyx002A
.
getInventRecordId
());
hgkc004A
.
setSpec
(
hgyx002A
.
getSpec
());
hgkc004A
.
setLength
(
hgyx002A
.
getLength
());
hgkc004A
.
setThick
(
hgyx002A
.
getThick
());
hgkc004A
.
setWidth
(
hgyx002A
.
getWidth
());
hgkc004A
.
setQuantity
(
hgyx002A
.
getReturnQuantity
());
hgkc004A
.
setUnitWeight
(
hgyx002A
.
getUnitWeight
());
hgkc004A
.
setWeight
(
hgyx002A
.
getReturnWeight
());
hgkc004A
.
setParentId
(
hgkc004
.
getId
());
DaoUtils
.
insert
(
HGKC004A
.
INSERT
,
hgkc004A
);
}
@OperationLogAnnotation
(
operModul
=
"销售退货"
,
operType
=
"保存并审核"
,
operDesc
=
"保存操作"
)
@OperationLogAnnotation
(
operModul
=
"销售退货"
,
operType
=
"保存并审核"
,
operDesc
=
"保存
并审核
操作"
)
public
EiInfo
saveStatus
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
queryBlock
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
).
getRows
();
...
...
@@ -249,51 +242,22 @@ public class ServiceHGYX002 extends ServiceEPBase {
String
outboundCode
=
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
SALE_OUT_CODE
);
hgyx002
.
setOutboundCode
(
outboundCode
);
if
(
hgyx002
.
getId
()
==
null
||
hgyx002
.
getId
()
==
0
)
{
//String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
//hgyx001.setOutboundCode(outboundCode);
this
.
add
(
hgyx002
);
HGKC004
hgkc004
=
new
HGKC004
();
hgkc004
.
setParentId
(
hgyx002
.
getId
());
hgkc004
.
setReceiptDate
(
DateUtils
.
formatShort
(
DateUtils
.
date
()));
hgkc004
.
setCompanyCode
(
hgyx002
.
getCompanyCode
());
hgkc004
.
setCompanyName
(
hgyx002
.
getCompanyName
());
hgkc004
.
setWhCode
(
hgyx002
.
getConsWhCode
());
hgkc004
.
setWhName
(
hgyx002
.
getConsWhName
());
hgkc004
.
setSaleOutCode
(
outboundCode
);
DaoUtils
.
insert
(
HGKC004
.
INSERT
,
hgkc004
);
HGKC004
hgkc004
=
this
.
addHGKC004
(
hgyx002
);
for
(
Map
resultRow
:
resultRows
)
{
HGYX002A
hgyx002A
=
new
HGYX002A
();
hgyx002A
.
fromMap
(
resultRow
);
hgyx002A
.
setParentId
(
hgyx002
.
getId
());
if
(
hgyx002A
.
getId
()
==
null
||
hgyx002A
.
getId
()
==
0
)
{
this
.
addDatail
(
hgyx002A
);
HGKC004A
hgkc004A
=
new
HGKC004A
();
hgkc004A
.
setInventType
(
hgyx002A
.
getInventType
());
hgkc004A
.
setInventCode
(
hgyx002A
.
getInventCode
());
hgkc004A
.
setInventName
(
hgyx002A
.
getInventName
());
hgkc004A
.
setInventRecordId
(
hgyx002A
.
getInventRecordId
());
hgkc004A
.
setSpec
(
hgyx002A
.
getSpec
());
hgkc004A
.
setLength
(
hgyx002A
.
getLength
());
hgkc004A
.
setThick
(
hgyx002A
.
getThick
());
hgkc004A
.
setWidth
(
hgyx002A
.
getWidth
());
hgkc004A
.
setQuantity
(
hgyx002A
.
getReturnQuantity
());
hgkc004A
.
setUnitWeight
(
hgyx002A
.
getUnitWeight
());
hgkc004A
.
setWeight
(
hgyx002A
.
getReturnWeight
());
hgkc004A
.
setParentId
(
hgkc004
.
getId
());
DaoUtils
.
insert
(
HGKC004A
.
INSERT
,
hgkc004A
);
}
else
{
this
.
modifyDatail
(
hgyx002A
);
}
this
.
addHGKC004A
(
hgyx002A
,
hgkc004
);
}
}
else
{
this
.
modify
(
hgyx002
);
HGKC004
hgkc004
=
new
HGKC004
();
hgkc004
.
setParentId
(
hgyx002
.
getId
());
hgkc004
.
setReceiptDate
(
DateUtils
.
formatShort
(
DateUtils
.
date
()));
hgkc004
.
setCompanyCode
(
hgyx002
.
getCompanyCode
());
hgkc004
.
setCompanyName
(
hgyx002
.
getCompanyName
());
hgkc004
.
setWhCode
(
hgyx002
.
getConsWhCode
());
hgkc004
.
setWhName
(
hgyx002
.
getConsWhName
());
hgkc004
.
setSaleOutCode
(
outboundCode
);
DaoUtils
.
insert
(
HGKC004
.
INSERT
,
hgkc004
);
HGKC004
hgkc004
=
this
.
addHGKC004
(
hgyx002
);
for
(
Map
resultRow
:
resultRows
)
{
HGYX002A
hgyx002A
=
new
HGYX002A
();
hgyx002A
.
fromMap
(
resultRow
);
...
...
@@ -303,20 +267,7 @@ public class ServiceHGYX002 extends ServiceEPBase {
}
else
{
this
.
modifyDatail
(
hgyx002A
);
}
HGKC004A
hgkc004A
=
new
HGKC004A
();
hgkc004A
.
setInventType
(
hgyx002A
.
getInventType
());
hgkc004A
.
setInventCode
(
hgyx002A
.
getInventCode
());
hgkc004A
.
setInventName
(
hgyx002A
.
getInventName
());
hgkc004A
.
setInventRecordId
(
hgyx002A
.
getInventRecordId
());
hgkc004A
.
setSpec
(
hgyx002A
.
getSpec
());
hgkc004A
.
setLength
(
hgyx002A
.
getLength
());
hgkc004A
.
setThick
(
hgyx002A
.
getThick
());
hgkc004A
.
setWidth
(
hgyx002A
.
getWidth
());
hgkc004A
.
setQuantity
(
hgyx002A
.
getReturnQuantity
());
hgkc004A
.
setUnitWeight
(
hgyx002A
.
getUnitWeight
());
hgkc004A
.
setWeight
(
hgyx002A
.
getReturnWeight
());
hgkc004A
.
setParentId
(
hgkc004
.
getId
());
DaoUtils
.
insert
(
HGKC004A
.
INSERT
,
hgkc004A
);
this
.
addHGKC004A
(
hgyx002A
,
hgkc004
);
}
}
}
...
...
@@ -327,4 +278,5 @@ public class ServiceHGYX002 extends ServiceEPBase {
}
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/yx/service/ServiceHGYX002C.java
View file @
50fdebeb
...
...
@@ -5,6 +5,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
import
com.baosight.hggp.hg.yx.domain.HGYX001
;
import
com.baosight.hggp.hg.yx.domain.HGYX001A
;
import
com.baosight.hggp.hg.yx.domain.HGYX001C
;
import
com.baosight.hggp.hg.yx.domain.HGYX002C
;
import
com.baosight.hggp.hg.yx.tools.HGYXTools
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
...
...
@@ -43,13 +44,12 @@ public class ServiceHGYX002C extends ServiceEPBase {
AssertUtils
.
isEmpty
(
hgYx001s
,
"未找到对应发货单号"
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGYX001
.
FIELD_DELIVERY_CODE
,
hgYx001s
.
get
(
0
).
getDeliveryCode
());
}
inInfo
=
super
.
query
(
inInfo
,
HGYX00
1A
.
QUERY
,
new
HGYX001A
());
inInfo
=
super
.
query
(
inInfo
,
HGYX00
2C
.
QUERY
,
new
HGYX001A
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_TYPE_BLOCK_ID
,
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
,
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
));
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGYX001A
().
eiMetadata
);
return
inInfo
;
}
...
...
@@ -57,6 +57,6 @@ public class ServiceHGYX002C extends ServiceEPBase {
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGYX001
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
return
super
.
query
(
inInfo
,
HGYX00
1C
.
QUERY
,
new
HGYX001C
());
return
super
.
query
(
inInfo
,
HGYX00
2C
.
QUERY
,
new
HGYX001A
());
}
}
src/main/java/com/baosight/hggp/hg/yx/sql/HGYX001.xml
View file @
50fdebeb
...
...
@@ -388,6 +388,7 @@
${hggpSchema}.HGYX001
WHERE DELETE_FLAG = 0 AND STATUS = 1
<include
refid=
"condition"
/>
order by DELIVERY_CODE desc
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/yx/sql/HGYX001C.xml
View file @
50fdebeb
...
...
@@ -37,7 +37,6 @@
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<include
refid=
"idCondition"
/>
<include
refid=
"customCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
...
...
@@ -100,10 +99,10 @@
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<
!--<
sql id="customCondition">
<include refid="BaseCondition.specCondition"/>
<include refid="BaseCondition.createdTimeCondition"/>
</sql>
</sql>
-->
<sql
id=
"orderBy"
>
<dynamic
prepend=
"ORDER BY"
>
...
...
src/main/java/com/baosight/hggp/hg/yx/sql/HGYX002C.xml
View file @
50fdebeb
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGYX002
A
"
>
<typeAlias
alias=
"HGYX002
A"
type=
"com.baosight.hggp.hg.yx.domain.HGYX002
A"
/>
<sqlMap
namespace=
"HGYX002
C
"
>
<typeAlias
alias=
"HGYX002
C"
type=
"com.baosight.hggp.hg.yx.domain.HGYX001
A"
/>
<sql
id=
"column"
>
ID as "id",
<!-- ID -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 存货档案id -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
SPEC as "spec",
<!-- 规格 -->
LENGTH as "length",
<!-- 长 -->
WIDTH as "width",
<!-- 宽 -->
THICK as "thick",
<!-- 厚 -->
QUANTITY as "quantity",
<!-- 发货数量 -->
UNIT_WEIGHT as "unitWeight",
<!-- 单重 -->
WEIGHT as "weight",
<!-- 发货重量 -->
A.
ID as "id",
<!-- ID -->
A
.A
CCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
A.
DEP_CODE as "depCode",
<!-- 部门编码 -->
A.
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
A.
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
A.
CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
A.
UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
A.
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
A.
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
A.
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
A.
INVENT_RECORD_ID as "inventRecordId",
<!-- 存货档案id -->
A.
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
A.
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
A.
INVENT_NAME as "inventName",
<!-- 存货名称 -->
A.
SPEC as "spec",
<!-- 规格 -->
A.
LENGTH as "length",
<!-- 长 -->
A.
WIDTH as "width",
<!-- 宽 -->
A.
THICK as "thick",
<!-- 厚 -->
A.
QUANTITY as "quantity",
<!-- 发货数量 -->
A.
UNIT_WEIGHT as "unitWeight",
<!-- 单重 -->
A.
WEIGHT as "weight",
<!-- 发货重量 -->
'0' as "returnQuantity",
<!-- 退货数量 -->
'0' as "returnWeight",
<!-- 退货重量 -->
PARENT_ID as "parentId"
<!-- 销售退货ID -->
A.PARENT_ID as "parentId"
<!-- 销售退货ID -->
</sql>
<sql
id=
"authCondition"
>
<!-- 无权限时使用 -->
<isNotEmpty
prepend=
" AND "
property=
"authDepCode"
>
A.DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
(A.CREATED_BY = #authOnlyPeople# OR A.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
<isNotEmpty
property=
"authOnlyPeople"
>
A.CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty
property=
"authDepCodes"
>
A.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql
id=
"condition"
>
<include
refid=
"
HGXSDataAuth.
authCondition"
/>
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
A.
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
A
.A
CCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
A.
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
A.
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdName"
>
CREATED_NAME = #createdName#
A.
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
A.
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
A.
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedName"
>
UPDATED_NAME = #updatedName#
A.
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
A.
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
A.
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
INVENT_RECORD_ID = #inventRecordId#
A.
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventType"
>
INVENT_TYPE = #inventType#
A.
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
INVENT_CODE = #inventCode#
A.
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
A.INVENT_NAME like CONCAT(#inventName#,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
SPEC = #spec#
A.SPEC like CONCAT(#spec#,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"length"
>
LENGTH = #length#
A.
LENGTH = #length#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"width"
>
WIDTH = #width#
A.
WIDTH = #width#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"thick"
>
THICK = #thick#
A.
THICK = #thick#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"quantity"
>
QUANTITY = #quantity#
A.
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"weight"
>
WEIGHT = #weight#
A.
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
A.
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordIds"
>
INVENT_RECORD_ID NOT IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventRecordIds"
>
#inventRecordIds[]#
</iterate>
A.
INVENT_RECORD_ID NOT IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventRecordIds"
>
#inventRecordIds[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
A.
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"HGYX00
1A
"
>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"HGYX00
2C
"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGYX001A WHERE 1=1
FROM ${hggpSchema}.HGYX001A A
LEFT JOIN ${hggpSchema}.HGYX001 B ON B.ID = A.PARENT_ID
WHERE 1=1 AND B.DELIVERY_CODE = #deliveryCode#
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
CREATED_TIME desc,
ID asc
A.CREATED_TIME desc, A.
ID asc
</isEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGYX001A WHERE 1=1
SELECT COUNT(*) FROM ${hggpSchema}.HGYX001A A
LEFT JOIN ${hggpSchema}.HGYX001 B ON B.ID = A.PARENT_ID
WHERE 1=1 AND B.DELIVERY_CODE = #deliveryCode#
<include
refid=
"condition"
/>
</select>
</sqlMap>
\ No newline at end of file
src/main/webapp/HG/YX/HGYX001.jsp
View file @
50fdebeb
...
...
@@ -36,7 +36,7 @@
</EF:EFSelect>--%>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hg
sb.approveS
tatus" condition="ITEM_CODE IN ('0','1')"/>
<EF:EFCodeOption codeName="hggp.hg
yx.s
tatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
...
...
@@ -76,8 +76,8 @@
<EF:EFColumn ename="consAddr" cname="发货地址" hidden="true" width="120" align="center"/>
<EF:EFColumn ename="consQuantity" cname="发货数量" width="120" align="center" format="{0:N0}" data-rules="number"/>
<EF:EFColumn ename="consWeight" cname="发货重量" width="120" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFComboColumn ename="status" cname="审
批
状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hg
sb.approveS
tatus" condition="ITEM_CODE IN ('0','1')"/>
<EF:EFComboColumn ename="status" cname="审
核
状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hg
yx.s
tatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
...
...
src/main/webapp/HG/YX/HGYX001A.jsp
View file @
50fdebeb
...
...
@@ -26,7 +26,7 @@
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" disabled="true" filter="contains" value="0">
<EF:EFCodeOption codeName="hggp.hg
sb.approveS
tatus" condition="ITEM_CODE IN ('0','1')"/>
<EF:EFCodeOption codeName="hggp.hg
yx.s
tatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
<div class="row">
...
...
src/main/webapp/HG/YX/HGYX002.js
View file @
50fdebeb
...
...
@@ -97,7 +97,7 @@ function add() {
JSColorbox
.
open
({
href
:
"HGYX002A?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>新增销售退货</div>"
,
width
:
"
8
0%"
,
width
:
"
9
0%"
,
height
:
"80%"
,
callbackName
:
windowCallback
});
...
...
@@ -117,7 +117,7 @@ function update() {
JSColorbox
.
open
({
href
:
"HGYX002A??methodName=initLoad&inqu_status-0-parentId="
+
id
+
"&inqu_status-0-type=update&efParentFormEname=HGYX002"
,
title
:
"<div style='text-align: center;'>修改销售退货</div>"
,
width
:
"
8
0%"
,
width
:
"
9
0%"
,
height
:
"80%"
,
callbackName
:
windowCallback
});
...
...
src/main/webapp/HG/YX/HGYX002.jsp
View file @
50fdebeb
...
...
@@ -22,7 +22,7 @@
<EF:EFInput blockId="inqu_status" row="0" ename="receName" cname="收货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hg
sb.approveS
tatus" condition="ITEM_CODE IN ('0','1')"/>
<EF:EFCodeOption codeName="hggp.hg
yx.s
tatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="所属公司" placeholder="模糊查询" type="hidden" colWidth="3"/>
</div>
...
...
@@ -53,8 +53,8 @@
</EF:EFComboColumn>
<EF:EFColumn ename="returnQuantity" cname="退货数量" width="120" readonly="true" align="center" format="{0:N0}" data-rules="number"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" readonly="true" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFComboColumn ename="status" cname="审
批
状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hg
sb.approveS
tatus" condition="ITEM_CODE IN ('0','1')"/>
<EF:EFComboColumn ename="status" cname="审
核
状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hg
yx.s
tatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
...
...
src/main/webapp/HG/YX/HGYX002A.js
View file @
50fdebeb
...
...
@@ -289,7 +289,7 @@ $(function() {
return
false
;
}
if
(
Math
.
abs
(
parseFloat
(
returnQuantity
))
>
parseInt
(
quantity
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
退货数量大于发货数量
\"
"
);
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
退货数量
不能
大于发货数量
\"
"
);
flag
=
false
;
return
false
;
}
...
...
@@ -364,7 +364,7 @@ $(function() {
return
false
;
}
if
(
Math
.
abs
(
parseFloat
(
returnQuantity
))
>
parseInt
(
quantity
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
退货数量大于发货数量
\"
"
);
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
退货数量
不能
大于发货数量
\"
"
);
flag
=
false
;
return
false
;
}
...
...
src/main/webapp/HG/YX/HGYX002A.jsp
View file @
50fdebeb
...
...
@@ -48,7 +48,7 @@
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" disabled="true" filter="contains" value="0">
<EF:EFCodeOption codeName="hggp.hg
sb.approveS
tatus" condition="ITEM_CODE IN ('0','1')"/>
<EF:EFCodeOption codeName="hggp.hg
yx.s
tatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
<div class="row">
...
...
src/main/webapp/HG/YX/HGYX002C.jsp
View file @
50fdebeb
...
...
@@ -21,6 +21,7 @@
<EF:EFInput blockId="inqu_status" row="0" ename="spec" cname="规格" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" type="hidden" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" type="hidden" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" type="hidden" required="true" colWidth="3"/>
</div>
</EF:EFRegion>
...
...
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