Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
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
鲁鑫
topsun-bpm
Commits
65b00418
Commit
65b00418
authored
Jul 30, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
62403d57
9d627891
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
16 deletions
+71
-16
nonProducePickList.js
...ebapp/biz/topsun/sap/nonProducePick/nonProducePickList.js
+2
-0
nonProducePick.ftl
.../src/main/webapp/template/print/topsun/nonProducePick.ftl
+38
-6
CommonUtils.java
...n/src/main/java/com/huigou/topsun/common/CommonUtils.java
+7
-7
NonProducePickApplicationImpl.java
...ePick/application/impl/NonProducePickApplicationImpl.java
+7
-2
NonProducePickController.java
...p/nonProducePick/controller/NonProducePickController.java
+15
-0
SapPermitApplicationImpl.java
...sap/permit/application/impl/SapPermitApplicationImpl.java
+2
-1
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/nonProducePick/nonProducePickList.js
View file @
65b00418
...
@@ -39,6 +39,8 @@ function loadGrid() {
...
@@ -39,6 +39,8 @@ function loadGrid() {
width
:
"100%"
,
width
:
"100%"
,
height
:
"100%"
,
height
:
"100%"
,
heightDiff
:
-
8
,
heightDiff
:
-
8
,
sortName
:
'fillinDate'
,
sortOrder
:
'desc'
,
checkbox
:
true
,
checkbox
:
true
,
fixedCellHeight
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
selectRowButtonOnly
:
true
,
...
...
topsun-xt/src/main/webapp/template/print/topsun/nonProducePick.ftl
View file @
65b00418
...
@@ -14,24 +14,28 @@
...
@@ -14,24 +14,28 @@
</head>
</head>
<body>
<body>
<div
class=
"billTitle"
>
物品领料单
</div>
<div
class=
"billTitle"
>
物品领料单
</div>
<span
class=
"fs"
style=
"font-family:SimSun;position: absolute;right: 90px;top: 0"
>
<img
class=
"barcode"
src=
"${barCode}"
></img>
</span>
<div
class=
"blank_div"
></div>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<colgroup>
<col
width=
'
5
0%'
/>
<col
width=
'
7
0%'
/>
<col
width=
"
5
0%"
/>
<col
width=
"
3
0%"
/>
</colgroup>
</colgroup>
<tr>
<tr>
<td
class=
"left"
>
领料部门:${kostlName?default("")?html}
</td>
<td
class=
"left"
>
领料部门:${kostlName?default("")?html}
</td>
<td
class=
"
righ
t"
>
领料单号:${message?default("")?html}
</td>
<td
class=
"
lef
t"
>
领料单号:${message?default("")?html}
</td>
</tr>
</tr>
</table>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<colgroup>
<col
width=
'
5
0%'
/>
<col
width=
'
7
0%'
/>
<col
width=
"
5
0%"
/>
<col
width=
"
3
0%"
/>
</colgroup>
</colgroup>
<tr>
<tr>
<td
class=
"left"
>
领料类型:${personMemberName?default("")?html}
</td>
<td
class=
"left"
>
领料类型:${personMemberName?default("")?html}
</td>
<td
class=
"
righ
t"
>
列印日期:${fillinDate?default("")?html}
</td>
<td
class=
"
lef
t"
>
列印日期:${fillinDate?default("")?html}
</td>
</tr>
</tr>
</table>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
...
@@ -83,6 +87,34 @@
...
@@ -83,6 +87,34 @@
<td
class=
"center"
>
${count?default("")?html}
</td>
<td
class=
"center"
>
${count?default("")?html}
</td>
</tr>
</tr>
</table>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'20%'
/>
<col
width=
"20%"
/>
<col
width=
"20%"
/>
<col
width=
"20%"
/>
<col
width=
"20%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
记账:
</td>
<td
class=
"left"
>
发料人:
</td>
<td
class=
"left"
>
核准:
</td>
<td
class=
"left"
>
审批:
</td>
<td
class=
"left"
>
领料人:${personMemberName?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'33%'
/>
<col
width=
"33%"
/>
<col
width=
"33%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
第一联:生产部(白)
</td>
<td
class=
"left"
>
第二联:仓库(黄)
</td>
<td
class=
"left"
>
第三联:存根(红)
</td>
</tr>
</table>
</body>
</body>
</html>
</html>
topsun/src/main/java/com/huigou/topsun/common/CommonUtils.java
View file @
65b00418
...
@@ -54,18 +54,18 @@ public class CommonUtils {
...
@@ -54,18 +54,18 @@ public class CommonUtils {
}
}
public
static
void
generateBarCode128
(
String
msg
,
String
imgType
,
OutputStream
out
)
public
static
void
generateBarCode128
(
String
msg
,
String
imgType
,
OutputStream
out
,
int
dpi
,
double
height
,
HumanReadablePlacement
placement
)
throws
IOException
{
throws
IOException
{
if
(
msg
==
null
||
out
==
null
)
{
if
(
msg
==
null
||
out
==
null
)
{
return
;
return
;
}
}
Code128Bean
bean
=
new
Code128Bean
();
Code128Bean
bean
=
new
Code128Bean
();
int
dpi
=
100
;
//
int dpi = 100;
// module宽度 UnitConv.in2mm(1.f / dpi);
// module宽度 UnitConv.in2mm(1.f / dpi);
double
moduleWidth
=
0.
4
;
double
moduleWidth
=
0.
3
;
bean
.
setModuleWidth
(
moduleWidth
);
bean
.
setModuleWidth
(
moduleWidth
);
bean
.
setMsgPosition
(
HumanReadablePlacement
.
HRP_BOTTOM
);
bean
.
setMsgPosition
(
placement
);
bean
.
setHeight
(
10
);
bean
.
setHeight
(
height
);
bean
.
doQuietZone
(
false
);
bean
.
doQuietZone
(
false
);
...
@@ -75,11 +75,11 @@ public class CommonUtils {
...
@@ -75,11 +75,11 @@ public class CommonUtils {
canvas
.
finish
();
canvas
.
finish
();
}
}
public
static
File
genBarCode128
(
String
msg
,
String
imgType
,
File
file
)
public
static
File
genBarCode128
(
String
msg
,
String
imgType
,
File
file
,
int
dpi
,
double
height
,
HumanReadablePlacement
placement
)
throws
IOException
{
throws
IOException
{
FileOutputStream
out
=
new
FileOutputStream
(
file
);
FileOutputStream
out
=
new
FileOutputStream
(
file
);
try
{
try
{
generateBarCode128
(
msg
,
imgType
,
out
);
generateBarCode128
(
msg
,
imgType
,
out
,
dpi
,
height
,
placement
);
}
finally
{
}
finally
{
if
(
out
!=
null
)
{
if
(
out
!=
null
)
{
out
.
close
();
out
.
close
();
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProducePick/application/impl/NonProducePickApplicationImpl.java
View file @
65b00418
...
@@ -143,7 +143,10 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd
...
@@ -143,7 +143,10 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd
}
else
{
}
else
{
nonProducePick
=
(
NonProducePick
)
commonDomainService
.
loadAndFillinProperties
(
nonProducePick
);
nonProducePick
=
(
NonProducePick
)
commonDomainService
.
loadAndFillinProperties
(
nonProducePick
);
}
}
this
.
checkNonProducePickNum
(
nonProducePickItems
,
nonProducePick
.
getWerks
());
//还未创建预留单之前都需要校验数量
if
(
StringUtil
.
isBlank
(
nonProducePick
.
getMessage
())){
this
.
checkNonProducePickNum
(
nonProducePickItems
,
nonProducePick
.
getWerks
());
}
nonProducePick
=
nonProducePickRepository
.
save
(
nonProducePick
);
nonProducePick
=
nonProducePickRepository
.
save
(
nonProducePick
);
nonProducePickItemApplication
.
saveNonProducePickItems
(
nonProducePick
.
getId
(),
nonProducePickItems
);
nonProducePickItemApplication
.
saveNonProducePickItems
(
nonProducePick
.
getId
(),
nonProducePickItems
);
return
nonProducePick
.
getId
();
return
nonProducePick
.
getId
();
...
@@ -164,7 +167,9 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd
...
@@ -164,7 +167,9 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd
List
<
SapResult
>
resultList
=
JSONObject
.
parseArray
(
execute
,
SapResult
.
class
);
List
<
SapResult
>
resultList
=
JSONObject
.
parseArray
(
execute
,
SapResult
.
class
);
SapResult
sapResult
=
resultList
.
get
(
0
);
SapResult
sapResult
=
resultList
.
get
(
0
);
if
(!
"S"
.
equals
(
sapResult
.
getTYPE
())){
if
(!
"S"
.
equals
(
sapResult
.
getTYPE
())){
throw
new
RuntimeException
(
"数据传输失败,"
+
sapResult
.
getMESSAGE
());
List
<
String
>
stringList
=
resultList
.
stream
().
map
(
SapResult:
:
getMESSAGE
).
collect
(
Collectors
.
toList
());
String
message
=
String
.
join
(
";"
,
stringList
);
throw
new
RuntimeException
(
message
);
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProducePick/controller/NonProducePickController.java
View file @
65b00418
...
@@ -3,6 +3,7 @@ package com.huigou.topsun.sap.nonProducePick.controller;
...
@@ -3,6 +3,7 @@ package com.huigou.topsun.sap.nonProducePick.controller;
import
com.huigou.context.Operator
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.data.domain.query.QueryPageRequest
;
import
com.huigou.data.domain.query.QueryPageRequest
;
import
com.huigou.topsun.common.CommonUtils
;
import
com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest
;
import
com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest
;
import
com.huigou.topsun.sap.nonProducePick.application.NonProducePickApplication
;
import
com.huigou.topsun.sap.nonProducePick.application.NonProducePickApplication
;
import
com.huigou.topsun.sap.nonProducePick.application.NonProducePickItemApplication
;
import
com.huigou.topsun.sap.nonProducePick.application.NonProducePickItemApplication
;
...
@@ -14,10 +15,13 @@ import com.huigou.uasp.bmp.common.BizBillStatus;
...
@@ -14,10 +15,13 @@ import com.huigou.uasp.bmp.common.BizBillStatus;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.SDO
;
import
com.huigou.util.SDO
;
import
org.krysalis.barcode4j.HumanReadablePlacement
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.File
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
...
@@ -91,6 +95,17 @@ public class NonProducePickController extends CommonController {
...
@@ -91,6 +95,17 @@ public class NonProducePickController extends CommonController {
map
.
put
(
"itemList"
,
itemList
);
map
.
put
(
"itemList"
,
itemList
);
BigDecimal
bigDecimal
=
itemList
.
stream
().
map
(
NonProducePickItem:
:
getErfmg
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
bigDecimal
=
itemList
.
stream
().
map
(
NonProducePickItem:
:
getErfmg
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
map
.
put
(
"count"
,
bigDecimal
);
map
.
put
(
"count"
,
bigDecimal
);
File
file
=
new
File
(
nonProducePick
.
getMessage
()+
".png"
);
if
(!
file
.
exists
())
{
String
IMG_TYPE_PNG
=
"image/png"
;
try
{
map
.
put
(
"barCode"
,
CommonUtils
.
genBarCode128
(
nonProducePick
.
getMessage
(),
IMG_TYPE_PNG
,
file
,
128
,
10
,
HumanReadablePlacement
.
HRP_NONE
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"条形码生成失败:"
+
e
.
getMessage
());
}
}
else
{
map
.
put
(
"barCode"
,
file
);
}
String
pintPage
=
String
.
format
(
"/print/topsun/nonProducePick.ftl"
);
String
pintPage
=
String
.
format
(
"/print/topsun/nonProducePick.ftl"
);
return
outputAndProcUnitHandlerPDF
(
pintPage
,
id
,
map
);
return
outputAndProcUnitHandlerPDF
(
pintPage
,
id
,
map
);
}
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/permit/application/impl/SapPermitApplicationImpl.java
View file @
65b00418
...
@@ -35,6 +35,7 @@ import org.activiti.engine.delegate.DelegateExecution;
...
@@ -35,6 +35,7 @@ import org.activiti.engine.delegate.DelegateExecution;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.krysalis.barcode4j.HumanReadablePlacement
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -295,7 +296,7 @@ public class SapPermitApplicationImpl extends FlowBroker implements SapPermitApp
...
@@ -295,7 +296,7 @@ public class SapPermitApplicationImpl extends FlowBroker implements SapPermitApp
File
file
=
new
File
(
"bar-"
+
permit
.
getBillCode
()+
".png"
);
File
file
=
new
File
(
"bar-"
+
permit
.
getBillCode
()+
".png"
);
if
(!
file
.
exists
())
{
if
(!
file
.
exists
())
{
String
IMG_TYPE_PNG
=
"image/png"
;
String
IMG_TYPE_PNG
=
"image/png"
;
data
.
put
(
"barCode"
,
CommonUtils
.
genBarCode128
(
permit
.
getBillCode
(),
IMG_TYPE_PNG
,
file
));
data
.
put
(
"barCode"
,
CommonUtils
.
genBarCode128
(
permit
.
getBillCode
(),
IMG_TYPE_PNG
,
file
,
128
,
10
,
HumanReadablePlacement
.
HRP_NONE
));
}
else
{
}
else
{
data
.
put
(
"barCode"
,
file
);
data
.
put
(
"barCode"
,
file
);
}
}
...
...
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