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
e25808d6
Commit
e25808d6
authored
Oct 25, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # topsun-xt/src/main/resources/数据库变更记录
parents
9b86a3b2
12768af3
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
903 additions
and
25 deletions
+903
-25
数据库变更记录
topsun-xt/src/main/resources/数据库变更记录
+31
-2
sapPermitDetail.jsp
...src/main/webapp/biz/topsun/sap/permit/sapPermitDetail.jsp
+1
-0
processOutsourceDetail.js
...biz/topsun/sap/processOutsource/processOutsourceDetail.js
+25
-0
processOutsourceDetail.jsp
...iz/topsun/sap/processOutsource/processOutsourceDetail.jsp
+1
-1
processOutsourceList.js
...p/biz/topsun/sap/processOutsource/processOutsourceList.js
+2
-2
sapProcessOutsource.jsp
...p/biz/topsun/sap/processOutsource/sapProcessOutsource.jsp
+20
-0
addPurchaseInfoRecordDetail.jsp
...un/sap/purchaseInfoRecord/addPurchaseInfoRecordDetail.jsp
+1
-0
purchaseInfoRecordDetail.js
...topsun/sap/purchaseInfoRecord/purchaseInfoRecordDetail.js
+3
-0
purchaseInfoRecordList.js
...z/topsun/sap/purchaseInfoRecord/purchaseInfoRecordList.js
+3
-2
sapPurchaseOrderList.js
...bapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.js
+14
-0
epChangeForm.ftl
...xt/src/main/webapp/template/print/topsun/epChangeForm.ftl
+2
-2
processOuter.ftl
...xt/src/main/webapp/template/print/topsun/processOuter.ftl
+339
-0
EpApplication.java
...ava/com/huigou/topsun/ep/epApplication/EpApplication.java
+9
-0
EpProductInfoVo.java
.../huigou/topsun/ep/epApplication/EpVo/EpProductInfoVo.java
+51
-0
EpApplicationImpl.java
...uigou/topsun/ep/epApplication/impl/EpApplicationImpl.java
+23
-0
SapPermit.java
...n/java/com/huigou/topsun/sap/permit/domain/SapPermit.java
+6
-0
SapPermitVo.java
...ain/java/com/huigou/topsun/sap/permit/vo/SapPermitVo.java
+5
-0
ProcessOutsourceOrderItem.java
...ap/processOutsource/domain/ProcessOutsourceOrderItem.java
+12
-0
ProcessOutsourceOrderItemRepository.java
...ource/repository/ProcessOutsourceOrderItemRepository.java
+2
-0
SapPurchaseInfoRecordItem.java
.../purchaseInfoRecord/domain/SapPurchaseInfoRecordItem.java
+6
-0
SapPurchaseInfoRecordItemVo.java
...haseInfoRecord/domain/vo/SapPurchaseInfoRecordItemVo.java
+6
-0
SapPurchaseOrderApplication.java
...urchaseOrder/application/SapPurchaseOrderApplication.java
+2
-0
SapPurchaseOrderApplicationImpl.java
...der/application/impl/SapPurchaseOrderApplicationImpl.java
+176
-16
SapPurchaseOrderController.java
.../purchaseOrder/controller/SapPurchaseOrderController.java
+12
-0
SapPurchaseOrder.java
...gou/topsun/sap/purchaseOrder/domain/SapPurchaseOrder.java
+6
-0
SapPurchaseOrderItem.java
...topsun/sap/purchaseOrder/domain/SapPurchaseOrderItem.java
+54
-0
SapPurchaseOrderItemVo.java
...n/sap/purchaseOrder/domain/vo/SapPurchaseOrderItemVo.java
+56
-0
SapPurchaseOrderVo.java
...opsun/sap/purchaseOrder/domain/vo/SapPurchaseOrderVo.java
+3
-0
SapSaleOrderVo.java
...ou/topsun/sap/purchaseOrder/domain/vo/SapSaleOrderVo.java
+32
-0
No files found.
topsun-xt/src/main/resources/数据库变更记录
View file @
e25808d6
...
...
@@ -114,7 +114,36 @@ ADD COLUMN `comments` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai
--2024-10-15 EP销售订单修改/取消增加单价和总价
ALTER TABLE `topsun_dev`.`ep_sale_order_cancel_item`
ADD COLUMN `PRICE` decimal(10, 3) NULL COMMENT '单价' AFTER `PROCESS`,
ADD COLUMN `AMOUNT` decimal(10, 3) NULL COMMENT '总价' AFTER `PRICE`;
ADD COLUMN `PRICE` decimal(15, 3) NULL COMMENT '单价' AFTER `PROCESS`,
ADD COLUMN `AMOUNT` decimal(15, 3) NULL COMMENT '总价' AFTER `PRICE`;
--2024-10-22 放行条增加车牌号
ALTER TABLE `topsun_dev`.`sap_permit`
ADD COLUMN `car_no` varchar(32) NULL COMMENT '车牌号' AFTER `apply_person_name`;
--2024-10-22 采购信息记录运输费
ALTER TABLE `topsun_dev`.`sap_purchase_info_record_item`
ADD COLUMN `FREIGHT` decimal(10, 2) NULL COMMENT '运输费' AFTER `KBETR5`;
--2024-10-24 外协工序下道工序,印张LOSS
ALTER TABLE `topsun_dev`.`sap_process_outsource_order_item`
ADD COLUMN `TXZ02` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '下道工序' AFTER `LGORT_NAME`,
ADD COLUMN `PRINT_LOSS` decimal(10, 2) NULL DEFAULT NULL COMMENT '印张LOSS' AFTER `TXZ02`;
--2024-10-24 采购订单明细字段
ALTER TABLE `topsun_dev`.`sap_purchase_order_item`
ADD COLUMN `VBELN` varchar(32) NULL COMMENT '销售单号' AFTER `UMSON`,
ADD COLUMN `POSNR` varchar(10) NULL COMMENT '销售单行项目' AFTER `VBELN`,
ADD COLUMN `TELF1` varchar(32) NULL COMMENT '联系人电话' AFTER `POSNR`,
ADD COLUMN `KWMENG` varchar(32) NULL COMMENT '订单数量(成名数量)' AFTER `TELF1`,
ADD COLUMN `ZINSTNUM` varchar(32) NULL COMMENT '指令号' AFTER `KWMENG`,
ADD COLUMN `MATNR2` varchar(32) NULL COMMENT '产品编号' AFTER `ZINSTNUM`,
ADD COLUMN `MAKTX` varchar(255) NULL COMMENT '产品描述' AFTER `MATNR2`,
ADD COLUMN `STR_SUPPL` varchar(255) NULL COMMENT '交货地址' AFTER `MAKTX`,
ADD COLUMN `KBETR2` decimal(10, 2) NULL COMMENT '运输费用' AFTER `STR_SUPPL`;
ALTER TABLE `topsun_dev`.`sap_purchase_order`
ADD COLUMN `LIFNR` varchar(32) NULL COMMENT '供应商编码' AFTER `NAMEL`;
--2024-10-25 品质异常单增加产品类别名称
ALTER TABLE topsun_dev.sap_exception_report ADD product_type_name varchar(100) NULL;
topsun-xt/src/main/webapp/biz/topsun/sap/permit/sapPermitDetail.jsp
View file @
e25808d6
...
...
@@ -42,6 +42,7 @@
<x:inputC
name=
"permitDate"
required=
"true"
label=
"放行日期"
wrapper=
"datetime"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"company"
required=
"true"
label=
"公司"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"2"
/>
<x:inputC
name=
"belongPerson"
required=
"true"
label=
"携出人"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"carNo"
required=
"false"
label=
"车牌号"
labelCol=
"2"
fieldCol=
"2"
/>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/processOutsource/processOutsourceDetail.js
View file @
e25808d6
...
...
@@ -124,6 +124,25 @@ function getOrderColumns(){
type
:
"text"
,
required
:
true
}
},);
columns
.
push
({
display
:
"下道工序"
,
name
:
"txz02"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"AUFNR"
,
paramValue
:
item
.
aufnr
}
},
back
:
{
LTXA1
:
"txz02"
}
}
}
},);
columns
.
push
({
display
:
"补数工单"
,
name
:
"ablad"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
...
...
@@ -136,6 +155,12 @@ function getOrderColumns(){
type
:
"text"
,
mask
:
'9999999.999'
,
required
:
true
}
},);
columns
.
push
({
display
:
"印张LOSS"
,
name
:
"printLoss"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
,
mask
:
'9999999.999'
,
required
:
true
}
},);
columns
.
push
({
display
:
"单位"
,
name
:
"meinsName"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/processOutsource/processOutsourceDetail.jsp
View file @
e25808d6
...
...
@@ -7,7 +7,7 @@
<x:script
src=
'/biz/topsun/sap/processOutsource/processOutsourceDetail.js'
/>
</head>
<body>
<x:billTitle
title=
"工序外协申请"
needStatus=
"false"
needPerson=
"true"
/>
<x:billTitle
title=
"
临时
工序外协申请"
needStatus=
"false"
needPerson=
"true"
/>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"id"
/>
<x:hidden
name=
"sId"
/>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/processOutsource/processOutsourceList.js
View file @
e25808d6
...
...
@@ -77,7 +77,7 @@ function resetForm(obj) {
function
addHandler
()
{
UICtrl
.
addTabItem
({
tabid
:
'processOutsourceApply'
,
text
:
"工序外协申请"
,
text
:
"
临时
工序外协申请"
,
url
:
web_app
.
name
+
'/processOutsource/forwardProcessOutsourceDetail.job'
});
}
...
...
@@ -85,7 +85,7 @@ function addHandler() {
function
doView
(
processOutsourceId
)
{
UICtrl
.
addTabItem
({
tabid
:
'processOutsource'
+
processOutsourceId
,
text
:
"工序外协申请明细"
,
text
:
"
临时
工序外协申请明细"
,
url
:
web_app
.
name
+
'/processOutsource/showProcessOutsourceDetail.job?isReadOnly=true&bizId='
+
processOutsourceId
});
}
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/processOutsource/sapProcessOutsource.jsp
0 → 100644
View file @
e25808d6
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
%>
<%@taglib
uri=
"/WEB-INF/taglib.tld"
prefix=
"x"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<html>
<head>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,date,attachment"
/>
</head>
<body>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"no"
label=
"单号"
labelCol=
"2"
fieldCol=
"10"
required=
"true"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"remark"
label=
"备注"
labelCol=
"2"
fieldCol=
"10"
required=
"true"
rows=
"3"
/>
</div>
</div>
</form>
</body>
</html>
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseInfoRecord/addPurchaseInfoRecordDetail.jsp
View file @
e25808d6
...
...
@@ -37,6 +37,7 @@
<x:inputC
name=
"ekgrpName"
label=
"采购组"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
required=
"true"
/>
<x:inputC
name=
"netpr"
label=
"净价"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
mask=
"99999999.99"
/>
<x:inputC
name=
"freight"
label=
"运输费"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
mask=
"99999999.99"
/>
<x:hidden
name=
"matkl"
/>
<x:inputC
name=
"matklName"
label=
"物料组"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordDetail.js
View file @
e25808d6
...
...
@@ -244,6 +244,9 @@ function getGridColumns() {
{
display
:
"净价"
,
name
:
"netpr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
//,editor: {required: true,type: 'text', mask: '9999999.99'}
},
{
display
:
"运输费"
,
name
:
"freight"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
//,editor: {required: true,type: 'text', mask: '9999999.99'}
},
{
display
:
"货币码编号"
,
name
:
"waers"
,
width
:
"20"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
},
{
display
:
"货币码"
,
name
:
"waersTextView"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
/*,editor: {
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordList.js
View file @
e25808d6
...
...
@@ -62,6 +62,7 @@ function initPurchaseListGrid() {
{
display
:
"采购信息记录分类"
,
name
:
"esokzTextView"
,
width
:
"140"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"采购组"
,
name
:
"ekgrpName"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"净价"
,
name
:
"netpr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"运输费"
,
name
:
"freight"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"货币码"
,
name
:
"waersTextView"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,},
{
display
:
"价格单位"
,
name
:
"peinh"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"订单价格单位(采购)"
,
name
:
"bprmeName"
,
width
:
"90"
,
align
:
"left"
,
type
:
"string"
},
...
...
@@ -108,8 +109,8 @@ function initPurchaseListGrid() {
height
:
'100%'
,
pageSize
:
100
,
heightDiff
:
-
4
,
//sortName: 'lastModified
Date',
//
sortOrder: 'desc',
sortName
:
'fillin
Date'
,
sortOrder
:
'desc'
,
checkbox
:
true
,
usePager
:
true
,
rownumbers
:
true
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.js
View file @
e25808d6
...
...
@@ -11,6 +11,11 @@ function initUI() {
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
sapPrintHandler
:
{
id
:
'sapPrintHandler'
,
text
:
'SAP外协单打印'
,
img
:
'fa-clipboard'
,
click
:
function
(){
printHandler
();
}
},
// revokeApproveHandler: {
// id: 'revokeApproveHandler', text: '撤销审批', img: 'fa-trash', click: function () {
// var rows = purchaseOrderGridManager.getSelectedRows();
...
...
@@ -106,3 +111,12 @@ function resetForm(obj) {
$
(
obj
).
formClean
();
}
function
printHandler
(){
var
row
=
DataUtil
.
getUpdateRow
(
purchaseOrderGridManager
);
if
(
!
row
)
{
return
;
}
var
url
=
'/sapPurchaseOrder/print.load'
;
Public
.
openPostWindow
(
web_app
.
name
+
url
,{
id
:
row
.
id
});
}
topsun-xt/src/main/webapp/template/print/topsun/epChangeForm.ftl
View file @
e25808d6
...
...
@@ -36,11 +36,11 @@
<col
width=
"28%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
${changeNo?default("")?html}
</td>
<td
class=
"left"
style=
"font-size: 14px;font-weight:bold;"
>
${changeNo?default("")?html}
</td>
<td
class=
"right"
>
<div
style=
"text-align:right;font-weight:bold;font-size: 25px"
>
Engineering Change Notice
</div>
</td>
<td
class=
"right"
>
变更编号:${billCode?default("")?html}
</td>
<td
class=
"right"
style=
"font-size: 14px;font-weight:bold;"
>
变更编号:${billCode?default("")?html}
</td>
</tr>
</table>
</div>
...
...
topsun-xt/src/main/webapp/template/print/topsun/processOuter.ftl
0 → 100644
View file @
e25808d6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<head>
<title>
外发加工单
</title>
<
#
include
"/
print
/
commonStyleTemplate
.
ftl
"
/>
<style
type=
"text/css"
>
td
{
font-size
:
12px
;
}
</style>
</head>
<body>
<!-- 页眉部分 -->
<div
style=
"font-size: 20px;text-align: center; margin-top: 0px"
>
广州市宝绅科技应用有限公司
</div>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
"40%"
/>
<col
width=
"10%"
/>
<col
width=
"40%"
/>
</colgroup>
<tr>
<td
class=
"right"
>
电 话:020-36201957/020-36343128
</td>
<td>
</td>
<td
class=
"left"
>
地 址:广州市白云区江高小塘南路68号
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
"40%"
/>
<col
width=
"10%"
/>
<col
width=
"40%"
/>
</colgroup>
<tr>
<td
class=
"right"
>
传 真:020-36201902/020-36201962
</td>
<td>
</td>
<td
class=
"left"
>
E_Mail:gzbaoshen@gzbaoshen.com
</td>
</tr>
</table>
<hr/>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'60%'
/>
<col
width=
"40%"
/>
</colgroup>
<tr>
<td
style=
"font-size: 20px;text-align: right;margin-top: 0.5cm"
>
外发加工单
</td>
<td
class=
"right"
>
<img
class=
"barcode"
src=
"${barCode}"
style=
"right: auto"
></img>
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'70%'
/>
</colgroup>
<tr>
<td
class=
"left"
>
加工商:${namel?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'50%'
/>
<col
width=
"25%"
/>
<col
width=
"25%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
加工商地址:${address?default("")?html}
</td>
<td
class=
"left"
>
□是否半成品
</td>
<td
class=
"left"
>
仓库:${lgobe?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'75%'
/>
<col
width=
"25%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
交货地点:${strSuppl?default("")?html}
</td>
<td
class=
"left"
>
联系人电话:${telf1?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'50%'
/>
<col
width=
"25%"
/>
<col
width=
"25%"
/>
</colgroup>
<tr>
<td
class=
"left"
></td>
<td
class=
"left"
>
外发日期:
<
@
formatDate
date=
fillinDate/
></td>
<td
class=
"left"
>
交货日期:
<
@
formatDate
date=
eindt/
></td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'10%'
/>
<col
width=
'15%'
/>
<col
width=
'10%'
/>
<col
width=
'30%'
/>
<col
width=
'10%'
/>
<col
width=
'8%'
/>
<col
width=
'10%'
/>
<col
width=
'8%'
/>
<col
width=
'6%'
/>
<col
width=
'5%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
产品编码
</td>
<td
class=
"center"
>
${matnr2?default("")?html}
</td>
<td
class=
"center"
>
产品名称
</td>
<td
class=
"center"
>
${maktx?default("")?html}
</td>
<td
class=
"center"
>
成品数量
</td>
<td
class=
"center"
>
${number?default("")?html}
</td>
<td
class=
"center"
>
LOSS数
</td>
<td
class=
"center"
>
${loss?default("")?html}
</td>
<td
class=
"center"
>
单位
</td>
<td
class=
"center"
>
${msehl?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'10%'
/>
<col
width=
'15%'
/>
<col
width=
'10%'
/>
<col
width=
'10%'
/>
<col
width=
'10%'
/>
<col
width=
'10%'
/>
<col
width=
'10%'
/>
<col
width=
'8%'
/>
<col
width=
'10%'
/>
<col
width=
'8%'
/>
<col
width=
'6%'
/>
<col
width=
'5%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
排版数量
</td>
<td
class=
"center"
>
${model?default("")?html}
</td>
<td
class=
"center"
>
印张规格
</td>
<td
class=
"center"
>
${sheetSpecifications?default("")?html}
</td>
<td
class=
"center"
>
印刷色数
</td>
<td
class=
"center"
>
${printColor?default("")?html}
</td>
<td
class=
"center"
>
印张量
</td>
<td
class=
"center"
>
${printNumber?default("")?html}
</td>
<td
class=
"center"
>
印张LOSS
</td>
<td
class=
"center"
>
${printLoss?default("")?html}
</td>
<td
class=
"center"
>
单位
</td>
<td
class=
"center"
>
${msehl?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'10%'
/>
<col
width=
'35%'
/>
<col
width=
'10%'
/>
<col
width=
'10%'
/>
<col
width=
'10%'
/>
<col
width=
'8%'
/>
<col
width=
'10%'
/>
<col
width=
'8%'
/>
<col
width=
'6%'
/>
<col
width=
'5%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
外发工序
</td>
<td
class=
"center"
>
${outProcess01?default("")?html}
</td>
<td
class=
"center"
>
下道工序
</td>
<td
class=
"center"
>
${outProcess02?default("")?html}
</td>
<td
class=
"center"
>
应回厂数量
</td>
<td
class=
"center"
>
${number?default("")?html}
</td>
<td
class=
"center"
>
实际送货数量
</td>
<td
class=
"center"
>
${realNumber?default("")?html}
</td>
<td
class=
"center"
>
单位
</td>
<td
class=
"center"
>
${msehl?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'9%'
/>
<col
width=
'91%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
生产制程
</td>
<td
class=
"left"
>
${productionProcess?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'9%'
/>
<col
width=
"91%"
/>
</colgroup>
<tr>
<td
class=
"center"
>
备注
</td>
<td
class=
"left"
style=
"height: 80px"
></td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'20%'
/>
<col
width=
'20%'
/>
<col
width=
'20%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
生产单号
</td>
<td
class=
"center"
>
指令号
</td>
<td
class=
"center"
>
订单数
</td>
</tr>
<
#
if
saleOrderVos
??
&&
saleOrderVos
?
size
gt
0
>
<
#
list
saleOrderVos
as
detail
>
<tr>
<td
class=
"center"
>
${detail.vbeln?default("")?html}
</td>
<td
class=
"center"
>
${detail.zinstnum?default("")?html}
</td>
<td
class=
"center"
>
${detail.kwmeng?default("")?html}
</td>
</tr>
</
#
list>
<
#
else
>
<tr>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
</tr>
</
#
if>
</table>
<
#
--
<
table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
-->
<
#
--
<
colgroup
>
-->
<
#
--
<
col
width=
'9%'
/>
-->
<
#
--
<
col
width=
'91%'
/>
-->
<
#
--
</
colgroup
>
-->
<
#
--
<
tr
>
-->
<
#
--
<
td
class=
"center"
>
加工费用(不含税)
</td>
-->
<
#
--
<
td
class=
"left"
>
${used?default("")?html}
</td>
-->
<
#
--
</
tr
>
-->
<
#
--
</
table
>
-->
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'12%'
/>
<col
width=
'12%'
/>
<col
width=
'12%'
/>
<col
width=
'12%'
/>
<col
width=
'12%'
/>
<col
width=
'12%'
/>
<col
width=
'12%'
/>
<col
width=
'12%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
单价
</td>
<td
class=
"center"
>
${netpr?default("")?html}
</td>
<td
class=
"center"
>
运输费用
</td>
<td
class=
"center"
>
${kbetr2?default("")?html}
</td>
<td
class=
"center"
>
合计单价
</td>
<td
class=
"center"
>
${priceAmount?default("")?html}
</td>
<td
class=
"center"
>
总额
</td>
<td
class=
"center"
>
${amount?default("")?html}
</td>
</tr>
</table>
<
#
--
<
table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
-->
<
#
--
<
colgroup
>
-->
<
#
--
<
col
width=
'9%'
/>
-->
<
#
--
<
col
width=
'91%'
/>
-->
<
#
--
</
colgroup
>
-->
<
#
--
<
tr
>
-->
<
#
--
<
td
class=
"center"
>
生产单号
</td>
-->
<
#
--
<
td
class=
"left"
>
${used?default("")?html}
</td>
-->
<
#
--
</
tr
>
-->
<
#
--
</
table
>
-->
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'33%'
/>
<col
width=
"33%"
/>
<col
width=
"33%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
产品正面图片:
<br/>
<img
src=
'${frontImg?default("")?html}'
width=
"100px"
/>
</td>
<td
class=
"left"
>
产品背面图片:
<br/>
<img
src=
'${backImg?default("")?html}'
width=
"100px"
/>
</td>
<td
class=
"left"
>
排版图片:
</td>
</tr>
</table>
<
#
if
materialList
??
&&
materialList
?
size
gt
0
>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'25%'
/>
<col
width=
'25%'
/>
<col
width=
'25%'
/>
<col
width=
'25%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
供给物料名称
</td>
<td
class=
"center"
>
数量
</td>
<td
class=
"center"
>
计量单位
</td>
<td
class=
"center"
>
运输方式
</td>
</tr>
<
#
list
materialList
as
detail
>
<tr>
<td
class=
"center"
>
${detail.materialName?default("")?html}
</td>
<td
class=
"center"
>
${detail.num?default("")?html}
</td>
<td
class=
"center"
>
${detail.unitName?default("")?html}
</td>
<td
class=
"center"
>
${detail.deliveryMethodOut?default("")?html}
</td>
</tr>
</
#
list>
</table>
<
#
else
>
</
#
if>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'100%'
/>
</colgroup>
<tr>
<td
class=
"left"
>
付款方式:${zwels?default("")?html}
<br/>
月结方式:${zterm?default("")?html}
<br/>
注意事项:整张订单结束后方可请款,送货和付款时请附上此单。收到订单请2小时内签回。周六,日不收货。周一至周五17:00下班。
</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"
>
采购员:${personMemberName?default("")?html}
</td>
</tr>
</table>
</body>
</html>
topsun/src/main/java/com/huigou/topsun/ep/epApplication/EpApplication.java
View file @
e25808d6
package
com
.
huigou
.
topsun
.
ep
.
epApplication
;
import
com.huigou.topsun.ep.epApplication.EpVo.EpProductInfoVo
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -14,4 +16,11 @@ public interface EpApplication {
List
<
Map
<
String
,
String
>>
queryEpPd
(
String
brandCode
);
List
<
Map
<
String
,
String
>>
queryProductAndBom
(
String
itemCode
);
/**
*
* @param matnr2 产品编码
* @return
*/
EpProductInfoVo
queryEpProductInfo
(
String
matnr2
);
}
topsun/src/main/java/com/huigou/topsun/ep/epApplication/EpVo/EpProductInfoVo.java
0 → 100644
View file @
e25808d6
package
com
.
huigou
.
topsun
.
ep
.
epApplication
.
EpVo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @Auther: xin.lu
* @Date: 2024/10/18/14:39
* @Description:
*/
@Data
public
class
EpProductInfoVo
implements
Serializable
{
/**
* 印张规格
*/
private
String
sheetSpecifications
;
/**
* 生产制程
*/
private
String
productionProcess
;
/**
* 印刷反面颜色
*/
private
String
oppositeColor
;
/**
* 印刷正面颜色
*/
private
String
frontColor
;
/**
* 排版数量
*/
private
BigDecimal
model
;
/**
* 反面图片地址
*/
private
String
backImg
;
/**
* 正面图片地址
*/
private
String
frontImg
;
/**
* 印刷色数
*/
private
String
printColor
;
}
topsun/src/main/java/com/huigou/topsun/ep/epApplication/impl/EpApplicationImpl.java
View file @
e25808d6
...
...
@@ -4,12 +4,15 @@ import com.alibaba.fastjson.JSONObject;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.topsun.ep.epApplication.EpApplication
;
import
com.huigou.topsun.ep.epApplication.EpVo.EpProductInfoVo
;
import
com.huigou.topsun.sap.common.HttpClient
;
import
com.huigou.topsun.util.SAPUtils
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.*
;
/**
...
...
@@ -83,4 +86,24 @@ public class EpApplicationImpl implements EpApplication {
}
return
mapList
;
}
@Override
public
EpProductInfoVo
queryEpProductInfo
(
String
matnr2
)
{
String
message
=
""
;
EpProductInfoVo
epProductInfoVo
=
new
EpProductInfoVo
();
try
{
///api/pro/productionSolution/getPicture?groupCounter=02&groupKey=50000407
String
executeForEp
=
httpClient
.
executeForEp
(
new
HashMap
<>(),
"md/mdItem/getUrl?itemCode="
+
matnr2
);
Map
<
String
,
Object
>
resultMap
=
JSONObject
.
parseObject
(
executeForEp
,
Map
.
class
);
if
(
"200"
.
equals
(
resultMap
.
get
(
"code"
).
toString
()))
{
ObjectMapper
objectMapper
=
SAPUtils
.
objectMapper
();
epProductInfoVo
=
objectMapper
.
readValue
(
com
.
huigou
.
util
.
JSONUtil
.
toString
(
resultMap
.
get
(
"data"
)),
new
TypeReference
<
EpProductInfoVo
>()
{});
}
else
{
message
=(
String
)
resultMap
.
get
(
"msg"
);
}
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"查询生产版本正反面图片出错:"
+
message
);
}
return
epProductInfoVo
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/permit/domain/SapPermit.java
View file @
e25808d6
...
...
@@ -58,6 +58,12 @@ public class SapPermit extends FlowBillAbstractEntity {
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
permitDate
;
/**
* 车牌号
*/
@Column
(
name
=
"car_no"
)
private
String
carNo
;
@Override
protected
String
getCodeRuleId
()
{
return
"sapPermit"
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/permit/vo/SapPermitVo.java
View file @
e25808d6
...
...
@@ -41,5 +41,10 @@ public class SapPermitVo {
*/
private
Date
permitDate
;
/**
* 车牌号
*/
private
String
carNo
;
List
<
SapPermitItemVo
>
itemVos
;
}
topsun/src/main/java/com/huigou/topsun/sap/processOutsource/domain/ProcessOutsourceOrderItem.java
View file @
e25808d6
...
...
@@ -58,6 +58,12 @@ public class ProcessOutsourceOrderItem extends AbstractEntity {
@Column
(
name
=
"TXZ01"
)
private
String
txz01
;
/**
* 下道工序
*/
@Column
(
name
=
"TXZ02"
)
private
String
txz02
;
/**
* 同一工序外发次数
* 自动计数器,匹配条件为“如果之前状态为通过的申请中有相同工单+工序,则计数器+1,起始为1”
...
...
@@ -71,6 +77,12 @@ public class ProcessOutsourceOrderItem extends AbstractEntity {
@Column
(
name
=
"MENGE"
)
private
BigDecimal
menge
;
/**
* 印张LOSS
*/
@Column
(
name
=
"print_loss"
)
private
BigDecimal
printLoss
;
/**
* 单位
*/
...
...
topsun/src/main/java/com/huigou/topsun/sap/processOutsource/repository/ProcessOutsourceOrderItemRepository.java
View file @
e25808d6
...
...
@@ -14,4 +14,6 @@ public interface ProcessOutsourceOrderItemRepository extends JpaRepository<Proce
List
<
ProcessOutsourceOrderItem
>
findByProcessOutsourceId
(
String
processOutsourceId
);
List
<
ProcessOutsourceOrderItem
>
findByAufnrAndWempf
(
String
aufnr
,
String
wempf
);
ProcessOutsourceOrderItem
findByEbeln
(
String
ebeln
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/domain/SapPurchaseInfoRecordItem.java
View file @
e25808d6
...
...
@@ -342,6 +342,12 @@ public class SapPurchaseInfoRecordItem extends AbstractEntity {
@Column
(
name
=
"KBETR5"
)
private
BigDecimal
kbetr5
;
/**
* 运输费
*/
@Column
(
name
=
"FREIGHT"
)
private
BigDecimal
freight
;
/**
* 消息类型
*/
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/domain/vo/SapPurchaseInfoRecordItemVo.java
View file @
e25808d6
...
...
@@ -236,4 +236,10 @@ public class SapPurchaseInfoRecordItemVo implements Serializable {
@JsonProperty
(
"APLFZ"
)
private
Date
aplfz
;
/**
* 运输费
*/
@JsonProperty
(
"KBETR2"
)
private
BigDecimal
freight
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/application/SapPurchaseOrderApplication.java
View file @
e25808d6
...
...
@@ -27,4 +27,6 @@ public interface SapPurchaseOrderApplication {
void
sendSapDate
(
SapPurchaseOrder
sapPurchaseOrder
,
String
flag
);
String
revokeApproval
(
String
id
);
Map
<
String
,
Object
>
print
(
String
id
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/application/impl/SapPurchaseOrderApplicationImpl.java
View file @
e25808d6
...
...
@@ -4,48 +4,46 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.util.ObjectUtil
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.cache.SystemCache
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.context.ThreadLocalUtil
;
import
com.huigou.data.domain.model.CommonDomainConstants
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.base.bsnMessage.appliction.MannualStartWorkApplication
;
import
com.huigou.topsun.common.CommonUtils
;
import
com.huigou.topsun.ep.epApplication.EpApplication
;
import
com.huigou.topsun.ep.epApplication.EpVo.EpProductInfoVo
;
import
com.huigou.topsun.sap.common.DefaultHttpClient
;
import
com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursement
;
import
com.huigou.topsun.sap.permit.application.SapPermitApplication
;
import
com.huigou.topsun.sap.permit.vo.SapPermitItemVo
;
import
com.huigou.topsun.sap.permit.vo.SapPermitVo
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchase
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchaseItem
;
import
com.huigou.topsun.sap.processOutsource.domain.ProcessOutsourceMaterial
;
import
com.huigou.topsun.sap.processOutsource.domain.ProcessOutsourceOrderItem
;
import
com.huigou.topsun.sap.processOutsource.repository.ProcessOutsourceMaterialRepository
;
import
com.huigou.topsun.sap.processOutsource.repository.ProcessOutsourceOrderItemRepository
;
import
com.huigou.topsun.sap.purchaseApproval.application.impl.SapPurchaseApprovalApplicationImpl
;
import
com.huigou.topsun.sap.purchaseOrder.application.SapPurchaseOrderApplication
;
import
com.huigou.topsun.sap.purchaseOrder.application.SapPurchaseOrderItemApplication
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrderItem
;
import
com.huigou.topsun.sap.purchaseOrder.domain.query.SapPurchaseOrderQueryRequest
;
import
com.huigou.topsun.sap.purchaseOrder.domain.vo.SapPurchaseOrderDto
;
import
com.huigou.topsun.sap.purchaseOrder.domain.vo.SapPurchaseOrderItemVo
;
import
com.huigou.topsun.sap.purchaseOrder.domain.vo.SapPurchaseOrderVo
;
import
com.huigou.topsun.sap.purchaseOrder.domain.vo.*
;
import
com.huigou.topsun.sap.purchaseOrder.repository.SapPurchaseOrderRepository
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSale
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSaleItem
;
import
com.huigou.topsun.sap.suppliers.domain.SuppliersInfo
;
import
com.huigou.topsun.sap.suppliers.domain.SuppliersPay
;
import
com.huigou.topsun.sap.suppliers.repository.SuppliersInfoRepository
;
import
com.huigou.topsun.sap.suppliers.repository.SuppliersPayRepository
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.fn.CodeGenerator
;
import
com.huigou.uasp.bmp.operator.OperatorApplication
;
import
com.huigou.uasp.bmp.opm.application.OrgApplication
;
import
com.huigou.uasp.bmp.opm.domain.model.org.Org
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.uasp.bpm.ProcessAction
;
import
com.huigou.uasp.bpm.ProcessStartModel
;
import
com.huigou.uasp.bpm.engine.application.WorkflowApplication
;
import
com.huigou.util.*
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.activiti.engine.impl.persistence.entity.ExecutionEntity
;
import
org.activiti.engine.impl.persistence.entity.TaskEntity
;
import
org.apache.commons.lang3.StringUtils
;
import
org.krysalis.barcode4j.HumanReadablePlacement
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.task.TaskExecutor
;
import
org.springframework.stereotype.Service
;
...
...
@@ -54,8 +52,11 @@ import org.springframework.util.Assert;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.io.File
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @Auther: xin.lu
...
...
@@ -83,6 +84,16 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
private
SapPermitApplication
sapPermitApplication
;
@Autowired
private
TaskExecutor
asyncWriteExecutor
;
@Autowired
private
SuppliersInfoRepository
suppliersInfoRepository
;
@Autowired
private
SuppliersPayRepository
suppliersPayRepository
;
@Autowired
private
EpApplication
epApplication
;
@Autowired
private
ProcessOutsourceOrderItemRepository
processOutsourceOrderItemRepository
;
@Autowired
private
ProcessOutsourceMaterialRepository
processOutsourceMaterialRepository
;
@Override
protected
String
saveBizAndApprovalData
()
{
...
...
@@ -426,4 +437,153 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
return
newSapPurchaseOrder
.
getId
();
}
@Override
public
Map
<
String
,
Object
>
print
(
String
id
)
{
SapPurchaseOrder
sapPurchaseOrder
=
this
.
sapPurchaseOrderRepository
.
findOne
(
id
);
Map
<
String
,
Object
>
map
=
ClassHelper
.
beanToMap
(
sapPurchaseOrder
);
//获取加工商信息
String
lifnr
=
sapPurchaseOrder
.
getLifnr
();
map
=
this
.
getSupplierInfo
(
map
,
lifnr
);
//获取销售订单信息
map
=
this
.
getSaleOrderInfo
(
map
,
sapPurchaseOrder
.
getId
());
//获取产品信息
map
=
this
.
getProductInfo
(
map
);
//订单类型是ZNB3时对应工序外发(临时工序外协)
if
(
"ZNB3"
.
equals
(
sapPurchaseOrder
.
getBsart
())){
map
=
this
.
getProcessOutInfo
(
map
);
}
return
map
;
}
public
Map
<
String
,
Object
>
getSupplierInfo
(
Map
<
String
,
Object
>
map
,
String
lifnr
){
List
<
SuppliersInfo
>
suppliersInfoList
=
suppliersInfoRepository
.
findByPartner
(
lifnr
);
SuppliersInfo
suppliersInfo
=
suppliersInfoList
.
stream
()
.
sorted
(
Comparator
.
comparing
(
SuppliersInfo:
:
getFillinDate
,
Comparator
.
reverseOrder
()))
.
collect
(
Collectors
.
toList
()).
get
(
0
);
StringBuffer
addressBuf
=
new
StringBuffer
();
addressBuf
.
append
(
suppliersInfo
.
getLand1Name
())
.
append
(
suppliersInfo
.
getRegionName
())
.
append
(
suppliersInfo
.
getCity1Name
())
.
append
(
suppliersInfo
.
getStreet
())
.
append
(
suppliersInfo
.
getStrSuppl1
())
.
append
(
suppliersInfo
.
getStrSuppl2
())
.
append
(
suppliersInfo
.
getStrSuppl3
())
.
append
(
suppliersInfo
.
getStrSuppl4
());
String
address
=
addressBuf
.
toString
();
map
.
put
(
"address"
,
address
);
List
<
SuppliersPay
>
payList
=
suppliersPayRepository
.
findAllBySId
(
suppliersInfo
.
getId
());
SuppliersPay
suppliersPay
=
payList
.
get
(
0
);
String
zterm
=
suppliersPay
.
getZterm
();
//付款条件(月结方式)
String
zwels
=
suppliersPay
.
getZwels
();
//付款方式清单(付款方式)
map
.
put
(
"zterm"
,
DictUtil
.
getDictionaryDetailText
(
"zterm"
,
zterm
));
map
.
put
(
"zwels"
,
DictUtil
.
getDictionaryDetailText
(
"zwels"
,
zwels
));
return
map
;
}
public
Map
<
String
,
Object
>
getSaleOrderInfo
(
Map
<
String
,
Object
>
map
,
String
orderId
){
List
<
SapPurchaseOrderItem
>
purchaseOrderItems
=
this
.
sapPurchaseOrderItemApplication
.
getPurchaseOrderItems
(
orderId
);
SapPurchaseOrderItem
purchaseOrderItem
=
purchaseOrderItems
.
get
(
0
);
BeanUtil
.
beanToMap
(
purchaseOrderItem
,
map
,
false
,
false
);
// map.put("eindt",purchaseOrderItem.getEindt());//交货日期
// map.put("lgobe",purchaseOrderItem.getLgobe());//仓库
// map.put("telf1",purchaseOrderItem.getTelf1());//联系人电话
// map.put("matnr2",purchaseOrderItem.getMatnr2());//产品编码
// map.put("maktx",purchaseOrderItem.getMaktx());//产品名称
// map.put("strSuppl",purchaseOrderItem.getStrSuppl());//交货地点
// map.put("msehl",purchaseOrderItem.getMsehl());//单位
//销售单号多个的情况放明细列表中
Set
<
SapSaleOrderVo
>
saleOrderVos
=
purchaseOrderItems
.
stream
()
.
map
(
sapPurchaseOrderItem
->
{
SapSaleOrderVo
sapSaleOrderVo
=
new
SapSaleOrderVo
();
BeanUtil
.
copyProperties
(
sapPurchaseOrderItem
,
sapSaleOrderVo
);
return
sapSaleOrderVo
;
}).
collect
(
Collectors
.
toSet
());
BigDecimal
zero
=
BigDecimal
.
ZERO
;
//计算成品数量
for
(
SapSaleOrderVo
saleOrderVo
:
saleOrderVos
)
{
zero
=
zero
.
add
(
saleOrderVo
.
getKwmeng
());
}
map
.
put
(
"number"
,
zero
);
map
.
put
(
"saleOrderVos"
,
saleOrderVos
);
//计算总额 = (含税单价+运输费)* 成品数量
BigDecimal
netpr
=
purchaseOrderItem
.
getNetpr
();
//含税单价
BigDecimal
kbetr2
=
purchaseOrderItem
.
getKbetr2
();
//运输费
BigDecimal
amount
=
netpr
.
add
(
kbetr2
).
multiply
(
zero
);
map
.
put
(
"netpr"
,
netpr
);
map
.
put
(
"kbetr2"
,
kbetr2
);
map
.
put
(
"priceAmount"
,
netpr
.
add
(
kbetr2
));
//合计单价
map
.
put
(
"amount"
,
amount
);
map
.
put
(
"loss"
,
"1%"
);
//LOSS数,默认1%
//实际送货数量 = 成品数量 + LOSS数 (向上取整)
BigDecimal
multiply
=
zero
.
multiply
(
new
BigDecimal
(
"0.01"
));
long
loss
=
multiply
.
setScale
(
0
,
RoundingMode
.
UP
).
longValue
();
// 向上取整
BigDecimal
realNumber
=
zero
.
add
(
BigDecimal
.
valueOf
(
loss
));
map
.
put
(
"realNumber"
,
realNumber
);
return
map
;
}
private
Map
<
String
,
Object
>
getProductInfo
(
Map
<
String
,
Object
>
map
)
{
String
matnr2
=
(
String
)
map
.
get
(
"matnr2"
);
//从EP系统查询产品信息
EpProductInfoVo
epProductInfoVo
=
epApplication
.
queryEpProductInfo
(
matnr2
);
epProductInfoVo
.
setPrintColor
(
epProductInfoVo
.
getFrontColor
()+
";"
+
epProductInfoVo
.
getOppositeColor
());
BeanUtil
.
beanToMap
(
epProductInfoVo
,
map
,
false
,
false
);
// String imageUrl = "http://192.168.3.91:9000/mes/2024/10/15/20241015164918998370277.png";
// map.put("frontImg",imageUrl);
// map.put("backImg",imageUrl);
try
{
File
file
=
new
File
(
"product-"
+
map
.
get
(
"ebeln"
)+
".png"
);
if
(!
file
.
exists
())
{
String
IMG_TYPE_PNG
=
"image/png"
;
map
.
put
(
"barCode"
,
CommonUtils
.
genBarCode128
((
String
)
map
.
get
(
"ebeln"
),
IMG_TYPE_PNG
,
file
,
128
,
10
,
HumanReadablePlacement
.
HRP_BOTTOM
));
}
else
{
map
.
put
(
"barCode"
,
file
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"PDF生成失败!"
);
}
return
map
;
}
private
Map
<
String
,
Object
>
getProcessOutInfo
(
Map
<
String
,
Object
>
map
)
{
String
ebeln
=
(
String
)
map
.
get
(
"ebeln"
);
//采购订单号
//根据订单号查询外协单明细
ProcessOutsourceOrderItem
outsourceOrderItem
=
processOutsourceOrderItemRepository
.
findByEbeln
(
ebeln
);
map
.
put
(
"outProcess01"
,
outsourceOrderItem
.
getTxz01
());
map
.
put
(
"outProcess02"
,
outsourceOrderItem
.
getTxz02
());
//临时工序外发,计算印张数;实际送货数量,LOSS数
BigDecimal
number
=
(
BigDecimal
)
map
.
getOrDefault
(
"number"
,
BigDecimal
.
ZERO
);
//成品数量
BigDecimal
model
=
(
BigDecimal
)
map
.
getOrDefault
(
"model"
,
BigDecimal
.
ZERO
);
//排版数量
BigDecimal
printLoss
=
outsourceOrderItem
.
getPrintLoss
()
!=
null
?
outsourceOrderItem
.
getPrintLoss
()
:
BigDecimal
.
ZERO
;
//印张LOSS数
map
.
put
(
"printLoss"
,
printLoss
);
//印张量 = 成品数量/排版数量
BigDecimal
printNumber
=
BigDecimal
.
ZERO
;
if
(
number
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
&&
model
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
printNumber
=
number
.
divide
(
model
,
2
,
RoundingMode
.
UP
);
}
map
.
put
(
"printNumber"
,
printNumber
);
//LOSS数 = 印张LOSS * 排版数量
BigDecimal
loss
=
printLoss
.
multiply
(
model
);
map
.
put
(
"loss"
,
loss
);
//实际送货数量 = 成品数量 + LOSS数
BigDecimal
realNumber
=
number
.
add
(
loss
);
map
.
put
(
"realNumber"
,
realNumber
);
//查询工序外协单组件
List
<
ProcessOutsourceMaterial
>
materialList
=
processOutsourceMaterialRepository
.
findByProcessOutsourceId
(
outsourceOrderItem
.
getProcessOutsourceId
());
for
(
ProcessOutsourceMaterial
material
:
materialList
)
{
material
.
setDeliveryMethodOut
(
DictUtil
.
getDictionaryDetailText
(
"deliveryMethodOut"
,
material
.
getDeliveryMethodOut
()));
}
map
.
put
(
"materialList"
,
materialList
);
return
map
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/controller/SapPurchaseOrderController.java
View file @
e25808d6
...
...
@@ -95,4 +95,16 @@ public class SapPurchaseOrderController extends CommonController {
String
newId
=
sapPurchaseOrderApplication
.
revokeApproval
(
id
);
return
success
();
}
/**
* 打印
* @return
*/
public
String
print
()
{
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getId
();
Map
<
String
,
Object
>
map
=
this
.
sapPurchaseOrderApplication
.
print
(
id
);
String
pintPage
=
String
.
format
(
"/print/topsun/processOuter.ftl"
);
return
outputAndProcUnitHandlerPDF
(
pintPage
,
id
,
map
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/SapPurchaseOrder.java
View file @
e25808d6
...
...
@@ -160,6 +160,12 @@ public class SapPurchaseOrder extends FlowBillAbstractEntity {
@Column
(
name
=
"NAMEL"
)
private
String
namel
;
/**
* 供应商编码
*/
@Column
(
name
=
"LIFNR"
)
private
String
lifnr
;
@Override
protected
String
getCodeRuleId
()
{
return
"sapPurchaseOrder"
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/SapPurchaseOrderItem.java
View file @
e25808d6
...
...
@@ -196,4 +196,58 @@ public class SapPurchaseOrderItem extends AbstractEntity {
@Column
(
name
=
"ANLN2"
)
private
String
anln2
;
/**
* 销售单号
*/
@Column
(
name
=
"VBELN"
)
private
String
vbeln
;
/**
* 销售单行项目
*/
@Column
(
name
=
"POSNR"
)
private
String
posnr
;
/**
* 联系人电话
*/
@Column
(
name
=
"TELF1"
)
private
String
telf1
;
/**
* 成品数量
*/
@Column
(
name
=
"KWMENG"
)
private
BigDecimal
kwmeng
;
/**
* 指令号
*/
@Column
(
name
=
"ZINSTNUM"
)
private
String
zinstnum
;
/**
* 产品编码
*/
@Column
(
name
=
"MATNR2"
)
private
String
matnr2
;
/**
* 产品描述
*/
@Column
(
name
=
"MAKTX"
)
private
String
maktx
;
/**
* 交货地址
*/
@Column
(
name
=
"STR_SUPPL"
)
private
String
strSuppl
;
/**
* 运输费用
*/
@Column
(
name
=
"KBETR2"
)
private
BigDecimal
kbetr2
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/vo/SapPurchaseOrderItemVo.java
View file @
e25808d6
...
...
@@ -4,6 +4,8 @@ package com.huigou.topsun.sap.purchaseOrder.domain.vo;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
*
...
...
@@ -95,4 +97,58 @@ public class SapPurchaseOrderItemVo {
@JsonProperty
(
"UMSON"
)
private
String
umson
;
/**
* 销售单号
*/
@JsonProperty
(
"VBELN"
)
private
String
vbeln
;
/**
* 销售单行项目
*/
@JsonProperty
(
"POSNR"
)
private
String
posnr
;
/**
* 联系人电话
*/
@JsonProperty
(
"TELF1"
)
private
String
telf1
;
/**
* 成品数量
*/
@JsonProperty
(
"KWMENG"
)
private
BigDecimal
kwmeng
;
/**
* 指令号
*/
@JsonProperty
(
"ZINSTNUM"
)
private
String
zinstnum
;
/**
* 产品编码
*/
@JsonProperty
(
"MATNR2"
)
private
String
matnr2
;
/**
* 产品描述
*/
@JsonProperty
(
"MAKTX"
)
private
String
maktx
;
/**
* 交货地址
*/
@JsonProperty
(
"STR_SUPPL"
)
private
String
strSuppl
;
/**
* 运输费用
*/
@JsonProperty
(
"KBETR2"
)
private
BigDecimal
kbetr2
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/vo/SapPurchaseOrderVo.java
View file @
e25808d6
...
...
@@ -63,4 +63,7 @@ public class SapPurchaseOrderVo implements Serializable {
@JsonProperty
(
"NAMEL"
)
private
String
namel
;
@JsonProperty
(
"LIFNR"
)
private
String
lifnr
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/vo/SapSaleOrderVo.java
0 → 100644
View file @
e25808d6
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @Auther: xin.lu
* @Date: 2024/10/24/11:46
* @Description:
*/
@Data
public
class
SapSaleOrderVo
implements
Serializable
{
/**
* 销售单号
*/
private
String
vbeln
;
/**
* 成品数量
*/
private
BigDecimal
kwmeng
;
/**
* 指令号
*/
private
String
zinstnum
;
}
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