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
82f03be2
Commit
82f03be2
authored
Jan 05, 2024
by
赵汉亭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BOM接口添加字段、保存封装完成
parent
a22bbc52
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1037 additions
and
243 deletions
+1037
-243
proofingApply.js
...n-xt/src/main/webapp/biz/topsun/proofing/proofingApply.js
+2
-0
proofingMake.js
...un-xt/src/main/webapp/biz/topsun/proofing/proofingMake.js
+2
-0
technologyAndBom.js
.../biz/topsun/proofing/technologyAndBom/technologyAndBom.js
+272
-189
technologyAndBom.jsp
...biz/topsun/proofing/technologyAndBom/technologyAndBom.jsp
+19
-17
ProofingApplyBomApplication.java
...sun/proofing/application/ProofingApplyBomApplication.java
+18
-0
ProofingMakeBomApplication.java
...psun/proofing/application/ProofingMakeBomApplication.java
+18
-0
ProofingApplyApplicationImpl.java
...oofing/application/impl/ProofingApplyApplicationImpl.java
+38
-14
ProofingApplyBomApplicationImpl.java
...ing/application/impl/ProofingApplyBomApplicationImpl.java
+52
-0
ProofingMakeApplicationImpl.java
...roofing/application/impl/ProofingMakeApplicationImpl.java
+82
-22
ProofingMakeBomApplicationImpl.java
...fing/application/impl/ProofingMakeBomApplicationImpl.java
+54
-0
ProofingTechnologyRelevancyController.java
...ing/controller/ProofingTechnologyRelevancyController.java
+24
-0
ProofingApplyBom.java
...proofing/domain/proofingApply/model/ProofingApplyBom.java
+64
-0
ProofingApplyBomQueryRequest.java
...ain/proofingApply/query/ProofingApplyBomQueryRequest.java
+79
-0
ProofingMakeBom.java
...n/proofing/domain/proofingMake/model/ProofingMakeBom.java
+169
-1
proofingMakeBomReturnJson.json
...oofing/domain/proofingMake/proofingMakeBomReturnJson.json
+26
-0
ProofingMakeBomQueryRequest.java
...omain/proofingMake/query/ProofingMakeBomQueryRequest.java
+79
-0
ProofingApplyBomRepository.java
.../repository/proofingApply/ProofingApplyBomRepository.java
+13
-0
ProofingMakeBomRepository.java
...ng/repository/proofingMake/ProofingMakeBomRepository.java
+13
-0
proofingApply.xml
...c/main/resources/config/topsun/proofing/proofingApply.xml
+6
-0
proofingMake.xml
...rc/main/resources/config/topsun/proofing/proofingMake.xml
+7
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/proofing/proofingApply.js
View file @
82f03be2
...
...
@@ -10,6 +10,7 @@ function initialize(){
//若是作为流程页或详情页,则初始化bom
if
(
$
(
"#productId"
).
val
()
!=
null
&&
$
(
"#productId"
).
val
()
!=
""
){
showTechnologyTable
({
proofingApplyId
:
$
(
"#proofingApplyId"
).
val
()},
"proofingApplyTechnologyId"
,
null
);
showBomTable
({
proofingApplyId
:
$
(
"#proofingApplyId"
).
val
()},
"proofingApplyId"
);
}
let
isDetailPage
=
(
$
(
"#isDetailPage"
).
val
()
===
"true"
);
if
(
isDetailPage
)
{
...
...
@@ -25,6 +26,7 @@ function bindQueryEvent() {
ajaxRenderDataGoForm
({
productId
:
data
.
productId
});
$
(
'#productCategoryName'
).
val
(
data
.
productCategoryName
)
showTechnologyTable
({
productId
:
data
.
productId
},
"technologyId"
,
null
);
showBomTable
();
}
});
}
...
...
topsun-xt/src/main/webapp/biz/topsun/proofing/proofingMake.js
View file @
82f03be2
...
...
@@ -14,6 +14,7 @@ function initialize() {
let
isDetailPage
=
(
$
(
"#isDetailPage"
).
val
()
===
"true"
);
if
(
isDetailPage
)
{
showTechnologyTable
({
proofingMakeId
:
$
(
"#proofingMakeId"
).
val
()},
"proofingMakeTechnologyId"
,
null
);
showBomTable
({
proofingMakeId
:
$
(
"#proofingMakeId"
).
val
()},
"proofingMakeId"
);
$
(
"#jobPageTop"
).
hide
();
if
(
$
(
"#jobPageTop"
).
length
>
0
){
$
(
"#formButton"
).
hide
();
...
...
@@ -29,6 +30,7 @@ function bindQueryEvent() {
$
(
'#productCode'
).
val
(
data
.
productCode
);
ajaxRenderDataGoForm
(
data
.
proofingApplyNo
);
showTechnologyTable
({
proofingApplyId
:
data
.
proofingApplyId
},
"proofingApplyTechnologyId"
,
null
);
showBomTable
({
proofingApplyId
:
data
.
proofingApplyId
},
"proofingApplyId"
);
}
});
}
...
...
topsun-xt/src/main/webapp/biz/topsun/proofing/technologyAndBom/technologyAndBom.js
View file @
82f03be2
This diff is collapsed.
Click to expand it.
topsun-xt/src/main/webapp/biz/topsun/proofing/technologyAndBom/technologyAndBom.jsp
View file @
82f03be2
<x:script
src=
'/biz/topsun/proofing/technologyAndBom/technologyAndBom.js'
/>
<div><h3>
BOM设置
</h3></div>
<div
style=
"margin: 10px;"
>
<div
id=
"mobTableGrid"
style=
"margin: 2px;"
>
<hr>
<div
id=
"bom"
>
<div
id=
"bomGrid"
style=
"margin: 2px;"
>
<hr>
</div>
</div>
</div>
<div><h3>
工艺设置
</h3></div>
<div
style=
"margin: 10px;"
>
<div
id=
"layout"
style=
"height: 400px"
>
<div
id=
"technology"
position=
"left"
>
<x:title
title=
"工艺"
name=
"group"
/>
<div
id=
"technologyGrid"
style=
"margin: 2px;"
>
<hr>
<div
id=
"technology"
position=
"left"
>
<x:title
title=
"工艺"
name=
"group"
/>
<div
id=
"technologyGrid"
style=
"margin: 2px;"
>
<hr>
</div>
</div>
</div>
<div
id=
"process"
position=
"center"
>
<x:title
title=
"工序"
name=
"group"
/>
<div
id=
"processGrid"
style=
"margin: 2px;"
>
<hr>
<div
id=
"process"
position=
"center"
>
<x:title
title=
"工序"
name=
"group"
/>
<div
id=
"processGrid"
style=
"margin: 2px;"
>
<hr>
</div>
</div>
</div
>
<div
id=
"processBom"
position=
"right"
>
<x:title
title=
"工序物料"
name=
"group"
/
>
<div
id=
"processBomGrid"
style=
"margin: 2px;"
>
<
hr
>
<div
id=
"processBom"
position=
"right"
>
<x:title
title=
"工序物料"
name=
"group"
/
>
<div
id=
"processBomGrid"
style=
"margin: 2px;"
>
<hr
>
<
/div
>
</div>
</div>
</div>
</div>
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/proofing/application/ProofingApplyBomApplication.java
0 → 100644
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
application
;
import
com.huigou.topsun.proofing.domain.proofingApply.model.ProofingApplyBom
;
import
com.huigou.topsun.proofing.domain.proofingApply.query.ProofingApplyBomQueryRequest
;
import
java.util.Map
;
/**
* title:
* author:ZHT
* date:2024/1/3
* description:
*/
public
interface
ProofingApplyBomApplication
{
String
QUERY_XML_FILE_PATH
=
"config/topsun/proofing/proofingApply.xml"
;
Map
<
String
,
Object
>
slicedProofingApplyBom
(
ProofingApplyBomQueryRequest
proofingApplyBomQueryRequest
);
}
topsun/src/main/java/com/huigou/topsun/proofing/application/ProofingMakeBomApplication.java
0 → 100644
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
application
;
import
com.huigou.topsun.proofing.domain.proofingMake.model.ProofingMakeBom
;
import
com.huigou.topsun.proofing.domain.proofingMake.query.ProofingMakeBomQueryRequest
;
import
java.util.Map
;
/**
* title:
* author:ZHT
* date:2024/1/3
* description:
*/
public
interface
ProofingMakeBomApplication
{
String
QUERY_XML_FILE_PATH
=
"config/topsun/proofing/proofingMake.xml"
;
Map
<
String
,
Object
>
slicedProofingMakeBom
(
ProofingMakeBomQueryRequest
proofingMakeBomQueryRequest
);
}
topsun/src/main/java/com/huigou/topsun/proofing/application/impl/ProofingApplyApplicationImpl.java
View file @
82f03be2
...
...
@@ -6,11 +6,9 @@ import com.huigou.data.query.model.QueryDescriptor;
import
com.huigou.topsun.product.domain.ProductPublishedConf
;
import
com.huigou.topsun.product.repository.ProductPublishedConfRepository
;
import
com.huigou.topsun.proofing.application.ProofingApplyApplication
;
import
com.huigou.topsun.proofing.domain.proofingApply.model.*
;
import
com.huigou.topsun.proofing.domain.proofingApply.query.ProofingApplyQuery
;
import
com.huigou.topsun.proofing.domain.vo.ProofingApplyAndLookedVo
;
import
com.huigou.topsun.proofing.repository.proofingApply.*
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.FlowBroker
;
...
...
@@ -22,16 +20,14 @@ import org.activiti.engine.delegate.DelegateExecution;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Example
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
/**
* @author yonghuan
...
...
@@ -52,6 +48,9 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
@Autowired
private
ProofingApplyProcessMaterialRepository
proofingApplyProcessMaterialRepository
;
@Autowired
private
ProofingApplyBomRepository
proofingApplyBomRepository
;
@Override
public
ProofingApplyBaseInfo
loadProofingApplyById
(
String
id
)
{
...
...
@@ -61,7 +60,7 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
@Override
public
Map
<
String
,
Object
>
slicedQuery
(
ProofingApplyQuery
query
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"slicedQuery"
);
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryDescriptor
,
query
);
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryDescriptor
,
query
);
}
@SneakyThrows
...
...
@@ -78,7 +77,7 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
}
//如果录入了ng重新打样原因,则更改状态为不通过
if
(!
StringUtil
.
isBlank
(
proofingApply
.
getProofingApplyNgReReason
()))
{
if
(!
StringUtil
.
isBlank
(
proofingApply
.
getProofingApplyNgReReason
()))
{
proofingApply
.
setProofingApplyApplicationStatus
(
"2"
);
}
proofingApply
=
proofingApplyRepository
.
save
(
proofingApply
);
...
...
@@ -91,8 +90,10 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
ObjectMapper
objectMapper
=
new
ObjectMapper
();
ProofingApplyTechnology
proofingTechnology
=
objectMapper
.
readValue
(
technologyJSON
,
ProofingApplyTechnology
.
class
);
List
<
ProofingApplyProcess
>
processList
=
objectMapper
.
readValue
(
processJSON
,
new
TypeReference
<
List
<
ProofingApplyProcess
>>()
{});
List
<
ProofingApplyProcessMaterial
>
processMaterialList
=
objectMapper
.
readValue
(
processMaterialJSON
,
new
TypeReference
<
List
<
ProofingApplyProcessMaterial
>>()
{});
List
<
ProofingApplyProcess
>
processList
=
objectMapper
.
readValue
(
processJSON
,
new
TypeReference
<
List
<
ProofingApplyProcess
>>()
{
});
List
<
ProofingApplyProcessMaterial
>
processMaterialList
=
objectMapper
.
readValue
(
processMaterialJSON
,
new
TypeReference
<
List
<
ProofingApplyProcessMaterial
>>()
{
});
ProofingApplyLooked
proofingApplyLooked
=
getBizEntity
(
ProofingApplyLooked
.
class
);
...
...
@@ -133,6 +134,30 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
proofingApplyProcessMaterial
.
setProofingApplyTechnologyId
(
proofingTechnology
.
getProofingApplyTechnologyId
());
proofingApplyProcessMaterialRepository
.
saveAndFlush
(
proofingApplyProcessMaterial
);
}
// 保存BOM信息
String
bomJson
=
sdo
.
getString
(
"bom"
);
if
(
StringUtil
.
isNotBlank
(
bomJson
))
{
// 获取前端传来的BOM列表
// 判断是否为新增还是修改
ProofingApplyBom
proofingApplyBom1
=
new
ProofingApplyBom
();
proofingApplyBom1
.
setProofingApplyId
(
proofingApply
.
getProofingApplyId
());
List
<
ProofingApplyBom
>
applyBomList
=
proofingApplyBomRepository
.
findAll
(
Example
.
of
(
proofingApplyBom1
));
if
(!
applyBomList
.
isEmpty
())
{
// 修改 -- 删除
applyBomList
.
forEach
(
proofingApplyBom
->
proofingApplyBomRepository
.
delete
(
proofingApplyBom
.
getProofingApplyBomId
()));
}
List
<
ProofingApplyBom
>
proofingApplyBomList
=
objectMapper
.
readValue
(
bomJson
,
new
TypeReference
<
List
<
ProofingApplyBom
>>()
{
});
// 新增
for
(
ProofingApplyBom
proofingApplyBom
:
proofingApplyBomList
)
{
proofingApplyBom
.
setProofingApplyId
(
proofingApply
.
getProofingApplyId
());
// 保存
proofingApplyBomRepository
.
save
(
proofingApplyBom
);
}
}
// 封装保存
return
proofingApply
.
getId
();
}
...
...
@@ -179,17 +204,16 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
public
ProofingApplyAndLookedVo
getProofingApplyByProofingApplyNo
(
String
proofingApplyNo
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryProofingApplyAndProductQuery"
);
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryProofingApplyAndProductQuery"
);
ProofingApplyAndLookedVo
proofingApplyAndLookedVo
=
this
.
sqlExecutorDao
.
queryToObject
(
queryDescriptor
.
getSql
(),
ProofingApplyAndLookedVo
.
class
,
proofingApplyNo
);
ProductPublishedConf
productPublishedConf
=
productPublishedConfRepository
.
findByProductId
(
new
BigDecimal
(
proofingApplyAndLookedVo
.
getProductId
()));
if
(
productPublishedConf
!=
null
)
{
BeanUtils
.
copyProperties
(
productPublishedConf
,
proofingApplyAndLookedVo
);
}
if
(
productPublishedConf
!=
null
)
{
BeanUtils
.
copyProperties
(
productPublishedConf
,
proofingApplyAndLookedVo
);
}
return
proofingApplyAndLookedVo
;
}
@Override
public
ProofingApplyBaseInfo
selectProofingApplyByProofingApplyNo
(
String
proofingApplyNo
)
{
return
proofingApplyRepository
.
findByProofingApplyNo
(
proofingApplyNo
);
...
...
topsun/src/main/java/com/huigou/topsun/proofing/application/impl/ProofingApplyBomApplicationImpl.java
0 → 100644
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.proofing.application.ProofingApplyBomApplication
;
import
com.huigou.topsun.proofing.domain.proofingApply.query.ProofingApplyBomQueryRequest
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* title:
* author:ZHT
* date:2024/1/3
* description:
*/
@Service
public
class
ProofingApplyBomApplicationImpl
extends
BaseApplication
implements
ProofingApplyBomApplication
{
@Override
public
Map
<
String
,
Object
>
slicedProofingApplyBom
(
ProofingApplyBomQueryRequest
proofingApplyBomQueryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"slicedProofingApplyBom"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
proofingApplyBomQueryRequest
);
Map
<
String
,
Object
>
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
// 转化为前端可以接受的数据
ArrayList
<
HashMap
>
rows
=
(
ArrayList
)
map
.
get
(
"Rows"
);
ArrayList
<
HashMap
<
String
,
Object
>>
proofingApplyBoms
=
new
ArrayList
<>();
for
(
HashMap
row
:
rows
)
{
HashMap
<
String
,
Object
>
rowMap
=
new
HashMap
<>();
rowMap
.
put
(
"ALPGR"
,
row
.
get
(
"proofingApplyBomAlpgr"
));
rowMap
.
put
(
"materialName"
,
row
.
get
(
"productMaterialName"
));
rowMap
.
put
(
"materialNumber"
,
row
.
get
(
"proofingApplyBomNum"
));
rowMap
.
put
(
"AUSCH"
,
row
.
get
(
"proofingApplyBomAusch"
));
rowMap
.
put
(
"POTX1"
,
row
.
get
(
"proofingApplyBomText"
));
rowMap
.
put
(
"materialJson"
,
row
.
get
(
"proofingApplyBomMaterialText"
));
rowMap
.
put
(
"ALPRF"
,
row
.
get
(
"proofingApplyBomAlprf"
));
rowMap
.
put
(
"ALPST"
,
row
.
get
(
"proofingApplyBomAlpst"
));
rowMap
.
put
(
"EWAHR"
,
row
.
get
(
"proofingApplyBomEwahr"
));
rowMap
.
put
(
"materialId"
,
row
.
get
(
"productMaterialId"
));
rowMap
.
put
(
"materialUnit"
,
row
.
get
(
"proofingApplyBomMeins"
));
rowMap
.
put
(
"bomId"
,
row
.
get
(
"proofingApplyBomId"
));
rowMap
.
put
(
"primaryKey"
,
row
.
get
(
"proofingApplyId"
));
proofingApplyBoms
.
add
(
rowMap
);
}
map
.
remove
(
"Rows"
);
map
.
put
(
"Rows"
,
proofingApplyBoms
);
return
map
;
}
}
topsun/src/main/java/com/huigou/topsun/proofing/application/impl/ProofingMakeApplicationImpl.java
View file @
82f03be2
This diff is collapsed.
Click to expand it.
topsun/src/main/java/com/huigou/topsun/proofing/application/impl/ProofingMakeBomApplicationImpl.java
0 → 100644
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.proofing.application.ProofingMakeBomApplication
;
import
com.huigou.topsun.proofing.domain.proofingMake.model.ProofingMakeBom
;
import
com.huigou.topsun.proofing.domain.proofingMake.query.ProofingMakeBomQueryRequest
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* title:
* author:ZHT
* date:2024/1/3
* description:
*/
@Service
public
class
ProofingMakeBomApplicationImpl
extends
BaseApplication
implements
ProofingMakeBomApplication
{
@Override
public
Map
<
String
,
Object
>
slicedProofingMakeBom
(
ProofingMakeBomQueryRequest
proofingMakeBomQueryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"slicedProofingMakeBom"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
proofingMakeBomQueryRequest
);
Map
<
String
,
Object
>
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
// 转换为前端可以接受的数据
ArrayList
<
HashMap
>
rows
=
(
ArrayList
)
map
.
get
(
"Rows"
);
ArrayList
<
HashMap
<
String
,
Object
>>
proofingMakeBoms
=
new
ArrayList
<>();
for
(
HashMap
row
:
rows
)
{
HashMap
<
String
,
Object
>
rowMap
=
new
HashMap
<>();
rowMap
.
put
(
"ALPGR"
,
row
.
get
(
"proofingMakeBomAlpgr"
));
rowMap
.
put
(
"materialName"
,
row
.
get
(
"productMaterialName"
));
rowMap
.
put
(
"materialNumber"
,
row
.
get
(
"proofingMakeBomNum"
));
rowMap
.
put
(
"AUSCH"
,
row
.
get
(
"proofingMakeBomAusch"
));
rowMap
.
put
(
"POTX1"
,
row
.
get
(
"proofingMakeBomText"
));
rowMap
.
put
(
"materialJson"
,
row
.
get
(
"proofingMakeBomMaterialText"
));
rowMap
.
put
(
"ALPRF"
,
row
.
get
(
"proofingMakeBomAlprf"
));
rowMap
.
put
(
"ALPST"
,
row
.
get
(
"proofingMakeBomAlpst"
));
rowMap
.
put
(
"EWAHR"
,
row
.
get
(
"proofingMakeBomEwahr"
));
rowMap
.
put
(
"materialId"
,
row
.
get
(
"productMaterialId"
));
rowMap
.
put
(
"materialUnit"
,
row
.
get
(
"proofingMakeBomMeins"
));
rowMap
.
put
(
"bomId"
,
row
.
get
(
"proofingMakeBomId"
));
rowMap
.
put
(
"primaryKey"
,
row
.
get
(
"proofingMakeId"
));
proofingMakeBoms
.
add
(
rowMap
);
}
map
.
remove
(
"Rows"
);
map
.
put
(
"Rows"
,
proofingMakeBoms
);
return
map
;
}
}
topsun/src/main/java/com/huigou/topsun/proofing/controller/ProofingTechnologyRelevancyController.java
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
controller
;
import
com.huigou.topsun.proofing.application.*
;
import
com.huigou.topsun.proofing.domain.proofingApply.query.ProofingApplyBomQueryRequest
;
import
com.huigou.topsun.proofing.domain.proofingApply.query.ProofingApplyProcessMaterialQueryRequest
;
import
com.huigou.topsun.proofing.domain.proofingApply.query.ProofingApplyProcessQueryRequest
;
import
com.huigou.topsun.proofing.domain.proofingApply.query.ProofingApplyTechnologyQueryRequest
;
import
com.huigou.topsun.proofing.domain.proofingMake.query.ProofingMakeBomQueryRequest
;
import
com.huigou.topsun.proofing.domain.proofingMake.query.ProofingMakeProcessMaterialQueryRequest
;
import
com.huigou.topsun.proofing.domain.proofingMake.query.ProofingMakeProcessQueryRequest
;
import
com.huigou.topsun.proofing.domain.proofingMake.query.ProofingMakeTechnologyQueryRequest
;
...
...
@@ -49,6 +51,12 @@ public class ProofingTechnologyRelevancyController extends CommonController {
@Autowired
ProofingMakeProcessMaterialApplication
proofingMakeProcessMaterialApplication
;
@Autowired
ProofingApplyBomApplication
proofingApplyBomApplication
;
@Autowired
ProofingMakeBomApplication
proofingMakeBomApplication
;
/**
* 展示工艺
...
...
@@ -114,6 +122,22 @@ public class ProofingTechnologyRelevancyController extends CommonController {
return
toResult
(
null
);
}
/**
* 展示BOM
*/
public
String
slicedBomList
(){
SDO
sdo
=
this
.
getSDO
();
ProofingApplyBomQueryRequest
proofingApplyBomQueryRequest
=
sdo
.
toQueryRequest
(
ProofingApplyBomQueryRequest
.
class
);
ProofingMakeBomQueryRequest
proofingMakeBomQueryRequest
=
sdo
.
toQueryRequest
(
ProofingMakeBomQueryRequest
.
class
);
//判断需要展示产品工序还是打样表中工序
if
(!
StringUtil
.
isBlank
(
proofingApplyBomQueryRequest
.
getProofingApplyId
())){
return
toResult
(
proofingApplyBomApplication
.
slicedProofingApplyBom
(
proofingApplyBomQueryRequest
));
}
else
if
(!
StringUtil
.
isBlank
(
proofingMakeBomQueryRequest
.
getProofingMakeId
())){
return
toResult
(
proofingMakeBomApplication
.
slicedProofingMakeBom
(
proofingMakeBomQueryRequest
));
}
return
toResult
(
null
);
}
public
Map
<
String
,
Object
>
tempData
(
String
id
){
if
(
"-1"
.
equals
(
id
))
return
null
;
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
topsun/src/main/java/com/huigou/topsun/proofing/domain/proofingApply/model/ProofingApplyBom.java
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
domain
.
proofingApply
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
org.hibernate.annotations.GenericGenerator
;
...
...
@@ -13,6 +16,7 @@ import java.io.Serializable;
@Table
(
name
=
"proofing_apply_bom"
)
@Entity
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
ProofingApplyBom
implements
Serializable
{
/**
* 打样申请单BOMid
...
...
@@ -26,12 +30,14 @@ public class ProofingApplyBom implements Serializable {
strategy
=
"guid"
)
@Column
(
name
=
"proofing_apply_bom_id"
)
@JsonProperty
(
value
=
"proofingApplyBomId"
,
required
=
true
)
private
String
proofingApplyBomId
;
/**
* 产品物料组成id
*/
@Column
(
name
=
"product_material_id"
)
@JsonProperty
(
"materialId"
)
private
String
productMaterialId
;
/**
...
...
@@ -44,13 +50,71 @@ public class ProofingApplyBom implements Serializable {
* 数量
*/
@Column
(
name
=
"proofing_apply_bom_num"
)
@JsonProperty
(
"materialNumber"
)
private
String
proofingApplyBomNum
;
/**
* 物料名称
*/
@Column
(
name
=
"product_material_name"
)
@JsonProperty
(
"materialName"
)
private
String
productMaterialName
;
/**
* 组件计量单位
*/
@Column
(
name
=
"proofing_apply_bom_meins"
)
@JsonProperty
(
"materialUnit"
)
private
String
proofingApplyBomMeins
;
/**
* 组件报废百分比
*/
@Column
(
name
=
"proofing_apply_bom_ausch"
)
@JsonProperty
(
value
=
"AUSCH"
,
required
=
true
)
private
Double
proofingApplyBomAusch
;
/**
* BOM项目文本(行1)
*/
@Column
(
name
=
"proofing_apply_bom_text"
)
@JsonProperty
(
value
=
"POTX1"
,
required
=
true
)
private
String
proofingApplyBomText
;
/**
* 物料清单项目文本(行2)
*/
@Column
(
name
=
"proofing_apply_bom_material_text"
)
@JsonProperty
(
value
=
"materialJson"
,
required
=
true
)
private
String
proofingApplyBomMaterialText
;
/**
* 替代组
*/
@Column
(
name
=
"proofing_apply_bom_alpgr"
)
@JsonProperty
(
value
=
"ALPGR"
,
required
=
true
)
private
String
proofingApplyBomAlpgr
;
/**
* 替代优先级
*/
@Column
(
name
=
"proofing_apply_bom_alprf"
)
@JsonProperty
(
value
=
"ALPRF"
,
required
=
true
)
private
Integer
proofingApplyBomAlprf
;
/**
* 策略
*/
@Column
(
name
=
"proofing_apply_bom_alpst"
)
@JsonProperty
(
value
=
"ALPST"
,
required
=
true
)
private
String
proofingApplyBomAlpst
;
/**
* 使用概率
*/
@Column
(
name
=
"proofing_apply_bom_ewahr"
)
@JsonProperty
(
value
=
"EWAHR"
,
required
=
true
)
private
Long
proofingApplyBomEwahr
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/proofing/domain/proofingApply/query/ProofingApplyBomQueryRequest.java
0 → 100644
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
domain
.
proofingApply
.
query
;
import
com.huigou.data.domain.query.FlowBillSuperQueryRequest
;
import
lombok.Data
;
/**
* title:
* author:ZHT
* date:2024/1/3
* description:
*/
@Data
public
class
ProofingApplyBomQueryRequest
extends
FlowBillSuperQueryRequest
{
/**
* 打样申请单BOMid
*/
private
String
proofingApplyBomId
;
/**
* 产品物料组成id
*/
private
String
productMaterialId
;
/**
* 打样申请单id
*/
private
String
proofingApplyId
;
/**
* 数量
*/
private
String
proofingApplyBomNum
;
/**
* 物料名称
*/
private
String
productMaterialName
;
/**
* 组件计量单位
*/
private
String
proofingApplyBomMeins
;
/**
* 组件报废百分比
*/
private
Double
proofingApplyBomAusch
;
/**
* BOM项目文本(行1)
*/
private
String
proofingApplyBomText
;
/**
* 物料清单项目文本(行2)
*/
private
String
proofingApplyBomMaterialText
;
/**
* 替代组
*/
private
String
proofingApplyBomAlpgr
;
/**
* 替代优先级
*/
private
Integer
proofingApplyBomAlprf
;
/**
* 策略
*/
private
String
proofingApplyBomAlpst
;
/**
* 使用概率
*/
private
Long
proofingApplyBomEwahr
;
}
topsun/src/main/java/com/huigou/topsun/proofing/domain/proofingMake/model/ProofingMakeBom.java
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
domain
.
proofingMake
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
org.hibernate.annotations.GenericGenerator
;
...
...
@@ -12,7 +15,7 @@ import java.io.Serializable;
*/
@Table
(
name
=
"proofing_make_bom"
)
@Entity
@
Data
@
JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
ProofingMakeBom
implements
Serializable
{
/**
* 打样制作单BOMid
...
...
@@ -26,31 +29,196 @@ public class ProofingMakeBom implements Serializable {
strategy
=
"guid"
)
@Column
(
name
=
"proofing_make_bom_id"
)
@JsonIgnore
private
String
proofingMakeBomId
;
/**
* 产品物料组成id
*/
@Column
(
name
=
"product_material_id"
)
@JsonProperty
(
value
=
"materialId"
,
required
=
true
)
private
String
productMaterialId
;
/**
* 打样制作单id
*/
@Column
(
name
=
"proofing_make_id"
)
@JsonIgnore
private
String
proofingMakeId
;
/**
* 数量
*/
@Column
(
name
=
"proofing_make_bom_num"
)
@JsonProperty
(
value
=
"materialNumber"
,
required
=
true
)
private
String
proofingMakeBomNum
;
/**
* 物料名称
*/
@Column
(
name
=
"product_material_name"
)
@JsonProperty
(
value
=
"materialName"
,
required
=
true
)
private
String
productMaterialName
;
/**
* 组件计量单位
*/
@Column
(
name
=
"proofing_make_bom_meins"
)
@JsonProperty
(
value
=
"materialUnit"
,
required
=
true
)
private
String
proofingMakeBomMeins
;
/**
* 组件报废百分比
*/
@Column
(
name
=
"proofing_make_bom_ausch"
)
@JsonProperty
(
value
=
"AUSCH"
,
required
=
true
)
private
Double
proofingMakeBomAusch
;
/**
* BOM项目文本(行1)
*/
@Column
(
name
=
"proofing_make_bom_text"
)
@JsonProperty
(
value
=
"POTX1"
,
required
=
true
)
private
String
proofingMakeBomText
;
/**
* 物料清单项目文本(行2)
*/
@Column
(
name
=
"proofing_make_bom_material_text"
)
@JsonProperty
(
value
=
"materialJson"
,
required
=
true
)
private
String
proofingMakeBomMaterialText
;
/**
* 替代组
*/
@Column
(
name
=
"proofing_make_bom_alpgr"
)
@JsonProperty
(
value
=
"ALPGR"
,
required
=
true
)
private
String
proofingMakeBomAlpgr
;
/**
* 替代优先级
*/
@Column
(
name
=
"proofing_make_bom_alprf"
)
@JsonProperty
(
value
=
"ALPRF"
,
required
=
true
)
private
Integer
proofingMakeBomAlprf
;
/**
* 策略
*/
@Column
(
name
=
"proofing_make_bom_alpst"
)
@JsonProperty
(
value
=
"ALPST"
,
required
=
true
)
private
String
proofingMakeBomAlpst
;
/**
* 使用概率
*/
@Column
(
name
=
"proofing_make_bom_ewahr"
)
@JsonProperty
(
value
=
"EWAHR"
,
required
=
true
)
private
Long
proofingMakeBomEwahr
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getProofingMakeBomId
()
{
return
proofingMakeBomId
;
}
public
void
setProofingMakeBomId
(
String
proofingMakeBomId
)
{
this
.
proofingMakeBomId
=
proofingMakeBomId
;
}
public
String
getProductMaterialId
()
{
return
productMaterialId
;
}
public
void
setProductMaterialId
(
String
productMaterialId
)
{
this
.
productMaterialId
=
productMaterialId
;
}
public
String
getProofingMakeId
()
{
return
proofingMakeId
;
}
public
void
setProofingMakeId
(
String
proofingMakeId
)
{
this
.
proofingMakeId
=
proofingMakeId
;
}
public
String
getProofingMakeBomNum
()
{
return
proofingMakeBomNum
;
}
public
void
setProofingMakeBomNum
(
String
proofingMakeBomNum
)
{
this
.
proofingMakeBomNum
=
proofingMakeBomNum
;
}
public
String
getProductMaterialName
()
{
return
productMaterialName
;
}
public
void
setProductMaterialName
(
String
productMaterialName
)
{
this
.
productMaterialName
=
productMaterialName
;
}
public
String
getProofingMakeBomMeins
()
{
return
proofingMakeBomMeins
;
}
public
void
setProofingMakeBomMeins
(
String
proofingMakeBomMeins
)
{
this
.
proofingMakeBomMeins
=
proofingMakeBomMeins
;
}
public
Double
getProofingMakeBomAusch
()
{
return
proofingMakeBomAusch
;
}
public
void
setProofingMakeBomAusch
(
Double
proofingMakeBomAusch
)
{
this
.
proofingMakeBomAusch
=
proofingMakeBomAusch
;
}
public
String
getProofingMakeBomText
()
{
return
proofingMakeBomText
;
}
public
void
setProofingMakeBomText
(
String
proofingMakeBomText
)
{
this
.
proofingMakeBomText
=
proofingMakeBomText
;
}
public
String
getProofingMakeBomMaterialText
()
{
return
proofingMakeBomMaterialText
;
}
public
void
setProofingMakeBomMaterialText
(
String
proofingMakeBomMaterialText
)
{
this
.
proofingMakeBomMaterialText
=
proofingMakeBomMaterialText
;
}
public
String
getProofingMakeBomAlpgr
()
{
return
proofingMakeBomAlpgr
;
}
public
void
setProofingMakeBomAlpgr
(
String
proofingMakeBomAlpgr
)
{
this
.
proofingMakeBomAlpgr
=
proofingMakeBomAlpgr
;
}
public
Integer
getProofingMakeBomAlprf
()
{
return
proofingMakeBomAlprf
;
}
public
void
setProofingMakeBomAlprf
(
Integer
proofingMakeBomAlprf
)
{
this
.
proofingMakeBomAlprf
=
proofingMakeBomAlprf
;
}
public
String
getProofingMakeBomAlpst
()
{
return
proofingMakeBomAlpst
;
}
public
void
setProofingMakeBomAlpst
(
String
proofingMakeBomAlpst
)
{
this
.
proofingMakeBomAlpst
=
proofingMakeBomAlpst
;
}
public
Long
getProofingMakeBomEwahr
()
{
return
proofingMakeBomEwahr
;
}
public
void
setProofingMakeBomEwahr
(
Long
proofingMakeBomEwahr
)
{
this
.
proofingMakeBomEwahr
=
proofingMakeBomEwahr
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/proofing/domain/proofingMake/proofingMakeBomReturnJson.json
0 → 100644
View file @
82f03be2
[
{
"IDNRK"
:
"1"
,
"MENGE"
:
"1"
,
"MEINS"
:
"张"
,
"AUSCH"
:
1.0
,
"POTX1"
:
"1"
,
"POTX2"
:
"相关内容11"
,
"ALPGR"
:
"1"
,
"ALPRF"
:
1
,
"ALPST"
:
"1"
,
"EWAHR"
:
1
},
{
"IDNRK"
:
"2"
,
"MENGE"
:
"2"
,
"MEINS"
:
"张"
,
"AUSCH"
:
2.0
,
"POTX1"
:
"2"
,
"POTX2"
:
"相关内容22"
,
"ALPGR"
:
"2"
,
"ALPRF"
:
2
,
"ALPST"
:
"2"
,
"EWAHR"
:
2
}
]
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/proofing/domain/proofingMake/query/ProofingMakeBomQueryRequest.java
0 → 100644
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
domain
.
proofingMake
.
query
;
import
com.huigou.data.domain.query.FlowBillSuperQueryRequest
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
/**
* title:
* author:ZHT
* date:2024/1/3
* description:
*/
@Data
public
class
ProofingMakeBomQueryRequest
extends
QueryAbstractRequest
{
/**
* 打样制作单BOMid
*/
private
String
proofingMakeBomId
;
/**
* 产品物料组成id
*/
private
String
productMaterialId
;
/**
* 打样制作单id
*/
private
String
proofingMakeId
;
/**
* 数量
*/
private
String
proofingMakeBomNum
;
/**
* 物料名称
*/
private
String
productMaterialName
;
/**
* 组件计量单位
*/
private
String
proofingMakeBomMeins
;
/**
* 组件报废百分比
*/
private
Double
proofingMakeBomAusch
;
/**
* BOM项目文本(行1)
*/
private
String
proofingMakeBomText
;
/**
* 物料清单项目文本(行2)
*/
private
String
proofingMakeBomMaterialText
;
/**
* 替代组
*/
private
String
proofingMakeBomAlpgr
;
/**
* 替代优先级
*/
private
Integer
proofingMakeBomAlprf
;
/**
* 策略
*/
private
String
proofingMakeBomAlpst
;
/**
* 使用概率
*/
private
Long
proofingMakeBomEwahr
;
}
topsun/src/main/java/com/huigou/topsun/proofing/repository/proofingApply/ProofingApplyBomRepository.java
0 → 100644
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
repository
.
proofingApply
;
import
com.huigou.topsun.proofing.domain.proofingApply.model.ProofingApplyBom
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* title:
* author:ZHT
* date:2024/1/3
* description:
*/
public
interface
ProofingApplyBomRepository
extends
JpaRepository
<
ProofingApplyBom
,
String
>
{
}
topsun/src/main/java/com/huigou/topsun/proofing/repository/proofingMake/ProofingMakeBomRepository.java
0 → 100644
View file @
82f03be2
package
com
.
huigou
.
topsun
.
proofing
.
repository
.
proofingMake
;
import
com.huigou.topsun.proofing.domain.proofingMake.model.ProofingMakeBom
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* title:
* author:ZHT
* date:2024/1/3
* description:
*/
public
interface
ProofingMakeBomRepository
extends
JpaRepository
<
ProofingMakeBom
,
String
>
{
}
topsun/src/main/resources/config/topsun/proofing/proofingApply.xml
View file @
82f03be2
...
...
@@ -66,4 +66,10 @@
<condition
column=
"proofing_apply_technology_id"
name=
"proofingApplyTechnologyId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"slicedProofingApplyBom"
table=
"proofing_apply_bom"
>
<sql-query>
select t.* from proofing_apply_bom t
</sql-query>
<condition
column=
"proofing_apply_id"
name=
"proofingApplyId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
</query-mappings>
\ No newline at end of file
topsun/src/main/resources/config/topsun/proofing/proofingMake.xml
View file @
82f03be2
...
...
@@ -39,4 +39,11 @@
<!-- work_instruction_apply wa-->
<!-- </sql-query>-->
<!-- </query>-->
<query
name=
"slicedProofingMakeBom"
table=
"proofing_make_bom"
>
<sql-query>
select t.* from proofing_make_bom t
</sql-query>
<condition
column=
"proofing_make_id"
name=
"proofingMakeId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
</query-mappings>
\ No newline at end of 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