Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
ddms-h2-masterdata-slave
Project
Project
Details
Activity
Releases
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
Arie Valdano
ddms-h2-masterdata-slave
Commits
a0f09816
Commit
a0f09816
authored
Mar 07, 2025
by
akbar fauzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change import javax to jakarta
parent
d07bf677
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
2853 additions
and
18 deletions
+2853
-18
CreationalSpecificationBuilder.java
...sad/masterdata/common/CreationalSpecificationBuilder.java
+40
-0
GenericRepository.java
...n/java/com/eksad/masterdata/common/GenericRepository.java
+8
-0
APIPullNjbNscDetail.java
...java/com/eksad/masterdata/domain/APIPullNjbNscDetail.java
+23
-0
APIPullNjbNscHeader.java
...java/com/eksad/masterdata/domain/APIPullNjbNscHeader.java
+53
-0
ComplaintWorkOrder.java
.../java/com/eksad/masterdata/domain/ComplaintWorkOrder.java
+141
-0
CreationalSpecification.java
.../com/eksad/masterdata/domain/CreationalSpecification.java
+142
-0
PromoWorkOrder.java
...main/java/com/eksad/masterdata/domain/PromoWorkOrder.java
+190
-0
PromoWorkOrderDetail.java
...ava/com/eksad/masterdata/domain/PromoWorkOrderDetail.java
+194
-0
WorkOrder.java
src/main/java/com/eksad/masterdata/domain/WorkOrder.java
+1226
-0
WorkOrderService.java
...in/java/com/eksad/masterdata/domain/WorkOrderService.java
+305
-0
WorkOrderSparepart.java
.../java/com/eksad/masterdata/domain/WorkOrderSparepart.java
+263
-0
APIPullNjbNscRepository.java
.../eksad/masterdata/repository/APIPullNjbNscRepository.java
+215
-0
WorkOrderRepository.java
.../com/eksad/masterdata/repository/WorkOrderRepository.java
+12
-0
PullNJBNSCHystrixService.java
...om/eksad/masterdata/service/PullNJBNSCHystrixService.java
+10
-8
application-dev.properties
src/main/resources/application-dev.properties
+9
-5
application-dev.properties
target/classes/application-dev.properties
+9
-5
inputFiles.lst
...en-compiler-plugin/compile/default-compile/inputFiles.lst
+13
-0
No files found.
src/main/java/com/eksad/masterdata/common/CreationalSpecificationBuilder.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
common
;
import
com.eksad.masterdata.domain.CreationalSpecification
;
import
java.util.Date
;
public
class
CreationalSpecificationBuilder
{
private
Date
createdAt
;
private
String
createdBy
;
private
Date
modifiedAt
;
private
String
modifiedBy
;
public
CreationalSpecificationBuilder
()
{
}
public
CreationalSpecificationBuilder
setCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
return
this
;
}
public
CreationalSpecificationBuilder
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
return
this
;
}
public
CreationalSpecificationBuilder
setModifiedAt
(
Date
modifiedAt
)
{
this
.
modifiedAt
=
modifiedAt
;
return
this
;
}
public
CreationalSpecificationBuilder
setModifiedBy
(
String
modifiedBy
)
{
this
.
modifiedBy
=
modifiedBy
;
return
this
;
}
public
CreationalSpecification
createCreationalSpecification
()
{
return
new
CreationalSpecification
(
createdAt
,
createdBy
,
modifiedAt
,
modifiedBy
);
}
}
src/main/java/com/eksad/masterdata/common/GenericRepository.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
common
;
import
org.springframework.data.repository.NoRepositoryBean
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
@NoRepositoryBean
public
interface
GenericRepository
<
T
>
extends
PagingAndSortingRepository
<
T
,
Long
>
{
}
src/main/java/com/eksad/masterdata/domain/APIPullNjbNscDetail.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
domain
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
APIPullNjbNscDetail
{
String
woID
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"dd-MM-yyyy HH:mm:ss"
,
timezone
=
"Asia/Jakarta"
)
Date
createdAt
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"dd-MM-yyyy HH:mm:ss"
,
timezone
=
"Asia/Jakarta"
)
Date
modifiedAt
;
Double
harga
;
Double
qty
;
Double
discount
;
Double
total
;
String
partID
;
String
cwsCode
;
String
tipe
;
Double
uangMuka
;
}
src/main/java/com/eksad/masterdata/domain/APIPullNjbNscHeader.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
domain
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
APIPullNjbNscHeader
{
private
String
noWorkOrder
;
private
String
noNJB
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"dd/MM/yyyy HH:mm:ss"
,
timezone
=
"Asia/Jakarta"
)
private
Date
tanggalNJB
;
private
Double
totalHargaNJB
;
private
String
noNSC
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"dd/MM/yyyy HH:mm:ss"
,
timezone
=
"Asia/Jakarta"
)
private
Date
tanggalNSC
;
private
Double
totalHargaNSC
;
private
String
hondaIdSA
;
private
String
hondaIdMekanik
;
private
String
dealerId
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"dd/MM/yyyy HH:mm:ss"
,
timezone
=
"Asia/Jakarta"
)
private
Date
createdTime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"dd/MM/yyyy HH:mm:ss"
,
timezone
=
"Asia/Jakarta"
)
private
Date
modifiedTime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"dd/MM/yyyy HH:mm:ss"
,
timezone
=
"Asia/Jakarta"
)
private
Date
finishFinalCheckTime
;
private
String
noWorkOrderOrafin
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"dd/MM/yyyy HH:mm:ss"
,
timezone
=
"Asia/Jakarta"
)
private
Date
startWOTime
;
private
Double
totalHargaJasa
;
private
Double
totalHargaSparepart
;
private
String
promoIdJasa
;
private
String
promoIdPart
;
private
Double
totalDP
;
private
String
discountCode
;
}
src/main/java/com/eksad/masterdata/domain/ComplaintWorkOrder.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
domain
;
import
com.eksad.ddms.common.util.object.EntityObject
;
import
jakarta.persistence.*
;
import
java.util.Objects
;
@Entity
@Table
(
name
=
"TRX_COMPLAINTWO"
)
public
class
ComplaintWorkOrder
implements
EntityObject
<
ComplaintWorkOrder
>
{
@Id
@GeneratedValue
(
generator
=
"trx_complaintwo_gen"
)
@SequenceGenerator
(
name
=
"trx_complaintwo_gen"
,
sequenceName
=
"trx_complaintwo_seq"
)
Integer
id
;
private
String
complaintWoID
;
private
String
complaintID
;
private
String
complaintName
;
private
String
analisa
;
private
String
woID
;
@Embedded
private
CreationalSpecification
complaintWoCreational
;
public
ComplaintWorkOrder
()
{
}
public
ComplaintWorkOrder
(
String
complaintWoID
,
String
complaintID
,
String
complaintName
,
String
analisa
,
String
woID
,
CreationalSpecification
complaintWoCreational
)
{
this
.
complaintWoID
=
complaintWoID
;
this
.
complaintID
=
complaintID
;
this
.
complaintName
=
complaintName
;
this
.
analisa
=
analisa
;
this
.
woID
=
woID
;
this
.
complaintWoCreational
=
complaintWoCreational
;
}
public
String
getAnalisa
()
{
return
analisa
;
}
public
void
setAnalisa
(
String
analisa
)
{
this
.
analisa
=
analisa
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getComplaintWoID
()
{
return
complaintWoID
;
}
public
void
setComplaintWoID
(
String
complaintWoID
)
{
this
.
complaintWoID
=
complaintWoID
;
}
public
String
getComplaintID
()
{
return
complaintID
;
}
public
void
setComplaintID
(
String
complaintID
)
{
this
.
complaintID
=
complaintID
;
}
public
String
getComplaintName
()
{
return
complaintName
;
}
public
void
setComplaintName
(
String
complaintName
)
{
this
.
complaintName
=
complaintName
;
}
public
String
getWoID
()
{
return
woID
;
}
public
void
setWoID
(
String
woID
)
{
this
.
woID
=
woID
;
}
public
CreationalSpecification
getComplaintWoCreational
()
{
return
complaintWoCreational
;
}
public
void
setComplaintWoCreational
(
CreationalSpecification
complaintWoCreational
)
{
this
.
complaintWoCreational
=
complaintWoCreational
;
}
@Override
public
int
hashCode
()
{
int
hash
=
7
;
hash
=
11
*
hash
+
Objects
.
hashCode
(
this
.
complaintWoID
);
hash
=
11
*
hash
+
Objects
.
hashCode
(
this
.
complaintID
);
hash
=
11
*
hash
+
Objects
.
hashCode
(
this
.
complaintName
);
hash
=
11
*
hash
+
Objects
.
hashCode
(
this
.
analisa
);
hash
=
11
*
hash
+
Objects
.
hashCode
(
this
.
woID
);
hash
=
11
*
hash
+
Objects
.
hashCode
(
this
.
complaintWoCreational
);
return
hash
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
{
return
true
;
}
if
(
obj
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
obj
.
getClass
())
{
return
false
;
}
final
ComplaintWorkOrder
other
=
(
ComplaintWorkOrder
)
obj
;
if
(!
Objects
.
equals
(
this
.
complaintWoID
,
other
.
complaintWoID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
complaintID
,
other
.
complaintID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
complaintName
,
other
.
complaintName
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
analisa
,
other
.
analisa
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
woID
,
other
.
woID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
complaintWoCreational
,
other
.
complaintWoCreational
))
{
return
false
;
}
return
true
;
}
@Override
public
boolean
sameIdentityAs
(
ComplaintWorkOrder
t
)
{
return
this
.
equals
(
t
);
}
}
src/main/java/com/eksad/masterdata/domain/CreationalSpecification.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
domain
;
import
com.eksad.ddms.common.util.object.ValueObject
;
import
com.eksad.masterdata.common.CreationalSpecificationBuilder
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
jakarta.persistence.Embeddable
;
import
jakarta.persistence.Temporal
;
import
jakarta.persistence.TemporalType
;
import
java.util.Date
;
import
java.util.Objects
;
@Embeddable
public
class
CreationalSpecification
implements
ValueObject
<
CreationalSpecification
>
{
@Temporal
(
TemporalType
.
TIMESTAMP
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"dd-MM-yyyy HH:mm:ss"
)
private
Date
createdAt
;
private
String
createdBy
;
@Temporal
(
TemporalType
.
TIMESTAMP
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"dd-MM-yyyy HH:mm:ss"
)
private
Date
modifiedAt
;
private
String
modifiedBy
;
public
CreationalSpecification
()
{
}
public
CreationalSpecification
(
Date
createdAt
,
String
createdBy
,
Date
modifiedAt
,
String
modifiedBy
)
{
this
.
createdAt
=
createdAt
;
this
.
createdBy
=
createdBy
;
this
.
modifiedAt
=
modifiedAt
;
this
.
modifiedBy
=
modifiedBy
;
}
public
void
assignNewCreationalSpecification
(
CreationalSpecification
creationalSpecification
)
{
this
.
modifiedAt
=
creationalSpecification
.
getModifiedAt
();
this
.
modifiedBy
=
creationalSpecification
.
getModifiedBy
();
}
public
Date
getCreatedAt
()
{
return
createdAt
;
}
public
void
setCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
}
public
String
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
public
Date
getModifiedAt
()
{
return
modifiedAt
;
}
public
void
setModifiedAt
(
Date
modifiedAt
)
{
this
.
modifiedAt
=
modifiedAt
;
}
public
String
getModifiedBy
()
{
return
modifiedBy
;
}
public
void
setModifiedBy
(
String
modifiedBy
)
{
this
.
modifiedBy
=
modifiedBy
;
}
@Override
public
int
hashCode
()
{
int
hash
=
7
;
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
createdAt
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
createdBy
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
modifiedAt
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
modifiedBy
);
return
hash
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
obj
.
getClass
())
{
return
false
;
}
final
CreationalSpecification
other
=
(
CreationalSpecification
)
obj
;
if
(!
Objects
.
equals
(
this
.
createdAt
,
other
.
createdAt
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
createdBy
,
other
.
createdBy
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
modifiedAt
,
other
.
modifiedAt
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
modifiedBy
,
other
.
modifiedBy
))
{
return
false
;
}
return
true
;
}
@Override
public
boolean
sameValueAs
(
CreationalSpecification
other
)
{
return
this
.
equals
(
other
);
}
@Override
public
String
toString
()
{
return
"CreationalSpecification{"
+
"createdAt="
+
createdAt
+
", createdBy="
+
createdBy
+
", modifiedAt="
+
modifiedAt
+
", modifiedBy="
+
modifiedBy
+
'}'
;
}
public
void
updateModifiedAt
()
{
this
.
modifiedAt
=
new
Date
();
}
public
void
updateModified
(
CreationalSpecification
creationalSpecification
)
{
this
.
modifiedAt
=
creationalSpecification
.
getModifiedAt
();
this
.
modifiedBy
=
creationalSpecification
.
getModifiedBy
();
}
public
static
CreationalSpecification
getInstance
()
{
CreationalSpecification
cs
=
new
CreationalSpecificationBuilder
()
.
setCreatedAt
(
new
Date
())
.
setCreatedBy
(
"USER"
)
.
createCreationalSpecification
();
return
cs
;
}
public
static
CreationalSpecification
getInstance
(
String
nik
)
{
CreationalSpecification
cs
=
new
CreationalSpecificationBuilder
()
.
setCreatedAt
(
new
Date
())
.
setCreatedBy
(
nik
)
.
createCreationalSpecification
();
return
cs
;
}
}
src/main/java/com/eksad/masterdata/domain/PromoWorkOrder.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
domain
;
import
com.eksad.ddms.common.util.object.EntityObject
;
import
jakarta.persistence.*
;
import
java.util.HashSet
;
import
java.util.Objects
;
import
java.util.Set
;
@Entity
@Table
(
name
=
"MST_PROMOWORKORDER"
)
public
class
PromoWorkOrder
implements
EntityObject
<
PromoWorkOrder
>
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
SEQUENCE
)
Integer
id
;
private
String
promoWoID
;
private
String
promoID
;
private
String
promoName
;
private
Boolean
joinable
;
private
Double
value
;
private
String
woID
;
private
Boolean
isManualPromo
;
@OneToMany
(
fetch
=
FetchType
.
EAGER
,
cascade
=
CascadeType
.
ALL
,
orphanRemoval
=
true
)
@JoinColumn
(
name
=
"promoWoID"
,
referencedColumnName
=
"promoWoID"
)
private
Set
<
PromoWorkOrderDetail
>
promoWoDetails
=
new
HashSet
<>();
@Embedded
private
CreationalSpecification
promoWoCreational
;
public
PromoWorkOrder
()
{
}
public
PromoWorkOrder
(
String
promoWoID
,
String
promoID
,
Boolean
isManualPromo
,
String
woID
,
CreationalSpecification
promoWoCreational
,
Set
<
PromoWorkOrderDetail
>
promoWoDetails
)
{
this
.
promoWoID
=
promoWoID
;
this
.
promoID
=
promoID
;
this
.
woID
=
woID
;
this
.
isManualPromo
=
isManualPromo
;
this
.
promoWoCreational
=
promoWoCreational
;
this
.
promoWoDetails
=
promoWoDetails
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getPromoWoID
()
{
return
promoWoID
;
}
public
void
setPromoWoID
(
String
promoWoID
)
{
this
.
promoWoID
=
promoWoID
;
}
public
String
getPromoID
()
{
return
promoID
;
}
public
void
setPromoID
(
String
promoID
)
{
this
.
promoID
=
promoID
;
}
public
String
getWoID
()
{
return
woID
;
}
public
void
setWoID
(
String
woID
)
{
this
.
woID
=
woID
;
}
public
Boolean
getIsManualPromo
()
{
return
isManualPromo
;
}
public
void
setIsManualPromo
(
Boolean
isManualPromo
)
{
this
.
isManualPromo
=
isManualPromo
;
}
public
CreationalSpecification
getPromoWoCreational
()
{
return
promoWoCreational
;
}
public
void
setPromoWoCreational
(
CreationalSpecification
promoWoCreational
)
{
this
.
promoWoCreational
=
promoWoCreational
;
}
public
Boolean
getJoinable
()
{
return
joinable
;
}
public
void
setJoinable
(
Boolean
joinable
)
{
this
.
joinable
=
joinable
;
}
public
Double
getValue
()
{
return
value
;
}
public
void
setValue
(
Double
value
)
{
this
.
value
=
value
;
}
public
String
getPromoName
()
{
return
promoName
;
}
public
void
setPromoName
(
String
promoName
)
{
this
.
promoName
=
promoName
;
}
public
Set
<
PromoWorkOrderDetail
>
getPromoWoDetails
()
{
return
promoWoDetails
;
}
public
void
setPromoWoDetails
(
Set
<
PromoWorkOrderDetail
>
promoWoDetails
)
{
this
.
promoWoDetails
=
promoWoDetails
;
}
@Override
public
int
hashCode
()
{
int
hash
=
7
;
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
id
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
promoWoID
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
promoID
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
promoName
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
joinable
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
value
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
woID
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
isManualPromo
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
promoWoCreational
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
promoWoDetails
);
return
hash
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
{
return
true
;
}
if
(
obj
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
obj
.
getClass
())
{
return
false
;
}
final
PromoWorkOrder
other
=
(
PromoWorkOrder
)
obj
;
if
(!
Objects
.
equals
(
this
.
promoWoID
,
other
.
promoWoID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
promoID
,
other
.
promoID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
promoName
,
other
.
promoName
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
woID
,
other
.
woID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
isManualPromo
,
other
.
isManualPromo
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
id
,
other
.
id
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
joinable
,
other
.
joinable
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
value
,
other
.
value
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
promoWoCreational
,
other
.
promoWoCreational
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
promoWoDetails
,
other
.
promoWoDetails
))
{
return
false
;
}
return
true
;
}
@Override
public
boolean
sameIdentityAs
(
PromoWorkOrder
t
)
{
return
this
.
equals
(
t
);
}
}
src/main/java/com/eksad/masterdata/domain/PromoWorkOrderDetail.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
domain
;
import
com.eksad.ddms.common.type.PromoWOType
;
import
com.eksad.ddms.common.util.object.EntityObject
;
import
com.eksad.ddms.common.util.status.DataStatus
;
import
jakarta.persistence.*
;
import
java.util.Objects
;
@Entity
@Table
(
name
=
"MST_PROMOWORKORDERDETAIL"
)
public
class
PromoWorkOrderDetail
implements
EntityObject
<
PromoWorkOrderDetail
>
{
@Id
@GeneratedValue
(
generator
=
"mst_promoworkorderdetail_gen"
)
@SequenceGenerator
(
name
=
"mst_promoworkorderdetail_gen"
,
sequenceName
=
"mst_promoworkorderdetail_seq"
)
Integer
id
;
private
String
promoWoID
;
private
String
woID
;
private
String
ahassID
;
@Enumerated
(
EnumType
.
STRING
)
private
PromoWOType
type
;
private
String
referenceID
;
private
Double
value
;
@Enumerated
(
EnumType
.
STRING
)
private
DataStatus
status
;
private
Boolean
isManualPromo
;
@Embedded
private
CreationalSpecification
promoWoDetailCreational
;
public
PromoWorkOrderDetail
()
{
}
public
PromoWorkOrderDetail
(
String
promoWoID
,
String
woID
,
String
ahassID
,
PromoWOType
type
,
String
referenceID
,
Double
value
,
DataStatus
status
,
CreationalSpecification
promoWoDetailCreational
)
{
this
.
promoWoID
=
promoWoID
;
this
.
woID
=
woID
;
this
.
ahassID
=
ahassID
;
this
.
type
=
type
;
this
.
referenceID
=
referenceID
;
this
.
value
=
value
;
this
.
status
=
status
;
this
.
promoWoDetailCreational
=
promoWoDetailCreational
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getPromoWoID
()
{
return
promoWoID
;
}
public
void
setPromoWoID
(
String
promoWoID
)
{
this
.
promoWoID
=
promoWoID
;
}
public
String
getWoID
()
{
return
woID
;
}
public
void
setWoID
(
String
woID
)
{
this
.
woID
=
woID
;
}
public
String
getAhassID
()
{
return
ahassID
;
}
public
void
setAhassID
(
String
ahassID
)
{
this
.
ahassID
=
ahassID
;
}
public
PromoWOType
getType
()
{
return
type
;
}
public
void
setType
(
PromoWOType
type
)
{
this
.
type
=
type
;
}
public
String
getReferenceID
()
{
return
referenceID
;
}
public
void
setReferenceID
(
String
referenceID
)
{
this
.
referenceID
=
referenceID
;
}
public
Double
getValue
()
{
return
value
;
}
public
void
setValue
(
Double
value
)
{
this
.
value
=
value
;
}
public
DataStatus
getStatus
()
{
return
status
;
}
public
void
setStatus
(
DataStatus
status
)
{
this
.
status
=
status
;
}
public
Boolean
getIsManualPromo
()
{
return
isManualPromo
;
}
public
void
setIsManualPromo
(
Boolean
isManualPromo
)
{
this
.
isManualPromo
=
isManualPromo
;
}
public
CreationalSpecification
getPromoWoDetailCreational
()
{
return
promoWoDetailCreational
;
}
public
void
setPromoWoDetailCreational
(
CreationalSpecification
promoWoDetailCreational
)
{
this
.
promoWoDetailCreational
=
promoWoDetailCreational
;
}
@Override
public
int
hashCode
()
{
int
hash
=
7
;
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
id
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
promoWoID
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
woID
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
ahassID
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
type
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
referenceID
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
value
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
status
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
isManualPromo
);
hash
=
71
*
hash
+
Objects
.
hashCode
(
this
.
promoWoDetailCreational
);
return
hash
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
{
return
true
;
}
if
(
obj
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
obj
.
getClass
())
{
return
false
;
}
final
PromoWorkOrderDetail
other
=
(
PromoWorkOrderDetail
)
obj
;
if
(!
Objects
.
equals
(
this
.
id
,
other
.
id
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
promoWoID
,
other
.
promoWoID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
woID
,
other
.
woID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
ahassID
,
other
.
ahassID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
type
,
other
.
type
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
referenceID
,
other
.
referenceID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
value
,
other
.
value
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
status
,
other
.
status
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
isManualPromo
,
other
.
isManualPromo
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
promoWoDetailCreational
,
other
.
promoWoDetailCreational
))
{
return
false
;
}
return
true
;
}
@Override
public
boolean
sameIdentityAs
(
PromoWorkOrderDetail
t
)
{
return
this
.
equals
(
t
);
}
}
src/main/java/com/eksad/masterdata/domain/WorkOrder.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
domain
;
import
com.eksad.ddms.common.h2.type.servicelocation.ServiceLocationType
;
import
com.eksad.ddms.common.type.*
;
import
com.eksad.ddms.common.util.object.EntityObject
;
import
jakarta.persistence.*
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Time
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.Objects
;
import
java.util.Set
;
@Entity
@Table
(
name
=
"TRX_WO"
)
public
class
WorkOrder
implements
EntityObject
<
WorkOrder
>
{
@Id
@GeneratedValue
(
generator
=
"trx_wo_gen"
)
@SequenceGenerator
(
name
=
"trx_wo_gen"
,
sequenceName
=
"trx_wo_seq"
)
Integer
id
;
@Version
@Column
(
name
=
"version"
)
private
Long
version
;
@NotNull
(
message
=
"woID cannot be null"
)
private
String
woID
;
@NotNull
(
message
=
"ahassID cannot be null"
)
private
String
ahassID
;
private
Time
estimasiMulai
;
private
Time
estimasiSelesai
;
private
String
noPolisi
;
private
String
woNoRangka
;
private
String
woNoMesin
;
private
String
unitCustomerID
;
private
String
unitCustomerName
;
private
String
customerAttendeeID
;
private
Integer
kmMotor
;
private
Integer
suggestedKm
;
private
Double
fuelMeter
;
private
String
alasanDatang
;
@OneToMany
(
fetch
=
FetchType
.
EAGER
,
cascade
=
CascadeType
.
ALL
,
orphanRemoval
=
true
)
@JoinColumn
(
name
=
"woID"
,
referencedColumnName
=
"woID"
)
private
Set
<
ComplaintWorkOrder
>
listComplaint
=
new
HashSet
<>();
private
String
analisa
;
private
String
typeJasa
;
@OneToMany
(
fetch
=
FetchType
.
EAGER
,
cascade
=
CascadeType
.
ALL
,
orphanRemoval
=
true
)
@JoinColumn
(
name
=
"woID"
,
referencedColumnName
=
"woID"
)
private
Set
<
WorkOrderService
>
listJasa
=
new
HashSet
<>();
private
Double
totalHargaJasa
;
private
Double
totalDiscountJasa
;
private
Integer
totalWaktuJasa
;
@OneToMany
(
fetch
=
FetchType
.
EAGER
,
cascade
=
CascadeType
.
ALL
,
orphanRemoval
=
true
)
@JoinColumn
(
name
=
"woID"
,
referencedColumnName
=
"woID"
)
private
Set
<
WorkOrderSparepart
>
listPart
=
new
HashSet
<>();
private
Double
totalHargaSparepart
;
private
Double
totalDiscountSparepart
;
@Enumerated
(
EnumType
.
STRING
)
private
WoState
woLastKnownState
;
@Enumerated
(
EnumType
.
STRING
)
private
WoStatus
woLastKnownStatus
;
@Enumerated
(
EnumType
.
STRING
)
private
WoDisclaimerType
woDisclaimerType
;
private
Boolean
sparepartDibawaCustomer
;
private
String
confirmNoTelp
;
@OneToMany
(
fetch
=
FetchType
.
EAGER
,
cascade
=
CascadeType
.
ALL
,
orphanRemoval
=
true
)
@JoinColumn
(
name
=
"woID"
,
referencedColumnName
=
"woID"
)
private
Set
<
PromoWorkOrder
>
listPromo
=
new
HashSet
<>();
private
Integer
queueNumber
;
private
String
mechanicID
;
private
String
mechanicName
;
private
String
unitCategoryID
;
private
String
unitCategoryName
;
private
String
unitSeriesID
;
private
String
unitSeriesName
;
private
String
unitTypeID
;
private
String
unitTypeName
;
private
String
unitTypeColor
;
private
Integer
tahunPerakitan
;
private
String
saranMekanik
;
@Enumerated
(
EnumType
.
STRING
)
private
PitType
pitType
;
private
Integer
pitNumber
;
@Temporal
(
TemporalType
.
DATE
)
private
Date
woDate
;
private
String
signPhotoCustomer
;
private
String
signPhotoSA
;
private
String
signPhotoFinalCheck
;
private
String
signPhotoPenyerahan
;
private
String
signPhotoTambahan
;
private
String
packageServiceID
;
// @Enumerated(EnumType.STRING)
// private PaymentStatus paymentStatus;
private
String
bookingID
;
private
String
keterangan
;
@Enumerated
(
EnumType
.
STRING
)
private
HoldWOReasonType
alasanHoldWO
;
private
String
location
;
private
String
soID
;
private
String
promoCode
;
private
String
modifiedTrigger
;
private
String
invoice
;
private
String
invoiceUrl
;
private
String
unitEntrySource
;
private
String
noBukuC2
;
private
String
rekomendasiSA
;
@Enumerated
(
EnumType
.
STRING
)
private
UnitOwnershipStatus
unitOwnership
;
private
Double
totalBookingFee
;
private
String
tipeKPB
;
private
Integer
countPrint
;
private
String
prosesServicePUD
;
private
Boolean
specialCase
;
private
String
csID
;
private
String
reffNumber
;
@Enumerated
(
EnumType
.
STRING
)
private
ServiceLocationType
serviceLocationType
;
@Embedded
private
CreationalSpecification
woCreational
;
private
String
posServiceID
;
private
String
address
;
private
String
kabkotID
;
private
String
kecamatanID
;
private
String
kelurahanID
;
private
String
provinceID
;
public
WorkOrder
()
{
}
public
WorkOrder
(
String
woID
,
Long
version
,
String
ahassID
,
Time
estimasiMulai
,
Time
estimasiSelesai
,
String
noPolisi
,
String
woNoRangka
,
String
woNoMesin
,
String
unitCustomerID
,
String
unitCustomerName
,
String
customerAttendeeID
,
Integer
kmMotor
,
Integer
suggestedKm
,
Double
fuelMeter
,
String
alasanDatang
,
String
analisa
,
String
typeJasa
,
Double
totalHargaJasa
,
Double
totalDiscountJasa
,
Integer
totalWaktuJasa
,
Double
totalHargaSparepart
,
Double
totalDiscountSparepart
,
WoState
woLastKnownState
,
WoStatus
woLastKnownStatus
,
WoDisclaimerType
woDisclaimerType
,
Boolean
sparepartDibawaCustomer
,
String
confirmNoTelp
,
Integer
queueNumber
,
String
mechanicID
,
String
mechanicName
,
String
unitTypeID
,
String
unitTypeName
,
String
unitTypeColor
,
Integer
tahunPerakitan
,
String
saranMekanik
,
PitType
pitType
,
Integer
pitNumber
,
Date
woDate
,
String
signPhotoCustomer
,
String
signPhotoSA
,
String
packageServiceID
,
String
bookingID
,
String
keterangan
,
String
location
,
String
soID
,
String
promoCode
,
String
modifiedTrigger
,
String
invoice
,
CreationalSpecification
woCreational
,
String
unitEntrySource
,
String
noBukuC2
,
String
rekomendasiSA
,
UnitOwnershipStatus
unitOwnership
,
Double
totalBookingFee
,
String
tipeKPB
,
Integer
countPrint
,
String
prosesServicePUD
,
String
posServiceID
,
String
csID
,
Boolean
specialCase
,
String
address
,
String
kabkotID
,
String
kecamatanID
,
String
kelurahanID
,
String
provinceID
,
String
reffNumber
,
ServiceLocationType
serviceLocationType
)
{
this
.
woID
=
woID
;
this
.
version
=
version
;
this
.
ahassID
=
ahassID
;
this
.
estimasiMulai
=
estimasiMulai
;
this
.
estimasiSelesai
=
estimasiSelesai
;
this
.
noPolisi
=
noPolisi
;
this
.
woNoRangka
=
woNoRangka
;
this
.
woNoMesin
=
woNoMesin
;
this
.
unitCustomerID
=
unitCustomerID
;
this
.
unitCustomerName
=
unitCustomerName
;
this
.
customerAttendeeID
=
customerAttendeeID
;
this
.
kmMotor
=
kmMotor
;
this
.
suggestedKm
=
suggestedKm
;
this
.
fuelMeter
=
fuelMeter
;
this
.
alasanDatang
=
alasanDatang
;
this
.
analisa
=
analisa
;
this
.
typeJasa
=
typeJasa
;
this
.
totalHargaJasa
=
totalHargaJasa
;
this
.
totalDiscountJasa
=
totalDiscountJasa
;
this
.
totalWaktuJasa
=
totalWaktuJasa
;
this
.
totalHargaSparepart
=
totalHargaSparepart
;
this
.
totalDiscountSparepart
=
totalDiscountSparepart
;
this
.
woLastKnownState
=
woLastKnownState
;
this
.
woLastKnownStatus
=
woLastKnownStatus
;
this
.
woDisclaimerType
=
woDisclaimerType
;
this
.
sparepartDibawaCustomer
=
sparepartDibawaCustomer
;
this
.
confirmNoTelp
=
confirmNoTelp
;
this
.
queueNumber
=
queueNumber
;
this
.
mechanicID
=
mechanicID
;
this
.
mechanicName
=
mechanicName
;
this
.
unitTypeID
=
unitTypeID
;
this
.
unitTypeName
=
unitTypeName
;
this
.
unitTypeColor
=
unitTypeColor
;
this
.
tahunPerakitan
=
tahunPerakitan
;
this
.
saranMekanik
=
saranMekanik
;
this
.
pitType
=
pitType
;
this
.
pitNumber
=
pitNumber
;
this
.
woDate
=
woDate
;
this
.
signPhotoCustomer
=
signPhotoCustomer
;
this
.
signPhotoSA
=
signPhotoSA
;
this
.
packageServiceID
=
packageServiceID
;
this
.
bookingID
=
bookingID
;
this
.
keterangan
=
keterangan
;
this
.
location
=
location
;
this
.
soID
=
soID
;
this
.
promoCode
=
promoCode
;
this
.
modifiedTrigger
=
modifiedTrigger
;
this
.
invoice
=
invoice
;
this
.
woCreational
=
woCreational
;
this
.
noBukuC2
=
noBukuC2
;
this
.
unitEntrySource
=
unitEntrySource
;
this
.
rekomendasiSA
=
rekomendasiSA
;
this
.
unitOwnership
=
unitOwnership
;
this
.
totalBookingFee
=
totalBookingFee
;
this
.
tipeKPB
=
tipeKPB
;
this
.
countPrint
=
countPrint
;
this
.
prosesServicePUD
=
prosesServicePUD
;
this
.
specialCase
=
specialCase
;
this
.
csID
=
csID
;
this
.
posServiceID
=
posServiceID
;
this
.
address
=
address
;
this
.
kabkotID
=
kabkotID
;
this
.
kecamatanID
=
kecamatanID
;
this
.
kelurahanID
=
kelurahanID
;
this
.
provinceID
=
provinceID
;
this
.
reffNumber
=
reffNumber
;
this
.
serviceLocationType
=
serviceLocationType
;
}
public
String
getSignPhotoFinalCheck
()
{
return
signPhotoFinalCheck
;
}
public
void
setSignPhotoFinalCheck
(
String
signPhotoFinalCheck
)
{
this
.
signPhotoFinalCheck
=
signPhotoFinalCheck
;
}
public
String
getSignPhotoPenyerahan
()
{
return
signPhotoPenyerahan
;
}
public
void
setSignPhotoPenyerahan
(
String
signPhotoPenyerahan
)
{
this
.
signPhotoPenyerahan
=
signPhotoPenyerahan
;
}
public
String
getSignPhotoTambahan
()
{
return
signPhotoTambahan
;
}
public
void
setSignPhotoTambahan
(
String
signPhotoTambahan
)
{
this
.
signPhotoTambahan
=
signPhotoTambahan
;
}
public
Long
getVersion
()
{
return
version
;
}
public
void
setVersion
(
Long
version
)
{
this
.
version
=
version
;
}
public
HoldWOReasonType
getAlasanHoldWO
()
{
return
alasanHoldWO
;
}
public
void
setAlasanHoldWO
(
HoldWOReasonType
alasanHoldWO
)
{
this
.
alasanHoldWO
=
alasanHoldWO
;
}
public
Integer
getQueueNumber
()
{
return
queueNumber
;
}
public
void
setQueueNumber
(
Integer
queueNumber
)
{
this
.
queueNumber
=
queueNumber
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getWoID
()
{
return
woID
;
}
public
void
setWoID
(
String
woID
)
{
this
.
woID
=
woID
;
}
public
String
getAhassID
()
{
return
ahassID
;
}
public
void
setAhassID
(
String
ahassID
)
{
this
.
ahassID
=
ahassID
;
}
public
Time
getEstimasiMulai
()
{
return
estimasiMulai
;
}
public
void
setEstimasiMulai
(
Time
estimasiMulai
)
{
this
.
estimasiMulai
=
estimasiMulai
;
}
public
Time
getEstimasiSelesai
()
{
return
estimasiSelesai
;
}
public
void
setEstimasiSelesai
(
Time
estimasiSelesai
)
{
this
.
estimasiSelesai
=
estimasiSelesai
;
}
public
String
getNoPolisi
()
{
return
noPolisi
;
}
public
void
setNoPolisi
(
String
noPolisi
)
{
this
.
noPolisi
=
noPolisi
;
}
public
String
getWoNoRangka
()
{
return
woNoRangka
;
}
public
void
setWoNoRangka
(
String
woNoRangka
)
{
this
.
woNoRangka
=
woNoRangka
;
}
public
String
getWoNoMesin
()
{
return
woNoMesin
;
}
public
void
setWoNoMesin
(
String
woNoMesin
)
{
this
.
woNoMesin
=
woNoMesin
;
}
public
String
getUnitCustomerID
()
{
return
unitCustomerID
;
}
public
void
setUnitCustomerID
(
String
unitCustomerID
)
{
this
.
unitCustomerID
=
unitCustomerID
;
}
public
String
getCustomerAttendeeID
()
{
return
customerAttendeeID
;
}
public
void
setCustomerAttendeeID
(
String
customerAttendeeID
)
{
this
.
customerAttendeeID
=
customerAttendeeID
;
}
public
Integer
getKmMotor
()
{
return
kmMotor
;
}
public
void
setKmMotor
(
Integer
kmMotor
)
{
this
.
kmMotor
=
kmMotor
;
}
public
Integer
getSuggestedKm
()
{
return
suggestedKm
;
}
public
void
setSuggestedKm
(
Integer
suggestedKm
)
{
this
.
suggestedKm
=
suggestedKm
;
}
public
Double
getFuelMeter
()
{
return
fuelMeter
;
}
public
void
setFuelMeter
(
Double
fuelMeter
)
{
this
.
fuelMeter
=
fuelMeter
;
}
public
String
getAlasanDatang
()
{
return
alasanDatang
;
}
public
void
setAlasanDatang
(
String
alasanDatang
)
{
this
.
alasanDatang
=
alasanDatang
;
}
public
Set
<
ComplaintWorkOrder
>
getListComplaint
()
{
return
listComplaint
;
}
public
void
setListComplaint
(
Set
<
ComplaintWorkOrder
>
listComplaint
)
{
if
(
listComplaint
==
null
){
this
.
listComplaint
=
listComplaint
;
}
else
{
if
(
listComplaint
.
isEmpty
()){
this
.
listComplaint
.
addAll
(
listComplaint
);
}
else
{
this
.
listComplaint
.
retainAll
(
listComplaint
);
this
.
listComplaint
.
addAll
(
listComplaint
);
}
}
}
public
String
getSaranMekanik
()
{
return
saranMekanik
;
}
public
void
setSaranMekanik
(
String
saranMekanik
)
{
this
.
saranMekanik
=
saranMekanik
;
}
public
String
getAnalisa
()
{
return
analisa
;
}
public
void
setAnalisa
(
String
analisa
)
{
this
.
analisa
=
analisa
;
}
public
String
getTypeJasa
()
{
return
typeJasa
;
}
public
void
setTypeJasa
(
String
typeJasa
)
{
this
.
typeJasa
=
typeJasa
;
}
public
Set
<
WorkOrderService
>
getListJasa
()
{
return
listJasa
;
}
public
void
setListJasa
(
Set
<
WorkOrderService
>
listJasa
)
{
if
(
listJasa
==
null
){
this
.
listJasa
=
listJasa
;
}
else
{
if
(
listJasa
.
isEmpty
()){
this
.
listJasa
.
addAll
(
listJasa
);
}
else
{
this
.
listJasa
.
retainAll
(
listJasa
);
this
.
listJasa
.
addAll
(
listJasa
);
}
}
}
public
Double
getTotalHargaJasa
()
{
return
totalHargaJasa
;
}
public
void
setTotalHargaJasa
(
Double
totalHargaJasa
)
{
this
.
totalHargaJasa
=
totalHargaJasa
;
}
public
Double
getTotalDiscountJasa
()
{
return
totalDiscountJasa
;
}
public
void
setTotalDiscountJasa
(
Double
totalDiscountJasa
)
{
this
.
totalDiscountJasa
=
totalDiscountJasa
;
}
public
Integer
getTotalWaktuJasa
()
{
return
totalWaktuJasa
;
}
public
void
setTotalWaktuJasa
(
Integer
totalWaktuJasa
)
{
this
.
totalWaktuJasa
=
totalWaktuJasa
;
}
public
Set
<
WorkOrderSparepart
>
getListPart
()
{
return
listPart
;
}
public
void
setListPart
(
Set
<
WorkOrderSparepart
>
listPart
)
{
if
(
listPart
==
null
){
this
.
listPart
=
listPart
;
}
else
{
if
(
listPart
.
isEmpty
()){
this
.
listPart
.
clear
();
}
else
{
this
.
listPart
.
retainAll
(
listPart
);
this
.
listPart
.
addAll
(
listPart
);
}
}
}
public
Double
getTotalHargaSparepart
()
{
return
totalHargaSparepart
;
}
public
void
setTotalHargaSparepart
(
Double
totalHargaSparepart
)
{
this
.
totalHargaSparepart
=
totalHargaSparepart
;
}
public
Double
getTotalDiscountSparepart
()
{
return
totalDiscountSparepart
;
}
public
void
setTotalDiscountSparepart
(
Double
totalDiscountSparepart
)
{
this
.
totalDiscountSparepart
=
totalDiscountSparepart
;
}
public
WoState
getWoLastKnownState
()
{
return
woLastKnownState
;
}
public
void
setWoLastKnownState
(
WoState
woLastKnownState
)
{
this
.
woLastKnownState
=
woLastKnownState
;
}
public
WoStatus
getWoLastKnownStatus
()
{
return
woLastKnownStatus
;
}
public
void
setWoLastKnownStatus
(
WoStatus
woLastKnownStatus
)
{
this
.
woLastKnownStatus
=
woLastKnownStatus
;
}
public
WoDisclaimerType
getWoDisclaimerType
()
{
return
woDisclaimerType
;
}
public
void
setWoDisclaimerType
(
WoDisclaimerType
woDisclaimerType
)
{
this
.
woDisclaimerType
=
woDisclaimerType
;
}
public
Boolean
getSparepartDibawaCustomer
()
{
return
sparepartDibawaCustomer
;
}
public
void
setSparepartDibawaCustomer
(
Boolean
sparepartDibawaCustomer
)
{
this
.
sparepartDibawaCustomer
=
sparepartDibawaCustomer
;
}
public
String
getConfirmNoTelp
()
{
return
confirmNoTelp
;
}
public
void
setConfirmNoTelp
(
String
confirmNoTelp
)
{
this
.
confirmNoTelp
=
confirmNoTelp
;
}
public
Date
getWoDate
()
{
return
woDate
;
}
public
void
setWoDate
(
Date
woDate
)
{
this
.
woDate
=
woDate
;
}
public
Set
<
PromoWorkOrder
>
getListPromo
()
{
return
listPromo
;
}
public
String
getMechanicID
()
{
return
mechanicID
;
}
public
void
setMechanicID
(
String
mechanicID
)
{
this
.
mechanicID
=
mechanicID
;
}
public
String
getUnitTypeID
()
{
return
unitTypeID
;
}
public
void
setUnitTypeID
(
String
unitTypeID
)
{
this
.
unitTypeID
=
unitTypeID
;
}
public
Integer
getTahunPerakitan
()
{
return
tahunPerakitan
;
}
public
void
setTahunPerakitan
(
Integer
tahunPerakitan
)
{
this
.
tahunPerakitan
=
tahunPerakitan
;
}
public
PitType
getPitType
()
{
return
pitType
;
}
public
void
setPitType
(
PitType
pitType
)
{
this
.
pitType
=
pitType
;
}
public
Integer
getPitNumber
()
{
return
pitNumber
;
}
public
void
setPitNumber
(
Integer
pitNumber
)
{
this
.
pitNumber
=
pitNumber
;
}
public
void
setListPromo
(
Set
<
PromoWorkOrder
>
listPromo
)
{
if
(
listPromo
==
null
){
this
.
listPromo
=
listPromo
;
}
else
{
if
(
listPromo
.
isEmpty
()){
this
.
listPromo
.
addAll
(
listPromo
);
}
else
{
this
.
listPromo
.
retainAll
(
listPromo
);
this
.
listPromo
.
addAll
(
listPromo
);
}
}
}
public
String
getMechanicName
()
{
return
mechanicName
;
}
public
void
setMechanicName
(
String
mechanicName
)
{
this
.
mechanicName
=
mechanicName
;
}
public
String
getUnitTypeName
()
{
return
unitTypeName
;
}
public
void
setUnitTypeName
(
String
unitTypeName
)
{
this
.
unitTypeName
=
unitTypeName
;
}
public
String
getUnitCustomerName
()
{
return
unitCustomerName
;
}
public
void
setUnitCustomerName
(
String
unitCustomerName
)
{
this
.
unitCustomerName
=
unitCustomerName
;
}
public
CreationalSpecification
getWoCreational
()
{
return
woCreational
;
}
public
void
setWoCreational
(
CreationalSpecification
woCreational
)
{
this
.
woCreational
=
woCreational
;
}
public
String
getUnitTypeColor
()
{
return
unitTypeColor
;
}
public
void
setUnitTypeColor
(
String
unitTypeColor
)
{
this
.
unitTypeColor
=
unitTypeColor
;
}
public
String
getSignPhotoCustomer
()
{
return
signPhotoCustomer
;
}
public
void
setSignPhotoCustomer
(
String
signPhotoCustomer
)
{
this
.
signPhotoCustomer
=
signPhotoCustomer
;
}
public
String
getSignPhotoSA
()
{
return
signPhotoSA
;
}
public
void
setSignPhotoSA
(
String
signPhotoSA
)
{
this
.
signPhotoSA
=
signPhotoSA
;
}
public
String
getPackageServiceID
()
{
return
packageServiceID
;
}
public
void
setPackageServiceID
(
String
packageServiceID
)
{
this
.
packageServiceID
=
packageServiceID
;
}
// public PaymentStatus getPaymentStatus() {
// return paymentStatus;
// }
// public void setPaymentStatus(PaymentStatus paymentStatus) {
// this.paymentStatus = paymentStatus;
// }
public
String
getBookingID
()
{
return
bookingID
;
}
public
void
setBookingID
(
String
bookingID
)
{
this
.
bookingID
=
bookingID
;
}
public
String
getKeterangan
()
{
return
keterangan
;
}
public
void
setKeterangan
(
String
keterangan
)
{
this
.
keterangan
=
keterangan
;
}
public
String
getLocation
()
{
return
location
;
}
public
void
setLocation
(
String
location
)
{
this
.
location
=
location
;
}
public
String
getSoID
()
{
return
soID
;
}
public
void
setSoID
(
String
soID
)
{
this
.
soID
=
soID
;
}
public
String
getUnitCategoryID
()
{
return
unitCategoryID
;
}
public
void
setUnitCategoryID
(
String
unitCategoryID
)
{
this
.
unitCategoryID
=
unitCategoryID
;
}
public
String
getUnitCategoryName
()
{
return
unitCategoryName
;
}
public
void
setUnitCategoryName
(
String
unitCategoryName
)
{
this
.
unitCategoryName
=
unitCategoryName
;
}
public
String
getUnitSeriesID
()
{
return
unitSeriesID
;
}
public
void
setUnitSeriesID
(
String
unitSeriesID
)
{
this
.
unitSeriesID
=
unitSeriesID
;
}
public
String
getUnitSeriesName
()
{
return
unitSeriesName
;
}
public
void
setUnitSeriesName
(
String
unitSeriesName
)
{
this
.
unitSeriesName
=
unitSeriesName
;
}
public
String
getPromoCode
()
{
return
promoCode
;
}
public
void
setPromoCode
(
String
promoCode
)
{
this
.
promoCode
=
promoCode
;
}
public
String
getModifiedTrigger
()
{
return
modifiedTrigger
;
}
public
void
setModifiedTrigger
(
String
modifiedTrigger
)
{
this
.
modifiedTrigger
=
modifiedTrigger
;
}
public
String
getInvoice
()
{
return
invoice
;
}
public
void
setInvoice
(
String
invoice
)
{
this
.
invoice
=
invoice
;
}
public
String
getInvoiceUrl
()
{
return
invoiceUrl
;
}
public
void
setInvoiceUrl
(
String
invoiceUrl
)
{
this
.
invoiceUrl
=
invoiceUrl
;
}
public
String
getUnitEntrySource
()
{
return
unitEntrySource
;
}
public
void
setUnitEntrySource
(
String
unitEntrySource
)
{
this
.
unitEntrySource
=
unitEntrySource
;
}
public
String
getNoBukuC2
()
{
return
noBukuC2
;
}
public
void
setNoBukuC2
(
String
noBukuC2
)
{
this
.
noBukuC2
=
noBukuC2
;
}
public
String
getRekomendasiSA
()
{
return
rekomendasiSA
;
}
public
void
setRekomendasiSA
(
String
rekomendasiSA
)
{
this
.
rekomendasiSA
=
rekomendasiSA
;
}
public
UnitOwnershipStatus
getUnitOwnership
()
{
return
unitOwnership
;
}
public
void
setUnitOwnership
(
UnitOwnershipStatus
unitOwnership
)
{
this
.
unitOwnership
=
unitOwnership
;
}
public
Double
getTotalBookingFee
()
{
return
totalBookingFee
;
}
public
void
setTotalBookingFee
(
Double
totalBookingFee
)
{
this
.
totalBookingFee
=
totalBookingFee
;
}
public
String
getTipeKPB
()
{
return
tipeKPB
;
}
public
void
setTipeKPB
(
String
tipeKPB
)
{
this
.
tipeKPB
=
tipeKPB
;
}
public
Integer
getCountPrint
()
{
return
countPrint
;
}
public
void
setCountPrint
(
Integer
countPrint
)
{
this
.
countPrint
=
countPrint
;
}
public
String
getProsesServicePUD
()
{
return
prosesServicePUD
;
}
public
void
setProsesServicePUD
(
String
prosesServicePUD
)
{
this
.
prosesServicePUD
=
prosesServicePUD
;
}
public
String
getCsID
()
{
return
csID
;
}
public
void
setCsID
(
String
csID
)
{
this
.
csID
=
csID
;
}
public
Boolean
getSpecialCase
()
{
return
specialCase
;
}
public
void
setSpecialCase
(
Boolean
specialCase
)
{
this
.
specialCase
=
specialCase
;
}
public
String
getReffNumber
()
{
return
reffNumber
;
}
public
void
setReffNumber
(
String
reffNumber
)
{
this
.
reffNumber
=
reffNumber
;
}
public
String
getPosServiceID
()
{
return
posServiceID
;
}
public
void
setPosServiceID
(
String
posServiceID
)
{
this
.
posServiceID
=
posServiceID
;
}
public
ServiceLocationType
getServiceLocationType
()
{
return
serviceLocationType
;
}
public
void
setServiceLocationType
(
ServiceLocationType
serviceLocationType
)
{
this
.
serviceLocationType
=
serviceLocationType
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getKabkotID
()
{
return
kabkotID
;
}
public
void
setKabkotID
(
String
kabkotID
)
{
this
.
kabkotID
=
kabkotID
;
}
public
String
getKecamatanID
()
{
return
kecamatanID
;
}
public
void
setKecamatanID
(
String
kecamatanID
)
{
this
.
kecamatanID
=
kecamatanID
;
}
public
String
getKelurahanID
()
{
return
kelurahanID
;
}
public
void
setKelurahanID
(
String
kelurahanID
)
{
this
.
kelurahanID
=
kelurahanID
;
}
public
String
getProvinceID
()
{
return
provinceID
;
}
public
void
setProvinceID
(
String
provinceID
)
{
this
.
provinceID
=
provinceID
;
}
@Override
public
int
hashCode
()
{
int
hash
=
5
;
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
version
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
woID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
ahassID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
estimasiMulai
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
estimasiSelesai
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
noPolisi
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
woNoRangka
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
woNoMesin
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitCustomerID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitCustomerName
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
customerAttendeeID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
kmMotor
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
suggestedKm
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
fuelMeter
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
alasanDatang
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
listComplaint
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
analisa
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
typeJasa
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
listJasa
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
totalHargaJasa
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
totalDiscountJasa
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
totalWaktuJasa
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
listPart
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
totalHargaSparepart
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
totalDiscountSparepart
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
woLastKnownState
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
woLastKnownStatus
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
woDisclaimerType
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
sparepartDibawaCustomer
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
confirmNoTelp
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
listPromo
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
queueNumber
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
mechanicID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
mechanicName
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitCategoryID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitCategoryName
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitSeriesID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitSeriesName
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitTypeID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitTypeName
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitTypeColor
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
tahunPerakitan
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
saranMekanik
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
pitType
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
pitNumber
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
woDate
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
signPhotoCustomer
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
signPhotoSA
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
packageServiceID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
bookingID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
keterangan
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
location
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
soID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
promoCode
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
modifiedTrigger
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
invoice
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
woCreational
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
noBukuC2
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitEntrySource
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
rekomendasiSA
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
unitOwnership
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
totalBookingFee
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
tipeKPB
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
countPrint
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
prosesServicePUD
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
specialCase
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
serviceLocationType
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
posServiceID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
address
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
kabkotID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
kecamatanID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
kelurahanID
);
hash
=
17
*
hash
+
Objects
.
hashCode
(
this
.
provinceID
);
return
hash
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
{
return
true
;
}
if
(
obj
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
obj
.
getClass
())
{
return
false
;
}
final
WorkOrder
other
=
(
WorkOrder
)
obj
;
if
(!
Objects
.
equals
(
this
.
woID
,
other
.
woID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
ahassID
,
other
.
ahassID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
version
,
other
.
version
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
noPolisi
,
other
.
noPolisi
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
woNoRangka
,
other
.
woNoRangka
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
woNoMesin
,
other
.
woNoMesin
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitCustomerID
,
other
.
unitCustomerID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitCustomerName
,
other
.
unitCustomerName
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
customerAttendeeID
,
other
.
customerAttendeeID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
alasanDatang
,
other
.
alasanDatang
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
analisa
,
other
.
analisa
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
typeJasa
,
other
.
typeJasa
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
confirmNoTelp
,
other
.
confirmNoTelp
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
mechanicID
,
other
.
mechanicID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
mechanicName
,
other
.
mechanicName
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitCategoryID
,
other
.
unitCategoryID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitCategoryName
,
other
.
unitCategoryName
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitSeriesID
,
other
.
unitSeriesID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitSeriesName
,
other
.
unitSeriesName
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitTypeID
,
other
.
unitTypeID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitTypeName
,
other
.
unitTypeName
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitTypeColor
,
other
.
unitTypeColor
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
saranMekanik
,
other
.
saranMekanik
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
signPhotoCustomer
,
other
.
signPhotoCustomer
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
signPhotoSA
,
other
.
signPhotoSA
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
packageServiceID
,
other
.
packageServiceID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
bookingID
,
other
.
bookingID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
keterangan
,
other
.
keterangan
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
location
,
other
.
location
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
soID
,
other
.
soID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
estimasiMulai
,
other
.
estimasiMulai
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
estimasiSelesai
,
other
.
estimasiSelesai
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
kmMotor
,
other
.
kmMotor
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
suggestedKm
,
other
.
suggestedKm
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
fuelMeter
,
other
.
fuelMeter
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
listComplaint
,
other
.
listComplaint
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
listJasa
,
other
.
listJasa
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
totalHargaJasa
,
other
.
totalHargaJasa
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
totalDiscountJasa
,
other
.
totalDiscountJasa
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
totalWaktuJasa
,
other
.
totalWaktuJasa
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
listPart
,
other
.
listPart
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
totalHargaSparepart
,
other
.
totalHargaSparepart
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
totalDiscountSparepart
,
other
.
totalDiscountSparepart
))
{
return
false
;
}
if
(
this
.
woLastKnownState
!=
other
.
woLastKnownState
)
{
return
false
;
}
if
(
this
.
woLastKnownStatus
!=
other
.
woLastKnownStatus
)
{
return
false
;
}
if
(
this
.
woDisclaimerType
!=
other
.
woDisclaimerType
)
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
sparepartDibawaCustomer
,
other
.
sparepartDibawaCustomer
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
listPromo
,
other
.
listPromo
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
queueNumber
,
other
.
queueNumber
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
tahunPerakitan
,
other
.
tahunPerakitan
))
{
return
false
;
}
if
(
this
.
pitType
!=
other
.
pitType
)
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
pitNumber
,
other
.
pitNumber
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
woDate
,
other
.
woDate
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
promoCode
,
other
.
promoCode
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
modifiedTrigger
,
other
.
modifiedTrigger
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
invoice
,
other
.
invoice
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
woCreational
,
other
.
woCreational
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
noBukuC2
,
other
.
noBukuC2
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitEntrySource
,
other
.
unitEntrySource
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
rekomendasiSA
,
other
.
rekomendasiSA
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
unitOwnership
,
other
.
unitOwnership
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
totalBookingFee
,
other
.
totalBookingFee
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
tipeKPB
,
other
.
tipeKPB
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
countPrint
,
other
.
countPrint
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
prosesServicePUD
,
other
.
prosesServicePUD
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
specialCase
,
other
.
specialCase
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
posServiceID
,
other
.
posServiceID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
address
,
other
.
address
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
kabkotID
,
other
.
kabkotID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
kecamatanID
,
other
.
kecamatanID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
kelurahanID
,
other
.
kelurahanID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
provinceID
,
other
.
provinceID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
serviceLocationType
,
other
.
serviceLocationType
))
{
return
false
;
}
return
true
;
}
@Override
public
boolean
sameIdentityAs
(
WorkOrder
t
)
{
return
this
.
equals
(
t
);
}
}
src/main/java/com/eksad/masterdata/domain/WorkOrderService.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
domain
;
import
com.eksad.ddms.common.util.object.EntityObject
;
import
jakarta.persistence.*
;
import
javax.validation.constraints.NotNull
;
import
java.util.Objects
;
@Entity
@Table
(
name
=
"TRX_WOSERVICE"
)
public
class
WorkOrderService
implements
EntityObject
<
WorkOrderService
>
{
@Id
@GeneratedValue
(
generator
=
"trx_woservice_gen"
)
@SequenceGenerator
(
name
=
"trx_woservice_gen"
,
sequenceName
=
"trx_woservice_seq"
)
Integer
id
;
@NotNull
(
message
=
"Work Order Service ID cannot be null"
)
String
workOrderServiceID
;
String
configWorkshopServiceID
;
String
source
;
Double
harga
;
Integer
qty
;
Boolean
c2
;
Boolean
kpb
;
Double
discount
;
Double
total
;
String
woID
;
Double
ppnRate
;
Double
ppnAmount
;
Boolean
isKmRegular
;
Double
claimDiscount
;
Boolean
isContractService
;
String
csPackageCode
;
// Double ppnrate;
// Double ppnamount;
@Embedded
private
CreationalSpecification
workOrderServiceCreational
;
public
WorkOrderService
()
{
}
public
WorkOrderService
(
String
workOrderServiceID
,
String
configWorkshopServiceID
,
String
source
,
Double
harga
,
Integer
qty
,
Boolean
c2
,
Boolean
kpb
,
Double
discount
,
Double
total
,
String
woID
,
Boolean
isKmRegular
,
Double
claimDiscount
,
Double
ppnRate
,
Double
ppnAmount
,
Boolean
isContractService
,
String
csPackageCode
,
CreationalSpecification
workOrderServiceCreational
)
{
this
.
workOrderServiceID
=
workOrderServiceID
;
this
.
configWorkshopServiceID
=
configWorkshopServiceID
;
this
.
source
=
source
;
this
.
harga
=
harga
;
this
.
qty
=
qty
;
this
.
c2
=
c2
;
this
.
kpb
=
kpb
;
this
.
discount
=
discount
;
this
.
total
=
total
;
this
.
woID
=
woID
;
this
.
isKmRegular
=
isKmRegular
;
this
.
claimDiscount
=
claimDiscount
;
this
.
ppnRate
=
ppnRate
;
this
.
ppnAmount
=
ppnAmount
;
this
.
isContractService
=
isContractService
;
this
.
csPackageCode
=
csPackageCode
;
this
.
workOrderServiceCreational
=
workOrderServiceCreational
;
}
public
Double
getHarga
()
{
return
harga
;
}
public
void
setHarga
(
Double
harga
)
{
this
.
harga
=
harga
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getWorkOrderServiceID
()
{
return
workOrderServiceID
;
}
public
void
setWorkOrderServiceID
(
String
workOrderServiceID
)
{
this
.
workOrderServiceID
=
workOrderServiceID
;
}
public
String
getConfigWorkshopServiceID
()
{
return
configWorkshopServiceID
;
}
public
void
setConfigWorkshopServiceID
(
String
configWorkshopServiceID
)
{
this
.
configWorkshopServiceID
=
configWorkshopServiceID
;
}
public
String
getSource
()
{
return
source
;
}
public
void
setSource
(
String
source
)
{
this
.
source
=
source
;
}
public
Integer
getQty
()
{
return
qty
;
}
public
void
setQty
(
Integer
qty
)
{
this
.
qty
=
qty
;
}
public
Boolean
getC2
()
{
return
c2
;
}
public
void
setC2
(
Boolean
c2
)
{
this
.
c2
=
c2
;
}
public
Boolean
getKpb
()
{
return
kpb
;
}
public
void
setKpb
(
Boolean
kpb
)
{
this
.
kpb
=
kpb
;
}
public
Double
getDiscount
()
{
return
discount
;
}
public
void
setDiscount
(
Double
discount
)
{
this
.
discount
=
discount
;
}
public
Double
getTotal
()
{
return
total
;
}
public
void
setTotal
(
Double
total
)
{
this
.
total
=
total
;
}
public
String
getWoID
()
{
return
woID
;
}
public
void
setWoID
(
String
woID
)
{
this
.
woID
=
woID
;
}
public
Boolean
getIsKmRegular
()
{
return
isKmRegular
;
}
public
void
setIsKmRegular
(
Boolean
isKmRegular
)
{
this
.
isKmRegular
=
isKmRegular
;
}
public
Double
getClaimDiscount
()
{
return
claimDiscount
;
}
public
void
setClaimDiscount
(
Double
claimDiscount
)
{
this
.
claimDiscount
=
claimDiscount
;
}
public
Double
getPpnRate
()
{
return
ppnRate
;
}
public
void
setPpnRate
(
Double
ppnRate
)
{
this
.
ppnRate
=
ppnRate
;
}
public
Double
getPpnAmount
()
{
return
ppnAmount
;
}
public
void
setPpnAmount
(
Double
ppnAmount
)
{
this
.
ppnAmount
=
ppnAmount
;
}
public
CreationalSpecification
getWorkOrderServiceCreational
()
{
return
workOrderServiceCreational
;
}
public
void
setWorkOrderServiceCreational
(
CreationalSpecification
workOrderServiceCreational
)
{
this
.
workOrderServiceCreational
=
workOrderServiceCreational
;
}
public
Boolean
getIsContractService
()
{
return
isContractService
;
}
public
void
setIsContractService
(
Boolean
isContractService
)
{
this
.
isContractService
=
isContractService
;
}
public
String
getCsPackageCode
()
{
return
csPackageCode
;
}
public
void
setCsPackageCode
(
String
csPackageCode
)
{
this
.
csPackageCode
=
csPackageCode
;
}
@Override
public
int
hashCode
()
{
int
hash
=
5
;
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
id
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
workOrderServiceID
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
configWorkshopServiceID
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
source
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
harga
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
qty
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
c2
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
kpb
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
discount
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
total
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
woID
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
isKmRegular
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
claimDiscount
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
ppnRate
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
ppnAmount
);
hash
=
23
*
hash
+
Objects
.
hashCode
(
this
.
workOrderServiceCreational
);
return
hash
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
{
return
true
;
}
if
(
obj
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
obj
.
getClass
())
{
return
false
;
}
final
WorkOrderService
other
=
(
WorkOrderService
)
obj
;
if
(!
Objects
.
equals
(
this
.
workOrderServiceID
,
other
.
workOrderServiceID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
configWorkshopServiceID
,
other
.
configWorkshopServiceID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
source
,
other
.
source
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
woID
,
other
.
woID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
id
,
other
.
id
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
harga
,
other
.
harga
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
qty
,
other
.
qty
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
c2
,
other
.
c2
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
kpb
,
other
.
kpb
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
discount
,
other
.
discount
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
total
,
other
.
total
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
isKmRegular
,
other
.
isKmRegular
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
claimDiscount
,
other
.
claimDiscount
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
ppnRate
,
other
.
ppnRate
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
ppnAmount
,
other
.
ppnAmount
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
workOrderServiceCreational
,
other
.
workOrderServiceCreational
))
{
return
false
;
}
return
true
;
}
@Override
public
boolean
sameIdentityAs
(
WorkOrderService
other
)
{
return
this
.
equals
(
other
);
}
}
src/main/java/com/eksad/masterdata/domain/WorkOrderSparepart.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
domain
;
import
com.eksad.ddms.common.util.object.EntityObject
;
import
jakarta.persistence.*
;
import
javax.validation.constraints.NotNull
;
import
java.util.Objects
;
@Entity
@Table
(
name
=
"TRX_WOSPAREPART"
)
public
class
WorkOrderSparepart
implements
EntityObject
<
WorkOrderSparepart
>
{
@Id
@GeneratedValue
(
generator
=
"trx_wosparepart_gen"
)
@SequenceGenerator
(
name
=
"trx_wosparepart_gen"
,
sequenceName
=
"trx_wosparepart_seq"
)
Integer
id
;
@NotNull
(
message
=
"Work Order Service ID cannot be null"
)
String
woSparepartID
;
String
partID
;
Integer
qty
;
Boolean
c2
;
Double
discount
;
Double
total
;
String
woID
;
String
source
;
Boolean
KPB
;
Double
harga
;
Double
ppnRate
;
Double
ppnAmount
;
Double
claimDiscount
;
// Double ppnrate;
// Double ppnamount;
@Embedded
private
CreationalSpecification
workOrderServiceCreational
;
public
WorkOrderSparepart
()
{
}
public
WorkOrderSparepart
(
String
woSparepartID
,
String
partID
,
Integer
qty
,
Boolean
c2
,
Double
discount
,
Double
total
,
String
woID
,
String
source
,
Boolean
KPB
,
Double
harga
,
Double
claimDiscount
,
Double
ppnRate
,
Double
ppnAmount
,
CreationalSpecification
workOrderServiceCreational
)
{
this
.
woSparepartID
=
woSparepartID
;
this
.
partID
=
partID
;
this
.
qty
=
qty
;
this
.
c2
=
c2
;
this
.
discount
=
discount
;
this
.
total
=
total
;
this
.
woID
=
woID
;
this
.
source
=
source
;
this
.
KPB
=
KPB
;
this
.
harga
=
harga
;
this
.
claimDiscount
=
claimDiscount
;
this
.
ppnRate
=
ppnRate
;
this
.
ppnAmount
=
ppnAmount
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getPartID
()
{
return
partID
;
}
public
void
setPartID
(
String
partID
)
{
this
.
partID
=
partID
;
}
public
String
getWoSparepartID
()
{
return
woSparepartID
;
}
public
void
setWoSparepartID
(
String
woSparepartID
)
{
this
.
woSparepartID
=
woSparepartID
;
}
public
Integer
getQty
()
{
return
qty
;
}
public
void
setQty
(
Integer
qty
)
{
this
.
qty
=
qty
;
}
public
Boolean
getC2
()
{
return
c2
;
}
public
void
setC2
(
Boolean
c2
)
{
this
.
c2
=
c2
;
}
public
Double
getDiscount
()
{
return
discount
;
}
public
void
setDiscount
(
Double
discount
)
{
this
.
discount
=
discount
;
}
public
Double
getTotal
()
{
return
total
;
}
public
void
setTotal
(
Double
total
)
{
this
.
total
=
total
;
}
public
String
getWoID
()
{
return
woID
;
}
public
void
setWoID
(
String
woID
)
{
this
.
woID
=
woID
;
}
public
CreationalSpecification
getWorkOrderServiceCreational
()
{
return
workOrderServiceCreational
;
}
public
void
setWorkOrderServiceCreational
(
CreationalSpecification
workOrderServiceCreational
)
{
this
.
workOrderServiceCreational
=
workOrderServiceCreational
;
}
public
String
getSource
()
{
return
source
;
}
public
void
setSource
(
String
source
)
{
this
.
source
=
source
;
}
public
Boolean
getKPB
()
{
return
KPB
;
}
public
void
setKPB
(
Boolean
kPB
)
{
KPB
=
kPB
;
}
public
Double
getHarga
()
{
return
harga
;
}
public
void
setHarga
(
Double
harga
)
{
this
.
harga
=
harga
;
}
public
Double
getClaimDiscount
()
{
return
claimDiscount
;
}
public
void
setClaimDiscount
(
Double
claimDiscount
)
{
this
.
claimDiscount
=
claimDiscount
;
}
public
Double
getPpnRate
()
{
return
ppnRate
;
}
public
void
setPpnRate
(
Double
ppnRate
)
{
this
.
ppnRate
=
ppnRate
;
}
public
Double
getPpnAmount
()
{
return
ppnAmount
;
}
public
void
setPpnAmount
(
Double
ppnAmount
)
{
this
.
ppnAmount
=
ppnAmount
;
}
@Override
public
int
hashCode
()
{
int
hash
=
7
;
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
id
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
woSparepartID
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
partID
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
qty
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
c2
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
discount
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
total
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
woID
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
source
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
KPB
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
harga
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
claimDiscount
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
ppnRate
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
ppnAmount
);
hash
=
31
*
hash
+
Objects
.
hashCode
(
this
.
workOrderServiceCreational
);
return
hash
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
{
return
true
;
}
if
(
obj
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
obj
.
getClass
())
{
return
false
;
}
final
WorkOrderSparepart
other
=
(
WorkOrderSparepart
)
obj
;
if
(!
Objects
.
equals
(
this
.
woSparepartID
,
other
.
woSparepartID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
partID
,
other
.
partID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
woID
,
other
.
woID
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
source
,
other
.
source
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
id
,
other
.
id
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
qty
,
other
.
qty
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
c2
,
other
.
c2
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
discount
,
other
.
discount
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
total
,
other
.
total
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
KPB
,
other
.
KPB
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
harga
,
other
.
harga
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
claimDiscount
,
other
.
claimDiscount
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
ppnRate
,
other
.
ppnRate
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
ppnAmount
,
other
.
ppnAmount
))
{
return
false
;
}
if
(!
Objects
.
equals
(
this
.
workOrderServiceCreational
,
other
.
workOrderServiceCreational
))
{
return
false
;
}
return
true
;
}
@Override
public
boolean
sameIdentityAs
(
WorkOrderSparepart
other
)
{
return
this
.
equals
(
other
);
}
}
src/main/java/com/eksad/masterdata/repository/APIPullNjbNscRepository.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
repository
;
import
com.eksad.ddms.common.util.StringUtil
;
import
com.eksad.masterdata.domain.APIPullNjbNscDetail
;
import
com.eksad.masterdata.domain.APIPullNjbNscHeader
;
import
org.hibernate.Session
;
import
org.hibernate.jdbc.Work
;
import
org.springframework.stereotype.Repository
;
import
jakarta.persistence.EntityManager
;
import
jakarta.persistence.PersistenceContext
;
import
jakarta.transaction.Transactional
;
import
java.sql.*
;
import
java.util.ArrayList
;
import
java.util.List
;
@Repository
@Transactional
public
class
APIPullNjbNscRepository
{
@PersistenceContext
EntityManager
entityManager
;
public
List
<
APIPullNjbNscHeader
>
findAllNjbNscHeaderByRangeDate
(
String
from
,
String
to
,
String
ahassID
)
{
List
<
APIPullNjbNscHeader
>
list
=
new
ArrayList
<>();
try
{
Session
session
=
entityManager
.
unwrap
(
Session
.
class
);
session
.
doWork
(
new
Work
()
{
@Override
public
void
execute
(
Connection
cnctn
)
throws
SQLException
{
String
query
;
if
(
StringUtil
.
hasValue
(
ahassID
))
{
query
=
"SELECT * FROM get_pull_njbnsc_by_range_createdat(?,?,?) order by woid desc"
;
}
else
{
query
=
"SELECT * FROM get_pull_njbnsc_by_range_createdat(?,?) order by woid desc"
;
}
PreparedStatement
ps
=
cnctn
.
prepareStatement
(
query
);
ps
.
setTimestamp
(
1
,
Timestamp
.
valueOf
(
from
));
ps
.
setTimestamp
(
2
,
Timestamp
.
valueOf
(
to
));
if
(
StringUtil
.
hasValue
(
ahassID
))
ps
.
setString
(
3
,
ahassID
);
ResultSet
rs
=
ps
.
executeQuery
();
while
(
rs
.
next
())
{
APIPullNjbNscHeader
data
=
new
APIPullNjbNscHeader
();
data
.
setNoWorkOrder
(
rs
.
getString
(
"woid"
));
data
.
setCreatedTime
(
rs
.
getTimestamp
(
"createdtime"
));
data
.
setHondaIdMekanik
(
rs
.
getString
(
"hondaidmekanik"
));
data
.
setHondaIdSA
(
rs
.
getString
(
"hondaidsa"
));
data
.
setModifiedTime
(
rs
.
getTimestamp
(
"modifiedtime"
));
data
.
setDealerId
(
rs
.
getString
(
"dealerid"
));
data
.
setTotalHargaJasa
(
rs
.
getDouble
(
"totalhargajasa"
));
data
.
setTotalHargaSparepart
(
rs
.
getDouble
(
"totalhargasparepart"
));
data
.
setPromoIdJasa
(
rs
.
getString
(
"promoidjasa"
));
data
.
setPromoIdPart
(
rs
.
getString
(
"promoidpart"
));
data
.
setStartWOTime
(
rs
.
getTimestamp
(
"startwotime"
));
data
.
setFinishFinalCheckTime
(
rs
.
getTimestamp
(
"modifiedtimeorafin"
));
data
.
setTotalHargaNJB
(
rs
.
getDouble
(
"totalharganjb"
));
data
.
setTotalHargaNSC
(
rs
.
getDouble
(
"totalhargansc"
));
data
.
setTanggalNJB
(
rs
.
getTimestamp
(
"tanggalnjb"
));
data
.
setTanggalNSC
(
rs
.
getTimestamp
(
"tanggalnsc"
));
data
.
setNoWorkOrderOrafin
(
rs
.
getString
(
"noworkorderorafin"
));
data
.
setNoNJB
(
rs
.
getString
(
"nonjb"
));
data
.
setNoNSC
(
rs
.
getString
(
"nonsc"
));
data
.
setTotalDP
(
rs
.
getDouble
(
"totalbiayajadi"
));
data
.
setDiscountCode
(
rs
.
getString
(
"discountcode"
));
list
.
add
(
data
);
}
}
});
return
list
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
public
List
<
APIPullNjbNscDetail
>
findAllPullNjbNscDetailByRangeDate
(
String
startDate
,
String
endDate
,
String
ahassID
)
{
List
<
APIPullNjbNscDetail
>
list
=
new
ArrayList
<>();
try
{
Session
session
=
entityManager
.
unwrap
(
Session
.
class
);
session
.
doWork
(
new
Work
()
{
@Override
public
void
execute
(
Connection
cnctn
)
throws
SQLException
{
String
query
;
if
(
StringUtil
.
hasValue
(
ahassID
))
{
query
=
"SELECT * FROM get_detail_pull_njbnsc_by_range_createdat_v2(?,?,?)"
;
}
else
{
query
=
"SELECT * FROM get_detail_pull_njbnsc_by_range_createdat(?,?)"
;
}
PreparedStatement
ps
=
cnctn
.
prepareStatement
(
query
);
ps
.
setTimestamp
(
1
,
Timestamp
.
valueOf
(
startDate
));
ps
.
setTimestamp
(
2
,
Timestamp
.
valueOf
(
endDate
));
if
(
StringUtil
.
hasValue
(
ahassID
))
ps
.
setString
(
3
,
ahassID
);
ResultSet
rs
=
ps
.
executeQuery
();
while
(
rs
.
next
())
{
APIPullNjbNscDetail
data
=
new
APIPullNjbNscDetail
();
data
.
setWoID
(
rs
.
getString
(
"woid"
));
data
.
setCreatedAt
(
rs
.
getTimestamp
(
"createdat"
));
data
.
setModifiedAt
(
rs
.
getTimestamp
(
"modifiedat"
));
data
.
setHarga
(
rs
.
getDouble
(
"harga"
));
data
.
setDiscount
(
rs
.
getDouble
(
"discount"
));
data
.
setTotal
(
rs
.
getDouble
(
"total"
));
data
.
setQty
(
rs
.
getDouble
(
"qty"
));
data
.
setCwsCode
(
rs
.
getString
(
"cwscode"
));
data
.
setPartID
(
rs
.
getString
(
"partid"
));
data
.
setTipe
(
rs
.
getString
(
"tipe"
));
data
.
setUangMuka
(
rs
.
getDouble
(
"uangmuka"
));
list
.
add
(
data
);
}
}
});
return
list
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
list
;
}
}
public
List
<
APIPullNjbNscHeader
>
findAllNjbNscHeaderByWoID
(
String
woID
)
{
List
<
APIPullNjbNscHeader
>
list
=
new
ArrayList
<>();
try
{
Session
session
=
entityManager
.
unwrap
(
Session
.
class
);
session
.
doWork
(
new
Work
()
{
@Override
public
void
execute
(
Connection
cnctn
)
throws
SQLException
{
String
query
;
String
prefix
=
woID
.
split
(
"-"
)[
0
];
if
(
prefix
.
equalsIgnoreCase
(
"SO"
)
||
prefix
.
equalsIgnoreCase
(
"SOP"
))
{
query
=
"SELECT * FROM get_pull_njbnsc_by_soid(?)"
;
}
else
{
query
=
"SELECT * FROM get_pull_njbnsc_by_woid(?)"
;
}
PreparedStatement
ps
=
cnctn
.
prepareStatement
(
query
);
ps
.
setString
(
1
,
woID
);
ResultSet
rs
=
ps
.
executeQuery
();
while
(
rs
.
next
())
{
APIPullNjbNscHeader
data
=
new
APIPullNjbNscHeader
();
data
.
setNoWorkOrder
(
rs
.
getString
(
"woid"
));
data
.
setCreatedTime
(
rs
.
getTimestamp
(
"createdtime"
));
data
.
setHondaIdMekanik
(
rs
.
getString
(
"hondaidmekanik"
));
data
.
setHondaIdSA
(
rs
.
getString
(
"hondaidsa"
));
data
.
setModifiedTime
(
rs
.
getTimestamp
(
"modifiedtime"
));
data
.
setDealerId
(
rs
.
getString
(
"dealerid"
));
data
.
setTotalHargaJasa
(
rs
.
getDouble
(
"totalhargajasa"
));
data
.
setTotalHargaSparepart
(
rs
.
getDouble
(
"totalhargasparepart"
));
data
.
setPromoIdJasa
(
rs
.
getString
(
"promoidjasa"
));
data
.
setPromoIdPart
(
rs
.
getString
(
"promoidpart"
));
data
.
setStartWOTime
(
rs
.
getTimestamp
(
"startwotime"
));
data
.
setFinishFinalCheckTime
(
rs
.
getTimestamp
(
"modifiedtimeorafin"
));
data
.
setTotalHargaNJB
(
rs
.
getDouble
(
"totalharganjb"
));
data
.
setTotalHargaNSC
(
rs
.
getDouble
(
"totalhargansc"
));
data
.
setTanggalNJB
(
rs
.
getTimestamp
(
"tanggalnjb"
));
data
.
setTanggalNSC
(
rs
.
getTimestamp
(
"tanggalnsc"
));
data
.
setNoWorkOrderOrafin
(
rs
.
getString
(
"noworkorderorafin"
));
data
.
setNoNJB
(
rs
.
getString
(
"nonjb"
));
data
.
setNoNSC
(
rs
.
getString
(
"nonsc"
));
data
.
setTotalDP
(
rs
.
getDouble
(
"totalbiayajadi"
));
data
.
setDiscountCode
(
rs
.
getString
(
"discountcode"
));
list
.
add
(
data
);
}
}
});
return
list
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
public
List
<
APIPullNjbNscDetail
>
findAllPullNjbNscDetailByWoID
(
String
woID
)
{
List
<
APIPullNjbNscDetail
>
list
=
new
ArrayList
<>();
try
{
Session
session
=
entityManager
.
unwrap
(
Session
.
class
);
session
.
doWork
(
new
Work
()
{
@Override
public
void
execute
(
Connection
cnctn
)
throws
SQLException
{
String
query
;
String
prefix
=
woID
.
split
(
"-"
)[
0
];
if
(
prefix
.
equalsIgnoreCase
(
"SO"
)
||
prefix
.
equalsIgnoreCase
(
"SOP"
))
{
query
=
"SELECT * FROM get_detail_pull_njbnsc_by_soid(?)"
;
}
else
{
query
=
"SELECT * FROM get_detail_pull_njbnsc_by_woid_v2(?)"
;
}
PreparedStatement
ps
=
cnctn
.
prepareStatement
(
query
);
ps
.
setString
(
1
,
woID
);
ResultSet
rs
=
ps
.
executeQuery
();
while
(
rs
.
next
())
{
APIPullNjbNscDetail
data
=
new
APIPullNjbNscDetail
();
data
.
setWoID
(
rs
.
getString
(
"woid"
));
data
.
setCreatedAt
(
rs
.
getTimestamp
(
"createdat"
));
data
.
setModifiedAt
(
rs
.
getTimestamp
(
"modifiedat"
));
data
.
setHarga
(
rs
.
getDouble
(
"harga"
));
data
.
setDiscount
(
rs
.
getDouble
(
"discount"
));
data
.
setTotal
(
rs
.
getDouble
(
"total"
));
data
.
setQty
(
rs
.
getDouble
(
"qty"
));
data
.
setCwsCode
(
rs
.
getString
(
"cwscode"
));
data
.
setPartID
(
rs
.
getString
(
"partid"
));
data
.
setTipe
(
rs
.
getString
(
"tipe"
));
data
.
setUangMuka
(
rs
.
getDouble
(
"uangmuka"
));
list
.
add
(
data
);
}
}
});
return
list
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
list
;
}
}
}
src/main/java/com/eksad/masterdata/repository/WorkOrderRepository.java
0 → 100644
View file @
a0f09816
package
com
.
eksad
.
masterdata
.
repository
;
import
com.eksad.masterdata.common.GenericRepository
;
import
com.eksad.masterdata.domain.WorkOrder
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
WorkOrderRepository
extends
GenericRepository
<
WorkOrder
>
{
WorkOrder
findOneByWoID
(
String
woID
);
}
src/main/java/com/eksad/masterdata/service/PullNJBNSCHystrixService.java
View file @
a0f09816
...
...
@@ -16,15 +16,16 @@ import com.eksad.ddms.common.uri.DealerURI;
import
com.eksad.ddms.common.util.DateUtil
;
import
com.eksad.ddms.common.util.StringUtil
;
import
com.eksad.ddms.common.util.uri.SalesOrderURI
;
import
com.eksad.ddms.masterdata.h2.domain.orafin.workorder.APIPullNjbNscDetail
;
import
com.eksad.ddms.masterdata.h2.domain.orafin.workorder.APIPullNjbNscHeader
;
import
com.eksad.ddms.masterdata.h2.domain.repository.orafin.workorder.APIPullNjbNscRepository
;
import
com.eksad.ddms.masterdata.h2.domain.repository.workorder.WorkOrderRepository
;
import
com.eksad.ddms.masterdata.h2.domain.workorder.WorkOrder
;
import
com.eksad.masterdata.common.CustomRestTemplate
;
import
com.eksad.masterdata.common.RequestUtil
;
import
com.eksad.masterdata.domain.APIPullNjbNscDetail
;
import
com.eksad.masterdata.domain.APIPullNjbNscHeader
;
import
com.eksad.masterdata.domain.WorkOrder
;
import
com.eksad.masterdata.repository.APIPullNjbNscRepository
;
import
com.eksad.masterdata.repository.WorkOrderRepository
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
jakarta.transaction.Transactional
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.*
;
...
...
@@ -47,12 +48,13 @@ import java.util.logging.Level;
import
java.util.logging.Logger
;
@Service
@Transactional
public
class
PullNJBNSCHystrixService
{
//
@Autowired
APIPullNjbNscRepository
pullNjbNscRepository
;
@Autowired
private
APIPullNjbNscRepository
pullNjbNscRepository
;
//
@Autowired
@Autowired
WorkOrderRepository
woRepository
;
@Value
(
"${dam.cust.purch.h3}"
)
...
...
src/main/resources/application-dev.properties
View file @
a0f09816
server.port
=
8081
spring.datasource.url
=
jdbc:postgresql://localhost:5432/postgres
spring.datasource.username
=
postgres
spring.datasource.password
=
password.1
spring.datasource.url
=
${DATASOURCE_URL:jdbc:postgresql://149.129.246.61:1832/ddmsh2_cbr}
spring.datasource.username
=
${DATASOURCE_USERNAME:ddmsh2app}
spring.datasource.password
=
${DATASOURCE_PASSWORD:bandungh1h2h3}
#spring.datasource.url = jdbc:postgresql://localhost:5432/postgres
#spring.datasource.username = postgres
#spring.datasource.password = password.1
spring.jpa.generate-ddl
=
false
spring.jpa.hibernate.ddl-auto
=
none
spring.jpa.properties.hibernate.dialect
=
org.hibernate.dialect.PostgreSQLDialect
...
...
@@ -31,3 +33,5 @@ spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.S
# Kafka Topic Name
kafka.topic.name
=
pipeline-topic
dam.cust.purch.h3
=
${DAM_CUST_PURCH_H3:https://api-uat-b.eksad.com/cust-purch/}
\ No newline at end of file
target/classes/application-dev.properties
View file @
a0f09816
server.port
=
8081
spring.datasource.url
=
jdbc:postgresql://localhost:5432/postgres
spring.datasource.username
=
postgres
spring.datasource.password
=
password.1
spring.datasource.url
=
${DATASOURCE_URL:jdbc:postgresql://149.129.246.61:1832/ddmsh2_cbr}
spring.datasource.username
=
${DATASOURCE_USERNAME:ddmsh2app}
spring.datasource.password
=
${DATASOURCE_PASSWORD:bandungh1h2h3}
#spring.datasource.url = jdbc:postgresql://localhost:5432/postgres
#spring.datasource.username = postgres
#spring.datasource.password = password.1
spring.jpa.generate-ddl
=
false
spring.jpa.hibernate.ddl-auto
=
none
spring.jpa.properties.hibernate.dialect
=
org.hibernate.dialect.PostgreSQLDialect
...
...
@@ -31,3 +33,5 @@ spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.S
# Kafka Topic Name
kafka.topic.name
=
pipeline-topic
dam.cust.purch.h3
=
${DAM_CUST_PURCH_H3:https://api-uat-b.eksad.com/cust-purch/}
\ No newline at end of file
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
View file @
a0f09816
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\common\Constants.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\common\CreationalSpecificationBuilder.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\common\CustomRestTemplate.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\common\DateUtils.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\common\GenericRepository.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\common\GenericResponseDTO.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\common\LogOpsDTO.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\common\LogOpsUtil.java
...
...
@@ -12,13 +14,24 @@ C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\jav
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\config\SecurityConfig.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\controller\APIGatewayH23RESTController.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\controller\SampleMasterdataWoController.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\APIPullNjbNscDetail.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\APIPullNjbNscHeader.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\ComplaintWorkOrder.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\CreationalSpecification.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\MstWo.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\PromoWorkOrder.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\PromoWorkOrderDetail.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\TrxBizpar.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\WorkOrder.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\WorkOrderService.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\domain\WorkOrderSparepart.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\event\KafkaEvent.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\model\Role.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\model\User.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\repository\APIPullNjbNscRepository.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\repository\BizparRepository.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\repository\WoRepository.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\repository\WorkOrderRepository.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\service\KafkaProducerService.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\service\ProcessHelperService.java
C:\Users\eksad\Documents\kantor\DDMS SLAVE\ddms-h2-masterdata-slave\src\main\java\com\eksad\masterdata\service\PullNJBNSCHystrixService.java
...
...
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