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
19118593
Commit
19118593
authored
Dec 12, 2023
by
wanghang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复工艺二次保存数据丢失
parent
93c573c3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
133 additions
and
131 deletions
+133
-131
proofingApply.js
...n-xt/src/main/webapp/biz/topsun/proofing/proofingApply.js
+1
-1
technologyAndBom.js
.../biz/topsun/proofing/technologyAndBom/technologyAndBom.js
+3
-0
ProofingApplyApplication.java
...topsun/proofing/application/ProofingApplyApplication.java
+0
-1
ProofingApplyApplicationImpl.java
...oofing/application/impl/ProofingApplyApplicationImpl.java
+27
-12
ProofingMakeApplicationImpl.java
...roofing/application/impl/ProofingMakeApplicationImpl.java
+0
-3
ProofingApplyController.java
...u/topsun/proofing/controller/ProofingApplyController.java
+23
-12
ProofingApplyTechnology.java
...g/domain/model/proofingApply/ProofingApplyTechnology.java
+1
-1
ProofingApplyBaseInfoVo.java
...ou/topsun/proofing/domain/vo/ProofingApplyBaseInfoVo.java
+72
-99
ProofingApplyTechnologyRepository.java
...roofing/repository/ProofingApplyTechnologyRepository.java
+6
-2
No files found.
topsun-xt/src/main/webapp/biz/topsun/proofing/proofingApply.js
View file @
19118593
...
...
@@ -8,7 +8,7 @@ $(document).ready(function () {
function
initialize
(){
//若是作为详情页,则初始化bom
if
(
$
(
"#productId"
).
val
()
!=
null
&&
$
(
"#productId"
).
val
()
!=
""
){
ajaxRenderDataGoForm
({
proofingApplyNo
:
$
(
"#proofingApplyNo"
).
val
()});
//
ajaxRenderDataGoForm({proofingApplyNo:$("#proofingApplyNo").val()});
showTable
(
$
(
"#proofingApplyId"
).
val
());
}
}
...
...
topsun-xt/src/main/webapp/biz/topsun/proofing/technologyAndBom/technologyAndBom.js
View file @
19118593
...
...
@@ -247,6 +247,9 @@ $(document).ready(function() {
* 刷新表格
*/
function
reloadGrid
(
obj
)
{
if
(
obj
===
undefined
){
return
;
}
obj
.
gridManager
.
options
.
parms
=
obj
.
parms
;
obj
.
gridManager
.
loadData
();
}
...
...
topsun/src/main/java/com/huigou/topsun/proofing/application/ProofingApplyApplication.java
View file @
19118593
...
...
@@ -3,7 +3,6 @@ package com.huigou.topsun.proofing.application;
import
com.huigou.topsun.proofing.domain.model.proofingApply.ProofingApplyBaseInfo
;
import
com.huigou.topsun.proofing.domain.query.ProofingApplyQuery
;
import
com.huigou.topsun.proofing.domain.vo.ProofingApplyAndLookedVo
;
import
com.huigou.topsun.proofing.domain.vo.ProofingApplyAndProductVo
;
import
java.util.Map
;
public
interface
ProofingApplyApplication
{
...
...
topsun/src/main/java/com/huigou/topsun/proofing/application/impl/ProofingApplyApplicationImpl.java
View file @
19118593
...
...
@@ -67,7 +67,7 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
}
@SneakyThrows
@Transactional
(
propagation
=
Propagation
.
REQUIRES_NEW
)
@Transactional
(
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Override
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
...
...
@@ -77,8 +77,8 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
String
technologyJSON
=
sdo
.
getString
(
"technology"
);
String
processJSON
=
sdo
.
getString
(
"process"
);
ObjectMapper
objectMapper
=
new
ObjectMapper
();
proofingApplyTechnology
proofingTechnology
=
objectMapper
.
readValue
(
technologyJSON
,
p
roofingApplyTechnology
.
class
);
List
<
ProofingApplyProcess
>
P
rocessList
=
objectMapper
.
readValue
(
processJSON
,
new
TypeReference
<
List
<
ProofingApplyProcess
>>()
{});
ProofingApplyTechnology
proofingTechnology
=
objectMapper
.
readValue
(
technologyJSON
,
P
roofingApplyTechnology
.
class
);
List
<
ProofingApplyProcess
>
p
rocessList
=
objectMapper
.
readValue
(
processJSON
,
new
TypeReference
<
List
<
ProofingApplyProcess
>>()
{});
ProofingApplyLooked
proofingApplyLooked
=
getBizEntity
(
ProofingApplyLooked
.
class
);
if
(
proofingApply
.
isNew
())
{
...
...
@@ -86,24 +86,40 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
}
else
{
proofingApply
=
(
ProofingApplyBaseInfo
)
commonDomainService
.
loadAndFillinProperties
(
proofingApply
);
}
String
id
=
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
);
proofingApply
.
setProofingApplyId
(
id
);
// proofingApply.setProofingApplyApplicationStatus(StringUtil.isBlank(proofingApply.getProofingApplyNgReReason())?"normal":"cancel");
if
(
proofingApply
.
getProofingApplyId
()
==
null
||
proofingApply
.
getProofingApplyId
().
isEmpty
())
{
proofingApply
.
setProofingApplyId
(
id
);
}
proofingApply
=
proofingApplyRepository
.
save
(
proofingApply
);
ProofingApplyLooked
looked
=
proofingApplyLookedRepository
.
findByProofingApplyId
(
proofingApply
.
getProofingApplyId
());
proofingApplyLooked
.
setProofingApplyLookedId
(
looked
!=
null
?
looked
.
getProofingApplyLookedId
()
:
null
);
proofingApplyLooked
.
setProofingApplyId
(
proofingApply
.
getProofingApplyId
());
proofingApplyLookedRepository
.
save
(
proofingApplyLooked
);
/**
* 将样品的相关工艺工序等删除
*/
List
<
ProofingApplyTechnology
>
technologiesToDelete
=
proofingTechnologyRepository
.
findAllByProofingApplyId
(
proofingApply
.
getProofingApplyId
());
if
(!
technologiesToDelete
.
isEmpty
())
{
ProofingApplyTechnology
technologyToDelete
=
technologiesToDelete
.
get
(
0
);
String
proofingApplyTechnologyId
=
technologyToDelete
.
getProofingApplyTechnologyId
();
proofingTechnologyRepository
.
delete
(
technologyToDelete
);
List
<
ProofingApplyProcess
>
processesToDelete
=
proofingApplyProcessRepository
.
findByProofingApplyTechnologyId
(
proofingApplyTechnologyId
);
proofingApplyProcessRepository
.
deleteInBatch
(
processesToDelete
);
}
//添加样品及工艺
proofingTechnology
.
setProofingApplyId
(
proofingApply
.
getProofingApplyId
());
proofingTechnology
.
setProofingApplyTechnologyId
(
null
);
proofingTechnology
=
proofingTechnologyRepository
.
save
(
proofingTechnology
);
List
<
ProofingApplyProcess
>
processesToDelete
=
proofingApplyProcessRepository
.
findByProofingApplyTechnologyId
(
proofingTechnology
.
getProofingApplyTechnologyId
());
proofingApplyProcessRepository
.
deleteInBatch
(
processesToDelete
);
for
(
ProofingApplyProcess
proofingApplyProcess
:
ProcessList
)
{
for
(
ProofingApplyProcess
proofingApplyProcess
:
processList
)
{
proofingApplyProcess
.
setProofingApplyProcessId
(
null
);
proofingApplyProcess
.
setProofingApplyTechnologyId
(
proofingTechnology
.
getProofingApplyTechnologyId
());
proofingApplyProcessRepository
.
save
(
proofingApplyProcess
);
proofingApplyProcessRepository
.
save
AndFlush
(
proofingApplyProcess
);
}
return
proofingApply
.
getId
();
}
...
...
@@ -164,7 +180,7 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
* @param proofingApply
* @throws IllegalAccessException
*/
public
void
a
(
ProofingApplyAndLookedVo
proofingApply
)
throws
IllegalAccessException
{
public
void
test
(
ProofingApplyAndLookedVo
proofingApply
)
throws
IllegalAccessException
{
Map
<
String
,
Object
>
proofingMake
=
new
HashMap
<>();
Class
<?>
proofingApplyClass
=
proofingApply
.
getClass
();
...
...
@@ -185,5 +201,4 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
return
proofingApplyRepository
.
findByProofingApplyNo
(
proofingApplyNo
);
}
}
topsun/src/main/java/com/huigou/topsun/proofing/application/impl/ProofingMakeApplicationImpl.java
View file @
19118593
...
...
@@ -5,8 +5,6 @@ import com.huigou.data.query.model.QueryDescriptor;
import
com.huigou.topsun.proofing.application.ProofingMakeApplication
;
import
com.huigou.topsun.proofing.domain.model.proofingApply.ProofingApplyBaseInfo
;
import
com.huigou.topsun.proofing.domain.model.proofingApply.ProofingApplyProcess
;
import
com.huigou.topsun.proofing.domain.model.proofingApply.proofingApplyTechnology
;
import
com.huigou.topsun.proofing.domain.model.proofingMake.*
;
import
com.huigou.topsun.proofing.domain.query.ProofingMakeQueryRequest
;
import
com.huigou.topsun.proofing.domain.vo.ProofingMakeVo
;
...
...
@@ -14,7 +12,6 @@ import com.huigou.topsun.proofing.repository.*;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
com.huigou.util.SDO
;
import
com.huigou.util.StringUtil
;
import
lombok.SneakyThrows
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
topsun/src/main/java/com/huigou/topsun/proofing/controller/ProofingApplyController.java
View file @
19118593
...
...
@@ -14,6 +14,7 @@ import com.huigou.topsun.proofing.domain.model.proofingApply.ProofingApplyLooked
import
com.huigou.topsun.proofing.domain.query.ProofingApplyProcessQueryRequest
;
import
com.huigou.topsun.proofing.domain.query.ProofingApplyQuery
;
import
com.huigou.topsun.proofing.domain.query.proofingApplyTechnologyQueryRequest
;
import
com.huigou.topsun.proofing.domain.vo.ProofingApplyBaseInfoVo
;
import
com.huigou.topsun.technology.application.TechnologyApplication
;
import
com.huigou.topsun.technology.application.TechnologyProcessApplication
;
import
com.huigou.topsun.technology.domain.query.TechnologyQueryRequest
;
...
...
@@ -21,6 +22,7 @@ import com.huigou.uasp.annotation.ControllerMapping;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -89,7 +91,11 @@ public class ProofingApplyController extends CommonController {
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
ProofingApplyBaseInfo
proofingApply
=
proofingApplyApplication
.
loadProofingApplyById
(
id
);
return
forward
(
"proofingApply"
,
proofingApply
);
ProofingApplyLooked
proofingApplyLooked
=
proofingApplyLookedApplication
.
findByProofingApplyId
(
proofingApply
.
getProofingApplyId
());
ProofingApplyBaseInfoVo
vo
=
new
ProofingApplyBaseInfoVo
();
BeanUtils
.
copyProperties
(
proofingApply
,
vo
);
BeanUtils
.
copyProperties
(
proofingApplyLooked
,
vo
);
return
forward
(
"proofingApply"
,
vo
);
}
/**
...
...
@@ -100,17 +106,22 @@ public class ProofingApplyController extends CommonController {
SDO
sdo
=
this
.
getSDO
();
String
proofingApplyNo
=
sdo
.
getString
(
"proofingApplyNo"
);
String
productId
=
sdo
.
getString
(
"productId"
);
if
(
proofingApplyNo
!=
null
&&!
""
.
equals
(
proofingApplyNo
)){
ProofingApplyBaseInfo
proofingApplyBaseInfo
=
proofingApplyApplication
.
selectProofingApplyByProofingApplyNo
(
proofingApplyNo
);
ProofingApplyLooked
proofingApplyLooked
=
proofingApplyLookedApplication
.
findByProofingApplyId
(
proofingApplyBaseInfo
.
getProofingApplyId
());
return
toResult
(
proofingApplyLooked
);
}
else
if
(
productId
!=
null
&&!
""
.
equals
(
productId
)){
ProductLooked
productLooked
=
new
ProductLooked
();
productLooked
.
setProductId
(
productId
);
ProductLooked
newProductLooked
=
productLookedApplication
.
getProductLookedByEntity
(
productLooked
);
return
toResult
(
newProductLooked
);
}
return
toResult
(
null
);
// if(proofingApplyNo!=null&&!"".equals(proofingApplyNo)){
// ProofingApplyBaseInfo proofingApplyBaseInfo = proofingApplyApplication.selectProofingApplyByProofingApplyNo(proofingApplyNo);
// ProofingApplyLooked proofingApplyLooked = proofingApplyLookedApplication.findByProofingApplyId(proofingApplyBaseInfo.getProofingApplyId());
// return toResult(proofingApplyLooked);
// }else if(productId!=null&&!"".equals(productId)){
// ProductLooked productLooked = new ProductLooked();
// productLooked.setProductId(productId);
// ProductLooked newProductLooked = productLookedApplication.getProductLookedByEntity(productLooked);
// return toResult(newProductLooked);
// }
// return toResult(null);
ProductLooked
productLooked
=
new
ProductLooked
();
productLooked
.
setProductId
(
productId
);
ProductLooked
newProductLooked
=
productLookedApplication
.
getProductLookedByEntity
(
productLooked
);
return
toResult
(
newProductLooked
);
}
...
...
topsun/src/main/java/com/huigou/topsun/proofing/domain/model/proofingApply/
p
roofingApplyTechnology.java
→
topsun/src/main/java/com/huigou/topsun/proofing/domain/model/proofingApply/
P
roofingApplyTechnology.java
View file @
19118593
...
...
@@ -15,7 +15,7 @@ import java.io.Serializable;
@Entity
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
p
roofingApplyTechnology
implements
Serializable
{
public
class
P
roofingApplyTechnology
implements
Serializable
{
/**
* 打样工艺id
*/
...
...
topsun/src/main/java/com/huigou/topsun/proofing/domain/vo/ProofingApply
AndProduct
Vo.java
→
topsun/src/main/java/com/huigou/topsun/proofing/domain/vo/ProofingApply
BaseInfo
Vo.java
View file @
19118593
package
com
.
huigou
.
topsun
.
proofing
.
domain
.
vo
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
com.topsunit.query.annotations.Dictionary
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
java.util.Date
;
/**
*
样品申请与外观
*
打样申请基本信息
*/
@Data
public
class
ProofingApply
AndProductVo
{
public
class
ProofingApply
BaseInfoVo
extends
FlowBillAbstractEntity
{
/**
* 申请单id
*/
private
String
proofingApplyId
;
/**
* 申请单号
*/
private
String
proofingApplyNo
;
/**
* 产品id
*/
private
String
productCode
;
/**
* 产品id
*/
private
String
productId
;
/**
* 品牌客户编号
*/
private
String
customerCode
;
/**
* 客户id
*/
private
String
customerId
;
/**
*
品牌编号名称
*
版面
*/
// private String productCategoryNam
e;
private
String
pag
e
;
/**
* 版面需求时间
*/
private
Date
proofingApplyPageNeedTime
;
/**
* 完成日期
*/
private
Date
proofingApplyCompleteDate
;
/**
*
中文样品名
*
样品中文名称
*/
private
String
proofingApplySampleCnName
;
/**
*
英文样品名
*
样品英文名称
*/
private
String
proofingApplySampleEnName
;
/**
* 样品版次
*/
private
Integer
proofingApplySampleVersion
;
/**
* 样品规格
*/
private
Integer
proofingApplySampleSize
;
/**
* 样品数量
*/
private
Long
proofingApplySampleNum
;
/**
* 产量情况
*/
private
String
proofingApplyOutputSituation
;
/**
* 产品代号
*/
private
String
proofingApplyProductNo
;
/**
* 打样形式
*/
private
String
proofingType
;
/**
* 分配方式
*/
private
String
proofingApplyAllocationType
;
/**
* 产品类别名称
*/
private
String
productCategoryName
;
/**
* 表面处理
*/
private
String
proofingApplySurfaceTreatment
;
/**
* NG重新打样原因
*/
private
String
proofingApplyNgReReason
;
/**
*申请单状态
*
申请单状态
*/
@Dictionary
(
"handleResult"
)
private
String
proofingApplyApplicationStatus
;
/**
*测试标准
*
测试标准
*/
private
String
proofingApplyTestStandard
;
private
String
proofingApplyLookedId
;
/**
*
测试标准
*
是否量产
*/
private
String
isOutput
;
/**
*测试标准
*/
private
String
isOut
;
/**
*测试标准
* 是否外发
*/
private
String
isChange
;
private
String
isOut
;
/**
*
产品类别
*
是否改变
*/
private
String
productCategoryName
;
@Dictionary
(
"yesorno"
)
private
String
isChange
;
/**
* 长;单位cm
*/
private
Double
productLength
;
/**
* 宽;单位cm
*/
private
Double
productWidth
;
/**
* 高;单位cm
*/
private
Double
productHeight
;
/**
* 厚度;单位mm
*/
private
Double
productThick
;
/**
* 成品克重;单位g
*/
private
Double
productWeight
;
/**
* 角型
*/
private
String
productAngleType
;
/**
* 角度(单位mm)
*/
private
Double
productAngle
;
/**
* 孔径(单位mm)
*/
private
Double
productAperture
;
private
Double
productThick
;
/**
* 单层厚(单位丝)
*/
private
Integer
productSingleLayer
;
/**
* 单重(单位KG)
*/
private
Double
productSingleWeight
;
private
Integer
productSingleLayer
;
/**
* 层数
*/
private
Integer
productLayerNum
;
/**
* 排版参数配置ID
*/
private
String
productPublishedConfId
;
/**
* 模数
*/
private
Integer
modulus
;
/**
* 行数
*/
private
Integer
rowNum
;
/**
* 列数
*/
private
Integer
columnNum
;
/**
* 搭版数
*/
private
Integer
contactNum
;
/**
* 行双刀位(单位mm)
*/
private
Double
rowDoubleBlade
;
/**
* 列双刀位(单位mm)
*/
private
Double
columnDoubleBlade
;
/**
* 派工倍数
*/
private
Integer
dispatchMultiple
;
/**
* 印张长度(单位cm)
*/
private
Double
sheetLength
;
/**
* 印张宽度(单位cm)
*/
private
Double
sheetWidth
;
/**
* 产品印张设置(product_sheet_conf)
*/
private
String
productSheetConf
;
@Override
protected
String
getCodeRuleId
()
{
return
"proofingApply"
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/proofing/repository/ProofingApplyTechnologyRepository.java
View file @
19118593
package
com
.
huigou
.
topsun
.
proofing
.
repository
;
import
com.huigou.topsun.proofing.domain.model.proofingApply.
p
roofingApplyTechnology
;
import
com.huigou.topsun.proofing.domain.model.proofingApply.
P
roofingApplyTechnology
;
import
org.springframework.data.jpa.repository.JpaRepository
;
public
interface
ProofingApplyTechnologyRepository
extends
JpaRepository
<
proofingApplyTechnology
,
String
>
{
import
java.util.List
;
public
interface
ProofingApplyTechnologyRepository
extends
JpaRepository
<
ProofingApplyTechnology
,
String
>
{
List
<
ProofingApplyTechnology
>
findAllByProofingApplyId
(
String
proofingApplyId
);
}
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